View source: R/rate_functions.R
| getFlux | R Documentation |
Calculates the flux J_i(w) (numbers/year) entering each size class
from the one below it. This is composed of an advective flux from somatic
growth and a diffusive flux from the redistribution of individuals.
getFlux(object, ..., power = 0)
object |
A MizerParams or MizerSim object. |
... |
Additional arguments that depend on the class of For a MizerParams object:
For a MizerSim object:
|
power |
The flux at weight |
At the recruitment size, the flux is simply the recruitment rate
R_{dd,i} (see getRDD()). For sizes below the recruitment size
the flux is zero.
The flux at weight w is multiplied by w raised to the power
given by the power argument, similar to the power argument of
plotSpectra(). The default power = 0 returns the flux of individuals
(numbers/year). With power = 1 the result is the flux of biomass
(grams/year).
MizerParams: An ArraySpeciesBySize object (species x size) with the
flux entering each size class. The units are numbers/year when
power = 0 and g^power/year otherwise.
MizerSim: An ArrayTimeBySpeciesBySize object (time step x species x
size) with the flux at every time step. If drop = TRUE then dimensions
of length 1 will be removed.
getEGrowth(), getRDD()
Other rate functions:
getDiffusion(),
getEGrowth(),
getERepro(),
getEReproAndGrowth(),
getEncounter(),
getFMort(),
getFMortGear(),
getFeedingLevel(),
getFluxGradient(),
getMort(),
getPredMort(),
getPredRate(),
getRDD(),
getRDI(),
getRates(),
getResourceMort()
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 flux at a particular time step
flux <- getFlux(params, n = N(sim)[15, , ], n_pp = NResource(sim)[15, ], t = 15)
# Flux for Sprat of size 2g
flux["Sprat", "2"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.