|
Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
|
One herbivore functional type (i.e. one species). More...
#include <hft.h>
Public Member Functions | |
| bool | is_valid (const Parameters ¶ms, std::string &msg) const |
| Check if all variables are okay. More... | |
| bool | is_valid (const Parameters ¶ms) const |
| Check if all variables are okay. More... | |
Comparison operators | |
| bool | operator== (const Hft &rhs) const |
| bool | operator!= (const Hft &rhs) const |
| bool | operator< (const Hft &rhs) const |
Public Attributes | |
| std::string | name = "example" |
| Unique name of the herbivore type. More... | |
"body_fat": Body fat parameters. | |
| double | body_fat_birth = 0.2 |
| Proportional fat mass at birth [kg lipids/kg empty body]. More... | |
| double | body_fat_catabolism_efficiency = 0.8 |
| Efficiency for converting body fat gross energy to net energy [frac.]. More... | |
| double | body_fat_deviation = 0.125 |
| double | body_fat_gross_energy = 39.1 |
| Conversion factor from fat mass to net energy [MJ/kg]. More... | |
| double | body_fat_maximum = 0.25 |
| Maximum proportional fat mass [kg lipids/kg empty body]. More... | |
| double | body_fat_maximum_daily_gain = 0.05 |
| Maximum rate of fat mass gain in kg fat per kg body mass per day. More... | |
"body_mass": Body mass parameters. | |
| int | body_mass_birth = 5 |
| Live body weight [kg] at birth for both sexes. More... | |
| double | body_mass_empty = 0.87 |
| Fraction of live weight minus ingesta, blood, hair, and antlers/horns. More... | |
| int | body_mass_female = 50 |
| Live body mass [kg] of an adult female individual (with average reserves). More... | |
| int | body_mass_male = 70 |
| Live body mass [kg] of an adult male individual (with average reserves). More... | |
"breeding_season": Time period of giving birth. | |
| int | breeding_season_length = 30 |
| Length of breeding season in days. More... | |
| int | breeding_season_start = 121 |
| Julian day of the beginning of the breeding season (0=Jan 1st). More... | |
"digestion": Digestion-related parameters. | |
| GivenPointAllometry | digestion_allometric = {-0.25, 0.05} |
| Parameters for DigestiveLimit::Allometric. More... | |
| double | digestion_digestibility_multiplier = 1.0 |
| Factor to change ruminant digestibility for other digestion types. More... | |
| std::array< double, 3 > | digestion_i_g_1992_ijk = {0.034, 3.565, 0.077} |
| Constants i, j, k for DigestiveLimit::IlliusGordon1992 (grass only). More... | |
| double | digestion_fixed_fraction = 0.05 |
| DigestiveLimit | digestion_limit = DigestiveLimit::Allometric |
| Constraint for maximum daily forage intake. More... | |
| double | digestion_me_coefficient = 0.8 |
| Metabolizable energy coefficient (ME/DE ratio) [fractional]. More... | |
| double | digestion_k_fat = 0.5 |
| Coefficient (k_f) for converting metabolizable energy to fat mass [frac.]. More... | |
| double | digestion_k_maintenance = 0.7 |
| Coefficient (k_m) for converting metabolizable to net energy (NE) [frac.]. More... | |
| NetEnergyModel | digestion_net_energy_model |
| Algorithm for forage energy content. More... | |
"establishment": Spawning new herbivores in empty habitats. | |
| std::pair< int, int > | establishment_age_range = {1, 15} |
| Youngest and oldest age [years] for herbivore establishment. More... | |
| double | establishment_density = 1.0 |
| Total population density for establishment in one habitat [ind/km²]. More... | |
"expenditure": Energy expenditure parameters. | |
| GivenPointAllometry | expenditure_basal_rate = {0.75, 7.5} |
| Allometric parameters for basal metabolic rate (BMR). More... | |
| std::set< ExpenditureComponent > | expenditure_components |
| Energy expenditure components, summing up to actual expenditure. More... | |
| double | expenditure_fmr_multiplier = 2.0 |
| Constant factor to convert from BMR (basal rate) to FMR (field rate). More... | |
"foraging": Parameters regulating food intake. | |
| DietComposer | foraging_diet_composer = DietComposer::PureGrazer |
| Model defining the herbivore’s diet composition. More... | |
| std::set< ForagingLimit > | foraging_limits = {} |
| Constraints for maximum daily forage procurement. More... | |
| double | foraging_half_max_intake_density = 20 |
| Grass density [gDM/m²] where intake is half of its maximum. More... | |
"life_history": Life stages for herbivore individuals. | |
| int | life_history_lifespan = 16 |
| Maximum age in years [1–∞). More... | |
| int | life_history_physical_maturity_female = 3 |
| Age of physical maturity in years for females. More... | |
| int | life_history_physical_maturity_male = 3 |
| Age of physical maturity in years for males. More... | |
| int | life_history_sexual_maturity = 2 |
| Age of female sexual maturity in years. More... | |
"mortality": Parameters to define death of herbivores. | |
| double | mortality_adult_rate = 0.1 |
| Annual background mortality rate [0.0–1.0) after first year of life. More... | |
| std::set< MortalityFactor > | mortality_factors |
| Ways how herbivores can die. More... | |
| double | mortality_juvenile_rate = 0.3 |
| Annual background mortality rate [0.0–1.0) in the first year of life. More... | |
| double | mortality_minimum_density_threshold = 0.5 |
| Minimum viable density of one HFT population (all cohorts) [frac.]. More... | |
| bool | mortality_shift_body_condition_for_starvation = true |
| Whether to shift mean cohort body condition on starvation mortality. More... | |
"reproduction": Parameters relating to annual reproduction. | |
| double | reproduction_annual_maximum = 1.0 |
| Maximum annual reproduction rate for females (0.0–∞) More... | |
| int | reproduction_gestation_length = 9 |
| Duration of pregnancy [number of months]. More... | |
| std::array< double, 2 > | reproduction_logistic = {15.0, 0.3} |
| Growth rate and midpoint for the logistic reproduction model. More... | |
| ReproductionModel | reproduction_model = ReproductionModel::ConstantMaximum |
| Algorithm to calculate herbivore reproduction. More... | |
"thermoregulation": Expenditure through heat loss. | |
| ConductanceModel | thermoregulation_conductance |
| Algorithm to calculate whole-body conductance for thermoregulation. More... | |
| double | thermoregulation_core_temperature = 38 |
| Body core temperature [°C]. More... | |
Private Member Functions | |
| bool | check_mortality_vs_reproduction (const Parameters ¶ms, std::ostream &msg) const |
| Check if minimum mortality exceeds maximum reproduction. More... | |
| bool | check_intake_vs_expenditure (const Parameters ¶ms, std::ostream &msg) const |
| Check if minimum expenditure exceeds maximum energy intake. More... | |
One herbivore functional type (i.e. one species).
Parametes are sorted alphabetically and grouped by semantic categories, which are indicated with a prefix to the member name.
The member variable names shall be spelled exactly the same as the keys in the TOML instruction file. The categories correspond to the tables in the TOML file. The prefix (separated with "_") is spelled the same as the TOML table.
The initialization values are the same as in the example file under examples/megafauna.toml. They must be valid in the context of the global parameters of the instruction file.
|
private |
Check if minimum expenditure exceeds maximum energy intake.
| [in] | params | The global simulation parameters. |
| [out] | msg | Output stream for warning or error messages for users. |
|
private |
Check if minimum mortality exceeds maximum reproduction.
| [in] | params | The global simulation parameters. |
| [out] | msg | Output stream for warning or error messages for users. |
| bool Hft::is_valid | ( | const Parameters & | params | ) | const |
Check if all variables are okay.
| [in] | params | The global simulation parameters. |
| bool Hft::is_valid | ( | const Parameters & | params, |
| std::string & | msg | ||
| ) | const |
Check if all variables are okay.
| [in] | params | The global simulation parameters. |
| [out] | msg | Warning or error messages for output. |
|
inline |
Comparison operators are solely based on string comparison of the name.
|
inline |
Comparison operators are solely based on string comparison of the name.
|
inline |
Comparison operators are solely based on string comparison of the name.
| double Fauna::Hft::body_fat_birth = 0.2 |
Proportional fat mass at birth [kg lipids/kg empty body].
This must not be greater than body_fat_maximum.
| double Fauna::Hft::body_fat_catabolism_efficiency = 0.8 |
Efficiency for converting body fat gross energy to net energy [frac.].
The default value is taken from Corbett et al. (1990) [10].
This value must not be higher than the fat anabolism coefficient, which is digestion_k_maintenance divided by digestion_k_fat.
| double Fauna::Hft::body_fat_deviation = 0.125 |
Standard deviation in body condition for GetStarvationIlliusOConnor2000. Body condition is the proportion of current body fat relative to physiological maximum.
| double Fauna::Hft::body_fat_gross_energy = 39.1 |
Conversion factor from fat mass to net energy [MJ/kg].
The default value is from Blaxter (1989, p. 52)[4] :
For example, in sheep the enthalpy of combustion of the ether extracted (crude) fat is 39.1 kJ/g.
| double Fauna::Hft::body_fat_maximum = 0.25 |
Maximum proportional fat mass [kg lipids/kg empty body].
This value is a fraction of empty body mass (body_mass_empty) because field data from chemical analysis of lipid content usually refer to ingesta-free carcass mass and not live weight.
The default value is an estimate for a wild ungulate. Compare for instance Weiner (1973) [69] and Reimers et al. (1982) [55].
| double Fauna::Hft::body_fat_maximum_daily_gain = 0.05 |
Maximum rate of fat mass gain in kg fat per kg body mass per day.
A value of zero indicates no limit.
| int Fauna::Hft::body_mass_birth = 5 |
Live body weight [kg] at birth for both sexes.
The birth body mass includes the body fat specified in body_fat_birth.
For simplicity’s sake, the live weight of the neonate has the same empty body fraction (body_mass_empty) as adults, even though the guts are probably not full.
| double Fauna::Hft::body_mass_empty = 0.87 |
Fraction of live weight minus ingesta, blood, hair, and antlers/horns.
This is the fraction of the body that the body fat fraction refers to.
The default value is derived from average live body mass, M=60 kg, with the formula for ingesta weight in herbivores from Parra (1978) as cited by Clauss et al. (2005):
![\[
0.0936 * M^{1.0768}
\]](form_69.png)
| int Fauna::Hft::body_mass_female = 50 |
Live body mass [kg] of an adult female individual (with average reserves).
This is the live weight of an average adult animal individual as it would be weight on a scale. It is not a particular fat nor a particular skinny individual, so the model assumes that the fat reserves are at the half of their maximum (body_fat_maximum).
| int Fauna::Hft::body_mass_male = 70 |
Live body mass [kg] of an adult male individual (with average reserves).
This is the live weight of an average adult animal individual as it would be weight on a scale. It is not a particular fat nor a particular skinny individual, so the model assumes that the fat reserves are at the half of their maximum (body_fat_maximum).
| int Fauna::Hft::breeding_season_length = 30 |
Length of breeding season in days.
| int Fauna::Hft::breeding_season_start = 121 |
Julian day of the beginning of the breeding season (0=Jan 1st).
The instruction file parameter can also be specified as a month name. In that case the first of the month is the start of the breeding season (assuming a 365-days year).
| GivenPointAllometry Fauna::Hft::digestion_allometric = {-0.25, 0.05} |
Parameters for DigestiveLimit::Allometric.
See documentation in DigestiveLimit::Allometric.
| double Fauna::Hft::digestion_digestibility_multiplier = 1.0 |
Factor to change ruminant digestibility for other digestion types.
The digestibility values in the megafauna model are assumed to be for ruminants. Other herbivores, e.g. hindgut fermenters, retain a lower fraction of the forage dry matter. The ruminant digestibility will be simply multiplied with the given factor.
| double Fauna::Hft::digestion_fixed_fraction = 0.05 |
Daily dry matter intake per kg body mass for DigestiveLimit::FixedFraction. This applies to male adults. With DigestiveLimit::FixedFraction, the fraction is scaled to animals of other (less) body mass.
| std::array<double, 3> Fauna::Hft::digestion_i_g_1992_ijk = {0.034, 3.565, 0.077} |
Constants i, j, k for DigestiveLimit::IlliusGordon1992 (grass only).
Shipley et al. (1999)[61] derived the parameters i, j, and k from regression analysis with 12 mammalian herbivores (0.05–547 kg) and are specific to hindgut fermenters and ruminants.
| Hindgut | Ruminant | |
|---|---|---|
| i | 0.108 | 0.034 |
| j | 3.284 | 3.565 |
| k | 0.080 | 0.077 |
| double Fauna::Hft::digestion_k_fat = 0.5 |
Coefficient (k_f) for converting metabolizable energy to fat mass [frac.].
A number between 0 and 1 that defines how much of the metabolizable energy in forage gets converted to gross energy in body fat reserves. The energy loss is heat increment.
The default value is from Blaxter (1989, p. 259 [4]) for ox.
| double Fauna::Hft::digestion_k_maintenance = 0.7 |
Coefficient (k_m) for converting metabolizable to net energy (NE) [frac.].
A number between 0 and 1 that defines how much of the metabolizable energy in forage is usable as net energy for meeting the energy needs of the metabolic rate. The energy loss is known as heat increment.
| DigestiveLimit Fauna::Hft::digestion_limit = DigestiveLimit::Allometric |
Constraint for maximum daily forage intake.
| double Fauna::Hft::digestion_me_coefficient = 0.8 |
Metabolizable energy coefficient (ME/DE ratio) [fractional].
A number between 0 and 1 defining the fraction of digestible energy (DE) that can be used by the animal’s own metabolism. The rest is lost to gas production (methane) and urine.
| NetEnergyModel Fauna::Hft::digestion_net_energy_model |
Algorithm for forage energy content.
| std::pair<int, int> Fauna::Hft::establishment_age_range = {1, 15} |
Youngest and oldest age [years] for herbivore establishment.
| double Fauna::Hft::establishment_density = 1.0 |
Total population density for establishment in one habitat [ind/km²].
| GivenPointAllometry Fauna::Hft::expenditure_basal_rate = {0.75, 7.5} |
Allometric parameters for basal metabolic rate (BMR).
GivenPointAllometry::value_male_adult is daily basal metabolic rate in MJ/day for an adult male individual (body_mass_male). The exponent (GivenPointAllometry::exponent) should match the scaling of intake so that energy input and expenditure are balanced for all possible body masses.
| std::set<ExpenditureComponent> Fauna::Hft::expenditure_components |
Energy expenditure components, summing up to actual expenditure.
| double Fauna::Hft::expenditure_fmr_multiplier = 2.0 |
Constant factor to convert from BMR (basal rate) to FMR (field rate).
| DietComposer Fauna::Hft::foraging_diet_composer = DietComposer::PureGrazer |
Model defining the herbivore’s diet composition.
| double Fauna::Hft::foraging_half_max_intake_density = 20 |
Grass density [gDM/m²] where intake is half of its maximum.
Grass (sward) density at which intake rate reaches half of its maximum (in a Holling Type II functional response). Required by specific foraging limits.
| std::set<ForagingLimit> Fauna::Hft::foraging_limits = {} |
Constraints for maximum daily forage procurement.
| int Fauna::Hft::life_history_lifespan = 16 |
Maximum age in years [1–∞).
| int Fauna::Hft::life_history_physical_maturity_female = 3 |
Age of physical maturity in years for females.
| int Fauna::Hft::life_history_physical_maturity_male = 3 |
Age of physical maturity in years for males.
| int Fauna::Hft::life_history_sexual_maturity = 2 |
Age of female sexual maturity in years.
| double Fauna::Hft::mortality_adult_rate = 0.1 |
Annual background mortality rate [0.0–1.0) after first year of life.
| std::set<MortalityFactor> Fauna::Hft::mortality_factors |
Ways how herbivores can die.
| double Fauna::Hft::mortality_juvenile_rate = 0.3 |
Annual background mortality rate [0.0–1.0) in the first year of life.
| double Fauna::Hft::mortality_minimum_density_threshold = 0.5 |
Minimum viable density of one HFT population (all cohorts) [frac.].
Given as fraction of establishment_density.
| bool Fauna::Hft::mortality_shift_body_condition_for_starvation = true |
Whether to shift mean cohort body condition on starvation mortality.
| std::string Fauna::Hft::name = "example" |
Unique name of the herbivore type.
| double Fauna::Hft::reproduction_annual_maximum = 1.0 |
Maximum annual reproduction rate for females (0.0–∞)
| int Fauna::Hft::reproduction_gestation_length = 9 |
Duration of pregnancy [number of months].
| std::array<double, 2> Fauna::Hft::reproduction_logistic = {15.0, 0.3} |
Growth rate and midpoint for the logistic reproduction model.
| ReproductionModel Fauna::Hft::reproduction_model = ReproductionModel::ConstantMaximum |
Algorithm to calculate herbivore reproduction.
| ConductanceModel Fauna::Hft::thermoregulation_conductance |
Algorithm to calculate whole-body conductance for thermoregulation.
| double Fauna::Hft::thermoregulation_core_temperature = 38 |
Body core temperature [°C].
Default is 38°C (Hudson & White, 1985[29])