File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/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
Oedothorax_Population_Manager Class Reference

#include <Oedothorax_Population_Manager.h>

Inheritance diagram for Oedothorax_Population_Manager:
Spider_Population_Manager Population_Manager Population_Manager_Base

Public Member Functions

 Oedothorax_Population_Manager (Landscape *p_L)
 
virtual void Init (void)
 An initiation method to initialise all the necessary values - must be overridden for species specific functionality
More...
 
virtual void DoFirst (void)
 DoFirst method, to be overridden in descendent classes
More...
 
virtual ~Oedothorax_Population_Manager ()
 
void CreateObjects (int ob_type, TAnimal *pvo, struct_Spider *data, int number)
 Creates new spider objects - this must be overridden in descendent classes
More...
 
virtual void TheAOROutputProbe ()
 A method to generate the AOR probe output
More...
 
virtual void TheRipleysOutputProbe (FILE *a_prb)
 A method to generate the Ripley probe output
More...
 
- Public Member Functions inherited from Spider_Population_Manager
int GetEggSacSpread ()
 Return the EggSacSpread value
More...
 
int GetDoubleEggSacSpread ()
 Return 2 x EggSacSpread value
More...
 
double GetBallooningMortalityPerMeter ()
 Return ballooning mortality per meter
More...
 
int GetDaysSinceRain ()
 Return the number of days since rain
More...
 
int GetTodaysMonth ()
 Return current month
More...
 
double GetTodaysDroughtSc (int index)
 Returns the drought score for high, medium or low plant biomass
More...
 
double GetJuvMort ()
 Return current juvenile mortality rate
More...
 
int GetDispDist (int chance)
 Returns the dispsersal distance associated with a particular frequency value
More...
 
double GetBTime (int day)
 Returns ballooning hours for a given day
More...
 
double GetBTimeToday ()
 Returns todays ballooning time
More...
 
int GetWindDirection ()
 Returns the wind direction
More...
 
bool IsBallooningWeather ()
 Returns the flag for ballooning weather
More...
 
double GetEggDegreesPoor ()
 Returns todays egg sac production day degrees for poor food
More...
 
double GetEggDegreesInt ()
 Returns todays egg sac production day degrees for intermediate food
More...
 
double GetEggDegreesGood ()
 Returns todays egg sac production day degrees for good food
More...
 
double GetJuvDegrees_good ()
 Returns todays juvenile development day degrees for good food
More...
 
double GetJuvDegrees_intermediate ()
 Returns todays juvenile development day degrees for intermediate food
More...
 
double GetJuvDegrees_poor ()
 Returns todays juvenile development day degrees for poor food
More...
 
double GetEggDevelDegrees (int day)
 Returns todays egg development day degrees
More...
 
bool CheckHumidity (int, int)
 Returns humid or not
More...
 
bool GetWalking ()
 Returns walking only flag
More...
 
bool GetMinWalkTemp ()
 Returns the minimum walking temperature
More...
 
 Spider_Population_Manager (Landscape *p_L, int N)
 The constructor
More...
 
virtual ~Spider_Population_Manager ()
 Destructor
More...
 
bool InSquare (int p_x, int p_y, int p_sqx, int p_sqy, int p_range)
 Returns true if p_x,p_y is inside the square defined by p_sqz,p_sqy as TL corner and p_range size length
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...
 
void OpenTheAOROutputProbe (const string &a_AORFilename) override
 Opens the AOR output file. More...
 
unsigned GetLiveArraySize (int a_listindex) override
 Gets the number of 'live' objects for a list index in the TheArray. More...
 
unsigned GetPopulationSize (int a_listindex) override
 Gets the number of species objects by default it is the same as LiveArray, however it could be different. This function should be used/overriden when we are interested in the number of the objects for presentation and not in inner maintenance of the PopulationManager and or 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 unsigned Probe (int ListIndex, Probe_Data *p_TheProbe)
 
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 ()
 
virtual void TheRipleysOutputProbe (ofstream *a_prb)
 Special output functionality. More...
 
virtual void TheReallyBigOutputProbe ()
 
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...
 

Protected Member Functions

void Catastrophe ()
 Allows for the possibility to create population level mortality
More...
 
- Protected Member Functions inherited from Population_Manager
virtual bool StepFinished ()
 Methods to run the simulations. More...
 
virtual void DoBefore ()
 
virtual void DoAfter ()
 
virtual void DoLast ()
 
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
 

Additional Inherited Members

- Public Attributes inherited from Spider_Population_Manager
MovementMapUnsignedm_MoveMap
 A representation of the landscape in terms of quality - NB MUST be assigned by the descendent population manager class Init() method
More...
 
SimplePositionMapm_EggPosMap
 Pointer to the egg position map
More...
 
SimplePositionMapm_JuvPosMap
 Pointer to the egg position map
More...
 
SimplePositionMapm_AdultPosMap
 Pointer to the egg position map
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...
 
- Static Public Attributes inherited from Spider_Population_Manager
static std::array< int, 31 > m_DispDistances
 An array to hold the dispersal distances possible as a probability 0-30 (x out of 10000) More...
 
- Protected Attributes inherited from Spider_Population_Manager
double m_DailyJuvMort
 The daily probability of a juvenile dying - to be assigned in a descendent classes population manager
More...
 
int m_DispersalDistances [10000]
 The distribution of dispersal distances - to be assigned in a descendent classes population manager
More...
 
double BallooningHrs [52 *7]
 The daily number of ballooning hours - to be assigned in a descendent classes population manager
More...
 
int m_DaysSinceRain
 The number of days since last rain
More...
 
int m_TodaysMonth
 Holds the current month
More...
 
double m_TodaysDroughtScore [3]
 Holds the current drought score for three vegetation classes
More...
 
double m_TodaysBallooningTime
 The current day's ballooning time
More...
 
int m_EggSacSpread
 Used to spread spiderlings on day 1 of hatch - to be assigned in a descendent classes population manager
More...
 
int m_DoubleEggSacSpread
 Twice the m_EggSacSpread, used to save multiplications
More...
 
double m_BallooningMortalityPerMeter
 The mortality of ballooned distance - to be assigned in a descendent classes population manager
More...
 
bool m_EggProdThresholdPassed
 A flag for passing minimum temperature for producing eggs. More...
 
int m_WindDirection
 Todays wind direction
More...
 
bool m_BallooningWeather
 A flag for whether the weather is correct for ballooning
More...
 
int m_BallooningStart
 A limiter for the day in year to start ballooning - to be assigned in a descendent classes population manager
More...
 
int m_BallooningStop
 A limiter for the day in year to stop ballooning - to be assigned in a descendent classes population manager
More...
 
double m_EggDevelopmentThreshold
 The lower threshold for egg development - to be assigned in a descendent classes population manager
More...
 
double m_EggDevelopmentThreshold2
 The upper threshold for egg development - to be assigned in a descendent classes population manager
More...
 
double m_EggDegrees [365]
 Cumulative day degrees from 1st Jan
More...
 
double m_JuvDegreesGood
 Contribution to day degrees under good food. More...
 
double m_JuvDegreesIntermediate
 Contribution to day degrees under intermediate food
More...
 
double m_JuvDegreesPoor
 Contribution to day degrees under poor food
More...
 
double m_EggProdDDegsGood
 Links reproduction to food levels and day degrees - good food. More...
 
double m_EggProdDDegsInt
 Links reproduction to food levels and day degrees - intermediate food
More...
 
double m_EggProdDDegsPoor
 Links reproduction to food levels and day degrees - poor food
More...
 
bool m_WalkingOnly
 A flag to denote the spider does not balloon
More...
 
bool m_MinWalkTemp
 A flag to show whether minimum walking temperature is reached
More...
 
double m_MinWalkTempThreshold
 A minimum dispersal by walking temperature
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...
 

Constructor & Destructor Documentation

◆ Oedothorax_Population_Manager()

Oedothorax_Population_Manager::Oedothorax_Population_Manager ( Landscape p_L)

Loads the list of Animal Classes.

127  : Spider_Population_Manager(p_L, 3)
128 {
129  // Three lists are needed so need to remove 6 of the ten default arrays
131  m_ListNames[0] = "Egg"; // from egg laying to the beginning of feeding
132  m_ListNames[1] = "Juvenile"; // larval development + cocoon spinning
133  m_ListNames[2] = "Adult"; // the summer diapause period
134  m_ListNameLength = 3;
135  Init();
136 }

References Init(), Population_Manager_Base::m_ListNameLength, and Population_Manager_Base::m_ListNames.

◆ ~Oedothorax_Population_Manager()

Oedothorax_Population_Manager::~Oedothorax_Population_Manager ( )
virtual
141 {
142  delete m_MoveMap;
143 }

References Spider_Population_Manager::m_MoveMap.

Member Function Documentation

◆ Catastrophe()

void Oedothorax_Population_Manager::Catastrophe ( void  )
protectedvirtual

Allows for the possibility to create population level mortality

Reimplemented from Spider_Population_Manager.

490  {
491  // This version simply alters populations on 1st January - it is very dangerous to
492  // add individuals in many of the models so beware!!!!
493 
494  // First do we have the right day?
495  int today = m_TheLandscape->SupplyDayInYear();
496  if (today!=1) return;
497  // First do we have the right year?
498  int year = m_TheLandscape->SupplyYearNumber();
499  if (year%cfg_PmEventfrequency.value()!=0) return;
500  Oedothorax_Egg* SpE = NULL;
501  Oedothorax_Juvenile* SpJ = NULL;
502  Oedothorax_Female* SpF = NULL;
503  // Now if the % decrease is higher or lower than 100 we need to do different things
504  int esize=cfg_PmEventsize.value();
505  if (esize<100) {
506  unsigned size2;
507  size2 = (unsigned)GetLiveArraySize(0);
508  for ( unsigned j = 0; j < size2; j++ ) {
509  if (g_random_fnc(100) >= esize) {
510  SpE = dynamic_cast < Oedothorax_Egg * > ( SupplyAnimalPtr(0, j) );
511  SpE->KillThis(); // Kill it
512  }
513  }
514  size2 = (unsigned) GetLiveArraySize(1);
515  for ( unsigned j = 0; j < size2; j++ ) {
516  if (g_random_fnc(100) >= esize) {
517  SpJ = dynamic_cast < Oedothorax_Juvenile * > ( SupplyAnimalPtr(1, j) );
518  SpE->KillThis(); // Kill it
519  }
520  }
521  size2 = (unsigned) GetLiveArraySize(2);
522  for ( unsigned j = 0; j < size2; j++ ) {
523  if (g_random_fnc(100) >= esize) {
524  SpF = dynamic_cast <Oedothorax_Female * > ( SupplyAnimalPtr(2, j) );
525  SpE->KillThis(); // Kill it
526  }
527  }
528  }
529  else return; // No change so do nothing
530 }

References cfg_PmEventfrequency, cfg_PmEventsize, g_random_fnc(), Population_Manager::GetLiveArraySize(), Spider_Base::KillThis(), Population_Manager_Base::m_TheLandscape, Population_Manager::SupplyAnimalPtr(), Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), and CfgInt::value().

◆ CreateObjects()

void Oedothorax_Population_Manager::CreateObjects ( int  ob_type,
TAnimal pvo,
struct_Spider data,
int  number 
)
virtual

Creates new spider objects - this must be overridden in descendent classes

Reimplemented from Spider_Population_Manager.

460 {
461  Oedothorax_Female* new_Female;
462  Oedothorax_Juvenile* new_Juvenile;
463  Oedothorax_Egg* new_Egg;
464 
465  for (int i = 0; i < number; i++)
466  {
467  if (ob_type == 0)
468  {
469  new_Egg = new Oedothorax_Egg(data->x, data->y, data->L, this, data->noEggs);
470  PushIndividual(ob_type, new_Egg);
471  IncLiveArraySize(ob_type);
472  }
473  if (ob_type == 1)
474  {
475  new_Juvenile = new Oedothorax_Juvenile(data->x, data->y, data->L, this);
476  PushIndividual(ob_type, new_Juvenile);
477  IncLiveArraySize(ob_type);
478  }
479  if (ob_type == 2)
480  {
481  new_Female = new Oedothorax_Female(data->x, data->y, data->L, this);
482  PushIndividual(ob_type, new_Female);
483  IncLiveArraySize(ob_type);
484  }
485  }
486 }

References Population_Manager::IncLiveArraySize(), struct_Spider::L, struct_Spider::noEggs, Population_Manager::PushIndividual(), struct_Spider::x, and struct_Spider::y.

Referenced by Init().

◆ DoFirst()

void Oedothorax_Population_Manager::DoFirst ( void  )
virtual

DoFirst method, to be overridden in descendent classes

Reimplemented from Spider_Population_Manager.

308 {
309 #ifdef __RECORD_RECOVERY_POLYGONS
310 
313  RecordRecoveryPolygons();
314 #endif
315  int today = m_TheLandscape->SupplyDayInYear();
316  if (today == 364)
317  {
318  // Kill all eggs
319  unsigned s = (unsigned)GetLiveArraySize(0);
320  for (unsigned j = 0; j < s; j++)
321  {
322  int x{0}, y{0};
323  TAnimal* a_ani_ptr = SupplyAnimalPtr(0, j);
324  x = a_ani_ptr->Supply_m_Location_x();
325  y = a_ani_ptr->Supply_m_Location_y();
326  m_EggPosMap->ClearMapValue(x, y);
327  //TheArray[0][j]->SetCurrentStateNo(-1); removed 15/10/2013 - seems superfluous given the call to KillThis
328  a_ani_ptr->KillThis();
329  }
330  // Ensure all females have zero egg sac devel. degrees
331  s = (unsigned)GetLiveArraySize(2);
332  Oedothorax_Female* SFem;
333  for (unsigned j = 0; j < s; j++)
334  {
335  SFem = (Oedothorax_Female*) SupplyAnimalPtr(2,j);
336  SFem->ZeroEggSacDegrees();
337  }
338  }
339  // Zero the daydegrees for the beginning of the year
340  if (today == 0)
341  {
342  for (int i = 0; i < 365; i++) m_EggDegrees[i] = 0;
343  m_EggProdThresholdPassed = false;
344  }
345  // Set the wind direction for today
347  // Is it ballooning time of year?
348  if (!((today >= m_BallooningStart) && (today < m_BallooningStop)))
349  {
350  m_WalkingOnly = true;
351  }
352  else
353  {
354  m_WalkingOnly = false;
355  // Is it ballooning weather today?
356  double TheTemp = m_TheLandscape->SupplyTemp();
357  if (TheTemp >= MinBallooningTemp)
358  {
359  double wi = m_TheLandscape->SupplyWind();
360  if (wi < 5.0) m_TodaysBallooningTime = 17.0 - (3.7 * wi);
361  else m_TodaysBallooningTime = 0;
364  }
365  else m_TodaysBallooningTime = 0;
366  if (TheTemp >= m_MinWalkTempThreshold) m_MinWalkTemp = true;
367  else m_MinWalkTemp = false;
368  }
369 
370  //Create proportion (per mille, i.e. 1000 to hatch) of development finished for eggs and juveniles
371  //eggs
372  double temp = m_TheLandscape->SupplyTemp();
373  double t = temp;
374  double Added = 0;
375  if (temp > m_EggDevelopmentThreshold)
376  {
377  if (temp > m_EggDevelopmentThreshold2) t = temp - (temp - m_EggDevelopmentThreshold); else t = temp;
378  Added = 1000 * ((cfg_Oedothorax_EggDevelRHO25.value() * ((273.15 + t) / 298.15)) * //1.987=Gas constant
379  exp((cfg_Oedothorax_EggDevelHA.value() / 1.987) * ((1 / 298.15) - (1 / (273.15 + t)))));
380  }
381  // Add today's day degrees to the day degrees experienced each day to date
382  for (int d = 0; d <= today; d++)
383  {
384  m_EggDegrees[d] += Added;
385  }
386 
387 
388  // Juveniles
389  // these differ from the eggs because we have three rates of growth dependent
390  // upon the food supply at the spiders location
392  {
393  if (temp > m_EggDevelopmentThreshold2) t = temp - (temp - m_EggDevelopmentThreshold); else t = temp;
394  m_JuvDegreesGood = 1000 * ((cfg_Oedothorax_JuvDevelRHO25.value() * ((273.15 + t) / 298.15)) *
395  exp((cfg_Oedothorax_JuvDevelHA.value() / 1.987) * ((1 / 298.15) - (1 / (273.15 + t)))));
398  }
399  else {
400  m_JuvDegreesGood = 0;
401  m_JuvDegreesPoor = 0;
403  }
404  //
405  // Eggsac production
407  if (temp > 0) {
408  if (temp > m_EggDevelopmentThreshold2) t = temp - (temp - m_EggDevelopmentThreshold); else t = temp;
409  /*New version using biophysical model
410  */
411  m_EggProdDDegsGood = 1000 * ((cfg_Oedothorax_EggProducRHO25.value() * ((273.15 + t) / 298.15)) * exp((cfg_Oedothorax_EggProducHA.value() / 1.987) * ((1 / 298.15) - (1 / (273.15 + t)))));
412  if (m_EggProdDDegsGood < 0) m_EggProdDDegsGood = 0.0;
415  }
416  else {
417  m_EggProdDDegsPoor = 0;
418  m_EggProdDDegsInt = 0;
419  m_EggProdDDegsGood = 0;
420  }
421  }
422  else
423  {
424  long date = m_TheLandscape->SupplyGlobalDate();
425  double SevenDayTemp = 0;
426  for (long d = date; d > date - 14; d--)
427  {
428  SevenDayTemp += (double)m_TheLandscape->SupplyTemp(d);
429  }
430  SevenDayTemp /= 14.0;
431  if (SevenDayTemp > cfg_Oedothorax_EggProducThreshold.value()) {
433  }
434  }
435  // Work out drought for each of three veg classes
436  // Temperature score is square value above a threshold
437  // Humitidy score is squared value below a RH threshold
438  // the values are summed and then scaled by a scaling factor which is different for three classes of vegeation cover
439  double dtemp = (g_weather->GetTempPeriod(g_date->Date(), 7) / 7.0) - cfg_Oedothorax_DroughtTThreshold.value(); if (dtemp < 0) dtemp = 0.0;
440  double RH = (g_weather->GetRHPeriod(g_date->Date(), 7) / 7.0);
442  if (RH < 0.0) RH = 0.0;
443  const double score = (dtemp * dtemp + RH * RH) * cfg_Oedothorax_DroughtScaler.value();
444  m_TodaysDroughtScore[0] = score;
445  m_TodaysDroughtScore[1] = score * 0.5;
446  m_TodaysDroughtScore[2] = score * 0.25;
447  // Juvenile temperature related mortality
448  double jtemp = temp;
449  if (jtemp < 0) jtemp = 0; else if (jtemp > 20.0) jtemp = 20.0; // This limits the effect of temperature decreasing mortality below 1.2% per day.
452 }

References Spider_Population_Manager::BallooningHrs, cfg_Oedothorax_DailyJuvMort, cfg_Oedothorax_DroughtRHThreshold, cfg_Oedothorax_DroughtScaler, cfg_Oedothorax_DroughtTThreshold, cfg_Oedothorax_EggDevelHA, cfg_Oedothorax_EggDevelRHO25, cfg_Oedothorax_EggProducHA, cfg_Oedothorax_EggProducIntemediate, cfg_Oedothorax_EggProducPoor, cfg_Oedothorax_EggProducRHO25, cfg_Oedothorax_EggProducThreshold, cfg_Oedothorax_JuvDevelHA, cfg_Oedothorax_JuvDevelIntermediate, cfg_Oedothorax_JuvDevelPoor, cfg_Oedothorax_JuvDevelRHO25, cfg_Oedothorax_JuvDevelThreshold, cfg_Oedothorax_TempDailyJuvMortParameterA, cfg_Oedothorax_TempDailyJuvMortParameterB, SimplePositionMap::ClearMapValue(), Calendar::Date(), g_date, g_weather, Population_Manager::GetLiveArraySize(), Weather::GetRHPeriod(), Weather::GetTempPeriod(), TAnimal::KillThis(), Spider_Population_Manager::m_BallooningStart, Spider_Population_Manager::m_BallooningStop, Spider_Population_Manager::m_DailyJuvMort, Spider_Population_Manager::m_EggDegrees, Spider_Population_Manager::m_EggDevelopmentThreshold, Spider_Population_Manager::m_EggDevelopmentThreshold2, Spider_Population_Manager::m_EggPosMap, Spider_Population_Manager::m_EggProdDDegsGood, Spider_Population_Manager::m_EggProdDDegsInt, Spider_Population_Manager::m_EggProdDDegsPoor, Spider_Population_Manager::m_EggProdThresholdPassed, Spider_Population_Manager::m_JuvDegreesGood, Spider_Population_Manager::m_JuvDegreesIntermediate, Spider_Population_Manager::m_JuvDegreesPoor, Spider_Population_Manager::m_MinWalkTemp, Spider_Population_Manager::m_MinWalkTempThreshold, Population_Manager_Base::m_TheLandscape, Spider_Population_Manager::m_TodaysBallooningTime, Spider_Population_Manager::m_TodaysDroughtScore, Spider_Population_Manager::m_TodaysMonth, Spider_Population_Manager::m_WalkingOnly, Spider_Population_Manager::m_WindDirection, MinBallooningTemp, TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Population_Manager::SupplyAnimalPtr(), Landscape::SupplyDayInYear(), Landscape::SupplyGlobalDate(), Landscape::SupplyMonth(), Landscape::SupplyTemp(), Landscape::SupplyWind(), Landscape::SupplyWindDirection8(), CfgFloat::value(), and Spider_Female::ZeroEggSacDegrees().

◆ Init()

void Oedothorax_Population_Manager::Init ( void  )
virtual

An initiation method to initialise all the necessary values - must be overridden for species specific functionality

A few objects are created here just to set the species specific parameter values. It is preferred that this is done here rather than the constructure for parameters that are const since this only needs doing once.

Reimplemented from Spider_Population_Manager.

148 {
152  // Juvenile mortality is base mortality, but to this is added a temperature related daily mortality.
157 
161 
162  m_MoveMap = new MovementMapUnsigned(m_TheLandscape, 2); // 2 for Oedothorax
163  // Ballooning distances
164  int count = 0;
165  // ***Lumi*** can we replace this with a new distribution function?
167  for (int i = 0; i < 31; i++)
168  {
169  while (count < m_DispDistances[i])
170  {
171  m_DispersalDistances[count++] = distance;
172  }
174  }
175 
178  }
179  if ( cfg_ReallyBigOutputUsed.value() ) {
181  } else ReallyBigOutputPrb=0;
182  // Set the simulation name
183  m_SimulationName = "Oedothorax";
188  Spider_Egg* spegg = new Spider_Egg(0, 0, m_TheLandscape, this,0);
195  delete spegg;
196  Spider_Juvenile* spjuv = new Spider_Juvenile(0, 0, m_TheLandscape, this);
199  delete spjuv;
200  Spider_Female* spad = new Spider_Female(0, 0, m_TheLandscape, this);
205 
206  delete spad;
207 
208  int temp_thread_num = omp_get_max_threads();
209  int start_num_in_thread = (cfg_OedothoraxStartNos.value() / temp_thread_num +1);
210  #pragma omp parallel
211  {
212  // Create adults
213  struct_Spider* aps;
214  aps = new struct_Spider;
215  aps->SpPM = this;
216  aps->L = m_TheLandscape;
219 
220  for (int i=0; i<start_num_in_thread; i++) // Start number of spiders
221  {
224  int temp_index_x = aps->x / m_guard_cell_size;
225  int temp_index_y = aps->y / m_guard_cell_size;
226  omp_set_nest_lock(m_MapGuard[temp_index_y][temp_index_x]);
227  if (m_AdultPosMap->GetMapValue(aps->x,aps->y)==0)
228  {
229  m_AdultPosMap->SetMapValue(aps->x,aps->y);
230  CreateObjects(tspi_Female,NULL,aps,1);
231  }
232  omp_unset_nest_lock(m_MapGuard[temp_index_y][temp_index_x]);
233  }
234  delete aps;
235 
236  }
238 
239  // Ensure that spider's execution order is shuffled after each time step
240  // or do nothing if that is prefered
241  BeforeStepActions[0]=0; // 0 = Shuffle, 1 = SortX, 2 = SortY, 3 = do nothing
242  BeforeStepActions[1]=0; // 0 = Shuffle, 1 = SortX, 2 = SortY, 3 = do nothing
243  BeforeStepActions[2]=0; // 0 = Shuffle, 1 = SortX, 2 = SortY, 3 = do nothing
244 
245 #ifdef __RECORD_RECOVERY_POLYGONS
246  /* Open the output file and append */
247  ofstream ofile("RecoveryPolygonsCounter.txt",ios::out);
248  ofile << "This file records the number of females in each polygon each day" << endl;
249  ofile.close();
250  /* Open the polygon recovery file and read in polygons to m_RecoveryPolygons */
251  ifstream ifile("RecoveryPolygonsList.txt",ios::in);
252  int n;
253  ifile >> n;
254  m_RecoveryPolygons[0] = n;
255  for (int i=0; i<n; i++) ifile >> m_RecoveryPolygons[1+i];
256  for (int i=0; i<n; i++) m_RecoveryPolygonsC[1+i]=0;
257  ifile.close();
258 #endif
259 }

References Population_Manager::BeforeStepActions, cfg_CfgRipleysOutputUsed, cfg_Oedothorax_BallooningDistanceInterval, cfg_Oedothorax_BallooningStart, cfg_Oedothorax_BallooningStop, cfg_Oedothorax_DailyEggMort, cfg_Oedothorax_DailyFemaleMort, cfg_Oedothorax_DailyJuvMort, cfg_Oedothorax_EggDevelConst2, cfg_Oedothorax_EggDevelThreshold, cfg_Oedothorax_EggDevelThreshold2, cfg_Oedothorax_EggProducConst, cfg_Oedothorax_EggSacSpread, cfg_Oedothorax_HatDensityDepMortConst, cfg_Oedothorax_JuvDensityDepMortConst, cfg_Oedothorax_JuvDevelConst2, cfg_Oedothorax_Max_Egg_Production, cfg_Oedothorax_MaxBalloonPercent, cfg_Oedothorax_MaxDistBalloonable, cfg_Oedothorax_SmallestBallooningDistance, cfg_Oedothorax_SpiderMinWalkTemp, cfg_OedothoraxDensityDependentConstantZero, cfg_OedothoraxStartNos, cfg_ReallyBigOutputUsed, count, CreateObjects(), g_random_fnc(), SimplePositionMap::GetMapValue(), struct_Spider::L, Spider_Population_Manager::m_AdultPosMap, Spider_Population_Manager::m_BallooningMortalityPerMeter, Spider_Population_Manager::m_BallooningStart, Spider_Population_Manager::m_BallooningStop, Spider_Egg::m_DailyEggMortConst, Spider_Female::m_DailyFemaleMort, Spider_Population_Manager::m_DailyJuvMort, Spider_Base::m_DenDependenceConst0, Spider_Population_Manager::m_DispDistances, Spider_Juvenile::m_DispersalChance, Spider_Population_Manager::m_DispersalDistances, Spider_Population_Manager::m_DoubleEggSacSpread, Spider_Egg::m_EggDevelConst, Spider_Population_Manager::m_EggDevelopmentThreshold, Spider_Population_Manager::m_EggDevelopmentThreshold2, Spider_Female::m_EggProducConst, Spider_Population_Manager::m_EggSacSpread, Population_Manager::m_guard_cell_size, Spider_Egg::m_HatDensityDepMortConst, Spider_Juvenile::m_JuvDensityDepMortConst, Spider_Juvenile::m_JuvDevelConst, Population_Manager::m_MapGuard, Spider_Female::m_Max_Egg_Production, Spider_Population_Manager::m_MinWalkTempThreshold, Spider_Population_Manager::m_MoveMap, Population_Manager::m_population_type, Spider_Base::m_SimH, Population_Manager_Base::m_SimulationName, Spider_Base::m_SimW, Population_Manager_Base::m_TheLandscape, Oedothorax_DispersalChance, Population_Manager::OpenTheReallyBigProbe(), Population_Manager::OpenTheRipleysOutputProbe(), Population_Manager::ReallyBigOutputPrb, SimplePositionMap::SetMapValue(), struct_Spider::SpPM, Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), TOP_Oedothorax, tspi_Female, CfgInt::value(), CfgFloat::value(), CfgBool::value(), struct_Spider::x, and struct_Spider::y.

Referenced by Oedothorax_Population_Manager().

◆ TheAOROutputProbe()

void Oedothorax_Population_Manager::TheAOROutputProbe ( )
virtual

A method to generate the AOR probe output

Reimplemented from Spider_Population_Manager.

534 {
535  m_AOR_Probe->DoProbe(2);
536 }

References AOR_Probe::DoProbe(), and Population_Manager::m_AOR_Probe.

◆ TheRipleysOutputProbe()

void Oedothorax_Population_Manager::TheRipleysOutputProbe ( FILE *  a_prb)
virtual

A method to generate the Ripley probe output

Reimplemented from Spider_Population_Manager.

539  {
540  Oedothorax_Female* FS;
541  unsigned totalF=(unsigned)GetLiveArraySize(2);
542  int x,y;
545  fprintf(a_prb,"%d %d %d %d %d\n", 0,w ,0, h, totalF);
546  for (unsigned j=0; j<totalF; j++) //adult females
547  {
548  FS=dynamic_cast<Oedothorax_Female*>(SupplyAnimalPtr(2, j));
549  x=FS->Supply_m_Location_x();
550  y=FS->Supply_m_Location_y();
551  fprintf(a_prb,"%d\t%d\n", x,y);
552  }
553  fflush(a_prb);
554 }

References Population_Manager::GetLiveArraySize(), Population_Manager_Base::m_TheLandscape, TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Population_Manager::SupplyAnimalPtr(), and Landscape::SupplySimAreaWidth().


The documentation for this class was generated from the following files:
cfg_Oedothorax_EggProducHA
static CfgFloat cfg_Oedothorax_EggProducHA("ERIGONE_EGGPRODUCHA", CFG_CUSTOM, 14000)
Spider_Population_Manager::m_EggProdThresholdPassed
bool m_EggProdThresholdPassed
A flag for passing minimum temperature for producing eggs.
Definition: Spider_BaseClasses.h:141
cfg_Oedothorax_EggProducConst
static CfgFloat cfg_Oedothorax_EggProducConst("OEDOTHORAX_EGGPRODUCCONST", CFG_CUSTOM, 1000)
cfg_Oedothorax_SpiderMinWalkTemp
static CfgFloat cfg_Oedothorax_SpiderMinWalkTemp("OEDOTHORAX_MIN_WALK_TEMP", CFG_CUSTOM, 3)
cfg_Oedothorax_JuvDevelThreshold
static CfgFloat cfg_Oedothorax_JuvDevelThreshold("OEDOTHORAX_JUVDEVELTHRESHOLD", CFG_CUSTOM, 0.0)
Spider_Base::m_DenDependenceConst0
static int m_DenDependenceConst0
This is the number of local spiders needed before density dependent mortality will kill
Definition: Spider_BaseClasses.h:290
TAnimal::Supply_m_Location_x
int Supply_m_Location_x() const
Returns the ALMaSS x-coordinate.
Definition: PopulationManager.h:239
cfg_Oedothorax_JuvDevelRHO25
static CfgFloat cfg_Oedothorax_JuvDevelRHO25("OEDOTHORAX_EGGVDEVELRH", CFG_CUSTOM, 0.094332631)
Spider_Population_Manager::Spider_Population_Manager
Spider_Population_Manager(Landscape *p_L, int N)
The constructor
Definition: Spider_BaseClasses.cpp:1075
Spider_Population_Manager::m_EggPosMap
SimplePositionMap * m_EggPosMap
Pointer to the egg position map
Definition: Spider_BaseClasses.h:112
TAnimal::KillThis
virtual void KillThis()
Sets all parameters ready for object destruction.
Definition: PopulationManager.h:263
Spider_Egg
The generic base class for spider eggsacs
Definition: Spider_BaseClasses.h:344
Spider_Population_Manager::m_MoveMap
MovementMapUnsigned * m_MoveMap
A representation of the landscape in terms of quality - NB MUST be assigned by the descendent populat...
Definition: Spider_BaseClasses.h:110
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
Spider_Population_Manager::m_DispDistances
static std::array< int, 31 > m_DispDistances
An array to hold the dispersal distances possible as a probability 0-30 (x out of 10000)
Definition: Spider_BaseClasses.h:118
Population_Manager::m_MapGuard
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.
Definition: PopulationManager.h:790
Spider_Population_Manager::m_BallooningStop
int m_BallooningStop
A limiter for the day in year to stop ballooning - to be assigned in a descendent classes population ...
Definition: Spider_BaseClasses.h:149
cfg_Oedothorax_MaxDistBalloonable
static CfgFloat cfg_Oedothorax_MaxDistBalloonable("OEDOTHORAX_MAXDISTBALLOONABLE", CFG_CUSTOM, 2200)
cfg_Oedothorax_DroughtScaler
static CfgFloat cfg_Oedothorax_DroughtScaler("OEDOTHORAX_DROUGHTSCALER", CFG_CUSTOM, 0.0000125)
cfg_Oedothorax_JuvDevelHA
static CfgFloat cfg_Oedothorax_JuvDevelHA("OEDOTHORAX_JUVVDEVELHA", CFG_CUSTOM, 23457.2191)
Spider_Population_Manager::m_WindDirection
int m_WindDirection
Todays wind direction
Definition: Spider_BaseClasses.h:143
Population_Manager::m_population_type
TTypesOfPopulation m_population_type
Definition: PopulationManager.h:858
Landscape::SupplyWind
double SupplyWind(void)
Passes a request on to the associated Weather class function, the wind speed for the current day.
Definition: Landscape.h:2061
Spider_Population_Manager::m_EggProdDDegsInt
double m_EggProdDDegsInt
Links reproduction to food levels and day degrees - intermediate food
Definition: Spider_BaseClasses.h:165
Population_Manager::BeforeStepActions
vector< unsigned > BeforeStepActions
Holds the season list of possible before step actions.
Definition: PopulationManager.h:819
Weather::GetRHPeriod
double GetRHPeriod(long a_date, unsigned int a_period)
Definition: Weather.cpp:723
Spider_Population_Manager::m_JuvDegreesGood
double m_JuvDegreesGood
Contribution to day degrees under good food.
Definition: Spider_BaseClasses.h:157
Spider_Population_Manager::m_JuvDegreesIntermediate
double m_JuvDegreesIntermediate
Contribution to day degrees under intermediate food
Definition: Spider_BaseClasses.h:159
Spider_Juvenile::m_JuvDevelConst
static double m_JuvDevelConst
Day degrees maturation threshold
Definition: Spider_BaseClasses.h:398
Spider_Female::m_EggProducConst
static double m_EggProducConst
Daydegrees threshold needed to produce an eggsac
Definition: Spider_BaseClasses.h:464
Spider_Population_Manager::m_BallooningStart
int m_BallooningStart
A limiter for the day in year to start ballooning - to be assigned in a descendent classes population...
Definition: Spider_BaseClasses.h:147
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
Population_Manager_Base::m_ListNames
const char * m_ListNames[32]
A list of life-stage names.
Definition: PopulationManager.h:628
Spider_Juvenile::m_DispersalChance
static std::array< int, 40 > m_DispersalChance
Disperals probability as a function of bad habitat days
Definition: Spider_BaseClasses.h:396
struct_Spider::L
Landscape * L
Definition: Spider_BaseClasses.h:99
Oedothorax_Population_Manager::Init
virtual void Init(void)
An initiation method to initialise all the necessary values - must be overridden for species specific...
Definition: Oedothorax_Population_Manager.cpp:147
cfg_Oedothorax_HatDensityDepMortConst
static CfgInt cfg_Oedothorax_HatDensityDepMortConst("OEDOTHORAX_HATDENSITYDEPMORTCONST", CFG_CUSTOM, 3)
cfg_Oedothorax_EggProducRHO25
static CfgFloat cfg_Oedothorax_EggProducRHO25("ERIGONE_EGGPRODUCRH", CFG_CUSTOM, 0.46)
Spider_Population_Manager::m_AdultPosMap
SimplePositionMap * m_AdultPosMap
Pointer to the egg position map
Definition: Spider_BaseClasses.h:116
cfg_Oedothorax_JuvDevelIntermediate
static CfgFloat cfg_Oedothorax_JuvDevelIntermediate("OEDOTHORAX_JUVDEVELINTERMEDIATE", CFG_CUSTOM, 0.66666666)
cfg_Oedothorax_BallooningStart
static CfgInt cfg_Oedothorax_BallooningStart("OEDOTHORAX_BALLOONINGSTART", CFG_CUSTOM, 91)
Spider_Female::m_DailyFemaleMort
static int m_DailyFemaleMort
Daily mortality probability
Definition: Spider_BaseClasses.h:468
CfgFloat::value
double value() const
Definition: Configurator.h:142
struct_Spider::noEggs
int noEggs
Definition: Spider_BaseClasses.h:101
Landscape::SupplyMonth
int SupplyMonth(void)
Passes a request on to the associated Calendar class function, returns m_month + 1 (the calendar mont...
Definition: Landscape.h:2272
Spider_Population_Manager::m_EggSacSpread
int m_EggSacSpread
Used to spread spiderlings on day 1 of hatch - to be assigned in a descendent classes population mana...
Definition: Spider_BaseClasses.h:135
cfg_Oedothorax_EggProducPoor
static CfgFloat cfg_Oedothorax_EggProducPoor("OEDOTHORAX_EGGPRODUCPOOR", CFG_CUSTOM, 0.33)
SimplePositionMap::ClearMapValue
virtual void ClearMapValue(unsigned a_x, unsigned a_y)
Definition: PositionMap.h:60
SimplePositionMap::SetMapValue
virtual void SetMapValue(unsigned a_x, unsigned a_y)
Definition: PositionMap.h:55
Spider_Population_Manager::m_WalkingOnly
bool m_WalkingOnly
A flag to denote the spider does not balloon
Definition: Spider_BaseClasses.h:169
Spider_Population_Manager::m_DoubleEggSacSpread
int m_DoubleEggSacSpread
Twice the m_EggSacSpread, used to save multiplications
Definition: Spider_BaseClasses.h:137
Population_Manager_Base::m_ListNameLength
int m_ListNameLength
the number of life-stages simulated in the population manager
Definition: PopulationManager.h:626
Oedothorax_Juvenile
Definition: Oedothorax.h:51
cfg_Oedothorax_MaxBalloonPercent
static CfgFloat cfg_Oedothorax_MaxBalloonPercent("OEDOTHORAX_MAXBALLOONPERCENT", CFG_CUSTOM, 5)
cfg_Oedothorax_EggDevelThreshold2
static CfgFloat cfg_Oedothorax_EggDevelThreshold2("OEDOTHORAX_EGGDEVELTHRESHOLD2", CFG_CUSTOM, 25.0)
Spider_Female::ZeroEggSacDegrees
void ZeroEggSacDegrees()
Reset eggsac day degrees counter to zero
Definition: Spider_BaseClasses.h:490
Spider_Population_Manager::m_EggDegrees
double m_EggDegrees[365]
Cumulative day degrees from 1st Jan
Definition: Spider_BaseClasses.h:155
CfgBool::value
bool value() const
Definition: Configurator.h:164
Spider_Population_Manager::m_EggProdDDegsPoor
double m_EggProdDDegsPoor
Links reproduction to food levels and day degrees - poor food
Definition: Spider_BaseClasses.h:167
cfg_Oedothorax_SmallestBallooningDistance
static CfgInt cfg_Oedothorax_SmallestBallooningDistance("OEDOTHORAX_SMALLESTBALLOONDIST", CFG_CUSTOM, 70)
The minimum ballooning distnace.
Population_Manager_Base::m_TheLandscape
Landscape * m_TheLandscape
holds an internal pointer to the landscape
Definition: PopulationManager.h:624
Oedothorax_DispersalChance
const std::array< int, 40 > Oedothorax_DispersalChance
Definition: Oedothorax_Population_Manager.cpp:59
cfg_Oedothorax_JuvDevelPoor
static CfgFloat cfg_Oedothorax_JuvDevelPoor("OEDOTHORAX_JUVDEVELPOOR", CFG_CUSTOM, 0.33333333)
Population_Manager::m_AOR_Probe
AOR_Probe * m_AOR_Probe
A pointer to the AOR probe.
Definition: PopulationManager.h:875
struct_Spider::SpPM
Spider_Population_Manager * SpPM
Definition: Spider_BaseClasses.h:100
MinBallooningTemp
const double MinBallooningTemp
Definition: Oedothorax_Population_Manager.cpp:69
cfg_OedothoraxDensityDependentConstantZero
static CfgInt cfg_OedothoraxDensityDependentConstantZero("OEDOTHORAX_DENDEPCONSTZERO", CFG_CUSTOM, 0)
SimplePositionMap::GetMapValue
virtual bool GetMapValue(unsigned a_x, unsigned a_y)
Definition: PositionMap.h:50
AOR_Probe::DoProbe
virtual void DoProbe(int a_lifestage)
Definition: AOR_Probe.cpp:104
Spider_Population_Manager::m_TodaysDroughtScore
double m_TodaysDroughtScore[3]
Holds the current drought score for three vegetation classes
Definition: Spider_BaseClasses.h:131
Spider_Juvenile::m_JuvDensityDepMortConst
static int m_JuvDensityDepMortConst
Juvenile density dependent mortality threshold
Definition: Spider_BaseClasses.h:394
cfg_OedothoraxStartNos
static CfgInt cfg_OedothoraxStartNos("OEDOTHORAX_STARTNO", CFG_CUSTOM, 50000)
Landscape::SupplySimAreaHeight
int SupplySimAreaHeight(void)
Gets the simulation landscape height.
Definition: Landscape.h:2302
Calendar::Date
long Date(void)
Definition: Calendar.h:57
Landscape::SupplySimAreaWidth
int SupplySimAreaWidth(void)
Gets the simulation landscape width.
Definition: Landscape.h:2297
Spider_Juvenile
The generic base class for juvenile spiders
Definition: Spider_BaseClasses.h:389
cfg_Oedothorax_DailyEggMort
static CfgInt cfg_Oedothorax_DailyEggMort("OEDOTHORAX_DAILYEGGMORT", CFG_CUSTOM, 40)
Spider_Female
The generic base class for female spiders
Definition: Spider_BaseClasses.h:459
Landscape::SupplyWindDirection8
int SupplyWindDirection8(void)
Passes a request on to the associated Weather class function, the wind direction in 8 directions for ...
Definition: Landscape.h:2072
struct_Spider
This is a data class that is used to create new instances of spider objects by CreateObjects in the r...
Definition: Spider_BaseClasses.h:94
TAnimal::Supply_m_Location_y
int Supply_m_Location_y() const
Returns the ALMaSS y-coordinate.
Definition: PopulationManager.h:243
TAnimal
The base class for all ALMaSS animal classes. Includes all the functionality required to be handled b...
Definition: PopulationManager.h:200
struct_Spider::x
int x
Definition: Spider_BaseClasses.h:97
struct_Spider::y
int y
Definition: Spider_BaseClasses.h:98
cfg_PmEventsize
CfgInt cfg_PmEventsize
cfg_Oedothorax_JuvDensityDepMortConst
static CfgInt cfg_Oedothorax_JuvDensityDepMortConst("OEDOTHORAX_JUVDENSITYDEPMORTCONST", CFG_CUSTOM, 4)
Landscape::SupplyDayInYear
int SupplyDayInYear(void)
Passes a request on to the associated Calendar class function, the day in the year.
Definition: Landscape.h:2267
cfg_Oedothorax_Max_Egg_Production
static CfgInt cfg_Oedothorax_Max_Egg_Production("OEDOTHORAX_MAX_EGG_PRODUCTION", CFG_CUSTOM, 15)
Spider_Population_Manager::m_MinWalkTemp
bool m_MinWalkTemp
A flag to show whether minimum walking temperature is reached
Definition: Spider_BaseClasses.h:171
Landscape::SupplyYearNumber
int SupplyYearNumber(void)
Passes a request on to the associated Calendar class function, returns m_simulationyear
Definition: Landscape.h:2287
cfg_Oedothorax_DroughtRHThreshold
static CfgFloat cfg_Oedothorax_DroughtRHThreshold("OEDOTHORAX_DROUGHTRHTHRESHOLD", CFG_CUSTOM, 90.0)
CfgInt::value
int value() const
Definition: Configurator.h:116
Spider_Population_Manager::m_TodaysMonth
int m_TodaysMonth
Holds the current month
Definition: Spider_BaseClasses.h:129
Spider_Population_Manager::BallooningHrs
double BallooningHrs[52 *7]
The daily number of ballooning hours - to be assigned in a descendent classes population manager
Definition: Spider_BaseClasses.h:125
Spider_Population_Manager::m_EggDevelopmentThreshold
double m_EggDevelopmentThreshold
The lower threshold for egg development - to be assigned in a descendent classes population manager
Definition: Spider_BaseClasses.h:151
Spider_Egg::m_DailyEggMortConst
static int m_DailyEggMortConst
This is a space for holding cfg species specific parameters - this is the daily egg mortality probabi...
Definition: Spider_BaseClasses.h:351
cfg_Oedothorax_TempDailyJuvMortParameterB
static CfgFloat cfg_Oedothorax_TempDailyJuvMortParameterB("OEDOTHORAX_DAILYTEMPJUVMORTPARAMB", CFG_CUSTOM, 0.011)
Population_Manager::OpenTheRipleysOutputProbe
bool OpenTheRipleysOutputProbe()
Definition: PopulationManager.cpp:897
cfg_Oedothorax_BallooningStop
static CfgInt cfg_Oedothorax_BallooningStop("OEDOTHORAX_BALLOONINGSTOP", CFG_CUSTOM, 180)
cfg_CfgRipleysOutputUsed
CfgBool cfg_CfgRipleysOutputUsed
cfg_Oedothorax_EggDevelConst2
static CfgFloat cfg_Oedothorax_EggDevelConst2("OEDOTHORAX_EGGDEVELCONSTTWO", CFG_CUSTOM, 1000)
g_weather
class Weather * g_weather
Definition: Weather.cpp:49
Population_Manager::OpenTheReallyBigProbe
bool OpenTheReallyBigProbe()
Definition: PopulationManager.cpp:1005
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
cfg_Oedothorax_EggDevelHA
static CfgFloat cfg_Oedothorax_EggDevelHA("OEDOTHORAX_EGGVDEVELHA", CFG_CUSTOM, 16894.22)
Oedothorax_Egg
Definition: Oedothorax.h:41
cfg_ReallyBigOutputUsed
CfgBool cfg_ReallyBigOutputUsed
Weather::GetTempPeriod
double GetTempPeriod(long a_date, unsigned int a_period)
Definition: Weather.cpp:707
Spider_Population_Manager::m_DailyJuvMort
double m_DailyJuvMort
The daily probability of a juvenile dying - to be assigned in a descendent classes population manager
Definition: Spider_BaseClasses.h:121
Spider_Female::m_Max_Egg_Production
static int m_Max_Egg_Production
The maximum number of eggs possible
Definition: Spider_BaseClasses.h:466
Population_Manager_Base::m_SimulationName
string m_SimulationName
stores the simulation name
Definition: PopulationManager.h:622
cfg_Oedothorax_EggDevelRHO25
static CfgFloat cfg_Oedothorax_EggDevelRHO25("OEDOTHORAX_EGGVDEVELRH", CFG_CUSTOM, 0.1132253)
cfg_PmEventfrequency
CfgInt cfg_PmEventfrequency
cfg_Oedothorax_TempDailyJuvMortParameterA
static CfgFloat cfg_Oedothorax_TempDailyJuvMortParameterA("OEDOTHORAX_DAILYTEMPJUVMORTPARAMA", CFG_CUSTOM, -0.0006)
Oedothorax_Population_Manager::CreateObjects
void CreateObjects(int ob_type, TAnimal *pvo, struct_Spider *data, int number)
Creates new spider objects - this must be overridden in descendent classes
Definition: Oedothorax_Population_Manager.cpp:458
cfg_Oedothorax_DroughtTThreshold
static CfgFloat cfg_Oedothorax_DroughtTThreshold("OEDOTHORAX_DROUGHTTTHRESHOLD", CFG_CUSTOM, 10.0)
Spider_Base::m_SimH
static int m_SimH
The height of the landscape
Definition: Spider_BaseClasses.h:294
cfg_Oedothorax_DailyFemaleMort
static CfgInt cfg_Oedothorax_DailyFemaleMort("OEDOTHORAX_DAILYFEMALEMORT", CFG_CUSTOM, 3)
Population_Manager::m_guard_cell_size
int m_guard_cell_size
Definition: PopulationManager.h:793
cfg_Oedothorax_EggProducIntemediate
static CfgFloat cfg_Oedothorax_EggProducIntemediate("OEDOTHORAX_EGGPRODUCINTERMEDIATE", CFG_CUSTOM, 0.66)
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
cfg_Oedothorax_EggProducThreshold
static CfgFloat cfg_Oedothorax_EggProducThreshold("OEDOTHORAX_EGGPRODUCTHRESHOLD", CFG_CUSTOM, 7.0)
Spider_Egg::m_EggDevelConst
static double m_EggDevelConst
This is a space for holding cfg species specific parameters - this is a developmental threshold for h...
Definition: Spider_BaseClasses.h:353
Spider_Base::m_SimW
static int m_SimW
The width of the landscape
Definition: Spider_BaseClasses.h:292
cfg_Oedothorax_EggSacSpread
static CfgInt cfg_Oedothorax_EggSacSpread("OEDOTHORAX_EGG_SAC_SPREAD", CFG_CUSTOM, 10)
TOP_Oedothorax
Definition: PopulationManager.h:71
cfg_Oedothorax_EggDevelThreshold
static CfgFloat cfg_Oedothorax_EggDevelThreshold("OEDOTHORAX_EGGDEVELTHRESHOLD", CFG_CUSTOM, 0.0)
Oedothorax_Female
Definition: Oedothorax.h:61
cfg_Oedothorax_BallooningDistanceInterval
static CfgInt cfg_Oedothorax_BallooningDistanceInterval("OEDOTHORAX_BALLOONINGSTEP", CFG_CUSTOM, 10)
The size of the frequency category for ballooning distances.
Spider_Population_Manager::m_BallooningMortalityPerMeter
double m_BallooningMortalityPerMeter
The mortality of ballooned distance - to be assigned in a descendent classes population manager
Definition: Spider_BaseClasses.h:139
Population_Manager::PushIndividual
void PushIndividual(const unsigned a_listindex, TAnimal *a_individual_ptr)
Definition: PopulationManager.cpp:1682
Population_Manager::ReallyBigOutputPrb
ofstream * ReallyBigOutputPrb
Definition: PopulationManager.h:873
tspi_Female
Definition: Spider_BaseClasses.h:49
Spider_Base::KillThis
virtual void KillThis()
Destroys the spider
Definition: Spider_BaseClasses.h:321
Spider_Egg::m_HatDensityDepMortConst
static int m_HatDensityDepMortConst
This is a space for holding cfg species specific parameters - this is the mortality constant associat...
Definition: Spider_BaseClasses.h:349
count
Definition: SubPopulation.h:48
cfg_Oedothorax_DailyJuvMort
static CfgFloat cfg_Oedothorax_DailyJuvMort("OEDOTHORAX_DAILYJUVMORT", CFG_CUSTOM, 0.003)
Spider_Population_Manager::m_EggDevelopmentThreshold2
double m_EggDevelopmentThreshold2
The upper threshold for egg development - to be assigned in a descendent classes population manager
Definition: Spider_BaseClasses.h:153
Spider_Population_Manager::m_MinWalkTempThreshold
double m_MinWalkTempThreshold
A minimum dispersal by walking temperature
Definition: Spider_BaseClasses.h:173
Spider_Population_Manager::m_JuvDegreesPoor
double m_JuvDegreesPoor
Contribution to day degrees under poor food
Definition: Spider_BaseClasses.h:161
Landscape::SupplyGlobalDate
long SupplyGlobalDate(void)
Passes a request on to the associated Calendar class function, returns the simulation global date for...
Definition: Landscape.h:2292
Spider_Population_Manager::m_DispersalDistances
int m_DispersalDistances[10000]
The distribution of dispersal distances - to be assigned in a descendent classes population manager
Definition: Spider_BaseClasses.h:123
cfg_Oedothorax_JuvDevelConst2
static CfgFloat cfg_Oedothorax_JuvDevelConst2("OEDOTHORAX_JUVDEVELCONSTTWO", CFG_CUSTOM, 1000.0)
Spider_Population_Manager::m_EggProdDDegsGood
double m_EggProdDDegsGood
Links reproduction to food levels and day degrees - good food.
Definition: Spider_BaseClasses.h:163
Spider_Population_Manager::m_TodaysBallooningTime
double m_TodaysBallooningTime
The current day's ballooning time
Definition: Spider_BaseClasses.h:133
MovementMapUnsigned
Movement maps are used for rapid computing of animal movement. This version uses values of 0 to max i...
Definition: MovementMap.h:52
Population_Manager::IncLiveArraySize
void IncLiveArraySize(int a_listindex)
Increments the number of 'live' objects for a list index in the TheArray.
Definition: PopulationManager.h:665