ALMaSS Rabbit ODdox
1.1
The rabbit model description following ODdox protocol
|
A standard class to manage a range of pollen and nectar development curves based on indexed rates. More...
#include <plants.h>
Public Member Functions | |
PollenNectarDevelopmentData (string a_tovinputfile, string a_toleinputfile, Landscape *a_land) | |
~PollenNectarDevelopmentData () | |
double | toleGetPollen (int a_tole, int a_index) |
double | toleGetNectar (int a_tole, int a_index) |
double | tovGetPollen (int a_tov, int a_index) |
double | tovGetNectar (int a_tov, int a_index) |
int | tovGetNPCurveNum (TTypesOfVegetation a_tov) |
int | toleGetNPCurveNum (TTypesOfVegetation a_tov) |
PollenNectarDevelopmentCurveSet | GetPollenNectarCurvePtr (int a_almassLEref) |
PollenNectarDevelopmentCurveSet | tovGetPollenNectarCurvePtr (int a_tov_ref) |
Protected Attributes | |
vector< PollenNectarDevelopmentCurve * > | m_tovPollenCurves |
vector< PollenNectarDevelopmentCurve * > | m_tovNectarCurves |
vector< PollenNectarDevelopmentCurve * > | m_tolePollenCurves |
vector< PollenNectarDevelopmentCurve * > | m_toleNectarCurves |
vector< int > | m_tov_pollencurvetable |
vector< int > | m_tole_pollencurvetable |
A standard class to manage a range of pollen and nectar development curves based on indexed rates.
PollenNectarDevelopmentData::PollenNectarDevelopmentData | ( | string | a_tovinputfile, |
string | a_toleinputfile, | ||
Landscape * | a_land | ||
) |
Reads in the number of pollen and nectar curves. Either we have one pair for each tov or we need a look-up table, but because many have the same curves a look up table was used. This however requires another input file for tov types to pollen/nectar curve number. If not using pollen and nectar then this is waste of space, so there is a cfg to turn it off and set all curves to a zero curve.
There are two sets of data structures - some based on tole types and the rest are crops that can be on a field tole. the methods of input is duplicated as far as possible.
tov
We need to open the input file and read in the tov types that have associated curves. Those not specified are assumed to have no nectar or pollen. Numbers used are those defined in LE_TypeClass::TranslateVegTypes for each tov type. First file entry is the number of defined tov_types, followed by pairs of tov_refnum & pollen curve refnum. The next line has a single number for the number of pollen/nectar curves The next lines are in pairs, pollen curve followed by nectar curve each with 365 entries and preceded by the curve number.
tole
We need to open the input file and read in the tov types that have associated curves. Those not specified are assumed to have no nectar or pollen. Numbers used are those defined in LE_TypeClass::TranslateEleTypes for each tole type. First file entry is the number of defined tole_types, followed by pairs of tole_refnum & pollen curve refnum. The next line has a single number for the number of pollen/nectar curves The next lines are in pairs, pollen curve followed by nectar curve each with 365 entries and preceded by the curve number.
Definition at line 416 of file plants.cpp.
References cfg_pollen_nectar_on, g_msg, m_tole_pollencurvetable, m_toleNectarCurves, m_tolePollenCurves, m_tov_pollencurvetable, m_tovNectarCurves, m_tovPollenCurves, tole_Foobar, tov_Undefined, Landscape::TranslateVegTypes(), CfgBool::value(), and MapErrorMsg::Warn().
PollenNectarDevelopmentData::~PollenNectarDevelopmentData | ( | ) |
Definition at line 558 of file plants.cpp.
References m_toleNectarCurves, m_tolePollenCurves, m_tovNectarCurves, and m_tovPollenCurves.
PollenNectarDevelopmentCurveSet PollenNectarDevelopmentData::GetPollenNectarCurvePtr | ( | int | a_almassLEref | ) |
Uses the almass LE ref num to find the relevant curve set and return it as a pointer. Zero is a special case since this is the empty pollen/nectar curve - it is not an almass LE ref The other special case is rotational crop field, in which case the initialisation is done when the crop is assigned
Definition at line 566 of file plants.cpp.
References g_letype, PollenNectarDevelopmentCurveSet::m_nectarcurveptr, PollenNectarDevelopmentCurveSet::m_pollencurveptr, m_tole_pollencurvetable, m_toleNectarCurves, m_tolePollenCurves, tole_Field, tole_UnsprayedFieldMargin, and LE_TypeClass::TranslateEleTypes().
Referenced by LE::SetPollenNectarData().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
PollenNectarDevelopmentCurveSet PollenNectarDevelopmentData::tovGetPollenNectarCurvePtr | ( | int | a_tov_ref | ) |
Uses the tov ref num to find the relevant curve set and return it as a pointer.
Definition at line 582 of file plants.cpp.
References PollenNectarDevelopmentCurveSet::m_nectarcurveptr, PollenNectarDevelopmentCurveSet::m_pollencurveptr, m_toleNectarCurves, m_tolePollenCurves, m_tov_pollencurvetable, m_tovNectarCurves, and m_tovPollenCurves.
Referenced by VegElement::SetVegType().
|
protected |
Definition at line 243 of file plants.h.
Referenced by GetPollenNectarCurvePtr(), and PollenNectarDevelopmentData().
|
protected |
Definition at line 241 of file plants.h.
Referenced by GetPollenNectarCurvePtr(), PollenNectarDevelopmentData(), tovGetPollenNectarCurvePtr(), and ~PollenNectarDevelopmentData().
|
protected |
Definition at line 240 of file plants.h.
Referenced by GetPollenNectarCurvePtr(), PollenNectarDevelopmentData(), tovGetPollenNectarCurvePtr(), and ~PollenNectarDevelopmentData().
|
protected |
Definition at line 242 of file plants.h.
Referenced by PollenNectarDevelopmentData(), and tovGetPollenNectarCurvePtr().
|
protected |
Definition at line 239 of file plants.h.
Referenced by PollenNectarDevelopmentData(), tovGetPollenNectarCurvePtr(), and ~PollenNectarDevelopmentData().
|
protected |
Definition at line 238 of file plants.h.
Referenced by PollenNectarDevelopmentData(), tovGetPollenNectarCurvePtr(), and ~PollenNectarDevelopmentData().