A herbivore’s energy budget with fat reserves.
More...
#include <fatmass_energy_budget.h>
A herbivore’s energy budget with fat reserves.
Terminology:
- Anabolism = build up fat mass
- Catabolism = burn fat mass
- Metabolism = burn food energy directly and use surplus for anabolism
◆ FatmassEnergyBudget()
| FatmassEnergyBudget::FatmassEnergyBudget |
( |
const double |
initial_fatmass, |
|
|
const double |
maximum_fatmass, |
|
|
const double |
anabolism_coefficient, |
|
|
const double |
catabolism_coefficient |
|
) |
| |
Constructor.
- Parameters
-
| initial_fatmass | Initial fat mass [kg/ind] |
| maximum_fatmass | Maximum fat mass [kg/ind] |
| anabolism_coefficient | Conversion factor from net forage energy to fat mass [MJ/kg]. See Section Energy Content of Forage for how this value can be derived. |
| catabolism_coefficient | Conversion factor from fat mass to net energy [MJ/kg]. This is basically gross (combustion) energy of fat mass multiplied by conversion efficiency. |
- Exceptions
-
| std::invalid_argument | If one parameter is <=0.0 |
| std::logic_error | initial_fatmass > maximum_fatmass |
◆ add_energy_needs()
| void FatmassEnergyBudget::add_energy_needs |
( |
const double |
energy | ) |
|
Increase energy needs.
- Parameters
-
| energy | Additional energy needs [MJ/ind] |
- Exceptions
-
| std::invalid_argument | if energy<0.0 |
◆ catabolize_fat()
| void FatmassEnergyBudget::catabolize_fat |
( |
| ) |
|
Burn fat reserves and reduce unmet energy needs.
Fat mass never drops below zero.
◆ force_body_condition()
| void FatmassEnergyBudget::force_body_condition |
( |
const double |
body_condition | ) |
|
Set the proportional fat reserves.
- Parameters
-
| body_condition | Current fat mass divided by potential maximum fat mass. |
- Exceptions
-
| std::invalid_argument | If body_condition not in interval [0,1] |
◆ get_energy_needs()
| double Fauna::FatmassEnergyBudget::get_energy_needs |
( |
| ) |
const |
|
inline |
Current energy needs [MJ/ind].
◆ get_fatmass()
| double Fauna::FatmassEnergyBudget::get_fatmass |
( |
| ) |
const |
|
inline |
Current fat mass [kg/ind].
◆ get_max_anabolism_per_day()
| double FatmassEnergyBudget::get_max_anabolism_per_day |
( |
| ) |
const |
Get the maximum energy [MJ/ind/day] that could be anabolized in a day.
◆ get_max_fatmass()
| double Fauna::FatmassEnergyBudget::get_max_fatmass |
( |
| ) |
const |
|
inline |
Maximum fat mass [kg/ind].
◆ merge()
| void FatmassEnergyBudget::merge |
( |
const FatmassEnergyBudget & |
other, |
|
|
const double |
this_weight, |
|
|
const double |
other_weight |
|
) |
| |
Merge this object with another one by building weighted averages.
- Parameters
-
| other | The other object. |
| this_weight | Weight for this object. |
| other_weight | Weight for the other object. |
◆ metabolize_energy()
| void FatmassEnergyBudget::metabolize_energy |
( |
double |
energy | ) |
|
Update budget and fat mass by receiving energy (through feeding)
If energy exceeds current energy needs, the surplus is stored as fat (anabolism).
- Parameters
-
| energy | Input energy [MJ/ind]. |
- Exceptions
-
| std::invalid_argument | If energy<0.0. |
| std::logic_error | if energy exceeds current energy needs and maximum anabolism. |
◆ set_max_fatmass()
| void FatmassEnergyBudget::set_max_fatmass |
( |
const double |
max_fatmass, |
|
|
const double |
max_gain |
|
) |
| |
Set the maximum allowed fat mass [kg/ind] and fat gain [kg/ind/day].
- Parameters
-
| max_fatmass | Current maximum fat mass [kg/ind]. |
| max_gain | Maximum fat mass gain [kg/ind/day]. A value of zero indicates no limit. |
- Exceptions
-
| std::logic_error | if max_fatmass is smaller than current fat mass |
| std::invalid_argument | If max_fatmass<=0.0 or if max_gain < 0. |
◆ anabolism_coefficient
| double Fauna::FatmassEnergyBudget::anabolism_coefficient |
|
private |
◆ catabolism_coefficient
| double Fauna::FatmassEnergyBudget::catabolism_coefficient |
|
private |
◆ energy_needs
| double Fauna::FatmassEnergyBudget::energy_needs = 0.0 |
|
private |
◆ fatmass
| double Fauna::FatmassEnergyBudget::fatmass |
|
private |
◆ max_fatmass
| double Fauna::FatmassEnergyBudget::max_fatmass |
|
private |
◆ max_fatmass_gain
| double Fauna::FatmassEnergyBudget::max_fatmass_gain = 0.0 |
|
private |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/src/Fauna/fatmass_energy_budget.h
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/src/Fauna/fatmass_energy_budget.cpp