Loading [MathJax]/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
WinterWheat Class Reference

WinterWheat class
. More...

#include <WinterWheat.h>

Inheritance diagram for WinterWheat:
Crop

Public Member Functions

virtual bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 The one and only method for a crop management plan. All farm actions go through here. More...
 
 WinterWheat (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...
 

Detailed Description

WinterWheat class
.

See WinterWheat.h::WinterWheatToDo for a complete list of all possible events triggered codes by the winter wheat management plan. When triggered these events are handled by Farm and are available as information for other objects such as animal and bird models.

Constructor & Destructor Documentation

◆ WinterWheat()

WinterWheat::WinterWheat ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
121  : Crop(a_tov, a_toc, a_L)
122  {
123  // When we start it off, the first possible date for a farm operation is 1st October
124  // This information is used by other crops when they decide how much post processing of
125  // the management is allowed after harvest before the next crop starts.
126  m_first_date=g_date->DayInYear( 1,10 );
128  }

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

Member Function Documentation

◆ Do()

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

The one and only method for a crop management plan. All farm actions go through here.

Called every time something is done to the crop by the farmer in the first instance it is always called with a_ev->todo set to start, but susequently will be called whenever the farmer wants to carry out a new operation.
This method details all the management and relationships between operations necessary to grow and ALMaSS crop - in this case conventional winter wheat.

Inputs to a farm mangement event call.

bool forcing a_eve->m_lock bool probability (if forcing lock is false) Farm management to try (function address) Event type Finish date Flags to set on success Flage value to set Next event Start date for next evemt

Reimplemented from Crop.

104 {
105  m_field = a_field; // this is needed because of possible calls to other methods and currently we do not pass parameters.
106  m_farm = a_farm; // this is needed because of possible calls to other methods and currently we do not pass parameters.
107  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
108 
109  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
110  switch (a_ev->m_todo)
111  {
112  case ww_start:
113  {
114  // This is just to hold a local variable in scope and prevent compiler errors
115  // ww_start just sets up all the starting conditions and reference dates that are needed to start a ww
116  // crop off
117  WW_AUTUMN_PLOUGH = false;
118  WW_DECIDE_TO_HERB = 1;
119  WW_DECIDE_TO_FI = 1;
120  a_field->ClearManagementActionSum();
121 
122  // Record whether skylark scrapes are present and adjust flag accordingly
124  a_field->m_skylarkscrapes = true;
125  }
126  else {
127  a_field->m_skylarkscrapes = false;
128  }
129  // Set up the date management stuff
130  // The next bit of code just allows for altering dates after harvest if it is necessary
131  // to allow for a crop which starts its management early.
132 
133  // 5 start and stop dates for all events after harvest for this crop
134  int noDates = 5;
135  a_field->SetMDates(0, 0, g_date->DayInYear(20, 8));
136  // Determined by harvest date - used to see if at all possible
137  a_field->SetMDates(1, 0, g_date->DayInYear(20, 8));
138  a_field->SetMDates(0, 1, 0); // HayTurning start
139  a_field->SetMDates(1, 1, g_date->DayInYear(20, 8));
140  a_field->SetMDates(0, 2, g_date->DayInYear(5, 8));
141  a_field->SetMDates(1, 2, g_date->DayInYear(20, 8)); //was 25, 8
142  a_field->SetMDates(0, 3, g_date->DayInYear(10, 8));
143  a_field->SetMDates(1, 3, g_date->DayInYear(20, 8)); //was 15,9
144  a_field->SetMDates(0, 4, g_date->DayInYear(15, 8));
145  a_field->SetMDates(1, 4, g_date->DayInYear(20, 8)); //was 15, 10
146  // Can be up to 10 of these. If the shortening code is triggered
147  // then these will be reduced in value to 0
148 
149  a_field->SetMConstants(0, 1);
150 
151  // Check the next crop for early start, unless it is a spring crop
152  // in which case we ASSUME that no checking is necessary!!!!
153  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
154 
155  //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)
156  int d1;
157  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
158 
159  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
160  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
161  {
162  g_msg->Warn(WARN_BUG, "WinterWheat::Do(): ", "Harvest too late for the next crop to start!!!");
163  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
164  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
165  }
166  // Now fix any late finishing problems
167  for (int i = 0; i < noDates; i++) {
168  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
169  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
170  }
171  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
172  a_field->SetMConstants(i, 0); //change the default value of the MConst (=1) to 0 (necessary to correctly execute farm events in case the finishing date (MDate) was moved)
173  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
174  }
175  }
176  }
177  // Now no operations can be timed after the start of the next crop.
178 
179  if (!a_ev->m_first_year) {
180  // Are we before July 1st?
181  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
182  if (g_date->Date() < d1) {
183  // Yes, too early. We assumme this is because the last crop was late
184  printf("Poly: %d\n", a_field->GetPoly());
185  g_msg->Warn(WARN_BUG, "WinterWheat::Do(): ", "Crop start attempt between 1st Jan & 1st July");
186  int prev = a_field->GetLandscape()->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex()));
187  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
188  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
189  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
190  }
191  else {
192  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
193  if (g_date->Date() > d1) {
194  // Yes too late - should not happen - raise an error
195  g_msg->Warn(WARN_BUG, "WinterWheat::Do(): ", "Crop start attempt after last possible start date");
196  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
197  a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex());
198  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
199  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
200  }
201  }
202  }
203  else {
204  // Is the first year
205  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
207  break;
208  }
209  }//if
210 
211  // End single block date checking code. Please see next line comment as well.
212  // Reinit d1 to first possible starting date.
213  d1 = g_date->OldDays() + g_date->DayInYear(21, 8);
214  // OK, let's go.
215  // Here we queue up the first event - this differs depending on whether we have a
216  // stock or arable farmer
217  if (a_farm->IsStockFarmer()) { // StockFarmer
218  SimpleEvent(d1, ww_ferti_s1, false);
219  }
220  else SimpleEvent(d1, ww_ferti_p1, false);
221 
222  }
223  break;
224  // This is the first real farm operation
225  case ww_ferti_p1:
226  // Unless we are forced to do this (probably because we tried once and failed due to bad weather)
227  // then 10% of all threads that reach here will attempt to do ww_feri_p1
228  if (a_ev->m_lock || a_farm->DoIt(10))
229  {
230  // Calls the FP_Slurry application with the number of days after 1,10 as a parameter
231  // the FP_Slurry routine will attempt to apply slurry on a probabilistic basis up to 1,10 when
232  // the operation will be forced
233  // Many other constraints can be added to the FP_Slurry, e.g. temperature might have to be >0 degrees C
234  // Other operations need low wind speed (e.g. spraying insecticide). These differ for each operation
235  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(1, 10) - g_date->DayInYear())) {
236  // If we don't suceed on the first try, then try and try again (until 1/10 when we will suceed)
237  SimpleEvent(g_date->Date() + 1, ww_ferti_p1, true);
238  break;
239  }
240  }
241  // Queue up the next event -in this case autumn ploughing
243  break;
244  case ww_ferti_s1:
245  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(1, 10) - g_date->DayInYear())) {
246  SimpleEvent(g_date->Date() + 1, ww_ferti_s1, true);
247  break;
248  }
249  // This may cause two applications of fertilizer in one day...which is OK because one is Slurry and one Manure
250  SimpleEvent(g_date->Date(), ww_ferti_s2, false);
251  break;
252  case ww_ferti_s2:
253  if (a_ev->m_lock || a_farm->DoIt(10))
254  {
255  if (!a_farm->FA_Manure(a_field, 0.0,
256  g_date->DayInYear(1, 10) - g_date->DayInYear())) {
257  SimpleEvent(g_date->Date() + 1, ww_ferti_s2, true);
258  break;
259  }
260  }
262  break;
263  case ww_autumn_plough:
277  // Almost all will autumn plough, but a few will get away with non-inversion
278  if (a_ev->m_lock || a_farm->DoIt(95))
279  {
280  if (!a_farm->AutumnPlough(a_field, 0.0, g_date->DayInYear(1, 10) - g_date->DayInYear())) {
281  SimpleEvent(g_date->Date() + 1, ww_autumn_plough, true);
282  break;
283  }
284  else
285  {
286  // 95% of farmers will do this, but the other 5% won't so we need to remember whether
287  // we are in one or the other group
288  WW_AUTUMN_PLOUGH = true;
289  // Queue up the next event
290  SimpleEvent(g_date->Date() + 1, ww_autumn_harrow, false);
291  break;
292  }
293  }
294  SimpleEvent(g_date->Date() + 1, ww_stubble_harrow1, false);
295  break;
296  case ww_autumn_harrow:
297  if (!a_farm->AutumnHarrow(a_field, 0.0,
298  g_date->DayInYear(10, 10) - g_date->DayInYear())) {
299  SimpleEvent(g_date->Date() + 1, ww_autumn_harrow, true);
300  break;
301  }
303  ww_autumn_sow, false);
304  break;
305  case ww_stubble_harrow1:
306  if (!a_farm->StubbleHarrowing(a_field, 0.0, g_date->DayInYear(10, 10) - g_date->DayInYear())) {
307  SimpleEvent(g_date->Date() + 1, ww_stubble_harrow1, true);
308  break;
309  }
311  ww_autumn_sow, false);
312  break;
313  case ww_autumn_sow:
314  if (cfg_seedcoating_winterwheat_on.value() && a_field->GetLandscape()->SupplyShouldSpray()) {
315  if (!a_farm->AutumnSow(a_field, 0.0,
316  g_date->DayInYear(20, 10) - g_date->DayInYear(),
318  SimpleEvent(g_date->Date() + 1, ww_autumn_sow, true);
319  break;
320  }
321  }
322  else {
323  if (!a_farm->AutumnSow(a_field, 0.0,
324  g_date->DayInYear(20, 10) - g_date->DayInYear())) {
325  SimpleEvent(g_date->Date() + 1, ww_autumn_sow, true);
326  break;
327  }
328  }
329  SimpleEvent(g_date->Date() + 1, ww_autumn_roll, false);
330  break;
331  case ww_autumn_roll:
332  // If they did plough, then 5% will also do an autumn rolling
333  if ((a_ev->m_lock || a_farm->DoIt(5)) && (WW_AUTUMN_PLOUGH))
334  {
335  if (!a_farm->AutumnRoll(a_field, 0.0,
336  g_date->DayInYear(27, 10) - g_date->DayInYear())) {
337  SimpleEvent(g_date->Date() + 1, ww_autumn_roll, true);
338  break;
339  }
340  }
342  ww_ferti_p2, false);
343  break;
344  // Plant farmers start here.
345  case ww_ferti_p2:
346  if ((a_ev->m_lock || a_farm->DoIt(20)) && (!a_farm->IsStockFarmer()))
347  {
348  if (a_field->GetVegBiomass() > 0)
349  //only apply this when there has been a bit of growth
350  {
351  if (!a_farm->FP_ManganeseSulphate(a_field, 0.0,
352  g_date->DayInYear(30, 10) - g_date->DayInYear()))
353  {
354  SimpleEvent(g_date->Date() + 1, ww_ferti_p2, true);
355  break;
356  }
357  }
358  }
360  ww_herbicide1, false);
361  break;
362  case ww_herbicide1: // The first of the pesticide managements. NB these are externally scalable
363  if (a_ev->m_lock || a_farm->DoIt((int)(80 * cfg_herbi_app_prop.value() * a_farm->Prob_multiplier()))) //modified probability
364  {
365  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(5, 10) - g_date->DayInYear())) {
366  SimpleEvent(g_date->Date() + 1, ww_herbicide1, true);
367  break;
368  }
369  }
370  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4) + 365,
371  ww_spring_roll, false);
372  break;
373  case ww_spring_roll:
374  if (a_ev->m_lock || a_farm->DoIt(5))
375  {
376  if (!a_farm->SpringRoll(a_field, 0.0,
377  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
378  SimpleEvent(g_date->Date() + 1, ww_spring_roll, true);
379  break;
380  }
381  }
382  // Here we split the main thread in to depending on what fertilizer the farmer will use
383  // these rejoin other later on.
384  if (a_farm->IsStockFarmer()) // StockFarmer
385  {
386  SimpleEvent(g_date->Date() + 1, ww_ferti_s3, false);
387  SimpleEvent(g_date->OldDays() + g_date->DayInYear(10, 4), ww_ferti_s4, false);
388  }
389  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 3), ww_ferti_p3, false);
390  // Here we see an example of setting up parallel threads
391  // None of these are the main thread which will lead to the termination of the plan - they
392  // just run along until they peter out e.g. ww_herbicide2
393  // All paths through the plan need the next threads
395  ww_herbicide2, false);
397  ww_GR, false);
399  ww_fungicide, false);
401  ww_insecticide1, false);
403  ww_strigling1, false);
405  ww_water1, false);
406  break;
407  case ww_herbicide2:
408  if (a_ev->m_lock || a_farm->DoIt((int)((int)(69 * cfg_herbi_app_prop.value()*WW_DECIDE_TO_HERB * a_farm->Prob_multiplier())))) // was 40 //modified probability
409  {
410  if (!a_farm->HerbicideTreat(a_field, 0.0,
411  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
412  SimpleEvent(g_date->Date() + 1, ww_herbicide2, true);
413  break;
414  }
415  }
416  // End of thread
417  break;
418  case ww_GR:
419  if (a_ev->m_lock || a_farm->DoIt((int)(15 * cfg_greg_app_prop.value())))
420  {
421  if (!a_farm->GrowthRegulator(a_field, 0.0,
422  g_date->DayInYear(10, 5) - g_date->DayInYear())) {
423  SimpleEvent(g_date->Date() + 1, ww_GR, true);
424  break;
425  }
426  }
427  // End of thread
428  break;
429  case ww_fungicide:
430  if (a_ev->m_lock || a_farm->DoIt((int)(55 * cfg_fungi_app_prop1.value() * a_farm->Prob_multiplier()))) //modified probability
431  {
432  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
433  SimpleEvent(g_date->Date() + 1, ww_fungicide, true);
434  break;
435  }
436 
437  }
438  SimpleEvent(g_date->OldDays() + g_date->DayInYear(20, 5), ww_fungicide2, false);
439  break;
440  case ww_fungicide2:
441  if (a_ev->m_lock || a_farm->DoIt((int)(55 * cfg_fungi_app_prop2.value() * a_farm->Prob_multiplier()))) //modified probability
442  {
443  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
444  SimpleEvent(g_date->Date() + 1, ww_fungicide2, true);
445  break;
446  }
447 
448  }
449  // End of thread
450  break;
451  case ww_insecticide1:
452  if (a_ev->m_lock || a_farm->DoIt((int)(50 * cfg_ins_app_prop1.value() * a_farm->Prob_multiplier()))) //changed from 16, 22.03.13 //modified probability
453  {
454  // Here we check wheter we are using ERA pesticde or not
455  if (!cfg_pest_winterwheat_on.value() || !a_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
456  {
457  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
458  SimpleEvent(g_date->Date() + 1, ww_insecticide1, true);
459  break;
460  }
461  }
462  else
463  {
464  a_farm->ProductApplication(a_field, 0.0, 0, cfg_pest_product_amounts.value(0),ppp_1);
465  }
466 
468  break;
469  }
470  break; // End thread
471  case ww_insecticide2:
472  if (a_ev->m_lock || a_farm->DoIt((int)(50 * cfg_ins_app_prop2.value() *WW_DECIDE_TO_FI * a_farm->Prob_multiplier()))) //modified probability
473  {
474  if (!cfg_pest_winterwheat_on.value() || !a_field->GetLandscape()->SupplyShouldSpray())
475  {
476  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear()))
477  {
478  SimpleEvent(g_date->Date() + 1, ww_insecticide2, true);
479  break;
480  }
481  }
482  else
483  {
484  a_farm->ProductApplication(a_field, 0.0, 0, cfg_pest_product_amounts.value(0), ppp_1);
485  }
486  if ((g_date->Date() + 7) < (g_date->OldDays() + g_date->DayInYear(15, 6)))
488  else SimpleEvent(g_date->Date() + 7, ww_insecticide3, false);
489  break;
490  }
491  break;
492  case ww_insecticide3:
493  if (a_ev->m_lock || a_farm->DoIt((int)(50 * cfg_ins_app_prop3.value() *WW_DECIDE_TO_FI * a_farm->Prob_multiplier()))) //modified probability
494  {
495  if (!cfg_pest_winterwheat_on.value() || !a_field->GetLandscape()->SupplyShouldSpray()) {
496  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
497  SimpleEvent(g_date->Date() + 1, ww_insecticide3, true);
498  break;
499  }
500  }
501  else {
502  a_farm->ProductApplication(a_field, 0.0, 0, cfg_pest_product_amounts.value(0), ppp_1);
503  }
504  }
505  // End of thread
506  break;
507  case ww_strigling1:
508  if (a_ev->m_lock || a_farm->DoIt(5))
509  {
510  if (!a_farm->Strigling(a_field, 0.0,
511  g_date->DayInYear(25, 4) - g_date->DayInYear())) {
512  SimpleEvent(g_date->Date() + 1, ww_strigling1, true);
513  break;
514  }
515  else {
516  if ((g_date->Date() + 7) < (g_date->OldDays() + g_date->DayInYear(15, 6)))
518  ww_strigling2, false);
519  else SimpleEvent(g_date->Date() + 7, ww_strigling2, false);
520  }
521  }
522  break;
523  case ww_strigling2:
524  if (!a_farm->Strigling(a_field, 0.0, g_date->DayInYear(5, 5) - g_date->DayInYear())) {
525  SimpleEvent(g_date->Date() + 1, ww_strigling2, true);
526  break;
527  }
528  // End of thread
529  break;
530  case ww_water1:
531  if (a_ev->m_lock || a_farm->DoIt(10)) // **CJT** Soil type 1-4 only
532  {
533  if (!a_farm->Water(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
534  SimpleEvent(g_date->Date() + 1, ww_water1, true);
535  break;
536  }
537  else
538  if ((g_date->Date() + 5) < (g_date->OldDays() + g_date->DayInYear(2, 5)))
539  SimpleEvent(g_date->OldDays() + g_date->DayInYear(2, 5), ww_water2, false);
540  else SimpleEvent(g_date->Date() + 5, ww_water2, false);
541  }
542  break;
543  case ww_water2:
544  if (!a_farm->Water(a_field, 0.0, g_date->DayInYear(1, 6) - g_date->DayInYear())) {
545  SimpleEvent(g_date->Date() + 1, ww_water2, true);
546  break;
547  }
548  // End of thread
549  break;
550  case ww_ferti_p3:
551  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
552  SimpleEvent(g_date->Date() + 1, ww_ferti_p3, true);
553  break;
554  }
555 
556  SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 4), ww_ferti_p4, false);
557  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), ww_ferti_p5, false);
558  break;
559  case ww_ferti_p4:
560  if (a_ev->m_lock || a_farm->DoIt(50))
561  {
562  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
563  SimpleEvent(g_date->Date() + 1, ww_ferti_p4, true);
564  break;
565  }
566  }
567  // The Main thread
568  // The Main thread - this will leads to harvest, whilst all the others stop before this point
569  // This thread is only for arable farmers whereas you'll see below the other forks for stock farmers
570 
571  ChooseNextCrop(5);
572 
573  SimpleEvent(g_date->OldDays() + g_date->DayInYear(5, 8), ww_harvest, false);
574  break;
575  case ww_ferti_p5:
576  if (a_ev->m_lock || a_farm->DoIt(20))
577  {
578  if (!a_farm->FP_ManganeseSulphate(a_field, 0.0, g_date->DayInYear(5, 5) - g_date->DayInYear())) {
579  SimpleEvent(g_date->Date() + 1, ww_ferti_p5, true);
580  break;
581  }
582  }
583  break;
584  case ww_ferti_s3:
585  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
586  SimpleEvent(g_date->Date() + 1, ww_ferti_s3, true);
587  break;
588  }
589  // The Main thread - this will leads to harvest, whilst all the others stop before this point
590 
591  ChooseNextCrop(5);
592 
593  SimpleEvent(g_date->OldDays() + g_date->DayInYear(5, 8), ww_harvest, false);
594  break;
595  case ww_ferti_s4:
596  if (a_ev->m_lock || a_farm->DoIt(75))
597  {
598  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
599  SimpleEvent(g_date->Date() + 1, ww_ferti_s4, true);
600  break;
601  }
602  SimpleEvent(g_date->OldDays() + g_date->DayInYear(21, 4), ww_ferti_s5, false);
603  }
604  break;
605  case ww_ferti_s5:
606  if (a_ev->m_lock || a_farm->DoIt(40))
607  {
608  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(1, 5) - g_date->DayInYear())) {
609  SimpleEvent(g_date->Date() + 1, ww_ferti_s5, true);
610  break;
611  }
612  }
613  break;
614  case ww_harvest:
615  if (!a_farm->Harvest(a_field, 0.0, g_date->DayInYear(20, 8) - g_date->DayInYear()))
616  {
617  SimpleEvent(g_date->Date() + 1, ww_harvest, true);
618  break;
619  }
621  break;
622  case ww_straw_chopping:
623  if (a_ev->m_lock || a_farm->DoIt(75))
624  {
625  if (a_field->GetMConstants(0) == 0) {
626  if (!a_farm->StrawChopping(a_field, 0.0, -1)) { //raise an error
627  g_msg->Warn(WARN_BUG, "WinterWheat::Do(): failure in 'StrawChopping' execution", "");
628  exit(1);
629  }
630  }
631  else {
632  if (!a_farm->StrawChopping(a_field, 0.0, a_field->GetMDates(1, 0) - g_date->DayInYear())) {
633  SimpleEvent(g_date->Date() + 1, ww_straw_chopping, true);
634  break;
635  }
636  else {
637  SimpleEvent(g_date->Date() + a_field->GetMConstants(0), ww_stubble_harrow2, false); //is this ok?
638  }
639  }
640  }
641  else {
642  SimpleEvent(g_date->Date() + a_field->GetMConstants(0), ww_hay_turning, false);
643  }
644  break;
645  case ww_hay_turning:
646  if (a_ev->m_lock || a_farm->DoIt(5))
647  {
648  if (a_field->GetMConstants(1) == 0) {
649  if (!a_farm->HayTurning(a_field, 0.0, -1)) { //raise an error
650  g_msg->Warn(WARN_BUG, "WinterWheat::Do(): failure in 'HayTurning' execution", "");
651  exit(1);
652  }
653  }
654  else {
655  if (!a_farm->HayTurning(a_field, 0.0, a_field->GetMDates(1, 1) - g_date->DayInYear())) {
656  SimpleEvent(g_date->Date() + 1, ww_hay_turning, true);
657  break;
658  }
659  }
660  }
661  SimpleEvent(g_date->OldDays() + a_field->GetMDates(0, 2), ww_hay_baling, false);
662  break;
663  case ww_hay_baling:
664  if (a_field->GetMConstants(2) == 0) {
665  if (!a_farm->HayBailing(a_field, 0.0, -1)) { //raise an error
666  g_msg->Warn(WARN_BUG, "WinterWheat::Do(): failure in 'HayBailing' execution", "");
667  exit(1);
668  }
669  }
670  else {
671  if (!a_farm->HayBailing(a_field, 0.0, a_field->GetMDates(1, 2) - g_date->DayInYear())) {
672  SimpleEvent(g_date->Date() + 1, ww_hay_baling, true);
673  break;
674  }
675  }
676  SimpleEvent(g_date->OldDays() + a_field->GetMDates(0, 3), ww_stubble_harrow2, false);
677  break;
678  case ww_stubble_harrow2:
679  if (a_ev->m_lock || a_farm->DoIt(65))
680  {
681  if (a_field->GetMConstants(3) == 0) {
682  if (!a_farm->StubbleHarrowing(a_field, 0.0, -1)) { //raise an error
683  g_msg->Warn(WARN_BUG, "WinterWheat::Do(): failure in 'StubbleHarrowing' execution", "");
684  exit(1);
685  }
686  }
687  else {
688  if (!a_farm->StubbleHarrowing(a_field, 0.0, a_field->GetMDates(1, 3) - g_date->DayInYear())) {
689  SimpleEvent(g_date->Date() + 1, ww_stubble_harrow2, true);
690  break;
691  }
692  }
693  }
694  SimpleEvent(g_date->OldDays() + a_field->GetMDates(0, 4), ww_grubning, false);
695  break;
696  case ww_grubning:
697  if (a_ev->m_lock || a_farm->DoIt(10)) {
698  if (a_field->GetMConstants(4) == 0) {
699  if (!a_farm->DeepPlough(a_field, 0.0, -1)) { //raise an error //IS THIS OK - PLOUGH?
700  g_msg->Warn(WARN_BUG, "WinterWheat::Do(): failure in 'DeepPlough' execution", "");
701  exit(1);
702  }
703  }
704  else {
705  if (!a_farm->DeepPlough(a_field, 0.0, a_field->GetMDates(1, 4) - g_date->DayInYear())) {
706  SimpleEvent(g_date->Date() + 1, ww_grubning, true);
707  break;
708  }
709  }
710  }
711  done = true;
712  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
713  // END OF MAIN THREAD
714  break;
715  default:
716  g_msg->Warn(WARN_BUG, "WinterWheat::Do(): "
717  "Unknown event type! ", "");
718  exit(1);
719  }
720  return done;
721 }

References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), cfg_fungi_app_prop1, cfg_fungi_app_prop2, cfg_greg_app_prop, cfg_herbi_app_prop, cfg_ins_app_prop1, cfg_ins_app_prop2, cfg_ins_app_prop3, cfg_pest_product_amounts, cfg_pest_winterwheat_on, cfg_seedcoating_product_amounts, cfg_seedcoating_winterwheat_on, cfg_WinterWheat_SkScrapes, cfg_WW_InsecticideDay, cfg_WW_InsecticideMonth, Crop::ChooseNextCrop(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DeepPlough(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FP_ManganeseSulphate(), Farm::FP_NPK(), Farm::FP_Slurry(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMConstants(), LE::GetMDates(), LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), Farm::GetType(), LE::GetVegBiomass(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::HayTurning(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, LE::m_skylarkscrapes, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::Prob_multiplier(), Farm::ProductApplication(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringRoll(), Farm::StrawChopping(), Farm::Strigling(), Farm::StubbleHarrowing(), tof_OptimisingFarm, CfgInt::value(), CfgFloat::value(), CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, Farm::Water(), ww_autumn_harrow, WW_AUTUMN_PLOUGH, ww_autumn_plough, ww_autumn_roll, ww_autumn_sow, WW_DECIDE_TO_FI, WW_DECIDE_TO_HERB, ww_ferti_p1, ww_ferti_p2, ww_ferti_p3, ww_ferti_p4, ww_ferti_p5, ww_ferti_s1, ww_ferti_s2, ww_ferti_s3, ww_ferti_s4, ww_ferti_s5, ww_fungicide, ww_fungicide2, ww_GR, ww_grubning, ww_harvest, ww_hay_baling, ww_hay_turning, ww_herbicide1, ww_herbicide2, ww_insecticide1, ww_insecticide2, ww_insecticide3, ww_spring_roll, ww_start, ww_straw_chopping, ww_strigling1, ww_strigling2, ww_stubble_harrow1, ww_stubble_harrow2, ww_water1, and ww_water2.

◆ SetUpFarmCategoryInformation()

void WinterWheat::SetUpFarmCategoryInformation ( )
inline
129  {
130  const int elements = 2 + (ww_foobar - WINTERWHEAT_BASE);
132 
133  FarmManagementCategory catlist[elements] =
134  {
135  fmc_Others, // zero element unused but must be here
136  fmc_Others,//ww_start = 1, // Compulsory, must always be 1 (one).
137  fmc_Others,//ww_sleep_all_day = WINTERWHEAT_BASE,
138  fmc_Fertilizer,//ww_ferti_p1,
139  fmc_Fertilizer,//ww_ferti_s1,
140  fmc_Fertilizer,//ww_ferti_s2,
141  fmc_Cultivation,//ww_autumn_plough,
142  fmc_Cultivation,//ww_autumn_harrow,
143  fmc_Cultivation,//ww_stubble_harrow1,
144  fmc_Others,//ww_autumn_sow,
145  fmc_Others,//ww_autumn_roll,
146  fmc_Fertilizer,//ww_ferti_p2,
147  fmc_Herbicide,//ww_herbicide1,
148  fmc_Others,//ww_spring_roll,
149  fmc_Herbicide,//ww_herbicide2,
150  fmc_Others,//ww_GR,
151  fmc_Fungicide,//ww_fungicide,
152  fmc_Fungicide,//ww_fungicide2,
153  fmc_Insecticide,//ww_insecticide1,
154  fmc_Insecticide,//ww_insecticide2,
155  fmc_Insecticide,//ww_insecticide3,
156  fmc_Cultivation,//ww_strigling1,
157  fmc_Cultivation,//ww_strigling2,
158  fmc_Watering,//ww_water1,
159  fmc_Watering,//ww_water2,
160  fmc_Fertilizer,//ww_ferti_p3,
161  fmc_Fertilizer,//ww_ferti_p4,
162  fmc_Fertilizer,//ww_ferti_p5,
163  fmc_Fertilizer,//ww_ferti_s3,
164  fmc_Fertilizer,//ww_ferti_s4,
165  fmc_Fertilizer,//ww_ferti_s5,
166  fmc_Harvest,//ww_harvest,
167  fmc_Others,//ww_straw_chopping,
168  fmc_Others,//ww_hay_turning,
169  fmc_Others,//ww_hay_baling,
170  fmc_Cultivation,//ww_stubble_harrow2,
171  fmc_Cultivation//ww_grubning,
172 
173  // no foobar entry
174 
175  };
176  // Iterate over the catlist elements and copy them to vector
177  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
178 
179  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, Crop::m_ManagementCategories, WINTERWHEAT_BASE, and ww_foobar.

Referenced by WinterWheat().


The documentation for this class was generated from the following files:
ww_hay_baling
Definition: WinterWheat.h:102
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
Farm::SpringRoll
virtual bool SpringRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the spring on a_field.
Definition: FarmFuncs.cpp:487
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
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
WW_DECIDE_TO_FI
#define WW_DECIDE_TO_FI
Definition: WinterWheat.h:60
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
ww_ferti_p1
Definition: WinterWheat.h:71
Farm::Strigling
virtual bool Strigling(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field.
Definition: FarmFuncs.cpp:1206
ww_start
Definition: WinterWheat.h:69
Farm::Harvest
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: FarmFuncs.cpp:1364
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
Farm::FP_ManganeseSulphate
virtual bool FP_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply Manganse Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:840
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
LE::GetMConstants
int GetMConstants(int a)
Definition: Elements.h:407
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::FP_NPK
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:645
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
ww_herbicide2
Definition: WinterWheat.h:82
LE::GetPoly
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: Elements.h:238
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
ww_stubble_harrow2
Definition: WinterWheat.h:103
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
Farm::FA_Manure
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1110
ww_foobar
Definition: WinterWheat.h:105
CfgFloat::value
double value() const
Definition: Configurator.h:142
cfg_WW_InsecticideMonth
CfgInt cfg_WW_InsecticideMonth
Provided to allow configuration control of the first insecticide spray in winter wheat - this changes...
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
cfg_pest_winterwheat_on
CfgBool cfg_pest_winterwheat_on
Turn on pesticides for winter wheat.
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
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
ww_harvest
Definition: WinterWheat.h:99
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
LE::GetVegBiomass
virtual double GetVegBiomass(void)
Definition: Elements.h:164
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.
ww_grubning
Definition: WinterWheat.h:104
cfg_fungi_app_prop1
CfgFloat cfg_fungi_app_prop1
ww_insecticide3
Definition: WinterWheat.h:88
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
cfg_ins_app_prop2
CfgFloat cfg_ins_app_prop2
CfgBool::value
bool value() const
Definition: Configurator.h:164
ww_ferti_s1
Definition: WinterWheat.h:72
Farm::Prob_multiplier
virtual double Prob_multiplier()
Definition: Farm.h:778
ww_fungicide2
Definition: WinterWheat.h:85
ww_hay_turning
Definition: WinterWheat.h:101
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
cfg_seedcoating_product_amounts
CfgArray_Double cfg_seedcoating_product_amounts
Amount of seed coating pesticide applied in grams of active substance per hectare for each of the 10 ...
ww_ferti_s5
Definition: WinterWheat.h:98
LE::m_skylarkscrapes
bool m_skylarkscrapes
For management testing of skylark scrapes.
Definition: Elements.h:95
Calendar::Date
long Date(void)
Definition: Calendar.h:57
cfg_WW_InsecticideDay
CfgInt cfg_WW_InsecticideDay
Provided to allow configuration control of the first insecticide spray in winter wheat - this changes...
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
ww_strigling1
Definition: WinterWheat.h:89
Farm::HayBailing
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
Definition: FarmFuncs.cpp:1507
ww_spring_roll
Definition: WinterWheat.h:81
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
ww_insecticide2
Definition: WinterWheat.h:87
ww_GR
Definition: WinterWheat.h:83
Farm::StrawChopping
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: FarmFuncs.cpp:1475
ww_ferti_p3
Definition: WinterWheat.h:93
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
WW_AUTUMN_PLOUGH
#define WW_AUTUMN_PLOUGH
A flag used to indicate autumn ploughing status.
Definition: WinterWheat.h:58
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
WINTERWHEAT_BASE
#define WINTERWHEAT_BASE
Definition: WinterWheat.h:54
ww_ferti_p2
Definition: WinterWheat.h:79
ww_autumn_roll
Definition: WinterWheat.h:78
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
ww_herbicide1
Definition: WinterWheat.h:80
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
WinterWheat::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: WinterWheat.h:129
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
ww_autumn_sow
Definition: WinterWheat.h:77
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
Farm::AutumnRoll
virtual bool AutumnRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the autumn on a_field.
Definition: FarmFuncs.cpp:299
Farm::FP_Slurry
virtual bool FP_Slurry(LE *a_field, double a_user, int a_days)
Apply slurry to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:823
cfg_ins_app_prop3
CfgFloat cfg_ins_app_prop3
cfg_seedcoating_winterwheat_on
CfgBool cfg_seedcoating_winterwheat_on
Turn on seed coating for winter wheat.
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
ww_fungicide
Definition: WinterWheat.h:84
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
Farm::AutumnPlough
virtual bool AutumnPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the autumn on a_field.
Definition: FarmFuncs.cpp:212
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
cfg_greg_app_prop
CfgFloat cfg_greg_app_prop
Farm::AutumnHarrow
virtual bool AutumnHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the autumn on a_field.
Definition: FarmFuncs.cpp:285
ww_stubble_harrow1
Definition: WinterWheat.h:76
ww_ferti_s4
Definition: WinterWheat.h:97
ww_insecticide1
Definition: WinterWheat.h:86
Farm::DeepPlough
virtual bool DeepPlough(LE *a_field, double a_user, int a_days)
Carry out a deep ploughing event on a_field.
Definition: FarmFuncs.cpp:408
Farm::AutumnSow
virtual bool AutumnSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out a sowing event in the autumn on a_field.
Definition: FarmFuncs.cpp:360
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
ww_strigling2
Definition: WinterWheat.h:90
ww_ferti_p4
Definition: WinterWheat.h:94
WW_DECIDE_TO_HERB
#define WW_DECIDE_TO_HERB
Definition: WinterWheat.h:59
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
ww_autumn_plough
Definition: WinterWheat.h:74
ww_water1
Definition: WinterWheat.h:91
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
cfg_fungi_app_prop2
CfgFloat cfg_fungi_app_prop2
ww_ferti_s2
Definition: WinterWheat.h:73
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
ww_ferti_p5
Definition: WinterWheat.h:95
Crop::ChooseNextCrop
void ChooseNextCrop(int a_no_dates)
Chooses the next crop to grow in a field.
Definition: Farm.cpp:756
Farm::HayTurning
virtual bool HayTurning(LE *a_field, double a_user, int a_days)
Carry out hay turning on a_field.
Definition: FarmFuncs.cpp:1491
ww_straw_chopping
Definition: WinterWheat.h:100
ww_ferti_s3
Definition: WinterWheat.h:96
cfg_herbi_app_prop
CfgFloat cfg_herbi_app_prop
ww_autumn_harrow
Definition: WinterWheat.h:75
WARN_BUG
Definition: MapErrorMsg.h:34
ww_water2
Definition: WinterWheat.h:92
ppp_1
Definition: LandscapeFarmingEnums.h:1079
cfg_WinterWheat_SkScrapes
CfgBool cfg_WinterWheat_SkScrapes("CROP_WW_SK_SCRAPES", CFG_CUSTOM, false)
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523