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

Class for beetle larval stage 2, most functionality is in Beetle_Larvae. More...

#include <PoecilusCupreus_All.h>

Inheritance diagram for PoecilusCupreus_Larvae2:
PoecilusCupreus_Larvae1 Beetle_Larvae Beetle_Base TAnimal TALMaSSObject PoecilusCupreus_Larvae3

Public Member Functions

 PoecilusCupreus_Larvae2 (int a_x, int a_y, Landscape *a_l_ptr, PoecilusCupreus_Population_Manager *a_bpm_ptr)
 constructor for Larvae2
More...
 
void ReInit (int a_x, int a_y, Landscape *a_l_ptr, PoecilusCupreus_Population_Manager *a_bpm_ptr) override
 ReInit for object pool. More...
 
- Public Member Functions inherited from PoecilusCupreus_Larvae1
 PoecilusCupreus_Larvae1 (int a_x, int a_y, Landscape *a_l_ptr, PoecilusCupreus_Population_Manager *a_bpm_ptr)
 constructor for Larvae1
More...
 
- Public Member Functions inherited from Beetle_Larvae
 Beetle_Larvae (int a_x, int a_y, Landscape *a_l_ptr, Beetle_Population_Manager *a_bpm_ptr)
 constructor for Larvae
More...
 
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 BeginStep () override
 Larvae class BeginStep code. More...
 
void Step () override
 Larvae Step code. More...
 
void EndStep () override
 Larvae EndStep code. More...
 
bool getDevelopment () const
 The larval development calculation. More...
 
bool GetDensityDependentMortality () override
 The larval density depenend mortality calculation (cannibalism) More...
 
double GetStriglingMortality () const override
 Mortality by mechanical weeding - method override specific to larvae. More...
 
double GetSoilCultivationMortality () const override
 The method overrides the base class method that returns the mortality due to soil cultivation. More...
 
double GetInsecticideApplication () const override
 The method overrides the base class method that returns the mortality due to insecticide application. More...
 
double GetHarvestMortality () const override
 The method overrides the base class 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...
 
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from Beetle_Larvae
static double GetLarvalPPPElimRate ()
 Kill this larva. More...
 
static double GetLPPPThreshold ()
 
static double GetLPPPEffectProb ()
 
static double GetLPPPEffectProbDecay ()
 
static void SetLarva_SoilCultivationMortality (const double a_value)
 Set Larval soil mortality parameter. More...
 
static void SetLarva_InsecticideApplication (const double a_value)
 Set Larval insecticide mortality parameter. More...
 
static void SetLarvalPPPElimRate (const double a_rate)
 
static void SetLPPPThreshold (const double a_thresh)
 
static void SetLPPPEffectProb (const double a_conc)
 
static void SetLPPPEffectProbDecay (const double a_decay)
 
static void SetLDDepMort0 (const int a_value)
 Storage for density-dependent mortality parameter. More...
 
static void SetLDDepMort1 (const double a_value)
 Storage for density-dependent mortality parameter. More...
 
static void SetDailyLarvaMort (const double a_value)
 Set the daily fixed mortality probability. More...
 
static void SetLarvalDailyMort (const vector< double > &a_value, const int a_numLarvalStages, const int a_catagories)
 Set the daily fixed mortality probability based on the larval stages and temperature. More...
 
static void SetLarva_StriglingMort (const double a_value)
 Set mechanical weeding mortality parameter. More...
 
static void SetLarva_HarvestMort (const double a_value)
 Set harvest mortality parameter. More...
 
- 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 Member Functions inherited from Beetle_Larvae
void InternalPesticideHandlingAndResponse () override
 Handle pesticide events code for the beetle. More...
 
int getLarvalStage () const
 the method returns the larval stage (instar) number More...
 
virtual TTypesOfBeetleState St_Develop ()
 Larvae state development. More...
 
virtual TTypesOfBeetleState St_NextStage ()
 Larvae state pupation. More...
 
double TempRelatedMortality () const
 Determine larval temperature related 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...
 
virtual double GetDailyMortalityRate () const
 method returns the rate of the background mortality More...
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 
- Static Protected Member Functions inherited from Beetle_Larvae
static double GetLarvaTDailyMortality (const int a_st, const int a_t)
 returns temp-related daily mortality rate More...
 
- Protected Attributes inherited from Beetle_Larvae
double m_AgeDegrees = {0}
 Record larvae day degrees. More...
 
int m_DayMade = { 0 }
 
int m_LarvalStage = {0}
 Current larval growth stage (1-3), used as a small speed hack. 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_Larvae
static double m_DailyLarvaeMort = 0.001
 Daily fixed mortality probability. More...
 
static std::vector< std::vector< double > > m_LarvalDailyTMort
 Daily fixed mortality probability based on three larval stages and temperature. More...
 
static int m_LDDepMort0 = 0
 Storage for density-dependent mortality parameter. More...
 
static double m_LDDepMort1 = 0
 Storage for density-dependent mortality parameter. More...
 
static double m_Larva_SoilCultivationMortality = 0
 The larva soil mortality parameter. More...
 
static double m_Larva_HarvestMort = 0
 The larva harvest mortality parameter. More...
 
static double m_Larva_StriglingMort = 0
 The larva strigling mortality parameter. More...
 
static double m_Larva_InsecticideApplication = 0
 The larva nsecticide mortality parameter. More...
 
static double m_BeetleLarvalPPPElimRate = 0
 the daily elimination rate for pesticides More...
 
static double m_BeetleLPPPThreshold = 0
 PPP effects threshold. More...
 
static double m_BeetleLPPPEffectProb = 0
 Effect probability on threshold excedence. More...
 
static double m_BeetleLPPPEffectProbDecay = 0
 Effect probability on threshold excedence. More...
 
- 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...
 

Detailed Description

Class for beetle larval stage 2, most functionality is in Beetle_Larvae.

Constructor & Destructor Documentation

◆ PoecilusCupreus_Larvae2()

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

constructor for Larvae2

204  : Beetle_Base(a_x, a_y, a_l_ptr, static_cast<Beetle_Population_Manager*>(a_bpm_ptr)),
205  PoecilusCupreus_Larvae1(a_x, a_y, a_l_ptr, a_bpm_ptr) {
207  m_LarvalStage = 1;
209 }

References Beetle_Population_Manager::AddStageProductionRecord(), bob_Larva2, Beetle_Larvae::m_LarvalStage, Beetle_Base::m_Lifestage, and Beetle_Base::m_OurPopulation.

Member Function Documentation

◆ ReInit()

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

The documentation for this class was generated from the following files:
Beetle_Population_Manager::AddStageProductionRecord
void AddStageProductionRecord(int a_value, int a_stage)
Adds to the stage production record attribute.
Definition: Beetle_BaseClasses.h:1146
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
Beetle_Base::m_OurPopulation
Beetle_Population_Manager * m_OurPopulation
Pointer to the population manager.
Definition: Beetle_BaseClasses.h:160
Beetle_Larvae::m_LarvalStage
int m_LarvalStage
Current larval growth stage (1-3), used as a small speed hack.
Definition: Beetle_BaseClasses.h:619
PoecilusCupreus_Larvae1::ReInit
virtual void ReInit(int a_x, int a_y, Landscape *a_l_ptr, PoecilusCupreus_Population_Manager *a_bpm_ptr)
ReInit for object pool.
Definition: PoecilusCupreus_All.cpp:192
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
PoecilusCupreus_Larvae1::PoecilusCupreus_Larvae1
PoecilusCupreus_Larvae1(int a_x, int a_y, Landscape *a_l_ptr, PoecilusCupreus_Population_Manager *a_bpm_ptr)
constructor for Larvae1
Definition: PoecilusCupreus_All.cpp:177
bob_Larva2
Definition: Beetle_BaseClasses.h:84