ALMaSS Hare ODDox
1.1
The hare model description following ODdox protocol
|
Go to the documentation of this file.
32 #include "../Landscape/ls.h"
33 #include "../BatchALMaSS/PopulationManager.h"
34 #include "../Hare/hare_all.h"
37 #include "../BatchALMaSS/BoostRandomGenerators.h"
38 extern boost::variate_generator<base_generator_type&, boost::uniform_real<> >
g_rand_uni;
159 dist=random(a_max_dist);
161 b=
Run(dist, random(8));
185 while (!
Run(a_dist, a_direction)) {
186 a_direction=random(8);
204 if (ty<0) ty+=Height;
211 if (ty<0) ty+=Height;
212 if (tx>=Width) tx-=Width;
216 if (tx>=Width) tx-=Width;
221 if (tx>=Width) tx-=Width;
222 if (ty>=Height) ty-=Height;
226 if (ty>=Height) ty-=Height;
232 if (ty>=Height) ty-=Height;
242 if (ty<0) ty+=Height;
359 #ifdef __SIZERELATEDDEATH2
362 #ifdef __LOWFATRELATEDDEATH
static double * m_vegPalatability
Will hold and array of palatability for hare for each tov type. Most are 1, but unpalatable vegetatio...
The class that handles all the population lists for hares.
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
double m_pesticidedegradationrate
State variable used to hold the daily degredation rate of the pesticide in the body.
double m_SpeedWalking
m/min speed of walking per kg hare
int m_Lifespan
Physiolocal lifespan, assuming nothing else kills the hare (unlikely to reach this age)
double m_AdultMortRate
Input variable - Adult mortality rate.
virtual bool WasPredated()
Test for predation.
Landscape * m_OurLandscape
int GetHareRefNum()
Get the next ID number available.
int m_ActivityTime
Minutes of potential activity time per day.
void ON_YoungKilled(THare *a_young)
A leveret has been killed.
virtual ~THare()
Destructor.
THare_Population_Manager * m_OurPopulationManager
Pointer to the hare population manager.
CfgInt cfg_hare_escape_dist
void loadVegPalatability(void)
Loads static member m_vegPalatability with data.
CfgInt cfg_hare_max_age_var
double m_KJForaging
KJ/m cost of foraging per kg hare.
double GetRMR()
Get todays RMR.
virtual TTypeOfHareState st_Dispersal()
Base implementation only - reimplemented.
void THareInit(int p_x, int p_y, THare_Population_Manager *p_PPM)
Object Initiation.
The landscape class containing all environmental and topographical data.
double m_KJWalking
KJ/m cost of walking per kg hare.
double m_fatReserve
State variable - the energy reserve of the hare.
int m_lastYearsDensity
State variable used in alternative density-dependent configurations.
int m_experiencedDensity
State variable used in alternative density-dependent configurations.
double m_KJRunning
KJ/m cost of running per kg hare.
static CfgFloat cfg_hare_lowfatextramort("HARE_LOWFATEXTRAMORT", CFG_CUSTOM, 10.0)
int m_RefNum
Unique hare reference number, also functions as sex flag.
CfgFloat cfg_ForageRestingRatio
bool m_pesticideInfluenced1
Flag to indicate pesticide effects (e.g. can be used for endocrine distruptors with delayed effects u...
void Walking(int a_dist, int a_direction)
Walking.
The base class for all ALMaSS animal classes.
double GetRMR(int a_age, double a_size)
Returns the RMR given a specific age and mass.
double m_SpeedRunning
m/min speed of running per kg hare
int m_ddindex
State variable used in alternative density-dependent configurations.
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
double m_TodaysEnergy
State variable - the amount of energy available today, can be in deficit.
CfgInt cfg_Hare_Recovery_Time
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
void EnergyBalance(TTypeOfActivity a_activity, int dist)
Adjust energy balance for an activity.
double m_foragingenergy
Energy obtained from foraging/feeding.
void st_Dying()
Tidy up before removing the object on death.
int m_expDensity[365]
State variable used in alternative density-dependent configurations.
int m_DensitySum
State variable used in alternative density-dependent configurations.
CfgInt cfg_hare_adult_predation
bool OnFarmEvent(FarmToDo event)
Do we require a response to a farm event.
double m_pesticide_burden
State variable used to hold the current body-burden of pesticide.
int m_Age
State variale - hare age.
CfgInt cfg_hare_minimum_breeding_weight
TTypeOfHareState m_CurrentHState
Defines the current activity.
TTypeOfActivity
Enumerator for hare activities.
THare(int p_x, int p_y, Landscape *p_L, THare_Population_Manager *p_PPM)
Constructor.
int m_StarvationDays
State variable - the number of consecutive days in negative energy balance.
static CfgFloat cfg_hare_pesticidedegradationrate("HARE_PESTICIDEDEGRADATIONRATE", CFG_CUSTOM, 0.0)
double GetTotalWeight()
Provide the wet weight of the hare.
virtual void Running(int a_max_dist)
Run.
Hare_Female * m_MyMum
Pointer to the hare's mum.
int m_peg_y
peg y-coordinate
CfgFloat cfg_Hare_StdSpeedWalking
double m_weight
State variale - hare weight g.
bool Run(int a_dist, int a_direction)
Run a distance in a direction.
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
void TimeBudget(TTypeOfActivity a_activity, int dist)
Adjust time budger for an activity.
void Warn(std::string a_msg1, std::string a_msg2)
TTypeOfHareState
Enumerator for hare behavioural states.
int m_peg_x
peg x-coordinate
CfgFloat cfg_Hare_StdSpeedRunning