action_naturalmortality {gadget3} | R Documentation |
Gadget3 natural mortality action
Description
Add natural mortality to a g3 model
Usage
g3a_naturalmortality_exp(
param_f = g3_parameterized('M', by_stock = by_stock, by_age = TRUE),
by_stock = TRUE,
action_step_size_f = ~cur_step_size)
g3a_naturalmortality(
stock,
mortality_f = g3a_naturalmortality_exp(),
run_f = TRUE,
run_at = g3_action_order$naturalmortality)
Arguments
param_f |
A formula to substitute for |
action_step_size_f |
How much model time passes in between runs of action? defaults to |
by_stock |
Change the default parameterisation (e.g. to be by 'species'), see |
stock |
|
mortality_f |
A mortality formula, as defined by |
run_f |
formula specifying a condition for running this action, default always runs. |
run_at |
Integer order that actions will be run within model, see |
Details
A model can have any number of g3a_naturalmortality
actions, so long as the
calling arguments are different. For instance, run_f = ~age == 5
and
run_f = ~age == 7
.
Value
g3a_naturalmortality_exp
A formula object with the following equation
e^{-m \Delta t}
\Delta t
length of current timestep
g3a_naturalmortality
An action (i.e. list of formula objects) that will, for the given stock...
Remove a proportion of each stock group as calculated by the mortality formula
mortality_f
See Also
https://gadget-framework.github.io/gadget2/userguide/chap-stock.html#sec:stocknatmort,
g3a_growmature
,
g3_stock
Examples
ling_imm <- g3_stock('ling_imm', seq(20, 156, 4)) %>% g3s_age(3, 10)
# Natural mortality for immature ling
naturalmortality_action <- g3a_naturalmortality(ling_imm)
# NB: M is used in both g3a_naturalmortality and g3a_renewal_initabund, to
# customise, you need to make sure the definitions are in sync, for example:
M <- g3_parameterized('M', by_stock = TRUE, by_age = FALSE)
actions <- list(
g3a_naturalmortality(ling_imm,
g3a_naturalmortality_exp(M)),
g3a_initialconditions_normalparam(ling_imm,
factor_f = g3a_renewal_initabund(M = M)),
NULL)