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_Female (struct_Vole_Adult *p_aVoleStruct) | |
Vole_Female constructor. More... | |
void | ReInit (struct_Vole_Adult *p_aVoleStruct) |
virtual | ~Vole_Female () |
virtual void | Step () |
Female vole Step. More... | |
int | SupplyNoOfYoung () |
int | SupplyMateId () |
int | SupplyMateSB () |
unsigned | SupplyYoungAge () |
bool | SupplyPregnant () |
void | Set_MateState (int MateState) |
void | OnInfanticideAttempt () |
Determines whether an infanticide attempt will succeed. More... | |
![]() | |
Vole_JuvenileFemale (struct_Vole_Adult *p_aVoleStruct) | |
Vole_JuvenileFemale constructor. More... | |
virtual | ~Vole_JuvenileFemale () |
virtual bool | OnFarmEvent (FarmToDo event) |
External event handler. More... | |
virtual void | BeginStep () |
Female vole BeginStep. More... | |
virtual void | EndStep () |
Female vole EndStep. More... | |
virtual void | OnKilled () |
Death from external entity. More... | |
![]() | |
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... | |
![]() | |
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... | |
Protected Member Functions | |
TTypeOfVoleState | st_ReproBehaviour () |
Reproductive switch. More... | |
TTypeOfVoleState | st_UpdateGestation () |
Gestation control. More... | |
TTypeOfVoleState | st_BecomeReproductive () |
Female vole maturation control. More... | |
TTypeOfVoleState | st_GiveBirth () |
Litter production. More... | |
TTypeOfVoleState | st_Lactating () |
Lactation. More... | |
int | st_Evaluate_n_Explore () |
Main territory evaluation behaviour. More... | |
int | st_Special_Explore () |
Post weaning territory expansion. More... | |
TTypeOfVoleState | st_Mating () |
Female mating. More... | |
![]() | |
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... | |
![]() | |
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 () |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
int | m_MateLive |
int | m_MatesIdNo |
int | m_NoOfYoung |
The number of young in the current litter (if one). More... | |
bool | m_Pregnant |
A flag indicating whether pregnant or not. More... | |
int | m_DaysUntilBirth |
A counter counting down gestation days. More... | |
unsigned | m_YoungAge |
The age of current litter in days. More... | |
GeneticMaterial | m_MatesGenes |
The DNA passed from the male on mating. More... | |
![]() | |
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 |
![]() | |
int | m_Location_x |
int | m_Location_y |
Landscape * | m_OurLandscape |
![]() | |
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 | |
![]() | |
TTypeOfVoleState | CurrentVState |
Vole_Population_Manager * | m_OurPopulation |
![]() | |
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 570 of file vole_all.h.
Vole_Female::Vole_Female | ( | struct_Vole_Adult * | p_aVoleStruct | ) |
Vole_Female constructor.
Definition at line 1852 of file Vole_all.cpp.
References cfg_VoleEndoCrineDisruptionGestationLength(), Vole_Base::m_Age, m_DaysUntilBirth, m_MatesIdNo, Vole_Base::m_MinFemaleTerritorySize, Vole_Base::m_MinTerrRange, m_NoOfYoung, m_Pregnant, Vole_Base::m_TerrRange, Vole_Base::m_Weight, MinReproAgeF, and WeanedWeight.
|
virtual |
Definition at line 1891 of file Vole_all.cpp.
void Vole_Female::OnInfanticideAttempt | ( | ) |
Determines whether an infanticide attempt will succeed.
A mate has attempted infanticide.
If they are 9 days old there is no chance of mortality otherwise it is proportional to age.
Data from M.arvalis (Heise & Lippke 1997)
Definition at line 2380 of file Vole_all.cpp.
References Vole_Population_Manager::AddToNoYoungInfanticideCount(), g_rand_uni, InfanticideChanceByAge, m_NoOfYoung, Vole_Base::m_OurPopulation, m_Pregnant, and m_YoungAge.
Referenced by Vole_Population_Manager::SendMessage().
|
virtual |
Reimplemented from Vole_JuvenileFemale.
Definition at line 1870 of file Vole_all.cpp.
References cfg_VoleEndoCrineDisruptionGestationLength(), Vole_Base::Init(), Vole_Base::m_Age, m_DaysUntilBirth, m_MatesIdNo, Vole_Base::m_MinFemaleTerritorySize, Vole_Base::m_MinTerrRange, m_NoOfYoung, m_Pregnant, Vole_Base::m_TerrRange, Vole_Base::m_Weight, MinReproAgeF, and WeanedWeight.
Referenced by Vole_Population_Manager::CreateObjects().
|
inline |
|
protected |
Female vole maturation control.
Tests to see if the female should mature
Definition at line 2005 of file Vole_all.cpp.
References Vole_Base::m_Age, Vole_Base::m_BreedingSeason, Vole_Base::m_Have_Territory, MinReproAgeF, Vole_Base::Setm_Mature(), and tovs_FEvaluateExplore.
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 2228 of file Vole_all.cpp.
References Vole_Base::CalculateCarryingCapacity(), cfg_VoleDDepConst(), Vole_Base::CheckTraps(), Vole_JuvenileFemale::Dispersal(), FemaleMovement, Vole_Base::m_DispVector, Vole_Base::m_Have_Territory, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_MinFVoleHabQual, and MinFemaleMovement.
Referenced by Step().
|
protected |
Litter production.
Produces a litter and records the information if necessary
Definition at line 2024 of file Vole_all.cpp.
References Vole_Population_Manager::AddToYoung(), cfg_PesticideAccumulationThreshold(), cfg_PesticideAccumulationThresholdModelink2(), cfg_PesticideLitterSizeReduction(), g_rand_uni, Vole_Base::m_BornLastYear, Vole_Base::m_Have_Territory, m_NoOfYoung, Vole_Base::m_NoOfYoungTotal, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, m_Pregnant, m_YoungAge, Vole_Population_Manager::ReproTable, Landscape::SupplyDayInYear(), Landscape::SupplyPesticideType(), tovs_FEvaluateExplore, tovs_ReproBehaviour, ttop_ModelinkPesticide, and ttop_ModelinkPesticide21TWA.
Referenced by Step().
|
protected |
Lactation.
Once the litter reaches weaning age then individual voles are created and set in motion by this method. Pesticide effects may be specified here too.
Definition at line 2090 of file Vole_all.cpp.
References Vole_Population_Manager::AddToJuvs(), cfg_PesticideAccumulationThreshold(), cfg_PesticideAccumulationThresholdModelink2(), cfg_PesticideFemaleMaturityDelay(), cfg_PesticideWeaningReduction(), Vole_Population_Manager::CreateObjects(), struct_Vole_Adult::ElemBorn, struct_Vole_Adult::FatherId, g_rand_uni, struct_Vole_Adult::Genes, struct_Vole_Adult::L, struct_Vole_Adult::m_dflag, struct_Vole_Adult::m_flag, struct_Vole_Adult::m_gflag, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MatesGenes, Vole_Base::m_MyGenes, m_NoOfYoung, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, Vole_Base::m_Reserves, m_YoungAge, struct_Vole_Adult::misc_use, struct_Vole_Adult::MotherId, GeneticMaterial::Mutation_4(), struct_Vole_Adult::PolyRefBorn, GeneticMaterial::Recombine(), Population_Manager::SimH, Population_Manager::SimW, Landscape::SupplyElementType(), Vole_Base::SupplyIDNo(), SupplyMateId(), Landscape::SupplyPesticideType(), Landscape::SupplyPolyRef(), Landscape::SupplyVegType(), tovs_Lactating, tovs_SpecialExplore, ttop_ModelinkPesticide, ttop_ModelinkPesticide21TWA, ttop_ReproductiveEffects, ttop_Vinclozolin, struct_Vole_Adult::VegBorn, vob_JuvenileFemale, vob_JuvenileMale, struct_Vole_Adult::VPM, WeanedAge, struct_Vole_Adult::x, and struct_Vole_Adult::y.
Referenced by Step().
|
protected |
Female mating.
The mating state is where genes are passed and any genetic effects from the male need to be evaluated (e.g. pesticide induced infertility)
Definition at line 2341 of file Vole_all.cpp.
References Vole_Population_Manager::FindClosestMale(), Vole_Base::GetFertile(), Vole_Base::m_BreedingSeason, m_DaysUntilBirth, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MatesGenes, m_MatesIdNo, Vole_Base::m_MaxMaleTerritorySize, Vole_Base::m_OurPopulation, m_Pregnant, Vole_Base::SupplyGenes(), Vole_Base::SupplyIDNo(), TheGestationPeriod, and tovs_FEvaluateExplore.
Referenced by Step().
|
protected |
Reproductive switch.
This state is simply a switch determing what behaviour to exhibit. In the case of pesticide exposure to endocrine disruptors there may be an impact of mating with a steriel male leading to a false pregnancy. In this case m_DaysUntilBirth will be
0, but she will not be pregnant. This will have the effect of delaying mating until the counter is zero.
Definition at line 1974 of file Vole_all.cpp.
References m_DaysUntilBirth, Vole_Base::m_Mature, m_NoOfYoung, m_Pregnant, tovs_FMaturation, tovs_Lactating, tovs_Mating, and tovs_UpdateGestation.
Referenced by Step().
|
protected |
Post weaning territory expansion.
Called after weaning of a litter when the female needs to expand her territory again. This does not use the Dispersal function so avoids extra mortality at this point.
Definition at line 2273 of file Vole_all.cpp.
References Vole_Base::CalculateCarryingCapacity(), cfg_VoleDDepConst(), FemaleMovement, Vole_JuvenileFemale::FreeLocation(), Vole_Base::m_Age, Vole_Base::m_Have_Territory, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_Mature, Vole_Base::m_OurPopulation, Vole_Base::m_TerrRange, MinFemaleMovement, Vole_Base::MoveTo(), Vole_JuvenileFemale::SetLocation(), and Vole_Population_Manager::SupplyOlderFemales().
Referenced by Step().
|
protected |
Gestation control.
Decreases the number of days until birth by 1, checks for special pesticide effects for vinclozolin like pesticide simulations
Definition at line 1991 of file Vole_all.cpp.
References m_DaysUntilBirth, tovs_FEvaluateExplore, and tovs_GiveBirth.
Referenced by Step().
|
virtual |
Female 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_JuvenileFemale.
Definition at line 1906 of file Vole_all.cpp.
References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, Vole_JuvenileFemale::FreeLocation(), TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Population_Manager::m_VoleRecordMort, st_BecomeReproductive(), st_Evaluate_n_Explore(), st_GiveBirth(), st_Lactating(), st_Mating(), st_ReproBehaviour(), st_Special_Explore(), st_UpdateGestation(), tovmort_FStarve, tovs_FDying, tovs_FEvaluateExplore, tovs_FMaturation, tovs_GiveBirth, tovs_Lactating, tovs_Mating, tovs_ReproBehaviour, tovs_SpecialExplore, tovs_UpdateGestation, and Landscape::Warn().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
A counter counting down gestation days.
Definition at line 606 of file vole_all.h.
Referenced by ReInit(), st_Mating(), st_ReproBehaviour(), st_UpdateGestation(), and Vole_Female().
|
protected |
Definition at line 590 of file vole_all.h.
Referenced by Set_MateState(), and SupplyMateSB().
|
protected |
The DNA passed from the male on mating.
Definition at line 616 of file vole_all.h.
Referenced by st_Lactating(), and st_Mating().
|
protected |
Definition at line 591 of file vole_all.h.
Referenced by ReInit(), st_Mating(), SupplyMateId(), and Vole_Female().
|
protected |
The number of young in the current litter (if one).
Definition at line 596 of file vole_all.h.
Referenced by OnInfanticideAttempt(), ReInit(), st_GiveBirth(), st_Lactating(), st_ReproBehaviour(), SupplyNoOfYoung(), and Vole_Female().
|
protected |
A flag indicating whether pregnant or not.
Definition at line 601 of file vole_all.h.
Referenced by OnInfanticideAttempt(), ReInit(), st_GiveBirth(), st_Mating(), st_ReproBehaviour(), SupplyPregnant(), and Vole_Female().
|
protected |
The age of current litter in days.
Definition at line 611 of file vole_all.h.
Referenced by OnInfanticideAttempt(), st_GiveBirth(), st_Lactating(), and SupplyYoungAge().