action_spawn.Rd
Add spawning to a g3 model
g3a_spawn_recruitment_fecundity(p0, p1, p2, p3, p4)
g3a_spawn_recruitment_simplessb(mu)
g3a_spawn_recruitment_ricker(mu, lambda)
g3a_spawn_recruitment_bevertonholt(mu, lambda)
g3a_spawn_recruitment_hockeystick(r0, blim)
g3a_spawn(
stock,
recruitment_f,
proportion_f = 1,
mortality_f = 0,
weightloss_f = 0,
output_stocks = list(),
output_ratios = rep(1 / length(output_stocks), times = length(output_stocks)),
mean_f = g3a_renewal_vonb_t0(by_stock = by_stock),
stddev_f = g3_parameterized('rec.sd', value = 10, by_stock = by_stock),
alpha_f = g3_parameterized('walpha', by_stock = wgt_by_stock),
beta_f = g3_parameterized('wbeta', by_stock = wgt_by_stock),
by_stock = TRUE,
wgt_by_stock = TRUE,
run_step = NULL,
run_f = ~TRUE,
run_at = g3_action_order$spawn,
recruit_at = g3_action_order$renewal)
Substituted into g3a_spawn_recruitment_fecundity
formula, see below.
Substituted into g3a_spawn_recruitment_*
formula, see below.
The mature g3_stock
that will spawn in this action.
A list of formula generated by one of the g3a_spawn_recruitment_*
functions, containing
Formula run for each subset of stock
Final formula for calculating number of recruits for spawning action
formula generated by one of the g3_suitability_* functions, describing the proportion of stock that will spawn at this timestep.
formula generated by one of the g3_suitability_* functions, describing the proportion of spawning stock that will die during spawning.
formula generated by one of the g3_suitability_* functions, describing the overall weight loss during spawning.
List of g3_stock
s that will be spawned into.
Vector of proportions for how to distribute into output_stocks, summing to 1, default evenly spread.
formula substituted into stock structure calculations, see g3a_renewal_normalparam for details.
Which step to perform renewal in, or NULL
for continuous spawning.
Adds cur_step == (run_step)
into default run_f.
formula specifying a condition for running this action, default always runs.
Integer order that spawning actions will be run within model, see g3_action_order
.
Integer order that recruitment from spawning will be run within model, see g3_action_order
.
Controls how parameters are grouped, see g3_parameterized
To restrict spawning to a particular step in a year, or a particular area, use run_f. For example:
cur_step == 1
Spawning will happen on first step of every year
cur_step == 1 && cur_year >= 1990
Spawning will happen on first step of every year after 1990
cur_step == 2 && area = 1
Spawning will happen on second step of every year, in the first area
The action will define the following stock instance variables for each given stock and output_stock:
Proportion of (stock) that are spawning in this spawning event
Numbers of (stock) that are spawning in this spawning event
Numbers of (output_stock) that will be produced in this spawning event
A pair of formula objects: $$ S = l ^{p_{1}} a^{p_{2}} (p N_{al})^{p_{3}} W_{al}^{p_{4}} $$ $$ R = p_{0} S $$
Number of parent stock
Weight of parent stock
Proportion of parent stock spawning, from proportion_f
Arguments provided to function
A pair of formula objects: $$ S = N_{al} p W_{al} $$ $$ R = \mu S $$
Number of parent stock
Weight of parent stock
Proportion of parent stock spawning, from proportion_f
Argument provided to function
A pair of formula objects: $$ S = N_{al} p W_{al} $$ $$ R = \mu S e^{-\lambda S} $$
Number of parent stock
Weight of parent stock
Proportion of parent stock spawning, from proportion_f
Argument provided to function
Argument provided to function
A pair of formula objects: $$ S = N_{al} p W_{al} $$ $$ R = \frac{\mu S}{\lambda + S} $$
Number of parent stock
Weight of parent stock
Proportion of parent stock spawning, from proportion_f
Argument provided to function
Argument provided to function
A pair of formula objects: $$ S = N_{al} p W_{al} $$ $$ R = R_0 \min{( S / B_{lim}, 1)} $$
Number of parent stock
Weight of parent stock
Proportion of parent stock spawning, from proportion_f
Argument r0
provided to function
Argument blim
provided to function
NB: This formula is differentiable, despite using min()
in the
definition above.
An action (i.e. list of formula objects) that will, for the given stock...
Use proportion_f to calculate the total parent stock that will spawn
Use recruitment_f to derive the total newly spawned stock
Apply weightloss_f and mortality_f to the parent stock
... then, at recruitment stage ...
Recruit evenly into output_stocks, using mean_f, stddev_f, alpha_f, beta_f as-per g3a_renewal_normalparam
ling_imm <- g3_stock('ling_imm', seq(20, 156, 4)) %>% g3s_age(3, 10)
ling_mat <- g3_stock('ling_mat', seq(20, 156, 4)) %>% g3s_age(3, 10)
spawn_action <- g3a_spawn(
# Spawn from ling_mat
ling_mat,
# Use Ricker Recruitment Function to calculate # of recruits from total biomass
recruitment_f = g3a_spawn_recruitment_ricker(
g3_parameterized("ricker.mu"),
g3_parameterized("ricker.lambda")),
# Proportion of ling_mat spawning exponential relationship based on length
proportion_f = g3_suitability_exponentiall50(
alpha = g3_parameterized("spawn.prop.alpha", scale = -1),
l50 = g3_parameterized("spawn.prop.l50")),
# Proportion of ling_mat dying during spawning linear relationship to length
mortality_f = g3_suitability_straightline(
alpha = g3_parameterized("spawn.mort.alpha"),
beta = g3_parameterized("spawn.mort.beta")),
# Weightloss of ling_mat during spawning a constant
weightloss_f = g3_parameterized("spawn.weightloss"),
# Spawn into ling_imm
output_stocks = list(ling_imm),
# Spawned stock structure, as-per g3a_renewal_normalparam()
mean_f = 50,
stddev_f = 0.9,
alpha_f = 1,
beta_f = 1,
# Spawning should happen on the first step of every year
run_f = ~cur_step==1)