sd_sensitivity_run {readsdr} | R Documentation |
Perform a sensitivity run on a System Dynamics model
Description
sd_sensitivity_run
returns a data frame with the simulation of a
model for several iterations of different inputs.
Usage
sd_sensitivity_run(
ds_inputs,
consts_df = NULL,
stocks_df = NULL,
start_time = NULL,
stop_time = NULL,
timestep = NULL,
integ_method = "euler",
multicore = FALSE,
n_cores = NULL,
reporting_interval = 1
)
Arguments
ds_inputs |
A list of deSolve inputs generated by read_xmile |
consts_df |
A data frame that contains the values of constants to
simulate. Each column corresponds to a constant and each row to an
iteration. If |
stocks_df |
A data frame that containts the initial value of stocks to
be explored. Each column corresponds to a stock and each row to an
iteration. If |
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" |
multicore |
A boolean value that indicates whether the process is parallelised. |
n_cores |
An integer indicating the number of cores for the parallel run. |
reporting_interval |
A real number indicating the interval at which the
simulation results are returned. The default is set to |
Value
A data frame
Examples
path <- system.file("models", "SIR.stmx", package = "readsdr")
ds_inputs <- xmile_to_deSolve(path)
consts_df <- data.frame(i = c(0.25, 0.30))
sd_sensitivity_run(ds_inputs, consts_df)