FIMS  v0.9.2
Loading...
Searching...
No Matches
fims_popdy::RecruitmentBase< Type > Struct Template Referenceabstract

Base class for all recruitment functors. More...

#include <recruitment_base.hpp>

Inheritance diagram for fims_popdy::RecruitmentBase< Type >:
fims_model_object::FIMSObject< Type > fims_popdy::LogDevs< Type > fims_popdy::LogR< Type > fims_popdy::SRBevertonHolt< Type >

Public Member Functions

 RecruitmentBase ()
 Constructor.
 
void Prepare ()
 Prepares the recruitment deviations vector.
 
virtual const Type evaluate_mean (const Type &spawners, const Type &ssbzero)=0
 Calculates the expected recruitment for a given spawning input.
 
virtual const Type evaluate_process (size_t pos)=0
 Handle error in recruitment.
 
void PrepareConstrainedDeviations ()
 Prepare constrained recruitment deviations. Based on ADMB sum-to-zero constraint implementation. We still need to add an additional penalty to the PrepareConstrainedDeviations method. More discussion can be found here: https://groups.google.com/a/ADMB-project.org/g/users/c/63YJmYGEPuE.
 
- 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 Attributes

fims::Vector< Typelog_recruit_devs
 
bool constrain_deviations = false
 
fims::Vector< Typelog_rzero
 
fims::Vector< Typelog_r
 
fims::Vector< Typelog_expected_recruitment
 
bool estimate_log_recruit_devs = true
 
int process_id = -999
 
std::shared_ptr< fims_popdy::RecruitmentBase< Type > > process
 
std::shared_ptr< fims_popdy::RecruitmentBase< Type > > recruitment
 
- 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
 

Static Public Attributes

static uint32_t id_g = 0
 

Detailed Description

template<class Type>
struct fims_popdy::RecruitmentBase< Type >

Base class for all recruitment functors.

Template Parameters
TypeThe type of the recruitment functor.

Member Function Documentation

◆ evaluate_mean()

template<class Type >
virtual const Type fims_popdy::RecruitmentBase< Type >::evaluate_mean ( const Type spawners,
const Type ssbzero 
)
pure virtual

Calculates the expected recruitment for a given spawning input.

Recruitment is evaluated for the first age you have in your data. For example, if you have age-1 fish in your weight-at-age and age- composition data then recruitment will happen for age-1 fish, not age-0. There is no way to set the age at which this function is evaluated for, it is solely based on your input data.

Parameters
spawnersA measure for spawning output.
ssbzeroA measure for spawning output in unfished population.

Implemented in fims_popdy::LogDevs< Type >, fims_popdy::LogR< Type >, and fims_popdy::SRBevertonHolt< Type >.

◆ evaluate_process()

template<class Type >
virtual const Type fims_popdy::RecruitmentBase< Type >::evaluate_process ( size_t  pos)
pure virtual

Handle error in recruitment.

Parameters
posPosition index, e.g., which year.

Implemented in fims_popdy::LogDevs< Type >, fims_popdy::LogR< Type >, and fims_popdy::SRBevertonHolt< Type >.

Member Data Documentation

◆ constrain_deviations

template<class Type >
bool fims_popdy::RecruitmentBase< Type >::constrain_deviations = false

A flag to indicate if recruitment deviations are summing to zero or not

◆ estimate_log_recruit_devs

template<class Type >
bool fims_popdy::RecruitmentBase< Type >::estimate_log_recruit_devs = true

A flag to indicate if recruitment deviations are estimated or not

◆ id_g

template<class Type >
uint32_t fims_popdy::RecruitmentBase< Type >::id_g = 0
static

reference id for recruitment object

◆ log_expected_recruitment

template<class Type >
fims::Vector<Type> fims_popdy::RecruitmentBase< Type >::log_expected_recruitment

Expectation of the recruitment process

◆ log_r

Natural log of recruitment used for random effects

◆ log_recruit_devs

template<class Type >
fims::Vector<Type> fims_popdy::RecruitmentBase< Type >::log_recruit_devs

A vector of the natural log of recruitment deviations

◆ log_rzero

Natural log of unexploited recruitment.

◆ process

template<class Type >
std::shared_ptr<fims_popdy::RecruitmentBase<Type> > fims_popdy::RecruitmentBase< Type >::process

shared pointer to recruitment processmodule

◆ process_id

template<class Type >
int fims_popdy::RecruitmentBase< Type >::process_id = -999

id of recruitment process model object

◆ recruitment

template<class Type >
std::shared_ptr<fims_popdy::RecruitmentBase<Type> > fims_popdy::RecruitmentBase< Type >::recruitment

shared pointer to recruitment module


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