![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <PoecilusCupreus_All.h>
Public Member Functions | |
PoecilusCupreus_Population_Manager (Landscape *a_l_ptr) | |
Constructor. More... | |
~PoecilusCupreus_Population_Manager () override=default | |
Destructor: the same as in base class. More... | |
void | CreateObjects (int ob_type, TAnimal *a_pvo_ptr, void *null, Struct_Beetle *a_data, int a_number) override |
Method to add beetles to the population. More... | |
bool | OnFarmEvent (FarmToDo a_event, Beetle_Base *a_caller) override |
Method dealing with the farming mortalities. More... | |
bool | OnFarmEventPupae (FarmToDo event, Beetle_Base *a_caller) override |
Method dealing with the farming mortalities this differs for pupae. More... | |
void | CalculateDailyEggProduction (double a_temp) override |
Figure out the maximum number of eggs that can be laid today - must be overridden in descendent classes. More... | |
double | GetEggFormationProgress (int a_day) const |
Returns the current progress towards egg formation based on a given date to become reproductively active. More... | |
double | GetOvipositionPeriodProgress (int a_day) const |
Returns the current progress towards ending the oviposition period based on the first active day. More... | |
double | CalcDailyEggFormationProgress (double a_temp) |
Calculates the additional development for egg formation for today. More... | |
void | CalcDailyRandomEggFactor (double a_temp) |
Updates DailyRandomEggFactor. Should be called daily More... | |
void | CalcDormancyChance (double a_temp, int a_day) |
Updates probability of enterning dormancy. Should be called daily More... | |
void | CalcDormancyExitChance (double a_temp, int a_day) |
Updates probability of leaving dormancy. Should be called daily More... | |
bool | FertilizerMortality (FarmToDo a_event) |
The method that deals with the fertilizer mortality for the larvae. More... | |
void | SetPc_Treatment_Mortalities () |
Hard-coded for now method to set fertilizer mortality chances. More... | |
double | GetDormancyChance () const |
Get the daily chance to enter dormancy. More... | |
double | GetDormancyExitChance () const |
Get the daily chance to exit dormancy. More... | |
void | DoLast () override |
Adds output adult locations to DoLast. More... | |
![]() | |
Beetle_Population_Manager (Landscape *a_l_ptr, int a_n) | |
Beetle_Population_Manager Constructor. More... | |
~Beetle_Population_Manager () override | |
Beetle_Population_Manager Destructor. More... | |
void | DoFirst () override |
Does day degree development calculations here. More... | |
void | DoBefore () override |
Replaces the Step function for the Egg_List. More... | |
unsigned | Probe (int a_ListIndex, Probe_Data *a_TheProbe_ptr) override |
Overides the Population_Manager::Probe method. More... | |
int | SupplyEggPopSize () const |
Get egg population size. More... | |
int | SupplyDailyEggPopSize (const int day) const |
Get the number of eggs created on a given day. More... | |
void | SupplyEggLocXY (unsigned day, int j, int &x, int &y) const |
Get the location of an egg from a given day. More... | |
double | SupplyDevelConst1 (unsigned a_index) const |
virtual double | SupplyDayDegs (const unsigned a_stage, const int a_day) |
Get the day degress experienced this year for a specific day created and instar/stage. More... | |
unsigned | GetPopulationSize (int) override |
Returns the population size of the lifestage type bobType. More... | |
void | OpenTheAOROutputProbe (const string &a_AORFilename) override |
Opens the AOR output file. More... | |
void | DoBeetleActiveProbe (int a_lifestage) |
Counts all active beetles and saves the results to a file. More... | |
void | SetStageProductionRecord (int a_value, int a_stage) |
Sets stage production record attribute. More... | |
int | GetStageProductionRecord (int a_stage) const |
Gets the stage production record attribute. More... | |
void | AddStageProductionRecord (int a_value, int a_stage) |
Adds to the stage production record attribute. More... | |
![]() | |
Population_Manager (Landscape *a_l_ptr, int a_numberLifeStages=12) | |
virtual | ~Population_Manager (void) |
void | SetNoProbesAndSpeciesSpecificFunctions (int a_pn) override |
Sets up probe and species specifics. More... | |
unsigned | GetLiveArraySize (int a_listindex) override |
Gets the number of 'live' objects for a list index in the TheArray. More... | |
void | IncLiveArraySize (int a_listindex) |
Increments the number of 'live' objects for a list index in the TheArray. More... | |
unsigned int | FarmAnimalCensus (unsigned int a_farm, unsigned int a_typeofanimal) |
char * | SpeciesSpecificReporting (int a_species, int a_time) override |
char * | ProbeReport (int a_time) |
char * | ProbeReportTimed (int a_time) |
void | ImpactProbeReport (int a_Time) |
bool | BeginningOfMonth () |
void | LOG (const char *fname) |
int | SupplyStepSize () const |
void | Run (int NoTSteps) override |
virtual void | ImpactedProbe () |
virtual TAnimal * | SupplyAnimalPtr (unsigned int a_index, unsigned int a_animal) |
Returns the pointer indexed by a_index and a_animal. Note NO RANGE CHECK. More... | |
virtual unsigned | SupplyListIndexSize () |
unsigned | SupplyListSize (unsigned listindex) const |
void | PushIndividual (const unsigned a_listindex, TAnimal *a_individual_ptr) |
const char * | SupplyStateNames (int i) const |
unsigned | SupplyStateNamesLength () const |
virtual void | DisplayLocations () |
TAnimal * | FindIndividual (unsigned Type, TAnimal *a_me) |
virtual TAnimal * | FindClosest (int x, int y, unsigned Type, TAnimal *a_me) |
omp_nest_lock_t * | GetGuardMapElement (unsigned a_x_index, unsigned a_y_index) |
Return the guard map cell. More... | |
void | SetGuardMapElement (unsigned a_x_index, unsigned a_y_index) |
Set the given guard map cell. More... | |
void | UnsetGuardMapElement (unsigned a_x_index, unsigned a_y_index) |
Unset the given guard map cell. More... | |
void | UpdateGuardMap (int a_x, int a_y, int &a_index_x, int &a_index_y) |
Get the index of the guard map for the given location. More... | |
bool | OpenTheRipleysOutputProbe () |
bool | OpenTheMonthlyRipleysOutputProbe () |
bool | OpenTheReallyBigProbe () |
void | CloseTheMonthlyRipleysOutputProbe () const |
virtual void | CloseTheRipleysOutputProbe () |
virtual void | CloseTheReallyBigOutputProbe () |
TTypesOfPopulation | GetPopulationType () |
int | GetSeasonNumber () |
Get the season number. More... | |
void | LamdaDeath (int x, int y) |
void | LamdaBirth (int x, int y) |
void | LamdaBirth (int x, int y, int z) |
void | LamdaClear () |
void | LamdaDumpOutput () |
virtual int | SupplyPegPosx (int) |
virtual int | SupplyPegPosy (int) |
virtual int | SupplyCovPosx (int) |
virtual int | SupplyCovPosy (int) |
virtual bool | OpenTheFledgelingProbe () |
virtual bool | OpenTheBreedingPairsProbe () |
virtual bool | OpenTheBreedingSuccessProbe () |
virtual void | BreedingPairsOutput (int) |
virtual int | TheBreedingFemalesProbe (int) |
virtual int | TheFledgelingProbe () |
virtual void | BreedingSuccessProbeOutput (double, int, int, int, int, int, int, int) |
virtual int | TheBreedingSuccessProbe (int &, int &, int &, int &, int &, int &) |
virtual void | FledgelingProbeOutput (int, int) |
virtual void | TheGeneticProbe (unsigned, int, unsigned &) |
virtual void | GeneticsResultsOutput (FILE *, unsigned) |
void | Debug_Shuffle (unsigned int Type) |
virtual void | RunStepMethods () |
![]() | |
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... | |
int | SupplyListNameLength () const |
const char * | SupplyListName (int a_i) const |
Get a list name from the list. More... | |
virtual void | SupplyLocXY (unsigned, unsigned, int &, int &) |
A stub for identifying an individual at a location. More... | |
virtual TAnimal * | FindClosest (int, int, unsigned) |
A stub for identifying an individual at a location. More... | |
std::string | SupplySimulationName () |
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... | |
Static Public Member Functions | |
static double | CalcOvipositionLength (double a_temp) |
Uses day degrees to determine when the oviposition period is over. More... | |
Public Attributes | |
TTreatmentvsMortalityList | m_Pc_Treatment_Mortalities |
The list that summarises farming events that involve fertilizer applications and the mortalities they cause. More... | |
![]() | |
long | m_EPopSize {0} |
To store the current population size. More... | |
std::unique_ptr< MovementMap > | m_MoveMap |
Map of suitability for movement. More... | |
std::unique_ptr< std::vector< std::unique_ptr< Beetle_Egg_List > > > | m_EList {nullptr} |
Replacement for TheArray[0]. More... | |
![]() | |
bool | ProbesSet {} |
![]() | |
Probe_Data * | TheProbe [100] = {nullptr} |
Holds a list of pointers to standard output probes. More... | |
Protected Member Functions | |
void | DayDegreeCalculations (int a_dayinyear, bool a_usehourly) override |
Does day degree development calculations here. More... | |
![]() | |
void | Catastrophe () override |
Method to arbitrarily alter populations size. More... | |
void | Catastrophe2 () |
Method to arbitrarily alter populations size restricted spatially. More... | |
void | TheRipleysOutputProbe (ofstream *a_prb) override |
Special output functionality. More... | |
void | TheReallyBigOutputProbe () override |
Special output functionality. More... | |
void | TheAOROutputProbe () override |
Special output functionality. More... | |
bool | IsStartHabitat (int a_x, int a_y) const |
Used to specify legal starting habitats for simulation start-up. More... | |
bool | IsStartHabitatAux (TTypesOfLandscapeElement tole) const |
Used to specify legal starting habitats for simulation start-up. More... | |
virtual void | DoExtremeTempActions (double a_airtemp) |
Species specific actions to cope with response to extreme temperature, if needed. More... | |
virtual void | DoEggDailyMortalityActions (double a_atemptoday) |
Species specific actions to cope with temperature related egg mortality. More... | |
virtual void | DoLarvalDailyMortalityActions (double a_atemptoday) |
Species specific actions to cope with temperature related laval mortality. More... | |
void | SetAdultEggLayingThreshold (const double a_value) |
Set the temperature threshold for egg laying. More... | |
void | incInField () |
Increments in field counter. More... | |
void | incInCrop () |
Increments in crop counter. More... | |
void | incOffField () |
Increments off field counter. More... | |
void | PestMortLocOutput () |
Annual pesticide mortality locations output. More... | |
![]() | |
virtual bool | StepFinished () |
Methods to run the simulations. More... | |
virtual void | DoAfter () |
virtual void | DoSpecialBetweenLifeStages (int a_life_stage) |
virtual void | SortX (unsigned Type) |
void | SortXIndex (unsigned Type) |
virtual void | SortY (unsigned Type) |
void | SortState (unsigned Type) |
void | SortStateR (unsigned Type) |
virtual unsigned | PartitionLiveDead (unsigned Type) |
virtual void | Shuffle_or_Sort (unsigned Type) |
virtual void | Shuffle (unsigned Type) |
![]() | |
~Population_Manager_Base ()=default | |
Static Protected Member Functions | |
static void | SetMeanDistance (double a_temp) |
Determines the base distance moved today. More... | |
![]() | |
static void | PestMortLocOutputOpen () |
Annual pesticide mortality output file open. More... | |
static void | PestMortLocOutputError () |
Pesticide mortality output error handling. More... | |
Protected Attributes | |
double | m_CurrentEggFormationProgress {0.0} |
double | m_DailyEggVariance {0.0} |
Used to store the daily variance in egg production. More... | |
double | m_DormancyChance {0.0} |
Used to store the daily chance to enter dormancy. More... | |
double | m_DormancyExitChance {0.0} |
Used to store the daily chance to exit dormancy. More... | |
std::array< double, 365 > | m_EggFormationProgress {} |
Storage for daily eggformation progress. More... | |
std::array< double, 365 > | m_OvipostitionlengthProgress {} |
Storage for daily oviposition period progress. More... | |
double | m_Dormancy_threshold {5.0} |
Threshold temeperature. eac h day below that temperature increases hibernation chances. More... | |
double | m_Dormancy_multiplier {1.2} |
The multiplier to apply if below the threshold dormancy_threshold. More... | |
double | m_Dormancy_exit_threshold {8.0} |
Threshold for dormancy exit temperature. each day above that temperature increases hibernation exit chances. More... | |
double | m_Dormancy_exit_multiplier {1.2} |
The multiplier to apply if above the threshold dormancy_exit_threshold. More... | |
double | m_PoecilusDailyEggFactorA {0.0} |
Parameter a used to calculate the number of eggs laid per day. More... | |
double | m_PoecilusDailyEggFactorB {0.0} |
Parameter b used to calculate the number of eggs laid per day. More... | |
double | m_PoecilusDailyEggFactorC {0.0} |
Parameter c used to calculate the number of eggs laid per day. More... | |
double | m_PoecilusDailyVarianceEggFactorA {0.0} |
Parameter a used to calculate variance in the number of eggs laid per day. More... | |
double | m_PoecilusDailyVarianceEggFactorB {0.0} |
Parameter b used to calculate variance in the number of eggs laid per day. More... | |
double | m_PoecilusDailyVarianceEggFactorC {0.0} |
Parameter c used to calculate variance in the number of eggs laid per day. More... | |
int | m_PoecilusDormancyStartDateEarly {} |
Earliest day in the year for entering dormancy. More... | |
int | m_PoecilusDormancyStartDate {} |
Typical day in the year for entering dormancy. More... | |
int | m_PoecilusDormancyExitDateEarly {} |
Earliest day in the year for leaving dormancy. More... | |
int | m_PoecilusDormancyExitDate {} |
Latest day in the year for leaving dormancy. More... | |
double | m_PoecilusStandardDormancyChance {} |
Base chance per day of entering dormancy. More... | |
double | m_PoecilusStandardDormancyExitChance {} |
Base chance per day of leaving dormancy. More... | |
double | m_PreOviRate |
Rate of change with temperature for preovipostion development (calculated from other configs) More... | |
![]() | |
double | m_MortalityTempStep {5.0} |
Threshold temperatures for mortalities: Step size. More... | |
double | m_MortalityTempMin {0.0} |
hreshold temperatures for mortalities: Min More... | |
double | m_MortalityTempMax {25.0} |
Threshold temperatures for mortalities: Max. More... | |
int | m_TemperatureCategory { 0 } |
Storage for the temperature category today. More... | |
int | m_NoTemperatureCategories { 0 } |
Storage for the number of temperature categories used. More... | |
vector< std::array< double, 365 > > | m_DayDegs {} |
Storage for daily day degrees for non-adult stages. More... | |
TToleList | m_BeetleStartHabitats |
the list of the toles that the beetles are assigned to in the beginning of the simulation More... | |
tBeetleToleTovs | m_BeetleToleTovs |
The list of start habitats for the beetle. More... | |
int | m_BeetleLarvalStagesNum { 3 } |
vector< int > | m_StageProductionProduction { 0 } |
Testing/Output attribute holding the number of larvae produced today. More... | |
double | m_AdultEggLayingThreshold {} |
Temperature threshold for egg laying. More... | |
double | m_EggProductionSlope {} |
the slope of the linear function that defines todays egg production More... | |
vector< double > | m_DevelConst1 {} |
Day degree threshold constant for eggs to pupae. More... | |
vector< double > | m_DevelopmentInflectionPoints {} |
Inflection point in day degree calculations for non-adult stages. More... | |
vector< double > | m_AboveInflectionRates {} |
Day degree constant above inflection point for all non-adult stages. More... | |
vector< SimplePositionMapInt * > | m_BeetlePositionMaps [bob_foobar] {} |
int | m_InFieldNo {} |
In-field counter. More... | |
int | m_InCropNo {} |
In-crop counter. More... | |
int | m_OffFieldNo {} |
Off-field counter. More... | |
TTypesOfVegetation | m_InCropRef {} |
In crop tole reference. More... | |
![]() | |
vector< unsigned > | m_LiveArraySize |
int | m_NoProbes = 0 |
std::vector< std::vector< omp_nest_lock_t * > > | m_MapGuard |
This is used to make sure animals will not behaviour at the same area - multi threads. More... | |
int | m_guard_cell_height_num |
int | m_guard_cell_width_num |
int | m_guard_cell_size |
bool | m_is_paralleled |
This is used to indicate whether the species is paralleled. More... | |
const char * | StateNames [100] {} |
int | m_StepSize {} |
vector< vector< forward_list< TAnimal * > * > > | TheSubArrays |
Hold all the animal pointers. More... | |
vector< vector< int > > | TheSubArraysSizes |
Hold all the animal sizes in each thread. More... | |
vector< int > | m_LifeStageOrderVec |
The vector to store the life stage order for looping specie life stages. More... | |
vector< forward_list< TAnimal * >::iterator > | TheSubArraysIterators |
the iterator from last time called for SupplyAnimalPtr(), this for fast loop all the animals in the derived class. More... | |
vector< int > | TheSubArrayPreviousIndex |
the animal index number from last time called for SupplyAnimalPtr(), this for fast loop all the animals in the derived class. More... | |
vector< int > | TheSubArrayThreadIndex |
the thread index number from last time called for SupplyAnimalPtr(), this for fast loop all the animals in the derived class. More... | |
unsigned | StateNamesLength |
FILE * | TestFile {} |
FILE * | TestFile2 {} |
vector< unsigned > | BeforeStepActions |
Holds the season list of possible before step actions. More... | |
int | m_SeasonNumber |
Holds the season number. Used when running goose and hunter sims. More... | |
TTypesOfPopulation | m_population_type {TOP_NoSpecies} |
ofstream * | AOROutputPrb {} |
ofstream * | RipleysOutputPrb {} |
ofstream * | RipleysOutputPrb1 {} |
ofstream * | RipleysOutputPrb2 {} |
ofstream * | RipleysOutputPrb3 {} |
ofstream * | RipleysOutputPrb4 {} |
ofstream * | RipleysOutputPrb5 {} |
ofstream * | RipleysOutputPrb6 {} |
ofstream * | RipleysOutputPrb7 {} |
ofstream * | RipleysOutputPrb8 {} |
ofstream * | RipleysOutputPrb9 {} |
ofstream * | RipleysOutputPrb10 {} |
ofstream * | RipleysOutputPrb11 {} |
ofstream * | RipleysOutputPrb12 {} |
ofstream * | ReallyBigOutputPrb {} |
AOR_Probe * | m_AOR_Probe {} |
A pointer to the AOR probe. More... | |
long int | lamdagrid [2][257][257] {} |
![]() | |
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... | |
Landscape * | m_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... | |
PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager | ( | Landscape * | a_l_ptr | ) |
Constructor.
References bob_Adult, cfg_BeetleInCropRef, cfg_BeetleLarvalStagesNum, cfg_Beetlestartnos, cfg_dormancy_exit_multiplier, cfg_dormancy_exit_threshold, cfg_dormancy_multiplier, cfg_dormancy_threshold, cfg_EggFormationThreshold, cfg_PoecilusADDepMort0, cfg_PoecilusADDepMort1, cfg_PoecilusAdultMovementTempThreshold, cfg_PoecilusCoverThreshold, cfg_PoecilusDailyEggFactorA, cfg_PoecilusDailyEggFactorB, cfg_PoecilusDailyEggFactorC, cfg_PoecilusDailyEggMort, cfg_PoecilusDailyLarvalMort, cfg_PoecilusDailyVarianceEggFactorA, cfg_PoecilusDailyVarianceEggFactorB, cfg_PoecilusDailyVarianceEggFactorC, cfg_PoecilusDDepRange, cfg_PoecilusDevelopmentConstants, cfg_PoecilusDevelopmentThresholds, cfg_PoecilusDormancyExitDate, cfg_PoecilusDormancyExitDateEarly, cfg_PoecilusDormancyStartDate, cfg_PoecilusDormancyStartDateEarly, cfg_PoecilusLarvalDailyTemperatureMort, cfg_PoecilusLarvalMortCategories, cfg_PoecilusLDDepMort0, cfg_PoecilusLDDepMort1, cfg_PoecilusPreOviMax, cfg_PoecilusPreOviMaxTemp, cfg_PoecilusPreOviMin, cfg_PoecilusPreOviMinTemp, cfg_PoecilusStandardDormancyChance, cfg_PoecilusStandardDormancyExitChance, cfg_PoecilusTempShadowThreshold, CreateObjects(), g_random_fnc(), Beetle_Population_Manager::IsStartHabitat(), Beetle_Population_Manager::m_BeetleLarvalStagesNum, Beetle_Population_Manager::m_DayDegs, Beetle_Population_Manager::m_DevelConst1, m_Dormancy_exit_multiplier, m_Dormancy_exit_threshold, m_Dormancy_multiplier, m_Dormancy_threshold, Beetle_Population_Manager::m_InCropNo, Beetle_Population_Manager::m_InCropRef, Beetle_Population_Manager::m_InFieldNo, Beetle_Population_Manager::m_OffFieldNo, m_PoecilusDailyEggFactorA, m_PoecilusDailyEggFactorB, m_PoecilusDailyEggFactorC, m_PoecilusDailyVarianceEggFactorA, m_PoecilusDailyVarianceEggFactorB, m_PoecilusDailyVarianceEggFactorC, m_PoecilusDormancyExitDate, m_PoecilusDormancyExitDateEarly, m_PoecilusDormancyStartDate, m_PoecilusDormancyStartDateEarly, m_PoecilusStandardDormancyChance, m_PoecilusStandardDormancyExitChance, Population_Manager::m_population_type, m_PreOviRate, Population_Manager_Base::m_SimulationName, Population_Manager_Base::m_TheLandscape, Struct_Beetle::m_x, Struct_Beetle::m_y, Beetle_Adult::SetAdultDenDepMort0(), Beetle_Adult::SetAdultDenDepMort1(), Beetle_Adult::SetAdultMovementTempThreshold(), Beetle_Egg_List::SetDailyEggMort(), Beetle_Larvae::SetDailyLarvaMort(), Beetle_Base::SetDDepRange(), Beetle_Base::SetDevelopmentConstants(), PoecilusCupreus_Adult::SetEggFormationThreshold(), Beetle_Larvae::SetLarvalDailyMort(), Beetle_Larvae::SetLDDepMort0(), Beetle_Larvae::SetLDDepMort1(), SetPc_Treatment_Mortalities(), PoecilusCupreus_Adult::SetPoecilusLaiCoverThreshold(), PoecilusCupreus_Adult::SetPoecilusTempShadowThreshold(), Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), Population_Manager::TheSubArrays, tobs_Hibernating, TOP_PoecilusCupreus, Landscape::TranslateVegTypes(), CfgInt::value(), CfgFloat::value(), and CfgArray_Double::value().
|
overridedefault |
Destructor: the same as in base class.
double PoecilusCupreus_Population_Manager::CalcDailyEggFormationProgress | ( | double | a_temp | ) |
Calculates the additional development for egg formation for today.
References cfg_PoecilusPreOviFactorA, cfg_PoecilusPreOviFactorB, cfg_PoecilusPreOviFactorC, cfg_PoecilusPreOviMax, cfg_PoecilusPreOviMaxTemp, cfg_PoecilusPreOviMin, cfg_PoecilusPreOviMinTemp, and CfgFloat::value().
Referenced by DayDegreeCalculations().
void PoecilusCupreus_Population_Manager::CalcDailyRandomEggFactor | ( | double | a_temp | ) |
Updates DailyRandomEggFactor. Should be called daily
References m_DailyEggVariance, m_PoecilusDailyVarianceEggFactorA, m_PoecilusDailyVarianceEggFactorB, and m_PoecilusDailyVarianceEggFactorC.
void PoecilusCupreus_Population_Manager::CalcDormancyChance | ( | double | a_temp, |
int | a_day | ||
) |
Updates probability of enterning dormancy. Should be called daily
Updates m_DormancyChance. Should be called daily temp is a MINIMUM temperature
References m_Dormancy_multiplier, m_Dormancy_threshold, m_DormancyChance, m_PoecilusDormancyStartDate, m_PoecilusDormancyStartDateEarly, and m_PoecilusStandardDormancyChance.
Referenced by DayDegreeCalculations().
void PoecilusCupreus_Population_Manager::CalcDormancyExitChance | ( | double | a_temp, |
int | a_day | ||
) |
Updates probability of leaving dormancy. Should be called daily
Updates m_DormancyExitChance. Should be called daily temp is a MAXIMUM temperature
References m_Dormancy_exit_multiplier, m_Dormancy_exit_threshold, m_DormancyExitChance, m_PoecilusDormancyExitDate, m_PoecilusDormancyExitDateEarly, and m_PoecilusStandardDormancyExitChance.
Referenced by DayDegreeCalculations().
|
static |
Uses day degrees to determine when the oviposition period is over.
References cfg_PoecilusOvipositionLength_A, cfg_PoecilusOvipositionLength_B, cfg_PoecilusOvipositionLength_C, and CfgFloat::value().
Referenced by DayDegreeCalculations().
|
overridevirtual |
Figure out the maximum number of eggs that can be laid today - must be overridden in descendent classes.
Implements Beetle_Population_Manager.
References m_PoecilusDailyEggFactorA, m_PoecilusDailyEggFactorB, m_PoecilusDailyEggFactorC, and Beetle_Adult::SetTodaysEggProduction().
|
overridevirtual |
Method to add beetles to the population.
All PoecilusCupreus objects that are created must be created using this method. Data on the location and other attributes are passed in data, and the a_number to create in a_number.
Reimplemented from Beetle_Population_Manager.
References bob_Adult, bob_Egg, bob_Larva1, bob_Larva2, bob_Larva3, bob_Pupa, Population_Manager::IncLiveArraySize(), Struct_Beetle::m_l, Struct_Beetle::m_x, Struct_Beetle::m_y, Population_Manager::PushIndividual(), and Landscape::SupplyDayInYear().
Referenced by PoecilusCupreus_Population_Manager().
|
overrideprotectedvirtual |
Does day degree development calculations here.
Reimplemented from Beetle_Population_Manager.
References CalcDailyEggFormationProgress(), CalcDormancyChance(), CalcDormancyExitChance(), CalcOvipositionLength(), Beetle_Population_Manager::DayDegreeCalculations(), m_EggFormationProgress, m_OvipostitionlengthProgress, Population_Manager_Base::m_TheLandscape, SetMeanDistance(), Landscape::SupplyMaxTemp(), Landscape::SupplyMinTemp(), and Landscape::SupplyTemp().
|
inlineoverridevirtual |
Adds output adult locations to DoLast.
Reimplemented from Beetle_Population_Manager.
References bob_Adult, Beetle_Population_Manager::Catastrophe(), Beetle_Population_Manager::Catastrophe2(), and Beetle_Population_Manager::DoBeetleActiveProbe().
bool PoecilusCupreus_Population_Manager::FertilizerMortality | ( | FarmToDo | a_event | ) |
The method that deals with the fertilizer mortality for the larvae.
References g_rand_uni_fnc(), and m_Pc_Treatment_Mortalities.
Referenced by OnFarmEventPupae().
|
inline |
Get the daily chance to enter dormancy.
References m_DormancyChance.
Referenced by PoecilusCupreus_Adult::CheckDormancy().
|
inline |
Get the daily chance to exit dormancy.
References m_DormancyExitChance.
Referenced by PoecilusCupreus_Adult::CheckDormancyExit().
|
inline |
Returns the current progress towards egg formation based on a given date to become reproductively active.
References m_EggFormationProgress.
Referenced by PoecilusCupreus_Adult::CheckReproduction().
|
inline |
Returns the current progress towards ending the oviposition period based on the first active day.
References m_OvipostitionlengthProgress.
Referenced by PoecilusCupreus_Adult::Ageing(), and PoecilusCupreus_Adult::CheckReproduction().
|
overridevirtual |
Method dealing with the farming mortalities.
Checks for any impact(usually mortality) as a result of a farm event.
a_event | is the farm event to test mortality against |
a_caller | is a pointer to the calling beetle object |
Implements Beetle_Population_Manager.
References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, autumn_sow_with_ferti, bed_forming, biocide, bulb_harvest, burn_straw_stubble, burn_top, cattle_out, cattle_out_low, cfg_biocide_reduction_val, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, fa_ammoniumsulphate, fa_boron, fa_calcium, fa_cu, fa_greenmanure, fa_k, fa_manganesesulphate, fa_manure, fa_n, fa_nk, fa_npk, fa_npks, fa_p, fa_pk, fa_pks, fa_rsm, fa_sk, fa_sludge, fa_slurry, fiber_covering, fiber_removal, flammebehandling, flower_cutting, fp_ammoniumsulphate, fp_boron, fp_calcium, fp_cu, fp_greenmanure, fp_k, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_n, fp_nc, fp_nk, fp_npk, fp_npks, fp_ns, fp_p, fp_pk, fp_pks, fp_rsm, fp_sk, fp_sludge, fp_slurry, fungicide_treat, g_rand_uni_fnc(), Beetle_Base::GetHarvestMortality(), Beetle_Base::GetInsecticideApplication(), Beetle_Base::GetSoilCultivationMortality(), Beetle_Base::GetStriglingMortality(), glyphosate, green_harvest, growth_regulator, harvest, harvest_bushfruit, harvestshoots, hay_bailing, hay_turning, heavy_cultivator_aggregate, herbicide_treat, hilling_up, insecticide_treat, last_treatment, manual_weeding, molluscicide, mow, org_fungicide, org_herbicide, org_insecticide, pigs_out, preseeding_cultivator, preseeding_cultivator_sow, product_treat, pruning, row_cultivation, shallow_harrow, shredding, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, spring_sow_with_ferti, start, straw_chopping, straw_covering, straw_removal, strigling, strigling_hill, strigling_sow, stubble_cultivator_heavy, stubble_harrowing, stubble_plough, swathing, syninsecticide_treat, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgFloat::value(), water, and winter_plough.
Referenced by OnFarmEventPupae().
|
overridevirtual |
Method dealing with the farming mortalities this differs for pupae.
Reimplemented from Beetle_Population_Manager.
References FertilizerMortality(), and OnFarmEvent().
|
staticprotected |
Determines the base distance moved today.
References cfg_PoecilusAdultMovementTempThreshold, cfg_PoecilusMoveDistanceParamA, cfg_PoecilusMoveDistanceParamB, Beetle_Base::SetMoveDistribution(), and CfgFloat::value().
Referenced by DayDegreeCalculations().
void PoecilusCupreus_Population_Manager::SetPc_Treatment_Mortalities | ( | ) |
Hard-coded for now method to set fertilizer mortality chances.
References fa_ammoniumsulphate, fa_boron, fa_calcium, fa_cu, fa_k, fa_manganesesulphate, fa_npk, fa_npks, fa_p, fa_pk, fa_rsm, fa_sk, fp_ammoniumsulphate, fp_boron, fp_calcium, fp_cu, fp_k, fp_liquidNH3, fp_manganesesulphate, fp_npk, fp_npks, fp_p, fp_rsm, fungicide_treat, herbicide_treat, and m_Pc_Treatment_Mortalities.
Referenced by PoecilusCupreus_Population_Manager().
|
protected |
/brief The current sum for completion of egg formation
|
protected |
Used to store the daily variance in egg production.
Referenced by CalcDailyRandomEggFactor().
|
protected |
The multiplier to apply if above the threshold dormancy_exit_threshold.
Referenced by CalcDormancyExitChance(), and PoecilusCupreus_Population_Manager().
|
protected |
Threshold for dormancy exit temperature. each day above that temperature increases hibernation exit chances.
Referenced by CalcDormancyExitChance(), and PoecilusCupreus_Population_Manager().
|
protected |
The multiplier to apply if below the threshold dormancy_threshold.
Referenced by CalcDormancyChance(), and PoecilusCupreus_Population_Manager().
|
protected |
Threshold temeperature. eac h day below that temperature increases hibernation chances.
Referenced by CalcDormancyChance(), and PoecilusCupreus_Population_Manager().
|
protected |
Used to store the daily chance to enter dormancy.
Referenced by CalcDormancyChance(), and GetDormancyChance().
|
protected |
Used to store the daily chance to exit dormancy.
Referenced by CalcDormancyExitChance(), and GetDormancyExitChance().
|
protected |
Storage for daily eggformation progress.
Referenced by DayDegreeCalculations(), and GetEggFormationProgress().
|
protected |
Storage for daily oviposition period progress.
Referenced by DayDegreeCalculations(), and GetOvipositionPeriodProgress().
TTreatmentvsMortalityList PoecilusCupreus_Population_Manager::m_Pc_Treatment_Mortalities |
The list that summarises farming events that involve fertilizer applications and the mortalities they cause.
Referenced by FertilizerMortality(), and SetPc_Treatment_Mortalities().
|
protected |
Parameter a used to calculate the number of eggs laid per day.
Referenced by CalculateDailyEggProduction(), and PoecilusCupreus_Population_Manager().
|
protected |
Parameter b used to calculate the number of eggs laid per day.
Referenced by CalculateDailyEggProduction(), and PoecilusCupreus_Population_Manager().
|
protected |
Parameter c used to calculate the number of eggs laid per day.
Referenced by CalculateDailyEggProduction(), and PoecilusCupreus_Population_Manager().
|
protected |
Parameter a used to calculate variance in the number of eggs laid per day.
Referenced by CalcDailyRandomEggFactor(), and PoecilusCupreus_Population_Manager().
|
protected |
Parameter b used to calculate variance in the number of eggs laid per day.
Referenced by CalcDailyRandomEggFactor(), and PoecilusCupreus_Population_Manager().
|
protected |
Parameter c used to calculate variance in the number of eggs laid per day.
Referenced by CalcDailyRandomEggFactor(), and PoecilusCupreus_Population_Manager().
|
protected |
Latest day in the year for leaving dormancy.
Referenced by CalcDormancyExitChance(), and PoecilusCupreus_Population_Manager().
|
protected |
Earliest day in the year for leaving dormancy.
Referenced by CalcDormancyExitChance(), and PoecilusCupreus_Population_Manager().
|
protected |
Typical day in the year for entering dormancy.
Referenced by CalcDormancyChance(), and PoecilusCupreus_Population_Manager().
|
protected |
Earliest day in the year for entering dormancy.
Referenced by CalcDormancyChance(), and PoecilusCupreus_Population_Manager().
|
protected |
Base chance per day of entering dormancy.
Referenced by CalcDormancyChance(), and PoecilusCupreus_Population_Manager().
|
protected |
Base chance per day of leaving dormancy.
Referenced by CalcDormancyExitChance(), and PoecilusCupreus_Population_Manager().
|
protected |
Rate of change with temperature for preovipostion development (calculated from other configs)
Referenced by PoecilusCupreus_Population_Manager().