53 #include "../BatchALMaSS/ALMaSS_Setup.h" 54 #include "../ALMaSSDefines.h" 55 #include "../Landscape/ls.h" 56 #include "../BatchALMaSS/PopulationManager.h" 57 #include "../Rabbit/Rabbit.h" 58 #include "../Rabbit/Rabbit_Population_Manager.h" 59 #include "../BatchALMaSS/BoostRandomGenerators.h" 65 extern boost::variate_generator<base_generator_type&, boost::uniform_real<> >
g_rand_uni;
129 m_MyMemory.resize(0);
134 for(vector<RabbitMemoryLocation>::iterator it = m_MyMemory.begin(); it != m_MyMemory.end(); ++it)
136 if ((*it).m_decay-- < 1) m_MyMemory.erase(it);
143 m_MyMemory.push_back(a_mem);
148 vector<RabbitMemoryLocation>::iterator best;
150 for(vector<RabbitMemoryLocation>::iterator it = m_MyMemory.begin(); it != m_MyMemory.end(); ++it)
152 if ((*it).m_quality > score) best=it;
232 Rabbit_Young::Rabbit_Young(
int p_x,
int p_y,
int p_x2,
int p_y2,
Rabbit_Female* a_mum,
Landscape* p_L,
Rabbit_Population_Manager* p_NPM,
Rabbit_Warren* a_warren) :
Rabbit_Base(p_x, p_y, p_x2, p_y2, p_L, p_NPM, a_warren)
368 if (
m_Age>=30)
return true;
376 Rabbit_Juvenile::Rabbit_Juvenile(
int p_x,
int p_y,
int p_x2,
int p_y2,
Rabbit_Female* p_M,
Landscape* p_L,
Rabbit_Population_Manager* p_NPM,
int a_age,
int a_weightage,
Rabbit_Warren* a_warren) :
Rabbit_Young(p_x, p_y, p_x2, p_y2, p_M, p_L, p_NPM, a_warren)
523 Rabbit_Adult::Rabbit_Adult(
int p_x,
int p_y,
int p_x2,
int p_y2,
Landscape* p_L,
Rabbit_Population_Manager* p_NPM,
int a_age,
int a_weightage,
Rabbit_Warren* a_warren) :
Rabbit_Base(p_x, p_y, p_x2, p_y2, p_L, p_NPM, a_warren)
634 m_OurLandscape->
Warn(
"Rabbit_Adult::OnMateFinishedDigging",
"rabbit bigamy, mate not recognised!");
663 m_OurLandscape->
Warn(
"Rabbit_Adult::OnMateDead",
"rabbit bigamy, mate not recognised!");
713 Rabbit_Male::Rabbit_Male(
int p_x,
int p_y,
int p_x2,
int p_y2,
Landscape* p_L,
Rabbit_Population_Manager* p_NPM,
int a_age,
int a_weightage,
Rabbit_Warren* a_warren) :
Rabbit_Adult(p_x, p_y, p_x2, p_y2, p_L, p_NPM, a_age, a_weightage, a_warren)
845 if (aWarren != NULL) {
861 else if (burrows == 2) {
872 double occupation = n / (double)c;
877 aWarren->
Join(
this );
894 Rabbit_Female::Rabbit_Female(
int p_x,
int p_y,
int p_x2,
int p_y2,
Landscape* p_L,
Rabbit_Population_Manager* p_NPM,
int a_age,
int a_weightage,
Rabbit_Warren* a_warren) :
Rabbit_Adult(p_x, p_y, p_x2, p_y2, p_L, p_NPM, a_age, a_weightage, a_warren)
1004 for (
int l = static_cast<int>(
m_AnnualLitters.size()-1); l >= 0; l--) {
1009 #ifdef __RABBITDEBUG 1013 m_OurLandscape->
Warn(
"Rabbit_Female::st_EvaluateTerritory",
"not a member of our warren" );
1019 #ifdef __RABBITDEBUG 1084 if (aWarren != NULL) {
1100 else if (burrows == 2) {
1114 aWarren->
Join(
this );
1122 #ifdef __RABBITDEBUG 1124 m_OurLandscape->
Warn(
"Rabbit_Female::st_EvaluateTerritory",
"not a member of our warren" );
1357 g_msg->
Warn(
"Unknown pesticide type used in Rabbit_Juvenile::InternalPesticideHandlingAndResponse() pesticide code ",
int( tp ) );
1382 g_msg->
Warn(
"Unknown pesticide type used in Rabbit_Male::InternalPesticideHandlingAndResponse() pesticide code ",
int( tp ) );
1408 g_msg->
Warn(
"Unknown pesticide type used in Rabbit_Female::InternalPesticideHandlingAndResponse() pesticide code ",
int( tp ) );
1514 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1538 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1556 double minpct = 1.0 / 16.0;
1557 double pct =
m_foragearea/ (double) (m_foragesize * m_foragesize);
1564 if (pct > 0.9) pct = 0.9;
1617 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k <
m_LEList.size(); k++) {
1619 if (
m_LEList[ k ].m_forage > 0.0) {
1620 #ifdef __RABBITMEANPESTICIDECONC 1633 #ifdef __RABBITMEANPESTICIDECONC 1648 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k <
m_LEList.size(); k++) {
1655 availableforage +=
m_LEList[ k ].m_foragearea;
1696 #ifdef __EnclosureTest 1699 for (
int i = 0; i < nsz; i++) {
1702 CCRatio /= (nsz + 1);
1716 for (
int i=0; i< nsz; i++ )
1730 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k<
m_LEList.size(); k++)
1744 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k<
m_LEList.size(); k++)
1758 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1772 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1786 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1805 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k<
m_LEList.size(); k++) {
1826 for (
int r = 0; r < sz; r++) {
1871 #ifdef __RABBITDEBUG 1890 double foragemult = 0;
1895 #ifdef __RABBITDEBUG 1915 int loopstart = (int) floor(nsz *
g_rand_uni());
1916 for (
int i=0; i< nsz; i++ )
1919 int index = (i + loopstart);
1920 if (index >= nsz) index-=nsz;
1936 for (
int i = 0; i<sz; i++) {
1954 for (
int i = 0; i < sz; i++) {
1964 rfemaleBig = rfemale;
1979 for (
int i = 0; i<sz; i++) {
1997 for (
int i=0; i<sz; i++)
2015 for (
int i=0; i<sz; i++)
2039 #ifdef __RABBITDEBUG 2045 #ifdef __RABBITDEBUG 2088 #ifdef __RABBITDEBUG 2092 m_OurLandscape->
Warn(
"Rabbit_Warren::JoinNOccupy",
"Attempt to occupy a burrow that is occupied or does not exist.");
2096 #ifdef __RABBITDEBUG 2105 #ifdef __RABBITDEBUG 2119 for (
int i=0; i<sz; i++)
2124 #ifdef __RABBITDEBUG 2130 m_OurLandscape->
Warn(
"Rabbit_Warren::Leave",
"Attempt to leave a warren with a mate.");
2136 m_OurLandscape->
Warn(
"Rabbit_Warren::Leave",
"Attempt to leave a warren with a burrow and mate.");
2168 #ifdef __RABBITDEBUG 2172 for (
int i=0; i<sz; i++)
2179 #ifdef __RABBITDEBUG 2186 a_mate->
SetMate( p_rabAdult );
2187 p_rabAdult->
SetMate( a_mate );
2201 p_rabAdult->
SetMate( a_mate );
2212 #ifdef __RABBITDEBUG 2224 #ifdef __RABBITDEBUG 2228 for (
int r=0; r<sz; r++)
2233 #ifdef __RABBITDEBUG 2243 p_rabAdult->
SetMate( a_mate );
2250 a_mate->
SetMate( p_rabAdult );
2253 p_rabAdult->
SetMate( a_mate );
2262 #ifdef __RABBITDEBUG 2271 for (
int i = 0; i < sz; i++) {
2283 for (
int i = 0; i < sz; i++) {
2303 for (
int i = 0; i<siz; i++)
2311 if (dynamic_cast<Rabbit_Adult*>(
m_InhabitantsList[i])->GetMate() != NULL) Mmates++;
2318 if (dynamic_cast<Rabbit_Adult*>(
m_InhabitantsList[i])->GetMate() != NULL) Fmates++;
2323 int alonemales = Mburrs-MBM;
2324 int alonefemales = Fburrs-FBM;
2330 if (MBM + alonemales + alonefemales >
m_NoBurrows)
2353 for (
int i=0; i<siz; i++)
2358 if ( dynamic_cast<Rabbit_Adult*>(
m_InhabitantsList[i])->GetMate()!= NULL) Mmates++;
2364 if ( dynamic_cast<Rabbit_Adult*>(
m_InhabitantsList[i])->GetMate()!= NULL) Fmates++;
2368 int alonemales = Mburrs-MBM;
2369 int alonefemales = Fburrs-FBM;
2370 if (MBM + alonemales + alonefemales >=
m_NoBurrows)
void Leave(Rabbit_Base *a_rabbit)
Remove this adult from the warren list.
int GetAllBigFemaleRabbits()
Supplies the number of big rabbits currently in the warren.
virtual Rabbit_Adult * GetMate(void)
Get mate pointer.
virtual void st_Dying(void)
Young dying state.
int m_myLitterSize
Holds the current litter size.
Rabbit_Adult(int p_x, int p_y, int p_x2, int p_y2, Landscape *p_L, Rabbit_Population_Manager *p_NPM, int a_age, int a_weightage, Rabbit_Warren *a_warren)
Rabbit_Adult constructor.
Rabbit_Warren * FindClosestWarren(int a_x, int a_y, int a_rank)
Finds the closest warren as the crow flies.
int SupplyPolyRef(int a_x, int a_y)
int CalcPermForageArea(void)
Returns the total area of permanent forage.
The rabbit young class. All special young behaviour is described here.
bool m_FedToday
Flag for been fed today.
The landscape class containing all environmental and topographical data.
static CfgFloat cfg_adult_base_mort("RABBIT_ADULTBASEMORT", CFG_CUSTOM, 0.00013)
Input variable. The daily base level for adult mortality before any modifiers are applied...
void Weaned(Rabbit_Young *a_young)
Message on weaning of a young.
void SetSocialStatus(TTypesOfRabbitSocialStatus a_status)
Sets the dominance status.
Rabbit_Female(int p_x, int p_y, int p_x2, int p_y2, Landscape *p_L, Rabbit_Population_Manager *p_NPM, int a_age, int a_weightage, Rabbit_Warren *a_warren)
Rabbit_Female constructor.
The rabbit female class. All special female behaviour is described here.
CfgInt cfg_RabbitUseNatalDispersalRecordAge
Flag to denote using lifetime repro output file or not.
The information needed to hold a single rabbit memory.
void SetHasBurrow(bool a_status)
Set/unset burrow status.
unsigned GetLiveArraySize(int a_listindex)
Gets the number of 'live' objects for a list index in the TheArray.
double GetDailyMortalityChanceJ()
Returns the juvenile daily mortality multiplier.
LE * SupplyLEPointer(int a_polyref)
vector< Rabbit_Base * > m_InhabitantsList
List of rabbits that live here - for easy communication purposes.
int CalcLitterSize(void)
Calculates the litter size at birth.
Rabbit_Warren * m_Warren
A pointer to the current warren.
static double m_minForageDigestability
The minimum vegetation digestability allowed for foraging.
int m_lifespan
The rabbit's alloted lifespan.
bool GetForageDay()
Get method for the forage day flag.
int CalcForageArea(void)
Returns the total area of forage.
void SetMate(Rabbit_Adult *a_mate)
Set/unset mate status.
Rabbit_Population_Manager * m_NPM
Rabbit_Population_Manager pointer.
int GetAllBreedingFemaleRabbits()
Supplies the number of breeding rabbits currently in the warren.
static CfgFloat cfg_rabbitsocialreproductionthreshold("RABBIT_SOCIALREPROTHRESHOLD", CFG_CUSTOM, 2.3)
The threshold at which social reproduction reduction is tested. 1.0 means 50% chance of reproduction ...
virtual void BeginStep(void)
The BeginStep is the first 'part' of the timestep that an animal can behave in. It is called once per...
Rabbit_Population_Manager * m_OurPopulationManager
This is a time saving pointer to the correct population manager object.
double GetCarryingCapacityRatio()
Checks whether all possible burrows are filled with rabbits. This is updated daily by Rabbit_Warren::...
virtual void Step(void)
The male rabbit step code.
Rabbit_Base(int p_x, int p_y, int p_x2, int p_y2, Landscape *p_L, Rabbit_Population_Manager *p_NPM, Rabbit_Warren *a_warren)
Rabbit constructor.
CfgInt cfg_rabbitdiggingtime("RABBIT_DIGGINGTIME", CFG_CUSTOM, 10)
Input variable. Minimum burrow construction time in days.
int m_TL_y
Stores original m_Location_y.
void NatalDispersalRecordOutput(Rabbit_Base *a_rabbit)
Records the natal dispersal.
bool SupplyPesticideDecay()
Returns true if there is any pesticide in the system at all at this point.
Rabbit_Adult * m_myMate
Pointer to the mate if any.
virtual void GeneralEndocrineDisruptor(double)
Handles internal effects of endocrine distrupter pesticide exposure.
void InitEvaluation(void)
Intiates the evaluation of the warren area.
CfgBool l_pest_enable_pesticide_engine
int m_runningavFemales
Keeps track of the number of breeding females.
CfgFloat cfg_dispersalmortperm("RABBIT_DISPERSALMORTPERM", CFG_CUSTOM, 0.0002)
Input variable. The additional mortality rate with distance for between warren dispersal.
int GetPopulationSize()
Gets the total warren population of rabbits.
Rabbit_Female * m_Mum
Pointer to mum.
CfgFloat cfg_rabbitdendepscaler("RABBIT_DENSITYDEPSCALER", CFG_CUSTOM, 4.5)
Input variable. Average family size for calculating carrying capacity.
double GetLitterReabsortionConst(void)
Returns litter reabsorption chance.
double GetDailyMortalityChanceA()
Returns the adult daily mortality multiplier.
virtual TTypeOfRabbitState st_Forage(void)
Adult female forage behaviour.
int GetweightAge(void)
Get age method.
Integer configurator entry class.
int m_breedingfemales
The number of females that bred this year.
virtual void st_Dying(void)
Default dying state.
CfgBool cfg_RabbitUseNatalDispersalRecord
Flag to denote using lifetime repro output file or not.
static double m_pesticidedegradationrate
State variable used to hold the daily degredation rate of the pesticide in the body.
int m_soiltype
Variable holding the soil type, 1 = heavy, 0 = sandy, 3 = unsuitable (never used in warrens) ...
int m_size
Warren core size in m.
void Mate(Rabbit_Adult *a_mate, RabbitObjectTypes rob_type)
Mate him with un-mated female/male with a burrow.
A class to describe the rabbits warren system.
double CalcCarryingCapacityRatio2()
calculates the ratio of rabbits to the carrying capacity for the local area
virtual ~Rabbit_Male(void)
Rabbit_Male destructor.
virtual bool ShouldMature(void)
Tests for maturation to the next stage.
void ResetAllRabbitProductionRecord(void)
Reset data about production of rabbits throughout year.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure - reimplemented from base class.
virtual void EndStep(void)
The EndStep is the last 'part' of the timestep that an animal can behave in.
void CalcCarryingCapacityRatio1()
calculates the ratio of rabbits to the carrying capacity
static double m_MinKitsNo
The minimum number of kits.
double m_weight
The weight in g.
Rabbit_Young(int p_x, int p_y, int p_x2, int p_y2, Rabbit_Female *a_mum, Landscape *p_L, Rabbit_Population_Manager *p_NPM, Rabbit_Warren *a_warren)
Rabbit_Young constructor.
int m_Age
The rabbit's age.
virtual Rabbit_Adult * GetMate(void)
Get mate pointer.
int SupplySimAreaWidth(void)
Rabbit_Population_Manager * m_OurPopulationManager
This is a time saving pointer to the correct population manager object.
int GetDigging()
Get number of days to dig.
int GetCoverArea(void)
Returns the total area of cover.
CfgFloat cfg_minForageDigestability("RABBIT_MINFORAGEDIGESTABILITY", CFG_CUSTOM, 0.50)
Input variable. Input variable. The minimum digestability desirable for forage vegetation.
double m_availableforage
Records the amount of forage currently available in the warren area as a proportion of what is the po...
virtual void BeingStep(void)
The BeginStep is the first 'part' of the timestep that an animal can behave in.
CfgFloat cfg_rabbitminkits("RABBIT_MINKITS", CFG_CUSTOM, 1.0)
The minimum number of kits in a litter.
void ChooseNewDominant(void)
Finds a subdominantfemale and promotes them to dominant.
TTypeOfRabbitState st_Develop()
Development state for young.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure. If any effects are needed this method must be re-impl...
int m_NoOccupiedBurrows
Records the burrows that are occupied.
Rabbit_Warren * GetNetworkWarren(void)
Chooses a warren to evaluate based on distance.
int m_digging
Flag to denote digging behaviour. This keeps the rabbit in a warren without burrows whilst it tries t...
bool m_lactating
Flag to indicate lactating.
void CreateObjects(RabbitObjectTypes ob_type, TAnimal *pvo, struct_Rabbit *a_data, int a_number)
Method for creating a new individual Rabbit.
double m_CarryingCapacityR
Records the max number of rabbits possible here.
APoint m_born_location
The x,y location at birth.
The rabbit adult class. All generic adult behaviour is described here.
virtual void st_Dying(void)
Female dying state.
Rabbit_Male(int p_x, int p_y, int p_x2, int p_y2, Landscape *p_L, Rabbit_Population_Manager *p_NPM, int a_age, int a_weightage, Rabbit_Warren *a_warren)
Rabbit_Male constructor.
Used for creation of a new Rabbit object.
CfgFloat cfg_rabbit_pesticidedegradationrate("RABBIT_PESTICIDEDEGRADATIONRATE", CFG_CUSTOM, 0.0)
Holds 1-proportion of decay of body burden of pesticide per day. Default of 0.0 will remove all body ...
virtual void Step()
Warren step code.
virtual TTypeOfRabbitState st_Lactating(void)
Female lactating state.
double SupplyPesticide(int a_x, int a_y)
Gets total pesticide for a location.
The class to handle all predator population related matters.
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
virtual void Step(void)
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously...
void OccupyNewBurrow()
a_rabbit occupies a newly dug burrow
void OnEvicted(void)
Signals mum has a new litter to look after.
virtual void Step(void)
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously...
static CfgFloat cfg_rabbitminwarrensize("RABBIT_MINWARRENSIZE", CFG_CUSTOM, 2)
The minimum size of a warren.
void OnYoungDeath(Rabbit_Young *a_young)
Message on death of a young.
int m_gestationcounter
Counter to record the number of days gestating.
static CfgFloat cfg_juvenile_base_mort("RABBIT_JUVENILEBASEMORT", CFG_CUSTOM, 0.004)
Input variable. The daily base level for juvenile mortality before any modifiers are applied...
int GetLittersThisYear()
Returns the number litters produced in the last 12 months.
void Join(Rabbit_Base *a_rabbit)
Adds this rabbit to the warren list.
TTypesOfRabbitSocialStatus m_socialstatus
Flag to record dominance status (0-4)
Rabbit_Juvenile(int p_x, int p_y, int p_x2, int p_y2, Rabbit_Female *p_M, Landscape *p_L, Rabbit_Population_Manager *p_NPM, int a_age, int a_weightage, Rabbit_Warren *a_warren)
Rabbit_Young constructor.
virtual TTypeOfRabbitState st_Forage(void)
Adult male forage behaviour.
bool IsMember(Rabbit_Base *a_rabbit)
Returns true if this rabbit belongs to the warren.
virtual void EndStep(void)
The EndStep is the last 'part' of the timestep that an animal can behave in.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure - reimplemented from base class.
void Update(void)
daily update of the memory
double m_CarryingCapacityRatio
Records the ratio between carrying capacity and no rabbits in warren.
virtual TTypeOfRabbitState st_EvaluateTerritory(void)
Female Evaluate Territory Step.
virtual ~Rabbit_Juvenile(void)
Rabbit_Young destructor.
RabbitObjectTypes m_RabbitType
The rabbits type.
int Supply_m_Location_y()
void UpdateForageInformation(void)
Updates the forage information depending upon the vegetation state.
int m_littersthisyear
The number of litters produced this year.
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
bool IsBreedingSeason(void)
Get whether it is breeding season.
virtual ~Rabbit_Base(void)
Rabbit destructor.
int m_weightage
The rabbit age in terms of weight.
CfgFloat cfg_globaldisease_probability("RABBIT_GLOBALDISEASEPROBCONSTANT", CFG_CUSTOM, 0.05)
Input variable. A constant use to calculate the probability of density related disease.
int m_nonbreedingfemales
The number of females that did not breed this year but are older than 1 year.
TTypeOfRabbitState st_Forage(void)
Juvenile forage behaviour.
virtual TTypeOfRabbitState st_EvaluateTerritory(void)
Male Evaluate Territory Step.
TTypesOfRabbitSocialStatus GetSocialStatus(void)
Return the dominance status.
int m_CarryingCapacity
Records the max number of rabbit pairs possible here.
int m_rabbitdiggingtime
The time taken for burrow construction.
void UpdateThisYearsBreeders()
Calculates and stores the number of breeders and non-breeders.
int Supply_m_Location_x()
The base class for all ALMaSS animal classes.
void UpdateDominance(void)
Checks for a dominant female and promotes one if necessary and possible.
bool IsFreeFemale(void)
Returns true if there is a female with a burrow and no mate.
int m_weightAge
A physiological age parameter, this is the growth age based on an optimal curve (if optimal condition...
double m_inv_availableforage
The inverse of m_availableforage, prevents multiple re-calculation.
virtual TTypeOfRabbitState st_Gestating(void)
Female gestating state.
double m_diseaseconstant
a measure of disease mortality likelihood
The basic information needed for an LE present in a warren area.
vector< RabbitWarrenLEInfo > m_LEList
List of polygons and the area which is part of the warren.
void OnMateFinishedDigging(Rabbit_Adult *a_mate)
Action when a mate has finished digging a burrow.
double GetForagePesticide(void)
Gets the current mean pesticide concentration per unit forage.
int GetTemporaryForageArea(void)
Returns the total area of temporary forage.
CfgFloat cfg_rabbitmaxkits("RABBIT_MAXKITS", CFG_CUSTOM, 9.6)
The maximum number of kits in a litter.
int IsFreeBurrow(void)
Is there a vacent burrow?
virtual ~Rabbit_Female(void)
Rabbit_Female destructor.
virtual void EndStep(void)
The EndStep is the last 'part' of the timestep that an animal can behave in.
CfgInt cfg_rabbitdensitydependencedelay
Input variable. The period between recalculation of rabbit disease probability.
double GetAvailableForage(void)
Returns the available forage realtive to rabbit numbers.
virtual TTypeOfRabbitState st_GiveBirth(void)
Female give birth state.
RabbitMemory(void)
Rabbit Memory constructor.
Bool configurator entry class.
TTypesOfRabbitHabitat ClassifyHabitat(TTypesOfLandscapeElement a_tole)
Classify a landscape element type according to the rabbit habitat classification. ...
int SupplySimAreaHeight(void)
double m_litterreabosorptionchance
Chance of litter reaborption based on the m_availableforage.
int m_foragesize
Warren forage size in m.
bool DEBUG_InternalTest()
static CfgFloat cfg_rabbitmaxwarrensize("RABBIT_MAXWARRENSIZE", CFG_CUSTOM, 10)
Use to calculate the maximum size of a warren. Add min to get the real maximum warren size...
int SupplyDayInYear(void)
double GetGrowth(int a_age)
Get method for the rabbit growth with age.
int m_permforagearea
Variable holding the total permanent forage area.
Landscape * m_OurLandscape
int m_1yrOldFemales
The number of 1 year old females.
double m_mortalitymultiplierJ
a measure of mortality likelihood - juveniles
int GetTempForageAreaVeg(void)
Returns the total area of temporary forage based on veg height.
TTypeOfRabbitState st_Develop(void)
Development state for young.
virtual void GeneralOrganoPhosphate(double)
Handles internal effects of organophosphate pesticide exposure.
static double m_dispersalmortperm
The extra dispersal mortality per m travelled.
void AddMemory(RabbitMemoryLocation a_mem)
Add a memory location.
static CfgFloat cfg_litterabsorptionconstant("RABBIT_LITTERABSOPRTIONCONST", CFG_CUSTOM, 1.8)
Used to calculate the chance of litter reabsorption depending on forage conditions.
void SetDigging(int a_days)
Set number of days to dig.
TTypeOfRabbitState m_CurrentRState
Variable to record current behavioural state.
void OccupyBurrow()
a_rabbit occupies a free burrow
virtual void st_Dying(void)
Young dying state.
CfgFloat cfg_RabbitPesticideResponse("RABBIT_PESTICDERESPONSETHRESHOLD", CFG_CUSTOM, 0.00001)
Input variable. The threshold above which a rabbit will be killed if it ingests pesticide.
RabbitMemoryLocation GetBestLocation(void)
Get the best current location.
Rabbit_Warren(int p_x, int p_y, Landscape *p_L, Rabbit_Population_Manager *p_NPM, int a_size, int a_soil)
Rabbit warren constructor.
int m_NoBurrows
Records the maintenence restricted current carrying capacity (burrow number)
static double m_MaxKitsNo
The maximum number of kits.
TTypeOfRabbitState GetCurrentRState()
virtual bool ShouldMature(void)
Tests for maturation to the next stage.
void JoinNOccupy(Rabbit_Adult *a_rabbit)
Adds this adult to the warren list and house them in a suitable burrow.
void NetworkEvaluation(void)
Calculates and saves distance probabilities.
void Warn(std::string a_msg1, std::string a_msg2)
bool IsFreeMale(void)
Returns true if there is a male with a burrow and no mate.
Rabbit_Warren * m_myWarren
True if currently mated.
void OccupyWarren(Rabbit_Adult *a_rabbit)
Adds the first rabbit to the warren list.
static CfgFloat cfg_forageareamortscaler("RABBIT_FORAGEAREAMORTSCALER", CFG_CUSTOM, 60.0)
Input variable. A constant used to increase bad weather mortality as a function of the proportion of ...
int GetCoverAreaVeg(void)
Returns the total area of cover based on veg height.
int m_MyOffspring
The total number of kits born to her.
TTypesOfPesticide SupplyPesticideType(void)
virtual void st_Dying(void)
Default dying state.
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
double SupplyVegHeight(int a_polyref)
bool DEBUG_InternalTest2()
double m_BigFemaleRabbitsR
Records the number of big female rabbits divided by m_CarryingCapacityR2.
RabbitObjectTypes GetRabbitType(void)
Get rabbit type.
int m_maintenence
Warren maintenence score - if not max then houseing capacity is reduced.
void OnMumDead(void)
Signals death of mum.
double m_pesticide_burden
State variable used to hold the current body-burden of pesticide.
virtual ~Rabbit_Adult()
Rabbit_Adult destructor.
vector< int > m_AnnualLitters
The number of litters produced.
long SupplyGlobalDate(void)
void OnMateDead(Rabbit_Adult *a_mate)
Set/unset mate status.
double m_CarryingCapacityR2
Records the max number of rabbits possible here divided by 2.
double m_mortalitymultiplierA
a measure of mortality likelihood - adults
void ReproOutputRecordOutput(Rabbit_Female *a_female)
Print reproductive record to file.
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
int m_MyTotalLitters
The number of litters produced.
virtual ~Rabbit_Warren()
Rabbit warren destructor.
vector< LocalWarrenNewtorkEntry > m_LocalWarrenNetwork
List of local warrens and their accessibility from this warren.
double m_forageP
Records the amount of pesticde as a mean concentration per unit area forage.
CfgBool cfg_RabbitUseReproOutput
Flag to denote using lifetime repro output file or not.
virtual TTypeOfRabbitState st_UpdateBreedingStatus(void)
Female reproductive update - handles oestrous, gestation, lactation and birth.
int m_BurrowsUnderConstruction
Records the burrows that are being dug.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure - reimplemented from base class.
void RabbitProductionRecord(RabbitObjectTypes YoungType, int kits)
Stores data about production of rabbits throughout year.
void OnFed(void)
Signals food arrived today.
int m_runningavCount
Keeps track of the number of breeding days.
TTypeOfRabbitState st_Explore(void)
Juvenile local exploration.
int g_rabbitexploredistance
void JoinNMate(Rabbit_Adult *a_mate, RabbitObjectTypes rob_type)
Adds this rabbit to the warren list and mate him with un-mated female/male with a burrow...
void UpdatePesticide(void)
Updates the pesticide concentration in forage polygons.
Double configurator entry class.
void st_WarrenBeing(void)
The only warren behaviour - it just is.
void SetWarren(Rabbit_Warren *a_warren)
Set the warren pointer.
Rabbit_Young * m_myLitter[20]
Holds the current young (for lactation)
TTypeOfRabbitState st_BecomeJuvenile(void)
Young maturation.
static double m_maxForageHeight
The maximum vegetation height assumed for forage potential.
bool m_haveBurrow
Flag to record burrow status.
void CalcDisease()
Calculate the current disease mortality constant.
TTypeOfRabbitState m_CurrentRState
Variable to record current behavioural state.
int GetCurrentStateNo()
Returns the current state number.
virtual void Step(void)
The female rabbit step code.
Landscape * m_L
Landscape pointer.
double m_foragearearatio
Records the amount of forage currently available in the warren area as a proportion of total forage a...
int m_foragearea
Variable holding the total potential forage area.
int GetCarryingCapacity()
Returns the carrying capacity in burrows.
bool m_pregnant
Flag to indicate pregnancy.
virtual ~Rabbit_Young(void)
Rabbit_Young destructor.
bool WalkTo(int a_x, int a_y)
Walks to a location from current location.
bool m_pesticideInfluenced1
Flag to indicate pesticide effects (e.g. can be used for endocrine distruptors with delayed effects u...
TTypeOfRabbitState st_BecomeAdult(void)
Juvenile maturation.
void PesticideDeathRecord(RabbitObjectTypes ob_type)
Records pesticide poisoning incidents.
unsigned SupplyAllBigRabbits()
Returns the total number of rabbits.
double SupplyVegDigestability(int a_polyref)
Rabbit_Young * m_rabbit
A pointer to a rabbit base - useful for extra information.
static CfgFloat cfg_young_base_mort("RABBIT_YOUNGBASEMORT", CFG_CUSTOM, 0.038)
Input variable. The daily base level for young mortality before any modifiers are applied...
int m_TL_x
Stores original m_Location_x.
bool GetHasBurrow(void)
Get burrow status.
bool MortalityTest(double a_prop)
A simple probability based test.
CfgFloat cfg_maxForageHeight("RABBIT_MAXFORAGEHEIGHT", CFG_CUSTOM, 30.0)
Input variable. The maximum height desirable for forage vegetation.