![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <Ladybird_All.h>
Public Member Functions | |
Ladybird_Population_Manager (Landscape *a_l_ptr, int a_numberLifeStages) | |
Constructor for population manager class. More... | |
~Ladybird_Population_Manager () override | |
Destructor: the same as in base class but needs to remove a different number of postion maps. More... | |
bool | IsLocationAllowedLarvae (TTypesOfVegetation a_tov) |
Checks the tov list of disallowed tovs and returns false if a_tov is disallowed More... | |
void | CreateObjects (int a_ob_type, TAnimal *a_pvo, void *, Struct_Beetle *a_data, int a_number) override |
Method to add beetles to the population - it must be overridden in all descendent classes. More... | |
bool | OnFarmEvent (FarmToDo a_event, Beetle_Base *a_caller) override |
Used to determine mortality based on an event for any beetle class - pure vitual must be overriden. More... | |
bool | GetFlyingWeather () const |
the function returns true if the weather is suitable for flying More... | |
bool | GetLadybirdLarvaCanMove () const |
Gets the larval movement flag for today. More... | |
void | SetAphidPopulationManager (Aphid_Population_Manager *a_aphid_population_manager_ptr) |
The function to set the aphid population manager pointer. More... | |
int | GetAphidPopulationManagerSize () const |
The function to get a aphid population manager number. More... | |
Aphid_Population_Manager * | GetAphidPopulationManager (const int a_index) const |
The function to get a aphid population manager pointer referenced by a_index. More... | |
double | GetAphidDensity (int a_x, int a_y) override |
Returns the number of aphids per square metre at this x,y location. More... | |
void | DecAphids (int a_x, int a_y, int a_num) |
the method decreases the number of aphids by "num" in the given location in all the underlying aphid models More... | |
void | TheAOROutputProbe () override |
Special output functionality. More... | |
void | AddCannibalismDeath (int a_ob_type, int a_x, int a_y) |
The method to add one death to t he given life stage at the given location because of cannibalism. More... | |
void | DoSpecialBetweenLifeStages (int a_life_stage) override |
Cannibalism is handled here. More... | |
![]() | |
Beetle_Population_Manager (Landscape *a_l_ptr, int a_n) | |
Beetle_Population_Manager Constructor. More... | |
~Beetle_Population_Manager () override | |
Beetle_Population_Manager Destructor. More... | |
void | DoBefore () override |
Replaces the Step function for the Egg_List. More... | |
void | DoLast () override |
Adds output adult locations to DoLast. More... | |
unsigned | Probe (int a_ListIndex, Probe_Data *a_TheProbe_ptr) override |
Overides the Population_Manager::Probe method. More... | |
int | SupplyEggPopSize () const |
Get egg population size. More... | |
int | SupplyDailyEggPopSize (const int day) const |
Get the number of eggs created on a given day. More... | |
void | SupplyEggLocXY (unsigned day, int j, int &x, int &y) const |
Get the location of an egg from a given day. More... | |
double | SupplyDevelConst1 (unsigned a_index) const |
virtual double | SupplyDayDegs (const unsigned a_stage, const int a_day) |
Get the day degress experienced this year for a specific day created and instar/stage. More... | |
unsigned | GetPopulationSize (int) override |
Returns the population size of the lifestage type bobType. More... | |
void | OpenTheAOROutputProbe (const string &a_AORFilename) override |
Opens the AOR output file. More... | |
virtual bool | OnFarmEventPupae (FarmToDo event, Beetle_Base *a_caller) |
Used to determine mortality based on an event for any beetle class - not a pure vitual but must be overriden if needed. More... | |
void | DoBeetleActiveProbe (int a_lifestage) |
Counts all active beetles and saves the results to a file. More... | |
void | SetStageProductionRecord (int a_value, int a_stage) |
Sets stage production record attribute. More... | |
int | GetStageProductionRecord (int a_stage) const |
Gets the stage production record attribute. More... | |
void | AddStageProductionRecord (int a_value, int a_stage) |
Adds to the stage production record attribute. More... | |
![]() | |
Population_Manager (Landscape *a_l_ptr, int a_numberLifeStages=12) | |
virtual | ~Population_Manager (void) |
void | SetNoProbesAndSpeciesSpecificFunctions (int a_pn) override |
Sets up probe and species specifics. More... | |
unsigned | GetLiveArraySize (int a_listindex) override |
Gets the number of 'live' objects for a list index in the TheArray. More... | |
void | IncLiveArraySize (int a_listindex) |
Increments the number of 'live' objects for a list index in the TheArray. More... | |
unsigned int | FarmAnimalCensus (unsigned int a_farm, unsigned int a_typeofanimal) |
char * | SpeciesSpecificReporting (int a_species, int a_time) override |
char * | ProbeReport (int a_time) |
char * | ProbeReportTimed (int a_time) |
void | ImpactProbeReport (int a_Time) |
bool | BeginningOfMonth () |
void | LOG (const char *fname) |
int | SupplyStepSize () const |
void | Run (int NoTSteps) override |
virtual void | ImpactedProbe () |
virtual TAnimal * | SupplyAnimalPtr (unsigned int a_index, unsigned int a_animal) |
Returns the pointer indexed by a_index and a_animal. Note NO RANGE CHECK. More... | |
virtual unsigned | SupplyListIndexSize () |
unsigned | SupplyListSize (unsigned listindex) const |
void | PushIndividual (const unsigned a_listindex, TAnimal *a_individual_ptr) |
const char * | SupplyStateNames (int i) const |
unsigned | SupplyStateNamesLength () const |
virtual void | DisplayLocations () |
TAnimal * | FindIndividual (unsigned Type, TAnimal *a_me) |
virtual TAnimal * | FindClosest (int x, int y, unsigned Type, TAnimal *a_me) |
omp_nest_lock_t * | GetGuardMapElement (unsigned a_x_index, unsigned a_y_index) |
Return the guard map cell. More... | |
void | SetGuardMapElement (unsigned a_x_index, unsigned a_y_index) |
Set the given guard map cell. More... | |
void | UnsetGuardMapElement (unsigned a_x_index, unsigned a_y_index) |
Unset the given guard map cell. More... | |
void | UpdateGuardMap (int a_x, int a_y, int &a_index_x, int &a_index_y) |
Get the index of the guard map for the given location. More... | |
bool | OpenTheRipleysOutputProbe () |
bool | OpenTheMonthlyRipleysOutputProbe () |
bool | OpenTheReallyBigProbe () |
void | CloseTheMonthlyRipleysOutputProbe () const |
virtual void | CloseTheRipleysOutputProbe () |
virtual void | CloseTheReallyBigOutputProbe () |
TTypesOfPopulation | GetPopulationType () |
int | GetSeasonNumber () |
Get the season number. More... | |
void | LamdaDeath (int x, int y) |
void | LamdaBirth (int x, int y) |
void | LamdaBirth (int x, int y, int z) |
void | LamdaClear () |
void | LamdaDumpOutput () |
virtual int | SupplyPegPosx (int) |
virtual int | SupplyPegPosy (int) |
virtual int | SupplyCovPosx (int) |
virtual int | SupplyCovPosy (int) |
virtual bool | OpenTheFledgelingProbe () |
virtual bool | OpenTheBreedingPairsProbe () |
virtual bool | OpenTheBreedingSuccessProbe () |
virtual void | BreedingPairsOutput (int) |
virtual int | TheBreedingFemalesProbe (int) |
virtual int | TheFledgelingProbe () |
virtual void | BreedingSuccessProbeOutput (double, int, int, int, int, int, int, int) |
virtual int | TheBreedingSuccessProbe (int &, int &, int &, int &, int &, int &) |
virtual void | FledgelingProbeOutput (int, int) |
virtual void | TheGeneticProbe (unsigned, int, unsigned &) |
virtual void | GeneticsResultsOutput (FILE *, unsigned) |
void | Debug_Shuffle (unsigned int Type) |
virtual void | RunStepMethods () |
![]() | |
Population_Manager_Base (Landscape *L) | |
The Population_Manager_Base constructor. More... | |
virtual void | Catastrophe (int) |
Must be re-implemented in descendent classes. More... | |
int | SupplySimW () const |
Returns landscape width in m. More... | |
int | SupplySimH () const |
Returns landscape height in m. More... | |
int | SupplySimWH () const |
Returns half the landscape width in m. More... | |
int | SupplySimHH () const |
Returns half the landscape height in m. More... | |
virtual int | ProbeFileInput (char *p_Filename, int p_ProbeNo) |
A stub to build specfic probes and functions. More... | |
int | SupplyListNameLength () const |
const char * | SupplyListName (int a_i) const |
Get a list name from the list. More... | |
virtual void | SupplyLocXY (unsigned, unsigned, int &, int &) |
A stub for identifying an individual at a location. More... | |
virtual TAnimal * | FindClosest (int, int, unsigned) |
A stub for identifying an individual at a location. More... | |
std::string | SupplySimulationName () |
void | SetStepCounterInADay (int a_counter) |
Set step counter in a day. More... | |
int | GetStepCounterInADay (void) |
Return the sep counter in a day. More... | |
Static Public Member Functions | |
static double | getLongRangeDuration () |
long flight duration: used in distance calculation More... | |
Public Attributes | |
std::vector< Aphid_Population_Manager * > | m_AphidPopulationManagerPtrList |
The pointer to aphid population manager. More... | |
TTovList | m_LadybirdProhibitedTovsForMovement |
the types of vegetation that are prohibited for ladybirds More... | |
TToleList | m_LadybirdProhibitedTolesForMovement |
the types of landscape that are prohibited for ladybirds More... | |
TToleList | m_LadybirdAggregationToles |
the types of landscape that are aggregation targets More... | |
TToleList | LadybirdProhibitedTolesForMovementLarva |
the types of vegetation that are prohibited for ladybirds larva More... | |
TTovList | LadybirdLongRangeTovs |
the types of vegetation that are targets of long range movement More... | |
TToleList | LadybirdLongRangeToles |
the types of landscape that are targets of long range movement More... | |
TTovList | LadybirdAggregationTovs |
the types of vegetation that are aggregation targets More... | |
![]() | |
long | m_EPopSize {0} |
To store the current population size. More... | |
std::unique_ptr< MovementMap > | m_MoveMap |
Map of suitability for movement. More... | |
std::unique_ptr< std::vector< std::unique_ptr< Beetle_Egg_List > > > | m_EList {nullptr} |
Replacement for TheArray[0]. More... | |
![]() | |
bool | ProbesSet {} |
![]() | |
Probe_Data * | TheProbe [100] = {nullptr} |
Holds a list of pointers to standard output probes. More... | |
Protected Member Functions | |
void | DoExtremeTempActions (double a_atemptoday) override |
Species specific actions to cope with response to extreme temperature, if needed. More... | |
void | DoEggDailyMortalityActions (double a_atemptoday) override |
Species specific actions to cope with temperature related egg mortality. More... | |
void | DoLarvalDailyMortalityActions (double a_atemptoday) override |
Species specific actions to cope with temperature related laval mortality. More... | |
int | GetTempMortRange (double a_temp) const |
Gets the temperature category for mortality calculations. More... | |
void | DayDegreeCalculations (int a_dayinyear, bool a_usehourly) override |
Does day degree development calculations here. More... | |
void | CalculateDailyEggProduction (double a_temptoday) override |
Figure out the maximum number of eggs that can be laid today - must be overridden in descendent classes. More... | |
void | DoFirst () override |
Does day degree development calculations here. More... | |
![]() | |
void | Catastrophe () override |
Method to arbitrarily alter populations size. More... | |
void | Catastrophe2 () |
Method to arbitrarily alter populations size restricted spatially. More... | |
void | TheRipleysOutputProbe (ofstream *a_prb) override |
Special output functionality. More... | |
void | TheReallyBigOutputProbe () override |
Special output functionality. More... | |
bool | IsStartHabitat (int a_x, int a_y) const |
Used to specify legal starting habitats for simulation start-up. More... | |
bool | IsStartHabitatAux (TTypesOfLandscapeElement tole) const |
Used to specify legal starting habitats for simulation start-up. More... | |
void | SetAdultEggLayingThreshold (const double a_value) |
Set the temperature threshold for egg laying. More... | |
void | incInField () |
Increments in field counter. More... | |
void | incInCrop () |
Increments in crop counter. More... | |
void | incOffField () |
Increments off field counter. More... | |
void | PestMortLocOutput () |
Annual pesticide mortality locations output. More... | |
![]() | |
virtual bool | StepFinished () |
Methods to run the simulations. More... | |
virtual void | DoAfter () |
virtual void | SortX (unsigned Type) |
void | SortXIndex (unsigned Type) |
virtual void | SortY (unsigned Type) |
void | SortState (unsigned Type) |
void | SortStateR (unsigned Type) |
virtual unsigned | PartitionLiveDead (unsigned Type) |
virtual void | Shuffle_or_Sort (unsigned Type) |
virtual void | Shuffle (unsigned Type) |
![]() | |
~Population_Manager_Base ()=default | |
Protected Attributes | |
vector< double > | m_EggTemperatureMortality { } |
Storage for the temperature related mortality for eggs. More... | |
int | m_MortalityTempIndexToday { 0 } |
Storage for the index to the mortality vector for todays temperature (speed optimisation) More... | |
LadybirdToleTovs | m_LadybirdToleTovs |
Class holding all the tole tov related information - for tidyness. More... | |
vector< Eigen::MatrixXi > | m_cannibalism_dead_num_map |
Holds the daily dead number caused by cannibalism. More... | |
vector< int > | m_cannibalism_dead_total_num |
Holds the daily total dead number for each life stage caused by cannibalism. More... | |
TTovList | m_LadybirdProhibitedTovsForMovementLarva |
Uses the open cannibalisations events list to remove beetles. More... | |
double | TodaysEggProductionTempFactor {0.0} |
the dependence between temperature and the clutch size: updated daily More... | |
double | m_LadybirdLarvaMovementThreshold { 10.0 } |
minimum temperature that larva can move at More... | |
bool | m_LadybirdLarvaCanMove_bool {true} |
minimum temperature that larva can move at More... | |
![]() | |
double | m_MortalityTempStep {5.0} |
Threshold temperatures for mortalities: Step size. More... | |
double | m_MortalityTempMin {0.0} |
hreshold temperatures for mortalities: Min More... | |
double | m_MortalityTempMax {25.0} |
Threshold temperatures for mortalities: Max. More... | |
int | m_TemperatureCategory { 0 } |
Storage for the temperature category today. More... | |
int | m_NoTemperatureCategories { 0 } |
Storage for the number of temperature categories used. More... | |
vector< std::array< double, 365 > > | m_DayDegs {} |
Storage for daily day degrees for non-adult stages. More... | |
TToleList | m_BeetleStartHabitats |
the list of the toles that the beetles are assigned to in the beginning of the simulation More... | |
tBeetleToleTovs | m_BeetleToleTovs |
The list of start habitats for the beetle. More... | |
int | m_BeetleLarvalStagesNum { 3 } |
vector< int > | m_StageProductionProduction { 0 } |
Testing/Output attribute holding the number of larvae produced today. More... | |
double | m_AdultEggLayingThreshold {} |
Temperature threshold for egg laying. More... | |
double | m_EggProductionSlope {} |
the slope of the linear function that defines todays egg production More... | |
vector< double > | m_DevelConst1 {} |
Day degree threshold constant for eggs to pupae. More... | |
vector< double > | m_DevelopmentInflectionPoints {} |
Inflection point in day degree calculations for non-adult stages. More... | |
vector< double > | m_AboveInflectionRates {} |
Day degree constant above inflection point for all non-adult stages. More... | |
vector< SimplePositionMapInt * > | m_BeetlePositionMaps [bob_foobar] {} |
int | m_InFieldNo {} |
In-field counter. More... | |
int | m_InCropNo {} |
In-crop counter. More... | |
int | m_OffFieldNo {} |
Off-field counter. More... | |
TTypesOfVegetation | m_InCropRef {} |
In crop tole reference. More... | |
![]() | |
vector< unsigned > | m_LiveArraySize |
int | m_NoProbes = 0 |
std::vector< std::vector< omp_nest_lock_t * > > | m_MapGuard |
This is used to make sure animals will not behaviour at the same area - multi threads. More... | |
int | m_guard_cell_height_num |
int | m_guard_cell_width_num |
int | m_guard_cell_size |
bool | m_is_paralleled |
This is used to indicate whether the species is paralleled. More... | |
const char * | StateNames [100] {} |
int | m_StepSize {} |
vector< vector< forward_list< TAnimal * > * > > | TheSubArrays |
Hold all the animal pointers. More... | |
vector< vector< int > > | TheSubArraysSizes |
Hold all the animal sizes in each thread. More... | |
vector< int > | m_LifeStageOrderVec |
The vector to store the life stage order for looping specie life stages. More... | |
vector< forward_list< TAnimal * >::iterator > | TheSubArraysIterators |
the iterator from last time called for SupplyAnimalPtr(), this for fast loop all the animals in the derived class. More... | |
vector< int > | TheSubArrayPreviousIndex |
the animal index number from last time called for SupplyAnimalPtr(), this for fast loop all the animals in the derived class. More... | |
vector< int > | TheSubArrayThreadIndex |
the thread index number from last time called for SupplyAnimalPtr(), this for fast loop all the animals in the derived class. More... | |
unsigned | StateNamesLength |
FILE * | TestFile {} |
FILE * | TestFile2 {} |
vector< unsigned > | BeforeStepActions |
Holds the season list of possible before step actions. More... | |
int | m_SeasonNumber |
Holds the season number. Used when running goose and hunter sims. More... | |
TTypesOfPopulation | m_population_type {TOP_NoSpecies} |
ofstream * | AOROutputPrb {} |
ofstream * | RipleysOutputPrb {} |
ofstream * | RipleysOutputPrb1 {} |
ofstream * | RipleysOutputPrb2 {} |
ofstream * | RipleysOutputPrb3 {} |
ofstream * | RipleysOutputPrb4 {} |
ofstream * | RipleysOutputPrb5 {} |
ofstream * | RipleysOutputPrb6 {} |
ofstream * | RipleysOutputPrb7 {} |
ofstream * | RipleysOutputPrb8 {} |
ofstream * | RipleysOutputPrb9 {} |
ofstream * | RipleysOutputPrb10 {} |
ofstream * | RipleysOutputPrb11 {} |
ofstream * | RipleysOutputPrb12 {} |
ofstream * | ReallyBigOutputPrb {} |
AOR_Probe * | m_AOR_Probe {} |
A pointer to the AOR probe. More... | |
long int | lamdagrid [2][257][257] {} |
![]() | |
int | SimH |
stores the simulation height More... | |
int | SimW |
stores the simulation width More... | |
int | SimHH |
stores the simulation height halved More... | |
int | SimWH |
stores the simulation width halved More... | |
string | m_SimulationName |
stores the simulation name More... | |
Landscape * | m_TheLandscape |
holds an internal pointer to the landscape More... | |
int | m_ListNameLength {} |
the number of life-stages simulated in the population manager More... | |
const char * | m_ListNames [32] {} |
A list of life-stage names. More... | |
std::string | m_AORProbeFileName {"AOR_Probe.txt"} |
name of the AOR Probe file More... | |
std::string | m_ProbeFileName {"Probe.res"} |
name of the Probe file More... | |
int | m_step_counter_in_a_day |
Step counter in a day, this is used for the animals with finer step size other than one day. More... | |
Additional Inherited Members | |
![]() | |
static void | PestMortLocOutputOpen () |
Annual pesticide mortality output file open. More... | |
static void | PestMortLocOutputError () |
Pesticide mortality output error handling. More... | |
|
explicit |
Constructor for population manager class.
Ladybird had temperature related egg mortality in 5 degree steps, so load this from the config
Must create and extra position map because we have an extra larval stage
References cfg_BeetleLarvalStagesNum, cfg_Ladybird_DevelopmentInflectionPoints, cfg_LadybirdAphidsToLay, cfg_LadybirdAphidsToLayScaler, cfg_LadybirdDailyOvipostionRateTemp, cfg_LadybirdEggTemperatureMortality, cfg_LadybirdHibernaculaeSizesDist, cfg_LadybirdLarvaAppetite, cfg_LadybirdLarvalMortCategories, cfg_LadybirdLarvalPreyDevelParameters, cfg_LadybirdLarvalTemperatureMortality, cfg_LadybirdLarvaMovementThreshold, cfg_LadybirdMaximumFlightLength, cfg_LadybirdStagesNutritionalValue, cfg_ladybirdStartNos, cfg_MaxShortRangeAttempts, CreateObjects(), g_random_fnc(), LadybirdTovParams::getList(), LadybirdToleParams::getList(), Beetle_Population_Manager::IsStartHabitat(), LadybirdToleTovs::LadybirdAggregationToles, LadybirdToleTovs::LadybirdProhibitedToles, LadybirdToleTovs::LadybirdProhibitedTovsForMovementLarva, lobs_Adult, lobs_Foobar, Beetle_Population_Manager::m_BeetleLarvalStagesNum, Beetle_Population_Manager::m_BeetlePositionMaps, m_cannibalism_dead_num_map, m_cannibalism_dead_total_num, Beetle_Population_Manager::m_DayDegs, Beetle_Population_Manager::m_DevelopmentInflectionPoints, m_EggTemperatureMortality, Beetle_Population_Manager::m_InCropNo, Beetle_Population_Manager::m_InFieldNo, m_LadybirdAggregationToles, m_LadybirdLarvaMovementThreshold, m_LadybirdProhibitedTolesForMovement, m_LadybirdProhibitedTovsForMovementLarva, m_LadybirdToleTovs, Population_Manager::m_LifeStageOrderVec, Population_Manager_Base::m_ListNameLength, Population_Manager_Base::m_ListNames, Beetle_Population_Manager::m_MortalityTempMax, Beetle_Population_Manager::m_OffFieldNo, Population_Manager::m_population_type, Population_Manager_Base::m_SimulationName, Beetle_Population_Manager::m_StageProductionProduction, Population_Manager_Base::m_TheLandscape, Struct_Beetle::m_x, Struct_Beetle::m_y, Beetle_Population_Manager::PestMortLocOutputOpen(), Beetle_Adult::SetAdultMaxMoveDist(), Ladybird_Adult::SetAphidsPerPreyLevel(), Beetle_Base::SetBeetleMap(), Ladybird_Adult::SetHibernationClumpeSizeDist(), Ladybird_Larvae1::SetLadybirdLarvalPreyDevelParameters(), Ladybird_Base::SetLadybirdStagesNutritionalValue(), Ladybird_Larvae1::SetLarvalAppetite(), Beetle_Larvae::SetLarvalDailyMort(), Beetle_Base::SetMaxShortRangeAttempts(), Ladybird_Adult::SetOvipositionRateTemp(), Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), Population_Manager::TheSubArrays, tobs_Hibernating, TOP_Ladybird, CfgInt::value(), CfgFloat::value(), CfgArray_Int::value(), and CfgArray_Double::value().
|
overridedefault |
Destructor: the same as in base class but needs to remove a different number of postion maps.
|
inline |
The method to add one death to t he given life stage at the given location because of cannibalism.
References m_cannibalism_dead_num_map, and m_cannibalism_dead_total_num.
Referenced by Ladybird_Base::Cannibalise().
|
inlineoverrideprotectedvirtual |
Figure out the maximum number of eggs that can be laid today - must be overridden in descendent classes.
Implements Beetle_Population_Manager.
Referenced by DayDegreeCalculations().
|
overridevirtual |
Method to add beetles to the population - it must be overridden in all descendent classes.
Reimplemented from Beetle_Population_Manager.
References Population_Manager::IncLiveArraySize(), lobs_Adult, lobs_Egg, lobs_Larva1, lobs_Larva2, lobs_Larva3, lobs_Larva4, lobs_Pupa, Struct_Beetle::m_l, Struct_Beetle::m_x, Struct_Beetle::m_y, Population_Manager::PushIndividual(), and Landscape::SupplyDayInYear().
Referenced by Ladybird_Population_Manager(), Ladybird_Pupae::St_Emerge(), and Ladybird_Adult::TryToReproduce().
|
overrideprotectedvirtual |
Does day degree development calculations here.
Reimplemented from Beetle_Population_Manager.
References CalculateDailyEggProduction(), cfg_LadybirdAdultTemperatureMortalityParams, cfg_LadybirdLarvaeMoveStep, cfg_LadybirdMortalityScaler, cfg_LadybirdMovementProportion, cfg_LadybirdMovementRatePerT, cfg_LadybirdOvipositionPeriodEnd, cfg_LadybirdOvipositionPeriodStart, cfg_LadybirdShortMovementsMaxThreshold, DoEggDailyMortalityActions(), DoExtremeTempActions(), DoLarvalDailyMortalityActions(), Beetle_Population_Manager::m_AboveInflectionRates, Beetle_Population_Manager::m_BeetleLarvalStagesNum, Beetle_Population_Manager::m_DayDegs, Beetle_Population_Manager::m_DevelConst1, Beetle_Population_Manager::m_DevelopmentInflectionPoints, m_LadybirdLarvaCanMove_bool, m_LadybirdLarvaMovementThreshold, Beetle_Population_Manager::m_MortalityTempMax, Beetle_Population_Manager::m_MortalityTempMin, Beetle_Population_Manager::m_MortalityTempStep, Beetle_Population_Manager::m_NoTemperatureCategories, Beetle_Population_Manager::m_TemperatureCategory, Population_Manager_Base::m_TheLandscape, Ladybird_Adult::SetBackgroundMortTemp(), Ladybird_Larvae1::SetLadybirdLarvaeMoveMax(), Ladybird_Larvae1::SetLadybirdLarvaeMoveStep(), Ladybird_Adult::SetOvipositionPeriod(), Ladybird_Adult::SetShortRangeDistToday(), Beetle_Base::SetTodaysTempCategory(), Landscape::SupplyDaylength(), Landscape::SupplyTemp(), Landscape::SupplyTempHour(), CfgInt::value(), CfgFloat::value(), and CfgArray_Double::value().
void Ladybird_Population_Manager::DecAphids | ( | int | a_x, |
int | a_y, | ||
int | a_num | ||
) |
the method decreases the number of aphids by "num" in the given location in all the underlying aphid models
References GetAphidDensity(), and m_AphidPopulationManagerPtrList.
Referenced by Ladybird_Base::EatAphids().
|
overrideprotectedvirtual |
Species specific actions to cope with temperature related egg mortality.
Reimplemented from Beetle_Population_Manager.
References m_EggTemperatureMortality, Beetle_Population_Manager::m_TemperatureCategory, and Beetle_Egg_List::SetDailyEggMort().
Referenced by DayDegreeCalculations().
|
overrideprotectedvirtual |
Species specific actions to cope with response to extreme temperature, if needed.
Ladybird specific actions to cope with response to extreme temperature.
a_atemptoday | is the temperature today |
Tests for extreme temperature then applies the mortality to juvenile stages. This is called by the standard beetle class population manager once per day
Reimplemented from Beetle_Population_Manager.
References cfg_LadybirdExtremeTempMax, cfg_LadybirdExtremeTempMin, cfg_LadybirdExtremeTempMortChance, Beetle_Base::DecDensity(), g_rand_uni_fnc(), lobs_Adult, lobs_Larva1, Beetle_Base::StDie(), TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Population_Manager::TheSubArrays, and CfgFloat::value().
Referenced by DayDegreeCalculations().
|
overrideprotectedvirtual |
Does day degree development calculations here.
This method removes any eggs that have survived until winter. In descendent classes other stages may need to be removed.
It subsequently calculates day degree development for each day for each beetle stage. This is an optimising strategy to prevent each beetle individual calculating these.
Finally it replaces the Egg_List BeginStep functionality. This is also an optimisation since it only requires 365 Egg_lists, one for each day of the year instead of millions of individual eggs.
NB this breaks the traditional ALMaSS protocol for handling animal individuals.
Reimplemented from Beetle_Population_Manager.
References cfg_LadybirdAdultMortalityRate, cfg_LadybirdMaxAdultNumber, Beetle_Base::DecDensity(), Beetle_Population_Manager::DoFirst(), g_date, g_rand_uni_fnc(), Calendar::JanFirst(), lobs_Adult, Population_Manager::m_guard_cell_size, Population_Manager::m_is_paralleled, Population_Manager::m_LiveArraySize, Population_Manager::m_MapGuard, Population_Manager::PartitionLiveDead(), Beetle_Base::StDie(), TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Population_Manager::TheSubArrays, and CfgFloat::value().
|
overrideprotectedvirtual |
Species specific actions to cope with temperature related laval mortality.
Just fixes the temperature category for today. This is called by the standard beetle class population manager once per day.
Reimplemented from Beetle_Population_Manager.
References GetTempMortRange(), and m_MortalityTempIndexToday.
Referenced by DayDegreeCalculations().
|
overridevirtual |
Cannibalism is handled here.
Reimplemented from Population_Manager.
References lobs_Larva1, m_cannibalism_dead_num_map, m_cannibalism_dead_total_num, Population_Manager::m_LiveArraySize, Population_Manager::TheSubArrays, and Population_Manager::TheSubArraysSizes.
|
overridevirtual |
Returns the number of aphids per square metre at this x,y location.
a_x | x-coordinate |
a_y | y-coordinate |
Reimplemented from Population_Manager_Base.
References m_AphidPopulationManagerPtrList.
Referenced by DecAphids(), Ladybird_Base::EatAphids(), Ladybird_Adult::FindTarget(), Ladybird_Adult::IsForageSite(), Ladybird_Adult::ShouldStartAggregating(), Ladybird_Larvae1::St_Develop(), and Ladybird_Adult::TryToReproduce().
|
inline |
The function to get a aphid population manager pointer referenced by a_index.
References m_AphidPopulationManagerPtrList.
|
inline |
|
inline |
the function returns true if the weather is suitable for flying
References cfg_LadybirdFlyingThreshTemp, cfg_LadybirdFlyingThreshWind, Population_Manager_Base::m_TheLandscape, Landscape::SupplyTemp(), Landscape::SupplyWind(), and CfgFloat::value().
|
inline |
Gets the larval movement flag for today.
References m_LadybirdLarvaCanMove_bool.
Referenced by Ladybird_Larvae1::St_Develop().
|
inlinestatic |
|
protected |
Gets the temperature category for mortality calculations.
References cfg_LadybirdMortalityTempMax, cfg_LadybirdMortalityTempMin, cfg_LadybirdMortalityTempStep, and CfgFloat::value().
Referenced by DoLarvalDailyMortalityActions().
|
inline |
Checks the tov list of disallowed tovs and returns false if a_tov is disallowed
References m_LadybirdProhibitedTovsForMovementLarva.
Referenced by Ladybird_Larvae1::IsLocationAllowed().
|
overridevirtual |
Used to determine mortality based on an event for any beetle class - pure vitual must be overriden.
Implements Beetle_Population_Manager.
References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, autumn_sow_with_ferti, bed_forming, biocide, bulb_harvest, burn_straw_stubble, burn_top, cattle_out, cattle_out_low, cfg_biocide_reduction_val, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, fa_ammoniumsulphate, fa_boron, fa_calcium, fa_cu, fa_greenmanure, fa_k, fa_manganesesulphate, fa_manure, fa_n, fa_nk, fa_npk, fa_npks, fa_p, fa_pk, fa_pks, fa_rsm, fa_sk, fa_sludge, fa_slurry, fiber_covering, fiber_removal, flammebehandling, flower_cutting, fp_ammoniumsulphate, fp_boron, fp_calcium, fp_cu, fp_greenmanure, fp_k, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_n, fp_nc, fp_nk, fp_npk, fp_npks, fp_ns, fp_p, fp_pk, fp_pks, fp_rsm, fp_sk, fp_sludge, fp_slurry, fungicide_treat, g_rand_uni_fnc(), Beetle_Base::GetHarvestMortality(), Beetle_Base::GetInsecticideApplication(), Beetle_Base::GetSoilCultivationMortality(), Beetle_Base::GetStriglingMortality(), glyphosate, green_harvest, growth_regulator, harvest, harvest_bushfruit, harvestshoots, hay_bailing, hay_turning, heavy_cultivator_aggregate, herbicide_treat, hilling_up, insecticide_treat, last_treatment, Population_Manager_Base::m_TheLandscape, manual_weeding, molluscicide, mow, org_fungicide, org_herbicide, org_insecticide, pheromone, pigs_out, preseeding_cultivator, preseeding_cultivator_sow, product_treat, pruning, row_cultivation, shallow_harrow, shredding, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, spring_sow_with_ferti, start, straw_chopping, straw_covering, straw_removal, strigling, strigling_hill, strigling_sow, stubble_cultivator_heavy, stubble_harrowing, stubble_plough, suckering, summer_harrow, summer_plough, summer_sow, swathing, syninsecticide_treat, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgFloat::value(), Landscape::Warn(), water, winter_harrow, and winter_plough.
|
inline |
The function to set the aphid population manager pointer.
References m_AphidPopulationManagerPtrList.
|
overridevirtual |
Special output functionality.
Reimplemented from Beetle_Population_Manager.
References AOR_Probe::DoProbe(), lobs_Adult, and Population_Manager::m_AOR_Probe.
TTovList Ladybird_Population_Manager::LadybirdAggregationTovs |
the types of vegetation that are aggregation targets
TToleList Ladybird_Population_Manager::LadybirdLongRangeToles |
the types of landscape that are targets of long range movement
TTovList Ladybird_Population_Manager::LadybirdLongRangeTovs |
the types of vegetation that are targets of long range movement
TToleList Ladybird_Population_Manager::LadybirdProhibitedTolesForMovementLarva |
the types of vegetation that are prohibited for ladybirds larva
the types of landscape that are prohibited for ladybirds larva
std::vector<Aphid_Population_Manager*> Ladybird_Population_Manager::m_AphidPopulationManagerPtrList |
The pointer to aphid population manager.
Referenced by DecAphids(), GetAphidDensity(), GetAphidPopulationManager(), GetAphidPopulationManagerSize(), and SetAphidPopulationManager().
|
protected |
Holds the daily dead number caused by cannibalism.
Referenced by AddCannibalismDeath(), DoSpecialBetweenLifeStages(), and Ladybird_Population_Manager().
|
protected |
Holds the daily total dead number for each life stage caused by cannibalism.
Referenced by AddCannibalismDeath(), DoSpecialBetweenLifeStages(), and Ladybird_Population_Manager().
|
protected |
Storage for the temperature related mortality for eggs.
Referenced by DoEggDailyMortalityActions(), and Ladybird_Population_Manager().
TToleList Ladybird_Population_Manager::m_LadybirdAggregationToles |
the types of landscape that are aggregation targets
Referenced by Ladybird_Adult::IsAggregationSite(), and Ladybird_Population_Manager().
|
protected |
minimum temperature that larva can move at
Referenced by DayDegreeCalculations(), and GetLadybirdLarvaCanMove().
|
protected |
minimum temperature that larva can move at
Referenced by DayDegreeCalculations(), and Ladybird_Population_Manager().
TToleList Ladybird_Population_Manager::m_LadybirdProhibitedTolesForMovement |
the types of landscape that are prohibited for ladybirds
Referenced by Ladybird_Adult::IsProbhibited(), and Ladybird_Population_Manager().
TTovList Ladybird_Population_Manager::m_LadybirdProhibitedTovsForMovement |
the types of vegetation that are prohibited for ladybirds
|
protected |
Uses the open cannibalisations events list to remove beetles.
List of prohibited tov types for larvae
Referenced by IsLocationAllowedLarvae(), and Ladybird_Population_Manager().
|
protected |
Class holding all the tole tov related information - for tidyness.
Referenced by Ladybird_Population_Manager().
|
protected |
Storage for the index to the mortality vector for todays temperature (speed optimisation)
Referenced by DoLarvalDailyMortalityActions().
|
protected |
the dependence between temperature and the clutch size: updated daily
variables