ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
The population manager class for beetles. More...
#include <Beetle_BaseClasses.h>
Public Member Functions | |
Beetle_Population_Manager (Landscape *a_l_ptr, int a_n) | |
Beetle_Population_Manager Constructor. More... | |
~Beetle_Population_Manager () override | |
Beetle_Population_Manager Destructor. More... | |
virtual void | CreateObjects (int, TAnimal *, void *, Struct_Beetle *, int) |
Method to add beetles to the population - it must be overridden in all descendent classes. More... | |
void | DoFirst () override |
Does day degree development calculations here. More... | |
void | DoBefore () override |
Replaces the Step function for the Egg_List. More... | |
void | DoLast () override |
Adds output adult locations to DoLast. 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... | |
virtual bool | OnFarmEvent (FarmToDo event, Beetle_Base *a_caller)=0 |
Used to determine mortality based on an event for any beetle class - pure vitual must be overriden. More... | |
virtual bool | OnFarmEventPupae (FarmToDo event, Beetle_Base *a_caller) |
Used to determine mortality based on an event for any beetle class - not a pure vitual but must be overriden if needed. 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... | |
Public Member Functions inherited from Population_Manager | |
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 () |
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... | |
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... | |
Public Attributes | |
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... | |
Public Attributes inherited from Population_Manager | |
bool | ProbesSet {} |
Public Attributes inherited from Population_Manager_Base | |
Probe_Data * | TheProbe [100] = {nullptr} |
Holds a list of pointers to standard output probes. More... | |
Protected Member Functions | |
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... | |
virtual void | DayDegreeCalculations (int a_dayinyear, bool a_usehourly) |
Does the day degree calculations needed for the species here. More... | |
void | SetAdultEggLayingThreshold (const double a_value) |
Set the temperature threshold for egg laying. More... | |
virtual void | CalculateDailyEggProduction (double a_temptoday)=0 |
Figure out the maximum number of eggs that can be laid today - must be overridden in descendent classes. 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... | |
Protected Member Functions inherited from Population_Manager | |
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) |
Protected Member Functions inherited from Population_Manager_Base | |
~Population_Manager_Base ()=default | |
Static Protected Member Functions | |
static void | PestMortLocOutputOpen () |
Annual pesticide mortality output file open. More... | |
static void | PestMortLocOutputError () |
Pesticide mortality output error handling. More... | |
Protected Attributes | |
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... | |
Protected Attributes inherited from Population_Manager | |
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] {} |
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... | |
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... | |
The population manager class for beetles.
Beetle_Population_Manager::Beetle_Population_Manager | ( | Landscape * | a_l_ptr, |
int | a_n | ||
) |
Beetle_Population_Manager Constructor.
Initialises the population manager and creates the initial beetle population.
Housekeeping actions such as setting up probe files and recording life-stage and state names are done here.
An optimisation is to sort the larval list by x-coordinate to speed searching later. This removes the default randomising function for larvae.
Must create position maps for egg,larva stages,pupae and adult.
References BeetleToleTovs::BeetleHalfReproductionLandscape, BeetleToleTovs::BeetleReproductionLandscape, BeetleToleTovs::BeetleStartHabitats, BeetleToleTovs::BeetleSuitableForHibernation, Population_Manager::BeforeStepActions, cfg_BeetleADDepMort0, cfg_BeetleADDepMort1, cfg_BeetleAdult_InsecticideApplication, cfg_BeetleAdult_SoilCultivationMortality, cfg_BeetleAdultDispersalThreshold, cfg_BeetleAdultEggLayingThreshold, cfg_BeetleAdultHarvestMort, cfg_BeetleAdultMovementTempThreshold, cfg_BeetleAdultPPPEffectProb, cfg_BeetleAdultPPPEffectProbDecay, cfg_BeetleAdultPPPElimiationRate, cfg_BeetleAdultPPPThreshold, cfg_BeetleAdultStriglingMort, cfg_BeetleAdultTurnRate, cfg_BeetleDailyAdultMort, cfg_BeetleDailyEggMort, cfg_BeetleDailyLarvalMort, cfg_BeetleDailyPupalMort, cfg_BeetleDailyStartReproductionChance, cfg_BeetleDDepRange, cfg_BeetleDevelopmentAboveInflectionPoints, cfg_BeetleDevelopmentConstants, cfg_BeetleDevelopmentInflectionPoints, cfg_BeetleDevelopmentThresholds, cfg_BeetleEgg_InsecticideApplication, cfg_BeetleEgg_SoilCultivationMortality, cfg_BeetleEggHarvestMort, cfg_BeetleEggPPPEffectProb, cfg_BeetleEggPPPEffectProbDecay, cfg_BeetleEggPPPElimiationRate, cfg_BeetleEggPPPThreshold, cfg_BeetleEggProductionSlope, cfg_BeetleEggStriglingMort, cfg_BeetleInCropRef, cfg_BeetleInFieldHibernateChance, cfg_BeetleLarva_InsecticideApplication, cfg_BeetleLarva_SoilCultivationMortality, cfg_BeetleLarvaHarvestMort, cfg_BeetleLarvalPPPEffectProb, cfg_BeetleLarvalPPPEffectProbDecay, cfg_BeetleLarvalPPPElimiationRate, cfg_BeetleLarvalPPPThreshold, cfg_BeetleLarvaStriglingMort, cfg_BeetleLDDepMort0, cfg_BeetleLDDepMort1, cfg_BeetleMaxDailyMovement, cfg_BeetleMoveProbArgs, cfg_BeetleMoveProbType, cfg_BeetlePupa_InsecticideApplication, cfg_BeetlePupa_SoilCultivationMortality, cfg_BeetlePupaHarvestMort, cfg_BeetlePupalPPPEffectProb, cfg_BeetlePupalPPPEffectProbDecay, cfg_BeetlePupalPPPElimiationRate, cfg_BeetlePupalPPPThreshold, cfg_BeetlePupaMaxAge, cfg_BeetlePupaStriglingMort, cfg_BeetleStartAggregatingDay, cfg_BeetleStartAggregatingDayProb, cfg_BeetleStartReproductionDay, cfg_BeetleStopAggregationDay, cfg_CfgRipleysOutputUsed, cfg_ReallyBigOutputUsed, BeetleTovParams::getList(), BeetleToleParams::getList(), m_AboveInflectionRates, m_BeetlePositionMaps, m_BeetleStartHabitats, m_BeetleToleTovs, m_DevelConst1, m_DevelopmentInflectionPoints, m_EggProductionSlope, m_EList, m_InCropNo, m_InCropRef, m_InFieldNo, Population_Manager::m_is_paralleled, Population_Manager_Base::m_ListNameLength, Population_Manager_Base::m_ListNames, m_MoveMap, m_OffFieldNo, Population_Manager::m_population_type, Population_Manager_Base::m_SimulationName, m_StageProductionProduction, Population_Manager_Base::m_TheLandscape, Population_Manager::OpenTheReallyBigProbe(), Population_Manager::OpenTheRipleysOutputProbe(), Population_Manager::ReallyBigOutputPrb, Beetle_Adult::SetAdult_HarvestMort(), Beetle_Adult::SetAdult_InsecticideApplication(), Beetle_Adult::SetAdult_SoilCultivationMortality(), Beetle_Adult::SetAdult_StriglingMort(), Beetle_Adult::SetAdultDenDepMort0(), Beetle_Adult::SetAdultDenDepMort1(), SetAdultEggLayingThreshold(), Beetle_Adult::SetAdultMaxMoveDist(), Beetle_Adult::SetAdultMovementTempThreshold(), Beetle_Adult::SetAdultPppEffectProb(), Beetle_Adult::SetAdultPppEffectProbDecay(), Beetle_Adult::SetAdultPPPElimRate(), Beetle_Adult::SetAdultPppThreshold(), Beetle_Adult::SetAdultTurnRate(), Beetle_Base::SetBeetleHalfReproductionLandscape(), Beetle_Base::SetBeetleMap(), Beetle_Base::SetBeetleReproductionLandscape(), Beetle_Base::SetBeetleSuitableForHibernation(), Beetle_Adult::SetDailyAdultMort(), Beetle_Egg_List::SetDailyEggMort(), Beetle_Larvae::SetDailyLarvaMort(), Beetle_Pupae::SetDailyPupaeMort(), Beetle_Adult::SetDailyStartReproductionChance(), Beetle_Base::SetDDepRange(), Beetle_Base::SetDevelopmentConstants(), Beetle_Adult::SetDispersalThreshold(), Beetle_Egg_List::SetEgg_HarvestMort(), Beetle_Egg_List::SetEgg_InsecticideApplication(), Beetle_Egg_List::SetEgg_SoilCultivationMortality(), Beetle_Egg_List::SetEgg_StriglingMort(), Beetle_Egg_List::SetEggPppEffectProb(), Beetle_Egg_List::SetEggPppEffectProbDecay(), Beetle_Egg_List::SetEggPppElimRate(), Beetle_Egg_List::SetEggPppThreshold(), Beetle_Adult::SetInFieldHibernateChance(), Beetle_Larvae::SetLarva_HarvestMort(), Beetle_Larvae::SetLarva_InsecticideApplication(), Beetle_Larvae::SetLarva_SoilCultivationMortality(), Beetle_Larvae::SetLarva_StriglingMort(), Beetle_Larvae::SetLarvalDailyMort(), Beetle_Larvae::SetLarvalPPPElimRate(), Beetle_Larvae::SetLDDepMort0(), Beetle_Larvae::SetLDDepMort1(), Beetle_Larvae::SetLPPPEffectProb(), Beetle_Larvae::SetLPPPEffectProbDecay(), Beetle_Larvae::SetLPPPThreshold(), Beetle_Base::SetMoveDistribution(), Beetle_Pupae::SetPPPPEffectProb(), Beetle_Pupae::SetPPPPEffectProbDecay(), Beetle_Pupae::SetPPPPThreshold(), Beetle_Pupae::SetPupa_HarvestMort(), Beetle_Pupae::SetPupa_InsecticideApplication(), Beetle_Pupae::SetPupa_SoilCultivationMortality(), Beetle_Pupae::SetPupa_StriglingMort(), Beetle_Pupae::SetPupalPPPElimRate(), Beetle_Pupae::SetPupaMaxAge(), Beetle_Adult::SetStartAggregatingDay(), Beetle_Adult::SetStartAggregatingDayProb(), Beetle_Adult::SetStartReproductionDay(), Beetle_Adult::SetStopAggregationDay(), Beetle_Adult::SetTodaysEggProduction(), Beetle_Base::SizeBeetleMap(), Population_Manager::StateNames, tobs_Aggregating, tobs_BDying, tobs_Developing, tobs_Dispersing, tobs_Emerging, tobs_Foraging, tobs_Hibernating, tobs_Initiation, tobs_NextStage, TOP_Beetle, Landscape::TranslateVegTypes(), CfgInt::value(), CfgFloat::value(), CfgBool::value(), CfgStr::value(), and CfgArray_Double::value().
|
override |
|
inline |
Adds to the stage production record attribute.
References m_StageProductionProduction.
Referenced by PoecilusCupreus_Adult::PoecilusCupreus_Adult(), PoecilusCupreus_Larvae1::PoecilusCupreus_Larvae1(), PoecilusCupreus_Larvae2::PoecilusCupreus_Larvae2(), PoecilusCupreus_Larvae3::PoecilusCupreus_Larvae3(), PoecilusCupreus_Pupae::PoecilusCupreus_Pupae(), PoecilusCupreus_Larvae1::ReInit(), PoecilusCupreus_Larvae2::ReInit(), PoecilusCupreus_Larvae3::ReInit(), PoecilusCupreus_Pupae::ReInit(), PoecilusCupreus_Adult::ReInit(), and Beetle_Adult::Reproduce().
|
protectedpure virtual |
Figure out the maximum number of eggs that can be laid today - must be overridden in descendent classes.
Implemented in Ladybird_Population_Manager, Bembidion_Population_Manager, and PoecilusCupreus_Population_Manager.
Referenced by DayDegreeCalculations().
|
overrideprotectedvirtual |
Method to arbitrarily alter populations size.
This method simply alters populations on 1st January - either by increasing or decreasing them. Increases are by 'cloning', decrease by pro-rata mortality. The effect is under the control of configuration variables cfg_pm_eventfrequency and cfg_pm_eventsize.
Reimplemented from Population_Manager.
References bob_Adult, cfg_CatastropheEventStartYear, cfg_PmEventfrequency, cfg_PmEventsize, Beetle_Base::CopyMyself(), g_random_fnc(), Population_Manager::GetLiveArraySize(), Beetle_Base::KillAndRemoveFromMap(), Population_Manager_Base::m_TheLandscape, Population_Manager::SupplyAnimalPtr(), Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), and CfgInt::value().
Referenced by PoecilusCupreus_Population_Manager::DoLast(), and DoLast().
|
protected |
Method to arbitrarily alter populations size restricted spatially.
References bob_Adult, cfg_CatastropheEventStartYear, cfg_PmEventday, cfg_PmEventfrequency, cfg_PmEventsize, g_random_fnc(), Population_Manager::GetLiveArraySize(), Population_Manager_Base::m_TheLandscape, Population_Manager::SupplyAnimalPtr(), Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), tole_Field, and CfgInt::value().
Referenced by PoecilusCupreus_Population_Manager::DoLast(), and DoLast().
|
inlinevirtual |
Method to add beetles to the population - it must be overridden in all descendent classes.
Reimplemented in PoecilusCupreus_Population_Manager, Bembidion_Population_Manager, and Ladybird_Population_Manager.
Referenced by Beetle_Base::CopyMyself(), Beetle_Adult::Reproduce(), Beetle_Pupae::St_Emerge(), Beetle_Egg_List::St_Hatch(), and Beetle_Larvae::St_NextStage().
|
protectedvirtual |
Does the day degree calculations needed for the species here.
Reimplemented in Ladybird_Population_Manager, and PoecilusCupreus_Population_Manager.
References CalculateDailyEggProduction(), cfg_BeetleDevelopmentMaximum, DoEggDailyMortalityActions(), DoExtremeTempActions(), DoLarvalDailyMortalityActions(), m_AboveInflectionRates, m_BeetleLarvalStagesNum, m_DayDegs, m_DevelConst1, m_DevelopmentInflectionPoints, m_MortalityTempMax, m_MortalityTempMin, m_MortalityTempStep, m_NoTemperatureCategories, Population_Manager::m_population_type, m_TemperatureCategory, Population_Manager_Base::m_TheLandscape, Beetle_Base::SetTodaysTempCategory(), Landscape::SupplySoilTemp(), Landscape::SupplySoilTempHour(), Landscape::SupplyTemp(), TOP_Ladybird, and CfgArray_Double::value().
Referenced by PoecilusCupreus_Population_Manager::DayDegreeCalculations(), and DoFirst().
void Beetle_Population_Manager::DoBeetleActiveProbe | ( | int | a_lifestage | ) |
Counts all active beetles and saves the results to a file.
References cfg_BeetleActivityCountFile, m_BeetleLarvalStagesNum, Population_Manager::m_LiveArraySize, m_StageProductionProduction, Population_Manager_Base::m_TheLandscape, Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), Population_Manager::TheSubArrays, tobs_Foraging, and CfgStr::value().
Referenced by PoecilusCupreus_Population_Manager::DoLast().
|
overridevirtual |
Replaces the Step function for the Egg_List.
Reimplemented from Population_Manager.
References m_EList.
|
inlineprotectedvirtual |
Species specific actions to cope with temperature related egg mortality.
Reimplemented in Ladybird_Population_Manager.
Referenced by DayDegreeCalculations().
|
inlineprotectedvirtual |
Species specific actions to cope with response to extreme temperature, if needed.
Reimplemented in Ladybird_Population_Manager.
Referenced by DayDegreeCalculations().
|
overridevirtual |
Does day degree development calculations here.
This method removes any eggs that have survived until winter. In descendent classes other stages may need to be removed.
It subsequently calculates day degree development for each day for each beetle stage. This is an optimising strategy to prevent each beetle individual calculating these.
Finally it replaces the Egg_List BeginStep functionality. This is also an optimisation since it only requires 365 Egg_lists, one for each day of the year instead of millions of individual eggs.
NB this breaks the traditional ALMaSS protocol for handling animal individuals.
Reimplemented from Population_Manager.
Reimplemented in Ladybird_Population_Manager, and Bembidion_Population_Manager.
References DayDegreeCalculations(), Population_Manager::LamdaClear(), Population_Manager::LamdaDumpOutput(), m_BeetleLarvalStagesNum, m_DayDegs, m_EList, m_EPopSize, m_StageProductionProduction, Population_Manager_Base::m_TheLandscape, March, SupplyDailyEggPopSize(), and Landscape::SupplyDayInYear().
Referenced by Bembidion_Population_Manager::DoFirst(), and Ladybird_Population_Manager::DoFirst().
|
inlineprotectedvirtual |
Species specific actions to cope with temperature related laval mortality.
Reimplemented in Ladybird_Population_Manager.
Referenced by DayDegreeCalculations().
|
overridevirtual |
Adds output adult locations to DoLast.
Reimplemented from Population_Manager.
Reimplemented in PoecilusCupreus_Population_Manager.
References Catastrophe(), and Catastrophe2().
|
overridevirtual |
Returns the population size of the lifestage type bobType.
Reimplemented from Population_Manager.
References Population_Manager::GetLiveArraySize(), and SupplyEggPopSize().
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
Used to specify legal starting habitats for simulation start-up.
References Landscape::GetOwner_tole(), IsStartHabitatAux(), and Population_Manager_Base::m_TheLandscape.
Referenced by Bembidion_Population_Manager::Bembidion_Population_Manager(), Ladybird_Population_Manager::Ladybird_Population_Manager(), and PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager().
|
inlineprotected |
Used to specify legal starting habitats for simulation start-up.
References m_BeetleStartHabitats.
Referenced by IsStartHabitat().
|
pure virtual |
Used to determine mortality based on an event for any beetle class - pure vitual must be overriden.
Implemented in Ladybird_Population_Manager, PoecilusCupreus_Population_Manager, and Bembidion_Population_Manager.
Referenced by Beetle_Base::OnFarmEvent().
|
inlinevirtual |
Used to determine mortality based on an event for any beetle class - not a pure vitual but must be overriden if needed.
Reimplemented in PoecilusCupreus_Population_Manager.
Referenced by PoecilusCupreus_Pupae::CheckManagementBeetle().
|
overridevirtual |
Opens the AOR output file.
Reimplemented from Population_Manager.
References Population_Manager::m_AOR_Probe, Population_Manager_Base::m_AORProbeFileName, and Population_Manager_Base::m_TheLandscape.
|
protected |
Annual pesticide mortality locations output.
|
staticprotected |
Pesticide mortality output error handling.
|
staticprotected |
Annual pesticide mortality output file open.
Referenced by Ladybird_Population_Manager::Ladybird_Population_Manager().
|
overridevirtual |
Overides the Population_Manager::Probe method.
The parent class Probe method needs to be overridden because of the use of the Egg_List class. Otherwise functionality is the same as parent class.
Reimplemented from Population_Manager.
References Population_Manager::GetLiveArraySize(), Landscape::GetOwner_tole(), m_EPopSize, Probe_Data::m_FullLandscapeProbe, Probe_Data::m_NoAreas, Probe_Data::m_NoEleTypes, Probe_Data::m_NoFarms, Probe_Data::m_NoVegTypes, Probe_Data::m_Rect, Probe_Data::m_RefEle, Probe_Data::m_RefFarms, Probe_Data::m_RefVeg, Population_Manager_Base::m_TheLandscape, APoint::m_x, rectangle::m_x1, rectangle::m_x2, APoint::m_y, rectangle::m_y1, rectangle::m_y2, Population_Manager::SupplyAnimalPtr(), Landscape::SupplyFarmOwner(), TAnimal::SupplyFarmOwnerRef(), TAnimal::SupplyPosition(), and Landscape::SupplyVegType().
|
inlineprotected |
Set the temperature threshold for egg laying.
References m_AdultEggLayingThreshold.
Referenced by Beetle_Population_Manager().
|
inline |
|
inline |
|
inlinevirtual |
Get the day degress experienced this year for a specific day created and instar/stage.
References m_DayDegs.
Referenced by Beetle_Larvae::getDevelopment(), Ladybird_Larvae1::St_Develop(), Ladybird_Pupae::St_Develop(), Beetle_Egg_List::St_Develop(), and Beetle_Pupae::St_Develop().
|
inline |
void Beetle_Population_Manager::SupplyEggLocXY | ( | unsigned | day, |
int | j, | ||
int & | x, | ||
int & | y | ||
) | const |
|
inline |
|
overrideprotectedvirtual |
Special output functionality.
Reimplemented from Population_Manager.
Reimplemented in Ladybird_Population_Manager.
References bob_Adult, AOR_Probe::DoProbe(), and Population_Manager::m_AOR_Probe.
|
overrideprotectedvirtual |
Special output functionality.
Another spatial output method. This time with extra information over and above the x,y, coord found in the Ripley Probe.
Reimplemented from Population_Manager.
References bob_Adult, Population_Manager::GetLiveArraySize(), Population_Manager_Base::m_TheLandscape, Population_Manager::ReallyBigOutputPrb, TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Population_Manager::SupplyAnimalPtr(), Landscape::SupplyPolyRef(), and Landscape::SupplySimAreaWidth().
|
overrideprotectedvirtual |
Special output functionality.
A spatial output. This dumps the x,y co-ordinates for all adults to a text file.
Reimplemented from Population_Manager.
References bob_Adult, TALMaSSObject::GetCurrentStateNo(), Population_Manager::GetLiveArraySize(), Population_Manager_Base::m_TheLandscape, TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Population_Manager::SupplyAnimalPtr(), and Landscape::SupplySimAreaWidth().
|
protected |
Day degree constant above inflection point for all non-adult stages.
Referenced by Beetle_Population_Manager(), Ladybird_Population_Manager::DayDegreeCalculations(), and DayDegreeCalculations().
|
protected |
Temperature threshold for egg laying.
Referenced by Bembidion_Population_Manager::CalculateDailyEggProduction(), and SetAdultEggLayingThreshold().
|
protected |
/brief the number of larval stages
Referenced by Bembidion_Population_Manager::Bembidion_Population_Manager(), Ladybird_Population_Manager::DayDegreeCalculations(), DayDegreeCalculations(), DoBeetleActiveProbe(), DoFirst(), Ladybird_Population_Manager::Ladybird_Population_Manager(), and PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager().
|
protected |
A list of postion map pointers per beetle lifestage
Referenced by Beetle_Population_Manager(), Ladybird_Population_Manager::Ladybird_Population_Manager(), and ~Beetle_Population_Manager().
|
protected |
the list of the toles that the beetles are assigned to in the beginning of the simulation
Referenced by Beetle_Population_Manager(), and IsStartHabitatAux().
|
protected |
The list of start habitats for the beetle.
Referenced by Beetle_Population_Manager().
|
protected |
Storage for daily day degrees for non-adult stages.
Referenced by Bembidion_Population_Manager::Bembidion_Population_Manager(), Ladybird_Population_Manager::DayDegreeCalculations(), DayDegreeCalculations(), DoFirst(), Ladybird_Population_Manager::Ladybird_Population_Manager(), PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager(), and SupplyDayDegs().
|
protected |
Day degree threshold constant for eggs to pupae.
Referenced by Beetle_Population_Manager(), Ladybird_Population_Manager::DayDegreeCalculations(), DayDegreeCalculations(), PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager(), and SupplyDevelConst1().
|
protected |
Inflection point in day degree calculations for non-adult stages.
Referenced by Beetle_Population_Manager(), Bembidion_Population_Manager::Bembidion_Population_Manager(), Ladybird_Population_Manager::DayDegreeCalculations(), DayDegreeCalculations(), and Ladybird_Population_Manager::Ladybird_Population_Manager().
|
protected |
the slope of the linear function that defines todays egg production
Referenced by Beetle_Population_Manager(), and Bembidion_Population_Manager::CalculateDailyEggProduction().
std::unique_ptr<std::vector<std::unique_ptr<Beetle_Egg_List> > > Beetle_Population_Manager::m_EList {nullptr} |
Replacement for TheArray[0].
Referenced by Beetle_Population_Manager(), DoBefore(), DoFirst(), and SupplyDailyEggPopSize().
long Beetle_Population_Manager::m_EPopSize {0} |
To store the current population size.
Referenced by DoFirst(), Probe(), and SupplyEggPopSize().
|
protected |
|
protected |
In crop tole reference.
Referenced by Beetle_Population_Manager(), Bembidion_Population_Manager::Bembidion_Population_Manager(), and PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager().
|
protected |
In-field counter.
A position map int for eggs
Referenced by Beetle_Population_Manager(), Bembidion_Population_Manager::Bembidion_Population_Manager(), incInField(), Ladybird_Population_Manager::Ladybird_Population_Manager(), and PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager().
|
protected |
Threshold temperatures for mortalities: Max.
Referenced by Bembidion_Population_Manager::Bembidion_Population_Manager(), Ladybird_Population_Manager::DayDegreeCalculations(), DayDegreeCalculations(), and Ladybird_Population_Manager::Ladybird_Population_Manager().
|
protected |
hreshold temperatures for mortalities: Min
T
Referenced by Ladybird_Population_Manager::DayDegreeCalculations(), and DayDegreeCalculations().
|
protected |
Threshold temperatures for mortalities: Step size.
Referenced by Ladybird_Population_Manager::DayDegreeCalculations(), and DayDegreeCalculations().
std::unique_ptr<MovementMap> Beetle_Population_Manager::m_MoveMap |
Map of suitability for movement.
Referenced by Beetle_Population_Manager(), PoecilusCupreus_Adult::MoveTo_Quality_Assess(), Beetle_Adult::MoveTo_Quality_Assess(), and Beetle_Adult::St_Aggregate().
|
protected |
Storage for the number of temperature categories used.
Referenced by Ladybird_Population_Manager::DayDegreeCalculations(), and DayDegreeCalculations().
|
protected |
|
protected |
Testing/Output attribute holding the number of larvae produced today.
Referenced by AddStageProductionRecord(), Beetle_Population_Manager(), DoBeetleActiveProbe(), DoFirst(), GetStageProductionRecord(), Ladybird_Population_Manager::Ladybird_Population_Manager(), and SetStageProductionRecord().
|
protected |
Storage for the temperature category today.
Referenced by Ladybird_Population_Manager::DayDegreeCalculations(), DayDegreeCalculations(), and Ladybird_Population_Manager::DoEggDailyMortalityActions().