constantEggRDI {mizer} | R Documentation |
Choose egg production to keep egg density constant
Description
The new egg production is set to compensate for the loss of individuals from
the smallest size class through growth and mortality. The result should not
be modified by density dependence, so this should be used together with
the noRDD()
function, see example.
Usage
constantEggRDI(params, n, e_growth, mort, ...)
Arguments
params |
A MizerParams object |
n |
A matrix of species abundances (species x size). |
e_growth |
A two dimensional array (species x size) holding the energy
available for growth as calculated by |
mort |
A two dimensional array (species x size) holding the mortality
rate as calculated by |
... |
Unused |
Value
Vector with the value for each species
See Also
Other functions calculating density-dependent reproduction rate:
BevertonHoltRDD()
,
RickerRDD()
,
SheperdRDD()
,
constantRDD()
,
noRDD()
Examples
# choose an example params object
params <- NS_params
# We set the reproduction rate functions
params <- setRateFunction(params, "RDI", "constantEggRDI")
params <- setRateFunction(params, "RDD", "noRDD")
# Now the egg density should stay fixed no matter how we fish
sim <- project(params, effort = 10, progress_bar = FALSE)
# To check that indeed the egg densities have not changed, we first construct
# the indices for addressing the egg densities
no_sp <- nrow(params@species_params)
idx <- (params@w_min_idx - 1) * no_sp + (1:no_sp)
# Now we can check equality between egg densities at the start and the end
all.equal(finalN(sim)[idx], initialN(params)[idx])
[Package mizer version 2.5.1 Index]