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

#include <Spider_BaseClasses.h>

Inheritance diagram for Spider_Population_Manager:
Population_Manager Population_Manager_Base Erigone_Population_Manager Oedothorax_Population_Manager

Public Member Functions

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 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 ~Spider_Population_Manager ()
 Destructor
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...
 
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...
 
virtual void Catastrophe ()
 Allows for the possibility to create population level mortality
More...
 
virtual void CreateObjects (int ob_type, TAnimal *pvo, struct_Spider *data, int number)
 Creates new spider objects - this must be overridden in descendent classes
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...
 

Public Attributes

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

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

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

Additional Inherited Members

- 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
 

Constructor & Destructor Documentation

◆ Spider_Population_Manager()

Spider_Population_Manager::Spider_Population_Manager ( Landscape p_L,
int  N 
)

The constructor

1075  : Population_Manager(p_L, N)
1076 {
1077 
1078  m_is_paralleled = true; //all spiders are parallelized
1082  // Other variables
1083  m_MinWalkTemp = false;
1084  // Load List of Animal Classes
1085  m_ListNames[0] = "Egg";
1086  m_ListNames[1] = "Juvenile";
1087  m_ListNames[2] = "Female";
1088  m_ListNameLength = 3;
1089 
1090  // Load State Names
1091  StateNames[tosps_Initiation] = "Initiation";
1092  // Egg
1093  StateNames[tosps_Develop] = "Developing";
1094  StateNames[tosps_Hatch] = "Hatching";
1095  StateNames[tosps_Dying] = "Dying";
1096  // Juvenile
1097  StateNames[tosps_Develop] = "Developing";
1098  StateNames[tosps_JBalloon] = "Ballooning";
1099  StateNames[tosps_AssessHabitat] = "AssessHabitat";
1100  StateNames[tosps_Mature] = "Maturation";
1101  StateNames[tosps_Dying] = "Dying";
1102  // Female
1103  StateNames[tosps_Reproduce] = "Reproduce";
1104  StateNames[tosps_FBalloon] = "Ballooning";
1105  StateNames[tosps_Dying] = "Dying";
1106  // Destroy
1107  StateNames[tosps_Destroy] = "Destroy";
1108  // Ensure that spider's execution order is shuffled after each time step
1109  // or do nothing if that is prefered
1110  BeforeStepActions[0] = 0; // 0 = Shuffle, 1 = SortX, 2 = SortY, 3 = do nothing
1111  BeforeStepActions[1] = 0; // 0 = Shuffle, 1 = SortX, 2 = SortY, 3 = do nothing
1112  BeforeStepActions[2] = 0; // 0 = Shuffle, 1 = SortX, 2 = SortY, 3 = do nothing
1113 
1114  m_BallooningWeather = false;
1115 
1116  // Zero the egg degrees
1117  for (int i = 0; i < 365; i++) m_EggDegrees[i] = 0;
1118  // 3. Dispersal Time
1119  int count = 0;
1120  for (int i = 0; i < 52; i++)
1121  for (int j = 0; j < 7; j++)
1122  {
1124  }
1125  // Zero the rain counter
1126  //m_DaysSinceRain = 0;
1127 
1128  // Default set spiders to walking
1129  m_WalkingOnly = true;
1130  // Set out value for juv mort
1131  m_EggProdThresholdPassed = false;
1132  m_EggProdDDegsPoor = 0;
1133  m_EggProdDDegsInt = 0;
1134  m_EggProdDDegsGood = 0;
1135 #ifdef __RECORD_RECOVERY_POLYGONS
1136  /* Open the output file and append */
1137  ofstream ofile("RecoveryPolygonsCounter.txt", ios::out);
1138  ofile << "This file records the number of females in each polygon each day" << endl;
1139  ofile.close();
1140  /* Open the polygon recovery file and read in polygons to m_RecoveryPolygons */
1141  ifstream ifile("RecoveryPolygonsList.txt", ios::in);
1142  int n;
1143  ifile >> n;
1144  m_RecoveryPolygons[0] = n;
1145  for (int i = 0; i < n; i++) ifile >> m_RecoveryPolygons[1 + i];
1146  for (int i = 0; i < n; i++) m_RecoveryPolygonsC[1 + i] = 0;
1147  ifile.close();
1148 #endif
1149 #ifdef __SpidDebug
1150  for (int i=0; i<10; i++) m_Deaths[i] = 0;
1151  m_JDeaths = 0;
1152  m_Mature = 0;
1153 #endif
1154 }

References BallooningHours, BallooningHrs, Population_Manager::BeforeStepActions, count, m_AdultPosMap, m_BallooningWeather, m_EggDegrees, m_EggPosMap, m_EggProdDDegsGood, m_EggProdDDegsInt, m_EggProdDDegsPoor, m_EggProdThresholdPassed, Population_Manager::m_is_paralleled, m_JuvPosMap, Population_Manager_Base::m_ListNameLength, Population_Manager_Base::m_ListNames, m_MinWalkTemp, Population_Manager_Base::m_TheLandscape, m_WalkingOnly, Population_Manager::StateNames, tosps_AssessHabitat, tosps_Destroy, tosps_Develop, tosps_Dying, tosps_FBalloon, tosps_Hatch, tosps_Initiation, tosps_JBalloon, tosps_Mature, and tosps_Reproduce.

◆ ~Spider_Population_Manager()

Spider_Population_Manager::~Spider_Population_Manager ( )
virtual

Destructor

1157 {
1158  delete m_AdultPosMap;
1159  delete m_JuvPosMap;
1160  delete m_EggPosMap;
1161 }

References m_AdultPosMap, m_EggPosMap, and m_JuvPosMap.

Member Function Documentation

◆ Catastrophe()

virtual void Spider_Population_Manager::Catastrophe ( void  )
inlinevirtual

Allows for the possibility to create population level mortality

Reimplemented from Population_Manager.

Reimplemented in Oedothorax_Population_Manager, and Erigone_Population_Manager.

271 { ; }

◆ CheckHumidity()

bool Spider_Population_Manager::CheckHumidity ( int  ,
int   
)
inline

Returns humid or not

248  {
249  return true; } // TODO

Referenced by Spider_Juvenile::AssessHabitat().

◆ CreateObjects()

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

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

Reimplemented in Oedothorax_Population_Manager, and Erigone_Population_Manager.

273 { ; }

Referenced by Spider_Female::CreateEggSac(), Spider_Egg::Hatch(), and Spider_Juvenile::Maturation().

◆ DoFirst()

virtual void Spider_Population_Manager::DoFirst ( void  )
inlinevirtual

DoFirst method, to be overridden in descendent classes

Reimplemented from Population_Manager.

Reimplemented in Oedothorax_Population_Manager, and Erigone_Population_Manager.

261 { ; }

◆ GetBallooningMortalityPerMeter()

double Spider_Population_Manager::GetBallooningMortalityPerMeter ( )
inline

Return ballooning mortality per meter

193  {
195  }

References m_BallooningMortalityPerMeter.

Referenced by Spider_Juvenile::BallooningMortality().

◆ GetBTime()

double Spider_Population_Manager::GetBTime ( int  day)
inline

Returns ballooning hours for a given day

214  {
215  return BallooningHrs[day];
216  }

References BallooningHrs.

◆ GetBTimeToday()

double Spider_Population_Manager::GetBTimeToday ( )
inline

Returns todays ballooning time

218  {
219  return m_TodaysBallooningTime; }

References m_TodaysBallooningTime.

Referenced by Spider_Juvenile::Balloon().

◆ GetDaysSinceRain()

int Spider_Population_Manager::GetDaysSinceRain ( )
inline

Return the number of days since rain

197  {
198  return m_DaysSinceRain;
199  }

References m_DaysSinceRain.

◆ GetDispDist()

int Spider_Population_Manager::GetDispDist ( int  chance)
inline

Returns the dispsersal distance associated with a particular frequency value

210  {
211  return m_DispersalDistances[chance];
212  }

References m_DispersalDistances.

Referenced by Spider_Juvenile::Balloon().

◆ GetDoubleEggSacSpread()

int Spider_Population_Manager::GetDoubleEggSacSpread ( )
inline

Return 2 x EggSacSpread value

189  {
190  return m_DoubleEggSacSpread;
191  }

References m_DoubleEggSacSpread.

Referenced by Spider_Egg::st_Hatch().

◆ GetEggDegreesGood()

double Spider_Population_Manager::GetEggDegreesGood ( )
inline

Returns todays egg sac production day degrees for good food

233  {
234  return m_EggProdDDegsGood; }

References m_EggProdDDegsGood.

Referenced by Spider_Female::st_Reproduce().

◆ GetEggDegreesInt()

double Spider_Population_Manager::GetEggDegreesInt ( )
inline

Returns todays egg sac production day degrees for intermediate food

230  {
231  return m_EggProdDDegsInt; }

References m_EggProdDDegsInt.

Referenced by Spider_Female::st_Reproduce().

◆ GetEggDegreesPoor()

double Spider_Population_Manager::GetEggDegreesPoor ( )
inline

Returns todays egg sac production day degrees for poor food

227  {
228  return m_EggProdDDegsPoor; }

References m_EggProdDDegsPoor.

Referenced by Spider_Female::st_Reproduce().

◆ GetEggDevelDegrees()

double Spider_Population_Manager::GetEggDevelDegrees ( int  day)
inline

Returns todays egg development day degrees

245  {
246  return m_EggDegrees[day]; }

References m_EggDegrees.

Referenced by Spider_Egg::st_Develop().

◆ GetEggSacSpread()

int Spider_Population_Manager::GetEggSacSpread ( )
inline

Return the EggSacSpread value

185  {
186  return m_EggSacSpread;
187  }

References m_EggSacSpread.

Referenced by Spider_Egg::st_Hatch().

◆ GetJuvDegrees_good()

double Spider_Population_Manager::GetJuvDegrees_good ( )
inline

Returns todays juvenile development day degrees for good food

236  {
237  return m_JuvDegreesGood; }

References m_JuvDegreesGood.

Referenced by Spider_Juvenile::st_Develop().

◆ GetJuvDegrees_intermediate()

double Spider_Population_Manager::GetJuvDegrees_intermediate ( )
inline

Returns todays juvenile development day degrees for intermediate food

239  {
240  return m_JuvDegreesIntermediate; }

References m_JuvDegreesIntermediate.

Referenced by Spider_Juvenile::st_Develop().

◆ GetJuvDegrees_poor()

double Spider_Population_Manager::GetJuvDegrees_poor ( )
inline

Returns todays juvenile development day degrees for poor food

242  {
243  return m_JuvDegreesPoor; }

References m_JuvDegreesPoor.

Referenced by Spider_Juvenile::st_Develop().

◆ GetJuvMort()

double Spider_Population_Manager::GetJuvMort ( )
inline

Return current juvenile mortality rate

207  {
208  return m_DailyJuvMort; }

References m_DailyJuvMort.

Referenced by Spider_Juvenile::st_Develop().

◆ GetMinWalkTemp()

bool Spider_Population_Manager::GetMinWalkTemp ( )
inline

Returns the minimum walking temperature

254  {
255  return m_MinWalkTemp; }

References m_MinWalkTemp.

Referenced by Spider_Juvenile::Walk().

◆ GetTodaysDroughtSc()

double Spider_Population_Manager::GetTodaysDroughtSc ( int  index)
inline

Returns the drought score for high, medium or low plant biomass

204  {
205  return m_TodaysDroughtScore[index]; }

References m_TodaysDroughtScore.

Referenced by Erigone_Juvenile::CalcDrought(), Oedothorax_Juvenile::CalcDrought(), Oedothorax_Female::CalcDrought(), and Erigone_Female::CalcDrought().

◆ GetTodaysMonth()

int Spider_Population_Manager::GetTodaysMonth ( )
inline

Return current month

201  {
202  return m_TodaysMonth; }

References m_TodaysMonth.

Referenced by Erigone_Female::CalculateEggsPerEggSac(), and Oedothorax_Female::CalculateEggsPerEggSac().

◆ GetWalking()

bool Spider_Population_Manager::GetWalking ( )
inline

Returns walking only flag

251  {
252  return m_WalkingOnly; }

References m_WalkingOnly.

Referenced by Spider_Juvenile::Step(), and Spider_Female::Step().

◆ GetWindDirection()

int Spider_Population_Manager::GetWindDirection ( )
inline

Returns the wind direction

221  {
222  return m_WindDirection; }

References m_WindDirection.

Referenced by Spider_Juvenile::Balloon().

◆ Init()

void Spider_Population_Manager::Init ( void  )
virtual

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

Reimplemented in Oedothorax_Population_Manager, and Erigone_Population_Manager.

1164 {
1165  ;
1166 }

◆ InSquare()

bool Spider_Population_Manager::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

1169 {
1170  // Simply checks if co-ordinates p_x,p_y are in the square formed by
1171  // p_sqx,p_sqy,p_sqx+p_range,p_sqy+p_range
1172  // The function is long but reasonably efficient - I think
1173 
1174  int x_extent = p_sqx + p_range;
1175  int y_extent = p_sqy + p_range;
1176  if (x_extent >= SimW)
1177  {
1178  if (y_extent >= SimH) // overlaps TR corner of sim area
1179  {
1180  // Top right square (limited by SimAreaHeight & SimAreaWidth
1181  if ((p_x >= p_sqx) && (p_y >= p_sqy)) return true;
1182  // Top Left Square (limited by 0,SimAreaHeight)
1183  if ((p_y >= p_sqy) && (p_y < y_extent - SimH)) return true;
1184  // Bottom Left square (limited by 0,0)
1185  if ((p_x >= x_extent - SimW) &&
1186  (p_y < y_extent - SimH)) return true;
1187  // Bottom Right square (limited by SimAreaWidth,0)
1188  if ((p_x >= p_sqx) && (p_y < y_extent - SimH)) return true;
1189 
1190  }
1191  else // Overlaps the west edge of the sim area
1192  {
1193  if ((p_x >= p_sqx) && (p_y >= p_sqy) && (p_y < y_extent)) return true;
1194  if ((p_x < x_extent - SimW) && (p_y >= p_sqy) && (p_y < y_extent)) return true;
1195  }
1196  }
1197  else
1198  {
1199  if (y_extent >= SimH) // overlaps top of simulation area
1200  {
1201  if ((p_x >= p_sqx) && (p_x < x_extent) &&
1202  (p_y >= p_sqy)) return true;
1203  if ((p_x >= p_sqx) && (p_x < x_extent) &&
1204  (p_y < y_extent - SimH)) return true;
1205  }
1206  else // territory does not overlap end of simulation area
1207  {
1208  if ((p_x >= p_sqx) && (p_x < x_extent) &&
1209  (p_y >= p_sqy) && (p_y < y_extent)) return true;
1210  }
1211  }
1212  return false; // not in territory
1213 }

References Population_Manager_Base::SimH, and Population_Manager_Base::SimW.

◆ IsBallooningWeather()

bool Spider_Population_Manager::IsBallooningWeather ( )
inline

Returns the flag for ballooning weather

224  {
225  return m_BallooningWeather; };

References m_BallooningWeather.

Referenced by Spider_Juvenile::AssessHabitat().

◆ TheAOROutputProbe()

virtual void Spider_Population_Manager::TheAOROutputProbe ( )
inlinevirtual

A method to generate the AOR probe output

Reimplemented from Population_Manager.

Reimplemented in Oedothorax_Population_Manager, and Erigone_Population_Manager.

265 { ; }

◆ TheRipleysOutputProbe()

virtual void Spider_Population_Manager::TheRipleysOutputProbe ( FILE *  a_prb)
inlinevirtual

A method to generate the Ripley probe output

Reimplemented in Oedothorax_Population_Manager, and Erigone_Population_Manager.

267 { ; }

Member Data Documentation

◆ BallooningHrs

double Spider_Population_Manager::BallooningHrs[52 *7]
protected

The daily number of ballooning hours - to be assigned in a descendent classes population manager

Referenced by Oedothorax_Population_Manager::DoFirst(), GetBTime(), and Spider_Population_Manager().

◆ m_AdultPosMap

◆ m_BallooningMortalityPerMeter

double Spider_Population_Manager::m_BallooningMortalityPerMeter
protected

The mortality of ballooned distance - to be assigned in a descendent classes population manager

Referenced by GetBallooningMortalityPerMeter(), Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_BallooningStart

int Spider_Population_Manager::m_BallooningStart
protected

A limiter for the day in year to start ballooning - to be assigned in a descendent classes population manager

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_BallooningStop

int Spider_Population_Manager::m_BallooningStop
protected

A limiter for the day in year to stop ballooning - to be assigned in a descendent classes population manager

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_BallooningWeather

bool Spider_Population_Manager::m_BallooningWeather
protected

A flag for whether the weather is correct for ballooning

Referenced by IsBallooningWeather(), and Spider_Population_Manager().

◆ m_DailyJuvMort

double Spider_Population_Manager::m_DailyJuvMort
protected

The daily probability of a juvenile dying - to be assigned in a descendent classes population manager

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), GetJuvMort(), Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_DaysSinceRain

int Spider_Population_Manager::m_DaysSinceRain
protected

The number of days since last rain

Referenced by GetDaysSinceRain().

◆ m_DispDistances

std::array< int, 31 > Spider_Population_Manager::m_DispDistances
static
Initial value:
=
{
3, 11, 29, 71, 136, 235, 405, 673, 1054, 1567,
2185, 2906, 3748, 4693, 5528, 6423, 7226, 7926, 8543, 8990,
9360, 9614, 9782, 9882, 9950, 9979, 9991, 9997, 9999, 9999,
10000
}

An array to hold the dispersal distances possible as a probability 0-30 (x out of 10000)

Referenced by Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_DispersalDistances

int Spider_Population_Manager::m_DispersalDistances[10000]
protected

The distribution of dispersal distances - to be assigned in a descendent classes population manager

Referenced by GetDispDist(), Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_DoubleEggSacSpread

int Spider_Population_Manager::m_DoubleEggSacSpread
protected

Twice the m_EggSacSpread, used to save multiplications

Referenced by GetDoubleEggSacSpread(), Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_EggDegrees

double Spider_Population_Manager::m_EggDegrees[365]
protected

◆ m_EggDevelopmentThreshold

double Spider_Population_Manager::m_EggDevelopmentThreshold
protected

The lower threshold for egg development - to be assigned in a descendent classes population manager

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_EggDevelopmentThreshold2

double Spider_Population_Manager::m_EggDevelopmentThreshold2
protected

The upper threshold for egg development - to be assigned in a descendent classes population manager

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_EggPosMap

◆ m_EggProdDDegsGood

double Spider_Population_Manager::m_EggProdDDegsGood
protected

Links reproduction to food levels and day degrees - good food.

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), GetEggDegreesGood(), and Spider_Population_Manager().

◆ m_EggProdDDegsInt

double Spider_Population_Manager::m_EggProdDDegsInt
protected

Links reproduction to food levels and day degrees - intermediate food

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), GetEggDegreesInt(), and Spider_Population_Manager().

◆ m_EggProdDDegsPoor

double Spider_Population_Manager::m_EggProdDDegsPoor
protected

Links reproduction to food levels and day degrees - poor food

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), GetEggDegreesPoor(), and Spider_Population_Manager().

◆ m_EggProdThresholdPassed

bool Spider_Population_Manager::m_EggProdThresholdPassed
protected

A flag for passing minimum temperature for producing eggs.

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), and Spider_Population_Manager().

◆ m_EggSacSpread

int Spider_Population_Manager::m_EggSacSpread
protected

Used to spread spiderlings on day 1 of hatch - to be assigned in a descendent classes population manager

Referenced by GetEggSacSpread(), Erigone_Population_Manager::Init(), and Oedothorax_Population_Manager::Init().

◆ m_JuvDegreesGood

double Spider_Population_Manager::m_JuvDegreesGood
protected

Contribution to day degrees under good food.

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), and GetJuvDegrees_good().

◆ m_JuvDegreesIntermediate

double Spider_Population_Manager::m_JuvDegreesIntermediate
protected

Contribution to day degrees under intermediate food

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), and GetJuvDegrees_intermediate().

◆ m_JuvDegreesPoor

double Spider_Population_Manager::m_JuvDegreesPoor
protected

Contribution to day degrees under poor food

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), and GetJuvDegrees_poor().

◆ m_JuvPosMap

SimplePositionMap* Spider_Population_Manager::m_JuvPosMap

◆ m_MinWalkTemp

bool Spider_Population_Manager::m_MinWalkTemp
protected

A flag to show whether minimum walking temperature is reached

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), GetMinWalkTemp(), and Spider_Population_Manager().

◆ m_MinWalkTempThreshold

double Spider_Population_Manager::m_MinWalkTempThreshold
protected

◆ m_MoveMap

MovementMapUnsigned* Spider_Population_Manager::m_MoveMap

A representation of the landscape in terms of quality - NB MUST be assigned by the descendent population manager class Init() method

Referenced by Spider_Juvenile::CheckToleTovIndex(), Erigone_Population_Manager::Init(), Oedothorax_Population_Manager::Init(), Erigone_Population_Manager::~Erigone_Population_Manager(), and Oedothorax_Population_Manager::~Oedothorax_Population_Manager().

◆ m_TodaysBallooningTime

double Spider_Population_Manager::m_TodaysBallooningTime
protected

◆ m_TodaysDroughtScore

double Spider_Population_Manager::m_TodaysDroughtScore[3]
protected

Holds the current drought score for three vegetation classes

Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), and GetTodaysDroughtSc().

◆ m_TodaysMonth

int Spider_Population_Manager::m_TodaysMonth
protected

◆ m_WalkingOnly

bool Spider_Population_Manager::m_WalkingOnly
protected

◆ m_WindDirection

int Spider_Population_Manager::m_WindDirection
protected

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
Spider_Population_Manager::m_EggPosMap
SimplePositionMap * m_EggPosMap
Pointer to the egg position map
Definition: Spider_BaseClasses.h:112
Spider_Population_Manager::m_DaysSinceRain
int m_DaysSinceRain
The number of days since last rain
Definition: Spider_BaseClasses.h:127
Spider_Population_Manager::m_WindDirection
int m_WindDirection
Todays wind direction
Definition: Spider_BaseClasses.h:143
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
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
Population_Manager_Base::m_ListNames
const char * m_ListNames[32]
A list of life-stage names.
Definition: PopulationManager.h:628
tosps_Develop
Definition: Spider_BaseClasses.h:73
tosps_FBalloon
Definition: Spider_BaseClasses.h:84
SimplePositionMap
Used to map locations of individuals for density estimates - space inefficient but good for testing.
Definition: PositionMap.h:45
Spider_Population_Manager::m_AdultPosMap
SimplePositionMap * m_AdultPosMap
Pointer to the egg position map
Definition: Spider_BaseClasses.h:116
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
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
Spider_Population_Manager::m_EggDegrees
double m_EggDegrees[365]
Cumulative day degrees from 1st Jan
Definition: Spider_BaseClasses.h:155
tosps_Hatch
Definition: Spider_BaseClasses.h:77
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
tosps_Mature
Definition: Spider_BaseClasses.h:80
Population_Manager_Base::SimH
int SimH
stores the simulation height
Definition: PopulationManager.h:614
tosps_Reproduce
Definition: Spider_BaseClasses.h:83
Spider_Population_Manager::m_TodaysDroughtScore
double m_TodaysDroughtScore[3]
Holds the current drought score for three vegetation classes
Definition: Spider_BaseClasses.h:131
tosps_AssessHabitat
Definition: Spider_BaseClasses.h:72
tosps_Dying
Definition: Spider_BaseClasses.h:75
Population_Manager::m_is_paralleled
bool m_is_paralleled
This is used to indicate whether the species is paralleled.
Definition: PopulationManager.h:796
Spider_Population_Manager::m_MinWalkTemp
bool m_MinWalkTemp
A flag to show whether minimum walking temperature is reached
Definition: Spider_BaseClasses.h:171
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
Population_Manager_Base::SimW
int SimW
stores the simulation width
Definition: PopulationManager.h:616
Population_Manager::StateNames
const char * StateNames[100]
Definition: PopulationManager.h:801
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
tosps_Destroy
Definition: Spider_BaseClasses.h:87
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
BallooningHours
const double BallooningHours[52]
Definition: Spider_BaseClasses.cpp:73
tosps_Initiation
Definition: Spider_BaseClasses.h:71
Population_Manager::Population_Manager
Population_Manager(Landscape *a_l_ptr, int a_numberLifeStages=12)
Definition: PopulationManager.cpp:200
Spider_Population_Manager::m_JuvPosMap
SimplePositionMap * m_JuvPosMap
Pointer to the egg position map
Definition: Spider_BaseClasses.h:114
count
Definition: SubPopulation.h:48
Spider_Population_Manager::m_BallooningWeather
bool m_BallooningWeather
A flag for whether the weather is correct for ballooning
Definition: Spider_BaseClasses.h:145
tosps_JBalloon
Definition: Spider_BaseClasses.h:79
Spider_Population_Manager::m_JuvDegreesPoor
double m_JuvDegreesPoor
Contribution to day degrees under poor food
Definition: Spider_BaseClasses.h:161
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