8#ifndef FIMS_MODELS_CATCH_AT_AGE_HPP
9#define FIMS_MODELS_CATCH_AT_AGE_HPP
47template <
typename Type>
69 typedef typename std::map<std::string, fims::Vector<Type>>::iterator
77 std::map<std::string, fims::Vector<Type>>>::iterator
85 std::map<std::string, fims::Vector<size_t>>>::iterator
92 std::map<std::string, fims::Vector<Type>>>::iterator
101 std::map<std::string, fims::Vector<size_t>>>::iterator
109 std::shared_ptr<fims_popdy::Fleet<Type>>>::iterator
116 typename std::map<std::string, fims::Vector<Type>>::iterator
dq_iterator;
139 std::stringstream
ss;
140 ss <<
"caa_" << this->
GetId() <<
"_";
141 this->name_m =
ss.str();
171 if (this->
populations[
p]->proportion_female.size() == 0) {
187 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
189 if (fleet->log_q.size() == 0) {
190 fleet->log_q.resize(1);
191 fleet->log_q[0] =
static_cast<Type>(0.0);
193 fleet->q.resize(fleet->log_q.size());
194 fleet->Fmort.resize(fleet->n_years);
204 std::shared_ptr<fims_popdy::Population<Type>> &
population =
216 for (
size_t age = 0;
age < population->n_ages;
age++) {
232 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
241 for (
size_t i = 0;
i < fleet->log_q.size();
i++) {
242 fleet->q[
i] = fims_math::exp(fleet->log_q[
i]);
246 fleet->Fmort[
year] = fims_math::exp(fleet->log_Fmort[
year]);
284 std::map<std::string, fims::Vector<Type>> &
dq_ =
318 std::map<std::string, fims::Vector<Type>> &
dq_ =
359 std::map<std::string, fims::Vector<Type>> &
dq_ =
403 std::map<std::string, fims::Vector<Type>> &
dq_ =
407 size_t i_agem1 = i_age_year - 1;
453 std::map<std::string, fims::Vector<Type>> &
dq_ =
456 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
490 std::map<std::string, fims::Vector<Type>> &
dq_ =
514 std::map<std::string, fims::Vector<Type>> &
dq_ =
517 dq_[
"unfished_biomass"][
year] +=
541 std::map<std::string, fims::Vector<Type>> &
dq_ =
544 dq_[
"spawning_biomass"][
year] +=
569 std::map<std::string, fims::Vector<Type>> &
dq_ =
572 dq_[
"unfished_spawning_biomass"][
year] +=
596 std::map<std::string, fims::Vector<Type>> &
dq_ =
599 dq_[
"spawning_biomass"][
year] /
dq_[
"unfished_spawning_biomass"][0];
628 std::map<std::string, fims::Vector<Type>> &
dq_ =
634 population->proportion_female.get_force_scalar(0) *
635 dq_[
"proportion_mature_at_age"][0] *
641 population->proportion_female.get_force_scalar(
a) *
642 dq_[
"proportion_mature_at_age"][
a] *
685 std::map<std::string, fims::Vector<Type>> &
dq_ =
701 fims_math::log(
population->recruitment->evaluate_mean(
728 std::map<std::string, fims::Vector<Type>> &
dq_ =
755 std::map<std::string, fims::Vector<Type>> &
pdq_ =
758 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
759 std::map<std::string, fims::Vector<Type>> &
fdq_ =
768 pdq_[
"total_catch_numbers"][
year] +=
799 throw std::runtime_error(
800 "Population growth pointer was null while resolving landings "
804 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
805 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet =
807 std::map<std::string, fims::Vector<Type>> &
fdq_ =
837 std::map<std::string, fims::Vector<Type>> &
pdq_ =
840 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
841 std::map<std::string, fims::Vector<Type>> &
fdq_ =
848 population->fleets[fleet_]->selectivity->evaluate(
874 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
875 std::map<std::string, fims::Vector<Type>> &
fdq_ =
906 std::map<std::string, fims::Vector<Type>> &
pdq_ =
909 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
910 std::map<std::string, fims::Vector<Type>> &
fdq_ =
915 population->fleets[fleet_]->selectivity->evaluate(
944 throw std::runtime_error(
945 "Population growth pointer was null while resolving index "
949 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
950 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet =
952 std::map<std::string, fims::Vector<Type>> &
fdq_ =
968 std::map<std::string, fims::Vector<Type>> &
fdq_ =
971 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
972 for (
size_t y = 0;
y < fleet->n_years;
y++) {
983 for (
size_t a = 0;
a < fleet->n_ages;
a++) {
991 if (fleet->fleet_observed_catch_data_id_m == -999) {
1008 if (fleet->fleet_observed_agecomp_data_id_m != -999) {
1009 if (fleet->observed_agecomp_data->at(
i_age_year) !=
1010 fleet->observed_agecomp_data->na_value) {
1015 for (
size_t a = 0;
a < fleet->n_ages;
a++) {
1021 if (fleet->fleet_observed_agecomp_data_id_m != -999) {
1059 for (
size_t l = 0;
l < fleet->n_lengths; ++
l) {
1086 throw std::runtime_error(
1087 "Growth-derived age-to-length conversion was unavailable while "
1088 "building fleet age-to-length probabilities.");
1093 std::stringstream
ss;
1094 ss <<
"Failed to build growth-derived age-to-length conversion row for "
1096 << fleet->GetId() <<
", year " <<
year <<
", age " <<
age <<
".";
1098 throw std::runtime_error(
ss.str());
1159 std::shared_ptr<fims_popdy::Population<Type>> &
population =
1162 if (population ==
nullptr ||
population->growth ==
nullptr) {
1166 std::shared_ptr<fims_popdy::GrowthDerivedObservationBase<Type>>
1195 if (fleet ==
nullptr) {
1196 throw std::runtime_error(
1197 "Fleet pointer was null while resolving growth-derived fleet mean "
1201 std::shared_ptr<fims_popdy::AgeToLengthConversionDerived<Type>>
1204 fleet->age_to_length_conversion_model);
1212 std::stringstream
ss;
1213 ss <<
"Failed to resolve growth-derived fleet mean weight-at-age for fleet "
1215 << fleet->GetId() <<
", year " <<
year <<
", age " <<
age <<
".";
1217 throw std::runtime_error(
ss.str());
1240 throw std::runtime_error(
1241 "Population or growth-derived observation pointer was null while "
1242 "resolving biological mean weight-at-age.");
1248 if (
gp ==
nullptr) {
1253 if (
gp ==
nullptr) {
1254 throw std::runtime_error(
1255 "Growth products were unavailable while resolving biological mean "
1259 if (
gp->n_years == 0 ||
gp->n_ages == 0) {
1260 throw std::runtime_error(
1261 "Prepared growth products were empty while resolving biological mean "
1265 if (
gp->n_sexes != 1) {
1266 throw std::runtime_error(
1267 "Biological mean weight-at-age currently requires one prepared sex.");
1270 const size_t y = (std::min)(
year,
gp->n_years - 1);
1271 const size_t a = (std::min)(
age,
gp->n_ages - 1);
1272 return gp->MeanWAA(
y,
a, 0);
1294 throw std::runtime_error(
1295 "Population pointer was null while resolving population mean "
1300 throw std::runtime_error(
1301 "Population growth pointer was null while resolving population mean "
1305 std::shared_ptr<fims_popdy::GrowthDerivedObservationBase<Type>>
1323 std::map<std::string, fims::Vector<Type>> &
fdq_ =
1326 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
1328 if (!fleet->requires_age_length_mapping || fleet->n_lengths == 0) {
1332 if (fleet->age_to_length_conversion_model ==
nullptr ||
1333 !fleet->age_to_length_conversion_model->IsActive()) {
1334 std::stringstream
ss;
1335 ss <<
"Fleet id " << fleet->GetId()
1336 <<
"no usable age-to-length conversion path";
1338 throw std::runtime_error(
ss.str());
1341 for (
size_t y = 0;
y < fleet->n_years;
y++) {
1351 for (
size_t a = 0;
a < fleet->n_ages;
a++) {
1354 if (!fleet->age_to_length_conversion_model
1355 ->BuildAgeToLengthConversionRow(
1357 std::stringstream
ss;
1358 ss <<
"Failed to build age-to-length conversion row for fleet id "
1359 << fleet->GetId() <<
", year " <<
y <<
", age " <<
a <<
".";
1361 throw std::runtime_error(
ss.str());
1364 for (
size_t l = 0;
l < fleet->n_lengths;
l++) {
1382 for (
size_t l = 0;
l < fleet->n_lengths;
l++) {
1387 if (fleet->fleet_observed_lengthcomp_data_id_m != -999) {
1389 fleet->observed_lengthcomp_data->na_value) {
1394 for (
size_t l = 0;
l < fleet->n_lengths;
l++) {
1400 if (fleet->fleet_observed_lengthcomp_data_id_m != -999) {
1415 std::map<std::string, fims::Vector<Type>> &
fdq_ =
1417 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
1419 for (
size_t i = 0;
i <
fdq_[
"index_numbers"].size();
i++) {
1420 if (fleet->observed_index_units ==
"number") {
1421 fdq_[
"index_expected"][
i] =
fdq_[
"index_numbers"][
i];
1423 fdq_[
"index_expected"][
i] =
fdq_[
"index_weight"][
i];
1425 fdq_[
"log_index_expected"][
i] =
log(
fdq_[
"index_expected"][
i]);
1436 std::map<std::string, fims::Vector<Type>> &
fdq_ =
1438 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
1440 for (
size_t i = 0;
i <
fdq_[
"catch_weight"].size();
i++) {
1441 if (fleet->observed_catch_units ==
"number") {
1442 fdq_[
"catch_expected"][
i] =
fdq_[
"catch_numbers"][
i];
1444 fdq_[
"catch_expected"][
i] =
fdq_[
"catch_weight"][
i];
1446 fdq_[
"log_catch_expected"][
i] =
log(
fdq_[
"catch_expected"][
i]);
1478 std::shared_ptr<fims_popdy::Population<Type>> &
population =
1480 std::map<std::string, fims::Vector<Type>> &
pdq_ =
1525 pdq_[
"expected_recruitment"][
y] =
1528 fims_math::exp(
population->recruitment->log_rzero[0]);
1539 fims_math::exp(
population->recruitment->log_rzero[0]);
1597 int n_fleets = this->
fleets.size();
1602 report_vectors.clear();
1692 if (
gp ==
nullptr) {
1693 throw std::runtime_error(
1694 "Growth products were not prepared before report generation.");
1697 const std::size_t
n =
gp->Size();
1701 for (std::size_t
i = 0;
i <
n; ++
i) {
1721 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
1733 if (isDouble<Type>::value) {
1737 std::shared_ptr<fims_popdy::AgeToLengthConversionDerived<Type>>
1739 std::dynamic_pointer_cast<
1741 fleet->age_to_length_conversion_model);
1749 for (
size_t y = 0;
y < fleet->n_years; ++
y) {
1750 for (
size_t a = 0;
a < fleet->n_ages; ++
a) {
1753 if (this->report_age_to_length_conversion_derived_tensor) {
1756 fleet->n_years * fleet->n_ages * fleet->n_lengths);
1767 ->growth_observation_,
1770 for (
size_t l = 0;
l < fleet->n_lengths; ++
l) {
1772 y * (fleet->n_ages * fleet->n_lengths) +
1773 a * fleet->n_lengths +
l;
1793 fleet->age_to_length_conversion.to_tmb();
1833 vector<Type> expected_recruitment =
1839 vector<Type> proportion_mature_at_age =
1846 vector<Type> unfished_numbers_at_age =
1848 vector<Type> unfished_spawning_biomass =
1850 vector<Type> spawning_biomass_ratio =
1857 vector<Type> index_numbers_at_age =
1859 vector<Type> index_numbers_at_length =
1865 vector<Type> catch_numbers_at_age =
1867 vector<Type> catch_numbers_at_length =
1875 vector<Type> lengthcomp_proportion =
1887 FIMS_REPORT_F_(
"proportion_mature_at_age", proportion_mature_at_age_p,
1894 FIMS_REPORT_F_(
"unfished_numbers_at_age", unfished_numbers_at_age_p,
1896 FIMS_REPORT_F_(
"unfished_spawning_biomass", unfished_spawning_biomass_p,
1898 FIMS_REPORT_F_(
"spawning_biomass_ratio", spawning_biomass_ratio_p,
1925 FIMS_REPORT_F_(
"age_to_length_conversion", age_to_length_conversion_f,
1928 age_to_length_conversion_derived_f, this->
of);
1930 age_to_length_conversion_derived_used_f, this->
of);
1931 FIMS_REPORT_F_(
"growth_derived_mean_WAA", growth_derived_mean_WAA_f,
1936 FIMS_REPORT_F_(
"index_numbers_at_length", index_numbers_at_length_f,
1943 FIMS_REPORT_F_(
"catch_numbers_at_length", catch_numbers_at_length_f,
1972 typename std::map<std::string, fims::Vector<fims::Vector<Type>>>::iterator
1976 auto &
x =
rvit->second;
1992 this->
of->reportvector.push(res,
rvit->first.c_str());
Definition fims_vector.hpp:27
void resize(size_t s)
Changes the number of elements stored.
Definition fims_vector.hpp:401
CatchAtAge is a class containing a catch-at-age model, which is just one of many potential fishery mo...
Definition catch_at_age.hpp:57
void CalculateSpawningBiomassRatio(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t year)
Calculate the spawning biomass ratio for a population and year.
Definition catch_at_age.hpp:594
void PreparePopulationGrowthProducts()
Prepares cached population growth products for all populations whose growth objects expose the growth...
Definition catch_at_age.hpp:1157
std::map< std::string, fims::Vector< Type > >::iterator dq_iterator
Iterate through derived quantities.
Definition catch_at_age.hpp:116
void evaluate_catch()
Definition catch_at_age.hpp:1433
std::map< std::string, fims::Vector< Type > >::iterator derived_quantities_iterator
Iterate the derived quantities.
Definition catch_at_age.hpp:70
Type CalculateSBPR0(std::shared_ptr< fims_popdy::Population< Type > > &population)
Calculates equilibrium spawning biomass per recruit.
Definition catch_at_age.hpp:626
virtual void Initialize()
Definition catch_at_age.hpp:169
std::vector< Type > ages
Definition catch_at_age.hpp:133
void CalculateUnfishedNumbersAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t i_agem1_yearm1, size_t age)
Calculates unfished numbers at age at year and age specific indices.
Definition catch_at_age.hpp:356
void EnsureAllFleetAgeToLengthConversion()
Ensure all fleets linked to this model have a usable age-to-length conversion.
Definition catch_at_age.hpp:1142
void CalculateBiomass(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t age)
Calculates biomass for a population.
Definition catch_at_age.hpp:487
void CalculateCatchWeightAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t year, size_t age)
Calculates weight at age of the catch for a given fleet from a population.
Definition catch_at_age.hpp:793
std::map< std::string, fims::Vector< fims::Vector< Type > > > report_vectors
A map of report vectors for the object. used to populate the report_vectors map in for submodule para...
Definition catch_at_age.hpp:122
Type MeanWeightFromAgeToLengthConversionRow(const std::shared_ptr< fims_popdy::GrowthDerivedObservationBase< Type > > &growth_observation, const std::shared_ptr< fims_popdy::Fleet< Type > > &fleet, const fims::Vector< Type > &age_to_length_conversion_row)
Compute expected fleet-specific weight-at-age from a normalized age-to-length conversion row and flee...
Definition catch_at_age.hpp:1053
Type BiologicalMeanWeightFromPreparedGrowthProducts(const std::shared_ptr< fims_popdy::Population< Type > > &population, const std::shared_ptr< fims_popdy::GrowthDerivedObservationBase< Type > > &growth_observation, size_t year, size_t age)
Read biological mean weight-at-age directly from prepared growth products.
Definition catch_at_age.hpp:1234
std::set< uint32_t > & GetPopulationIds()
Get the population ids of the model.
Definition catch_at_age.hpp:258
std::map< uint32_t, std::map< std::string, fims::Vector< size_t > > >::iterator population_derived_quantities_dims_iterator
Used to iterate through population-based derived quantities dimensions.
Definition catch_at_age.hpp:102
std::map< uint32_t, std::shared_ptr< fims_popdy::Fleet< Type > > >::iterator fleet_iterator
Iterate through fleets.
Definition catch_at_age.hpp:110
void CalculateCatch(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t year, size_t age)
Calculates total catch (catch) by fleet and population for a given year by aggregating age-specific c...
Definition catch_at_age.hpp:753
Type GrowthDerivedFleetMeanWeightAA(const std::shared_ptr< fims_popdy::Fleet< Type > > &fleet, size_t year, size_t age)
Compute fleet-specific expected weight-at-age from the growth-derived age-to-length conversion path.
Definition catch_at_age.hpp:1192
void CalculateIndexWeightAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t year, size_t age)
Calculates biomass of fish for the index for a given fleet from a population.
Definition catch_at_age.hpp:938
void evaluate_age_comp()
Definition catch_at_age.hpp:965
void evaluate_length_comp()
Definition catch_at_age.hpp:1320
virtual ~CatchAtAge()
Destroy the Catch At Age object.
Definition catch_at_age.hpp:163
CatchAtAge(const CatchAtAge &other)
Copy constructor for the CatchAtAge class.
Definition catch_at_age.hpp:150
bool report_age_to_length_conversion_derived_tensor
Controls whether reporting materializes the full derived age-to-length tensor for fleets using the gr...
Definition catch_at_age.hpp:130
void CalculateSpawningBiomass(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t age)
Calculates spawning biomass for a population.
Definition catch_at_age.hpp:538
CatchAtAge()
Definition catch_at_age.hpp:138
Type MeanWeightFromAgeToLengthConversionDerived(const std::shared_ptr< fims_popdy::AgeToLengthConversionDerived< Type > > &age_to_length_conversion_derived, const std::shared_ptr< fims_popdy::Fleet< Type > > &fleet, size_t year, size_t age)
Compute fleet-specific mean weight-at-age from one growth-derived age-to-length conversion row.
Definition catch_at_age.hpp:1118
virtual void Evaluate()
Evaluate the model.
Definition catch_at_age.hpp:1451
std::string name_m
The name of the model.
Definition catch_at_age.hpp:63
void CalculateMaturityAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t age)
Calculates maturity at age, in proportion, for a population.
Definition catch_at_age.hpp:725
void CalculateUnfishedSpawningBiomass(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t age)
Calculated unfished spawning biomass for a population.
Definition catch_at_age.hpp:566
void CalculateIndex(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t age)
Calculates the index for a fleet from a population.
Definition catch_at_age.hpp:872
void CalculateUnfishedBiomass(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t age)
Calculates the unfished biomass for a population.
Definition catch_at_age.hpp:511
std::map< uint32_t, std::map< std::string, fims::Vector< Type > > >::iterator fleet_derived_quantities_iterator
Used to iterate through fleet-based derived quantities.
Definition catch_at_age.hpp:78
std::map< uint32_t, std::map< std::string, fims::Vector< Type > > >::iterator population_derived_quantities_iterator
Used to iterate through population-based derived quantities.
Definition catch_at_age.hpp:93
void CalculateNumbersAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t i_agem1_yearm1, size_t age)
Calculates numbers at age for a population.
Definition catch_at_age.hpp:313
void CalculateUnfishedInitialNumbersAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t age)
Calculates unfished numbers at age in the first year.
Definition catch_at_age.hpp:400
void CalculateRecruitment(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t i_dev)
Calculates expected recruitment for a population.
Definition catch_at_age.hpp:682
void CalculateCatchNumbersAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t age)
Calculates numbers of fish for the catch for a given fleet from a population, year and age.
Definition catch_at_age.hpp:834
virtual void Report()
Definition catch_at_age.hpp:1596
void AddPopulation(uint32_t id)
Definition catch_at_age.hpp:253
std::vector< std::shared_ptr< fims_popdy::Population< Type > > > & GetPopulations()
Definition catch_at_age.hpp:265
std::map< uint32_t, std::map< std::string, fims::Vector< size_t > > >::iterator fleet_derived_quantities_dims_iterator
Used to iterate through fleet-based derived quantities dimensions.
Definition catch_at_age.hpp:86
Type PopulationMeanWeightAA(const std::shared_ptr< fims_popdy::Population< Type > > &population, size_t year, size_t age)
Calculates population-level mean weight-at-age.
Definition catch_at_age.hpp:1290
void CalculateMortality(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t age)
Calculates total mortality for a population.
Definition catch_at_age.hpp:450
void CalculateIndexNumbersAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t year, size_t age)
Calculates the numbers for the index for a fleet from a population.
Definition catch_at_age.hpp:903
void BuildAgeToLengthConversionDerivedRowOrThrow(const std::shared_ptr< fims_popdy::AgeToLengthConversionDerived< Type > > &age_to_length_conversion_derived, const std::shared_ptr< fims_popdy::Fleet< Type > > &fleet, size_t year, size_t age, fims::Vector< Type > &age_to_length_conversion_row)
Build one fleet-specific growth-derived age-to-length conversion row or fail clearly.
Definition catch_at_age.hpp:1079
void CalculateInitialNumbersAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t age)
Calculates initial numbers at age for index and age.
Definition catch_at_age.hpp:281
virtual void Prepare()
Definition catch_at_age.hpp:202
void evaluate_index()
Definition catch_at_age.hpp:1412
FisheryModelBase is a base class for fishery models in FIMS.
Definition fishery_model_base.hpp:77
uint32_t GetId()
Get the Id object.
Definition fishery_model_base.hpp:382
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 in...
Definition fishery_model_base.hpp:107
std::vector< std::shared_ptr< fims_popdy::Population< Type > > > populations
A vector of populations in the fishery model.
Definition fishery_model_base.hpp:101
std::string model_type_m
A string specifying the model type.
Definition fishery_model_base.hpp:91
DerivedQuantitiesMap & GetFleetDerivedQuantities()
Get the fleet derived quantities.
Definition fishery_model_base.hpp:213
std::set< uint32_t > population_ids
Unique identifier for the fishery model.
Definition fishery_model_base.hpp:96
DerivedQuantitiesMap & GetPopulationDerivedQuantities()
Get the population derived quantities.
Definition fishery_model_base.hpp:222
virtual void ResetVector(fims::Vector< Type > &v, Type value=0.0)
Reset a vector from start to end with a value.
Definition fishery_model_base.hpp:361
Generic capability interface for growth models that can feed the growth-derived age-to-length convers...
Definition growth_model_adapter.hpp:26
virtual void PrepareGrowthProducts()=0
Prepare growth products for the current model state.
#define FIMS_ERROR_LOG(MESSAGE)
Definition def.hpp:664
Defines the base class for all fishery models within the FIMS framework.
#define ADREPORT_F(name, F)
TMB macro that reports variables and uncertainties.
Definition interface.hpp:83
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
Shared runtime helpers for constructing and validating fleet age-to-length conversions.
Growth-derived age-to-length conversion implementation that reads prepared population age-to-size pro...
Definition derived.hpp:35
Base class for all fleets.
Definition fleet.hpp:26
virtual const Type evaluate(int year, const double &a)=0
Calculates the growth at the independent variable value.
Growth "products" in a consistent (year, age, sex) space.
Definition growth_products.hpp:26
Population class. Contains subpopulations that are divided into generic partitions (e....
Definition population.hpp:27