Loading [MathJax]/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Hare_Female Class Reference

Class for female hares. More...

#include <Hare_All.h>

Inheritance diagram for Hare_Female:
Hare_Juvenile THare TAnimal TALMaSSObject

Public Member Functions

void BeginStep (void) override
 Female BeginStep. More...
 
void Step (void) override
 Female Step. More...
 
void EndStep (void) override
 Female EndStep. More...
 
 Hare_Female (int p_x, int p_y, Landscape *p_L, THare_Population_Manager *p_PPM, double p_weight, int a_age, int a_Ref)
 Female Constructor. More...
 
void ReInit (struct_Hare a_data)
 Female object reinitiation. More...
 
void Init (double p_weight, int a_age, int a_Ref)
 Object initiation. More...
 
 ~Hare_Female () override
 Female Destructor. More...
 
void dumpEnergy ()
 Used to record energetic status. More...
 
void SetSterile ()
 Female is sterile. More...
 
void ON_Dead () override
 The female is dead. More...
 
bool UpdateYoung (THare *a_old, THare *a_new)
 Swap a young list pointer. More...
 
void AddYoung (THare *a_new)
 Add a leveret to the list of kids. More...
 
void ON_YoungKilled (THare *a_young)
 A leveret has been killed. More...
 
void ON_RemoveYoung (THare *a_young)
 A leveret has matured. More...
 
void AllYoungKilled ()
 Last leveret predated. More...
 
void AllYoungMatured ()
 No more young to look after. More...
 
bool ON_AreYouMyMum (THare *a_young)
 Debug function. More...
 
bool SanityCheckYoungList ()
 Debug function. More...
 
- Public Member Functions inherited from Hare_Juvenile
 Hare_Juvenile (int p_x, int p_y, Landscape *p_L, THare_Population_Manager *p_PPM, double p_weight)
 Constructor for the juvenile hare object. More...
 
void ReInit (struct_Hare a_data)
 Juvenile object reinitiation. More...
 
void Init (double p_weight)
 Object initiation. More...
 
 ~Hare_Juvenile () override
 Destructor for the juvenile hare object. More...
 
- Public Member Functions inherited from THare
 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...
 
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_FemaleGetMum ()
 Get the mother pointer. More...
 
double GetRMR ()
 Get todays RMR. More...
 
int GetRefNum ()
 Get the refnum for this hare. More...
 
void loadVegPalatability (void)
 Loads static member m_vegPalatability with data. More...
 
- Public Member Functions inherited from TAnimal
 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...
 
- Public Member Functions inherited from TALMaSSObject
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...
 

Protected Member Functions

void UpdateOestrous ()
 Update oestrous counter. More...
 
void UpdateGestation ()
 Update gestation counter. More...
 
void GiveBirth ()
 Produce a litter. More...
 
APoint PlaceYoung ()
 Find somewhere nice for the babies to hide. More...
 
void DoLactation ()
 Lactation. More...
 
void Mating ()
 Mate. More...
 
TTypeOfHareState st_Dispersal () override
 Female Dispersal. More...
 
TTypeOfHareState st_Developing () override
 Female Developing. More...
 
TTypeOfHareState st_Foraging ()
 Female Foraging. More...
 
TTypeOfHareState st_ReproBehaviour ()
 Reproductive behaviour control. More...
 
void InternalPesticideHandlingAndResponse () override
 Handles internal effects of pesticide exposure. If any effects are needed this method must be re-implemented by descendent classes. More...
 
void GeneralEndocrineDisruptor (double a_pesticide_dose) override
 Handles internal effects of endocrine distrupter pesticide exposure for female. More...
 
void GeneralOrganoPhosphate (double a_pesticide_dose) override
 Handles internal effects of organophosphate pesticide exposure for female. More...
 
- Protected Member Functions inherited from Hare_Juvenile
TTypeOfHareState st_Foraging ()
 Juvenile foraging. More...
 
void st_NextStage ()
 Maturation to Hare_Male or Hare_Female. More...
 
TTypeOfHareState st_Resting ()
 Juvenile Resting. More...
 
bool ShouldMature ()
 Test for maturation. More...
 
bool WasPredated () override
 Test for mortality. More...
 
- Protected Member Functions inherited from THare
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...
 
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...
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

Static Protected Member Functions

static TTypeOfHareState st_Resting ()
 Resting. More...
 

Protected Attributes

int m_NoYoung
 State variable - current litter size. More...
 
int m_litter_no
 State variable - current litter number. More...
 
bool m_sterile
 State variable - is/not sterile. More...
 
int m_OestrousCounter
 State variable - Days in oestrous. More...
 
int m_GestationCounter
 State variable - Days in gestation. More...
 
double m_LeveretMaterial
 State variable - Mass of foetal material. More...
 
TTypeOfActivity m_reproActivity
 State variable - current reproductive state. More...
 
TListOfHares m_MyYoung
 Pointer to litter. More...
 
std::mutex m_MyYoungMutex
 mutex for the young list. More...
 
- Protected Attributes inherited from THare
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_Femalem_MyMum = nullptr
 Pointer to the hare's mum. More...
 
THare_Population_Managerm_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...
 
- Protected Attributes inherited from TAnimal
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
 
- 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from THare
static void SetMum (Hare_Female *)
 Set the mother pointer. Reimplemented in Hare_Infant. More...
 
- Static Public Member Functions inherited from TAnimal
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 Public Member Functions inherited from TALMaSSObject
static void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 
- Static Public Attributes inherited from THare
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...
 
- Static Protected Attributes inherited from TAnimal
static Landscapem_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...
 

Detailed Description

Class for female hares.

Constructor & Destructor Documentation

◆ Hare_Female()

Hare_Female::Hare_Female ( int  p_x,
int  p_y,
Landscape p_L,
THare_Population_Manager p_PPM,
double  p_weight,
int  a_age,
int  a_Ref 
)

Female Constructor.

2831  : Hare_Juvenile(p_x, p_y, p_L, p_PPM, p_weight) { Init(p_weight, a_age, a_Ref); }

References Init().

◆ ~Hare_Female()

Hare_Female::~Hare_Female ( )
override

Female Destructor.

2864  {
2865  //Nothing to do
2866 }

Member Function Documentation

◆ AddYoung()

void Hare_Female::AddYoung ( THare a_new)

Add a leveret to the list of kids.

Adds a new young to the mothers list

3535 { m_MyYoung.push_back(a_new); }

References m_MyYoung.

Referenced by THare_Population_Manager::CreateObjects().

◆ AllYoungKilled()

void Hare_Female::AllYoungKilled ( )

Last leveret predated.

Behavioural switch to determine what to do on death of all young. Depends on what we were doing before.

3569  {
3570  switch (m_reproActivity)
3571  {
3573  break;
3574  case activity_inoestrous:
3575  break;
3576  case activity_gestation:
3577  break;
3578  case activity_givebirth:
3579  case activity_lactation:
3582  break;
3583  default:
3584  m_OurLandscape->Warn("Hare_Female::AllYoungKilled unknown activity", nullptr);
3585  exit(1);
3586  }
3587 }

References activity_gestation, activity_givebirth, activity_inoestrous, activity_lactation, activity_oestrouscycle, cfg_DaysToOestrous, m_OestrousCounter, TAnimal::m_OurLandscape, m_reproActivity, CfgInt::value(), and Landscape::Warn().

Referenced by ON_YoungKilled().

◆ AllYoungMatured()

void Hare_Female::AllYoungMatured ( )

No more young to look after.

3622  {
3623  m_NoYoung = 0;
3624  switch (m_reproActivity)
3625  {
3627  break;
3628  case activity_inoestrous:
3629  break;
3630  case activity_gestation:
3631  break;
3632  case activity_givebirth:
3633  break;
3634  case activity_lactation:
3637  break;
3638  default:
3639  m_OurLandscape->Warn("Hare_Female::AllYoungMatured unknown activity", nullptr);
3640  exit(1);
3641  }
3642 }

References activity_gestation, activity_givebirth, activity_inoestrous, activity_lactation, activity_oestrouscycle, cfg_DaysToOestrous, m_NoYoung, m_OestrousCounter, TAnimal::m_OurLandscape, m_reproActivity, CfgInt::value(), and Landscape::Warn().

Referenced by ON_RemoveYoung().

◆ BeginStep()

void Hare_Female::BeginStep ( void  )
overridevirtual

Female BeginStep.

Reimplemented from Hare_Juvenile.

2869  {
2870  m_ActivityTime = 1440; // Start the day
2871 #ifdef __SIZERELATEDDEATH
2873  if (m_Age>365) {
2875  ON_Dead();
2876  m_StepDone=true; // We need to skip the step code, we are dead
2877  return;
2878  }
2879  }
2880  }
2881 #endif
2882 #ifdef __DISEASEDDMORTALITY
2883  if (m_IamSick) {
2884  ON_Dead();
2885  m_StepDone=true; // We need to skip the step code, we are dead
2886  return;
2887  }
2888 #endif
2889  if (WasPredated())
2890  {
2891  ON_Dead();
2892  m_StepDone = true; // We need to skip the step code, we are dead
2893  return;
2894  }
2895  // Age physiolocally
2896  if (++m_Age > m_Lifespan)
2897  {
2898  ON_Dead();
2899  m_StepDone = true; // We need to skip the step code, we are dead
2900  return;
2901  }
2902  m_KJWalking = m_OurPopulationManager->GetKJperM(static_cast<int>(floor(0.5 + m_weight)));
2903  m_KJRunning = m_KJWalking * 2;
2906  // Checking code ***CJT***
2907  m_foragingenergy = 0;
2908 #ifdef __DISEASEDDM
2910  if (m_OurLandscape->SupplyDayInYear()==0) {
2914  m_IamSick=true;
2915  }
2916  else m_IamSick=false;
2917  }
2918 #endif
2919 #ifdef __DISEASEDDM2
2921  if (m_OurLandscape->SupplyDayInYear()==0) {
2924  }
2925 #endif
2926 #ifdef __DISEASEDDM3
2927  m_ddindex++;
2928  if (m_ddindex==365) {
2929  m_ddindex=0;
2930  }
2934  m_lastYearsDensity= int(m_DensitySum * (1.0/365.0));
2935 #endif
2936  // Set the maximum possible energy intake
2938  CheckManagement();
2939 }

References cfg_hare_escape_dist, cfg_hare_minimum_breeding_weight, cfg_hare_proximity_alert, cfg_HareFemaleSicknessDensityDepValue, cfg_MaxEnergyIntakeScaler, TAnimal::CheckManagement(), g_rand_uni_fnc(), THare_Population_Manager::GetKJperM(), THare::GetRMR(), THare_Population_Manager::GetTotalDensity(), THare::m_ActivityTime, THare::m_Age, THare::m_ddindex, THare::m_DensitySum, THare::m_EnergyMax, THare::m_expDensity, THare::m_experiencedDensity, THare::m_foragingenergy, THare::m_IamSick, THare::m_KJForaging, THare::m_KJRunning, THare::m_KJWalking, THare::m_lastYearsDensity, THare::m_Lifespan, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, THare::m_OurPopulationManager, TALMaSSObject::m_StepDone, THare::m_weight, ON_Dead(), THare::Running(), Landscape::SupplyDayInYear(), CfgInt::value(), CfgFloat::value(), and Hare_Juvenile::WasPredated().

◆ DoLactation()

void Hare_Female::DoLactation ( )
protected

Lactation.

Feed the young milk.

Here the female uses energy and converts it to milk, which is shared equally between her leverets Assumptions:
a) There is a maximum amount of milk possible to feed to a leveret
b) Equal distribution of inadequate resources

NB the currency is KJ energy not milk per se

3479  {
3488  double sz = static_cast<double>(m_MyYoung.size());
3489  if (m_fatReserve > 0)
3490  {
3491  // Zero is used here because it is possible to use all fat reserves on this
3492  double en = 63.7 * m_fatReserve;
3493  // en is the energy available for milk
3494  double rmr = m_MyYoung[0]->GetRMR();
3495  double maxMilk = (rmr + m_OurPopulationManager->GetMaxDailyGrowthEnergy(m_MyYoung[0]->GetAge())) * sz * (1 -
3497  if (en > maxMilk) { en = maxMilk; }
3498 #ifdef __NOSTARVE
3499  en=maxMilk;
3500 #endif
3501  // remove the energy used
3502  m_fatReserve -= en * (1.0 / 63.7); // 63.7 is the cost of 1g dw fat
3503  // KJ per young
3504  en /= sz;
3505  auto current = m_MyYoung.begin();
3506  while (current != m_MyYoung.end())
3507  {
3508  dynamic_cast<Hare_Infant*>(*current)->ON_BeingFed(en);
3509  ++current;
3510  }
3511  }
3512 }

References g_PropSolidFood, THare::GetAge(), THare_Population_Manager::GetMaxDailyGrowthEnergy(), THare::m_fatReserve, m_MyYoung, and THare::m_OurPopulationManager.

Referenced by GiveBirth(), and st_ReproBehaviour().

◆ dumpEnergy()

void Hare_Female::dumpEnergy ( )

Used to record energetic status.

3174  {
3175  FILE* fp = fopen("EnergyCheck.txt", "a");
3176  int wt = static_cast<int>(floor(0.5 + m_weight));
3177  int fe = static_cast<int>(floor(0.5 + m_foragingenergy));
3178  int fr = static_cast<int>(floor(0.5 + m_fatReserve));
3179  int te = static_cast<int>(floor(0.5 + m_TodaysEnergy));
3180  fprintf(fp, "%d\t%d\t%d\t%d\t%d\n", m_OurLandscape->SupplyDayInYear(), wt, fe, fr, te);
3181  fclose(fp);
3182 }

References THare::m_fatReserve, THare::m_foragingenergy, TAnimal::m_OurLandscape, THare::m_TodaysEnergy, THare::m_weight, and Landscape::SupplyDayInYear().

Referenced by st_Foraging().

◆ EndStep()

void Hare_Female::EndStep ( void  )
overridevirtual

◆ GeneralEndocrineDisruptor()

void Hare_Female::GeneralEndocrineDisruptor ( double  a_pesticide_dose)
overrideprotectedvirtual

Handles internal effects of endocrine distrupter pesticide exposure for female.

Reimplemented from THare.

4101  {
4102  // May also wish to specify certain gestation days for the effects here
4103  if (m_GestationCounter > 0) { m_pesticideInfluenced1 = true; }
4104 }

References m_GestationCounter, and THare::m_pesticideInfluenced1.

Referenced by InternalPesticideHandlingAndResponse().

◆ GeneralOrganoPhosphate()

void Hare_Female::GeneralOrganoPhosphate ( double  a_pesticide_dose)
overrideprotectedvirtual

Handles internal effects of organophosphate pesticide exposure for female.

Reimplemented from THare.

4110  {
4111  if (g_rand_uni_fnc() > l_pest_daily_mort.value()) return;
4113  m_StepDone = true;
4114 }

References g_rand_uni_fnc(), l_pest_daily_mort, THare::m_CurrentHState, TALMaSSObject::m_StepDone, tohs_Dying, and CfgFloat::value().

Referenced by InternalPesticideHandlingAndResponse().

◆ GiveBirth()

void Hare_Female::GiveBirth ( )
protected

Produce a litter.

Give birth to Hare_Infants.

Lets assume we do this a deterministic way. So the number of leverets depends on the mass of leveret material collected.
The size is determined by the mass divided by the number possible such that size stays in the range 95-125g
Litter size limited to max 4

Once they are born they need to be placed somewhere. This should be somewhere where the vegetation is not too sparse

3355  {
3356  int NoLeverets = 0;
3366  {
3367  // Could do lots now, e.g. take a test to determine if we reduce repro or abandon it.
3368  // The option below reduces the energy for leveret development by 0-100%
3369  //m_LeveretMaterial *= g_rand_uni();
3370  // Here we take it all
3371  m_LeveretMaterial = 0;
3372  m_pesticideInfluenced1 = false;
3373  }
3374 
3375  // THIS CODE IS FOR DOING IT ON THE BASIS OF ENERGY
3376  double mi = cfg_minLeveretBirthWeight.value();
3377  if (m_LeveretMaterial / 4.0 > mi) NoLeverets = 4;
3378  else if (m_LeveretMaterial / 3.0 > mi) NoLeverets = 3;
3379  else if (m_LeveretMaterial / 2.0 > mi) NoLeverets = 2;
3380  else if (m_LeveretMaterial > mi) NoLeverets = 1;
3381  if (NoLeverets == 0)
3382  {
3383  // Can't produce a leveret - abort the pregnancy
3384  m_LeveretMaterial = 0;
3387  return;
3388  }
3389  double leveret_size = m_LeveretMaterial / static_cast<double>(NoLeverets);
3390  if (leveret_size > cfg_maxLeveretBirthWeight.value()) { leveret_size = cfg_maxLeveretBirthWeight.value(); }
3391  // END ENERGETIC
3392  /*
3393  // THIS IS THE ALTERNATIVE 1 _ GET THE NUMBER BASED ON WHETHER IT IS FIRST, 2ND, 3RD etc..
3394  NoLeverets=m_OurPopulationManager->GetLitterSize(m_litter_no++);
3395  if (NoLeverets<1) {
3396  AllYoungKilled();
3397  return;
3398  }
3399  leveret_size=cfg_HareStartWeight.value(); // NB No variability in start weight
3400  */
3401  // END ALTERNATE 1
3402  /* ALTERNATE 2 - Here we adjust for the weight of the female
3403 
3404  if (m_weight > cfg_hare_minimum_breeding_weight.value() ) {
3405  NoLeverets=m_OurPopulationManager->GetLitterSize(m_litter_no++);
3406  }
3407  else {
3408  }
3409  if (NoLeverets<1) {
3410  AllYoungKilled();
3411  return;
3412  }
3413  leveret_size=cfg_HareStartWeight.value(); // NB No variability in start weight
3414  */
3415  // END ALTERNATE 2
3416 
3417  // Create the data required
3418  auto sp = new struct_Hare;
3419  sp->HM = m_OurPopulationManager;
3420  sp->L = m_OurLandscape;
3421  sp->Mum = this;
3422  sp->weight = leveret_size;
3424  APoint pt = PlaceYoung();
3425  sp->x = pt.m_x;
3426  sp->y = pt.m_y;
3427  // Make the leverets
3428  m_OurPopulationManager->CreateObjects(0, this, nullptr, sp, NoLeverets);
3429  delete sp;
3430  m_litter_no++;
3432 #ifdef __saveLitterInfo
3433  //Temporary Output Start
3434  FILE* fp = fopen("LitterProduction.txt", "a");
3435  int month = m_OurLandscape->SupplyMonth();
3436  fprintf(fp, "%i\t%i\t%f\t%d\n", month, NoLeverets, leveret_size, m_litter_no);
3437  fclose(fp);
3438  // End
3439 #endif
3440  // Feed them today
3441  DoLactation();
3442 }

References activity_lactation, activity_oestrouscycle, cfg_DaysToOestrous, cfg_maxLeveretBirthWeight, cfg_minLeveretBirthWeight, THare_Population_Manager::CreateObjects(), DoLactation(), struct_Hare::HM, m_LeveretMaterial, m_litter_no, m_OestrousCounter, TAnimal::m_OurLandscape, THare::m_OurPopulationManager, THare::m_pesticideInfluenced1, m_reproActivity, APoint::m_x, APoint::m_y, PlaceYoung(), Landscape::SupplyMonth(), CfgInt::value(), and CfgFloat::value().

Referenced by st_ReproBehaviour().

◆ Init()

void Hare_Female::Init ( double  p_weight,
int  a_age,
int  a_Ref 
)

Object initiation.

2844  {
2845  m_Type = hob_Female;
2846  m_fatReserve = p_weight * 3.8 * 0.04; // To get 4% of WW+ingesta
2847  m_sterile = false;
2848  m_weight = p_weight;
2849  m_old_weight = p_weight;
2850  m_Age = a_age;
2851  m_OestrousCounter = 0;
2852  m_GestationCounter = 0;
2853  m_LeveretMaterial = 0;
2855  m_litter_no = 0;
2856  m_KJWalking = m_OurPopulationManager->GetKJperM(static_cast<int>(floor(0.5 + m_weight)));
2857  m_KJRunning = m_KJWalking * 2;
2859  m_IamSick = false;
2860  m_RefNum = a_Ref;
2861 }

References activity_oestrouscycle, THare_Population_Manager::GetKJperM(), hob_Female, THare::m_Age, THare::m_fatReserve, m_GestationCounter, THare::m_IamSick, THare::m_KJForaging, THare::m_KJRunning, THare::m_KJWalking, m_LeveretMaterial, m_litter_no, m_OestrousCounter, THare::m_old_weight, THare::m_OurPopulationManager, THare::m_RefNum, m_reproActivity, m_sterile, THare::m_Type, and THare::m_weight.

Referenced by Hare_Female(), and ReInit().

◆ InternalPesticideHandlingAndResponse()

void Hare_Female::InternalPesticideHandlingAndResponse ( )
overrideprotectedvirtual

Handles internal effects of pesticide exposure. If any effects are needed this method must be re-implemented by descendent classes.

This method is re-implemented ffrom THare for any class which has pesticide response behaviour. If the body burden exceeds the trigger then call pesticide-specific actions by dose

Reimplemented from THare.

3690  {
3696  double pesticideInternalConc = m_pesticide_burden / m_weight;
3697 
3698  if (m_pesticide_burden > 0)
3700  m_pesticide_burden, pesticideInternalConc);
3701 
3702  if (pesticideInternalConc > cfg_HarePesticideAccumulationThreshold.value())
3703  {
3704  switch (tp)
3705  {
3706  case ttop_NoPesticide:
3707  break;
3709  GeneralEndocrineDisruptor(pesticideInternalConc); // Calls the EndocrineDisruptor action code
3710  break;
3711  case ttop_AcuteEffects:
3712  GeneralOrganoPhosphate(pesticideInternalConc); // Calls the GeneralOrganophosphate action code
3713  break;
3714  default:
3715  exit(47);
3716  }
3717  }
3719  // Does nothing by default except internal degredation of the pesticide
3720 }

References THare_Population_Manager::BodyBurdenOut(), cfg_HarePesticideAccumulationThreshold, GeneralEndocrineDisruptor(), GeneralOrganoPhosphate(), TAnimal::m_OurLandscape, THare::m_OurPopulationManager, THare::m_pesticide_burden, THare::m_pesticidedegradationrate, THare::m_weight, Landscape::SupplyDayInYear(), Landscape::SupplyPesticideType(), Landscape::SupplyYearNumber(), ttop_AcuteEffects, ttop_NoPesticide, ttop_ReproductiveEffects, and CfgFloat::value().

Referenced by EndStep().

◆ Mating()

void Hare_Female::Mating ( )
protected

Mate.

3311  {
3312  // Sigh, need to develop code to determine if a male is close - how does
3313  // she choose a mate?? TODO if we ever consider males limiting or need population genetics
3314  // This is complicated by multiple matings in real life too.
3315  //
3316  // Assuming she has a mate and is mated
3319  m_LeveretMaterial = 0;
3320 }

References activity_gestation, cfg_hare_DaysToGestation, m_GestationCounter, m_LeveretMaterial, m_reproActivity, and CfgInt::value().

Referenced by st_ReproBehaviour().

◆ ON_AreYouMyMum()

bool Hare_Female::ON_AreYouMyMum ( THare a_young)

Debug function.

Debug code for checking young lists.

3664  {
3665  m_NoYoung = static_cast<int>(m_MyYoung.size());
3666  auto current = m_MyYoung.begin();
3667  while (current != m_MyYoung.end())
3668  {
3669  if (*current == a_young) { return true; }
3670  ++current;
3671  }
3672  return false;
3673 }

References m_MyYoung, and m_NoYoung.

◆ ON_Dead()

void Hare_Female::ON_Dead ( void  )
overridevirtual

The female is dead.

Do the housekeeping needed for object destruction

Reimplemented from Hare_Juvenile.

3647  {
3648  // if she has young she must tell them she is dead
3649  auto current = m_MyYoung.begin();
3650  while (current != m_MyYoung.end())
3651  {
3652  (*current)->ON_MumDead(this);
3653  ++current;
3654  }
3655  m_MyYoung.clear(); // Needed because of the potential for object re-use
3657  m_CurrentStateNo = -1;
3658  m_StepDone = true;
3659 }

References THare::m_CurrentHState, TALMaSSObject::m_CurrentStateNo, m_MyYoung, TALMaSSObject::m_StepDone, and tohs_Dying.

Referenced by BeginStep(), and Step().

◆ ON_RemoveYoung()

void Hare_Female::ON_RemoveYoung ( THare a_young)

A leveret has matured.

This functions simply sorts through the m_Young vector and removes the matured young.
This is identical to ON_YoungKilled, but differs in the result of removing the last one.

3590  {
3596  //only one tread can work here
3597  std::lock_guard<std::mutex> guard(m_MyYoungMutex);
3598  m_NoYoung = static_cast<int>(m_MyYoung.size());
3599  auto current = m_MyYoung.begin();
3600  while (current != m_MyYoung.end())
3601  {
3602  if (*current == a_young)
3603  {
3604  m_MyYoung.erase(current);
3605  if (m_MyYoung.size() == 0)
3606  {
3607  // All young grown up do something appropriate
3608  AllYoungMatured();
3609  }
3610  m_NoYoung = static_cast<int>(m_MyYoung.size());
3611  return;
3612  }
3613  ++current;
3614  }
3615  // Should never get here...raise an error and duck out of the program.
3616  //
3617  m_OurLandscape->Warn("Hare_Female::ON_RemoveYoung - unknown young", nullptr);
3618  exit(1);
3619 }

References AllYoungMatured(), m_MyYoung, m_MyYoungMutex, m_NoYoung, TAnimal::m_OurLandscape, and Landscape::Warn().

Referenced by Hare_Young::st_NextStage().

◆ ON_YoungKilled()

void Hare_Female::ON_YoungKilled ( THare a_young)

A leveret has been killed.

This functions sorts through the m_Young vector and removes the dead young

3538  {
3542  //only one tread can work here
3543  std::lock_guard<std::mutex> guard(m_MyYoungMutex);
3544  m_NoYoung = static_cast<int>(m_MyYoung.size());
3545  auto current = m_MyYoung.begin();
3546  while (current != m_MyYoung.end())
3547  {
3548  if (*current == a_young)
3549  {
3550  m_MyYoung.erase(current);
3551  if (m_MyYoung.size() == 0)
3552  {
3553  // All young eaten do something appropriate
3554  AllYoungKilled();
3555  }
3556  return;
3557  }
3558  ++current;
3559  }
3560  // Should never get here...raise an error and duck out of the program.
3561  //
3562  m_OurLandscape->Warn("Hare_Female::ON_YoungKilled - unknown young", nullptr);
3563  exit(1);
3564 }

References AllYoungKilled(), m_MyYoung, m_MyYoungMutex, m_NoYoung, TAnimal::m_OurLandscape, and Landscape::Warn().

Referenced by THare::st_Dying().

◆ PlaceYoung()

APoint Hare_Female::PlaceYoung ( )
protected

Find somewhere nice for the babies to hide.

Find a place to put the young.

3448  {
3449  APoint pt;
3450  int loop = 0;
3451  while (loop++ < 500)
3452  {
3454  if (m_OurLandscape->SupplyVegHeight(pt.m_x, pt.m_y) >= 30) return pt;
3456  if (m_OurLandscape->SupplyVegHeight(pt.m_x, pt.m_y) >= 30) return pt;
3458  if (m_OurLandscape->SupplyVegHeight(pt.m_x, pt.m_y) >= 30) return pt;
3460  if (m_OurLandscape->SupplyVegHeight(pt.m_x, pt.m_y) >= 30) return pt;
3462  if (m_OurLandscape->SupplyVegHeight(pt.m_x, pt.m_y) >= 30) return pt;
3464  if (m_OurLandscape->SupplyVegHeight(pt.m_x, pt.m_y) >= 30) return pt;
3466  if (m_OurLandscape->SupplyVegHeight(pt.m_x, pt.m_y) >= 30) return pt;
3468  if (m_OurLandscape->SupplyVegHeight(pt.m_x, pt.m_y) >= 30) return pt;
3469  }
3470  pt.m_x = m_Location_x;
3471  pt.m_y = m_Location_y;
3472  return pt;
3473 }

References Landscape::CorrectCoordsPt(), TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, APoint::m_x, APoint::m_y, and Landscape::SupplyVegHeight().

Referenced by GiveBirth().

◆ ReInit()

void Hare_Female::ReInit ( struct_Hare  a_data)

Female object reinitiation.

2834  {
2835  m_Location_x = a_data.x;
2836  m_Location_y = a_data.y;
2837  m_OurLandscape = a_data.L;
2838  m_CurrentStateNo = 0;
2839  THareInit(a_data.x, a_data.y, a_data.HM);
2840  Init(a_data.weight, a_data.age, a_data.RefNum);
2841 }

References struct_Hare::age, struct_Hare::HM, Init(), struct_Hare::L, TALMaSSObject::m_CurrentStateNo, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, struct_Hare::RefNum, THare::THareInit(), struct_Hare::weight, struct_Hare::x, and struct_Hare::y.

◆ SanityCheckYoungList()

bool Hare_Female::SanityCheckYoungList ( )

Debug function.

Debug code for checking young lists.

3678  {
3679  m_NoYoung = static_cast<int>(m_MyYoung.size());
3680  unsigned int current = 0;
3681  while (current < m_MyYoung.size())
3682  {
3683  if (m_MyYoung[current]->GetMum() != this) { return false; }
3684  current++;
3685  }
3686  return true;
3687 }

References THare::GetMum(), m_MyYoung, and m_NoYoung.

◆ SetSterile()

void Hare_Female::SetSterile ( )
inline

Female is sterile.

1100 { m_sterile = true; }

References m_sterile.

Referenced by THare_Population_Manager::DoFirst().

◆ st_Developing()

TTypeOfHareState Hare_Female::st_Developing ( )
overrideprotectedvirtual

Female Developing.

Reimplemented from Hare_Juvenile.

3002  {
3003  //Assumes that the fatReserve has been added to by st_Foraging from yesterday
3004  //
3005  // This is the last behaviour state called each day, so we can use this to sort out
3006  // the energetics
3007  //Assumes that the fatReserve has been added to by st_Foraging from yesterday
3008  //
3009 
3010  EnergyBalance(activity_Resting, 1440); // calculates the energy use by BMR
3011  if (m_TodaysEnergy < 0)
3012  {
3013  m_fatReserve += m_TodaysEnergy * (1.0 / 42.7);
3014  m_TodaysEnergy = 0;
3015  }
3016  // Grow
3017  // Solid food absorption is already taken into account by this time
3018  if (m_Age < 365)
3019  {
3021  if (m_TodaysEnergy < Target) Target = m_TodaysEnergy;
3022  double addedtoday = Target * m_OurPopulationManager->GetGrowthEfficiencyP(m_Age);
3023  m_weight += addedtoday;
3024  m_TodaysEnergy -= Target;
3026  if (m_TodaysEnergy < Target) Target = m_TodaysEnergy;
3027  addedtoday = Target * m_OurPopulationManager->GetGrowthEfficiencyF(m_Age);
3028  m_weight += addedtoday;
3029  m_TodaysEnergy -= Target;
3030  }
3031  else
3032  {
3034  if (m_TodaysEnergy < Target) Target = m_TodaysEnergy;
3036  double addedtoday = Target * gf;
3037  m_weight += addedtoday;
3038  m_TodaysEnergy -= Target;
3039  }
3040  if (m_TodaysEnergy > 0)
3041  {
3042  // Put what remains back into fat reserve
3044  // 366 is the adult fat conversion efficiency
3045  m_TodaysEnergy = 0;
3046  // Cap the fat reserve and store surplus energy for today
3048  m_StarvationDays = 0; // Not starving
3049  return tohs_Foraging;
3050  }
3052  // 366 is the adult fat conversion efficiency
3053  if (m_fatReserve < 0)
3054  {
3056  m_fatReserve = 0.0;
3057  }
3058  else m_TodaysEnergy = 0;
3059  // What should the criteria for a starvation day be?
3060  //double rmr=m_OurPopulationManager->GetRMR(m_Age, GetTotalWeight());
3061  //if (m_TodaysEnergy<(0.0-(rmr*0.25)))
3062  if (m_TodaysEnergy < 0.0)
3063  {
3064  // Oh oh, we are starving need to lose body weight and maybe we will die?
3065 #ifdef __ADULT_WT_STARVE_CHANCE
3066  int testval = 0;
3068  {
3069  // Somewhere between juvenile and adult so use in between values
3070  int diff = cfg_adult_starve.value() - cfg_juv_starve.value();
3071  testval = cfg_adult_starve.value() - static_cast<int>((1.0 - static_cast<double>(m_Age) /
3072  cfg_fixadult_starve.value()) * diff);
3073  }
3074  else testval = cfg_adult_starve.value();
3076  {
3077  if (g_random_fnc(10000) > testval) { return tohs_Dying; }
3078  }
3079 #ifdef __NOKNOCKONENERGYEFFECT
3080  else m_TodaysEnergy=0.0;
3081 #endif
3082 #else
3084  return tohs_Dying;
3085  }
3086 #endif
3087  }
3088  else
3089  {
3090  m_StarvationDays--; // Not starving
3091  if (m_StarvationDays < 0) m_StarvationDays = 0;
3092  m_TodaysEnergy = 0;
3093  }
3094  // If we have kids then we expect this for a while, so only dispere if fat reserves are less than 0
3096  {
3097  if (g_random_fnc(3) == 0) return tohs_Dispersal; // We are hungry, we need to disperse
3098  }
3099  // end if energy<0
3100  return tohs_Foraging;
3101 }

References activity_lactation, activity_Resting, cfg_adult_starvation_threshold, cfg_adult_starve, cfg_AdultMaxFat, cfg_fixadult_starve, cfg_juv_starve, THare::EnergyBalance(), g_random_fnc(), THare_Population_Manager::GetGrowthEfficiencyF(), THare_Population_Manager::GetGrowthEfficiencyP(), THare_Population_Manager::GetMaxDailyGrowthEnergyF(), THare_Population_Manager::GetMaxDailyGrowthEnergyP(), THare::m_Age, THare::m_fatReserve, THare::m_OurPopulationManager, m_reproActivity, THare::m_StarvationDays, THare::m_TodaysEnergy, THare::m_weight, tohs_Dispersal, tohs_Dying, tohs_Foraging, CfgInt::value(), and CfgFloat::value().

Referenced by Step().

◆ st_Dispersal()

TTypeOfHareState Hare_Female::st_Dispersal ( void  )
overrideprotectedvirtual

Female Dispersal.

Uses the base class st_dispersal but then adds some special female functionality.

Reimplemented from Hare_Juvenile.

3187  {
3189  if (tohs == tohs_Dying) return tohs_Dying;
3190  // If dispersal is called, then she must be deserting any young she has
3191  // The easiest way to do this is to lie, and tell them she is dead
3192  auto current = m_MyYoung.begin();
3193  while (current != m_MyYoung.end())
3194  {
3195  (*current)->ON_MumDead(this);
3196  ++current;
3197  }
3198  // Now must clear the list.
3199  if (m_MyYoung.size() >= 1)
3200  {
3201  m_MyYoung.erase(m_MyYoung.begin(), m_MyYoung.end()); // Remove all elements
3203  }
3206  return tohs_Foraging;
3207 }

References activity_oestrouscycle, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MyYoung, THare::m_peg_x, THare::m_peg_y, m_reproActivity, Hare_Juvenile::st_Dispersal(), tohs_Dying, and tohs_Foraging.

Referenced by Step().

◆ st_Foraging()

TTypeOfHareState Hare_Female::st_Foraging ( )
protected

Female Foraging.

Effectively the day is started here, unless we have been dispersing.
At this point we have a whole day to use and need to figure out how to use it.
There are some constraints on the time we can use for foraging such that we need a certain amount of time for resting e.g. coprophagy. For now I am going to assume that the resting time required is proportional to forage time used and the ratio of the two is in cfg_ForageRestingRatio

Four different ways of implementing density dependence are selectable here.

3104  {
3117  double time = static_cast<double>(m_ActivityTime) * cfg_ForageRestingRatio.value();
3118  // We need to rest if there is no more time
3119  if (time < 30) return tohs_Resting;
3120  // If there are more hares here then interference reduces the activity time
3121 #ifdef __DELAYEDDD
3123 #else
3125 #endif
3126 #ifdef __THRESHOLD_AD_DD
3127  if (hares<m_OurPopulationManager->m_HareThresholdDD) hares=0;
3129 #endif
3130 #ifdef __DISEASEDDM2
3132 #else
3133 #ifdef __DISEASEDDM3
3135 #else
3136 #ifndef __DDEPMORT
3137  double inter = m_OurPopulationManager->GetInterference(hares);
3138 #else
3139 #ifndef __DISEASEDDM
3140  double inter=m_OurPopulationManager->GetInterference(hares);
3141 #else
3142  double inter=1.0;
3143 #endif
3144 #endif
3145 #endif
3146 #endif
3147  if (inter < 0.5 && time > 300)
3148  {
3150  {
3151  // Don't abandon kids just because others want to be here too
3152  if (g_rand_uni_fnc() > inter) // added to reduce rate of dispersal
3153  {
3154  //m_ActivityTime = (int)(time / cfg_ForageRestingRatio.value());
3155  return tohs_Dispersal; // Added Sat 15th Dec 2007
3156  }
3157  }
3158  }
3159  time *= inter;
3160  // Given the time we have then we need to feed, which will return an energy value obtained.
3161  int a_time = static_cast<int>(time);
3163  else { m_TodaysEnergy = Forage(a_time); }
3164  // We need to spend energy on foraging and associated movement - done in ForageSquare()
3165  //
3166  TimeBudget(activity_Foraging, static_cast<int>(time) - a_time);
3167  // Print the energy checking output
3168 #ifdef __saveEnergyInfo
3169  dumpEnergy();
3170 #endif
3171  return tohs_ReproBehaviour;
3172 }

References activity_Foraging, activity_lactation, cfg_ForageRestingRatio, cfg_hare_pesticideresponse_on, dumpEnergy(), THare::Forage(), THare::ForageP(), g_rand_uni_fnc(), THare_Population_Manager::GetAdultDensity(), THare_Population_Manager::GetDelayedAdultDensity(), THare_Population_Manager::GetInterference(), THare::m_ActivityTime, THare_Population_Manager::m_HareThresholdDD, THare::m_lastYearsDensity, TAnimal::m_Location_x, TAnimal::m_Location_y, THare::m_OurPopulationManager, m_reproActivity, THare::m_TodaysEnergy, THare::TimeBudget(), tohs_Dispersal, tohs_ReproBehaviour, tohs_Resting, CfgFloat::value(), and CfgBool::value().

Referenced by Step().

◆ st_ReproBehaviour()

TTypeOfHareState Hare_Female::st_ReproBehaviour ( )
protected

Reproductive behaviour control.

A switch determining what repro behaviour to carry out.

Repro behaviour to consider:
1) Mating - either a function of her or the male - but lets keep it here so the male is a simple as possible.
2) Update Gestation.
3) Give Birth.
4) Lactation.
5) Getting resources for leveret production.
6) Determining leveret size and litter size?

Also optional mortality based upon reproductive mortality

3222  {
3236  // First find out what kind of behaviour we are in:
3237 #ifdef __REPROMORTCHANCE
3238  // Repromortchance is a function of size, the bigger you are the less chance of mortality
3239  int mc=0;
3240 #endif
3241  switch (m_reproActivity)
3242  {
3244  UpdateOestrous();
3245  break;
3246  case activity_inoestrous:
3247  Mating();
3248  break;
3249  case activity_gestation:
3250  UpdateGestation();
3251  break;
3252  case activity_givebirth:
3253 #ifdef __REPROMORTCHANCE
3254  // Repromortchance is a function of size, the bigger you are the less chance of mortality
3255  mc=random(100+(int)m_weight-cfg_hare_minimum_breeding_weight.value());
3257  return tohs_Dying;
3258  }
3259 #endif
3260  GiveBirth();
3261  break;
3262  case activity_lactation:
3263  DoLactation();
3264  break;
3265  default:
3266  m_OurLandscape->Warn("Hare_Female::st_ReproBehaviour unknown activity", nullptr);
3267  exit(1);
3268  }
3269  return tohs_Resting;
3270 }

References activity_gestation, activity_givebirth, activity_inoestrous, activity_lactation, activity_oestrouscycle, cfg_hare_minimum_breeding_weight, cfg_HareFemaleReproMortValue, DoLactation(), GiveBirth(), TAnimal::m_OurLandscape, m_reproActivity, THare::m_weight, Mating(), tohs_Dying, tohs_Resting, UpdateGestation(), UpdateOestrous(), CfgInt::value(), and Landscape::Warn().

Referenced by Step().

◆ st_Resting()

TTypeOfHareState Hare_Female::st_Resting ( )
staticprotected

Resting.

This method uses up the rest of the day in resting

3210  {
3214  return tohs_Developing;
3215 }

References tohs_Developing.

Referenced by Step().

◆ Step()

void Hare_Female::Step ( void  )
overridevirtual

Female Step.

Reimplemented from Hare_Juvenile.

2942  {
2943  if (m_StepDone || m_CurrentStateNo == -1) return;
2944  switch (m_CurrentHState)
2945  {
2946  case tohs_InitialState: // Initial state
2948  break;
2949  case tohs_Dispersal:
2950  // Legal returns are:
2951  // tohs_Foraging
2952  // Dispersal is risky therefore take a test again
2953 #ifdef __DISPERSALDDM
2954  if (g_rand_uni()<(cfg_hare_adult_predation.value())) {
2955  ON_Dead();
2956  m_StepDone=true; // We need to skip the step code, we are dead
2957  return;
2958  }
2959 #endif
2961  break;
2962  case tohs_Foraging:
2963  // Legal returns are:
2964  // tohs_ReproBehaviour
2966  break;
2967  case tohs_Resting:
2968  // Legal returns are:
2969  // tohs_Developing
2971  break;
2972  case tohs_ReproBehaviour:
2973  // Legal returns are:
2974  // tohs_Resting (& possibly dying)
2976  break;
2977  case tohs_Developing:
2978  // Legal returns are:
2979  // tohs_Dying
2980  // tohs_Foraging
2981  // tohs_Dispersal
2983  m_StepDone = true;
2984  break;
2985  case tohs_Dying:
2986  ON_Dead();
2987  m_StepDone = true;
2988  break;
2989  default:
2990  m_OurLandscape->Warn("Hare_Female::Step - unknown state", nullptr);
2991  exit(1);
2992  }
2993 }

References cfg_hare_adult_predation, THare::m_CurrentHState, TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, TALMaSSObject::m_StepDone, ON_Dead(), st_Developing(), st_Dispersal(), st_Foraging(), st_ReproBehaviour(), st_Resting(), tohs_Developing, tohs_Dispersal, tohs_Dying, tohs_Foraging, tohs_InitialState, tohs_ReproBehaviour, tohs_Resting, CfgFloat::value(), and Landscape::Warn().

◆ UpdateGestation()

void Hare_Female::UpdateGestation ( )
protected

Update gestation counter.

Counts down gestation and grows foetal mass.

Figures out how much energy to use on growing the kids and add this to the m_LeveretMaterial
Some assumptions:
1) Foetal growth is linear, with a max per day
2) If the female's fat reserves fall below the hunger threshold value
she does not use energy on the foetus
3) maximum X% of the free energy is used on foetus production - this is an input variable.

3326  {
3327  // Now are they ready to be born?
3338  // ALL the calcuations below are in g fat, this is just to save on unnecessary conversions
3339  // and divides later
3341  {
3343  value();
3344  double fe = 4 * g_hare_maxFoetalKJ[m_GestationCounter];
3345  if (en > fe) en = fe;
3346  m_fatReserve -= en;
3347  m_LeveretMaterial += en;
3348  }
3349 }

References activity_givebirth, cfg_hare_adult_dispersal_threshold, cfg_hare_foetusenergyproportion, g_hare_maxFoetalKJ, THare::m_fatReserve, m_GestationCounter, m_LeveretMaterial, m_reproActivity, and CfgFloat::value().

Referenced by st_ReproBehaviour().

◆ UpdateOestrous()

void Hare_Female::UpdateOestrous ( )
protected

Update oestrous counter.

Updates Oestrous if it is the breeding season.

Optional disease and minimum reproductive weight code for POM.

3280  {
3281 #ifdef __DISEASEDDM
3282  if (m_IamSick) {
3283  return; // will loop each day until not sick
3284  }
3285 #endif
3286 #ifdef __MINREPWEIGHT
3287  if (m_weight < cfg_hare_minimum_breeding_weight.value()) return; // No breeding below this weight
3288 #endif
3289 
3290  // No breeding outside the breeding season
3291  int today = m_OurLandscape->SupplyDayInYear();
3292  if (today < cfg_ReproStartDay.value() || today > cfg_ReproEndDay.value())
3293  {
3294  m_OestrousCounter = 0;
3295  m_litter_no = 0;
3296  return;
3297  }
3299  {
3300  // No breeding if in -ve energy balance
3302  {
3304  m_OestrousCounter = 0;
3305  }
3306  }
3307 }

References activity_inoestrous, cfg_DaysToOestrous, cfg_hare_adult_breed_threshold, cfg_hare_minimum_breeding_weight, cfg_ReproEndDay, cfg_ReproStartDay, THare::m_fatReserve, THare::m_IamSick, m_litter_no, m_OestrousCounter, TAnimal::m_OurLandscape, m_reproActivity, THare::m_weight, Landscape::SupplyDayInYear(), CfgInt::value(), and CfgFloat::value().

Referenced by st_ReproBehaviour().

◆ UpdateYoung()

bool Hare_Female::UpdateYoung ( THare a_old,
THare a_new 
)

Swap a young list pointer.

This functions simply sorts through the m_Young vector and replaces the occurence of a_old with a_new. It is used to replace Hare_Infant pointers with Hare_Young pointers

3515  {
3519  auto current = m_MyYoung.begin();
3520  while (current != m_MyYoung.end())
3521  {
3522  if (*current == a_old)
3523  {
3524  *current = a_new;
3525  return true;
3526  }
3527  ++current;
3528  }
3529  return false;
3530 }

References m_MyYoung.

Referenced by THare_Population_Manager::CreateObjects().

Member Data Documentation

◆ m_GestationCounter

int Hare_Female::m_GestationCounter
protected

State variable - Days in gestation.

Referenced by GeneralEndocrineDisruptor(), Init(), Mating(), and UpdateGestation().

◆ m_LeveretMaterial

double Hare_Female::m_LeveretMaterial
protected

State variable - Mass of foetal material.

Referenced by GiveBirth(), Init(), Mating(), and UpdateGestation().

◆ m_litter_no

int Hare_Female::m_litter_no
protected

State variable - current litter number.

Referenced by GiveBirth(), Init(), and UpdateOestrous().

◆ m_MyYoung

◆ m_MyYoungMutex

std::mutex Hare_Female::m_MyYoungMutex
protected

mutex for the young list.

Referenced by ON_RemoveYoung(), and ON_YoungKilled().

◆ m_NoYoung

int Hare_Female::m_NoYoung
protected

State variable - current litter size.

Referenced by AllYoungMatured(), ON_AreYouMyMum(), ON_RemoveYoung(), ON_YoungKilled(), and SanityCheckYoungList().

◆ m_OestrousCounter

int Hare_Female::m_OestrousCounter
protected

State variable - Days in oestrous.

Referenced by AllYoungKilled(), AllYoungMatured(), GiveBirth(), Init(), and UpdateOestrous().

◆ m_reproActivity

TTypeOfActivity Hare_Female::m_reproActivity
protected

◆ m_sterile

bool Hare_Female::m_sterile
protected

State variable - is/not sterile.

Referenced by Init(), and SetSterile().


The documentation for this class was generated from the following files:
tohs_Dying
Definition: Hare_All.h:80
Hare_Female::InternalPesticideHandlingAndResponse
void InternalPesticideHandlingAndResponse() override
Handles internal effects of pesticide exposure. If any effects are needed this method must be re-impl...
Definition: Hare_All.cpp:3690
struct_Hare::x
int x
Definition: Hare_All.h:138
THare_Population_Manager::CreateObjects
void CreateObjects(int ob_type, TAnimal *pvo, void *null, struct_Hare *data, int number)
Method used to create new hares.
Definition: Hare_All.cpp:873
Hare_Female::st_Foraging
TTypeOfHareState st_Foraging()
Female Foraging.
Definition: Hare_All.cpp:3104
Hare_Female::GiveBirth
void GiveBirth()
Produce a litter.
Definition: Hare_All.cpp:3355
g_rand_uni_fnc
double g_rand_uni_fnc()
Definition: ALMaSS_Random.cpp:56
Hare_Female::ON_Dead
void ON_Dead() override
The female is dead.
Definition: Hare_All.cpp:3647
cfg_juv_starve
CfgInt cfg_juv_starve("HARE_JUV_STARVE", CFG_CUSTOM, 2500)
Hare_Female::Mating
void Mating()
Mate.
Definition: Hare_All.cpp:3311
struct_Hare::y
int y
Definition: Hare_All.h:139
cfg_HareFemaleSicknessDensityDepValue
CfgInt cfg_HareFemaleSicknessDensityDepValue("HARE_FEMALESICKNESSDENDEPVALUE", CFG_CUSTOM, 40)
cfg_hare_pesticideresponse_on
CfgBool cfg_hare_pesticideresponse_on("HARE_PESTICIDERESPONSE_ON", CFG_CUSTOM, false)
If set to true then hares will collect and respond to pesticide information. This will slow the simul...
cfg_ReproStartDay
static CfgInt cfg_ReproStartDay("HARE_REPROSTARTDAY", CFG_CUSTOM, 18)
THare::m_pesticidedegradationrate
double m_pesticidedegradationrate
State variable used to hold the daily degredation rate of the pesticide in the body.
Definition: Hare_All.h:306
THare_Population_Manager::GetKJperM
double GetKJperM(int a_size)
Get the cost of moving 1m in KJ dependent upon mass (.
Definition: Hare_All.h:628
THare::m_EnergyMax
double m_EnergyMax
State variable - the amount of energy it is possible to eat as a multiplyer or RMR.
Definition: Hare_All.h:223
struct_Hare::age
int age
Definition: Hare_All.h:140
Hare_Juvenile::WasPredated
bool WasPredated() override
Test for mortality.
Definition: Hare_All.cpp:2380
activity_lactation
Definition: Hare_All.h:100
THare::m_Lifespan
int m_Lifespan
Physiolocal lifespan, assuming nothing else kills the hare (unlikely to reach this age)
Definition: Hare_All.h:198
cfg_MaxEnergyIntakeScaler
static CfgFloat cfg_MaxEnergyIntakeScaler("HARE_MAXENERGYINTAKESCALER", CFG_CUSTOM, 1.825)
Hare_Female::st_Developing
TTypeOfHareState st_Developing() override
Female Developing.
Definition: Hare_All.cpp:3002
cfg_DaysToOestrous
static CfgInt cfg_DaysToOestrous("HARE_DAYSTOOESTROUS", CFG_CUSTOM, 20)
CfgFloat::value
double value() const
Definition: Configurator.h:142
cfg_HarePesticideAccumulationThreshold
CfgFloat cfg_HarePesticideAccumulationThreshold("HARE_PESTICIDEACCUMULATIONTHRESHOLD", CFG_CUSTOM, 0.0)
This is the value that triggers pesticide response, which may be a threshold, or if simply set to 0....
tohs_InitialState
Definition: Hare_All.h:72
THare::m_ActivityTime
int m_ActivityTime
Minutes of potential activity time per day.
Definition: Hare_All.h:203
Landscape::SupplyMonth
int SupplyMonth(void)
Passes a request on to the associated Calendar class function, returns m_month + 1 (the calendar mont...
Definition: Landscape.h:2272
cfg_minLeveretBirthWeight
static CfgFloat cfg_minLeveretBirthWeight("HARE_MINLEVERETBIRTHWEIGHT", CFG_CUSTOM, 95 *0.88 *0.33)
cfg_adult_starvation_threshold
static CfgInt cfg_adult_starvation_threshold("HARE_ADULT_STARVE_THRESHOLD", CFG_CUSTOM, 16)
THare::m_OurPopulationManager
THare_Population_Manager * m_OurPopulationManager
Pointer to the hare population manager.
Definition: Hare_All.h:194
struct_Hare::HM
THare_Population_Manager * HM
Definition: Hare_All.h:142
cfg_maxLeveretBirthWeight
static CfgFloat cfg_maxLeveretBirthWeight("HARE_MAXLEVERETBIRTHWEIGHT", CFG_CUSTOM, 125 *0.88 *0.33)
THare::GetMum
Hare_Female * GetMum()
Get the mother pointer.
Definition: Hare_All.h:402
THare_Population_Manager::GetMaxDailyGrowthEnergyF
double GetMaxDailyGrowthEnergyF(int a_age)
Get the maximum daily energy needed for growth for this a_age for use in fat construction.
Definition: Hare_All.h:576
cfg_ForageRestingRatio
CfgFloat cfg_ForageRestingRatio("HARE_FORAGERESTRATIO", CFG_CUSTOM, 0.67)
THare::m_KJForaging
double m_KJForaging
KJ/m cost of foraging per kg hare.
Definition: Hare_All.h:238
g_PropSolidFood
const double g_PropSolidFood[36]
Definition: Hare_All.cpp:306
THare_Population_Manager::m_HareThresholdDD
int m_HareThresholdDD
Input variable - Threshold density dependence level.
Definition: Hare_All.h:757
THare::GetRMR
double GetRMR()
Get todays RMR.
Definition: Hare_THare.cpp:333
THare::Forage
double Forage(int &time)
Foraging.
Definition: HareForagenPeg.cpp:52
THare::THareInit
void THareInit(int p_x, int p_y, THare_Population_Manager *p_PPM)
Object Initiation.
Definition: Hare_THare.cpp:70
struct_Hare::RefNum
int RefNum
Definition: Hare_All.h:144
CfgBool::value
bool value() const
Definition: Configurator.h:164
Hare_Female::m_OestrousCounter
int m_OestrousCounter
State variable - Days in oestrous.
Definition: Hare_All.h:1055
ttop_AcuteEffects
Definition: LandscapeFarmingEnums.h:1060
Hare_Female::m_MyYoungMutex
std::mutex m_MyYoungMutex
mutex for the young list.
Definition: Hare_All.h:1065
THare::m_KJWalking
double m_KJWalking
KJ/m cost of walking per kg hare.
Definition: Hare_All.h:233
THare::m_fatReserve
double m_fatReserve
State variable - the energy reserve of the hare.
Definition: Hare_All.h:213
THare::m_lastYearsDensity
int m_lastYearsDensity
State variable used in alternative density-dependent configurations.
Definition: Hare_All.h:276
tohs_Dispersal
Definition: Hare_All.h:75
THare_Population_Manager::GetMaxDailyGrowthEnergy
double GetMaxDailyGrowthEnergy(int a_age)
Definition: Hare_All.h:550
THare::m_experiencedDensity
int m_experiencedDensity
State variable used in alternative density-dependent configurations.
Definition: Hare_All.h:271
THare::m_KJRunning
double m_KJRunning
KJ/m cost of running per kg hare.
Definition: Hare_All.h:228
TAnimal::m_Location_y
int m_Location_y
The objects ALMaSS y coordinate.
Definition: PopulationManager.h:366
APoint
A simple class defining an x,y coordinate set.
Definition: ALMaSS_Setup.h:52
THare::m_RefNum
int m_RefNum
Unique hare reference number, also functions as sex flag.
Definition: Hare_All.h:265
Landscape::CorrectCoordsPt
APoint CorrectCoordsPt(int x, int y)
Function to prevent wrap around errors with co-ordinates using x/y pair.
Definition: Landscape.h:2215
THare::m_pesticideInfluenced1
bool m_pesticideInfluenced1
Flag to indicate pesticide effects (e.g. can be used for endocrine distruptors with delayed effects u...
Definition: Hare_All.h:311
cfg_hare_minimum_breeding_weight
CfgInt cfg_hare_minimum_breeding_weight("HARE_MIN_BREEDING_WT", CFG_CUSTOM, 780)
Hare_Female::PlaceYoung
APoint PlaceYoung()
Find somewhere nice for the babies to hide.
Definition: Hare_All.cpp:3448
TAnimal::m_OurLandscape
static Landscape * m_OurLandscape
A pointer to the landscape object shared with all TAnimal objects.
Definition: PopulationManager.h:342
TAnimal::CheckManagement
void CheckManagement()
Used to start a check for any management related effects at the objects current location.
Definition: PopulationManager.cpp:1591
struct_Hare::L
Landscape * L
Definition: Hare_All.h:141
Hare_Female::m_NoYoung
int m_NoYoung
State variable - current litter size.
Definition: Hare_All.h:1048
Hare_Female::st_ReproBehaviour
TTypeOfHareState st_ReproBehaviour()
Reproductive behaviour control.
Definition: Hare_All.cpp:3222
cfg_hare_adult_predation
CfgFloat cfg_hare_adult_predation("HARE_ADULT_PREDATION", CFG_CUSTOM, 0.0015)
activity_Foraging
Definition: Hare_All.h:92
Hare_Female::AllYoungMatured
void AllYoungMatured()
No more young to look after.
Definition: Hare_All.cpp:3622
THare_Population_Manager::GetMaxDailyGrowthEnergyP
double GetMaxDailyGrowthEnergyP(int a_age)
Get the maximum daily energy needed for growth for this a_age for use in protein construction.
Definition: Hare_All.h:563
THare::MovePeg
void MovePeg()
Move the peg according to attraction forces.
Definition: HareForagenPeg.cpp:535
Hare_Female::m_sterile
bool m_sterile
State variable - is/not sterile.
Definition: Hare_All.h:1052
THare_Population_Manager::GetGrowthEfficiencyF
double GetGrowthEfficiencyF(int a_age)
Get the growth efficiency for this a_age for creating fat.
Definition: Hare_All.h:615
cfg_hare_escape_dist
CfgInt cfg_hare_escape_dist("HARE_ESCAPE_DIST", CFG_CUSTOM, 100)
THare::m_old_weight
double m_old_weight
State variale - last hare weight.
Definition: Hare_All.h:185
THare::GetAge
int GetAge()
Provide the age of the hare.
Definition: Hare_All.h:375
THare::m_ddindex
int m_ddindex
State variable used in alternative density-dependent configurations.
Definition: Hare_All.h:281
THare::m_TodaysEnergy
double m_TodaysEnergy
State variable - the amount of energy available today, can be in deficit.
Definition: Hare_All.h:218
Landscape::SupplyDayInYear
int SupplyDayInYear(void)
Passes a request on to the associated Calendar class function, the day in the year.
Definition: Landscape.h:2267
cfg_ReproEndDay
static CfgInt cfg_ReproEndDay("HARE_REPROENDDAY", CFG_CUSTOM, 240)
TALMaSSObject::m_StepDone
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:133
Landscape::SupplyPesticideType
TTypesOfPesticide SupplyPesticideType(void)
Gets type of pesticide effect from a reference.
Definition: Landscape.h:788
Hare_Juvenile::st_Dispersal
TTypeOfHareState st_Dispersal() override
Juvenile Dispersal.
Definition: Hare_All.cpp:2185
APoint::m_x
int m_x
Definition: ALMaSS_Setup.h:55
Hare_Female::m_MyYoung
TListOfHares m_MyYoung
Pointer to litter.
Definition: Hare_All.h:1063
THare::EnergyBalance
void EnergyBalance(TTypeOfActivity a_activity, int dist)
Adjust energy balance for an activity.
Definition: Hare_THare.cpp:261
activity_inoestrous
Definition: Hare_All.h:97
Landscape::SupplyYearNumber
int SupplyYearNumber(void)
Passes a request on to the associated Calendar class function, returns m_simulationyear
Definition: Landscape.h:2287
Hare_Female::m_LeveretMaterial
double m_LeveretMaterial
State variable - Mass of foetal material.
Definition: Hare_All.h:1059
THare::m_foragingenergy
double m_foragingenergy
Energy obtained from foraging/feeding.
Definition: Hare_All.h:252
CfgInt::value
int value() const
Definition: Configurator.h:116
cfg_hare_foetusenergyproportion
CfgFloat cfg_hare_foetusenergyproportion("HARE_FOETUSENERGYPROPORTION", CFG_CUSTOM, 0.024)
cfg_hare_adult_breed_threshold
static CfgFloat cfg_hare_adult_breed_threshold("HARE_ADULT_BREED_THESHOLD", CFG_CUSTOM, 1600 *0.03)
Hare_Female::dumpEnergy
void dumpEnergy()
Used to record energetic status.
Definition: Hare_All.cpp:3174
Hare_Female::AllYoungKilled
void AllYoungKilled()
Last leveret predated.
Definition: Hare_All.cpp:3569
Hare_Female::m_litter_no
int m_litter_no
State variable - current litter number.
Definition: Hare_All.h:1050
THare_Population_Manager::GetAdultDensity
int GetAdultDensity(int x, int y)
Density function - returns the density of adults in the square containing by x,y. Each square is 256x...
Definition: Hare_All.h:688
TTypesOfPesticide
TTypesOfPesticide
Values that represent types of pesticide actions.
Definition: LandscapeFarmingEnums.h:1057
l_pest_daily_mort
CfgFloat l_pest_daily_mort
Daily mortality of pesticide with type 1.
THare::m_expDensity
int m_expDensity[365]
State variable used in alternative density-dependent configurations.
Definition: Hare_All.h:286
THare::m_DensitySum
int m_DensitySum
State variable used in alternative density-dependent configurations.
Definition: Hare_All.h:291
g_hare_maxFoetalKJ
const double g_hare_maxFoetalKJ[41]
Definition: Hare_All.cpp:366
cfg_hare_adult_dispersal_threshold
static CfgFloat cfg_hare_adult_dispersal_threshold("HARE_ADULT_DISP_THESHOLD", CFG_CUSTOM, 1600 *0.02)
THare::m_pesticide_burden
double m_pesticide_burden
State variable used to hold the current body-burden of pesticide.
Definition: Hare_All.h:301
THare::m_Age
int m_Age
State variale - hare age.
Definition: Hare_All.h:170
THare::ForageP
double ForageP(int &time)
Foraging but also incorporating pesticide exposure.
Definition: HareForagenPeg.cpp:179
cfg_hare_DaysToGestation
static CfgInt cfg_hare_DaysToGestation("HARE_GESTATIONDAYS", CFG_CUSTOM, 41)
Landscape::SupplyVegHeight
double SupplyVegHeight(int a_polyref)
Returns the height of the vegetation using the polygon reference number a_polyref or based on the x,...
Definition: Landscape.h:1527
tohs_Developing
Definition: Hare_All.h:74
THare::m_CurrentHState
TTypeOfHareState m_CurrentHState
Defines the current activity.
Definition: Hare_All.h:165
THare::m_IamSick
bool m_IamSick
flag for sickness - used in conjunction with disease configurations
Definition: Hare_All.h:295
cfg_AdultMaxFat
static CfgFloat cfg_AdultMaxFat("HARE_ADULT_MAXFAT", CFG_CUSTOM, 0.04/(0.33 *0.88))
struct_Hare
Class used to pass hare information to CreateObjects.
Definition: Hare_All.h:136
THare_Population_Manager::GetInterference
double GetInterference(int h)
Return the proportion of time used in communicating with con-specifics.
Definition: Hare_All.h:707
ttop_ReproductiveEffects
Definition: LandscapeFarmingEnums.h:1061
Hare_Female::GeneralEndocrineDisruptor
void GeneralEndocrineDisruptor(double a_pesticide_dose) override
Handles internal effects of endocrine distrupter pesticide exposure for female.
Definition: Hare_All.cpp:4101
Hare_Female::GeneralOrganoPhosphate
void GeneralOrganoPhosphate(double a_pesticide_dose) override
Handles internal effects of organophosphate pesticide exposure for female.
Definition: Hare_All.cpp:4110
THare::m_StarvationDays
int m_StarvationDays
State variable - the number of consecutive days in negative energy balance.
Definition: Hare_All.h:208
Hare_Female::DoLactation
void DoLactation()
Lactation.
Definition: Hare_All.cpp:3479
TTypeOfHareState
TTypeOfHareState
Enumerator for hare behavioural states.
Definition: Hare_All.h:71
hob_Female
Definition: Hare_All.h:63
cfg_adult_starve
CfgInt cfg_adult_starve("HARE_ADULT_STARVE", CFG_CUSTOM, 5000)
THare::Running
virtual void Running(int a_max_dist)
Run.
Definition: Hare_THare.cpp:136
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
Hare_Female::UpdateGestation
void UpdateGestation()
Update gestation counter.
Definition: Hare_All.cpp:3326
Hare_Female::m_reproActivity
TTypeOfActivity m_reproActivity
State variable - current reproductive state.
Definition: Hare_All.h:1061
THare::m_peg_y
int m_peg_y
peg y-coordinate
Definition: Hare_All.h:260
THare::m_weight
double m_weight
State variale - hare weight g.
Definition: Hare_All.h:180
THare_Population_Manager::GetGrowthEfficiencyP
double GetGrowthEfficiencyP(int a_age)
Get the growth efficiency for this a_age for creating protein.
Definition: Hare_All.h:602
THare::m_Type
Hare_Object m_Type
State variale - the type of hare.
Definition: Hare_All.h:175
tohs_Resting
Definition: Hare_All.h:77
cfg_fixadult_starve
CfgInt cfg_fixadult_starve("HARE_FIXADULT_STARVE", CFG_CUSTOM, 370)
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:131
Hare_Female::Init
void Init(double p_weight, int a_age, int a_Ref)
Object initiation.
Definition: Hare_All.cpp:2844
struct_Hare::weight
double weight
Definition: Hare_All.h:145
Hare_Juvenile::Hare_Juvenile
Hare_Juvenile(int p_x, int p_y, Landscape *p_L, THare_Population_Manager *p_PPM, double p_weight)
Constructor for the juvenile hare object.
Definition: Hare_All.cpp:1972
tohs_ReproBehaviour
Definition: Hare_All.h:78
activity_oestrouscycle
Definition: Hare_All.h:96
THare::TimeBudget
void TimeBudget(TTypeOfActivity a_activity, int dist)
Adjust time budger for an activity.
Definition: Hare_THare.cpp:298
Landscape::Warn
void Warn(std::string a_msg1, std::string a_msg2)
Wrapper for the g_msg Warn function.
Definition: Landscape.h:2250
THare_Population_Manager::GetTotalDensity
int GetTotalDensity(int x, int y)
Density function - returns the density of all hares in the square containing by x,...
Definition: Hare_All.h:683
Hare_Female::st_Resting
static TTypeOfHareState st_Resting()
Resting.
Definition: Hare_All.cpp:3210
cfg_HareFemaleReproMortValue
CfgInt cfg_HareFemaleReproMortValue("HARE_FEMALEREPROMORT", CFG_CUSTOM, 0)
cfg_hare_proximity_alert
static CfgFloat cfg_hare_proximity_alert("HARE_PROXIMITY_ALERT", CFG_CUSTOM, 0.05)
TAnimal::m_Location_x
int m_Location_x
The objects ALMaSS x coordinate.
Definition: PopulationManager.h:362
activity_gestation
Definition: Hare_All.h:98
THare_Population_Manager::BodyBurdenOut
void BodyBurdenOut(int a_year, int a_day, double a_bb, double a_mgkg)
BodyBurden output.
Definition: Hare_All.h:730
THare_Population_Manager::GetDelayedAdultDensity
int GetDelayedAdultDensity(int x, int y)
Density function - returns the density of adults in the square containing by x,y, but for last year a...
Definition: Hare_All.h:696
THare::m_peg_x
int m_peg_x
peg x-coordinate
Definition: Hare_All.h:256
ttop_NoPesticide
Definition: LandscapeFarmingEnums.h:1059
APoint::m_y
int m_y
Definition: ALMaSS_Setup.h:56
Hare_Female::UpdateOestrous
void UpdateOestrous()
Update oestrous counter.
Definition: Hare_All.cpp:3280
Hare_Female::st_Dispersal
TTypeOfHareState st_Dispersal() override
Female Dispersal.
Definition: Hare_All.cpp:3187
Hare_Female::m_GestationCounter
int m_GestationCounter
State variable - Days in gestation.
Definition: Hare_All.h:1057
activity_Resting
Definition: Hare_All.h:90
tohs_Foraging
Definition: Hare_All.h:76
activity_givebirth
Definition: Hare_All.h:99