Description Usage Arguments See Also Examples
Overview of time updaters implemented in NetSim. So far, there is one time updater that keeps a global timer up-to-date by adding time spans determined by time models.
1 | create_timer_updater(timerIndex)
|
timerIndex |
A pointer to a global attribute in the process state representing the timer |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | processState <- create_process_state()
# add timer variable to process state
processState <- add_global_attribute(processState, name = "timer", value = 0)
timerIndex <- get_global_attribute_index(processState, name = "timer")
# create time updater based on the timer index
timeUpdater <- create_timer_updater(timerIndex)
modelManager <- create_model_manager()
myTimeModel <- create_round_based_time_model(timerIndex)
modelManager <- add_time_model(modelManager, myTimeModel)
timeSpan <- 20
simulator <- create_simulator(processState, modelManager, timeSpan,
verbose = TRUE, debug = FALSE)
simulate(simulator)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.