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_ =
410 std::map<std::string, fims::Vector<Type>> &
dq_ =
413 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
447 std::map<std::string, fims::Vector<Type>> &
dq_ =
471 std::map<std::string, fims::Vector<Type>> &
dq_ =
474 dq_[
"unfished_biomass"][
year] +=
498 std::map<std::string, fims::Vector<Type>> &
dq_ =
501 dq_[
"spawning_biomass"][
year] +=
526 std::map<std::string, fims::Vector<Type>> &
dq_ =
529 dq_[
"unfished_spawning_biomass"][
year] +=
553 std::map<std::string, fims::Vector<Type>> &
dq_ =
556 dq_[
"spawning_biomass"][
year] /
dq_[
"unfished_spawning_biomass"][0];
584 std::map<std::string, fims::Vector<Type>> &
dq_ =
590 population->proportion_female.get_force_scalar(0) *
591 dq_[
"proportion_mature_at_age"][0] *
596 population->proportion_female.get_force_scalar(
a) *
597 dq_[
"proportion_mature_at_age"][
a] *
640 std::map<std::string, fims::Vector<Type>> &
dq_ =
656 fims_math::log(
population->recruitment->evaluate_mean(
682 std::map<std::string, fims::Vector<Type>> &
dq_ =
706 std::map<std::string, fims::Vector<Type>> &
pdq_ =
709 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
710 std::map<std::string, fims::Vector<Type>> &
fdq_ =
719 pdq_[
"total_catch_numbers"][
year] +=
750 throw std::runtime_error(
751 "Population growth pointer was null while resolving landings "
755 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
756 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet =
758 std::map<std::string, fims::Vector<Type>> &
fdq_ =
788 std::map<std::string, fims::Vector<Type>> &
pdq_ =
791 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
792 std::map<std::string, fims::Vector<Type>> &
fdq_ =
799 population->fleets[fleet_]->selectivity->evaluate(
825 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
826 std::map<std::string, fims::Vector<Type>> &
fdq_ =
857 std::map<std::string, fims::Vector<Type>> &
pdq_ =
860 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
861 std::map<std::string, fims::Vector<Type>> &
fdq_ =
866 population->fleets[fleet_]->selectivity->evaluate(
895 throw std::runtime_error(
896 "Population growth pointer was null while resolving index "
900 for (
size_t fleet_ = 0; fleet_ <
population->n_fleets; fleet_++) {
901 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet =
903 std::map<std::string, fims::Vector<Type>> &
fdq_ =
919 std::map<std::string, fims::Vector<Type>> &
fdq_ =
922 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
923 for (
size_t y = 0;
y < fleet->n_years;
y++) {
934 for (
size_t a = 0;
a < fleet->n_ages;
a++) {
942 if (fleet->fleet_observed_catch_data_id_m == -999) {
959 if (fleet->fleet_observed_agecomp_data_id_m != -999) {
960 if (fleet->observed_agecomp_data->at(
i_age_year) !=
961 fleet->observed_agecomp_data->na_value) {
966 for (
size_t a = 0;
a < fleet->n_ages;
a++) {
972 if (fleet->fleet_observed_agecomp_data_id_m != -999) {
1010 for (
size_t l = 0;
l < fleet->n_lengths; ++
l) {
1037 throw std::runtime_error(
1038 "Growth-derived age-to-length conversion was unavailable while "
1039 "building fleet age-to-length probabilities.");
1044 std::stringstream
ss;
1045 ss <<
"Failed to build growth-derived age-to-length conversion row for "
1047 << fleet->GetId() <<
", year " <<
year <<
", age " <<
age <<
".";
1049 throw std::runtime_error(
ss.str());
1110 std::shared_ptr<fims_popdy::Population<Type>> &
population =
1113 if (population ==
nullptr ||
population->growth ==
nullptr) {
1117 std::shared_ptr<fims_popdy::GrowthDerivedObservationBase<Type>>
1146 if (fleet ==
nullptr) {
1147 throw std::runtime_error(
1148 "Fleet pointer was null while resolving growth-derived fleet mean "
1152 std::shared_ptr<fims_popdy::AgeToLengthConversionDerived<Type>>
1155 fleet->age_to_length_conversion_model);
1163 std::stringstream
ss;
1164 ss <<
"Failed to resolve growth-derived fleet mean weight-at-age for fleet "
1166 << fleet->GetId() <<
", year " <<
year <<
", age " <<
age <<
".";
1168 throw std::runtime_error(
ss.str());
1191 throw std::runtime_error(
1192 "Population or growth-derived observation pointer was null while "
1193 "resolving biological mean weight-at-age.");
1199 if (
gp ==
nullptr) {
1204 if (
gp ==
nullptr) {
1205 throw std::runtime_error(
1206 "Growth products were unavailable while resolving biological mean "
1210 if (
gp->n_years == 0 ||
gp->n_ages == 0) {
1211 throw std::runtime_error(
1212 "Prepared growth products were empty while resolving biological mean "
1216 if (
gp->n_sexes != 1) {
1217 throw std::runtime_error(
1218 "Biological mean weight-at-age currently requires one prepared sex.");
1221 const size_t y = (std::min)(
year,
gp->n_years - 1);
1222 const size_t a = (std::min)(
age,
gp->n_ages - 1);
1223 return gp->MeanWAA(
y,
a, 0);
1245 throw std::runtime_error(
1246 "Population pointer was null while resolving population mean "
1251 throw std::runtime_error(
1252 "Population growth pointer was null while resolving population mean "
1256 std::shared_ptr<fims_popdy::GrowthDerivedObservationBase<Type>>
1274 std::map<std::string, fims::Vector<Type>> &
fdq_ =
1277 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
1279 if (!fleet->requires_age_length_mapping || fleet->n_lengths == 0) {
1283 if (fleet->age_to_length_conversion_model ==
nullptr ||
1284 !fleet->age_to_length_conversion_model->IsActive()) {
1285 std::stringstream
ss;
1286 ss <<
"Fleet id " << fleet->GetId()
1287 <<
"no usable age-to-length conversion path";
1289 throw std::runtime_error(
ss.str());
1292 for (
size_t y = 0;
y < fleet->n_years;
y++) {
1302 for (
size_t a = 0;
a < fleet->n_ages;
a++) {
1305 if (!fleet->age_to_length_conversion_model
1306 ->BuildAgeToLengthConversionRow(
1308 std::stringstream
ss;
1309 ss <<
"Failed to build age-to-length conversion row for fleet id "
1310 << fleet->GetId() <<
", year " <<
y <<
", age " <<
a <<
".";
1312 throw std::runtime_error(
ss.str());
1315 for (
size_t l = 0;
l < fleet->n_lengths;
l++) {
1329 for (
size_t l = 0;
l < fleet->n_lengths;
l++) {
1334 if (fleet->fleet_observed_lengthcomp_data_id_m != -999) {
1336 fleet->observed_lengthcomp_data->na_value) {
1341 for (
size_t l = 0;
l < fleet->n_lengths;
l++) {
1347 if (fleet->fleet_observed_lengthcomp_data_id_m != -999) {
1362 std::map<std::string, fims::Vector<Type>> &
fdq_ =
1364 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
1366 for (
size_t i = 0;
i <
fdq_[
"index_numbers"].size();
i++) {
1367 if (fleet->observed_index_units ==
"number") {
1368 fdq_[
"index_expected"][
i] =
fdq_[
"index_numbers"][
i];
1370 fdq_[
"index_expected"][
i] =
fdq_[
"index_weight"][
i];
1372 fdq_[
"log_index_expected"][
i] =
log(
fdq_[
"index_expected"][
i]);
1383 std::map<std::string, fims::Vector<Type>> &
fdq_ =
1385 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
1387 for (
size_t i = 0;
i <
fdq_[
"catch_weight"].size();
i++) {
1388 if (fleet->observed_catch_units ==
"number") {
1389 fdq_[
"catch_expected"][
i] =
fdq_[
"catch_numbers"][
i];
1391 fdq_[
"catch_expected"][
i] =
fdq_[
"catch_weight"][
i];
1393 fdq_[
"log_catch_expected"][
i] =
log(
fdq_[
"catch_expected"][
i]);
1425 std::shared_ptr<fims_popdy::Population<Type>> &
population =
1427 std::map<std::string, fims::Vector<Type>> &
pdq_ =
1472 pdq_[
"expected_recruitment"][
y] =
1475 fims_math::exp(
population->recruitment->log_rzero[0]);
1486 fims_math::exp(
population->recruitment->log_rzero[0]);
1544 int n_fleets = this->
fleets.size();
1549 report_vectors.clear();
1639 if (
gp ==
nullptr) {
1640 throw std::runtime_error(
1641 "Growth products were not prepared before report generation.");
1644 const std::size_t
n =
gp->Size();
1648 for (std::size_t
i = 0;
i <
n; ++
i) {
1668 std::shared_ptr<fims_popdy::Fleet<Type>> &fleet = (*fit).second;
1680 if (isDouble<Type>::value) {
1684 std::shared_ptr<fims_popdy::AgeToLengthConversionDerived<Type>>
1686 std::dynamic_pointer_cast<
1688 fleet->age_to_length_conversion_model);
1696 for (
size_t y = 0;
y < fleet->n_years; ++
y) {
1697 for (
size_t a = 0;
a < fleet->n_ages; ++
a) {
1700 if (this->report_age_to_length_conversion_derived_tensor) {
1703 fleet->n_years * fleet->n_ages * fleet->n_lengths);
1714 ->growth_observation_,
1717 for (
size_t l = 0;
l < fleet->n_lengths; ++
l) {
1719 y * (fleet->n_ages * fleet->n_lengths) +
1720 a * fleet->n_lengths +
l;
1740 fleet->age_to_length_conversion.to_tmb();
1780 vector<Type> expected_recruitment =
1786 vector<Type> proportion_mature_at_age =
1793 vector<Type> unfished_numbers_at_age =
1795 vector<Type> unfished_spawning_biomass =
1797 vector<Type> spawning_biomass_ratio =
1804 vector<Type> index_numbers_at_age =
1806 vector<Type> index_numbers_at_length =
1812 vector<Type> catch_numbers_at_age =
1814 vector<Type> catch_numbers_at_length =
1822 vector<Type> lengthcomp_proportion =
1834 FIMS_REPORT_F_(
"proportion_mature_at_age", proportion_mature_at_age_p,
1841 FIMS_REPORT_F_(
"unfished_numbers_at_age", unfished_numbers_at_age_p,
1843 FIMS_REPORT_F_(
"unfished_spawning_biomass", unfished_spawning_biomass_p,
1845 FIMS_REPORT_F_(
"spawning_biomass_ratio", spawning_biomass_ratio_p,
1872 FIMS_REPORT_F_(
"age_to_length_conversion", age_to_length_conversion_f,
1875 age_to_length_conversion_derived_f, this->
of);
1877 age_to_length_conversion_derived_used_f, this->
of);
1878 FIMS_REPORT_F_(
"growth_derived_mean_WAA", growth_derived_mean_WAA_f,
1883 FIMS_REPORT_F_(
"index_numbers_at_length", index_numbers_at_length_f,
1890 FIMS_REPORT_F_(
"catch_numbers_at_length", catch_numbers_at_length_f,
1919 typename std::map<std::string, fims::Vector<fims::Vector<Type>>>::iterator
1923 auto &
x =
rvit->second;
1939 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:551
void PreparePopulationGrowthProducts()
Prepares cached population growth products for all populations whose growth objects expose the growth...
Definition catch_at_age.hpp:1108
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:1380
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:582
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:1093
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:444
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:744
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:1004
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:1185
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:704
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:1143
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:889
void evaluate_age_comp()
Definition catch_at_age.hpp:916
void evaluate_length_comp()
Definition catch_at_age.hpp:1271
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:495
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:1069
virtual void Evaluate()
Evaluate the model.
Definition catch_at_age.hpp:1398
std::string name_m
The name of the model.
Definition catch_at_age.hpp:63
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:523
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:823
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:468
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
void CalculateMaturityAA(std::shared_ptr< fims_popdy::Population< Type > > &population, size_t i_age_year, size_t age)
Calculates maturity at age, in proportion, for a population.
Definition catch_at_age.hpp:679
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 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:637
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:785
virtual void Report()
Definition catch_at_age.hpp:1543
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:1241
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:407
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:854
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:1030
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:1359
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:79
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