Goose Management Model ODdox
1.02
|
Go to the documentation of this file.
379 virtual void Step(
void);
490 double MaxRate = 0.0;
491 if (a_grain > MaxRate) {
495 else if (a_maize > MaxRate) {
499 else if (a_grass > MaxRate) {
508 MaxRate *= a_interferenceComp;
537 double MaxRate = 0.0;
538 if (a_grain > MaxRate) {
541 if (a_maize > MaxRate) {
544 if (a_grass > MaxRate) {
652 void On_Bang(
int a_polyid,
double a_scare );
667 void FlyTo(
int a_x,
int a_y );
671 void FlyTo( APoint a_pt );
double GetMaxIntakeRate(double a_grain, double a_maize, double a_grass)
Returns the max intake rate of the three different types of intake.
bool m_LeavingRoost
Flag to indicate that we are coming from the roost. Used to control code for "following".
double GetDailyEnergyBudget()
Returns the daily energy budget.
double m_energyToday
The bird's daily energy account (kJ)
int m_FlightNumber
Counter for the number of flights per day.
double GetFlightCost()
Get the flight costs per m per g.
TTypeOfGoose_BaseState st_Roost()
Roosting until next forage or next morning.
int m_myForageIndex
Temporary storage for a forage location index - this is a speed optimisation.
double m_DEB
The daily energy budget excluding flying (kJ)
virtual void On_Emigrate()
Cause the bird to immediately transition to Emigrate.
static double m_GooseLeavingThreshold
The trigger for leaving as a 5 day average of body condition.
int m_groupsize
The size of the group this bird represents.
double m_LeaveRoostTime
Controls the time when the goose will leave the roost.
bool GetSex()
Returns the sex.
int GetForagingTime(int a_EndForagingTime, double a_RoostLeaveTime)
Returns the time spent foraging.
int GetGroupsize()
Returns the groupsize.
void On_MoveTo(int a_x, int a_y)
The goose is moved to the location specified by a_x, a_y - caused by group decision.
static double m_GooseFieldForageDist[gs_foobar]
The maximum distance travelled from roost to forage sites for each species of goose (m)
static double m_GooseFattoKJConversion
Conversion rate fat to kJ.
int GetFlightDistance()
Returns the total daily distance flown.
double m_BodyCondition[5]
A variable describing current body condition over the past 5 days.
double GetDailyEnergyExpenditure()
Returns the daily energy expenditure.
TTypeOfGoose_BaseState st_ChooseForageLocation(void)
Selects a forage location based on past memory, or initiates an exploration.
static double m_GooseMaxEnergyReserveProportion
Max proportion of weight that can be energy reserve.
void Set_GooseMinForageOpenness(double a_cost)
Set the min forage openess for all geese.
double GetBodyCondition()
Returns the current body condition.
virtual void Step(void)
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously...
void SubtractBodyCondition(double a_condition)
Alters body conditon by subtraction of a double value.
void ReInit(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
ReInit for object pool.
virtual void ChangeRoost()
Find the closest roost.
int GetMaxAppetiteHitTime()
Returns m_DailyMaxAppetiteHitTime.
static double m_SnowDepth
The current snow depth. Held here for speed optimization.
double GetTotalWeight()
Returns the weight of the bird.
TTypesOfVegetation m_veg
The vegetation type.
double GetRoostLeaveTime()
Returns the time when the goose leaves the roost.
double AdjustIntakeRateToSnowDepth(double a_intakerate)
When there is snow, the intake rate is decreased by 10 % per cm of snow.
void Set_Indivmingooseforagerate(double a_cost)
Set the mimimum tolerated forage rate for the individual goose.
void Set_mingooseforagerate(double a_cost, GooseSpecies a_species)
Set the mimimum tolerated forage rate for all geese.
int m_DailyMaxAppetiteHitTime
The time of day when m_DailyMaxAppetite was hit.
int m_myMemPolyID
Temporary storage for a memory location polygon id.
static double m_GooseMaxAppetiteScaler
Scaler to determine the max kJ possible to eat per day based on non-energy reserve weight.
static double m_GooseForageDistX2[gs_foobar]
Double the maximum distance travelled from roost to forage sites for each species of goose (m) - this...
The landscape class containing all environmental and topographical data.
void SetBodyCondition(double a_condition, unsigned a_index)
Sets the current body condition.
virtual void BeginStep(void)
The BeginStep is the first 'part' of the timestep that an animal can behave in. It is called once per...
TTypeOfMaxIntakeSource m_maxintakesource
The intake source which gave the maximum intake.
bool m_iscereal
Flag for whether the intake source is a cereal.
void Set_GooseFieldForageDist(double sp1, double sp2, double sp3)
Set the max forage distance from a field for all geese.
GooseSpecies m_myspecies
Holds goose species.
int m_FlightDistance
Storage for the total distance flown per day.
bool m_instubble
Flag to indicate if the intake source was in stubble.
double GetGooseMinForageRate(GooseSpecies a_species)
Returns the minimum forage rate for the species.
double m_DailyMaxAppetite
The daily max kJ possible to get as intake.
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Intitialise object.
void Set_GooseMaxEnergyReserveProportion(double a_prop)
Set the maximum energy reserve proportion allowed for all geese.
TMaxIntakeSource GetMaxIntakeSource()
Supply the current max intake source.
GooseSpecies GetSpecies()
Returns the species.
static double m_GooseKJtoFatConversion
Conversion rate kJ to fat.
TTypeOfGoose_BaseState CurrentGState
Variable to record current behavioural state.
int m_forageLocCount
The number of forage locations visited today.
void st_Dying(void)
Behavioural state dying.
static double m_GooseForageDist[gs_foobar]
The maximum distance travelled from roost to forage sites for each species of goose (m)
void Set_GooseForageDist(double sp1, double sp2, double sp3)
Set the max forage distance from roost for all geese.
GooseMemoryMap * m_MyMemory
The Goose Memory.
The class to handle all goose population related matters.
void On_Migrate(TTypeOfLeaveReason a_leavereason)
The goose is told to leave the simulation area (poss due to bad weather)
double GetMaxForageRate(double a_grain, double a_maize, double a_grass, double a_interferenceComp, bool a_iscereal, TTypesOfVegetation a_veg, bool a_stubble, TTypesOfVegetation a_prevcrop)
Returns the max forage rate of the three different types of forage The max rate is adjusted according...
double ScaleForageToGroupsize(double a_forage)
Scales forage to groupsize.
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...
TTypesOfVegetation m_prevsowncrop
The previous sown crop on the forage location.
void Set_GooseLeavingRoost(bool a_leaving)
Set the flag to indicate if we are coming from the roost.
static int m_followinglikelyhood[(int) gst_foobar]
An attribute used to determine the chance of following or exploring when foraging.
void SetSex(bool a_sex)
Sets the sex.
TMaxIntakeSource m_MaxIntakeSource
Holds information about the food source which gave max intake rate.
void FlyTo(int a_x, int a_y)
The goose flys to the location specified by a_x, a_y.
double m_BMR
The daily BMR.
void EvaluateForageToHopLoc(APoint a_HopLoc)
Do a forage evaluation from current location to a_HopLoc.
unsigned m_BodyConditionCounter
A counter for the daily body condition.
void On_Bang(int a_polyid)
The goose is scared by a bang at location.
double m_Indivmingooseforagerate
The minimum tolerable forage rate in kJ/minute for the individual.
virtual TTypeOfGoose_BaseState st_ToRoost()
Return to roost and assess whether to forage again that day.
bool m_sex
Sex of bird, true = male false = female.
static double m_GooseMinForageOpenness
The minimum openness value a goose will tolerate for forage.
int GetForageLocIndex()
Gets for the forage location index.
A class to describe the goose base.
double m_TheBodyCondition
A variable describing current body condition averaged over 5 days.
virtual APoint ChooseHopLoc()
Pick a hop location point within a_dist meters - must be overridden by descendent classes.
void Explore()
Behavioural exploration of the area to find forage.
virtual ~Goose_Base()
Goose_Base destructor.
void Set_GooseFattoKJConversion(double a_cost)
Set the fat to kJ conversion constant for all geese.
TTypeOfGoose_BaseState st_Forage()
Behavioural forage.
GooseSpeciesType m_myGooseSpeciesType
Holds the goose species type.
void Set_GooseKJtoFatConversion(double a_cost)
Set the kJ to fat conversion constant for all geese.
Goose_Population_Manager * m_OurPopulationManager
This is a time saving pointer to the correct population manager object.
static double m_GooseFieldForageDistX2[gs_foobar]
Double the maximum distance travelled from roost to forage sites for each species of goose (m) - this...
void AddBodyCondition(double a_condition)
Alters body conditon by addition of a double value.
virtual void KillThis()
The bird is dead of some external cause.
static double m_mingooseforagerate[gs_foobar]
The minimum tolerable forage rate in kJ/minute for the species.
void Set_GooseMaxAppetiteScaler(double a_cost)
Set the goose appetite scale used to calculate max intake for all geese.
int GetFlightNumber()
Returns the total daily number of flights.
void SetFlightCost(double a_cost)
Set the flight cost per m per g.
void Set_GooseLeavingThreshold(double a_threshold)
Set the body condition threshold for leaving for all geese.
double m_weightTotal
The weight of the bird in g including fat reserve.
virtual void StartDay(void)
Do any 'housekeeping' associated with the start of day.
APoint GetRoost()
Supply roost coords.
APoint m_MyRoost
The current roost location.
double m_energyReserve
The bird's energy reserves in grams.
double m_weight
The weight of the bird in gram excluding fat reserve.
Goose_Base(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Goose_Base constructor.
static double m_flightcost
The cost of flight per g per m in kJ.
void Set_GooseFollowingLikelyhood(int a_likelyhood, GooseSpeciesType a_speciestype)
Set the followinglikelyhood.
The class describing both local and seasonal goose memories and cognition.