FIMS  v0.10.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
11#include "../../common/model_object.hpp"
12#include "../fleet/fleet.hpp"
13#include "../growth/growth.hpp"
14#include "../recruitment/recruitment.hpp"
15#include "../../interface/interface.hpp"
16#include "../maturity/maturity.hpp"
17#include "../size/size_distribution_provider_base.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;
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));
46 // Transformed values
55 int recruitment_id = -999;
56 std::shared_ptr<fims_popdy::RecruitmentBase<Type>>
59 // growth
60 int growth_id = -999;
61 std::shared_ptr<fims_popdy::GrowthBase<Type>>
64 // size
66 std::shared_ptr<fims_popdy::SizeDistributionProviderBase<Type>>
70 // maturity
71 int maturity_id = -999;
72 std::shared_ptr<fims_popdy::MaturityBase<Type>>
75 // fleet
76 std::set<uint32_t> fleet_ids;
77 std::vector<std::shared_ptr<fims_popdy::Fleet<Type>>>
84 this->id = Population::id_g++;
85 this->register_self(this->id);
86 }
87};
88template <class Type>
90
91} // namespace fims_popdy
92
93#endif /* FIMS_POPULATION_DYNAMICS_POPULATION_HPP */
Definition fims_vector.hpp:27
The population dynamics of FIMS.
Definition catch_at_age.hpp:45
std::shared_ptr< AgeToLengthConversionBase< Type > > BuildAgeToLengthConversionFleet(const std::shared_ptr< Population< Type > > &population, const std::shared_ptr< Fleet< Type > > &fleet)
Build the active age-to-length conversion for a fleet from the current population and fleet state.
Definition runtime.hpp:44
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
Population class. Contains subpopulations that are divided into generic partitions (e....
Definition population.hpp:27
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
static uint32_t id_g
Definition population.hpp:28
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