File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PestIncidenceManager Class Reference

A small class to generate pest incidence information. More...

#include <Landscape.h>

Public Member Functions

 PestIncidenceManager (double a_max, double a_min)
 Generates maximum and minimum pest indicidence levels
More...
 
double GetIncidenceLevel ()
 Returns the current pesticide incidence level, the mean of minimum and maximum incidence level. More...
 
void RecalculateIncidence ()
 Assigns a random number between 0 and 1.0 as the current incidence level. More...
 

Protected Attributes

double m_current_incidence
 Returns the current pesticide incidence level, the mean of minimum and maximum incidence level in the GetIncidenceLevel or a random number between 0 and 1.0 in the RecalculateIncidence. More...
 
double m_max_incidence
 Returns the maximum pesticide incidence level. More...
 
double m_min_incidence
 Returns the minimum pesticide incidence level. More...
 
double m_range
 Returns the range of pesticide incidence level, the subtraction of minimum from the maximum level. More...
 

Detailed Description

A small class to generate pest incidence information.

Constructor & Destructor Documentation

◆ PestIncidenceManager()

PestIncidenceManager::PestIncidenceManager ( double  a_max,
double  a_min 
)

Generates maximum and minimum pest indicidence levels

This class is a stub for expansion to more detailed versions. The initial version is simply a random number between 0 and 1 but more complex versions and file read information should be added.

7830 {
7831  m_max_incidence = a_max;
7832  m_min_incidence = a_min;
7833  m_current_incidence = (a_min + a_max) / 2.0;
7834  m_range = a_max - a_min;
7835 }

Member Function Documentation

◆ GetIncidenceLevel()

double PestIncidenceManager::GetIncidenceLevel ( )
inline

Returns the current pesticide incidence level, the mean of minimum and maximum incidence level.

123 { return m_current_incidence; }

References m_current_incidence.

◆ RecalculateIncidence()

void PestIncidenceManager::RecalculateIncidence ( )

Assigns a random number between 0 and 1.0 as the current incidence level.

7838 {
7839  // This is the most basic version which is just a random number between 0 and 1.0
7841 }

References g_rand_uni_fnc().

Member Data Documentation

◆ m_current_incidence

double PestIncidenceManager::m_current_incidence
protected

Returns the current pesticide incidence level, the mean of minimum and maximum incidence level in the GetIncidenceLevel or a random number between 0 and 1.0 in the RecalculateIncidence.

Referenced by GetIncidenceLevel().

◆ m_max_incidence

double PestIncidenceManager::m_max_incidence
protected

Returns the maximum pesticide incidence level.

◆ m_min_incidence

double PestIncidenceManager::m_min_incidence
protected

Returns the minimum pesticide incidence level.

◆ m_range

double PestIncidenceManager::m_range
protected

Returns the range of pesticide incidence level, the subtraction of minimum from the maximum level.


The documentation for this class was generated from the following files:
g_rand_uni_fnc
double g_rand_uni_fnc()
Definition: ALMaSS_Random.cpp:56
PestIncidenceManager::m_current_incidence
double m_current_incidence
Returns the current pesticide incidence level, the mean of minimum and maximum incidence level in the...
Definition: Landscape.h:128
PestIncidenceManager::m_min_incidence
double m_min_incidence
Returns the minimum pesticide incidence level.
Definition: Landscape.h:132
PestIncidenceManager::m_range
double m_range
Returns the range of pesticide incidence level, the subtraction of minimum from the maximum level.
Definition: Landscape.h:134
PestIncidenceManager::m_max_incidence
double m_max_incidence
Returns the maximum pesticide incidence level.
Definition: Landscape.h:130