FIMS  v0.10.0
Loading...
Searching...
No Matches
fims_popdy::VonBertalanffySchnuteGrowth< Type > Struct Template Reference

VonBertalanffySchnute growth functor for length-at-age and weight-at-age. More...

#include <vonb_schnute.hpp>

Inheritance diagram for fims_popdy::VonBertalanffySchnuteGrowth< Type >:
fims_popdy::GrowthBase< Type > fims_model_object::FIMSObject< Type > fims_model_object::FIMSMemoryTracker

Public Member Functions

Type length_at_age (const Type &age) const
 Evaluate mean length at age.
 
Type log_length_at_age (const Type &age) const
 Evaluate log mean length at age.
 
void log_length_at_age_gradient (const Type &age, Type &d_log_laa_d_length_young, Type &d_log_laa_d_length_old, Type &d_log_laa_d_k) const
 Evaluate the gradient of log mean length at age with respect to the current natural-scale FIMS VonBertalanffySchnute parameterization.
 
void log_length_at_age_logscale_gradient (const Type &age, Type &d_log_laa_d_log_length_young, Type &d_log_laa_d_log_length_old, Type &d_log_laa_d_log_k) const
 Evaluate the gradient of log mean length at age with respect to the log-scale FIMS VonBertalanffySchnute parameterization [log(mean_length_young), log(mean_length_old), log(growth_coefficient)].
 
Type weight_at_age (const Type &age) const
 Evaluate mean weight at age via the length-weight relationship.
 
virtual const Type evaluate (int year, const double &a) override
 Calculates the growth at the independent variable value.
 
- Public Member Functions inherited from fims_popdy::GrowthBase< Type >
 GrowthBase ()
 Constructor.
 
- Public Member Functions inherited from fims_model_object::FIMSObject< Type >
uint32_t GetId () const
 Getter that returns the unique id for parameters in the model.
 
bool CheckDimensions (size_t actual, size_t expected)
 Check the dimensions of an object.
 
- Public Member Functions inherited from fims_model_object::FIMSMemoryTracker
void register_self (const uint32_t id)
 Registers a FIMSObject instance with the memory tracker.
 

Public Attributes

Type mean_length_young = Type(0.0)
 Expected length at the first reference age.
 
Type mean_length_old = Type(0.0)
 Expected length at the second reference age.
 
Type growth_coefficient = Type(0.0)
 Growth coefficient.
 
Type reference_age_for_length_young = Type(0.0)
 First reference age for the length parameterization.
 
Type reference_age_for_length_old = Type(0.0)
 Second reference age for the length parameterization.
 
Type length_weight_a = Type(0.0)
 Coefficient in the length-weight relationship, W = a * L^b.
 
Type length_weight_b = Type(3.0)
 Exponent in the length-weight relationship, W = a * L^b.
 
- Public Attributes inherited from fims_model_object::FIMSObject< Type >
uint32_t id
 
std::vector< Type * > parameters
 
std::vector< Type * > random_effects_parameters
 
std::vector< Type * > fixed_effects_parameters
 

Additional Inherited Members

- Static Public Attributes inherited from fims_popdy::GrowthBase< Type >
static uint32_t id_g = 0
 
- Static Public Attributes inherited from fims_model_object::FIMSMemoryTracker
static int total_active_objects = 0
 Total number of active FIMSObject instances currently in memory.
 

Detailed Description

template<typename Type>
struct fims_popdy::VonBertalanffySchnuteGrowth< Type >

VonBertalanffySchnute growth functor for length-at-age and weight-at-age.

Parameterization using length at two reference ages: L(a) = mean_length_young + (mean_length_old - mean_length_young) * (1 - exp(-growth_coefficient * (a - reference_age_for_length_young))) / (1 - exp(-growth_coefficient * (reference_age_for_length_old - reference_age_for_length_young)))

Note
Users can anchor at t0 by setting reference_age_for_length_young = 0 and mean_length_young = L(0). This is valid as long as reference_age_for_length_old > reference_age_for_length_young.

Member Function Documentation

◆ evaluate()

template<typename Type >
virtual const Type fims_popdy::VonBertalanffySchnuteGrowth< Type >::evaluate ( int  year,
const double a 
)
inlineoverridevirtual

Calculates the growth at the independent variable value.

Parameters
yearThe year at which to return weight of the fish (in kg).
aThe age at which to return weight of the fish (in kg).

Implements fims_popdy::GrowthBase< Type >.

◆ length_at_age()

template<typename Type >
Type fims_popdy::VonBertalanffySchnuteGrowth< Type >::length_at_age ( const Type age) const
inline

Evaluate mean length at age.

Parameters
ageAge on the natural scale.
Returns
Mean length at the requested age.

◆ log_length_at_age()

template<typename Type >
Type fims_popdy::VonBertalanffySchnuteGrowth< Type >::log_length_at_age ( const Type age) const
inline

Evaluate log mean length at age.

Parameters
ageAge on the natural scale.
Returns
Log mean length at the requested age.

◆ log_length_at_age_gradient()

template<typename Type >
void fims_popdy::VonBertalanffySchnuteGrowth< Type >::log_length_at_age_gradient ( const Type age,
Type d_log_laa_d_length_young,
Type d_log_laa_d_length_old,
Type d_log_laa_d_k 
) const
inline

Evaluate the gradient of log mean length at age with respect to the current natural-scale FIMS VonBertalanffySchnute parameterization.

Parameters
ageAge on the natural scale.
d_log_laa_d_length_youngOutput derivative with respect to mean_length_young.
d_log_laa_d_length_oldOutput derivative with respect to mean_length_old.
d_log_laa_d_kOutput derivative with respect to growth_coefficient.

◆ log_length_at_age_logscale_gradient()

template<typename Type >
void fims_popdy::VonBertalanffySchnuteGrowth< Type >::log_length_at_age_logscale_gradient ( const Type age,
Type d_log_laa_d_log_length_young,
Type d_log_laa_d_log_length_old,
Type d_log_laa_d_log_k 
) const
inline

Evaluate the gradient of log mean length at age with respect to the log-scale FIMS VonBertalanffySchnute parameterization [log(mean_length_young), log(mean_length_old), log(growth_coefficient)].

Parameters
ageAge on the natural scale.
d_log_laa_d_log_length_youngOutput derivative with respect to log(mean_length_young).
d_log_laa_d_log_length_oldOutput derivative with respect to log(mean_length_old).
d_log_laa_d_log_kOutput derivative with respect to log(growth_coefficient).

◆ weight_at_age()

template<typename Type >
Type fims_popdy::VonBertalanffySchnuteGrowth< Type >::weight_at_age ( const Type age) const
inline

Evaluate mean weight at age via the length-weight relationship.

Parameters
ageAge on the natural scale.
Returns
Mean weight at the requested age.

The documentation for this struct was generated from the following file: