ALMaSS Rabbit ODdox
1.1
The rabbit model description following ODdox protocol
|
Go to the documentation of this file.
301 bool WalkTo(
int a_x,
int a_y );
333 virtual void Step(
void);
363 virtual void Step(
void);
430 virtual void Step(
void );
452 virtual void Step(
void );
The information needed to hold a single rabbit memory.
The rabbit juvenile class. All special juvenile behaviour is described here.
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.
virtual void st_Dying(void)
Default dying state.
int m_MyOffspring
The total number of kits born to her.
bool m_haveBurrow
Flag to record burrow status.
void OnFed(void)
Signals food arrived today.
bool GetCarryingCapacityFilled()
Checks whether all possible burrows are filled with rabbits.
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?
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...
virtual void InternalPesticideHandlingAndResponse()
Handles internal effects of pesticide exposure - reimplemented from base class.
void UpdateThisYearsBreeders()
Calculates and stores the number of breeders and non-breeders.
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.
bool WalkTo(int a_x, int a_y)
Walks to a location from current location.
int GetThisYearsNonBreeders()
Returns the number of females not breeding this year but older than 1 year.
bool m_pesticideInfluenced1
Flag to indicate pesticide effects (e.g. can be used for endocrine distruptors with delayed effects u...
void SetAge(int a_age)
Set age method.
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.
void AddNetworkConnection(LocalWarrenNewtorkEntry a_LWNE)
Adds a warren to the local network list.
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.
APoint GetBornLocation()
Get location of birth.
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.
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.
int GetSoilType(void)
Gets the warren soil type.
vector< RabbitMemoryLocation > m_MyMemory
A list of memory locations.
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...
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
void OccupyBurrow()
a_rabbit occupies a free burrow
int GetRabbitProductionRecord(RabbitObjectTypes YoungType)
Get data about production of rabbits throughout year.
TTypeOfRabbitState m_CurrentRState
Variable to record current behavioural state.
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.
void SetweightAge(int a_age)
Set age method.
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.
Rabbit_Warren * GetWarren(void)
Get warren pointer.
int GetThisYears1yrOldFemales()
Returns the number of 1yr old females.
void JoinNOccupy(Rabbit_Adult *a_rabbit)
Adds this adult to the warren list and house them in a suitable burrow.
TTypesOfRabbitSocialStatus
A classification of rabbit habitat types. All landscape elements will be classified into one of the c...
Rabbit_Warren * m_aWarren
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.
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.
double Disease()
Supply the current disease mortality constant.
vector< LocalWarrenNewtorkEntry > m_LocalWarrenNetwork
List of local warrens and their accessibility from this warren.
double GetInvAvailableForage(void)
Returns the inverse of available forage realtive to rabbit numbers.
virtual ~Rabbit_Warren()
Rabbit warren destructor.
virtual TTypeOfRabbitState st_Forage(void)
Adult male forage behaviour.
virtual void Explore(void)
Exploration method.
virtual TTypeOfRabbitState st_Gestating(void)
Female gestating state.
virtual ~Rabbit_Adult()
Rabbit_Adult destructor.
bool DEBUG_InternalTest2()
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 GetForageArea(void)
Returns the total area of permanent forage.
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.
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.
int m_ThisYearsProduction[rob_foobar]
Storage for rabbit production data.
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.
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.
The landscape class containing all environmental and topographical data.
double GetThisYearsBreedersAv()
Returns the number of females breeding this year.
double m_forageP
Records the amount of pesticde as a mean concentration per unit area forage.
int m_runningavCount
Keeps track of the number of breeding days.
virtual void GeneralEndocrineDisruptor(double)
Handles internal effects of endocrine distrupter pesticide exposure.
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.
TTypesOfRabbitHabitat
A classification of rabbit habitat types. All landscape elements will be classified into one of the c...
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.
int GetDigging()
Get number of days to dig.
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 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.
int m_foragearea
Variable holding the total potential forage area.
double m_foragearearatio
Records the amount of forage currently available in the warren area as a proportion of total forage a...
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.
void SetDigging(int a_days)
Set number of days to dig.
double GetDiseaseConstant(void)
Returns the warrens current disease constant.
vector< Rabbit_Base * > m_InhabitantsList
List of rabbits that live here - for easy communication purposes.
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.
virtual void BeginStep()
Warren begin step code.
int CalcPermForageArea(void)
Returns the total area of permanent forage.
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::...
void SetMinKits(double a_num)
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.
virtual void EndStep(void)
The EndStep is the third 'part' of the timestep that an animal can behave in. It is called once per t...
int m_MyTotalLitters
The number of litters produced.
int m_lifespan
The rabbit's alloted lifespan.
void InitEvaluation(void)
Intiates the evaluation of the warren area.
int m_runningavFemales
Keeps track of the number of breeding females.
int GetPopulationSize()
Gets the total warren population of rabbits.
APoint GetPointTL()
Get the TL coords as a point.
virtual ~Rabbit_Young(void)
Rabbit_Young destructor.
double GetDailyMortalityChanceJ()
Returns the juvenile daily mortality multiplier.
TTypesOfRabbitHabitat m_torh
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 GetCCRabbitsR()
Records the number of big female rabbits for carrying capacity calculations.
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.
int GetThisYearsBreeders()
Returns the number of females breeding this year.
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.
bool m_lactating
Flag to indicate lactating.
bool m_pregnant
Flag to indicate pregnancy.
A class to describe the data held in a rabbit memory. Warren locations and quality.
virtual void GeneralEndocrineDisruptor(double)
Handles internal effects of endocrine distrupter pesticide exposure.
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.
void ResetRabbitProductionRecord(RabbitObjectTypes YoungType)
Reset specific data about production of rabbits throughout year.
bool MortalityTest(double a_prop)
A simple probability based test.
virtual TTypeOfRabbitState st_EvaluateTerritory(void)
Female Evaluate Territory Step.
TTypeOfRabbitState GetCurrentRState()
int m_myLitterSize
Holds the current litter size.
double GetLitterReabsortionConst(void)
Returns litter reabsorption chance.
virtual void st_Dying(void)
Young dying state.
int GetCoverArea(void)
Returns the total area of cover.
void SetMaxKits(double a_num)
int m_size
Warren core size in m.
int Get_TL_y()
Get m_TL_x.
An entry in the local warren network - a helper list of accessibly local warren locations.
virtual void EndStep(void)
The EndStep is the last 'part' of the timestep that an animal can behave in.
RabbitMemory(void)
Rabbit Memory constructor.
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 AddYoung(Rabbit_Young *a_young)
Add a young.
void CalcCarryingCapacityRatio1()
calculates the ratio of rabbits to the carrying capacity
The rabbit male class. All special male behaviour is described here.
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.
int Get_TL_x()
Get m_TL_x.
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.
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.
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.
virtual void Step(void)
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously...
double m_CarryingCapacityRatio
Records the ratio between carrying capacity and no rabbits in warren.
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.
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 GetLittersThisYear()
Returns the number litters produced in the last 12 months.
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.
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.
int GetAge(void)
Get age method.
int GetActiveBurrows()
Gets the number of occupied burrows.
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.