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

The generic base class for juvenile spiders
More...

#include <Spider_BaseClasses.h>

Inheritance diagram for Spider_Juvenile:
Spider_Base TAnimal TALMaSSObject Erigone_Juvenile Oedothorax_Juvenile Spider_Female Erigone_Female Oedothorax_Female

Public Member Functions

void EndStep ()
 EndStep behaviour - must be implemented in descendent classes. More...
 
 Spider_Juvenile (int x, int y, Landscape *L, Spider_Population_Manager *SpPM)
 the constructor
More...
 
virtual void ReInit (int x, int y, Landscape *L, Spider_Population_Manager *SpPM)
 Used to reinitialise reused objects
More...
 
virtual void BeginStep ()
 The BeginStep code
More...
 
virtual void Step ()
 The Step code
More...
 
virtual bool OnFarmEvent (FarmToDo event)
 Determines the impact of any farm management events at the juvenile's location
More...
 
virtual void SpecialWinterMort ()
 Used to impose extra mortaltiy to those spiderlings that don't reach a minimum developmental stage by the end of the year
More...
 
- Public Member Functions inherited from Spider_Base
 Spider_Base (int x, int y, Landscape *L, Spider_Population_Manager *SpMan)
 Constructor
More...
 
void ReInit (int x, int y, Landscape *L, Spider_Population_Manager *SpMan)
 Reinitialise object code
More...
 
void Init (Spider_Population_Manager *p_spMan)
 Used it initialise objects (also used by ReInit)
More...
 
virtual int WhatState ()
 Returns the current spider behavioural state
More...
 
virtual void KillThis ()
 Destroys the spider
More...
 
- Public Member Functions inherited from TAnimal
 TAnimal (int x, int y, Landscape *L)
 The TAnimal constructor saving the x,y, location and the landscape pointer. More...
 
 TAnimal (int x, int y)
 The TAnimal constructor saving the x,y used if landscape is already set. More...
 
void SetGuardMapIndex (int a_index_x, int a_index_y)
 Set the guard map index, this is used to avoid two animals operating in the same location when using multithread. More...
 
unsigned SupplyFarmOwnerRef () const
 Get the current location farm ref if any. More...
 
AnimalPosition SupplyPosition () const
 Returns the objects location and habitat type and veg type. More...
 
APoint SupplyPoint () const
 Returns the objects location in ALMaSS coordinates. More...
 
int SupplyPolygonRef () const
 Returns the polygon reference where the object is located. More...
 
TTypesOfLandscapeElement SupplyPolygonType () const
 Returns the polygon type where the object is located. More...
 
int Supply_m_Location_x () const
 Returns the ALMaSS x-coordinate. More...
 
int Supply_m_Location_y () const
 Returns the ALMaSS y-coordinate. More...
 
int SupplyGuardCellX () const
 Returns the x-index to the guard cell. More...
 
int SupplyGuardCellY () const
 Returns the y-index to the guard cell. More...
 
int SupplyAge () const
 Returns the animals age in days. More...
 
void SetAge (int a_age)
 Sets the animals age in days. More...
 
virtual void CopyMyself ()
 Used to copy the object details to another in descendent classes. More...
 
void SetX (const int a_x)
 Sets the x-coordinate. More...
 
void SetY (const int a_y)
 Sets the y-coordinate. More...
 
virtual void ReinitialiseObject (int a_x, int a_y, Landscape *a_l_ptr)
 
virtual void ReinitialiseObject (int a_x, int a_y)
 Used to re-use an object - must be implemented in descendent classes. More...
 
virtual void Dying ()
 A wrapped for KillThis - ideally should not be used. More...
 
void CheckManagement ()
 Used to start a check for any management related effects at the objects current location. More...
 
void CheckManagementXY (int a_x, int a_y)
 Used to start a check for any management related effects at x,y. More...
 
- Public Member Functions inherited from TALMaSSObject
int GetCurrentStateNo () const
 Returns the current state number. More...
 
void SetCurrentStateNo (int a_num)
 Sets the current state number. More...
 
bool GetStepDone () const
 Returns the step done indicator flag. More...
 
void SetStepDone (bool a_bool)
 Sets the step done indicator flag. More...
 
void ReinitialiseObjectBase ()
 Used to initialise an object. More...
 
 TALMaSSObject ()
 The constructor for TALMaSSObject. More...
 
virtual ~TALMaSSObject ()=default
 The destructor for TALMaSSObject. More...
 

Static Public Attributes

static int m_JuvDensityDepMortConst = 0
 Juvenile density dependent mortality threshold
More...
 
static std::array< int, 40 > m_DispersalChance = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
 Disperals probability as a function of bad habitat days
More...
 
static double m_JuvDevelConst = 0
 Day degrees maturation threshold
More...
 
- Static Public Attributes inherited from Spider_Base
static int m_DenDependenceConst0 = 0
 This is the number of local spiders needed before density dependent mortality will kill
More...
 
static int m_SimW = 0
 The width of the landscape
More...
 
static int m_SimH = 0
 The height of the landscape
More...
 

Protected Member Functions

virtual TTypesOfSpiderState st_Develop ()
 The behavioural state development
More...
 
virtual TTypesOfSpiderState st_AssessHabitat ()
 The behavioural state assess habitat
More...
 
virtual TTypesOfSpiderState st_Balloon ()
 The behavioural state balloon
More...
 
virtual TTypesOfSpiderState st_Walk ()
 The bheavioural state walk
More...
 
virtual void Maturation ()
 The behavioural state maturation
More...
 
virtual bool BallooningMortality (int dist)
 Determines the ballooning mortality associated with distance dist
More...
 
virtual int BalloonTo (int direction, int distance)
 Carry out ballooning in a given direction and distance
More...
 
virtual int WalkTo (int direction)
 Walk in a given direction
More...
 
virtual TTypesOfSpiderState AssessHabitat ()
 Evaluates the habitat at current location
More...
 
virtual int Balloon ()
 Carries out ballooning
More...
 
virtual int Walk ()
 Carries out walking
More...
 
virtual SpiderFoodQuality AssessFood ()
 Evaluates food status at current location
More...
 
virtual SpiderFoodQuality CheckToleTovIndex ()
 Returns the movement map value at current location
More...
 
virtual void AddToBadHabitatDays ()
 Increments bad habitat days up to max of 39
More...
 
virtual void CalcDrought ()
 For extension in descendent classes to calculate drought days for mortality
More...
 
- Protected Member Functions inherited from Spider_Base
virtual bool EggPosValid (unsigned a_x, unsigned a_y)
 Checks if its possible to create an eggsac here
More...
 
bool HatchDensityMort (int a_x, int a_y, int a_range)
 Checks for density-dependent mortality at this location
More...
 
virtual int CheckPosMap (unsigned x, unsigned y)
 Returns the value in m_OurPosMap for this location
More...
 
virtual bool GetPosMapPositive (unsigned x, unsigned y, unsigned range)
 Returns whether there are any non-zero values within range of this coordinate (TL corner)
More...
 
virtual int GetPosMapDensity (unsigned x, unsigned y, unsigned range)
 Returns total number of non-zero locations within range of this coordinate (TL corner)
More...
 
virtual void ClearPosMap (unsigned x, unsigned y)
 Clears a PosMap location
More...
 
virtual void SetPosMap (unsigned x, unsigned y)
 Sets a PosMap location to non-zero
More...
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

Protected Attributes

char m_MyDirection
 The currrent movement direction
More...
 
bool m_MustBalloon
 Flag to force ballooning if possible
More...
 
int m_BadHabitatDays
 The number of days in bad conditions
More...
 
double m_droughtFactor
 The running score of drought conditions
More...
 
- Protected Attributes inherited from Spider_Base
double m_AgeDegrees
 A local pointer the population manager
More...
 
int m_Age
 Stores the spiders age in days
More...
 
TTypesOfSpiderState m_CurrentSpState
 Stores the current behavioural state
More...
 
unsigned m_Lifestage { 0 }
 This is a useful parameter holding the spider type. More...
 
SimplePositionMapm_OurPosMap
 Contains a pointer to the relevant position map - allocation of this must be controlled by the descendent class init. More...
 
- Protected Attributes inherited from TAnimal
int m_Location_x
 The objects ALMaSS x coordinate. More...
 
int m_Location_y
 The objects ALMaSS y coordinate. More...
 
int m_guard_cell_x
 The index x to the guard cell. More...
 
int m_guard_cell_y
 The index y to the guard cell. More...
 
int m_AgeDays {0}
 To hold the age in days. More...
 
PesticideToxicity m_my_pesticide
 
- Protected Attributes inherited from TALMaSSObject
int m_CurrentStateNo
 The basic state number for all objects - '-1' indicates death. More...
 
bool m_StepDone
 Indicates whether the iterative step code is done for this timestep. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from TAnimal
static void SetSimulationWidth (int a_value)
 Sets the simulation width. More...
 
static void SetSimulationHeight (int a_value)
 Sets the simulation height. More...
 
static void SetDayInYear (int a_value)
 Sets the day in year attribute. More...
 
static void SetOurLandscape (Landscape *a_value)
 Sets the landscape pointer. More...
 
static void SetTempToday (double a_value)
 Sets the temperature today attribute. More...
 
- Static Public Member Functions inherited from TALMaSSObject
static void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 
- Public Attributes inherited from Spider_Base
double m_pesticide_accum
 Body-burden of pesticde
More...
 
Spider_Population_Managerm_OurPopulationManager
 
- Static Protected Attributes inherited from TAnimal
static Landscapem_OurLandscape = nullptr
 A pointer to the landscape object shared with all TAnimal objects. More...
 
static int m_SimulationWidth = 0
 A static member for the simulation width because it is often used by descendent classes. More...
 
static int m_SimulationHeight = 0
 A static member for the simulation height because it is often used by descendent classes. More...
 
static double m_TemperatureToday = 0.0
 A holder for the temperature today shared with all TAnimal objects. More...
 
static int m_DayInYear = 0
 A holder for the day in year shared with all TAnimal objects. More...
 

Detailed Description

The generic base class for juvenile spiders

Constructor & Destructor Documentation

◆ Spider_Juvenile()

Spider_Juvenile::Spider_Juvenile ( int  x,
int  y,
Landscape L,
Spider_Population_Manager SpPM 
)

Member Function Documentation

◆ AddToBadHabitatDays()

virtual void Spider_Juvenile::AddToBadHabitatDays ( )
inlineprotectedvirtual

Increments bad habitat days up to max of 39

452 { if (m_BadHabitatDays < 39) m_BadHabitatDays++; }

References m_BadHabitatDays.

Referenced by AssessHabitat(), st_Develop(), and Spider_Female::st_Reproduce().

◆ AssessFood()

SpiderFoodQuality Spider_Juvenile::AssessFood ( )
protectedvirtual

Evaluates food status at current location

599  {
600  const SpiderFoodQuality sfq = CheckToleTovIndex();
602  if (sfq < sfq_Poor) return sfq_None;
603  if (sfq < sfq_Ok) insects *= 0.25;
604  if (sfq < sfq_Best) insects *= 0.50;
605  if (insects < cfg_NoFoodLevel.value()) return sfq_None;
606  if (insects < cfg_LowFoodLevel.value()) return sfq_Poor;
607  if (insects > cfg_HighFoodLevel.value()) return sfq_Best;
608  return sfq_Ok;
609 }

References cfg_HighFoodLevel, cfg_LowFoodLevel, cfg_NoFoodLevel, CheckToleTovIndex(), TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, sfq_Best, sfq_None, sfq_Ok, sfq_Poor, Landscape::SupplyInsects(), and CfgFloat::value().

Referenced by st_Develop(), and Spider_Female::st_Reproduce().

◆ AssessHabitat()

TTypesOfSpiderState Spider_Juvenile::AssessHabitat ( )
protectedvirtual

Evaluates the habitat at current location

666  {
667  if (m_MustBalloon) {
668  m_MustBalloon = true;
669  return m_CurrentSpState = tosps_Move;
670  }
672  switch (result) {
673  case sfq_Lethal:
674 #ifdef __SpidDebug
675  m_OurPopulationManager->RecordDeath(5);
676 #endif
677  return tosps_Dying; // Code for dying
678  case sfq_None:
679  m_MustBalloon = true;
680  return tosps_Move;
681  case sfq_Poor:
682  // Extra Mortality for competition sake
684  {
685 #ifdef __SpidDebug
686  m_OurPopulationManager->RecordDeath(4);
687 #endif
688  return tosps_Dying;
689  }
690  if (m_OurPopulationManager->IsBallooningWeather()) return tosps_Move; // try to balloon
691  else
692  {
694  return tosps_Develop;
695  }
696  case sfq_Ok:
697  case sfq_Best:
699  // Is too dry
700  if (m_OurPopulationManager->IsBallooningWeather()) return tosps_Move; // try to balloon
702  return tosps_Develop;
703  }
704  return tosps_Develop;
705 
706  default:
707  m_OurLandscape->Warn("AssessHabitat - Bad return code", NULL);
708  exit(1);
709  }
710 }

References AddToBadHabitatDays(), cfg_ExtraCompetionMortality, Spider_Population_Manager::CheckHumidity(), CheckToleTovIndex(), g_random_fnc(), Spider_Population_Manager::IsBallooningWeather(), Spider_Base::m_CurrentSpState, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MustBalloon, TAnimal::m_OurLandscape, Spider_Base::m_OurPopulationManager, sfq_Best, sfq_Lethal, sfq_None, sfq_Ok, sfq_Poor, tosps_Develop, tosps_Dying, tosps_Move, CfgInt::value(), and Landscape::Warn().

Referenced by st_AssessHabitat().

◆ Balloon()

int Spider_Juvenile::Balloon ( )
protectedvirtual

Carries out ballooning

622  {
624  // can disperse
625  // Step 3 Mortality
627  if (BallooningMortality(Distance)) {
628  return 0; // Signal to die
629  }
630  // Step 4 where to go to
631  int Direction = m_OurPopulationManager->GetWindDirection();
632  return BalloonTo(Direction, Distance); // 0-2 Die, Balloon, Stay
633  }
634  /* } */
635  return 1; // carry on
636 }

References BallooningMortality(), BalloonTo(), g_random_fnc(), Spider_Population_Manager::GetBTimeToday(), Spider_Population_Manager::GetDispDist(), Spider_Population_Manager::GetWindDirection(), and Spider_Base::m_OurPopulationManager.

Referenced by st_Balloon(), and Spider_Female::st_Balloon().

◆ BallooningMortality()

bool Spider_Juvenile::BallooningMortality ( int  dist)
protectedvirtual

Determines the ballooning mortality associated with distance dist

612  {
613  //Mortality related directly to distance travelled
615 
616  return true;
617  }
618  return false;
619 }

References g_random_fnc(), Spider_Population_Manager::GetBallooningMortalityPerMeter(), and Spider_Base::m_OurPopulationManager.

Referenced by Balloon().

◆ BalloonTo()

int Spider_Juvenile::BalloonTo ( int  direction,
int  distance 
)
protectedvirtual

Carry out ballooning in a given direction and distance

713  {
714  // moves the spider 'distance' metres in 'direction' direction
715  // returns 2 if the new location is not lethal otherwise returns 0
716  // For small landscapes ballooning round the world and back can be a problem
717  // First clears its positions since it might try to count itself
718  if (distance >= m_SimW) distance -= m_SimW;
719  //
720  switch (direction) {
721  case 0: // North
722  m_Location_y -= distance;
723  if (m_Location_y < 0) m_Location_y += m_SimH;
724  break;
725  case 1: // NE
726  m_Location_x += distance;
727  m_Location_y -= distance;
728  if (m_Location_y < 0) m_Location_y += m_SimH;
730  break;
731  case 2: // E
732  m_Location_x += distance;
734  break;
735  case 3: // SE
736  m_Location_x += distance;
737  m_Location_y += distance;
740  break;
741  case 4: // S
742  m_Location_y += distance;
744  break;
745  case 5: // SW
746  m_Location_x -= distance;
747  m_Location_y += distance;
748  if (m_Location_x < 0) m_Location_x += m_SimW;
750  break;
751  case 6: // W
752  m_Location_x -= distance;
753  if (m_Location_x < 0) m_Location_x += m_SimW;
754  break;
755  case 7: // NW
756  m_Location_x -= distance;
757  m_Location_y -= distance;
758  if (m_Location_x < 0) m_Location_x += m_SimW;
759  if (m_Location_y < 0) m_Location_y += m_SimH;
760  break;
761  }
762 
764 
765  // Now find out if the habitat is lethal
767  {
768  return 0; //Die
769  }
770 
771  unsigned int range = cfg_BalDensityDepMortConst.value();
772  // NB these two must be signed!
773  int x1 = m_Location_x - range;
774  int y1 = m_Location_y - range;
775  int y2 = m_Location_y + range;
776  if (x1 < 0) x1 = 0;
777  if (y1 < 0) y1 = 0;
778  if (y2 >= m_SimH) range -= (++y2 - m_SimH);
779  range = (range << 1); // *2
780  if (GetPosMapPositive(x1, y1, range)) return 0;
781  return 2;
782 }

References cfg_BalDensityDepMortConst, Spider_Base::GetPosMapPositive(), TAnimal::m_guard_cell_x, TAnimal::m_guard_cell_y, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Spider_Base::m_OurPopulationManager, Spider_Base::m_SimH, Spider_Base::m_SimW, spider_tole_lethal(), Population_Manager::UpdateGuardMap(), and CfgInt::value().

Referenced by Balloon().

◆ BeginStep()

void Spider_Juvenile::BeginStep ( void  )
virtual

The BeginStep code

Reimplemented from TALMaSSObject.

Reimplemented in Spider_Female.

374  {
375 #ifdef __CJTDebug_5
376  if (IsAlive() != 0x0DEADC0DE) DEADCODEError();
377 #endif
378  CalcDrought();
379  CheckManagement(); // This can lead to death, or movement or no change
380  // CJT 31-01-2007 if ( ( m_Age++ > 6 ) && ( m_Age < 10 ) ) {
381  if (m_Age++ == 7) {
383  // Seventh day of life so check for density dependent dispersal mortaltity
384  unsigned int range = m_JuvDensityDepMortConst;
385  // NB these two must be signed!
386  int x1 = m_Location_x - range;
387  int y1 = m_Location_y - range;
388  int y2 = m_Location_y + range;
389  if (y2 > m_SimH) range -= (++y2 - m_SimH);
390  if (x1 < 0) x1 = 0;
391  if (y1 < 0) y1 = 0;
392  range = (range << 1); // *2
393  if (GetPosMapPositive(x1, y1, range)) {
394  m_CurrentStateNo = -1; // Die
395  m_StepDone = true;
396 #ifdef __SpidDebug
397  m_OurPopulationManager->RecordJDeath();
398 #endif
399  return;
400  }
401  }
403 }

References CalcDrought(), TAnimal::CheckManagement(), Spider_Base::ClearPosMap(), Spider_Base::GetPosMapPositive(), Spider_Base::m_Age, TALMaSSObject::m_CurrentStateNo, m_JuvDensityDepMortConst, TAnimal::m_Location_x, TAnimal::m_Location_y, Spider_Base::m_OurPopulationManager, Spider_Base::m_SimH, TALMaSSObject::m_StepDone, and Spider_Base::SetPosMap().

◆ CalcDrought()

virtual void Spider_Juvenile::CalcDrought ( )
inlineprotectedvirtual

For extension in descendent classes to calculate drought days for mortality

Reimplemented in Erigone_Female, Oedothorax_Female, Erigone_Juvenile, and Oedothorax_Juvenile.

454 {}

Referenced by BeginStep(), and Spider_Female::BeginStep().

◆ CheckToleTovIndex()

SpiderFoodQuality Spider_Juvenile::CheckToleTovIndex ( )
protectedvirtual

Returns the movement map value at current location

Reimplemented in Oedothorax_Juvenile.

653  {
654 
655  // Alternative version to see if we can increase speed using a movementmap
657  if (mmapval == sfq_Chameleon) {
658 
660 
661  }
662  return mmapval;
663 }

References MovementMapUnsigned::GetMapValue(), TAnimal::m_Location_x, TAnimal::m_Location_y, Spider_Population_Manager::m_MoveMap, TAnimal::m_OurLandscape, Spider_Base::m_OurPopulationManager, sfq_Chameleon, and spider_toc_index().

Referenced by AssessFood(), and AssessHabitat().

◆ EndStep()

void Spider_Juvenile::EndStep ( void  )
virtual

EndStep behaviour - must be implemented in descendent classes.

Reimplemented from TALMaSSObject.

Reimplemented in Spider_Female.

189  {
190  // Arbitrary pesticide influence code.
191 #ifdef __SPIDER_PESTICIDE
193  // Pick up the pesticide to add to the body burden
196  {
197  // Kill the spider following a fixed probability of death. The test is taken each day until it dies.
199  }
200 #endif
201 }

References cfg_SpiderJuvPPPEffectProb, cfg_SpiderJuvPPPElimiationRate, cfg_SpiderJuvPPPThreshold, g_rand_uni_fnc(), Spider_Base::m_CurrentSpState, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Spider_Base::m_pesticide_accum, ppp_1, Landscape::SupplyPesticide(), tosps_Dying, and CfgFloat::value().

◆ Maturation()

void Spider_Juvenile::Maturation ( )
protectedvirtual

The behavioural state maturation

507  {
508  bool done = false;
509  struct_Spider* aps;
510  aps = new struct_Spider;
512  aps->L = m_OurLandscape;
513  int x_ex, y_ex, tx, ty;
514  if (m_Location_x < 5) x_ex = m_Location_x; else x_ex = 5;
515  if (m_Location_y < 5) y_ex = m_Location_y; else y_ex = 5;
516  for (int a = 0; a < y_ex; a++) {
517  for (int b = 0; b < x_ex; b++) {
518  tx = m_Location_x - b;
519  ty = m_Location_y - a;
520 
522  {
523  // Must write to the position map
525  {
527  aps->x = tx;
528  aps->y = ty;
530  done = true;
531 #ifdef __SpidDebug
532  m_OurPopulationManager->RecordMature();
533 #endif
534  }
535  }
536 
537  if (done == true) break;
538  }
539  if (done == true) break;
540  }
541  delete aps;
542 }

References Spider_Population_Manager::CreateObjects(), SimplePositionMap::GetMapValue(), struct_Spider::L, Spider_Population_Manager::m_AdultPosMap, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Spider_Base::m_OurPopulationManager, SimplePositionMap::SetMapValue(), spider_tole_juvenile_maturation_valid(), struct_Spider::SpPM, tspi_Female, struct_Spider::x, and struct_Spider::y.

Referenced by Step().

◆ OnFarmEvent()

virtual bool Spider_Juvenile::OnFarmEvent ( FarmToDo  event)
inlinevirtual

Determines the impact of any farm management events at the juvenile's location

Reimplemented from Spider_Base.

Reimplemented in Spider_Female, Oedothorax_Female, Erigone_Female, Oedothorax_Juvenile, and Erigone_Juvenile.

419 { return true; }

◆ ReInit()

void Spider_Juvenile::ReInit ( int  x,
int  y,
Landscape L,
Spider_Population_Manager SpPM 
)
virtual

Used to reinitialise reused objects

Reimplemented in Spider_Female.

364 {
365  Spider_Base::ReInit(x, y, L, p_SpPM);
366  m_AgeDegrees = 0;
367  m_Age = 0;
368  m_OurPopulationManager = p_SpPM;
369  m_OurPosMap = p_SpPM->m_JuvPosMap;
370 }

References Spider_Base::m_Age, Spider_Base::m_AgeDegrees, Spider_Population_Manager::m_JuvPosMap, Spider_Base::m_OurPopulationManager, Spider_Base::m_OurPosMap, and Spider_Base::ReInit().

Referenced by Spider_Female::ReInit().

◆ SpecialWinterMort()

void Spider_Juvenile::SpecialWinterMort ( )
virtual

Used to impose extra mortaltiy to those spiderlings that don't reach a minimum developmental stage by the end of the year

589  {
590  if ((m_AgeDegrees) < (m_JuvDevelConst * 0.75)) {
591 #ifdef __SpidDebug
592  m_OurPopulationManager->RecordDeath(9);
593 #endif
595  }
596 }

References Spider_Base::m_AgeDegrees, Spider_Base::m_CurrentSpState, m_JuvDevelConst, Spider_Base::m_OurPopulationManager, and tosps_Dying.

◆ st_AssessHabitat()

virtual TTypesOfSpiderState Spider_Juvenile::st_AssessHabitat ( )
inlineprotectedvirtual

The behavioural state assess habitat

426  {
427  return AssessHabitat();
428  };

References AssessHabitat().

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

◆ st_Balloon()

TTypesOfSpiderState Spider_Juvenile::st_Balloon ( )
protectedvirtual

The behavioural state balloon

Reimplemented in Spider_Female.

546 {
547  // Results in either death or to Develop
548  // First clear the old position
550  switch (Balloon()) {
551  case 0:
552 #ifdef __SpidDebug
553  m_OurPopulationManager->RecordDeath(7);
554 #endif
556  break;
557  case 1: // Could not move to a new place
559  break;
560  case 2: // Moved to a new place
561  m_MustBalloon = false;
562  break;
563  }
565  return tosps_Develop;
566 }

References Balloon(), Spider_Base::ClearPosMap(), Spider_Base::m_CurrentSpState, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MustBalloon, Spider_Base::m_OurPopulationManager, Spider_Base::m_OurPosMap, SimplePositionMap::SetMapValue(), tosps_Develop, and tosps_Dying.

Referenced by Step().

◆ st_Develop()

TTypesOfSpiderState Spider_Juvenile::st_Develop ( void  )
protectedvirtual

The behavioural state development

468  {
470 #ifdef __SpidDebug
471  m_OurPopulationManager->RecordDeath(6);
472 #endif
474 }
475  switch (AssessFood()) {
476  case sfq_None: // No Food
477  // No development
479  break;
480  // Not much food
481  case sfq_Poor:
483  m_BadHabitatDays = 0;
484  break;
485  case sfq_Ok:
487  m_BadHabitatDays = 0;
488  break;
489  case sfq_Best: // Lots of food
491  m_BadHabitatDays = 0;
492  break;
493  }
495  return TTypesOfSpiderState::tosps_Mature; // go to mature
496  }
497  else
498  {
501  }
502  }
503  return TTypesOfSpiderState::tosps_Develop; // carry on developing
504 }

References AddToBadHabitatDays(), AssessFood(), g_rand_uni_fnc(), g_random_fnc(), Spider_Population_Manager::GetJuvDegrees_good(), Spider_Population_Manager::GetJuvDegrees_intermediate(), Spider_Population_Manager::GetJuvDegrees_poor(), Spider_Population_Manager::GetJuvMort(), Spider_Base::m_AgeDegrees, m_BadHabitatDays, Spider_Base::m_CurrentSpState, m_DispersalChance, m_JuvDevelConst, Spider_Base::m_OurPopulationManager, sfq_Best, sfq_None, sfq_Ok, sfq_Poor, tosps_Develop, tosps_Dying, tosps_Mature, and tosps_Move.

Referenced by Step().

◆ st_Walk()

TTypesOfSpiderState Spider_Juvenile::st_Walk ( )
protectedvirtual

The bheavioural state walk

Reimplemented in Spider_Female.

570 {
572  switch (Walk()) {
573  case 0:
574  m_StepDone = true;
575 #ifdef __SpidDebug
576  m_OurPopulationManager->RecordDeath(8);
577 #endif
578  return tosps_Dying;
579  break;
580  case 1: //Could not move
581  case 2: // Moved to a new place
583  break;
584  }
585  return tosps_Develop;
586 }

References SimplePositionMap::ClearMapValue(), TAnimal::m_Location_x, TAnimal::m_Location_y, Spider_Base::m_OurPopulationManager, Spider_Base::m_OurPosMap, TALMaSSObject::m_StepDone, SimplePositionMap::SetMapValue(), tosps_Develop, tosps_Dying, and Walk().

Referenced by Step().

◆ Step()

void Spider_Juvenile::Step ( void  )
virtual

The Step code

Reimplemented from TALMaSSObject.

Reimplemented in Spider_Female.

407  {
408  if (m_StepDone || m_CurrentStateNo == -1) return;
409 #ifdef __CJTDebug_5
410  if (IsAlive() != 0x0DEADC0DE) DEADCODEError();
411 #endif
412  switch (m_CurrentSpState) {
413  case tosps_Initiation: // Initial
415  break;
416 
417  case tosps_Develop:
418  // The last thing done each time step
419  // next behaviour is either death, maturation, assess habitat or move
421  m_StepDone = true;
422  break;
423 
424  case tosps_AssessHabitat:
425  // Is the first thing a spider does if not moving or dying or maturing
426  // Results in either death or development or movment
428  break;
429 
430  case tosps_Move:
431  // Just a switch which determines whether to balloon or walk
434  break;
435 
436  case tosps_JBalloon:
438  break;
439 
440  case tosps_JWalk:
441  // Results in either death or to Develop
443  break;
444 
445  case tosps_Mature:
446  Maturation();
448  m_CurrentStateNo = -1;
449  m_StepDone = true;
450  break;
451 
452  case tosps_Dying:
454  m_CurrentStateNo = -1;
455  m_StepDone = true;
456 #ifdef __SpidDebug
457  m_OurPopulationManager->RecordJDeath();
458 #endif
459  break;
460 
461  default:
462  m_OurLandscape->Warn("Spider Juvenile - unknown state", "");
463  exit(1);
464  }
465 }

References SimplePositionMap::ClearMapValue(), Spider_Population_Manager::GetWalking(), Spider_Base::m_CurrentSpState, TALMaSSObject::m_CurrentStateNo, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Spider_Base::m_OurPopulationManager, Spider_Base::m_OurPosMap, TALMaSSObject::m_StepDone, Maturation(), st_AssessHabitat(), st_Balloon(), st_Develop(), st_Walk(), tosps_AssessHabitat, tosps_Develop, tosps_Dying, tosps_Initiation, tosps_JBalloon, tosps_JWalk, tosps_Mature, tosps_Move, and Landscape::Warn().

◆ Walk()

int Spider_Juvenile::Walk ( )
protectedvirtual

Carries out walking

639  {
641  // Step 1 should I disperse?
643  // Want to disperse
644  // Step 2 where to go to
645  int Direction = m_MyDirection & -1;
646  return WalkTo(Direction);
647  }
648  }
649  return 1; // carry on
650 }

References g_random_fnc(), Spider_Population_Manager::GetMinWalkTemp(), m_BadHabitatDays, m_DispersalChance, m_MyDirection, Spider_Base::m_OurPopulationManager, and WalkTo().

Referenced by st_Walk(), and Spider_Female::st_Walk().

◆ WalkTo()

int Spider_Juvenile::WalkTo ( int  direction)
protectedvirtual

Walk in a given direction

785  {
786  // moves the spider 1 metre in 'direction' direction
787  // returns 2 if the new location is OK otherwise returns 0 for death or 1 for no move
788  int tx = m_Location_x;
789  int ty = m_Location_y;
790  switch (direction) {
791  case 0: // North
792  ty -= 1;
793  if (ty < 0) ty += m_SimH;
794  break;
795  case 1: // NE
796  tx += 1;
797  ty -= 1;
798  if (ty < 0) ty += m_SimH;
799  if (tx >= m_SimW) tx -= m_SimW;
800  break;
801  case 2: // E
802  tx += 1;
803  if (tx >= m_SimW) tx -= m_SimW;
804  break;
805  case 3: // SE
806  tx += 1;
807  ty += 1;
808  if (tx >= m_SimW) tx -= m_SimW;
809  if (ty >= m_SimH) ty -= m_SimH;
810  break;
811  case 4: // S
812  ty += 1;
813  if (ty >= m_SimH) ty -= m_SimH;
814  break;
815  case 5: // SW
816  tx -= 1;
817  ty += 1;
818  if (tx < 0) tx += m_SimW;
819  if (ty >= m_SimH) ty -= m_SimH;
820  break;
821  case 6: // W
822  tx -= 1;
823  if (tx < 0) tx += m_SimW;
824  break;
825  case 7: // NW
826  tx -= 1;
827  ty -= 1;
828  if (tx < 0) tx += m_SimW;
829  if (ty < 0) ty += m_SimH;
830  break;
831  }
832  // Now find out if the habitat is lethal
834  int sum = 0;
835 
836  if (spider_tole_lethal(m_OurLandscape, tx, ty))
837  {
838  return 1;
839  }
840  else
841  {
842  int x1, y1, x2, y2;
843  // Define extent
848  if (x1 < 0) x1 = 0;
849  if (y1 < 0) y1 = 0;
850  if (x2 > m_SimW) x2 = m_SimW;
851  if (y2 > m_SimH) y2 = m_SimH;
852  for (int i = x1; i < x2; i++) {
853  for (int j = y1; j < y2; j++) {
854  //if position not empty die (density dependence)
855  sum += CheckPosMap(i, j);
856  }
857  }
858  if (sum > m_DenDependenceConst0) return 0; //die
859  }
860 
861  m_Location_x = tx;
862  m_Location_y = ty;
864  return 2; // Moved OK
865 }

References cfg_WalDensityDepMortConst, Spider_Base::CheckPosMap(), Spider_Base::m_DenDependenceConst0, TAnimal::m_guard_cell_x, TAnimal::m_guard_cell_y, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Spider_Base::m_OurPopulationManager, Spider_Base::m_SimH, Spider_Base::m_SimW, spider_tole_lethal(), Landscape::SupplyElementType(), Population_Manager::UpdateGuardMap(), and CfgInt::value().

Referenced by Walk().

Member Data Documentation

◆ m_BadHabitatDays

int Spider_Juvenile::m_BadHabitatDays
protected

◆ m_DispersalChance

std::array< int, 40 > Spider_Juvenile::m_DispersalChance = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
static

Disperals probability as a function of bad habitat days

Referenced by Erigone_Population_Manager::Init(), Oedothorax_Population_Manager::Init(), st_Develop(), Spider_Female::Step(), and Walk().

◆ m_droughtFactor

double Spider_Juvenile::m_droughtFactor
protected

The running score of drought conditions

◆ m_JuvDensityDepMortConst

int Spider_Juvenile::m_JuvDensityDepMortConst = 0
static

Juvenile density dependent mortality threshold

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

◆ m_JuvDevelConst

double Spider_Juvenile::m_JuvDevelConst = 0
static

◆ m_MustBalloon

◆ m_MyDirection

char Spider_Juvenile::m_MyDirection
protected

The currrent movement direction

Referenced by Spider_Juvenile(), and Walk().


The documentation for this class was generated from the following files:
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
Spider_Juvenile::BallooningMortality
virtual bool BallooningMortality(int dist)
Determines the ballooning mortality associated with distance dist
Definition: Spider_BaseClasses.cpp:612
g_rand_uni_fnc
double g_rand_uni_fnc()
Definition: ALMaSS_Random.cpp:56
Spider_Juvenile::st_AssessHabitat
virtual TTypesOfSpiderState st_AssessHabitat()
The behavioural state assess habitat
Definition: Spider_BaseClasses.h:426
Spider_Base::m_OurPosMap
SimplePositionMap * m_OurPosMap
Contains a pointer to the relevant position map - allocation of this must be controlled by the descen...
Definition: Spider_BaseClasses.h:328
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
Spider_Juvenile::st_Balloon
virtual TTypesOfSpiderState st_Balloon()
The behavioural state balloon
Definition: Spider_BaseClasses.cpp:545
Spider_Base::Spider_Base
Spider_Base(int x, int y, Landscape *L, Spider_Population_Manager *SpMan)
Constructor
Definition: Spider_BaseClasses.cpp:132
Spider_Base::m_pesticide_accum
double m_pesticide_accum
Body-burden of pesticde
Definition: Spider_BaseClasses.h:296
Spider_Base::m_AgeDegrees
double m_AgeDegrees
A local pointer the population manager
Definition: Spider_BaseClasses.h:300
Landscape::SupplyElementType
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
Returns the landscape type of the polygon using the polygon reference number a_polyref or coordinates...
Definition: Landscape.h:1732
Spider_Juvenile::m_MustBalloon
bool m_MustBalloon
Flag to force ballooning if possible
Definition: Spider_BaseClasses.h:403
Spider_Juvenile::m_BadHabitatDays
int m_BadHabitatDays
The number of days in bad conditions
Definition: Spider_BaseClasses.h:405
sfq_Poor
Definition: Spider_BaseClasses.h:60
Spider_Juvenile::m_JuvDevelConst
static double m_JuvDevelConst
Day degrees maturation threshold
Definition: Spider_BaseClasses.h:398
Spider_Juvenile::AssessFood
virtual SpiderFoodQuality AssessFood()
Evaluates food status at current location
Definition: Spider_BaseClasses.cpp:599
cfg_LowFoodLevel
static CfgFloat cfg_LowFoodLevel("SPID_LOWFOODLEVEL", CFG_CUSTOM, 10.58)
Spider_Population_Manager::CreateObjects
virtual void CreateObjects(int ob_type, TAnimal *pvo, struct_Spider *data, int number)
Creates new spider objects - this must be overridden in descendent classes
Definition: Spider_BaseClasses.h:273
Spider_Juvenile::m_MyDirection
char m_MyDirection
The currrent movement direction
Definition: Spider_BaseClasses.h:401
TAnimal::m_guard_cell_y
int m_guard_cell_y
The index y to the guard cell.
Definition: PopulationManager.h:374
Spider_Base::m_OurPopulationManager
Spider_Population_Manager * m_OurPopulationManager
Definition: Spider_BaseClasses.h:309
tosps_Develop
Definition: Spider_BaseClasses.h:73
cfg_BalDensityDepMortConst
static CfgInt cfg_BalDensityDepMortConst("SPID_BALDENSITYDEPMORTCONST", CFG_CUSTOM, 1)
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
Spider_Juvenile::AssessHabitat
virtual TTypesOfSpiderState AssessHabitat()
Evaluates the habitat at current location
Definition: Spider_BaseClasses.cpp:666
tosps_Move
Definition: Spider_BaseClasses.h:74
Spider_Population_Manager::m_AdultPosMap
SimplePositionMap * m_AdultPosMap
Pointer to the egg position map
Definition: Spider_BaseClasses.h:116
CfgFloat::value
double value() const
Definition: Configurator.h:142
Spider_Population_Manager::GetDispDist
int GetDispDist(int chance)
Returns the dispsersal distance associated with a particular frequency value
Definition: Spider_BaseClasses.h:210
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_WalDensityDepMortConst
static CfgInt cfg_WalDensityDepMortConst("SPID_WALDENSITYDEPMORTCONST", CFG_CUSTOM, 1)
Spider_Base::CheckPosMap
virtual int CheckPosMap(unsigned x, unsigned y)
Returns the value in m_OurPosMap for this location
Definition: Spider_BaseClasses.cpp:150
Spider_Base::m_CurrentSpState
TTypesOfSpiderState m_CurrentSpState
Stores the current behavioural state
Definition: Spider_BaseClasses.h:304
Spider_Population_Manager::GetJuvDegrees_good
double GetJuvDegrees_good()
Returns todays juvenile development day degrees for good food
Definition: Spider_BaseClasses.h:236
MovementMapUnsigned::GetMapValue
unsigned GetMapValue(unsigned a_x, unsigned a_y) const
Definition: MovementMap.h:56
Spider_Juvenile::BalloonTo
virtual int BalloonTo(int direction, int distance)
Carry out ballooning in a given direction and distance
Definition: Spider_BaseClasses.cpp:713
Spider_Base::SetPosMap
virtual void SetPosMap(unsigned x, unsigned y)
Sets a PosMap location to non-zero
Definition: Spider_BaseClasses.cpp:170
tosps_Mature
Definition: Spider_BaseClasses.h:80
struct_Spider::SpPM
Spider_Population_Manager * SpPM
Definition: Spider_BaseClasses.h:100
TTypesOfLandscapeElement
TTypesOfLandscapeElement
Values that represent the types of landscape polygon that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:57
sfq_Chameleon
Definition: Spider_BaseClasses.h:57
Spider_Population_Manager::GetBallooningMortalityPerMeter
double GetBallooningMortalityPerMeter()
Return ballooning mortality per meter
Definition: Spider_BaseClasses.h:193
SimplePositionMap::GetMapValue
virtual bool GetMapValue(unsigned a_x, unsigned a_y)
Definition: PositionMap.h:50
Spider_Juvenile::m_JuvDensityDepMortConst
static int m_JuvDensityDepMortConst
Juvenile density dependent mortality threshold
Definition: Spider_BaseClasses.h:394
Spider_Juvenile::CheckToleTovIndex
virtual SpiderFoodQuality CheckToleTovIndex()
Returns the movement map value at current location
Definition: Spider_BaseClasses.cpp:653
Landscape::SupplyPesticide
double SupplyPesticide(int a_x, int a_y, PlantProtectionProducts a_ppp)
Gets total pesticide for a location.
Definition: Landscape.cpp:1386
tosps_AssessHabitat
Definition: Spider_BaseClasses.h:72
Spider_Juvenile::st_Walk
virtual TTypesOfSpiderState st_Walk()
The bheavioural state walk
Definition: Spider_BaseClasses.cpp:569
Spider_Base::m_Age
int m_Age
Stores the spiders age in days
Definition: Spider_BaseClasses.h:302
Spider_Juvenile::Maturation
virtual void Maturation()
The behavioural state maturation
Definition: Spider_BaseClasses.cpp:507
TAnimal::m_Location_y
int m_Location_y
The objects ALMaSS y coordinate.
Definition: PopulationManager.h:366
spider_toc_index
SpiderFoodQuality spider_toc_index(Landscape *m_OurLandscape, int x, int y)
Definition: Spider_toletoc.cpp:70
TAnimal::m_OurLandscape
static Landscape * m_OurLandscape
A pointer to the landscape object shared with all TAnimal objects.
Definition: PopulationManager.h:342
TAnimal::CheckManagement
void CheckManagement()
Used to start a check for any management related effects at the objects current location.
Definition: PopulationManager.cpp:1591
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
sfq_None
Definition: Spider_BaseClasses.h:59
sfq_Best
Definition: Spider_BaseClasses.h:62
Spider_Population_Manager::GetWalking
bool GetWalking()
Returns walking only flag
Definition: Spider_BaseClasses.h:251
struct_Spider::x
int x
Definition: Spider_BaseClasses.h:97
sfq_Ok
Definition: Spider_BaseClasses.h:61
struct_Spider::y
int y
Definition: Spider_BaseClasses.h:98
Spider_Population_Manager::GetJuvDegrees_intermediate
double GetJuvDegrees_intermediate()
Returns todays juvenile development day degrees for intermediate food
Definition: Spider_BaseClasses.h:239
SpiderFoodQuality
SpiderFoodQuality
The enumeration lists five catagories of habitat for spiders. Chameleon is used when the vegetation t...
Definition: Spider_BaseClasses.h:55
tosps_Dying
Definition: Spider_BaseClasses.h:75
TALMaSSObject::m_StepDone
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:133
Spider_Juvenile::WalkTo
virtual int WalkTo(int direction)
Walk in a given direction
Definition: Spider_BaseClasses.cpp:785
CfgInt::value
int value() const
Definition: Configurator.h:116
Spider_Population_Manager::GetWindDirection
int GetWindDirection()
Returns the wind direction
Definition: Spider_BaseClasses.h:221
Spider_Juvenile::AddToBadHabitatDays
virtual void AddToBadHabitatDays()
Increments bad habitat days up to max of 39
Definition: Spider_BaseClasses.h:452
Spider_Population_Manager::IsBallooningWeather
bool IsBallooningWeather()
Returns the flag for ballooning weather
Definition: Spider_BaseClasses.h:224
cfg_HighFoodLevel
static CfgFloat cfg_HighFoodLevel("SPID_HIGHFOODLEVEL", CFG_CUSTOM, 18.515)
Population_Manager::UpdateGuardMap
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.
Definition: PopulationManager.h:768
Landscape::SupplyInsects
double SupplyInsects(int a_polyref)
Returns the insect biomass on a polygon using the polygon reference number a_polyref or based on the ...
Definition: Landscape.h:1712
Spider_Population_Manager::GetBTimeToday
double GetBTimeToday()
Returns todays ballooning time
Definition: Spider_BaseClasses.h:218
Spider_Juvenile::Walk
virtual int Walk()
Carries out walking
Definition: Spider_BaseClasses.cpp:639
Spider_Juvenile::CalcDrought
virtual void CalcDrought()
For extension in descendent classes to calculate drought days for mortality
Definition: Spider_BaseClasses.h:454
Spider_Population_Manager::GetJuvDegrees_poor
double GetJuvDegrees_poor()
Returns todays juvenile development day degrees for poor food
Definition: Spider_BaseClasses.h:242
cfg_NoFoodLevel
static CfgFloat cfg_NoFoodLevel("SPID_NOFOODLEVEL", CFG_CUSTOM, 1.25)
TAnimal::m_guard_cell_x
int m_guard_cell_x
The index x to the guard cell.
Definition: PopulationManager.h:370
Spider_Population_Manager::CheckHumidity
bool CheckHumidity(int, int)
Returns humid or not
Definition: Spider_BaseClasses.h:248
Spider_Base::m_SimH
static int m_SimH
The height of the landscape
Definition: Spider_BaseClasses.h:294
Spider_Juvenile::Balloon
virtual int Balloon()
Carries out ballooning
Definition: Spider_BaseClasses.cpp:622
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
Spider_Base::m_SimW
static int m_SimW
The width of the landscape
Definition: Spider_BaseClasses.h:292
Spider_Population_Manager::GetMinWalkTemp
bool GetMinWalkTemp()
Returns the minimum walking temperature
Definition: Spider_BaseClasses.h:254
Spider_Population_Manager::GetJuvMort
double GetJuvMort()
Return current juvenile mortality rate
Definition: Spider_BaseClasses.h:207
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:131
tosps_Initiation
Definition: Spider_BaseClasses.h:71
sfq_Lethal
Definition: Spider_BaseClasses.h:58
spider_tole_lethal
bool spider_tole_lethal(Landscape *m_OurLandscape, int x, int y)
Definition: Spider_toletoc.cpp:59
Spider_Juvenile::st_Develop
virtual TTypesOfSpiderState st_Develop()
The behavioural state development
Definition: Spider_BaseClasses.cpp:468
Spider_Population_Manager::m_JuvPosMap
SimplePositionMap * m_JuvPosMap
Pointer to the egg position map
Definition: Spider_BaseClasses.h:114
tspi_Female
Definition: Spider_BaseClasses.h:49
spider_tole_juvenile_maturation_valid
bool spider_tole_juvenile_maturation_valid(Landscape *m_OurLandscape, int x, int y)
Definition: Spider_toletoc.cpp:40
cfg_SpiderJuvPPPElimiationRate
static CfgFloat cfg_SpiderJuvPPPElimiationRate("SPID_JUVPPPELIMIATIONRATE", CFG_CUSTOM, 0.0, 0.0, 1.0)
the daily juvenile elimination rate for pesticides
tosps_JWalk
Definition: Spider_BaseClasses.h:81
cfg_SpiderJuvPPPEffectProb
static CfgFloat cfg_SpiderJuvPPPEffectProb("SPID_JUVPPPEFFECTPROB", CFG_CUSTOM, 0, 0.0, 1.0)
Effect probability on threshold excedence.
Landscape::Warn
void Warn(std::string a_msg1, std::string a_msg2)
Wrapper for the g_msg Warn function.
Definition: Landscape.h:2250
Spider_Base::ReInit
void ReInit(int x, int y, Landscape *L, Spider_Population_Manager *SpMan)
Reinitialise object code
Definition: Spider_BaseClasses.cpp:136
Spider_Base::GetPosMapPositive
virtual bool GetPosMapPositive(unsigned x, unsigned y, unsigned range)
Returns whether there are any non-zero values within range of this coordinate (TL corner)
Definition: Spider_BaseClasses.cpp:155
TAnimal::m_Location_x
int m_Location_x
The objects ALMaSS x coordinate.
Definition: PopulationManager.h:362
Spider_Base::ClearPosMap
virtual void ClearPosMap(unsigned x, unsigned y)
Clears a PosMap location
Definition: Spider_BaseClasses.cpp:165
tosps_JBalloon
Definition: Spider_BaseClasses.h:79
ppp_1
Definition: LandscapeFarmingEnums.h:1079
cfg_ExtraCompetionMortality
static CfgInt cfg_ExtraCompetionMortality("SPID_EXTRACOMPETITIONMORTALITY", CFG_CUSTOM, 10)
cfg_SpiderJuvPPPThreshold
static CfgFloat cfg_SpiderJuvPPPThreshold("SPID_JUVPPPTHRESHOLD", CFG_CUSTOM, 99999.9, 0.0, 100000)
PPP effects threshold.