ALMaSS Bembidion ODdox
1.1
The bembidion model description following ODdox protocol
|
The class describing the beetle larvae objects. More...
#include <bembidion_all.h>
Public Member Functions | |
Bembidion_Larvae (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) | |
Larvae class constructor. More... | |
void | ReInit (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) |
ReInit for object pool. More... | |
virtual void | BeginStep () |
Larvae class BeginStep code. More... | |
virtual void | Step () |
Larvae Step code. More... | |
virtual void | KillThis () |
Kill this larva. More... | |
Public Member Functions inherited from Bembidion_Base | |
Bembidion_Base (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) | |
Constructor. More... | |
void | ReInit (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) |
ReInit for object pool. More... | |
virtual void | EndStep () |
EndStep - empty. More... | |
virtual void | st_Die () |
Common state Die. More... | |
void | CopyMyself (int a_beetle) |
For experimental purposes. More... | |
void | CopyMyselfB (int a_beetle) |
For experimental purposes. More... | |
Public Member Functions inherited from TAnimal | |
unsigned | SupplyFarmOwnerRef () |
AnimalPosition | SupplyPosition () |
APoint | SupplyPoint () |
int | SupplyPolygonRef () |
int | Supply_m_Location_x () |
int | Supply_m_Location_y () |
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 int | WhatState () |
virtual void | Dying () |
void | CheckManagement (void) |
void | CheckManagementXY (int x, int y) |
Public Member Functions inherited from TALMaSSObject | |
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... | |
Protected Member Functions | |
int | st_Develop () |
Larvae state development. More... | |
void | st_Pupate () |
Larvae state pupation. More... | |
virtual bool | DailyMortality () |
Larvae non-temperature or density related mortality. More... | |
virtual bool | OnFarmEvent (FarmToDo event) |
Larvae reactions to management events. More... | |
bool | TempRelatedLarvalMortality (int temp2) |
Determine larval temperature related mortality. More... | |
Protected Member Functions inherited from TAnimal | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
double | m_AgeDegrees |
Record larvae day degrees. More... | |
int | m_LarvalStage |
Current larval growth stage (1-3) More... | |
int | m_DayMade |
Protected Attributes inherited from TAnimal | |
int | m_Location_x |
int | m_Location_y |
Landscape * | m_OurLandscape |
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 | |
Public Attributes inherited from Bembidion_Base | |
TTypesOfBeetleState | CurrentBState |
Current behavioural state. More... | |
Bembidion_Population_Manager * | m_OurPopulation |
Pointer to the population manager. More... | |
The class describing the beetle larvae objects.
Definition at line 217 of file bembidion_all.h.
Bembidion_Larvae::Bembidion_Larvae | ( | int | x, |
int | y, | ||
Landscape * | L, | ||
Bembidion_Population_Manager * | BPM | ||
) |
Larvae class constructor.
Definition at line 647 of file Bembidion_all.cpp.
References m_AgeDegrees, m_DayMade, m_LarvalStage, and Landscape::SupplyDayInYear().
|
virtual |
Larvae class BeginStep code.
Reimplemented from Bembidion_Base.
Definition at line 953 of file Bembidion_all.cpp.
References TAnimal::CheckManagement(), Bembidion_Base::CurrentBState, DailyMortality(), and tobs_LDying.
|
protectedvirtual |
Larvae non-temperature or density related mortality.
Definition at line 1004 of file Bembidion_all.cpp.
References DailyLarvaeMort, and g_rand_uni.
Referenced by BeginStep().
|
virtual |
Kill this larva.
Reimplemented from TAnimal.
Definition at line 946 of file Bembidion_all.cpp.
References Bembidion_Base::CurrentBState, and tobs_LDying.
|
protectedvirtual |
Larvae reactions to management events.
Reimplemented from TAnimal.
Definition at line 664 of file Bembidion_all.cpp.
References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, bed_forming, biocide, bulb_harvest, burn_straw_stubble, cattle_out, cattle_out_low, cfg_Larva_InsecticideApplication, cfg_Larva_SoilCultivationMortality, cfg_PesticideTrialLarvaeTreatmentMort, Bembidion_Base::CurrentBState, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, fa_ammoniumsulphate, fa_calcium, fa_greenmanure, fa_manganesesulphate, fa_manure, fa_npk, fa_npks, fa_pk, fa_rsm, fa_sludge, fa_slurry, flammebehandling, flower_cutting, fp_ammoniumsulphate, fp_calcium, fp_greenmanure, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_npk, fp_npks, fp_pk, fp_rsm, fp_sludge, fp_slurry, fungicide_treat, g_rand_uni, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, heavy_cultivator_aggregate, herbicide_treat, hilling_up, insecticide_treat, TAnimal::m_OurLandscape, molluscicide, mow, PesticideTrialLarvaeToxicMort, pigs_out, preseeding_cultivator, preseeding_cultivator_sow, product_treat, row_cultivation, shallow_harrow, 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, swathing, syninsecticide_treat, tobs_LDying, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgInt::value(), CfgFloat::value(), Landscape::Warn(), water, and winter_plough.
void Bembidion_Larvae::ReInit | ( | int | x, |
int | y, | ||
Landscape * | L, | ||
Bembidion_Population_Manager * | BPM | ||
) |
ReInit for object pool.
Definition at line 656 of file Bembidion_all.cpp.
References m_AgeDegrees, m_DayMade, m_LarvalStage, Bembidion_Base::ReInit(), and Landscape::SupplyDayInYear().
|
protected |
Larvae state development.
Determines temperature related mortality. If the larvae survives this then a density-dependent mortality is applied. If the the larvae survives the second mortality then development occurs based on the temperature experienced since the day before. Development rate depends on the larval stage. The code is speeded by these calculations being carried out by the Bembidion_Population_Manager for all eggs, larvae and adults extant each day, hence only one calculation needs to be done for each life-stage instead of potentially millions.
Definition at line 885 of file Bembidion_all.cpp.
References cfg_DDepRange, g_rand_uni, Bembidion_Population_Manager::LDDepMort0, Bembidion_Population_Manager::LDDepMort1, LDevelConst2, m_DayMade, Bembidion_Population_Manager::m_LarvaePosMap, m_LarvalStage, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, Population_Manager::SimH, Population_Manager::SimW, Bembidion_Population_Manager::SupplyLDayDeg(), Landscape::SupplyTemp(), TempRelatedLarvalMortality(), and CfgInt::value().
Referenced by Step().
|
protected |
Larvae state pupation.
Definition at line 928 of file Bembidion_all.cpp.
References struct_Bembidion::BPM, Bembidion_Population_Manager::CreateObjects(), struct_Bembidion::DayDegrees, struct_Bembidion::L, m_AgeDegrees, Bembidion_Population_Manager::m_LarvaePosMap, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, struct_Bembidion::x, and struct_Bembidion::y.
Referenced by Step().
|
virtual |
Larvae Step code.
Reimplemented from Bembidion_Base.
Definition at line 961 of file Bembidion_all.cpp.
References Bembidion_Base::CurrentBState, g_msg, TALMaSSObject::m_CurrentStateNo, Bembidion_Population_Manager::m_LarvaePosMap, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, TALMaSSObject::m_StepDone, st_Develop(), Bembidion_Base::st_Die(), st_Pupate(), tobs_Destroy, tobs_LDeveloping, tobs_LDying, tobs_Pupating, MapErrorMsg::Warn(), Landscape::Warn(), and WARN_BUG.
|
inlineprotected |
Determine larval temperature related mortality.
The idea here is that we calculate how long a larvae would expect to be at a temperature (based on today's temp) We also calculate the background mortality expected at that temperature then divide the total mortality by the number of days then apply that mortality today Problem is that we are dealing with percentages so this is not straight forward. The solution used here is to calculate a set of development and daily mort for 5 degree intervals then choose the closest.
Definition at line 864 of file Bembidion_all.cpp.
References g_rand_uni, LarvalDailyMort, and m_LarvalStage.
Referenced by st_Develop().
|
protected |
Record larvae day degrees.
Definition at line 242 of file bembidion_all.h.
Referenced by Bembidion_Larvae(), ReInit(), and st_Pupate().
|
protected |
Records the day hatched for development calculations
Definition at line 246 of file bembidion_all.h.
Referenced by Bembidion_Larvae(), ReInit(), and st_Develop().
|
protected |
Current larval growth stage (1-3)
Definition at line 244 of file bembidion_all.h.
Referenced by Bembidion_Larvae(), ReInit(), st_Develop(), and TempRelatedLarvalMortality().