init_ring: init_ring

View source: R/funSring.R

init_ringR Documentation

init_ring

Description

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)

Usage

init_ring(params)

Arguments

params

list 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)

Value

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)

Examples


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)
 

SPOT documentation built on June 26, 2022, 1:06 a.m.