|
Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
|
Herbivore output data for one time unit. More...
#include <herbivore_data.h>
Public Attributes | |
Per-individual variables | |
| double | age_years = 0.0 |
| Age in years. More... | |
| double | bodyfat = 0.0 |
| Body fat [fraction]. More... | |
| double | expenditure = 0.0 |
| Energy expenditure [MJ/ind/day]. More... | |
Per-habitat variables | |
| double | inddens = 0.0 |
| Individual density [ind/km²]. More... | |
| double | massdens = 0.0 |
| Mass density [kg/km²]. More... | |
| std::map< Fauna::MortalityFactor, double > | mortality |
| Daily mortality rate [ind/ind/day]. More... | |
| double | offspring = 0.0 |
| Newborns (offspring) per day [ind/km²/day]. More... | |
| Fauna::ForageMass | eaten_forage_per_ind = 0.0 |
| Eaten forage per individual [kgDM/ind/day]. More... | |
| Fauna::ForageMass | eaten_forage_per_mass = 0.0 |
| Eaten forage per body mass [kgDM/kg/day]. More... | |
| double | eaten_nitrogen_per_ind = 0.0 |
| Ingested nitrogen mass per individual and day [mgN/ind/day]. More... | |
| Fauna::ForageEnergyContent | energy_content = 0.0 |
| Net energy content of available forage [MJ/kgDM]. More... | |
| Fauna::ForageEnergy | energy_intake_per_ind = 0.0 |
| Intake of net energy in forage per individual [MJ/ind/day]. More... | |
| Fauna::ForageEnergy | energy_intake_per_mass = 0.0 |
| Intake of net energy in forage per herbivore mass [MJ/kg/day]. More... | |
Aggregation Functionality | |
| HerbivoreData & | merge (const HerbivoreData &other, const double this_weight, const double other_weight) |
| Aggregate data of this object with another one. More... | |
| void | reset () |
| Reset all member variables to initial zero values. More... | |
| static HerbivoreData | create_datapoint (const std::vector< HerbivoreData > data) |
| Aggregate herbivore data within one habitat. More... | |
| static void | merge_energy_content (Fauna::ForageEnergyContent &obj1, const Fauna::ForageEnergyContent &obj2, const double weight1=1.0, const double weight2=1.0) |
| Build weighted mean for net energy content, not counting zero values. More... | |
Herbivore output data for one time unit.
|
static |
Aggregate herbivore data within one habitat.
As opposed to merge(), this function is intended to combine data of one habitat in one point of time into a single data point. This can then be merged with other data points across space and time, using merge().
For variables per individual, this function creates the average (just like merge()). For variables per area or per habitat, this function creates the sum, adding up the numbers in the habitat.
In contrast to merge(), mortality is summed up, and all mortality factors are included because all merged datapoints have the same weight.
| std::invalid_argument | If length of vector data is zero. |
| HerbivoreData & HerbivoreData::merge | ( | const HerbivoreData & | other, |
| const double | this_weight, | ||
| const double | other_weight | ||
| ) |
Aggregate data of this object with another one.
This function builds averages for all member variables.
mortality : Only those factors are included in the result that are present in both objects (intersection). All other map entries are deleted. This is necessary because the statistical weight is the same for all variables.
This does no calculations if the partners are the same object, or one of the weights is zero.
| other | The other object to be merged into this one. |
| this_weight | Weight of this object in average building. |
| other_weight | Weight of other in average building. |
| std::invalid_argument | If either weight is not a positive number or if both are zero. |
|
static |
Build weighted mean for net energy content, not counting zero values.
Don’t count zero net energy, which results from zero available forage. We need to check every forage type and build average only if energy content in obj2 is not zero.
|
inline |
Reset all member variables to initial zero values.
| double Fauna::Output::HerbivoreData::age_years = 0.0 |
Age in years.
| double Fauna::Output::HerbivoreData::bodyfat = 0.0 |
Body fat [fraction].
| Fauna::ForageMass Fauna::Output::HerbivoreData::eaten_forage_per_ind = 0.0 |
Eaten forage per individual [kgDM/ind/day].
| Fauna::ForageMass Fauna::Output::HerbivoreData::eaten_forage_per_mass = 0.0 |
Eaten forage per body mass [kgDM/kg/day].
| double Fauna::Output::HerbivoreData::eaten_nitrogen_per_ind = 0.0 |
Ingested nitrogen mass per individual and day [mgN/ind/day].
| Fauna::ForageEnergyContent Fauna::Output::HerbivoreData::energy_content = 0.0 |
Net energy content of available forage [MJ/kgDM].
| Fauna::ForageEnergy Fauna::Output::HerbivoreData::energy_intake_per_ind = 0.0 |
Intake of net energy in forage per individual [MJ/ind/day].
| Fauna::ForageEnergy Fauna::Output::HerbivoreData::energy_intake_per_mass = 0.0 |
Intake of net energy in forage per herbivore mass [MJ/kg/day].
| double Fauna::Output::HerbivoreData::expenditure = 0.0 |
Energy expenditure [MJ/ind/day].
| double Fauna::Output::HerbivoreData::inddens = 0.0 |
Individual density [ind/km²].
| double Fauna::Output::HerbivoreData::massdens = 0.0 |
Mass density [kg/km²].
| std::map<Fauna::MortalityFactor, double> Fauna::Output::HerbivoreData::mortality |
Daily mortality rate [ind/ind/day].
| double Fauna::Output::HerbivoreData::offspring = 0.0 |
Newborns (offspring) per day [ind/km²/day].