40 #define LE_SIG_NO_FUNGICIDE 0x0001 41 #define LE_SIG_NO_INSECTICIDE 0x0002 42 #define LE_SIG_NO_SYNG_INSECT 0x0004 43 #define LE_SIG_NO_GROWTH_REG 0x0008 44 #define LE_SIG_NO_MOLLUSC 0x0010 45 #define LE_SIG_NO_HERBICIDE 0x0020 52 #define EL_MAX_USERSPACE 10 // Has to be a #define. 55 #define EL_TRAMLINE_DECAYTIME (g_el_tramline_decaytime_days.value()) 58 #define EL_HERBICIDE_DELAYTIME (g_el_herbicide_delaytime_days.value()) 59 #define EL_STRIGLING_DELAYTIME (g_el_strigling_delaytime_days.value()) 115 void Trace(
int a_value );
116 void ResetTrace(
void );
128 { m_vege_danger_store = a_veg; }
131 virtual void DoDevelopment(
void );
136 virtual APoint GetCentroid();
139 virtual void SetCentroid(
int x,
int y) { m_centroidx=x; m_centroidy=y; }
168 virtual void SetCropDataAll(
double,
double,
double,
double,
TTypesOfVegetation,
double,
double ,
int,
double ,
bool,
double) {;}
181 void SetPoison(
bool a_poison ) { m_poison = a_poison; }
191 void SetMapIndex(
int a_map_index ) { m_map_index = a_map_index; }
194 int GetLastTreatment(
int *a_index );
199 return m_birdseedforage;
202 m_birdseedforage = a_forage;
205 return m_birdmaizeforage;
208 m_birdmaizeforage = a_forage;
216 m_owner_file = a_owner_num;
217 m_owner_index = a_owner_index;
219 void SetHigh(
bool a_high ) { m_high = a_high; }
220 void SetPoly(
int a_poly ) { m_poly = a_poly; }
223 void SetArea(
double a_area ) { m_area = a_area; }
288 m_lastsownvegtype = a_tov;
294 return m_lastsownvegtype;
296 void SetLastTreatment(
int a_treatment);
299 void SetCopyTreatment(
int a_treatment);
305 { m_tramlinesdecay = a_decaytime_days; }
307 { m_herbicidedelay = a_decaytime_days; }
309 { m_mowndecay = a_decaytime_days; }
310 void AddArea(
double a_area_diff ) { m_area += a_area_diff; }
321 m_valid_x = a_valid_x;
322 m_valid_y = a_valid_y;
346 void SetGooseNos(
int a_number,
int a_day) { m_gooseNos[a_day] = a_number; }
349 m_gooseSpNos[a_day][a_goose] = a_number;
355 m_gooseSpNosTimed[a_day][a_goose] = a_number;
358 int GetGooseNosToday();
360 int GetGooseNosTodayTimed();
364 int GetGooseSpNosToday(GooseSpecies a_goose);
366 int GetGooseSpNosTodayTimed(GooseSpecies a_goose);
372 void DoCopy(
const LE* a_Le);
376 virtual bool IsMaleNewtPresent() {
return false; };
432 int m_gooseSpNos[366][gs_foobar];
434 int m_gooseNosTimed[366];
436 int m_gooseSpNosTimed[366][gs_foobar];
442 double m_goosegrazingforage[ gs_foobar ];
462 static double m_monthly_traffic[];
463 static double m_largeroad_load[];
464 static double m_smallroad_load[];
491 virtual void DoDevelopment(
void );
493 void ResetGeese(
void );
512 m_insect_pop *= a_fraction;
513 m_days_since_insecticide_spray=28;
515 virtual bool IsCereal();
516 virtual bool IsMatureCereal();
517 virtual bool IsMaize();
518 virtual bool IsGrass();
519 virtual bool IsGooseGrass();
520 virtual void InsectMortality(
double a_fraction);
523 m_weed_biomass *= a_fraction;
525 virtual void ToggleCattleGrazing(
void) {
if (m_cattle_grazing == 0) m_cattle_grazing = m_default_grazing_level;
else m_cattle_grazing = 0;; }
528 virtual void GrazeVegetation(
double a_grams,
bool a_force );
530 virtual void GrazeVegetationTotal(
double a_grams);
538 m_vege_type = a_vege_type;
542 if (a_weed_type!=
tov_Undefined) m_weed_curve_num = a_weed_type;
545 virtual void SetCropDataAll(
double,
double,
double,
double,
TTypesOfVegetation,
double,
double ,
int,
double ,
bool,
double);
546 virtual void SetVegHeight(
double a_veg_height) { m_veg_height = a_veg_height; }
547 virtual void SetVegParameters(
double a_veg_height,
double a_LAtotal,
double a_LAgreen,
double a_WeedBiomass)
549 m_veg_height = a_veg_height;
550 m_LAtotal = a_LAtotal;
551 m_LAgreen = a_LAgreen;
552 m_weed_biomass = a_WeedBiomass;
555 virtual void SetGrowthPhase(
int a_phase );
557 virtual void ForceGrowthInitialize(
void );
558 virtual void ForceGrowthTest(
void );
559 virtual void ForceGrowthDevelopment(
void );
560 virtual void ZeroVeg(
void );
561 virtual void ReduceVeg(
double a_reduc);
562 virtual void ReduceVeg_Extended(
double a_reduc);
566 void Set_taken(
bool a_taken,
int index){m_CropDataStorage[index].taken = a_taken;};
567 bool Get_taken(
int index){
return m_CropDataStorage[index].taken;};
594 void Clean_CropDataStorage(
int index);
599 for (
int i = 0; i<32; i++) m_oldnewgrowth[i] = 0.0;
625 double m_oldnewgrowth[32];
634 void ReadBugPercentageFile(
void );
635 virtual void RecalculateBugsNStuff(
void );
636 void RandomVegStartValues(
double *a_LAtotal,
double *a_LAgreen,
double *a_veg_height,
double *a_weed_biomass );
637 void ForceGrowthSpringTest(
void );
652 virtual void DoDevelopment(
void );
704 virtual void DoDevelopment(
void );
712 virtual void DoDevelopment(
void );
719 void Cutting(
int a_today);
726 virtual void DoDevelopment(
void );
733 virtual void DoDevelopment(
void );
741 virtual void DoDevelopment(
void );
782 virtual void DoDevelopment();
789 virtual void DoDevelopment();
796 virtual void DoDevelopment();
809 virtual void DoDevelopment(
void );
905 void Cutting(
int a_today);
912 virtual void DoDevelopment(
void );
923 virtual void DoDevelopment(
void );
928 void Cutting(
int a_today);
936 virtual void DoDevelopment(
void );
1097 virtual void DoDevelopment(
void);
1099 void CalcPondPesticide();
1101 void CalcLarvalFood();
1103 bool SubtractLarvalFood(
double a_food);
1139 virtual double GetTrafficLoad(
void );
1148 virtual double GetTrafficLoad(
void );
1189 #endif // ELEMENTS_H
virtual void GrazeVegetationTotal(double)
int VegTypeToCurveNum(TTypesOfVegetation VegReference)
void SetElementType(int a_type)
virtual void SetMaleNewtPresent(bool)
Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic cast...
static CfgBool l_el_read_bug_percentage_file("ELEM_READ_BUG_PERCENTAGE_FILE", CFG_CUSTOM, false)
virtual bool IsMatureCereal()
CfgInt g_el_herbicide_delaytime_days
virtual void SetCentroid(int x, int y)
The landscape class containing all environmental and topographical data.
int VegTypeToCurveNum(TTypesOfVegetation VegReference)
bool m_sprayedtoday
flag to indicate an overspray situation
int m_unsprayedmarginpolyref
int BackTranslateEleTypes(TTypesOfLandscapeElement EleReference)
bool IsMaleNewtPresent()
Gets whether there is a male newt as present.
class LE_TypeClass * g_letype
CfgInt g_el_tramline_decaytime_days
bool IsRecentlyMown(void)
virtual void ResetDigestability()
sets growth record to zero
virtual void SetInsectPop(double insects)
int GetUnsprayedMarginPolyRef(void)
virtual double GetVegHeight(void)
double m_birdmaizeforage
The maize forage present in KJ/m2.
virtual double GetVegCover(void)
virtual void StoreLAItotal()
virtual void DoDevelopment(void)
virtual void SetInsectPop(double)
void SetTramlinesDecay(int a_decaytime_days)
int GetPoly(void)
Returns the polyref number for this polygon.
virtual TTypesOfVegetation GetPreviousCrop(int)
virtual void SetVegType(TTypesOfVegetation, TTypesOfVegetation)
virtual void DoDevelopment(void)
virtual int GetCentroidY()
double GetBirdMaize(void)
void Set_tov_type(TTypesOfVegetation a_tov_type, int index)
virtual void ToggleCattleGrazing(void)
virtual void SetVegParameters(double, double, double, double)
bool m_MaleNewtPresent
Flag for presence of a male newt.
void SetRotIndex(int a_index)
virtual double GetLAGreen(void)
virtual double GetDeadBiomass(void)
virtual void TogglePigGrazing(void)
virtual void ReduceWeedBiomass(double a_fraction)
int m_default_grazing_level
virtual double GetLATotal(void)
void SetPoison(bool a_poison)
virtual void ForceGrowthTest(void)
void SetOldDays(long a_days)
void SetOwner(Farm *a_owner, int a_owner_num, int a_owner_index)
double m_LarvalFood
The amount of larval food present.
Integer configurator entry class.
double m_pondpesticide
Holds the pesticide content per unit pond water.
virtual void TogglePigGrazing(void)
virtual double GetDayDegrees(void)
void SetGooseSpNos(int a_number, int a_day, GooseSpecies a_goose)
virtual void SetMaleNewtPresent(bool a_ispresent)
Sets a male as present/absent.
void SetGooseNosTimed(int a_number, int a_day)
virtual ~GreenElement(void)
virtual double GetLAGreen(void)
virtual double GetDigestability(void)
virtual void SetVegPatchy(bool p)
virtual ~VegElement(void)
virtual double GetVegHeight(void)
void SetUnsprayedMarginPolyRef(int a_unsprayedmargin)
virtual double GetVegBiomass(void)
virtual bool GetVegPatchy(void)
virtual int GetVegPhase(void)
virtual void SetVegPatchy(bool)
static CfgStr l_el_bug_percentage_file("ELEM_BUG_PERCENTAGE_FILE", CFG_CUSTOM,"bugpercents.txt")
long m_management_loop_detect_date
virtual double GetWeedBiomass(void)
long GetMgtLoopDetectCount(void)
int GetCattleGrazing(void)
TTypesOfVegetation m_lastsownvegtype
Records the last vegegetation type that was sown on the element.
virtual bool GetSkScrapes(void)
void SetSprayedToday(bool a_didit)
void SetMownDecay(int a_decaytime_days)
void SetLastSownVeg(TTypesOfVegetation a_tov)
Records the last vegetation type to be sown.
int IsRecentlySprayed(void)
virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int)
int m_almass_le_type
This holds the ALMaSS element type reference number.
void SetBorder(LE *a_border)
TTypesOfLandscapeElement TranslateEleTypes(int EleReference)
virtual double GetDeadBiomass(void)
virtual void SetVegHeight(double)
void SetSoilType(int a_st)
double SupplyPondPesticide()
supply the current pesticide concentration per litre
virtual double GetWeedBiomass(void)
virtual TTypesOfVegetation GetVegType(void)
virtual double GetDigestability(void)
virtual TTypesOfVegetation GetVegType(void)
int GetALMaSSEleType(void)
virtual void ReduceVeg(double)
TTypesOfVegetation m_vege_type
CropActualValues Get_CropDataStorage(int index)
void AddArea(double a_area_diff)
bool m_skylarkscrapes
For management testing of skylark scrapes.
void Set_area_in_crop_data(double a_area)
void SetCountryDesignation(int a_designation)
The base class for all farm types.
vector< int > m_lasttreat
virtual int GetVegDensity(void)
bool m_forced_phase_shift
virtual double GetVegBiomass(void)
virtual void DoDevelopment(void)
virtual void ResetDigestability()
sets growth record to zero in descendent classes
virtual bool GetVegPatchy(void)
virtual void SetCropDataAll(double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
double m_LarvalFoodScaler
The proportion of larval food per m2.
virtual void ReduceVeg_Extended(double)
virtual int GetVegDensity(void)
virtual void SetVegType(TTypesOfVegetation a_vege_type, TTypesOfVegetation a_weed_type)
void SetGooseSpNosTimed(int a_number, int a_day, GooseSpecies a_goose)
int GetCountryDesignation(void)
virtual double GetGreenBiomass(void)
void SetSubType(int a_subtype)
void Set_CropDataStorage(int index, CropActualValues a_struct)
virtual TTypesOfLandscapeElement GetElementType(void)
double m_total_biomass_old
void SetArea(double a_area)
virtual void ToggleCattleGrazing(void)
double GetGooseGrazingForage(GooseSpecies a_goose)
void Set_biomass_at_harvest(double a_biomass, int index)
virtual void DoDevelopment(void)
long GetMgtLoopDetectDate(void)
virtual void InsectMortality(double)
void SetOpenness(int a_openness)
Records the openness statistic for this polygon.
TTypesOfVegetation TranslateVegTypes(int VegReference)
String configurator entry class.
Bool configurator entry class.
void SetMapValid(bool a_valid)
virtual void ForceGrowthDevelopment(void)
bool Get_taken(int index)
Ponds are defined as freshwater bodies between 25m2 and 5000m2. For newts the effective size is limit...
void SetMgtLoopDetectCount(long a_num)
double m_force_veg_height
int GetOpenness(void)
For goose model functionality, openness score for the polygon.
double m_birdseedforage
The grain forage present in KJ/m2.
void SetBirdMaize(double a_forage)
void Set_taken(bool a_taken, int index)
int m_farmfunc_tried_to_do
void SetPesticideCell(int a_cell)
LE_Signal GetSignal(void)
virtual void Insecticide(double)
virtual void SetGrowthPhase(int)
virtual double GetVegCover(void)
virtual void RecalculateBugsNStuff(void)
int m_poly
The polyref number for this polygon.
void SetALMaSSEleType(int a_type)
TTypesOfVegetation GetLastSownVeg()
Returns the last vegetation type to be sown.
virtual bool GetSkScrapes(void)
virtual double GetTrafficLoad(void)
double biomass_at_harvest
CfgInt g_el_strigling_delaytime_days
virtual void SetVegBiomass(int)
void SetMDates(int a, int b, int c)
void SetVegStore(int a_veg)
void SetMgtLoopDetectDate(long a_num)
virtual double GetInsectPop(void)
void Add_missed_herb_app()
void SetBirdSeed(double a_forage)
void SetValidXY(int a_valid_x, int a_valid_y)
virtual double GetGreenBiomass(void)
virtual void StoreLAItotal()
TTypesOfLandscapeElement m_type
virtual double GetLATotal(void)
double GetVegDDegs()
Get the total of day degrees for the crop/veg on this element.
virtual void GrazeVeg_Extended(double)
void SetHerbicideDelay(int a_decaytime_days)
bool Get_harvested(int index)
int m_days_since_insecticide_spray
virtual void SetVegHeight(double a_veg_height)
virtual void ForceGrowthInitialize(void)
void SetMConstants(int a, int c)
void SetMapIndex(int a_map_index)
virtual void GrazeVegetation(double, bool)
long m_management_loop_detect_count
void SetSignal(LE_Signal a_signal)
virtual void SetVegParameters(double a_veg_height, double a_LAtotal, double a_LAgreen, double a_WeedBiomass)
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
virtual void ZeroVeg(void)
Struct for storing actual data on crop type, area of a field it is grown in, biomass at harvest...
virtual int GetVegPhase()
int m_openness
The openness metric for a field (if any)
virtual void ReduceWeedBiomass(double)
virtual double GetInsectPop(void)
virtual int GetCentroidX()
virtual void Insecticide(double a_fraction)
void SetGooseNos(int a_number, int a_day)
TTypesOfVegetation tov_type
class Landscape * g_landscape_p
int GetMDates(int a, int b)
void SetHigh(bool a_high)