ALMaSS Vole ODDox
1.1
The vole model description following ODdox protocol
|
The class for juvenile male voles. More...
#include <vole_all.h>
Public Member Functions | |
Vole_JuvenileMale (struct_Vole_Adult *p_aVoleStruct) | |
Vole_JuvenileMale constructor. More... | |
virtual | ~Vole_JuvenileMale () |
virtual void | ReInit (struct_Vole_Adult *p_aVoleStruct) |
virtual bool | OnFarmEvent (FarmToDo event) |
JuvenileMale vole exernal event handler. More... | |
virtual void | BeginStep () |
Juvenile Male vole BeginStep. More... | |
virtual void | Step () |
Juvenile Male vole Step. More... | |
virtual void | EndStep () |
Juvenile Male vole EndStep. More... | |
virtual void | OnKilled () |
JuvenileMale vole death by 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 | |
virtual void | SetLocation () |
Map location function. More... | |
virtual void | FreeLocation () |
Map location function. More... | |
virtual bool | GetLocation (int px, int py) |
Map location function. More... | |
TTypeOfVoleState | Dispersal (double p_OldQual, int p_Distance) |
JuvenileMale vole dispersal behaviour. More... | |
void | DetermineTerritorySize () |
bool | CanFeed () |
void | st_JuvenileExplore (void) |
Extra movement on weaning. More... | |
void | st_BecomeSubAdult (void) |
TTypeOfVoleState | st_Eval_n_Explore (void) |
JuvenileMale vole main territory assessment behaviour. 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 juvenile male voles.
Contains all the behaviour specific to the male vole. Only st_Infanticide and st_JuvenileExplore are specific to the male, other behaviours differ only in details from the female.
Definition at line 452 of file vole_all.h.
Vole_JuvenileMale::Vole_JuvenileMale | ( | struct_Vole_Adult * | p_aVoleStruct | ) |
Vole_JuvenileMale constructor.
Definition at line 3313 of file Vole_all.cpp.
References Vole_Base::m_Age, Vole_Base::m_MinMaleTerritorySize, Vole_Base::m_MinTerrRange, Vole_Base::m_Sex, Vole_Base::m_TerrRange, Vole_Base::m_Weight, and WeanedWeight.
|
virtual |
Definition at line 3333 of file Vole_all.cpp.
|
virtual |
Juvenile Male 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.
Reimplemented from Vole_Base.
Definition at line 3108 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_MBck, tovmort_MLife, and tovs_MDying.
|
inlineprotected |
|
protected |
|
protected |
JuvenileMale vole dispersal behaviour.
Definition at line 3237 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(), tovmort_MDisp, tovs_MDying, and tovs_MEvaluateExplore.
Referenced by st_Eval_n_Explore().
|
virtual |
Juvenile Male vole EndStep.
The EndStep is 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.
Reimplemented in Vole_Male.
Definition at line 3181 of file Vole_all.cpp.
References TAnimal::CheckManagement(), Vole_Base::CurrentVState, growthperdayM, Vole_Base::m_Age, Vole_Base::m_BornLastYear, TAnimal::m_OurLandscape, Vole_Base::m_Weight, MinReproAgeM, Vole_Base::st_Dying(), Landscape::SupplyDayInYear(), tovs_MDying, and tovs_MMaturation.
|
inlineprotectedvirtual |
Map location function.
Reimplemented from Vole_Base.
Definition at line 3085 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(), Vole_Male::Dispersal(), st_BecomeSubAdult(), Vole_Male::st_Eval_n_Explore(), Step(), and Vole_Male::Step().
|
inlineprotectedvirtual |
Map location function.
Reimplemented from Vole_Base.
Definition at line 3094 of file Vole_all.cpp.
References Vole_Base::m_OurPopulation, and Vole_Population_Manager::m_VoleMap.
Referenced by Vole_Male::st_Eval_n_Explore().
|
virtual |
JuvenileMale vole exernal 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.
This method is inherited by the adult male class
Reimplemented from TAnimal.
Definition at line 2887 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_MFarm, tovs_MDying, trial_control, trial_insecticidetreat, trial_toxiccontrol, VoleHarvestMort, VoleHerbicicideMort, VoleInsecticideMort, VolePigGrazingMort, VoleSoilCultivationMort, VoleStriglingMort, water, and winter_plough.
|
virtual |
JuvenileMale vole death by external entity.
Response to external death event - most likely eaten by a explicitly modelled predator
Reimplemented from Vole_Base.
Definition at line 3302 of file Vole_all.cpp.
References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, tovmort_MPred, and tovs_MDying.
|
virtual |
Reimplemented from Vole_Base.
Reimplemented in Vole_Male.
Definition at line 3323 of file Vole_all.cpp.
References Vole_Base::Init(), Vole_Base::m_Age, Vole_Base::m_MinMaleTerritorySize, Vole_Base::m_MinTerrRange, Vole_Base::m_Sex, Vole_Base::m_TerrRange, Vole_Base::m_Weight, and WeanedWeight.
|
inlineprotectedvirtual |
Map location function.
Reimplemented from Vole_Base.
Definition at line 3076 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(), Vole_Male::Dispersal(), and Vole_Male::st_Eval_n_Explore().
|
protected |
Definition at line 3264 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, GeneticMaterial::GetDirectFlag(), GeneticMaterial::GetGeneticFlag(), struct_Vole_Adult::L, Vole_Base::m_Age, TALMaSSObject::m_CurrentStateNo, struct_Vole_Adult::m_dflag, Vole_Base::m_FatherId, struct_Vole_Adult::m_flag, struct_Vole_Adult::m_gflag, 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_MDying, struct_Vole_Adult::VegBorn, vob_Male, struct_Vole_Adult::VPM, struct_Vole_Adult::weight, struct_Vole_Adult::x, and struct_Vole_Adult::y.
Referenced by Step().
|
protected |
JuvenileMale vole main territory assessment behaviour.
Evaluates the quality of his habitat and does some limited exploration in the surrounding area to see if he can improve it by moving.
Returns 1 if it has died of extra dispersal mortality or starvation
Definition at line 3209 of file Vole_all.cpp.
References Vole_Base::CalculateCarryingCapacity(), cfg_VoleDDepConst(), Vole_Base::CheckTraps(), Dispersal(), g_NoFemalesMove, g_rand_uni, Vole_Base::m_Age, Vole_Base::m_DispVector, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_MinJMVoleHabQual, Vole_Base::m_OurPopulation, Vole_Base::m_TerrRange, MaleMovement, Vole_Population_Manager::SupplyCountFemales(), and Vole_Population_Manager::SupplyInOlderTerr().
Referenced by Step().
|
protected |
Extra movement on weaning.
Cause the vole to do some exploration on maturity, just to move him away from the litter centre.
After this first day he will go into the normal Eval_n_Explore.
Definition at line 2873 of file Vole_all.cpp.
References MinMaleMovement, and Vole_Base::MoveTo().
Referenced by Step().
|
virtual |
Juvenile Male 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.
Reimplemented from Vole_Base.
Reimplemented in Vole_Male.
Definition at line 3141 of file Vole_all.cpp.
References Vole_Base::CurrentVState, FreeLocation(), TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, TALMaSSObject::m_StepDone, st_BecomeSubAdult(), st_Eval_n_Explore(), st_JuvenileExplore(), tovs_InitialState, tovs_JuvenileExploration, tovs_MDying, tovs_MEvaluateExplore, tovs_MMaturation, and Landscape::Warn().