Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Utopia::Models::PredatorPreyPlant::PreyParams Struct Reference

Struct that holds all prey-species specific parameters. More...

#include <species.hh>

Inheritance diagram for Utopia::Models::PredatorPreyPlant::PreyParams:
Inheritance graph
[legend]
Collaboration diagram for Utopia::Models::PredatorPreyPlant::PreyParams:
Collaboration graph
[legend]

Public Member Functions

 PreyParams (const Utopia::DataIO::Config &cfg)
 Construct a prey object from a configuration node.
 
 PreyParams ()=delete
 The default constructor.
 
- Public Member Functions inherited from Utopia::Models::PredatorPreyPlant::SpeciesBaseParams
 SpeciesBaseParams (const Utopia::DataIO::Config &cfg)
 Construct a species from a configuration node.
 
 SpeciesBaseParams ()=delete
 
- Public Member Functions inherited from Utopia::Models::PredatorPrey::SpeciesBaseParams
 SpeciesBaseParams (const Utopia::DataIO::Config &cfg)
 Load species parameters from a configuration node.
 
 SpeciesBaseParams ()=delete
 

Public Attributes

double p_flee
 Probability to flee from a predator if on the same cell.
 
- Public Attributes inherited from Utopia::Models::PredatorPreyPlant::SpeciesBaseParams
unsigned int move_limit
 Movement limit.
 
- Public Attributes inherited from Utopia::Models::PredatorPrey::SpeciesBaseParams
double cost_of_living
 Cost of living that is taken each time step.
 
double resource_intake
 Resource intake from eating.
 
double repro_resource_requ
 Minimal reproduction resources requirements.
 
double resource_max
 Maximal resource level.
 
double repro_cost
 Cost of reproduction.
 
double repro_prob
 Reproduction probability.
 

Detailed Description

Struct that holds all prey-species specific parameters.

Constructor & Destructor Documentation

◆ PreyParams() [1/2]

Utopia::Models::PredatorPreyPlant::PreyParams::PreyParams ( const Utopia::DataIO::Config cfg)
inline

Construct a prey object from a configuration node.

121 :
123 p_flee(get_as<double>("p_flee", cfg))
124 {
125 double repro_cost = get_as<double>("repro_cost", cfg);
126 double repro_resource_requ = get_as<double>("repro_resource_requ", cfg);
128 throw std::invalid_argument("Parameter repro_cost needs to be "
129 "smaller than or equal to the minimal resources required for "
130 "reproduction!");
131 }
132 };
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
double repro_cost
Cost of reproduction.
Definition species.hh:43
double repro_resource_requ
Minimal reproduction resources requirements.
Definition species.hh:36
double p_flee
Probability to flee from a predator if on the same cell.
Definition species.hh:116

◆ PreyParams() [2/2]

Utopia::Models::PredatorPreyPlant::PreyParams::PreyParams ( )
delete

The default constructor.

Member Data Documentation

◆ p_flee

double Utopia::Models::PredatorPreyPlant::PreyParams::p_flee

Probability to flee from a predator if on the same cell.


The documentation for this struct was generated from the following file: