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).