ALMaSS Hare ODDox
1.1
The hare model description following ODdox protocol
|
Go to the documentation of this file.
437 bool Run(
int a_dist,
int a_direction);
457 virtual void Running(
int a_max_dist);
462 void Walking(
int a_dist,
int a_direction);
497 double ForageSquareP(
int a_x,
int a_y,
double *a_pestexposure);
543 double GetRMR(
int a_age,
double a_size);
554 if ((a_age<0) || (a_age>5000)) {
567 if ((a_age<0) || (a_age>5000)) {
580 if ((a_age<0) || (a_age>5000)) {
592 if ((a_age<0) || (a_age>5000)) {
604 if ((a_age<0) || (a_age>5000)) {
616 if ((a_age<0) || (a_age>5000)) {
628 if ((a_size<0) || (a_size>7000)) {
690 return m_DensityMap[6][x>>__DENSITYSHIFT][y>>__DENSITYSHIFT];
702 if ((h<0) || (h>2499)) {
724 fprintf(
BodyBurdenPrb,
"%d\t%d\t%g\t%g\n", a_year, a_day, a_bb, a_mgkg);
821 virtual void Step (
void);
876 virtual void Step (
void);
883 void Init(
double p_weight);
928 virtual void Step (
void);
931 p_PPM,
double p_weight);
935 void Init(
double p_weight);
980 virtual void Step (
void);
987 double p_weight,
int a_age,
int a_Ref);
991 void Init(
double p_weight,
int a_age,
int a_Ref);
1078 virtual void Step(
void);
1086 void Init(
double p_weight,
int a_age,
int a_Ref);
TTypeOfHareState st_Developing()
Female Developing.
virtual void GeneralOrganoPhosphate(double)
Handles internal effects of organophosphate pesticide exposure. If any effects are needed this method...
void ReInit(struct_Hare a_data)
Male object reinitiation.
void SetPolyFood(int a_poly, double a_value)
Set polygon food quality.
void CreateObjects(int ob_type, TAnimal *pvo, void *null, struct_Hare *data, int number)
Method used to create new hares.
TTypeOfHareState st_Foraging()
Female Foraging.
bool OnFarmEvent(FarmToDo event)
Response to farm actions.
int GetInfantDensity(int x, int y)
Density function - returns the density of infants in the square containing by x,y....
static double * m_vegPalatability
Will hold and array of palatability for hare for each tov type. Most are 1, but unpalatable vegetatio...
int GetFemaleDensity(int x, int y)
Density function - returns the density of females in the square containing by x,y....
double m_MaxDailyGrowthEnergyF[5001]
Precalculated max growth energy requirement with size for fat
bool UpdateYoung(THare *a_old, THare *a_new)
Swap a young list pointer.
The class that handles all the population lists for hares.
void GiveBirth()
Produce a litter.
virtual ~Hare_Juvenile()
Destructor for the juvenile hare object.
virtual void Catastrophe()
Annual global change in population numbers.
int m_DensityMap[8][200][200]
Array storing densities measured in different ways
double * m_PolyFood
Temporary storage
TTypeOfHareState st_Dispersal()
Not used.
int GetLitterSize(int noLitters)
Returns the litter size.
TTypeOfHareState st_Foraging()
Young foraging.
virtual void ON_Dead()
The female is dead.
int GetPegDirection()
Get direction of peg.
THare_Population_Manager(Landscape *L)
This is the constructor for the hare population manager.
double m_DMWeight[5001]
Array for storing minimum acceptable size with age.
double m_pesticidedegradationrate
State variable used to hold the daily degredation rate of the pesticide in the body.
double m_SpeedWalking
m/min speed of walking per kg hare
virtual void BeginStep(void)
Female BeginStep.
bool SanityCheckYoungList()
Debug function.
void st_NextStage()
'mature' to become a young
int GetRefNum()
Get the refnum for this hare.
double GetKJperM(int a_size)
Get the cost of moving 1m in KJ dependent upon mass (.
double m_EnergyMax
State variable - the amount of energy it is possible to eat as a multiplyer or RMR.
double m_GrowthEfficiencyF[5001]
Precalculated growth efficiency for fat with size
double m_MaxDailyGrowthEnergyP[5001]
Precalculated max growth energy requirement with size for protein
int m_Lifespan
Physiolocal lifespan, assuming nothing else kills the hare (unlikely to reach this age)
virtual bool WasPredated()
Test for mortality.
void Init(double p_weight)
Object initiation.
double m_AdultMortRate
Input variable - Adult mortality rate.
TTypeOfHareState st_Dispersal()
Female Dispersal.
virtual bool WasPredated()
Test for predation.
Landscape * m_OurLandscape
void ReInit(struct_Hare a_data)
Young object reinitiation.
virtual ~THare_Population_Manager(void)
THare_Population_Manager destructor.
int m_variableDD
Used to vary the density dependence each year
TTypeOfHareState st_Developing()
Male Development.
int GetHareRefNum()
Get the next ID number available.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure. If any effects are needed this method must be re-impl...
int m_ActivityTime
Minutes of potential activity time per day.
virtual ~Hare_Male()
Destructor.
int m_LitterSize[12][7]
Storage for litter size distributions (not used in default config)
void AddHareDensity(int x, int y, Hare_Object a_type)
Density function - adds one to the density in the square containing by x,y. Each square is 256x256m i...
void ON_YoungKilled(THare *a_young)
A leveret has been killed.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure. If any effects are needed this method must be re-impl...
virtual ~THare()
Destructor.
double ForageSquare(int a_x, int a_y)
Forage from an area.
THare_Population_Manager * m_OurPopulationManager
Pointer to the hare population manager.
THare_Population_Manager * HM
virtual void Step(void)
Base implementation only - reimplemented.
virtual void BeginStep(void)
Base implementation only - reimplemented.
void Init()
Object initiation.
virtual void Step(void)
Step for Hare_Juvenile.
double m_GrowthEfficiencyP[5001]
Precalculated growth efficiency for protein with size
void loadVegPalatability(void)
Loads static member m_vegPalatability with data.
Hare_Female * GetMum()
Get the mother pointer.
virtual void BeginStep(void)
BeginStep for Hare_Young.
double GetMaxDailyGrowthEnergyF(int a_age)
Get the maximum daily energy needed for growth for this a_age for use in fat construction.
double m_KJForaging
KJ/m cost of foraging per kg hare.
bool ShouldMature()
Test for maturation.
int m_HareThresholdDD
Input variable - Threshold density dependence level.
bool OnFarmEvent(FarmToDo event)
Do we require a response to a farm event.
double GetRMR()
Get todays RMR.
virtual void DoFirst()
The first method called of the new time-step.
virtual void EndStep(void)
Female EndStep.
double m_KJperM[7001]
Precalculated cost of locomotion - KJ per m per kg
float m_GoodYearBadYear
Variable for adding stochasticity.
void HuntingDifferentiatedBeetleBankArea(void)
double Forage(int &time)
Foraging.
virtual TTypeOfHareState st_Dispersal()
Base implementation only - reimplemented.
void THareInit(int p_x, int p_y, THare_Population_Manager *p_PPM)
Object Initiation.
int GetPegDistance()
Get peg distance.
virtual void EndStep(void)
EndStep code for Hare_Male.
virtual void GeneralOrganoPhosphate(double)
Handles internal effects of organophosphate pesticide exposure. If any effects are needed this method...
double m_MortStochast
Stochasticity around mortality parameters
void Init()
Sets up data structures and calculations prior to starting simulation.
int GetYoungDensity(int x, int y)
Density function - returns the density of young in the square containing by x,y. Each square is 256x2...
int m_OestrousCounter
State variable - Days in oestrous.
virtual void BeginStep(void)
BeginStep for Hare_Juvenile.
The landscape class containing all environmental and topographical data.
virtual void TheRipleysOutputProbe(FILE *a_prb)
Standard spatial output.
The base class for all hare classes.
double m_KJWalking
KJ/m cost of walking per kg hare.
Hare_Young(int p_x, int p_y, Landscape *p_L, THare_Population_Manager *p_PPM, double p_weight)
Constructor for Hare_Young.
double m_fatReserve
State variable - the energy reserve of the hare.
void st_NextStage()
Maturation to Hare_Male or Hare_Female.
int m_lastYearsDensity
State variable used in alternative density-dependent configurations.
void ExtraPopMort(void)
An extra global mortality
void SetMum(Hare_Female *)
Set the mother pointer. Reimplemented in Hare_Infant.
double GetMaxDailyGrowthEnergy(int a_age)
int m_experiencedDensity
State variable used in alternative density-dependent configurations.
double m_KJRunning
KJ/m cost of running per kg hare.
virtual void Step(void)
Female Step.
virtual void BeginStep(void)
BeginStep for Hare_Male.
void ON_BeingFed(double a_someMilk)
Get energy from milk given.
int m_RefNum
Unique hare reference number, also functions as sex flag.
bool m_pesticideInfluenced1
Flag to indicate pesticide effects (e.g. can be used for endocrine distruptors with delayed effects u...
virtual void DoAlmostLast()
Called before clean-up of dead objects.
vector< THare * > TListOfHares
TTypeOfHareState st_Resting()
Resting.
APoint PlaceYoung()
Find somewhere nice for the babies to hide.
virtual void EndStep(void)
BeginStep for Hare_Juvenile.
TTypeOfHareState st_ReproBehaviour()
Currently Unused.
void Walking(int a_dist, int a_direction)
Walking.
virtual void GeneralEndocrineDisruptor(double a_pesticide_dose)
Handles internal effects of endocrine distrupter pesticide exposure for female.
int m_NoYoung
State variable - current litter size.
void SetWeight(double w)
Set the weight.
The base class for all ALMaSS animal classes.
TTypeOfHareState st_ReproBehaviour()
Reproductive behaviour control.
void SetSterile()
Female is sterile.
virtual void ON_Dead()
This hare has been killed.
void Init(double p_weight, int a_age, int a_Ref)
Object initiation.
void AllYoungMatured()
No more young to look after.
double GetMaxDailyGrowthEnergyP(int a_age)
Get the maximum daily energy needed for growth for this a_age for use in protein construction.
void MovePeg()
Move the peg according to attraction forces.
vector< MRR_Entry > m_Entries
double GetRMR(int a_age, double a_size)
Returns the RMR given a specific age and mass.
Class for infant hares (stationary, only milk inputs)
TTypeOfHareState st_Resting()
Juvenile Resting.
double m_SpeedRunning
m/min speed of running per kg hare
bool m_sterile
State variable - is/not sterile.
double GetGrowthEfficiencyF(int a_age)
Get the growth efficiency for this a_age for creating fat.
void POMOutputs()
This method is called to dump the information needed for POM approaches.
virtual void ON_Dead(void)
Mortality - overridden in descendent classes.
double m_old_weight
State variale - last hare weight.
int m_ddindex
State variable used in alternative density-dependent configurations.
Base class for all population managers.
double m_TodaysEnergy
State variable - the amount of energy available today, can be in deficit.
void st_NextStage()
Maturation to Hare_Juvenile.
TListOfHares m_MyYoung
Pointer to litter.
void EnergyBalance(TTypeOfActivity a_activity, int dist)
Adjust energy balance for an activity.
double m_LeveretMaterial
State variable - Mass of foetal material.
virtual ~Hare_Infant()
Hare infant destructor.
virtual void BeginStep(void)
BeginStep for the Hare_Infant.
double m_foragingenergy
Energy obtained from foraging/feeding.
TTypeOfHareState st_Resting()
Male Resting.
void ON_RemoveYoung(THare *a_young)
A leveret has matured.
Class for running mark-release-recapture experiments.
void ReInit(struct_Hare a_data)
Juvenile object reinitiation.
void ReInit(struct_Hare a_data)
Female object reinitiation.
double m_YoungMortRate
Input variable - Young mortality rate.
double m_RMR[2][366]
Precalculated RMR with age
void dumpEnergy()
Used to record energetic status.
void AllYoungKilled()
Last leveret predated.
int GetMaleDensity(int x, int y)
Density function - returns the density of males in the square containing by x,y. Each square is 256x2...
int m_litter_no
State variable - current litter number.
TTypeOfHareState st_Dispersal()
Juvenile Dispersal.
virtual void TheAOROutputProbe()
Output method.
double m_JuvMortRate
Input variable - Juvenile mortality rate.
void st_Dying()
Tidy up before removing the object on death.
int GetAdultDensity(int x, int y)
Density function - returns the density of adults in the square containing by x,y. Each square is 256x...
void ON_MumDead(Hare_Female *a_Mum)
Inform Mum that we are dead.
Class for young hares (low mobility, milk and solid food inputs)
int m_expDensity[365]
State variable used in alternative density-dependent configurations.
int m_DensitySum
State variable used in alternative density-dependent configurations.
bool OnFarmEvent(FarmToDo event)
Do we require a response to a farm event.
double ForageSquareP(int a_x, int a_y, double *a_pestexposure)
Forage from an area and resturn pesticide exposure as well as food.
double m_pesticide_burden
State variable used to hold the current body-burden of pesticide.
void MRROutputs()
Special probe for data to be used in mark-release-recapture simulations.
void ReInit(struct_Hare a_data)
Infant object reinitiation.
int m_Age
State variale - hare age.
double ForageP(int &time)
Foraging but also incorporating pesticide exposure.
Landscape * m_TheLandscape
virtual void EndStep(void)
EndStep for the Hare_Infant.
TTypeOfHareState m_CurrentHState
Defines the current activity.
virtual void GeneralOrganoPhosphate(double a_pesticide_dose)
Handles internal effects of organophosphate pesticide exposure for female.
bool m_IamSick
flag for sickness - used in conjunction with disease configurations
Class used to pass hare information to CreateObjects.
double GetInterference(int h)
Return the proportion of time used in communicating with con-specifics.
bool ON_AreYouMyMum(THare *a_young)
Debug function.
Hare_Male(int p_x, int p_y, Landscape *p_L, THare_Population_Manager *p_PPM, double p_weight, int a_age, int a_Ref)
Constructor.
TTypeOfActivity
Enumerator for hare activities.
void CalcLitterSize(double mean, double SD, int litter)
THare(int p_x, int p_y, Landscape *p_L, THare_Population_Manager *p_PPM)
Constructor.
double GetPolyFood(int a_poly)
Get stored polygon food quality.
virtual void Step(void)
Step for Hare_Male.
virtual void GeneralEndocrineDisruptor(double)
Handles internal effects of endocrine distrupter pesticide exposure. If any effects are needed this m...
int m_StarvationDays
State variable - the number of consecutive days in negative energy balance.
void DoLactation()
Lactation.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure. If any effects are needed this method must be re-impl...
virtual void DoLast()
The last method called before the new time-step starts.
MRR_Data * m_OurMRRData
Data structure for MarkReleaseRecapture expts
double m_MaxDailyGrowthEnergy[5001]
Precalculated max growth energy requirement with size
virtual void Step(void)
Step for the Hare_Infant.
TTypeOfHareState st_Developing()
Developmental behaviour for the infant hare.
double GetTotalWeight()
Provide the wet weight of the hare.
Hare_Infant(int p_x, int p_y, Landscape *p_L, THare_Population_Manager *p_PPM)
Hare infant constructor.
Data entry for mark release recapture data MRR_Data.
virtual void Running(int a_max_dist)
Run.
int GetPegPull()
Get attractive force of peg.
Hare_Female * m_MyMum
Pointer to the hare's mum.
void AddEntry(int a_RefNum)
void UpdateGestation()
Update gestation counter.
TTypeOfActivity m_reproActivity
State variable - current reproductive state.
int m_peg_y
peg y-coordinate
double m_weight
State variale - hare weight g.
void SetMum(Hare_Female *a_af)
Set the mother pointer.
TTypeOfHareState st_Foraging()
Juvenile foraging.
int GetJuvenileDensity(int x, int y)
Density function - returns the density of juveniles in the square containing by x,...
double GetGrowthEfficiencyP(int a_age)
Get the growth efficiency for this a_age for creating protein.
Hare_Object m_Type
State variale - the type of hare.
bool Run(int a_dist, int a_direction)
Run a distance in a direction.
void SubtractHareDensity(int x, int y, Hare_Object a_type)
Density function - subtracts one from the density in the square containing by x,y....
TTypeOfHareState st_Foraging()
Male Foraging.
double GetGrowthEfficiency(int a_age)
Get the growth efficiency for this a_age.
void Init(double p_weight, int a_age, int a_Ref)
Object initiation.
TTypeOfHareState st_Developing()
Developmental code for the young hare.
virtual ~Hare_Young()
Destructor for Hare_Young.
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.
double m_GrowthEfficiency[5001]
Precalculated growth efficiency with size
virtual ~Hare_Female()
Female Destructor.
TTypeOfHareState st_Developing()
The development code for Hare_Juvenile.
void TimeBudget(TTypeOfActivity a_activity, int dist)
Adjust time budger for an activity.
void Warn(std::string a_msg1, std::string a_msg2)
virtual void EndStep(void)
EndStep code for Hare_Young.
int GetTotalDensity(int x, int y)
Density function - returns the density of all hares in the square containing by x,...
TTypeOfHareState st_Resting()
Resting.
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.
TTypeOfHareState
Enumerator for hare behavioural states.
void AddYoung(THare *a_new)
Add a leveret to the list of kids.
virtual void EndStep(void)
Base implementation only - reimplemented.
virtual void ON_Dead()
This hare has been killed.
virtual void GeneralEndocrineDisruptor(double)
Handles internal effects of endocrine distrupter pesticide exposure. If any effects are needed this m...
double m_Interference[2500]
Array storing density-dependence effect with density
void BodyBurdenOut(int a_year, int a_day, double a_bb, double a_mgkg)
BodyBurden output.
Class for juvenile hares (after 5 weeks old, fully mobile)
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...
int m_peg_x
peg x-coordinate
int m_RefNums
The last hare ID used
void UpdateOestrous()
Update oestrous counter.
virtual void Step(void)
Step code for Hare_Young.
int m_GestationCounter
State variable - Days in gestation.