ALMaSS Rabbit ODdox
1.1
The rabbit model description following ODdox protocol
|
Go to the documentation of this file.
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!");
666 m_OurLandscape->
Warn(
"Rabbit_Adult::OnMateDead",
"rabbit bigamy, mate not recognised!");
719 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)
851 if (aWarren != NULL) {
867 else if (burrows == 2) {
878 double occupation = n / (double)c;
883 aWarren->
Join(
this );
900 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)
1010 for (
int l = static_cast<int>(
m_AnnualLitters.size()-1); l >= 0; l--) {
1015 #ifdef __RABBITDEBUG
1019 m_OurLandscape->
Warn(
"Rabbit_Female::st_EvaluateTerritory",
"not a member of our warren" );
1025 #ifdef __RABBITDEBUG
1090 if (aWarren != NULL) {
1106 else if (burrows == 2) {
1120 aWarren->
Join(
this );
1128 #ifdef __RABBITDEBUG
1130 m_OurLandscape->
Warn(
"Rabbit_Female::st_EvaluateTerritory",
"not a member of our warren" );
1363 g_msg->
Warn(
"Unknown pesticide type used in Rabbit_Juvenile::InternalPesticideHandlingAndResponse() pesticide code ",
int( tp ) );
1388 g_msg->
Warn(
"Unknown pesticide type used in Rabbit_Male::InternalPesticideHandlingAndResponse() pesticide code ",
int( tp ) );
1414 g_msg->
Warn(
"Unknown pesticide type used in Rabbit_Female::InternalPesticideHandlingAndResponse() pesticide code ",
int( tp ) );
1520 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1544 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1562 double minpct = 1.0 / 16.0;
1570 if (pct > 0.9) pct = 0.9;
1623 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k <
m_LEList.size(); k++) {
1625 if (
m_LEList[ k ].m_forage > 0.0) {
1626 #ifdef __RABBITMEANPESTICIDECONC
1639 #ifdef __RABBITMEANPESTICIDECONC
1654 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k <
m_LEList.size(); k++) {
1661 availableforage +=
m_LEList[ k ].m_foragearea;
1702 #ifdef __EnclosureTest
1705 for (
int i = 0; i < nsz; i++) {
1708 CCRatio /= (nsz + 1);
1722 for (
int i=0; i< nsz; i++ )
1736 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k<
m_LEList.size(); k++)
1750 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k<
m_LEList.size(); k++)
1764 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1778 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1792 for (vector<RabbitWarrenLEInfo>::size_type k=0; k<
m_LEList.size(); k++)
1811 for (vector<RabbitWarrenLEInfo>::size_type k = 0; k<
m_LEList.size(); k++) {
1832 for (
int r = 0; r < sz; r++) {
1837 int litters = dynamic_cast<Rabbit_Female*>(
m_InhabitantsList[ r ])->GetLittersThisYear();
1877 #ifdef __RABBITDEBUG
1896 double foragemult = 0;
1901 #ifdef __RABBITDEBUG
1921 int loopstart = (int) floor(nsz *
g_rand_uni());
1922 for (
int i=0; i< nsz; i++ )
1925 int index = (i + loopstart);
1926 if (index >= nsz) index-=nsz;
1942 for (
int i = 0; i<sz; i++) {
1960 for (
int i = 0; i < sz; i++) {
1970 rfemaleBig = rfemale;
1985 for (
int i = 0; i<sz; i++) {
2003 for (
int i=0; i<sz; i++)
2021 for (
int i=0; i<sz; i++)
2045 #ifdef __RABBITDEBUG
2051 #ifdef __RABBITDEBUG
2094 #ifdef __RABBITDEBUG
2098 m_OurLandscape->
Warn(
"Rabbit_Warren::JoinNOccupy",
"Attempt to occupy a burrow that is occupied or does not exist.");
2102 #ifdef __RABBITDEBUG
2111 #ifdef __RABBITDEBUG
2125 for (
int i=0; i<sz; i++)
2130 #ifdef __RABBITDEBUG
2136 m_OurLandscape->
Warn(
"Rabbit_Warren::Leave",
"Attempt to leave a warren with a mate.");
2142 m_OurLandscape->
Warn(
"Rabbit_Warren::Leave",
"Attempt to leave a warren with a burrow and mate.");
2174 #ifdef __RABBITDEBUG
2178 for (
int i=0; i<sz; i++)
2185 #ifdef __RABBITDEBUG
2192 a_mate->
SetMate( p_rabAdult );
2193 p_rabAdult->
SetMate( a_mate );
2207 p_rabAdult->
SetMate( a_mate );
2218 #ifdef __RABBITDEBUG
2230 #ifdef __RABBITDEBUG
2234 for (
int r=0; r<sz; r++)
2239 #ifdef __RABBITDEBUG
2249 p_rabAdult->
SetMate( a_mate );
2256 a_mate->
SetMate( p_rabAdult );
2259 p_rabAdult->
SetMate( a_mate );
2268 #ifdef __RABBITDEBUG
2277 for (
int i = 0; i < sz; i++) {
2289 for (
int i = 0; i < sz; i++) {
2309 for (
int i = 0; i<siz; i++)
2317 if (dynamic_cast<Rabbit_Adult*>(
m_InhabitantsList[i])->GetMate() != NULL) Mmates++;
2324 if (dynamic_cast<Rabbit_Adult*>(
m_InhabitantsList[i])->GetMate() != NULL) Fmates++;
2329 int alonemales = Mburrs-MBM;
2330 int alonefemales = Fburrs-FBM;
2336 if (MBM + alonemales + alonefemales >
m_NoBurrows)
2359 for (
int i=0; i<siz; i++)
2364 if ( dynamic_cast<Rabbit_Adult*>(
m_InhabitantsList[i])->GetMate()!= NULL) Mmates++;
2370 if ( dynamic_cast<Rabbit_Adult*>(
m_InhabitantsList[i])->GetMate()!= NULL) Fmates++;
2374 int alonemales = Mburrs-MBM;
2375 int alonefemales = Fburrs-FBM;
2376 if (MBM + alonemales + alonefemales >=
m_NoBurrows)
The information needed to hold a single rabbit memory.
double m_diseaseconstant
a measure of disease mortality likelihood
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure - reimplemented from base class.
bool IsFreeFemale(void)
Returns true if there is a female with a burrow and no mate.
void SetWarren(Rabbit_Warren *a_warren)
Set the warren pointer.
double SupplyVegDigestability(int a_polyref)
virtual void st_Dying(void)
Default dying state.
int m_MyOffspring
The total number of kits born to her.
LE * SupplyLEPointer(int a_polyref)
bool m_haveBurrow
Flag to record burrow status.
void OnFed(void)
Signals food arrived today.
int GetTemporaryForageArea(void)
Returns the total area of temporary forage.
virtual void BeingStep(void)
The BeginStep is the first 'part' of the timestep that an animal can behave in.
int m_gestationcounter
Counter to record the number of days gestating.
int IsFreeBurrow(void)
Is there a vacent burrow?
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.
void SetHasBurrow(bool a_status)
Set/unset burrow status.
TTypesOfRabbitSocialStatus m_socialstatus
Flag to record dominance status (0-4)
virtual void Step(void)
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously...
CfgFloat cfg_minForageDigestability("RABBIT_MINFORAGEDIGESTABILITY", CFG_CUSTOM, 0.50)
Input variable. Input variable. The minimum digestability desirable for forage vegetation.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure - reimplemented from base class.
bool SupplyPesticideDecay(PlantProtectionProducts a_ppp)
Returns true if there is any pesticide in the system at all at this point.
void UpdateThisYearsBreeders()
Calculates and stores the number of breeders and non-breeders.
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 m_rabbitdiggingtime
The time taken for burrow construction.
int m_foragesize
Warren forage size in m.
int m_permforagearea
Variable holding the total permanent forage area.
bool GetHasBurrow(void)
Get burrow status.
virtual TTypeOfRabbitState st_Lactating(void)
Female lactating state.
void UpdateDominance(void)
Checks for a dominant female and promotes one if necessary and possible.
double m_inv_availableforage
The inverse of m_availableforage, prevents multiple re-calculation.
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
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...
void PesticideDeathRecord(RabbitObjectTypes ob_type)
Records pesticide poisoning incidents.
Rabbit_Warren * FindClosestWarren(int a_x, int a_y, int a_rank)
Finds the closest warren as the crow flies.
virtual TTypeOfRabbitState st_UpdateBreedingStatus(void)
Female reproductive update - handles oestrous, gestation, lactation and birth.
virtual void EndStep(void)
The EndStep is the last 'part' of the timestep that an animal can behave in.
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 ...
vector< RabbitWarrenLEInfo > m_LEList
List of polygons and the area which is part of the warren.
virtual void BeginStep(void)
The BeginStep is the first 'part' of the timestep that an animal can behave in. It is called once per...
void OnYoungDeath(Rabbit_Young *a_young)
Message on death of a young.
double GetForagePesticide(void)
Gets the current mean pesticide concentration per unit forage.
void OnMateDead(Rabbit_Adult *a_mate)
Set/unset mate status.
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.
The rabbit female class. All special female behaviour is described here.
double GetAvailableForage(void)
Returns the available forage realtive to rabbit numbers.
unsigned SupplyAllBigRabbits()
Returns the total number of rabbits.
int m_digging
Flag to denote digging behaviour. This keeps the rabbit in a warren without burrows whilst it tries t...
bool DEBUG_InternalTest()
int GetweightAge(void)
Get age method.
double m_litterreabosorptionchance
Chance of litter reaborption based on the m_availableforage.
void OccupyWarren(Rabbit_Adult *a_rabbit)
Adds the first rabbit to the warren list.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure. If any effects are needed this method must be re-impl...
Landscape * m_OurLandscape
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 GetCoverAreaVeg(void)
Returns the total area of cover based on veg height.
double m_mortalitymultiplierJ
a measure of mortality likelihood - juveniles
int m_1yrOldFemales
The number of 1 year old females.
TTypeOfRabbitState st_BecomeJuvenile(void)
Young maturation.
double m_BigFemaleRabbitsR
Records the number of big female rabbits divided by m_CarryingCapacityR2.
int GetTempForageAreaVeg(void)
Returns the total area of temporary forage based on veg height
bool IsBreedingSeason(void)
Get whether it is breeding season.
void OccupyBurrow()
a_rabbit occupies a free burrow
TTypeOfRabbitState m_CurrentRState
Variable to record current behavioural state.
CfgFloat cfg_globaldisease_probability("RABBIT_GLOBALDISEASEPROBCONSTANT", CFG_CUSTOM, 0.05)
Input variable. A constant use to calculate the probability of density related disease.
virtual ~Rabbit_Female(void)
Rabbit_Female destructor.
The class to handle all predator population related matters.
virtual void Step(void)
The male rabbit step code.
CfgFloat cfg_RabbitPesticideResponse("RABBIT_PESTICDERESPONSETHRESHOLD", CFG_CUSTOM, 0.00001)
Input variable. The threshold above which a rabbit will be killed if it ingests pesticide.
int m_NoBurrows
Records the maintenence restricted current carrying capacity (burrow number)
virtual void EndStep(void)
The EndStep is the last 'part' of the timestep that an animal can behave in.
virtual Rabbit_Adult * GetMate(void)
Get mate pointer.
int m_Age
The rabbit's age.
void NetworkEvaluation(void)
Calculates and saves distance probabilities.
Rabbit_Adult * m_myMate
Pointer to the mate if any.
void JoinNOccupy(Rabbit_Adult *a_rabbit)
Adds this adult to the warren list and house them in a suitable burrow.
unsigned GetLiveArraySize(int a_listindex)
Gets the number of 'live' objects for a list index in the TheArray.
int g_rabbitexploredistance
int Supply_m_Location_x()
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.
virtual ~Rabbit_Juvenile(void)
Rabbit_Young destructor.
Used for creation of a new Rabbit object.
The basic information needed for an LE present in a warren area.
bool IsFreeMale(void)
Returns true if there is a male with a burrow and no mate.
double m_weight
The weight in g.
int m_BurrowsUnderConstruction
Records the burrows that are being dug.
vector< LocalWarrenNewtorkEntry > m_LocalWarrenNetwork
List of local warrens and their accessibility from this warren.
void NatalDispersalRecordOutput(Rabbit_Base *a_rabbit)
Records the natal dispersal.
virtual ~Rabbit_Warren()
Rabbit warren destructor.
virtual TTypeOfRabbitState st_Forage(void)
Adult male forage behaviour.
virtual TTypeOfRabbitState st_Gestating(void)
Female gestating state.
virtual ~Rabbit_Adult()
Rabbit_Adult destructor.
bool DEBUG_InternalTest2()
static CfgFloat cfg_rabbitminwarrensize("RABBIT_MINWARRENSIZE", CFG_CUSTOM, 2)
The minimum size of a warren.
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.
int m_maintenence
Warren maintenence score - if not max then houseing capacity is reduced.
virtual void st_Dying(void)
Default dying state.
void Update(void)
daily update of the memory
virtual bool ShouldMature(void)
Tests for maturation to the next stage.
CfgInt cfg_RabbitUseNatalDispersalRecordAge
Flag to denote using lifetime repro output file or not.
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.
static double m_maxForageHeight
The maximum vegetation height assumed for forage potential.
Rabbit_Female * m_Mum
Pointer to mum.
void CalcDisease()
Calculate the current disease mortality constant.
virtual ~Rabbit_Male(void)
Rabbit_Male destructor.
void OnEvicted(void)
Signals mum has a new litter to look after.
double m_CarryingCapacityR2
Records the max number of rabbits possible here divided by 2.
CfgFloat cfg_maxForageHeight("RABBIT_MAXFORAGEHEIGHT", CFG_CUSTOM, 30.0)
Input variable. The maximum height desirable for forage vegetation.
static double m_pesticidedegradationrate
State variable used to hold the daily degredation rate of the pesticide in the body.
double m_mortalitymultiplierA
a measure of mortality likelihood - adults
int GetCarryingCapacity()
Returns the carrying capacity in burrows.
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 ...
The landscape class containing all environmental and topographical data.
double m_forageP
Records the amount of pesticde as a mean concentration per unit area forage.
CfgBool l_pest_enable_pesticide_engine
Used to turn on or off the PPP functionality of ALMaSS.
int m_runningavCount
Keeps track of the number of breeding days.
TTypesOfRabbitHabitat ClassifyHabitat(TTypesOfLandscapeElement a_tole)
Classify a landscape element type according to the rabbit habitat classification.
virtual void GeneralEndocrineDisruptor(double)
Handles internal effects of endocrine distrupter pesticide exposure.
Rabbit_Population_Manager * m_NPM
Rabbit_Population_Manager pointer.
Rabbit_Young * m_rabbit
A pointer to a rabbit base - useful for extra information.
static double m_dispersalmortperm
The extra dispersal mortality per m travelled.
void RabbitProductionRecord(RabbitObjectTypes YoungType, int kits)
Stores data about production of rabbits throughout year.
void CreateObjects(RabbitObjectTypes ob_type, TAnimal *pvo, struct_Rabbit *a_data, int a_number)
Method for creating a new individual Rabbit.
double SupplyPesticide(int a_x, int a_y, PlantProtectionProducts a_ppp)
Gets total pesticide for a location.
TTypesOfRabbitSocialStatus GetSocialStatus(void)
Return the dominance status.
RabbitMemoryLocation GetBestLocation(void)
Get the best current location
void st_WarrenBeing(void)
The only warren behaviour - it just is.
CfgBool cfg_RabbitUseNatalDispersalRecord
Flag to denote using lifetime repro output file or not.
int GetDigging()
Get number of days to dig.
int SupplySimAreaHeight(void)
int GetAllBigFemaleRabbits()
Supplies the number of big rabbits currently in the warren.
void UpdatePesticide(void)
Updates the pesticide concentration in forage polygons.
virtual TTypeOfRabbitState st_Forage(void)
Adult female forage behaviour.
int SupplySimAreaWidth(void)
CfgFloat cfg_rabbitdendepscaler("RABBIT_DENSITYDEPSCALER", CFG_CUSTOM, 4.5)
Input variable. Average family size for calculating carrying capacity.
int CalcLitterSize(void)
Calculates the litter size at birth.
vector< int > m_AnnualLitters
The number of litters produced.
void Leave(Rabbit_Base *a_rabbit)
Remove this adult from the warren list.
virtual ~Rabbit_Base(void)
Rabbit destructor.
Bool configurator entry class.
int m_foragearea
Variable holding the total potential forage area.
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...
double GetGrowth(int a_age)
Get method for the rabbit growth with age.
RabbitObjectTypes m_RabbitType
The rabbits type.
The rabbit adult class. All generic adult behaviour is described here.
APoint m_born_location
The x,y location at birth.
Rabbit_Warren * m_myWarren
True if currently mated.
The base class for all ALMaSS animal classes.
virtual void Step(void)
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously...
void OnMateFinishedDigging(Rabbit_Adult *a_mate)
Action when a mate has finished digging a burrow.
virtual TTypeOfRabbitState st_EvaluateTerritory(void)
Male Evaluate Territory Step.
virtual void GeneralOrganoPhosphate(double)
Handles internal effects of organophosphate pesticide exposure.
int m_TL_x
Stores original m_Location_x.
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.
void SetDigging(int a_days)
Set number of days to dig.
vector< Rabbit_Base * > m_InhabitantsList
List of rabbits that live here - for easy communication purposes.
Rabbit_Warren * m_Warren
A pointer to the current warren.
static double m_minForageDigestability
The minimum vegetation digestability allowed for foraging.
TTypeOfRabbitState st_Develop(void)
Development state for young.
static double m_MinKitsNo
The minimum number of kits.
void SetSocialStatus(TTypesOfRabbitSocialStatus a_status)
Sets the dominance status.
void SetMate(Rabbit_Adult *a_mate)
Set/unset mate status.
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
int CalcPermForageArea(void)
Returns the total area of permanent forage.
int SupplyDayInYear(void)
TTypeOfRabbitState st_Forage(void)
Juvenile forage behaviour.
double GetCarryingCapacityRatio()
Checks whether all possible burrows are filled with rabbits. This is updated daily by Rabbit_Warren::...
CfgFloat cfg_dispersalmortperm("RABBIT_DISPERSALMORTPERM", CFG_CUSTOM, 0.0002)
Input variable. The additional mortality rate with distance for between warren dispersal.
int m_weightAge
A physiological age parameter, this is the growth age based on an optimal curve (if optimal condition...
TTypeOfRabbitState st_Develop()
Development state for young.
int m_TL_y
Stores original m_Location_y.
CfgInt cfg_rabbitdensitydependencedelay
Input variable. The period between recalculation of rabbit disease probability.
int m_MyTotalLitters
The number of litters produced.
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
CfgBool cfg_RabbitUseReproOutput
Flag to denote using lifetime repro output file or not.
TTypesOfPesticide SupplyPesticideType(void)
int m_lifespan
The rabbit's alloted lifespan.
void InitEvaluation(void)
Intiates the evaluation of the warren area.
int m_weightage
The rabbit age in terms of weight.
int m_runningavFemales
Keeps track of the number of breeding females.
int GetPopulationSize()
Gets the total warren population of rabbits.
virtual ~Rabbit_Young(void)
Rabbit_Young destructor.
double GetDailyMortalityChanceJ()
Returns the juvenile daily mortality multiplier.
virtual Rabbit_Adult * GetMate(void)
Get mate pointer.
Rabbit_Young * m_myLitter[20]
Holds the current young (for lactation)
int CalcForageArea(void)
Returns the total area of forage.
int GetAllBreedingFemaleRabbits()
Supplies the number of breeding rabbits currently in the warren.
TTypeOfRabbitState m_CurrentRState
Variable to record current behavioural state.
double GetDailyMortalityChanceA()
Returns the adult daily mortality multiplier.
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.
virtual void st_Dying(void)
Young dying state.
RabbitObjectTypes GetRabbitType(void)
Get rabbit type.
virtual void Step(void)
The female rabbit step code.
int m_breedingfemales
The number of females that bred this year.
int m_soiltype
Variable holding the soil type, 1 = heavy, 0 = sandy, 3 = unsuitable (never used in warrens)
void Mate(Rabbit_Adult *a_mate, RabbitObjectTypes rob_type)
Mate him with un-mated female/male with a burrow.
CfgFloat cfg_rabbitminkits("RABBIT_MINKITS", CFG_CUSTOM, 1.0)
The minimum number of kits in a litter.
bool m_lactating
Flag to indicate lactating.
bool m_pregnant
Flag to indicate pregnancy.
void Weaned(Rabbit_Young *a_young)
Message on weaning of a young.
void AddMemory(RabbitMemoryLocation a_mem)
Add a memory location.
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.
double SupplyVegHeight(int a_polyref)
bool MortalityTest(double a_prop)
A simple probability based test.
static CfgFloat cfg_litterabsorptionconstant("RABBIT_LITTERABSOPRTIONCONST", CFG_CUSTOM, 1.8)
Used to calculate the chance of litter reabsorption depending on forage conditions.
virtual TTypeOfRabbitState st_EvaluateTerritory(void)
Female Evaluate Territory Step.
TTypeOfRabbitState GetCurrentRState()
void ReproOutputRecordOutput(Rabbit_Female *a_female)
Print reproductive record to file.
int m_myLitterSize
Holds the current litter size.
double GetLitterReabsortionConst(void)
Returns litter reabsorption chance.
virtual void st_Dying(void)
Young dying state.
Integer configurator entry class.
int GetCoverArea(void)
Returns the total area of cover.
int GetCurrentStateNo()
Returns the current state number.
int m_size
Warren core size in m.
CfgFloat cfg_rabbitmaxkits("RABBIT_MAXKITS", CFG_CUSTOM, 9.6)
The maximum number of kits in a litter.
virtual void EndStep(void)
The EndStep is the last 'part' of the timestep that an animal can behave in.
RabbitMemory(void)
Rabbit Memory constructor.
int Supply_m_Location_y()
Double configurator entry class.
double CalcCarryingCapacityRatio2()
calculates the ratio of rabbits to the carrying capacity for the local area
A class to describe the rabbits warren system.
virtual bool ShouldMature(void)
Tests for maturation to the next stage.
virtual void Step()
Warren step code.
void ResetAllRabbitProductionRecord(void)
Reset data about production of rabbits throughout year.
void CalcCarryingCapacityRatio1()
calculates the ratio of rabbits to the carrying capacity
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.
void ChooseNewDominant(void)
Finds a subdominantfemale and promotes them to dominant.
double m_availableforage
Records the amount of forage currently available in the warren area as a proportion of what is the po...
Rabbit_Population_Manager * m_OurPopulationManager
This is a time saving pointer to the correct population manager object.
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.
Rabbit_Population_Manager * m_OurPopulationManager
This is a time saving pointer to the correct population manager object.
virtual TTypeOfRabbitState st_GiveBirth(void)
Female give birth state.
Rabbit_Warren * GetNetworkWarren(void)
Chooses a warren to evaluate based on distance.
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
bool m_FedToday
Flag for been fed today.
int m_NoOccupiedBurrows
Records the burrows that are occupied.
double m_CarryingCapacityR
Records the max number of rabbits possible here.
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.
bool GetForageDay()
Get method for the forage day flag.
double m_CarryingCapacityRatio
Records the ratio between carrying capacity and no rabbits in warren.
void Warn(std::string a_msg1, std::string a_msg2)
void OnMumDead(void)
Signals death of mum.
void OccupyNewBurrow()
a_rabbit occupies a newly dug burrow
void UpdateForageInformation(void)
Updates the forage information depending upon the vegetation state.
CfgInt cfg_rabbitdiggingtime("RABBIT_DIGGINGTIME", CFG_CUSTOM, 10)
Input variable. Minimum burrow construction time in days.
int m_littersthisyear
The number of litters produced this year.
int m_nonbreedingfemales
The number of females that did not breed this year but are older than 1 year.
int SupplyPolyRef(int a_x, int a_y)
void Join(Rabbit_Base *a_rabbit)
Adds this rabbit to the warren list.
TTypeOfRabbitState st_Explore(void)
Juvenile local exploration.
int m_CarryingCapacity
Records the max number of rabbit pairs possible here.
double m_pesticide_burden
State variable used to hold the current body-burden of pesticide.
long SupplyGlobalDate(void)
static double m_MaxKitsNo
The maximum number of kits.
TTypeOfRabbitState st_BecomeAdult(void)
Juvenile maturation.
virtual void st_Dying(void)
Female dying state.
The rabbit young class. All special young behaviour is described here.
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure - reimplemented from base class.
bool IsMember(Rabbit_Base *a_rabbit)
Returns true if this rabbit belongs to the warren.