Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
herbivore_interface.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_HERBIVORE_INTERFACE_H
12#define FAUNA_HERBIVORE_INTERFACE_H
13
14#include "forage_values.h"
15
16namespace Fauna {
17
18// Forward Declarations
19namespace Output {
20class HerbivoreData;
21}
22class HabitatForage;
23class HabitatEnvironment;
24
26
37 virtual ~HerbivoreInterface() = default;
38
40
51 virtual void eat(const ForageMass& kg_per_km2,
52 const Digestibility& digestibility,
53 const ForageMass& N_kg_per_km2 = ForageMass(0)) = 0;
54
56 virtual double get_bodymass() const = 0;
57
59
70 const HabitatForage& available_forage) = 0;
71
73
79 virtual std::string get_output_group() const = 0;
80
82 virtual double get_ind_per_km2() const = 0;
83
85 virtual double get_kg_per_km2() const = 0;
86
88 virtual const Output::HerbivoreData& get_todays_output() const = 0;
89
91 virtual bool is_dead() const = 0;
92
94
96 virtual void kill() = 0;
97
99
107 virtual void simulate_day(const int day,
108 const HabitatEnvironment& environment,
109 double& offspring) = 0;
110};
111
112} // namespace Fauna
113
114#endif // FAUNA_HERBIVORE_INTERFACE_H
All values for large herbivore forage in a Habitat.
Definition: habitat_forage.h:21
Basic classes encapsulating forage amounts & fractions.
Definition: average.h:16
ForageValues< ForageValueTag::PositiveAndZero > ForageMass
Dry matter mass values [kgDM or kgDM/km²] for different forage types.
Definition: forage_values.h:395
Variables describing the habitat that are not forage ⇒ abiotic environment.
Definition: environment.h:16
Interface for any herbivore implementation in the model.
Definition: herbivore_interface.h:35
virtual double get_bodymass() const =0
Body mass of one individual [kg/ind].
virtual void kill()=0
Mark this herbivore as dead (see is_dead()).
virtual double get_kg_per_km2() const =0
Get herbivore biomass density [kg/km²].
virtual double get_ind_per_km2() const =0
Individuals per km²
virtual ~HerbivoreInterface()=default
Virtual destructor, which will be called by derived classes.
virtual ForageMass get_forage_demands(const HabitatForage &available_forage)=0
Get the forage the herbivore would like to eat today.
virtual void simulate_day(const int day, const HabitatEnvironment &environment, double &offspring)=0
Simulate daily events.
virtual std::string get_output_group() const =0
The name of the HFT for aggregating output.
virtual const Output::HerbivoreData & get_todays_output() const =0
Read current output.
virtual void eat(const ForageMass &kg_per_km2, const Digestibility &digestibility, const ForageMass &N_kg_per_km2=ForageMass(0))=0
Feed the herbivore dry matter forage.
virtual bool is_dead() const =0
Whether the herbivore object is dead.
Herbivore output data for one time unit.
Definition: herbivore_data.h:22