action_grow.Rd
Add growth/maturity actions to a g3 model
g3a_grow_lengthvbsimple(
linf_f = g3_parameterized('Linf', by_stock = by_stock),
kappa_f = g3_parameterized('K', by_stock = by_stock),
by_stock = TRUE)
g3a_grow_weightsimple(
alpha_f = g3_parameterized('walpha', by_stock = by_stock),
beta_f = g3_parameterized('wbeta', by_stock = by_stock),
by_stock = TRUE)
g3a_grow_impl_bbinom(
delta_len_f = g3a_grow_lengthvbsimple(by_stock = by_stock),
delta_wgt_f = g3a_grow_weightsimple(by_stock = by_stock),
beta_f = g3_parameterized('bbin', by_stock = by_stock),
maxlengthgroupgrowth,
by_stock = TRUE)
g3a_growmature(stock, impl_f, maturity_f = ~0, output_stocks = list(),
output_ratios = rep(1/length(output_stocks), times = length(output_stocks)),
transition_f = ~cur_step_final, run_f = ~TRUE,
run_at = g3_action_order$grow,
transition_at = g3_action_order$mature)
A formula to substitute for \(L_\infty\).
A formula to substitute for \(\kappa\).
A formula to substitute for \(\alpha\).
A formula to substitute for \(\beta\).
An integer with the maximum length groups an individual can jump in one step.
g3_stock
to grow.
A formula defining a non-negative vector for mean increase in length for stock
for each lengthgroup, as defined by g3a_grow_lengthvbsimple
.
A formula defining the corresponding weight increase as a matrix of
lengthgroup to lengthgroup delta for stock
, as defined by g3a_grow_weightsimple
.
Change the default parameterisation (e.g. to be by 'species'), see g3_parameterized
.
A pair of formula objects, as defined by g3a_grow_impl_bbinom
.
Both define a matrix of length groups i
to length group deltas j
(0..maxlengthgroupgrowth),
the values in the first indicate the proportion of individuals moving from i
to i + j
,
the values in the second indicate the corresponding weight increase of individuals moving from i
to i + j
.
A maturity formula, as defined by g3a_mature_constant
.
List of g3_stock
s that maturing stock should move into.
Vector of proportions for how to distribute into output_stocks, summing to 1, default evenly spread.
formula specifying a contition for running maturation steps as well as growth, default final step of year.
formula specifying a condition for running this action, default always runs.
Integer order that actions will be run within model, see g3_action_order
.
Integer order that transition actions will be run within model, see g3_action_order
.
A model can have any number of g3a_growmature
actions, so long as the
calling arguments are different. For instance, run_f = ~age == 5
and
run_f = ~age == 7
.
impl_f's dependent variables are analysed to see what will affect growth.
If nothing but cur_step_size
will affect growth, then growth will only
be recalculated when the step size changes.
Returns a formula for use as delta_len_f:
$$ {{\Delta}L}_i = ( L_\infty - L_i )(1 - e^{-\kappa{\Delta}t}) $$
Where \( \Delta{t} \) is the length of the current timestep.
Returns a formula for use as delta_wgt_f:
$$ {{\Delta}W}_{i,j} = \alpha ( (L_i + {{\Delta}L}_j)^\beta - {L_i}^\beta ) $$
Where \( \Delta{t} \) is the length of the current timestep,
\( {{\Delta}L} \) is all possible length group increases i.e 0..maxlengthgroupgrowth
.
formula object converting mean growths using beta-binomia distribution. See https://gadget-framework.github.io/gadget2/userguide/chap-stock.html#beta-binomial
An action (i.e. list of formula objects) that will, for the given stock...
Move any maturing individuals into temporary storage, stock__transitioning_num
/ stock__transitioning_wgt
Calculate increase in length/weight using growth_f and impl_f
Move the contents of the temporary storage into output_stocks
ling_imm <- g3_stock(c(species = 'ling', 'imm'), seq(20, 156, 4))
ling_mat <- g3_stock(c(species = 'ling', 'mat'), seq(20, 156, 4))
# Growth / maturity for immature ling
growth_action <- g3a_growmature(ling_imm,
impl_f = g3a_grow_impl_bbinom(
# Parameters will be ling.Linf, ling.K
g3a_grow_lengthvbsimple(by_stock = 'species'),
# Parameters will be ling_imm.walpha, ling_imm.wbeta
g3a_grow_weightsimple(),
maxlengthgroupgrowth = 15),
maturity_f = g3a_mature_constant(
alpha = g3_parameterized('ling.mat1', scale = 0.001),
l50 = g3_parameterized('ling.mat2')),
output_stocks = list(ling_mat))