Added function to generate random numbers to use in schedule creation.
added a set fuction to change the state of used on a node.