Repository navigation
Expand file tree
/
Copy pathresource_params.Rd
More file actions
76 lines (69 loc) · 3.68 KB
/
Copy pathresource_params.Rd
File metadata and controls
76 lines (69 loc) · 3.68 KB
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/resource_dynamics.R
\name{resource_params}
\alias{resource_params}
\alias{resource_params<-}
\title{Resource parameters}
\usage{
resource_params(params)
resource_params(params) <- value
}
\arguments{
\item{params}{A MizerParams object}
\item{value}{A named list of resource parameters.}
}
\value{
A named list of resource parameters.
}
\description{
The recommended way to change the resource dynamics parameters is to use
\code{\link[=setResource]{setResource()}}. The \code{resource_params} list contains values that are helpful
in setting up the actual size-dependent parameters with \code{\link[=setResource]{setResource()}}. If
you have specified a custom resource dynamics function that requires
additional parameters, then these should also be added to the
\code{resource_params} list.
}
\details{
The \code{resource_params} list will at least contain the slots \code{kappa}, \code{lambda},
\code{w_pp_cutoff} and \code{n}.
The resource parameter \code{n} is the exponent for the power-law form for the
replenishment rate \eqn{r_R(w)}: \deqn{r_R(w) = r_R\, w^{n-1}.}{r_R(w) = r_R
w^{n-1}.}
The resource parameter \code{lambda} (\eqn{\lambda}) is the exponent for the
power-law form for the carrying capacity \eqn{c_R(w)} and \code{w_pp_cutoff} is
its cutoff value: \deqn{c_R(w) = c_R w^{-\lambda}} for all \eqn{w} less than
\code{w_pp_cutoff} and zero for larger sizes.
The resource parameter \code{kappa} (\eqn{\kappa}) is the coefficient \eqn{c_R} of
the carrying capacity in the power law above, so
\deqn{c_R(w) = \kappa\, w^{-\lambda}}{c_R(w) = \kappa w^{-\lambda}}
for all \eqn{w} less than \code{w_pp_cutoff} and zero for larger sizes. Changing
\code{kappa} therefore rescales the carrying capacity. It has a second role in that
the same expression also set the initial resource abundance when the model was
created: \deqn{N_R(w) = \kappa\, w^{-\lambda}.}{N_R(w) = \kappa w^{-\lambda}.}
Unlike the carrying capacity, however, the initial resource abundance is
\strong{not} updated when you subsequently change \code{kappa} (or call \code{\link[=setResource]{setResource()}}).
The resource parameters \code{a} and \code{b} give the allometric weight-length
relationship \eqn{w = a l^b} of the resource, with \eqn{w} in grams and
\eqn{l} in centimetres. They feed none of the rates; they exist so that the
resource can be shown on the length-based plots (\code{size_axis = "l"}) alongside
the species. They default to the equivalent spherical diameter of an organism
with the density of water, \eqn{a = \pi/6} and \eqn{b = 3}, which is the
convention plankton ecology uses for a composite of many taxa. This is a
different convention from the one the species use, so the resource and the
species each sit on the length axis at their own; see
\link{resource_length_defaults}.
Assigning to \code{resource_params} only rebuilds the size-dependent resource rate
and capacity arrays from these scalars (leaving any arrays you have set
manually untouched). Changing \code{lambda} also recalculates any \code{q} and \code{gamma}
species parameters that mizer calculated, and changing \code{kappa} recalculates
any calculated \code{gamma}; values you supplied explicitly are preserved. It
does \strong{not} balance the resource, i.e. it does not adjust one of the rate or
capacity to keep the resource at the steady state where it replenishes at
the rate at which it is consumed. This mirrors the way the species
parameters feed the species rates. If you want to preserve the steady state
after changing a resource scalar, call \code{\link[=setResource]{setResource()}} with the appropriate
argument (which balances by default).
}
\seealso{
\code{\link[=setResource]{setResource()}}
}