Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
Fauna::Hft Class Reference

One herbivore functional type (i.e. one species). More...

#include <hft.h>

Public Member Functions

bool is_valid (const Parameters &params, std::string &msg) const
 Check if all variables are okay. More...
 
bool is_valid (const Parameters &params) 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< ExpenditureComponentexpenditure_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< ForagingLimitforaging_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< MortalityFactormortality_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 &params, std::ostream &msg) const
 Check if minimum mortality exceeds maximum reproduction. More...
 
bool check_intake_vs_expenditure (const Parameters &params, std::ostream &msg) const
 Check if minimum expenditure exceeds maximum energy intake. More...
 

Detailed Description

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.

Member Function Documentation

◆ check_intake_vs_expenditure()

bool Hft::check_intake_vs_expenditure ( const Parameters params,
std::ostream &  msg 
) const
private

Check if minimum expenditure exceeds maximum energy intake.

Parameters
[in]paramsThe global simulation parameters.
[out]msgOutput stream for warning or error messages for users.
Returns
true if the object has valid values

◆ check_mortality_vs_reproduction()

bool Hft::check_mortality_vs_reproduction ( const Parameters params,
std::ostream &  msg 
) const
private

Check if minimum mortality exceeds maximum reproduction.

Parameters
[in]paramsThe global simulation parameters.
[out]msgOutput stream for warning or error messages for users.
Returns
true if the object has valid values

◆ is_valid() [1/2]

bool Hft::is_valid ( const Parameters params) const

Check if all variables are okay.

Parameters
[in]paramsThe global simulation parameters.
Returns
true if the object has valid values

◆ is_valid() [2/2]

bool Hft::is_valid ( const Parameters params,
std::string &  msg 
) const

Check if all variables are okay.

Parameters
[in]paramsThe global simulation parameters.
[out]msgWarning or error messages for output.
Returns
true if the object has valid values

◆ operator!=()

bool Fauna::Hft::operator!= ( const Hft rhs) const
inline

Comparison operators are solely based on string comparison of the name.

◆ operator<()

bool Fauna::Hft::operator< ( const Hft rhs) const
inline

Comparison operators are solely based on string comparison of the name.

◆ operator==()

bool Fauna::Hft::operator== ( const Hft rhs) const
inline

Comparison operators are solely based on string comparison of the name.

Member Data Documentation

◆ body_fat_birth

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.

See also
body_mass_empty
Body Mass and Composition
Body Mass and Composition

◆ body_fat_catabolism_efficiency

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.

See also
Fat as Energy Storage
FatmassEnergyBudget
Energy Content of Forage

◆ body_fat_deviation

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.

Note
For juveniles (1st year of life), body fat variation is always zero in order to avoid artificially high death rates if body fat is low at birth.
See also
Body Mass and Composition

◆ body_fat_gross_energy

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.

◆ body_fat_maximum

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.

See also
Body Mass and Composition

The default value is an estimate for a wild ungulate. Compare for instance Weiner (1973) [69] and Reimers et al. (1982) [55].

◆ body_fat_maximum_daily_gain

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.

◆ body_mass_birth

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.

See also
Body Mass and Composition

◆ body_mass_empty

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.

See also
body_fat_birth, body_fat_maximum

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}
\]

◆ body_mass_female

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).

See also
Body Mass and Composition

◆ body_mass_male

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).

See also
/home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/src/Fauna/hft.h

◆ breeding_season_length

int Fauna::Hft::breeding_season_length = 30

Length of breeding season in days.

◆ breeding_season_start

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).

◆ digestion_allometric

GivenPointAllometry Fauna::Hft::digestion_allometric = {-0.25, 0.05}

◆ digestion_digestibility_multiplier

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.

◆ digestion_fixed_fraction

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.

◆ digestion_i_g_1992_ijk

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
See also
get_digestive_limit_illius_gordon_1992()
DigestiveLimit::IlliusGordon1992

◆ digestion_k_fat

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.

See also
body_fat_gross_energy
NetEnergyModel::GrossEnergyFraction
Energy Content of Forage

◆ digestion_k_maintenance

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.

See also
NetEnergyModel::GrossEnergyFraction
Energy Content of Forage

◆ digestion_limit

DigestiveLimit Fauna::Hft::digestion_limit = DigestiveLimit::Allometric

Constraint for maximum daily forage intake.

◆ digestion_me_coefficient

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.

See also
NetEnergyModel::GrossEnergyFraction
Energy Content of Forage

◆ digestion_net_energy_model

NetEnergyModel Fauna::Hft::digestion_net_energy_model
Initial value:
=
@ GrossEnergyFraction
Use get_net_energy_from_gross_energy().

Algorithm for forage energy content.

◆ establishment_age_range

std::pair<int, int> Fauna::Hft::establishment_age_range = {1, 15}

Youngest and oldest age [years] for herbivore establishment.

◆ establishment_density

double Fauna::Hft::establishment_density = 1.0

Total population density for establishment in one habitat [ind/km²].

◆ expenditure_basal_rate

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.

See also
ExpenditureComponent::BasalMetabolicRate
ExpenditureComponent::FieldMetabolicRate
DigestiveLimit::FixedFraction

◆ expenditure_components

std::set<ExpenditureComponent> Fauna::Hft::expenditure_components
Initial value:
= {
@ FieldMetabolicRate
Allometric basal metabolic rate with FMR constant multiplier.

Energy expenditure components, summing up to actual expenditure.

◆ expenditure_fmr_multiplier

double Fauna::Hft::expenditure_fmr_multiplier = 2.0

Constant factor to convert from BMR (basal rate) to FMR (field rate).

See also
ExpenditureComponent::FieldMetabolicRate
expenditure_basal_rate

◆ foraging_diet_composer

DietComposer Fauna::Hft::foraging_diet_composer = DietComposer::PureGrazer

Model defining the herbivore’s diet composition.

◆ foraging_half_max_intake_density

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.

◆ foraging_limits

std::set<ForagingLimit> Fauna::Hft::foraging_limits = {}

Constraints for maximum daily forage procurement.

◆ life_history_lifespan

int Fauna::Hft::life_history_lifespan = 16

Maximum age in years [1–∞).

◆ life_history_physical_maturity_female

int Fauna::Hft::life_history_physical_maturity_female = 3

Age of physical maturity in years for females.

◆ life_history_physical_maturity_male

int Fauna::Hft::life_history_physical_maturity_male = 3

Age of physical maturity in years for males.

◆ life_history_sexual_maturity

int Fauna::Hft::life_history_sexual_maturity = 2

Age of female sexual maturity in years.

◆ mortality_adult_rate

double Fauna::Hft::mortality_adult_rate = 0.1

Annual background mortality rate [0.0–1.0) after first year of life.

◆ mortality_factors

std::set<MortalityFactor> Fauna::Hft::mortality_factors
Initial value:
= {
@ Lifespan
A herbivore dies if its age exceeds Hft::life_history_lifespan.
@ Background
Independent background mortality for juveniles and adults.
@ StarvationIlliusOConnor2000
Starvation death following Illius & O’Connor (2000).

Ways how herbivores can die.

◆ mortality_juvenile_rate

double Fauna::Hft::mortality_juvenile_rate = 0.3

Annual background mortality rate [0.0–1.0) in the first year of life.

◆ mortality_minimum_density_threshold

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.

See also
Minimum Density Threshold

◆ mortality_shift_body_condition_for_starvation

bool Fauna::Hft::mortality_shift_body_condition_for_starvation = true

Whether to shift mean cohort body condition on starvation mortality.

See GetStarvationIlliusOConnor2000.

◆ name

std::string Fauna::Hft::name = "example"

Unique name of the herbivore type.

◆ reproduction_annual_maximum

double Fauna::Hft::reproduction_annual_maximum = 1.0

Maximum annual reproduction rate for females (0.0–∞)

◆ reproduction_gestation_length

int Fauna::Hft::reproduction_gestation_length = 9

Duration of pregnancy [number of months].

◆ reproduction_logistic

std::array<double, 2> Fauna::Hft::reproduction_logistic = {15.0, 0.3}

Growth rate and midpoint for the logistic reproduction model.

  1. Growth rate (called b) must not be negative.
  2. The midpoint (called c) must lie between 0 and 1.
    See also
    ReproductionLogistic
    ReproductionModel::Logistic

◆ reproduction_model

ReproductionModel Fauna::Hft::reproduction_model = ReproductionModel::ConstantMaximum

Algorithm to calculate herbivore reproduction.

◆ thermoregulation_conductance

ConductanceModel Fauna::Hft::thermoregulation_conductance
Initial value:

Algorithm to calculate whole-body conductance for thermoregulation.

◆ thermoregulation_core_temperature

double Fauna::Hft::thermoregulation_core_temperature = 38

Body core temperature [°C].

Default is 38°C (Hudson & White, 1985[29])


The documentation for this class was generated from the following files: