ALMaSS Rabbit ODdox
1.1
The rabbit model description following ODdox protocol
|
#include <Rabbit.h>
Public Member Functions | |
TTypeOfRabbitState | GetCurrentRState () |
void | SetAge (int a_age) |
Set age method. More... | |
RabbitObjectTypes | GetRabbitType (void) |
Get rabbit type. More... | |
int | GetAge (void) |
Get age method. More... | |
void | SetweightAge (int a_age) |
Set age method. More... | |
int | GetweightAge (void) |
Get age method. More... | |
Rabbit_Warren * | GetWarren (void) |
Get warren pointer. More... | |
void | SetWarren (Rabbit_Warren *a_warren) |
Set the warren pointer. More... | |
bool | GetHasBurrow (void) |
Get burrow status. More... | |
void | SetHasBurrow (bool a_status) |
Set/unset burrow status. More... | |
void | SetDigging (int a_days) |
Set number of days to dig. More... | |
int | GetDigging () |
Get number of days to dig. More... | |
APoint | GetBornLocation () |
Get location of birth. More... | |
Rabbit_Base (int p_x, int p_y, int p_x2, int p_y2, Landscape *p_L, Rabbit_Population_Manager *p_NPM, Rabbit_Warren *a_warren) | |
Rabbit constructor. More... | |
virtual | ~Rabbit_Base (void) |
Rabbit destructor. More... | |
virtual void | BeginStep (void) |
The BeginStep is the first 'part' of the timestep that an animal can behave in. It is called once per timestep. More... | |
virtual void | Step (void) |
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously until all animals report that they are 'DONE'. More... | |
virtual void | EndStep (void) |
The EndStep is the third 'part' of the timestep that an animal can behave in. It is called once per timestep. More... | |
void | OnFed (void) |
Signals food arrived today. More... | |
void | OnMumDead (void) |
Signals death of mum. More... | |
void | OnEvicted (void) |
Signals mum has a new litter to look after. More... | |
virtual Rabbit_Adult * | GetMate (void) |
Get mate pointer. 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) |
virtual bool | OnFarmEvent (FarmToDo) |
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... | |
Public Attributes | |
RabbitObjectTypes | m_RabbitType |
The rabbits type. More... | |
Static Public Attributes | |
static double | m_dispersalmortperm = cfg_dispersalmortperm.value() |
The extra dispersal mortality per m travelled. More... | |
static double | m_pesticidedegradationrate = cfg_rabbit_pesticidedegradationrate.value() |
State variable used to hold the daily degredation rate of the pesticide in the body. More... | |
Protected Member Functions | |
virtual void | Explore (void) |
Exploration method. More... | |
virtual void | st_Dying (void) |
Default dying state. More... | |
bool | MortalityTest (double a_prop) |
A simple probability based test. More... | |
bool | WalkTo (int a_x, int a_y) |
Walks to a location from current location. More... | |
virtual void | InternalPesticideHandlingAndResponse () |
Handles internal effects of pesticide exposure. If any effects are needed this method must be re-implemented by descendent classes. More... | |
virtual void | GeneralEndocrineDisruptor (double) |
Handles internal effects of endocrine distrupter pesticide exposure. More... | |
virtual void | GeneralOrganoPhosphate (double) |
Handles internal effects of organophosphate pesticide exposure. More... | |
Protected Member Functions inherited from TAnimal | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
int | m_Age |
The rabbit's age. More... | |
TTypeOfRabbitState | m_CurrentRState |
Variable to record current behavioural state. More... | |
Rabbit_Population_Manager * | m_OurPopulationManager |
This is a time saving pointer to the correct population manager object. More... | |
double | m_MyMortChance |
bool | m_haveBurrow |
Flag to record burrow status. More... | |
Rabbit_Warren * | m_myWarren |
True if currently mated. More... | |
Rabbit_Female * | m_Mum |
Pointer to mum. More... | |
bool | m_FedToday |
Flag for been fed today. More... | |
double | m_weight |
The weight in g. More... | |
int | m_weightAge |
A physiological age parameter, this is the growth age based on an optimal curve (if optimal conditions it will be the same as m_age) More... | |
int | m_digging |
Flag to denote digging behaviour. This keeps the rabbit in a warren without burrows whilst it tries to make one. More... | |
APoint | m_born_location |
The x,y location at birth. More... | |
double | m_pesticide_burden |
State variable used to hold the current body-burden of pesticide. More... | |
bool | m_pesticideInfluenced1 |
Flag to indicate pesticide effects (e.g. can be used for endocrine distruptors with delayed effects until birth). 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... | |
Rabbit_Base::Rabbit_Base | ( | int | p_x, |
int | p_y, | ||
int | p_x2, | ||
int | p_y2, | ||
Landscape * | p_L, | ||
Rabbit_Population_Manager * | p_NPM, | ||
Rabbit_Warren * | a_warren | ||
) |
Rabbit constructor.
Definition at line 161 of file Rabbit.cpp.
References Rabbit_Warren::Join(), m_born_location, m_CurrentRState, m_haveBurrow, m_myWarren, m_OurPopulationManager, m_pesticide_burden, m_pesticideInfluenced1, and toRabbits_InitialState.
|
virtual |
Rabbit destructor.
Definition at line 176 of file Rabbit.cpp.
References Rabbit_Warren::Leave(), and m_myWarren.
|
virtual |
The BeginStep is the first 'part' of the timestep that an animal can behave in. It is called once per timestep.
Reimplemented from TAnimal.
Definition at line 182 of file Rabbit.cpp.
References cfg_RabbitUseNatalDispersalRecord, cfg_RabbitUseNatalDispersalRecordAge, m_Age, m_OurPopulationManager, Rabbit_Population_Manager::NatalDispersalRecordOutput(), CfgInt::value(), and CfgBool::value().
Referenced by Rabbit_Young::BeingStep().
|
inlinevirtual |
The EndStep is the third 'part' of the timestep that an animal can behave in. It is called once per timestep.
Reimplemented from TAnimal.
Reimplemented in Rabbit_Adult, Rabbit_Juvenile, and Rabbit_Young.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Handles internal effects of endocrine distrupter pesticide exposure.
Reimplemented in Rabbit_Female.
|
protectedvirtual |
Handles internal effects of organophosphate pesticide exposure.
Definition at line 1438 of file Rabbit.cpp.
References m_CurrentRState, m_OurPopulationManager, m_RabbitType, TALMaSSObject::m_StepDone, Rabbit_Population_Manager::PesticideDeathRecord(), and toRabbits_Die.
Referenced by Rabbit_Juvenile::InternalPesticideHandlingAndResponse(), Rabbit_Male::InternalPesticideHandlingAndResponse(), and Rabbit_Female::InternalPesticideHandlingAndResponse().
|
inline |
Get age method.
Definition at line 222 of file Rabbit.h.
References m_Age.
Referenced by Rabbit_Population_Manager::ReproOutputRecordOutput().
|
inline |
Get location of birth.
Definition at line 258 of file Rabbit.h.
References m_born_location.
Referenced by Rabbit_Population_Manager::NatalDispersalRecordOutput().
|
inline |
DEBUG method to get the current state
Definition at line 210 of file Rabbit.h.
References m_CurrentRState.
Referenced by Rabbit_Warren::Leave().
|
inline |
Get number of days to dig.
Definition at line 254 of file Rabbit.h.
References m_digging.
Referenced by Rabbit_Warren::JoinNMate(), Rabbit_Warren::Leave(), and Rabbit_Warren::Mate().
|
inline |
Get burrow status.
Definition at line 242 of file Rabbit.h.
References m_haveBurrow.
Referenced by Rabbit_Adult::EndStep(), Rabbit_Warren::JoinNMate(), Rabbit_Warren::Leave(), and Rabbit_Warren::Mate().
|
inlinevirtual |
Get mate pointer.
Reimplemented in Rabbit_Adult.
Definition at line 288 of file Rabbit.h.
Referenced by Rabbit_Warren::Leave().
|
inline |
Get rabbit type.
Definition at line 218 of file Rabbit.h.
References m_RabbitType.
Referenced by Rabbit_Warren::Leave(), Rabbit_Population_Manager::NatalDispersalRecordOutput(), and Rabbit_Adult::SetMate().
|
inline |
|
inline |
Get age method.
Definition at line 230 of file Rabbit.h.
References m_weightAge.
Referenced by Rabbit_Warren::ChooseNewDominant().
|
inlineprotectedvirtual |
Handles internal effects of pesticide exposure. If any effects are needed this method must be re-implemented by descendent classes.
Reimplemented in Rabbit_Female, Rabbit_Male, and Rabbit_Juvenile.
Definition at line 303 of file Rabbit.h.
Referenced by Rabbit_Adult::EndStep().
|
inlineprotected |
A simple probability based test.
[in] | a_prop | must be between 0 and <1.0 This is a simple probability test. |
Definition at line 194 of file Rabbit.cpp.
References g_rand_uni.
Referenced by Rabbit_Juvenile::EndStep(), Rabbit_Adult::EndStep(), and Rabbit_Young::st_Develop().
|
inline |
Signals mum has a new litter to look after.
Definition at line 284 of file Rabbit.h.
References m_CurrentRState, m_Mum, and toRabbits_Weaning.
Referenced by Rabbit_Female::st_GiveBirth().
|
inline |
Signals food arrived today.
Definition at line 276 of file Rabbit.h.
References m_FedToday.
Referenced by Rabbit_Female::st_Lactating().
|
inline |
Signals death of mum.
Definition at line 280 of file Rabbit.h.
References m_Mum.
Referenced by Rabbit_Female::st_Dying().
|
inline |
|
inline |
Set number of days to dig.
Definition at line 250 of file Rabbit.h.
References m_digging.
Referenced by Rabbit_Warren::JoinNMate(), Rabbit_Warren::JoinNOccupy(), Rabbit_Warren::Leave(), Rabbit_Warren::Mate(), Rabbit_Warren::OccupyWarren(), Rabbit_Adult::OnMateFinishedDigging(), Rabbit_Male::st_EvaluateTerritory(), and Rabbit_Female::st_EvaluateTerritory().
|
inline |
Set/unset burrow status.
Definition at line 246 of file Rabbit.h.
References m_haveBurrow.
Referenced by Rabbit_Adult::EndStep(), Rabbit_Warren::JoinNMate(), Rabbit_Warren::JoinNOccupy(), Rabbit_Warren::Leave(), Rabbit_Warren::Mate(), Rabbit_Adult::OnMateFinishedDigging(), Rabbit_Male::st_EvaluateTerritory(), and Rabbit_Female::st_EvaluateTerritory().
|
inline |
Set the warren pointer.
Definition at line 238 of file Rabbit.h.
References m_myWarren.
Referenced by Rabbit_Warren::Join(), and Rabbit_Warren::Leave().
|
inline |
|
protectedvirtual |
Default dying state.
Reimplemented in Rabbit_Female, Rabbit_Adult, Rabbit_Juvenile, and Rabbit_Young.
Definition at line 187 of file Rabbit.cpp.
References TALMaSSObject::m_CurrentStateNo, and TALMaSSObject::m_StepDone.
Referenced by WalkTo().
|
inlinevirtual |
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously until all animals report that they are 'DONE'.
Reimplemented from TAnimal.
Reimplemented in Rabbit_Female, Rabbit_Male, Rabbit_Juvenile, and Rabbit_Young.
|
protected |
Walks to a location from current location.
[in] | a_x | x-coordinate to move to |
[in] | a_y | y-coordinate to move to |
Assumes a rectangluar distance movement with associated probability of mortality by distance.
Definition at line 205 of file Rabbit.cpp.
References g_counter, g_rand_uni, m_dispersalmortperm, TAnimal::m_Location_x, TAnimal::m_Location_y, and st_Dying().
Referenced by Rabbit_Male::st_EvaluateTerritory(), and Rabbit_Female::st_EvaluateTerritory().
|
protected |
The rabbit's age.
Definition at line 177 of file Rabbit.h.
Referenced by BeginStep(), Rabbit_Young::EndStep(), Rabbit_Adult::EndStep(), GetAge(), Rabbit_Adult::Rabbit_Adult(), Rabbit_Juvenile::Rabbit_Juvenile(), Rabbit_Young::Rabbit_Young(), SetAge(), Rabbit_Young::ShouldMature(), Rabbit_Juvenile::st_BecomeAdult(), Rabbit_Young::st_BecomeJuvenile(), Rabbit_Young::st_Develop(), and Rabbit_Juvenile::st_Develop().
|
protected |
The x,y location at birth.
Definition at line 201 of file Rabbit.h.
Referenced by GetBornLocation(), Rabbit_Base(), Rabbit_Juvenile::st_BecomeAdult(), and Rabbit_Young::st_BecomeJuvenile().
|
protected |
Variable to record current behavioural state.
Definition at line 179 of file Rabbit.h.
Referenced by Rabbit_Young::EndStep(), Rabbit_Juvenile::EndStep(), Rabbit_Adult::EndStep(), GeneralOrganoPhosphate(), GetCurrentRState(), OnEvicted(), Rabbit_Base(), Rabbit_Young::Step(), Rabbit_Juvenile::Step(), Rabbit_Male::Step(), and Rabbit_Female::Step().
|
protected |
Flag to denote digging behaviour. This keeps the rabbit in a warren without burrows whilst it tries to make one.
Definition at line 199 of file Rabbit.h.
Referenced by Rabbit_Adult::EndStep(), GetDigging(), Rabbit_Adult::Rabbit_Adult(), SetDigging(), Rabbit_Male::st_EvaluateTerritory(), and Rabbit_Female::st_EvaluateTerritory().
|
static |
The extra dispersal mortality per m travelled.
Definition at line 172 of file Rabbit.h.
Referenced by Rabbit_Population_Manager::AssignStaticVariables(), Rabbit_Population_Manager::Rabbit_Population_Manager(), and WalkTo().
|
protected |
Flag for been fed today.
Definition at line 193 of file Rabbit.h.
Referenced by Rabbit_Young::BeingStep(), Rabbit_Young::EndStep(), OnFed(), and Rabbit_Young::Rabbit_Young().
|
protected |
Flag to record burrow status.
Definition at line 185 of file Rabbit.h.
Referenced by GetHasBurrow(), Rabbit_Base(), SetHasBurrow(), and Rabbit_Male::st_EvaluateTerritory().
|
protected |
Pointer to mum.
Definition at line 191 of file Rabbit.h.
Referenced by Rabbit_Young::EndStep(), OnEvicted(), OnMumDead(), Rabbit_Young::Rabbit_Young(), Rabbit_Young::st_BecomeJuvenile(), and Rabbit_Young::st_Dying().
|
protected |
An individual daily mortality probability
Definition at line 183 of file Rabbit.h.
Referenced by Rabbit_Juvenile::EndStep(), Rabbit_Adult::EndStep(), Rabbit_Adult::Rabbit_Adult(), Rabbit_Juvenile::Rabbit_Juvenile(), Rabbit_Young::Rabbit_Young(), and Rabbit_Young::st_Develop().
|
protected |
True if currently mated.
Pointer to the current warren if any
Definition at line 189 of file Rabbit.h.
Referenced by Rabbit_Juvenile::EndStep(), Rabbit_Adult::EndStep(), GetWarren(), Rabbit_Adult::OnMateFinishedDigging(), Rabbit_Base(), Rabbit_Female::Rabbit_Female(), SetWarren(), Rabbit_Juvenile::st_BecomeAdult(), Rabbit_Young::st_BecomeJuvenile(), Rabbit_Adult::st_Dying(), Rabbit_Female::st_Dying(), Rabbit_Male::st_EvaluateTerritory(), Rabbit_Female::st_EvaluateTerritory(), Rabbit_Juvenile::st_Forage(), Rabbit_Male::st_Forage(), Rabbit_Female::st_Forage(), Rabbit_Female::st_GiveBirth(), Rabbit_Female::st_UpdateBreedingStatus(), and ~Rabbit_Base().
|
protected |
This is a time saving pointer to the correct population manager object.
Definition at line 181 of file Rabbit.h.
Referenced by BeginStep(), Rabbit_Adult::EndStep(), GeneralOrganoPhosphate(), Rabbit_Adult::Rabbit_Adult(), Rabbit_Base(), Rabbit_Juvenile::Rabbit_Juvenile(), Rabbit_Juvenile::st_BecomeAdult(), Rabbit_Young::st_BecomeJuvenile(), Rabbit_Young::st_Develop(), Rabbit_Juvenile::st_Develop(), Rabbit_Female::st_Dying(), Rabbit_Male::st_EvaluateTerritory(), Rabbit_Female::st_EvaluateTerritory(), Rabbit_Female::st_GiveBirth(), and Rabbit_Female::st_UpdateBreedingStatus().
|
protected |
State variable used to hold the current body-burden of pesticide.
Definition at line 203 of file Rabbit.h.
Referenced by Rabbit_Juvenile::EndStep(), Rabbit_Adult::EndStep(), Rabbit_Juvenile::InternalPesticideHandlingAndResponse(), Rabbit_Male::InternalPesticideHandlingAndResponse(), Rabbit_Female::InternalPesticideHandlingAndResponse(), Rabbit_Base(), Rabbit_Juvenile::st_Forage(), Rabbit_Male::st_Forage(), and Rabbit_Female::st_Forage().
|
static |
State variable used to hold the daily degredation rate of the pesticide in the body.
Definition at line 174 of file Rabbit.h.
Referenced by Rabbit_Population_Manager::AssignStaticVariables(), Rabbit_Juvenile::InternalPesticideHandlingAndResponse(), Rabbit_Male::InternalPesticideHandlingAndResponse(), and Rabbit_Female::InternalPesticideHandlingAndResponse().
|
protected |
Flag to indicate pesticide effects (e.g. can be used for endocrine distruptors with delayed effects until birth).
Definition at line 205 of file Rabbit.h.
Referenced by Rabbit_Female::GeneralEndocrineDisruptor(), Rabbit_Base(), and Rabbit_Female::st_GiveBirth().
RabbitObjectTypes Rabbit_Base::m_RabbitType |
The rabbits type.
Definition at line 170 of file Rabbit.h.
Referenced by GeneralOrganoPhosphate(), GetRabbitType(), Rabbit_Female::Rabbit_Female(), Rabbit_Juvenile::Rabbit_Juvenile(), Rabbit_Male::Rabbit_Male(), Rabbit_Young::Rabbit_Young(), and Rabbit_Adult::SetMate().
|
protected |
The weight in g.
Definition at line 195 of file Rabbit.h.
Referenced by Rabbit_Adult::EndStep(), Rabbit_Juvenile::InternalPesticideHandlingAndResponse(), Rabbit_Male::InternalPesticideHandlingAndResponse(), Rabbit_Female::InternalPesticideHandlingAndResponse(), Rabbit_Adult::Rabbit_Adult(), Rabbit_Juvenile::Rabbit_Juvenile(), Rabbit_Young::Rabbit_Young(), Rabbit_Young::st_Develop(), and Rabbit_Juvenile::st_Develop().
|
protected |
A physiological age parameter, this is the growth age based on an optimal curve (if optimal conditions it will be the same as m_age)
Definition at line 197 of file Rabbit.h.
Referenced by Rabbit_Adult::EndStep(), GetweightAge(), Rabbit_Adult::Rabbit_Adult(), Rabbit_Juvenile::Rabbit_Juvenile(), Rabbit_Young::Rabbit_Young(), SetweightAge(), Rabbit_Juvenile::ShouldMature(), Rabbit_Juvenile::st_BecomeAdult(), Rabbit_Young::st_BecomeJuvenile(), Rabbit_Young::st_Develop(), Rabbit_Juvenile::st_Develop(), and Rabbit_Female::st_GiveBirth().