![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <Erigone.h>
Public Member Functions | |
Erigone_Juvenile (int x, int y, Landscape *L, Erigone_Population_Manager *EPM) | |
virtual bool | OnFarmEvent (FarmToDo event) |
Determines the impact of any farm management events at the juvenile's location More... | |
void | CalcDrought () override |
For extension in descendent classes to calculate drought days for mortality More... | |
![]() | |
void | EndStep () |
EndStep behaviour - must be implemented in descendent classes. More... | |
Spider_Juvenile (int x, int y, Landscape *L, Spider_Population_Manager *SpPM) | |
the constructor More... | |
virtual void | ReInit (int x, int y, Landscape *L, Spider_Population_Manager *SpPM) |
Used to reinitialise reused objects More... | |
virtual void | BeginStep () |
The BeginStep code More... | |
virtual void | Step () |
The Step code More... | |
virtual void | SpecialWinterMort () |
Used to impose extra mortaltiy to those spiderlings that don't reach a minimum developmental stage by the end of the year More... | |
![]() | |
Spider_Base (int x, int y, Landscape *L, Spider_Population_Manager *SpMan) | |
Constructor More... | |
void | ReInit (int x, int y, Landscape *L, Spider_Population_Manager *SpMan) |
Reinitialise object code More... | |
void | Init (Spider_Population_Manager *p_spMan) |
Used it initialise objects (also used by ReInit) More... | |
virtual int | WhatState () |
Returns the current spider behavioural state More... | |
virtual void | KillThis () |
Destroys the spider More... | |
![]() | |
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 | 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... | |
![]() | |
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 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 void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
![]() | |
double | m_pesticide_accum |
Body-burden of pesticde More... | |
Spider_Population_Manager * | m_OurPopulationManager |
![]() | |
static int | m_JuvDensityDepMortConst = 0 |
Juvenile density dependent mortality threshold More... | |
static std::array< int, 40 > | m_DispersalChance = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } |
Disperals probability as a function of bad habitat days More... | |
static double | m_JuvDevelConst = 0 |
Day degrees maturation threshold More... | |
![]() | |
static int | m_DenDependenceConst0 = 0 |
This is the number of local spiders needed before density dependent mortality will kill More... | |
static int | m_SimW = 0 |
The width of the landscape More... | |
static int | m_SimH = 0 |
The height of the landscape More... | |
![]() | |
virtual TTypesOfSpiderState | st_Develop () |
The behavioural state development More... | |
virtual TTypesOfSpiderState | st_AssessHabitat () |
The behavioural state assess habitat More... | |
virtual TTypesOfSpiderState | st_Balloon () |
The behavioural state balloon More... | |
virtual TTypesOfSpiderState | st_Walk () |
The bheavioural state walk More... | |
virtual void | Maturation () |
The behavioural state maturation More... | |
virtual bool | BallooningMortality (int dist) |
Determines the ballooning mortality associated with distance dist More... | |
virtual int | BalloonTo (int direction, int distance) |
Carry out ballooning in a given direction and distance More... | |
virtual int | WalkTo (int direction) |
Walk in a given direction More... | |
virtual TTypesOfSpiderState | AssessHabitat () |
Evaluates the habitat at current location More... | |
virtual int | Balloon () |
Carries out ballooning More... | |
virtual int | Walk () |
Carries out walking More... | |
virtual SpiderFoodQuality | AssessFood () |
Evaluates food status at current location More... | |
virtual SpiderFoodQuality | CheckToleTovIndex () |
Returns the movement map value at current location More... | |
virtual void | AddToBadHabitatDays () |
Increments bad habitat days up to max of 39 More... | |
![]() | |
virtual bool | EggPosValid (unsigned a_x, unsigned a_y) |
Checks if its possible to create an eggsac here More... | |
bool | HatchDensityMort (int a_x, int a_y, int a_range) |
Checks for density-dependent mortality at this location More... | |
virtual int | CheckPosMap (unsigned x, unsigned y) |
Returns the value in m_OurPosMap for this location More... | |
virtual bool | GetPosMapPositive (unsigned x, unsigned y, unsigned range) |
Returns whether there are any non-zero values within range of this coordinate (TL corner) More... | |
virtual int | GetPosMapDensity (unsigned x, unsigned y, unsigned range) |
Returns total number of non-zero locations within range of this coordinate (TL corner) More... | |
virtual void | ClearPosMap (unsigned x, unsigned y) |
Clears a PosMap location More... | |
virtual void | SetPosMap (unsigned x, unsigned y) |
Sets a PosMap location to non-zero More... | |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
![]() | |
char | m_MyDirection |
The currrent movement direction More... | |
bool | m_MustBalloon |
Flag to force ballooning if possible More... | |
int | m_BadHabitatDays |
The number of days in bad conditions More... | |
double | m_droughtFactor |
The running score of drought conditions More... | |
![]() | |
double | m_AgeDegrees |
A local pointer the population manager More... | |
int | m_Age |
Stores the spiders age in days More... | |
TTypesOfSpiderState | m_CurrentSpState |
Stores the current behavioural state More... | |
unsigned | m_Lifestage { 0 } |
This is a useful parameter holding the spider type. More... | |
SimplePositionMap * | m_OurPosMap |
Contains a pointer to the relevant position map - allocation of this must be controlled by the descendent class init. More... | |
![]() | |
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 |
![]() | |
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 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... | |
Erigone_Juvenile::Erigone_Juvenile | ( | int | x, |
int | y, | ||
Landscape * | L, | ||
Erigone_Population_Manager * | EPM | ||
) |
|
overridevirtual |
For extension in descendent classes to calculate drought days for mortality
Reimplemented from Spider_Juvenile.
References cfg_Erig_lowplantbiomass, cfg_Erig_mediumplantbiomass, g_rand_uni_fnc(), Spider_Population_Manager::GetTodaysDroughtSc(), Spider_Base::KillThis(), TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Spider_Base::m_OurPopulationManager, Landscape::SupplyVegBiomass(), and CfgFloat::value().
|
virtual |
Determines the impact of any farm management events at the juvenile's location
Reimplemented from Spider_Juvenile.
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, cfg_Erig_Juv_FireMort, cfg_Erig_Juv_GrazingBalloon, cfg_Erig_Juv_GrazingMort, cfg_Erig_Juv_HarrowMort, cfg_Erig_Juv_HarvestBalloon, cfg_Erig_Juv_HarvestMort, cfg_Erig_Juv_PloughMort, cfg_Erig_Juv_StriglingMort, cfg_Erig_Juvenile_InsecticideApplication, cfg_Erig_PesticideTrialJuvenileToxicMort, 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_random_fnc(), glyphosate, green_harvest, growth_regulator, harvest, harvest_bushfruit, harvestshoots, hay_bailing, hay_turning, heavy_cultivator_aggregate, herbicide_treat, hilling_up, insecticide_treat, last_treatment, Spider_Base::m_CurrentSpState, Spider_Juvenile::m_MustBalloon, Spider_Base::m_OurPopulationManager, 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, 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, tosps_Dying, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgInt::value(), CfgFloat::value(), water, winter_harrow, and winter_plough.