ALMaSS Vole ODDox
1.1
The vole model description following ODdox protocol
|
The class for female voles. More...
#include <vole_all.h>
Public Member Functions | |
Vole_JuvenileFemale (struct_Vole_Adult *p_aVoleStruct) | |
Vole_JuvenileFemale constructor. More... | |
virtual void | ReInit (struct_Vole_Adult *p_aVoleStruct) |
virtual | ~Vole_JuvenileFemale () |
virtual bool | OnFarmEvent (FarmToDo event) |
External event handler. More... | |
virtual void | BeginStep () |
Female vole BeginStep. More... | |
virtual void | Step () |
JuvenileFemale vole Step. More... | |
virtual void | EndStep () |
Female vole EndStep. More... | |
virtual void | OnKilled () |
Death from external entity. More... | |
Public Member Functions inherited from Vole_Base | |
Vole_Base (struct_Vole_Adult *p_aVoleStruct) | |
Constructor for Vole_Base. More... | |
virtual | ~Vole_Base () |
virtual void | Init (struct_Vole_Adult *p_aVoleStruct) |
void | st_Dying () |
All voles end here on death. More... | |
void | SetBreedingSeason (bool a_flag) |
Set Breeding Season flag. More... | |
void | SetWeight (double W) |
void | Setm_Mature () |
void | Set_BirthYear (int BirthYear) |
void | Set_MotherId (unsigned MotherIdNo) |
void | Set_FatherId (unsigned FatherIdNo) |
void | Set_NoYoungTot (int a_NoOfYoung) |
void | Set_XBorn (int a_Location_x) |
void | Set_YBorn (int a_Location_y) |
void | Set_ElemBorn (int a_Location_x, int a_Location_y) |
void | Set_VegBorn (int a_Location_x, int a_Location_y) |
void | Set_PolyRefBorn (int a_Location_x, int a_Location_y) |
void | Set_Age (int Age) |
virtual int | WhatState () |
bool | SupplyBornLastYear () |
Were we born this year? More... | |
bool | SupplyTerritorial () |
int | SupplyFatherId () |
int | SupplyMotherId () |
bool | SupplySex () |
int | SupplyBirthYear () |
int | SupplyTotNoYoung () |
int | SupplyXBorn () |
int | SupplyYBorn () |
int | SupplyPolyRefBorn () |
int | SupplyElemBorn () |
TTypesOfLandscapeElement | SupplyElemType () |
int | SupplyVegBorn () |
int | SupplyTerrRange () |
double | SupplyWeight () |
int | SupplyIDNo () |
bool | SupplyMature () |
int | SupplyDeathCause () |
unsigned | SupplyAge () |
unsigned | SupplyX () |
unsigned | SupplyY () |
bool | SupplyInTrap () |
InTrapPosition | SupplyTrapPosition () |
void | SetFree () |
int | SupplyHomoZyg () |
int | SupplyHeteroZyg () |
int | SupplyAllele (int locus, int allele) |
uint32 | SupplyMyAllele (int i, int j) |
int | GetGeneticFlag () |
int | GetDirectFlag () |
void | SetGeneticFlag () |
void | SetDirectFlag () |
void | UnsetGeneticFlag () |
void | UnsetDirectFlag () |
GeneticMaterial | SupplyGenes () |
virtual bool | MortalityTest () |
Do a mortality test. More... | |
void | CopyMyself (VoleObject a_vole) |
Duplicates a vole. More... | |
void | SetFertile (bool f) |
Set the male vole fertility. More... | |
bool | GetFertile () |
Get the male vole fertility. 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 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 | Dispersal (double p_OldQual, int p_Distance) |
Female dispersal. More... | |
int | st_Evaluate_n_Explore () |
Main territory evaluation behaviour. More... | |
void | st_BecomeSubAdult (void) |
virtual void | SetLocation () |
Location map function. More... | |
virtual void | FreeLocation () |
Location map function. More... | |
virtual bool | GetLocation (int px, int py) |
Location map function. More... | |
Protected Member Functions inherited from Vole_Base | |
virtual void | RodenticideIngestion (void) |
double | CalculateCarryingCapacity (int x, int y, int a_ddep) |
int | MoveQuality (int p_x, int p_y) |
Test a location for quality while moving. More... | |
void | MoveTo (int p_Vector, int p_Distance, int iterations) |
Movement. More... | |
void | DoWalking (int p_Distance, int &p_Vector, int &vx, int &vy) |
Walking. More... | |
void | DoWalkingCorrect (int p_Distance, int &p_Vector, int &vx, int &vy) |
Walking where there is a danger of stepping off the world. More... | |
void | Escape (int p_Vector, int p_Distance) |
Dispersal - directed movement. More... | |
void | CheckTraps () |
Protected Member Functions inherited from TAnimal | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Additional Inherited Members | |
Public Attributes inherited from Vole_Base | |
TTypeOfVoleState | CurrentVState |
Vole_Population_Manager * | m_OurPopulation |
Protected Attributes inherited from Vole_Base | |
int | m_BirthYear |
bool | m_BornLastYear |
A flag set if the female was born the year before. More... | |
unsigned int | m_MinTerrRange |
unsigned | m_MotherId |
unsigned | m_FatherId |
int | m_Death |
int | m_TerrRange |
bool | m_Sex |
bool | m_Mature |
int | m_Age |
int | m_XBorn |
int | m_YBorn |
int | m_PolyRefBorn |
int | m_ElemBorn |
int | m_VegBorn |
int | m_LifeSpan |
double | m_Weight |
bool | m_fertile |
Flag indicating the fertility state (true means fertile) More... | |
int | m_NoOfYoungTotal |
int | m_DispVector |
bool | m_Have_Territory |
int | m_Reserves |
unsigned | IDNo |
int | SimH |
int | SimW |
GeneticMaterial | m_MyGenes |
InTrapPosition | m_intrappos |
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 inherited from Vole_Base | |
static unsigned int | m_MaxMaleTerritorySize = 0 |
static unsigned int | m_MaxFemaleTerritorySize = 0 |
static unsigned int | m_MinMaleTerritorySize = 0 |
static unsigned int | m_MinFemaleTerritorySize = 0 |
static double | m_MinFVoleHabQual = 0 |
static double | m_MinJMVoleHabQual = 0 |
static double | m_MinMVoleHabQual = 0 |
static double | m_MaleTerritoryRangeSlope = 0 |
static double | m_FemaleTerritoryRangeSlope = 0 |
static double | m_FHabQualThreshold3 |
static double | m_FHabQualThreshold2 |
static double | m_FHabQualThreshold1 |
static double | m_MHabQualThreshold3 |
static double | m_MHabQualThreshold2 |
static double | m_MHabQualThreshold1 |
static bool | m_BreedingSeason = false |
The class for female voles.
Contains all the behaviour specific to the female vole. The differences between the male and female are primarily in female reproductive behaviour, but there are small differences in other behaviours requiring re-implementation of many of the behaviours (e.g. dispersal).
Definition at line 528 of file vole_all.h.
Vole_JuvenileFemale::Vole_JuvenileFemale | ( | struct_Vole_Adult * | p_aVoleStruct | ) |
Vole_JuvenileFemale constructor.
Definition at line 1349 of file Vole_all.cpp.
References Vole_Base::m_Age, Vole_Base::m_BornLastYear, Vole_Base::m_MinFemaleTerritorySize, Vole_Base::m_MinTerrRange, Vole_Base::m_Sex, Vole_Base::m_TerrRange, Vole_Base::m_Weight, and WeanedWeight.
|
virtual |
Definition at line 1378 of file Vole_all.cpp.
|
virtual |
Female vole BeginStep.
The BeginStep is one of the three timestep divisions. This is called once for each vole before Step and EndStep.
The main function here is to remove voles that die before they take up CPU resources in the Step code.
Can also be used to check for pesticide accumulation levels in pesticide simulation
Reimplemented from Vole_Base.
Definition at line 1393 of file Vole_all.cpp.
References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, Vole_Base::m_LifeSpan, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Population_Manager::m_VoleRecordMort, Vole_Base::MortalityTest(), tovmort_FBck, tovmort_FLife, and tovs_FDying.
|
protected |
Female dispersal.
Checks p_Distance away to see if it can find a territory in the next FHabQualThreshold category or with an improved quality of 1.1* p_OldQual if already in optimal habitat
This entails some risk though, so there is a fixed 2.5% increase in the mortality chance when it does this.
Definition at line 1817 of file Vole_all.cpp.
References Vole_Base::CalculateCarryingCapacity(), cfg_RecordVoleMort, cfg_VoleDDepConst(), VoleSummaryOutput::ChangeData(), FreeLocation(), g_extradispmort, g_rand_uni, Vole_Base::m_DispVector, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, Vole_Base::MoveTo(), SetLocation(), and tovmort_FDisp.
Referenced by st_Evaluate_n_Explore(), and Vole_Female::st_Evaluate_n_Explore().
|
virtual |
Female vole EndStep.
The EndStep one of the three timestep divisions. This is called once for each vole after BeginStep and Step.
The main function here is to remove voles that have died during step and otherwise to grow if not at max weight. It also checks if the vole was killed due to human management and determines the potential territory size.
Reimplemented from Vole_Base.
Definition at line 1474 of file Vole_all.cpp.
References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), TAnimal::CheckManagement(), Vole_Base::CurrentVState, GrowStopDate, growthperdayF, Vole_Base::m_Age, Vole_Base::m_BornLastYear, Vole_Base::m_FemaleTerritoryRangeSlope, Vole_Base::m_Mature, Vole_Base::m_MinFemaleTerritorySize, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, Vole_Base::m_TerrRange, Vole_Population_Manager::m_VoleRecordMort, Vole_Base::m_Weight, MaxWeightF, MinReproWeightF, Vole_Base::st_Dying(), Landscape::SupplyDayInYear(), Vole_Population_Manager::SupplyGrowthStartDate(), tovmort_FStarve, and tovs_FDying.
|
inlineprotectedvirtual |
Location map function.
Reimplemented from Vole_Base.
Definition at line 1792 of file Vole_all.cpp.
References TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_OurPopulation, and Vole_Population_Manager::m_VoleMap.
Referenced by Dispersal(), st_BecomeSubAdult(), Vole_Female::st_Special_Explore(), Step(), and Vole_Female::Step().
|
inlineprotectedvirtual |
Location map function.
Reimplemented from Vole_Base.
Definition at line 1799 of file Vole_all.cpp.
References Vole_Base::m_OurPopulation, and Vole_Population_Manager::m_VoleMap.
|
virtual |
External event handler.
This method evaluates external events and chooses a suitable response (in this case a probability of dying because other effects will be taken up by the evaluate and explore state.
Reimplemented from TAnimal.
Definition at line 1529 of file Vole_all.cpp.
References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, burn_straw_stubble, cattle_out, cattle_out_low, cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, 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_rand_uni, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, herbicide_treat, hilling_up, insecticide_treat, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, molluscicide, mow, pigs_out, row_cultivation, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, straw_chopping, strigling, strigling_sow, stubble_harrowing, swathing, tovmort_FFarm, tovs_FDying, trial_control, trial_insecticidetreat, trial_toxiccontrol, VoleHarvestMort, VolePigGrazingMort, VoleSoilCultivationMort, VoleStriglingMort, water, and winter_plough.
|
virtual |
Death from external entity.
External event has caused death - probably eaten by a explicitly modelled predator
Reimplemented from Vole_Base.
Definition at line 1718 of file Vole_all.cpp.
References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, tovmort_FPred, and tovs_FDying.
|
virtual |
Reimplemented from Vole_Base.
Reimplemented in Vole_Female.
Definition at line 1363 of file Vole_all.cpp.
References Vole_Base::Init(), Vole_Base::m_Age, Vole_Base::m_BornLastYear, Vole_Base::m_MinFemaleTerritorySize, Vole_Base::m_MinTerrRange, Vole_Base::m_Sex, Vole_Base::m_TerrRange, Vole_Base::m_Weight, and WeanedWeight.
Referenced by Vole_Population_Manager::CreateObjects().
|
inlineprotectedvirtual |
Location map function.
Reimplemented from Vole_Base.
Definition at line 1785 of file Vole_all.cpp.
References TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_OurPopulation, and Vole_Population_Manager::m_VoleMap.
Referenced by Dispersal(), and Vole_Female::st_Special_Explore().
|
protected |
Definition at line 1725 of file Vole_all.cpp.
References struct_Vole_Adult::age, Vole_Population_Manager::CreateObjects(), Vole_Base::CurrentVState, struct_Vole_Adult::ElemBorn, struct_Vole_Adult::FatherId, FreeLocation(), struct_Vole_Adult::Genes, struct_Vole_Adult::L, Vole_Base::m_Age, TALMaSSObject::m_CurrentStateNo, Vole_Base::m_FatherId, struct_Vole_Adult::m_flag, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_MotherId, Vole_Base::m_MyGenes, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Base::m_Weight, struct_Vole_Adult::MotherId, struct_Vole_Adult::PolyRefBorn, Landscape::SupplyElementType(), Landscape::SupplyPolyRef(), Landscape::SupplyVegType(), tovs_FDying, struct_Vole_Adult::VegBorn, vob_Female, struct_Vole_Adult::VPM, struct_Vole_Adult::weight, struct_Vole_Adult::x, and struct_Vole_Adult::y.
Referenced by Step().
|
protected |
Main territory evaluation behaviour.
Evaluates the quality of her habitat and does some limited exploration in the surrounding area to see if she can improve it by moving.
Definition at line 1760 of file Vole_all.cpp.
References Vole_Base::CalculateCarryingCapacity(), cfg_VoleDDepConst(), Vole_Base::CheckTraps(), Dispersal(), FemaleMovement, Vole_Base::m_DispVector, TAnimal::m_Location_x, TAnimal::m_Location_y, and Vole_Base::m_MinFVoleHabQual.
Referenced by Step().
|
virtual |
JuvenileFemale vole Step.
The Step is one of the three timestep divisions. This is called repeatedly after BeginStep and before EndStep, until all voles report that they are done with Step.
Most of the behaviours are controlled by moving voles between behavioural states in Step (for other models this is also done in BeginStep and EndStep).
When a vole is done for the day it will signal this by setting m_StepDone==true. NB that a call to one behaviour may trigger a call to another behaviour on the next call to step inside the same timestep. In this way a daily cycle of activity can be undertaken (i.e. do reproduction and explore)
Reimplemented from Vole_Base.
Reimplemented in Vole_Female.
Definition at line 1426 of file Vole_all.cpp.
References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, FreeLocation(), Vole_Base::m_Age, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Population_Manager::m_VoleRecordMort, MinReproAgeF, st_BecomeSubAdult(), st_Evaluate_n_Explore(), tovmort_FStarve, tovs_FDying, tovs_FEvaluateExplore, and Landscape::Warn().