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

Rcpp interface for a new Population to instantiate from R: population <- methods::new(population) More...

#include <rcpp_population.hpp>

Inheritance diagram for PopulationInterface:
PopulationInterfaceBase FIMSRcppInterfaceBase

Public Types

typedef std::set< uint32_t >::iterator fleet_ids_iterator
 

Public Member Functions

 PopulationInterface ()
 The constructor.
 
 PopulationInterface (const PopulationInterface &other)
 Construct a new Population Interface object.
 
virtual ~PopulationInterface ()
 The destructor.
 
virtual uint32_t get_id ()
 Gets the ID of the interface base object.
 
void SetName (const std::string &name)
 Sets the name of the population.
 
std::string GetName () const
 Gets the name of the population.
 
void SetMaturityID (uint32_t maturity_id)
 Sets the unique ID for the Maturity object.
 
void SetGrowthID (uint32_t growth_id)
 Set the unique ID for the growth object.
 
void SetRecruitmentID (uint32_t recruitment_id)
 Set the unique ID for the recruitment object.
 
void AddFleet (uint32_t fleet_id)
 Add a fleet id to the list of fleets operating on this population.
 
virtual void finalize ()
 Extracts derived quantities back to the Rcpp interface object from the Information object.
 
- Public Member Functions inherited from PopulationInterfaceBase
 PopulationInterfaceBase ()
 The constructor.
 
 PopulationInterfaceBase (const PopulationInterfaceBase &other)
 Construct a new Population Interface Base object.
 
virtual ~PopulationInterfaceBase ()
 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.
 
virtual std::string to_json ()
 Convert the data to json representation for the output.
 
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.
 
virtual void set_uncertainty (std::map< std::string, std::vector< double > > &se_values)
 Set uncertainty values for the interface object.
 
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_ages = 0
 The number of age bins.
 
SharedInt n_fleets
 The number of fleets.
 
std::shared_ptr< std::set< uint32_t > > fleet_ids
 
SharedInt n_years
 The number of years.
 
SharedInt n_lengths
 The number of length bins.
 
SharedInt maturity_id
 The ID of the maturity module.
 
SharedInt growth_id
 The ID of the growth module.
 
SharedInt recruitment_id
 The ID of the recruitment module.
 
SharedInt recruitment_err_id
 The ID of the recruitment process module.
 
ParameterVector log_M
 The natural log of the natural mortality for each year.
 
ParameterVector spawning_biomass_ratio
 The population spawning biomass ratio for each year.
 
ParameterVector log_f_multiplier
 Log of the population annual fishing mortality multiplier.
 
ParameterVector log_init_naa
 The natural log of the initial numbers at age.
 
RealVector ages
 Ages that are modeled in the population, the length of this vector should equal "n_ages".
 
SharedString name = fims::to_string("NA")
 The name for the population.
 
- Public Attributes inherited from PopulationInterfaceBase
uint32_t id
 The local id of the PopulationInterfaceBase object.
 
SharedBoolean initialize_catch_at_age
 Initialize the catch at age model.
 
SharedBoolean initialize_surplus_production
 Initialize the surplus production model.
 
- 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 PopulationInterfaceBase
static uint32_t id_g = 1
 The static id of the PopulationInterfaceBase object.
 
static std::map< uint32_t, std::shared_ptr< PopulationInterfaceBase > > live_objects
 The map associating the IDs of PopulationInterfaceBase 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 a new Population to instantiate from R: population <- methods::new(population)

Member Typedef Documentation

◆ fleet_ids_iterator

Iterator for fleet ids.

Constructor & Destructor Documentation

◆ PopulationInterface()

PopulationInterface::PopulationInterface ( const PopulationInterface other)
inline

Construct a new Population Interface object.

Parameters
other

Member Function Documentation

◆ finalize()

virtual void PopulationInterface::finalize ( )
inlinevirtual

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

Reimplemented from FIMSRcppInterfaceBase.

◆ get_id()

virtual uint32_t PopulationInterface::get_id ( )
inlinevirtual

Gets the ID of the interface base object.

Returns
The ID.

Implements PopulationInterfaceBase.

◆ GetName()

std::string PopulationInterface::GetName ( ) const
inline

Gets the name of the population.

Returns
The name.

◆ SetGrowthID()

void PopulationInterface::SetGrowthID ( uint32_t  growth_id)
inline

Set the unique ID for the growth object.

Parameters
growth_idUnique ID for the growth object.

◆ SetMaturityID()

void PopulationInterface::SetMaturityID ( uint32_t  maturity_id)
inline

Sets the unique ID for the Maturity object.

Parameters
maturity_idUnique ID for the Maturity object.

◆ SetName()

void PopulationInterface::SetName ( const std::string &  name)
inline

Sets the name of the population.

Parameters
nameThe name to set.

◆ SetRecruitmentID()

void PopulationInterface::SetRecruitmentID ( uint32_t  recruitment_id)
inline

Set the unique ID for the recruitment object.

Parameters
recruitment_idUnique ID for the recruitment object.

Member Data Documentation

◆ fleet_ids

std::shared_ptr<std::set<uint32_t> > PopulationInterface::fleet_ids

list of fleets that operate on this population.


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