Description Usage Arguments See Also Examples
A set of functions to create a model manager and to add 1. time models, 2. time updater, 3. change models and 4. updaters to it.
In general, model managers consist of a set of model chains that follow the generic four-step scheme sketched above.
1 2 3 4 5 | create_model_manager()
add_time_model(modelManager, timeModel)
add_time_updater(modelManager, timeUpdater)
add_change_model(modelManager, timeModel, changeModel)
add_updater(modelManager, changeModel, updater)
|
modelManager |
A model manager object |
timeModel |
A time model object. See time model overview for examples. |
timeUpdater |
A time updater object. See time updater overview for examples. |
changeModel |
A change model object. See change model overview for examples. |
updater |
An updater. See updater overview for examples. |
create_network
create_attribute_container
1 2 3 4 5 6 7 8 9 10 11 12 13 | # minimal code example model manager
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)
simulator <- create_simulator(processState, modelManager, 20)
simulate(simulator)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.