| 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
randomSeedrandom seed
nStatesnumber of S-Ring states
nElevatorsnumber of elevators
probNewCustomerprobability pf a customer arrival
counterCounter: number of waiting customers
sElevatorVector representing elevators (s)
sCustomerVector representing customers (c)
currentStateCurrent state that is calculated
nextStateNext state that is calculated
nWeightsNumber 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.