FIMS  v0.8.0
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.
 
virtual void create_report_vectors (std::map< std::string, fims::Vector< fims::Vector< Type > > > &report_vectors)
 Create a map of report vectors for the object. used to populate the report_vectors map in FisheryModelBase.
 
virtual void get_report_vector_count (std::map< std::string, size_t > &report_vector_count)
 Get the report vector count object. used to get the length of each report vector for populating the UncertaintyReportInfo struct in FisheryModelBase.
 

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.

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: