Load restart state from restart date. This takes output from a combined task that has been processed with spim_fit_process to return the model state at a given date.
spim_restart_initial_state(restart, date, round = FALSE)
The loaded restart date (processed with
spim_fit_process in a previous task). We require that
restart
has a state
element which is list with elements
time
(a sircovid date) and state
(a 3d array of model state
by particle by time
).
The date that the restart should come from. Will be passed through sircovid::as_sircovid_date so can be either an integer sircovid date, an R Date or a string representing an ISO date.
Logical parameter, indicates whether or not to round the main model states. Can be used to ensure that a restart initial state from a deterministic parent fit can be used in a stochastic restart fit. Default is FALSE
A list with the same names as restart
, but with
restart$state
filtered down to a single date's data and
restart$state$restart_date
replaced by the sircovid date
corresponding to the restart.