Goose Management Model ODdox
1.02
|
Go to the documentation of this file.
42 #define LE_SIG_NO_FUNGICIDE 0x0001
43 #define LE_SIG_NO_INSECTICIDE 0x0002
44 #define LE_SIG_NO_SYNG_INSECT 0x0004
45 #define LE_SIG_NO_GROWTH_REG 0x0008
46 #define LE_SIG_NO_MOLLUSC 0x0010
47 #define LE_SIG_NO_HERBICIDE 0x0020
54 #define EL_MAX_USERSPACE 10 // Has to be a #define.
57 #define EL_TRAMLINE_DECAYTIME (g_el_tramline_decaytime_days.value())
60 #define EL_HERBICIDE_DELAYTIME (g_el_herbicide_delaytime_days.value())
61 #define EL_STRIGLING_DELAYTIME (g_el_strigling_delaytime_days.value())
109 int GetSubType(
void ) {
return m_subtype; }
110 void SetSubType(
int a_subtype ) {
m_subtype = a_subtype; }
115 void Trace(
int a_value );
116 void ResetTrace(
void );
117 long GetRunNum(
void ) {
return m_running; }
125 GetVegType(
void ) {
return tov_None; }
127 void SetVegStore(
int a_veg )
130 int GetVegAge() {
return m_vegage; }
131 virtual void DoDevelopment(
void );
132 virtual void RecalculateBugsNStuff(
void ) { }
134 virtual double GetVegCover(
void) {
return 0.0; }
135 virtual double GetVegHeight(
void ) {
return 0.0; }
136 virtual APoint GetCentroid();
140 virtual double GetDigestability(
void ) {
return 0.0; }
141 virtual int GetVegDensity(
void ) {
return 0; }
142 virtual bool GetSkScrapes(
void ) {
return false; }
143 virtual bool IsMatureCereal() {
return false; }
144 virtual bool IsCereal() {
return false; }
145 virtual bool IsGrass() {
return false; }
146 virtual bool GetVegPatchy(
void) {
return false; }
148 virtual void SetVegPatchy(
bool ) { ;}
168 virtual void SetCropDataAll(
double,
double,
double,
double,
TTypesOfVegetation,
double,
double ,
int,
double ,
bool,
double) {;}
617 virtual void SetCropDataAll(
double,
double,
double,
double,
TTypesOfVegetation,
double,
double ,
int,
double ,
bool,
double);
619 virtual void SetVegParameters(
double a_veg_height,
double a_LAtotal,
double a_LAgreen,
double a_WeedBiomass) {
712 void RandomVegStartValues(
double *a_LAtotal,
double *a_LAgreen,
double *a_veg_height,
double *a_weed_biomass );
1310 #endif // ELEMENTS_H
int BackTranslateEleTypes(TTypesOfLandscapeElement EleReference)
int GetMDates(int a, int b)
virtual void ReduceVeg_Extended(double a_reduc)
void Set_CropDataStorage(int index, CropActualValues a_struct)
bool m_MaleNewtPresent
Flag for presence of a male newt.
void SetMaxOsmiaNests(double a_noNests)
Add an occupied nest.
TTypesOfVegetation GetLastSownVeg()
Returns the last vegetation type to be sown.
static double m_monthly_traffic[]
Used for birds that feed on grain on cereal fields 3% spill is expected.
Struct for storing actual data on crop type, area of a field it is grown in, biomass at harvest,...
void SetOwner(Farm *a_owner, int a_owner_num, int a_owner_index)
void SetOldDays(long a_days)
void SetMDates(int a, int b, int c)
virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int)
virtual PollenNectarQuality GetNectar()
virtual double GetGreenBiomass(void)
virtual void ForceGrowthInitialize(void)
double m_area
The element area in m2.
virtual void GrazeVegetationTotal(double)
void SetLastSownVeg(TTypesOfVegetation a_tov)
Records the last vegetation type to be sown.
PollenNectarQuality m_pollenquality
void UpdateOsmiaNesting()
Recalculate the nest finding probability.
virtual void DoDevelopment(void)
virtual int GetVegPhase()
bool SubtractLarvalFood(double a_food)
Called by a larva when feeding, removes an age specific amount of larval food
virtual bool GetVegPatchy(void)
void SetPoison(bool a_poison)
void Set_taken(bool a_taken, int index)
bool GetStubble()
Return the in stubble flag.
int m_gooseNos[366]
The number of geese each day.
virtual double GetDeadBiomass(void)
virtual void StoreLAItotal()
virtual double GetDayDegrees(void)
Variable used to record the current grazing pressure by e.g. voles */ double m_volegrazing; /**.
void CalcLarvalFood()
Calculates the amount of larval food present
Ponds are defined as freshwater bodies between 25m2 and 5000m2. For newts the effective size is limit...
int GetPoly(void)
Returns the polyref number for this polygon.
void SetGooseNosTimed(int a_number, int a_day)
double m_total_biomass_old
bool Get_taken(int index)
double m_force_veg_height
int m_currentOsmiaNests
to record the number of actual osmia nests
virtual void ForceGrowthTest(void)
String configurator entry class.
virtual void ForceGrowthTest(void)
PollenNectarDevelopmentCurve * m_pollencurve
pointer to the correct pollen curve set
void SetGooseSpNos(int a_number, int a_day, GooseSpecies a_goose)
void SetSoilType(int a_st)
virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int)
void SetBorder(LE *a_border)
virtual void DoDevelopment(void)
virtual void SetGrowthPhase(int a_phase)
void SetCountryDesignation(int a_designation)
int m_openness
The openness metric for a field (if any)
int GetGooseNos()
For goose model functionality, returns the number of geese yesterday.
void ResetingVeg(int a_today)
void SetTramlinesDecay(int a_decaytime_days)
bool IsMaleNewtPresent()
Gets whether there is a male newt as present.
TTypesOfVegetation GetPreviousCrop(int a_index)
virtual double GetInsectPop(void)
virtual bool IsMaleNewtPresent()
Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic cast...
virtual void ResetDigestability()
sets growth record to zero
virtual void ReduceVeg_Extended(double)
virtual void GrazeVegetationTotal(double a_grams)
void Set_area_in_crop_data(double a_area)
virtual TTypesOfVegetation GetVegType(void)
virtual double GetInsectPop(void)
bool m_forced_phase_shift
double m_LarvalFood
The amount of larval food present
static double m_largeroad_load[]
void RandomVegStartValues(double *a_LAtotal, double *a_LAgreen, double *a_veg_height, double *a_weed_biomass)
TTypesOfVegetation m_vege_type
virtual void DoDevelopment(void)
virtual void DoDevelopment(void)
virtual void SetInsectPop(double)
void SetUnsprayedMarginPolyRef(int a_unsprayedmargin)
void ResetGeese(void)
Reset geese numbers to zero in case this was not done by the population manager (the normal situation...
virtual void DoDevelopment(void)
virtual int GetVegDensity(void)
void Add_missed_herb_app()
bool GetOsmiaNest()
Test to see if a nest is found.
CfgInt g_el_strigling_delaytime_days
virtual double GetVegCover(void)
virtual double GetVegBiomass(void)
bool Get_harvested(int index)
int IsRecentlySprayed(void)
virtual void SetVegHeight(double)
virtual double GetDeadBiomass(void)
virtual void TogglePigGrazing(void)
void SetOpenness(int a_openness)
Records the openness statistic for this polygon.
void Cutting(int a_today)
void ForceGrowthSpringTest(void)
double m_birdmaizeforage
The maize forage present in KJ/m2.
long m_management_loop_detect_date
double m_pondpesticide
Holds the pesticide content per unit pond water.
virtual void SetMaleNewtPresent(bool a_ispresent)
Sets a male as present/absent.
virtual double GetWeedBiomass(void)
virtual void Insecticide(double a_fraction)
TTypesOfLandscapeElement TranslateEleTypes(int EleReference)
static double m_smallroad_load[]
void SetSprayedToday(bool a_didit)
BuiltUpWithParkland(void)
void PollenNectarPhenologyCalculation()
This methods calculates the daily availability of pollen and nectar per square meter and in total.
virtual bool IsGooseGrass()
The landscape class containing all environmental and topographical data.
void AddArea(double a_area_diff)
int m_almass_le_type
This holds the ALMaSS element type reference number.
virtual double GetLAGreen(void)
virtual void DoDevelopment(void)
virtual void DoDevelopment(void)
vector< int > m_lasttreat
double m_birdseedforage
The grain forage present in KJ/m2.
int GetOpenness(void)
For goose model functionality, openness score for the polygon.
void SetRotIndex(int a_index)
int m_default_grazing_level
void IncOsmiaNesting()
Add an occupied nest.
void Cutting(int a_today)
bool m_skylarkscrapes
For management testing of skylark scrapes.
virtual ~VegElement(void)
double m_OsmiaNestProb
to record the chance of osmia nesting
virtual void SetCropDataAll(double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
virtual void InsectMortality(double a_fraction)
void Clean_CropDataStorage(int index)
Bool configurator entry class.
int GetGooseNosTodayTimed()
For goose model functionality, returns the number of geese today at a predefined time.
double m_goosegrazingforage[gs_foobar]
The grazing forage present in KJ/min. The last value indicates cereal 1 or not -1.
int m_maxOsmiaNests
to record the number of possible osmia nests
class Landscape * g_landscape_p
void SetMownDecay(int a_decaytime_days)
virtual void ReduceVeg(double)
double m_pondquality
a factor used to alter the pond qualities (default behaviour is random 0.0-1.0)
virtual double GetTrafficLoad(void)
int GetGooseNosToday()
For goose model functionality, returns the number of geese today.
int GetGooseRoostDist(GooseSpecies a_goose)
For goose model functionality, returns the distance to closest roost.
virtual void DoDevelopment(void)
CfgInt g_el_herbicide_delaytime_days
virtual double GetVegHeight(void)
virtual void ForceGrowthDevelopment(void)
UnsprayedFieldMargin(void)
double SupplyPondPesticide()
supply the current pesticide concentration per litre
CropActualValues m_CropDataStorage[2]
Keeps data on pesticide applications, biomass at harvest etc. Data for maximum two crops can be store...
int GetLastTreatment(int *a_index)
double m_LarvalFoodScaler
The proportion of larval food per m2
virtual void ResetDigestability()
sets growth record to zero in descendent classes
virtual void SetInsectPop(double insects)
virtual void SetVegType(TTypesOfVegetation a_vege_type, TTypesOfVegetation a_weed_type)
A standard class to contain a pollen or nectar curve based on indexed rates.
virtual void ForceGrowthDevelopment(void)
TTypesOfVegetation m_lastsownvegtype
Records the last vegegetation type that was sown on the element.
int GetCattleGrazing(void)
void SetPesticideCell(int a_cell)
void Set_tov_type(TTypesOfVegetation a_tov_type, int index)
static CfgBool l_el_read_bug_percentage_file("ELEM_READ_BUG_PERCENTAGE_FILE", CFG_CUSTOM, false)
TTypesOfVegetation tov_type
virtual double GetLATotal(void)
virtual bool GetSkScrapes(void)
virtual void DoDevelopment(void)
int m_gooseSpNos[366][gs_foobar]
The number of geese of each species each day.
int m_days_since_insecticide_spray
virtual void DoDevelopment(void)
virtual void StoreLAItotal()
virtual double GetTrafficLoad(void)
virtual bool IsMatureCereal()
CfgInt g_el_tramline_decaytime_days
double biomass_at_harvest
int m_farmfunc_tried_to_do
virtual void InsectMortality(double)
CropActualValues Get_CropDataStorage(int index)
virtual void ToggleCattleGrazing(void)
virtual void DoDevelopment(void)
void SetValidXY(int a_valid_x, int a_valid_y)
void SetMapValid(bool a_valid)
TTypesOfVegetation TranslateVegTypes(int VegReference)
virtual double GetGreenBiomass(void)
virtual ~GreenElement(void)
virtual void ReduceWeedBiomass(double)
void Cutting(int a_today)
virtual void SetVegHeight(double a_veg_height)
void SetGooseSpNosTimed(int a_number, int a_day, GooseSpecies a_goose)
virtual void DoDevelopment()
void SetStubble(bool a_flag)
Sets the in stubble flag.
void SetPollenNectarData(int a_almasstype)
sets the pollen and nectar information
int GetGooseSpNosTodayTimed(GooseSpecies a_goose)
For goose model functionality, returns the number of geese per species yesterday at a predefined time...
virtual void TogglePigGrazing(void)
void SetGooseNos(int a_number, int a_day)
virtual double GetTotalPollen()
virtual void GrazeVeg_Extended(double)
void SetBirdMaize(double a_forage)
void SetHigh(bool a_high)
void SetCopyTreatment(int a_treatment)
virtual void DoDevelopment(void)
void SetPollenNectarCurves(PollenNectarDevelopmentCurve *a_pollencurnve, PollenNectarDevelopmentCurve *a_nectarcurve)
Set method for pollen and nectar curves.
virtual double GetVegBiomass(void)
virtual void ReduceVeg(double a_reduc)
void SetLastTreatment(int a_treatment)
virtual void GrazeVegetation(double, bool)
Integer configurator entry class.
void Set_biomass_at_harvest(double a_biomass, int index)
virtual void SetVegParameters(double a_veg_height, double a_LAtotal, double a_LAgreen, double a_WeedBiomass)
virtual void SetVegBiomass(int)
The base class for all farm types.
virtual void SetVegPatchy(bool p)
virtual double GetTrafficLoad(void)
PermPastureLowYield(void)
int GetGooseSpNosToday(GooseSpecies a_goose)
For goose model functionality, returns the number of geese per species yesterday.
void DoCopy(const LE *a_Le)
a copy function to be used because a copy constuctor won't work
virtual void RecalculateBugsNStuff(void)
This method is responsible for.
virtual void DoDevelopment(void)
virtual void DoDevelopment()
int m_gooseNosTimed[366]
The number of geese at a predefined time per day.
virtual void SetCropDataAll(double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
static CfgStr l_el_bug_percentage_file("ELEM_BUG_PERCENTAGE_FILE", CFG_CUSTOM,"bugpercents.txt")
void SetBirdSeed(double a_forage)
int GetCountryDesignation(void)
int m_gooseSpNosTimed[366][gs_foobar]
The number of geese of each species at a predefined time per day.
virtual void SetGrowthPhase(int)
int GetUnsprayedMarginPolyRef(void)
virtual double GetDigestability(void)
PollenNectarDevelopmentCurve * m_nectarcurve
pointer to the correct nectar curve set
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
A random number generator (0-1)
void SetArea(double a_area)
PermPastureTussocky(void)
void SetGooseRoostDist(int a_dist, GooseSpecies a_goose)
double GetGooseGrazingForage(GooseSpecies a_goose)
virtual void ZeroVeg(void)
virtual void ZeroVeg(void)
virtual double GetWeedBiomass(void)
void SetHerbicideDelay(int a_decaytime_days)
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
virtual PollenNectarQuality GetPollen()
virtual void DoDevelopment(void)
virtual double GetLATotal(void)
double GetBirdMaize(void)
double m_oldnewgrowth[32]
virtual double GetTotalNectar()
bool m_sprayedtoday
flag to indicate an overspray situation
double m_dist_to_closest_roost[gs_foobar]
An array holding the distance to the nearest goose roost.
class LE_TypeClass * g_letype
virtual void GrazeVegetation(double a_grams, bool a_force)
virtual void Insecticide(double)
double GetVegDDegs()
Get the total of day degrees for the crop/veg on this element.
void ReleaseOsmiaNest()
Test to see if a nest is found.
void SetMConstants(int a, int c)
int m_poly
The polyref number for this polygon.
virtual void ToggleCattleGrazing(void)
virtual void SetMaleNewtPresent(bool)
Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic cast...
void CalcGooseForageResources()
Calculates spilled grain and grazing forage resources for geese.
virtual void DoDevelopment(void)
virtual void ForceGrowthInitialize(void)
int VegTypeToCurveNum(TTypesOfVegetation VegReference)
bool m_instubble
A flag describing the state of the field from a visual perspective - will be in stubble following a c...
void SetMapIndex(int a_map_index)
void CalcPondPesticide()
Calculates the amount of pesticide per unit pond water
virtual double GetLAGreen(void)
virtual void SetVegType(TTypesOfVegetation, TTypesOfVegetation)
virtual void ReduceWeedBiomass(double a_fraction)
void ReadBugPercentageFile(void)
virtual TTypesOfVegetation GetPreviousCrop(int)
int GetQuarryNos()
For goose model functionality, returns the number of geese yesterday which can be hunted as legal qua...
int m_unsprayedmarginpolyref
long m_management_loop_detect_count
virtual void DoDevelopment()
virtual void DoDevelopment(void)
virtual void SetVegParameters(double, double, double, double)
bool IsRecentlyMown(void)
PollenNectarQuality m_nectarquality
TTypesOfLandscapeElement m_type