Takes the final values from a simulation in a MizerSim object and stores them as initial values in a MizerParams object.

setInitialValues(params, sim)



A MizerParams() object


A MizerSim object.


The params object with updated initial values and initial effort, taken from the values at the final time of the simulation in sim. Because of the way the R language works, setInitialValues() does not make the changes to the params object that you pass to it but instead returns a new params object. So to affect the change you call the function in the form params <- setInitialValues(params, sim).

See also


if (FALSE) {
params <- NS_params
sim <- project(params, t_max = 20, effort = 0.5)
params <- setInitialValues(params, sim)