FIMS  v0.8.0
Loading...
Searching...
No Matches
FisheryModelInterfaceBase Class Referenceabstract

The FisheryModelInterfaceBase class is the base class for all fishery models in the FIMS Rcpp interface. It inherits from the FIMSRcppInterfaceBase. More...

#include <rcpp_models.hpp>

Inheritance diagram for FisheryModelInterfaceBase:
FIMSRcppInterfaceBase CatchAtAgeInterface

Public Member Functions

 FisheryModelInterfaceBase ()
 The constructor.
 
 FisheryModelInterfaceBase (const FisheryModelInterfaceBase &other)
 Construct a new Data Interface Base object.
 
virtual ~FisheryModelInterfaceBase ()
 The destructor.
 
virtual std::string to_json (bool do_sd_report=true)
 Serialize the fishery model to a JSON string.
 
virtual Rcpp::List calculate_reference_points ()
 A function to calculate reference points for the fishery model.
 
virtual uint32_t get_id ()=0
 Get the ID for the child fleet interface objects to inherit.
 
- 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 void finalize ()
 Extracts derived quantities back to the Rcpp interface object from the Information object.
 
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

uint32_t id
 The local id of the FleetInterfaceBase object.
 
- Public Attributes inherited from FIMSRcppInterfaceBase
bool finalized = false
 Is the object already finalized? The default is false.
 

Static Public Attributes

static uint32_t id_g = 1
 The static id of the FleetInterfaceBase object.
 
static std::map< uint32_t, std::shared_ptr< FisheryModelInterfaceBase > > live_objects
 The map associating the IDs of FleetInterfaceBase 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

The FisheryModelInterfaceBase class is the base class for all fishery models in the FIMS Rcpp interface. It inherits from the FIMSRcppInterfaceBase.

Constructor & Destructor Documentation

◆ FisheryModelInterfaceBase()

FisheryModelInterfaceBase::FisheryModelInterfaceBase ( const FisheryModelInterfaceBase other)
inline

Construct a new Data Interface Base object.

Parameters
other

Member Function Documentation

◆ calculate_reference_points()

virtual Rcpp::List FisheryModelInterfaceBase::calculate_reference_points ( )
inlinevirtual

A function to calculate reference points for the fishery model.

Returns
Rcpp::List

◆ get_id()

virtual uint32_t FisheryModelInterfaceBase::get_id ( )
pure virtual

Get the ID for the child fleet interface objects to inherit.

Implemented in CatchAtAgeInterface.

◆ to_json()

virtual std::string FisheryModelInterfaceBase::to_json ( bool  do_sd_report = true)
inlinevirtual

Serialize the fishery model to a JSON string.

This method provides a standardized interface for converting the state of a fishery model into a JSON-formatted string. The JSON output is intended for use in reporting, diagnostics, or data exchange between C++ and R. Derived classes should override this method to provide model-specific serialization logic.

Parameters
do_sd_reportA boolean to include standard deviation report calculations in the output if true. This is typically set to false when maximum likelihood estimation optimization is not performed, to avoid unnecessary computations. Default is true.
Returns
A JSON string representing the current state of the model. The base implementation returns a placeholder string indicating the method is not yet implemented.

Reimplemented in CatchAtAgeInterface.


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