Loading [MathJax]/extensions/ams.js
 |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <skylarks_all.h>
|
| Skylark_Nestling (int x, int y, Skylark_Male *Daddy, Landscape *L, SkTerritories *Terrs, Skylark_Population_Manager *SPM, int bx, int by, int mh) |
|
virtual void | ReInit (int x, int y, Skylark_Male *Daddy, Landscape *L, SkTerritories *Terrs, Skylark_Population_Manager *SPM, int bx, int by, int mh) |
|
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...
|
|
double | On_FoodSupply (double food) override |
|
void | OnDadDead () |
|
void | OnYouHaveBeenEaten () |
|
void | OnDeserted () |
|
| 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) |
|
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...
|
|
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...
|
|
◆ Skylark_Nestling()
2619 x, y, Terrs, L, SPM, bx, by, mh) {
References Skylark_Base::Age, cfg_NestLeavingChance, cfg_PEmax, g_random_fnc(), m_Dad, m_EM, m_EM_fail, m_GrNeed, m_NestLeavingChance, Skylark_Base::m_Size, MeanHatchingWeight, Sex, CfgInt::value(), and CfgFloat::value().
◆ BeginStep()
void Skylark_Nestling::BeginStep |
( |
void |
| ) |
|
|
overridevirtual |
◆ EndStep()
void Skylark_Nestling::EndStep |
( |
void |
| ) |
|
|
overridevirtual |
EndStep behaviour - must be implemented in descendent classes.
Reimplemented from TALMaSSObject.
Reimplemented in Skylark_PreFledgeling.
2889 if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
2894 if ( !Dad->DoIExistN(
this ) ) {
2895 g_land->
Warn(
"Skylark_Nestling::EndStep - Do I ExistN ", NULL ); exit( 1 );
2900 case toss_NDeveloping:
2907 #ifdef TEST_ISSUE_DEATH_WARRANT
2908 printf(
"Skylark_Nestling::EndStep() : st_Developing() %d\n", (
int )
g_date->
Date() );
2930 #ifdef __PESTICIDE_RA
2931 PesticideResponse();
References Calendar::Date(), g_date, g_land, Skylark_Base::m_CurrentSkState, TALMaSSObject::m_CurrentStateNo, m_Dad, TALMaSSObject::m_StepDone, Skylark_Male::OnNestPredatation(), st_Developing(), st_Dying(), st_Maturing(), and Landscape::Warn().
◆ On_FoodSupply()
double Skylark_Nestling::On_FoodSupply |
( |
double |
food | ) |
|
|
overridevirtual |
◆ OnDadDead()
void Skylark_Nestling::OnDadDead |
( |
| ) |
|
◆ OnDeserted()
void Skylark_Nestling::OnDeserted |
( |
| ) |
|
◆ OnFarmEvent()
bool Skylark_Nestling::OnFarmEvent |
( |
FarmToDo |
| ) |
|
|
overrideprotectedvirtual |
Must be reimplemented if used in descendent classes. Sets the action on a management event.
Reimplemented from TAnimal.
Reimplemented in Skylark_PreFledgeling.
2768 #ifdef TEST_ISSUE_DEATH_WARRANT
2769 printf(
"Skylark_Nestling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
2779 #ifdef TEST_ISSUE_DEATH_WARRANT
2780 printf(
"Skylark_Nestling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
2789 #ifdef TEST_ISSUE_DEATH_WARRANT
2790 printf(
"Skylark_Nestling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
2799 #ifndef __NoStriglingEffect
2802 #ifdef TEST_ISSUE_DEATH_WARRANT
2803 printf(
"Skylark_Nestling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
2815 #ifdef TEST_ISSUE_DEATH_WARRANT
2816 printf(
"Skylark_Nestling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
2825 #ifdef TEST_ISSUE_DEATH_WARRANT
2826 printf(
"Skylark_Nestling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
2832 #ifndef __NoPigsOutEffect
2835 #ifdef TEST_ISSUE_DEATH_WARRANT
2836 printf(
"Skylark_Nestling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
References Skylark_Base::AddStriglingMort(), 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_mortN, cfg_strigling_nestling, 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_Location_x, TAnimal::m_Location_y, 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, Landscape::SupplyGrazingPressure(), swathing, syninsecticide_treat, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgInt::value(), Landscape::Warn(), water, winter_harrow, and winter_plough.
◆ OnYouHaveBeenEaten()
void Skylark_Nestling::OnYouHaveBeenEaten |
( |
| ) |
|
◆ ReInit()
References Skylark_Base::Age, cfg_NestLeavingChance, cfg_PEmax, g_random_fnc(), m_Dad, m_EM, m_EM_fail, m_GrNeed, m_NestLeavingChance, Skylark_Base::m_Size, MeanHatchingWeight, Skylark_Base::ReInit(), Sex, CfgInt::value(), and CfgFloat::value().
Referenced by Skylark_PreFledgeling::ReInit().
◆ st_Developing()
int Skylark_Nestling::st_Developing |
( |
| ) |
|
|
protectedvirtual |
Reimplemented in Skylark_PreFledgeling.
2941 if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
References Skylark_Base::Age, cfg_PEmax, Skylark_Base::DailyMortality(), EM_nest_T, g_random_fnc(), m_EM, m_GrNeed, m_NestLeavingChance, TAnimal::m_OurLandscape, Skylark_Base::m_OurPopulationManager, Skylark_Base::m_Size, NestLeavingWeight, NestlingMortProb, Landscape::SupplyDayInYear(), Landscape::SupplyTemp(), CfgFloat::value(), and Skylark_Population_Manager::WriteSKPOM2().
Referenced by EndStep().
◆ st_Dying()
void Skylark_Nestling::st_Dying |
( |
void |
| ) |
|
|
protectedvirtual |
◆ st_Maturing()
void Skylark_Nestling::st_Maturing |
( |
| ) |
|
|
protectedvirtual |
Reimplemented in Skylark_PreFledgeling.
3001 if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
References Skylark_Base::Age, Skylark_Population_Manager::CreateObjects(), Skylark_Base::m_Born_x, Skylark_Base::m_Born_y, m_Dad, 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, Sex, and Skylark_struct::x.
Referenced by EndStep().
◆ Step()
void Skylark_Nestling::Step |
( |
void |
| ) |
|
|
overridevirtual |
◆ m_Dad
◆ m_EM
double Skylark_Nestling::m_EM |
|
protected |
◆ m_EM_fail
int Skylark_Nestling::m_EM_fail |
|
protected |
◆ m_GrNeed
double Skylark_Nestling::m_GrNeed |
|
protected |
◆ m_NestLeavingChance
int Skylark_Nestling::m_NestLeavingChance |
|
protected |
◆ Sex
bool Skylark_Nestling::Sex |
|
protected |
The documentation for this class was generated from the following files:
Definition: Treatment.h:129
Definition: Treatment.h:64
Definition: Treatment.h:84
Definition: Treatment.h:71
static int NestlingMortProb
Definition: skylarks_all.cpp:159
double m_EM
Definition: skylarks_all.h:596
Definition: Treatment.h:88
Definition: Treatment.h:68
Definition: Treatment.h:144
Definition: Treatment.h:52
Definition: Treatment.h:89
Definition: Treatment.h:94
Definition: Treatment.h:142
void AddStriglingMort(const int lifestage) const
Definition: skylarks_all.h:531
double SupplyTemp(void)
Passes a request on to the associated Weather class function, the temperature for the current day.
Definition: Landscape.h:1993
Definition: Treatment.h:83
Definition: Treatment.h:99
Definition: Treatment.h:76
Definition: Treatment.h:35
Definition: Treatment.h:81
Definition: Treatment.h:43
Definition: Treatment.h:91
Definition: Treatment.h:127
Definition: Treatment.h:103
Definition: Treatment.h:121
virtual void st_Maturing()
Definition: skylarks_all.cpp:2999
Landscape * g_land
Definition: skylarks_all.cpp:44
Definition: Treatment.h:44
Definition: Treatment.h:56
Definition: Treatment.h:125
TTypesOfSkState m_CurrentSkState
Definition: skylarks_all.h:517
int SupplyGrazingPressure(int a_polyref)
Returns the grazing pressure of the polygon using the polygon reference number a_polyref or coordinat...
Definition: Landscape.h:1848
Definition: Treatment.h:61
Definition: Treatment.h:80
Definition: Treatment.h:60
class Calendar * g_date
Definition: Calendar.cpp:37
Definition: Treatment.h:90
Definition: Treatment.h:123
Definition: Treatment.h:131
Definition: Treatment.h:138
Definition: Treatment.h:122
Definition: Treatment.h:39
Definition: Treatment.h:110
Definition: Treatment.h:51
double value() const
Definition: Configurator.h:142
Definition: Treatment.h:143
const double EM_nest_T[14]
Definition: skylarks_all.cpp:144
Definition: Treatment.h:133
int m_Born_y
Definition: skylarks_all.h:521
Definition: Treatment.h:104
Definition: Treatment.h:85
int x
Definition: skylarks_all.h:209
static double MeanHatchingWeight
Definition: skylarks_all.cpp:161
SkTerritories * m_OurTerritories
Definition: skylarks_all.h:525
Definition: Treatment.h:140
Definition: Treatment.h:38
Definition: Treatment.h:117
virtual int st_Developing()
Definition: skylarks_all.cpp:2937
Definition: Treatment.h:120
Definition: Treatment.h:59
Definition: Treatment.h:100
int m_NestLeavingChance
Definition: skylarks_all.h:593
Definition: Treatment.h:150
Definition: Treatment.h:124
Definition: Treatment.h:139
Definition: Treatment.h:126
Definition: Treatment.h:149
Definition: Treatment.h:132
Definition: Treatment.h:148
Definition: Treatment.h:67
Definition: Treatment.h:42
Definition: Treatment.h:65
Skylark_Male * m_Dad
Definition: skylarks_all.h:595
Definition: Treatment.h:45
Definition: Treatment.h:98
bool Sex
Definition: skylarks_all.h:591
int m_MyHome
The vegetation type where the skylark was born.
Definition: skylarks_all.h:523
Definition: Treatment.h:77
Definition: Treatment.h:96
Definition: Treatment.h:54
Definition: Treatment.h:130
Definition: Treatment.h:97
Definition: Treatment.h:141
double m_GrNeed
Definition: skylarks_all.h:597
long Date(void)
Definition: Calendar.h:57
int m_Location_y
The objects ALMaSS y coordinate.
Definition: PopulationManager.h:366
Definition: Treatment.h:70
Definition: Treatment.h:46
static Landscape * m_OurLandscape
A pointer to the landscape object shared with all TAnimal objects.
Definition: PopulationManager.h:342
void CheckManagement()
Used to start a check for any management related effects at the objects current location.
Definition: PopulationManager.cpp:1591
static bool DailyMortality(int mort)
Definition: skylarks_all.cpp:2092
int Age
Definition: skylarks_all.h:518
Definition: Treatment.h:111
CfgInt cfg_strigling_nestling
Definition: Treatment.h:135
Definition: Treatment.h:82
Definition: Treatment.h:63
Definition: Treatment.h:62
Skylark_Base(int x, int y, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh)
Definition: skylarks_all.cpp:2058
Definition: Treatment.h:119
Definition: Treatment.h:72
Definition: Treatment.h:112
Definition: Treatment.h:137
Definition: Treatment.h:40
Definition: Treatment.h:53
int m_EM_fail
Definition: skylarks_all.h:592
CfgInt cfg_insecticide_direct_mortN
Definition: Treatment.h:145
Definition: Treatment.h:86
Definition: Treatment.h:49
int SupplyDayInYear(void)
Passes a request on to the associated Calendar class function, the day in the year.
Definition: Landscape.h:2267
Definition: Treatment.h:95
Definition: Treatment.h:147
Definition: Treatment.h:36
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:133
Definition: Treatment.h:116
Definition: Treatment.h:93
Definition: Treatment.h:114
int value() const
Definition: Configurator.h:116
Definition: Treatment.h:75
Definition: Treatment.h:47
Definition: Treatment.h:106
Definition: Treatment.h:109
Definition: Treatment.h:48
int m_Born_x
Definition: skylarks_all.h:520
std::string EventtypeToString(int a_event)
Returns the text representation of a treatment type.
Definition: Landscape.cpp:6024
const double CE_nest[15]
Definition: skylarks_all.cpp:149
Definition: Treatment.h:146
Definition: Treatment.h:134
Definition: Treatment.h:118
virtual void ReInit(int x, int y, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh)
Definition: skylarks_all.cpp:2074
Definition: Treatment.h:113
double m_Size
Definition: skylarks_all.h:519
CfgInt cfg_NestLeavingChance
Definition: Treatment.h:41
Skylark_Population_Manager * m_OurPopulationManager
Definition: skylarks_all.h:526
Definition: Treatment.h:37
void WriteSKPOM2(const int n, const int n2) const
Definition: skylarks_all.h:452
Definition: Treatment.h:79
Definition: Treatment.h:74
void CreateObjects(int ob_type, TAnimal *pTAo, void *null, Skylark_struct *data, int number)
Definition: skylarks_all.cpp:539
Definition: Treatment.h:136
Definition: Treatment.h:108
Definition: Treatment.h:69
Definition: Treatment.h:105
void OnNestlingDeath(const Skylark_Nestling *N)
Definition: skylarks_all.cpp:4665
Definition: Treatment.h:78
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
static double NestLeavingWeight
Definition: skylarks_all.cpp:155
Definition: Treatment.h:66
Definition: Treatment.h:92
Definition: Treatment.h:102
Definition: skylarks_all.h:238
Definition: Treatment.h:57
Definition: Treatment.h:87
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:131
Definition: Treatment.h:101
Definition: Treatment.h:73
Definition: Treatment.h:55
void Warn(std::string a_msg1, std::string a_msg2)
Wrapper for the g_msg Warn function.
Definition: Landscape.h:2250
Definition: Treatment.h:34
int m_Location_x
The objects ALMaSS x coordinate.
Definition: PopulationManager.h:362
Definition: Treatment.h:58
Definition: Treatment.h:128
virtual void st_Dying()
Definition: skylarks_all.cpp:3097
Definition: Treatment.h:50
Definition: Treatment.h:115
void OnNestPredatation()
Definition: skylarks_all.cpp:4701
Definition: Treatment.h:33
Definition: Treatment.h:107