Loading [MathJax]/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
Aphid_Population_Manager Class Reference

The class to handle all Aphid population related matters in the whole landscape. More...

#include <Aphid_Population_Manager.h>

Inheritance diagram for Aphid_Population_Manager:
SubPopulation_Population_Manager Population_Manager_Base

Public Member Functions

 Aphid_Population_Manager (Landscape *L, string a_aphid_specie_name="English grain aphid")
 
virtual ~Aphid_Population_Manager ()
 
AphidCreateObjects (TAnimal *pvo, struct_Aphid *data, int number)
 
virtual int calNextStage (int current_stage, double density=1)
 Return the next life stage for the given life stage. More...
 
virtual void updateDevelopmentSeason ()
 The function to update the development season. More...
 
virtual unsigned supplyDevelopmentSeason ()
 The function to supply the development season. More...
 
virtual void initialisePopulation ()
 The function to initialise the population when starting aphid simulation, this function is called in the subpopulation_mananger constructor. More...
 
int calNextStageShared (int current_stage)
 The function to calculate the next life stage for all aphids. More...
 
void initialiseSimWithEggs (void)
 The function to initilise the simulation with eggs. More...
 
virtual void updateMortalityArray (void)
 The fucntion to update the base mortality rate, it will call the corresponding function pointer. More...
 
void updateMortalityArrayShared (void)
 The function to calculate the base mortality rate for all aphids. More...
 
virtual int calOffspringStage (int current_stage, double *offspring_num=NULL, double a_age=1, double a_density=-1, double a_growth_stage=0, double *a_propotion=NULL, bool winter_host_flag=false)
 The function to calculate the offspring stage. More...
 
int calOffspringStageEGandPEA (int current_stage, double *offspring_num=NULL, double a_age=1, double a_density=-1, double a_growth_stage=0, double *a_propotion=NULL, bool winter_host_flag=false)
 The function to calculate the offspring stage for English grain and pea aphids. More...
 
int calOffspringStageBBandPP (int current_stage, double *offspring_num=NULL, double a_age=1, double a_density=-1, double a_growth_stage=0, double *a_propotion=NULL, bool winter_host_flag=false)
 The function to calcto calculate the offspring stage for black bean and peach potato aphids. More...
 
virtual bool isEnoughNextLifeStage (int a_life_stage)
 
bool isEnoughNextLifeStageShared (int a_life_stage)
 
double supplyNymphNumWeight (void)
 The function to return the daily nymph number weight. More...
 
virtual void doSpeciesLastThing ()
 The function to return the species. More...
 
virtual void writeCalibrationFiles (void)
 Write probe files for calibration. More...
 
virtual double calHatchChance ()
 The function to calculate the hatch chance for eggs, this function must be override in the derived class. More...
 
double SupplyAphidDensity (int a_x, int a_y)
 Function to supply the aphid density in the given location. More...
 
void KillAphid (int a_x, int a_y, double a_num)
 Function to kill the given number of aphids in the given location. More...
 
- Public Member Functions inherited from SubPopulation_Population_Manager
 SubPopulation_Population_Manager (Landscape *L, string DevReproFile="", int a_sub_w=10, int a_sub_h=10, int a_num_life_stage=5, int a_max_long_dist=1000, int a_peak_long_dist=100, float a_scale_wind_speed=1.1, float a_max_wind_speed=16, int a_wind_direc_num=8, int a_wind_speed_step_size=2, int a_max_alive_day=300)
 
virtual ~SubPopulation_Population_Manager (void)
 SubPopulation_Manager Destructor. More...
 
double supplyAllPopulationGivenStage (int index)
 Supply the population size at the given life stage for the who landscape. More...
 
double supplyTotalPopulationInCell (int x_indx, int y_indx)
 Supply whole population size at the given cell. More...
 
int supplyCellNumX ()
 Supply number of subpopulation in x coordinate. More...
 
int supplyCellNumY ()
 Supply number of subpopulation in y coordinate. More...
 
double supplyCellWidth ()
 Supply the width of a subpopulation cell. More...
 
double supplyCellHeight ()
 Supply the height of a subpopulation cell. More...
 
double supplySizeSubpopulationCell ()
 Supply the size of aphid subpopulation cell. More...
 
bool openSubpopulationBaseProbeFile ()
 Open the storing file. More...
 
virtual void subpopuBaseOutputProbe ()
 Below are the functions for saving result. More...
 
double getTotalSubpopulationInCell (int x_indx, int y_indx)
 Supply the total subpopulation size in the given cell. More...
 
double getSubpopulationInCellLifeStage (int x_indx, int y_indx, int a_life_stage)
 Supply the subpopulation size at the given life stage in the given cell. More...
 
double getSuitabilityInCell (int x_indx, int y_indx)
 Supply the suitability in the given cell. More...
 
SubPopulationsupplySubPopulationPointer (int indx, int indy)
 Supply the pointer of the subpopulation object in the given cell. More...
 
int supplyLifeStageNum ()
 Supply the number of life stage. More...
 
int supplyMaxColNum ()
 Supply the maximum number of column in the development array. More...
 
int supplyNextLifeStage (int life_circle_index, int life_stage_index)
 Supply the next life stage index for a given life stage and a given life path. More...
 
std::vector< int > supplyOldEnoughIndex (int life_stage_index)
 
int supplyNewestIndex (int life_stage_index)
 
virtual unsigned GetLiveArraySize (int a_listindex)
 Must be re-implemented in descendent classes. Gets the number of 'live' objects. More...
 
void readDevReproFile (string inputfile)
 Function to read the development time and lifestage. More...
 
void relocatePopulation (void)
 Relocate the population in each cell based on the suitability and movement ability. More...
 
virtual void DoLast ()
 
virtual void DoFirst ()
 
virtual void calLongMovementMask (void)
 Function to calculate the movement mask. More...
 
void doDevelopment ()
 Function to make the development for all the subpopulation object. More...
 
void addNewDay ()
 Add new day to the newest and oldest array. More...
 
void updateWholePopulationArray (int a_listindex, double number)
 The function to update the whole population array in the whole landscape. More...
 
void updateWholePopulationArray (blitz::Array< double, 1 > a_array)
 
void setFirstFlagLifeStage (int life_stage, bool pvalue)
 The function to set the flag indicating whether a given lifestage is the first time of existing. More...
 
bool supplyFirstFlagLifeStage (int life_stage)
 The function to supply the flag of first for the given life stage. More...
 
void setOldIndex (int life_stage, int p_value)
 The function to set the oldest index for the given life stage. More...
 
void doFlying (int ind, int index_x, int index_y)
 The function to fly the winged adults. More...
 
void doLocalMovement (int index_x, int index_y, double proportion)
 The function for local movement. More...
 
bool isWinterHostTole (TTypesOfLandscapeElement a_ele)
 Test whether it is a winter host tole. More...
 
bool isSummerHostTole (TTypesOfLandscapeElement a_ele)
 Test whether it is a summer host tole. More...
 
bool isWinterHostTov (TTypesOfVegetation a_ele)
 Test whether it is a winter host tov. More...
 
bool isSummerHostTov (TTypesOfVegetation a_ele)
 Test whether it is a summer host tov. More...
 
double supplyMortality (int a_life_stage, int a_age)
 The function to supply the mortality rate for the given life stage and the age. More...
 
blitz::Array< double, 2 > supplyMortalityWholeArray (void)
 The function to supply the whole base mortality rate array. More...
 
blitz::Array< double, 1 > supplyMortalityStageArray (int a_life_stage)
 The function to supply the 1D base morality rate array for the given life stage. More...
 
double calLandingCurve (double a_dis, double a_peak, double a_furthest)
 The function to calculate the landing curve along the wind direction. More...
 
SubPopulationCreateObjects (TAnimal *pvo, struct_SubPopulation *data, int number)
 
int supplyAgeInDay (int lifestage_index, int column_index)
 The function to return the age in days given an element in the subpopulation table. More...
 
double supplyAgeInDayDegree (int lifestage_index, int column_index)
 
virtual void SupplyLocXY (unsigned index_x, unsigned index_y, int &x, int &y)
 A stub for identifying an individual at a location. More...
 
std::vector< int > supplyVecFlyingLifeStages ()
 Supply the vector of life stages for flying. More...
 
int supplyNumFlyingLifeStages ()
 Supply the number of life stages that can fly. More...
 
std::vector< int > supplyVecLocMoveLifeStages ()
 Supply the vector of life stages that can do local movement. More...
 
int supplyNumLocMovLifeStages ()
 Supply the number of life stages thah can do local movement. More...
 
virtual unsigned GetPopulationSize (int a_listindex)
 Must be re-implemented in descendent classes. More...
 
std::vector< int > supplyWinterTolePeriod (TTypesOfLandscapeElement a_tole)
 The function to supply the available period vector for the given winter tole host. More...
 
std::vector< int > supplySummerTolePeriod (TTypesOfLandscapeElement a_tole)
 The function to supply the available period vector for the given summer tole host. More...
 
virtual void doParasitoidDevelopment ()
 The function for parasitoid calculation, it does nothing in this base class. More...
 
virtual void doSpecicesLastThing ()
 The special last thing for the drived species. More...
 
void updateWholePopulation ()
 Update whole population info. More...
 
virtual void SetNoProbesAndSpeciesSpecificFunctions (int a_pn)
 Sets up probe and species specifics. More...
 
virtual void readHosts (string a_file_name)
 The fuction to read the host lists for aphid. More...
 
bool supplySummerHostOn (void)
 
bool supplyWinterHostOn (void)
 
- Public Member Functions inherited from Population_Manager_Base
 Population_Manager_Base (Landscape *L)
 The Population_Manager_Base constructor. More...
 
virtual void Catastrophe (int)
 Must be re-implemented in descendent classes. More...
 
int SupplySimW () const
 Returns landscape width in m. More...
 
int SupplySimH () const
 Returns landscape height in m. More...
 
int SupplySimWH () const
 Returns half the landscape width in m. More...
 
int SupplySimHH () const
 Returns half the landscape height in m. More...
 
virtual int ProbeFileInput (char *p_Filename, int p_ProbeNo)
 A stub to build specfic probes and functions. More...
 
virtual char * SpeciesSpecificReporting (int, int)
 A stub to build specfic reporting. More...
 
int SupplyListNameLength () const
 
const char * SupplyListName (int a_i) const
 Get a list name from the list. More...
 
virtual TAnimalFindClosest (int, int, unsigned)
 A stub for identifying an individual at a location. More...
 
std::string SupplySimulationName ()
 
virtual void OpenTheAOROutputProbe (const string &a_string)
 An empty method that needs to be here because the population manager lists might contain sub-population models which will skip Population_Manager functionality. More...
 
void SetStepCounterInADay (int a_counter)
 Set step counter in a day. More...
 
int GetStepCounterInADay (void)
 Return the sep counter in a day. More...
 
virtual double GetAphidDensity (int, int)
 Return the aphid density, it is only used when aphid simulations are running. More...
 
virtual TAnimalSupplyAnimalPtr (unsigned int a_index, unsigned int a_animal)
 Return the animal pointer for the give life stage and number. More...
 

Private Attributes

string m_aphid_specie_name
 This is to store the aphid species name. More...
 
double m_aphid_egg_mortality
 The variable to store the aphid egg mortality. More...
 
double m_aphid_egg_mortality_sd
 The variable to store the standard deviation of the gee mortality. More...
 
double m_aphid_nymph_mortality_para_a
 The variable to store the nymph temperature based mortality parameter A. More...
 
double m_aphid_nymph_mortality_para_b
 The variable to store the nymph temperature based mortality parameter B. More...
 
double m_aphid_nymph_mortality_para_c
 The variable to store the nymph temperature based mortality parameter C. More...
 
double m_aphid_adult_mortality_para_a
 The variable to store the adult mortality parameter A. More...
 
double m_aphid_adult_mortality_para_b
 The variable to store the adult mortality parameter B. More...
 
double m_aphid_adult_mortality_para_c
 The variable to store the adult mortality parameter C. More...
 
double m_aphid_adult_longevity_para_a
 The variable to store the adult longevity parameter A. More...
 
double m_aphid_adult_longevity_para_b
 The variable to store the adult longevity parameter B. More...
 
double m_aphid_egg_starting_degree_days
 The variable to store the egg's starting degree days when the simulation starts. More...
 
double m_aphid_egg_hatch_chance_para_a
 The variable to store the egg hatch chance parameter A. More...
 
double m_aphid_egg_hatch_chance_para_b
 The variable to store the egg hatch chance parameter B. More...
 
double m_aphid_egg_hatch_chance_threshold
 The threshold of hatch value to start the delay of egg hatch, this is to avoid the eggs hatching from the same day. More...
 
double m_aphid_egg_hatch_delay_degree_days
 The number of degree days to delay the egg's hatch. More...
 
double m_aphid_egg_hatch_chance_para_a_after_threshold
 The variable to store the egg hatch chance parameter A after threshold. More...
 
double m_aphid_egg_hatch_chance_para_b_after_threshold
 The variable to store the egg hatch chance parameter B after threshold. More...
 
double m_aphid_egg_hatch_chance_turing_degree_days
 The variable to store the turning degree day for egg hatch chance. More...
 
double m_aphid_egg_hatch_chance_max_degree_days
 The variable to store the largest degree days for egg hatch chance being one. More...
 
double m_aphid_nymph_with_wings_development_day_degrees
 The variable to store the nymph with wings development day degrees. More...
 
double m_aphid_nymph_with_wings_development_day_degrees_sd
 The variable to store the nymph with wings development day degrees's standard deviation. More...
 
double m_aphid_nymph_without_wings_development_day_degrees
 The variable to store the nymph without wings development day degrees. More...
 
double m_aphid_nymph_without_wings_development_day_degrees_sd
 The variable to store the nymph without wings development day degrees's standard deviation. More...
 
double m_aphid_egg_production_para_a
 The variable to store the egg production parameter A. More...
 
double m_aphid_egg_production_para_b
 The variable to store the egg production parameter B. More...
 
double m_aphid_egg_production_para_c
 The variable to store the egg production parameter C. More...
 
double m_aphid_egg_production_para_sd
 The variable to store the egg production parameter's standard deviation. More...
 
double m_aphid_nymph_production_para_a1
 The variable to store the nymph production parameter A1. More...
 
double m_aphid_nymph_production_para_b1
 The variable to store the nymph production parameter B1. More...
 
double m_aphid_nymph_production_para_a2
 The variable to store the nymph production parameter A2. More...
 
double m_aphid_nymph_production_para_b2
 The variable to store the nymph production parameter B2. More...
 
double m_aphid_nymph_production_changing_add
 The variable to store the nymph production changing accumulated degree days. More...
 
double m_aphid_nymph_production_temp_weight_para_a
 The variable to store the temperature weighted nymph production parameter A. More...
 
double m_aphid_nymph_production_temp_weight_para_b
 The variable to store the temperature weighted nymph production parameter B. More...
 
double m_aphid_nymph_production_temp_weight_para_c
 The variable to store the temperature weighted nymph production parameter C. More...
 
double m_aphid_alate_proportion_para_a
 The variable to store alate proportion calculation parameter A. More...
 
double m_aphid_alate_proportion_para_b
 The variable to store alate proportion calculation parameter B. More...
 
double m_aphid_alate_proportion_para_c
 The variable to store alate proportion calculation parameter C. More...
 
double m_aphid_male_reproduction_day_length
 The day length in minutes for male reproduction. This is used for EG and PEA. More...
 
double m_aphid_female_reproduction_day_length
 The day length in minutes for female reproduction. This is used for EG and PEA. More...
 
double m_aphid_winter_host_day_length
 THe day length in minutes to turn on winter host. This is used for BB and PP. More...
 
double m_aphid_summer_host_day_length
 The day length in minutes to turn on summer host. This is used for BB and PP. More...
 
vector< double > m_aphid_adult_mortality_inflection_point_dd
 The vector to store inflection point of accumulated day degrees for adult mortality. More...
 
vector< double > m_aphid_adult_mortality_vec
 The vector to store the adult mortality for the inflection point. More...
 
double m_aphid_sexual_reproduction_average_add
 The average required accumulated degree days to enable sexual reproduction after the first egg hatches. More...
 
double m_aphid_sexual_reproduction_add_sd
 The standard deviation of the required accumulated degree days to enable sexual reproduction after the first egg hatches. More...
 
TTypesOfAphidDevelopmentSeason m_current_developtype
 The variable to show the development season. More...
 
int(Aphid_Population_Manager::* m_next_life_func_pointer )(int current_stage)
 The function pointer for calculation of next life stage. More...
 
void(Aphid_Population_Manager::* m_update_mortality_array_pointer )()
 The function pointer for calculation of the shared base mortality rate for the whole landscape. More...
 
int(Aphid_Population_Manager::* m_offspring_func_pointer )(int current_stage, double *offspring_num, double a_age, double a_density, double a_growth_stage, double *a_propotion, bool winter_host_flag)
 The function pointer for calculation of the offsrping stage number. More...
 
bool(Aphid_Population_Manager::* m_is_ready_next_liff_func_pointer )(int a_life_stage)
 THe function pointer for testing whether the given life stage is ready for the next one. More...
 
int m_max_adult_dd
 THe variable to store the maximum number of degree days for aphid. More...
 
vector< double > m_nymph_per_day
 The vector to store the age (in degree days) related reproduction offsping nymph. More...
 
vector< double > m_egg_per_day
 The vector to store the age (in degree days) related reproduction offspring egg. More...
 
double m_nymph_produced_num_weight
 The weight to regulate the number of nymph produced per day based on temperature. More...
 
bool m_egg_reproduction_flag
 The flag to enable sexual development. More...
 
double m_accu_ddeg_egg_reproduction
 The accumulated day degrees to enable sexual development. More...
 
bool m_first_egg_hatch_flag
 The flag to show the first hatch of egg. More...
 
double m_max_day_degree_adult
 The longest day degrees that a adult can have. More...
 

Additional Inherited Members

- Public Attributes inherited from Population_Manager_Base
Probe_DataTheProbe [100] = {nullptr}
 Holds a list of pointers to standard output probes. More...
 
- Protected Member Functions inherited from SubPopulation_Population_Manager
virtual void Run (int NoTSteps)
 
- Protected Member Functions inherited from Population_Manager_Base
 ~Population_Manager_Base ()=default
 
- Protected Attributes inherited from SubPopulation_Population_Manager
blitz::Array< double, 2 > m_development_degree_day
 The array to store the average max and std development time for each life stage, max and std time for reproducing. More...
 
int m_num_x_range
 The number of subpopulation in x range. More...
 
int m_num_y_range
 The number of subpopulation in y range. More...
 
int m_num_life_stage
 The number of life stages for the animal. More...
 
bool m_mul_hosts_flag
 Flag to show whether it has both winter and summer host. More...
 
int m_sub_w
 Variable to record the width of the subpopulation cell. More...
 
int m_sub_h
 Variable to record the height of the subpopulation cell. More...
 
blitz::Array< double, 2 > m_cell_popu_density
 Array for weighted population density in each subpopulation cell. More...
 
blitz::Array< double, 2 > m_cell_suitability
 Array for suitable value in each subpopulation cell. More...
 
blitz::Array< SubPopulation *, 2 > m_the_subpopulation_array
 Vector to store the all the pointers for the subpopulation object. More...
 
blitz::Array< double, 4 > m_short_move_mask
 Short distance movement mask. More...
 
blitz::Array< double, 4 > m_long_move_mask
 Long distance movement mask. More...
 
int m_max_long_distance
 The longest distance that the specieces can fly for long distance dispersal. More...
 
int m_peak_long_distance
 The distance for the peak amount of landing. More...
 
float m_scale_wind_speed
 The scale for wind. More...
 
float m_max_flying_wind_speed
 The larget wind speed for winged adults to fly. More...
 
int m_wind_speed_step_size
 The sampling step size for wind speed. More...
 
int m_wind_direction_num
 The number of wind directions. More...
 
int m_wind_speed_num
 The number of wind speed samples. More...
 
blitz::Array< int, 1 > m_wind_speed_lookup_table
 The look up table for wind speed index in the flying mask. More...
 
double m_max_short_distance
 The longest distance that the specieces can move for short distance dispersal. More...
 
int m_long_move_mask_x_num
 Variable to record the dimension of the long distance movement mask. - x. More...
 
int m_long_move_mask_y_num
 Variable to record the dimension of the long distance movement mask. - y. More...
 
int m_long_move_mask_x_num_half
 Variable to record the dimension of the short distance movement mask. - x. More...
 
int m_long_move_mask_y_num_half
 
blitz::Array< int, 1 > m_long_move_mask_x_num_half_array
 Array to store the number of cells for longest flying at different windspeed. More...
 
blitz::Array< int, 1 > m_long_move_mask_y_num_half_array
 
int m_short_move_mask_x_num
 
int m_short_move_mask_y_num
 Variable to record the dimension of the short distance movement mask. - y. More...
 
blitz::Array< double, 2 > m_accumu_degree_days
 Array for accumulated degree days for each life circle. More...
 
blitz::Array< int, 2 > m_index_new_old
 Array for index of the newest and oldest life stages. More...
 
int m_max_alive_days
 The longest alive day among all the life stages. More...
 
blitz::Array< double, 1 > m_lowest_temp_dev
 Lowest development temperatures for each life stage. This is the last step in each day. More...
 
blitz::Array< double, 2 > m_life_circle_path
 The life circle array. It could have more than one life circle paths. More...
 
bool m_hibernated_hatch_flag
 Flag variable to indicate hibernated eggs are ready to hatch. More...
 
blitz::Array< bool, 1 > m_first_flag_life_stage
 Array to track whether it is the first existence for a life stage. More...
 
blitz::Array< double, 1 > m_current_flying_array
 Temporal array for the flying subpopulation. More...
 
blitz::Array< double, 1 > m_current_landing_array
 Temporal array for the landing subpopulation. More...
 
std::vector< TTypesOfLandscapeElementm_winter_hosts_tole
 The vector to hold winter host landscape type. More...
 
std::vector< std::vector< int > > m_winter_hosts_tole_period
 The vector to store the exsiting period for winter host tole. More...
 
std::map< int, int > m_winter_hosts_tole_period_map
 The map to store the index for the winter host period. More...
 
std::vector< TTypesOfVegetationm_winter_hosts_tov
 The vector to hold winter host vegetation type. More...
 
std::vector< TTypesOfLandscapeElementm_summer_hosts_tole
 The vector to hold summer host landscape type. More...
 
std::vector< std::vector< int > > m_summer_hosts_tole_period
 The vector to store the exsiting period for summer host tole. More...
 
std::map< int, int > m_summer_hosts_tole_period_map
 The map to store the index for the summer host period. More...
 
std::vector< TTypesOfVegetationm_summer_hosts_tov
 The vector to hold sumber host vegetation type. More...
 
blitz::Array< double, 2 > m_current_mortality_array
 This a lookup table for the age and temperature dependent mortality rate. This is the same for the whole landscape for each day. Further cell specific related calculate should be done in the SubPopulation class. More...
 
blitz::Array< double, 2 > m_wind_direction_array
 The array to hold the wind directions. More...
 
blitz::Array< blitz::Array< double, 2 >, 2 > m_landing_masks
 The array to store the landing masks. The vector is indexed by the wind speed index first and the second index is the wind direction. Each element is a 2-D dimensional blitz array. More...
 
std::vector< int > m_flying_life_stage_array
 The vector to store the life stages that can fly. More...
 
std::vector< int > m_landing_life_stage_array
 The vector to store the life stage when a flying one lands, it could be different from the flying one, e.g., they drop theri wings. More...
 
std::vector< int > m_local_moving_life_stage_array
 The vector to store the life stags that can move locally. More...
 
std::ofstream m_subpopulation_base_prb_file
 The file for the storing the data. More...
 
std::vector< std::vector< SubPopulation * > > m_vec_subpopulation_pointers_polygon
 The vector used to store the pointers of all the subpopulation objects in each polygon. More...
 
bool m_summer_host_on
 The flag to enable summer host. More...
 
bool m_winter_host_on
 The flag to enalble winter host. More...
 
- Protected Attributes inherited from Population_Manager_Base
int SimH
 stores the simulation height More...
 
int SimW
 stores the simulation width More...
 
int SimHH
 stores the simulation height halved More...
 
int SimWH
 stores the simulation width halved More...
 
string m_SimulationName
 stores the simulation name More...
 
Landscapem_TheLandscape
 holds an internal pointer to the landscape More...
 
int m_ListNameLength {}
 the number of life-stages simulated in the population manager More...
 
const char * m_ListNames [32] {}
 A list of life-stage names. More...
 
std::string m_AORProbeFileName {"AOR_Probe.txt"}
 name of the AOR Probe file More...
 
std::string m_ProbeFileName {"Probe.res"}
 name of the Probe file More...
 
int m_step_counter_in_a_day
 Step counter in a day, this is used for the animals with finer step size other than one day. More...
 

Detailed Description

The class to handle all Aphid population related matters in the whole landscape.

Constructor & Destructor Documentation

◆ Aphid_Population_Manager()

Aphid_Population_Manager::Aphid_Population_Manager ( Landscape L,
string  a_aphid_specie_name = "English grain aphid" 
)

Construct a new Aphid_Population_Manger object

326 {
333  m_aphid_specie_name = a_aphid_specie_name;
334 
336  #ifdef __APHID_CALIBRATION
337  openAphidCalibFiles();
338  #endif
339 
340  m_egg_reproduction_flag = false;
341  m_first_egg_hatch_flag = false;
342 
344  //open the new one using
345  string temp_file_name = "";
346  if (m_aphid_specie_name == "English grain aphid") {
347  temp_file_name = "EnglishGrainAphid";
348  }
349  else if (m_aphid_specie_name == "Pea aphid") {
350  temp_file_name = "PeaAphid";
351  }
352  else if (m_aphid_specie_name == "Aphis fabae") {
353  temp_file_name = "BlackBeanAphid";
354  }
355  else if (m_aphid_specie_name == "Peach potato aphid") {
356  temp_file_name = "PeachPotatoAphid";
357  }
358  else {
359  temp_file_name = a_aphid_specie_name;
360  remove(temp_file_name.begin(), temp_file_name.end(), ' ');
361  }
363  }
364 
365 
366  //calculate the egg hatch chances
367  //the turning for new slop degree days
369 
373 
374  //calculate the egg production based on the adult's accumulated degree days
375  m_egg_per_day.resize(m_max_adult_dd+1);
377 
378  //initialise the look up vectors for offpring
379  for (int i=0; i<=m_max_adult_dd; i++){
382 
383  }
384  else {
386  }
387  if (m_nymph_per_day[i]<0) m_nymph_per_day[i] = 0;
389  if (m_egg_per_day[i]<0) m_egg_per_day[i] =0;
390  }
391 
392  //set the landing survival rate
393  m_landing_survival_rate = cfg_AphidLandingSurvivalRateVec.value()[m_running_species_number];
394 }

References cfg_AphidLandingSurvivalRateVec, cfg_AphidResultFileSuffix, cfg_AphidResultPath, cfg_Subpopu_Base_Output_Used, g_rand_uni_fnc(), initialisePopulation(), m_accu_ddeg_egg_reproduction, m_aphid_egg_hatch_chance_para_a, m_aphid_egg_hatch_chance_para_a_after_threshold, m_aphid_egg_hatch_chance_para_b, m_aphid_egg_hatch_chance_para_b_after_threshold, m_aphid_egg_hatch_chance_threshold, m_aphid_egg_hatch_chance_turing_degree_days, m_aphid_egg_hatch_delay_degree_days, m_aphid_egg_production_para_a, m_aphid_egg_production_para_b, m_aphid_egg_production_para_c, m_aphid_egg_production_para_sd, m_aphid_nymph_production_changing_add, m_aphid_nymph_production_para_a1, m_aphid_nymph_production_para_a2, m_aphid_nymph_production_para_b1, m_aphid_nymph_production_para_b2, m_aphid_specie_name, m_egg_per_day, m_egg_reproduction_flag, m_first_egg_hatch_flag, m_max_adult_dd, m_nymph_per_day, SubPopulation_Population_Manager::openSubpopulationBaseProbeFile(), CfgBool::value(), CfgStr::value(), and CfgArray_Double::value().

◆ ~Aphid_Population_Manager()

Aphid_Population_Manager::~Aphid_Population_Manager ( )
virtual
1343  {
1344  #ifdef __APHID_CALIBRATION
1345  closeAphidCalibFiles();
1346  #endif
1347 }

Member Function Documentation

◆ calHatchChance()

double Aphid_Population_Manager::calHatchChance ( )
virtual

◆ calNextStage()

int Aphid_Population_Manager::calNextStage ( int  current_stage,
double  density = 1 
)
virtual

Return the next life stage for the given life stage.

Return the next life stage based on the density

Reimplemented from SubPopulation_Population_Manager.

411  {
412  return (this->*m_next_life_func_pointer)(current_stage);
413 }

References m_next_life_func_pointer.

◆ calNextStageShared()

int Aphid_Population_Manager::calNextStageShared ( int  current_stage)

The function to calculate the next life stage for all aphids.

This function is used both for pean and english grain aphid.

Parameters
current_stage
Returns
int
816  {
817  //Spring
818 
819  if (current_stage == toa_Egg){
820  //set the first hatch flag to be true
822  m_first_egg_hatch_flag = true;
823  m_egg_reproduction_flag = false;
824  }
825  return toa_Aptera;
826  }
827 
828  if(current_stage == toa_Aptera || current_stage == toa_Alate || current_stage == toa_Female || current_stage == toa_Male){
829  return -1; // let them die
830  }
831 
832  if(current_stage == toa_Nymph){
833  return toa_Aptera;
834  }
835 
836  if(current_stage == toa_Nymph_W){
837  return toa_Alate;
838  }
839 
840  if(current_stage == toa_Nymph_F){
841  return toa_Female;
842  }
843 
844  if(current_stage == toa_Nymph_M){
845  return toa_Male;
846  }
847 }

References m_egg_reproduction_flag, m_first_egg_hatch_flag, toa_Alate, toa_Aptera, toa_Egg, toa_Female, toa_Male, toa_Nymph, toa_Nymph_F, toa_Nymph_M, and toa_Nymph_W.

Referenced by initialisePopulation().

◆ calOffspringStage()

int Aphid_Population_Manager::calOffspringStage ( int  current_stage,
double *  offspring_num = NULL,
double  a_age = 1,
double  a_density = -1,
double  a_growth_stage = 0,
double *  a_propotion = NULL,
bool  winter_host_flag = false 
)
virtual

The function to calculate the offspring stage.

Reimplemented from SubPopulation_Population_Manager.

1069  {
1070  return (this->*m_offspring_func_pointer)(current_stage, offspring_num, a_age, a_density, a_growth_stage, a_propotion, winter_host_flag);
1071 }

References m_offspring_func_pointer.

◆ calOffspringStageBBandPP()

int Aphid_Population_Manager::calOffspringStageBBandPP ( int  current_stage,
double *  offspring_num = NULL,
double  a_age = 1,
double  a_density = -1,
double  a_growth_stage = 0,
double *  a_propotion = NULL,
bool  winter_host_flag = false 
)

The function to calcto calculate the offspring stage for black bean and peach potato aphids.

This function is used both for black bean and peach potato Aphid.

Parameters
current_stage
offspring_num
a_age
a_density
a_growth_stage
a_propotion
Returns
int
1137  {
1138  if(current_stage == toa_Female){
1140  *offspring_num = m_egg_per_day[int(ceil(a_age))];
1141  }
1142  else{
1143  *offspring_num = 0;
1144  }
1145 
1146  return toa_Egg;
1147  }
1148  if(current_stage == toa_Aptera || current_stage == toa_Alate){
1149  //nothing to produce
1150  if(a_density<0){
1151  *offspring_num = 0;
1152  return toa_Nymph;
1153  }
1154  double alate_prop = (m_aphid_alate_proportion_para_a*a_density+m_aphid_alate_proportion_para_c*a_growth_stage+m_aphid_alate_proportion_para_b)/100;
1155  if (alate_prop<0.001) alate_prop = 0;
1156  if (alate_prop>=1) alate_prop = 1;
1157  *offspring_num = m_nymph_per_day[int(ceil(a_age))]*m_nymph_produced_num_weight; // multiply with the temperature realted weight.
1158 
1159 
1161  //first check if it is on winter host and it is in the last half year, if yes, produce females
1162  if(m_winter_host_on && winter_host_flag && m_TheLandscape->SupplyMonth()>=8){
1163  //if (m_winter_host_on && m_TheLandscape->SupplyMonth() >= 8) {
1164  return toa_Nymph_F;
1165  }
1166  else{
1167  if(a_propotion){
1168  *a_propotion = alate_prop;
1169  return toa_Nymph_W;
1170  }
1171  else{
1172  return toa_Nymph;
1173  }
1174  }
1175  }
1176 }

References m_aphid_alate_proportion_para_a, m_aphid_alate_proportion_para_b, m_aphid_alate_proportion_para_c, m_egg_per_day, m_egg_reproduction_flag, m_nymph_per_day, m_nymph_produced_num_weight, Population_Manager_Base::m_TheLandscape, SubPopulation_Population_Manager::m_winter_host_on, Landscape::SupplyMonth(), toa_Alate, toa_Aptera, toa_Egg, toa_Female, toa_Nymph, toa_Nymph_F, and toa_Nymph_W.

Referenced by initialisePopulation().

◆ calOffspringStageEGandPEA()

int Aphid_Population_Manager::calOffspringStageEGandPEA ( int  current_stage,
double *  offspring_num = NULL,
double  a_age = 1,
double  a_density = -1,
double  a_growth_stage = 0,
double *  a_propotion = NULL,
bool  winter_host_flag = false 
)

The function to calculate the offspring stage for English grain and pea aphids.

This function is used both for Pea and English Grain Aphid.

Parameters
current_stage
offspring_num
a_age
a_density
a_growth_stage
a_propotion
Returns
int
1084  {
1085  if(current_stage == toa_Female){
1087  *offspring_num = m_egg_per_day[int(ceil(a_age))];
1088  }
1089  else{
1090  *offspring_num = 0;
1091  }
1092 
1093  return toa_Egg;
1094  }
1095  if(current_stage == toa_Aptera || current_stage == toa_Alate){
1096  //nothing to produce
1097  if(a_density<0){
1098  *offspring_num = 0;
1099  return toa_Nymph;
1100  }
1101  double alate_prop = (m_aphid_alate_proportion_para_a*a_density+m_aphid_alate_proportion_para_c*a_growth_stage+m_aphid_alate_proportion_para_b)/100;
1102  if (alate_prop<0.001) alate_prop = 0;
1103  if (alate_prop>=1) alate_prop = 1;
1104  *offspring_num = m_nymph_per_day[int(ceil(a_age))]*m_nymph_produced_num_weight; // multiply with the temperature related weight.
1105  //if (alate_prop>0.5) *offspring_num *= (1-alate_prop+0.1);
1106  //cout<<*offspring_num<<"How many!!!!"<<endl;
1107  double current_day_length = g_landscape_ptr->SupplyDaylength();
1108  if(m_egg_reproduction_flag && current_day_length <m_aphid_male_reproduction_day_length && current_day_length > m_aphid_female_reproduction_day_length){
1109  return toa_Nymph_M;
1110  }
1111  else if(m_egg_reproduction_flag && current_day_length <= m_aphid_female_reproduction_day_length){
1112  return toa_Nymph_F;
1113  }
1114  else{
1115  if(a_propotion){
1116  *a_propotion = alate_prop;
1117  return toa_Nymph_W;
1118  }
1119  else{
1120  return toa_Nymph;
1121  }
1122  }
1123  }
1124 }

References g_landscape_ptr, m_aphid_alate_proportion_para_a, m_aphid_alate_proportion_para_b, m_aphid_alate_proportion_para_c, m_aphid_female_reproduction_day_length, m_egg_per_day, m_egg_reproduction_flag, m_nymph_per_day, m_nymph_produced_num_weight, Landscape::SupplyDaylength(), toa_Alate, toa_Aptera, toa_Egg, toa_Female, toa_Nymph, toa_Nymph_F, toa_Nymph_M, and toa_Nymph_W.

Referenced by initialisePopulation().

◆ CreateObjects()

Aphid * Aphid_Population_Manager::CreateObjects ( TAnimal pvo,
struct_Aphid data,
int  number 
)
396  {
397  Aphid* new_Aphid;
398  new_Aphid = new Aphid(data->x, data->y, data->w, data->h, data->L, data->NPM, data->empty_flag, data->starting_suitability, data->starting_popu_density, number, data->index_x, data->index_y, data->species, data->winter_landscape_host, data->summer_landscape_host, data->farm_flag);
399  // always 0 since it is a subpopulation model
400 
401  //the simulation starts from Jan, we only have some eggs from the beginning.
402  if(number > 0){
403  //updateWholePopulationArray(toa_Egg, number);
404  new_Aphid -> addAnimalNumGivenStageColumn(toa_Egg, 0, number);
405  }
406 
407  new_Aphid->setWeightBiomass(data->random_biomass_weight);
408  return new_Aphid;
409 }

References struct_Aphid::empty_flag, struct_Aphid::farm_flag, struct_Aphid::h, struct_Aphid::index_x, struct_Aphid::index_y, struct_Aphid::L, struct_Aphid::NPM, struct_Aphid::random_biomass_weight, struct_Aphid::species, struct_Aphid::starting_popu_density, struct_Aphid::starting_suitability, struct_Aphid::summer_landscape_host, toa_Egg, struct_Aphid::w, struct_Aphid::winter_landscape_host, struct_Aphid::x, and struct_Aphid::y.

Referenced by initialiseSimWithEggs().

◆ doSpeciesLastThing()

void Aphid_Population_Manager::doSpeciesLastThing ( )
virtual

The function to return the species.

1217  {
1218 
1219  for (int i = toa_Aptera; i<= toa_Male; i++){
1221  m_accumu_degree_days(i, m_index_new_old(i, 1)) = 0.0;
1222  m_index_new_old(i, 1) += 1;
1223  //when it reaches the end, set it to zero
1224  if (m_index_new_old(i,1) >= m_max_alive_days){
1225  m_index_new_old(i,1) = 0;
1226  }
1227  }
1228  }
1229 
1230 }

References SubPopulation_Population_Manager::m_accumu_degree_days, SubPopulation_Population_Manager::m_index_new_old, SubPopulation_Population_Manager::m_max_alive_days, m_max_day_degree_adult, toa_Aptera, and toa_Male.

◆ initialisePopulation()

void Aphid_Population_Manager::initialisePopulation ( )
virtual

The function to initialise the population when starting aphid simulation, this function is called in the subpopulation_mananger constructor.

Reimplemented from SubPopulation_Population_Manager.

443  {
444  //common code for all the aphid species
445  //Pea aphid
446  cout<<m_aphid_specie_name<<endl;
447  if (m_aphid_specie_name == "Pea aphid"){
448  m_ListNames[0]="Egg";
449  m_ListNames[1]="Nymph";
450  m_ListNames[2]="NymphW";
451  m_ListNames[3]="NymphF";
452  m_ListNames[4]="NymphM";
453  m_ListNames[5]="Aptera";
454  m_ListNames[6]="Alate";
455  m_ListNames[7]="Female";
456  m_ListNames[8]="Male";
457  m_ListNameLength = 9;
458  m_SimulationName = "Pea aphid simulation";
459  m_running_species_number = toas_PEA;
460  //read the host file
462 
463  //set the parameters
474  for (int i=0; i<cfg_PEAAphidDevelopmentBaseTempArray.value().size(); i++){
476  m_turning_temp_dev(i) = cfg_PEAAphidDevelopmentTurningTempArray.value()[i];
477  m_weight_dd_lower_turning_temp_dev(i) = (m_turning_temp_dev(i)-m_lowest_temp_dev(i))/m_turning_temp_dev(i);
478  }
479  m_turning_temp_dev_used_flag = cfg_PEAAphidDualLinearModelFlagDD.value();
506  int temp_length = cfg_PEAAphidAdultMortalityDdeg.value().size();
508  m_aphid_adult_mortality_vec.resize(temp_length);
509  for (int i =0; i<temp_length; i++){
512  }
515 
516 
517  //set the function pointers
522 
523  //Life stages that can fly
530  //m_local_moving_life_stage_array.push_back(toa_Alate);
531  //m_local_moving_life_stage_array.push_back(toa_Female);
533  }
534 
535  //English grain aphid
536  if (m_aphid_specie_name == "English grain aphid"){
537  m_ListNames[0]="Egg";
538  m_ListNames[1]="Nymph";
539  m_ListNames[2]="NymphW";
540  m_ListNames[3]="NymphF";
541  m_ListNames[4]="NymphM";
542  m_ListNames[5]="Aptera";
543  m_ListNames[6]="Alate";
544  m_ListNames[7]="Female";
545  m_ListNames[8]="Male";
546  m_ListNameLength = 9;
547  m_running_species_number = toas_EG;
548  m_SimulationName = "English grain aphid simulation";
549  //read the host file
551 
552  //set the parameters
563  for (int i=0; i<cfg_EGAphidDevelopmentBaseTempArray.value().size(); i++){
565  m_turning_temp_dev(i) = cfg_EGAphidDevelopmentTurningTempArray.value()[i];
566  m_weight_dd_lower_turning_temp_dev(i) = (m_turning_temp_dev(i)-m_lowest_temp_dev(i))/m_turning_temp_dev(i);
567  }
568  m_turning_temp_dev_used_flag = cfg_EGAphidDualLinearModelFlagDD.value();
595  int temp_length = cfg_EGAphidAdultMortalityDdeg.value().size();
597  m_aphid_adult_mortality_vec.resize(temp_length);
598  for (int i =0; i<temp_length; i++){
601  }
604 
605 
606  //set the function pointers
609  //same as pea aphid
612 
613  //Life stages that can fly
620  //m_local_moving_life_stage_array.push_back(toa_Alate);
623  }
624 
625  //Aphis fabae
626  if (m_aphid_specie_name == "Aphis fabae"){
627  m_ListNames[0]="Egg";
628  m_ListNames[1]="Nymph";
629  m_ListNames[2]="NymphW";
630  m_ListNames[3]="NymphF";
631  m_ListNames[4]="NymphM";
632  m_ListNames[5]="Aptera";
633  m_ListNames[6]="Alate";
634  m_ListNames[7]="Female";
635  m_ListNames[8]="Male";
636  m_ListNameLength = 9;
637  m_SimulationName = "Aphis fabae Simulation";
638  m_running_species_number = toas_BB;
640 
641 
642  //set the parameters
653  for (int i=0; i<cfg_BBAphidDevelopmentBaseTempArray.value().size(); i++){
655  m_turning_temp_dev(i) = cfg_BBAphidDevelopmentTurningTempArray.value()[i];
656  m_weight_dd_lower_turning_temp_dev(i) = (m_turning_temp_dev(i)-m_lowest_temp_dev(i))/m_turning_temp_dev(i);
657  }
658  m_turning_temp_dev_used_flag = cfg_BBAphidDualLinearModelFlagDD.value();
685  int temp_length = cfg_BBAphidAdultMortalityDdeg.value().size();
687  m_aphid_adult_mortality_vec.resize(temp_length);
688  for (int i =0; i<temp_length; i++){
691  }
694 
695 
696  //set the function pointers
701 
702  //Life stages that can fly
709  //m_local_moving_life_stage_array.push_back(toa_Alate);
710  //m_local_moving_life_stage_array.push_back(toa_Female);
712  }
713 
714  //Peach potato aphid
715  if (m_aphid_specie_name == "Peach potato aphid"){
716  m_ListNames[0]="Egg";
717  m_ListNames[1]="Nymph";
718  m_ListNames[2]="NymphW";
719  m_ListNames[3]="NymphF";
720  m_ListNames[4]="NymphM";
721  m_ListNames[5]="Aptera";
722  m_ListNames[6]="Alate";
723  m_ListNames[7]="Female";
724  m_ListNames[8]="Male";
725  m_ListNameLength = 9;
726  m_SimulationName = "Peach potato aphid Simulation";
727  m_running_species_number = toas_PP;
729 
730 
731  //set the parameters
742  for (int i=0; i<cfg_PPAphidDevelopmentBaseTempArray.value().size(); i++){
744  m_turning_temp_dev(i) = cfg_PPAphidDevelopmentTurningTempArray.value()[i];
745  m_weight_dd_lower_turning_temp_dev(i) = (m_turning_temp_dev(i)-m_lowest_temp_dev(i))/m_turning_temp_dev(i);
746  }
747  m_turning_temp_dev_used_flag = cfg_PPAphidDualLinearModelFlagDD.value();
774  int temp_length = cfg_PPAphidAdultMortalityDdeg.value().size();
776  m_aphid_adult_mortality_vec.resize(temp_length);
777  for (int i =0; i<temp_length; i++){
780  }
783 
784  //set the function pointers
787  //same as pea aphid
790 
791  //Life stages that can fly
798  //m_local_moving_life_stage_array.push_back(toa_Alate);
799  //m_local_moving_life_stage_array.push_back(toa_Female);
801  }
802 
803  //m_max_day_degree_adult = -1*m_aphid_adult_longevity_para_b/m_aphid_adult_longevity_para_a;
805 
806  //initialise the simulation
808 }

References calNextStageShared(), calOffspringStageBBandPP(), calOffspringStageEGandPEA(), cfg_BBAphidAdultMortality, cfg_BBAphidAdultMortalityDdeg, cfg_BBAphidAdultMortalityParaA, cfg_BBAphidAdultMortalityParaB, cfg_BBAphidAdultMortalityParaC, cfg_BBAphidAlatePropParaA, cfg_BBAphidAlatePropParaB, cfg_BBAphidAlatePropParaC, cfg_BBAphidDevelopmentBaseTempArray, cfg_BBAphidDevelopmentTurningTempArray, cfg_BBAphidDualLinearModelFlagDD, cfg_BBAphidEggHatchChanceParaA, cfg_BBAphidEggHatchChanceParaB, cfg_BBAphidEggHatchDelayDD, cfg_BBAphidEggHatchDelayThreshold, cfg_BBAphidEggMortalityRate, cfg_BBAphidEggMortalityRateStd, cfg_BBAphidEggReproductionParaA, cfg_BBAphidEggReproductionParaB, cfg_BBAphidEggReproductionParaC, cfg_BBAphidEggReproductionParaSTD, cfg_BBAphidEggStartingADD, cfg_BBAphidHostFile, cfg_BBAphidLongevityParaA, cfg_BBAphidLongevityParaB, cfg_BBAphidNymphDevDayDegNoWing, cfg_BBAphidNymphDevDayDegNoWingStd, cfg_BBAphidNymphDevDayDegWing, cfg_BBAphidNymphDevDayDegWingStd, cfg_BBAphidNymphMortalityParaA, cfg_BBAphidNymphMortalityParaB, cfg_BBAphidNymphMortalityParaC, cfg_BBAphidNymphReproductionChangeADD, cfg_BBAphidNymphReproductionParaA1, cfg_BBAphidNymphReproductionParaA2, cfg_BBAphidNymphReproductionParaB1, cfg_BBAphidNymphReproductionParaB2, cfg_BBAphidNymphReproductionTempWeightParaA, cfg_BBAphidNymphReproductionTempWeightParaB, cfg_BBAphidNymphReproductionTempWeightParaC, cfg_BBAphidSexualDevelopmentRequiredDdeg, cfg_BBAphidSexualDevelopmentRequiredDdegStd, cfg_BBAphidSummerHostDayLength, cfg_BBAphidWinterHostDayLength, cfg_EGAphidAdultMortality, cfg_EGAphidAdultMortalityDdeg, cfg_EGAphidAdultMortalityParaA, cfg_EGAphidAdultMortalityParaB, cfg_EGAphidAdultMortalityParaC, cfg_EGAphidAlatePropParaA, cfg_EGAphidAlatePropParaB, cfg_EGAphidAlatePropParaC, cfg_EGAphidDayLengthFemale, cfg_EGAphidDayLengthMale, cfg_EGAphidDevelopmentBaseTempArray, cfg_EGAphidDevelopmentTurningTempArray, cfg_EGAphidDualLinearModelFlagDD, cfg_EGAphidEggHatchChanceParaA, cfg_EGAphidEggHatchChanceParaB, cfg_EGAphidEggHatchDelayDD, cfg_EGAphidEggHatchDelayThreshold, cfg_EGAphidEggMortalityRate, cfg_EGAphidEggMortalityRateStd, cfg_EGAphidEggReproductionParaA, cfg_EGAphidEggReproductionParaB, cfg_EGAphidEggReproductionParaC, cfg_EGAphidEggReproductionParaSTD, cfg_EGAphidEggStartingADD, cfg_EGAphidHostFile, cfg_EGAphidLongevityParaA, cfg_EGAphidLongevityParaB, cfg_EGAphidNymphDevDayDegNoWing, cfg_EGAphidNymphDevDayDegNoWingStd, cfg_EGAphidNymphDevDayDegWing, cfg_EGAphidNymphDevDayDegWingStd, cfg_EGAphidNymphMortalityParaA, cfg_EGAphidNymphMortalityParaB, cfg_EGAphidNymphMortalityParaC, cfg_EGAphidNymphReproductionChangeADD, cfg_EGAphidNymphReproductionParaA1, cfg_EGAphidNymphReproductionParaA2, cfg_EGAphidNymphReproductionParaB1, cfg_EGAphidNymphReproductionParaB2, cfg_EGAphidNymphReproductionTempWeightParaA, cfg_EGAphidNymphReproductionTempWeightParaB, cfg_EGAphidNymphReproductionTempWeightParaC, cfg_EGAphidSexualDevelopmentRequiredDdeg, cfg_EGAphidSexualDevelopmentRequiredDdegStd, cfg_PEAAphidAdultMortality, cfg_PEAAphidAdultMortalityDdeg, cfg_PEAAphidAdultMortalityParaA, cfg_PEAAphidAdultMortalityParaB, cfg_PEAAphidAdultMortalityParaC, cfg_PEAAphidAlatePropParaA, cfg_PEAAphidAlatePropParaB, cfg_PEAAphidAlatePropParaC, cfg_PEAAphidDayLengthFemale, cfg_PEAAphidDayLengthMale, cfg_PEAAphidDevelopmentBaseTempArray, cfg_PEAAphidDevelopmentTurningTempArray, cfg_PEAAphidDualLinearModelFlagDD, cfg_PEAAphidEggHatchChanceParaA, cfg_PEAAphidEggHatchChanceParaB, cfg_PEAAphidEggHatchDelayDD, cfg_PEAAphidEggHatchDelayThreshold, cfg_PEAAphidEggMortalityRate, cfg_PEAAphidEggMortalityRateStd, cfg_PEAAphidEggReproductionParaA, cfg_PEAAphidEggReproductionParaB, cfg_PEAAphidEggReproductionParaC, cfg_PEAAphidEggReproductionParaSTD, cfg_PEAAphidEggStartingADD, cfg_PEAAphidHostFile, cfg_PEAAphidLongevityParaA, cfg_PEAAphidLongevityParaB, cfg_PEAAphidNymphDevDayDegNoWing, cfg_PEAAphidNymphDevDayDegNoWingStd, cfg_PEAAphidNymphDevDayDegWing, cfg_PEAAphidNymphDevDayDegWingStd, cfg_PEAAphidNymphMortalityParaA, cfg_PEAAphidNymphMortalityParaB, cfg_PEAAphidNymphMortalityParaC, cfg_PEAAphidNymphReproductionChangeADD, cfg_PEAAphidNymphReproductionParaA1, cfg_PEAAphidNymphReproductionParaA2, cfg_PEAAphidNymphReproductionParaB1, cfg_PEAAphidNymphReproductionParaB2, cfg_PEAAphidNymphReproductionTempWeightParaA, cfg_PEAAphidNymphReproductionTempWeightParaB, cfg_PEAAphidNymphReproductionTempWeightParaC, cfg_PEAphidSexualDevelopmentRequiredDdeg, cfg_PEAphidSexualDevelopmentRequiredDdegStd, cfg_PPAphidAdultMortality, cfg_PPAphidAdultMortalityDdeg, cfg_PPAphidAdultMortalityParaA, cfg_PPAphidAdultMortalityParaB, cfg_PPAphidAdultMortalityParaC, cfg_PPAphidAlatePropParaA, cfg_PPAphidAlatePropParaB, cfg_PPAphidAlatePropParaC, cfg_PPAphidDevelopmentBaseTempArray, cfg_PPAphidDevelopmentTurningTempArray, cfg_PPAphidDualLinearModelFlagDD, cfg_PPAphidEggHatchChanceParaA, cfg_PPAphidEggHatchChanceParaB, cfg_PPAphidEggHatchDelayDD, cfg_PPAphidEggHatchDelayThreshold, cfg_PPAphidEggMortalityRate, cfg_PPAphidEggMortalityRateStd, cfg_PPAphidEggReproductionParaA, cfg_PPAphidEggReproductionParaB, cfg_PPAphidEggReproductionParaC, cfg_PPAphidEggReproductionParaSTD, cfg_PPAphidEggStartingADD, cfg_PPAphidHostFile, cfg_PPAphidLongevityParaA, cfg_PPAphidLongevityParaB, cfg_PPAphidNymphDevDayDegNoWing, cfg_PPAphidNymphDevDayDegNoWingStd, cfg_PPAphidNymphDevDayDegWing, cfg_PPAphidNymphDevDayDegWingStd, cfg_PPAphidNymphMortalityParaA, cfg_PPAphidNymphMortalityParaB, cfg_PPAphidNymphMortalityParaC, cfg_PPAphidNymphReproductionChangeADD, cfg_PPAphidNymphReproductionParaA1, cfg_PPAphidNymphReproductionParaA2, cfg_PPAphidNymphReproductionParaB1, cfg_PPAphidNymphReproductionParaB2, cfg_PPAphidNymphReproductionTempWeightParaA, cfg_PPAphidNymphReproductionTempWeightParaB, cfg_PPAphidNymphReproductionTempWeightParaC, cfg_PPAphidSexualDevelopmentRequiredDdeg, cfg_PPAphidSexualDevelopmentRequiredDdegStd, cfg_PPAphidSummerHostDayLength, cfg_PPAphidWinterHostDayLength, initialiseSimWithEggs(), isEnoughNextLifeStageShared(), m_aphid_adult_longevity_para_a, m_aphid_adult_longevity_para_b, m_aphid_adult_mortality_inflection_point_dd, m_aphid_adult_mortality_para_a, m_aphid_adult_mortality_para_b, m_aphid_adult_mortality_para_c, m_aphid_adult_mortality_vec, m_aphid_alate_proportion_para_a, m_aphid_alate_proportion_para_b, m_aphid_alate_proportion_para_c, m_aphid_egg_hatch_chance_para_a, m_aphid_egg_hatch_chance_para_b, m_aphid_egg_hatch_chance_threshold, m_aphid_egg_hatch_delay_degree_days, m_aphid_egg_mortality, m_aphid_egg_mortality_sd, m_aphid_egg_production_para_a, m_aphid_egg_production_para_b, m_aphid_egg_production_para_c, m_aphid_egg_production_para_sd, m_aphid_egg_starting_degree_days, m_aphid_female_reproduction_day_length, m_aphid_male_reproduction_day_length, m_aphid_nymph_mortality_para_a, m_aphid_nymph_mortality_para_b, m_aphid_nymph_mortality_para_c, m_aphid_nymph_production_changing_add, m_aphid_nymph_production_para_a1, m_aphid_nymph_production_para_a2, m_aphid_nymph_production_para_b1, m_aphid_nymph_production_para_b2, m_aphid_nymph_production_temp_weight_para_a, m_aphid_nymph_production_temp_weight_para_b, m_aphid_nymph_production_temp_weight_para_c, m_aphid_nymph_with_wings_development_day_degrees, m_aphid_nymph_with_wings_development_day_degrees_sd, m_aphid_nymph_without_wings_development_day_degrees, m_aphid_nymph_without_wings_development_day_degrees_sd, m_aphid_sexual_reproduction_add_sd, m_aphid_sexual_reproduction_average_add, m_aphid_specie_name, m_aphid_summer_host_day_length, m_aphid_winter_host_day_length, SubPopulation_Population_Manager::m_flying_life_stage_array, m_is_ready_next_liff_func_pointer, SubPopulation_Population_Manager::m_landing_life_stage_array, Population_Manager_Base::m_ListNameLength, Population_Manager_Base::m_ListNames, SubPopulation_Population_Manager::m_local_moving_life_stage_array, SubPopulation_Population_Manager::m_lowest_temp_dev, m_max_adult_dd, m_max_day_degree_adult, m_next_life_func_pointer, m_offspring_func_pointer, Population_Manager_Base::m_SimulationName, m_update_mortality_array_pointer, SubPopulation_Population_Manager::readHosts(), toa_Alate, toa_Aptera, toa_Female, toas_BB, toas_EG, toas_PEA, toas_PP, updateMortalityArrayShared(), CfgFloat::value(), CfgBool::value(), CfgStr::value(), and CfgArray_Double::value().

Referenced by Aphid_Population_Manager().

◆ initialiseSimWithEggs()

void Aphid_Population_Manager::initialiseSimWithEggs ( void  )

The function to initilise the simulation with eggs.

849  {
850  int index_cell_i = 0;
851  int index_cell_j = 0;
852  struct_Aphid* sp;
853  sp = new struct_Aphid;
854  sp->NPM = this;
855  sp->L = m_TheLandscape;
856  //creat the aphid in each cell
857  double different_count[4] = {0, 0, 0, 0};
858  for (int i=0; i<SimW; i=i+m_sub_w)
859  {
860  index_cell_j = 0;
861  for(int j=0; j<SimH; j=j+m_sub_h)
862  {
863  /*
864  vector<int> poly_id_vec;
865  bool not_found = true;
866  int temp_poly_id;
867  for(int check_x=i+m_sub_w/4; check_x<i+m_sub_w; check_x+=m_sub_w/2){
868  for(int check_y=j+m_sub_h/4; check_y<j+m_sub_h; check_y+=m_sub_h/2){
869  temp_poly_id = m_TheLandscape->SupplyPolyRef(check_x, check_y);
870  if (std::find(poly_id_vec.begin(), poly_id_vec.end(), temp_poly_id) == poly_id_vec.end())
871  poly_id_vec.push_back(temp_poly_id);
872  //cout<<check_x<<";"<<check_y<<";"<<endl;
873  }
874  }
875  //cout<<poly_id_vec[0]<<";"<<poly_id_vec[1]<<";"<<poly_id_vec[2]<<";"<<poly_id_vec[3]<<";"<<endl;
876  different_count[poly_id_vec.size()-1] += 1;
877  poly_id_vec.clear();
878  */
879  sp->x = i+m_sub_w/2.0; //use the center of the cell as the location
880  sp->y = j+m_sub_h/2.0;
881  sp->w = m_sub_w;
882  sp->h = m_sub_h;
883  sp->NPM = this;
884  sp->empty_flag = true;
885  sp->index_x = index_cell_i;
886  sp->index_y = index_cell_j;
887  TTypesOfLandscapeElement current_landtype = m_TheLandscape->SupplyElementType(sp->x, sp->y);
888  sp->starting_popu_density = &(m_cell_popu_density(index_cell_j, index_cell_i));
889  sp->starting_suitability = &(m_cell_suitability(index_cell_j, index_cell_i));
892  //set the farm flag
893  if(current_landtype == tole_Field){
894  sp->farm_flag = true;
895  sp->empty_flag = false;
896  sp->random_biomass_weight=1.0;
897  }
898  else {
899  sp->farm_flag = false;
901  }
902 
903  //double current_biomass = m_TheLandscape->SupplyGreenBiomassTotal(sp->x, sp->y);
904  double current_biomass = m_TheLandscape->SupplyInterestedGreenBiomassTotal(sp->x, sp->y);
905  //check whether there are multi-seaon host, if yes, use winter host to initialise, othervise using the summer host list.
906 
907  bool suitable_flag = false;
908  if(m_mul_hosts_flag){
909  suitable_flag = isWinterHostTole(current_landtype);
910  if (suitable_flag){
911  sp->winter_landscape_host = current_landtype;
912  }
913 
914  if(isSummerHostTole(current_landtype)){
915  sp->summer_landscape_host = current_landtype;
916  }
917 
918 /* //if it is farm, check the vegetation
919  if(!suitable_flag){
920  suitable_flag = isWinterHostTov(m_TheLandscape->SupplyVegType(sp->x, sp->y));
921  }
922  */
923  }
924  else{
925  suitable_flag = isSummerHostTole(current_landtype);
926  if(suitable_flag){
927  sp->summer_landscape_host = current_landtype;
928  sp->empty_flag = false;
929  }
930  if (sp->farm_flag) suitable_flag = false;
931  /*
932  *if it is farm, check the vegetation
933  if(suitable_flag && sp->farm_flag){
934  suitable_flag = false;
935  if(isSummerHostTov(m_TheLandscape->SupplyVegType(sp->x, sp->y))){
936  if (m_TheLandscape->SupplyGreenBiomass(sp->x, sp->y) > 0) {
937  suitable_flag = true;
938  }
939  }
940  } */
941  }
942 
943  if(suitable_flag){
944  //sp->starting_suitability = 1;
945  m_the_subpopulation_array[index_cell_j][index_cell_i] = CreateObjects(NULL, sp, cfg_AphidEggStartingNumVec.value()[m_running_species_number]);
947  m_cell_suitability(index_cell_j, index_cell_i) = 1;
948  }
949  //else if(!sp->empty_flag){
950  // m_the_subpopulation_array[index_cell_j][index_cell_i] = CreateObjects(NULL, sp, 0);
951  // m_cell_suitability(index_cell_j, index_cell_i) = 0;
952  //}
953  else{
954  //m_the_subpopulation_array[index_cell_j][index_cell_i] = NULL;
955  m_the_subpopulation_array[index_cell_j][index_cell_i] = CreateObjects(NULL, sp, 0);
956  m_cell_suitability(index_cell_j, index_cell_i) = 0;
957  }
958 
959  //add the pointer to its belonging polygon
960  int temp_poly_id = m_TheLandscape->SupplyPolyRefIndex(sp->x, sp->y);
961  m_vec_subpopulation_pointers_polygon[temp_poly_id].push_back(m_the_subpopulation_array[index_cell_j][index_cell_i]);
962  index_cell_j++;
963  }
964  index_cell_i++;
965  }
966  /*
967  double temp_sum = different_count[0]+different_count[1]+different_count[2]+different_count[3];
968  cout<<"Different: "<<different_count[0]/temp_sum<<";"<<different_count[1]/temp_sum<<";"<<different_count[2]/temp_sum<<";"<<different_count[3]/temp_sum<<";"<<temp_sum<<endl;
969  exit(0);
970  */
972  delete sp;
973 }

References cfg_AphidEggStartingNumVec, CreateObjects(), struct_Aphid::empty_flag, struct_Aphid::farm_flag, g_rand_uni_fnc(), struct_Aphid::h, struct_Aphid::index_x, struct_Aphid::index_y, SubPopulation_Population_Manager::isSummerHostTole(), SubPopulation_Population_Manager::isWinterHostTole(), struct_Aphid::L, SubPopulation_Population_Manager::m_accumu_degree_days, m_aphid_egg_starting_degree_days, SubPopulation_Population_Manager::m_cell_popu_density, SubPopulation_Population_Manager::m_cell_suitability, m_current_developtype, SubPopulation_Population_Manager::m_mul_hosts_flag, SubPopulation_Population_Manager::m_sub_h, SubPopulation_Population_Manager::m_sub_w, SubPopulation_Population_Manager::m_the_subpopulation_array, Population_Manager_Base::m_TheLandscape, SubPopulation_Population_Manager::m_vec_subpopulation_pointers_polygon, struct_Aphid::NPM, struct_Aphid::random_biomass_weight, Population_Manager_Base::SimH, Population_Manager_Base::SimW, struct_Aphid::starting_popu_density, struct_Aphid::starting_suitability, struct_Aphid::summer_landscape_host, Landscape::SupplyElementType(), Landscape::SupplyInterestedGreenBiomassTotal(), Landscape::SupplyPolyRefIndex(), toAphidHibernate, tole_Field, tole_Foobar, CfgArray_Int::value(), struct_Aphid::w, struct_Aphid::winter_landscape_host, struct_Aphid::x, and struct_Aphid::y.

Referenced by initialisePopulation().

◆ isEnoughNextLifeStage()

bool Aphid_Population_Manager::isEnoughNextLifeStage ( int  a_life_stage)
virtual

\breif The functions to test whether it is ready for the next life stages for aphid.

Reimplemented from SubPopulation_Population_Manager.

1178  {
1179  return (this->*m_is_ready_next_liff_func_pointer)(a_life_stage);
1180 }

References m_is_ready_next_liff_func_pointer.

◆ isEnoughNextLifeStageShared()

bool Aphid_Population_Manager::isEnoughNextLifeStageShared ( int  a_life_stage)
1182  {
1183  //Eggs only start to accumulate degree days after the first day of the simulation, always return false
1184  //The hatch channces are calculated in the update function
1185  if(a_life_stage == toa_Egg){
1186  return false;
1187  }
1188 
1189  if (a_life_stage == toa_Nymph || a_life_stage == toa_Nymph_F || a_life_stage == toa_Nymph_M) {
1191  return true;
1192  }
1193  else return false;
1194  }
1195  /*if (a_life_stage == toa_Nymph || a_life_stage == toa_Nymph_F || a_life_stage == toa_Nymph_M) {
1196  double threshold = m_aphid_nymph_without_wings_development_day_degrees + (g_rand_uni_fnc() - 0.5) * m_aphid_nymph_without_wings_development_day_degrees_sd;
1197  if(farm_flag) {
1198  threshold *= 0.9; //reduce development time by 10% for crops
1199  }
1200  if (m_accumu_degree_days(a_life_stage, m_index_new_old(a_life_stage, 1)) >= m_aphid_nymph_without_wings_development_day_degrees + (g_rand_uni_fnc() - 0.5) * m_aphid_nymph_without_wings_development_day_degrees_sd) {
1201  return true;
1202  }
1203  else return false;
1204  }*/
1205 
1206  if(a_life_stage == toa_Nymph_W ){
1208  return true;
1209  }
1210  else return false;
1211  }
1212 
1213  //the adults are contolled by the mortality
1214  return (m_accumu_degree_days(a_life_stage, m_index_new_old(a_life_stage,1))>=m_max_adult_dd);
1215 }

References g_rand_uni_fnc(), SubPopulation_Population_Manager::m_accumu_degree_days, m_aphid_nymph_with_wings_development_day_degrees, m_aphid_nymph_with_wings_development_day_degrees_sd, m_aphid_nymph_without_wings_development_day_degrees, m_aphid_nymph_without_wings_development_day_degrees_sd, SubPopulation_Population_Manager::m_index_new_old, m_max_adult_dd, toa_Egg, toa_Nymph, toa_Nymph_F, toa_Nymph_M, and toa_Nymph_W.

Referenced by initialisePopulation().

◆ KillAphid()

void Aphid_Population_Manager::KillAphid ( int  a_x,
int  a_y,
double  a_num 
)

Function to kill the given number of aphids in the given location.

1239  {
1240  a_y = a_y/m_sub_h;
1241  a_x = a_x/m_sub_w;
1242  //a_num *= 1;
1243  return m_the_subpopulation_array[a_y][a_x]->killByPredator(a_num);
1244 }

References SubPopulation_Population_Manager::m_sub_h, SubPopulation_Population_Manager::m_sub_w, and SubPopulation_Population_Manager::m_the_subpopulation_array.

◆ SupplyAphidDensity()

double Aphid_Population_Manager::SupplyAphidDensity ( int  a_x,
int  a_y 
)

Function to supply the aphid density in the given location.

1232  {
1233  a_y = a_y/m_sub_h;
1234  a_x = a_x/m_sub_w;
1235  if(m_the_subpopulation_array[a_y][a_x]==NULL) return 0;
1236  return m_the_subpopulation_array[a_y][a_x]->getRawPopuDensity();
1237 }

References SubPopulation_Population_Manager::m_sub_h, SubPopulation_Population_Manager::m_sub_w, and SubPopulation_Population_Manager::m_the_subpopulation_array.

◆ supplyDevelopmentSeason()

virtual unsigned Aphid_Population_Manager::supplyDevelopmentSeason ( )
inlinevirtual

The function to supply the development season.

Reimplemented from SubPopulation_Population_Manager.

235 {return m_current_developtype;}

References m_current_developtype.

◆ supplyNymphNumWeight()

double Aphid_Population_Manager::supplyNymphNumWeight ( void  )
inline

The function to return the daily nymph number weight.

References m_nymph_produced_num_weight.

◆ updateDevelopmentSeason()

void Aphid_Population_Manager::updateDevelopmentSeason ( )
virtual

The function to update the development season.

Reimplemented from SubPopulation_Population_Manager.

419  {
420  // Reset the day degree sum for egg production at Jan 1st
422  if(!m_mul_hosts_flag){
423  return;
424  }
425  else{
426  double current_day_length = g_landscape_ptr->SupplyDaylength();
427  if(current_day_length >= m_aphid_summer_host_day_length){
428  m_summer_host_on = true;
429  }
430  else{
431  m_summer_host_on = false;
432  }
433 
434  if(current_day_length <= m_aphid_winter_host_day_length){
435  m_winter_host_on = true;
436  }
437  else{
438  m_winter_host_on = false;
439  }
440  }
441 }

References g_landscape_ptr, m_accu_ddeg_egg_reproduction, m_aphid_summer_host_day_length, m_aphid_winter_host_day_length, SubPopulation_Population_Manager::m_mul_hosts_flag, SubPopulation_Population_Manager::m_summer_host_on, Population_Manager_Base::m_TheLandscape, SubPopulation_Population_Manager::m_winter_host_on, Landscape::SupplyDayInYear(), and Landscape::SupplyDaylength().

◆ updateMortalityArray()

void Aphid_Population_Manager::updateMortalityArray ( void  )
virtual

The fucntion to update the base mortality rate, it will call the corresponding function pointer.

Reimplemented from SubPopulation_Population_Manager.

415  {
417 }

References m_update_mortality_array_pointer.

◆ updateMortalityArrayShared()

void Aphid_Population_Manager::updateMortalityArrayShared ( void  )

The function to calculate the base mortality rate for all aphids.

975  {
976 
977  m_current_mortality_array.setZero();
978  //egg
980 
981  //nymph
982  //get the current temperature
983  /*double total_nymph_temp_mort = 0;
984  for (int time_counter=0; time_counter<24; time_counter ++) {
985  double current_temp_hour = g_landscape_ptr->SupplyTempHour(time_counter);
986  double nymph_temp_mort = m_aphid_nymph_mortality_para_a * current_temp_hour * current_temp_hour + m_aphid_nymph_mortality_para_b * current_temp_hour + m_aphid_nymph_mortality_para_c;
987  if (nymph_temp_mort < 0) nymph_temp_mort = 0;
988  if (nymph_temp_mort > 1) nymph_temp_mort = 1;
989  total_nymph_temp_mort += nymph_temp_mort;
990  }
991  double daily_average_mort = total_nymph_temp_mort / 24;
992  m_current_mortality_array.middleRows(toa_Nymph, toa_Nymph_M - toa_Nymph + 1).fill(daily_average_mort);
993  //m_current_mortality_array.middleRows(toa_Nymph, toa_Nymph_M - toa_Nymph + 1).fill(m_aphid_nymph_mortality_para_a * current_temp_hour * current_temp_hour + m_aphid_nymph_mortality_para_b * current_temp_hour + m_aphid_nymph_mortality_para_c);
994 
995  //adults
996  double total_adult_temp_mort = 0;
997  for (int time_counter = 0; time_counter < 24; time_counter++) {
998  double current_temp_hour = g_landscape_ptr->SupplyTempHour(time_counter);
999  double adult_temp_mort = m_aphid_adult_mortality_para_a * current_temp_hour * current_temp_hour + m_aphid_adult_mortality_para_b * current_temp_hour + m_aphid_adult_mortality_para_c;
1000  if (adult_temp_mort < 0) adult_temp_mort = 0;
1001  if (adult_temp_mort > 1) adult_temp_mort = 1;
1002  total_adult_temp_mort += adult_temp_mort;
1003  }
1004  double daily_average_mort_adult = total_adult_temp_mort / 24;
1005  m_current_mortality_array.middleRows(toa_Aptera, toa_Male - toa_Aptera + 1).array() += daily_average_mort_adult;
1006  */
1007  //Set temperature mortalities for adults
1008  double current_temperature = g_landscape_ptr->SupplyTemp();
1009  if (current_temperature < -9 || current_temperature > 34.5){
1010  m_current_mortality_array.middleRows(toa_Aptera, toa_Male-toa_Aptera+1).fill(0.99);
1011  }
1012  else{
1013  /*
1014  m_current_mortality_array.middleRows(toa_Aptera, toa_Male - toa_Aptera + 1).array() = 1.0 - (m_accumu_degree_days.middleRows(toa_Aptera, toa_Male - toa_Aptera + 1).array() * cfg_AphidLongevityParaA.value() + cfg_AphidLongevityParaB.value());
1015  //we need to rethink about this
1016  int current_month = m_TheLandscape->SupplyMonth();
1017  if(current_month >= 10 || current_month <= 2){
1018  m_current_mortality_array.middleRows(toa_Aptera, toa_Male-toa_Male+1) *= 2;
1019  }
1020  */
1021  //set 0
1023 
1024  //set mortality based on the parameters
1025  for(int i=0; i<m_aphid_adult_mortality_inflection_point_dd.size(); i++){
1027  }
1028  }
1029  //Set temperature mortalities for adults. Add them to the mortality array
1030  if (current_temperature <= 4 || current_temperature >= 25) {
1031  m_current_mortality_array.middleRows(toa_Aptera, toa_Male - toa_Aptera + 1).array() += (m_aphid_adult_mortality_para_a * current_temperature * current_temperature + m_aphid_adult_mortality_para_b * current_temperature + m_aphid_adult_mortality_para_c);
1032  m_current_mortality_array.middleRows(toa_Nymph, toa_Nymph_M - toa_Nymph + 1).array() += (m_aphid_nymph_mortality_para_a * current_temperature * current_temperature + m_aphid_nymph_mortality_para_b * current_temperature + m_aphid_nymph_mortality_para_c);
1033  }
1034  // Below we remove any <0 zero elements and replace with zero
1036 
1037  //cout<<"MORTALITY: "<<m_current_mortality_array<<endl;
1038 
1039  // Update the nymph production weight, it is updated in this function since it is kind of mortality rate
1041  double nymph_produced_weight_hourly_total = 0;
1042  for (int time_counter = 0; time_counter < 24; time_counter++) {
1043  double current_temp_hour = g_landscape_ptr->SupplyTempHour(time_counter);
1044  double nymph_produced_weight_hourly = m_aphid_nymph_production_temp_weight_para_a * (current_temp_hour +2) * (current_temp_hour +2) + m_aphid_nymph_production_temp_weight_para_b * (current_temp_hour +2) + m_aphid_nymph_production_temp_weight_para_c;
1045  if (nymph_produced_weight_hourly < 0) nymph_produced_weight_hourly = 0;
1046  if (nymph_produced_weight_hourly > 1) nymph_produced_weight_hourly = 1;
1047  nymph_produced_weight_hourly_total += nymph_produced_weight_hourly;
1048  }
1049  m_nymph_produced_num_weight = nymph_produced_weight_hourly_total / 24;
1050  //m_nymph_produced_num_weight = m_aphid_nymph_production_temp_weight_para_a* (current_temperature + 4) * (current_temperature + 4) + m_aphid_nymph_production_temp_weight_para_b * (current_temperature + 4) + m_aphid_nymph_production_temp_weight_para_c;
1051 
1052  //cout<<current_temperature << " "<<m_nymph_produced_num_weight<<endl;
1055 
1056  //update the egg reproduction flag
1058  if(current_temperature>0){
1059  m_accu_ddeg_egg_reproduction += current_temperature;
1060  }
1062  m_egg_reproduction_flag = true;
1063  m_first_egg_hatch_flag = false;
1065  }
1066  }
1067 }

References g_landscape_ptr, g_rand_uni_fnc(), m_accu_ddeg_egg_reproduction, SubPopulation_Population_Manager::m_accumu_degree_days, m_aphid_adult_mortality_inflection_point_dd, m_aphid_adult_mortality_para_a, m_aphid_adult_mortality_para_b, m_aphid_adult_mortality_para_c, m_aphid_adult_mortality_vec, m_aphid_egg_mortality, m_aphid_egg_mortality_sd, m_aphid_nymph_mortality_para_a, m_aphid_nymph_mortality_para_b, m_aphid_nymph_mortality_para_c, m_aphid_nymph_production_temp_weight_para_a, m_aphid_nymph_production_temp_weight_para_b, m_aphid_nymph_production_temp_weight_para_c, m_aphid_sexual_reproduction_add_sd, m_aphid_sexual_reproduction_average_add, SubPopulation_Population_Manager::m_current_mortality_array, m_egg_reproduction_flag, m_first_egg_hatch_flag, m_nymph_produced_num_weight, Landscape::SupplyTemp(), Landscape::SupplyTempHour(), toa_Aptera, toa_Egg, toa_Male, toa_Nymph, and toa_Nymph_M.

Referenced by initialisePopulation().

◆ writeCalibrationFiles()

void Aphid_Population_Manager::writeCalibrationFiles ( void  )
virtual

Write probe files for calibration.

Reimplemented from SubPopulation_Population_Manager.

1337  {
1338  #ifdef __APHID_CALIBRATION
1339  writeAphidCalibData();
1340  #endif
1341 }

Member Data Documentation

◆ m_accu_ddeg_egg_reproduction

double Aphid_Population_Manager::m_accu_ddeg_egg_reproduction
private

The accumulated day degrees to enable sexual development.

Referenced by Aphid_Population_Manager(), updateDevelopmentSeason(), and updateMortalityArrayShared().

◆ m_aphid_adult_longevity_para_a

double Aphid_Population_Manager::m_aphid_adult_longevity_para_a
private

The variable to store the adult longevity parameter A.

Referenced by initialisePopulation().

◆ m_aphid_adult_longevity_para_b

double Aphid_Population_Manager::m_aphid_adult_longevity_para_b
private

The variable to store the adult longevity parameter B.

Referenced by initialisePopulation().

◆ m_aphid_adult_mortality_inflection_point_dd

vector<double> Aphid_Population_Manager::m_aphid_adult_mortality_inflection_point_dd
private

The vector to store inflection point of accumulated day degrees for adult mortality.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_adult_mortality_para_a

double Aphid_Population_Manager::m_aphid_adult_mortality_para_a
private

The variable to store the adult mortality parameter A.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_adult_mortality_para_b

double Aphid_Population_Manager::m_aphid_adult_mortality_para_b
private

The variable to store the adult mortality parameter B.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_adult_mortality_para_c

double Aphid_Population_Manager::m_aphid_adult_mortality_para_c
private

The variable to store the adult mortality parameter C.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_adult_mortality_vec

vector<double> Aphid_Population_Manager::m_aphid_adult_mortality_vec
private

The vector to store the adult mortality for the inflection point.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_alate_proportion_para_a

double Aphid_Population_Manager::m_aphid_alate_proportion_para_a
private

The variable to store alate proportion calculation parameter A.

Referenced by calOffspringStageBBandPP(), calOffspringStageEGandPEA(), and initialisePopulation().

◆ m_aphid_alate_proportion_para_b

double Aphid_Population_Manager::m_aphid_alate_proportion_para_b
private

The variable to store alate proportion calculation parameter B.

Referenced by calOffspringStageBBandPP(), calOffspringStageEGandPEA(), and initialisePopulation().

◆ m_aphid_alate_proportion_para_c

double Aphid_Population_Manager::m_aphid_alate_proportion_para_c
private

The variable to store alate proportion calculation parameter C.

Referenced by calOffspringStageBBandPP(), calOffspringStageEGandPEA(), and initialisePopulation().

◆ m_aphid_egg_hatch_chance_max_degree_days

double Aphid_Population_Manager::m_aphid_egg_hatch_chance_max_degree_days
private

The variable to store the largest degree days for egg hatch chance being one.

Referenced by calHatchChance().

◆ m_aphid_egg_hatch_chance_para_a

double Aphid_Population_Manager::m_aphid_egg_hatch_chance_para_a
private

The variable to store the egg hatch chance parameter A.

Referenced by Aphid_Population_Manager(), calHatchChance(), and initialisePopulation().

◆ m_aphid_egg_hatch_chance_para_a_after_threshold

double Aphid_Population_Manager::m_aphid_egg_hatch_chance_para_a_after_threshold
private

The variable to store the egg hatch chance parameter A after threshold.

Referenced by Aphid_Population_Manager(), and calHatchChance().

◆ m_aphid_egg_hatch_chance_para_b

double Aphid_Population_Manager::m_aphid_egg_hatch_chance_para_b
private

The variable to store the egg hatch chance parameter B.

Referenced by Aphid_Population_Manager(), calHatchChance(), and initialisePopulation().

◆ m_aphid_egg_hatch_chance_para_b_after_threshold

double Aphid_Population_Manager::m_aphid_egg_hatch_chance_para_b_after_threshold
private

The variable to store the egg hatch chance parameter B after threshold.

Referenced by Aphid_Population_Manager(), and calHatchChance().

◆ m_aphid_egg_hatch_chance_threshold

double Aphid_Population_Manager::m_aphid_egg_hatch_chance_threshold
private

The threshold of hatch value to start the delay of egg hatch, this is to avoid the eggs hatching from the same day.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_egg_hatch_chance_turing_degree_days

double Aphid_Population_Manager::m_aphid_egg_hatch_chance_turing_degree_days
private

The variable to store the turning degree day for egg hatch chance.

Referenced by Aphid_Population_Manager(), and calHatchChance().

◆ m_aphid_egg_hatch_delay_degree_days

double Aphid_Population_Manager::m_aphid_egg_hatch_delay_degree_days
private

The number of degree days to delay the egg's hatch.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_egg_mortality

double Aphid_Population_Manager::m_aphid_egg_mortality
private

The variable to store the aphid egg mortality.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_egg_mortality_sd

double Aphid_Population_Manager::m_aphid_egg_mortality_sd
private

The variable to store the standard deviation of the gee mortality.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_egg_production_para_a

double Aphid_Population_Manager::m_aphid_egg_production_para_a
private

The variable to store the egg production parameter A.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_egg_production_para_b

double Aphid_Population_Manager::m_aphid_egg_production_para_b
private

The variable to store the egg production parameter B.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_egg_production_para_c

double Aphid_Population_Manager::m_aphid_egg_production_para_c
private

The variable to store the egg production parameter C.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_egg_production_para_sd

double Aphid_Population_Manager::m_aphid_egg_production_para_sd
private

The variable to store the egg production parameter's standard deviation.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_egg_starting_degree_days

double Aphid_Population_Manager::m_aphid_egg_starting_degree_days
private

The variable to store the egg's starting degree days when the simulation starts.

Referenced by initialisePopulation(), and initialiseSimWithEggs().

◆ m_aphid_female_reproduction_day_length

double Aphid_Population_Manager::m_aphid_female_reproduction_day_length
private

The day length in minutes for female reproduction. This is used for EG and PEA.

Referenced by calOffspringStageEGandPEA(), and initialisePopulation().

◆ m_aphid_male_reproduction_day_length

double Aphid_Population_Manager::m_aphid_male_reproduction_day_length
private

The day length in minutes for male reproduction. This is used for EG and PEA.

Referenced by initialisePopulation().

◆ m_aphid_nymph_mortality_para_a

double Aphid_Population_Manager::m_aphid_nymph_mortality_para_a
private

The variable to store the nymph temperature based mortality parameter A.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_nymph_mortality_para_b

double Aphid_Population_Manager::m_aphid_nymph_mortality_para_b
private

The variable to store the nymph temperature based mortality parameter B.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_nymph_mortality_para_c

double Aphid_Population_Manager::m_aphid_nymph_mortality_para_c
private

The variable to store the nymph temperature based mortality parameter C.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_nymph_production_changing_add

double Aphid_Population_Manager::m_aphid_nymph_production_changing_add
private

The variable to store the nymph production changing accumulated degree days.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_nymph_production_para_a1

double Aphid_Population_Manager::m_aphid_nymph_production_para_a1
private

The variable to store the nymph production parameter A1.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_nymph_production_para_a2

double Aphid_Population_Manager::m_aphid_nymph_production_para_a2
private

The variable to store the nymph production parameter A2.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_nymph_production_para_b1

double Aphid_Population_Manager::m_aphid_nymph_production_para_b1
private

The variable to store the nymph production parameter B1.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_nymph_production_para_b2

double Aphid_Population_Manager::m_aphid_nymph_production_para_b2
private

The variable to store the nymph production parameter B2.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_nymph_production_temp_weight_para_a

double Aphid_Population_Manager::m_aphid_nymph_production_temp_weight_para_a
private

The variable to store the temperature weighted nymph production parameter A.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_nymph_production_temp_weight_para_b

double Aphid_Population_Manager::m_aphid_nymph_production_temp_weight_para_b
private

The variable to store the temperature weighted nymph production parameter B.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_nymph_production_temp_weight_para_c

double Aphid_Population_Manager::m_aphid_nymph_production_temp_weight_para_c
private

The variable to store the temperature weighted nymph production parameter C.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_nymph_with_wings_development_day_degrees

double Aphid_Population_Manager::m_aphid_nymph_with_wings_development_day_degrees
private

The variable to store the nymph with wings development day degrees.

Referenced by initialisePopulation(), and isEnoughNextLifeStageShared().

◆ m_aphid_nymph_with_wings_development_day_degrees_sd

double Aphid_Population_Manager::m_aphid_nymph_with_wings_development_day_degrees_sd
private

The variable to store the nymph with wings development day degrees's standard deviation.

Referenced by initialisePopulation(), and isEnoughNextLifeStageShared().

◆ m_aphid_nymph_without_wings_development_day_degrees

double Aphid_Population_Manager::m_aphid_nymph_without_wings_development_day_degrees
private

The variable to store the nymph without wings development day degrees.

Referenced by initialisePopulation(), and isEnoughNextLifeStageShared().

◆ m_aphid_nymph_without_wings_development_day_degrees_sd

double Aphid_Population_Manager::m_aphid_nymph_without_wings_development_day_degrees_sd
private

The variable to store the nymph without wings development day degrees's standard deviation.

Referenced by initialisePopulation(), and isEnoughNextLifeStageShared().

◆ m_aphid_sexual_reproduction_add_sd

double Aphid_Population_Manager::m_aphid_sexual_reproduction_add_sd
private

The standard deviation of the required accumulated degree days to enable sexual reproduction after the first egg hatches.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_sexual_reproduction_average_add

double Aphid_Population_Manager::m_aphid_sexual_reproduction_average_add
private

The average required accumulated degree days to enable sexual reproduction after the first egg hatches.

Referenced by initialisePopulation(), and updateMortalityArrayShared().

◆ m_aphid_specie_name

string Aphid_Population_Manager::m_aphid_specie_name
private

This is to store the aphid species name.

Referenced by Aphid_Population_Manager(), and initialisePopulation().

◆ m_aphid_summer_host_day_length

double Aphid_Population_Manager::m_aphid_summer_host_day_length
private

The day length in minutes to turn on summer host. This is used for BB and PP.

Referenced by initialisePopulation(), and updateDevelopmentSeason().

◆ m_aphid_winter_host_day_length

double Aphid_Population_Manager::m_aphid_winter_host_day_length
private

THe day length in minutes to turn on winter host. This is used for BB and PP.

Referenced by initialisePopulation(), and updateDevelopmentSeason().

◆ m_current_developtype

TTypesOfAphidDevelopmentSeason Aphid_Population_Manager::m_current_developtype
private

The variable to show the development season.

Referenced by initialiseSimWithEggs(), and supplyDevelopmentSeason().

◆ m_egg_per_day

vector<double> Aphid_Population_Manager::m_egg_per_day
private

The vector to store the age (in degree days) related reproduction offspring egg.

Referenced by Aphid_Population_Manager(), calOffspringStageBBandPP(), and calOffspringStageEGandPEA().

◆ m_egg_reproduction_flag

bool Aphid_Population_Manager::m_egg_reproduction_flag
private

◆ m_first_egg_hatch_flag

bool Aphid_Population_Manager::m_first_egg_hatch_flag
private

The flag to show the first hatch of egg.

Referenced by Aphid_Population_Manager(), calNextStageShared(), and updateMortalityArrayShared().

◆ m_is_ready_next_liff_func_pointer

bool(Aphid_Population_Manager::* Aphid_Population_Manager::m_is_ready_next_liff_func_pointer) (int a_life_stage)
private

THe function pointer for testing whether the given life stage is ready for the next one.

Referenced by initialisePopulation(), and isEnoughNextLifeStage().

◆ m_max_adult_dd

int Aphid_Population_Manager::m_max_adult_dd
private

THe variable to store the maximum number of degree days for aphid.

Referenced by Aphid_Population_Manager(), initialisePopulation(), and isEnoughNextLifeStageShared().

◆ m_max_day_degree_adult

double Aphid_Population_Manager::m_max_day_degree_adult
private

The longest day degrees that a adult can have.

Referenced by doSpeciesLastThing(), and initialisePopulation().

◆ m_next_life_func_pointer

int(Aphid_Population_Manager::* Aphid_Population_Manager::m_next_life_func_pointer) (int current_stage)
private

The function pointer for calculation of next life stage.

Referenced by calNextStage(), and initialisePopulation().

◆ m_nymph_per_day

vector<double> Aphid_Population_Manager::m_nymph_per_day
private

The vector to store the age (in degree days) related reproduction offsping nymph.

Referenced by Aphid_Population_Manager(), calOffspringStageBBandPP(), and calOffspringStageEGandPEA().

◆ m_nymph_produced_num_weight

double Aphid_Population_Manager::m_nymph_produced_num_weight
private

The weight to regulate the number of nymph produced per day based on temperature.

Referenced by calOffspringStageBBandPP(), calOffspringStageEGandPEA(), supplyNymphNumWeight(), and updateMortalityArrayShared().

◆ m_offspring_func_pointer

int(Aphid_Population_Manager::* Aphid_Population_Manager::m_offspring_func_pointer) (int current_stage, double *offspring_num, double a_age, double a_density, double a_growth_stage, double *a_propotion, bool winter_host_flag)
private

The function pointer for calculation of the offsrping stage number.

Referenced by calOffspringStage(), and initialisePopulation().

◆ m_update_mortality_array_pointer

void(Aphid_Population_Manager::* Aphid_Population_Manager::m_update_mortality_array_pointer) ()
private

The function pointer for calculation of the shared base mortality rate for the whole landscape.

Referenced by initialisePopulation(), and updateMortalityArray().


The documentation for this class was generated from the following files:
cfg_PPAphidNymphDevDayDegWing
CfgFloat cfg_PPAphidNymphDevDayDegWing("PP_APHID_NYMPH_DEV_DAY_DEG_WING", CFG_CUSTOM, 148.59)
Aphid_Population_Manager::m_aphid_nymph_production_temp_weight_para_b
double m_aphid_nymph_production_temp_weight_para_b
The variable to store the temperature weighted nymph production parameter B.
Definition: Aphid_Population_Manager.h:169
Aphid_Population_Manager::m_aphid_adult_mortality_para_b
double m_aphid_adult_mortality_para_b
The variable to store the adult mortality parameter B.
Definition: Aphid_Population_Manager.h:115
cfg_PPAphidEggHatchDelayDD
CfgFloat cfg_PPAphidEggHatchDelayDD("PP_APHID_EGG_HATCH_DELAY_DD", CFG_CUSTOM, 10)
cfg_PEAAphidNymphReproductionTempWeightParaB
CfgFloat cfg_PEAAphidNymphReproductionTempWeightParaB("PEA_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_B", CFG_CUSTOM, 0.264)
cfg_EGAphidNymphReproductionParaB2
CfgFloat cfg_EGAphidNymphReproductionParaB2("EG_APHID_NYMPH_REPRODUCTION_PARA_B2", CFG_CUSTOM, 4.6872)
Aphid_Population_Manager::m_aphid_adult_longevity_para_b
double m_aphid_adult_longevity_para_b
The variable to store the adult longevity parameter B.
Definition: Aphid_Population_Manager.h:121
cfg_PPAphidAdultMortalityParaB
CfgFloat cfg_PPAphidAdultMortalityParaB("PP_APHID_ADULT_MORTALITY_PARA_B", CFG_CUSTOM, -0.0115)
g_landscape_ptr
Landscape * g_landscape_ptr
Definition: Landscape.cpp:352
Aphid_Population_Manager::m_aphid_egg_hatch_chance_para_b_after_threshold
double m_aphid_egg_hatch_chance_para_b_after_threshold
The variable to store the egg hatch chance parameter B after threshold.
Definition: Aphid_Population_Manager.h:135
cfg_PPAphidAdultMortalityParaA
CfgFloat cfg_PPAphidAdultMortalityParaA("PP_APHID_ADULT_MORTALITY_PARA_A", CFG_CUSTOM, 0.0004)
toa_Alate
Definition: Aphid.h:53
cfg_BBAphidSummerHostDayLength
CfgFloat cfg_BBAphidSummerHostDayLength("BB_APHID_SUMMER_HOST_DAY_LENGTH", CFG_CUSTOM, 600)
The day length to control the winter and summer hosts, this used for black bean and peach potato aphi...
SubPopulation_Population_Manager::m_the_subpopulation_array
blitz::Array< SubPopulation *, 2 > m_the_subpopulation_array
Vector to store the all the pointers for the subpopulation object.
Definition: SubPopulation_Population_Manager.h:115
cfg_PPAphidLongevityParaA
CfgFloat cfg_PPAphidLongevityParaA("PP_APHID_ADULT_LONGEVITY_PARA_A", CFG_CUSTOM, -0.0047)
g_rand_uni_fnc
double g_rand_uni_fnc()
Definition: ALMaSS_Random.cpp:56
toas_EG
Definition: Aphid.h:64
struct_Aphid::h
int h
area height
Definition: Aphid_Population_Manager.h:64
Aphid_Population_Manager::updateMortalityArrayShared
void updateMortalityArrayShared(void)
The function to calculate the base mortality rate for all aphids.
Definition: Aphid_Population_Manager.cpp:975
Aphid_Population_Manager::m_aphid_nymph_production_para_a2
double m_aphid_nymph_production_para_a2
The variable to store the nymph production parameter A2.
Definition: Aphid_Population_Manager.h:161
cfg_BBAphidNymphMortalityParaA
CfgFloat cfg_BBAphidNymphMortalityParaA("BB_APHID_NYMPH_MORTALITY_PARA_A", CFG_CUSTOM, 0.0025)
SubPopulation_Population_Manager::m_max_alive_days
int m_max_alive_days
The longest alive day among all the life stages.
Definition: SubPopulation_Population_Manager.h:156
cfg_EGAphidNymphMortalityParaC
CfgFloat cfg_EGAphidNymphMortalityParaC("EG_APHID_NYMPH_MORTALITY_PARA_C", CFG_CUSTOM, 0.0906)
cfg_EGAphidAdultMortalityParaA
CfgFloat cfg_EGAphidAdultMortalityParaA("EG_APHID_ADULT_MORTALITY_PARA_A", CFG_CUSTOM, 0.0004)
The temperature related morality rate for Aphid adults.
Aphid_Population_Manager::m_aphid_egg_hatch_chance_turing_degree_days
double m_aphid_egg_hatch_chance_turing_degree_days
The variable to store the turning degree day for egg hatch chance.
Definition: Aphid_Population_Manager.h:137
cfg_EGAphidEggHatchChanceParaA
CfgFloat cfg_EGAphidEggHatchChanceParaA("EG_APHID_EGG_HATCH_CHANCE_PARA_A", CFG_CUSTOM, 0.0029)
The parameters to calculate the hatch chance of eggs.
Landscape::SupplyTemp
double SupplyTemp(void)
Passes a request on to the associated Weather class function, the temperature for the current day.
Definition: Landscape.h:1993
cfg_PPAphidAdultMortalityDdeg
CfgArray_Double cfg_PPAphidAdultMortalityDdeg("PP_APHID_ADULT_MORTALITY_DDEG", CFG_CUSTOM, 13, vector< double >{375, 400, 425, 450, 475, 500, 525, 550, 575, 600, 625, 650, 675})
cfg_EGAphidAlatePropParaB
CfgFloat cfg_EGAphidAlatePropParaB("EG_APHID_ALATE_PROP_PARA_B", CFG_CUSTOM, 10)
cfg_PEAAphidNymphMortalityParaA
CfgFloat cfg_PEAAphidNymphMortalityParaA("PEA_APHID_NYMPH_MORTALITY_PARA_A", CFG_CUSTOM, 0.0004)
cfg_PPAphidNymphReproductionTempWeightParaA
CfgFloat cfg_PPAphidNymphReproductionTempWeightParaA("PP_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_A", CFG_CUSTOM, -0.006)
cfg_EGAphidNymphReproductionTempWeightParaA
CfgFloat cfg_EGAphidNymphReproductionTempWeightParaA("EG_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_A", CFG_CUSTOM, -0.006)
cfg_EGAphidAdultMortality
CfgArray_Double cfg_EGAphidAdultMortality("EG_APHID_ADULT_MORTALITY", CFG_CUSTOM, 9, vector< double >{0.017, 0.071211, 0.07667, 0.083037, 0.090556, 0.099573, 0.110585, 0.124334, 1})
cfg_PPAphidSexualDevelopmentRequiredDdegStd
CfgFloat cfg_PPAphidSexualDevelopmentRequiredDdegStd("PP_APHID_SEXUAL_DEVELOPMENT_REQUIRED_DDEG_STD", CFG_CUSTOM, 73)
cfg_BBAphidAdultMortalityDdeg
CfgArray_Double cfg_BBAphidAdultMortalityDdeg("BB_APHID_ADULT_MORTALITY_DDEG", CFG_CUSTOM, 13, vector< double >{375, 400, 425, 450, 475, 500, 525, 550, 575, 600, 625, 650, 675})
cfg_PEAphidSexualDevelopmentRequiredDdeg
CfgFloat cfg_PEAphidSexualDevelopmentRequiredDdeg("PEA_APHID_SEXUAL_DEVELOPMENT_REQUIRED_DDEG", CFG_CUSTOM, 1157)
cfg_BBAphidEggReproductionParaB
CfgFloat cfg_BBAphidEggReproductionParaB("BB_APHID_EGG_REPRODUCTION_PARA_B", CFG_CUSTOM, -0.266)
struct_Aphid::x
int x
x-coord
Definition: Aphid_Population_Manager.h:58
cfg_PEAAphidEggMortalityRateStd
CfgFloat cfg_PEAAphidEggMortalityRateStd("PEA_APHID_EGG_MORALITY_RATE_STD", CFG_CUSTOM, 0.00024)
cfg_PPAphidNymphReproductionParaA1
CfgFloat cfg_PPAphidNymphReproductionParaA1("PP_APHID_NYMPH_REPRODUCTION_PARA_A1", CFG_CUSTOM, 0.1158)
cfg_PPAphidNymphReproductionParaB2
CfgFloat cfg_PPAphidNymphReproductionParaB2("PP_APHID_NYMPH_REPRODUCTION_PARA_B2", CFG_CUSTOM, 4, 5)
cfg_PEAAphidDevelopmentTurningTempArray
CfgArray_Double cfg_PEAAphidDevelopmentTurningTempArray("PEA_APHID_DEVELOPMENT_TURNING_TEMP_ARRAY", CFG_CUSTOM, 9, vector< double >{4, 3.5, 3.5, 3.5, 3.5, 10, 10, 10, 10})
Landscape::SupplyElementType
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
Returns the landscape type of the polygon using the polygon reference number a_polyref or coordinates...
Definition: Landscape.h:1732
cfg_PEAAphidHostFile
CfgStr cfg_PEAAphidHostFile("PEA_APHID_HOST_FILE", CFG_CUSTOM, "Subpopulation/pea_aphid_host.txt")
cfg_PPAphidEggMortalityRateStd
CfgFloat cfg_PPAphidEggMortalityRateStd("PP_APHID_EGG_MORALITY_RATE_STD", CFG_CUSTOM, 0.00024)
cfg_PEAAphidEggHatchDelayThreshold
CfgFloat cfg_PEAAphidEggHatchDelayThreshold("PEA_APHID_EGG_HATCH_DELAY_THRESHOLD", CFG_CUSTOM, 0.9)
cfg_BBAphidEggHatchChanceParaB
CfgFloat cfg_BBAphidEggHatchChanceParaB("BB_APHID_EGG_HATCH_CHANCE_PARA_B", CFG_CUSTOM, -0.16)
cfg_BBAphidNymphMortalityParaB
CfgFloat cfg_BBAphidNymphMortalityParaB("BB_APHID_NYMPH_MORTALITY_PARA_B", CFG_CUSTOM, -0.059)
cfg_EGAphidDualLinearModelFlagDD
CfgBool cfg_EGAphidDualLinearModelFlagDD("EG_APHID_DUAL_LINEAR_MODEL_FLAG_DD", CFG_CUSTOM, true)
The flag control whether dual linear models are used for accumulating degree days.
SubPopulation_Population_Manager::m_flying_life_stage_array
std::vector< int > m_flying_life_stage_array
The vector to store the life stages that can fly.
Definition: SubPopulation_Population_Manager.h:194
tole_Foobar
Definition: LandscapeFarmingEnums.h:183
CfgStr::value
char * value() const
Definition: Configurator.h:182
Aphid_Population_Manager::m_aphid_egg_production_para_a
double m_aphid_egg_production_para_a
The variable to store the egg production parameter A.
Definition: Aphid_Population_Manager.h:149
Aphid_Population_Manager::m_aphid_egg_production_para_c
double m_aphid_egg_production_para_c
The variable to store the egg production parameter C.
Definition: Aphid_Population_Manager.h:153
cfg_PPAphidEggReproductionParaA
CfgFloat cfg_PPAphidEggReproductionParaA("PP_APHID_EGG_REPRODUCTION_PARA_A", CFG_CUSTOM, 0.2469)
Aphid_Population_Manager::m_aphid_adult_mortality_para_a
double m_aphid_adult_mortality_para_a
The variable to store the adult mortality parameter A.
Definition: Aphid_Population_Manager.h:113
Aphid_Population_Manager::m_aphid_alate_proportion_para_a
double m_aphid_alate_proportion_para_a
The variable to store alate proportion calculation parameter A.
Definition: Aphid_Population_Manager.h:173
cfg_BBAphidWinterHostDayLength
CfgFloat cfg_BBAphidWinterHostDayLength("BB_APHID_WINTER_HOST_DAY_LENGTH", CFG_CUSTOM, 1000)
cfg_EGAphidNymphDevDayDegWingStd
CfgFloat cfg_EGAphidNymphDevDayDegWingStd("EG_APHID_NYMPH_DEV_DAY_DEG_WING_STD", CFG_CUSTOM, 10.33)
cfg_EGAphidEggReproductionParaB
CfgFloat cfg_EGAphidEggReproductionParaB("EG_APHID_EGG_REPRODUCTION_PARA_B", CFG_CUSTOM, -0.266)
cfg_BBAphidEggMortalityRate
CfgFloat cfg_BBAphidEggMortalityRate("BB_APHID_EGG_MORALITY_RATE", CFG_CUSTOM, 0.00595)
toa_Male
Definition: Aphid.h:55
cfg_BBAphidNymphReproductionParaB2
CfgFloat cfg_BBAphidNymphReproductionParaB2("BB_APHID_NYMPH_REPRODUCTION_PARA_B2", CFG_CUSTOM, 9.9696)
cfg_PEAAphidDayLengthFemale
CfgFloat cfg_PEAAphidDayLengthFemale("PEA_APHID_DAY_LENGTH_FEMALE", CFG_CUSTOM, 780)
cfg_PEAAphidDayLengthMale
CfgFloat cfg_PEAAphidDayLengthMale("PEA_APHID_DAY_LENGTH_MALE", CFG_CUSTOM, 810)
cfg_BBAphidSexualDevelopmentRequiredDdegStd
CfgFloat cfg_BBAphidSexualDevelopmentRequiredDdegStd("BB_APHID_SEXUAL_DEVELOPMENT_REQUIRED_DDEG_STD", CFG_CUSTOM, 73)
Population_Manager_Base::m_ListNames
const char * m_ListNames[32]
A list of life-stage names.
Definition: PopulationManager.h:628
cfg_PEAAphidAdultMortality
CfgArray_Double cfg_PEAAphidAdultMortality("PEA_APHID_ADULT_MORTALITY", CFG_CUSTOM, 6, vector< double >{0.048, 0.123424, 0.140803, 0.163877, 0.195997, 1})
cfg_EGAphidSexualDevelopmentRequiredDdegStd
CfgFloat cfg_EGAphidSexualDevelopmentRequiredDdegStd("EG_APHID_SEXUAL_DEVELOPMENT_REQUIRED_DDEG_STD", CFG_CUSTOM, 73)
cfg_EGAphidEggMortalityRateStd
CfgFloat cfg_EGAphidEggMortalityRateStd("EG_APHID_EGG_MORALITY_RATE_STD", CFG_CUSTOM, 0.00024)
cfg_AphidCellHeight
CfgInt cfg_AphidCellHeight("APHID_CELL_HEIGHT", CFG_CUSTOM, 10)
The height of the cell on the landscape for the aphids. -y, all the aphid species use the same parame...
cfg_AphidCellWidth
CfgInt cfg_AphidCellWidth("APHID_CELL_WIDTH", CFG_CUSTOM, 10)
The width of the cell on the landscape for the aphids. -x , all the aphid species use the same parame...
cfg_BBAphidEggHatchChanceParaA
CfgFloat cfg_BBAphidEggHatchChanceParaA("BB_APHID_EGG_HATCH_CHANCE_PARA_A", CFG_CUSTOM, 0.0029)
cfg_BBAphidNymphReproductionTempWeightParaA
CfgFloat cfg_BBAphidNymphReproductionTempWeightParaA("BB_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_A", CFG_CUSTOM, -0.006)
SubPopulation_Population_Manager::m_cell_suitability
blitz::Array< double, 2 > m_cell_suitability
Array for suitable value in each subpopulation cell.
Definition: SubPopulation_Population_Manager.h:113
cfg_PPAphidSexualDevelopmentRequiredDdeg
CfgFloat cfg_PPAphidSexualDevelopmentRequiredDdeg("PP_APHID_SEXUAL_DEVELOPMENT_REQUIRED_DDEG", CFG_CUSTOM, 1157)
Aphid_Population_Manager::m_aphid_sexual_reproduction_add_sd
double m_aphid_sexual_reproduction_add_sd
The standard deviation of the required accumulated degree days to enable sexual reproduction after th...
Definition: Aphid_Population_Manager.h:193
Aphid_Population_Manager::m_aphid_alate_proportion_para_c
double m_aphid_alate_proportion_para_c
The variable to store alate proportion calculation parameter C.
Definition: Aphid_Population_Manager.h:177
cfg_EGAphidDayLengthFemale
CfgFloat cfg_EGAphidDayLengthFemale("EG_APHID_DAY_LENGTH_FEMALE", CFG_CUSTOM, 700)
cfg_PPAphidNymphDevDayDegNoWingStd
CfgFloat cfg_PPAphidNymphDevDayDegNoWingStd("PP_APHID_NYMPH_DEV_DAY_DEG_NO_WING_STD", CFG_CUSTOM, 2.62)
cfg_PEAAphidEggReproductionParaSTD
CfgFloat cfg_PEAAphidEggReproductionParaSTD("PEA_APHID_EGG_REPRODUCTION_PARA_STD", CFG_CUSTOM, 0)
Aphid_Population_Manager::m_egg_reproduction_flag
bool m_egg_reproduction_flag
The flag to enable sexual development.
Definition: Aphid_Population_Manager.h:214
SubPopulation_Population_Manager::m_mul_hosts_flag
bool m_mul_hosts_flag
Flag to show whether it has both winter and summer host.
Definition: SubPopulation_Population_Manager.h:105
cfg_PEAAphidLongevityParaA
CfgFloat cfg_PEAAphidLongevityParaA("PEA_APHID_ADULT_LONGEVITY_PARA_A", CFG_CUSTOM, -0.0047)
cfg_PEAAphidAdultMortalityParaA
CfgFloat cfg_PEAAphidAdultMortalityParaA("PEA_APHID_ADULT_MORTALITY_PARA_A", CFG_CUSTOM, 0.0004)
cfg_EGAphidNymphDevDayDegNoWingStd
CfgFloat cfg_EGAphidNymphDevDayDegNoWingStd("EG_APHID_NYMPH_DEV_DAY_DEG_NO_WING_STD", CFG_CUSTOM, 10.33)
cfg_AphidMaxLongDistance
CfgFloat cfg_AphidMaxLongDistance("APHID_MAX_LONG_DISTANCE", CFG_CUSTOM, 1500)
The longest distance that an aphid WITHOUT wings can fly. (meters)
cfg_BBAphidDualLinearModelFlagDD
CfgBool cfg_BBAphidDualLinearModelFlagDD("BB_APHID_DUAL_LINEAR_MODEL_FLAG_DD", CFG_CUSTOM, true)
CfgFloat::value
double value() const
Definition: Configurator.h:142
SubPopulation_Population_Manager::m_summer_host_on
bool m_summer_host_on
The flag to enable summer host.
Definition: SubPopulation_Population_Manager.h:204
cfg_BBAphidSexualDevelopmentRequiredDdeg
CfgFloat cfg_BBAphidSexualDevelopmentRequiredDdeg("BB_APHID_SEXUAL_DEVELOPMENT_REQUIRED_DDEG", CFG_CUSTOM, 1157)
cfg_PEAAphidNymphReproductionParaA1
CfgFloat cfg_PEAAphidNymphReproductionParaA1("PEA_APHID_NYMPH_REPRODUCTION_PARA_A1", CFG_CUSTOM, 0.0562)
cfg_BBAphidNymphReproductionParaA2
CfgFloat cfg_BBAphidNymphReproductionParaA2("BB_APHID_NYMPH_REPRODUCTION_PARA_A2", CFG_CUSTOM, -0.0332)
Landscape::SupplyMonth
int SupplyMonth(void)
Passes a request on to the associated Calendar class function, returns m_month + 1 (the calendar mont...
Definition: Landscape.h:2272
Aphid_Population_Manager::m_aphid_nymph_mortality_para_a
double m_aphid_nymph_mortality_para_a
The variable to store the nymph temperature based mortality parameter A.
Definition: Aphid_Population_Manager.h:107
cfg_PEAAphidNymphMortalityParaC
CfgFloat cfg_PEAAphidNymphMortalityParaC("PEA_APHID_NYMPH_MORTALITY_PARA_C", CFG_CUSTOM, 0.0906)
Aphid_Population_Manager::m_aphid_nymph_with_wings_development_day_degrees
double m_aphid_nymph_with_wings_development_day_degrees
The variable to store the nymph with wings development day degrees.
Definition: Aphid_Population_Manager.h:141
Aphid_Population_Manager::m_aphid_nymph_mortality_para_b
double m_aphid_nymph_mortality_para_b
The variable to store the nymph temperature based mortality parameter B.
Definition: Aphid_Population_Manager.h:109
Aphid_Population_Manager::m_aphid_egg_hatch_chance_para_b
double m_aphid_egg_hatch_chance_para_b
The variable to store the egg hatch chance parameter B.
Definition: Aphid_Population_Manager.h:127
cfg_EGAphidDayLengthMale
CfgFloat cfg_EGAphidDayLengthMale("EG_APHID_DAY_LENGTH_MALE", CFG_CUSTOM, 740)
The day length to control male and female reproduction, this is used for pea and English grain aphids...
cfg_PEAAphidNymphDevDayDegNoWing
CfgFloat cfg_PEAAphidNymphDevDayDegNoWing("PEA_APHID_NYMPH_DEV_DAY_DEG_NO_WING", CFG_CUSTOM, 128)
SubPopulation_Population_Manager::m_cell_popu_density
blitz::Array< double, 2 > m_cell_popu_density
Array for weighted population density in each subpopulation cell.
Definition: SubPopulation_Population_Manager.h:111
cfg_EGAphidAdultMortalityDdeg
CfgArray_Double cfg_EGAphidAdultMortalityDdeg("EG_APHID_ADULT_MORTALITY_DDEG", CFG_CUSTOM, 9, vector< double >{100, 125, 150, 175, 200, 225, 250, 275, 300})
The parameters to set the adult mortality based their accumulated degree days.
toa_Nymph_F
Definition: Aphid.h:50
cfg_PPAphidEggHatchChanceParaB
CfgFloat cfg_PPAphidEggHatchChanceParaB("PP_APHID_EGG_HATCH_CHANCE_PARA_B", CFG_CUSTOM, -0.16)
Aphid_Population_Manager::calOffspringStageBBandPP
int calOffspringStageBBandPP(int current_stage, double *offspring_num=NULL, double a_age=1, double a_density=-1, double a_growth_stage=0, double *a_propotion=NULL, bool winter_host_flag=false)
The function to calcto calculate the offspring stage for black bean and peach potato aphids.
Definition: Aphid_Population_Manager.cpp:1137
cfg_Subpopu_Base_Output_Used
CfgBool cfg_Subpopu_Base_Output_Used
Landscape::SupplyTempHour
double SupplyTempHour(int hour)
Returns the temperature in a given hour (0 to 23)
Definition: Landscape.h:2103
cfg_EGAphidAlatePropParaC
CfgFloat cfg_EGAphidAlatePropParaC("EG_APHID_ALATE_PROP_PARA_C", CFG_CUSTOM, 0)
Aphid_Population_Manager::m_aphid_nymph_with_wings_development_day_degrees_sd
double m_aphid_nymph_with_wings_development_day_degrees_sd
The variable to store the nymph with wings development day degrees's standard deviation.
Definition: Aphid_Population_Manager.h:143
Population_Manager_Base::m_ListNameLength
int m_ListNameLength
the number of life-stages simulated in the population manager
Definition: PopulationManager.h:626
cfg_EGAphidEggHatchDelayDD
CfgFloat cfg_EGAphidEggHatchDelayDD("EG_APHID_EGG_HATCH_DELAY_DD", CFG_CUSTOM, 10)
cfg_PPAphidSummerHostDayLength
CfgFloat cfg_PPAphidSummerHostDayLength("PP_APHID_SUMMER_HOST_DAY_LENGTH", CFG_CUSTOM, 600)
Aphid_Population_Manager::calOffspringStageEGandPEA
int calOffspringStageEGandPEA(int current_stage, double *offspring_num=NULL, double a_age=1, double a_density=-1, double a_growth_stage=0, double *a_propotion=NULL, bool winter_host_flag=false)
The function to calculate the offspring stage for English grain and pea aphids.
Definition: Aphid_Population_Manager.cpp:1084
Aphid_Population_Manager::m_nymph_produced_num_weight
double m_nymph_produced_num_weight
The weight to regulate the number of nymph produced per day based on temperature.
Definition: Aphid_Population_Manager.h:212
cfg_BBAphidAlatePropParaC
CfgFloat cfg_BBAphidAlatePropParaC("BB_APHID_ALATE_PROP_PARA_C", CFG_CUSTOM, 0)
Aphid_Population_Manager::m_aphid_nymph_production_temp_weight_para_a
double m_aphid_nymph_production_temp_weight_para_a
The variable to store the temperature weighted nymph production parameter A.
Definition: Aphid_Population_Manager.h:167
cfg_PEAAphidNymphDevDayDegWing
CfgFloat cfg_PEAAphidNymphDevDayDegWing("PEA_APHID_NYMPH_DEV_DAY_DEG_WING", CFG_CUSTOM, 138)
cfg_BBAphidNymphReproductionTempWeightParaC
CfgFloat cfg_BBAphidNymphReproductionTempWeightParaC("BB_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_C", CFG_CUSTOM, -0.76)
struct_Aphid
Used for creation of a new Aphid object.
Definition: Aphid_Population_Manager.h:54
cfg_AphidScaleWindSpeed
CfgFloat cfg_AphidScaleWindSpeed("APHID_SCALE_WIND_SPEED", CFG_CUSTOM, 1.01)
The scale for the wind speed.
cfg_PEAAphidAdultMortalityDdeg
CfgArray_Double cfg_PEAAphidAdultMortalityDdeg("PEA_APHID_ADULT_MORTALITY_DDEG", CFG_CUSTOM, 6, vector< double >{175, 200, 225, 250, 275, 300})
SubPopulation_Population_Manager::readHosts
virtual void readHosts(string a_file_name)
The fuction to read the host lists for aphid.
Definition: SubPopulation_Population_Manager.cpp:1006
SubPopulation_Population_Manager::isSummerHostTole
bool isSummerHostTole(TTypesOfLandscapeElement a_ele)
Test whether it is a summer host tole.
Definition: SubPopulation_Population_Manager.cpp:810
SubPopulation_Population_Manager::m_index_new_old
blitz::Array< int, 2 > m_index_new_old
Array for index of the newest and oldest life stages.
Definition: SubPopulation_Population_Manager.h:154
cfg_BBAphidAdultMortalityParaC
CfgFloat cfg_BBAphidAdultMortalityParaC("BB_APHID_ADULT_MORTALITY_PARA_C", CFG_CUSTOM, 0.0906)
cfg_PEAAphidDevelopmentBaseTempArray
CfgArray_Double cfg_PEAAphidDevelopmentBaseTempArray("PEA_APHID_DEVELOPMENT_BASE_TEMP_ARRAY", CFG_CUSTOM, 9, vector< double >{3.5, 2.73, 2.73, 2.73, 2.73, 2.73, 2.73, 2.73, 2.73})
CfgBool::value
bool value() const
Definition: Configurator.h:164
Aphid_Population_Manager::m_first_egg_hatch_flag
bool m_first_egg_hatch_flag
The flag to show the first hatch of egg.
Definition: Aphid_Population_Manager.h:218
Aphid_Population_Manager::m_aphid_adult_mortality_para_c
double m_aphid_adult_mortality_para_c
The variable to store the adult mortality parameter C.
Definition: Aphid_Population_Manager.h:117
struct_Aphid::w
int w
area width
Definition: Aphid_Population_Manager.h:62
cfg_PPAphidNymphReproductionParaA2
CfgFloat cfg_PPAphidNymphReproductionParaA2("PP_APHID_NYMPH_REPRODUCTION_PARA_A2", CFG_CUSTOM, -0.0087)
Population_Manager_Base::m_TheLandscape
Landscape * m_TheLandscape
holds an internal pointer to the landscape
Definition: PopulationManager.h:624
cfg_PEAAphidDualLinearModelFlagDD
CfgBool cfg_PEAAphidDualLinearModelFlagDD("PEA_APHID_DUAL_LINEAR_MODEL_FLAG_DD", CFG_CUSTOM, true)
Aphid_Population_Manager::m_max_adult_dd
int m_max_adult_dd
THe variable to store the maximum number of degree days for aphid.
Definition: Aphid_Population_Manager.h:206
Aphid_Population_Manager::m_accu_ddeg_egg_reproduction
double m_accu_ddeg_egg_reproduction
The accumulated day degrees to enable sexual development.
Definition: Aphid_Population_Manager.h:216
Aphid_Population_Manager::calNextStageShared
int calNextStageShared(int current_stage)
The function to calculate the next life stage for all aphids.
Definition: Aphid_Population_Manager.cpp:816
cfg_PEAAphidNymphDevDayDegWingStd
CfgFloat cfg_PEAAphidNymphDevDayDegWingStd("PEA_APHID_NYMPH_DEV_DAY_DEG_WING_STD", CFG_CUSTOM, 4.48)
cfg_EGAphidHostFile
CfgStr cfg_EGAphidHostFile("EG_APHID_HOST_FILE", CFG_CUSTOM, "Subpopulation/english_grain_aphid_host.txt")
The host file for the aphids. The file for storing hosts for pea aphid. The file contains five rows,...
cfg_PEAAphidNymphReproductionTempWeightParaC
CfgFloat cfg_PEAAphidNymphReproductionTempWeightParaC("PEA_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_C", CFG_CUSTOM, -1.93)
cfg_EGAphidDevelopmentTurningTempArray
CfgArray_Double cfg_EGAphidDevelopmentTurningTempArray("EG_APHID_DEVELOPMENT_TURNING_TEMP_ARRAY", CFG_CUSTOM, 9, vector< double >{4, 3.5, 3.5, 3.5, 3.5, 10, 10, 10, 10})
The turning temperatures for calculate degree days. This value should be larger than the base develop...
cfg_PPAphidNymphMortalityParaC
CfgFloat cfg_PPAphidNymphMortalityParaC("PP_APHID_NYMPH_MORTALITY_PARA_C", CFG_CUSTOM, 0.3081)
cfg_PEAAphidNymphReproductionParaB1
CfgFloat cfg_PEAAphidNymphReproductionParaB1("PEA_APHID_NYMPH_REPRODUCTION_PARA_B1", CFG_CUSTOM, 1.1932)
cfg_PPAphidNymphDevDayDegNoWing
CfgFloat cfg_PPAphidNymphDevDayDegNoWing("PP_APHID_NYMPH_DEV_DAY_DEG_NO_WING", CFG_CUSTOM, 140.25)
Aphid_Population_Manager::m_aphid_nymph_production_temp_weight_para_c
double m_aphid_nymph_production_temp_weight_para_c
The variable to store the temperature weighted nymph production parameter C.
Definition: Aphid_Population_Manager.h:171
toa_Nymph_M
Definition: Aphid.h:51
cfg_PEAAphidEggHatchDelayDD
CfgFloat cfg_PEAAphidEggHatchDelayDD("PEA_APHID_EGG_HATCH_DELAY_DD", CFG_CUSTOM, 10)
cfg_PPAphidNymphDevDayDegWingStd
CfgFloat cfg_PPAphidNymphDevDayDegWingStd("PP_APHID_NYMPH_DEV_DAY_DEG_WING_STD", CFG_CUSTOM, 4.48)
cfg_BBAphidLongevityParaB
CfgFloat cfg_BBAphidLongevityParaB("BB_APHID_ADULT_LONGEVITY_PARA_B", CFG_CUSTOM, 1.892)
TTypesOfLandscapeElement
TTypesOfLandscapeElement
Values that represent the types of landscape polygon that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:57
cfg_PPAphidEggReproductionParaSTD
CfgFloat cfg_PPAphidEggReproductionParaSTD("PP_APHID_EGG_REPRODUCTION_PARA_STD", CFG_CUSTOM, 8.3)
cfg_PPAphidEggHatchDelayThreshold
CfgFloat cfg_PPAphidEggHatchDelayThreshold("PP_APHID_EGG_HATCH_DELAY_THRESHOLD", CFG_CUSTOM, 0.9)
toa_Nymph_W
Definition: Aphid.h:49
Aphid_Population_Manager::m_update_mortality_array_pointer
void(Aphid_Population_Manager::* m_update_mortality_array_pointer)()
The function pointer for calculation of the shared base mortality rate for the whole landscape.
Definition: Aphid_Population_Manager.h:200
cfg_AphidPeakLongDistance
CfgFloat cfg_AphidPeakLongDistance("APHID_PEAK_LONG_DISTANCE", CFG_CUSTOM, 200)
The distance for the peak amount when the winged adults fly. (meters)
cfg_PEAAphidNymphMortalityParaB
CfgFloat cfg_PEAAphidNymphMortalityParaB("PEA_APHID_NYMPH_MORTALITY_PARA_B", CFG_CUSTOM, -0.0115)
cfg_EGAphidAlatePropParaA
CfgFloat cfg_EGAphidAlatePropParaA("EG_APHID_ALATE_PROP_PARA_A", CFG_CUSTOM, 1.1)
The parameters for alate proportion calculation.
Aphid_Population_Manager::m_aphid_nymph_production_para_a1
double m_aphid_nymph_production_para_a1
The variable to store the nymph production parameter A1.
Definition: Aphid_Population_Manager.h:157
Aphid_Population_Manager::m_aphid_specie_name
string m_aphid_specie_name
This is to store the aphid species name.
Definition: Aphid_Population_Manager.h:101
cfg_PPAphidEggHatchChanceParaA
CfgFloat cfg_PPAphidEggHatchChanceParaA("PP_APHID_EGG_HATCH_CHANCE_PARA_A", CFG_CUSTOM, 0.0029)
SubPopulation_Population_Manager::isWinterHostTole
bool isWinterHostTole(TTypesOfLandscapeElement a_ele)
Test whether it is a winter host tole.
Definition: SubPopulation_Population_Manager.cpp:800
cfg_EGAphidSexualDevelopmentRequiredDdeg
CfgFloat cfg_EGAphidSexualDevelopmentRequiredDdeg("EG_APHID_SEXUAL_DEVELOPMENT_REQUIRED_DDEG", CFG_CUSTOM, 1157)
The parameters to control the sexual reproduction.
Population_Manager_Base::SimH
int SimH
stores the simulation height
Definition: PopulationManager.h:614
cfg_BBAphidEggReproductionParaA
CfgFloat cfg_BBAphidEggReproductionParaA("BB_APHID_EGG_REPRODUCTION_PARA_A", CFG_CUSTOM, 0.2469)
cfg_PPAphidAlatePropParaA
CfgFloat cfg_PPAphidAlatePropParaA("PP_APHID_ALATE_PROP_PARA_A", CFG_CUSTOM, 1.1)
cfg_PEAAphidNymphDevDayDegNoWingStd
CfgFloat cfg_PEAAphidNymphDevDayDegNoWingStd("PEA_APHID_NYMPH_DEV_DAY_DEG_NO_WING_STD", CFG_CUSTOM, 2.62)
Aphid_Population_Manager::m_aphid_nymph_production_para_b2
double m_aphid_nymph_production_para_b2
The variable to store the nymph production parameter B2.
Definition: Aphid_Population_Manager.h:163
Aphid_Population_Manager::m_egg_per_day
vector< double > m_egg_per_day
The vector to store the age (in degree days) related reproduction offspring egg.
Definition: Aphid_Population_Manager.h:210
cfg_PPAphidNymphReproductionTempWeightParaB
CfgFloat cfg_PPAphidNymphReproductionTempWeightParaB("PP_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_B", CFG_CUSTOM, 0.204)
toAphidHibernate
Definition: Aphid_Population_Manager.h:91
cfg_EGAphidEggHatchChanceParaB
CfgFloat cfg_EGAphidEggHatchChanceParaB("EG_APHID_EGG_HATCH_CHANCE_PARA_B", CFG_CUSTOM, -0.16)
Aphid_Population_Manager::m_aphid_adult_mortality_vec
vector< double > m_aphid_adult_mortality_vec
The vector to store the adult mortality for the inflection point.
Definition: Aphid_Population_Manager.h:189
Aphid_Population_Manager::m_max_day_degree_adult
double m_max_day_degree_adult
The longest day degrees that a adult can have.
Definition: Aphid_Population_Manager.h:220
cfg_EGAphidLongevityParaB
CfgFloat cfg_EGAphidLongevityParaB("EG_APHID_ADULT_LONGEVITY_PARA_B", CFG_CUSTOM, 1.892)
cfg_PPAphidEggMortalityRate
CfgFloat cfg_PPAphidEggMortalityRate("PP_APHID_EGG_MORALITY_RATE", CFG_CUSTOM, 0.00595)
cfg_EGAphidNymphDevDayDegWing
CfgFloat cfg_EGAphidNymphDevDayDegWing("EG_APHID_NYMPH_DEV_DAY_DEG_WING", CFG_CUSTOM, 142)
The development parameters for Nymphs.
cfg_EGAphidNymphReproductionChangeADD
CfgFloat cfg_EGAphidNymphReproductionChangeADD("EG_APHID_NYMPH_REPRODUCTION_CHANGE_ADD", CFG_CUSTOM, 0)
cfg_PEAphidSexualDevelopmentRequiredDdegStd
CfgFloat cfg_PEAphidSexualDevelopmentRequiredDdegStd("PEA_APHID_SEXUAL_DEVELOPMENT_REQUIRED_DDEG_STD", CFG_CUSTOM, 73)
cfg_PEAAphidEggReproductionParaB
CfgFloat cfg_PEAAphidEggReproductionParaB("PEA_APHID_EGG_REPRODUCTION_PARA_B", CFG_CUSTOM, -0.266)
Aphid_Population_Manager::m_aphid_egg_hatch_chance_threshold
double m_aphid_egg_hatch_chance_threshold
The threshold of hatch value to start the delay of egg hatch, this is to avoid the eggs hatching from...
Definition: Aphid_Population_Manager.h:129
cfg_BBAphidAlatePropParaA
CfgFloat cfg_BBAphidAlatePropParaA("BB_APHID_ALATE_PROP_PARA_A", CFG_CUSTOM, 1.1)
Aphid_Population_Manager::m_aphid_egg_mortality
double m_aphid_egg_mortality
The variable to store the aphid egg mortality.
Definition: Aphid_Population_Manager.h:103
cfg_PPAphidNymphMortalityParaA
CfgFloat cfg_PPAphidNymphMortalityParaA("PP_APHID_NYMPH_MORTALITY_PARA_A", CFG_CUSTOM, 0.0025)
cfg_BBAphidDevelopmentTurningTempArray
CfgArray_Double cfg_BBAphidDevelopmentTurningTempArray("BB_APHID_DEVELOPMENT_TURNING_TEMP_ARRAY", CFG_CUSTOM, 9, vector< double >{4, 3.5, 3.5, 3.5, 3.5, 10, 10, 10, 10})
cfg_EGAphidEggReproductionParaSTD
CfgFloat cfg_EGAphidEggReproductionParaSTD("EG_APHID_EGG_REPRODUCTION_PARA_STD", CFG_CUSTOM, 0)
cfg_BBAphidEggMortalityRateStd
CfgFloat cfg_BBAphidEggMortalityRateStd("BB_APHID_EGG_MORALITY_RATE_STD", CFG_CUSTOM, 0.00024)
cfg_EGAphidLongevityParaA
CfgFloat cfg_EGAphidLongevityParaA("EG_APHID_ADULT_LONGEVITY_PARA_A", CFG_CUSTOM, -0.0047)
The longevity parameters for adults.
Aphid_Population_Manager::m_aphid_egg_hatch_delay_degree_days
double m_aphid_egg_hatch_delay_degree_days
The number of degree days to delay the egg's hatch.
Definition: Aphid_Population_Manager.h:131
Aphid_Population_Manager::isEnoughNextLifeStageShared
bool isEnoughNextLifeStageShared(int a_life_stage)
Definition: Aphid_Population_Manager.cpp:1182
cfg_BBAphidNymphReproductionParaB1
CfgFloat cfg_BBAphidNymphReproductionParaB1("BB_APHID_NYMPH_REPRODUCTION_PARA_B1", CFG_CUSTOM, 2.9174)
cfg_PEAAphidNymphReproductionParaB2
CfgFloat cfg_PEAAphidNymphReproductionParaB2("PEA_APHID_NYMPH_REPRODUCTION_PARA_B2", CFG_CUSTOM, 4.6872)
Aphid_Population_Manager::CreateObjects
Aphid * CreateObjects(TAnimal *pvo, struct_Aphid *data, int number)
Definition: Aphid_Population_Manager.cpp:396
cfg_EGAphidNymphReproductionTempWeightParaB
CfgFloat cfg_EGAphidNymphReproductionTempWeightParaB("EG_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_B", CFG_CUSTOM, 0.264)
Aphid_Population_Manager::m_aphid_egg_starting_degree_days
double m_aphid_egg_starting_degree_days
The variable to store the egg's starting degree days when the simulation starts.
Definition: Aphid_Population_Manager.h:123
struct_Aphid::summer_landscape_host
TTypesOfLandscapeElement summer_landscape_host
Definition: Aphid_Population_Manager.h:80
cfg_BBAphidNymphMortalityParaC
CfgFloat cfg_BBAphidNymphMortalityParaC("BB_APHID_NYMPH_MORTALITY_PARA_C", CFG_CUSTOM, 0.3081)
cfg_BBAphidAdultMortalityParaA
CfgFloat cfg_BBAphidAdultMortalityParaA("BB_APHID_ADULT_MORTALITY_PARA_A", CFG_CUSTOM, 0.0004)
SubPopulation_Population_Manager::m_sub_h
int m_sub_h
Variable to record the height of the subpopulation cell.
Definition: SubPopulation_Population_Manager.h:109
Aphid_Population_Manager::m_aphid_nymph_without_wings_development_day_degrees
double m_aphid_nymph_without_wings_development_day_degrees
The variable to store the nymph without wings development day degrees.
Definition: Aphid_Population_Manager.h:145
Aphid_Population_Manager::m_aphid_egg_hatch_chance_para_a_after_threshold
double m_aphid_egg_hatch_chance_para_a_after_threshold
The variable to store the egg hatch chance parameter A after threshold.
Definition: Aphid_Population_Manager.h:133
cfg_BBAphidNymphReproductionTempWeightParaB
CfgFloat cfg_BBAphidNymphReproductionTempWeightParaB("BB_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_B", CFG_CUSTOM, 0.204)
cfg_BBAphidEggReproductionParaC
CfgFloat cfg_BBAphidEggReproductionParaC("BB_APHID_EGG_REPRODUCTION_PARA_C", CFG_CUSTOM, 10)
cfg_EGAphidAdultMortalityParaC
CfgFloat cfg_EGAphidAdultMortalityParaC("EG_APHID_ADULT_MORTALITY_PARA_C", CFG_CUSTOM, 0.0906)
cfg_PPAphidEggStartingADD
CfgFloat cfg_PPAphidEggStartingADD("PP_APHID_EGG_STARTING_ADD", CFG_CUSTOM, 0)
cfg_BBAphidEggReproductionParaSTD
CfgFloat cfg_BBAphidEggReproductionParaSTD("BB_APHID_EGG_REPRODUCTION_PARA_STD", CFG_CUSTOM, 8.3)
Aphid_Population_Manager::m_aphid_alate_proportion_para_b
double m_aphid_alate_proportion_para_b
The variable to store alate proportion calculation parameter B.
Definition: Aphid_Population_Manager.h:175
cfg_EGAphidEggReproductionParaA
CfgFloat cfg_EGAphidEggReproductionParaA("EG_APHID_EGG_REPRODUCTION_PARA_A", CFG_CUSTOM, 0.2469)
The parameters for egg reproduction.
cfg_PEAAphidAlatePropParaB
CfgFloat cfg_PEAAphidAlatePropParaB("PEA_APHID_ALATE_PROP_PARA_B", CFG_CUSTOM, 10)
Aphid_Population_Manager::m_aphid_egg_hatch_chance_max_degree_days
double m_aphid_egg_hatch_chance_max_degree_days
The variable to store the largest degree days for egg hatch chance being one.
Definition: Aphid_Population_Manager.h:139
toa_Nymph
Definition: Aphid.h:48
cfg_PEAAphidNymphReproductionParaA2
CfgFloat cfg_PEAAphidNymphReproductionParaA2("PEA_APHID_NYMPH_REPRODUCTION_PARA_A2", CFG_CUSTOM, -0.0146)
cfg_EGAphidNymphReproductionParaB1
CfgFloat cfg_EGAphidNymphReproductionParaB1("EG_APHID_NYMPH_REPRODUCTION_PARA_B1", CFG_CUSTOM, 1.1932)
Landscape::SupplyDayInYear
int SupplyDayInYear(void)
Passes a request on to the associated Calendar class function, the day in the year.
Definition: Landscape.h:2267
cfg_BBAphidNymphReproductionChangeADD
CfgFloat cfg_BBAphidNymphReproductionChangeADD("BB_APHID_NYMPH_REPRODUCTION_CHANGE_ADD", CFG_CUSTOM, 66.5)
cfg_EGAphidEggStartingADD
CfgFloat cfg_EGAphidEggStartingADD("EG_APHID_EGG_STARTING_ADD", CFG_CUSTOM, 0)
The starting degree days for eggs when the simulation starts.
cfg_PEAAphidEggHatchChanceParaB
CfgFloat cfg_PEAAphidEggHatchChanceParaB("PEA_APHID_EGG_HATCH_CHANCE_PARA_B", CFG_CUSTOM, -0.233)
cfg_EGAphidAdultMortalityParaB
CfgFloat cfg_EGAphidAdultMortalityParaB("EG_APHID_ADULT_MORTALITY_PARA_B", CFG_CUSTOM, -0.0115)
cfg_PPAphidDualLinearModelFlagDD
CfgBool cfg_PPAphidDualLinearModelFlagDD("PP_APHID_DUAL_LINEAR_MODEL_FLAG_DD", CFG_CUSTOM, true)
struct_Aphid::index_y
int index_y
Definition: Aphid_Population_Manager.h:78
toas_BB
Definition: Aphid.h:66
cfg_AphidLifeStageNum
CfgInt cfg_AphidLifeStageNum("APHID_LIFE_STAGE_NUM", CFG_CUSTOM, 9)
The number of life stages for the aphids. All the species have the same number of life stages.
Aphid_Population_Manager::m_next_life_func_pointer
int(Aphid_Population_Manager::* m_next_life_func_pointer)(int current_stage)
The function pointer for calculation of next life stage.
Definition: Aphid_Population_Manager.h:198
cfg_AphidMovMaskWindDirectionNum
CfgFloat cfg_AphidMovMaskWindDirectionNum("APHID_MOV_MASK_WIND_DIRECTION_NUM", CFG_CUSTOM, 4)
The number of wind directions used to calculate the movement masks.
cfg_PPAphidWinterHostDayLength
CfgFloat cfg_PPAphidWinterHostDayLength("PP_APHID_WINTER_HOST_DAY_LENGTH", CFG_CUSTOM, 1000)
toa_Female
Definition: Aphid.h:54
SubPopulation_Population_Manager::m_local_moving_life_stage_array
std::vector< int > m_local_moving_life_stage_array
The vector to store the life stags that can move locally.
Definition: SubPopulation_Population_Manager.h:198
cfg_PPAphidNymphReproductionChangeADD
CfgFloat cfg_PPAphidNymphReproductionChangeADD("PP_APHID_NYMPH_REPRODUCTION_CHANGE_ADD", CFG_CUSTOM, 50)
cfg_PEAAphidAdultMortalityParaC
CfgFloat cfg_PEAAphidAdultMortalityParaC("PEA_APHID_ADULT_MORTALITY_PARA_C", CFG_CUSTOM, 0.0906)
Aphid_Population_Manager::m_nymph_per_day
vector< double > m_nymph_per_day
The vector to store the age (in degree days) related reproduction offsping nymph.
Definition: Aphid_Population_Manager.h:208
Aphid_Population_Manager::m_aphid_egg_production_para_sd
double m_aphid_egg_production_para_sd
The variable to store the egg production parameter's standard deviation.
Definition: Aphid_Population_Manager.h:155
cfg_PEAAphidAdultMortalityParaB
CfgFloat cfg_PEAAphidAdultMortalityParaB("PEA_APHID_ADULT_MORTALITY_PARA_B", CFG_CUSTOM, -0.0115)
cfg_PPAphidDevelopmentBaseTempArray
CfgArray_Double cfg_PPAphidDevelopmentBaseTempArray("PP_APHID_DEVELOPMENT_BASE_TEMP_ARRAY", CFG_CUSTOM, 9, vector< double >{3.5, 4, 4, 4, 4, 2.73, 2.73, 2.73, 2.73})
CfgInt::value
int value() const
Definition: Configurator.h:116
SubPopulation_Population_Manager::m_vec_subpopulation_pointers_polygon
std::vector< std::vector< SubPopulation * > > m_vec_subpopulation_pointers_polygon
The vector used to store the pointers of all the subpopulation objects in each polygon.
Definition: SubPopulation_Population_Manager.h:202
Aphid_Population_Manager::initialiseSimWithEggs
void initialiseSimWithEggs(void)
The function to initilise the simulation with eggs.
Definition: Aphid_Population_Manager.cpp:849
Aphid_Population_Manager::m_offspring_func_pointer
int(Aphid_Population_Manager::* m_offspring_func_pointer)(int current_stage, double *offspring_num, double a_age, double a_density, double a_growth_stage, double *a_propotion, bool winter_host_flag)
The function pointer for calculation of the offsrping stage number.
Definition: Aphid_Population_Manager.h:202
Aphid_Population_Manager::m_aphid_egg_mortality_sd
double m_aphid_egg_mortality_sd
The variable to store the standard deviation of the gee mortality.
Definition: Aphid_Population_Manager.h:105
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
cfg_PEAAphidLongevityParaB
CfgFloat cfg_PEAAphidLongevityParaB("PEA_APHID_ADULT_LONGEVITY_PARA_B", CFG_CUSTOM, 1.892)
Aphid_Population_Manager::m_aphid_nymph_without_wings_development_day_degrees_sd
double m_aphid_nymph_without_wings_development_day_degrees_sd
The variable to store the nymph without wings development day degrees's standard deviation.
Definition: Aphid_Population_Manager.h:147
cfg_AphidMaxAliveDay
CfgInt cfg_AphidMaxAliveDay("APHID_MAX_ALIVE_DAY", CFG_CUSTOM, 200)
The maximum alive days among all the life stages. All the species have the same number of life stages...
Population_Manager_Base::SimW
int SimW
stores the simulation width
Definition: PopulationManager.h:616
cfg_EGAphidNymphReproductionTempWeightParaC
CfgFloat cfg_EGAphidNymphReproductionTempWeightParaC("EG_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_C", CFG_CUSTOM, -1.93)
cfg_PPAphidEggReproductionParaC
CfgFloat cfg_PPAphidEggReproductionParaC("PP_APHID_EGG_REPRODUCTION_PARA_C", CFG_CUSTOM, 10.6)
cfg_AphidResultPath
CfgStr cfg_AphidResultPath("APHID_RESULT_PATH", CFG_CUSTOM, "./")
The path to store the results.
Aphid_Population_Manager::m_aphid_nymph_production_para_b1
double m_aphid_nymph_production_para_b1
The variable to store the nymph production parameter B1.
Definition: Aphid_Population_Manager.h:159
cfg_EGAphidDevelopmentBaseTempArray
CfgArray_Double cfg_EGAphidDevelopmentBaseTempArray("EG_APHID_DEVELOPMENT_BASE_TEMP_ARRAY", CFG_CUSTOM, 9, vector< double >{3.5, 2.73, 2.73, 2.73, 2.73, 2.73, 2.73, 2.73, 2.73})
The base development temperatures for the aphids.
cfg_EGAphidEggMortalityRate
CfgFloat cfg_EGAphidEggMortalityRate("EG_APHID_EGG_MORALITY_RATE", CFG_CUSTOM, 0.00595)
The morality rate for Aphid eggs.
cfg_PPAphidAdultMortalityParaC
CfgFloat cfg_PPAphidAdultMortalityParaC("PP_APHID_ADULT_MORTALITY_PARA_C", CFG_CUSTOM, 0.0906)
SubPopulation_Population_Manager::m_lowest_temp_dev
blitz::Array< double, 1 > m_lowest_temp_dev
Lowest development temperatures for each life stage. This is the last step in each day.
Definition: SubPopulation_Population_Manager.h:158
cfg_PPAphidNymphReproductionParaB1
CfgFloat cfg_PPAphidNymphReproductionParaB1("PP_APHID_NYMPH_REPRODUCTION_PARA_B1", CFG_CUSTOM, -1)
cfg_PEAAphidEggStartingADD
CfgFloat cfg_PEAAphidEggStartingADD("PEA_APHID_EGG_STARTING_ADD", CFG_CUSTOM, 0)
SubPopulation_Population_Manager::m_landing_life_stage_array
std::vector< int > m_landing_life_stage_array
The vector to store the life stage when a flying one lands, it could be different from the flying one...
Definition: SubPopulation_Population_Manager.h:196
cfg_BBAphidNymphDevDayDegWing
CfgFloat cfg_BBAphidNymphDevDayDegWing("BB_APHID_NYMPH_DEV_DAY_DEG_WING", CFG_CUSTOM, 150)
cfg_BBAphidAdultMortality
CfgArray_Double cfg_BBAphidAdultMortality("BB_APHID_ADULT_MORTALITY", CFG_CUSTOM, 13, vector< double >{0.0776, 0.08673, 0.094967, 0.104932, 0.117233, 0.132802, 0.153139, 0.180832, 0.220751, 0.283286, 0.395257, 0.653595, 1})
Aphid_Population_Manager::m_aphid_nymph_mortality_para_c
double m_aphid_nymph_mortality_para_c
The variable to store the nymph temperature based mortality parameter C.
Definition: Aphid_Population_Manager.h:111
cfg_BBAphidNymphDevDayDegNoWingStd
CfgFloat cfg_BBAphidNymphDevDayDegNoWingStd("BB_APHID_NYMPH_DEV_DAY_DEG_NO_WING_STD", CFG_CUSTOM, 15.72)
toas_PEA
Definition: Aphid.h:65
Aphid_Population_Manager::m_current_developtype
TTypesOfAphidDevelopmentSeason m_current_developtype
The variable to show the development season.
Definition: Aphid_Population_Manager.h:196
Aphid_Population_Manager::m_aphid_male_reproduction_day_length
double m_aphid_male_reproduction_day_length
The day length in minutes for male reproduction. This is used for EG and PEA.
Definition: Aphid_Population_Manager.h:179
Aphid_Population_Manager::m_aphid_nymph_production_changing_add
double m_aphid_nymph_production_changing_add
The variable to store the nymph production changing accumulated degree days.
Definition: Aphid_Population_Manager.h:165
Aphid_Population_Manager::m_aphid_adult_longevity_para_a
double m_aphid_adult_longevity_para_a
The variable to store the adult longevity parameter A.
Definition: Aphid_Population_Manager.h:119
Aphid_Population_Manager::m_aphid_egg_hatch_chance_para_a
double m_aphid_egg_hatch_chance_para_a
The variable to store the egg hatch chance parameter A.
Definition: Aphid_Population_Manager.h:125
struct_Aphid::NPM
Aphid_Population_Manager * NPM
Aphid_Population_Manager pointer.
Definition: Aphid_Population_Manager.h:70
cfg_PPAphidNymphReproductionTempWeightParaC
CfgFloat cfg_PPAphidNymphReproductionTempWeightParaC("PP_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_C", CFG_CUSTOM, -0.76)
cfg_EGAphidNymphMortalityParaB
CfgFloat cfg_EGAphidNymphMortalityParaB("EG_APHID_NYMPH_MORTALITY_PARA_B", CFG_CUSTOM, -0.0115)
Aphid_Population_Manager::m_aphid_egg_production_para_b
double m_aphid_egg_production_para_b
The variable to store the egg production parameter B.
Definition: Aphid_Population_Manager.h:151
SubPopulation_Population_Manager::m_current_mortality_array
blitz::Array< double, 2 > m_current_mortality_array
This a lookup table for the age and temperature dependent mortality rate. This is the same for the wh...
Definition: SubPopulation_Population_Manager.h:186
SubPopulation_Population_Manager::SubPopulation_Population_Manager
SubPopulation_Population_Manager(Landscape *L, string DevReproFile="", int a_sub_w=10, int a_sub_h=10, int a_num_life_stage=5, int a_max_long_dist=1000, int a_peak_long_dist=100, float a_scale_wind_speed=1.1, float a_max_wind_speed=16, int a_wind_direc_num=8, int a_wind_speed_step_size=2, int a_max_alive_day=300)
Definition: SubPopulation_Population_Manager.cpp:61
cfg_PPAphidAlatePropParaC
CfgFloat cfg_PPAphidAlatePropParaC("PP_APHID_ALATE_PROP_PARA_C", CFG_CUSTOM, 0)
cfg_AphidEggStartingNumVec
CfgArray_Int cfg_AphidEggStartingNumVec("APHID_EGG_STARING_NUM_VEC", CFG_CUSTOM, 4, vector< int >{20000, 20000, 20000, 20000})
It controls the number of eggs to start the aphid simulations. All the aphid species use the same par...
struct_Aphid::y
int y
y-coord
Definition: Aphid_Population_Manager.h:60
struct_Aphid::L
Landscape * L
Landscape pointer.
Definition: Aphid_Population_Manager.h:68
SubPopulation_Population_Manager::openSubpopulationBaseProbeFile
bool openSubpopulationBaseProbeFile()
Open the storing file.
Definition: SubPopulation_Population_Manager.cpp:394
cfg_PEAAphidNymphReproductionTempWeightParaA
CfgFloat cfg_PEAAphidNymphReproductionTempWeightParaA("PEA_APHID_NYMPH_REPRODUCTION_TEMP_WEIGHT_PARA_A", CFG_CUSTOM, -0.006)
cfg_PEAAphidAlatePropParaC
CfgFloat cfg_PEAAphidAlatePropParaC("PEA_APHID_ALATE_PROP_PARA_C", CFG_CUSTOM, 0)
Aphid
The class for base Aphid using subpopulation method.
Definition: Aphid.h:76
struct_Aphid::species
int species
species ID
Definition: Aphid_Population_Manager.h:66
Population_Manager_Base::m_SimulationName
string m_SimulationName
stores the simulation name
Definition: PopulationManager.h:622
tole_Field
Definition: LandscapeFarmingEnums.h:65
struct_Aphid::farm_flag
bool farm_flag
Definition: Aphid_Population_Manager.h:81
cfg_BBAphidNymphReproductionParaA1
CfgFloat cfg_BBAphidNymphReproductionParaA1("BB_APHID_NYMPH_REPRODUCTION_PARA_A1", CFG_CUSTOM, 0.1199)
cfg_PEAAphidEggReproductionParaA
CfgFloat cfg_PEAAphidEggReproductionParaA("PEA_APHID_EGG_REPRODUCTION_PARA_A", CFG_CUSTOM, 0.2469)
cfg_PPAphidDevelopmentTurningTempArray
CfgArray_Double cfg_PPAphidDevelopmentTurningTempArray("PP_APHID_DEVELOPMENT_TURNING_TEMP_ARRAY", CFG_CUSTOM, 9, vector< double >{4, 4.5, 4.5, 4.5, 4.5, 10, 10, 10, 10})
cfg_PEAAphidEggMortalityRate
CfgFloat cfg_PEAAphidEggMortalityRate("PEA_APHID_EGG_MORALITY_RATE", CFG_CUSTOM, 0.00595)
cfg_BBAphidEggStartingADD
CfgFloat cfg_BBAphidEggStartingADD("BB_APHID_EGG_STARTING_ADD", CFG_CUSTOM, 0)
CfgArray_Int::value
std::vector< int > value() const
Definition: Configurator.h:201
cfg_BBAphidHostFile
CfgStr cfg_BBAphidHostFile("BB_APHID_HOST_FILE", CFG_CUSTOM, "Subpopulation/black_bean_aphid_host.txt")
cfg_EGAphidEggHatchDelayThreshold
CfgFloat cfg_EGAphidEggHatchDelayThreshold("EG_APHID_EGG_HATCH_DELAY_THRESHOLD", CFG_CUSTOM, 0.9)
The parameter in degree days to delay the egg when the hatch chance is above the given threshold....
struct_Aphid::index_x
int index_x
Definition: Aphid_Population_Manager.h:77
Aphid_Population_Manager::initialisePopulation
virtual void initialisePopulation()
The function to initialise the population when starting aphid simulation, this function is called in ...
Definition: Aphid_Population_Manager.cpp:443
cfg_PEAAphidNymphReproductionChangeADD
CfgFloat cfg_PEAAphidNymphReproductionChangeADD("PEA_APHID_NYMPH_REPRODUCTION_CHANGE_ADD", CFG_CUSTOM, 0)
cfg_PEAAphidEggHatchChanceParaA
CfgFloat cfg_PEAAphidEggHatchChanceParaA("PEA_APHID_EGG_HATCH_CHANCE_PARA_A", CFG_CUSTOM, 0.0029)
cfg_AphidResultFileSuffix
CfgStr cfg_AphidResultFileSuffix("APHID_RESULT_FILE_SUFFIX", CFG_CUSTOM, "_result")
The suffix of the file name for storing the results.
struct_Aphid::starting_popu_density
double * starting_popu_density
Starting weighted population density for the subpopulation.
Definition: Aphid_Population_Manager.h:76
cfg_BBAphidLongevityParaA
CfgFloat cfg_BBAphidLongevityParaA("BB_APHID_ADULT_LONGEVITY_PARA_A", CFG_CUSTOM, -0.0047)
struct_Aphid::random_biomass_weight
double random_biomass_weight
Definition: Aphid_Population_Manager.h:82
cfg_PPAphidAlatePropParaB
CfgFloat cfg_PPAphidAlatePropParaB("PP_APHID_ALATE_PROP_PARA_B", CFG_CUSTOM, 10)
Aphid_Population_Manager::m_aphid_adult_mortality_inflection_point_dd
vector< double > m_aphid_adult_mortality_inflection_point_dd
The vector to store inflection point of accumulated day degrees for adult mortality.
Definition: Aphid_Population_Manager.h:187
Aphid_Population_Manager::m_aphid_sexual_reproduction_average_add
double m_aphid_sexual_reproduction_average_add
The average required accumulated degree days to enable sexual reproduction after the first egg hatche...
Definition: Aphid_Population_Manager.h:191
cfg_PEAAphidEggReproductionParaC
CfgFloat cfg_PEAAphidEggReproductionParaC("PEA_APHID_EGG_REPRODUCTION_PARA_C", CFG_CUSTOM, 24.8)
cfg_BBAphidEggHatchDelayDD
CfgFloat cfg_BBAphidEggHatchDelayDD("BB_APHID_EGG_HATCH_DELAY_DD", CFG_CUSTOM, 10)
cfg_PEAAphidAlatePropParaA
CfgFloat cfg_PEAAphidAlatePropParaA("PEA_APHID_ALATE_PROP_PARA_A", CFG_CUSTOM, 1.1)
Landscape::SupplyInterestedGreenBiomassTotal
double SupplyInterestedGreenBiomassTotal(int a_polyref)
Returns the interested green biomass of the vegetation+weeds using the polygon reference number a_pol...
Definition: Landscape.h:1607
cfg_PPAphidNymphMortalityParaB
CfgFloat cfg_PPAphidNymphMortalityParaB("PP_APHID_NYMPH_MORTALITY_PARA_B", CFG_CUSTOM, -0.059)
Landscape::SupplyPolyRefIndex
int SupplyPolyRefIndex(int a_x, int a_y)
Get the index to the m_elems array for a polygon at location x,y.
Definition: Landscape.h:2172
cfg_BBAphidDevelopmentBaseTempArray
CfgArray_Double cfg_BBAphidDevelopmentBaseTempArray("BB_APHID_DEVELOPMENT_BASE_TEMP_ARRAY", CFG_CUSTOM, 9, vector< double >{3.5, 2.73, 2.73, 2.73, 2.73, 2.73, 2.73, 2.73, 2.73})
cfg_EGAphidNymphMortalityParaA
CfgFloat cfg_EGAphidNymphMortalityParaA("EG_APHID_NYMPH_MORTALITY_PARA_A", CFG_CUSTOM, 0.0004)
The temperature related morality rate for Aphid nymphs and adults.
Aphid_Population_Manager::m_aphid_summer_host_day_length
double m_aphid_summer_host_day_length
The day length in minutes to turn on summer host. This is used for BB and PP.
Definition: Aphid_Population_Manager.h:185
cfg_EGAphidNymphDevDayDegNoWing
CfgFloat cfg_EGAphidNymphDevDayDegNoWing("EG_APHID_NYMPH_DEV_DAY_DEG_NO_WING", CFG_CUSTOM, 133)
Aphid_Population_Manager::m_aphid_female_reproduction_day_length
double m_aphid_female_reproduction_day_length
The day length in minutes for female reproduction. This is used for EG and PEA.
Definition: Aphid_Population_Manager.h:181
cfg_PPAphidHostFile
CfgStr cfg_PPAphidHostFile("PP_APHID_HOST_FILE", CFG_CUSTOM, "Subpopulation/peach_potato_aphid_host.txt")
cfg_PPAphidLongevityParaB
CfgFloat cfg_PPAphidLongevityParaB("PP_APHID_ADULT_LONGEVITY_PARA_B", CFG_CUSTOM, 1.892)
cfg_EGAphidEggReproductionParaC
CfgFloat cfg_EGAphidEggReproductionParaC("EG_APHID_EGG_REPRODUCTION_PARA_C", CFG_CUSTOM, 10.4)
cfg_BBAphidNymphDevDayDegWingStd
CfgFloat cfg_BBAphidNymphDevDayDegWingStd("BB_APHID_NYMPH_DEV_DAY_DEG_WING_STD", CFG_CUSTOM, 4.48)
cfg_PPAphidAdultMortality
CfgArray_Double cfg_PPAphidAdultMortality("PP_APHID_ADULT_MORTALITY", CFG_CUSTOM, 13, vector< double >{0.0776, 0.08673, 0.094967, 0.104932, 0.117233, 0.132802, 0.153139, 0.180832, 0.220751, 0.283286, 0.395257, 0.653595, 1})
cfg_AphidMaxWindSpeed
CfgFloat cfg_AphidMaxWindSpeed("APHID_MAX_WIND_SPEED", CFG_CUSTOM, 10)
The maximum speed that allows an aphid to fly.
cfg_BBAphidNymphDevDayDegNoWing
CfgFloat cfg_BBAphidNymphDevDayDegNoWing("BB_APHID_NYMPH_DEV_DAY_DEG_NO_WING", CFG_CUSTOM, 140)
struct_Aphid::winter_landscape_host
TTypesOfLandscapeElement winter_landscape_host
Definition: Aphid_Population_Manager.h:79
Landscape::SupplyDaylength
int SupplyDaylength(void)
Passes a request on to the associated Weather class function, the day length for the current day.
Definition: Landscape.h:2201
SubPopulation_Population_Manager::m_accumu_degree_days
blitz::Array< double, 2 > m_accumu_degree_days
Array for accumulated degree days for each life circle.
Definition: SubPopulation_Population_Manager.h:152
struct_Aphid::starting_suitability
double * starting_suitability
Starting suitability for the subpopulation.
Definition: Aphid_Population_Manager.h:74
Aphid_Population_Manager::m_is_ready_next_liff_func_pointer
bool(Aphid_Population_Manager::* m_is_ready_next_liff_func_pointer)(int a_life_stage)
THe function pointer for testing whether the given life stage is ready for the next one.
Definition: Aphid_Population_Manager.h:204
Aphid_Population_Manager::m_aphid_winter_host_day_length
double m_aphid_winter_host_day_length
THe day length in minutes to turn on winter host. This is used for BB and PP.
Definition: Aphid_Population_Manager.h:183
cfg_AphidMovMaskWindSpeedStepSize
CfgFloat cfg_AphidMovMaskWindSpeedStepSize("APHID_MOV_MASK_WIND_SPEED_STEP_SIZE", CFG_CUSTOM, 2)
The sampling number of wind speed used to calculate the movement masks.
cfg_BBAphidAlatePropParaB
CfgFloat cfg_BBAphidAlatePropParaB("BB_APHID_ALATE_PROP_PARA_B", CFG_CUSTOM, 10)
cfg_BBAphidEggHatchDelayThreshold
CfgFloat cfg_BBAphidEggHatchDelayThreshold("BB_APHID_EGG_HATCH_DELAY_THRESHOLD", CFG_CUSTOM, 0.9)
toas_PP
Definition: Aphid.h:67
cfg_AphidLandingSurvivalRateVec
CfgArray_Double cfg_AphidLandingSurvivalRateVec("APHID_LANDING_SURVIVAL_RATE_VEC", CFG_CUSTOM, 4, vector< double >{1.0, 1.0, 1.0, 1.0})
The survival rate of landing for flying.
struct_Aphid::empty_flag
bool empty_flag
Indicator show whether it is an empty subpopulation.
Definition: Aphid_Population_Manager.h:72
cfg_PPAphidEggReproductionParaB
CfgFloat cfg_PPAphidEggReproductionParaB("PP_APHID_EGG_REPRODUCTION_PARA_B", CFG_CUSTOM, -0.266)
cfg_EGAphidNymphReproductionParaA2
CfgFloat cfg_EGAphidNymphReproductionParaA2("EG_APHID_NYMPH_REPRODUCTION_PARA_A2", CFG_CUSTOM, -0.0146)
cfg_BBAphidAdultMortalityParaB
CfgFloat cfg_BBAphidAdultMortalityParaB("BB_APHID_ADULT_MORTALITY_PARA_B", CFG_CUSTOM, -0.0115)
cfg_EGAphidNymphReproductionParaA1
CfgFloat cfg_EGAphidNymphReproductionParaA1("EG_APHID_NYMPH_REPRODUCTION_PARA_A1", CFG_CUSTOM, 0.0562)
The parameters for nymph reproduction.
SubPopulation_Population_Manager::m_sub_w
int m_sub_w
Variable to record the width of the subpopulation cell.
Definition: SubPopulation_Population_Manager.h:107
toa_Aptera
Definition: Aphid.h:52
toa_Egg
Definition: Aphid.h:47
SubPopulation_Population_Manager::m_winter_host_on
bool m_winter_host_on
The flag to enalble winter host.
Definition: SubPopulation_Population_Manager.h:206