## 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)
Run the code above in your browser using DataLab