View source: R/newSingleSpeciesParams.R
| newSingleSpeciesParams | R Documentation |
This functions creates a MizerParams object with a single
species. This species is embedded in a fixed power-law community spectrum
N_c(w) = \kappa w^{-\lambda}
This community provides the food income for the species. Cannibalism is switched off. The predation mortality arises only from the predators in the power-law community and it is assumed that the predators in the community have the same feeding parameters as the foreground species. The function has many arguments, all of which have default values.
newSingleSpeciesParams(
species_name = "Target species",
w_max = 100,
w_min = 0.001,
eta = 10^(-0.6),
w_mat = w_max * eta,
no_w = log10(w_max/w_min) * 20 + 1,
n = 3/4,
p = n,
lambda = 2.05,
kappa = 0.005,
alpha = 0.4,
h = 30,
beta = 100,
sigma = 1.3,
f0 = 0.6,
fc = 0.25,
ks = NA,
gamma = NA,
ext_mort_prop = 0,
reproduction_level = 0,
second_order_w = FALSE,
info_level = default_info_level(),
R_factor = deprecated(),
w_inf = deprecated(),
k_vb = deprecated()
)
In addition to setting up the parameters, this function also sets up an initial condition that is close to steady state, under the assumption of no fishing.
The function rounds no_w to the nearest integer and increases it if
necessary so that there are at least 5 size bins per factor 10 in body
size. It requires w_min < w_mat < w_max, ext_mort_prop in [0, 1),
positive values for n, lambda, kappa, alpha, h, beta, sigma
and f0, and fc between 0 and f0 if fc is supplied. If gamma is
supplied then f0 is ignored after its value has been validated. The
function stops if the resulting feeding level is not sufficient to maintain
the species.
The returned model has a single foreground species with cannibalism switched
off and a fixed power-law background community that provides both food and
predation mortality. The initial species spectrum is scaled so that its
maximum abundance is half the background abundance at the corresponding
size, and erepro is then adjusted so the initial state satisfies the egg
boundary condition.
The diffusion rate is set to 0. Because growth is therefore deterministic,
no individual grows beyond w_repro_max, the size at which all available
energy is invested into reproduction. The upper boundary of the size grid is
therefore placed at that size, so that w_max = w_repro_max, instead of the
1.5 * w_repro_max headroom that newMultispeciesParams() leaves to
accommodate the stochastic growth produced by diffusion. This choice will be
revisited once these constructors gain a diffusion parameter, see
https://github.com/sizespectrum/mizer/issues/339.
An object of type MizerParams
Other functions for setting up models:
newCommunityParams(),
newMultispeciesParams(),
newTraitParams()
params <- newSingleSpeciesParams()
sim <- project(params, t_max = 5, effort = 0)
plotSpectra(sim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.