These functions allow you to get or set the resource parameters stored in a MizerParams object. The resource parameters are stored as a named list with the slot names r_pp, kappa, lambda, n, w_pp_cutoff. For their meaning see Details below. If you change these parameters then this will recalculate the resource rate and the resource capacity, unless you have set custom values for these. If you have specified a different resource dynamics function that requires additional parameters, then these should also be added to the resource_params list.

resource_params(params)

resource_params(params) <- value

Arguments

params

A MizerParams object

value

A named list of resource parameters.

Details

The resource parameters r_pp and n are used to set the intrinsic replenishment rate \(r_R(w)\) for the resource at size \(w\) to $$r_R(w) = r_{pp}\, w^{n-1}.$$

The resource parameters kappa, lambda and w_pp_cutoff are used to set the intrinsic resource carrying capacity capacity \(c_R(w)\) at size \(w\) is set to $$c_R(w) = \kappa\, w^{-\lambda}$$ for all \(w\) less than w_pp_cutoff and zero for larger sizes.

If you use the default semichemostat dynamics for the resource then these rates enter the equation for the resource abundance density as $$\frac{\partial N_R(w,t)}{\partial t} = r_R(w) \Big[ c_R (w) - N_R(w,t) \Big] - \mu_R(w, t) N_R(w,t)$$ where the mortality \(\mu_R(w, t)\) is due to predation by consumers and is calculate with getResourceMort().

You can however set up different resource dynamics with resource_dynamics<-().

See also

Examples

resource_params(NS_params)
#> $kappa #> [1] 1e+11 #> #> $lambda #> [1] 2.133333 #> #> $r_pp #> [1] 10 #> #> $n #> [1] 0.6666667 #> #> $w_pp_cutoff #> [1] 9.820907 #>
# Doubling the replenishment rate params <- NS_params resource_params(params)$r_pp <- 2 * resource_params(params)$r_pp