Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
Fauna::DistributeForage Struct Referenceabstract

Interface for a forage distribution algorithm. More...

#include <forage_distribution_algorithms.h>

Inheritance diagram for Fauna::DistributeForage:
Fauna::DistributeForageEqually

Public Member Functions

virtual void operator() (const HabitatForage &available, ForageDistribution &forage_distribution) const =0
 Distribute forage equally among herbivores. More...
 
virtual ~DistributeForage ()
 Virtual destructor. More...
 

Detailed Description

Interface for a forage distribution algorithm.

See also
Strategy

Constructor & Destructor Documentation

◆ ~DistributeForage()

virtual Fauna::DistributeForage::~DistributeForage ( )
inlinevirtual

Virtual destructor.

The virtual destructor is necessary so that the object is properly released from memory.

Member Function Documentation

◆ operator()()

virtual void Fauna::DistributeForage::operator() ( const HabitatForage available,
ForageDistribution forage_distribution 
) const
pure virtual

Distribute forage equally among herbivores.

No direct competition. Under forage scarcity, each herbivore gets its share in proportion to its demanded forage.

Parameters
[in]availableAvailable forage in the habitat.
[in,out]forage_distributionAs input: Demanded forage of each herbivore (see HerbivoreInterface::get_forage_demands()). As output: Forage portion for each herbivore. Unit is kgDM/km². The sum of all portions must not exceed the available forage!

Implemented in Fauna::DistributeForageEqually.


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