powered by
Simulate a System Dynamics model
sd_simulate( ds_inputs, start_time = NULL, stop_time = NULL, timestep = NULL, integ_method = "euler" )
a data frame
A list of deSolve inputs generated by read_xmile
A number indicating the time at which the simulation begins.
A number indicating the time at which the simulation ends.
A number indicating the time interval for the simulation. Also known as dt.
dt
A string indicating the integration method. It can be either "euler" or "rk4"
path <- system.file("models", "SIR.stmx", package = "readsdr") ds_inputs <- xmile_to_deSolve(path) sd_simulate(ds_inputs, 0, 1, 0.25, "rk4")
Run the code above in your browser using DataLab