|
Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
|
Namespaces | |
| namespace | Demo |
| namespace | Output |
Classes | |
| struct | AllometryParameters |
| Coefficient and exponent for an allometric relationship. More... | |
| class | ambiguous_param_type |
| Exception that a parameter can be interpreted in multiple ways. More... | |
| class | bad_array_size |
| Exception that an array parameter does not have the correct length. More... | |
| class | BreedingSeason |
| Helper class for reproduction within a breeding season. More... | |
| class | CohortPopulation |
| A population of HerbivoreCohort objects. More... | |
| class | CreateHerbivoreCohort |
| Function class constructing HerbivoreCohort objects. More... | |
| class | CreateHerbivoreCommon |
| Parent class for CreateHerbivoreCohort. More... | |
| class | Date |
| Helper class to hold an absolute simulation day. More... | |
| class | DateInterval |
| Two dates framing a time interval. More... | |
| struct | DistributeForage |
| Interface for a forage distribution algorithm. More... | |
| struct | DistributeForageEqually |
| Equal forage distribution algorithm. More... | |
| class | FatmassEnergyBudget |
| A herbivore’s energy budget with fat reserves. More... | |
| class | FeedHerbivores |
| Function object to feed herbivores. More... | |
| class | ForageBase |
| Base class for herbivore forage in a habitat. More... | |
| class | ForageValues |
| class | GetBackgroundMortality |
| Function object to calculate constant herbivore background mortality. More... | |
| class | GetForageDemands |
| Function object to calculate forage demands for a herbivore. More... | |
| class | GetSimpleLifespanMortality |
| Function object for herbivore death after given lifespan is reached. More... | |
| class | GetStarvationIlliusOConnor2000 |
| class | GetStarvationMortalityThreshold |
| Function object to calculate death at low body fat. More... | |
| struct | GivenPointAllometry |
| Parameters for an allometric relationship with exponent and one point. More... | |
| class | GrassForage |
| Grass forage in a habitat. More... | |
| class | Habitat |
| Abstract class of a homogenous spatial unit populated by herbivores. More... | |
| struct | HabitatEnvironment |
| Variables describing the habitat that are not forage ⇒ abiotic environment. More... | |
| class | HabitatForage |
| All values for large herbivore forage in a Habitat. More... | |
| class | HalfMaxIntake |
| Ingestion rate as Holling’s Type II functional response. More... | |
| class | HerbivoreBase |
| Abstract base class for herbivores. More... | |
| class | HerbivoreCohort |
| A herbivore cohort (age-class) More... | |
| struct | HerbivoreInterface |
| Interface for any herbivore implementation in the model. More... | |
| class | Hft |
| One herbivore functional type (i.e. one species). More... | |
| class | InsfileReader |
| Class to read parameters and HFTs from given instruction file. More... | |
| class | invalid_option |
| Exception that a string parameter does not match possible options. More... | |
| struct | missing_group |
Exception if a group listed in hft.groups cannot be found. More... | |
| struct | missing_hft_parameter |
| Exception that an HFT parameter is missing in the instruction file. More... | |
| struct | missing_parameter |
| Exception that a parameter is missing in the instruction file. More... | |
| struct | param_out_of_range |
| Exception if an integer or double parameter is out of range. More... | |
| struct | Parameters |
| Parameters for the herbivory module. More... | |
| class | PeriodAverage |
Average of a double value over a given time period. More... | |
| struct | PopulationInterface |
| A container of herbivore objects. More... | |
| class | ReproductionConstMax |
| Use a constant annual increase rate for herbivore reproduction. More... | |
| class | ReproductionLinear |
| Reproduction rate increases linearly with fat reserves up to maximum. More... | |
| class | ReproductionLogistic |
| Reproduction model following Illius & O’Connor (2000) More... | |
| class | SimulateDay |
| Function object to simulate one day in one habitat. More... | |
| class | SimulationUnit |
| A habitat with the herbivores that live in it. More... | |
| struct | unknown_parameters |
| Exception that parameters couldn’t be parsed in the TOML file. More... | |
| class | World |
| Central class to construct and own megafauna habitats and populations. More... | |
| class | WorldConstructor |
| Helper class of World to create various megafauna components. More... | |
| struct | wrong_param_type |
| Exception that a parameter is not of an expected data type. More... | |
Typedefs | |
| typedef ForageValues< ForageValueTag::ZeroToOne > | Digestibility |
| Digestibility [fraction] for different forage types. More... | |
| typedef ForageValues< ForageValueTag::PositiveAndZero > | ForageEnergy |
| Energy values [MJ] for different forage types. More... | |
| typedef ForageValues< ForageValueTag::PositiveAndZero > | ForageEnergyContent |
| Net energy content [MJ/kgDM] for different forage types. More... | |
| typedef ForageValues< ForageValueTag::ZeroToOne > | ForageFraction |
| A fraction for each forage type. More... | |
| typedef ForageValues< ForageValueTag::PositiveAndZero > | ForageMass |
| Dry matter mass values [kgDM or kgDM/km²] for different forage types. More... | |
| typedef std::vector< std::pair< HerbivoreInterface *, ForageMass > > | ForageDistribution |
| Data structure defining which herbivore gets what to eat [kgDM/km²]. More... | |
| typedef std::list< const Habitat * > | HabitatList |
| A list of Habitat pointers. More... | |
| typedef std::vector< std::shared_ptr< const Hft > > | HftList |
| List of pointers to Hft objects. More... | |
| typedef std::vector< HerbivoreInterface * > | HerbivoreVector |
| A list of herbivore interface pointers. More... | |
| typedef std::vector< const HerbivoreInterface * > | ConstHerbivoreVector |
| A list of read-only herbivore interface pointers. More... | |
| typedef std::vector< std::shared_ptr< PopulationInterface > > | PopulationList |
Enumerations | |
| enum class | ForageType { Grass , Inedible } |
| Different types of forage. More... | |
| enum class | ForageValueTag { PositiveAndZero , ZeroToOne } |
| Describes which values are allowed in Fauna::ForageValues. More... | |
| enum class | SimMode { Lint , Simulate } |
| Mode of the whole simulation program: What is it started for? More... | |
| enum class | FurSeason { Summer , Winter } |
| Selector for winter or summer pelt. More... | |
| enum class | Sex { Female , Male } |
| The sex of a herbivore. More... | |
| enum class | ConductanceModel { BradleyDeavers1980 , CuylerOeritsland2004 } |
| Selector for a function of how to calculate whole-body conductance. More... | |
| enum class | DietComposer { PureGrazer } |
| Model to define a herbivore’s diet in a multi-forage scenario. More... | |
| enum class | DigestiveLimit { None , Allometric , FixedFraction , IlliusGordon1992 } |
| Algorithm to calculate the daily digestive capacity of a herbivore. More... | |
| enum class | ExpenditureComponent { BasalMetabolicRate , FieldMetabolicRate , Taylor1981 , Thermoregulation , Zhu2018 } |
| Algorithm to calculate a herbivore’s daily energy needs. More... | |
| enum class | ForagingLimit { GeneralFunctionalResponse , IlliusOConnor2000 } |
| A factor limiting a herbivore’s daily forage harvesting. More... | |
| enum class | NetEnergyModel { GrossEnergyFraction } |
| How forage net energy content is calculated. More... | |
| enum class | MortalityFactor { Background , Lifespan , StarvationIlliusOConnor2000 , StarvationThreshold } |
| One way how a herbivore can die. More... | |
| enum class | ReproductionModel { None , ConstantMaximum , Linear , Logistic } |
| Algorithm to calculate herbivore reproduction time and success. More... | |
| enum class | ForageDistributionAlgorithm { Equally } |
| Parameter for selecting algorithm for forage distribution among herbivores. More... | |
| enum class | HerbivoreType { Cohort } |
| enum class | OutputInterval { Daily , Monthly , Annual , Decadal } |
| Time interval for aggregating output. More... | |
| enum class | OutputFormat { TextTables } |
| Parameter for selecting the output writer implementation. More... | |
Functions | |
| double | average (const double a, const double b, const double weight_a=1.0, const double weight_b=1.0) |
| Build weighted average of two numbers. More... | |
| const std::string & | get_forage_type_name (const ForageType) |
| Get a short, lowercase string identifier for a forage type. More... | |
| ForageValues< ForageValueTag::PositiveAndZero > | foragefractions_to_foragevalues (const ForageValues< ForageValueTag::ZeroToOne > &fractions) |
| Convert forage fractions (in [0,1]) into values in [0,∞]. More... | |
| ForageFraction | foragevalues_to_foragefractions (const ForageValues< ForageValueTag::PositiveAndZero > values, const double tolerance) |
| Convert forage values to fractional values. More... | |
| ForageFraction | convert_mj_to_kg_proportionally (const ForageValues< ForageValueTag::PositiveAndZero > &mj_per_kg, const ForageValues< ForageValueTag::ZeroToOne > &mj_proportions) |
| Convert forage energy to mass keeping the energy-wise proportions. More... | |
| double | get_expenditure_taylor_1981 (const double current_bodymass, const double adult_bodymass) |
| Energy expenditure [MJ/ind/day] based on cattle from Taylor et al. (1981) More... | |
| double | get_expenditure_zhu_et_al_2018 (const double bodymass, const double ambient_temperature) |
| Daily expenditure by Zhu et al (2018) [70]. More... | |
| double | watts_to_MJ_per_day (const double W) |
| Convert Watts (=J/s) to MJ/day. More... | |
| double | get_conductance_bradley_deavers_1980 (const double bodymass) |
| double | get_conductance_cuyler_oeritsland_2004 (const double bodymass, const FurSeason season) |
| Extrapolate conductance from reindeer fur. More... | |
| double | get_thermoregulatory_expenditure (const double thermoneutral_rate, const double conductance, const double core_temperature, const double ambient_temperature) |
| Calculate additional energy requirements to keep body temperature. More... | |
| void | create_directories (const std::string path, const mode_t mode=0755) |
| Create a folder including all its parent folders. More... | |
| bool | directory_exists (const std::string path) |
| Check whether a folder in the filesystem exists. More... | |
| bool | file_exists (const std::string &path) |
| Check whether a file in the filesystem exists. More... | |
| void | remove_directory (const std::string &path) |
| Delete a directory recursively. More... | |
| double | get_digestive_limit_illius_gordon_1992 (const double bodymass_adult, const double bodymass, const double digestibility, const std::array< double, 3 > &ijk) |
| Get digestion-limited daily grass energy intake after Illius & Gordon (1992) More... | |
| ForageEnergyContent | get_net_energy_from_gross_energy (const ForageEnergyContent &ge_content, const Digestibility &digestibility, const double me_coefficient, const double k_maintenance) |
| Get net energy content of the forage [MJ/kgDM]. More... | |
Overload operator * as non-member. | |
| ForageValues< ForageValueTag::PositiveAndZero > | operator* (const double lhs, const ForageFraction &rhs) |
| Multiply forage fractions with coefficient, allowing numbers >0. More... | |
| ForageValues< ForageValueTag::PositiveAndZero > | operator* (const ForageFraction &lhs, const ForageValues< ForageValueTag::PositiveAndZero > &rhs) |
| Multiply forage fractions with coefficient, allowing numbers >0. More... | |
| ForageValues< ForageValueTag::PositiveAndZero > | operator* (const ForageValues< ForageValueTag::PositiveAndZero > &lhs, const ForageFraction &rhs) |
| Multiply forage fractions with coefficient, allowing numbers >0. More... | |
Variables | |
| const int | FORAGE_TYPE_COUNT = (int)ForageType::Inedible + 1 |
| Number of elements in ForageType. More... | |
| const std::set< ForageType > | FORAGE_TYPES = get_all_forage_types() |
Namespace for the whole modular megafauna model library.
| typedef std::vector<const HerbivoreInterface*> Fauna::ConstHerbivoreVector |
A list of read-only herbivore interface pointers.
Digestibility [fraction] for different forage types.
| typedef std::vector<std::pair<HerbivoreInterface*, ForageMass> > Fauna::ForageDistribution |
Data structure defining which herbivore gets what to eat [kgDM/km²].
Energy values [MJ] for different forage types.
Net energy content [MJ/kgDM] for different forage types.
A fraction for each forage type.
Dry matter mass values [kgDM or kgDM/km²] for different forage types.
| typedef std::list<const Habitat*> Fauna::HabitatList |
A list of Habitat pointers.
| typedef std::vector<HerbivoreInterface*> Fauna::HerbivoreVector |
A list of herbivore interface pointers.
| typedef std::vector< std::shared_ptr< const Hft > > Fauna::HftList |
| typedef std::vector<std::shared_ptr<PopulationInterface> > Fauna::PopulationList |
|
strong |
Selector for a function of how to calculate whole-body conductance.
| Enumerator | |
|---|---|
| BradleyDeavers1980 | Allometric formula from data by Bradley & Deavers (1980) [6]. |
| CuylerOeritsland2004 | Allometric formula extrapolating from reindeer fur conductivity. |
|
strong |
|
strong |
Algorithm to calculate the daily digestive capacity of a herbivore.
| Enumerator | |
|---|---|
| None | No digestive limit. |
| Allometric | Dry-matter ingestion is limited to a fraction of live herbivore body mass. The digestion-limited maximum intake,
Hft::digestion_allometric defines the maximum fractional intake for adult males, Scaling maximum intake allometrically can be better than having a fixed fraction (DigestiveLimit::FixedFraction) for all animals because younger animals (and female adults) have a lower body mass and thus a higher metabolic rate per body mass. Therefore they also need a higher digestive limit. This is important so that young animals are not starving after birth because their intake is restricted. Energy expenditure must be balanced by intake. Let’s take Kleiber’s ¾ power law (Kleiber 1961[36]) as an example. Metabolic rate scales with In this example, the (relative) dry-matter intake (DMI) would be:
For nursing newborns, the energy input comes from mother milk, but that is not considered in this model. Newborns are simulated as if they ate fresh forage directly. The very high dry-matter intake limit for newborns stands in place for the energy supply that would come from lactation.
Allometric scaling of digestive limit. |
| FixedFraction | Dry-matter ingestion is limited to a fixed fraction of live body mass. The parameter Hft::digestion_fixed_fraction ( |
| IlliusGordon1992 | Limit digestive limit with get_digestive_limit_illius_gordon_1992(). |
|
strong |
Algorithm to calculate a herbivore’s daily energy needs.
| Enumerator | |
|---|---|
| BasalMetabolicRate | Only the allometric basal metabolic rate.
|
| FieldMetabolicRate | Allometric basal metabolic rate with FMR constant multiplier.
|
| Taylor1981 | Formula for field metabolic rate in cattle: get_expenditure_taylor_1981() |
| Thermoregulation | Increased expenditure in lower temperature, see Thermoregulation by Conductance. |
| Zhu2018 | Formula for temperature-dependent field metabolic rate: get_expenditure_zhu_et_al_2018() |
|
strong |
Parameter for selecting algorithm for forage distribution among herbivores.
| Enumerator | |
|---|---|
| Equally | Equal forage distribution: Fauna::DistributeForageEqually. |
|
strong |
|
strong |
Describes which values are allowed in Fauna::ForageValues.
| Enumerator | |
|---|---|
| PositiveAndZero | Only values in interval [0,∞) are allowed. |
| ZeroToOne | Only values in interval [0,1] are allowed. |
|
strong |
A factor limiting a herbivore’s daily forage harvesting.
| Enumerator | |
|---|---|
| GeneralFunctionalResponse | Type-II functional response applied “on top” of all other constraints. This has no empirical basis, but serves as a way to implement an “artificial” smooth negative feedback from forage to fat mass. Note that this model is functionally similar to ForagingLimit::IlliusOConnor2000, but Illius & O’Connor (2000) [35] use a value for Hft::foraging_half_max_intake_density that is empirical-based. Here, it shall be explicitely stated that the half-max intake density is not based on observation, but solely used as a means to create a workable forage–intake feedback. |
| IlliusOConnor2000 | Foraging is limited by a functional response towards digestion limit. Illius & O’Connor (2000) [35] describe daily food intake rate as a Holling Type II functional response (compare HalfMaxIntake). As the maximum daily energy intake they choose the digestive capacity (compare get_digestive_limit_illius_gordon_1992()). Like in the model of Pachzelt et al. (2013) [49], the grass forage density of the whole patch (habitat) is used (not the sward density
|
|
strong |
|
strong |
Parameter for selecting the class implementing Fauna::HerbivoreInterface.
| Enumerator | |
|---|---|
| Cohort | Use class HerbivoreCohort. |
|
strong |
One way how a herbivore can die.
| Enumerator | |
|---|---|
| Background | Independent background mortality for juveniles and adults.
|
| Lifespan | A herbivore dies if its age exceeds Hft::life_history_lifespan. |
| StarvationIlliusOConnor2000 | Starvation death following Illius & O’Connor (2000). |
| StarvationThreshold | Starvation death at a minimum bodyfat threshold. |
|
strong |
How forage net energy content is calculated.
| Enumerator | |
|---|---|
| GrossEnergyFraction | |
|
strong |
Parameter for selecting the output writer implementation.
| Enumerator | |
|---|---|
| TextTables | Use class Output::TextTableWriter. |
|
strong |
|
strong |
Algorithm to calculate herbivore reproduction time and success.
| Enumerator | |
|---|---|
| None | Disable reproduction all together. |
| ConstantMaximum | Use class ReproductionConstMax for reproduction. |
| Linear | Use class ReproductionLinear for reproduction. |
| Logistic | Use class ReproductionLogistic to calculate reproduction. |
|
strong |
|
strong |
| double Fauna::average | ( | const double | a, |
| const double | b, | ||
| const double | weight_a = 1.0, |
||
| const double | weight_b = 1.0 |
||
| ) |
Build weighted average of two numbers.
| std::invalid_argument | If one weight is smaller than zero. |
| std::invalid_argument | If the sum of weights is zero. |
| std::invalid_argument | If one weight is NAN or INFINITY. |
NAN is checked by weight_a != weight_a, but this might not work if compiled with g++ with the option -fastmath. | ForageFraction Fauna::convert_mj_to_kg_proportionally | ( | const ForageValues< ForageValueTag::PositiveAndZero > & | mj_per_kg, |
| const ForageValues< ForageValueTag::ZeroToOne > & | mj_proportions | ||
| ) |
Convert forage energy to mass keeping the energy-wise proportions.
| mj_per_kg | Energy content of the forage [MJ/kgDM]. |
| mj_proportions | Energy-wise proportions [MJ/MJ]. This doesn’t need to add up to 1.0. |
mj_proportions. When converting back from mass to energy, the proportion relative to each other will be like in mj_proportions. | void Fauna::create_directories | ( | const std::string | path, |
| const mode_t | mode = 0755 |
||
| ) |
Create a folder including all its parent folders.
This function works for Windows und Unix systems.
| path | The absolute or relative path to the final directory. As a file separator use backslash () on Windows and slash (/) on Linux. |
| mode | File permissions (only applicable to Unix filesystems. |
| std::runtime_error | If an error occurred. |
| bool Fauna::directory_exists | ( | const std::string | path | ) |
Check whether a folder in the filesystem exists.
This function works for Windows und Unix systems.
| path | The absolute or relative path to the directory. |
path exists, false if not. | bool Fauna::file_exists | ( | const std::string & | path | ) |
Check whether a file in the filesystem exists.
This function works for Windows und Unix systems.
| path | The absolute or relative path to the file in question. |
path exists, false if not. | ForageValues< ForageValueTag::PositiveAndZero > Fauna::foragefractions_to_foragevalues | ( | const ForageValues< ForageValueTag::ZeroToOne > & | fractions | ) |
Convert forage fractions (in [0,1]) into values in [0,∞].
| fractions | A ForageValues object limited to values between zero and one. |
| ForageFraction Fauna::foragevalues_to_foragefractions | ( | const ForageValues< ForageValueTag::PositiveAndZero > | values, |
| const double | tolerance | ||
| ) |
Convert forage values to fractional values.
| values | The object to convert. |
| tolerance | By how much a value can exceed 1.0 and still be set to 1.0. E.g. tolerance == 0.1 means that any values from 1.0 to 1.1 will be set to 1.0. |
| std::invalid_argument | If one number in values exceeds 1.0 + tolerance. |
| std::invalid_argument | If tolerance < 0.0. |
|
inline |
Get full body conductance [W/°C] after Bradley & Deavers (1980) [6] The formula is taken from Peters (1983)[53], which is based on data by Bradley & Deavers (1980).
![\[
C = 0.224 * M^{0.574}
\]](form_7.png)
230 conductance values from 192 mammal species with body weights ranging from 3.5 g to 150 kg.
| bodymass | Current body weight [kg/ind]. |
| std::invalid_argument | If bodymass <= 0. |
|
inline |
Extrapolate conductance from reindeer fur.
Cuyler & Øritsland (2004)[11] measured conductivity values of reindeer (Rangifer tarandus) pelts in calm air and dry conditions:
We assume a body mass of 60 kg for an adult reindeer (Soppela et al. 1986 [63]). Body surface is approximated by a formula from Hudson & White (1985) [29] as 
The whole-body conductance in W/°C is then:


Both Bradley & Deavers (1980)[6] and Fristoe et al. (2014)[18] suggest that the allometric exponent for body mass for whole-body conductance among mammals is about 0.57. We derive an allometric function for the conductance 
![\[
x_{summer} = 2.9 * 60^{-0.56} = 0.29 \\\\
x_{winter} = 0.8 * 60^{-0.56} = 0.08
\]](form_12.png)
| bodymass | Adult body mass [kg/ind]. |
| season | Whether it’s summer or winter pelt. |
| std::invalid_argument | If bodymass <= 0. |
| double Fauna::get_digestive_limit_illius_gordon_1992 | ( | const double | bodymass_adult, |
| const double | bodymass, | ||
| const double | digestibility, | ||
| const std::array< double, 3 > & | ijk | ||
| ) |
Get digestion-limited daily grass energy intake after Illius & Gordon (1992)
The model of digestive passage rates by Illius & Gordon (1992)[33] constrains maximum daily energy intake ![$I_{dig[MJ/day]}$](form_17.png)
![\[
I_{dig[MJ/day]} = i * e^{jd} * M_{ad_{[kg]}}^{(ke^d+0.73)} * u_g
\]](form_18.png)


| bodymass_adult | Body mass [kg] at physical maturity. |
| bodymass | current body mass [kg/ind] |
| digestibility | proportional digestibility of the grass forage |
| ijk | The parameter constants i, j, k for the exponential function. |
| std::invalid_argument | If bodymass_adult<=0.0. |
| std::invalid_argument | If bodymass<=0.0 |
| std::logic_error | If bodymass > bodymass_adult. |
|
inline |
Energy expenditure [MJ/ind/day] based on cattle from Taylor et al. (1981)
Taylor et al. (1981)[66] Daily energy expenditure is given by
![\[
E [\frac{MJ}{day*ind}] = 0.4 * M * M_{ad}^{-0.27}
\]](form_0.png)
where M is current body mass [kg/ind] and 
|
inline |
Daily expenditure by Zhu et al (2018) [70].
![\[
E = \frac{k_2}{e^{k_1*T}} * A^{0.75}
\]](form_2.png)




| bodymass | Current body mass [kg/ind]. |
| ambient_temperature | Long-term mean air temperature [°C]. |
| std::invalid_argument | If bodymass <= 0. |
| const std::string & Fauna::get_forage_type_name | ( | const ForageType | ft | ) |
Get a short, lowercase string identifier for a forage type.
The names are
|
inline |
Get net energy content of the forage [MJ/kgDM].
See Energy Content of Forage for a detailed description of this net energy model.
[f NE = ME * k_m = DE * ME/DE * k_m = GE * DMD * ME/DE * k_m ]f
| ge_content | Gross energy (GE), also called combustion energy, in dry matter. [MJ/kgDM] |
| digestibility | Proportional dry-matter digestibility (DMD). |
| me_coefficient | Metabolizable energy coefficient, i.e. the ratio of metabolizable energy to digestible energy, ME/DE. [fractional] |
| k_maintenance | Net energy coefficient (k_m) for maintenance, i.e. the proportion of metabolizable remaining energy after heat increment. [fractional] |
| std::invalid_argument | If either me_coefficient or k_maintenance not in interval (0,1). |
| double Fauna::get_thermoregulatory_expenditure | ( | const double | thermoneutral_rate, |
| const double | conductance, | ||
| const double | core_temperature, | ||
| const double | ambient_temperature | ||
| ) |
Calculate additional energy requirements to keep body temperature.
Please see Thermoregulation by Conductance for the formulas and concepts.
| thermoneutral_rate | Thermoneutral expenditure [MJ/ind/day]. |
| conductance | Whole-body thermal conductance of the animal [W/°C]. |
| core_temperature | Body core temperature [°C]. |
| ambient_temperature | Ambient air temperature [°C]. |
| std::invalid_argument | If any parameter is out of range. |
|
inline |
Multiply forage fractions with coefficient, allowing numbers >0.
Note that this function takes the double value on the left side whereas the member function ForageValues<>::operator*() takes the double value as the right operand and returns a ForageValues<> object of the same template, which doesn’t allow numbers exceeding 1.0 in case of the ForageFraction (=ForageValues<ForageValueTag::ZeroToOne>) class.
|
inline |
Multiply forage fractions with coefficient, allowing numbers >0.
Note that this function takes the double value on the left side whereas the member function ForageValues<>::operator*() takes the double value as the right operand and returns a ForageValues<> object of the same template, which doesn’t allow numbers exceeding 1.0 in case of the ForageFraction (=ForageValues<ForageValueTag::ZeroToOne>) class.
|
inline |
Multiply forage fractions with coefficient, allowing numbers >0.
Note that this function takes the double value on the left side whereas the member function ForageValues<>::operator*() takes the double value as the right operand and returns a ForageValues<> object of the same template, which doesn’t allow numbers exceeding 1.0 in case of the ForageFraction (=ForageValues<ForageValueTag::ZeroToOne>) class.
| void Fauna::remove_directory | ( | const std::string & | path | ) |
Delete a directory recursively.
system() to call to the shell, but might fail without warning. | path | The absolute or relative path to the directory. |
| std::invalid_argument | If path does not exist. |
| std::runtime_error | If the system shell is not available throuh system(). |
|
inline |
Convert Watts (=J/s) to MJ/day.
| const int Fauna::FORAGE_TYPE_COUNT = (int)ForageType::Inedible + 1 |
Number of elements in ForageType.
| const std::set< ForageType > Fauna::FORAGE_TYPES = get_all_forage_types() |
Set with all enum entries of ForageType except ForageType::Inedible. This set serves mainly the purpose to iterate easily over all forage types: