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
Erigone_Population_Manager Class Reference

#include <Erigone_Population_Manager.h>

Inheritance diagram for Erigone_Population_Manager:
Spider_Population_Manager Population_Manager Population_Manager_Base

Public Member Functions

 Erigone_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 ~Erigone_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

◆ Erigone_Population_Manager()

Erigone_Population_Manager::Erigone_Population_Manager ( Landscape p_L)

Loads the list of Animal Classes.

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

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

◆ ~Erigone_Population_Manager()

Erigone_Population_Manager::~Erigone_Population_Manager ( )
virtual
142 {
143  delete m_MoveMap;
144 }

References Spider_Population_Manager::m_MoveMap.

Member Function Documentation

◆ Catastrophe()

void Erigone_Population_Manager::Catastrophe ( void  )
protectedvirtual

Allows for the possibility to create population level mortality

Reimplemented from Spider_Population_Manager.

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

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 Erigone_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.

453 {
454  Erigone_Female* new_Female;
455  Erigone_Juvenile* new_Juvenile;
456  Erigone_Egg* new_Egg;
457 
458  for (int i = 0; i < number; i++)
459  {
460  if (ob_type == 0)
461  {
462  new_Egg = new Erigone_Egg(data->x, data->y, data->L, this, data->noEggs);
463  PushIndividual(ob_type, new_Egg);
464  IncLiveArraySize(ob_type);
465  }
466  if (ob_type == 1)
467  {
468  new_Juvenile = new Erigone_Juvenile(data->x, data->y, data->L, this);
469  PushIndividual(ob_type, new_Juvenile);
470  IncLiveArraySize(ob_type);
471  }
472  if (ob_type == 2)
473  {
474  new_Female = new Erigone_Female(data->x, data->y, data->L, this);
475  PushIndividual(ob_type, new_Female);
476  IncLiveArraySize(ob_type);
477  }
478  }
479 }

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 Erigone_Population_Manager::DoFirst ( void  )
virtual

DoFirst method, to be overridden in descendent classes

Reimplemented from Spider_Population_Manager.

302 {
303 #ifdef __RECORD_RECOVERY_POLYGONS
304 
307  RecordRecoveryPolygons();
308 #endif
309  int today = m_TheLandscape->SupplyDayInYear();
310  if (today == 364)
311  {
312  // Kill all eggs
313  unsigned s = (unsigned)GetLiveArraySize(0);
314  for (unsigned j = 0; j < s; j++)
315  {
316  int x{ 0 }, y{ 0 };
317  TAnimal* a_ani_ptr = SupplyAnimalPtr(0, j);
318  x = a_ani_ptr->Supply_m_Location_x();
319  y = a_ani_ptr->Supply_m_Location_y();
320  m_EggPosMap->ClearMapValue(x, y);
321  a_ani_ptr->KillThis();
322  }
323  // Ensure all females have zero egg sac devel. degrees
324  s = (unsigned)GetLiveArraySize(2);
325  Erigone_Female* SFem;
326  for (unsigned j = 0; j < s; j++)
327  {
328  SFem = (Erigone_Female*)SupplyAnimalPtr(2, j);
329  SFem->ZeroEggSacDegrees();
330  }
331  }
332  // Zero the daydegrees for the beginning of the year
333  if (today == 0)
334  {
335  for (int i = 0; i < 365; i++) m_EggDegrees[i] = 0;
336  m_EggProdThresholdPassed = false;
337  }
338  // Set the wind direction for today
340  const double temp = m_TheLandscape->SupplyTemp();
341  // Is it ballooning time of year?
342  if (!((today >= m_BallooningStart) && (today < m_BallooningStop)))
343  {
344  m_WalkingOnly = true;
345  }
346  else
347  {
348  m_WalkingOnly = false;
349  // Calculates the ballooning time today based on hourly temperatures and hourly wind speed, and daylight. Assumes ballooning from 1 hour from sun up to sundown
350  const int sunup = g_date->SunRiseTime(today) / 60;
351  const int sundown = g_date->SunSetTime(today) / 60;
353  for (int h = sunup; h <= sundown; h++)
354  {
355  const double T = g_weather->GetTempHour(h);
356  const double W = g_weather->GetWindHour(h);
357  if ((T >= MinBallooningTemp) && (W < 3.0)) m_TodaysBallooningTime += 1.0;
358  }
359  if (temp >= m_MinWalkTempThreshold) m_MinWalkTemp = true;
360  else m_MinWalkTemp = false;
361  }
362 
363  //Create proportion (per mille, i.e. 1000 to hatch) of development finished for eggs and juveniles
364  //eggs
365 
366  double t = temp;
367  double Added = 0;
368  if (temp > m_EggDevelopmentThreshold)
369  {
370  if (temp > m_EggDevelopmentThreshold2) t = temp - (temp - m_EggDevelopmentThreshold); else t = temp;
371  Added = 1000 * ((cfg_Erig_EggDevelRHO25.value() * ((273.15 + t) / 298.15)) * //1.987=Gas constant
372  exp((cfg_Erig_EggDevelHA.value() / 1.987) * ((1 / 298.15) - (1 / (273.15 + t)))));
373  }
374  // Add today's day degrees to the day degrees experienced each day to date
375  for (int d = 0; d <= today; d++)
376  {
377  m_EggDegrees[d] += Added;
378  }
379 
380 
381  // Juveniles
382  // these differ from the eggs because we have three rates of growth dependent
383  // upon the food supply at the spiders location
384  if (temp > cfg_Erig_JuvDevelThreshold.value())
385  {
386  if (temp > m_EggDevelopmentThreshold2) t = temp - (temp - m_EggDevelopmentThreshold); else t = temp;
387  m_JuvDegreesGood = 1000 * ((cfg_Erig_JuvDevelRHO25.value() * ((273.15 + t) / 298.15)) *
388  exp((cfg_Erig_JuvDevelHA.value() / 1.987) * ((1 / 298.15) - (1 / (273.15 + t)))));
391  }
392  else {
393  m_JuvDegreesGood = 0;
394  m_JuvDegreesPoor = 0;
396  }
397  //
398  // Eggsac production
400  if (temp > 0) {
401  if (temp > m_EggDevelopmentThreshold2) t = temp - (temp - m_EggDevelopmentThreshold); else t = temp;
402  /*New version using biophysical model
403  */
404  m_EggProdDDegsGood = 1000 * ((cfg_Erig_EggProducRHO25.value() * ((273.15 + t) / 298.15)) * exp((cfg_Erig_EggProducHA.value() / 1.987) * ((1 / 298.15) - (1 / (273.15 + t))))) - 89.9;
405  if (m_EggProdDDegsGood < 0) m_EggProdDDegsGood = 0.0;
408  }
409  else {
410  m_EggProdDDegsPoor = 0;
411  m_EggProdDDegsInt = 0;
412  m_EggProdDDegsGood = 0;
413  }
414  }
415  else
416  {
417  long date = m_TheLandscape->SupplyGlobalDate();
418  double SevenDayTemp = 0;
419  for (long d = date; d > date - 14; d--)
420  {
421  SevenDayTemp += (double)m_TheLandscape->SupplyTemp(d);
422  }
423  SevenDayTemp /= 14.0;
424  if (SevenDayTemp > cfg_Erig_EggProducThreshold.value()) {
426  }
427  }
428  // Work out drought for each of three veg classes
429  // Temperature score is square value above a threshold
430  // Humitidy score is squared value below a RH threshold
431  // the values are summed and then scaled by a scaling factor which is different for three classes of vegeation cover
432  double dtemp = (g_weather->GetTempPeriod(g_date->Date(), 7) / 7.0) - cfg_Erig_DroughtTThreshold.value(); if (dtemp < 0) dtemp = 0.0;
433  double RH = (g_weather->GetRHPeriod(g_date->Date(), 7) / 7.0);
435  if (RH < 0.0) RH = 0.0;
436  const double score = (dtemp * dtemp + RH * RH) * cfg_Erig_DroughtScaler.value();
437  m_TodaysDroughtScore[0] = score;
438  m_TodaysDroughtScore[1] = score * 0.5;
439  m_TodaysDroughtScore[2] = score * 0.25;
440  // Juvenile temperature related mortality
441  double jtemp = temp;
442  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.
445 }

References cfg_Erig_DailyJuvMort, cfg_Erig_DroughtRHThreshold, cfg_Erig_DroughtScaler, cfg_Erig_DroughtTThreshold, cfg_Erig_EggDevelHA, cfg_Erig_EggDevelRHO25, cfg_Erig_EggProducHA, cfg_Erig_EggProducIntemediate, cfg_Erig_EggProducPoor, cfg_Erig_EggProducRHO25, cfg_Erig_EggProducThreshold, cfg_Erig_JuvDevelHA, cfg_Erig_JuvDevelIntermediate, cfg_Erig_JuvDevelPoor, cfg_Erig_JuvDevelRHO25, cfg_Erig_JuvDevelThreshold, cfg_Erig_TempDailyJuvMortParameterA, cfg_Erig_TempDailyJuvMortParameterB, SimplePositionMap::ClearMapValue(), Calendar::Date(), g_date, g_weather, Population_Manager::GetLiveArraySize(), Weather::GetRHPeriod(), Weather::GetTempHour(), Weather::GetTempPeriod(), Weather::GetWindHour(), 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, Calendar::SunRiseTime(), Calendar::SunSetTime(), TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Population_Manager::SupplyAnimalPtr(), Landscape::SupplyDayInYear(), Landscape::SupplyGlobalDate(), Landscape::SupplyMonth(), Landscape::SupplyTemp(), Landscape::SupplyWindDirection8(), CfgFloat::value(), and Spider_Female::ZeroEggSacDegrees().

◆ Init()

void Erigone_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.

149 {
153  // Juvenile mortality is base mortality, but to this is added a temperature related daily mortality.
158 
162 
163  m_MoveMap = new MovementMapUnsigned(m_TheLandscape, 1); // 1 for Erigone
164  // Ballooning distances
165  int count = 0;
166  // ***Lumi*** can we replace this with a new distribution function?
168  for (int i = 0; i < 31; i++)
169  {
170  while (count < m_DispDistances[i])
171  {
172  m_DispersalDistances[count++] = distance;
173  }
175  }
176 
179  }
180  if ( cfg_ReallyBigOutputUsed.value() ) {
182  } else ReallyBigOutputPrb=0;
183  // Set the simulation name
184  m_SimulationName = "Erigone";
189  Spider_Egg* spegg = new Spider_Egg(0, 0, m_TheLandscape, this,0);
196  delete spegg;
197  Spider_Juvenile* spjuv = new Spider_Juvenile(0, 0, m_TheLandscape, this);
200  delete spjuv;
201  Spider_Female* spad = new Spider_Female(0, 0, m_TheLandscape, this);
206 
207  delete spad;
208  int temp_thread_num = omp_get_max_threads();
209  int start_num_in_thread = (cfg_ErigoneStartNos.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  }
237 
238  // Ensure that spider's execution order is shuffled after each time step
239  // or do nothing if that is prefered
240  BeforeStepActions[0]=0; // 0 = Shuffle, 1 = SortX, 2 = SortY, 3 = do nothing
241  BeforeStepActions[1]=0; // 0 = Shuffle, 1 = SortX, 2 = SortY, 3 = do nothing
242  BeforeStepActions[2]=0; // 0 = Shuffle, 1 = SortX, 2 = SortY, 3 = do nothing
243 
244 #ifdef __RECORD_RECOVERY_POLYGONS
245  /* Open the output file and append */
246  ofstream ofile("RecoveryPolygonsCounter.txt",ios::out);
247  ofile << "This file records the number of females in each polygon each day" << endl;
248  ofile.close();
249  /* Open the polygon recovery file and read in polygons to m_RecoveryPolygons */
250  ifstream ifile("RecoveryPolygonsList.txt",ios::in);
251  int n;
252  ifile >> n;
253  m_RecoveryPolygons[0] = n;
254  for (int i=0; i<n; i++) ifile >> m_RecoveryPolygons[1+i];
255  for (int i=0; i<n; i++) m_RecoveryPolygonsC[1+i]=0;
256  ifile.close();
257 #endif
258 }

References Population_Manager::BeforeStepActions, cfg_CfgRipleysOutputUsed, cfg_Erig_BallooningDistanceInterval, cfg_Erig_BallooningStart, cfg_Erig_BallooningStop, cfg_Erig_DailyEggMort, cfg_Erig_DailyFemaleMort, cfg_Erig_DailyJuvMort, cfg_Erig_EggDevelConst2, cfg_Erig_EggDevelThreshold, cfg_Erig_EggDevelThreshold2, cfg_Erig_EggProducConst, cfg_Erig_EggSacSpread, cfg_Erig_HatDensityDepMortConst, cfg_Erig_JuvDensityDepMortConst, cfg_Erig_JuvDevelConst2, cfg_Erig_Max_Egg_Production, cfg_Erig_MaxBalloonPercent, cfg_Erig_MaxDistBalloonable, cfg_Erig_SmallestBallooningDistance, cfg_Erig_SpiderMinWalkTemp, cfg_ErigoneDensityDependentConstantZero, cfg_ErigoneStartNos, cfg_ReallyBigOutputUsed, count, CreateObjects(), Erig_DispersalChance, 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, Population_Manager::OpenTheReallyBigProbe(), Population_Manager::OpenTheRipleysOutputProbe(), Population_Manager::ReallyBigOutputPrb, SimplePositionMap::SetMapValue(), struct_Spider::SpPM, Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), TOP_Erigone, tspi_Female, CfgInt::value(), CfgFloat::value(), CfgBool::value(), struct_Spider::x, and struct_Spider::y.

Referenced by Erigone_Population_Manager().

◆ TheAOROutputProbe()

void Erigone_Population_Manager::TheAOROutputProbe ( )
virtual

A method to generate the AOR probe output

Reimplemented from Spider_Population_Manager.

527 {
528  m_AOR_Probe->DoProbe(2);
529 }

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

◆ TheRipleysOutputProbe()

void Erigone_Population_Manager::TheRipleysOutputProbe ( FILE *  a_prb)
virtual

A method to generate the Ripley probe output

Reimplemented from Spider_Population_Manager.

532  {
533  Erigone_Female* FS;
534  unsigned totalF=(unsigned)GetLiveArraySize(2);
535  int x,y;
538  fprintf(a_prb,"%d %d %d %d %d\n", 0,w ,0, h, totalF);
539  for (unsigned j=0; j<totalF; j++) //adult females
540  {
541  FS=dynamic_cast<Erigone_Female*>(SupplyAnimalPtr(2, j));
542  x=FS->Supply_m_Location_x();
543  y=FS->Supply_m_Location_y();
544  fprintf(a_prb,"%d\t%d\n", x,y);
545  }
546  fflush(a_prb);
547 }

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:
Spider_Population_Manager::m_EggProdThresholdPassed
bool m_EggProdThresholdPassed
A flag for passing minimum temperature for producing eggs.
Definition: Spider_BaseClasses.h:141
cfg_Erig_JuvDevelIntermediate
static CfgFloat cfg_Erig_JuvDevelIntermediate("ERIGONE_JUVDEVELINTERMEDIATE", CFG_CUSTOM, 0.66666666)
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_Erig_JuvDensityDepMortConst
static CfgInt cfg_Erig_JuvDensityDepMortConst("ERIGONE_JUVDENSITYDEPMORTCONST", CFG_CUSTOM, 3)
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
Erig_DispersalChance
const std::array< int, 40 > Erig_DispersalChance
Definition: Erigone_Population_Manager.cpp:58
cfg_Erig_MaxBalloonPercent
static CfgFloat cfg_Erig_MaxBalloonPercent("ERIGONE_MAXBALLOONPERCENT", CFG_CUSTOM, 5)
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_Erig_JuvDevelConst2
static CfgFloat cfg_Erig_JuvDevelConst2("ERIGONE_JUVDEVELCONSTTWO", CFG_CUSTOM, 1000.0)
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
cfg_Erig_JuvDevelHA
static CfgFloat cfg_Erig_JuvDevelHA("ERIGONE_JUVVDEVELHA", CFG_CUSTOM, 31273.77)
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
MinBallooningTemp
const double MinBallooningTemp
Definition: Erigone_Population_Manager.cpp:69
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
cfg_Erig_EggProducConst
static CfgFloat cfg_Erig_EggProducConst("ERIGONE_EGGPRODUCCONST", CFG_CUSTOM, 1000)
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
cfg_Erig_MaxDistBalloonable
static CfgFloat cfg_Erig_MaxDistBalloonable("ERIGONE_MAXDISTBALLOONABLE", CFG_CUSTOM, 2200)
Erigone_Female
Definition: Erigone.h:60
cfg_Erig_JuvDevelRHO25
static CfgFloat cfg_Erig_JuvDevelRHO25("ERIGONE_EGGVDEVELRH", CFG_CUSTOM, 0.131541)
Spider_Population_Manager::m_AdultPosMap
SimplePositionMap * m_AdultPosMap
Pointer to the egg position map
Definition: Spider_BaseClasses.h:116
cfg_Erig_EggDevelConst2
static CfgFloat cfg_Erig_EggDevelConst2("ERIGONE_EGGDEVELCONSTTWO", CFG_CUSTOM, 1000)
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_CfgRipleysOutputUsed
CfgBool cfg_CfgRipleysOutputUsed
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
cfg_Erig_EggProducThreshold
static CfgFloat cfg_Erig_EggProducThreshold("ERIGONE_EGGPRODUCTHRESHOLD", CFG_CUSTOM, 6.0)
cfg_ErigoneStartNos
static CfgInt cfg_ErigoneStartNos("ERIGONE_STARTNO", CFG_CUSTOM, 50000)
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
cfg_Erig_EggSacSpread
static CfgInt cfg_Erig_EggSacSpread("ERIGONE_EGG_SAC_SPREAD", CFG_CUSTOM, 10)
cfg_ErigoneDensityDependentConstantZero
static CfgInt cfg_ErigoneDensityDependentConstantZero("ERIGONE_DENDEPCONSTZERO", CFG_CUSTOM, 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
Population_Manager_Base::m_TheLandscape
Landscape * m_TheLandscape
holds an internal pointer to the landscape
Definition: PopulationManager.h:624
cfg_Erig_EggDevelThreshold
static CfgFloat cfg_Erig_EggDevelThreshold("ERIGONE_EGGDEVELTHRESHOLD", CFG_CUSTOM, 0.0)
cfg_Erig_DailyJuvMort
static CfgFloat cfg_Erig_DailyJuvMort("ERIGONE_DAILYJUVMORT", CFG_CUSTOM, 0.003)
Weather::GetWindHour
double GetWindHour(int hour)
Definition: Weather.h:469
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
cfg_PmEventsize
CfgInt cfg_PmEventsize
cfg_Erig_EggProducHA
static CfgFloat cfg_Erig_EggProducHA("ERIGONE_EGGPRODUCHA", CFG_CUSTOM, 17500.0)
cfg_Erig_JuvDevelThreshold
static CfgFloat cfg_Erig_JuvDevelThreshold("ERIGONE_JUVDEVELTHRESHOLD", CFG_CUSTOM, 0.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_Erig_SmallestBallooningDistance
static CfgInt cfg_Erig_SmallestBallooningDistance("ERIGONE_SMALLESTBALLOONDIST", CFG_CUSTOM, 70)
The minimum ballooning distnace.
Landscape::SupplySimAreaHeight
int SupplySimAreaHeight(void)
Gets the simulation landscape height.
Definition: Landscape.h:2302
cfg_Erig_BallooningStart
static CfgInt cfg_Erig_BallooningStart("ERIGONE_BALLOONINGSTART", CFG_CUSTOM, 0)
cfg_Erig_SpiderMinWalkTemp
static CfgFloat cfg_Erig_SpiderMinWalkTemp("ERIGONE_MIN_WALK_TEMP", CFG_CUSTOM, 3)
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_Erig_EggProducPoor
static CfgFloat cfg_Erig_EggProducPoor("ERIGONE_EGGPRODUCPOOR", CFG_CUSTOM, 0.33)
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
cfg_Erig_Max_Egg_Production
static CfgInt cfg_Erig_Max_Egg_Production("ERIGONE_MAX_EGG_PRODUCTION", CFG_CUSTOM, 100)
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
Landscape::SupplyDayInYear
int SupplyDayInYear(void)
Passes a request on to the associated Calendar class function, the day in the year.
Definition: Landscape.h:2267
Calendar::SunSetTime
int SunSetTime(void)
Definition: Calendar.h:65
Spider_Population_Manager::m_MinWalkTemp
bool m_MinWalkTemp
A flag to show whether minimum walking temperature is reached
Definition: Spider_BaseClasses.h:171
cfg_Erig_TempDailyJuvMortParameterB
static CfgFloat cfg_Erig_TempDailyJuvMortParameterB("ERIGONE_DAILYTEMPJUVMORTPARAMB", CFG_CUSTOM, 0.011)
Landscape::SupplyYearNumber
int SupplyYearNumber(void)
Passes a request on to the associated Calendar class function, returns m_simulationyear
Definition: Landscape.h:2287
cfg_Erig_DailyFemaleMort
static CfgInt cfg_Erig_DailyFemaleMort("ERIGONE_DAILYFEMALEMORT", CFG_CUSTOM, 3)
cfg_Erig_EggDevelThreshold2
static CfgFloat cfg_Erig_EggDevelThreshold2("ERIGONE_EGGDEVELTHRESHOLD", CFG_CUSTOM, 25.0)
CfgInt::value
int value() const
Definition: Configurator.h:116
Calendar::SunRiseTime
int SunRiseTime(void)
Definition: Calendar.h:64
Spider_Population_Manager::m_TodaysMonth
int m_TodaysMonth
Holds the current month
Definition: Spider_BaseClasses.h:129
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
Population_Manager::OpenTheRipleysOutputProbe
bool OpenTheRipleysOutputProbe()
Definition: PopulationManager.cpp:897
cfg_Erig_EggProducRHO25
static CfgFloat cfg_Erig_EggProducRHO25("ERIGONE_EGGPRODUCRH", CFG_CUSTOM, 0.6919)
cfg_Erig_HatDensityDepMortConst
static CfgInt cfg_Erig_HatDensityDepMortConst("ERIGONE_HATDENSITYDEPMORTCONST", CFG_CUSTOM, 3)
cfg_Erig_DroughtScaler
static CfgFloat cfg_Erig_DroughtScaler("ERIGONE_DROUGHTSCALER", CFG_CUSTOM, 0.0000125)
cfg_Erig_EggProducIntemediate
static CfgFloat cfg_Erig_EggProducIntemediate("ERIGONE_EGGPRODUCINTERMEDIATE", CFG_CUSTOM, 0.66)
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_PmEventfrequency
CfgInt cfg_PmEventfrequency
cfg_Erig_TempDailyJuvMortParameterA
static CfgFloat cfg_Erig_TempDailyJuvMortParameterA("ERIGONE_DAILYTEMPJUVMORTPARAMA", CFG_CUSTOM, -0.0006)
cfg_Erig_JuvDevelPoor
static CfgFloat cfg_Erig_JuvDevelPoor("ERIGONE_JUVDEVELPOOR", CFG_CUSTOM, 0.33333333)
Weather::GetTempHour
double GetTempHour(int hour)
Get today's weather data at the given hour.
Definition: Weather.h:467
Erigone_Juvenile
Definition: Erigone.h:51
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
cfg_Erig_DroughtTThreshold
static CfgFloat cfg_Erig_DroughtTThreshold("ERIGONE_DROUGHTTTHRESHOLD", CFG_CUSTOM, 10.0)
cfg_Erig_EggDevelHA
static CfgFloat cfg_Erig_EggDevelHA("ERIGONE_EGGVDEVELHA", CFG_CUSTOM, 21132.95)
Population_Manager_Base::m_SimulationName
string m_SimulationName
stores the simulation name
Definition: PopulationManager.h:622
Erigone_Egg
Definition: Erigone.h:41
Erigone_Population_Manager::Init
virtual void Init(void)
An initiation method to initialise all the necessary values - must be overridden for species specific...
Definition: Erigone_Population_Manager.cpp:148
Spider_Base::m_SimH
static int m_SimH
The height of the landscape
Definition: Spider_BaseClasses.h:294
Population_Manager::m_guard_cell_size
int m_guard_cell_size
Definition: PopulationManager.h:793
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
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_Erig_DailyEggMort
static CfgInt cfg_Erig_DailyEggMort("ERIGONE_DAILYEGGMORT", CFG_CUSTOM, 40)
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
cfg_Erig_EggDevelRHO25
static CfgFloat cfg_Erig_EggDevelRHO25("ERIGONE_EGGVDEVELRH", CFG_CUSTOM, 0.145043)
cfg_Erig_BallooningDistanceInterval
static CfgInt cfg_Erig_BallooningDistanceInterval("ERIGONE_BALLOONINGSTEP", CFG_CUSTOM, 10)
The size of the frequency category for ballooning distances.
cfg_Erig_BallooningStop
static CfgInt cfg_Erig_BallooningStop("ERIGONE_BALLOONINGSTOP", CFG_CUSTOM, 366)
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
TOP_Erigone
Definition: PopulationManager.h:61
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
cfg_Erig_DroughtRHThreshold
static CfgFloat cfg_Erig_DroughtRHThreshold("ERIGONE_DROUGHTRHTHRESHOLD", CFG_CUSTOM, 90.0)
Erigone_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: Erigone_Population_Manager.cpp:451
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
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
cfg_ReallyBigOutputUsed
CfgBool cfg_ReallyBigOutputUsed
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