ALMaSS Rabbit ODdox
1.1
The rabbit model description following ODdox protocol
|
The rabbit male class. All special male behaviour is described here. More...
#include <Rabbit.h>
Public Member Functions | |
Rabbit_Male (int p_x, int p_y, int p_x2, int p_y2, Landscape *p_L, Rabbit_Population_Manager *p_NPM, int a_age, int a_weightage, Rabbit_Warren *a_warren) | |
Rabbit_Male constructor. More... | |
virtual | ~Rabbit_Male (void) |
Rabbit_Male destructor. More... | |
virtual void | Step (void) |
The male rabbit step code. More... | |
Public Member Functions inherited from Rabbit_Adult | |
Rabbit_Adult (int p_x, int p_y, int p_x2, int p_y2, Landscape *p_L, Rabbit_Population_Manager *p_NPM, int a_age, int a_weightage, Rabbit_Warren *a_warren) | |
Rabbit_Adult constructor. More... | |
virtual | ~Rabbit_Adult () |
Rabbit_Adult destructor. More... | |
TTypesOfRabbitSocialStatus | GetSocialStatus (void) |
Return the dominance status. More... | |
void | SetSocialStatus (TTypesOfRabbitSocialStatus a_status) |
Sets the dominance status. More... | |
void | SetMate (Rabbit_Adult *a_mate) |
Set/unset mate status. More... | |
virtual Rabbit_Adult * | GetMate (void) |
Get mate pointer. More... | |
void | OnMateFinishedDigging (Rabbit_Adult *a_mate) |
Action when a mate has finished digging a burrow. More... | |
void | OnMateDead (Rabbit_Adult *a_mate) |
Set/unset mate status. More... | |
Public Member Functions inherited from Rabbit_Base | |
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... | |
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... | |
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... | |
Protected Member Functions | |
virtual TTypeOfRabbitState | st_EvaluateTerritory (void) |
Male Evaluate Territory Step. More... | |
virtual TTypeOfRabbitState | st_Forage (void) |
Adult male forage behaviour. More... | |
virtual void | InternalPesticideHandlingAndResponse () |
Handles internal effects of pesticide exposure - reimplemented from base class. More... | |
Protected Member Functions inherited from Rabbit_Adult | |
virtual void | st_Dying (void) |
Default dying state. More... | |
virtual void | EndStep (void) |
The EndStep is the last 'part' of the timestep that an animal can behave in. More... | |
Protected Member Functions inherited from Rabbit_Base | |
virtual void | Explore (void) |
Exploration method. 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 | 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... | |
Additional Inherited Members | |
Public Attributes inherited from Rabbit_Base | |
RabbitObjectTypes | m_RabbitType |
The rabbits type. More... | |
Static Public Attributes inherited from Rabbit_Base | |
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 Attributes inherited from Rabbit_Adult | |
TTypesOfRabbitSocialStatus | m_socialstatus |
Flag to record dominance status (0-4) More... | |
int | m_lifespan |
The rabbit's alloted lifespan. More... | |
Rabbit_Adult * | m_myMate |
Pointer to the mate if any. More... | |
Protected Attributes inherited from Rabbit_Base | |
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... | |
The rabbit male class. All special male behaviour is described here.
Rabbit_Male::Rabbit_Male | ( | int | p_x, |
int | p_y, | ||
int | p_x2, | ||
int | p_y2, | ||
Landscape * | p_L, | ||
Rabbit_Population_Manager * | p_NPM, | ||
int | a_age, | ||
int | a_weightage, | ||
Rabbit_Warren * | a_warren | ||
) |
Rabbit_Male constructor.
Definition at line 719 of file Rabbit.cpp.
References Rabbit_Base::m_RabbitType, Rabbit_Warren::RabbitProductionRecord(), and rob_Male.
|
virtual |
|
protectedvirtual |
Handles internal effects of pesticide exposure - reimplemented from base class.
This method is re-implemented ffrom Rabbit_Base for any class which has pesticide response behaviour. If the body burden exceeds the trigger then call pesticide-specific actions by dose
Reimplemented from Rabbit_Base.
Definition at line 1370 of file Rabbit.cpp.
References cfg_RabbitPesticideResponse, g_msg, Rabbit_Base::GeneralOrganoPhosphate(), TAnimal::m_OurLandscape, Rabbit_Base::m_pesticide_burden, Rabbit_Base::m_pesticidedegradationrate, Rabbit_Base::m_weight, Landscape::SupplyPesticideType(), ttop_AcuteEffects, ttop_NoPesticide, ttop_ReproductiveEffects, CfgFloat::value(), and MapErrorMsg::Warn().
|
protectedvirtual |
Male Evaluate Territory Step.
The rabbit must evaluate his territory and decide if he will stay or leave. This decision is based on a number of criteria:
Here we make the assumption that if suitable quality unoccupied territory is known to be available and the rabbit is not dominant, then it will move to set up a territory there. If none is avaible or known, then the rabbit will remain as subordinate as long as the current territory can support him. If he is forced out he must find a vacent place or will die. If he stays he may become dominant one day.
If he has no mate (he may be digging and not have a burrow) then before anything else we need to evaluate our current warren for possibilities - could be vacant burrow or mate here for us. If no warren for some reason (could be start-up conditions), then find one.
Next he moves there, and assesses whether he can join
If there is a free burrow then joining is certain. If the warren site is unoccupied then currently the rabbit will join it and start to dig. This behaviour might need to be altered later, if rabbits might not start up alone so easily.
If nothing doing locally the Rabbit will move if conditions elsewhere are better and is not dominant or mated:
Definition at line 776 of file Rabbit.cpp.
References Rabbit_Population_Manager::FindClosestWarren(), g_rand_uni, Rabbit_Warren::GetCarryingCapacity(), Rabbit_Warren::GetNetworkWarren(), Rabbit_Warren::GetPopulationSize(), Rabbit_Warren::IsFreeBurrow(), Rabbit_Warren::IsFreeFemale(), Rabbit_Warren::Join(), Rabbit_Warren::JoinNMate(), Rabbit_Warren::JoinNOccupy(), Rabbit_Warren::Leave(), Rabbit_Base::m_digging, Rabbit_Base::m_haveBurrow, TAnimal::m_Location_x, TAnimal::m_Location_y, Rabbit_Adult::m_myMate, Rabbit_Base::m_myWarren, Rabbit_Base::m_OurPopulationManager, Rabbit_Adult::m_socialstatus, Rabbit_Warren::Mate(), Rabbit_Warren::OccupyBurrow(), Rabbit_Warren::OccupyWarren(), rabbit_socialstatus_subdominant, rabbit_socialstatus_subordinate, rabbit_socialstatus_zero, rob_Female, Rabbit_Base::SetDigging(), Rabbit_Base::SetHasBurrow(), Rabbit_Adult::SetSocialStatus(), TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), toRabbits_Die, toRabbits_Foraging, and Rabbit_Base::WalkTo().
Referenced by Step().
|
protectedvirtual |
Adult male forage behaviour.
This is a critical part of the pesticide handling code. The rabbit forages from the warren area and as a result picks up pesticide. Exactly how much pesticide is picked up depends on the assumptions regarding foraging behaviour. These can be altered here, but the default assumption is that the rabbit will forage from all suitable forgage locations equally, and therefore will pick up an average or maximum dose based on the concentration of residue in the forage areas. This is precalculated by the Rabbit_Warren in UpdatePesticide. The pesticide response code is placed in EndStep - this will determine direct mortality or set any necessary flags indicating pesticide effects later, e.g. for reproduction.
Definition at line 762 of file Rabbit.cpp.
References Rabbit_Warren::GetForagePesticide(), Rabbit_Base::m_myWarren, Rabbit_Base::m_pesticide_burden, and toRabbits_EvaluateTerritory.
Referenced by Step().
|
virtual |
The male rabbit step code.
Reimplemented from Rabbit_Base.
Definition at line 732 of file Rabbit.cpp.
References Rabbit_Base::m_CurrentRState, TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, TALMaSSObject::m_StepDone, Rabbit_Adult::st_Dying(), st_EvaluateTerritory(), st_Forage(), toRabbits_Die, toRabbits_EvaluateTerritory, toRabbits_Foraging, toRabbits_InitialState, toRabbits_Remove, and Landscape::Warn().