FIMS  v0.11.0
Loading...
Searching...
No Matches
population.hpp
Go to the documentation of this file.
1
8#ifndef FIMS_POPULATION_DYNAMICS_POPULATION_HPP
9#define FIMS_POPULATION_DYNAMICS_POPULATION_HPP
10
12#include "../fleet/fleet.hpp"
13#include "../growth/growth.hpp"
18#include "../size/size_grid.hpp"
19
20namespace fims_popdy {
21
26template <typename Type>
28 static uint32_t id_g;
29 size_t n_years;
30 size_t n_ages;
31 size_t n_fleets;
32
33 // parameters are estimated; after initialize in create_model, push_back to
34 // parameter list - in information.hpp (same for initial F in fleet)
40 1, static_cast<Type>(0.5));
45
46 // Transformed values
50
53
55 int recruitment_id = -999;
56 std::shared_ptr<fims_popdy::RecruitmentBase<Type>>
58
59 // growth
60 int growth_id = -999;
61 std::shared_ptr<fims_popdy::GrowthBase<Type>>
63
64 // size
66 std::shared_ptr<fims_popdy::SizeDistributionProviderBase<Type>>
69
70 // maturity
71 int maturity_id = -999;
72 std::shared_ptr<fims_popdy::MaturityBase<Type>>
74
75 // fleet
76 std::set<uint32_t> fleet_ids;
77 std::vector<std::shared_ptr<fims_popdy::Fleet<Type>>>
79
84 this->id = Population::id_g++;
85 this->register_self(this->id);
86 }
87};
88template <class Type>
89uint32_t Population<Type>::id_g = 0;
90
91} // namespace fims_popdy
92
93#endif /* FIMS_POPULATION_DYNAMICS_POPULATION_HPP */
Definition fims_vector.hpp:27
Declare the fleet functor class which is the base class for all fleet functors.
Includes any .hpp files within the subfolders so that only this file needs to included in include sta...
An interface to the modeling platforms, e.g., TMB.
Includes any .hpp files within the subfolders so that only this file needs to included in include sta...
Definition of the FIMSObject structure.
The population dynamics of FIMS.
Definition catch_at_age.hpp:45
Includes any .hpp files within the subfolders so that only this file needs to included in include sta...
Defines the SizeDistributionProviderBase interface for prepared population-level size products.
Defines the SizeGrid container for population-level biological size support.
void register_self(const uint32_t id)
Registers a FIMSObject instance with the memory tracker.
Definition model_object.hpp:35
FIMSObject struct that defines member types and returns the unique id.
Definition model_object.hpp:55
fims::Vector< double > ages
Definition population.hpp:51
size_t n_fleets
Definition population.hpp:31
int growth_id
Definition population.hpp:60
fims::Vector< Type > log_M
Definition population.hpp:38
std::shared_ptr< fims_popdy::MaturityBase< Type > > maturity
Definition population.hpp:73
std::vector< std::shared_ptr< fims_popdy::Fleet< Type > > > fleets
Definition population.hpp:78
fims::Vector< Type > log_f_multiplier
Definition population.hpp:41
std::shared_ptr< fims_popdy::SizeDistributionProviderBase< Type > > size_distribution_provider
Definition population.hpp:67
fims::Vector< Type > spawning_biomass_ratio
Definition population.hpp:43
int recruitment_id
recruitment
Definition population.hpp:55
std::shared_ptr< fims_popdy::RecruitmentBase< Type > > recruitment
Definition population.hpp:57
size_t n_years
Definition population.hpp:29
fims::Vector< Type > f_multiplier
Definition population.hpp:48
int maturity_id
Definition population.hpp:71
size_t n_ages
Definition population.hpp:30
std::set< uint32_t > fleet_ids
Definition population.hpp:76
Population()
Constructor.
Definition population.hpp:83
fims::Vector< Type > M
Definition population.hpp:47
fims::Vector< Type > proportion_female
Definition population.hpp:39
SizeGrid size_grid
Definition population.hpp:65
fims::Vector< double > years
Definition population.hpp:52
fims::Vector< Type > log_init_naa
Definition population.hpp:36
std::shared_ptr< fims_popdy::GrowthBase< Type > > growth
Definition population.hpp:62
Population-level biological size grid.
Definition size_grid.hpp:26