action_age {gadget3} | R Documentation |
Gadget3 age action
Description
Add ageing actions to a g3 model
Usage
g3a_age(
stock,
output_stocks = list(),
output_ratios = rep(1/length(output_stocks),
times = length(output_stocks)),
run_f = ~cur_step_final,
run_at = g3_action_order$age,
transition_at = g3_action_order$age)
Arguments
stock |
|
output_stocks |
List of |
output_ratios |
Vector of proportions for how to distribute into output_stocks, default evenly spread. |
run_f |
formula specifying a condition for running this action, default is end of model year. |
run_at |
Integer order that actions will be run within model, see |
transition_at |
Integer order that transition actions will be run within model, see |
Value
An action (i.e. list of formula objects) that will, for the given stock...
Move the final age group into temporary storage,
stock__transitioning_num
/stock__transitioning_wgt
Move the contents of all other age groups into the age group above
Move the contents of the temporary storage into output_stocks
If stock has only one age, and output_stocks has been specified, then the contentes will be moved, if output_stocks is empty, then the action will do nothing.
See Also
https://gadget-framework.github.io/gadget2/userguide/chap-stock.html#sec:stockmature,
g3_stock
Examples
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(5, 15)
# Ageing for immature ling
age_action <- g3a_age(ling_imm,
output_stocks = list(ling_mat))