![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
This class justs holds the set of resource curves related to a specific plant community or crop. It is a data class, with no behaviour, but is convenient to group curves together. More...
#include <PollenNectar.h>
Public Member Functions | |
double | getNectar (int a_given_day) |
Returns the nectar quantity for the given day after day 0 in a year. More... | |
double | getSugar (int a_given_day) |
Returns the sugar quantity for the given day after day 0 in a year. More... | |
double | getPollen (int a_given_day) |
Returns the pollen quantity for the given day after day 0 in a year. More... | |
double | getPollenQuality (int a_given_day) |
Returns the pollen quality for the given day after day 0 in a year. More... | |
double | getResource (int a_given_day, vector< double > &a_resource_per_phase) |
Returns the resource for the given day after day o in a year. More... | |
PollenNectarDevelopmentCurveSet () | |
void | ClearAll () |
double | GetThreshold () |
Returns the day degrees temperature threshold. More... | |
double | GetMaxDDeg () |
Returns the maximum day degrees that one day can have. More... | |
int | GetRef () |
Returns the reference number for the curve. More... | |
double | GetStartingDDFlowering (void) |
Returns the staring dd of flowering period. More... | |
double | GetEndingDDFlowering (void) |
Returns the ending dd of flowering period. More... | |
int | GetStartingDayFlowering (void) |
Returns the starting day of flowering period. More... | |
int | GetEndingDayFlowering (void) |
Returns the ending day of flowering period. More... | |
void | SetStartingDayFlowering (int a_starting_day_flowering) |
Set the starting day of flowering period. More... | |
void | SetEndingDayFlowering (int a_ending_day_flowering) |
Set the ending day of flowering period. More... | |
void | UpdateFlowerResource (void) |
Update the flower resource for a year. More... | |
Public Attributes | |
bool | m_flag_not_enough_data = false |
Flag to show not enough data is available, so this curve can't be used. More... | |
int | m_curve_number |
The reference number for the curve. More... | |
double | m_DDthreshold = 0 |
The threshold temperature to calculate day degrees. More... | |
double | m_MaxDDeg |
The maximum temperature that one day can accumulate. More... | |
double | m_MinFlowerLength |
The minimum flowering length. More... | |
double | m_MaxFlowerLength |
The maximum flowering length. More... | |
double | m_MeanFlowerLength |
The mean flowering length. More... | |
double | m_StdFlowerLength |
The standard value of flower length. More... | |
double | m_starting_DD_flowering |
The starting degree days for starting flowering period. More... | |
double | m_ending_DD_flowering |
The ending degree days for ending flowering period. More... | |
double | m_total_nectar_whole_flowering |
The total amount of nectar in the whole flowering period –mg. More... | |
double | m_total_sugar_whole_flowering |
The total amount of sugar in the whole flowering period –mg. More... | |
double | m_total_pollen_whole_flowering |
The total amount of pollen in the whole flowering period –mg. More... | |
double | m_pollen_quality |
The pollen quality when there is pollen, this also depends the species, by default it uses the apis value. More... | |
int | m_starting_day_flowering |
The starting day number for flowering period in a year. More... | |
int | m_ending_day_flowering |
The ending day number of flowering period in a year. More... | |
int | m_flowering_length |
The flowering length in days. More... | |
int | m_num_flowering_phases |
The number of flowering phases. More... | |
vector< double > | m_nectar_per_phase |
The array to store the nectar in different period, the size is the number of the flowering period phases. More... | |
vector< double > | m_sugar_per_phase |
The array to store the sugar in different period, the size is the number of the flowering period phases. More... | |
vector< double > | m_pollen_per_phase |
The array to store the pollen in different period, the size is the number of the flowering period phases. More... | |
vector< int > | m_day_flowering_phases |
The array to store the day number for different flowering periods, the size is the number of the flowering period phases + 1. More... | |
This class justs holds the set of resource curves related to a specific plant community or crop. It is a data class, with no behaviour, but is convenient to group curves together.
PollenNectarDevelopmentCurveSet::PollenNectarDevelopmentCurveSet | ( | ) |
|
inline |
Just clears all data from the curves
References m_day_flowering_phases, m_nectar_per_phase, m_pollen_per_phase, and m_sugar_per_phase.
|
inline |
|
inline |
|
inline |
|
inline |
Returns the nectar quantity for the given day after day 0 in a year.
References getResource(), and m_nectar_per_phase.
|
inline |
Returns the pollen quantity for the given day after day 0 in a year.
References getResource(), and m_pollen_per_phase.
|
inline |
Returns the pollen quality for the given day after day 0 in a year.
References m_day_flowering_phases, and m_pollen_quality.
|
inline |
|
inline |
Returns the resource for the given day after day o in a year.
References m_day_flowering_phases, and m_num_flowering_phases.
Referenced by getNectar(), getPollen(), and getSugar().
|
inline |
|
inline |
|
inline |
Returns the sugar quantity for the given day after day 0 in a year.
References getResource(), and m_sugar_per_phase.
|
inline |
|
inline |
|
inline |
void PollenNectarDevelopmentCurveSet::UpdateFlowerResource | ( | void | ) |
Update the flower resource for a year.
References cfg_FloweringPeriodPhasesLengthArray, cfg_FloweringPeriodPhasesProportionArray, m_day_flowering_phases, m_ending_day_flowering, m_flowering_length, m_nectar_per_phase, m_pollen_per_phase, m_starting_day_flowering, m_sugar_per_phase, m_total_nectar_whole_flowering, m_total_pollen_whole_flowering, m_total_sugar_whole_flowering, and CfgArray_Double::value().
int PollenNectarDevelopmentCurveSet::m_curve_number |
The reference number for the curve.
Referenced by GetRef(), PollenNectarDevelopmentCurveSet(), and PollenNectarDevelopmentData::PollenNectarDevelopmentData().
vector<int> PollenNectarDevelopmentCurveSet::m_day_flowering_phases |
The array to store the day number for different flowering periods, the size is the number of the flowering period phases + 1.
Referenced by ClearAll(), getPollenQuality(), getResource(), PollenNectarDevelopmentCurveSet(), and UpdateFlowerResource().
double PollenNectarDevelopmentCurveSet::m_DDthreshold = 0 |
The threshold temperature to calculate day degrees.
Referenced by GetThreshold(), and PollenNectarDevelopmentData::PollenNectarDevelopmentData().
int PollenNectarDevelopmentCurveSet::m_ending_day_flowering |
The ending day number of flowering period in a year.
Referenced by GetEndingDayFlowering(), SetEndingDayFlowering(), and UpdateFlowerResource().
double PollenNectarDevelopmentCurveSet::m_ending_DD_flowering |
The ending degree days for ending flowering period.
Referenced by GetEndingDDFlowering(), and PollenNectarDevelopmentData::PollenNectarDevelopmentData().
bool PollenNectarDevelopmentCurveSet::m_flag_not_enough_data = false |
Flag to show not enough data is available, so this curve can't be used.
Contains an integer reference to a curve number, which is <10000 for plant communities and 10000 upwards for single crop curves. It then contains four curves and an associated day degree index. This data is a core part of the the PollenNectarDevelopmentData class where it is held in a list, one for each resource model defined.
Referenced by PollenNectarDevelopmentCurveSet(), and PollenNectarDevelopmentData::PollenNectarDevelopmentData().
int PollenNectarDevelopmentCurveSet::m_flowering_length |
The flowering length in days.
Referenced by UpdateFlowerResource().
double PollenNectarDevelopmentCurveSet::m_MaxDDeg |
The maximum temperature that one day can accumulate.
Referenced by GetMaxDDeg(), and PollenNectarDevelopmentData::PollenNectarDevelopmentData().
double PollenNectarDevelopmentCurveSet::m_MaxFlowerLength |
The maximum flowering length.
Referenced by PollenNectarDevelopmentData::PollenNectarDevelopmentData().
double PollenNectarDevelopmentCurveSet::m_MeanFlowerLength |
The mean flowering length.
Referenced by PollenNectarDevelopmentData::PollenNectarDevelopmentData().
double PollenNectarDevelopmentCurveSet::m_MinFlowerLength |
The minimum flowering length.
Referenced by PollenNectarDevelopmentData::PollenNectarDevelopmentData().
vector<double> PollenNectarDevelopmentCurveSet::m_nectar_per_phase |
The array to store the nectar in different period, the size is the number of the flowering period phases.
Referenced by ClearAll(), getNectar(), PollenNectarDevelopmentCurveSet(), and UpdateFlowerResource().
int PollenNectarDevelopmentCurveSet::m_num_flowering_phases |
The number of flowering phases.
Referenced by getResource(), and PollenNectarDevelopmentCurveSet().
vector<double> PollenNectarDevelopmentCurveSet::m_pollen_per_phase |
The array to store the pollen in different period, the size is the number of the flowering period phases.
Referenced by ClearAll(), getPollen(), PollenNectarDevelopmentCurveSet(), and UpdateFlowerResource().
double PollenNectarDevelopmentCurveSet::m_pollen_quality |
The pollen quality when there is pollen, this also depends the species, by default it uses the apis value.
Referenced by getPollenQuality(), PollenNectarDevelopmentData::PollenNectarDevelopmentData(), and VegElement::PollenNectarPhenologyCalculation().
int PollenNectarDevelopmentCurveSet::m_starting_day_flowering |
The starting day number for flowering period in a year.
Referenced by GetStartingDayFlowering(), SetStartingDayFlowering(), and UpdateFlowerResource().
double PollenNectarDevelopmentCurveSet::m_starting_DD_flowering |
The starting degree days for starting flowering period.
Referenced by GetStartingDDFlowering(), and PollenNectarDevelopmentData::PollenNectarDevelopmentData().
double PollenNectarDevelopmentCurveSet::m_StdFlowerLength |
The standard value of flower length.
Referenced by PollenNectarDevelopmentData::PollenNectarDevelopmentData().
vector<double> PollenNectarDevelopmentCurveSet::m_sugar_per_phase |
The array to store the sugar in different period, the size is the number of the flowering period phases.
Referenced by ClearAll(), getSugar(), PollenNectarDevelopmentCurveSet(), and UpdateFlowerResource().
double PollenNectarDevelopmentCurveSet::m_total_nectar_whole_flowering |
The total amount of nectar in the whole flowering period –mg.
Referenced by PollenNectarDevelopmentData::PollenNectarDevelopmentData(), and UpdateFlowerResource().
double PollenNectarDevelopmentCurveSet::m_total_pollen_whole_flowering |
The total amount of pollen in the whole flowering period –mg.
Referenced by PollenNectarDevelopmentData::PollenNectarDevelopmentData(), and UpdateFlowerResource().
double PollenNectarDevelopmentCurveSet::m_total_sugar_whole_flowering |
The total amount of sugar in the whole flowering period –mg.
Referenced by PollenNectarDevelopmentData::PollenNectarDevelopmentData(), and UpdateFlowerResource().