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
Beetle_Population_Manager Class Referenceabstract

The population manager class for beetles. More...

#include <Beetle_BaseClasses.h>

Inheritance diagram for Beetle_Population_Manager:
Population_Manager Population_Manager_Base Bembidion_Population_Manager Ladybird_Population_Manager PoecilusCupreus_Population_Manager

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 TAnimalSupplyAnimalPtr (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 ()
 
TAnimalFindIndividual (unsigned Type, TAnimal *a_me)
 
virtual TAnimalFindClosest (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 TAnimalFindClosest (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< MovementMapm_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_DataTheProbe [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_Probem_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...
 
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 population manager class for beetles.

Constructor & Destructor Documentation

◆ Beetle_Population_Manager()

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.

1400  : Population_Manager(a_l_ptr, a_n) {
1408  m_is_paralleled = true; //all the bettles are parallel
1410  for (int ob = 0; ob < static_cast<int>(a_n); ob++)
1411  {
1412  //(*m_BeetlePositionMaps)[ob] = new SimplePositionMapInt(m_TheLandscape);
1413  (*m_BeetlePositionMaps).push_back( new SimplePositionMapInt(m_TheLandscape));
1415  }
1416 
1417  //m_EggPositionMap = new SimplePositionMapInt(m_TheLandscape);
1418  //Beetle_Base::m_BeetleEggMapsInt = m_EggPositionMap;
1419  m_MoveMap = std::make_unique<MovementMap>(a_l_ptr, 0); // 0 for beetles
1420  m_EList = std::make_unique<std::vector<std::unique_ptr<Beetle_Egg_List>>>(365);
1421  // Create the egg lists
1422  for (int i = 0; i < 365; i++) { (*m_EList)[i] = std::make_unique<Beetle_Egg_List>(i, this, m_TheLandscape); }
1423  // autom. called by constructor
1426  else ReallyBigOutputPrb = nullptr;
1427  m_SimulationName = "Beetle";
1428  m_BeetleStartHabitats = m_BeetleToleTovs.BeetleStartHabitats.getList(); // Set up the start habitats list
1429  // Load List of Animal Classes
1430  m_ListNames[0] = "Egg";
1431  m_ListNames[1] = "Larva1";
1432  m_ListNames[2] = "Larva2";
1433  m_ListNames[3] = "Larva3";
1434  m_ListNames[4] = "Pupa";
1435  m_ListNames[5] = "Adult";
1436  m_ListNameLength = 6;
1438  m_population_type = TOP_Beetle; // This will be replaced by descendent class
1439  // Load State Names
1440  StateNames[tobs_Initiation] = "Initiation";
1441  //Egg
1442  StateNames[tobs_Developing] = "Developing";
1443  //Larva
1444  StateNames[tobs_Developing] = "Developing";
1445  StateNames[tobs_NextStage] = "Next Life Stage";
1446  //Pupa
1447  StateNames[tobs_Developing] = "Developing";
1448  StateNames[tobs_Emerging] = "Emerging";
1449  //Adult
1450  StateNames[tobs_Foraging] = "Foraging";
1451  StateNames[tobs_Aggregating] = "Aggregating";
1452  StateNames[tobs_Hibernating] = "Hibernating";
1453  StateNames[tobs_Dispersing] = "Dispersing";
1454  StateNames[tobs_BDying] = "Beetle Dying";
1455 
1456  // Ensure that larvae are sorted w.r.t. x position not shuffled
1457  BeforeStepActions[1] = 1; // 1 = SortX
1458 
1459 #ifdef __BEETLEPESTICIDE1
1460  //PestMortLocOutputOpen(); **CJT** Unused currently 25/11/2023
1461  m_InFieldNo = 0;
1462  m_OffFieldNo = 0;
1463  m_InCropNo = 0;
1465 #endif
1466  /*- - - - - - - - - -------- Start initialize static variable - - - - - - - - - -- - - - - - - - - --*/
1467  //Beetle_Base;
1474  //Beetle_Egg_List
1475  // Initialise any static variables
1481  Beetle_Egg_List::SetEggPppThreshold(cfg_BeetleEggPPPThreshold.value()); // Initialize static variable
1485  //Beetle_Larvae
1486  // Initialise any static variables
1488  Beetle_Larvae::SetLPPPThreshold(cfg_BeetleLarvalPPPThreshold.value()); // Initialize static variable
1489  Beetle_Larvae::SetLPPPEffectProb(cfg_BeetleLarvalPPPEffectProb.value()); // Initialize static variable
1498  Beetle_Larvae::SetLarvalDailyMort(vector<double>{}, 0, 0); // If used this is set by the derived popultion managers in constructor
1499 
1500  //Beetle_Pupae
1501  // Initialise any static variables
1503  Beetle_Pupae::SetPPPPThreshold(cfg_BeetlePupalPPPThreshold.value()); // Initialize static variable
1504  Beetle_Pupae::SetPPPPEffectProb(cfg_BeetlePupalPPPEffectProb.value()); // Initialize static variable
1512  //Beetle_Adult
1513  // Initialise any static variables
1515  Beetle_Adult::SetAdultPppThreshold(cfg_BeetleAdultPPPThreshold.value()); // Initialize static variable
1523  Beetle_Adult::SetTodaysEggProduction(0); // This is reset every day by the population managers
1537 
1538  /*- - - - - - - - - -------- End initialize static variable - - - - - - - - - -- - - - - - - - - --*/
1539 
1540  // Set any parameter values for this object below here
1546 }

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().

◆ ~Beetle_Population_Manager()

Beetle_Population_Manager::~Beetle_Population_Manager ( )
override

Beetle_Population_Manager Destructor.

1549  {
1550  // Ensure that any positions maps created are deleted
1551  int sz = int(m_BeetlePositionMaps->size());
1552  for (int ob = 0; ob < sz; ob++) { delete (*m_BeetlePositionMaps)[ob]; }
1553  //delete m_EggPositionMap;
1554 }

References m_BeetlePositionMaps.

Member Function Documentation

◆ AddStageProductionRecord()

◆ CalculateDailyEggProduction()

virtual void Beetle_Population_Manager::CalculateDailyEggProduction ( double  a_temptoday)
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().

◆ Catastrophe()

void Beetle_Population_Manager::Catastrophe ( void  )
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.

1967  {
1968  int year = m_TheLandscape->SupplyYearNumber();
1969  if (year < cfg_CatastropheEventStartYear.value()) return;
1970 
1971  // First do we have the right day?
1972  const int today = m_TheLandscape->SupplyDayInYear();
1973  if (today != 1) return;
1974  // First do we have the right year?
1976  if (year % cfg_PmEventfrequency.value() != 0) return;
1977 
1978  Beetle_Adult* BA;
1979  // Now if the % decrease is higher or lower than 100 we need to do different things
1980  int esize = cfg_PmEventsize.value();
1981  if (esize < 100)
1982  {
1983  const auto size2 = GetLiveArraySize(bob_Adult);
1984  for (unsigned j = 0; j < size2; j++)
1985  {
1986  if (g_random_fnc(100) > esize)
1987  {
1988  // This is rightmost ugly! But I cannot find any nice way to cast an
1989  BA = dynamic_cast<Beetle_Adult*>(SupplyAnimalPtr(bob_Adult, j));
1990  BA->KillAndRemoveFromMap(); // Kill it
1991  }
1992  }
1993  }
1994  else if (esize > 100)
1995  {
1996  // This also requires a copy method in the target animals
1997  // esize also needs translating 120 = 20%, 200 = 100%
1998  if (esize < 200)
1999  {
2000  esize -= 100;
2001  const auto size2 = GetLiveArraySize(bob_Adult);
2002  for (unsigned j = 0; j < size2; j++)
2003  {
2004  if (g_random_fnc(100) < esize)
2005  {
2006  BA = dynamic_cast<Beetle_Adult*>(SupplyAnimalPtr(bob_Adult, j));
2007  BA->CopyMyself(bob_Adult); // Duplicate it
2008  }
2009  }
2010  }
2011  else
2012  {
2013  esize -= 100;
2014  esize /= 100; // this will throw away fractional parts so will get 1, 2, 3 from 200, 350 400
2015  const auto size2 = GetLiveArraySize(bob_Adult);
2016  for (unsigned j = 0; j < size2; j++)
2017  {
2018  for (int e = 0; e < esize; e++)
2019  {
2020  BA = dynamic_cast<Beetle_Adult*>(SupplyAnimalPtr(bob_Adult, j));
2021  BA->CopyMyself(bob_Adult); // Duplicate it
2022  }
2023  }
2024  }
2025  }
2026  else return; // No change so do nothing
2027 }

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().

◆ Catastrophe2()

void Beetle_Population_Manager::Catastrophe2 ( )
protected

Method to arbitrarily alter populations size restricted spatially.

2030  {
2031  // First do we have the right day?
2032  const int today = m_TheLandscape->SupplyDayInYear();
2033  if (today != cfg_PmEventday.value()) return;
2034  // First do we have the right year?
2035  const int year = m_TheLandscape->SupplyYearNumber();
2036  if (year < cfg_CatastropheEventStartYear.value()) return;
2037  if (year % cfg_PmEventfrequency.value() != 0) return;
2038 
2039  // Now if the % decrease is higher or lower than 100 we need to do different things
2040  const int esize = cfg_PmEventsize.value();
2041  if (esize < 100)
2042  {
2043  const auto size2 = GetLiveArraySize(bob_Adult);
2044  for (unsigned j = 0; j < size2; j++)
2045  {
2046  if (g_random_fnc(100) >= esize)
2047  {
2048  // This is rightmost ugly! But I cannot find any nice way to cast an
2049  const auto BA = dynamic_cast<Beetle_Adult*>(SupplyAnimalPtr(bob_Adult, j));
2050  if (BA->SupplyPolygonType() != tole_Field) BA->KillAndRemoveFromMap(); // Kill it
2051  }
2052  }
2053  }
2054  else return; // No change so do nothing
2055 }

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().

◆ CreateObjects()

virtual void Beetle_Population_Manager::CreateObjects ( int  ,
TAnimal ,
void *  ,
Struct_Beetle ,
int   
)
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.

1013 {}

Referenced by Beetle_Base::CopyMyself(), Beetle_Adult::Reproduce(), Beetle_Pupae::St_Emerge(), Beetle_Egg_List::St_Hatch(), and Beetle_Larvae::St_NextStage().

◆ DayDegreeCalculations()

void Beetle_Population_Manager::DayDegreeCalculations ( int  a_dayinyear,
bool  a_usehourly 
)
protectedvirtual

Does the day degree calculations needed for the species here.

Reimplemented in Ladybird_Population_Manager, and PoecilusCupreus_Population_Manager.

1601  {
1602  const double soiltemptoday = m_TheLandscape->SupplySoilTemp();
1603  const double airtemp = m_TheLandscape->SupplyTemp();
1604  double atemptoday_e = 0, atemptoday_l = 0, atemptoday_p = 0;
1605  // Save some useful temperature related values used for mortality calculations for juvenile stages
1606  double atemptoday = soiltemptoday;
1607  if (m_population_type == TOP_Ladybird) atemptoday = airtemp;
1609  if (atemptoday < m_MortalityTempMin) m_TemperatureCategory = 0;
1610  else if (atemptoday > m_MortalityTempMax) m_TemperatureCategory = m_NoTemperatureCategories - 1; // minus 1 because of zero based index
1611  else m_TemperatureCategory = static_cast<int>(floor((atemptoday - m_MortalityTempMin) / m_MortalityTempStep + 0.5));
1613  // Calculate the number of eggs laid today
1614  CalculateDailyEggProduction(airtemp);
1615  // Calculated the DayDegrees for the different stages today
1616  for (int stg = 0; stg <= m_BeetleLarvalStagesNum + 1; ++stg) { // +1 for pupa
1617  double temp_added_today = 0.0;
1618  if (a_usehourly) {
1619  // Need to use hourly temperatures
1620  double atempsum = 0;
1621  for (int hour = 0; hour < 24; hour++)
1622  {
1623  double atemp = m_TheLandscape->SupplySoilTempHour(hour);
1624  atempsum += atemp;
1625  if (atemp > m_DevelConst1[stg]){
1626  if(atemp > cfg_BeetleDevelopmentMaximum.value()[stg]){
1627  atemp = cfg_BeetleDevelopmentMaximum.value()[stg];
1628  }
1629  temp_added_today += atemp - m_DevelConst1[stg];
1630  }
1631  }
1632  temp_added_today /= 24.0;
1633  atemptoday = atempsum / 24.0;
1634  }
1635  else {
1636  if (atemptoday > m_DevelConst1[stg]) temp_added_today = atemptoday - m_DevelConst1[stg];
1637  }
1638  if (atemptoday > m_DevelopmentInflectionPoints[stg]) {
1639  for (int i = 0; i <= a_dayinyear; i++) {
1640  m_DayDegs[stg][i] += temp_added_today * m_AboveInflectionRates[stg];
1641  }
1642  }
1643  else {
1644  for (int i = 0; i <= a_dayinyear; i++) {
1645  m_DayDegs[stg][i] += temp_added_today;
1646  }
1647  }
1648  }
1649  // Do any extreme temperature mortality
1650  DoExtremeTempActions(atemptoday);
1651  // Set any egg mortalities needed today
1652  DoEggDailyMortalityActions(atemptoday);
1653  // Set any egg mortalities needed today
1654  DoLarvalDailyMortalityActions(atemptoday);
1655 }

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().

◆ DoBeetleActiveProbe()

void Beetle_Population_Manager::DoBeetleActiveProbe ( int  a_lifestage)

Counts all active beetles and saves the results to a file.

1918  {
1919  ofstream outfile;
1920  const int year = m_TheLandscape->SupplyYearNumber();
1921  const int today = m_TheLandscape->SupplyDayInYear();
1922  int Actives = 0;
1923  int oldbeetlesA = 0;
1924  int oldbeetlesT = 0;
1925  if ((year == 1) && (today == 0))
1926  {
1927  outfile.open(cfg_BeetleActivityCountFile.value());
1928  outfile << "Year" << '\t' << "Day" << '\t' << "Total Beetles" << '\t' << "Total Old Adult Beetles" << '\t' << "Total No.YoungBeetles" << '\t' << "ActiveCount" << '\t' << "Active Old Adult Beetles" << '\t' << "Active No.YoungBeetles" << '\t' << "Eggs Today";
1929  for (int l=0; l<m_BeetleLarvalStagesNum; l++)
1930  {
1931  outfile << '\t' << "Larva"<<l;
1932  }
1933  outfile << '\t' << "Pupa Today" << '\t' << "Adults Today" << endl;
1934  }
1935  else outfile.open(cfg_BeetleActivityCountFile.value(), std::ios_base::app);
1936  int temp_num_thread = omp_get_max_threads();
1937  int size2 = m_LiveArraySize[a_lifestage];
1938  for (int t=0; t<temp_num_thread; t++)
1939  {
1940  for(auto it = TheSubArrays[a_lifestage][t]->begin(); it != TheSubArrays[a_lifestage][t]->end(); ++it)
1941  {
1942  if((*it)->GetCurrentStateNo() >= 0)
1943  {
1944  bool old = ((*it)->SupplyAge() > 150);
1945  if ((*it)->WhatState() == int(tobs_Foraging)) {
1946  Actives++; // Count actives
1947  if (old) oldbeetlesA++;
1948  }
1949  if (old) oldbeetlesT++;
1950  }
1951  }
1952  }
1953  outfile << year << '\t' << today << '\t' << size2 << '\t' << oldbeetlesT << '\t' << size2- oldbeetlesT << '\t' << Actives << '\t' <<oldbeetlesA << '\t' << Actives - oldbeetlesA << '\t' << m_StageProductionProduction[0];
1954  for (int l = 0; l < m_BeetleLarvalStagesNum; l++)
1955  {
1956  outfile << '\t' << m_StageProductionProduction[l+1];
1957  }
1959  outfile.close();
1960 }

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().

◆ DoBefore()

void Beetle_Population_Manager::DoBefore ( )
overridevirtual

Replaces the Step function for the Egg_List.

Reimplemented from Population_Manager.

1658  {
1659  // This replaces the step function for the eggs
1660  for (int i = 0; i < 365; i++) (*m_EList)[i]->SetStepDone(false);
1661  for (int i = 0; i < 365; i++) (*m_EList)[i]->Step();
1662 }

References m_EList.

◆ DoEggDailyMortalityActions()

virtual void Beetle_Population_Manager::DoEggDailyMortalityActions ( double  a_atemptoday)
inlineprotectedvirtual

Species specific actions to cope with temperature related egg mortality.

Reimplemented in Ladybird_Population_Manager.

1093 {}

Referenced by DayDegreeCalculations().

◆ DoExtremeTempActions()

virtual void Beetle_Population_Manager::DoExtremeTempActions ( double  a_airtemp)
inlineprotectedvirtual

Species specific actions to cope with response to extreme temperature, if needed.

Reimplemented in Ladybird_Population_Manager.

1091 {}

Referenced by DayDegreeCalculations().

◆ DoFirst()

void Beetle_Population_Manager::DoFirst ( void  )
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.

1563  {
1573  int today = m_TheLandscape->SupplyDayInYear();
1574  if (today == 0)
1575  {
1576  for (int stg = 0; stg <= m_BeetleLarvalStagesNum + 1; ++stg) {
1577  m_DayDegs[stg] = {}; // Resets the values to zero
1578  }
1579  for (int i = 0; i < 365; i++) (*m_EList)[i]->Clear();
1580  }
1581  DayDegreeCalculations(today, false);
1582  // Store the current population sizes
1583  m_EPopSize = 0;
1584  for (int i = 0; i < today; i++) { m_EPopSize += SupplyDailyEggPopSize(i); }
1585 #ifdef __LAMBDA_RECORD
1586  if (today == March) {
1587  LamdaDumpOutput();
1588  LamdaClear();
1589  }
1590 #endif
1591 #ifdef __BEETLEPESTICIDE1
1592  //if (today == 0) PestMortLocOutput(); **CJT** Unused currently 25/11/2023
1593 #endif
1594  // This replaces the BeginStep function for the eggs
1595  for (int i = 0; i < 365; i++) { (*m_EList)[i]->BeginStep(); }
1596  // Reset counters
1597  for (int s=0; s< int(m_StageProductionProduction.size()); s++) m_StageProductionProduction[s]=0;
1598 }

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().

◆ DoLarvalDailyMortalityActions()

virtual void Beetle_Population_Manager::DoLarvalDailyMortalityActions ( double  a_atemptoday)
inlineprotectedvirtual

Species specific actions to cope with temperature related laval mortality.

Reimplemented in Ladybird_Population_Manager.

1095 {}

Referenced by DayDegreeCalculations().

◆ DoLast()

void Beetle_Population_Manager::DoLast ( )
overridevirtual

Adds output adult locations to DoLast.

Reimplemented from Population_Manager.

Reimplemented in PoecilusCupreus_Population_Manager.

2057  {
2058 #ifdef CATASTROPHE2
2059  Catastrophe2();
2060 #else
2061  Catastrophe(); // This method must be overidden in descendent classes
2062 #endif
2063 }

References Catastrophe(), and Catastrophe2().

◆ GetPopulationSize()

unsigned Beetle_Population_Manager::GetPopulationSize ( int  poptype)
overridevirtual

Returns the population size of the lifestage type bobType.

Reimplemented from Population_Manager.

2075  {
2076  if (poptype == 0) { return SupplyEggPopSize(); }
2077  return GetLiveArraySize(poptype);
2078 }

References Population_Manager::GetLiveArraySize(), and SupplyEggPopSize().

◆ GetStageProductionRecord()

int Beetle_Population_Manager::GetStageProductionRecord ( int  a_stage) const
inline

Gets the stage production record attribute.

1144 { return m_StageProductionProduction[a_stage]; }

References m_StageProductionProduction.

◆ incInCrop()

void Beetle_Population_Manager::incInCrop ( )
inlineprotected

Increments in crop counter.

1127 { m_InCropNo++; }

References m_InCropNo.

◆ incInField()

void Beetle_Population_Manager::incInField ( )
inlineprotected

Increments in field counter.

1125 { m_InFieldNo++; }

References m_InFieldNo.

◆ incOffField()

void Beetle_Population_Manager::incOffField ( )
inlineprotected

Increments off field counter.

1129 { m_OffFieldNo++; }

References m_OffFieldNo.

◆ IsStartHabitat()

bool Beetle_Population_Manager::IsStartHabitat ( int  a_x,
int  a_y 
) const
protected

◆ IsStartHabitatAux()

bool Beetle_Population_Manager::IsStartHabitatAux ( TTypesOfLandscapeElement  tole) const
inlineprotected

Used to specify legal starting habitats for simulation start-up.

2070  {
2071  if (m_BeetleStartHabitats.find(tole) != m_BeetleStartHabitats.end()) return true;
2072  return false;
2073 }

References m_BeetleStartHabitats.

Referenced by IsStartHabitat().

◆ OnFarmEvent()

virtual bool Beetle_Population_Manager::OnFarmEvent ( FarmToDo  event,
Beetle_Base a_caller 
)
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().

◆ OnFarmEventPupae()

virtual bool Beetle_Population_Manager::OnFarmEventPupae ( FarmToDo  event,
Beetle_Base a_caller 
)
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.

1038 { return false; }

Referenced by PoecilusCupreus_Pupae::CheckManagementBeetle().

◆ OpenTheAOROutputProbe()

void Beetle_Population_Manager::OpenTheAOROutputProbe ( const string &  a_AORFilename)
overridevirtual

Opens the AOR output file.

Reimplemented from Population_Manager.

1912  {
1913  m_AORProbeFileName = a_AORFilename;
1914  m_AOR_Probe = new AOR_Probe(this, m_TheLandscape, a_AORFilename);
1915 }

References Population_Manager::m_AOR_Probe, Population_Manager_Base::m_AORProbeFileName, and Population_Manager_Base::m_TheLandscape.

◆ PestMortLocOutput()

void Beetle_Population_Manager::PestMortLocOutput ( )
protected

Annual pesticide mortality locations output.

◆ PestMortLocOutputError()

static void Beetle_Population_Manager::PestMortLocOutputError ( )
staticprotected

Pesticide mortality output error handling.

◆ PestMortLocOutputOpen()

static void Beetle_Population_Manager::PestMortLocOutputOpen ( )
staticprotected

Annual pesticide mortality output file open.

Referenced by Ladybird_Population_Manager::Ladybird_Population_Manager().

◆ Probe()

unsigned Beetle_Population_Manager::Probe ( int  a_ListIndex,
Probe_Data a_TheProbe_ptr 
)
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.

Warning
The probe function only works for eggs when the whole landscap is used. The rest needs rewriting.

Reimplemented from Population_Manager.

1670  {
1671  // Counts through the list and goes through each area to see if the animal
1672  // is standing there and if the farm, veg or element conditions are met
1673  AnimalPosition Sp{};
1674  unsigned NumberBeetles = 0;
1675  if (a_ListIndex == 0)
1676  {
1677  int X;
1678  int Y;
1679  // Four possibilites
1680  // either NoVegTypes or NoElementTypes or NoFarmTypes is >0 or all==0
1681  if (a_TheProbe_ptr->m_NoFarms != 0)
1682  {
1683  for (int n = 0; n < 365; n++)
1684  {
1685  int sz = (*m_EList)[n]->SupplyEggNumber();
1686  for (int j = 0; j < sz; j++)
1687  {
1688  APoint pt = (*m_EList)[n]->SupplyPoint();
1689  Y = pt.m_y;
1690  X = pt.m_x;
1691  unsigned Farm = m_TheLandscape->SupplyFarmOwner(X, Y);
1692  for (unsigned i = 0; i < a_TheProbe_ptr->m_NoAreas; i++)
1693  {
1694  if (X >= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_x1) && Y >= static_cast<int>(
1695  a_TheProbe_ptr->m_Rect[i].m_y1) && X <= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_x2)
1696  &&
1697  Y <= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_y2))
1698  for (unsigned k = 0; k < a_TheProbe_ptr->m_NoFarms; k++)
1699  {
1700  if (a_TheProbe_ptr->m_RefFarms[k] == Farm) NumberBeetles++;
1701  // it is in the square so increment number
1702  }
1703  }
1704  }
1705  }
1706  }
1707  else if (a_TheProbe_ptr->m_NoEleTypes != 0)
1708  {
1709  for (int n = 0; n < 365; n++)
1710  {
1711  int sz = (*m_EList)[n]->SupplyEggNumber();
1712  for (int j = 0; j < sz; j++)
1713  {
1714  APoint pt = (*m_EList)[n]->SupplyPoint();
1715  Y = pt.m_y;
1716  X = pt.m_x;
1717  int EleType = m_TheLandscape->GetOwner_tole(X, Y);
1718  for (unsigned i = 0; i < a_TheProbe_ptr->m_NoAreas; i++)
1719  {
1720  if (X >= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_x1) && Y >= static_cast<int>(
1721  a_TheProbe_ptr->m_Rect[i].m_y1) && X <= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_x2)
1722  &&
1723  Y <= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_y2))
1724  for (unsigned k = 0; k < a_TheProbe_ptr->m_NoEleTypes; k++)
1725  {
1726  if (a_TheProbe_ptr->m_RefEle[k] == EleType) NumberBeetles++;
1727  // it is in the square so increment number
1728  }
1729  }
1730  }
1731  }
1732  }
1733  else if (a_TheProbe_ptr->m_NoVegTypes != 0)
1734  {
1735  for (int n = 0; n < 365; n++)
1736  {
1737  int sz = (*m_EList)[n]->SupplyEggNumber();
1738  for (int j = 0; j < sz; j++)
1739  {
1740  APoint pt = (*m_EList)[n]->SupplyPoint();
1741  Y = pt.m_y;
1742  X = pt.m_x;
1743  int VegType = m_TheLandscape->SupplyVegType(X, Y);
1744  for (unsigned i = 0; i < a_TheProbe_ptr->m_NoAreas; i++)
1745  {
1746  if (X >= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_x1) && Y >= static_cast<int>(
1747  a_TheProbe_ptr->m_Rect[i].m_y1) && X <= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_x2)
1748  &&
1749  Y <= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_y2))
1750  for (unsigned k = 0; k < a_TheProbe_ptr->m_NoVegTypes; k++)
1751  {
1752  if (a_TheProbe_ptr->m_RefVeg[k] == VegType) NumberBeetles++;
1753  // it is in the square so increment number
1754  }
1755  }
1756  }
1757  }
1758  }
1759  else // both must be zero
1760  {
1761  if (a_TheProbe_ptr->m_FullLandscapeProbe) { NumberBeetles = m_EPopSize; }
1762  for (int n = 0; n < 365; n++)
1763  {
1764  int sz = (*m_EList)[n]->SupplyEggNumber();
1765  for (int j = 0; j < sz; j++)
1766  {
1767  APoint pt = (*m_EList)[n]->SupplyPoint();
1768  Y = pt.m_y;
1769  X = pt.m_x;
1770  for (unsigned i = 0; i < a_TheProbe_ptr->m_NoAreas; i++)
1771  {
1772  if (X >= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_x1) && Y >= static_cast<int>(
1773  a_TheProbe_ptr->m_Rect[i].m_y1) && X <= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_x2)
1774  &&
1775  Y <= static_cast<int>(a_TheProbe_ptr->m_Rect[i].m_y2)) NumberBeetles++;
1776  // it is in the square so increment number
1777  }
1778  }
1779  }
1780  }
1781  }
1782  else
1783  {
1784  // Four possibilites
1785  // either NoVegTypes or NoElementTypes or NoFarmTypes is >0 or all==0
1786  if (a_TheProbe_ptr->m_NoFarms != 0)
1787  {
1788  for (unsigned j = 0; j < GetLiveArraySize(a_ListIndex); j++)
1789  {
1790  Sp = SupplyAnimalPtr(a_ListIndex, j)->SupplyPosition();
1791  unsigned Farm = SupplyAnimalPtr(a_ListIndex, j)->SupplyFarmOwnerRef();
1792  for (unsigned i = 0; i < a_TheProbe_ptr->m_NoAreas; i++)
1793  {
1794  if ((a_TheProbe_ptr->m_FullLandscapeProbe) || (Sp.m_x >= a_TheProbe_ptr->m_Rect[i].m_x1 && Sp.m_y >= a_TheProbe_ptr->m_Rect[i].m_y1 && Sp.
1795  m_x <= a_TheProbe_ptr->m_Rect[i].m_x2 && Sp.m_y <= a_TheProbe_ptr->m_Rect[i].m_y2))
1796  for (unsigned k = 0; k < a_TheProbe_ptr->m_NoFarms; k++)
1797  {
1798  if (a_TheProbe_ptr->m_RefFarms[k] == Farm) NumberBeetles++;
1799  // it is in the square so increment number
1800  }
1801  }
1802  }
1803  }
1804  else if (a_TheProbe_ptr->m_NoEleTypes != 0)
1805  {
1806  for (unsigned j = 0; j < GetLiveArraySize(a_ListIndex); j++)
1807  {
1808  Sp = SupplyAnimalPtr(a_ListIndex, j)->SupplyPosition();
1809  for (unsigned i = 0; i < a_TheProbe_ptr->m_NoAreas; i++)
1810  {
1811  if ((a_TheProbe_ptr->m_FullLandscapeProbe) || (Sp.m_x >= a_TheProbe_ptr->m_Rect[i].m_x1 && Sp.m_y >= a_TheProbe_ptr->m_Rect[i].m_y1 && Sp.
1812  m_x <= a_TheProbe_ptr->m_Rect[i].m_x2 && Sp.m_y <= a_TheProbe_ptr->m_Rect[i].m_y2))
1813  for (unsigned k = 0; k < a_TheProbe_ptr->m_NoEleTypes; k++)
1814  {
1815  if (a_TheProbe_ptr->m_RefEle[k] == Sp.m_EleType) NumberBeetles++;
1816  // it is in the square so increment number
1817  }
1818  }
1819  }
1820  }
1821  else
1822  {
1823  if (a_TheProbe_ptr->m_NoVegTypes != 0)
1824  {
1825  for (unsigned j = 0; j < GetLiveArraySize(a_ListIndex); j++)
1826  {
1827  Sp = SupplyAnimalPtr(a_ListIndex, j)->SupplyPosition();
1828  for (unsigned i = 0; i < a_TheProbe_ptr->m_NoAreas; i++)
1829  {
1830  if ((a_TheProbe_ptr->m_FullLandscapeProbe) || (Sp.m_x >= a_TheProbe_ptr->m_Rect[i].m_x1 && Sp.m_y >= a_TheProbe_ptr->m_Rect[i].m_y1 && Sp.
1831  m_x <= a_TheProbe_ptr->m_Rect[i].m_x2 && Sp.m_y <= a_TheProbe_ptr->m_Rect[i].m_y2))
1832  {
1833  for (unsigned k = 0; k < a_TheProbe_ptr->m_NoVegTypes; k++)
1834  {
1835  if (a_TheProbe_ptr->m_RefVeg[k] == Sp.m_VegType) NumberBeetles++;
1836  // it is in the square so increment number
1837  }
1838  }
1839  }
1840  }
1841  }
1842  else // both must be zero
1843  {
1844  if (a_TheProbe_ptr->m_FullLandscapeProbe) { NumberBeetles = GetLiveArraySize(a_ListIndex); }
1845  else
1846  {
1847  for (unsigned j = 0; j < GetLiveArraySize(a_ListIndex); j++)
1848  {
1849  Sp = SupplyAnimalPtr(a_ListIndex, j)->SupplyPosition();
1850  for (unsigned i = 0; i < a_TheProbe_ptr->m_NoAreas; i++)
1851  {
1852  if (Sp.m_x >= a_TheProbe_ptr->m_Rect[i].m_x1 && Sp.m_y >= a_TheProbe_ptr->m_Rect[i].m_y1 &&
1853  Sp.m_x <= a_TheProbe_ptr->m_Rect[i].m_x2 && Sp.m_y <= a_TheProbe_ptr->m_Rect[i].m_y2)
1854  NumberBeetles++;
1855  // it is in the square so increment number
1856  }
1857  }
1858  }
1859  }
1860  }
1861  }
1862  return NumberBeetles;
1863 }

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().

◆ SetAdultEggLayingThreshold()

void Beetle_Population_Manager::SetAdultEggLayingThreshold ( const double  a_value)
inlineprotected

Set the temperature threshold for egg laying.

1099 { m_AdultEggLayingThreshold = a_value; }

References m_AdultEggLayingThreshold.

Referenced by Beetle_Population_Manager().

◆ SetStageProductionRecord()

void Beetle_Population_Manager::SetStageProductionRecord ( int  a_value,
int  a_stage 
)
inline

Sets stage production record attribute.

1142 { m_StageProductionProduction[a_stage] = a_value; }

References m_StageProductionProduction.

◆ SupplyDailyEggPopSize()

int Beetle_Population_Manager::SupplyDailyEggPopSize ( const int  day) const
inline

Get the number of eggs created on a given day.

1025 { return (*m_EList)[day]->SupplyEggNumber(); }

References m_EList.

Referenced by DoFirst().

◆ SupplyDayDegs()

virtual double Beetle_Population_Manager::SupplyDayDegs ( const unsigned  a_stage,
const int  a_day 
)
inlinevirtual

Get the day degress experienced this year for a specific day created and instar/stage.

1030 { return m_DayDegs[a_stage][a_day]; }

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().

◆ SupplyDevelConst1()

double Beetle_Population_Manager::SupplyDevelConst1 ( unsigned  a_index) const
inline
1028 { return m_DevelConst1[a_index]; }

References m_DevelConst1.

Referenced by Ladybird_Pupae::St_Develop().

◆ SupplyEggLocXY()

void Beetle_Population_Manager::SupplyEggLocXY ( unsigned  day,
int  j,
int &  x,
int &  y 
) const

Get the location of an egg from a given day.

2065  {
2066  (*m_EList)[a_day]->Supply_m_Location(a_j, a_x, a_y);
2067 }

◆ SupplyEggPopSize()

int Beetle_Population_Manager::SupplyEggPopSize ( ) const
inline

Get egg population size.

1023 { return static_cast<int>(m_EPopSize); }

References m_EPopSize.

Referenced by GetPopulationSize().

◆ TheAOROutputProbe()

void Beetle_Population_Manager::TheAOROutputProbe ( )
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.

◆ TheReallyBigOutputProbe()

void Beetle_Population_Manager::TheReallyBigOutputProbe ( )
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.

1889  {
1890  const auto totalF = GetLiveArraySize(bob_Adult);
1891  int x, y;
1892  const int w = m_TheLandscape->SupplySimAreaWidth();
1893  const int h = m_TheLandscape->SupplySimAreaWidth();
1894  *ReallyBigOutputPrb << 0 << ' ' << w << ' ' << 0 << ' ' << h << ' ' << totalF << endl;
1895  for (unsigned j = 0; j < totalF; j++) //adult females
1896  {
1897  if (SupplyAnimalPtr(bob_Adult, j)->GetCurrentStateNo() != -1)
1898  {
1899  TAnimal* a_an_ptr = SupplyAnimalPtr(bob_Adult, j);
1900  x=a_an_ptr->Supply_m_Location_x();
1901  y=a_an_ptr->Supply_m_Location_y();
1902  *ReallyBigOutputPrb << x << '\t' << y << '\t' << m_TheLandscape->SupplyPolyRef(x, y) << endl;
1903  }
1904  }
1905  ReallyBigOutputPrb->flush();
1906 }

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().

◆ TheRipleysOutputProbe()

void Beetle_Population_Manager::TheRipleysOutputProbe ( ofstream *  a_prb)
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.

1869  {
1870  const auto totalF = GetLiveArraySize(bob_Adult);
1871  const int w = m_TheLandscape->SupplySimAreaWidth();
1872  const int h = m_TheLandscape->SupplySimAreaWidth();
1873  *a_prb << 0 << ' ' << w << ' ' << 0 << ' ' << h << ' ' << totalF << endl;
1874  for (unsigned j = 0; j < totalF; j++)
1875  {
1876  const TAnimal* a_an_ptr = SupplyAnimalPtr(bob_Adult, j);
1877  if (a_an_ptr->GetCurrentStateNo() != -1)
1878  {
1879  *a_prb << a_an_ptr->Supply_m_Location_x() << '\t' << a_an_ptr->Supply_m_Location_y() << endl;
1880  }
1881  }
1882  (*a_prb).flush();
1883 }

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().

Member Data Documentation

◆ m_AboveInflectionRates

vector<double> Beetle_Population_Manager::m_AboveInflectionRates {}
protected

Day degree constant above inflection point for all non-adult stages.

Referenced by Beetle_Population_Manager(), Ladybird_Population_Manager::DayDegreeCalculations(), and DayDegreeCalculations().

◆ m_AdultEggLayingThreshold

double Beetle_Population_Manager::m_AdultEggLayingThreshold {}
protected

Temperature threshold for egg laying.

Referenced by Bembidion_Population_Manager::CalculateDailyEggProduction(), and SetAdultEggLayingThreshold().

◆ m_BeetleLarvalStagesNum

◆ m_BeetlePositionMaps

vector<SimplePositionMapInt*> Beetle_Population_Manager::m_BeetlePositionMaps[bob_foobar] {}
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().

◆ m_BeetleStartHabitats

TToleList Beetle_Population_Manager::m_BeetleStartHabitats
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().

◆ m_BeetleToleTovs

tBeetleToleTovs Beetle_Population_Manager::m_BeetleToleTovs
protected

The list of start habitats for the beetle.

Referenced by Beetle_Population_Manager().

◆ m_DayDegs

◆ m_DevelConst1

vector<double> Beetle_Population_Manager::m_DevelConst1 {}
protected

◆ m_DevelopmentInflectionPoints

vector<double> Beetle_Population_Manager::m_DevelopmentInflectionPoints {}
protected

◆ m_EggProductionSlope

double Beetle_Population_Manager::m_EggProductionSlope {}
protected

the slope of the linear function that defines todays egg production

Referenced by Beetle_Population_Manager(), and Bembidion_Population_Manager::CalculateDailyEggProduction().

◆ m_EList

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().

◆ m_EPopSize

long Beetle_Population_Manager::m_EPopSize {0}

To store the current population size.

Referenced by DoFirst(), Probe(), and SupplyEggPopSize().

◆ m_InCropNo

◆ m_InCropRef

◆ m_InFieldNo

◆ m_MortalityTempMax

double Beetle_Population_Manager::m_MortalityTempMax {25.0}
protected

◆ m_MortalityTempMin

double Beetle_Population_Manager::m_MortalityTempMin {0.0}
protected

hreshold temperatures for mortalities: Min

T

Referenced by Ladybird_Population_Manager::DayDegreeCalculations(), and DayDegreeCalculations().

◆ m_MortalityTempStep

double Beetle_Population_Manager::m_MortalityTempStep {5.0}
protected

Threshold temperatures for mortalities: Step size.

Referenced by Ladybird_Population_Manager::DayDegreeCalculations(), and DayDegreeCalculations().

◆ m_MoveMap

std::unique_ptr<MovementMap> Beetle_Population_Manager::m_MoveMap

◆ m_NoTemperatureCategories

int Beetle_Population_Manager::m_NoTemperatureCategories { 0 }
protected

Storage for the number of temperature categories used.

Referenced by Ladybird_Population_Manager::DayDegreeCalculations(), and DayDegreeCalculations().

◆ m_OffFieldNo

◆ m_StageProductionProduction

vector<int> Beetle_Population_Manager::m_StageProductionProduction { 0 }
protected

◆ m_TemperatureCategory

int Beetle_Population_Manager::m_TemperatureCategory { 0 }
protected

The documentation for this class was generated from the following files:
cfg_BeetleEggPPPEffectProb
static CfgFloat cfg_BeetleEggPPPEffectProb("BEETLE_EGGPPPEFFECTPROB", CFG_CUSTOM, 0, 0.0, 1.0)
Effect probability on threshold excedence.
Beetle_Population_Manager::SupplyDailyEggPopSize
int SupplyDailyEggPopSize(const int day) const
Get the number of eggs created on a given day.
Definition: Beetle_BaseClasses.h:1025
Beetle_Adult::SetAdult_SoilCultivationMortality
static void SetAdult_SoilCultivationMortality(const double a_value)
Set adult soil mortality parameter.
Definition: Beetle_BaseClasses.h:818
TAnimal::Supply_m_Location_x
int Supply_m_Location_x() const
Returns the ALMaSS x-coordinate.
Definition: PopulationManager.h:239
Beetle_Adult::SetAdultPppThreshold
static void SetAdultPppThreshold(const double a_thresh)
Set body PPP threshold.
Definition: Beetle_BaseClasses.h:812
tobs_Foraging
Definition: Beetle_BaseClasses.h:68
tobs_Aggregating
Definition: Beetle_BaseClasses.h:69
cfg_BeetleLarvaStriglingMort
static CfgFloat cfg_BeetleLarvaStriglingMort("BEETLE_LARVASTRIGLINGMORT", CFG_CUSTOM, 0.0)
The larval mechanincal weeding mortality parameter.
cfg_CfgRipleysOutputUsed
CfgBool cfg_CfgRipleysOutputUsed
Beetle_Pupae::SetPPPPEffectProbDecay
static void SetPPPPEffectProbDecay(const double a_decay)
Definition: Beetle_BaseClasses.h:713
Beetle_Egg_List::SetEgg_StriglingMort
static void SetEgg_StriglingMort(const double a_value)
Set mechanical weeding mortality parameter.
Definition: Beetle_BaseClasses.h:448
Beetle_Adult::SetAdultPPPElimRate
static void SetAdultPPPElimRate(const double a_rate)
Set body PPP eliminatation rate.
Definition: Beetle_BaseClasses.h:810
Beetle_Population_Manager::m_InFieldNo
int m_InFieldNo
In-field counter.
Definition: Beetle_BaseClasses.h:1117
cfg_BeetleDailyAdultMort
static CfgFloat cfg_BeetleDailyAdultMort("BEETLE_DAILYADULTMORT", CFG_CUSTOM, 0.001)
The daily fixed mortality adult probability.
Landscape::TranslateVegTypes
TTypesOfVegetation TranslateVegTypes(int VegReference)
Returns vegetation type translated from the ALMaSS reference number.
Definition: Landscape.h:2326
cfg_BeetleDailyEggMort
static CfgFloat cfg_BeetleDailyEggMort("BEETLE_DAILYEGGMORT", CFG_CUSTOM, 0.007)
The daily fixed mortality egg probability.
TAnimal::SupplyPosition
AnimalPosition SupplyPosition() const
Returns the objects location and habitat type and veg type.
Definition: PopulationManager.cpp:1533
Population_Manager::SupplyAnimalPtr
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.
Definition: PopulationManager.h:678
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
tobs_Initiation
Definition: Beetle_BaseClasses.h:59
cfg_BeetlePupalPPPEffectProbDecay
static CfgFloat cfg_BeetlePupalPPPEffectProbDecay("BEETLE_PUPALPPPEFFECTPROBDECAY", CFG_CUSTOM, 0, 0.0, 1.0)
Effect probability for delayed effects on threshold excedence.
Landscape::SupplyVegType
TTypesOfVegetation SupplyVegType(int a_x, int a_y)
Returns the vegetation type of the polygon using the polygon reference number a_polyref or coordinate...
Definition: Landscape.h:1925
cfg_BeetleAdultStriglingMort
static CfgFloat cfg_BeetleAdultStriglingMort("BEETLE_ADULTSTRIGLINGMORT", CFG_CUSTOM, 0.250)
The adult mechanincal weeding mortality parameter.
Beetle_Pupae::SetPPPPEffectProb
static void SetPPPPEffectProb(const double a_conc)
Definition: Beetle_BaseClasses.h:711
Probe_Data::m_FullLandscapeProbe
bool m_FullLandscapeProbe
Definition: PopulationManager.h:429
Beetle_Population_Manager::m_DevelConst1
vector< double > m_DevelConst1
Day degree threshold constant for eggs to pupae.
Definition: Beetle_BaseClasses.h:1068
cfg_BeetleMaxDailyMovement
static CfgInt cfg_BeetleMaxDailyMovement("BEETLE_MAXDAILYMOVEMENT", CFG_CUSTOM, 10)
Storage for the maximum daily movement parameter (m)
cfg_BeetleEggHarvestMort
static CfgFloat cfg_BeetleEggHarvestMort("BEETLE_EGGHARVESTMORT", CFG_CUSTOM, 0.0)
The egg harvest mortality parameter.
Beetle_Population_Manager::m_BeetlePositionMaps
vector< SimplePositionMapInt * > m_BeetlePositionMaps[bob_foobar]
Definition: Beetle_BaseClasses.h:1113
Population_Manager::m_population_type
TTypesOfPopulation m_population_type
Definition: PopulationManager.h:858
Beetle_Adult::SetAdultPppEffectProbDecay
static void SetAdultPppEffectProbDecay(const double a_decay)
Set body PPP effect probability.
Definition: Beetle_BaseClasses.h:816
CfgStr::value
char * value() const
Definition: Configurator.h:182
Population_Manager::BeforeStepActions
vector< unsigned > BeforeStepActions
Holds the season list of possible before step actions.
Definition: PopulationManager.h:819
Beetle_Adult::SetAdult_InsecticideApplication
static void SetAdult_InsecticideApplication(const double a_value)
Set Insecticide mortality parameter.
Definition: Beetle_BaseClasses.h:820
Beetle_Adult::SetAdult_HarvestMort
static void SetAdult_HarvestMort(const double a_value)
Set the harvest parameter.
Definition: Beetle_BaseClasses.h:824
Beetle_Population_Manager::m_NoTemperatureCategories
int m_NoTemperatureCategories
Storage for the number of temperature categories used.
Definition: Beetle_BaseClasses.h:1050
Beetle_Pupae::SetPupa_SoilCultivationMortality
static void SetPupa_SoilCultivationMortality(const double a_value)
Set Pupal soil mortality parameter.
Definition: Beetle_BaseClasses.h:715
Beetle_Population_Manager::m_AdultEggLayingThreshold
double m_AdultEggLayingThreshold
Temperature threshold for egg laying.
Definition: Beetle_BaseClasses.h:1064
cfg_BeetleDailyStartReproductionChance
static CfgFloat cfg_BeetleDailyStartReproductionChance("POECILUS_DAILY_STARTREPRODUCTION_CHANCE", CFG_CUSTOM, 0.033333)
Beetle_Population_Manager::m_BeetleStartHabitats
TToleList m_BeetleStartHabitats
the list of the toles that the beetles are assigned to in the beginning of the simulation
Definition: Beetle_BaseClasses.h:1054
Beetle_Adult::SetAdultDenDepMort0
static void SetAdultDenDepMort0(const int a_value)
Storage for density-dependent mortality parameter.
Definition: Beetle_BaseClasses.h:842
Beetle_Population_Manager::DayDegreeCalculations
virtual void DayDegreeCalculations(int a_dayinyear, bool a_usehourly)
Does the day degree calculations needed for the species here.
Definition: Beetle_BaseClasses.cpp:1601
cfg_BeetleStartAggregatingDay
static CfgInt cfg_BeetleStartAggregatingDay("BEETLE_STARTAGGREGATINGDAY", CFG_CUSTOM, 270)
Population_Manager_Base::m_ListNames
const char * m_ListNames[32]
A list of life-stage names.
Definition: PopulationManager.h:628
Beetle_Base::SetBeetleReproductionLandscape
static void SetBeetleReproductionLandscape(const TToleList &a_list)
Set the list of toles that the beetles are allowed to reproduce upon.
Definition: Beetle_BaseClasses.h:318
Beetle_Larvae::SetLPPPEffectProbDecay
static void SetLPPPEffectProbDecay(const double a_decay)
Definition: Beetle_BaseClasses.h:574
cfg_BeetleDevelopmentAboveInflectionPoints
static CfgArray_Double cfg_BeetleDevelopmentAboveInflectionPoints("BEETLE_DEVELOPMENTABOVEINFLECTIONPOINTS", CFG_CUSTOM, 5, vector< double >{(178.58/124.9),(101.4/87.5),(107.4/95.2),(190.4/189.3),(147.7/132.3)})
Development rates above the inflection point in day degree calculations - default bembidion.
cfg_BeetleEgg_InsecticideApplication
static CfgFloat cfg_BeetleEgg_InsecticideApplication("BEETLE_EGGINSECTICIDEMORT", CFG_CUSTOM, 0)
The egg simple insecticide mortality parameter.
cfg_BeetleDevelopmentMaximum
static CfgArray_Double cfg_BeetleDevelopmentMaximum("BEETLE_DEVELOPMENMAXIMUM", CFG_CUSTOM, 10, vector< double >{25.0, 25.0, 25.0, 25.0, 25.0, 99999, 99999, 99999, 99999, 99999})
Day degree upper bound for all stages (10 possible stages allowed for)
cfg_BeetleInFieldHibernateChance
static CfgFloat cfg_BeetleInFieldHibernateChance("BEETLE_INFIELDHIBERNATECHANCE", CFG_CUSTOM, 0.25, 0, 1)
THe probability that a beetle can hibernate in open fields.
Beetle_Adult::SetStartAggregatingDayProb
static void SetStartAggregatingDayProb(const int a_value)
Definition: Beetle_BaseClasses.h:836
Beetle_Base::CopyMyself
void CopyMyself(int a_beetle)
For experimental purposes.
Definition: Beetle_BaseClasses.cpp:364
cfg_BeetleEggProductionSlope
static CfgFloat cfg_BeetleEggProductionSlope("BEETLE_EGGPRODUCTIONSLOPE", CFG_CUSTOM, 0.6)
The rate of egg production per day degree.
CfgFloat::value
double value() const
Definition: Configurator.h:142
cfg_BeetleDevelopmentConstants
static CfgArray_Double cfg_BeetleDevelopmentConstants("BEETLE_DEVELOPMENTCONSTANTS", CFG_CUSTOM, 10, vector< double >{178.58, 101.4, 107.4, 190.4, 147.7, 0, 0, 0, 0, 0})
The egg, larval and pupal development target in day degrees above a threshold (10 possible stages)
cfg_BeetlePupa_SoilCultivationMortality
static CfgFloat cfg_BeetlePupa_SoilCultivationMortality("BEETLE_PUPAESOILMORT", CFG_CUSTOM, 0.500)
The pupal soil cultivation mortality parameter.
Beetle_Adult::SetStartAggregatingDay
static void SetStartAggregatingDay(const int a_value)
Definition: Beetle_BaseClasses.h:834
cfg_BeetleEggPPPElimiationRate
static CfgFloat cfg_BeetleEggPPPElimiationRate("BEETLE_EGGPPPELIMIATIONRATE", CFG_CUSTOM, 0.0, 0.0, 1.0)
the daily egg elimination rate for pesticides
cfg_BeetleLarvalPPPEffectProb
static CfgFloat cfg_BeetleLarvalPPPEffectProb("BEETLE_LARVALPPPEFFECTPROB", CFG_CUSTOM, 0, 0.0, 1.0)
Effect probability on threshold excedence.
Beetle_Base::SetBeetleMap
static void SetBeetleMap(const int a_value, SimplePositionMapInt *a_map_ptr)
Set lifestage map.
Definition: Beetle_BaseClasses.h:334
Beetle_Population_Manager::m_AboveInflectionRates
vector< double > m_AboveInflectionRates
Day degree constant above inflection point for all non-adult stages.
Definition: Beetle_BaseClasses.h:1072
rectangle::m_y1
unsigned m_y1
Definition: PopulationManager.h:117
Beetle_Population_Manager::SupplyEggPopSize
int SupplyEggPopSize() const
Get egg population size.
Definition: Beetle_BaseClasses.h:1023
cfg_BeetleLarvaHarvestMort
static CfgFloat cfg_BeetleLarvaHarvestMort("BEETLE_LARVAHARVESTMORT", CFG_CUSTOM, 0.0)
The larval harvest mortality parameter.
Beetle_Pupae::SetPupa_InsecticideApplication
static void SetPupa_InsecticideApplication(const double a_value)
Set Pupal insecticide mortality parameter.
Definition: Beetle_BaseClasses.h:717
Beetle_Adult::SetAdult_StriglingMort
static void SetAdult_StriglingMort(const double a_value)
Set the mechanical weeding mortality parameter.
Definition: Beetle_BaseClasses.h:822
Beetle_Base::SetBeetleHalfReproductionLandscape
static void SetBeetleHalfReproductionLandscape(const TToleList &a_list)
Set the list of toles that the beetles are allowed to reproduce upon, but that yield half of normal f...
Definition: Beetle_BaseClasses.h:320
cfg_BeetleLarvalPPPThreshold
static CfgFloat cfg_BeetleLarvalPPPThreshold("BEETLE_LARVALPPPTHRESHOLD", CFG_CUSTOM, 99999.9, 0.0, 100000)
PPP effects threshold.
cfg_BeetleEggPPPThreshold
static CfgFloat cfg_BeetleEggPPPThreshold("BEETLE_EGGPPPTHRESHOLD", CFG_CUSTOM, 99999.9, 0.0, 100000)
PPP effects threshold.
Population_Manager_Base::m_ListNameLength
int m_ListNameLength
the number of life-stages simulated in the population manager
Definition: PopulationManager.h:626
BeetleToleTovs::BeetleSuitableForHibernation
BeetleTovParams BeetleSuitableForHibernation
Definition: Beetle_toletov.h:57
cfg_BeetleDailyPupalMort
static CfgFloat cfg_BeetleDailyPupalMort("BEETLE_DAILYPUPALMORT", CFG_CUSTOM, 0.001)
The daily fixed mortality pupal probability.
TAnimal::SupplyFarmOwnerRef
unsigned SupplyFarmOwnerRef() const
Get the current location farm ref if any.
Definition: PopulationManager.cpp:1547
Beetle_Egg_List::SetEggPppElimRate
static void SetEggPppElimRate(const double a_rate)
Definition: Beetle_BaseClasses.h:452
Beetle_Egg_List::SetEggPppEffectProb
static void SetEggPppEffectProb(const double a_conc)
Definition: Beetle_BaseClasses.h:456
cfg_BeetleAdultPPPEffectProbDecay
static CfgFloat cfg_BeetleAdultPPPEffectProbDecay("BEETLE_ADPPPEFFECTPROBDECAY", CFG_CUSTOM, 0, 0.0, 1.0)
Effect probability for delayed effects on threshold excedence.
Beetle_Population_Manager::CalculateDailyEggProduction
virtual void CalculateDailyEggProduction(double a_temptoday)=0
Figure out the maximum number of eggs that can be laid today - must be overridden in descendent class...
BeetleToleTovs::BeetleReproductionLandscape
BeetleToleParams BeetleReproductionLandscape
Definition: Beetle_toletov.h:85
Beetle_Adult::SetTodaysEggProduction
static void SetTodaysEggProduction(const int a_value)
Daily temperature determined egg production.
Definition: Beetle_BaseClasses.h:848
rectangle::m_x2
unsigned m_x2
Definition: PopulationManager.h:118
Beetle_Adult::SetStartReproductionDay
static void SetStartReproductionDay(const int a_value)
Definition: Beetle_BaseClasses.h:850
Beetle_Base::SetDevelopmentConstants
static void SetDevelopmentConstants(const std::vector< double > &a_value)
Set the day degree constant.
Definition: Beetle_BaseClasses.h:310
CfgBool::value
bool value() const
Definition: Configurator.h:164
cfg_PmEventsize
CfgInt cfg_PmEventsize
Beetle_Larvae::SetLDDepMort1
static void SetLDDepMort1(const double a_value)
Storage for density-dependent mortality parameter.
Definition: Beetle_BaseClasses.h:578
cfg_BeetlePupalPPPEffectProb
static CfgFloat cfg_BeetlePupalPPPEffectProb("BEETLE_PUPALPPPEFFECTPROB", CFG_CUSTOM, 0, 0.0, 1.0)
Effect probability on threshold excedence.
Population_Manager_Base::m_TheLandscape
Landscape * m_TheLandscape
holds an internal pointer to the landscape
Definition: PopulationManager.h:624
Beetle_Population_Manager::m_BeetleToleTovs
tBeetleToleTovs m_BeetleToleTovs
The list of start habitats for the beetle.
Definition: Beetle_BaseClasses.h:1056
BeetleToleTovs
Definition: Beetle_toletov.h:30
cfg_BeetleAdultMovementTempThreshold
CfgFloat cfg_BeetleAdultMovementTempThreshold("BEETLE_ADULTMOVEMENTTEMPTHRESHOLD", CFG_CUSTOM, 1.0)
The temperature threshold for movement.
Beetle_Adult::SetDispersalThreshold
static void SetDispersalThreshold(const double a_value)
Set the adult dispersal temp threshold for DD calcuation.
Definition: Beetle_BaseClasses.h:846
Beetle_Pupae::SetPupalPPPElimRate
static void SetPupalPPPElimRate(const double a_rate)
Definition: Beetle_BaseClasses.h:707
Probe_Data::m_RefVeg
TTypesOfVegetation m_RefVeg[25]
Definition: PopulationManager.h:437
Beetle_Population_Manager::DoExtremeTempActions
virtual void DoExtremeTempActions(double a_airtemp)
Species specific actions to cope with response to extreme temperature, if needed.
Definition: Beetle_BaseClasses.h:1091
Population_Manager::m_AOR_Probe
AOR_Probe * m_AOR_Probe
A pointer to the AOR probe.
Definition: PopulationManager.h:875
Beetle_Larvae::SetLarva_HarvestMort
static void SetLarva_HarvestMort(const double a_value)
Set harvest mortality parameter.
Definition: Beetle_BaseClasses.h:593
TTypesOfLandscapeElement
TTypesOfLandscapeElement
Values that represent the types of landscape polygon that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:57
Population_Manager::LamdaClear
void LamdaClear()
Definition: PopulationManager.h:885
cfg_BeetleDevelopmentInflectionPoints
static CfgArray_Double cfg_BeetleDevelopmentInflectionPoints("BEETLE_DEVELOPMENTINFLECTIONPOINTS", CFG_CUSTOM, 10, vector< double >{9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999})
Inflection point in day degree calculations - default bembidion.
Beetle_Adult::SetAdultMaxMoveDist
static void SetAdultMaxMoveDist(const int a_value)
Set the max move distance for dispersal.
Definition: Beetle_BaseClasses.h:828
cfg_BeetleAdultPPPElimiationRate
static CfgFloat cfg_BeetleAdultPPPElimiationRate("BEETLE_ADPPPELIMIATIONRATE", CFG_CUSTOM, 0.0, 0.0, 1.0)
the daily adult elimination rate for pesticides
Beetle_Population_Manager::DoLarvalDailyMortalityActions
virtual void DoLarvalDailyMortalityActions(double a_atemptoday)
Species specific actions to cope with temperature related laval mortality.
Definition: Beetle_BaseClasses.h:1095
BeetleToleTovs::BeetleHalfReproductionLandscape
BeetleToleParams BeetleHalfReproductionLandscape
Definition: Beetle_toletov.h:96
cfg_BeetleEggStriglingMort
static CfgFloat cfg_BeetleEggStriglingMort("BEETLE_EGGSTRIGLINGMORT", CFG_CUSTOM, 0.0)
The egg mechanincal weeding mortality parameter.
AOR_Probe::DoProbe
virtual void DoProbe(int a_lifestage)
Definition: AOR_Probe.cpp:104
tobs_NextStage
Definition: Beetle_BaseClasses.h:64
Beetle_Larvae::SetLarvalDailyMort
static void SetLarvalDailyMort(const vector< double > &a_value, const int a_numLarvalStages, const int a_catagories)
Set the daily fixed mortality probability based on the larval stages and temperature.
Definition: Beetle_BaseClasses.h:582
cfg_BeetlePupaMaxAge
static CfgInt cfg_BeetlePupaMaxAge("BEETLE_PUPAMAXAGE", CFG_CUSTOM, 60)
The daily fixed mortality pupal probability.
cfg_BeetleLarvalPPPEffectProbDecay
static CfgFloat cfg_BeetleLarvalPPPEffectProbDecay("BEETLE_LARVALPPPEFFECTPROBDECAY", CFG_CUSTOM, 0, 0.0, 1.0)
Effect probability for delayed effects on threshold excedence.
Landscape::SupplyFarmOwner
int SupplyFarmOwner(int a_x, int a_y)
Returns the farm owner pointer for the polygon referenced by a_polyref or a_x, a_y.
Definition: Landscape.h:1774
Landscape::SupplySimAreaWidth
int SupplySimAreaWidth(void)
Gets the simulation landscape width.
Definition: Landscape.h:2297
APoint
A simple class defining an x,y coordinate set.
Definition: ALMaSS_Setup.h:52
cfg_BeetleADDepMort1
static CfgFloat cfg_BeetleADDepMort1("BEETLE_ADDEPMORTONE", CFG_CUSTOM, 0.10)
Storage for density-dependent mortality parameter.
cfg_BeetleAdultPPPThreshold
static CfgFloat cfg_BeetleAdultPPPThreshold("BEETLE_ADPPPTHRESHOLD", CFG_CUSTOM, 99999.9, 0.0, 100000)
PPP effects threshold.
Beetle_Base::SetBeetleSuitableForHibernation
static void SetBeetleSuitableForHibernation(const TTovList &a_list)
Set the list of tovs that are suitable for hibernation.
Definition: Beetle_BaseClasses.h:316
Beetle_Population_Manager::Catastrophe2
void Catastrophe2()
Method to arbitrarily alter populations size restricted spatially.
Definition: Beetle_BaseClasses.cpp:2030
Beetle_Egg_List::SetEgg_SoilCultivationMortality
static void SetEgg_SoilCultivationMortality(const double a_value)
Set egg soil mortality parameter.
Definition: Beetle_BaseClasses.h:442
Beetle_Base::SizeBeetleMap
static void SizeBeetleMap(const int a_value)
Size the lifestage map.
Definition: Beetle_BaseClasses.h:330
Beetle_Egg_List::SetEgg_InsecticideApplication
static void SetEgg_InsecticideApplication(const double a_value)
Set Larval insecticide mortality parameter.
Definition: Beetle_BaseClasses.h:444
Beetle_Population_Manager::m_TemperatureCategory
int m_TemperatureCategory
Storage for the temperature category today.
Definition: Beetle_BaseClasses.h:1048
Beetle_Population_Manager::m_MortalityTempMin
double m_MortalityTempMin
hreshold temperatures for mortalities: Min
Definition: Beetle_BaseClasses.h:1044
TAnimal::Supply_m_Location_y
int Supply_m_Location_y() const
Returns the ALMaSS y-coordinate.
Definition: PopulationManager.h:243
Population_Manager::LamdaDumpOutput
void LamdaDumpOutput()
Definition: PopulationManager.cpp:771
cfg_BeetleADDepMort0
static CfgInt cfg_BeetleADDepMort0("BEETLE_ADDEPMORTZERO", CFG_CUSTOM, 2)
Storage for density-dependent mortality parameter.
TAnimal
The base class for all ALMaSS animal classes. Includes all the functionality required to be handled b...
Definition: PopulationManager.h:200
cfg_BeetleEgg_SoilCultivationMortality
static CfgFloat cfg_BeetleEgg_SoilCultivationMortality("BEETLE_EGGSOILMORT", CFG_CUSTOM, 0.500)
The egg soil cultivation mortality parameter.
cfg_BeetlePupa_InsecticideApplication
static CfgFloat cfg_BeetlePupa_InsecticideApplication("BEETLE_PUPAEINSECTICIDEMORT", CFG_CUSTOM, 0.800)
The pupal simple insecticide mortality parameter.
Probe_Data::m_NoEleTypes
unsigned m_NoEleTypes
Definition: PopulationManager.h:434
AnimalPosition
A class defining an animals position.
Definition: PopulationManager.h:169
AOR_Probe
Definition: AOR_Probe.h:4
Population_Manager_Base::m_AORProbeFileName
std::string m_AORProbeFileName
name of the AOR Probe file
Definition: PopulationManager.h:630
Beetle_Adult::SetAdultDenDepMort1
static void SetAdultDenDepMort1(const double a_value)
Set density-dependent mortality parameter.
Definition: Beetle_BaseClasses.h:844
cfg_BeetleAdultTurnRate
static CfgFloat cfg_BeetleAdultTurnRate("BEETLE_ADULTTURNRATE", CFG_CUSTOM, 0.80, 0, 1.0)
Beetle_Population_Manager::m_EPopSize
long m_EPopSize
To store the current population size.
Definition: Beetle_BaseClasses.h:1105
Beetle_Pupae::SetPPPPThreshold
static void SetPPPPThreshold(const double a_thresh)
Definition: Beetle_BaseClasses.h:709
Beetle_Larvae::SetDailyLarvaMort
static void SetDailyLarvaMort(const double a_value)
Set the daily fixed mortality probability.
Definition: Beetle_BaseClasses.h:580
Beetle_Population_Manager::m_InCropRef
TTypesOfVegetation m_InCropRef
In crop tole reference.
Definition: Beetle_BaseClasses.h:1123
Probe_Data::m_Rect
rectangle m_Rect[16]
Definition: PopulationManager.h:433
Beetle_Population_Manager::m_BeetleLarvalStagesNum
int m_BeetleLarvalStagesNum
Definition: Beetle_BaseClasses.h:1058
Landscape::SupplyDayInYear
int SupplyDayInYear(void)
Passes a request on to the associated Calendar class function, the day in the year.
Definition: Landscape.h:2267
Beetle_Larvae::SetLPPPEffectProb
static void SetLPPPEffectProb(const double a_conc)
Definition: Beetle_BaseClasses.h:572
TOP_Beetle
Definition: PopulationManager.h:83
cfg_BeetleAdultHarvestMort
static CfgFloat cfg_BeetleAdultHarvestMort("BEETLE_ADULTHARVESTMORT", CFG_CUSTOM, 0.290)
The adult harvest mortality parameter.
Beetle_Egg_List::SetDailyEggMort
static void SetDailyEggMort(const double a_value)
Set the daily fixed mortality probability.
Definition: Beetle_BaseClasses.h:446
Beetle_Base::SetTodaysTempCategory
static void SetTodaysTempCategory(int a_category)
Set the soil temperature category used for calculatiung mortality steps.
Definition: Beetle_BaseClasses.h:312
SimplePositionMapInt
Definition: PositionMap.h:90
Population_Manager::m_is_paralleled
bool m_is_paralleled
This is used to indicate whether the species is paralleled.
Definition: PopulationManager.h:796
APoint::m_x
int m_x
Definition: ALMaSS_Setup.h:55
rectangle::m_y2
unsigned m_y2
Definition: PopulationManager.h:119
cfg_BeetleLarvalPPPElimiationRate
static CfgFloat cfg_BeetleLarvalPPPElimiationRate("BEETLE_LARVALPPPELIMIATIONRATE", CFG_CUSTOM, 0.0, 0.0, 1.0)
the daily larval elimination rate for pesticides
Beetle_Larvae::SetLarva_InsecticideApplication
static void SetLarva_InsecticideApplication(const double a_value)
Set Larval insecticide mortality parameter.
Definition: Beetle_BaseClasses.h:566
Beetle_Adult::SetAdultTurnRate
static void SetAdultTurnRate(const double a_value)
Definition: Beetle_BaseClasses.h:832
cfg_BeetleStopAggregationDay
static CfgInt cfg_BeetleStopAggregationDay("BEETLE_STOPAGGREGATINGDAY", CFG_CUSTOM, 280)
Landscape::SupplyYearNumber
int SupplyYearNumber(void)
Passes a request on to the associated Calendar class function, returns m_simulationyear
Definition: Landscape.h:2287
cfg_PmEventfrequency
CfgInt cfg_PmEventfrequency
CfgInt::value
int value() const
Definition: Configurator.h:116
Probe_Data::m_NoVegTypes
unsigned m_NoVegTypes
Definition: PopulationManager.h:435
Beetle_Larvae::SetLarva_StriglingMort
static void SetLarva_StriglingMort(const double a_value)
Set mechanical weeding mortality parameter.
Definition: Beetle_BaseClasses.h:591
cfg_BeetleAdult_InsecticideApplication
static CfgFloat cfg_BeetleAdult_InsecticideApplication("BEETLE_ADULTINSECTICIDEMORT", CFG_CUSTOM, 0.800)
The adult simple insecticide mortality parameter.
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
Beetle_Population_Manager::m_MortalityTempStep
double m_MortalityTempStep
Threshold temperatures for mortalities: Step size.
Definition: Beetle_BaseClasses.h:1042
Beetle_Population_Manager::Catastrophe
void Catastrophe() override
Method to arbitrarily alter populations size.
Definition: Beetle_BaseClasses.cpp:1967
Beetle_Adult::SetAdultMovementTempThreshold
static void SetAdultMovementTempThreshold(const double a_value)
Set the temperature threshold for movement.
Definition: Beetle_BaseClasses.h:830
cfg_BeetlePupaHarvestMort
static CfgFloat cfg_BeetlePupaHarvestMort("BEETLE_PUPAHARVESTMORT", CFG_CUSTOM, 0.0)
The pupal harvest mortality parameter.
TALMaSSObject::GetCurrentStateNo
int GetCurrentStateNo() const
Returns the current state number.
Definition: PopulationManager.h:137
Beetle_Larvae::SetLarva_SoilCultivationMortality
static void SetLarva_SoilCultivationMortality(const double a_value)
Set Larval soil mortality parameter.
Definition: Beetle_BaseClasses.h:564
Beetle_Base::SetMoveDistribution
static void SetMoveDistribution(const string &a_type_str, const string &a_args_str)
Set the movement distribution.
Definition: Beetle_BaseClasses.cpp:320
cfg_PmEventday
CfgInt cfg_PmEventday
Beetle_Population_Manager::m_MortalityTempMax
double m_MortalityTempMax
Threshold temperatures for mortalities: Max.
Definition: Beetle_BaseClasses.h:1046
cfg_BeetleEggPPPEffectProbDecay
static CfgFloat cfg_BeetleEggPPPEffectProbDecay("BEETLE_EGGLPPPEFFECTPROBDECAY", CFG_CUSTOM, 0, 0.0, 1.0)
Effect probability for delayed effects on threshold excedence.
tobs_Developing
Definition: Beetle_BaseClasses.h:61
Probe_Data::m_NoAreas
unsigned m_NoAreas
Definition: PopulationManager.h:432
Population_Manager::OpenTheRipleysOutputProbe
bool OpenTheRipleysOutputProbe()
Definition: PopulationManager.cpp:897
cfg_BeetleLDDepMort1
static CfgFloat cfg_BeetleLDDepMort1("BEETLE_LDDEPMORTONE", CFG_CUSTOM, 0.10)
Storage for density-dependent mortality parameter.
cfg_BeetlePupaStriglingMort
static CfgFloat cfg_BeetlePupaStriglingMort("BEETLE_PUPASTRIGLINGMORT", CFG_CUSTOM, 0.0)
The pupa mechanincal weeding mortality parameter.
Beetle_Pupae::SetPupa_HarvestMort
static void SetPupa_HarvestMort(const double a_value)
Set harvest mortality parameter.
Definition: Beetle_BaseClasses.h:721
Beetle_Egg_List::SetEggPppEffectProbDecay
static void SetEggPppEffectProbDecay(const double a_decay)
Definition: Beetle_BaseClasses.h:458
Beetle_Adult::SetDailyAdultMort
static void SetDailyAdultMort(const double a_value)
Set the daily fixed mortality probability.
Definition: Beetle_BaseClasses.h:840
Population_Manager::StateNames
const char * StateNames[100]
Definition: PopulationManager.h:801
Beetle_Adult
The class describing the adult (female) beetle objects.
Definition: Beetle_BaseClasses.h:793
cfg_BeetleDailyLarvalMort
static CfgFloat cfg_BeetleDailyLarvalMort("BEETLE_DAILYLARVALMORT", CFG_CUSTOM, 0.001)
The daily fixed mortality larval probability.
Probe_Data::m_RefFarms
unsigned m_RefFarms[25]
Definition: PopulationManager.h:439
BeetleToleParams::getList
TToleList getList()
Definition: Beetle_toletov.cpp:17
TOP_Ladybird
Definition: PopulationManager.h:76
Beetle_Population_Manager::IsStartHabitatAux
bool IsStartHabitatAux(TTypesOfLandscapeElement tole) const
Used to specify legal starting habitats for simulation start-up.
Definition: Beetle_BaseClasses.cpp:2070
Population_Manager::OpenTheReallyBigProbe
bool OpenTheReallyBigProbe()
Definition: PopulationManager.cpp:1005
Landscape::GetOwner_tole
TTypesOfLandscapeElement GetOwner_tole(int a_x, int a_y)
Returns the landscape type of the polygon owner (used in cases relating to e.g. unsprayed field margi...
Definition: Landscape.h:1742
Beetle_Egg_List::SetEggPppThreshold
static void SetEggPppThreshold(const double a_thresh)
Definition: Beetle_BaseClasses.h:454
Population_Manager::GetLiveArraySize
unsigned GetLiveArraySize(int a_listindex) override
Gets the number of 'live' objects for a list index in the TheArray.
Definition: PopulationManager.h:657
Beetle_Population_Manager::m_EggProductionSlope
double m_EggProductionSlope
the slope of the linear function that defines todays egg production
Definition: Beetle_BaseClasses.h:1066
Beetle_Adult::SetDailyStartReproductionChance
static void SetDailyStartReproductionChance(const double a_value)
Definition: Beetle_BaseClasses.h:852
cfg_BeetleStartAggregatingDayProb
static CfgInt cfg_BeetleStartAggregatingDayProb("BEETLE_STARTAGGREGATINGDAYPROB", CFG_CUSTOM, 260)
BeetleTovParams::getList
TTovList getList()
Definition: Beetle_toletov.cpp:14
Beetle_Population_Manager::m_InCropNo
int m_InCropNo
In-crop counter.
Definition: Beetle_BaseClasses.h:1119
cfg_BeetleLarva_SoilCultivationMortality
static CfgFloat cfg_BeetleLarva_SoilCultivationMortality("BEETLE_LARVAESOILMORT", CFG_CUSTOM, 0.500)
The larval soil cultivation mortality parameter.
rectangle::m_x1
unsigned m_x1
Definition: PopulationManager.h:116
cfg_BeetleInCropRef
CfgInt cfg_BeetleInCropRef("BEETLE_INCROPREF", CFG_CUSTOM, 603)
A reference to a crop type if we are looking for mortality locations within a special crop.
Farm
The base class for all farm types.
Definition: Farm.h:755
tobs_Emerging
Definition: Beetle_BaseClasses.h:66
Landscape::SupplySoilTemp
double SupplySoilTemp(void)
Passes a request on to the associated Weather class function, the soil temperature for the current da...
Definition: Landscape.h:2028
cfg_BeetleAdultPPPEffectProb
static CfgFloat cfg_BeetleAdultPPPEffectProb("BEETLE_ADPPPEFFECTPROB", CFG_CUSTOM, 0, 0.0, 1.0)
Effect probability on threshold excedence.
cfg_BeetleMoveProbType
static CfgStr cfg_BeetleMoveProbType("BEETLE_MOVEPROBTYPE", CFG_CUSTOM, "BETABINOMIAL")
Movement probability type.
Beetle_Larvae::SetLarvalPPPElimRate
static void SetLarvalPPPElimRate(const double a_rate)
Definition: Beetle_BaseClasses.h:568
Beetle_Adult::SetInFieldHibernateChance
static void SetInFieldHibernateChance(const double a_value)
Definition: Beetle_BaseClasses.h:826
Beetle_Population_Manager::m_DevelopmentInflectionPoints
vector< double > m_DevelopmentInflectionPoints
Inflection point in day degree calculations for non-adult stages.
Definition: Beetle_BaseClasses.h:1070
Population_Manager_Base::m_SimulationName
string m_SimulationName
stores the simulation name
Definition: PopulationManager.h:622
tole_Field
Definition: LandscapeFarmingEnums.h:65
March
const int March
Julian start dates of the month of March.
Definition: Landscape.h:42
cfg_BeetleDDepRange
static CfgInt cfg_BeetleDDepRange("BEETLE_DDEPRANGE", CFG_CUSTOM, 5)
The density-dependent range parameter for Larva.
cfg_CatastropheEventStartYear
CfgInt cfg_CatastropheEventStartYear
tobs_Dispersing
Definition: Beetle_BaseClasses.h:71
Beetle_Pupae::SetPupaMaxAge
static void SetPupaMaxAge(const int a_value)
Set the max age.
Definition: Beetle_BaseClasses.h:705
Beetle_Larvae::SetLPPPThreshold
static void SetLPPPThreshold(const double a_thresh)
Definition: Beetle_BaseClasses.h:570
Beetle_Population_Manager::m_StageProductionProduction
vector< int > m_StageProductionProduction
Testing/Output attribute holding the number of larvae produced today.
Definition: Beetle_BaseClasses.h:1060
Probe_Data::m_NoFarms
unsigned m_NoFarms
Definition: PopulationManager.h:436
Beetle_Population_Manager::DoEggDailyMortalityActions
virtual void DoEggDailyMortalityActions(double a_atemptoday)
Species specific actions to cope with temperature related egg mortality.
Definition: Beetle_BaseClasses.h:1093
Beetle_Pupae::SetPupa_StriglingMort
static void SetPupa_StriglingMort(const double a_value)
Set mechanical weeding mortality parameter.
Definition: Beetle_BaseClasses.h:719
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
Beetle_Adult::SetStopAggregationDay
static void SetStopAggregationDay(const int a_value)
Definition: Beetle_BaseClasses.h:838
cfg_BeetleAdultDispersalThreshold
static CfgFloat cfg_BeetleAdultDispersalThreshold("BEETLEADULTDISPERSALTHRESHOLD", CFG_CUSTOM, 6.0)
Beetle_Base::KillAndRemoveFromMap
void KillAndRemoveFromMap()
Kills the beetle - this version forces the beetle to re-enter the Step code and call st_Dying.
Definition: Beetle_BaseClasses.cpp:438
Beetle_Population_Manager::m_OffFieldNo
int m_OffFieldNo
Off-field counter.
Definition: Beetle_BaseClasses.h:1121
cfg_BeetleAdultEggLayingThreshold
static CfgFloat cfg_BeetleAdultEggLayingThreshold("BEETLE_ADULT_EGG_LAYING_THRESHOLD", CFG_CUSTOM, 6)
The threshold temperature for adult egg laying (default from Bembidion)
Beetle_Base::SetDDepRange
static void SetDDepRange(const int a_value)
Set density-dependent range parameter.
Definition: Beetle_BaseClasses.h:328
Beetle_Pupae::SetDailyPupaeMort
static void SetDailyPupaeMort(const double a_value)
Set the daily fixed mortality probability.
Definition: Beetle_BaseClasses.h:703
Beetle_Egg_List::SetEgg_HarvestMort
static void SetEgg_HarvestMort(const double a_value)
Set harvest mortality parameter.
Definition: Beetle_BaseClasses.h:450
tobs_BDying
Definition: Beetle_BaseClasses.h:73
Population_Manager::Population_Manager
Population_Manager(Landscape *a_l_ptr, int a_numberLifeStages=12)
Definition: PopulationManager.cpp:200
cfg_BeetleMoveProbArgs
static CfgStr cfg_BeetleMoveProbArgs("BEETLE_MOVEPROBARGS", CFG_CUSTOM, "14 1 2 0")
movement probability parameters to match with p_cfg_MoveProbType
cfg_BeetleAdult_SoilCultivationMortality
static CfgFloat cfg_BeetleAdult_SoilCultivationMortality("BEETLE_ADULTSOILMORT", CFG_CUSTOM, 0.270)
The adult soil cultivation mortality parameter.
Beetle_Larvae::SetLDDepMort0
static void SetLDDepMort0(const int a_value)
Storage for density-dependent mortality parameter.
Definition: Beetle_BaseClasses.h:576
cfg_BeetleStartReproductionDay
static CfgInt cfg_BeetleStartReproductionDay("BEETLE_STARTREPRODUCTION_DAY", CFG_CUSTOM, 79)
Population_Manager::ReallyBigOutputPrb
ofstream * ReallyBigOutputPrb
Definition: PopulationManager.h:873
Beetle_Population_Manager::m_MoveMap
std::unique_ptr< MovementMap > m_MoveMap
Map of suitability for movement.
Definition: Beetle_BaseClasses.h:1107
Population_Manager::TheSubArrays
vector< vector< forward_list< TAnimal * > * > > TheSubArrays
Hold all the animal pointers.
Definition: PopulationManager.h:804
Probe_Data::m_RefEle
TTypesOfLandscapeElement m_RefEle[25]
Definition: PopulationManager.h:438
cfg_BeetleActivityCountFile
static CfgStr cfg_BeetleActivityCountFile("BEETLE_ACTIVITYCOUNTFILE", CFG_CUSTOM, "BeetleActivesCount.txt")
Record the number of active adult beetles in the landscape.
cfg_BeetleLDDepMort0
static CfgInt cfg_BeetleLDDepMort0("BEETLE_LDDEPMORTZERO", CFG_CUSTOM, 2)
Storage for density-dependent mortality parameter.
Beetle_Population_Manager::m_EList
std::unique_ptr< std::vector< std::unique_ptr< Beetle_Egg_List > > > m_EList
Replacement for TheArray[0].
Definition: Beetle_BaseClasses.h:1109
Beetle_Population_Manager::SetAdultEggLayingThreshold
void SetAdultEggLayingThreshold(const double a_value)
Set the temperature threshold for egg laying.
Definition: Beetle_BaseClasses.h:1099
cfg_BeetleDevelopmentThresholds
static CfgArray_Double cfg_BeetleDevelopmentThresholds("BEETLE_DEVELOPMENTTHRESHOLDS", CFG_CUSTOM, 10, vector< double >{5.0, 5.0, 5.0, 5.0, 5.0, 99999, 99999, 99999, 99999, 99999})
Day degree threshold constant for all stages (10 possible stages allowed for)
cfg_BeetlePupalPPPThreshold
static CfgFloat cfg_BeetlePupalPPPThreshold("BEETLE_PUPALPPPTHRESHOLD", CFG_CUSTOM, 99999.9, 0.0, 100000)
PPP effects threshold.
cfg_BeetleLarva_InsecticideApplication
static CfgFloat cfg_BeetleLarva_InsecticideApplication("BEETLE_LARVAEINSECTICIDEMORT", CFG_CUSTOM, 0.800)
The larval simple insecticide mortality parameter.
Landscape::SupplySoilTempHour
double SupplySoilTempHour(int hour)
Returns the soil temperature in a given hour (0 to 23)
Definition: Landscape.h:2033
cfg_ReallyBigOutputUsed
CfgBool cfg_ReallyBigOutputUsed
bob_Adult
Definition: Beetle_BaseClasses.h:87
Landscape::SupplyPolyRef
int SupplyPolyRef(int a_x, int a_y)
Get the in map polygon reference number from the x, y location.
Definition: Landscape.h:2157
Beetle_Adult::SetAdultPppEffectProb
static void SetAdultPppEffectProb(const double a_conc)
Set body PPP effect probability.
Definition: Beetle_BaseClasses.h:814
APoint::m_y
int m_y
Definition: ALMaSS_Setup.h:56
Population_Manager::m_LiveArraySize
vector< unsigned > m_LiveArraySize
Definition: PopulationManager.h:786
tobs_Hibernating
Definition: Beetle_BaseClasses.h:70
BeetleToleTovs::BeetleStartHabitats
BeetleToleParams BeetleStartHabitats
Definition: Beetle_toletov.h:31
cfg_BeetlePupalPPPElimiationRate
static CfgFloat cfg_BeetlePupalPPPElimiationRate("BEETLE_PUPALPPPELIMIATIONRATE", CFG_CUSTOM, 0.0, 0.0, 1.0)
the daily pupal elimination rate for pesticides
Beetle_Population_Manager::m_DayDegs
vector< std::array< double, 365 > > m_DayDegs
Storage for daily day degrees for non-adult stages.
Definition: Beetle_BaseClasses.h:1052