Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
Fauna::Demo::LogisticGrass Class Reference

#include <logistic_grass.h>

Classes

struct  Parameters
 Settings for grass growth. More...
 

Public Member Functions

 LogisticGrass (const LogisticGrass::Parameters &settings)
 Constructor. More...
 
void grow_daily (const int day_of_year)
 Perform grass growth and decay for one day. More...
 
const GrassForageget_forage () const
 Get current grass forage. More...
 
void set_forage (const GrassForage &f)
 Set the grass forage. More...
 

Private Attributes

GrassForage forage
 Current forage. More...
 
LogisticGrass::Parameters settings
 
int simulation_month
 The current simulation month, starting with zero. More...
 

Detailed Description

Helper class for performing simple grass growth to test herbivore functionality

Logistic growth of demo grass model.

Constructor & Destructor Documentation

◆ LogisticGrass()

LogisticGrass::LogisticGrass ( const LogisticGrass::Parameters settings)

Constructor.

Exceptions
std::invalid_argumentIf settings are not valid.

Member Function Documentation

◆ get_forage()

const GrassForage & Fauna::Demo::LogisticGrass::get_forage ( ) const
inline

Get current grass forage.

◆ grow_daily()

void LogisticGrass::grow_daily ( const int  day_of_year)

Perform grass growth and decay for one day.

Parameters
day_of_yearJanuary 1st = 0
Exceptions
std::invalid_argumentif not 0<=day_of_year<=364

◆ set_forage()

void Fauna::Demo::LogisticGrass::set_forage ( const GrassForage f)
inline

Set the grass forage.

Member Data Documentation

◆ forage

GrassForage Fauna::Demo::LogisticGrass::forage
private

Current forage.

Excluding the reserve LogisticGrass::Parameters::reserve.

◆ settings

LogisticGrass::Parameters Fauna::Demo::LogisticGrass::settings
private

◆ simulation_month

int Fauna::Demo::LogisticGrass::simulation_month
private

The current simulation month, starting with zero.

We need this to address the current value in Parameters::growth_monthly and Parameters::decay_monthly.


The documentation for this class was generated from the following files: