ALMaSS Bembidion ODdox
1.1
The bembidion model description following ODdox protocol
|
The class describing the adult (female) beetle objects. More...
#include <bembidion_all.h>
Public Member Functions | |
Bembidion_Adult (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) | |
void | ReInit (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) |
ReInit for object pool. More... | |
virtual | ~Bembidion_Adult () |
virtual void | Step () |
Adult Step. More... | |
virtual void | BeginStep () |
Adult BeginStep. More... | |
virtual void | EndStep () |
Adult EndStep. More... | |
void | SetBodyBurden (double a_pcide) |
void | SetPPPThreshold (double a_thresh) |
void | SetPPPEffectProb (double a_conc) |
void | SetPPPEffectProbDecay (double a_decay) |
void | SetAdultPPPElimRate (double a_rate) |
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 | 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 | 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 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 | |
void | Init () |
Intitialise attribute values. More... | |
int | st_Forage () |
Foraging behaviour. More... | |
int | st_Aggregate () |
Aggregation behaviour. More... | |
int | st_Hibernate () |
Hibernation behaviour. More... | |
int | st_Dispersal () |
Intiate Dispersal behaviour. More... | |
bool | st_Aging () |
Daily ageing. More... | |
bool | WinterMort () |
Density-independent winter mortality. More... | |
bool | DDepMort () |
Density-dependent mortality. More... | |
int | DailyMovement (int p_distance, bool disp_aggreg) |
Initiates the daily movement for the beelt. More... | |
void | MoveTo (int p_dist, unsigned p_direction, int p_turning) |
Moves attempting egg laying under way. More... | |
int | MoveTo_quality_assess () |
Moves w.r.t. habitat quality only. More... | |
int | MoveToAggr (int p_dist, unsigned p_direction, int p_turning) |
Moves using a stopping rule for hibernation. More... | |
void | Reproduce (int p_x, int p_y) |
Produces the eggs. More... | |
void | CanReproduce () |
Does reproduction if possible. More... | |
virtual bool | DailyMortality () |
Density-independent mortality. More... | |
virtual bool | OnFarmEvent (FarmToDo event) |
Adult reactions to management events. More... | |
virtual void | InternalPesticideHandlingAndResponse () |
Hand pesticide events code for the beetle. More... | |
Protected Member Functions inherited from TAnimal | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
double | m_negDegrees |
The number of negative day degrees experienced. More... | |
double | m_HibernateDegrees |
The number of day degrees experienced in the spring which may trigger dispersal. More... | |
int | OldDirection |
The last direction moved. More... | |
int | m_EggCounter |
The number of eggs produced. More... | |
bool | m_CanReproduce |
Signal reproductive readiness. More... | |
double | m_body_burden |
Current body burden of pesticide. More... | |
double | m_currentPPPEffectProb |
Current effect probability. More... | |
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... | |
Static Protected Attributes | |
static param_List15 | pList |
A helper attribute when simulating movement. More... | |
static param_Point | pPoint |
A helper attribute when simulating movement. More... | |
static double | m_AdultPPPElimRate = 0 |
the daily elimination rate for pesticides More... | |
static double | m_PPPThreshold = 0 |
PPP effects threshold. More... | |
static double | m_PPPEffectProb = 0 |
Effect probability on threshold excedence. More... | |
static double | m_PPPEffectProbDecay = 0 |
Effect probability on threshold excedence. 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 adult (female) beetle objects.
Definition at line 291 of file bembidion_all.h.
Bembidion_Adult::Bembidion_Adult | ( | int | x, |
int | y, | ||
Landscape * | L, | ||
Bembidion_Population_Manager * | BPM | ||
) |
|
virtual |
|
virtual |
Adult BeginStep.
Reimplemented from Bembidion_Base.
Definition at line 2189 of file Bembidion_all.cpp.
References TAnimal::CheckManagement(), Bembidion_Base::CurrentBState, st_Aging(), and tobs_ADying.
|
protected |
Does reproduction if possible.
Definition at line 1862 of file Bembidion_all.cpp.
References param_List15::BeenThereX, param_List15::BeenThereY, m_CanReproduce, m_EggCounter, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, param_List15::nsteps, pList, Reproduce(), Landscape::SupplyElementType(), Bembidion_Population_Manager::TodaysEggProduction, tole_BeetleBank, tole_Field, tole_FieldBoundary, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_RoadsideVerge, tole_UnsprayedFieldMargin, tole_WaterBufferZone, and tole_YoungForest.
Referenced by MoveTo().
|
protectedvirtual |
Density-independent mortality.
Determines whether mortality has occured due to density-independen factors. Uses DailyAdultMort as a probability of dying.
Definition at line 2306 of file Bembidion_all.cpp.
References DailyAdultMort, and g_rand_uni.
Referenced by st_Aging().
|
protected |
Initiates the daily movement for the beelt.
Depending whether the beetle is dispersing or aggregating this calls either MoveTo or MoveToAggr.
Definition at line 1724 of file Bembidion_all.cpp.
References AdultTurnRate, DDepMort(), TAnimal::m_OurLandscape, MoveTo(), MoveToAggr(), OldDirection, and Landscape::SupplyTemp().
Referenced by st_Aggregate(), st_Dispersal(), and st_Forage().
|
protected |
Density-dependent mortality.
Determines whether mortality has occured due to density-dependence. Uses ADDepMort1 as a probability of dying if adult beetles are found by GetMapDensity.
Definition at line 2321 of file Bembidion_all.cpp.
References Bembidion_Population_Manager::ADDepMort0, Bembidion_Population_Manager::ADDepMort1, cfg_DDepRange, g_rand_uni, Bembidion_Population_Manager::m_AdultPosMap, TAnimal::m_Location_x, TAnimal::m_Location_y, Bembidion_Base::m_OurPopulation, Population_Manager::SimH, Population_Manager::SimW, and CfgInt::value().
Referenced by DailyMovement().
|
virtual |
Adult EndStep.
Reimplemented from Bembidion_Base.
Definition at line 2197 of file Bembidion_all.cpp.
References g_rand_uni, InternalPesticideHandlingAndResponse(), m_AdultPPPElimRate, m_body_burden, m_currentPPPEffectProb, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, ppp_1, Bembidion_Base::st_Die(), and Landscape::SupplyPesticide().
|
protected |
Intitialise attribute values.
Definition at line 1383 of file Bembidion_all.cpp.
References m_body_burden, m_CanReproduce, m_currentPPPEffectProb, m_EggCounter, m_HibernateDegrees, m_negDegrees, and OldDirection.
Referenced by Bembidion_Adult(), and ReInit().
|
protectedvirtual |
Hand pesticide events code for the beetle.
If the body burden exceeds the trigger then an effect is tested for and implemented depending on the pesticide type.
Definition at line 2157 of file Bembidion_all.cpp.
References g_msg, g_rand_uni, m_body_burden, m_currentPPPEffectProb, TAnimal::m_OurLandscape, m_PPPEffectProb, m_PPPEffectProbDecay, m_PPPThreshold, Bembidion_Base::st_Die(), Landscape::SupplyPesticideType(), ttop_AcuteDelayedEffects, ttop_AcuteEffects, ttop_MultipleEffects, ttop_NoPesticide, ttop_ReproductiveEffects, and MapErrorMsg::Warn().
Referenced by EndStep().
|
protected |
Moves attempting egg laying under way.
Move p_distance steps in p_direction with p_turning out of 100 chance of changing p_direction. This function will alter m_Location_x & m_Location_y.
p_direction gives the preferred direction (0-7)
p_distance is the number of steps
The beetles will stop moving in suitable hibernatio habitat late in the year.
This method is very similar to Bembidion_Adult::MoveToAggr but differs in the direction of movement relative to habitat types and the end of movement behaviour. In this case the beetl tries to lay eggs in MoveToAggre it test for hibernation conditions.
Try to reproduce
Definition at line 1746 of file Bembidion_all.cpp.
References param_List15::BeenThereX, param_List15::BeenThereY, CanReproduce(), param_Point::direction, Bembidion_Population_Manager::m_AdultPosMap, TAnimal::m_Location_x, TAnimal::m_Location_y, Bembidion_Base::m_OurPopulation, MoveTo_quality_assess(), param_List15::nsteps, OldDirection, pList, pPoint, Population_Manager::SimH, Population_Manager::SimW, Vector_x, Vector_y, param_Point::x, and param_Point::y.
Referenced by DailyMovement().
|
inlineprotected |
Moves w.r.t. habitat quality only.
A version of MoveTo where movement is determined by the suitability of the habitat moved to.
Definition at line 1931 of file Bembidion_all.cpp.
References param_Point::direction, Bembidion_Population_Manager::m_AdultPosMap, Bembidion_Population_Manager::m_MoveMap, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, pPoint, Landscape::Warn(), param_Point::x, and param_Point::y.
Referenced by MoveTo().
|
protected |
Moves using a stopping rule for hibernation.
Move p_distance steps in p_direction with p_turning out of 100 chance of changing p_direction. This function will alter m_Location_x & m_Location_y.
p_direction gives the preferred direction (0-7)
p_distance is the number of steps
The beetles will stop moving in suitable hibernatio habitat late in the year.
Definition at line 1974 of file Bembidion_all.cpp.
References FieldHibernateChance, Bembidion_Population_Manager::m_AdultPosMap, TAnimal::m_Location_x, TAnimal::m_Location_y, Bembidion_Population_Manager::m_MoveMap, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, OldDirection, Population_Manager::SimH, Population_Manager::SimW, StopAggregationDay, Landscape::SupplyDayInYear(), Landscape::SupplyElementType(), tole_AmenityGrass, tole_BeetleBank, tole_FieldBoundary, tole_Heath, tole_HedgeBank, tole_Hedges, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_RoadsideVerge, tole_WaterBufferZone, tole_YoungForest, Vector_x, Vector_y, and Landscape::Warn().
Referenced by DailyMovement().
|
protectedvirtual |
Adult reactions to management events.
Reimplemented from TAnimal.
Definition at line 1397 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_Adult_InsecticideApplication, cfg_Adult_SoilCultivationMortality, cfg_BeetleHarvestMort, cfg_BeetleStriglingMort, cfg_PesticideTrialAdultTreatmentMort, 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, PesticideTrialAdultToxicMort, 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_ADying, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgInt::value(), CfgFloat::value(), Landscape::Warn(), water, and winter_plough.
void Bembidion_Adult::ReInit | ( | int | x, |
int | y, | ||
Landscape * | L, | ||
Bembidion_Population_Manager * | BPM | ||
) |
ReInit for object pool.
Definition at line 1372 of file Bembidion_all.cpp.
References Init(), and Bembidion_Base::ReInit().
|
protected |
Produces the eggs.
Definition at line 1910 of file Bembidion_all.cpp.
References struct_Bembidion::BPM, Bembidion_Population_Manager::CreateObjects(), struct_Bembidion::DayDegrees, struct_Bembidion::HowMany, struct_Bembidion::L, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, struct_Bembidion::x, and struct_Bembidion::y.
Referenced by CanReproduce().
|
inline |
Set body burden elimination rate for adults
Definition at line 316 of file bembidion_all.h.
References m_AdultPPPElimRate.
Referenced by Bembidion_Population_Manager::Init().
|
inline |
|
inline |
Set body PPP effect probability
Definition at line 312 of file bembidion_all.h.
References m_PPPEffectProb.
Referenced by Bembidion_Population_Manager::Init().
|
inline |
Set body PPP effect probability
Definition at line 314 of file bembidion_all.h.
References m_PPPEffectProbDecay.
Referenced by Bembidion_Population_Manager::Init().
|
inline |
Set body PPP threshold
Definition at line 310 of file bembidion_all.h.
References m_PPPThreshold.
Referenced by Bembidion_Population_Manager::Init().
|
protected |
Aggregation behaviour.
Definition at line 1624 of file Bembidion_all.cpp.
References DailyMovement(), and MaxDailyMovement.
Referenced by Step().
|
protected |
Daily ageing.
Definition at line 1681 of file Bembidion_all.cpp.
References Bembidion_Base::CurrentBState, DailyMortality(), m_CanReproduce, m_EggCounter, m_negDegrees, TAnimal::m_OurLandscape, Landscape::SupplyTemp(), and tobs_Hibernating.
Referenced by BeginStep().
|
protected |
Intiate Dispersal behaviour.
Will now move in a direction away from high densities of beetles and towards good habitat
Definition at line 1669 of file Bembidion_all.cpp.
References DailyMovement(), MaxDailyMovement, and WinterMort().
Referenced by Step().
|
protected |
Foraging behaviour.
If it is not yet time to start aggregating then the beetle does its daily movement and returns a zero value, indicating it will stay in this state. If date has exceeded StartAggregatingDay, then the beetle has a increasing probability with time of changing to aggregative behaviour.
If the beetle starts aggregating and it is from last season, then it is assumed that it will die.
Definition at line 1604 of file Bembidion_all.cpp.
References DailyMovement(), m_CanReproduce, TAnimal::m_OurLandscape, MaxDailyMovement, StartAggregatingDay, StartAggregatingDayProb, and Landscape::SupplyDayInYear().
Referenced by Step().
|
protected |
Hibernation behaviour.
Accumulates day degrees from the beginning of the year and starts dispersal when the sum exceeds a threshold or at the beginning of March.
At the end of hibernation the beetle is allowed to reproduce via the m_CanReproduce attribute.
Definition at line 1635 of file Bembidion_all.cpp.
References DipsersalDayDegrees, DispersalThreshold, m_CanReproduce, m_HibernateDegrees, TAnimal::m_OurLandscape, Landscape::SupplyDayInYear(), and Landscape::SupplyTemp().
Referenced by Step().
|
virtual |
Adult Step.
Reimplemented from Bembidion_Base.
Definition at line 2213 of file Bembidion_all.cpp.
References cfg_TotalNoEggs, Bembidion_Base::CurrentBState, g_msg, Bembidion_Population_Manager::m_AdultPosMap, TALMaSSObject::m_CurrentStateNo, m_EggCounter, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, TALMaSSObject::m_StepDone, st_Aggregate(), Bembidion_Base::st_Die(), st_Dispersal(), st_Forage(), st_Hibernate(), tobs_ADying, tobs_Aggregating, tobs_Dispersing, tobs_Foraging, tobs_Hibernating, CfgInt::value(), MapErrorMsg::Warn(), Landscape::Warn(), and WARN_BUG.
|
protected |
Density-independent winter mortality.
Definition at line 1698 of file Bembidion_all.cpp.
References m_negDegrees.
Referenced by st_Dispersal().
|
staticprotected |
the daily elimination rate for pesticides
Definition at line 369 of file bembidion_all.h.
Referenced by EndStep(), and SetAdultPPPElimRate().
|
protected |
Current body burden of pesticide.
Definition at line 371 of file bembidion_all.h.
Referenced by EndStep(), Init(), InternalPesticideHandlingAndResponse(), and SetBodyBurden().
|
protected |
Signal reproductive readiness.
Definition at line 363 of file bembidion_all.h.
Referenced by CanReproduce(), Init(), st_Aging(), st_Forage(), and st_Hibernate().
|
protected |
Current effect probability.
Definition at line 373 of file bembidion_all.h.
Referenced by EndStep(), Init(), and InternalPesticideHandlingAndResponse().
|
protected |
The number of eggs produced.
Definition at line 361 of file bembidion_all.h.
Referenced by CanReproduce(), Init(), st_Aging(), and Step().
|
protected |
The number of day degrees experienced in the spring which may trigger dispersal.
Definition at line 356 of file bembidion_all.h.
Referenced by Init(), and st_Hibernate().
|
protected |
The number of negative day degrees experienced.
Definition at line 354 of file bembidion_all.h.
Referenced by Init(), st_Aging(), and WinterMort().
|
staticprotected |
Effect probability on threshold excedence.
Definition at line 377 of file bembidion_all.h.
Referenced by InternalPesticideHandlingAndResponse(), and SetPPPEffectProb().
|
staticprotected |
Effect probability on threshold excedence.
Definition at line 379 of file bembidion_all.h.
Referenced by InternalPesticideHandlingAndResponse(), and SetPPPEffectProbDecay().
|
staticprotected |
PPP effects threshold.
Definition at line 375 of file bembidion_all.h.
Referenced by InternalPesticideHandlingAndResponse(), and SetPPPThreshold().
|
protected |
The last direction moved.
Definition at line 359 of file bembidion_all.h.
Referenced by DailyMovement(), Init(), MoveTo(), and MoveToAggr().
|
staticprotected |
A helper attribute when simulating movement.
Static array to hold the history of adult positions.
Definition at line 365 of file bembidion_all.h.
Referenced by CanReproduce(), and MoveTo().
|
staticprotected |
A helper attribute when simulating movement.
Static array to hold a list of co-ordinates.
Definition at line 367 of file bembidion_all.h.
Referenced by MoveTo(), and MoveTo_quality_assess().