Description Usage Arguments See Also Examples
Functions related to run a simulation based on a process state and a model manager. A simulator object needs to be created, then the simulator can be run. After the simulation the number of simulation steps can be returned.
1 2 3 4 | create_simulator(processState, modelManager, periodLength = 1,
verbose = TRUE, debug = FALSE)
simulate(simulator)
get_iteration_steps(simulator)
|
processState |
A process state object |
modelManager |
A model manager object |
periodLength |
A time span to simulate. The default is 1. |
verbose |
If TRUE it generates some basic information output including a progress bar |
debug |
If TRUE it generate a very detailed output for some models. Slows down the simulation process significantly. |
simulator |
A simulator object |
create_process_state
create_model_manager
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Detailed examples of process states and model managers can be found in
## section 4 of the package vignette.
processState <- create_process_state()
modelManager <- create_model_manager()
processState <- create_process_state()
processState <- add_global_attribute(processState, 0.0, name = "timer")
timerIndex <- get_global_attribute_index(processState, name = "timer")
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.