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
Bembidion_Adult Class Referencefinal

#include <Bembidion_All.h>

Inheritance diagram for Bembidion_Adult:
Beetle_Adult Beetle_Base TAnimal TALMaSSObject

Public Member Functions

 Bembidion_Adult (int a_x, int a_y, Landscape *a_l_ptr, Bembidion_Population_Manager *a_bpm_ptr)
 constructor for Bembidion adult
More...
 
- Public Member Functions inherited from Beetle_Adult
 Beetle_Adult (int a_x, int a_y, Landscape *a_l_ptr, Beetle_Population_Manager *a_bpm_ptr)
 
void ReInit (int a_x, int a_y, Landscape *a_l_ptr, Beetle_Population_Manager *a_bpm_ptr) override
 ReInit for object pool. More...
 
void Step () override
 Adult Step. More...
 
void BeginStep () override
 Adult BeginStep. More...
 
void EndStep () override
 Adult EndStep. More...
 
void SetCanReproduce (const bool a_param)
 set the ability to reproduce to the value given as an agrument More...
 
double GetStriglingMortality () const override
 Mortality by mechanincal weeding. More...
 
double GetSoilCultivationMortality () const override
 the method overrides the method that returns the mortality due to soil cultivation More...
 
double GetInsecticideApplication () const override
 the method overrides the method that returns the mortality due to insecticide application More...
 
double GetHarvestMortality () const override
 the method overrides the method that returns the mortality due to harvest More...
 
- Public Member Functions inherited from Beetle_Base
 Beetle_Base (int a_x, int a_y, Landscape *a_l_ptr, Beetle_Population_Manager *a_bpm_ptr)
 Beetle_Base Constructor. More...
 
virtual void SetState (const TTypesOfBeetleState a_state)
 Used to force a beetle state (e.g. at start of the simulation) More...
 
virtual void StDie ()
 Common state Die. More...
 
void CopyMyself (int a_beetle)
 For experimental purposes. More...
 
virtual bool GetDensityDependentMortality ()
 The density dependent mortality calculation (cannibalism) defaults to none. More...
 
void KillAndRemoveFromMap ()
 Kills the beetle - this version forces the beetle to re-enter the Step code and call st_Dying. More...
 
void IncDensity (int a_x, int a_y, int a_lifestage)
 The method inreases the number of beetles in this specific location by one. Used when called by a beetle of different lifestage than the one incremented. More...
 
void DecDensity (int a_x, int a_y)
 The method decreases the number of beetles in this specific location by one. More...
 
void KillOneInMap (int a_x, int a_y, int a_lifestage)
 The method decreases the number of beetles in this specific location by one. More...
 
void IncDensity (const int a_x, const int a_y)
 The method inreases the number of beetles in this specific location by one. More...
 
void DecDensity (const int a_x, const int a_y, const int a_lifestage)
 The method decreases the number of beetles in this specific location by one. Used when called by a beetle of different lifestage than the one dying. More...
 
int GetDensity (int a_x, int a_y) const
 The method to return the number of beetles in this specific location. More...
 
int GetDensityRange (int a_x, int a_y, int a_range) const
 The method to return the number of beetles in this specific location with a range. More...
 
int GetDensityRangeEdge (int a_x, int a_y, int a_range) const
 The method to return the number of beetles in this specific location with a range. More...
 
virtual double GetDevelopmentConstants (const int a_i) const
 the method returns the larvae development constant to be used in day degrees calculation More...
 
int WhatState () override
 Return the beetle state as an integer. 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 KillThis ()
 Sets all parameters ready for object destruction. 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...
 

Protected Member Functions

bool WinterMort () const override
 The method for calculating overwintering mortality. More...
 
TTypesOfBeetleState CheckDormancy () override
 Override for standard beetle CheckDormancy due to death test. More...
 
TTypesOfBeetleState St_Hibernate () override
 Override for state hibernate for Bembidion. More...
 
void CheckReproduction () override
 Starts reproduction when ready. More...
 
- Protected Member Functions inherited from Beetle_Adult
void InternalPesticideHandlingAndResponse () override
 Handle pesticide events code for the beetle. More...
 
double GetDailyMortalityRate () const override
 the override of the function that returns the background mortality rate More...
 
void Init ()
 Intitialise attribute values. More...
 
virtual TTypesOfBeetleState St_Forage ()
 Foraging behaviour. More...
 
virtual TTypesOfBeetleState St_Aggregate ()
 Aggregation behaviour. More...
 
virtual bool CheckDormancyExit ()
 Hibernation breaking check (override likely in descendent classes) More...
 
virtual TTypesOfBeetleState St_Dispersal ()
 Intiate Dispersal behaviour. More...
 
virtual TTypesOfBeetleState Ageing ()
 Daily ageing. More...
 
bool DDepMort () const
 Density-dependent mortality. More...
 
void MoveToWithPlacesList (int a_dist)
 Moves attempting egg laying under way. More...
 
virtual int MoveTo_Quality_Assess ()
 Moves w.r.t. habitat quality only. More...
 
TTypesOfBeetleState MoveToNoList (int a_dist)
 Moves using a stopping rule for hibernation. More...
 
virtual void Reproduce (int a_x, int a_y)
 Produces the eggs. More...
 
virtual void TryToReproduce ()
 Does reproduction if possible. More...
 
virtual void Turning ()
 Turning returns a direction to move in next step. More...
 
virtual void TurningForced ()
 Turning returns a direction to move in next step. More...
 
void TurningRandom ()
 Turning returns a direction to move in next step chosen randomly from 8 possibles (0-7) More...
 
virtual int GetDistanceToMove ()
 Inline function to get the distance moved today. More...
 
virtual bool IsSuitableForHibernation (TTypesOfVegetation)
 Support function: Checking that the tole is suitable for hibernation. More...
 
virtual bool IsReproductionLandscape (TTypesOfLandscapeElement tole)
 Support function: Checking if it is the reproduction landscape. More...
 
virtual bool IsHalfReproductionLandscape (TTypesOfLandscapeElement tole)
 Support function: Checking if it is the half-reproduction landscape. More...
 
bool GetCanReproduce () const
 returns the value of the flag that indicates the beetles that can reproduce More...
 
int GetStartAggregationDayProb () const
 return the aggregation start day probability More...
 
bool CheckForDispersal ()
 the method that checks for the dispersal More...
 
void IncNegDegrees ()
 the method that keeps track of the negative day degrees (negative day degrees cause mortality) More...
 
- Protected Member Functions inherited from Beetle_Base
virtual void Init (Beetle_Population_Manager *a_bpm_ptr)
 Init for a beetle object. More...
 
bool OnFarmEvent (FarmToDo event) override
 the farming event mortality. This is the function that is used for all the beetles. It calls methods that are re-defined by object and by method. More...
 
virtual bool CheckManagementBeetle ()
 
virtual double TempRelatedMortality ()
 Basic movement for beetle. More...
 
virtual int GetDDepthRange () const
 range at which density dependent mortality is applied - base class does not override, but others might need to More...
 
void Beetle_1M_Move (int a_dist)
 The function that calculates the cumulative probability for the movement direction. It calls the movement factor method and processes ints result to adjust "p" (by reference) More...
 
virtual bool IsLocationAllowed (int x, int y)
 
virtual double GetShortRangeDistance () const
 returns the length of the short range hop
More...
 
virtual double MovementFactor (int x, int y, int x1, int y1)
 function that calculates the factor that is taken into account when considering the movement of the individual More...
 
virtual bool DailyMortality ()
 Checks daily mortality returns true on death, default, no death. More...
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Beetle_Adult
static void SetAdultPPPElimRate (const double a_rate)
 Set body PPP eliminatation rate. More...
 
static void SetAdultPppThreshold (const double a_thresh)
 Set body PPP threshold. More...
 
static void SetAdultPppEffectProb (const double a_conc)
 Set body PPP effect probability. More...
 
static void SetAdultPppEffectProbDecay (const double a_decay)
 Set body PPP effect probability. More...
 
static void SetAdult_SoilCultivationMortality (const double a_value)
 Set adult soil mortality parameter. More...
 
static void SetAdult_InsecticideApplication (const double a_value)
 Set Insecticide mortality parameter. More...
 
static void SetAdult_StriglingMort (const double a_value)
 Set the mechanical weeding mortality parameter. More...
 
static void SetAdult_HarvestMort (const double a_value)
 Set the harvest parameter. More...
 
static void SetInFieldHibernateChance (const double a_value)
 
static void SetAdultMaxMoveDist (const int a_value)
 Set the max move distance for dispersal. More...
 
static void SetAdultMovementTempThreshold (const double a_value)
 Set the temperature threshold for movement. More...
 
static void SetAdultTurnRate (const double a_value)
 
static void SetStartAggregatingDay (const int a_value)
 
static void SetStartAggregatingDayProb (const int a_value)
 
static void SetStopAggregationDay (const int a_value)
 
static void SetDailyAdultMort (const double a_value)
 Set the daily fixed mortality probability. More...
 
static void SetAdultDenDepMort0 (const int a_value)
 Storage for density-dependent mortality parameter. More...
 
static void SetAdultDenDepMort1 (const double a_value)
 Set density-dependent mortality parameter. More...
 
static void SetDispersalThreshold (const double a_value)
 Set the adult dispersal temp threshold for DD calcuation. More...
 
static void SetTodaysEggProduction (const int a_value)
 Daily temperature determined egg production. More...
 
static void SetStartReproductionDay (const int a_value)
 
static void SetDailyStartReproductionChance (const double a_value)
 
- Static Public Member Functions inherited from Beetle_Base
static int GetDensityStage (int a_x, int a_y, unsigned a_stage)
 The method to return the number of beetles in this specific location for a given stage. More...
 
static int GetDensityStages (int a_x, int a_y, int a_numberstageStart, int a_numberstangeEnd)
 The method to return the number of beetles in this specific location, summing multiple stages. More...
 
static int GetDensityRangeStages (int a_x, int a_y, int a_range, int a_numberstageStart, int a_numberstangeEnd)
 The method to return the number of beetles in this specific location with a range, summing multiple stages. More...
 
static void SetDevelopmentConstants (const std::vector< double > &a_value)
 Set the day degree constant. More...
 
static void SetTodaysTempCategory (int a_category)
 Set the soil temperature category used for calculatiung mortality steps. More...
 
static void SetMoveDistribution (const string &a_type_str, const string &a_args_str)
 Set the movement distribution. More...
 
static void SetBeetleSuitableForHibernation (const TTovList &a_list)
 Set the list of tovs that are suitable for hibernation. More...
 
static void SetBeetleReproductionLandscape (const TToleList &a_list)
 Set the list of toles that the beetles are allowed to reproduce upon. More...
 
static void SetBeetleHalfReproductionLandscape (const TToleList &a_list)
 Set the list of toles that the beetles are allowed to reproduce upon, but that yield half of normal fertility (bembidion) More...
 
static void SetDipsersalDayDegrees (const int a_value)
 
static void SetMaxShortRangeAttempts (const int a_value)
 
static void SetDDepRange (const int a_value)
 Set density-dependent range parameter. More...
 
static void SizeBeetleMap (const int a_value)
 Size the lifestage map. More...
 
static void SetBeetleMap (const int a_value, SimplePositionMapInt *a_map_ptr)
 Set lifestage map. More...
 
static int ChooseDirection (const double(&a_probabilities)[8])
 The function that draws the random number and checks in which interval in the probabilities vector are we This would be the direction the beetle will take. More...
 
- 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...
 
- Static Public Attributes inherited from Beetle_Base
static vector< SimplePositionMapInt * > m_BeetleMaps = {}
 A list of pointers to the specific map for a beetle lifestage. More...
 
- Protected Attributes inherited from Beetle_Adult
double m_negDegrees {-1}
 The number of negative day degrees experienced. More...
 
double m_HibernateDegrees {-1}
 The number of day degrees experienced in the spring which may trigger dispersal. More...
 
unsigned int m_OldDirection {0}
 The last direction moved. More...
 
int m_EggCounter {-1}
 The number of eggs produced. More...
 
vector< PointDirectionm_plList {}
 A helper attribute when simulating movement. More...
 
PointDirection m_plPoint
 A helper attribute when simulating movement. More...
 
bool m_CanReproduce_bool {false}
 Signal reproductive readiness. More...
 
- Protected Attributes inherited from Beetle_Base
TTypesOfBeetleState m_CurrentBState { tobs_Initiation }
 Current behavioural state. More...
 
Beetle_Population_Managerm_OurPopulation { nullptr }
 Pointer to the population manager. More...
 
double m_BodyBurden { -1.0 }
 Current body burden of pesticide. More...
 
double m_CurrentPppEffectProb { -1.0 }
 Current effect probability. More...
 
unsigned m_Lifestage { 0 }
 This is a useful parameter holding the beetle type (this includes larval stages) 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...
 
- Static Protected Attributes inherited from Beetle_Adult
static double m_InFieldHibernateChance = 0.25
 The chance that a beetle might hibernate in non-grassy areas (open field) More...
 
static int m_AdultMaxMoveDist = -1
 holds the max move distance for dispersal More...
 
static double m_AdultMovementTempThreshold = 1
 holds the temperature threshold for movement More...
 
static double m_AdultTurnRate = 0.80
 
static int m_StartAggregatingDay = 270
 
static int m_StartAggregatingDayProb = 260
 
static int m_StopAggregationDay = 280
 
static double m_DailyAdultMort = 0.001
 Daily fixed mortality probability. More...
 
static int m_AdultDenDepMort0 = 0
 Storage for density-dependent mortality parameter. More...
 
static double m_AdultDenDepMort1 = 0.0
 Storage for density-dependent mortality parameter. More...
 
static int m_TodaysEggProduction = 0
 Daily temperature determined egg production. More...
 
static double m_AdultSoilCultivationMortality_ = 0.0
 The adult soil mortality parameter. More...
 
static double m_AdultHarvestMort = 0.0
 The adult harvest mortality parameter. More...
 
static double m_AdultStriglingMort_ = 0.0
 The adult strigling mortality parameter. More...
 
static double m_AdultInsecticideApplication_ = 0.0
 The Insecticide mortality parameter. More...
 
static double m_BeetleAdultPppElimRate = 0.0
 the daily elimination rate for pesticides More...
 
static double m_BeetleAdultPppThreshold = 0.0
 PPP effects threshold. More...
 
static double m_BeetleAdultPppEffectProb = 0.0
 Effect probability on threshold excedence. More...
 
static double m_BeetleAdultPppEffectProbDecay = 0.0
 Effect probability for delayed effects on threshold excedence. More...
 
static double m_AdultDispersalThreshold = 6.0
 Adult dispersal temp threshold for DD calcuation. More...
 
static int m_StartReproductionDay = 0
 
static double m_DailyStartReproductionChance = 0
 
- Static Protected Attributes inherited from Beetle_Base
static vector< double > m_DevelopmentConstants = {}
 Day degree constant, the target to reach before next stage. More...
 
static std::unique_ptr< probability_distributionm_Move_distribution = nullptr
 Probabilty of adult movement by distance to be defined by the probability type and parameters. More...
 
static TTovList m_BeetleSuitableForHibernation = {tov_Undefined}
 the list of tovs that are suitable for hibernation More...
 
static TToleList m_BeetleReproductionLandscape = {tole_Foobar}
 the list of toles that the beetles are allowed to reproduce upon More...
 
static TToleList m_BeetleHalfReproductionLandscape = {tole_Foobar}
 the list of toles that the beetles are allowed to reproduce upon, but that yield half of normal fertility (bembidion) More...
 
static int m_DipsersalDayDegrees = 8
 
static int m_DDepRange = 3
 The depth of the surrounding cells for density dependence calculations in adults. More...
 
static int m_MaxShortRangeAttempts = 1
 The number of tries allowed to find a short range legal move. More...
 
static int m_TodaysTempCategory = 0
 Set the soiltemperature category used for calculatiung mortality steps. More...
 
- 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...
 

Constructor & Destructor Documentation

◆ Bembidion_Adult()

Bembidion_Adult::Bembidion_Adult ( int  a_x,
int  a_y,
Landscape a_l_ptr,
Bembidion_Population_Manager a_bpm_ptr 
)

constructor for Bembidion adult

134  :Beetle_Base(a_x, a_y, a_l_ptr, static_cast<Beetle_Population_Manager*>(a_bpm_ptr)), Beetle_Adult(
135  a_x, a_y, a_l_ptr, static_cast<Beetle_Population_Manager*>(a_bpm_ptr)) {
136 }

Member Function Documentation

◆ CheckDormancy()

TTypesOfBeetleState Bembidion_Adult::CheckDormancy ( )
overrideprotectedvirtual

Override for standard beetle CheckDormancy due to death test.

Reimplemented from Beetle_Adult.

150  {
151  if (m_EggCounter < 0) return tobs_BDying;
153  // We are post start aggregating date...
155  {
156  // Stop laying eggs now
158  {
159  // must be from last year so kill it
160  return tobs_BDying;
161  }
162  return tobs_Aggregating; // start aggregating
163  }
164  return m_CurrentBState;
165 }

References g_random_fnc(), Beetle_Adult::GetStartAggregationDayProb(), Beetle_Adult::m_CanReproduce_bool, Beetle_Base::m_CurrentBState, TAnimal::m_DayInYear, Beetle_Adult::m_EggCounter, Beetle_Adult::m_StartAggregatingDay, tobs_Aggregating, and tobs_BDying.

◆ CheckReproduction()

void Bembidion_Adult::CheckReproduction ( )
inlineoverrideprotectedvirtual

Starts reproduction when ready.

Reimplemented from Beetle_Adult.

157  {
158  } // This has to compile to do nothing

◆ St_Hibernate()

TTypesOfBeetleState Bembidion_Adult::St_Hibernate ( )
overrideprotectedvirtual

Override for state hibernate for Bembidion.

Accumulates day degrees from the beginning of the year and starts dispersal when the sum exceeds a threshold or at the beginning of March.
At the end of hibernation the beetle is allowed to reproduce via the m_CanReproduce_bool attribute.

This is the function that describes possibilities of moving to other stage after the hibernation. Currently (as in Bembidion) the only possibilities are: 0 Hibernation 1 Dispersal 2 Death However generally it can include checks for different types of behaviour.

Reimplemented from Beetle_Adult.

173  {
183  if (m_DayInYear == 0) m_HibernateDegrees = 0;
185  if (CheckForDispersal())
186  {
187  // If we pass the check for dispersal then we need to decide if we died over winter
188  // This can be done now because we have the winter temperatures experienced (although it could be done when entering by
189  // looking forward it time instead.
190  if (WinterMort()) return tobs_BDying;
191  // die - a once only test - must be overridden in the descendent classes (pure virtual in the base class)
192  m_CanReproduce_bool = true; //Can only reproduce after hibernating else too young
193  m_EggCounter = cfg_BeetleTotalNoEggs.value(); // start the egg production counter
194  return tobs_Dispersing; // dispersing
195  }
196  if (m_DayInYear > cfg_BeetleHibernationEndDay.value() && m_DayInYear < m_StartAggregatingDay) return tobs_BDying; //too late to wake up, die
197  return m_CurrentBState; // still hibernating
198 }

References cfg_BeetleHibernationEndDay, cfg_BeetleTotalNoEggs, Beetle_Adult::CheckForDispersal(), Beetle_Adult::m_AdultDispersalThreshold, Beetle_Adult::m_CanReproduce_bool, Beetle_Base::m_CurrentBState, TAnimal::m_DayInYear, Beetle_Adult::m_EggCounter, Beetle_Adult::m_HibernateDegrees, Beetle_Adult::m_StartAggregatingDay, TAnimal::m_TemperatureToday, tobs_BDying, tobs_Dispersing, CfgInt::value(), and WinterMort().

◆ WinterMort()

bool Bembidion_Adult::WinterMort ( ) const
overrideprotectedvirtual

The method for calculating overwintering mortality.

Implements Beetle_Adult.

138  {
139  // Beetles are immobile during winter so only call this once at the
140  // end of overwintering
141  double mortchance = 0.1; // max 90% mortality
142  if (m_negDegrees > -40) { mortchance = 0.94925 + m_negDegrees * 0.00426; }
143  else if (m_negDegrees > -80) { mortchance = 1.16913 + m_negDegrees * 0.01149; }
144  else if (m_negDegrees > -107) { mortchance = 0.6665 + m_negDegrees * 0.00528; }
145  if (g_random_fnc(1000) < (1 - mortchance) * 1000) return true; // die
146  return false;
147 }

References g_random_fnc(), and Beetle_Adult::m_negDegrees.

Referenced by St_Hibernate().


The documentation for this class was generated from the following files:
tobs_Aggregating
Definition: Beetle_BaseClasses.h:69
cfg_BeetleTotalNoEggs
CfgInt cfg_BeetleTotalNoEggs
The maximum number of eggs a beetle can produce.
Beetle_Adult::m_StartAggregatingDay
static int m_StartAggregatingDay
Definition: Beetle_BaseClasses.h:887
Beetle_Adult::m_EggCounter
int m_EggCounter
The number of eggs produced.
Definition: Beetle_BaseClasses.h:876
TAnimal::m_DayInYear
static int m_DayInYear
A holder for the day in year shared with all TAnimal objects.
Definition: PopulationManager.h:358
Beetle_Adult::CheckForDispersal
bool CheckForDispersal()
the method that checks for the dispersal
Definition: Beetle_BaseClasses.cpp:974
Beetle_Adult::m_HibernateDegrees
double m_HibernateDegrees
The number of day degrees experienced in the spring which may trigger dispersal.
Definition: Beetle_BaseClasses.h:871
Beetle_Adult::m_negDegrees
double m_negDegrees
The number of negative day degrees experienced.
Definition: Beetle_BaseClasses.h:869
cfg_BeetleHibernationEndDay
CfgInt cfg_BeetleHibernationEndDay
The latest day in a year for beetle to wake up from habination.
Beetle_Adult::m_CanReproduce_bool
bool m_CanReproduce_bool
Signal reproductive readiness.
Definition: Beetle_BaseClasses.h:969
Beetle_Adult::Beetle_Adult
Beetle_Adult(int a_x, int a_y, Landscape *a_l_ptr, Beetle_Population_Manager *a_bpm_ptr)
Definition: Beetle_BaseClasses.cpp:893
Beetle_Adult::m_AdultDispersalThreshold
static double m_AdultDispersalThreshold
Adult dispersal temp threshold for DD calcuation.
Definition: Beetle_BaseClasses.h:921
CfgInt::value
int value() const
Definition: Configurator.h:116
Beetle_Base::Beetle_Base
Beetle_Base(int a_x, int a_y, Landscape *a_l_ptr, Beetle_Population_Manager *a_bpm_ptr)
Beetle_Base Constructor.
Definition: Beetle_BaseClasses.cpp:291
Beetle_Base::m_CurrentBState
TTypesOfBeetleState m_CurrentBState
Current behavioural state.
Definition: Beetle_BaseClasses.h:158
TAnimal::m_TemperatureToday
static double m_TemperatureToday
A holder for the temperature today shared with all TAnimal objects.
Definition: PopulationManager.h:354
tobs_Dispersing
Definition: Beetle_BaseClasses.h:71
Bembidion_Adult::WinterMort
bool WinterMort() const override
The method for calculating overwintering mortality.
Definition: Bembidion_All.cpp:138
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
Beetle_Adult::GetStartAggregationDayProb
int GetStartAggregationDayProb() const
return the aggregation start day probability
Definition: Beetle_BaseClasses.cpp:903
tobs_BDying
Definition: Beetle_BaseClasses.h:73