sd_simulate | R Documentation |
Simulate a System Dynamics model
sd_simulate(
ds_inputs,
start_time = NULL,
stop_time = NULL,
timestep = NULL,
integ_method = "euler"
)
ds_inputs |
A list of deSolve inputs generated by read_xmile |
start_time |
A number indicating the time at which the simulation begins. |
stop_time |
A number indicating the time at which the simulation ends. |
timestep |
A number indicating the time interval for the simulation.
Also known as |
integ_method |
A string indicating the integration method. It can be either "euler" or "rk4" |
a data frame
path <- system.file("models", "SIR.stmx", package = "readsdr")
ds_inputs <- xmile_to_deSolve(path)
sd_simulate(ds_inputs, 0, 1, 0.25, "rk4")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.