action_mature {gadget3}R Documentation

Gadget3 maturity action

Description

Add maturity actions to a g3 model

Usage

g3a_mature_continuous(
        alpha = g3_parameterized('mat.alpha', by_stock = by_stock),
        l50 = g3_parameterized('mat.l50', by_stock = by_stock),
        beta = 0,
        a50 = 0,
        by_stock = TRUE)

g3a_mature_constant(alpha = NULL, l50 = NA, beta = NULL, a50 = NA, gamma = NULL, 
    k50 = NA)

g3a_mature(stock, maturity_f, output_stocks, output_ratios = rep(1/length(output_stocks), 
    times = length(output_stocks)), run_f = ~TRUE,
    run_at = g3_action_order$grow,
    transition_at = g3_action_order$mature)

Arguments

alpha

A formula to substitute for \alpha.

l50

A formula to substitute for l_{50}. Must be defined if alpha is defined.

beta

A formula to substitute for \beta.

a50

A formula to substitute for a_{50}. Must be defined if beta is defined.

gamma

A formula to substitute for \gamma.

k50

A formula to substitute for k_{50}. Must be defined if gamma is defined.

by_stock

Change the default parameterisation (e.g. to be by 'species'), see g3_parameterized.

stock

g3_stock to mature.

maturity_f

A maturity formula, as defined by g3a_mature_constant.

output_stocks

List of g3_stocks that maturing stock should move into.

output_ratios

Vector of proportions for how to distribute into output_stocks, summing to 1, default evenly spread.

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 g3_action_order.

transition_at

Integer order that transition actions will be run within model, see g3_action_order.

Details

Generally you would use g3a_growmature, which does both growth and maturity at the same time.

A model can have any number of g3a_mature actions, so long as the calling arguments are different. For instance, run_f = ~age == 5 and run_f = ~age == 7.

Value

g3a_mature_continuous

A formula object representing

m_0 * (\alpha \Delta{L} + \beta \Delta{t})^\top

m_0

The g3a_mature_constant formula, as defined below, using parameters supplied to g3a_mature_continuous

\Delta{L}

Vector of all possible changes in length, as per current growth matrix (see g3a_grow_impl_bbinom)

\Delta{t}

Length of the current timestep

g3a_mature_constant

A formula object with the following equation

\frac{1}{ 1 + e^{-\alpha(l - l_{50}) -\beta(a - a_{50}) -\gamma(k - k_{50})}}

l

length of stock

l_{50}

length of stock when 50% are mature

a

age of stock

a_{50}

age of stock when 50% are mature

k

weight of stock

k_{50}

weight of stock when 50% are mature

g3a_mature

An action (i.e. list of formula objects) that will, for the given stock...

  1. Move any maturing individuals into temporary storage, stock__transitioning_num / stock__transitioning_wgt

  2. Move the contents of the temporary storage into output_stocks

See Also

https://gadget-framework.github.io/gadget2/userguide/chap-stock.html#sec:stockmature, g3a_growmature, g3_stock

Examples

ling_imm <- g3_stock('ling_imm', seq(20, 156, 4))
ling_mat <- g3_stock('ling_mat', seq(20, 156, 4))

# Maturity for immature ling
maturity_action <- g3a_mature(ling_imm,
    maturity_f = g3a_mature_continuous(),
    output_stocks = list(ling_mat))

[Package gadget3 version 0.12-1 Index]