FIMS  v0.8.0
Loading...
Searching...
No Matches
fims_popdy::FisheryModelBase< Type > Class Template Reference

FisheryModelBase is a base class for fishery models in FIMS. More...

#include <fishery_model_base.hpp>

Inheritance diagram for fims_popdy::FisheryModelBase< Type >:
fims_model_object::FIMSObject< Type > fims_popdy::CatchAtAge< Type >

Public Types

typedef std::map< uint32_t, std::shared_ptr< fims_popdy::Fleet< Type > > >::iterator fleet_iterator
 Fleet-based iterator.
 
typedef std::map< uint32_t, std::map< std::string, fims::Vector< Type > > > DerivedQuantitiesMap
 Type definitions for derived quantities and dimension information maps.
 
typedef DerivedQuantitiesMap::iterator DerivedQuantitiesMapIterator
 Iterator for the derived quantities map.
 
typedef std::map< uint32_t, std::map< std::string, DimensionInfo > > DimensionInfoMap
 Type definitions for dimension information maps.
 
typedef std::map< uint32_t, std::map< std::string, UncertaintyReportInfo > > UncertaintyReportInfoMap
 Type definition for the uncertainty report information map.
 

Public Member Functions

 FisheryModelBase ()
 Construct a new Fishery Model Base object.
 
 FisheryModelBase (const FisheryModelBase &other)
 Construct a new Fishery Model Base object.
 
virtual ~FisheryModelBase ()
 Destroy the Fishery Model Base object.
 
std::map< uint32_t, std::map< std::string, DimensionInfo > > & GetFleetDimensionInfo ()
 Get the fleet dimension information.
 
std::map< uint32_t, std::map< std::string, DimensionInfo > > & GetPopulationDimensionInfo ()
 Get the population dimension information.
 
DerivedQuantitiesMapGetFleetDerivedQuantities ()
 Get the fleet derived quantities.
 
DerivedQuantitiesMapGetPopulationDerivedQuantities ()
 Get the population derived quantities.
 
std::map< std::string, fims::Vector< Type > > & GetFleetDerivedQuantities (uint32_t fleet_id)
 Get the fleet derived quantities for a specified fleet.
 
void InitializeFleetDerivedQuantities (uint32_t fleet_id)
 Initialize the derived quantities map for a fleet.
 
void InitializePopulationDerivedQuantities (uint32_t population_id)
 Initialize the derived quantities map for a population.
 
std::map< std::string, fims::Vector< Type > > & GetPopulationDerivedQuantities (uint32_t population_id)
 Get the population derived quantities for a specified population.
 
std::map< std::string, DimensionInfo > & GetFleetDimensionInfo (uint32_t fleet_id)
 Get the fleet dimension information for a specified fleet.
 
std::map< std::string, DimensionInfo > & GetPopulationDimensionInfo (uint32_t population_id)
 Get the population dimension information for a specified population.
 
UncertaintyReportInfoMapGetFleetUncertaintyReportInfo ()
 Get the fleet uncertainty report information.
 
UncertaintyReportInfoMapGetPopulationUncertaintyReportInfo ()
 Get the population uncertainty report information.
 
std::map< std::string, UncertaintyReportInfo > & GetFleetUncertaintyReportInfo (uint32_t fleet_id)
 Get the fleet uncertainty report information for a specified fleet.
 
std::map< std::string, UncertaintyReportInfo > & GetPopulationUncertaintyReportInfo (uint32_t population_id)
 Get the population uncertainty report information for a specified population.
 
virtual void Initialize ()
 Initialize a model.
 
virtual void Prepare ()
 Prepare the model.
 
virtual void ResetVector (fims::Vector< Type > &v, Type value=0.0)
 Reset a vector from start to end with a value.
 
virtual void Evaluate ()
 Evaluate the model.
 
virtual void Report ()
 Report the model results via TMB.
 
uint32_t GetId ()
 Get the Id object.
 
- 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

std::string model_type_m
 A string specifying the model type.
 
std::set< uint32_tpopulation_ids
 Unique identifier for the fishery model.
 
std::vector< std::shared_ptr< fims_popdy::Population< Type > > > populations
 A vector of populations in the fishery model.
 
std::map< uint32_t, std::shared_ptr< fims_popdy::Fleet< Type > > > fleets
 A map of fleets in the fishery model, indexed by fleet id. Unique instances to eliminate duplicate initialization.
 
std::shared_ptr< DerivedQuantitiesMapfleet_derived_quantities
 Shared pointer for the fleet derived quantities map.
 
std::shared_ptr< DerivedQuantitiesMappopulation_derived_quantities
 Shared pointer for the population derived quantities map.
 
std::shared_ptr< DimensionInfoMapfleet_dimension_info
 Shared pointer for the fleet dimension information map.
 
std::shared_ptr< DimensionInfoMappopulation_dimension_info
 Shared pointer for the population dimension information map.
 
std::shared_ptr< UncertaintyReportInfoMapfleet_uncertainty_report_info
 Shared pointer for the uncertainty report information map.
 
std::shared_ptr< UncertaintyReportInfoMappopulation_uncertainty_report_info
 Shared pointer for the population uncertainty report information map.
 
- 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
 

Detailed Description

template<typename Type>
class fims_popdy::FisheryModelBase< Type >

FisheryModelBase is a base class for fishery models in FIMS.

Constructor & Destructor Documentation

◆ FisheryModelBase()

template<typename Type >
fims_popdy::FisheryModelBase< Type >::FisheryModelBase ( const FisheryModelBase< Type > &  other)
inline

Construct a new Fishery Model Base object.

Parameters
other

Member Function Documentation

◆ Evaluate()

template<typename Type >
virtual void fims_popdy::FisheryModelBase< Type >::Evaluate ( )
inlinevirtual

Evaluate the model.

Reimplemented in fims_popdy::CatchAtAge< Type >.

◆ GetFleetDerivedQuantities() [1/2]

template<typename Type >
DerivedQuantitiesMap & fims_popdy::FisheryModelBase< Type >::GetFleetDerivedQuantities ( )
inline

Get the fleet derived quantities.

Returns
DerivedQuantitiesMap

◆ GetFleetDerivedQuantities() [2/2]

template<typename Type >
std::map< std::string, fims::Vector< Type > > & fims_popdy::FisheryModelBase< Type >::GetFleetDerivedQuantities ( uint32_t  fleet_id)
inline

Get the fleet derived quantities for a specified fleet.

Parameters
fleet_idThe ID of the fleet.
Returns
std::map<std::string, fims::Vector<Type>>&

◆ GetFleetDimensionInfo() [1/2]

template<typename Type >
std::map< uint32_t, std::map< std::string, DimensionInfo > > & fims_popdy::FisheryModelBase< Type >::GetFleetDimensionInfo ( )
inline

Get the fleet dimension information.

Returns
std::map<uint32_t, std::map<std::string, DimensionInfo>>

◆ GetFleetDimensionInfo() [2/2]

template<typename Type >
std::map< std::string, DimensionInfo > & fims_popdy::FisheryModelBase< Type >::GetFleetDimensionInfo ( uint32_t  fleet_id)
inline

Get the fleet dimension information for a specified fleet.

Parameters
fleet_idThe ID of the fleet.
Returns
std::map<std::string, DimensionInfo>

◆ GetFleetUncertaintyReportInfo()

template<typename Type >
std::map< std::string, UncertaintyReportInfo > & fims_popdy::FisheryModelBase< Type >::GetFleetUncertaintyReportInfo ( uint32_t  fleet_id)
inline

Get the fleet uncertainty report information for a specified fleet.

Parameters
fleet_idThe ID of the fleet.
Returns
std::map<std::string, UncertaintyReportInfo>&

◆ GetId()

template<typename Type >
uint32_t fims_popdy::FisheryModelBase< Type >::GetId ( )
inline

Get the Id object.

Returns
uint32_t

◆ GetPopulationDerivedQuantities() [1/2]

template<typename Type >
DerivedQuantitiesMap & fims_popdy::FisheryModelBase< Type >::GetPopulationDerivedQuantities ( )
inline

Get the population derived quantities.

Returns
DerivedQuantitiesMap

◆ GetPopulationDerivedQuantities() [2/2]

template<typename Type >
std::map< std::string, fims::Vector< Type > > & fims_popdy::FisheryModelBase< Type >::GetPopulationDerivedQuantities ( uint32_t  population_id)
inline

Get the population derived quantities for a specified population.

Parameters
population_idThe ID of the population.
Returns
std::map<std::string, fims::Vector<Type>>&

◆ GetPopulationDimensionInfo() [1/2]

template<typename Type >
std::map< uint32_t, std::map< std::string, DimensionInfo > > & fims_popdy::FisheryModelBase< Type >::GetPopulationDimensionInfo ( )
inline

Get the population dimension information.

Returns
std::map<uint32_t, std::map<std::string, DimensionInfo>>

◆ GetPopulationDimensionInfo() [2/2]

template<typename Type >
std::map< std::string, DimensionInfo > & fims_popdy::FisheryModelBase< Type >::GetPopulationDimensionInfo ( uint32_t  population_id)
inline

Get the population dimension information for a specified population.

Parameters
population_idThe ID of the population.
Returns
std::map<std::string, DimensionInfo>

◆ GetPopulationUncertaintyReportInfo()

template<typename Type >
std::map< std::string, UncertaintyReportInfo > & fims_popdy::FisheryModelBase< Type >::GetPopulationUncertaintyReportInfo ( uint32_t  population_id)
inline

Get the population uncertainty report information for a specified population.

Parameters
population_idThe ID of the population.
Returns
std::map<std::string, UncertaintyReportInfo>&

◆ Initialize()

template<typename Type >
virtual void fims_popdy::FisheryModelBase< Type >::Initialize ( )
inlinevirtual

Initialize a model.

Reimplemented in fims_popdy::CatchAtAge< Type >.

◆ InitializeFleetDerivedQuantities()

template<typename Type >
void fims_popdy::FisheryModelBase< Type >::InitializeFleetDerivedQuantities ( uint32_t  fleet_id)
inline

Initialize the derived quantities map for a fleet.

Ensures the derived quantities map for the specified fleet exists. If not, creates an empty map for the fleet ID.

Parameters
fleet_idThe ID of the fleet to initialize.

◆ InitializePopulationDerivedQuantities()

template<typename Type >
void fims_popdy::FisheryModelBase< Type >::InitializePopulationDerivedQuantities ( uint32_t  population_id)
inline

Initialize the derived quantities map for a population.

Ensures the derived quantities map for the specified population exists. If not, creates an empty map for the population ID.

Parameters
population_idThe ID of the population to initialize.

◆ Prepare()

template<typename Type >
virtual void fims_popdy::FisheryModelBase< Type >::Prepare ( )
inlinevirtual

Prepare the model.

Reimplemented in fims_popdy::CatchAtAge< Type >.

◆ Report()

template<typename Type >
virtual void fims_popdy::FisheryModelBase< Type >::Report ( )
inlinevirtual

Report the model results via TMB.

Reimplemented in fims_popdy::CatchAtAge< Type >.

◆ ResetVector()

template<typename Type >
virtual void fims_popdy::FisheryModelBase< Type >::ResetVector ( fims::Vector< Type > &  v,
Type  value = 0.0 
)
inlinevirtual

Reset a vector from start to end with a value.

Parameters
vA vector to reset.
valueThe value you want to use for all elements in the vector. The default is 0.0.

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