init_ring | R Documentation |
Initialize ring parameters: generate arrival probabilities for S-Ring. - set beginning states to 0 and initialize random customer states and nElevators - nStates = (number of floors * 2) - 2. For example for 4 floors, its 6 states because the upper and lower state have only one direction and all other have 2 (UP and DOWN)
init_ring(params)
params |
list of
|
list (params) of
randomSeed
random seed
nStates
number of S-Ring states
nElevators
number of elevators
probNewCustomer
probability pf a customer arrival
counter
Counter: number of waiting customers
sElevator
Vector representing elevators (s)
sCustomer
Vector representing customers (c)
currentState
Current state that is calculated
nextState
Next state that is calculated
nWeights
Number of weights for the perceptron (= 2 * nStates)
params <-list(sElevator=NULL, sCustomer=NULL, currentState=NULL, nextState=NULL, counter=NULL, nStates=12, nElevators=2, probNewCustomer=0.1, weightsPerceptron=rep(0.1, 24), nWeights=NULL, nIterations=100, randomSeed=1234) init_ring(params)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.