ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <skylarks_all.h>
Public Member Functions | |
Skylark_Male (int x, int y, double size, int age, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh) | |
~Skylark_Male () override | |
void | ReInit (int x, int y, double size, int age, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh) override |
void | BeginStep (void) override |
BeingStep behaviour - must be implemented in descendent classes. More... | |
void | Step (void) override |
Step behaviour - must be implemented in descendent classes. More... | |
void | EndStep (void) override |
EndStep behaviour - must be implemented in descendent classes. More... | |
bool | OnEvicted () |
int | SupplyNoHabitatRefs () const |
int | SupplyBroodSize () const |
int | SupplyBroodAge (const int n) const |
double | Supply_TerritoryQual () const |
int | SupplyBroodWeight (const int n) const |
double | OnFoodMessage (const int n, const double f) const |
void | OnAddNestling (Skylark_Nestling *N) |
void | OnAddPreFledgeling (Skylark_PreFledgeling *P, const Skylark_Nestling *N) |
skTerritory_struct | Supply_Territory () const |
int | DefendTerritory () const |
void | OnEggHatch () |
void | OnMateDying () |
void | OnMateLeaving () |
void | OnPairing (Skylark_Female *female) |
void | OnBroodDeath () |
void | OnNestLocation (int x, int y) |
void | OnNestlingDeath (const Skylark_Nestling *N) |
void | OnPreFledgelingDeath (const Skylark_PreFledgeling *P) |
void | OnPreFledgelingMature (const Skylark_PreFledgeling *P) |
void | OnMateNeverComesBack (const Skylark_Female *AFemale) |
void | OnNestPredatation () |
void | OnBroodDesertion () |
void | OnReHouse () |
void | SensibleCopy () |
bool | SupplyNestValid () const |
APoint | SupplyNestLoc () const |
Public Member Functions inherited from 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) | |
~Skylark_Adult () override | |
virtual void | CopyMyself (int a_sktype) |
Public Member Functions inherited from Skylark_Base | |
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 |
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 Attributes | |
Skylark_Female * | MyMate |
int | BroodAge |
vector< int > | m_HabitatTable_PNum |
vector< int > | m_HabitatTable_Size |
vector< double > | m_InsectTable |
bool | HaveTerritory |
Public Attributes inherited from Skylark_Adult | |
bool | Paired |
Public Attributes inherited from Skylark_Base | |
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 | |
int | st_Flocking () |
TTypesOfSkState | st_Floating () |
bool | st_Arriving () const |
bool | st_Immigrating () |
int | st_Emigrating () |
int | st_TempLeavingArea () |
int | st_FindingTerritory () |
int | st_AttractingAMate () |
int | st_FollowingMate () |
void | ConstructAHabitatTable () |
int | EstablishingATerritory () |
int | st_ScaringOffChicks () |
int | st_CaringForYoung () |
void | st_Dying () |
void | ReEvaluateTerritory () |
Daily re-evaluation of territory. More... | |
double | GetFood (int time) |
void | OptimiseHabitatSearchingOrder () |
int | GetMigrationMortality () |
bool | OnFarmEvent (FarmToDo event) override |
Must be reimplemented if used in descendent classes. Sets the action on a management event. More... | |
Protected Member Functions inherited from Skylark_Adult | |
virtual double | RemoveEM (double food) |
double | GetVegHindrance (int PolyRef) const |
double | GetWeatherHindrance () const |
Protected Member Functions inherited from TAnimal | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
double | m_XFNestAcceptScore |
bool | m_firstPF |
int | GoodWeather |
int | m_BroodSize |
Skylark_Nestling * | m_Brood [26] |
int | No_HabitatTable_Refs |
int | m_MyMinTerritoryQual |
Protected Attributes inherited from Skylark_Adult | |
int | GoodWeather |
bool | BSuccess |
double | MyExtractEff |
int | m_pesticide_affected |
skTerritory_struct | MyTerritory |
vector< APoint > * | m_aTerrlist |
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... | |
Additional Inherited Members | |
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 Protected Member Functions inherited from Skylark_Adult | |
static bool | GetBadWeather () |
Extreme weather conditions check. More... | |
Static Protected Member Functions inherited from Skylark_Base | |
static bool | DailyMortality (int mort) |
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... | |
Skylark_Male::Skylark_Male | ( | int | x, |
int | y, | ||
double | size, | ||
int | age, | ||
SkTerritories * | Terrs, | ||
Landscape * | L, | ||
Skylark_Population_Manager * | SPM, | ||
int | bx, | ||
int | by, | ||
int | mh | ||
) |
The Male constructor. This initialises some important parameters.
There is some individual variation around the territory acceptance score, up to 10% max
References Skylark_Adult::BSuccess, cfg_FemaleMinTerritoryAcceptScore, g_rand_uni_fnc(), GoodWeather, HaveTerritory, m_Brood, m_BroodSize, m_firstPF, m_MyMinTerritoryQual, m_XFNestAcceptScore, MyMate, and CfgFloat::value().
|
overridevirtual |
BeingStep behaviour - must be implemented in descendent classes.
Reimplemented from TALMaSSObject.
References TAnimal::CheckManagement(), Skylark_Base::m_CurrentSkState, TALMaSSObject::m_StepDone, ReEvaluateTerritory(), st_CaringForYoung(), and st_Floating().
|
protected |
int Skylark_Male::DefendTerritory | ( | ) | const |
References Skylark_Base::Age, Skylark_Adult::BSuccess, and Skylark_Adult::Paired.
Referenced by st_FindingTerritory().
|
overridevirtual |
EndStep behaviour - must be implemented in descendent classes.
Reimplemented from TALMaSSObject.
References Skylark_Base::m_CurrentSkState.
|
protected |
References HaveTerritory, Skylark_Adult::m_aTerrlist, TAnimal::m_Location_x, TAnimal::m_Location_y, Skylark_Base::m_OurPopulationManager, Skylark_Base::m_OurTerritories, Skylark_Adult::MyTerritory, SkTerritories::Occupy(), skTerritory_struct::ref, skTerritory_struct::size, Population_Manager_Base::SupplySimH(), Population_Manager_Base::SupplySimW(), skTerritory_struct::x, and skTerritory_struct::y.
Referenced by OnReHouse(), and Step().
|
protected |
References Skylark_Adult::GetVegHindrance(), Skylark_Adult::GetWeatherHindrance(), KcalPerGInsect_kg_inv, m_HabitatTable_PNum, m_HabitatTable_Size, m_InsectTable, TAnimal::m_OurLandscape, Skylark_Adult::MyExtractEff, No_HabitatTable_Refs, TALMaSSObject::OnArrayBoundsError(), OptimiseHabitatSearchingOrder(), ppp_1, Landscape::SupplyInsects(), and Landscape::SupplyPesticide().
Referenced by st_CaringForYoung(), and st_FollowingMate().
|
protected |
References Skylark_Base::Age, JuvenileReturnMort, Skylark_Base::m_OurPopulationManager, and Skylark_Population_Manager::SupplyM_Mig_Mort().
Referenced by st_Immigrating().
void Skylark_Male::OnAddNestling | ( | Skylark_Nestling * | N | ) |
References m_Brood, m_BroodSize, and TALMaSSObject::OnArrayBoundsError().
Referenced by Skylark_Population_Manager::CreateObjects().
void Skylark_Male::OnAddPreFledgeling | ( | Skylark_PreFledgeling * | P, |
const Skylark_Nestling * | N | ||
) |
References g_land, m_Brood, m_BroodSize, m_firstPF, MyMate, Skylark_Female::OnBreedSuccess(), and Landscape::Warn().
Referenced by Skylark_Population_Manager::CreateObjects().
void Skylark_Male::OnBroodDeath | ( | ) |
References HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, MyMate, Skylark_Female::OnBroodDeath(), and Skylark_Adult::Paired.
Referenced by OnBroodDesertion(), OnNestlingDeath(), OnNestPredatation(), and OnPreFledgelingDeath().
void Skylark_Male::OnBroodDesertion | ( | ) |
References m_Brood, m_BroodSize, OnBroodDeath(), and Skylark_Nestling::OnDeserted().
void Skylark_Male::OnEggHatch | ( | ) |
References g_land, m_BroodSize, Skylark_Base::m_CurrentSkState, and Landscape::Warn().
Referenced by Skylark_Female::OnEggsHatch().
bool Skylark_Male::OnEvicted | ( | ) |
References SkTerritories::GetTerritoriesByDistance(), HaveTerritory, Skylark_Adult::m_aTerrlist, Skylark_Base::m_CurrentSkState, Skylark_Base::m_OurPopulationManager, Skylark_Base::m_OurTerritories, Skylark_Adult::MyTerritory, Skylark_Adult::Paired, skTerritory_struct::ref, SkTerritories::RemoveMale(), Skylark_Population_Manager::TheSkylarkTerrs, skTerritory_struct::x, and skTerritory_struct::y.
Referenced by st_FindingTerritory().
|
overrideprotectedvirtual |
Must be reimplemented if used in descendent classes. Sets the action on a management event.
Reimplemented from TAnimal.
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_insecticide_direct_mortM, cut_to_hay, cut_to_silage, cut_weeds, Calendar::Date(), deep_ploughing, Landscape::EventtypeToString(), 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_date, g_land, 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, Skylark_Base::m_CurrentSkState, TAnimal::m_OurLandscape, 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, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgInt::value(), Landscape::Warn(), water, winter_harrow, and winter_plough.
|
inline |
References Skylark_Nestling::On_FoodSupply().
Referenced by Skylark_Female::FeedYoung().
void Skylark_Male::OnMateDying | ( | ) |
void Skylark_Male::OnMateLeaving | ( | ) |
References Skylark_Adult::BSuccess, g_stopdate, skTTerritory::GetQuality(), HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, m_MyMinTerritoryQual, TAnimal::m_OurLandscape, Skylark_Base::m_OurTerritories, MyMate, Skylark_Adult::MyTerritory, skTerritory_struct::nqual, Skylark_Nestling::OnDadDead(), Skylark_Adult::Paired, skTerritory_struct::ref, SkTerritories::RemoveMale(), SkTerritories::Supply_terr(), and Landscape::SupplyDayInYear().
Referenced by Skylark_Female::st_GivingUpTerritory(), and Skylark_Female::st_StoppingBreeding().
void Skylark_Male::OnMateNeverComesBack | ( | const Skylark_Female * | AFemale | ) |
References Skylark_Adult::BSuccess, MyMate, and Skylark_Adult::Paired.
Referenced by Skylark_Female::st_Finding_Territory(), and Skylark_Female::st_Immigrating().
void Skylark_Male::OnNestlingDeath | ( | const Skylark_Nestling * | N | ) |
References g_land, m_Brood, m_BroodSize, TALMaSSObject::OnArrayBoundsError(), OnBroodDeath(), and Landscape::Warn().
Referenced by Skylark_Nestling::st_Dying().
void Skylark_Male::OnNestLocation | ( | int | x, |
int | y | ||
) |
References TAnimal::m_Location_x, and TAnimal::m_Location_y.
Referenced by Skylark_Female::st_MakingNest().
void Skylark_Male::OnNestPredatation | ( | ) |
References m_Brood, m_BroodSize, OnBroodDeath(), and Skylark_Nestling::OnYouHaveBeenEaten().
Referenced by Skylark_Nestling::EndStep().
void Skylark_Male::OnPairing | ( | Skylark_Female * | female | ) |
void Skylark_Male::OnPreFledgelingDeath | ( | const Skylark_PreFledgeling * | P | ) |
References g_land, m_Brood, m_BroodSize, TALMaSSObject::OnArrayBoundsError(), OnBroodDeath(), and Landscape::Warn().
Referenced by Skylark_PreFledgeling::st_Dying().
void Skylark_Male::OnPreFledgelingMature | ( | const Skylark_PreFledgeling * | P | ) |
References Skylark_Adult::BSuccess, HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, MyMate, TALMaSSObject::OnArrayBoundsError(), Skylark_Female::OnBreedingSuccess(), Skylark_Female::OnStopFeedingChicks(), and Skylark_Adult::Paired.
Referenced by Skylark_PreFledgeling::st_Maturing().
void Skylark_Male::OnReHouse | ( | ) |
References EstablishingATerritory(), Skylark_Female::EstablishTerritory(), SkTerritories::FemaleOccupy(), HaveTerritory, Skylark_Base::m_CurrentSkState, Skylark_Base::m_OurTerritories, MyMate, Skylark_Adult::MyTerritory, Skylark_Female::OnMateHomeless(), Skylark_Adult::Paired, skTerritory_struct::ref, skTerritory_struct::size, SkTerritories::Supply_Owner(), SkTerritories::Supply_size(), SkTerritories::Supply_x(), SkTerritories::Supply_y(), SkTerritories::SupplyIsNestValid(), SkTerritories::SupplyNoTerritories(), skTerritory_struct::validnest, skTerritory_struct::x, and skTerritory_struct::y.
|
protected |
References m_HabitatTable_PNum, m_HabitatTable_Size, m_InsectTable, and No_HabitatTable_Refs.
Referenced by GetFood().
|
protected |
Daily re-evaluation of territory.
The method is designed to keep the measure of territory quality up to date and avoids the need for the female to do this unless finding a nest position. The second usage is to provide the potential to reduce territory size should conditions improve. The reverse situation results in desertion by the female so is not handled here.
References skTTerritory::GetQuality(), skTTerritory::GetVirtualDiameter(), Skylark_Base::m_OurTerritories, m_XFNestAcceptScore, Skylark_Adult::MyTerritory, skTerritory_struct::nqual, skTerritory_struct::ref, SkTerritories::Split(), SkTerritories::Supply_terr(), and skTerritory_struct::validnest.
Referenced by BeginStep().
|
overridevirtual |
The Male constructor. This initialises some important parameters.
There is some individual variation around the territory acceptance score, up to 10% max
Reimplemented from Skylark_Adult.
References Skylark_Adult::BSuccess, cfg_FemaleMinTerritoryAcceptScore, g_rand_uni_fnc(), GoodWeather, HaveTerritory, m_Brood, m_BroodSize, m_firstPF, m_MyMinTerritoryQual, m_XFNestAcceptScore, MyMate, Skylark_Adult::ReInit(), and CfgFloat::value().
void Skylark_Male::SensibleCopy | ( | ) |
References Skylark_Base::m_CurrentSkState.
Referenced by Skylark_Population_Manager::CreateObjects().
|
protected |
References Skylark_Adult::GetBadWeather(), SkTerritories::GetTerritoriesByDistance(), Skylark_Adult::m_aTerrlist, Skylark_Base::m_Born_x, Skylark_Base::m_Born_y, Skylark_Base::m_OurPopulationManager, Skylark_Adult::MyTerritory, skTerritory_struct::ref, Skylark_Population_Manager::TheSkylarkTerrs, skTerritory_struct::x, and skTerritory_struct::y.
Referenced by Step().
|
protected |
Is called once each day. If a female comes along and pairs then she will trigger a move to FollowMate via Skylark_Male::OnPairing
References g_stopdate, HaveTerritory, TAnimal::m_OurLandscape, Skylark_Base::m_OurTerritories, Skylark_Adult::MyTerritory, skTerritory_struct::ref, SkTerritories::RemoveMale(), and Landscape::SupplyDayInYear().
Referenced by Step().
|
protected |
References Skylark_Base::Age, FoodTripsPerDay, g_random_fnc(), GetFood(), m_Brood, m_BroodSize, TAnimal::m_OurLandscape, Skylark_Base::m_Size, MaxFeedRain, Skylark_Nestling::On_FoodSupply(), Skylark_Adult::RemoveEM(), Landscape::SupplyDaylength(), and Landscape::SupplyRain().
Referenced by BeginStep().
|
protected |
References g_land, HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, TALMaSSObject::m_CurrentStateNo, Skylark_Base::m_OurTerritories, Skylark_Female::MyMate, MyMate, Skylark_Adult::MyTerritory, Skylark_Nestling::OnDadDead(), Skylark_Female::OnMateDying(), Skylark_Adult::Paired, skTerritory_struct::ref, SkTerritories::RemoveMale(), and Landscape::Warn().
Referenced by Step().
|
protected |
References Skylark_Base::Age, April, cfg_ReturnProbability, February, g_random_fnc(), g_stopdate, GoodWeather, January, TAnimal::m_OurLandscape, March, Landscape::SupplyDayInYear(), Landscape::SupplyTemp(), and CfgFloat::value().
Referenced by Step().
|
protected |
This option picks 10 territories at random and tests them. This will happen if the bird arrives here without an m_aTerrlist, or because it has exhausted its list of possible territories.
This option is for birds with a valid m_aTerrlist to search. It takes the 10 nearest territories one at a time and tests to see if they are OK If so establish in one of them, otherwise wait until another day to test the next 10
References Skylark_Base::Age, DefendTerritory(), g_random_fnc(), Skylark_Adult::m_aTerrlist, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MyMinTerritoryQual, Skylark_Base::m_OurTerritories, APoint::m_x, Skylark_Adult::MyTerritory, OnEvicted(), skTerritory_struct::ref, skTerritory_struct::size, SkTerritories::Supply_Owner(), SkTerritories::Supply_quality(), SkTerritories::Supply_size(), SkTerritories::Supply_x(), SkTerritories::Supply_y(), SkTerritories::SupplyIsNestValid(), SkTerritories::SupplyNoTerritories(), skTerritory_struct::validnest, skTerritory_struct::x, and skTerritory_struct::y.
Referenced by Step().
|
protected |
References g_random_fnc(), g_stopdate, Skylark_Adult::GetBadWeather(), TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Skylark_Base::m_OurPopulationManager, Landscape::SupplyDayInYear(), Population_Manager_Base::SupplySimH(), and Population_Manager_Base::SupplySimW().
Referenced by BeginStep().
|
protected |
The bird is assumed to move around the area waiting until weather conditions are suitable to begin Emigration, depending upon the time of year. Only arrives here after breeding, so poor conditions will trigger a transition to Emigration. A transition to Emigration will also occur if the bird has not emigrated before October.
References Skylark_Adult::GetBadWeather(), GoodWeather, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, October, September, and Landscape::SupplyDayInYear().
Referenced by Step().
|
protected |
This is simply waiting for a message to say that either female is dead, female leaves or the eggs hatch. The male occupies the same location as the female. When the female's eggs hatch there is a transition to st_CaringForYoung. If the female dies or abandons the territory, there is a transition to AttractingAMate. This method also has another function in that it sets up the food tables for the female, hence must be called before female activity starts.
References GetFood(), HaveTerritory, Skylark_Base::m_CurrentSkState, Skylark_Base::m_OurTerritories, Skylark_Adult::MyTerritory, Skylark_Adult::Paired, skTerritory_struct::ref, and SkTerritories::RemoveMale().
Referenced by Step().
|
protected |
An instantaneous state which determines the chance of migration mortality. If he does die then he has to inform any old mate that he has gone. If she is already paired with another bird then can just forget her. If not dying then the bird transitions to st_Arrival.
References Skylark_Base::Age, Skylark_Adult::BSuccess, g_random_fnc(), GetMigrationMortality(), m_Brood, m_BroodSize, MyMate, Skylark_Female::OnMaleNeverComesBack(), and Skylark_Adult::Paired.
Referenced by Step().
|
protected |
References Skylark_Adult::BSuccess, m_Brood, m_BroodSize, m_firstPF, MyMate, Skylark_Female::OnBreedingSuccess(), Skylark_Nestling::OnDadDead(), and Skylark_Female::OnStopFeedingChicks().
Referenced by Step().
|
protected |
|
overridevirtual |
Step behaviour - must be implemented in descendent classes.
Reimplemented from TALMaSSObject.
References Skylark_Base::Age, BroodAge, Calendar::Date(), EstablishingATerritory(), g_date, g_land, HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, TAnimal::m_Location_x, TAnimal::m_Location_y, Skylark_Base::m_OurPopulationManager, TALMaSSObject::m_StepDone, st_Arriving(), st_AttractingAMate(), st_Dying(), st_Emigrating(), st_FindingTerritory(), st_Flocking(), st_FollowingMate(), st_Immigrating(), st_ScaringOffChicks(), st_TempLeavingArea(), Population_Manager::SupplyStateNames(), and Landscape::Warn().
skTerritory_struct Skylark_Male::Supply_Territory | ( | ) | const |
References Skylark_Adult::MyTerritory.
Referenced by Skylark_Female::EstablishTerritory(), and Skylark_Female::st_Finding_Territory().
|
inline |
brief Provide todays territory quality
Referenced by Skylark_Female::st_BuildingUpResources(), Skylark_Female::st_MakingNest(), and Skylark_Female::st_StartingNewBrood().
|
inline |
References Skylark_Base::Age.
Referenced by Skylark_Female::FeedYoung(), and Skylark_Female::st_CaringForYoung().
|
inline |
Referenced by Skylark_Female::FeedYoung(), and Skylark_Female::st_GivingUpTerritory().
|
inline |
Referenced by Skylark_Female::FeedYoung().
|
inline |
Referenced by Skylark_Female::st_MakingNest().
|
inline |
Referenced by Skylark_Female::st_MakingNest().
|
inline |
Referenced by Skylark_Female::GetFood().
int Skylark_Male::BroodAge |
Referenced by Step().
|
protected |
Referenced by ReInit(), Skylark_Male(), st_Emigrating(), st_Flocking(), and st_TempLeavingArea().
bool Skylark_Male::HaveTerritory |
|
protected |
Referenced by OnAddNestling(), OnAddPreFledgeling(), OnBroodDeath(), OnBroodDesertion(), OnMateDying(), OnMateLeaving(), OnNestlingDeath(), OnNestPredatation(), OnPreFledgelingDeath(), OnPreFledgelingMature(), ReInit(), Skylark_Male(), st_CaringForYoung(), st_Dying(), st_Immigrating(), st_ScaringOffChicks(), and Step().
|
protected |
Referenced by OnAddNestling(), OnAddPreFledgeling(), OnBroodDeath(), OnBroodDesertion(), OnEggHatch(), OnMateDying(), OnMateLeaving(), OnNestlingDeath(), OnNestPredatation(), OnPreFledgelingDeath(), OnPreFledgelingMature(), ReInit(), Skylark_Male(), st_CaringForYoung(), st_Dying(), st_Immigrating(), st_ScaringOffChicks(), and Step().
|
protected |
Referenced by OnAddPreFledgeling(), ReInit(), Skylark_Male(), and st_ScaringOffChicks().
vector<int> Skylark_Male::m_HabitatTable_PNum |
Referenced by ConstructAHabitatTable(), GetFood(), and OptimiseHabitatSearchingOrder().
vector<int> Skylark_Male::m_HabitatTable_Size |
Referenced by ConstructAHabitatTable(), Skylark_Female::GetFood(), GetFood(), and OptimiseHabitatSearchingOrder().
vector<double> Skylark_Male::m_InsectTable |
Referenced by ConstructAHabitatTable(), Skylark_Female::GetFood(), GetFood(), and OptimiseHabitatSearchingOrder().
|
protected |
Referenced by OnMateLeaving(), ReInit(), Skylark_Male(), and st_FindingTerritory().
|
protected |
Referenced by ReEvaluateTerritory(), ReInit(), and Skylark_Male().
Skylark_Female* Skylark_Male::MyMate |
|
protected |
Referenced by ConstructAHabitatTable(), GetFood(), and OptimiseHabitatSearchingOrder().