View source: R/wrapper_functions.R
newTraitParams | R Documentation |
This functions creates a MizerParams
object describing a trait-based
model. This is a simplification of the general size-based model used in
mizer
in which the species-specific parameters are the same for all
species, except for the maximum size, which is considered the most
important trait characterizing a species. Other parameters are related to the
maximum size. For example, the size at maturity is given by w_max *
eta
, where eta
is the same for all species. For the trait-based model
the number of species is not important. For applications of the trait-based
model see Andersen & Pedersen (2010). See the mizer
website for more
details and examples of the trait-based model.
newTraitParams(
no_sp = 11,
min_w_max = 10,
max_w_max = 10^4,
min_w = 10^(-3),
max_w = max_w_max,
eta = 10^(-0.6),
min_w_mat = min_w_max * eta,
no_w = round(log10(max_w_max/min_w) * 20 + 1),
min_w_pp = 1e-10,
w_pp_cutoff = min_w_mat,
n = 2/3,
p = n,
lambda = 2.05,
r_pp = 0.1,
kappa = 0.005,
alpha = 0.4,
h = 40,
beta = 100,
sigma = 1.3,
f0 = 0.6,
fc = 0.25,
ks = NA,
gamma = NA,
ext_mort_prop = 0,
reproduction_level = 1/4,
R_factor = deprecated(),
gear_names = "knife_edge_gear",
knife_edge_size = 1000,
egg_size_scaling = FALSE,
resource_scaling = FALSE,
perfect_scaling = FALSE,
min_w_inf = deprecated(),
max_w_inf = deprecated()
)
The function has many arguments, all of which have default values. Of particular interest to the user are the number of species in the model and the minimum and maximum sizes.
The characteristic weights of the smallest species are defined by
min_w
(egg size), min_w_mat
(maturity size) and
min_w_max
(maximum size). The maximum sizes of
the no_sp
species
are logarithmically evenly spaced, ranging from min_w_max
to
max_w_max
.
Similarly the maturity sizes of the species are logarithmically evenly
spaced, so that the ratio eta
between maturity size and maximum
size is the same for all species. If egg_size_scaling = TRUE
then also
the ratio between maximum size and egg size is the same for all species.
Otherwise all species have the same egg size.
In addition to setting up the parameters, this function also sets up an initial condition that is close to steady state.
The search rate coefficient gamma
is calculated using the expected
feeding level, f0
.
The option of including fishing is given, but the steady state may loose its
natural stability if too much fishing is included. In such a case the user
may wish to include stabilising effects (like reproduction_level
) to ensure
the steady state is stable. Fishing selectivity is modelled as a knife-edge
function with one parameter, knife_edge_size
, which is the size at which
species are selected. Each species can either be fished by the same gear
(knife_edge_size
has a length of 1) or by a different gear (the length of
knife_edge_size
has the same length as the number of species and the order
of selectivity size is that of the maximum size).
The resulting MizerParams
object can be projected forward using
project()
like any other MizerParams
object. When projecting
the model it may be necessary to reduce dt
below 0.1 to avoid any
instabilities with the solver. You can check this by plotting the biomass or
abundance through time after the projection.
An object of type MizerParams
Other functions for setting up models:
newCommunityParams()
,
newMultispeciesParams()
,
newSingleSpeciesParams()
params <- newTraitParams()
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.