![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
The base class for all hare classes. More...
#include <Hare_All.h>
Public Member Functions | |
THare (int p_x, int p_y, Landscape *p_L, THare_Population_Manager *p_PPM) | |
Constructor. More... | |
void | THareInit (int p_x, int p_y, THare_Population_Manager *p_PPM) |
Object Initiation. More... | |
~THare () override | |
Destructor. More... | |
virtual TTypeOfHareState | st_Dispersal () |
Base implementation only - reimplemented. More... | |
void | BeginStep (void) override |
Base implementation only - reimplemented. More... | |
void | Step (void) override |
Base implementation only - reimplemented. More... | |
void | EndStep (void) override |
Base implementation only - reimplemented. More... | |
double | GetWeight () |
double | GetTotalWeight () |
Provide the wet weight of the hare. More... | |
int | GetAge () |
Provide the age of the hare. More... | |
void | ON_MumDead (Hare_Female *a_Mum) |
Inform Mum that we are dead. More... | |
Hare_Female * | GetMum () |
Get the mother pointer. More... | |
double | GetRMR () |
Get todays RMR. More... | |
virtual bool | WasPredated () |
Test for predation. More... | |
int | GetRefNum () |
Get the refnum for this hare. More... | |
virtual void | ON_Dead (void) |
Mortality - overridden in descendent classes. More... | |
void | loadVegPalatability (void) |
Loads static member m_vegPalatability with data. More... | |
![]() | |
TAnimal (int x, int y, Landscape *L) | |
The TAnimal constructor saving the x,y, location and the landscape pointer. More... | |
TAnimal (int x, int y) | |
The TAnimal constructor saving the x,y used if landscape is already set. More... | |
void | SetGuardMapIndex (int a_index_x, int a_index_y) |
Set the guard map index, this is used to avoid two animals operating in the same location when using multithread. More... | |
unsigned | SupplyFarmOwnerRef () const |
Get the current location farm ref if any. More... | |
AnimalPosition | SupplyPosition () const |
Returns the objects location and habitat type and veg type. More... | |
APoint | SupplyPoint () const |
Returns the objects location in ALMaSS coordinates. More... | |
int | SupplyPolygonRef () const |
Returns the polygon reference where the object is located. More... | |
TTypesOfLandscapeElement | SupplyPolygonType () const |
Returns the polygon type where the object is located. More... | |
int | Supply_m_Location_x () const |
Returns the ALMaSS x-coordinate. More... | |
int | Supply_m_Location_y () const |
Returns the ALMaSS y-coordinate. More... | |
int | SupplyGuardCellX () const |
Returns the x-index to the guard cell. More... | |
int | SupplyGuardCellY () const |
Returns the y-index to the guard cell. More... | |
int | SupplyAge () const |
Returns the animals age in days. More... | |
void | SetAge (int a_age) |
Sets the animals age in days. More... | |
virtual void | KillThis () |
Sets all parameters ready for object destruction. More... | |
virtual void | CopyMyself () |
Used to copy the object details to another in descendent classes. More... | |
void | SetX (const int a_x) |
Sets the x-coordinate. More... | |
void | SetY (const int a_y) |
Sets the y-coordinate. More... | |
virtual void | ReinitialiseObject (int a_x, int a_y, Landscape *a_l_ptr) |
virtual void | ReinitialiseObject (int a_x, int a_y) |
Used to re-use an object - must be implemented in descendent classes. More... | |
virtual int | WhatState () |
Returns the objects current state number. More... | |
virtual void | Dying () |
A wrapped for KillThis - ideally should not be used. More... | |
void | CheckManagement () |
Used to start a check for any management related effects at the objects current location. More... | |
void | CheckManagementXY (int a_x, int a_y) |
Used to start a check for any management related effects at x,y. More... | |
![]() | |
int | GetCurrentStateNo () const |
Returns the current state number. More... | |
void | SetCurrentStateNo (int a_num) |
Sets the current state number. More... | |
bool | GetStepDone () const |
Returns the step done indicator flag. More... | |
void | SetStepDone (bool a_bool) |
Sets the step done indicator flag. More... | |
void | ReinitialiseObjectBase () |
Used to initialise an object. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject ()=default |
The destructor for TALMaSSObject. More... | |
Static Public Member Functions | |
static void | SetMum (Hare_Female *) |
Set the mother pointer. Reimplemented in Hare_Infant. More... | |
![]() | |
static void | SetSimulationWidth (int a_value) |
Sets the simulation width. More... | |
static void | SetSimulationHeight (int a_value) |
Sets the simulation height. More... | |
static void | SetDayInYear (int a_value) |
Sets the day in year attribute. More... | |
static void | SetOurLandscape (Landscape *a_value) |
Sets the landscape pointer. More... | |
static void | SetTempToday (double a_value) |
Sets the temperature today attribute. More... | |
![]() | |
static void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
Static Public Attributes | |
static double * | m_vegPalatability = nullptr |
Will hold and array of palatability for hare for each tov type. Most are 1, but unpalatable vegetation can be specified here. More... | |
Protected Member Functions | |
bool | Run (int a_dist, int a_direction) |
Run a distance in a direction. More... | |
void | EnergyBalance (TTypeOfActivity a_activity, int dist) |
Adjust energy balance for an activity. More... | |
void | TimeBudget (TTypeOfActivity a_activity, int dist) |
Adjust time budger for an activity. More... | |
void | st_Dying () |
Tidy up before removing the object on death. More... | |
virtual void | Running (int a_max_dist) |
Run. More... | |
void | Walking (int a_dist, int a_direction) |
Walking. More... | |
double | Forage (int &time) |
Foraging. More... | |
double | ForageP (int &time) |
Foraging but also incorporating pesticide exposure. 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. If any effects are needed this method must be re-implemented by descendent classes. More... | |
virtual void | GeneralOrganoPhosphate (double) |
Handles internal effects of organophosphate pesticide exposure. If any effects are needed this method must be re-implemented by descendent classes. More... | |
double | ForageSquare (int a_x, int a_y) |
Forage from an area. More... | |
double | ForageSquareP (int a_x, int a_y, double *a_pestexposure) |
Forage from an area and resturn pesticide exposure as well as food. More... | |
int | GetPegDistance () |
Get peg distance. More... | |
int | GetPegPull () |
Get attractive force of peg. More... | |
int | GetPegDirection () |
Get direction of peg. More... | |
void | MovePeg () |
Move the peg according to attraction forces. More... | |
bool | OnFarmEvent (FarmToDo event) override |
Do we require a response to a farm event. More... | |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
TTypeOfHareState | m_CurrentHState |
Defines the current activity. More... | |
int | m_Age = 0 |
State variale - hare age. More... | |
Hare_Object | m_Type |
State variale - the type of hare. More... | |
double | m_weight = 0.0 |
State variale - hare weight g. More... | |
double | m_old_weight = 0.0 |
State variale - last hare weight. More... | |
Hare_Female * | m_MyMum = nullptr |
Pointer to the hare's mum. More... | |
THare_Population_Manager * | m_OurPopulationManager |
Pointer to the hare population manager. More... | |
int | m_Lifespan = 0 |
Physiolocal lifespan, assuming nothing else kills the hare (unlikely to reach this age) More... | |
int | m_ActivityTime = 0 |
Minutes of potential activity time per day. More... | |
int | m_StarvationDays = 0 |
State variable - the number of consecutive days in negative energy balance. More... | |
double | m_fatReserve = 0.0 |
State variable - the energy reserve of the hare. More... | |
double | m_TodaysEnergy = 0.0 |
State variable - the amount of energy available today, can be in deficit. More... | |
double | m_EnergyMax = 0.0 |
State variable - the amount of energy it is possible to eat as a multiplyer or RMR. More... | |
double | m_KJRunning = 0.0 |
KJ/m cost of running per kg hare. More... | |
double | m_KJWalking = 0.0 |
KJ/m cost of walking per kg hare. More... | |
double | m_KJForaging = 0.0 |
KJ/m cost of foraging per kg hare. More... | |
double | m_SpeedRunning = 0.0 |
m/min speed of running per kg hare More... | |
double | m_SpeedWalking = 0.0 |
m/min speed of walking per kg hare More... | |
double | m_foragingenergy = 0.0 |
Energy obtained from foraging/feeding. More... | |
int | m_peg_x = 0 |
peg x-coordinate More... | |
int | m_peg_y = 0 |
peg y-coordinate More... | |
int | m_RefNum = 0 |
Unique hare reference number, also functions as sex flag. More... | |
int | m_experiencedDensity = 0 |
State variable used in alternative density-dependent configurations. More... | |
int | m_lastYearsDensity = 0 |
State variable used in alternative density-dependent configurations. More... | |
int | m_ddindex = 0 |
State variable used in alternative density-dependent configurations. More... | |
int | m_expDensity [365] = {} |
State variable used in alternative density-dependent configurations. More... | |
int | m_DensitySum = 0 |
State variable used in alternative density-dependent configurations. More... | |
bool | m_IamSick = false |
flag for sickness - used in conjunction with disease configurations More... | |
double | m_pesticide_burden = 0.0 |
State variable used to hold the current body-burden of pesticide. More... | |
double | m_pesticidedegradationrate = 0.0 |
State variable used to hold the daily degredation rate of the pesticide in the body. More... | |
bool | m_pesticideInfluenced1 = false |
Flag to indicate pesticide effects (e.g. can be used for endocrine distruptors with delayed effects until birth). More... | |
![]() | |
int | m_Location_x |
The objects ALMaSS x coordinate. More... | |
int | m_Location_y |
The objects ALMaSS y coordinate. More... | |
int | m_guard_cell_x |
The index x to the guard cell. More... | |
int | m_guard_cell_y |
The index y to the guard cell. More... | |
int | m_AgeDays {0} |
To hold the age in days. More... | |
PesticideToxicity | m_my_pesticide |
![]() | |
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 | |
![]() | |
static Landscape * | m_OurLandscape = nullptr |
A pointer to the landscape object shared with all TAnimal objects. More... | |
static int | m_SimulationWidth = 0 |
A static member for the simulation width because it is often used by descendent classes. More... | |
static int | m_SimulationHeight = 0 |
A static member for the simulation height because it is often used by descendent classes. More... | |
static double | m_TemperatureToday = 0.0 |
A holder for the temperature today shared with all TAnimal objects. More... | |
static int | m_DayInYear = 0 |
A holder for the day in year shared with all TAnimal objects. More... | |
The base class for all hare classes.
THare::THare | ( | int | p_x, |
int | p_y, | ||
Landscape * | p_L, | ||
THare_Population_Manager * | p_PPM | ||
) |
|
override |
|
inlineoverridevirtual |
Base implementation only - reimplemented.
Reimplemented from TALMaSSObject.
Reimplemented in Hare_Female, Hare_Male, Hare_Juvenile, Hare_Young, and Hare_Infant.
|
inlineoverridevirtual |
Base implementation only - reimplemented.
Reimplemented from TALMaSSObject.
Reimplemented in Hare_Female, Hare_Male, Hare_Juvenile, Hare_Young, and Hare_Infant.
References MovePeg().
|
protected |
Adjust energy balance for an activity.
This method calculates energy used and subtracts this from the fat store.
The fat store is KJ so no conversion is required here. The fat store can only be a maximum X% of the body weight
References activity_Dispersal, activity_Foraging, activity_Resting, activity_Running, activity_Walking, THare_Population_Manager::GetRMR(), GetTotalWeight(), m_Age, m_fatReserve, m_foragingenergy, m_KJForaging, m_KJRunning, m_KJWalking, TAnimal::m_OurLandscape, m_OurPopulationManager, m_TodaysEnergy, and Landscape::Warn().
Referenced by Forage(), ForageP(), Running(), Hare_Male::st_Developing(), Hare_Female::st_Developing(), Hare_Juvenile::st_Dispersal(), Hare_Young::st_Resting(), and Hare_Juvenile::st_Resting().
|
protected |
Foraging.
This could be implemented in each hare's st_Foraging, but is implemented as a common method because all the hares do it the same way. This method determine how much energy can be foraged from the current location in the time available (a_time).
It is important that energy used for foraging is deducted from the energybudget calculations before calculating the target - otherwise growth will be affected.
Efficiency can be roughly calculated for optimal forage by calculating the number squares and the cost of foraging together with the return. e.g. 100m2 -> 10m2 forage with ext of 5.0 = 50KJ at a cost of 100*m_KJForaging.
Hence return can be calculated and the target adjusted accordingly
m_EnergyMax is the max amount of energy possible in one day (intake/cfg_hare_ExtEff to reduce calculations). This needs to be no more than they ever need, the closer to this limit the faster the code will run due to avoiding unnecessary searching, but also will prevent high energy usage being offset by too high intake. m_EnergyMax is set at the beginnng of each day in BeginStep.
References __SQRS, activity_Foraging, cfg_hare_pegmoveto_chance, EnergyBalance(), ForageSquare(), g_random_fnc(), GetPegDirection(), GetPegPull(), m_EnergyMax, TAnimal::m_Location_x, TAnimal::m_Location_y, CfgInt::value(), and Walking().
Referenced by Hare_Young::st_Foraging(), Hare_Juvenile::st_Foraging(), Hare_Male::st_Foraging(), and Hare_Female::st_Foraging().
|
protected |
Foraging but also incorporating pesticide exposure.
This could be implemented in each hare's st_Foraging, but is implemented as a common method because all the hares do it the same way. This method determine how much energy can be foraged from the current location in the time available (a_time).
It is important that energy used for foraging is deducted from the energybudget calculations before calculating the target - otherwise growth will be affected.
Efficiency can be roughly calculated for optimal forage by calculating the number squares and the cost of foraging together with the return. e.g. 100m2 -> 10m2 forage with ext of 5.0 = 50KJ at a cost of 100*m_KJForaging. Hence return can be calculated and the target adjusted accordingly
The only difference between this method and THare::Forage is that this one calls the version of ForageSquare that also calculates pesticide exposure.
m_EnergyMax is the max amount of energy possible in one day. This needs to be no more than they ever need, the closer to this limit the faster the code will run due to avoiding unnecessary searching, but also will prevent high energy usage being offset by too high intake. m_EnergyMax is set at the beginnng of each day in BeginStep.
References __SQRS, activity_Foraging, cfg_hare_pegmoveto_chance, EnergyBalance(), ForageSquareP(), g_random_fnc(), GetPegDirection(), GetPegPull(), m_EnergyMax, TAnimal::m_Location_x, TAnimal::m_Location_y, m_pesticide_burden, CfgInt::value(), and Walking().
Referenced by Hare_Young::st_Foraging(), Hare_Juvenile::st_Foraging(), Hare_Male::st_Foraging(), and Hare_Female::st_Foraging().
|
protected |
Forage from an area.
References __FSQRS, cfg_hare_ExtEff, g_random_fnc(), Landscape::GetHareFoodQuality(), THare_Population_Manager::GetPolyFood(), TAnimal::m_OurLandscape, m_OurPopulationManager, m_vegPalatability, THare_Population_Manager::SetPolyFood(), Landscape::SupplyCropType(), Landscape::SupplyPolyRef(), Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), toc_None, and CfgFloat::value().
Referenced by Forage().
|
protected |
Forage from an area and resturn pesticide exposure as well as food.
References __FSQRS, cfg_hare_ExtEff, cfg_hare_pesticide_contact_exposure_rate, cfg_hare_pesticide_ingestion_exposure_rate, g_random_fnc(), Landscape::GetHareFoodQuality(), THare_Population_Manager::GetPolyFood(), TAnimal::m_OurLandscape, m_OurPopulationManager, m_vegPalatability, ppp_1, Landscape::SupplyCropType(), Landscape::SupplyPesticideP(), Landscape::SupplyPolyRef(), Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), toc_None, and CfgFloat::value().
Referenced by ForageP().
|
inlineprotectedvirtual |
Handles internal effects of endocrine distrupter pesticide exposure. If any effects are needed this method must be re-implemented by descendent classes.
Reimplemented in Hare_Male, and Hare_Female.
|
inlineprotectedvirtual |
Handles internal effects of organophosphate pesticide exposure. If any effects are needed this method must be re-implemented by descendent classes.
Reimplemented in Hare_Male, and Hare_Female.
|
inline |
Provide the age of the hare.
References m_Age.
Referenced by THare_Population_Manager::DoFirst(), and Hare_Female::DoLactation().
|
inline |
|
inlineprotected |
Get direction of peg.
Daily movement is limited by a peg which does not really want to move, but can be dragged slowly. This requires a set of rapid functions because they will be used a lot. NB dispersal takes no account of the peg.
Figures out the closest direction to peg.
1 NE, 3 SE, 5 SWest & 7 NW
only uses 4 returns because this is very fast and relatively simple - 8 directions would be quite difficult to implement fast
This is also complicated by the fact that the peg can be at the other end of the world due to wrap around.
References g_random_fnc(), TAnimal::m_Location_x, TAnimal::m_Location_y, m_OurPopulationManager, m_peg_x, m_peg_y, Population_Manager_Base::SupplySimHH(), and Population_Manager_Base::SupplySimWH().
|
inlineprotected |
Get peg distance.
Daily movement is limited by a peg which does not really want to move, but can be dragged slowly. This requires a set of rapid functions because they will be used a lot. NB dispersal takes no account of the peg.
Calculates the distance from our current x,y to the peg We must avoid sqrt and the like so our distance is in rectangular co-ordinates. This is complicated by the fact that the peg and hare may be on opposite sides of the world due to wrap around.
References TAnimal::m_Location_x, TAnimal::m_Location_y, m_OurPopulationManager, m_peg_x, m_peg_y, Population_Manager_Base::SupplySimH(), Population_Manager_Base::SupplySimW(), and Population_Manager_Base::SupplySimWH().
Referenced by GetPegPull().
|
inlineprotected |
Get attractive force of peg.
Returns the squared rectangular distance from the peg
References GetPegDistance().
|
inline |
double THare::GetRMR | ( | ) |
Get todays RMR.
Gets the hare RMR based on age and mass
References THare_Population_Manager::GetRMR(), GetTotalWeight(), m_Age, and m_OurPopulationManager.
Referenced by Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), and Hare_Female::BeginStep().
|
inline |
Provide the wet weight of the hare.
Uses a standard multiplier of 3.8 to convert dry to wet weight, then adds the fat (no water here).
References m_fatReserve, and m_weight.
Referenced by EnergyBalance(), GetRMR(), Hare_Infant::st_Developing(), and Hare_Young::st_Foraging().
|
inline |
|
protectedvirtual |
Handles internal effects of pesticide exposure. If any effects are needed this method must be re-implemented by descendent classes.
This method needs to be re-implemented for any class which has pesticide response behaviour. e.g. see Hare_Female::InternalPesticideHandlingAndResponse
Reimplemented in Hare_Female, and Hare_Male.
References m_pesticide_burden, and m_pesticidedegradationrate.
Referenced by Hare_Young::EndStep(), and Hare_Juvenile::EndStep().
void THare::loadVegPalatability | ( | void | ) |
Loads static member m_vegPalatability with data.
References hare_tov_SetVegPalatability(), m_vegPalatability, and toc_Foobar.
|
protected |
Move the peg according to attraction forces.
Daily movement is limited by a peg which does not really want to move, but can be dragged slowly. This requires a set of rapid functions because they will be used a lot. NB dispersal takes no account of the peg.
Moves the peg towards the location, the speed of movement is dependent upon an inertia parameter.
Once again we have the problem of wrap around.
References g_hare_peg_inertia, TAnimal::m_Location_x, TAnimal::m_Location_y, m_OurPopulationManager, m_peg_x, m_peg_y, Population_Manager_Base::SupplySimHH(), and Population_Manager_Base::SupplySimWH().
Referenced by EndStep(), Hare_Infant::EndStep(), Hare_Young::EndStep(), Hare_Juvenile::EndStep(), Hare_Male::EndStep(), and Hare_Female::EndStep().
|
inlinevirtual |
Mortality - overridden in descendent classes.
Reimplemented in Hare_Female, Hare_Male, Hare_Juvenile, Hare_Young, and Hare_Infant.
|
inline |
Inform Mum that we are dead.
Really a Hare_Infant method. Implemented here because it is needed only for debug.
References m_MyMum, TAnimal::m_OurLandscape, and Landscape::Warn().
|
overrideprotectedvirtual |
Do we require a response to a farm event.
Checks to see if any nasty farm event has caused any behaviour. Few do directly, most work by changes in vegetation or forage, but if they do they can be added here
Reimplemented from TAnimal.
Reimplemented in Hare_Young, and Hare_Infant.
References cfg_hare_escape_dist, Running(), sleep_all_day, and CfgInt::value().
|
protected |
Run a distance in a direction.
References hare_tole_can_walkacross(), TAnimal::m_guard_cell_x, TAnimal::m_guard_cell_y, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, m_OurPopulationManager, Population_Manager_Base::SupplySimH(), Population_Manager_Base::SupplySimW(), and Population_Manager::UpdateGuardMap().
|
protectedvirtual |
Run.
Moves the hare and alters the energy and time budget to simulate running /n All proximity alerts or other causes of running for all hares are sent via this code - the code then calls a movement code and energetic code. However these are may not the same for all hare types, so if there is a specific routine for a type, that is called, if not the default is used - there is no need to worry about this as the calling program.
References activity_Recovery, activity_Running, THare_Population_Manager::AddHareDensity(), cfg_Hare_Recovery_Time, EnergyBalance(), g_random_fnc(), TAnimal::m_guard_cell_x, TAnimal::m_guard_cell_y, TAnimal::m_Location_x, TAnimal::m_Location_y, m_OurPopulationManager, m_Type, Run(), THare_Population_Manager::SubtractHareDensity(), TimeBudget(), Population_Manager::UpdateGuardMap(), and CfgInt::value().
Referenced by Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), and OnFarmEvent().
|
inlinestatic |
Set the mother pointer. Reimplemented in Hare_Infant.
Referenced by THare_Population_Manager::CreateObjects().
|
virtual |
Base implementation only - reimplemented.
This function is really a dummy - but it needs to be here.
The return values is meaningless, but stops the compiler complaining
Reimplemented in Hare_Female, Hare_Juvenile, and Hare_Young.
References tohs_InitialState.
|
protected |
Tidy up before removing the object on death.
Do the housekeeping necessary to die
References m_CurrentHState, TALMaSSObject::m_CurrentStateNo, m_MyMum, TALMaSSObject::m_StepDone, Hare_Female::ON_YoungKilled(), and tohs_DestroyObject.
Referenced by Hare_Infant::ON_Dead(), and Hare_Young::ON_Dead().
|
inlineoverridevirtual |
Base implementation only - reimplemented.
Reimplemented from TALMaSSObject.
Reimplemented in Hare_Female, Hare_Male, Hare_Juvenile, Hare_Young, and Hare_Infant.
void THare::THareInit | ( | int | p_x, |
int | p_y, | ||
THare_Population_Manager * | p_PPM | ||
) |
Object Initiation.
References cfg_hare_max_age, cfg_hare_max_age_var, cfg_hare_pesticidedegradationrate, cfg_Hare_StdSpeedRunning, cfg_Hare_StdSpeedWalking, g_random_fnc(), THare_Population_Manager::GetHareRefNum(), m_ActivityTime, m_CurrentHState, m_ddindex, m_DensitySum, m_expDensity, m_experiencedDensity, m_fatReserve, m_foragingenergy, m_KJForaging, m_KJRunning, m_KJWalking, m_lastYearsDensity, m_Lifespan, m_OurPopulationManager, m_peg_x, m_peg_y, m_pesticide_burden, m_pesticidedegradationrate, m_pesticideInfluenced1, m_RefNum, m_SpeedRunning, m_SpeedWalking, m_StarvationDays, m_TodaysEnergy, tohs_InitialState, CfgInt::value(), and CfgFloat::value().
Referenced by Hare_Infant::ReInit(), Hare_Young::ReInit(), Hare_Juvenile::ReInit(), Hare_Male::ReInit(), Hare_Female::ReInit(), and THare().
|
protected |
Adjust time budger for an activity.
This method calculates time used for each activity and subtracts this from the day
References activity_Dispersal, activity_Foraging, activity_Recovery, activity_Resting, activity_Running, activity_Walking, m_ActivityTime, TAnimal::m_OurLandscape, m_SpeedRunning, m_SpeedWalking, and Landscape::Warn().
Referenced by Running(), Hare_Juvenile::st_Dispersal(), Hare_Young::st_Foraging(), Hare_Juvenile::st_Foraging(), Hare_Male::st_Foraging(), Hare_Female::st_Foraging(), Hare_Young::st_Resting(), and Hare_Juvenile::st_Resting().
|
protected |
Walking.
Moves the hare and alters the energy budget to simulate walking.
References g_random_fnc(), and Run().
Referenced by Forage(), ForageP(), and Hare_Juvenile::st_Dispersal().
|
virtual |
Test for predation.
A mortality test. Also include optional code for size and low fat reserve increased mortality - tested under the POM
Reimplemented in Hare_Juvenile.
References cfg_hare_lowfatextramort, cfg_hare_minimum_breeding_weight, g_rand_uni_fnc(), THare_Population_Manager::m_AdultMortRate, m_Age, m_fatReserve, m_OurPopulationManager, m_weight, CfgInt::value(), and CfgFloat::value().
|
protected |
Minutes of potential activity time per day.
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), Hare_Young::st_Foraging(), Hare_Juvenile::st_Foraging(), Hare_Male::st_Foraging(), Hare_Female::st_Foraging(), Hare_Young::st_Resting(), Hare_Juvenile::st_Resting(), THareInit(), and TimeBudget().
|
protected |
State variale - hare age.
Referenced by Hare_Male::BeginStep(), Hare_Female::BeginStep(), EnergyBalance(), GetAge(), GetRMR(), Hare_Infant::Init(), Hare_Young::Init(), Hare_Juvenile::Init(), Hare_Male::Init(), Hare_Female::Init(), Hare_Juvenile::ShouldMature(), Hare_Infant::st_Developing(), Hare_Young::st_Developing(), Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), Hare_Female::st_Developing(), Hare_Young::st_Foraging(), Hare_Infant::st_NextStage(), Hare_Juvenile::st_NextStage(), and WasPredated().
|
protected |
Defines the current activity.
Inherits m_Location_x, m_Location_y, m_OurLandscape and general step behaviour from TAnimal
Referenced by Hare_Young::BeginStep(), Hare_Infant::EndStep(), Hare_Young::EndStep(), Hare_Male::GeneralOrganoPhosphate(), Hare_Female::GeneralOrganoPhosphate(), Hare_Juvenile::ON_Dead(), Hare_Male::ON_Dead(), Hare_Female::ON_Dead(), st_Dying(), Hare_Infant::st_NextStage(), Hare_Young::st_NextStage(), Hare_Juvenile::st_NextStage(), Hare_Infant::Step(), Hare_Young::Step(), Hare_Juvenile::Step(), Hare_Male::Step(), Hare_Female::Step(), and THareInit().
|
protected |
State variable used in alternative density-dependent configurations.
Referenced by Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), and THareInit().
|
protected |
State variable used in alternative density-dependent configurations.
Referenced by Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), and THareInit().
|
protected |
State variable - the amount of energy it is possible to eat as a multiplyer or RMR.
Referenced by Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), Forage(), and ForageP().
|
protected |
State variable used in alternative density-dependent configurations.
Referenced by Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), and THareInit().
|
protected |
State variable used in alternative density-dependent configurations.
Referenced by Hare_Male::BeginStep(), Hare_Female::BeginStep(), and THareInit().
|
protected |
State variable - the energy reserve of the hare.
Referenced by Hare_Female::DoLactation(), Hare_Female::dumpEnergy(), EnergyBalance(), GetTotalWeight(), Hare_Male::Init(), Hare_Female::Init(), Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), Hare_Female::st_Developing(), THareInit(), Hare_Female::UpdateGestation(), Hare_Female::UpdateOestrous(), and WasPredated().
|
protected |
Energy obtained from foraging/feeding.
Referenced by Hare_Male::BeginStep(), Hare_Female::BeginStep(), Hare_Female::dumpEnergy(), EnergyBalance(), and THareInit().
|
protected |
flag for sickness - used in conjunction with disease configurations
Referenced by Hare_Male::BeginStep(), Hare_Female::BeginStep(), Hare_Female::Init(), and Hare_Female::UpdateOestrous().
|
protected |
KJ/m cost of foraging per kg hare.
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), EnergyBalance(), Hare_Female::Init(), and THareInit().
|
protected |
KJ/m cost of running per kg hare.
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), EnergyBalance(), Hare_Female::Init(), and THareInit().
|
protected |
KJ/m cost of walking per kg hare.
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), EnergyBalance(), Hare_Female::Init(), and THareInit().
|
protected |
State variable used in alternative density-dependent configurations.
Referenced by Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), Hare_Male::st_Foraging(), Hare_Female::st_Foraging(), and THareInit().
|
protected |
Physiolocal lifespan, assuming nothing else kills the hare (unlikely to reach this age)
Referenced by Hare_Male::BeginStep(), Hare_Female::BeginStep(), and THareInit().
|
protected |
Pointer to the hare's mum.
Referenced by Hare_Infant::BeginStep(), GetMum(), ON_MumDead(), Hare_Infant::SetMum(), st_Dying(), Hare_Infant::st_NextStage(), and Hare_Young::st_NextStage().
|
protected |
State variale - last hare weight.
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Infant::Init(), Hare_Female::Init(), Hare_Infant::st_Developing(), and Hare_Young::st_Developing().
|
protected |
Pointer to the hare population manager.
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), Hare_Female::DoLactation(), EnergyBalance(), ForageSquare(), ForageSquareP(), GetPegDirection(), GetPegDistance(), GetRMR(), Hare_Female::GiveBirth(), Hare_Female::Init(), Hare_Male::InternalPesticideHandlingAndResponse(), Hare_Female::InternalPesticideHandlingAndResponse(), MovePeg(), Run(), Running(), Hare_Infant::st_Developing(), Hare_Young::st_Developing(), Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), Hare_Female::st_Developing(), Hare_Juvenile::st_Dispersal(), Hare_Young::st_Foraging(), Hare_Juvenile::st_Foraging(), Hare_Male::st_Foraging(), Hare_Female::st_Foraging(), Hare_Infant::st_NextStage(), Hare_Young::st_NextStage(), Hare_Juvenile::st_NextStage(), THareInit(), WasPredated(), and Hare_Juvenile::WasPredated().
|
protected |
peg x-coordinate
Referenced by GetPegDirection(), GetPegDistance(), MovePeg(), Hare_Female::st_Dispersal(), and THareInit().
|
protected |
peg y-coordinate
Referenced by GetPegDirection(), GetPegDistance(), MovePeg(), Hare_Female::st_Dispersal(), and THareInit().
|
protected |
State variable used to hold the current body-burden of pesticide.
Referenced by ForageP(), InternalPesticideHandlingAndResponse(), Hare_Male::InternalPesticideHandlingAndResponse(), Hare_Female::InternalPesticideHandlingAndResponse(), and THareInit().
|
protected |
State variable used to hold the daily degredation rate of the pesticide in the body.
Referenced by InternalPesticideHandlingAndResponse(), Hare_Male::InternalPesticideHandlingAndResponse(), Hare_Female::InternalPesticideHandlingAndResponse(), and THareInit().
|
protected |
Flag to indicate pesticide effects (e.g. can be used for endocrine distruptors with delayed effects until birth).
Referenced by Hare_Female::GeneralEndocrineDisruptor(), Hare_Female::GiveBirth(), and THareInit().
|
protected |
Unique hare reference number, also functions as sex flag.
Referenced by GetRefNum(), Hare_Male::Init(), Hare_Female::Init(), Hare_Juvenile::st_NextStage(), and THareInit().
|
protected |
m/min speed of running per kg hare
Referenced by THareInit(), and TimeBudget().
|
protected |
m/min speed of walking per kg hare
Referenced by THareInit(), and TimeBudget().
|
protected |
State variable - the number of consecutive days in negative energy balance.
Referenced by Hare_Infant::st_Developing(), Hare_Young::st_Developing(), Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), Hare_Female::st_Developing(), and THareInit().
|
protected |
State variable - the amount of energy available today, can be in deficit.
Referenced by Hare_Female::dumpEnergy(), EnergyBalance(), Hare_Infant::ON_BeingFed(), Hare_Infant::st_Developing(), Hare_Young::st_Developing(), Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), Hare_Female::st_Developing(), Hare_Young::st_Foraging(), Hare_Juvenile::st_Foraging(), Hare_Male::st_Foraging(), Hare_Female::st_Foraging(), and THareInit().
|
protected |
State variale - the type of hare.
Referenced by Hare_Infant::Init(), Hare_Young::Init(), Hare_Juvenile::Init(), Hare_Male::Init(), Hare_Female::Init(), Running(), and Hare_Juvenile::st_Dispersal().
|
static |
Will hold and array of palatability for hare for each tov type. Most are 1, but unpalatable vegetation can be specified here.
Referenced by ForageSquare(), ForageSquareP(), loadVegPalatability(), Hare_Juvenile::st_Dispersal(), and THare_Population_Manager::~THare_Population_Manager().
|
protected |
State variale - hare weight g.
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), Hare_Female::dumpEnergy(), GetTotalWeight(), GetWeight(), Hare_Infant::Init(), Hare_Young::Init(), Hare_Juvenile::Init(), Hare_Male::Init(), Hare_Female::Init(), Hare_Male::InternalPesticideHandlingAndResponse(), Hare_Female::InternalPesticideHandlingAndResponse(), Hare_Infant::SetWeight(), Hare_Infant::st_Developing(), Hare_Young::st_Developing(), Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), Hare_Female::st_Developing(), Hare_Infant::st_NextStage(), Hare_Young::st_NextStage(), Hare_Juvenile::st_NextStage(), Hare_Female::st_ReproBehaviour(), Hare_Female::UpdateOestrous(), and WasPredated().