Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
herbivore_data.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2020 W. Traylor <wolfgang.traylor@senckenberg.de>
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
11#ifndef FAUNA_OUTPUT_HERBIVORE_DATA_H
12#define FAUNA_OUTPUT_HERBIVORE_DATA_H
13
14#include <map>
15#include "forage_values.h"
16#include "hft.h"
17
18namespace Fauna {
19namespace Output {
21
26 double age_years = 0.0;
27
29 double bodyfat = 0.0;
30
32 double expenditure = 0.0;
33 // Per-Individual variables
35
36 //------------------------------------------------------------
39
40 double inddens = 0.0;
41
43 double massdens = 0.0;
44
46 std::map<Fauna::MortalityFactor, double> mortality;
47
49 double offspring = 0.0;
50
53
56
59
62
65
68 // Per-habitat variables
70
71 //------------------------------------------------------------
73
93 HerbivoreData& merge(const HerbivoreData& other, const double this_weight,
94 const double other_weight);
95
97 void reset() {
98 age_years = 0.0;
99 bodyfat = 0.0;
103 energy_content = 0.0;
106 expenditure = 0.0;
107 inddens = 0.0;
108 massdens = 0.0;
109 offspring = 0.0;
110 }
111
113
134 static HerbivoreData create_datapoint(const std::vector<HerbivoreData> data);
135
137
143 const Fauna::ForageEnergyContent& obj2,
144 const double weight1 = 1.0,
145 const double weight2 = 1.0);
146 // Aggregation Functionality
148};
149} // namespace Output
150} // namespace Fauna
151
152#endif // FAUNA_OUTPUT_HERBIVORE_DATA_H
Basic classes encapsulating forage amounts & fractions.
Herbivore Functional Type (HFT) class and its dependents.
Definition: average.h:16
Herbivore output data for one time unit.
Definition: herbivore_data.h:22
double age_years
Age in years.
Definition: herbivore_data.h:26
double offspring
Newborns (offspring) per day [ind/km²/day].
Definition: herbivore_data.h:49
double expenditure
Energy expenditure [MJ/ind/day].
Definition: herbivore_data.h:32
Fauna::ForageMass eaten_forage_per_mass
Eaten forage per body mass [kgDM/kg/day].
Definition: herbivore_data.h:55
Fauna::ForageEnergy energy_intake_per_mass
Intake of net energy in forage per herbivore mass [MJ/kg/day].
Definition: herbivore_data.h:67
Fauna::ForageEnergyContent energy_content
Net energy content of available forage [MJ/kgDM].
Definition: herbivore_data.h:61
std::map< Fauna::MortalityFactor, double > mortality
Daily mortality rate [ind/ind/day].
Definition: herbivore_data.h:46
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.
Definition: herbivore_data.cpp:102
HerbivoreData & merge(const HerbivoreData &other, const double this_weight, const double other_weight)
Aggregate data of this object with another one.
Definition: herbivore_data.cpp:19
double inddens
Individual density [ind/km²].
Definition: herbivore_data.h:40
Fauna::ForageEnergy energy_intake_per_ind
Intake of net energy in forage per individual [MJ/ind/day].
Definition: herbivore_data.h:64
Fauna::ForageMass eaten_forage_per_ind
Eaten forage per individual [kgDM/ind/day].
Definition: herbivore_data.h:52
static HerbivoreData create_datapoint(const std::vector< HerbivoreData > data)
Aggregate herbivore data within one habitat.
Definition: herbivore_data.cpp:113
double bodyfat
Body fat [fraction].
Definition: herbivore_data.h:29
void reset()
Reset all member variables to initial zero values.
Definition: herbivore_data.h:97
double massdens
Mass density [kg/km²].
Definition: herbivore_data.h:43
double eaten_nitrogen_per_ind
Ingested nitrogen mass per individual and day [mgN/ind/day].
Definition: herbivore_data.h:58