getEncounter {mizer} | R Documentation |
Get encounter rate
Description
Returns the rate at which a predator of species and
weight
encounters food (grams/year).
Usage
getEncounter(
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 named two dimensional array (predator species x predator size) with the encounter rates.
Predation encounter
The encounter rate at which a predator of species
and weight
encounters food has contributions from the encounter of
fish prey and of resource. This is determined by summing over all prey
species and the resource spectrum and then integrating over all prey sizes
, weighted by predation kernel
:
Here is the abundance density of species
and
is the abundance density of resource.
The overall prefactor
determines the predation power of the
predator. It could be interpreted as a search volume and is set with the
setSearchVolume()
function. The predation kernel
is set with the
setPredKernel()
function. The
species interaction matrix is set with
setInteraction()
and the resource interaction vector is taken from the
interaction_resource
column in params@species_params
.
Details
The encounter rate is multiplied by to obtain the consumption
rate, where
is the feeding level calculated with
getFeedingLevel()
. This is used by the project()
function for performing
simulations.
The function returns values also for sizes outside the size-range of the species. These values should not be used, as they are meaningless.
If your model contains additional components that you added with
setComponent()
and for which you specified an encounter_fun
function then
the encounters of these components will be included in the returned value.
Your own encounter function
By default getEncounter()
calls mizerEncounter()
. However you can
replace this with your own alternative encounter function. If
your function is called "myEncounter"
then you register it in a MizerParams
object params
with
params <- setRateFunction(params, "Encounter", "myEncounter")
Your function will then be called instead of mizerEncounter()
, with the
same arguments.
See Also
Other rate functions:
getEGrowth()
,
getERepro()
,
getEReproAndGrowth()
,
getFMort()
,
getFMortGear()
,
getFeedingLevel()
,
getMort()
,
getPredMort()
,
getPredRate()
,
getRDD()
,
getRDI()
,
getRates()
,
getResourceMort()
Examples
encounter <- getEncounter(NS_params)
str(encounter)