ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <skylarks_all.h>
|
virtual void | BeginStep (void) |
| BeingStep behaviour - must be implemented in descendent classes. More...
|
|
virtual void | Step (void) |
| Step behaviour - must be implemented in descendent classes. More...
|
|
virtual void | EndStep (void) |
| EndStep behaviour - must be implemented in descendent classes. More...
|
|
| Skylark_Clutch (Skylark_Female *Mum, SkTerritories *Terrs, Landscape *L, int NoEggs, int x, int y, int mh, Skylark_Population_Manager *SPM) |
|
virtual void | ReInit (Skylark_Female *Mum, SkTerritories *Terrs, Landscape *L, int NoEggs, int x, int y, int mh, Skylark_Population_Manager *SPM) |
|
void | OnMumGone () |
|
void | AddEgg () |
|
void | StartDeveloping () |
|
| 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 (int lifestage) |
|
virtual int | WhatState () |
|
bool | InSquare (rectangle R) |
|
unsigned | SupplyFarmOwnerRef () |
|
AnimalPosition | SupplyPosition () |
|
APoint | SupplyPoint () |
|
int | SupplyPolygonRef () |
|
int | Supply_m_Location_x () |
|
int | Supply_m_Location_y () |
|
virtual void | KillThis () |
|
virtual void | CopyMyself () |
|
void | SetX (int a_x) |
|
void | SetY (int a_y) |
|
| TAnimal (int x, int y, Landscape *L) |
|
virtual void | ReinitialiseObject (int x, int y, Landscape *L) |
| Used to re-use an object - must be implemented in descendent classes. More...
|
|
virtual void | Dying () |
|
void | CheckManagement (void) |
|
void | CheckManagementXY (int x, int y) |
|
int | GetCurrentStateNo () |
| Returns the current state number. More...
|
|
void | SetCurrentStateNo (int a_num) |
| Sets the current state number. More...
|
|
bool | GetStepDone () |
| Returns the step done indicator flag. More...
|
|
void | SetStepDone (bool a_bool) |
| Sets the step done indicator flag. More...
|
|
virtual void | ReinitialiseObject () |
| Used to re-use an object - must be implemented in descendent classes. More...
|
|
| TALMaSSObject () |
| The constructor for TALMaSSObject. More...
|
|
virtual | ~TALMaSSObject () |
| The destructor for TALMaSSObject. More...
|
|
void | OnArrayBoundsError () |
| Used for debugging only, tests basic object properties. More...
|
|
◆ Skylark_Clutch()
◆ AddEgg()
void Skylark_Clutch::AddEgg |
( |
| ) |
|
|
inline |
◆ BeginStep()
void Skylark_Clutch::BeginStep |
( |
void |
| ) |
|
|
virtual |
◆ EndStep()
void Skylark_Clutch::EndStep |
( |
void |
| ) |
|
|
virtual |
EndStep behaviour - must be implemented in descendent classes.
Reimplemented from TAnimal.
2719 if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
2728 #ifdef TEST_ISSUE_DEATH_WARRANT
2729 printf(
"Skylark_Clutch::EndStep() st_Developing() %d\n", (
int )g_date->Date() );
2743 #ifdef TEST_ISSUE_DEATH_WARRANT
2744 printf(
"Skylark_Clutch::EndStep() st_Hatching() %d\n", (
int )g_date->Date() );
2760 char errornum[ 20 ];
2762 g_land->
Warn(
"Skylark_Clutch::EndStep(): Unknown state: ", errornum );
References g_land, Skylark_Base::m_CurrentSkState, TALMaSSObject::m_CurrentStateNo, TALMaSSObject::m_StepDone, st_Developing(), st_Dying(), st_Hatching(), toss_CDying, toss_Destroy, toss_Developing, toss_Hatching, toss_Initiation, and Landscape::Warn().
◆ OnFarmEvent()
bool Skylark_Clutch::OnFarmEvent |
( |
FarmToDo |
event | ) |
|
|
protectedvirtual |
Reimplemented from TAnimal.
2539 #ifdef TEST_ISSUE_DEATH_WARRANT
2540 printf(
"Skylark_Clutch::OnFarmEvent() : %d : %d\n", event, (
int )g_date->Date() );
2564 #ifdef TEST_ISSUE_DEATH_WARRANT
2565 printf(
"Skylark_Female::OnFarmEvent() : %d : %d\n", event, (
int )g_date->Date() );
2580 if ( random( 100 ) < 2 ) {
2581 #ifdef TEST_ISSUE_DEATH_WARRANT
2582 printf(
"Skylark_Clutch::OnFarmEvent() : %d : %d\n", event, (
int )g_date->Date() );
2589 #ifndef __NoStriglingEffect
2591 #ifdef TEST_ISSUE_DEATH_WARRANT
2592 printf(
"Skylark_Clutch::OnFarmEvent() : %d : %d\n", event, (
int )g_date->Date() );
2603 if ( random( 1000 ) < 20 ) {
2604 #ifdef TEST_ISSUE_DEATH_WARRANT
2605 printf(
"Skylark_Clutch::OnFarmEvent() : %d : %d\n", event, (
int )g_date->Date() );
2613 if ( random( 1000 ) < 5 ) {
2614 #ifdef TEST_ISSUE_DEATH_WARRANT
2615 printf(
"Skylark_Clutch::OnFarmEvent() : %d : %d\n", event, (
int )g_date->Date() );
2622 #ifndef __NoPigsOutEffect
2623 if ( random( 100 ) < 20 ) {
2624 #ifdef TEST_ISSUE_DEATH_WARRANT
2625 printf(
"Skylark_Clutch::OnFarmEvent() : %d : %d\n", event, (
int )g_date->Date() );
2633 #ifndef __NoStriglingEffect
2635 #ifdef TEST_ISSUE_DEATH_WARRANT
2636 printf(
"Skylark_Clutch::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, burn_straw_stubble, cattle_out, cattle_out_low, cfg_insecticide_direct_mortE, cfg_strigling_clutch, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, Landscape::EventtypeToString(), fa_ammoniumsulphate, fa_greenmanure, fa_manure, fa_npk, fa_pk, fa_sludge, fa_slurry, fp_greenmanure, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_npk, fp_npks, fp_pk, fp_sludge, fp_slurry, fungicide_treat, g_land, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, herbicide_treat, hilling_up, insecticide_treat, Skylark_Base::m_CurrentSkState, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, molluscicide, mow, pigs_out, product_treat, row_cultivation, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, straw_chopping, strigling, strigling_sow, stubble_harrowing, Landscape::SupplyGrazingPressure(), swathing, syninsecticide_treat, toss_CDying, trial_insecticidetreat, Landscape::Warn(), water, and winter_plough.
◆ OnMumGone()
void Skylark_Clutch::OnMumGone |
( |
void |
| ) |
|
2662 if ( IsAlive() != 0x0DEADC0DE )
2667 #ifdef TEST_ISSUE_DEATH_WARRANT
2668 printf(
"Skylark_Clutch::OnMumGone() %d\n", (
int )g_date->Date() );
References Skylark_Base::m_CurrentSkState, TALMaSSObject::m_CurrentStateNo, Mother, and toss_Destroy.
Referenced by Skylark_Female::OnMateDying(), Skylark_Female::OnMateHomeless(), Skylark_Female::st_Dying(), Skylark_Female::st_GivingUpTerritory(), Skylark_Female::st_StartingNewBrood(), Skylark_Female::st_StoppingBreeding(), and Skylark_Female::Step().
◆ ReInit()
◆ st_Developing()
int Skylark_Clutch::st_Developing |
( |
| ) |
|
|
protected |
2771 if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
2786 int off_nest_time = 24 * 60 - incubated_time;
2825 double cool =
EggTemp - ( ( cool_rate_pmin * TripLength ) * ( (
EggTemp - Temp ) / 2.0 ) );
2829 if ( cool < Temp ) cool = Temp;
2833 double cooltime = (
EggTemp - cool ) / ( cool_rate_pmin * ( (
EggTemp - Temp ) / 2.0 ) );
2836 double AverageOffNestTemp = ( cool +
EggTemp ) / 2.0;
2843 if ( offnesttemp < 0 ) offnesttemp = 0;
2844 MinDegrees += int (( off_nest_time - cooltime ) * ( offnesttemp ));
2845 double transitiontemp = (int) AverageOffNestTemp -
MD_Threshold;
2846 if ( transitiontemp < 0 ) transitiontemp = 0;
2847 MinDegrees += (int) (( 2.0 * cooltime ) * ( transitiontemp ));
References Skylark_Base::Age, cfg_sk_triplength, ClutchMortProb, Cooling_Rate_Eggs, Skylark_Base::DailyMortality(), EggTemp, TAnimal::m_OurLandscape, Skylark_Base::m_OurPopulationManager, MD_Hatch, MD_Threshold, MinDegrees, Mother, Skylark_Female::Supply_NestTime(), Landscape::SupplyDayInYear(), Landscape::SupplyTemp(), and Skylark_Population_Manager::WriteSKPOM1().
Referenced by EndStep().
◆ st_Dying()
void Skylark_Clutch::st_Dying |
( |
| ) |
|
|
protected |
◆ st_Hatching()
int Skylark_Clutch::st_Hatching |
( |
| ) |
|
|
protected |
2883 if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
2902 g_land->
Warn(
"Skylark_Clutch::st_Hatching(): DeBug7 ", NULL ); exit( 1 );
References Skylark_struct::bx, Skylark_struct::by, Clutch_Size, Skylark_Population_Manager::CreateObjects(), Nestling_struct::Dad, g_land, Skylark_struct::L, 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_struct::mh, Mother, Skylark_Female::MyMate, Skylark_Female::OnEggsHatch(), Skylark_Adult::Paired, Skylark_struct::Terrs, Landscape::Warn(), Skylark_struct::x, and Skylark_struct::y.
Referenced by EndStep().
◆ StartDeveloping()
void Skylark_Clutch::StartDeveloping |
( |
| ) |
|
|
inline |
◆ Step()
void Skylark_Clutch::Step |
( |
void |
| ) |
|
|
virtual |
Step behaviour - must be implemented in descendent classes.
Reimplemented from TAnimal.
2684 if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
2690 g_land->
Warn(
"Skylark_Step::Step(): Debug_5 ",
"" );
2710 g_land->
Warn(
"Skylark_CLutch::Step(): Unknown State ",
"" );
References g_land, Skylark_Base::m_CurrentSkState, TALMaSSObject::m_StepDone, Mother, Skylark_Female::SupplyMyClutch(), toss_CDying, toss_Destroy, toss_Developing, toss_Hatching, toss_Initiation, and Landscape::Warn().
◆ Clutch_Size
int Skylark_Clutch::Clutch_Size |
◆ m_baddays
int Skylark_Clutch::m_baddays |
|
protected |
◆ MinDegrees
int Skylark_Clutch::MinDegrees |
|
protected |
◆ Mother
The documentation for this class was generated from the following files:
Definition: treatment.h:74
Definition: skylarks_all.h:47
Definition: treatment.h:77
Definition: treatment.h:89
Definition: treatment.h:38
double SupplyTemp(void)
Definition: Landscape.h:1386
static double Cooling_Rate_Eggs
Definition: skylarks_all.cpp:180
Definition: skylarks_all.h:47
Definition: treatment.h:65
Definition: treatment.h:37
Definition: treatment.h:41
TTypesOfSkState m_CurrentSkState
Definition: skylarks_all.h:594
int SupplyGrazingPressure(int a_polyref)
Definition: Landscape.h:1227
Definition: treatment.h:102
Landscape * L
Definition: skylarks_all.h:203
void AddStriglingMort(int lifestage)
Definition: skylarks_all.h:611
Definition: treatment.h:82
Landscape * m_OurLandscape
Definition: PopulationManager.h:229
Definition: treatment.h:52
int by
Definition: skylarks_all.h:201
int st_Developing()
Definition: skylarks_all.cpp:2769
Definition: treatment.h:68
int m_Born_y
Definition: skylarks_all.h:598
void st_Dying()
Definition: skylarks_all.cpp:2917
Definition: treatment.h:56
int x
Definition: skylarks_all.h:198
Definition: treatment.h:88
SkTerritories * m_OurTerritories
Definition: skylarks_all.h:602
static double MD_Hatch
Definition: skylarks_all.cpp:186
Definition: treatment.h:80
Definition: treatment.h:51
Definition: treatment.h:75
Definition: treatment.h:92
Definition: treatment.h:100
Definition: treatment.h:50
Definition: treatment.h:61
int m_MyHome
The vegetation type where the skylark was born.
Definition: skylarks_all.h:600
Definition: treatment.h:83
int MinDegrees
Definition: skylarks_all.h:644
Definition: treatment.h:49
Definition: treatment.h:90
static double EggTemp
Definition: skylarks_all.cpp:181
Definition: treatment.h:34
Definition: treatment.h:55
int m_Location_y
Definition: PopulationManager.h:228
Definition: treatment.h:95
int Supply_NestTime()
Definition: skylarks_all.h:818
Definition: skylarks_all.h:45
bool DailyMortality(int mort)
Definition: skylarks_all.cpp:2464
int Age
Definition: skylarks_all.h:595
int st_Hatching()
Definition: skylarks_all.cpp:2881
void WriteSKPOM1(int n, int n2)
Definition: skylarks_all.h:479
Definition: treatment.h:42
Skylark_Clutch * SupplyMyClutch()
Definition: skylarks_all.h:823
Skylark_Base(int x, int y, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh)
Definition: skylarks_all.cpp:2435
static int ClutchMortProb
Definition: skylarks_all.cpp:176
CfgInt cfg_insecticide_direct_mortE
Definition: treatment.h:57
Definition: treatment.h:87
Definition: treatment.h:73
Definition: treatment.h:43
SkTerritories * Terrs
Definition: skylarks_all.h:204
CfgFloat cfg_sk_triplength
int SupplyDayInYear(void)
Definition: Landscape.h:1596
Definition: treatment.h:93
Definition: treatment.h:62
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:118
bool Paired
Definition: skylarks_all.h:752
Definition: treatment.h:45
int Clutch_Size
Definition: skylarks_all.h:669
Definition: treatment.h:79
int m_Born_x
Definition: skylarks_all.h:597
std::string EventtypeToString(int a_event)
Definition: Landscape.cpp:3918
Definition: treatment.h:99
Definition: treatment.h:66
Definition: treatment.h:48
Definition: treatment.h:76
Definition: treatment.h:96
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:2449
void incTotalEggs(int eggs)
Definition: skylarks_all.h:537
int m_baddays
Definition: skylarks_all.h:645
Skylark_Population_Manager * m_OurPopulationManager
Definition: skylarks_all.h:603
Definition: treatment.h:44
int y
Definition: skylarks_all.h:199
Definition: treatment.h:67
void CheckManagement(void)
Landscape * g_land
Definition: skylarks_all.cpp:49
void CreateObjects(int ob_type, TAnimal *pTAo, void *null, Skylark_struct *data, int number)
Definition: skylarks_all.cpp:557
void OnClutchDeath()
Definition: skylarks_all.cpp:5990
Definition: treatment.h:46
Definition: treatment.h:94
Skylark_Male * Dad
Definition: skylarks_all.h:230
Definition: treatment.h:53
Definition: treatment.h:71
Definition: treatment.h:72
Definition: treatment.h:86
Definition: treatment.h:101
Skylark_Male * MyMate
Definition: skylarks_all.h:806
static double MD_Threshold
Definition: skylarks_all.cpp:182
int mh
Definition: skylarks_all.h:202
Definition: skylarks_all.h:47
CfgInt cfg_strigling_clutch
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:116
Definition: skylarks_all.h:62
Definition: treatment.h:84
void OnEggsHatch()
Definition: skylarks_all.cpp:6012
Skylark_Female * Mother
Definition: skylarks_all.h:670
Definition: treatment.h:85
Definition: treatment.h:47
void Warn(std::string a_msg1, std::string a_msg2)
Definition: Landscape.h:1579
Definition: treatment.h:33
int m_Location_x
Definition: PopulationManager.h:225
Definition: treatment.h:91
Definition: skylarks_all.h:227
int bx
Definition: skylarks_all.h:200
Definition: treatment.h:63
Definition: treatment.h:81