-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathmizerEncounter.Rd
104 lines (89 loc) · 4.09 KB
/
mizerEncounter.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/project_methods.R
\name{mizerEncounter}
\alias{mizerEncounter}
\title{Get encounter rate needed to project standard mizer model}
\usage{
mizerEncounter(params, n, n_pp, n_other, t, ...)
}
\arguments{
\item{params}{A \linkS4class{MizerParams} object}
\item{n}{A matrix of species abundances (species x size).}
\item{n_pp}{A vector of the resource abundance by size}
\item{n_other}{A list of abundances for other dynamical components of the
ecosystem}
\item{t}{The time for which to do the calculation (Not used by standard
mizer rate functions but useful for extensions with time-dependent
parameters.)}
\item{...}{Unused}
}
\value{
A named two dimensional array (predator species x predator size) with
the encounter rates.
}
\description{
Calculates the rate \eqn{E_i(w)} at which a predator of species \eqn{i} and
weight \eqn{w} encounters food (grams/year). You would not usually call this
function directly but instead use \code{\link[=getEncounter]{getEncounter()}}, which then calls this
function unless an alternative function has been registered, see below.
}
\section{Predation encounter}{
The encounter rate \eqn{E_i(w)} at which a predator of species \eqn{i}
and weight \eqn{w} 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
\eqn{w_p}, weighted by predation kernel \eqn{\phi(w,w_p)}:
\deqn{
E_i(w) = \gamma_i(w) \int
\left( \theta_{ip} N_R(w_p) + \sum_{j} \theta_{ij} N_j(w_p) \right)
\phi_i(w,w_p) w_p \, dw_p.
}{\gamma_i(w) \int
( \theta_{ip} N_R(w_p) + \sum_{j} \theta_{ij} N_j(w_p) )
\phi_i(w,w_p) w_p dw_p.}
Here \eqn{N_j(w)} is the abundance density of species \eqn{j} and
\eqn{N_R(w)} is the abundance density of resource.
The overall prefactor \eqn{\gamma_i(w)} determines the predation power of the
predator. It could be interpreted as a search volume and is set with the
\code{\link[=setSearchVolume]{setSearchVolume()}} function. The predation kernel
\eqn{\phi(w,w_p)} is set with the \code{\link[=setPredKernel]{setPredKernel()}} function. The
species interaction matrix \eqn{\theta_{ij}} is set with \code{\link[=setInteraction]{setInteraction()}}
and the resource interaction vector \eqn{\theta_{ip}} is taken from the
\code{interaction_resource} column in \code{params@species_params}.
}
\section{Details}{
The encounter rate is multiplied by \eqn{1-f_0} to obtain the consumption
rate, where \eqn{f_0} is the feeding level calculated with
\code{\link[=getFeedingLevel]{getFeedingLevel()}}. This is used by the \code{\link[=project]{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
\code{\link[=setComponent]{setComponent()}} and for which you specified an \code{encounter_fun} function then
the encounters of these components will be included in the returned value.
}
\section{Your own encounter function}{
By default \code{\link[=getEncounter]{getEncounter()}} calls \code{\link[=mizerEncounter]{mizerEncounter()}}. However you can
replace this with your own alternative encounter function. If
your function is called \code{"myEncounter"} then you register it in a MizerParams
object \code{params} with
\if{html}{\out{<div class="sourceCode">}}\preformatted{params <- setRateFunction(params, "Encounter", "myEncounter")
}\if{html}{\out{</div>}}
Your function will then be called instead of \code{\link[=mizerEncounter]{mizerEncounter()}}, with the
same arguments.
}
\seealso{
Other mizer rate functions:
\code{\link{mizerEGrowth}()},
\code{\link{mizerERepro}()},
\code{\link{mizerEReproAndGrowth}()},
\code{\link{mizerFMort}()},
\code{\link{mizerFMortGear}()},
\code{\link{mizerFeedingLevel}()},
\code{\link{mizerMort}()},
\code{\link{mizerPredMort}()},
\code{\link{mizerPredRate}()},
\code{\link{mizerRDI}()},
\code{\link{mizerRates}()},
\code{\link{mizerResourceMort}()}
}
\concept{mizer rate functions}