ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <Ladybird_All.h>
Public Member Functions | |
Ladybird_Adult (int a_x, int a_y, Landscape *a_l_ptr, Ladybird_Population_Manager *a_lpm_ptr) | |
Ladybird adult constructor. More... | |
void | ReInit (int a_x, int a_y, Landscape *a_l_ptr, Ladybird_Population_Manager *a_lpm_ptr) |
ReInit for object pool. More... | |
void | BeginStep () override |
the standard begin step function as overridden by the ladybird adult More... | |
void | SetOverwintered (const bool a_value) |
sets the value of the state variable that flags that the beetle has overwintered More... | |
void | SetIsHibernating (const bool a_val) |
sets the value of the state variable that flags whether the beetle is currently hibernating More... | |
Public Member Functions inherited from Ladybird_Base | |
Ladybird_Base (Ladybird_Population_Manager *a_lpm_ptr) | |
Class constructor. More... | |
~Ladybird_Base () override=default | |
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... | |
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 | 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... | |
Static Public Member Functions | |
static void | SetOvipositionPeriod (const bool a_cond) |
static void | SetAphidsPerPreyLevel (const int a_value) |
static void | SetHibernationClumpeSizeDist (const vector< double > &a_dist) |
static void | SetOvipositionRateTemp (const vector< double > &a_dist) |
static void | SetBackgroundMortTemp (const vector< double > &a_vector) |
static void | SetShortRangeDistToday (const int a_value) |
Static Public Member Functions inherited from Ladybird_Base | |
static void | SetLadybirdStagesNutritionalValue (const vector< int > &a_list) |
Sets the list of aphid equivalents of each ladybird stage. 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 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) |
Protected Member Functions | |
double | GetExtremeTempMin () const |
returns the lower limit of bearable temperatures. below it the beetle will be subject to high mortality. More... | |
bool | WinterMort () const override |
The method for calculating overwintering mortality. More... | |
TTypesOfBeetleState | St_Aggregate () override |
Aggreagte function for the adult ladybird - moves them to hibernaculae. More... | |
TTypesOfBeetleState | St_Hibernate () override |
Hibernate function for the Adult. More... | |
TTypesOfBeetleState | St_Forage () override |
method that implements the foraging behaviour for adult beetles More... | |
TTypesOfBeetleState | St_Dispersal () override |
the ladybird adult's override of a dispersal beahviour More... | |
void | TryToReproduce () override |
Does reproduction if possible. More... | |
bool | LongRangeFind (int a_distance, int a_minimumflightlength, int a_target, bool(Ladybird_Adult::*a_func)(int, int, int)) |
The function to determine a landing location for long range movement for foraging or aggregating. More... | |
bool | FindTarget (int a_distance, int a_minimumflightlength, int a_target) |
The function to determine a landing location for long range movement for foraging or aggregating. More... | |
bool | ShouldStartAggregating () |
The method evaluates whether the beetle should start aggregation. More... | |
bool | IsProbhibited (int a_x, int a_y) const |
Tests for toles that are not allowed for movement to at x,y, location. More... | |
bool | IsAggregationSite (const int a_x, const int a_y, const int a_unused) |
Tests for toles that are aggregation types at x,y, location. More... | |
bool | IsForageSite (const int a_x, const int a_y, const int a_target) |
Tests for aphid densities at x,y. More... | |
void | setEggCounter (int num) |
sets the total to-lay egg counter to a value More... | |
void | decEggCounter (int num) |
decrements the total to-lay counter by value More... | |
int | getEggCounter () |
returns thetotal egg counter (how many eggs left to lay) More... | |
void | setDailyEggs (int num) |
sets daily eggs to-lay More... | |
void | decDailyEggs (int num) |
decrements daily eggs to-lay More... | |
Protected Member Functions inherited from Ladybird_Base | |
void | EatToday (const int a_add) |
Adds to the counter of eaten aphids. More... | |
virtual int | GetEatenToday () const |
return the value of daily aphid consumption counter More... | |
virtual void | SetEatenToday (int a) |
set the value of the counter of eaten aphids More... | |
int | GetAphidsToEat () |
return how many aphids are left to be eaten More... | |
virtual int | GetAphidsAppetite () |
The function returns the aphids appetite (virtual function stub: to be overridden) More... | |
virtual void | ResetAphidsAppetite () |
reset the appetite to zero More... | |
virtual int | EatAphids (int a_x, int a_y, int a_appetite) |
the method that is responsible for aphid foraging behaviour (removes the aphids from the aphid model) More... | |
int | Cannibalise (int a_appetite) |
Perform the cannibalisation behaviour from the perspective of a cannibal : receives the appetite to fulfill, returns how much is left to be eaten after an attempt to cannibalise. More... | |
virtual void | CalcAphidsAppetite () |
Calculates the appetite of aphids based on the age (Arshad et al, 2017) More... | |
bool | CanMove () |
returns true if the beetle can still move today More... | |
int | GetMaxDailyDistance () |
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 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 bool | CheckDormancyExit () |
Hibernation breaking check (override likely in descendent classes) More... | |
virtual TTypesOfBeetleState | CheckDormancy () |
Determines whether its time to hibernate. More... | |
virtual void | CheckReproduction () |
Starts reproduction when ready. 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 | 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 Attributes | |
int | m_EmergenceDay { 0 } |
The day of the year when this particular individual emerged, to be used to track minimum delay time between the emergence and oviposition. More... | |
bool | m_IsHibernating { false } |
State variable: true if hibernating. More... | |
bool | m_HasOverwintered { false } |
State variable: true if overwintered. More... | |
int | m_DailyEggs { 0 } |
The variables holding the amount of eggs to be laid today. More... | |
double | m_ADayDeg { 0 } |
day degrees sum for an individual More... | |
int | m_UnsuccessfulAphidsAttempts { 0 } |
The variable that holds the unsuccesful searches for aphids. More... | |
int | m_OviMaturation {0} |
Counter for ovi maturation. More... | |
int | m_HibernationClumpSize { 0 } |
Records the size of the hibernation clump. More... | |
Protected Attributes inherited from Ladybird_Base | |
int | m_EatenToday { 0 } |
number of aphids or aphid equivalents eaten today More... | |
int | m_WantToEatToday { 0 } |
number of ladybird larvae younger than this to eat in EndStep More... | |
int | m_AphidsAppetite { 0 } |
the today's appetite More... | |
int | m_MoveCounter { 0 } |
the counter of the steps made today More... | |
Ladybird_Population_Manager * | m_OurPopulationLadybird { nullptr } |
pointer to the population manager More... | |
Protected Attributes inherited from Beetle_Base | |
TTypesOfBeetleState | m_CurrentBState { tobs_Initiation } |
Current behavioural state. More... | |
Beetle_Population_Manager * | m_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... | |
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< PointDirection > | m_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... | |
Static Protected Attributes | |
static int | m_AphidsPerPreyLevel = 0 |
Speed storage for the prey level denominator. More... | |
static vector< double > | m_HibernationClumpeSizeDist = cfg_LadybirdHibernaculaeSizesDist.value() |
Holds the clump size distribution with density table. More... | |
static vector< double > | m_OvipositionRateTemp = cfg_LadybirdDailyOvipostionRateTemp.value() |
Oviposition rate per day under perfect food with temps 0-50 degrees. More... | |
static vector< double > | m_BackgroundMortTemp = {} |
Oviposition rate per day under perfect food with temps 0-50 degrees. More... | |
static int | m_ShortRangeDistToday = 0 |
Max distance moved in short range movements today (set by populaton manager each day) More... | |
static bool | m_OvipostionPeriod = false |
Static variable to flag when its possible to lay eggs. More... | |
Static Protected Attributes inherited from Ladybird_Base | |
static vector< int > | m_LadybirdStagesNutritionalValue = {} |
Holds the aphid equivalents of each ladybird stage. 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_distribution > | m_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 Landscape * | m_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... | |
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 |
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... | |
Static Protected Member Functions inherited from Ladybird_Base | |
static int | GetTempMortRange (double a_temp) |
returns the mortality range that corresponds to the temperature More... | |
Ladybird_Adult::Ladybird_Adult | ( | int | a_x, |
int | a_y, | ||
Landscape * | a_l_ptr, | ||
Ladybird_Population_Manager * | a_lpm_ptr | ||
) |
Ladybird adult constructor.
References cfg_LadybirdMinimumOviMaturation, cfg_LadybirdStartEggsNo, lobs_Adult, Beetle_Adult::m_CanReproduce_bool, Beetle_Adult::m_EggCounter, m_HasOverwintered, Beetle_Base::m_Lifestage, m_OviMaturation, and CfgInt::value().
|
overridevirtual |
the standard begin step function as overridden by the ladybird adult
Reimplemented from Beetle_Adult.
References cfg_LadybirdBackgroundMortalityAfterHibernation, cfg_LadybirdExtremeTempMortChance, cfg_LadybirdMeanDaysAfterHibernation, cfg_LadybirdStdDaysAfterHibernation, Beetle_Base::CheckManagementBeetle(), g_rand_uni_fnc(), GetExtremeTempMin(), TAnimal::m_AgeDays, Beetle_Base::m_CurrentBState, TAnimal::m_DayInYear, m_EmergenceDay, m_IsHibernating, Ladybird_Base::m_MoveCounter, TAnimal::m_TemperatureToday, tobs_BDying, and CfgFloat::value().
|
inlineprotected |
|
inlineprotected |
|
protected |
The function to determine a landing location for long range movement for foraging or aggregating.
a_distance | The maximum distance to move |
a_minimumflightlength | The minimum distance to move |
a_target | The target aphids needed if any |
Starting at the minumum move this checks locations along a vector for being a target place to move (aphids above minimum) If OK the position is changed.
References Beetle_Base::DecDensity(), g_random_fnc(), Ladybird_Population_Manager::GetAphidDensity(), Beetle_Base::IncDensity(), TAnimal::m_guard_cell_x, TAnimal::m_guard_cell_y, TAnimal::m_Location_x, TAnimal::m_Location_y, Ladybird_Base::m_OurPopulationLadybird, TAnimal::m_SimulationHeight, TAnimal::m_SimulationWidth, APoint::m_x, APoint::m_y, and Population_Manager::UpdateGuardMap().
Referenced by St_Dispersal(), and St_Forage().
|
inlineprotected |
|
protected |
returns the lower limit of bearable temperatures. below it the beetle will be subject to high mortality.
References cfg_Ladybird_SCP, cfg_LadybirdExtremeTempMinHibernatingFactor, m_IsHibernating, TAnimal::m_OurLandscape, Landscape::SupplyMonth(), CfgFloat::value(), and CfgArray_Double::value().
Referenced by BeginStep().
|
inlineprotected |
Tests for toles that are aggregation types at x,y, location.
a_x | x-coordinate |
a_y | y-coordinate |
a_unused | is to allow for compatability in a function pointer call |
References Ladybird_Population_Manager::m_LadybirdAggregationToles, TAnimal::m_OurLandscape, Ladybird_Base::m_OurPopulationLadybird, and Landscape::SupplyElementType().
Referenced by St_Aggregate().
|
inlineprotected |
Tests for aphid densities at x,y.
a_x | x-coordinate |
a_y | y-coordinate |
a_target | the threshold accepted |
References Ladybird_Population_Manager::GetAphidDensity(), and Ladybird_Base::m_OurPopulationLadybird.
|
protected |
Tests for toles that are not allowed for movement to at x,y, location.
a_x | x-coordinate |
a_y | y-coordinate |
References Ladybird_Population_Manager::m_LadybirdProhibitedTolesForMovement, TAnimal::m_OurLandscape, Ladybird_Base::m_OurPopulationLadybird, and Landscape::SupplyElementType().
|
protected |
The function to determine a landing location for long range movement for foraging or aggregating.
a_distance | The maximum distance to move |
a_minimumflightlength | The minimum distance to move |
a_target | The target aphids needed if any |
Starting at the minumum move this checks locations along a vector for being a target place to move (aphids above minimum) If OK the position is changed.
References Beetle_Base::DecDensity(), g_random_fnc(), Beetle_Base::IncDensity(), TAnimal::m_guard_cell_x, TAnimal::m_guard_cell_y, TAnimal::m_Location_x, TAnimal::m_Location_y, Ladybird_Base::m_OurPopulationLadybird, TAnimal::m_SimulationHeight, TAnimal::m_SimulationWidth, and Population_Manager::UpdateGuardMap().
Referenced by St_Aggregate().
void Ladybird_Adult::ReInit | ( | int | a_x, |
int | a_y, | ||
Landscape * | a_l_ptr, | ||
Ladybird_Population_Manager * | a_lpm_ptr | ||
) |
ReInit for object pool.
References cfg_LadybirdMinimumOviMaturation, cfg_LadybirdStartEggsNo, lobs_Adult, m_ADayDeg, Ladybird_Base::m_AphidsAppetite, Beetle_Adult::m_CanReproduce_bool, m_DailyEggs, Ladybird_Base::m_EatenToday, Beetle_Adult::m_EggCounter, m_EmergenceDay, m_HasOverwintered, Beetle_Base::m_Lifestage, Ladybird_Base::m_MoveCounter, Ladybird_Base::m_OurPopulationLadybird, m_OviMaturation, m_UnsuccessfulAphidsAttempts, Beetle_Adult::ReInit(), and CfgInt::value().
|
inlinestatic |
References m_AphidsPerPreyLevel.
Referenced by Ladybird_Population_Manager::Ladybird_Population_Manager().
|
inlinestatic |
References m_BackgroundMortTemp.
Referenced by Ladybird_Population_Manager::DayDegreeCalculations().
|
inlineprotected |
|
inlineprotected |
|
inlinestatic |
References m_HibernationClumpeSizeDist.
Referenced by Ladybird_Population_Manager::Ladybird_Population_Manager().
|
inline |
sets the value of the state variable that flags whether the beetle is currently hibernating
References m_IsHibernating.
|
inline |
sets the value of the state variable that flags that the beetle has overwintered
References m_HasOverwintered.
|
inlinestatic |
|
inlinestatic |
References m_OvipositionRateTemp.
Referenced by Ladybird_Population_Manager::Ladybird_Population_Manager().
|
inlinestatic |
References m_ShortRangeDistToday.
Referenced by Ladybird_Population_Manager::DayDegreeCalculations().
|
inlineprotected |
The method evaluates whether the beetle should start aggregation.
The function that checks whether the aggregation behaviour should be triggered
The main triggers for hibernation are photoperiod (explicit through the first and last aggregation day) and decrease in temperature and physiological ageing of the plants (implicitly through the aphid density). The ladybirds cannot stay active after the last day of aggregation.
Aggregation could be triggered in this period
References cfg_AphidsToHibernate, cfg_AphidsToStayAwake, cfg_LadybirdAggregationEnd, cfg_LadybirdAggregationStart, cfg_LadybirdHibernationChance, g_rand_uni_fnc(), Ladybird_Population_Manager::GetAphidDensity(), July, TAnimal::m_DayInYear, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Ladybird_Base::m_OurPopulationLadybird, Landscape::SupplyDaylength(), CfgInt::value(), and CfgFloat::value().
Referenced by St_Aggregate(), and St_Forage().
|
overrideprotectedvirtual |
Aggreagte function for the adult ladybird - moves them to hibernaculae.
Reimplemented from Beetle_Adult.
References cfg_LadybirdMinimumFlightLength, IsAggregationSite(), LongRangeFind(), Beetle_Adult::m_AdultMaxMoveDist, ShouldStartAggregating(), tobs_Aggregating, tobs_BDying, tobs_Hibernating, and CfgInt::value().
|
overrideprotectedvirtual |
the ladybird adult's override of a dispersal beahviour
This is the Dispersal function and uses long range movement to move the beetles away from the hibernation sites. There is a mimum move of 100m (assuming the minimum long-range move is 10m) It also applies a post emergence mortality due to parasitoids
Reimplemented from Beetle_Adult.
References cfg_LadybirdAdultAphidPreyDensityOK, cfg_LadybirdMinimumFlightLength, cfg_LadybirdParasitoidMortalityChanceMax, cfg_LadybirdParasitoidMortalityChanceMin, FindTarget(), g_rand_uni_fnc(), Beetle_Adult::m_AdultMaxMoveDist, m_IsHibernating, tobs_BDying, tobs_Foraging, CfgInt::value(), and CfgFloat::value().
|
overrideprotectedvirtual |
method that implements the foraging behaviour for adult beetles
Once there are enough aphids in the current location to satisfy their appetite, the adults only move randomly. Once there are not enough aphids at a location to satisfy the appetite of adult or larva then cannibalism can occur and the adults perform short range movement towards the direction of higher concentration of aphids. If there are not enough aphids for several moves in a row(more than short movement threshold, then long range flight is triggered. If out of last Y steps there were more than attempted long flights– the beetle die. After each ovipositing the short range movement is triggered so the adult won’t deplete the aphid resources of the young. If there are not enough aphids for several moves in a row (more than short movement threshold), then long range flight is triggered. If out of last X steps there were more than attempted long flights the beetle dies.
Reimplemented from Beetle_Adult.
References Beetle_Base::Beetle_1M_Move(), cfg_LadybirdAdultAphidPreyDensityOK, cfg_LadybirdMinimumFlightLength, cfg_LadybirdMovementTempThreshold, cfg_LadybirdShortMovementsMaxThreshold, Ladybird_Base::EatAphids(), FindTarget(), Ladybird_Base::GetAphidsToEat(), Beetle_Adult::m_AdultMaxMoveDist, Beetle_Adult::m_CanReproduce_bool, Ladybird_Base::m_EatenToday, Beetle_Adult::m_EggCounter, m_HasOverwintered, TAnimal::m_Location_x, TAnimal::m_Location_y, m_ShortRangeDistToday, TAnimal::m_TemperatureToday, m_UnsuccessfulAphidsAttempts, ShouldStartAggregating(), tobs_Aggregating, tobs_BDying, tobs_Foraging, TryToReproduce(), CfgInt::value(), and CfgFloat::value().
|
overrideprotectedvirtual |
Hibernate function for the Adult.
Reimplemented from Beetle_Adult.
References cfg_Ladybird_Emergance_Day_Length, cfg_Ladybird_Emergence_Chance, cfg_LadybirdEmergenceMortalityAlone, cfg_LadybirdEmergenceMortalityClump, g_rand_uni_fnc(), Beetle_Base::GetDensityRangeEdge(), TAnimal::m_DayInYear, m_EmergenceDay, m_HasOverwintered, m_HibernationClumpeSizeDist, m_HibernationClumpSize, m_IsHibernating, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Landscape::SupplyDaylength(), tobs_BDying, tobs_Dispersing, tobs_Hibernating, CfgInt::value(), and CfgFloat::value().
|
overrideprotectedvirtual |
Does reproduction if possible.
If we are in breeding condition and its the right season then if there enough aphids around, lay an egg and move on, at least if we tried this four days already
Reimplemented from Beetle_Adult.
References cfg_LadybirdAphidsToLay, cfg_LadybirdAphidsToLay_OffCropFactor, cfg_LadybirdClutchPreyScaler, Ladybird_Population_Manager::CreateObjects(), g_landscape_ptr, Ladybird_Population_Manager::GetAphidDensity(), lobs_Egg, m_AphidsPerPreyLevel, Beetle_Adult::m_CanReproduce_bool, Beetle_Base::m_CurrentBState, Beetle_Adult::m_EggCounter, m_HasOverwintered, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Ladybird_Base::m_OurPopulationLadybird, m_OviMaturation, m_OvipositionRateTemp, m_OvipostionPeriod, TAnimal::m_TemperatureToday, Landscape::SupplyElementType(), tobs_BDying, tole_Field, CfgInt::value(), and CfgArray_Double::value().
Referenced by St_Forage().
|
inlineoverrideprotectedvirtual |
|
protected |
day degrees sum for an individual
Referenced by ReInit().
|
staticprotected |
Speed storage for the prey level denominator.
Referenced by SetAphidsPerPreyLevel(), and TryToReproduce().
|
staticprotected |
Oviposition rate per day under perfect food with temps 0-50 degrees.
Referenced by SetBackgroundMortTemp().
|
protected |
The variables holding the amount of eggs to be laid today.
Referenced by decDailyEggs(), ReInit(), and setDailyEggs().
|
protected |
The day of the year when this particular individual emerged, to be used to track minimum delay time between the emergence and oviposition.
Referenced by BeginStep(), ReInit(), and St_Hibernate().
|
protected |
State variable: true if overwintered.
Referenced by Ladybird_Adult(), ReInit(), SetOverwintered(), St_Forage(), St_Hibernate(), and TryToReproduce().
|
staticprotected |
Holds the clump size distribution with density table.
Referenced by SetHibernationClumpeSizeDist(), and St_Hibernate().
|
protected |
Records the size of the hibernation clump.
Referenced by St_Hibernate().
|
protected |
State variable: true if hibernating.
Referenced by BeginStep(), GetExtremeTempMin(), SetIsHibernating(), St_Dispersal(), and St_Hibernate().
|
protected |
Counter for ovi maturation.
Referenced by Ladybird_Adult(), ReInit(), and TryToReproduce().
|
staticprotected |
Oviposition rate per day under perfect food with temps 0-50 degrees.
Referenced by SetOvipositionRateTemp(), and TryToReproduce().
|
staticprotected |
Static variable to flag when its possible to lay eggs.
Referenced by SetOvipositionPeriod(), and TryToReproduce().
|
staticprotected |
Max distance moved in short range movements today (set by populaton manager each day)
Referenced by SetShortRangeDistToday(), and St_Forage().
|
protected |
The variable that holds the unsuccesful searches for aphids.
Referenced by ReInit(), and St_Forage().