run_resumable_simulation: Run the simulation in a resumable way

View source: R/model.R

run_resumable_simulationR Documentation

Run the simulation in a resumable way

Description

this function accepts an initial simulation state as an argument, and returns the final state after running all of its timesteps. This allows one run to be resumed, possibly having changed some of the parameters.

Usage

run_resumable_simulation(
  timesteps,
  parameters = NULL,
  correlations = NULL,
  initial_state = NULL,
  restore_random_state = FALSE
)

Arguments

timesteps

the timestep at which to stop the simulation

parameters

a named list of parameters to use

correlations

correlation parameters

initial_state

the state from which the simulation is resumed

restore_random_state

if TRUE, restore the random number generator's state from the checkpoint.

Value

a list with two entries, one for the dataframe of results and one for the final simulation state.


mrc-ide/malariasimulation documentation built on Oct. 14, 2024, 7:33 p.m.