ALMaSS Rabbit ODdox  1.00
The rabbit model description following ODdox protocol
elements.h
Go to the documentation of this file.
1 //
2 // elements.h
3 //
4 /*
5 *******************************************************************************************************
6 Copyright (c) 2011, Christopher John Topping, University of Aarhus
7 All rights reserved.
8 
9 Redistribution and use in source and binary forms, with or without modification, are permitted provided
10 that the following conditions are met:
11 
12 Redistributions of source code must retain the above copyright notice, this list of conditions and the
13 following disclaimer.
14 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
15 the following disclaimer in the documentation and/or other materials provided with the distribution.
16 
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
18 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
20 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
22 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 ********************************************************************************************************
26 */
27 
28 #ifndef ELEMENTS_H
29 #define ELEMENTS_H
30 
31 extern class Landscape * g_landscape_p;
32 
33 class APoint;
34 
35 typedef unsigned int LE_Signal;
36 
37 static CfgBool l_el_read_bug_percentage_file("ELEM_READ_BUG_PERCENTAGE_FILE", CFG_CUSTOM, false);
38 static CfgStr l_el_bug_percentage_file("ELEM_BUG_PERCENTAGE_FILE", CFG_CUSTOM,"bugpercents.txt");
39 
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
46 
47 // Number of user defined storage locations for farm management
48 // states. For ridiculously active farm management plans this
49 // might have to be increased. Ie. bump this number if there is
50 // a chance of more than 10 farm events for an given polygon on
51 // any given day.
52 #define EL_MAX_USERSPACE 10 // Has to be a #define.
53 
54 // Decay time for treatment generated tramlines (in days).
55 #define EL_TRAMLINE_DECAYTIME (g_el_tramline_decaytime_days.value())
57 // Delay time before regrowth of weeds after herbicide treatment.
58 #define EL_HERBICIDE_DELAYTIME (g_el_herbicide_delaytime_days.value())
59 #define EL_STRIGLING_DELAYTIME (g_el_strigling_delaytime_days.value())
62 
63 
64 // Will be declared in farm.h, but this is needed here to break a
65 // circular class definition.
66 class Farm;
67 
68 extern class LE_TypeClass *g_letype;
69 
71 {
72  public:
74  TTypesOfVegetation TranslateVegTypes(int VegReference);
75 
77  int BackTranslateVegTypes(TTypesOfVegetation VegReference);
78  int VegTypeToCurveNum( TTypesOfVegetation VegReference);
79 };
80 
81 class LE {
82 public:
83  LE(void);
84  virtual ~LE( void );
90  //double m_volegrazing;
91  // /** \brief Variable used to reduce the grazing pressure */
92  //double m_voleResregrowth;
94  //double m_volegrazingDensity;
96  //void AddVoleGrazing(int a_number) { m_volegrazing+=a_number; }
98  //double GetVoleGrazing( void ) {return m_volegrazing; }
100  //void CalcVoleGrazingDensity( void ) { m_volegrazing *= m_voleResregrowth; m_volegrazingDensity = (m_volegrazing/m_area); }
102  //double GetVoleGrazingDensity( void ) {return m_volegrazingDensity; }
105  long m_user[ EL_MAX_USERSPACE ];
107  LE_Signal GetSignal( void ) { return m_signal_mask; }
108  void SetSignal( LE_Signal a_signal ) { m_signal_mask = a_signal; }
109  int GetSubType( void ) { return m_subtype; }
110  void SetSubType( int a_subtype ) { m_subtype = a_subtype; }
111  int GetALMaSSEleType(void) { return m_almass_le_type; }
112  void SetALMaSSEleType(int a_type) { m_almass_le_type = a_type; }
113  virtual TTypesOfLandscapeElement GetElementType( void ) { return m_type; }
114  void SetElementType( int a_type ) { m_type = (TTypesOfLandscapeElement) a_type; }
115  void Trace( int a_value );
116  void ResetTrace( void );
117  long GetRunNum( void ) { return m_running; }
118  void BumpRunNum( void ) { m_running++; }
119  long GetMgtLoopDetectDate ( void ) { return m_management_loop_detect_date; }
120  void SetMgtLoopDetectDate ( long a_num ) { m_management_loop_detect_date = a_num; }
121  long GetMgtLoopDetectCount ( void ) { return m_management_loop_detect_count; }
122  void SetMgtLoopDetectCount ( long a_num ) { m_management_loop_detect_count = a_num; }
123  void Tick( void );
124  virtual TTypesOfVegetation
125  GetVegType( void ) { return tov_None; }
126  int GetVegStore( void ) { return m_vege_danger_store; }
127  void SetVegStore( int a_veg )
128  { m_vege_danger_store = a_veg; }
129  void ZeroVegAge() { m_vegage=0; }
130  int GetVegAge() { return m_vegage; }
131  virtual void DoDevelopment( void );
132  virtual void RecalculateBugsNStuff( void ) { }
133  virtual int GetVegPhase(void) { return vegphase_foobar; }
134  virtual double GetVegCover(void) { return 0.0; }
135  virtual double GetVegHeight( void ) { return 0.0; }
136  virtual APoint GetCentroid();
137  virtual int GetCentroidX() { return m_centroidx; }
138  virtual int GetCentroidY() { return m_centroidy; }
139  virtual void SetCentroid(int x, int y) { m_centroidx=x; m_centroidy=y; }
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; }
147  //virtual void SetVegPatchy( bool p ) { ;}
148  virtual void SetVegPatchy( bool /* p */ ) { ;}
149  virtual double GetDayDegrees( void ) { return m_ddegs; }
150  virtual double GetLAGreen( void ) { return 0.0; }
151  virtual double GetLATotal( void ) { return 0.0; }
152  virtual double GetGreenBiomass( void ) { return 0.0; }
153  virtual double GetDeadBiomass( void ) { return 0.0; }
154  virtual double GetVegBiomass( void ) { return 0.0; }
155  virtual double GetWeedBiomass( void ) { return 0.0; }
156  virtual double GetInsectPop( void ) { return 0.0; }
157  virtual void SetInsectPop( double /* i */ ) { ; }
158  virtual void Insecticide( double /* a_fraction */ ) { ; }
159  virtual void InsectMortality( double /* a_fraction */ ) { ; }
160  virtual void ReduceWeedBiomass( double /* a_fraction */ ) { ; }
161  virtual void ToggleCattleGrazing( void ) {;}
162  virtual void TogglePigGrazing( void ) {;}
163  virtual void SetVegBiomass( int /* a_biomass */ ) {;}
164  virtual void SetVegType( TTypesOfVegetation /* a_type */, TTypesOfVegetation /* a_weed_type */ ) {;}
165  virtual void SetVegHeight(double /* a_height */) { ; }
166  virtual void SetVegParameters(double /* a_height */, double /* a_LAtotal */, double /* a_LAgreen */, double /* a_WeedBiomass */) { ; }
167  virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int) { ; }
168  virtual void SetCropDataAll(double,double,double, double,TTypesOfVegetation, double, double , int, double , bool, double) {;}
169  virtual void StoreLAItotal() {;}
170  virtual void SetGrowthPhase( int /* a_phase */ ) {;}
171  virtual void ForceGrowthInitialize( void ) {;}
172  virtual void ForceGrowthTest( void ) {;}
173  virtual void ForceGrowthDevelopment( void ) {;}
174  virtual void ZeroVeg( void ) {;}
175  virtual void ReduceVeg( double /* a_reduc */ ) {;}
176  virtual void ReduceVeg_Extended(double /* a_reduc */) { ; }
177  virtual void GrazeVeg_Extended(double /* a_reduc */) { ; }
178  virtual double GetTrafficLoad(void) { return 0.0; }
179  virtual TTypesOfVegetation GetPreviousCrop(int /* a_index */) { return tov_None; }
180  bool GetPoison( void ) { return m_poison; }
181  void SetPoison( bool a_poison ) { m_poison = a_poison; }
182  bool GetHigh( void ) { return m_high; }
183  int GetCattleGrazing( void ) { return m_cattle_grazing; }
184  bool GetPigGrazing( void ) { return m_pig_grazing; }
185  bool HasTramlines( void ) { return ( m_tramlinesdecay>0 ); }
186  bool IsRecentlyMown( void ) { return ( m_mowndecay>0 ); }
187  int IsRecentlySprayed( void ) { return ( m_herbicidedelay ); }
189  int GetPoly( void ) { return m_poly; }
190  int GetMapIndex( void ) { return m_map_index; }
191  void SetMapIndex( int a_map_index ) { m_map_index = a_map_index; }
192  int GetOwnerFile( void ) { return m_owner_file; }
193  int GetOwnerIndex( void ) { return m_owner_index; }
194  int GetLastTreatment( int *a_index );
195  Farm* GetOwner( void ) { return m_owner; }
196  double GetArea( void ) { return m_area; }
197  double GetGooseGrazingForage(GooseSpecies a_goose) { return m_goosegrazingforage[a_goose]; }
198  double GetBirdSeed( void ) {
199  return m_birdseedforage;
200  }
201  void SetBirdSeed( double a_forage ) {
202  m_birdseedforage = a_forage;
203  }
204  double GetBirdMaize( void ) {
205  return m_birdmaizeforage;
206  }
207  void SetBirdMaize( double a_forage ) {
208  m_birdmaizeforage = a_forage;
209  }
210  int GetCountryDesignation( void ) { return m_countrydesignation; }
211  void SetCountryDesignation( int a_designation ) { m_countrydesignation = a_designation; }
212  long GetOldDays( void ) { return m_olddays; }
213  void SetOwner( Farm *a_owner, int a_owner_num, int a_owner_index )
214  {
215  m_owner = a_owner;
216  m_owner_file = a_owner_num;
217  m_owner_index = a_owner_index;
218  }
219  void SetHigh( bool a_high ) { m_high = a_high; }
220  void SetPoly( int a_poly ) { m_poly = a_poly; }
221  void SetMapValid( bool a_valid ) { m_is_in_map = a_valid; }
222  bool GetMapValid( void ) { return m_is_in_map; }
223  void SetArea( double a_area ) { m_area = a_area; }
225  virtual void GrazeVegetation( double /* m_grams */, bool )
226  {
227  ;
228  }
230  virtual void GrazeVegetationTotal( double /* m_grams */ )
231  {
232  ;
233  }
235  int GetSoilType( ) {
253  return m_soiltype;
254  }
256  int GetSoilTypeR( ) {
261  switch (m_soiltype)
262  {
263  case 0: return 3;
264  case 1: return 1;
265  case 2: return 3;
266  case 3: return 3;
267  case 4: return 0;
268  case 5: return 1;
269  case 6: return 0;
270  case 7: return 0;
271  case 8: return 1;
272  case 9: return 0;
273  case 10: return 0;
274  case 11: return 0;
275  case 12: return 0;
276  case 13: return 3;
277  default:
278  return 3;
279  }
280  }
281  void SetSoilType( int a_st ) {
282  m_soiltype = a_st;
283  }
288  m_lastsownvegtype = a_tov;
289  }
294  return m_lastsownvegtype;
295  }
296  void SetLastTreatment(int a_treatment);
297  void SetSprayedToday(bool a_didit) { m_sprayedtoday = a_didit; }
298  bool GetSprayedToday() { return m_sprayedtoday; }
299  void SetCopyTreatment(int a_treatment);
300  void SetOldDays( long a_days ) { m_olddays = a_days; }
301  void SetRotIndex( int a_index ) { m_rot_index = a_index; }
302 
303  int GetRotIndex( void ) { return m_rot_index; }
304  void SetTramlinesDecay( int a_decaytime_days )
305  { m_tramlinesdecay = a_decaytime_days; }
306  void SetHerbicideDelay( int a_decaytime_days )
307  { m_herbicidedelay = a_decaytime_days; }
308  void SetMownDecay( int a_decaytime_days )
309  { m_mowndecay = a_decaytime_days; }
310  void AddArea( double a_area_diff ) { m_area += a_area_diff; }
311  LE* GetBorder( void ) { return m_border; }
312 // LE* GetUnsprayedMargin( void ) { return m_unsprayedmargin; }
313  int GetUnsprayedMarginPolyRef( void ) { return m_unsprayedmarginpolyref; }
314  void SetBorder( LE* a_border ) { m_border = a_border; }
315 // void SetUnsprayedMargin( LE* a_unsprayedmargin ) { m_unsprayedmargin = a_unsprayedmargin; }
316  void SetUnsprayedMarginPolyRef( int a_unsprayedmargin ) { m_unsprayedmarginpolyref = a_unsprayedmargin; }
317  void SetPesticideCell( int a_cell ) { m_PesticideGridCell = a_cell; }
318  int GetPesticideCell( ) { return m_PesticideGridCell; }
319  void SetValidXY( int a_valid_x, int a_valid_y )
320  {
321  m_valid_x = a_valid_x;
322  m_valid_y = a_valid_y;
323  }
324  int GetValidX( void ) { return m_valid_x; }
325  int GetValidY( void ) { return m_valid_y; }
326 
327  int GetMaxX( void ) { return m_maxx; }
328  int GetMaxY( void ) { return m_maxy; }
329  int GetMinX( void ) { return m_minx; }
330  int GetMinY( void ) { return m_miny; }
331  void SetMaxX( int x ) { m_maxx=x; }
332  void SetMaxY( int y ) { m_maxy=y; }
333  void SetMinX( int x ) { m_minx=x; }
334  void SetMinY( int y ) { m_miny=y; }
335  int GetMDates(int a, int b) {return MDates[a][b];}
336  void SetMDates(int a, int b, int c) {MDates[a][b]=c;}
337  int GetMConstants(int a) {return MConsts[a];}
338  void SetMConstants(int a, int c) {MConsts[a]=c;}
340  double GetVegDDegs() {
341  return m_vegddegs; //
342  }
344  int GetOpenness( void ) { return m_openness; }
346  void SetGooseNos(int a_number, int a_day) { m_gooseNos[a_day] = a_number; }
348  void SetGooseSpNos(int a_number, int a_day, GooseSpecies a_goose) {
349  m_gooseSpNos[a_day][a_goose] = a_number;
350  }
352  void SetGooseNosTimed(int a_number, int a_day) { m_gooseNosTimed[a_day] = a_number; }
354  void SetGooseSpNosTimed(int a_number, int a_day, GooseSpecies a_goose) {
355  m_gooseSpNosTimed[a_day][a_goose] = a_number;
356  }
358  int GetGooseNosToday();
360  int GetGooseNosTodayTimed();
362  int GetGooseNos( );
364  int GetGooseSpNosToday(GooseSpecies a_goose);
366  int GetGooseSpNosTodayTimed(GooseSpecies a_goose);
368  void SetOpenness( int a_openness ) { m_openness=a_openness; }
370  virtual void ResetDigestability() { ; }
372  void DoCopy(const LE* a_Le);
374  virtual void SetMaleNewtPresent(bool) { ; };
376  virtual bool IsMaleNewtPresent() { return false; };
377 
378 
379 protected:
380 #ifdef FMDEBUG
381  int m_ptrace[256]; // Change bitmap in 'elements.cpp' if this
382  int m_pdates[256]; // needs to be increased!
383  int m_pindex; // Points to the next *empty* location, so last
384  // program step is in the location below this...
385 #endif
386  long m_running;
389  // May be -1 if no unsprayed margin or this element is a margin!
390  // Valid map coordinate inside this landscape element
391  // before(!) adding the border.
398  // Whether this polygon is actually mentioned in the main map.
400  // Quick hack to discern different hedgebank types.
402  int m_maxx;
403  int m_minx;
404  int m_maxy;
405  int m_miny;
406  long m_olddays;
417  int m_poly;
418  // Copy of the index stored in the main map at run time.
419  // Needed by the pesticide machinery.
428  double m_area;
430  int m_gooseNos[366];
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 ];
447  int m_vegage;
450  bool m_high;
451  bool m_poison;
455  double m_vegddegs; // Total of day degrees for the crop/veg on this element.
456  double m_yddegs; // Yesterdays total of day degrees for this element.
457  double m_ddegs; // Total of day degrees for this element when today
458  // is taken into consideration.
459  vector <int> m_lasttreat;
460  unsigned int m_lastindex;
461  // Only one copy of these is stored for use by all landscape elements.
462  static double m_monthly_traffic[];
463  static double m_largeroad_load[];
464  static double m_smallroad_load[];
465  int MDates[2][25];
466  int MConsts[10];
468 };
469 
470 //---------------------------------------------------------------------------
471 
475  bool taken;
478  bool harvested;
479  double area;
480  int no_herb_app; //number of herbicide applications
484 };
485 
486 
487 class VegElement : public LE {
488 public:
489  VegElement( void );
490  virtual ~VegElement( void ) { ; };
491  virtual void DoDevelopment( void );
493  void ResetGeese( void );
494  virtual double GetDigestability( void ) { return m_digestability; }
495  virtual double GetLAGreen( void ) { return m_LAgreen; }
496  virtual double GetLATotal( void ) { return m_LAtotal; }
497  virtual double GetVegCover( void ) { return m_veg_cover; }
498  virtual double GetVegHeight( void ) { return m_veg_height; }
499  virtual double GetVegBiomass( void ) { return m_veg_biomass; }
500  virtual double GetDeadBiomass( void ) { return m_dead_biomass; }
501  virtual double GetGreenBiomass( void ) { return m_green_biomass; }
502  virtual double GetWeedBiomass( void ) { return m_weed_biomass; }
503  virtual int GetVegDensity( void ) { return m_veg_density; }
504  virtual bool GetSkScrapes( void ) { return m_skylarkscrapes; }
505  virtual bool GetVegPatchy( void ) { return m_veg_patchy; }
506  virtual void SetVegPatchy( bool p ) { m_veg_patchy=p; }
507  virtual double GetInsectPop( void ) { return m_insect_pop; }
508  virtual void SetInsectPop( double insects ) { m_insect_pop=insects; }
509  virtual TTypesOfVegetation GetVegType( void ) { return m_vege_type; }
510  virtual void Insecticide( double a_fraction )
511  {
512  m_insect_pop *= a_fraction;
513  m_days_since_insecticide_spray=28;
514  }
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);
521  virtual void ReduceWeedBiomass( double a_fraction )
522  {
523  m_weed_biomass *= a_fraction;
524  }
525  virtual void ToggleCattleGrazing(void) { if (m_cattle_grazing == 0) m_cattle_grazing = m_default_grazing_level; else m_cattle_grazing = 0;; }
526  virtual void TogglePigGrazing( void ) { m_pig_grazing = !m_pig_grazing; }
528  virtual void GrazeVegetation( double a_grams, bool a_force );
530  virtual void GrazeVegetationTotal( double a_grams);
531  // Outdated! Use ReduceVeg() below instead. Total biomass is
532  // (re)calculated from the total leaf area, it cannot just be
533  // set or changed to an arbitrary value.
534  //virtual void SetVegBiomass( int a_veg_biomass )
535  // { m_veg_biomass = a_veg_biomass; }
536  virtual void SetVegType( TTypesOfVegetation a_vege_type, TTypesOfVegetation a_weed_type )
537  {
538  m_vege_type = a_vege_type;
539  m_curve_num = g_crops->VegTypeToCurveNum( a_vege_type );
540  // -1 is used as a signal not to change the weed type
541  // this is because it may be specific to that field
542  if (a_weed_type!=tov_Undefined) m_weed_curve_num = a_weed_type;
543  }
544  virtual void SetCropData(double,double,double,TTypesOfVegetation, double, int);
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)
548  {
549  m_veg_height = a_veg_height;
550  m_LAtotal = a_LAtotal;
551  m_LAgreen = a_LAgreen;
552  m_weed_biomass = a_WeedBiomass;
553  //RecalculateBugsNStuff();
554  }
555  virtual void SetGrowthPhase( int a_phase );
556  virtual void StoreLAItotal() { m_oldLAtotal = m_LAtotal; }
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);
563 
564  //added 09.04.13 - moved from Field
565  //seems all get function not necessary
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;};
568  void Set_tov_type(TTypesOfVegetation a_tov_type, int index){m_CropDataStorage[index].tov_type = a_tov_type;};
569  //TTypesOfVegetation Get_tov_type (int index){return m_CropDataStorage[index].tov_type;};
570  void Set_area_in_crop_data(double a_area){m_CropDataStorage[0].area = a_area;};
571  void Set_biomass_at_harvest(double a_biomass, int index){m_CropDataStorage[index].biomass_at_harvest = a_biomass;};
572  //double Get_biomass_at_harvest(int index){return m_CropDataStorage[index].biomass_at_harvest;};
573  void Set_harvested(){m_CropDataStorage[0].harvested = true;};
574  bool Get_harvested(int index){return m_CropDataStorage[index].harvested;};
575  //void Add_no_herb_app(int index){m_CropDataStorage[index].no_herb_app++;};
576  void Add_no_herb_app(){m_CropDataStorage[0].no_herb_app++;};
577  //int Get_no_herb_app (int index){return m_CropDataStorage[index].no_herb_app;};
578  //void Add_no_fi_app(int index){m_CropDataStorage[index].no_fi_app++;};
579  void Add_no_fi_app(){m_CropDataStorage[0].no_fi_app++;};
580  //int Get_no_fi_app (int index){return m_CropDataStorage[index].no_fi_app;};
581 
582  //void Add_missed_herb_app(int index){m_CropDataStorage[index].missed_herb_app++;}; //index not necessary - always save at position 0.
583  //int Get_missed_herb_app (int index){return m_CropDataStorage[index].missed_herb_app;};
584  //void Add_missed_fi_app(int index){m_CropDataStorage[index].missed_fi_app++;};
585  //int Get_missed_fi_app (int index){return m_CropDataStorage[index].missed_fi_app;};
586  void Add_missed_herb_app(){m_CropDataStorage[0].missed_herb_app++;};
587  void Add_missed_fi_app(){m_CropDataStorage[0].missed_fi_app++;};
588 
589  //void Set_crop_index(int a_index){m_crop_index = a_index;}; //probably not needed
590  //int Get_crop_index(void){return m_crop_index;};
591  void Set_CropDataStorage(int index, CropActualValues a_struct){m_CropDataStorage[index] = a_struct;};
592  CropActualValues Get_CropDataStorage (int index){return m_CropDataStorage[index];};
593 
594  void Clean_CropDataStorage(int index);
595  //09.04
597  virtual void ResetDigestability()
598  {
599  for (int i = 0; i<32; i++) m_oldnewgrowth[i] = 0.0;
600  }
601 
602  virtual int GetVegPhase() { return m_veg_phase; }
603 protected:
609  double m_LAtotal;
610  double m_oldLAtotal;
611  double m_LAgreen;
612  double m_insect_pop;
619  double m_veg_height;
622  double m_veg_cover;
625  double m_oldnewgrowth[32];
628  double m_force_Weed;
633  FILE *m_ifile;
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 );
638 
639  //added 09.04 .13 - moved from Field!
642  CropActualValues m_CropDataStorage [2];
644 
645 };
646 
647 
648 class Field : public VegElement
649 {
650 public:
651  Field( void );
652  virtual void DoDevelopment( void );
653  TTypesOfVegetation GetPreviousCrop(int a_index);
654 
655 
656 protected:
657 
658 };
659 
660 
661 class PermPasture : public VegElement
662 {
663 public:
664  PermPasture( void );
665 };
666 
667 
669 {
670  public:
671  PermPastureLowYield( void );
672 };
673 
674 
676 {
677  public:
678  PermPastureTussocky( void );
679 };
680 
681 
683 {
684 public:
685  PermanentSetaside( void );
686 };
687 
688 
689 class Hedges : public VegElement
690 {
691 public:
692  Hedges( void );
693  virtual void DoDevelopment( void ) {
695  m_insect_pop=0;
696  }
697 };
698 
699 
700 class HedgeBank : public VegElement
701 {
702 public:
703  HedgeBank( void );
704  virtual void DoDevelopment( void );
705 };
706 
707 
708 class BeetleBank : public VegElement
709 {
710 public:
711  BeetleBank( void );
712  virtual void DoDevelopment( void );
713 };
714 
715 
716 class RoadsideVerge : public VegElement
717 {
718  // Attributes
719  void Cutting(int a_today);
720  long m_DateCut;
721 
722  public:
723  RoadsideVerge( void );
724  // Is needed due to special development for this element
725  // type, cutting of the roadside verges.
726  virtual void DoDevelopment( void );
727 };
728 
730 {
731  public:
732  RoadsideSlope( void );
733  virtual void DoDevelopment( void );
734 };
735 
736 class GreenElement : public VegElement
737 {
738 public:
739  GreenElement( void );
740  virtual ~GreenElement( void ) { ; }
741  virtual void DoDevelopment( void );
742 };
743 
744 class Scrub : public GreenElement
745 {
746 public:
747  Scrub( void );
748  virtual void DoDevelopment( void ) {
750  m_insect_pop=0;
751  }
752 };
753 
754 class Marsh : public GreenElement
755 {
756 public:
757  Marsh( void );
758 };
759 
760 class Saltmarsh : public Marsh
761 {
762 public:
763  Saltmarsh( void );
764 };
765 
766 class Heath : public GreenElement
767 {
768 public:
769  Heath( void );
770 };
771 
773 {
774 public:
775  RiversidePlants( void );
776 };
777 
779 {
780 public:
781  NaturalGrassDry( void );
782  virtual void DoDevelopment();
783 };
784 
786 {
787 public:
788  NaturalGrassWet( void );
789  virtual void DoDevelopment();
790 };
791 
792 class Wasteland : public GreenElement
793 {
794 public:
795  Wasteland( void );
796  virtual void DoDevelopment();
797 };
798 
800 {
801 public:
802  FieldBoundary( void );
803 };
804 
806 {
807 public:
808  UnsprayedFieldMargin( void );
809  virtual void DoDevelopment( void );
817 };
818 
820 {
821 public:
822  RiversideTrees( void );
823 };
824 
825 class Vildtager : public GreenElement
826 {
827 public:
828  Vildtager( void );
829 };
830 
831 class Railway : public GreenElement
832 {
833 public:
834  Railway( void );
835 };
836 
837 //---------------------------------------------------------------------------
838 
839 
840 class ForestElement : public VegElement
841 {
842 public:
843  ForestElement( void );
844  virtual void DoDevelopment( void ) {
846  m_insect_pop=0;
847  }
848 };
849 
850 
852 {
853 public:
854  DeciduousForest( void );
855 };
856 
857 
858 class Copse : public ForestElement
859 {
860 public:
861  Copse( void );
862 };
863 
864 
866 {
867 public:
868  IndividualTree(void);
869 };
870 
871 
873 {
874 public:
875  ConiferousForest( void );
876 };
877 
879 {
880 public:
881  WoodlandMargin(void);
882 };
883 
884 
886 {
887 public:
888  MixedForest( void );
889 };
890 
892 {
893 public:
894  YoungForest( void );
895 };
896 
898 {
899 public:
900  WoodyEnergyCrop( void );
901 };
902 
903 class Orchard : public GreenElement
904 {
905  void Cutting(int a_today);
906  long m_DateCut;
907 
908 public:
909  Orchard( void );
910  // Is needed due to special development for this element
911  // type, cutting of the roadside verges.
912  virtual void DoDevelopment( void );
913 };
914 
915 class OrchardBand : public GreenElement
916 {
918 
919 public:
920  OrchardBand( void );
921  // Is needed due to special development for this element
922  // type, cutting of the roadside verges.
923  virtual void DoDevelopment( void );
924 };
925 
926 class MownGrass : public GreenElement
927 {
928  void Cutting(int a_today);
929  long m_DateCut;
930 
931 public:
932  MownGrass( void );
936  virtual void DoDevelopment( void );
937 };
938 
939 class NonVegElement : public LE
940 {
941 public:
942  NonVegElement( void );
943 };
944 
946 {
947 public:
948  ChameleonLE(void);
949 };
950 
951 class Garden : public NonVegElement
952 {
953 public:
954  Garden(void);
955 };
956 
957 class Building : public NonVegElement
958 {
959 public:
960  Building( void );
961 };
962 
963 class Pylon : public NonVegElement
964 {
965 public:
966  Pylon(void);
967 };
968 
970 {
971 public:
972  WindTurbine(void);
973 };
974 
976 {
977 public:
978  PlantNursery(void);
979 };
980 
981 class Urban : public NonVegElement
982 {
983 public:
984  Urban( void );
985 };
986 
988 {
989 public:
990  AmenityGrass( void );
991 };
992 
993 class Parkland : public NonVegElement
994 {
995 public:
996  Parkland( void );
997 };
998 
999 class UrbanNoVeg : public NonVegElement
1000 {
1001 public:
1002  UrbanNoVeg( void );
1003 };
1004 
1005 class UrbanPark : public NonVegElement
1006 {
1007 public:
1008  UrbanPark( void );
1009 };
1010 
1011 class Suburban : public NonVegElement
1012 {
1013 public:
1014  Suburban( void );
1015 };
1016 
1018 {
1019 public:
1020  RuralResidential( void );
1021 };
1022 
1024 {
1025 public:
1026  BuiltUpWithParkland( void );
1027 };
1028 
1029 class SandDune : public NonVegElement
1030 {
1031 public:
1032  SandDune( void );
1033 };
1034 
1035 class BareRock : public NonVegElement
1036 {
1037 public:
1038  BareRock( void );
1039 };
1040 
1041 class StoneWall : public NonVegElement
1042 {
1043 public:
1044  StoneWall( void );
1045 };
1046 
1047 
1048 
1050 {
1051 public:
1052  PitDisused( void );
1053 };
1054 
1055 
1056 
1057 class Saltwater : public NonVegElement
1058 {
1059 public:
1060  Saltwater( void );
1061 };
1062 
1063 
1064 
1065 class Freshwater : public NonVegElement {
1066 public:
1067  Freshwater(void);
1068 };
1069 
1070 
1071 class FishFarm : public NonVegElement {
1072 public:
1073  FishFarm(void);
1074 };
1075 
1076 
1082 class Pond : public Freshwater {
1083 protected:
1092 public:
1093  Pond( void );
1097  virtual void DoDevelopment(void);
1099  void CalcPondPesticide();
1101  void CalcLarvalFood();
1103  bool SubtractLarvalFood(double a_food);
1105  double SupplyPondPesticide() { return m_pondpesticide; }
1107  virtual void SetMaleNewtPresent(bool a_ispresent) { m_MaleNewtPresent = a_ispresent; };
1109  bool IsMaleNewtPresent() { return m_MaleNewtPresent; };
1110 };
1111 
1112 class River : public NonVegElement
1113 {
1114 public:
1115  River( void );
1116 };
1117 
1118 
1119 
1120 class Coast : public NonVegElement
1121 {
1122 public:
1123  Coast( void );
1124 };
1125 
1126 
1127 
1128 class ActivePit : public NonVegElement
1129 {
1130 public:
1131  ActivePit( void );
1132 };
1133 
1134 
1135 
1136 class LargeRoad : public NonVegElement
1137 {
1138 public:
1139  virtual double GetTrafficLoad( void );
1140  LargeRoad( void );
1141 };
1142 
1143 
1144 
1145 class SmallRoad : public NonVegElement
1146 {
1147 public:
1148  virtual double GetTrafficLoad( void );
1149  SmallRoad( void );
1150 };
1151 
1152 
1153 class Track : public NonVegElement
1154 {
1155 public:
1156  Track( void );
1157 };
1158 
1160 {
1161 public:
1162  MetalledPath( void );
1163 };
1164 
1165 class Carpark : public NonVegElement
1166 {
1167 public:
1168  Carpark( void );
1169 };
1170 
1172 {
1173 public:
1174  Churchyard( void );
1175 };
1176 
1177 class Stream : public NonVegElement
1178 {
1179 public:
1180  Stream( void );
1181 };
1182 
1184 {
1185 public:
1186  HeritageSite( void );
1187 };
1188 
1189 #endif // ELEMENTS_H
1190 
bool GetPoison(void)
Definition: elements.h:180
virtual void GrazeVegetationTotal(double)
Definition: elements.h:230
int VegTypeToCurveNum(TTypesOfVegetation VegReference)
Farm * GetOwner(void)
Definition: elements.h:195
void SetElementType(int a_type)
Definition: elements.h:114
virtual void SetMaleNewtPresent(bool)
Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic cast...
Definition: elements.h:374
int m_veg_density
Definition: elements.h:620
static CfgBool l_el_read_bug_percentage_file("ELEM_READ_BUG_PERCENTAGE_FILE", CFG_CUSTOM, false)
virtual bool IsMatureCereal()
Definition: elements.h:143
int m_minx
Definition: elements.h:403
CfgInt g_el_herbicide_delaytime_days
virtual void SetCentroid(int x, int y)
Definition: elements.h:139
The landscape class containing all environmental and topographical data.
Definition: landscape.h:109
int VegTypeToCurveNum(TTypesOfVegetation VegReference)
Definition: plants.cpp:231
bool m_sprayedtoday
flag to indicate an overspray situation
Definition: elements.h:415
int m_unsprayedmarginpolyref
Definition: elements.h:388
LE * GetBorder(void)
Definition: elements.h:311
int BackTranslateEleTypes(TTypesOfLandscapeElement EleReference)
Definition: elements.cpp:3042
double m_vegddegs
Definition: elements.h:455
bool IsMaleNewtPresent()
Gets whether there is a male newt as present.
Definition: elements.h:1109
class LE_TypeClass * g_letype
Definition: elements.cpp:265
void SetMinY(int y)
Definition: elements.h:334
CfgInt g_el_tramline_decaytime_days
unsigned int LE_Signal
Definition: elements.h:33
bool IsRecentlyMown(void)
Definition: elements.h:186
int GetMaxX(void)
Definition: elements.h:327
int m_valid_y
Definition: elements.h:393
virtual void ResetDigestability()
sets growth record to zero
Definition: elements.h:597
virtual void SetInsectPop(double insects)
Definition: elements.h:508
int GetMapIndex(void)
Definition: elements.h:190
int GetUnsprayedMarginPolyRef(void)
Definition: elements.h:313
virtual double GetVegHeight(void)
Definition: elements.h:498
double m_birdmaizeforage
The maize forage present in KJ/m2.
Definition: elements.h:440
virtual double GetVegCover(void)
Definition: elements.h:497
double m_oldLAtotal
Definition: elements.h:610
int GetValidY(void)
Definition: elements.h:325
int m_squares_in_map
Definition: elements.h:86
virtual void StoreLAItotal()
Definition: elements.h:169
virtual void DoDevelopment(void)
Definition: elements.h:693
bool GetHigh(void)
Definition: elements.h:182
virtual void SetInsectPop(double)
Definition: elements.h:157
int GetSubType(void)
Definition: elements.h:109
void SetTramlinesDecay(int a_decaytime_days)
Definition: elements.h:304
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: elements.h:189
class CropData * g_crops
Definition: plants.cpp:39
virtual TTypesOfVegetation GetPreviousCrop(int)
Definition: elements.h:179
virtual void SetVegType(TTypesOfVegetation, TTypesOfVegetation)
Definition: elements.h:164
virtual void DoDevelopment(void)
Definition: elements.h:748
virtual int GetCentroidY()
Definition: elements.h:138
double GetBirdMaize(void)
Definition: elements.h:204
bool m_force_growth
Definition: elements.h:632
int m_newoldgrowthindex
Definition: elements.h:626
long m_running
Definition: elements.h:376
void Set_tov_type(TTypesOfVegetation a_tov_type, int index)
Definition: elements.h:568
virtual void ToggleCattleGrazing(void)
Definition: elements.h:525
virtual void SetVegParameters(double, double, double, double)
Definition: elements.h:166
bool m_MaleNewtPresent
Flag for presence of a male newt.
Definition: elements.h:1091
void SetRotIndex(int a_index)
Definition: elements.h:301
virtual double GetLAGreen(void)
Definition: elements.h:495
virtual double GetDeadBiomass(void)
Definition: elements.h:153
virtual void TogglePigGrazing(void)
Definition: elements.h:162
virtual void ReduceWeedBiomass(double a_fraction)
Definition: elements.h:521
void Add_no_fi_app()
Definition: elements.h:579
int m_default_grazing_level
Definition: elements.h:453
bool m_poison
Definition: elements.h:451
virtual double GetLATotal(void)
Definition: elements.h:496
FILE * m_ifile
Definition: elements.h:633
int m_maxx
Definition: elements.h:402
void SetPoison(bool a_poison)
Definition: elements.h:181
LE_Signal m_signal_mask
Definition: elements.h:467
int m_nutrient_status
Definition: elements.h:608
virtual void ForceGrowthTest(void)
Definition: elements.h:172
void SetOldDays(long a_days)
Definition: elements.h:300
void SetOwner(Farm *a_owner, int a_owner_num, int a_owner_index)
Definition: elements.h:213
int m_mowndecay
Definition: elements.h:425
int m_PesticideGridCell
Definition: elements.h:397
double m_LarvalFood
The amount of larval food present.
Definition: elements.h:1085
Integer configurator entry class.
Definition: configurator.h:85
double m_pondpesticide
Holds the pesticide content per unit pond water.
Definition: elements.h:1089
virtual void TogglePigGrazing(void)
Definition: elements.h:526
virtual double GetDayDegrees(void)
Definition: elements.h:149
void SetGooseSpNos(int a_number, int a_day, GooseSpecies a_goose)
Definition: elements.h:348
long m_DateCut
Definition: elements.h:906
virtual void SetMaleNewtPresent(bool a_ispresent)
Sets a male as present/absent.
Definition: elements.h:1107
void SetGooseNosTimed(int a_number, int a_day)
Definition: elements.h:352
virtual ~GreenElement(void)
Definition: elements.h:740
double m_newgrowthsum
Definition: elements.h:627
virtual double GetLAGreen(void)
Definition: elements.h:150
virtual double GetDigestability(void)
Definition: elements.h:140
int m_vegage
Definition: elements.h:447
bool m_is_in_map
Definition: elements.h:399
virtual void SetVegPatchy(bool p)
Definition: elements.h:506
virtual ~VegElement(void)
Definition: elements.h:490
virtual double GetVegHeight(void)
Definition: elements.h:135
void SetUnsprayedMarginPolyRef(int a_unsprayedmargin)
Definition: elements.h:316
double m_LAtotal
Definition: elements.h:609
virtual double GetVegBiomass(void)
Definition: elements.h:499
virtual bool GetVegPatchy(void)
Definition: elements.h:505
int GetMinX(void)
Definition: elements.h:329
double GetBirdSeed(void)
Definition: elements.h:198
int GetValidX(void)
Definition: elements.h:324
virtual int GetVegPhase(void)
Definition: elements.h:133
int GetMConstants(int a)
Definition: elements.h:337
virtual void SetVegPatchy(bool)
Definition: elements.h:148
static CfgStr l_el_bug_percentage_file("ELEM_BUG_PERCENTAGE_FILE", CFG_CUSTOM,"bugpercents.txt")
TTypesOfVegetation
long m_management_loop_detect_date
Definition: elements.h:407
virtual double GetWeedBiomass(void)
Definition: elements.h:502
double m_force_Weed
Definition: elements.h:628
Definition: elements.h:81
int GetVegAge()
Definition: elements.h:130
long GetOldDays(void)
Definition: elements.h:212
long GetMgtLoopDetectCount(void)
Definition: elements.h:121
double m_digestability
Definition: elements.h:624
bool m_repeat_start
Definition: elements.h:106
int GetCattleGrazing(void)
Definition: elements.h:183
double m_total_biomass
Definition: elements.h:614
TTypesOfVegetation m_lastsownvegtype
Records the last vegegetation type that was sown on the element.
Definition: elements.h:444
virtual bool GetSkScrapes(void)
Definition: elements.h:142
int GetMinY(void)
Definition: elements.h:330
void SetMaxY(int y)
Definition: elements.h:332
void SetSprayedToday(bool a_didit)
Definition: elements.h:297
void SetMownDecay(int a_decaytime_days)
Definition: elements.h:308
void SetLastSownVeg(TTypesOfVegetation a_tov)
Records the last vegetation type to be sown.
Definition: elements.h:287
int IsRecentlySprayed(void)
Definition: elements.h:187
double m_force_LAtotal
Definition: elements.h:630
virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int)
Definition: elements.h:167
int m_almass_le_type
This holds the ALMaSS element type reference number.
Definition: elements.h:422
double m_veg_cover
Definition: elements.h:622
void SetBorder(LE *a_border)
Definition: elements.h:314
TTypesOfLandscapeElement TranslateEleTypes(int EleReference)
Definition: elements.cpp:2597
virtual double GetDeadBiomass(void)
Definition: elements.h:500
virtual void SetVegHeight(double)
Definition: elements.h:165
void SetMaxX(int x)
Definition: elements.h:331
void SetSoilType(int a_st)
Definition: elements.h:281
double SupplyPondPesticide()
supply the current pesticide concentration per litre
Definition: elements.h:1105
void Add_no_herb_app()
Definition: elements.h:576
void Add_missed_fi_app()
Definition: elements.h:587
void SetPoly(int a_poly)
Definition: elements.h:220
int m_soiltype
Definition: elements.h:448
virtual bool IsGrass()
Definition: elements.h:145
virtual double GetWeedBiomass(void)
Definition: elements.h:155
int m_herbicidedelay
Definition: elements.h:426
virtual TTypesOfVegetation GetVegType(void)
Definition: elements.h:509
virtual double GetDigestability(void)
Definition: elements.h:494
void BumpRunNum(void)
Definition: elements.h:118
virtual TTypesOfVegetation GetVegType(void)
Definition: elements.h:125
int GetALMaSSEleType(void)
Definition: elements.h:111
long m_LastSprayed
Definition: elements.h:917
virtual void ReduceVeg(double)
Definition: elements.h:175
int m_valid_x
Definition: elements.h:392
TTypesOfVegetation m_vege_type
Definition: elements.h:604
CropActualValues Get_CropDataStorage(int index)
Definition: elements.h:592
void AddArea(double a_area_diff)
Definition: elements.h:310
bool m_skylarkscrapes
For management testing of skylark scrapes.
Definition: elements.h:88
bool m_high
Definition: elements.h:450
void Set_area_in_crop_data(double a_area)
Definition: elements.h:570
bool GetSprayedToday()
Definition: elements.h:298
void SetCountryDesignation(int a_designation)
Definition: elements.h:211
The base class for all farm types.
Definition: farm.h:683
vector< int > m_lasttreat
Definition: elements.h:459
virtual int GetVegDensity(void)
Definition: elements.h:503
int GetOwnerFile(void)
Definition: elements.h:192
bool m_forced_phase_shift
Definition: elements.h:623
virtual double GetVegBiomass(void)
Definition: elements.h:154
double m_insect_pop
Definition: elements.h:612
virtual void DoDevelopment(void)
Definition: elements.h:844
virtual void ResetDigestability()
sets growth record to zero in descendent classes
Definition: elements.h:370
void SetMinX(int x)
Definition: elements.h:333
virtual bool GetVegPatchy(void)
Definition: elements.h:146
virtual void SetCropDataAll(double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
Definition: elements.h:168
double m_LarvalFoodScaler
The proportion of larval food per m2.
Definition: elements.h:1087
virtual void ReduceVeg_Extended(double)
Definition: elements.h:176
virtual int GetVegDensity(void)
Definition: elements.h:141
virtual bool IsCereal()
Definition: elements.h:144
int GetSoilType()
Definition: elements.h:235
virtual void SetVegType(TTypesOfVegetation a_vege_type, TTypesOfVegetation a_weed_type)
Definition: elements.h:536
double m_dead_biomass
Definition: elements.h:617
void SetGooseSpNosTimed(int a_number, int a_day, GooseSpecies a_goose)
Definition: elements.h:354
long m_olddays
Definition: elements.h:406
int m_map_index
Definition: elements.h:420
int GetCountryDesignation(void)
Definition: elements.h:210
virtual double GetGreenBiomass(void)
Definition: elements.h:501
void SetSubType(int a_subtype)
Definition: elements.h:110
double m_weed_biomass
Definition: elements.h:618
int GetSoilTypeR()
Definition: elements.h:256
double m_ddegs
Definition: elements.h:457
void Set_CropDataStorage(int index, CropActualValues a_struct)
Definition: elements.h:591
virtual TTypesOfLandscapeElement GetElementType(void)
Definition: elements.h:113
double m_total_biomass_old
Definition: elements.h:615
void SetArea(double a_area)
Definition: elements.h:223
virtual void ToggleCattleGrazing(void)
Definition: elements.h:161
double GetGooseGrazingForage(GooseSpecies a_goose)
Definition: elements.h:197
void Set_biomass_at_harvest(double a_biomass, int index)
Definition: elements.h:571
virtual void DoDevelopment(void)
Definition: elements.cpp:1621
double m_green_biomass
Definition: elements.h:616
long GetMgtLoopDetectDate(void)
Definition: elements.h:119
virtual void InsectMortality(double)
Definition: elements.h:159
void SetOpenness(int a_openness)
Records the openness statistic for this polygon.
Definition: elements.h:368
TTypesOfVegetation TranslateVegTypes(int VegReference)
Definition: elements.cpp:2692
String configurator entry class.
Definition: configurator.h:132
int m_centroidx
Definition: elements.h:394
LE * m_border
Definition: elements.h:387
Bool configurator entry class.
Definition: configurator.h:116
void SetMapValid(bool a_valid)
Definition: elements.h:221
unsigned int m_lastindex
Definition: elements.h:460
int GetRotIndex(void)
Definition: elements.h:303
long m_DateCut
Definition: elements.h:929
Farm * m_owner
Definition: elements.h:409
virtual void ForceGrowthDevelopment(void)
Definition: elements.h:173
int m_tried_to_do
Definition: elements.h:85
bool Get_taken(int index)
Definition: elements.h:567
Ponds are defined as freshwater bodies between 25m2 and 5000m2. For newts the effective size is limit...
Definition: elements.h:1082
void SetMgtLoopDetectCount(long a_num)
Definition: elements.h:122
bool GetPigGrazing(void)
Definition: elements.h:184
int m_centroidy
Definition: elements.h:395
int m_miny
Definition: elements.h:405
double m_force_veg_height
Definition: elements.h:631
int m_tramlinesdecay
Definition: elements.h:424
int GetOpenness(void)
For goose model functionality, openness score for the polygon.
Definition: elements.h:344
double m_birdseedforage
The grain forage present in KJ/m2.
Definition: elements.h:438
void SetBirdMaize(double a_forage)
Definition: elements.h:207
int GetOwnerIndex(void)
Definition: elements.h:193
void Set_taken(bool a_taken, int index)
Definition: elements.h:566
double m_LAgreen
Definition: elements.h:611
int m_farmfunc_tried_to_do
Definition: elements.h:423
bool m_pig_grazing
Definition: elements.h:454
int m_veg_phase
Definition: elements.h:607
int m_countrydesignation
Definition: elements.h:410
int m_owner_index
Definition: elements.h:412
void SetPesticideCell(int a_cell)
Definition: elements.h:317
bool GetMapValid(void)
Definition: elements.h:222
LE_Signal GetSignal(void)
Definition: elements.h:107
virtual void Insecticide(double)
Definition: elements.h:158
virtual void SetGrowthPhase(int)
Definition: elements.h:170
double m_yddegs
Definition: elements.h:456
virtual double GetVegCover(void)
Definition: elements.h:134
int m_rot_index
Definition: elements.h:413
double m_veg_height
Definition: elements.h:619
virtual void RecalculateBugsNStuff(void)
Definition: elements.h:132
int m_poly
The polyref number for this polygon.
Definition: elements.h:417
void SetALMaSSEleType(int a_type)
Definition: elements.h:112
TTypesOfVegetation GetLastSownVeg()
Returns the last vegetation type to be sown.
Definition: elements.h:293
virtual bool GetSkScrapes(void)
Definition: elements.h:504
int m_weed_curve_num
Definition: elements.h:606
int m_owner_file
Definition: elements.h:411
virtual double GetTrafficLoad(void)
Definition: elements.h:178
double m_veg_biomass
Definition: elements.h:613
double biomass_at_harvest
Definition: elements.h:477
CfgInt g_el_strigling_delaytime_days
virtual void SetVegBiomass(int)
Definition: elements.h:163
void SetMDates(int a, int b, int c)
Definition: elements.h:336
void SetVegStore(int a_veg)
Definition: elements.h:127
void SetMgtLoopDetectDate(long a_num)
Definition: elements.h:120
int m_vege_danger_store
Definition: elements.h:396
bool HasTramlines(void)
Definition: elements.h:185
double GetArea(void)
Definition: elements.h:196
TTypesOfLandscapeElement
virtual double GetInsectPop(void)
Definition: elements.h:507
int m_crop_index
Definition: elements.h:643
void Add_missed_herb_app()
Definition: elements.h:586
void SetBirdSeed(double a_forage)
Definition: elements.h:201
void SetValidXY(int a_valid_x, int a_valid_y)
Definition: elements.h:319
int m_subtype
Definition: elements.h:401
virtual double GetGreenBiomass(void)
Definition: elements.h:152
virtual void StoreLAItotal()
Definition: elements.h:556
TTypesOfLandscapeElement m_type
Definition: elements.h:427
virtual double GetLATotal(void)
Definition: elements.h:151
double GetVegDDegs()
Get the total of day degrees for the crop/veg on this element.
Definition: elements.h:340
int GetMaxY(void)
Definition: elements.h:328
virtual void GrazeVeg_Extended(double)
Definition: elements.h:177
int m_cattle_grazing
Definition: elements.h:452
void SetHerbicideDelay(int a_decaytime_days)
Definition: elements.h:306
#define EL_MAX_USERSPACE
Definition: elements.h:52
bool Get_harvested(int index)
Definition: elements.h:574
int m_days_since_insecticide_spray
Definition: elements.h:449
virtual void SetVegHeight(double a_veg_height)
Definition: elements.h:546
long GetRunNum(void)
Definition: elements.h:117
virtual void ForceGrowthInitialize(void)
Definition: elements.h:171
void SetMConstants(int a, int c)
Definition: elements.h:338
void Set_harvested()
Definition: elements.h:573
void SetMapIndex(int a_map_index)
Definition: elements.h:191
double m_area
Definition: elements.h:428
virtual void GrazeVegetation(double, bool)
Definition: elements.h:225
long m_management_loop_detect_count
Definition: elements.h:408
bool m_veg_patchy
Definition: elements.h:621
void SetSignal(LE_Signal a_signal)
Definition: elements.h:108
virtual void SetVegParameters(double a_veg_height, double a_LAtotal, double a_LAgreen, double a_WeedBiomass)
Definition: elements.h:547
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
Definition: elements.cpp:2864
virtual void ZeroVeg(void)
Definition: elements.h:174
Struct for storing actual data on crop type, area of a field it is grown in, biomass at harvest...
Definition: elements.h:474
int GetVegStore(void)
Definition: elements.h:126
void ZeroVegAge()
Definition: elements.h:129
int m_curve_num
Definition: elements.h:605
int GetPesticideCell()
Definition: elements.h:318
virtual int GetVegPhase()
Definition: elements.h:602
int m_openness
The openness metric for a field (if any)
Definition: elements.h:446
virtual void ReduceWeedBiomass(double)
Definition: elements.h:160
virtual double GetInsectPop(void)
Definition: elements.h:156
virtual int GetCentroidX()
Definition: elements.h:137
long m_DateCut
Definition: elements.h:720
int m_maxy
Definition: elements.h:404
virtual void Insecticide(double a_fraction)
Definition: elements.h:510
void SetGooseNos(int a_number, int a_day)
Definition: elements.h:346
TTypesOfVegetation tov_type
Definition: elements.h:476
class Landscape * g_landscape_p
Definition: Landscape.cpp:238
double m_force_LAgreen
Definition: elements.h:629
int GetMDates(int a, int b)
Definition: elements.h:335
void SetHigh(bool a_high)
Definition: elements.h:219