Calls other rate functions in sequence and collects the results in a list. The rates returned are encounter, feeding level, energy for growth and reproduction, predation rate, predation mortality, and resource mortality. The purpose of this function is to provide a convenient way to get all the rates at once, and to ensure that they are all calculated at the same time step with the same inputs. The rates are returned in a list with the same names as the rate functions that calculate them, so for example the encounter rate is returned in the list element named "encounter" and is calculated with the getEncounter() function.
Usage
getRates(
params,
n = initialN(params),
n_pp = initialNResource(params),
n_other = initialNOther(params),
effort,
t = 0,
...
)Arguments
- params
A MizerParams object
- n
A matrix of species abundances (species x size).
- n_pp
A vector of the resource abundance by size
- n_other
A list of abundances for other dynamical components of the ecosystem
- effort
The effort for each fishing gear
- t
The time for which to do the calculation (Not used by standard mizer rate functions but useful for extensions with time-dependent parameters.)
- ...
Unused
Details
When mizer needs to calculate the rates during a simulation it does not use
this function but instead the faster projectRates().
See also
Other rate functions:
getDiffusion(),
getEGrowth(),
getERepro(),
getEReproAndGrowth(),
getEncounter(),
getFMort(),
getFMortGear(),
getFeedingLevel(),
getFlux(),
getMort(),
getPredMort(),
getPredRate(),
getRDD(),
getRDI(),
getResourceMort()
Examples
rates <- getRates(NS_params)
names(rates)
#> [1] "encounter" "feeding_level" "e" "e_repro"
#> [5] "e_growth" "diffusion" "pred_rate" "pred_mort"
#> [9] "f_mort" "mort" "rdi" "rdd"
#> [13] "resource_mort"
identical(rates$encounter, getEncounter(NS_params))
#> [1] FALSE
