FIMS  v0.8.0
Loading...
Searching...
No Matches
BevertonHoltRecruitmentInterface Class Reference

Rcpp interface for Beverton–Holt to instantiate from R: beverton_holt <- methods::new(beverton_holt). More...

#include <rcpp_recruitment.hpp>

Inheritance diagram for BevertonHoltRecruitmentInterface:
RecruitmentInterfaceBase FIMSRcppInterfaceBase

Public Member Functions

 BevertonHoltRecruitmentInterface ()
 The constructor.
 
 BevertonHoltRecruitmentInterface (const BevertonHoltRecruitmentInterface &other)
 Construct a new Beverton–Holt Recruitment Interface object.
 
virtual ~BevertonHoltRecruitmentInterface ()
 The destructor.
 
virtual uint32_t get_id ()
 Gets the ID of the interface base object.
 
void SetRecruitmentProcessID (uint32_t process_id)
 Set the unique ID for the recruitment process object.
 
virtual double evaluate_mean (double spawners, double ssbzero)
 Evaluate recruitment using the Beverton–Holt stock–recruitment relationship.
 
virtual double evaluate_process (size_t pos)
 Evaluate recruitment process - returns 0 in this module.
 
virtual void finalize ()
 Extracts derived quantities back to the Rcpp interface object from the Information object.
 
virtual void set_uncertainty (std::map< std::string, std::vector< double > > &se_values)
 Sets the uncertainty values for the parameters from the standard error values passed from R.
 
virtual std::string to_json ()
 Converts the data to json representation for the output.
 
- Public Member Functions inherited from RecruitmentInterfaceBase
 RecruitmentInterfaceBase ()
 The constructor.
 
 RecruitmentInterfaceBase (const RecruitmentInterfaceBase &other)
 Construct a new Recruitment Interface Base object.
 
virtual ~RecruitmentInterfaceBase ()
 The destructor.
 
- Public Member Functions inherited from FIMSRcppInterfaceBase
virtual bool add_to_fims_tmb ()
 A virtual method to inherit to add objects to the TMB model.
 
void get_se_values (std::string name, std::map< std::string, std::vector< double > > &se_values, fims::Vector< double > &values)
 Method to extract standard error values from the se_values working map.
 
std::string value_to_string (double value)
 Report the parameter value as a string.
 
std::string make_dimensions (uint32_t start, uint32_t end, uint32_t rep=1)
 Make a string of dimensions for the model.
 

Public Attributes

SharedInt n_years
 The number of years.
 
ParameterVector logit_steep
 The logistic transformation of steepness (h; productivity of the population), where the parameter is transformed to constrain it between 0.2 and 1.0.
 
ParameterVector log_rzero
 The natural log of recruitment at unfished biomass.
 
ParameterVector log_devs
 The natural log of recruitment deviations.
 
ParameterVector log_r
 The recruitment random effect parameter on the natural log scale.
 
ParameterVector log_expected_recruitment
 Expectation of the recruitment process.
 
fims_double estimated_logit_steep
 The estimate of the logit transformation of steepness.
 
fims_double estimated_log_rzero
 The estimate of the natural log of recruitment at unfished biomass.
 
RealVector estimated_log_devs
 The estimates of the natural log of recruitment deviations.
 
- Public Attributes inherited from RecruitmentInterfaceBase
uint32_t id
 The local id of the RecruitmentInterfaceBase object.
 
SharedInt process_id = -999
 The process id of the RecruitmentInterfaceBase object.
 
- Public Attributes inherited from FIMSRcppInterfaceBase
bool finalized = false
 Is the object already finalized? The default is false.
 

Additional Inherited Members

- Static Public Attributes inherited from RecruitmentInterfaceBase
static uint32_t id_g = 1
 The static id of the RecruitmentInterfaceBase object.
 
static std::map< uint32_t, std::shared_ptr< RecruitmentInterfaceBase > > live_objects
 The map associating the IDs of RecruitmentInterfaceBase to the objects. This is a live object, which is an object that has been created and lives in memory.
 
- Static Public Attributes inherited from FIMSRcppInterfaceBase
static std::vector< std::shared_ptr< FIMSRcppInterfaceBase > > fims_interface_objects
 FIMS interface object vectors.
 

Detailed Description

Rcpp interface for Beverton–Holt to instantiate from R: beverton_holt <- methods::new(beverton_holt).

Constructor & Destructor Documentation

◆ BevertonHoltRecruitmentInterface()

BevertonHoltRecruitmentInterface::BevertonHoltRecruitmentInterface ( const BevertonHoltRecruitmentInterface other)
inline

Construct a new Beverton–Holt Recruitment Interface object.

Parameters
otherThe passed object to copy.

Member Function Documentation

◆ evaluate_mean()

virtual double BevertonHoltRecruitmentInterface::evaluate_mean ( double  spawners,
double  ssbzero 
)
inlinevirtual

Evaluate recruitment using the Beverton–Holt stock–recruitment relationship.

Parameters
spawnersSpawning biomass per time step.
ssbzeroThe biomass at unfished levels. TODO: Change to sbzero if continuing to use acronyms.

Implements RecruitmentInterfaceBase.

◆ evaluate_process()

virtual double BevertonHoltRecruitmentInterface::evaluate_process ( size_t  pos)
inlinevirtual

Evaluate recruitment process - returns 0 in this module.

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

Implements RecruitmentInterfaceBase.

◆ finalize()

virtual void BevertonHoltRecruitmentInterface::finalize ( )
inlinevirtual

Extracts derived quantities back to the Rcpp interface object from the Information object.

Reimplemented from FIMSRcppInterfaceBase.

◆ get_id()

virtual uint32_t BevertonHoltRecruitmentInterface::get_id ( )
inlinevirtual

Gets the ID of the interface base object.

Returns
The ID.

Implements RecruitmentInterfaceBase.

◆ set_uncertainty()

virtual void BevertonHoltRecruitmentInterface::set_uncertainty ( std::map< std::string, std::vector< double > > &  se_values)
inlinevirtual

Sets the uncertainty values for the parameters from the standard error values passed from R.

Parameters
se_valuesA map of parameter names and their associated standard error values.

Reimplemented from FIMSRcppInterfaceBase.

◆ SetRecruitmentProcessID()

void BevertonHoltRecruitmentInterface::SetRecruitmentProcessID ( uint32_t  process_id)
inline

Set the unique ID for the recruitment process object.

Parameters
process_idUnique ID for the recruitment process object.

◆ to_json()

virtual std::string BevertonHoltRecruitmentInterface::to_json ( )
inlinevirtual

Converts the data to json representation for the output.

Returns
A string is returned specifying that the module relates to the recruitment interface with Beverton–Holt stock–recruitment relationship. It also returns the ID and the parameters. This string is formatted for a json file.

Reimplemented from FIMSRcppInterfaceBase.


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