getERepro: Get energy rate available for reproduction

View source: R/rate_functions.R

getEReproR Documentation

Get energy rate available for reproduction

Description

Calculates the energy rate (grams/year) available for reproduction after growth and metabolism have been accounted for.

Usage

getERepro(
  params,
  n = initialN(params),
  n_pp = initialNResource(params),
  n_other = initialNOther(params),
  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

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

Value

A two dimensional array (prey species x prey size) holding

\psi_i(w)E_{r.i}(w)

where E_{r.i}(w) is the rate at which energy becomes available for growth and reproduction, calculated with getEReproAndGrowth(), and \psi_i(w) is the proportion of this energy that is used for reproduction. This proportion is taken from the params object and is set with setReproduction().

Your own reproduction rate function

By default getERepro() calls mizerERepro(). However you can replace this with your own alternative reproduction rate function. If your function is called "myERepro" then you register it in a MizerParams object params with

params <- setRateFunction(params, "ERepro", "myERepro")

Your function will then be called instead of mizerERepro(), with the same arguments.

See Also

Other rate functions: getEGrowth(), getEReproAndGrowth(), getEncounter(), getFMort(), getFMortGear(), getFeedingLevel(), getMort(), getPredMort(), getPredRate(), getRDD(), getRDI(), getRates(), getResourceMort()

Examples


params <- NS_params
# Project with constant fishing effort for all gears for 20 time steps
sim <- project(params, t_max = 20, effort = 0.5)
# Get the rate at a particular time step
erepro <- getERepro(params, n = N(sim)[15, , ], n_pp = NResource(sim)[15, ], t = 15)
# Rate at this time for Sprat of size 2g
erepro["Sprat", "2"]


mizer documentation built on Oct. 17, 2024, 9:07 a.m.