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::PredatorPrey::SpeciesBaseParams Struct Reference

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

#include <species.hh>

Inheritance diagram for Utopia::Models::PredatorPrey::SpeciesBaseParams:
Inheritance graph
[legend]

Public Member Functions

 SpeciesBaseParams (const Utopia::DataIO::Config &cfg)
 Load species parameters from a configuration node.
 
 SpeciesBaseParams ()=delete
 

Public Attributes

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 species-specific parameters.

Constructor & Destructor Documentation

◆ SpeciesBaseParams() [1/2]

Utopia::Models::PredatorPrey::SpeciesBaseParams::SpeciesBaseParams ( const Utopia::DataIO::Config cfg)
inline

Load species parameters from a configuration node.

51 :
52 cost_of_living(get_as<double>("cost_of_living", cfg)),
53 resource_intake(get_as<double>("resource_intake", cfg)),
54 repro_resource_requ(get_as<double>("repro_resource_requ", cfg)),
55 resource_max(get_as<double>("resource_max", cfg)),
56 repro_cost(get_as<double>("repro_cost", cfg)),
57 repro_prob(get_as<double>("repro_prob", cfg))
58 {
59 // Perform some checks
61 throw std::invalid_argument("Parameter repro_cost needs to be "
62 "smaller than or equal to the minimal resources required for "
63 "reproduction!");
64 }
65 }
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 resource_intake
Resource intake from eating.
Definition species.hh:33
double repro_cost
Cost of reproduction.
Definition species.hh:43
double resource_max
Maximal resource level.
Definition species.hh:39
double cost_of_living
Cost of living that is taken each time step.
Definition species.hh:30
double repro_resource_requ
Minimal reproduction resources requirements.
Definition species.hh:36
double repro_prob
Reproduction probability.
Definition species.hh:46

◆ SpeciesBaseParams() [2/2]

Utopia::Models::PredatorPrey::SpeciesBaseParams::SpeciesBaseParams ( )
delete

Member Data Documentation

◆ cost_of_living

double Utopia::Models::PredatorPrey::SpeciesBaseParams::cost_of_living

Cost of living that is taken each time step.

◆ repro_cost

double Utopia::Models::PredatorPrey::SpeciesBaseParams::repro_cost

Cost of reproduction.

◆ repro_prob

double Utopia::Models::PredatorPrey::SpeciesBaseParams::repro_prob

Reproduction probability.

◆ repro_resource_requ

double Utopia::Models::PredatorPrey::SpeciesBaseParams::repro_resource_requ

Minimal reproduction resources requirements.

◆ resource_intake

double Utopia::Models::PredatorPrey::SpeciesBaseParams::resource_intake

Resource intake from eating.

◆ resource_max

double Utopia::Models::PredatorPrey::SpeciesBaseParams::resource_max

Maximal resource level.


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