File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CloverGrassGrazed1 Class Reference

#include <CloverGrassGrazed1.h>

Inheritance diagram for CloverGrassGrazed1:
Crop

Public Member Functions

bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 
 CloverGrassGrazed1 (TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
 
void SetUpFarmCategoryInformation ()
 
- Public Member Functions inherited from Crop
virtual ~Crop ()
 
 Crop (TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
 
int GetFirstDate (void)
 
void ChooseNextCrop (int a_no_dates)
 Chooses the next crop to grow in a field. More...
 
int GetCropClassification ()
 
void SetCropClassification (int a_classification)
 
void GetCropType (TTypesOfCrops a_toc)
 
TTypesOfCrops GetCropType ()
 
FarmManagementCategory LookUpManagementCategory (int a_todo)
 
bool GetForceSpringOK ()
 

Additional Inherited Members

- Public Attributes inherited from Crop
TTypesOfVegetation m_tov
 
- Protected Member Functions inherited from Crop
void SimpleEvent (long a_date, int a_todo, bool a_lock)
 Adds an event to this crop management. More...
 
void SimpleEvent_ (long a_date, int a_todo, bool a_lock, Farm *a_farm, LE *a_field)
 Adds an event to this crop management without relying on member variables. More...
 
bool StartUpCrop (int a_spring, std::vector< std::vector< int >> a_flexdates, int a_todo)
 
Holds the translation between the farm operation enum for each cropand the farm management category associated with it More...
 
bool AphidDamage (LE *a_field)
 Compares aphid numbers per m2 with a threshold to return true if threshold is exceeded. More...
 
- Protected Attributes inherited from Crop
Farmm_farm
 
LEm_field
 
FarmEventm_ev
 
int m_first_date
 
int m_count
 
int m_last_date
 
int m_ddegstoharvest
 
int m_base_elements_no
 
Landscapem_OurLandscape
 
bool m_forcespringpossible = false
 Used to signal that the crop can be forced to start in spring. More...
 
TTypesOfCrops m_toc
 The Crop type in terms of the TTypesOfCrops list (smaller list than tov, no country designation) More...
 
int m_CropClassification
 Contains information on whether this is a winter crop, spring crop, or catch crop that straddles the year boundary (0,1,2) More...
 
vector< FarmManagementCategorym_ManagementCategories
 Holds the translation between the farm operation enum for each crop and the farm management category associated with it. More...
 
- Static Protected Attributes inherited from Crop
static int m_date_modifier = 0
 Holds a value that shifts test pesticide use by this many days in crops modified to use it. More...
 

Constructor & Destructor Documentation

◆ CloverGrassGrazed1()

CloverGrassGrazed1::CloverGrassGrazed1 ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
60  : Crop(a_tov, a_toc, a_L)
61  {
64  }

References Calendar::DayInYear(), g_date, Crop::m_first_date, and SetUpFarmCategoryInformation().

Member Function Documentation

◆ Do()

bool CloverGrassGrazed1::Do ( Farm a_farm,
LE a_field,
FarmEvent a_ev 
)
virtual

Reimplemented from Crop.

41 {
42  m_farm = a_farm;
43  m_field = a_field;
44  m_ev = a_ev;
45  long d1 = 0;
46  int noDates=2;
47  bool done = false;
48 
49  switch ( m_ev->m_todo ) {
50  case cgg1_start:
51 
52  CGG1_WATER_DATE = 0;
53  CGG1_CUT_DATE = 0;
54  CGG1_FERTI_DATE = 0;
57  a_field->ClearManagementActionSum();
58 
59  // Set up the date management stuff
61 
62  // Start and stop dates for all events after harvest
63  m_field->SetMDates(0,0,g_date->DayInYear(27,7));
64 
65  // Determined by harvest date - used to see if at all possible
66  m_field->SetMDates(1,0,g_date->DayInYear(27,7));
67  m_field->SetMDates(0,1,g_date->DayInYear(28,7));
68  m_field->SetMDates(1,1,g_date->DayInYear(10,10));
69 
70  // Check the next crop for early start, unless it is a spring crop
71  // in which case we ASSUME that no checking is necessary!!!!
72  // So DO NOT implement a crop that runs over the year boundary
73 
74  //new if: do the check only for non-optimising farms and if year>0. (030713 - m_rotation used only in the hidden year, so I modified the condition from >7 to >0)
76 
77  if (m_ev->m_startday>g_date->DayInYear(1,7))
78  {
79  if (m_field->GetMDates(0,0) >=m_ev->m_startday)
80  {
81  g_msg->Warn( WARN_BUG, "CloverGrassGrazed1::Do(): "
82  "Harvest too late for the next crop to start!!!", "" );
83  exit( 1 );
84  }
85  // Now fix any late finishing problems
86  for (int i=0; i<noDates; i++) {
87  if(m_field->GetMDates(0,i)>=m_ev->m_startday) {
88  m_field->SetMDates(0,i,m_ev->m_startday-1); //move the starting date
89  }
90  if(m_field->GetMDates(1,i)>=m_ev->m_startday){
91  m_field->SetMConstants(i,0);
92  m_field->SetMDates(1,i,m_ev->m_startday-1); //move the finishing date
93  }
94  }
95  }
96 
97  // Now no operations can be timed after the start of the next crop.
98  if ( ! m_ev->m_first_year ) {
99  // Are we before July 1st?
100  d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
101 
102  if (g_date->Date() < d1) {
103  // Yes, too early. We assumme this is because the last crop was late
104  g_msg->Warn( WARN_BUG, "CloverGrassGrazed1::Do(): "
105  "Crop start attempt between 1st Jan & 1st July", "" );
106  exit( 1 );
107 
108  } else {
109 
110  d1 = g_date->OldDays() + m_first_date+365; // Add 365 for spring crop
111  if (g_date->Date() > d1) {
112  // Yes too late - should not happen - raise an error
113  g_msg->Warn( WARN_BUG, "CloverGrassGrazed1::Do(): "
114  "Crop start attempt after last possible start date",
115  "" );
116  exit( 1 );
117 
118  }
119  }
120  }
121  }//if
122  // End single block date checking code. Please see next line
123  // comment as well.
124 
125  // Reinit d1 to first possible starting date.
126  d1 = g_date->OldDays()+m_first_date;;
127  if ( ! m_ev->m_first_year ) d1+=365; // Add 365 for spring crop (not 1st yr)
128  SimpleEvent( d1, cgg1_ferti_zero, false );
129  d1 = g_date->OldDays() + g_date->DayInYear(15, 3);
130  if (!m_ev->m_first_year) d1 += 365; // Add 365 for spring crop (not 1st yr)
131  SimpleEvent(d1, cgg1_ferti_one, false);
132 
133  //LCT: Test programming of product/pesticide application
134  //SimpleEvent(d1+7, cgg1_productapplic_one, false);
135 
136 #ifdef __EcoSol_01
137  // THIS CODE IS ONLY NEEDED IF WE ARE TESTING A HERBICIDE WITH THE PESTICIDE ENGINE
138  /* */
139  if ( a_field->GetLandscape()->SupplyShouldSpray() ) {
141  if (g_date->Date() >= d1) d1 += 365;
142  SimpleEvent( d1, cgg1_productapplic_one, false );
143  }
144  /* */
145 #endif
146  break;
147 
149  if ( m_ev->m_lock || m_farm->DoIt( 100 ))
150  {
152  // We didn't do it today, try again tomorrow.
154  break;
155  }
156  }
157  break;
158 
159  case cgg1_ferti_zero:
160  if ( m_ev->m_lock || m_farm->DoIt( 60 ))
161  {
162  if (!m_farm->FA_Slurry( m_field, 0.0, g_date->DayInYear( 30, 4 ) - g_date->DayInYear())) {
163  // We didn't do it today, try again tomorrow.
164  SimpleEvent( g_date->Date() + 1, cgg1_ferti_zero, true );
165  break;
166  }
168  }
169  break; // End of thread
170 
171  case cgg1_ferti_one:
172  m_ev->m_field->SetLastSownVeg(tov_CloverGrassGrazed1); //Force last sown, needed for goose habitat classification
173  m_ev->m_field->SetStubble(false);
174  if (!m_farm->FA_NPK( m_field, 0.0,
175  g_date->DayInYear( 15, 4 ) - g_date->DayInYear())) {
176  // We didn't do it today, try again tomorrow.
177  SimpleEvent( g_date->Date() + 1, cgg1_ferti_one, true );
178  break;
179  }
181 
182 
183  ChooseNextCrop (2);
184 
185  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,4 ),
186  cgg1_ferti_two, false );
187 
188  // Start a watering thread
189  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 5 ),
190  cgg1_water_zero, false );
191  break;
192 
193  case cgg1_ferti_two:
194  if (!m_farm->FA_NPK( m_field, 0.0,
195  g_date->DayInYear( 10, 5 ) - g_date->DayInYear())) {
196  // We didn't do it today, try again tomorrow.
197  SimpleEvent( g_date->Date() + 1, cgg1_ferti_two, true );
198  break;
199  }
201 
202  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,5 ),
203  cgg1_cut_to_silage, false );
204  break;
205 
206  case cgg1_cut_to_silage:
207  if ( m_ev->m_lock || m_farm->DoIt(int( cfg_silage_prop.value()* 100 ))) {
208  // At least 7 days from last watering and 21 from
209  // last application of fertilizer.
210  if (g_date->DayInYear()<CGG1_FERTI_DATE+21 ||
212  ) {
213  SimpleEvent( g_date->Date() + 1, cgg1_cut_to_silage, true );
214  break;
215  }
216  if (!m_farm->CutToSilage( m_field, 0.0,
217  g_date->DayInYear( 10, 6 ) -
218  g_date->DayInYear())) {
219  // We didn't do it today, try again tomorrow.
220  SimpleEvent( g_date->Date() + 1, cgg1_cut_to_silage, true );
221  break;
222  }
224 
225  // Decide whether we got for cattle or a second silage cut.
226  // 75% go for the second cut.
227  if ( CGG1_FORCE_SECOND_CUT || m_farm->DoIt( int( cfg_silage_prop.value()*100 ))) { //22.02.2013 - force the cut to have comparable conditions for different years; 75 changed to 100
228  // 75% do Slurry fertilization before second cutting, 25% NPK.
229  if ( m_farm->DoIt( 75 )) {
230  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25, 5 ),
231  cgg1_ferti_three, false );
232  } else {
233  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25, 5 ),
234  cgg1_ferti_four, false );
235  }
236  break;
237  }
238  }
239 
240  // No second or third silage cut, so go for the cattle.
241  // Prevent the second watering from taking place (if it hasn't
242  // already).
243 
245  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 16, 6 ),
246  cgg1_cattle_out, false );
247  break;
248 
249  case cgg1_cattle_out:
250  if (g_date->DayInYear()<CGG1_CUT_DATE+21) {
251  // Too close to last silage cutting, so try again tomorrow.
252  SimpleEvent( g_date->Date() + 1, cgg1_cattle_out, true );
253  break;
254  }
255  if (m_field->GetMConstants(1)==0) {
256  if (!m_farm->CattleOut( m_field, 0.0, -1)) { //raise an error
257  g_msg->Warn( WARN_BUG, "CloverGrassGrazed1::Do(): failure in 'CattleOut' execution", "" );
258  exit( 1 );
259  }
260  }
261  else {
262  if (!m_farm->CattleOut( m_field, 0.0, m_field->GetMDates(1,1) - g_date->DayInYear())) {
263  SimpleEvent( g_date->Date() + 1, cgg1_cattle_out, true );
264  break;
265  }
266  }
267  // Success
268  // Keep them out there
270  break;
271 
272  case cgg1_cattle_is_out: // Keep the cattle out there
273  // CattleIsOut() returns false if it is not time to stop grazing
274 
275  if (m_field->GetMConstants(1)==0) {
276  if (!m_farm->CattleIsOut( m_field, 0.0, -1, m_field->GetMDates(1,1))) {
277  //added 27.08 - issue a warning only if we fail on the last day that this can be done, i.e. MDate
278  if(g_date->Date() == m_field->GetMDates(1,1)){
279  g_msg->Warn( WARN_BUG, "CloverGrassGrazed1::Do(): failure in 'CattleIsOut' execution", "" );
280  exit( 1 );
281  }
282  SimpleEvent( g_date->Date()+1, cgg1_cattle_is_out, false );
283  break;
284  }
285  }
286  else {
287  if (!m_farm->CattleIsOut( m_field, 0.0, m_field->GetMDates(1,1) - g_date->DayInYear(), m_field->GetMDates(1,1))) {
288  SimpleEvent( g_date->Date()+1, cgg1_cattle_is_out, false );
289  break;
290  }
291  }
292 
293 
294 
295 
296  done=true;
297  break;
298 
299  case cgg1_ferti_three:
300  // The percentage has already been taken care of during
301  // the decisions made under cgg1_cut_to_silage
302  if (!m_farm->FA_Slurry( m_field, 0.0,
303  ( CGG1_CUT_DATE+4 ) - g_date->DayInYear())) {
304  // We didn't do it today, try again tomorrow.
305  SimpleEvent( g_date->Date() + 1, cgg1_ferti_three, true );
306  break;
307  }
308 
309  {
310  // Three weeks later min
311  d1 = g_date->OldDays() + g_date->DayInYear( 16, 6 );
312  if ( d1 < g_date->Date() + 21 )
313  d1 = g_date->Date() + 21;
314  SimpleEvent( d1, cgg1_cut_to_silage2, false );
315  }
316  break;
317 
318  case cgg1_ferti_four:
319  // The percentage has already been taken care of during
320  // the decisions made under cgg1_cut_to_silage
321  if (!m_farm->FA_NPK( m_field, 0.0,
322  ( CGG1_CUT_DATE+4 ) - g_date->DayInYear())) {
323  // We didn't do it today, try again tomorrow.
324  SimpleEvent( g_date->Date() + 1, cgg1_ferti_four, true );
325  break;
326  }
327 
328  {
329  // Three weeks later min
330  d1 = g_date->OldDays() + g_date->DayInYear( 16, 6 );
331  if ( d1 < g_date->Date() + 21 )
332  d1 = g_date->Date() + 21;
333  SimpleEvent( d1, cgg1_cut_to_silage2, false );
334  }
335  break;
336 
337  case cgg1_cut_to_silage2:
338  // The percentage has already been taken care of during
339  // the decisions made under cgg1_cut_to_silage
340  if (!m_farm->CutToSilage( m_field, 0.0,
341  g_date->DayInYear( 6,7 ) -
342  g_date->DayInYear())) {
343  // We didn't do it today, try again tomorrow.
344  SimpleEvent( g_date->Date() + 1, cgg1_cut_to_silage2, true );
345  break;
346  }
348 
349  {
350  // Three weeks later min
351  d1 = g_date->OldDays() + g_date->DayInYear( 8, 7 );
352  if ( d1 < g_date->Date() + 21 )
353  d1 = g_date->Date() + 21;
354 
355  if ( m_farm->DoIt(int( cfg_silage_prop.value()* 50 ))) {
356  SimpleEvent( d1, cgg1_cut_to_silage3, false );
357  } else {
358  SimpleEvent( d1, cgg1_cattle_out, false );
359  }
360  }
361  break;
362 
363  case cgg1_cut_to_silage3:
364  // The percentage has already been taken care of during
365  // the decisions made under cgg1_cut_to_silage2
366  if (m_field->GetMConstants(0)==0) {
367  if (!m_farm->CutToSilage( m_field, 0.0, -1)) { //raise an error
368  g_msg->Warn( WARN_BUG, "CloverGrassGrazed1::Do(): failure in 'CutToSilage' execution", "" );
369  exit( 1 );
370  }
371  }
372  else {
373  if (!m_farm->CutToSilage( m_field, 0.0, m_field->GetMDates(0,0) - g_date->DayInYear())) {
374  // We didn't do it today, try again tomorrow.
375  SimpleEvent( g_date->Date() + 1, cgg1_cut_to_silage3, true );
376  break;
377  }
378  }
380 
381  {
382  // Three weeks later min
383  d1 = g_date->OldDays() + g_date->DayInYear( 28, 7 );
384  if ( d1 < g_date->Date() + 21 )
385  d1 = g_date->Date() + 21;
386  if ( d1 < m_field->GetMDates(0,1))
387  d1 = m_field->GetMDates(0,1);
388  SimpleEvent( d1, cgg1_cattle_out, false );
389  }
390  break;
391 
392  case cgg1_water_zero:
393  if ( m_ev->m_lock || m_farm->DoIt( 40 ))
394  {
395  if ( g_date->Date() < CGG1_CUT_DATE + 3 ) {
396  // Too close to silage cutting, so try again tomorrow.
397  SimpleEvent( g_date->Date() + 1, cgg1_water_zero, true );
398  }
399 
400  if (!m_farm->Water( m_field, 0.0,
401  g_date->DayInYear( 1, 6 ) - g_date->DayInYear())) {
402  // We didn't do it today, try again tomorrow.
403  SimpleEvent( g_date->Date() + 1, cgg1_water_zero, true );
404  break;
405  }
406  // Success
408 
409  // Determine whether we want to do the second watering.
410  // If so, then force the second silage cutting as well.
411 
412  if ( m_farm->DoIt( 40 ) && !CGG1_HALT_SECOND_WATER ) {
413  // Do second watering.
415  d1 = g_date->OldDays() + g_date->DayInYear( 2,6 );
416  if ( d1 < g_date->Date() + 7 )
417  d1 = g_date->Date() + 7;
418  SimpleEvent( d1, cgg1_water_one, false );
419  }
420  }
421  // Didn't water so let the thread die
422  break;
423 
424  case cgg1_water_one:
425  if ( g_date->Date() < CGG1_CUT_DATE + 3 ) {
426  // Too close to silage cutting, so try again tomorrow.
427  SimpleEvent( g_date->Date() + 1, cgg1_water_one, true );
428  }
429 
430  if (!m_farm->Water( m_field, 0.0,
431  g_date->DayInYear( 30, 6 ) -
432  g_date->DayInYear())) {
433  // We didn't do it today, try again tomorrow.
434  SimpleEvent( g_date->Date() + 1, cgg1_water_one, true );
435  break;
436  }
438  break;
439  // End of watering thread
440 
441  default:
442  g_msg->Warn( WARN_BUG, "CloverGrassGrazed1::Do(): "
443  "Unknown event type! ", "" );
444  exit( 1 );
445  }
446  return done;
447 }

References cfg_pest_product_amounts, cfg_pest_productapplic_period, cfg_pest_productapplic_startdate, cfg_silage_prop, cgg1_cattle_is_out, cgg1_cattle_out, CGG1_CUT_DATE, cgg1_cut_to_silage, cgg1_cut_to_silage2, cgg1_cut_to_silage3, CGG1_FERTI_DATE, cgg1_ferti_four, cgg1_ferti_one, cgg1_ferti_three, cgg1_ferti_two, cgg1_ferti_zero, CGG1_FORCE_SECOND_CUT, CGG1_HALT_SECOND_WATER, cgg1_productapplic_one, cgg1_start, CGG1_WATER_DATE, cgg1_water_one, cgg1_water_zero, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), g_date, g_msg, Calendar::GetYearNumber(), Calendar::OldDays(), ppp_1, tof_OptimisingFarm, tov_CloverGrassGrazed1, CfgInt::value(), CfgFloat::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void CloverGrassGrazed1::SetUpFarmCategoryInformation ( )
inline
65  {
66  const int elements = 2 + (cgg1_foobar - CGG1_BASE);
68 
69  FarmManagementCategory catlist[elements] =
70  {
71  fmc_Others, // zero element unused but must be here
72  fmc_Others, // cgg1_start = 1, // Compulsory, start event must always be 1 (one).
73  fmc_Fertilizer, // cgg1_ferti_zero = CGG1_BASE,
74  fmc_Fertilizer, // cgg1_ferti_one,
75  fmc_Fertilizer, // cgg1_ferti_two,
76  fmc_Fertilizer, // cgg1_ferti_three,
77  fmc_Fertilizer, // cgg1_ferti_four,
78  fmc_Cutting, // cgg1_cut_to_silage,
79  fmc_Cutting, // cgg1_cut_to_silage2,
80  fmc_Cutting, // cgg1_cut_to_silage3,
81  fmc_Watering, // cgg1_water_zero,
82  fmc_Watering, // cgg1_water_one,
83  fmc_Grazing, // cgg1_cattle_out,
84  fmc_Grazing, // cgg1_cattle_is_out,
85  fmc_Herbicide // cgg1_productapplic_one,
86 
87 
88  // no foobar entry
89 
90  };
91  // Iterate over the catlist elements and copy them to vector
92  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
93 
94  }

References CGG1_BASE, cgg1_foobar, fmc_Cutting, fmc_Fertilizer, fmc_Grazing, fmc_Herbicide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by CloverGrassGrazed1().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
cgg1_ferti_three
Definition: CloverGrassGrazed1.h:40
cgg1_water_zero
Definition: CloverGrassGrazed1.h:45
Farm::FA_Slurry
virtual bool FA_Slurry(LE *a_field, double a_user, int a_days)
Spready slurry on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1067
cfg_pest_productapplic_startdate
CfgInt cfg_pest_productapplic_startdate
Start date for applying pesticide the first time.
Definition: Elements.cpp:166
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
LE::SetLastSownVeg
void SetLastSownVeg(TTypesOfVegetation a_tov)
Records the last vegetation type to be sown.
Definition: Elements.h:357
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
Farm::ProductApplication
virtual bool ProductApplication(LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp, bool a_isgranularpesticide=false, int a_orcharddrifttype=0)
Apply test pesticide to a_field.
Definition: FarmFuncs.cpp:2267
CGG1_FORCE_SECOND_CUT
#define CGG1_FORCE_SECOND_CUT
Definition: CloverGrassGrazed1.h:31
LE::GetMConstants
int GetMConstants(int a)
Definition: Elements.h:407
Farm::CattleIsOut
virtual bool CattleIsOut(LE *a_field, double a_user, int a_days, int a_max)
Generate a 'cattle_out' event for every day the cattle are on a_field.
Definition: FarmFuncs.cpp:2470
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::CutToSilage
virtual bool CutToSilage(LE *a_field, double a_user, int a_days)
Cut vegetation for silage on a_field.
Definition: FarmFuncs.cpp:1644
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
cgg1_cattle_out
Definition: CloverGrassGrazed1.h:47
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
cgg1_ferti_two
Definition: CloverGrassGrazed1.h:39
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
cgg1_start
Definition: CloverGrassGrazed1.h:36
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
CfgFloat::value
double value() const
Definition: Configurator.h:142
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
CloverGrassGrazed1::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: CloverGrassGrazed1.h:65
cgg1_foobar
Definition: CloverGrassGrazed1.h:50
CGG1_HALT_SECOND_WATER
#define CGG1_HALT_SECOND_WATER
Definition: CloverGrassGrazed1.h:32
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
cgg1_ferti_one
Definition: CloverGrassGrazed1.h:38
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
Farm::FA_NPK
virtual bool FA_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:982
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
cfg_pest_product_amounts
CfgArray_Double cfg_pest_product_amounts
Amount of pesticide applied in grams of active substance per hectare for each of the 10 pesticides.
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
cgg1_ferti_four
Definition: CloverGrassGrazed1.h:41
cgg1_cut_to_silage
Definition: CloverGrassGrazed1.h:42
FarmEvent::m_field
LE * m_field
Definition: Farm.h:391
cgg1_cattle_is_out
Definition: CloverGrassGrazed1.h:48
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
CfgInt::value
int value() const
Definition: Configurator.h:116
CGG1_CUT_DATE
#define CGG1_CUT_DATE
Definition: CloverGrassGrazed1.h:28
Crop::m_ManagementCategories
vector< FarmManagementCategory > m_ManagementCategories
Holds the translation between the farm operation enum for each crop and the farm management category ...
Definition: Farm.h:530
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
tov_CloverGrassGrazed1
Definition: LandscapeFarmingEnums.h:203
LE::SetStubble
void SetStubble(bool a_flag)
Sets the in stubble flag.
Definition: Elements.h:462
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
cgg1_water_one
Definition: CloverGrassGrazed1.h:46
Farm::Water
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: FarmFuncs.cpp:1330
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
cgg1_cut_to_silage2
Definition: CloverGrassGrazed1.h:43
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
cfg_pest_productapplic_period
CfgInt cfg_pest_productapplic_period
Period for applying pesticide.
Definition: Elements.cpp:169
cgg1_productapplic_one
Definition: CloverGrassGrazed1.h:49
fmc_Grazing
Definition: LandscapeFarmingEnums.h:1010
CGG1_WATER_DATE
#define CGG1_WATER_DATE
Definition: CloverGrassGrazed1.h:29
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
CGG1_FERTI_DATE
#define CGG1_FERTI_DATE
Definition: CloverGrassGrazed1.h:30
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Crop::ChooseNextCrop
void ChooseNextCrop(int a_no_dates)
Chooses the next crop to grow in a field.
Definition: Farm.cpp:756
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
Farm::CattleOut
virtual bool CattleOut(LE *a_field, double a_user, int a_days)
Start a grazing event on a_field today.
Definition: FarmFuncs.cpp:2368
cgg1_cut_to_silage3
Definition: CloverGrassGrazed1.h:44
CGG1_BASE
#define CGG1_BASE
Definition: CloverGrassGrazed1.h:33
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
cfg_silage_prop
CfgFloat cfg_silage_prop
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
cgg1_ferti_zero
Definition: CloverGrassGrazed1.h:37