1#ifndef UTOPIA_MODELS_PREDATORPREYPLANT_SPECIES_HH
2#define UTOPIA_MODELS_PREDATORPREYPLANT_SPECIES_HH
102 throw std::invalid_argument(
"Parameter repro_cost needs to be "
103 "smaller than or equal to the minimal resources required for "
128 throw std::invalid_argument(
"Parameter repro_cost needs to be "
129 "smaller than or equal to the minimal resources required for "
YAML::Node Config
Type of a variadic dictionary-like data structure used throughout Utopia.
Definition types.hh:71
ReturnType get_as(const std::string &key, const DataIO::Config &node)
This function is a wrapper around the yaml-cpp YAML::Node::as function.
Definition cfg_utils.hh:158
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
Definition PredatorPreyPlant.hh:18
GrowthModel
The growth model to use for plants.
Definition species.hh:29
@ none
Plant level is ignored; prey are always able to eat.
@ stochastic
Once eaten, a plant regrows with probability regen_prob
@ deterministic
Once eaten, a plant requires regen_time time to regenerate.
Struct that holds all species-specific parameters.
Definition species.hh:27
double repro_cost
Cost of reproduction.
Definition species.hh:43
double repro_resource_requ
Minimal reproduction resources requirements.
Definition species.hh:36
The parameters characterizing plants.
Definition species.hh:39
const unsigned int regen_time
The deterministic regeneration time.
Definition species.hh:44
const GrowthModel growth_model
The growth model of the plant.
Definition species.hh:41
PlantParams(const Utopia::DataIO::Config &cfg)
Construct a species from a configuration node.
Definition species.hh:51
const double regen_prob
The regeneration probability, evaluated each time step.
Definition species.hh:47
Struct that holds all plant characterising states.
Definition species.hh:12
unsigned int regeneration_counter
The regeneration time counter.
Definition species.hh:25
bool on_cell
Whether a plant is on the cell.
Definition species.hh:14
Struct that holds all predator-specific parameters.
Definition species.hh:92
PredatorParams(const Utopia::DataIO::Config &cfg)
Construct a predator object from a configuration node.
Definition species.hh:95
PredatorParams()=delete
The default constructor.
Struct that holds all prey-species specific parameters.
Definition species.hh:113
double p_flee
Probability to flee from a predator if on the same cell.
Definition species.hh:116
PreyParams()=delete
The default constructor.
PreyParams(const Utopia::DataIO::Config &cfg)
Construct a prey object from a configuration node.
Definition species.hh:120
Struct that holds all species-specific parameters.
Definition species.hh:73
unsigned int move_limit
Movement limit.
Definition species.hh:75
SpeciesBaseParams()=delete
SpeciesBaseParams(const Utopia::DataIO::Config &cfg)
Construct a species from a configuration node.
Definition species.hh:79
The parameter of all species.
Definition species.hh:143
PreyParams prey
Prey parameters.
Definition species.hh:145
PlantParams plant
Plant parameters.
Definition species.hh:151
SpeciesParams()=delete
Default constructor.
SpeciesParams(const Utopia::DataIO::Config &cfg)
Construct through a configuration file.
Definition species.hh:155
PredatorParams predator
Predator parameters.
Definition species.hh:148