Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
parameters.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_PARAMETERS_H
12#define FAUNA_PARAMETERS_H
13
14#include <cassert>
15#include <stdexcept>
16#include "forage_values.h"
18
19namespace Fauna {
20
25};
26
29enum class HerbivoreType {
31 Cohort
32};
33
35// Note that we define it as a strictly typed C++11 enum *class* in order to be
36// able to forward-declare it in other header files.
37enum class OutputInterval {
39 Daily,
41 Monthly,
43 Annual,
46};
47
49enum class OutputFormat {
52};
53
55
65struct Parameters {
70
72
79
81
83
86
88
98 bool one_hft_per_habitat = false;
104
107
114
118 bool is_valid(std::string& messages) const;
119
121
122 bool is_valid() const {
123 std::string dump;
124 return is_valid(dump);
125 }
126};
127
128} // namespace Fauna
129
130#endif // FAUNA_PARAMETERS_H
Basic classes encapsulating forage amounts & fractions.
Definition: average.h:16
ForageDistributionAlgorithm
Parameter for selecting algorithm for forage distribution among herbivores.
Definition: parameters.h:22
@ Equally
Equal forage distribution: Fauna::DistributeForageEqually.
OutputInterval
Time interval for aggregating output.
Definition: parameters.h:37
@ Monthly
Aggregate output for each month.
@ Decadal
Aggregate output for 10 years intervals.
@ Annual
Aggregate output for each year.
@ Daily
Don’t aggregate output over time, but write every day.
OutputFormat
Parameter for selecting the output writer implementation.
Definition: parameters.h:49
@ TextTables
Use class Output::TextTableWriter.
HerbivoreType
Definition: parameters.h:29
@ Cohort
Use class HerbivoreCohort.
Options for Fauna::Output::TextTableWriter.
Definition: text_table_writer_options.h:25
Parameters for the herbivory module.
Definition: parameters.h:65
ForageDistributionAlgorithm forage_distribution
Algorithm for how to distribute available forage among herbivores.
Definition: parameters.h:68
int herbivore_establish_interval
Days between establishment check for herbivores.
Definition: parameters.h:82
Output::TextTableWriterOptions output_text_tables
Definition: parameters.h:110
ForageEnergyContent forage_gross_energy
Gross energy content for forage types [MJ/kgDM].
Definition: parameters.h:78
HerbivoreType herbivore_type
Which kind of herbivore class to use.
Definition: parameters.h:85
OutputInterval output_interval
Time interval for aggregating output.
Definition: parameters.h:106
OutputFormat output_format
The module that writes megafauna output to disk.
Definition: parameters.h:103
bool one_hft_per_habitat
Whether to allow only herbivores of one HFT in each habitat.
Definition: parameters.h:98
bool is_valid() const
Check if the parameters are valid.
Definition: parameters.h:122
Options for Fauna::Output::TextTableWriter.