![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <skylarks_all.h>
Public Member Functions | |
Skylark_Adult (int x, int y, double size, int age, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh) | |
virtual void | ReInit (int x, int y, double size, int age, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh) |
~Skylark_Adult () override | |
virtual void | CopyMyself (int a_sktype) |
![]() | |
Skylark_Base (int x, int y, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh) | |
virtual void | ReInit (int x, int y, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh) |
virtual double | On_FoodSupply (double) |
void | AddStriglingMort (const int lifestage) const |
int | WhatState () override |
Returns the objects current state number. More... | |
bool | InSquare (rectangle R) const |
![]() | |
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... | |
virtual bool | OnFarmEvent (FarmToDo) |
Must be reimplemented if used in descendent classes. Sets the action on a management event. 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... | |
virtual void | BeginStep () |
BeingStep behaviour - must be implemented in descendent classes. More... | |
virtual void | Step () |
Step behaviour - must be implemented in descendent classes. More... | |
virtual void | EndStep () |
EndStep behaviour - must be implemented in descendent classes. More... | |
void | ReinitialiseObjectBase () |
Used to initialise an object. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject ()=default |
The destructor for TALMaSSObject. More... | |
Public Attributes | |
bool | Paired |
![]() | |
TTypesOfSkState | m_CurrentSkState |
int | Age |
double | m_Size |
int | m_Born_x |
int | m_Born_y |
int | m_MyHome |
The vegetation type where the skylark was born. More... | |
SkTerritories * | m_OurTerritories |
Skylark_Population_Manager * | m_OurPopulationManager |
Protected Member Functions | |
virtual double | RemoveEM (double food) |
double | GetVegHindrance (int PolyRef) const |
double | GetWeatherHindrance () const |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Static Protected Member Functions | |
static bool | GetBadWeather () |
Extreme weather conditions check. More... | |
![]() | |
static bool | DailyMortality (int mort) |
Protected Attributes | |
int | GoodWeather |
bool | BSuccess |
double | MyExtractEff |
int | m_pesticide_affected |
skTerritory_struct | MyTerritory |
vector< APoint > * | m_aTerrlist |
![]() | |
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... | |
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... | |
![]() | |
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... | |
Skylark_Adult::Skylark_Adult | ( | int | x, |
int | y, | ||
double | size, | ||
int | age, | ||
SkTerritories * | Terrs, | ||
Landscape * | L, | ||
Skylark_Population_Manager * | SPM, | ||
int | bx, | ||
int | by, | ||
int | mh | ||
) |
|
override |
References m_aTerrlist.
|
virtual |
References Skylark_Population_Manager::CreateObjects(), Skylark_Base::m_Born_x, Skylark_Base::m_Born_y, TAnimal::m_Location_x, TAnimal::m_Location_y, Skylark_Base::m_MyHome, TAnimal::m_OurLandscape, Skylark_Base::m_OurPopulationManager, Skylark_Base::m_OurTerritories, Skylark_Base::m_Size, and Skylark_struct::x.
Referenced by Skylark_Population_Manager::Catastrophe().
|
staticprotected |
Extreme weather conditions check.
Referenced by Skylark_Female::st_Arriving(), Skylark_Male::st_Arriving(), Skylark_Female::st_BuildingUpResources(), Skylark_Female::st_Finding_Territory(), Skylark_Female::st_Floating(), Skylark_Male::st_Floating(), Skylark_Female::st_Flocking(), Skylark_Male::st_Flocking(), Skylark_Female::st_TempLeavingArea(), and Skylark_Male::st_TempLeavingArea().
|
protected |
References cfg_tramline_foraging, TAnimal::m_OurLandscape, Landscape::SupplyHasTramlines(), Landscape::SupplySkScrapes(), Landscape::SupplyVegDensity(), Landscape::SupplyVegHeight(), Landscape::SupplyVegPatchy(), CfgFloat::value(), VegHindranceD, and VegHindranceH.
Referenced by Skylark_Male::GetFood().
|
protected |
References TAnimal::m_OurLandscape, RainHindrance, Landscape::SupplyRain(), Landscape::SupplyTemp(), and TempHindrance.
Referenced by Skylark_Male::GetFood().
|
virtual |
Reimplemented in Skylark_Male, and Skylark_Female.
References Skylark_Base::Age, BSuccess, g_random_fnc(), GoodWeather, m_aTerrlist, m_pesticide_affected, Skylark_Base::m_Size, MeanExtractionRatePerMinute, MyExtractEff, MyTerritory, Paired, skTerritory_struct::ref, and Skylark_Base::ReInit().
Referenced by Skylark_Female::ReInit(), and Skylark_Male::ReInit().
|
protectedvirtual |
References Skylark_Base::m_OurPopulationManager, and Skylark_Population_Manager::SupplyEMi().
Referenced by Skylark_Female::FeedYoung(), Skylark_Male::st_CaringForYoung(), and Skylark_Female::st_PreparingForBreeding().
|
protected |
Referenced by Skylark_Male::DefendTerritory(), Skylark_Female::EstablishTerritory(), Skylark_Female::OnBreedingSuccess(), Skylark_Female::OnMaleNeverComesBack(), Skylark_Male::OnMateDying(), Skylark_Female::OnMateHomeless(), Skylark_Male::OnMateLeaving(), Skylark_Male::OnMateNeverComesBack(), Skylark_Male::OnPairing(), Skylark_Male::OnPreFledgelingMature(), ReInit(), Skylark_Male::ReInit(), Skylark_Adult(), Skylark_Male::Skylark_Male(), Skylark_Female::st_Finding_Territory(), Skylark_Female::st_GivingUpTerritory(), Skylark_Male::st_Immigrating(), Skylark_Male::st_ScaringOffChicks(), and Skylark_Female::st_StoppingBreeding().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by Skylark_Female::GetFood(), Skylark_Male::GetFood(), ReInit(), and Skylark_Adult().
|
protected |
Referenced by Skylark_Female::CheckForFields(), Skylark_Male::ConstructAHabitatTable(), Skylark_Male::EstablishingATerritory(), Skylark_Female::EstablishTerritory(), Skylark_Male::OnEvicted(), Skylark_Female::OnMateDying(), Skylark_Female::OnMateHomeless(), Skylark_Male::OnMateLeaving(), Skylark_Male::OnReHouse(), Skylark_Male::ReEvaluateTerritory(), ReInit(), Skylark_Adult(), Skylark_Male::st_Arriving(), Skylark_Male::st_AttractingAMate(), Skylark_Female::st_Dying(), Skylark_Male::st_Dying(), Skylark_Male::st_FindingTerritory(), Skylark_Male::st_FollowingMate(), Skylark_Female::st_GivingUpTerritory(), Skylark_Female::st_StoppingBreeding(), and Skylark_Male::Supply_Territory().
bool Skylark_Adult::Paired |
Referenced by Skylark_Male::DefendTerritory(), Skylark_Female::EstablishTerritory(), Skylark_Female::OnBroodDeath(), Skylark_Male::OnBroodDeath(), Skylark_Female::OnClutchDeath(), Skylark_Male::OnEvicted(), Skylark_Female::OnFarmEvent(), Skylark_Female::OnMaleNeverComesBack(), Skylark_Male::OnMateDying(), Skylark_Female::OnMateHomeless(), Skylark_Male::OnMateLeaving(), Skylark_Male::OnMateNeverComesBack(), Skylark_Male::OnPairing(), Skylark_Male::OnPreFledgelingMature(), Skylark_Male::OnReHouse(), ReInit(), Skylark_Adult(), Skylark_Female::st_Arriving(), Skylark_Male::st_Dying(), Skylark_Female::st_Finding_Territory(), Skylark_Male::st_FollowingMate(), Skylark_Female::st_GivingUpTerritory(), Skylark_Clutch::st_Hatching(), Skylark_Female::st_Immigrating(), Skylark_Male::st_Immigrating(), Skylark_Female::st_StoppingBreeding(), Skylark_Female::Step(), and Skylark_Population_Manager::TheRipleysOutputProbe().