Skip to contents

[Experimental]

Run the full dynamics, as in project(), but stop once the change has slowed down sufficiently, in the sense that the distance between states at successive time steps is less than tol. You determine how the distance is calculated.

Usage

projectToSteady(
  params,
  effort = params@initial_effort,
  distance_func = distanceSSLogN,
  t_per = 1.5,
  t_max = 100,
  dt = 0.1,
  tol = 0.1 * t_per,
  return_sim = FALSE,
  progress_bar = TRUE,
  ...
)

Arguments

params

A MizerParams object

effort

The fishing effort to be used throughout the simulation. This must be a vector or list with one named entry per fishing gear.

distance_func

A function that will be called after every t_per years with both the previous and the new state and that should return a number that in some sense measures the distance between the states. By default this uses the function distanceSSLogN() that you can use as a model for your own distance function.

t_per

The simulation is broken up into shorter runs of t_per years, after each of which we check for convergence. Default value is 1.5. This should be chosen as an odd multiple of the timestep dt in order to be able to detect period 2 cycles.

t_max

The maximum number of years to run the simulation. Default is 100.

dt

The time step to use in project().

tol

The simulation stops when the relative change in the egg production RDI over t_per years is less than tol for every species.

return_sim

If TRUE, the function returns the MizerSim object holding the result of the simulation run, saved at intervals of t_per. If FALSE (default) the function returns a MizerParams object with the "initial" slots set to the steady state.

progress_bar

A shiny progress object to implement a progress bar in a shiny app. Default FALSE.

...

Further arguments will be passed on to your distance function.

Value

A MizerParams or a MizerSim object