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

#include <PoecilusCupreus_All.h>

Inheritance diagram for PoecilusCupreus_Adult:
Beetle_Adult Beetle_Base TAnimal TALMaSSObject

Public Member Functions

 PoecilusCupreus_Adult (int a_x, int a_y, Landscape *a_l_ptr, PoecilusCupreus_Population_Manager *a_bpm_ptr)
 constructor for PoecilusCupreus adult
More...
 
void ReInit (int a_x, int a_y, Landscape *a_l_ptr, PoecilusCupreus_Population_Manager *a_bpm_ptr)
 ReInit for object pool. More...
 
bool WinterMort () const override
 The method for calculating overwintering mortality. 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...
 

Static Public Member Functions

static void SetEggFormationThreshold (double a_value)
 
static void SetPoecilusTempShadowThreshold (double a_value)
 Set the Temperature above which Poecilus will prefer open habitats. More...
 
static void SetPoecilusLaiCoverThreshold (double a_value)
 Set the minimum LAI considered cover. More...
 
- 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...
 

Protected Member Functions

TTypesOfBeetleState Ageing () override
 The daily ageing for a beetle. More...
 
TTypesOfBeetleState CheckDormancy () override
 Determines whether its time to hibernate. More...
 
bool CheckDormancyExit () override
 Determines whether its time to disperse. More...
 
void CheckReproduction () override
 Starts reproduction when ready. More...
 
int MoveTo_Quality_Assess () override
 Determines whether a move is OK, and the turning rate. More...
 
void TryToReproduce () override
 Does reproduction if possible. 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 TTypesOfBeetleState St_Hibernate ()
 Hibernation behaviour. More...
 
virtual TTypesOfBeetleState St_Dispersal ()
 Intiate Dispersal behaviour. More...
 
bool DDepMort () const
 Density-dependent mortality. More...
 
void MoveToWithPlacesList (int a_dist)
 Moves attempting egg laying under way. 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 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...
 

Protected Attributes

PoecilusCupreus_Population_Managerm_OurPopulation {nullptr}
 Pointer to the population manager. More...
 
double m_EggFormationProgress {0.0}
 A parameter that holds the value that determines when the first eggs are formed. More...
 
int m_FirstActiveDay {364}
 Remembers the first day of activity for egg formation calculation. More...
 
bool m_postOvi_bool { false }
 flag to shut down reproduction 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

static vector< double > m_DailyAdultMortalityWithSeason = {}
 
static double m_EggFormationThreshold = 0.0
 
static double m_PoecilusTempShadowThreshold = 0.0
 The Temperature above which Poecilus will prefer open habitats. More...
 
static double m_PoecilusTempMoveThreshold = 0.0
 The minimum temperature for movement. More...
 
static double m_PoecilusCoverThreshold = 0.0
 The minimum LAI considered cover. 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...
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ PoecilusCupreus_Adult()

PoecilusCupreus_Adult::PoecilusCupreus_Adult ( int  a_x,
int  a_y,
Landscape a_l_ptr,
PoecilusCupreus_Population_Manager a_bpm_ptr 
)

constructor for PoecilusCupreus adult

259  : Beetle_Base(
260  a_x, a_y, a_l_ptr, static_cast<Beetle_Population_Manager*>(a_bpm_ptr)),
261  Beetle_Adult(a_x, a_y, a_l_ptr, static_cast<Beetle_Population_Manager*>(a_bpm_ptr)), m_OurPopulation(a_bpm_ptr) {
262  // This assignment is needed because m_OurPopulation shadows the Beetle_Base attribute of the same name
263  m_OurPopulation = a_bpm_ptr;
264  m_AgeDays = 0;
265  m_FirstActiveDay = 364;
267 }

References Beetle_Population_Manager::AddStageProductionRecord(), TAnimal::m_AgeDays, m_FirstActiveDay, Beetle_Base::m_Lifestage, and m_OurPopulation.

Member Function Documentation

◆ Ageing()

TTypesOfBeetleState PoecilusCupreus_Adult::Ageing ( )
overrideprotectedvirtual

The daily ageing for a beetle.

/brief The daily ageing and mortaltiy state for Poecilus

Returns
The next beetle behaviour

Reimplemented from Beetle_Adult.

287  {
288  if (++m_AgeDays >= 365)
289  {
290  return tobs_BDying;
291  }
292  double postOviMort = 0.0;
294  {
295  m_postOvi_bool = true;
296  }
297  if (m_postOvi_bool) {
298  postOviMort = cfg_PoecilusPostOviMort.value();
299  }
300  if (g_rand_uni_fnc() < GetDailyMortalityRate()+ postOviMort)
301  {
302  return tobs_BDying;
303  } // go to die
304  return m_CurrentBState; // carry on
305 }

References cfg_PoecilusPostOviMort, g_rand_uni_fnc(), Beetle_Adult::GetDailyMortalityRate(), PoecilusCupreus_Population_Manager::GetOvipositionPeriodProgress(), TAnimal::m_AgeDays, Beetle_Base::m_CurrentBState, m_FirstActiveDay, m_OurPopulation, m_postOvi_bool, tobs_BDying, and CfgFloat::value().

◆ CheckDormancy()

TTypesOfBeetleState PoecilusCupreus_Adult::CheckDormancy ( )
overrideprotectedvirtual

Determines whether its time to hibernate.

Reimplemented from Beetle_Adult.

307  {
309  {
310  m_FirstActiveDay = 364; // Set to the last day of the year, so will never result in egg formation by accident
311  return tobs_Hibernating;
312  }
313  return m_CurrentBState;
314 }

References g_rand_uni_fnc(), PoecilusCupreus_Population_Manager::GetDormancyChance(), Beetle_Base::m_CurrentBState, m_FirstActiveDay, m_OurPopulation, and tobs_Hibernating.

◆ CheckDormancyExit()

bool PoecilusCupreus_Adult::CheckDormancyExit ( )
overrideprotectedvirtual

Determines whether its time to disperse.

Reimplemented from Beetle_Adult.

316  {
318  {
320  return true;
321  }
322  return false;
323 }

References g_rand_uni_fnc(), PoecilusCupreus_Population_Manager::GetDormancyExitChance(), TAnimal::m_DayInYear, m_FirstActiveDay, and m_OurPopulation.

◆ CheckReproduction()

void PoecilusCupreus_Adult::CheckReproduction ( )
overrideprotectedvirtual

◆ MoveTo_Quality_Assess()

int PoecilusCupreus_Adult::MoveTo_Quality_Assess ( )
overrideprotectedvirtual

Determines whether a move is OK, and the turning rate.

Used by MoveTo where movement is determined by the suitability of the habitat moved to. The Poecilus version uses a temperature vs vegetaton cover comparison to determine turning.

Reimplemented from Beetle_Adult.

336  {
341  const int qual = m_OurPopulation->m_MoveMap->GetMapValue(m_plPoint.m_x, m_plPoint.m_y);
342  // if it is 3 then don't go here
343  if ((qual == 2 && g_rand_uni_fnc() >= 0.40) || qual == 3)
344  {
345  TurningForced(); // ***CJT*** Todo replace 0.4 with static & parameter
346  }
347  // Special turning test for Poecilus. If LAI is low and its warm turn, if LAI is high, and its warm don't (& vice versa)
349  {
351  }
353  return qual;
354 }

References g_rand_uni_fnc(), Beetle_Population_Manager::m_MoveMap, TAnimal::m_OurLandscape, m_OurPopulation, Beetle_Adult::m_plPoint, m_PoecilusCoverThreshold, m_PoecilusTempShadowThreshold, TAnimal::m_TemperatureToday, PointDirection::m_x, PointDirection::m_y, Landscape::SupplyVegCover(), and Beetle_Adult::TurningForced().

◆ ReInit()

void PoecilusCupreus_Adult::ReInit ( int  a_x,
int  a_y,
Landscape a_l_ptr,
PoecilusCupreus_Population_Manager a_bpm_ptr 
)

ReInit for object pool.

271  {
272  Beetle_Adult::ReInit(a_x, a_y, a_l_ptr, a_bpm_ptr);
273  m_OurPopulation = a_bpm_ptr;
274  // This assignment is needed because m_OurPopulation shadows the Beetle_Base attribute of the same name
275  m_AgeDays = 0;
276  m_FirstActiveDay = 364;
278  m_postOvi_bool = false;
279 }

References Beetle_Population_Manager::AddStageProductionRecord(), TAnimal::m_AgeDays, m_FirstActiveDay, Beetle_Base::m_Lifestage, m_OurPopulation, m_postOvi_bool, and Beetle_Adult::ReInit().

◆ SetEggFormationThreshold()

static void PoecilusCupreus_Adult::SetEggFormationThreshold ( double  a_value)
inlinestatic

/brief Set the threshold sum for completion of egg formation

196 { m_EggFormationThreshold = a_value; }

References m_EggFormationThreshold.

Referenced by PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager().

◆ SetPoecilusLaiCoverThreshold()

static void PoecilusCupreus_Adult::SetPoecilusLaiCoverThreshold ( double  a_value)
inlinestatic

Set the minimum LAI considered cover.

200 { m_PoecilusCoverThreshold = a_value; }

References m_PoecilusCoverThreshold.

Referenced by PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager().

◆ SetPoecilusTempShadowThreshold()

static void PoecilusCupreus_Adult::SetPoecilusTempShadowThreshold ( double  a_value)
inlinestatic

Set the Temperature above which Poecilus will prefer open habitats.

198 { m_PoecilusTempShadowThreshold = a_value; }

References m_PoecilusTempShadowThreshold.

Referenced by PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager().

◆ TryToReproduce()

void PoecilusCupreus_Adult::TryToReproduce ( )
inlineoverrideprotectedvirtual

Does reproduction if possible.

Reimplemented from Beetle_Adult.

182  {
183  if (m_postOvi_bool) return;
185  }

References m_postOvi_bool, and Beetle_Adult::TryToReproduce().

◆ WinterMort()

bool PoecilusCupreus_Adult::WinterMort ( ) const
inlineoverridevirtual

The method for calculating overwintering mortality.

Implements Beetle_Adult.

193 { return false; }

Member Data Documentation

◆ m_DailyAdultMortalityWithSeason

vector< double > PoecilusCupreus_Adult::m_DailyAdultMortalityWithSeason = {}
staticprotected

/brief Daily probability of mortality with season age

◆ m_EggFormationProgress

double PoecilusCupreus_Adult::m_EggFormationProgress {0.0}
protected

A parameter that holds the value that determines when the first eggs are formed.

◆ m_EggFormationThreshold

double PoecilusCupreus_Adult::m_EggFormationThreshold = 0.0
staticprotected

/brief The threshold sum for completion of egg formation

Referenced by CheckReproduction(), and SetEggFormationThreshold().

◆ m_FirstActiveDay

int PoecilusCupreus_Adult::m_FirstActiveDay {364}
protected

Remembers the first day of activity for egg formation calculation.

Referenced by Ageing(), CheckDormancy(), CheckDormancyExit(), CheckReproduction(), PoecilusCupreus_Adult(), and ReInit().

◆ m_OurPopulation

PoecilusCupreus_Population_Manager* PoecilusCupreus_Adult::m_OurPopulation {nullptr}
protected

◆ m_PoecilusCoverThreshold

double PoecilusCupreus_Adult::m_PoecilusCoverThreshold = 0.0
staticprotected

The minimum LAI considered cover.

Referenced by MoveTo_Quality_Assess(), and SetPoecilusLaiCoverThreshold().

◆ m_PoecilusTempMoveThreshold

double PoecilusCupreus_Adult::m_PoecilusTempMoveThreshold = 0.0
staticprotected

The minimum temperature for movement.

◆ m_PoecilusTempShadowThreshold

double PoecilusCupreus_Adult::m_PoecilusTempShadowThreshold = 0.0
staticprotected

The Temperature above which Poecilus will prefer open habitats.

Referenced by MoveTo_Quality_Assess(), and SetPoecilusTempShadowThreshold().

◆ m_postOvi_bool

bool PoecilusCupreus_Adult::m_postOvi_bool { false }
protected

flag to shut down reproduction

Referenced by Ageing(), ReInit(), and TryToReproduce().


The documentation for this class was generated from the following files:
g_rand_uni_fnc
double g_rand_uni_fnc()
Definition: ALMaSS_Random.cpp:56
PoecilusCupreus_Population_Manager::GetDormancyChance
double GetDormancyChance() const
Get the daily chance to enter dormancy.
Definition: PoecilusCupreus_All.h:300
PoecilusCupreus_Adult::m_OurPopulation
PoecilusCupreus_Population_Manager * m_OurPopulation
Pointer to the population manager.
Definition: PoecilusCupreus_All.h:151
Beetle_Population_Manager::AddStageProductionRecord
void AddStageProductionRecord(int a_value, int a_stage)
Adds to the stage production record attribute.
Definition: Beetle_BaseClasses.h:1146
PoecilusCupreus_Adult::m_PoecilusCoverThreshold
static double m_PoecilusCoverThreshold
The minimum LAI considered cover.
Definition: PoecilusCupreus_All.h:168
Beetle_Adult::m_plPoint
PointDirection m_plPoint
A helper attribute when simulating movement.
Definition: Beetle_BaseClasses.h:911
PoecilusCupreus_Population_Manager::GetEggFormationProgress
double GetEggFormationProgress(int a_day) const
Returns the current progress towards egg formation based on a given date to become reproductively act...
Definition: PoecilusCupreus_All.h:282
CfgFloat::value
double value() const
Definition: Configurator.h:142
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::GetDailyMortalityRate
double GetDailyMortalityRate() const override
the override of the function that returns the background mortality rate
Definition: Beetle_BaseClasses.h:933
PoecilusCupreus_Adult::m_EggFormationThreshold
static double m_EggFormationThreshold
Definition: PoecilusCupreus_All.h:162
Beetle_Base::m_Lifestage
unsigned m_Lifestage
This is a useful parameter holding the beetle type (this includes larval stages)
Definition: Beetle_BaseClasses.h:166
PoecilusCupreus_Adult::m_PoecilusTempShadowThreshold
static double m_PoecilusTempShadowThreshold
The Temperature above which Poecilus will prefer open habitats.
Definition: PoecilusCupreus_All.h:164
Beetle_Adult::TurningForced
virtual void TurningForced()
Turning returns a direction to move in next step.
Definition: Beetle_BaseClasses.h:973
PointDirection::m_x
int m_x
Definition: Beetle_BaseClasses.h:98
TAnimal::m_OurLandscape
static Landscape * m_OurLandscape
A pointer to the landscape object shared with all TAnimal objects.
Definition: PopulationManager.h:342
PoecilusCupreus_Population_Manager::GetOvipositionPeriodProgress
double GetOvipositionPeriodProgress(int a_day) const
Returns the current progress towards ending the oviposition period based on the first active day.
Definition: PoecilusCupreus_All.h:284
PoecilusCupreus_Adult::m_postOvi_bool
bool m_postOvi_bool
flag to shut down reproduction
Definition: PoecilusCupreus_All.h:157
Beetle_Adult::m_CanReproduce_bool
bool m_CanReproduce_bool
Signal reproductive readiness.
Definition: Beetle_BaseClasses.h:969
TAnimal::m_AgeDays
int m_AgeDays
To hold the age in days.
Definition: PopulationManager.h:378
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::TryToReproduce
virtual void TryToReproduce()
Does reproduction if possible.
Definition: Beetle_BaseClasses.cpp:1250
Landscape::SupplyVegCover
double SupplyVegCover(int a_polyref)
Returns the vegetation cover proportion of the vegetation using the polygon reference number a_polyre...
Definition: Landscape.h:1667
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
cfg_PoecilusPostOviMort
static CfgFloat cfg_PoecilusPostOviMort("POECILUS_POSTOVIMORT", CFG_CUSTOM, 0.1)
tobs_BDying
Definition: Beetle_BaseClasses.h:73
Beetle_Population_Manager::m_MoveMap
std::unique_ptr< MovementMap > m_MoveMap
Map of suitability for movement.
Definition: Beetle_BaseClasses.h:1107
Beetle_Adult::ReInit
void ReInit(int a_x, int a_y, Landscape *a_l_ptr, Beetle_Population_Manager *a_bpm_ptr) override
ReInit for object pool.
Definition: Beetle_BaseClasses.cpp:898
PointDirection::m_y
int m_y
Definition: Beetle_BaseClasses.h:99
PoecilusCupreus_Adult::m_FirstActiveDay
int m_FirstActiveDay
Remembers the first day of activity for egg formation calculation.
Definition: PoecilusCupreus_All.h:155
PoecilusCupreus_Population_Manager::GetDormancyExitChance
double GetDormancyExitChance() const
Get the daily chance to exit dormancy.
Definition: PoecilusCupreus_All.h:302
tobs_Hibernating
Definition: Beetle_BaseClasses.h:70