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
DE_PotatoesIndustry Class Reference

DE_PotatoesIndustry class
. More...

#include <DE_PotatoesIndustry.h>

Inheritance diagram for DE_PotatoesIndustry:
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...
 
 DE_PotatoesIndustry (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

DE_PotatoesIndustry class
.

See DE_PotatoesIndustry.h::DE_PotatoesIndustryToDo for a complete list of all possible events triggered codes by the PotatoesIndustry 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

◆ DE_PotatoesIndustry()

DE_PotatoesIndustry::DE_PotatoesIndustry ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline

When we start it off, the first possible date for a farm operation is 15th September This information is used by other crops when they decide how much post processing of the management is allowed after harvest before the next crop starts.

136  : Crop(a_tov, a_toc, a_L)
137  {
143  m_first_date=g_date->DayInYear( 10,11 ); //EZ: This needs to be changed
145  }

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

Member Function Documentation

◆ Do()

bool DE_PotatoesIndustry::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 m_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.

Reimplemented from Crop.

89 {
90  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
91  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
92  m_field = a_field;
93  m_ev = a_ev;
94  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
95  bool flag = false;
96  int d1 = 0;
97  int noDates = 1;
98  TTypesOfVegetation l_tov = tov_DEPotatoesIndustry; // The current type - change to match the crop you have
99 /**********************************************To Here *************************************************************************/
100 
101  // Depending what event has occured jump to the correct bit of code
102  switch (m_ev->m_todo)
103  {
104  case de_potind_start:
105  {
106  DE_POTIND_FERTI_P1 = false;
107  DE_POTIND_FERTI_S1 = false;
108  DE_POTIND_STUBBLE_PLOUGH = false;
109  DE_POTIND_DID_STRIG1 = false;
111  DE_POTIND_DID_HILL = false;
112  DE_POTIND_DID_DESS = false;
113 
115 
116  m_last_date = g_date->DayInYear(20, 10); // Should match the last flexdate below
117  //Create a 2d array of 1 plus the number of operations you use. Change only 4+1 to what you need in the line below
118  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
119  // Set up the date management stuff
120  // Start and stop dates for all events after harvest
121  flexdates[0][1] = g_date->DayInYear(15, 10); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use
122  // Now these are done in pairs, start & end for each operation. If its not used then -1
123  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
124  flexdates[1][1] = g_date->DayInYear(20, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
125 
126  // Below if this is a spring crop use 365, otherwise set this to 0, second parameter is fixed, and the third is the start up operation in the first year
127  int isSpring = 0;
128  if (StartUpCrop(isSpring, flexdates, int(de_potind_spring_plough))) break;
129 
130  // End single block date checking code. Please see next line comment as well.
131  // Reinit d1 to first possible starting date.
132  d1 = g_date->OldDays() + g_date->DayInYear(20, 7) + isSpring;
133  // OK, let's go.
134  // Here we queue up the first event
135  // stock or arable farmer
136  if (m_ev->m_forcespring) {
137  int day_num_shift = 365;
138  if (g_date->DayInYear() < 70) day_num_shift = 0;
139  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + day_num_shift, de_potind_spring_harrow, false, m_farm, m_field);
140  break;
141  }
142  else {
143  if (m_farm->IsStockFarmer()) { // StockFarmer
145  }
146  else SimpleEvent_(d1, de_potind_ferti_p1, false, m_farm, m_field);
147  break;
148  }
149  }
150  break;
151 
152  // This is the first real farm operation
153  case de_potind_ferti_p1:
154  // In total 10% of arable farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
155  // We therefore assume that half of them (5%) do it now
156  if (m_ev->m_lock || m_farm->DoIt(5))
157  {
158  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
159  // If we don't suceed on the first try, then try and try again
161  break;
162  }
163  else
164  {
165  //Rest of farmers do slurry before autumn plough/stubble cultivation so we need to remember who already did it
166  DE_POTIND_FERTI_P1 = true;
167  }
168  }
169  // Queue up the next event -in this case stubble ploughing
171  break;
172  case de_potind_ferti_s1:
173  // In total 40% of stock farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
174  // We therefore assume that half of them (40%) do it now
175  if (m_ev->m_lock || m_farm->DoIt(40))
176  {
177  if (!m_farm->FA_Slurry(m_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
179  break;
180  }
181  else
182  {
183  //Rest of farmers do slurry before autumn plough/stubble cultivation so we need to remeber who already did it
184  DE_POTIND_FERTI_S1 = true;
185  }
186  }
187  // Queue up the next event -in this case stubble ploughing
189  break;
191  // 30% will do stubble plough, but rest will get away with non-inversion cultivation
192  if (m_ev->m_lock || m_farm->DoIt(30))
193  {
194  if (!m_farm->StubblePlough(m_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
196  break;
197  }
198  else
199  {
200  // 30% of farmers will do this, but the other 70% won't so we need to remember whether we are in one or the other group
202  // Queue up the next event
204  break;
205  }
206  }
208  break;
210  if (!m_farm->AutumnHarrow(m_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
212  break;
213  }
215  break;
217  if (m_ev->m_lock || m_farm->DoIt(40))
218  {
219  if (!m_farm->AutumnHarrow(m_field, 0.0, g_date->Date() + 7 - g_date->DayInYear())) {
221  break;
222  }
223  }
224  d1 = g_date->Date() + 1;
225  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 9)) {
226  d1 = g_date->OldDays() + g_date->DayInYear(10, 9);
227  }
228  if (m_farm->IsStockFarmer()) //Stock Farmer
229  {
231  }
232  else SimpleEvent_(d1, de_potind_ferti_p2, false, m_farm, m_field);
233  break;
235  if (!m_farm->StubbleHarrowing(m_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
237  break;
238  }
239  d1 = g_date->Date() + 1;
240  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 9)) {
241  d1 = g_date->OldDays() + g_date->DayInYear(10, 9);
242  }
243  if (m_farm->IsStockFarmer()) //Stock Farmer
244  {
246  }
247  else SimpleEvent_(d1, de_potind_ferti_p2, false, m_farm, m_field);
248  break;
249  case de_potind_ferti_p2:
250  // In total 10% of arable farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
251  // We therefore assume that half of them (5%) do it now (if haven't done before)
252  if ((m_ev->m_lock || m_farm->DoIt(static_cast<int>((5.0 / 95.0) * 100))) && (DE_POTIND_FERTI_P1 == false))
253  {
254  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
256  break;
257  }
258  }
260  break;
261  case de_potind_ferti_s2:
262  // In total 80% of stock farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
263  // We therefore assume that half of them (40%) do it now (if haven't done before)
264  if ((m_ev->m_lock || m_farm->DoIt(static_cast<int>((40.0 / 60.0) * 100))) && (DE_POTIND_FERTI_S1 == false))
265  {
266  if (!m_farm->FA_Slurry(m_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
268  break;
269  }
270  }
272  break;
274  if (!m_farm->WinterPlough(m_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
276  break;
277  }
278 
280  break;
282  if (!m_farm->SpringHarrow(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
284  break;
285  }
287  break;
289  if ((m_ev->m_lock) || m_farm->DoIt(20))
290  {
291  if (!m_farm->SpringHarrow(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
293  break;
294  }
295  }
296  d1 = g_date->Date() + 1;
297  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 3)) {
298  d1 = g_date->OldDays() + g_date->DayInYear(15, 3);
299  }
300  if (m_farm->IsStockFarmer()) //Stock Farmer
301  {
303  }
304  else SimpleEvent_(d1, de_potind_ferti_p3, false, m_farm, m_field);
305  break;
306  case de_potind_ferti_p3:
307  if (m_ev->m_lock || m_farm->DoIt(70))
308  {
309  if (!m_farm->FP_PK(m_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
311  break;
312  }
313  }
314  d1 = g_date->Date() + 1;
315  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 4)) {
316  d1 = g_date->OldDays() + g_date->DayInYear(1, 4);
317  }
319  break;
320  case de_potind_ferti_s3:
321  if (m_ev->m_lock || m_farm->DoIt(70))
322  {
323  if (!m_farm->FA_PK(m_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
325  break;
326  }
327  }
328  d1 = g_date->Date() + 1;
329  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 4)) {
330  d1 = g_date->OldDays() + g_date->DayInYear(1, 4);
331  }
333  break;
334  case de_potind_ferti_p4:
335  if (m_ev->m_lock || m_farm->DoIt(80))
336  {
337  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
339  break;
340  }
341  }
343  break;
344  case de_potind_ferti_s4:
345  if (m_ev->m_lock || m_farm->DoIt(80))
346  {
347  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
349  break;
350  }
351  }
353  break;
355  if (m_ev->m_lock || m_farm->DoIt(90))
356  {
357  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(25, 4) - g_date->DayInYear())) {
359  break;
360  }
361  }
362  d1 = g_date->Date() + 7;
363  if (d1 < g_date->OldDays() + g_date->DayInYear(20, 4)) {
364  d1 = g_date->OldDays() + g_date->DayInYear(20, 4);
365  }
367  break;
371  break;
372  }
374  break;
376  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(6, 5) - g_date->DayInYear())) {
378  break;
379  }
380  // Fork of events
381  SimpleEvent_(g_date->Date() + 5, de_potind_hilling1, false, m_farm, m_field); // Strigling followed by hilling and herbicides
382  d1 = g_date->Date() + 1;
383  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 5)) {
384  d1 = g_date->OldDays() + g_date->DayInYear(1, 5);
385  }
386  if (m_farm->IsStockFarmer()) //Stock Farmer
387  {
388  SimpleEvent_(d1, de_potind_ferti_s5, false, m_farm, m_field); // N before emergence
389  }
390  else SimpleEvent_(d1, de_potind_ferti_p5, false, m_farm, m_field);
391  SimpleEvent_(g_date->Date() + 25, de_potind_fungicide1, false, m_farm, m_field); // Fungicide treat = MAIN TREAT // EZ: min 3 weeks after planting to have already plants growing
392  SimpleEvent_(g_date->Date() + 25 + m_date_modifier, de_potind_insecticide1, false, m_farm, m_field); // Insecticide treat // EZ: min 3 weeks after planting to have already plants growing
393  break;
394  case de_potind_hilling1:
395  if (m_field->GetGreenBiomass() <= 0)
396  {
397  if (!m_farm->StriglingHill(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
399  break;
400  }
402  break;
403  }
405  break;
406  case de_potind_hilling2:
407  if (m_field->GetGreenBiomass() <= 0)
408  {
409  if (m_ev->m_lock || (m_farm->DoIt(70)))
410  {
411  if (!m_farm->StriglingHill(m_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
413  break;
414  }
415  DE_POTIND_DID_STRIG1 = true;
416  // Queue up the third strigling_hill event after 5 days
418  break;
419  }
420  }
422  break;
423  case de_potind_hilling3:
424  if (m_field->GetGreenBiomass() <= 0)
425  {
426  if (m_ev->m_lock || (m_farm->DoIt(71) && DE_POTIND_DID_STRIG1)) // which gives 50% of all farmers
427  {
428  if (!m_farm->StriglingHill(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
430  break;
431  }
433  break;
434  }
435  }
437  break;
439  if (m_field->GetGreenBiomass() <= 0)
440  {
441  if (m_ev->m_lock || m_farm->DoIt(93))
442  {
443  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(5, 6) - g_date->DayInYear())) {
445  break;
446  }
447  }
449  break;
450  }
452  break;
453  case de_potind_hilling4:
454  if (m_ev->m_lock || m_farm->DoIt(38))
455  {
456  if (m_field->GetGreenBiomass() <= 0) {
458  }
459  else
460  {
461  if (!m_farm->HillingUp(m_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
463  break;
464  }
467  break;
468  }
469  }
471  break;
472  case de_potind_hilling5:
473  if (!m_farm->HillingUp(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
475  break;
476  }
479  break;
480  case de_potind_hilling6:
481  if (!m_farm->HillingUp(m_field, 0.0, g_date->DayInYear(20, 6) - g_date->DayInYear())) {
483  break;
484  }
486  DE_POTIND_DID_HILL = true;
487 
489  break;
491  if (m_ev->m_lock || m_farm->DoIt(40))
492  {
493  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
495  break;
496  }
497  }
498  // End of thread
499  break;
500  case de_potind_ferti_s5:
501  if (m_field->GetGreenBiomass() <= 0)
502  {
503  if (m_ev->m_lock || m_farm->DoIt(80))
504  {
505  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
507  break;
508  }
509  }
510  d1 = g_date->Date() + 7;
511  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 6)) {
512  d1 = g_date->OldDays() + g_date->DayInYear(1, 6);
513  }
515  break;
516  }
517  d1 = g_date->Date() + 7;
518  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 6)) {
519  d1 = g_date->OldDays() + g_date->DayInYear(1, 6);
520  }
522  break;
523 
524  case de_potind_ferti_p5:
525  if (m_field->GetGreenBiomass() <= 0)
526  {
527  if (m_ev->m_lock || m_farm->DoIt(80))
528  {
529  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
531  break;
532  }
533  }
534  d1 = g_date->Date() + 7;
535  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 6)) {
536  d1 = g_date->OldDays() + g_date->DayInYear(1, 6);
537  }
539  break;
540  }
541  d1 = g_date->Date() + 7;
542  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 6)) {
543  d1 = g_date->OldDays() + g_date->DayInYear(1, 6);
544  }
546  break;
547  case de_potind_ferti_s6:
548  if (m_ev->m_lock || m_farm->DoIt(53))
549  {
550  if (DE_POTIND_HILL_DATE >= g_date->Date() - 2) { // Should by at least 3 days after hilling
552  }
553  else
554  {
555  if (!m_farm->FA_ManganeseSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
557  break;
558  }
559  }
560  }
561  // End of thread
562  break;
563  case de_potind_ferti_p6:
564  if (m_ev->m_lock || m_farm->DoIt(53))
565  {
566  if (DE_POTIND_HILL_DATE >= g_date->Date() - 2) { // Should by at least 3 days after hilling
568  }
569  else
570  {
571  if (!m_farm->FP_ManganeseSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
573  break;
574  }
575  }
576  }
577  // End of thread
578  break;
580  // Here comes the fungicide thread = MAIN THREAD
581  if (DE_POTIND_HILL_DATE >= g_date->Date() - 2) { // Should by at least 3 days after hilling
583  }
584  else
585  {
586  if (m_ev->m_lock || m_farm->DoIt(78))
587  {
588  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
590  break;
591  }
592  }
594  break;
595  }
596  break;
598  if (m_ev->m_lock || m_farm->DoIt(63))
599  {
600  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
602  break;
603  }
604  }
606  break;
608  if (m_ev->m_lock || m_farm->DoIt(63))
609  {
610  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
612  break;
613  }
614  }
616  break;
618  if (m_ev->m_lock || m_farm->DoIt(38))
619  {
620  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
622  break;
623  }
624  }
626  break;
628 #ifdef ECOSTACK_BIOPESTICIDE
630 #else
632 #endif
633  {
634  if (DE_POTIND_HILL_DATE >= g_date->Date() - 2) {
636  }
637  else
638  {
639  // here we check whether we are using ERA pesticide or not
640  d1 = g_date->DayInYear(5, 7) - g_date->DayInYear();
641  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
642  {
643 #ifdef ECOSTACK_BIOPESTICIDE
644  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
645 #else
646  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
647 #endif
648  }
649  else {
650  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
651  }
652  if (!flag) {
654  break;
655  }
656 #ifdef ECOSTACK_BIOPESTICIDE
659  break;
660 #endif
661  }
662  }
664  break;
665 
666 
667 #ifdef ECOSTACK_BIOPESTICIDE
670  // here we check whether we are using ERA pesticide or not
671  d1 = g_date->DayInYear(12, 7) - g_date->DayInYear();
672  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
673  if (!flag) {
675  break;
676  }
677  }
678  break; // end of thread
679 #endif
681 #ifdef ECOSTACK_BIOPESTICIDE
683 #else
685 #endif
686  {
687  if (DE_POTIND_HILL_DATE >= g_date->Date() - 2) {
689  }
690  else
691  {
692  // here we check whether we are using ERA pesticide or not
693  d1 = g_date->DayInYear(20, 7) - g_date->DayInYear();
694  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
695  {
696 #ifdef ECOSTACK_BIOPESTICIDE
697  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
698 #else
699  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
700 #endif
701  }
702  else {
703  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
704  }
705  if (!flag) {
707  break;
708  }
709 #ifdef ECOSTACK_BIOPESTICIDE
712  break;
713 #endif
714  }
715  }
717  break;
718 
719 #ifdef ECOSTACK_BIOPESTICIDE
722  // here we check whether we are using ERA pesticide or not
723  d1 = g_date->DayInYear(27, 7) - g_date->DayInYear();
724  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
725  if (!flag) {
727  break;
728  }
729  }
730  break; // end of thread
731 #endif
733 #ifdef ECOSTACK_BIOPESTICIDE
735 #else
737 #endif
738  {
739  if (DE_POTIND_HILL_DATE >= g_date->Date() - 2) {
741  }
742  else
743  {
744  // here we check whether we are using ERA pesticide or not
745  d1 = g_date->DayInYear(15, 8) - g_date->DayInYear();
746  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
747  {
748 #ifdef ECOSTACK_BIOPESTICIDE
749  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
750 #else
751  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
752 #endif
753  }
754  else {
755  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
756  }
757  if (!flag) {
759  break;
760  }
761 #ifdef ECOSTACK_BIOPESTICIDE
763  break; // end of thread
764 #endif
765  }
766  }
767  // end of thread
768  break;
769 #ifdef ECOSTACK_BIOPESTICIDE
772  // here we check whether we are using ERA pesticide or not
773  d1 = g_date->DayInYear(22, 8) - g_date->DayInYear();
774  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
775  if (!flag) {
777  break;
778  }
779  }
780  break; // end of thread
781 #endif
783  // Here the MAIN thread continues
784  // This is the desiccation thread with glyphosate or diquat
785  if (m_ev->m_lock || m_farm->DoIt(35))
786  {
787  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear())) {
789  break;
790  }
791  DE_POTIND_DID_DESS = true;
792  }
794  break;
796  if (m_ev->m_lock || (m_farm->DoIt(17) && DE_POTIND_DID_DESS)) //which is 6% of all farmers
797  {
798  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(7, 9) - g_date->DayInYear())) {
800  break;
801  }
802  }
804  break;
805  case de_potind_harvest:
806  // We don't move harvest days
807  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
809  break;
810  }
811  if (m_farm->IsStockFarmer()) //Stock Farmer
812  {
814  }
815  else SimpleEvent_(g_date->Date() + 1, de_potind_ferti_p7, false, m_farm, m_field);
816  break;
817  case de_potind_ferti_p7:
818  if (m_ev->m_lock || m_farm->DoIt(23))
819  {
820  if (!m_farm->FP_Calcium(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
822  break;
823  }
824  }
825  done = true;
826  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
827  // END of MAIN THREAD
828  break;
829  case de_potind_ferti_s7:
830  if (m_ev->m_lock || m_farm->DoIt(23))
831  {
832  if (!m_farm->FA_Calcium(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
834  break;
835  }
836  }
837  done = true;
838  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
839  // END of MAIN THREAD
840  break;
841  default:
842  g_msg->Warn(WARN_BUG, "DE_OPotatoesIndustry::Do(): "
843  "Unknown event type! ", "");
844  exit(1);
845  }
846  return done;
847 }

References Farm::AutumnHarrow(), Farm::BiocideTreat(), cfg_pest_potatoes_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), de_potind_autumn_harrow1, de_potind_autumn_harrow2, de_potind_bed_forming, de_potind_dessication1, de_potind_dessication2, DE_POTIND_DID_DESS, DE_POTIND_DID_HILL, DE_POTIND_DID_STRIG1, DE_POTIND_FERTI_P1, de_potind_ferti_p1, de_potind_ferti_p2, de_potind_ferti_p3, de_potind_ferti_p4, de_potind_ferti_p5, de_potind_ferti_p6, de_potind_ferti_p7, DE_POTIND_FERTI_S1, de_potind_ferti_s1, de_potind_ferti_s2, de_potind_ferti_s3, de_potind_ferti_s4, de_potind_ferti_s5, de_potind_ferti_s6, de_potind_ferti_s7, de_potind_fungicide1, de_potind_fungicide2, de_potind_fungicide3, de_potind_fungicide4, de_potind_harvest, de_potind_herbicide1, de_potind_herbicide2, DE_POTIND_HILL_DATE, de_potind_hilling1, de_potind_hilling2, de_potind_hilling3, de_potind_hilling4, de_potind_hilling5, de_potind_hilling6, de_potind_insecticide1, de_potind_insecticide1b, de_potind_insecticide2, de_potind_insecticide2b, de_potind_insecticide3, de_potind_insecticide3b, de_potind_spring_harrow, de_potind_spring_harrow2, de_potind_spring_planting, de_potind_spring_plough, de_potind_start, de_potind_stubble_harrow, DE_POTIND_STUBBLE_PLOUGH, de_potind_stubble_plough, de_potind_winter_plough, Farm::DoIt(), Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FA_Calcium(), Farm::FA_ManganeseSulphate(), Farm::FA_PK(), Farm::FA_Slurry(), Farm::FP_AmmoniumSulphate(), Farm::FP_Calcium(), Farm::FP_ManganeseSulphate(), Farm::FP_PK(), Farm::FP_Slurry(), Farm::FungicideTreat(), g_date, g_landscape_ptr, g_msg, LE::GetGreenBiomass(), LE::GetMDates(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::HillingUp(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::PreseedingCultivator(), Farm::ProductApplication(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StriglingHill(), Farm::StubbleHarrowing(), Farm::StubblePlough(), Landscape::SupplyPestIncidenceFactor(), tov_DEPotatoesIndustry, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::WinterPlough().

◆ SetUpFarmCategoryInformation()

void DE_PotatoesIndustry::SetUpFarmCategoryInformation ( )
inline
146  {
147  const int elements = 2 + (de_potind_foobar - DE_POTATOESINDUSTRY_BASE);
149 
150  FarmManagementCategory catlist[elements] =
151  {
152  fmc_Others, // zero element unused but must be here
153  // ALL THE NECESSARY ENTRIES HERE
154  fmc_Others, // de_potind_start = 1, // Compulsory, must always be 1 (one)
155  fmc_Others, // de_potind_sleep_all_day
156  fmc_Cultivation, // de_potind_stubble_harrow,
157  fmc_Cultivation, // de_potind_autumn_harrow1,
158  fmc_Cultivation, // de_potind_autumn_harrow2,
159  fmc_Cultivation, // de_potind_stubble_plough,
160  fmc_Cultivation, // de_potind_winter_plough,
161  fmc_Cultivation, // de_potind_spring_harrow
162  fmc_Fertilizer, // de_potind_ferti_s1
163  fmc_Fertilizer, // de_potind_ferti_p1,
164  fmc_Fertilizer, // de_potind_ferti_s2,
165  fmc_Fertilizer, // de_potind_ferti_p2,
166  fmc_Fertilizer, // de_potind_ferti_p4,
167  fmc_Fertilizer, // de_potind_ferti_s4,
168  fmc_Cultivation, // de_potind_spring_harrow2,
169  fmc_Fertilizer, // de_potind_ferti_p5,
170  fmc_Fertilizer, // de_potind_ferti_s5,
171  fmc_Cultivation, // de_potind_spring_plough,
172  fmc_Cultivation, // de_potind_bed_forming,
173  fmc_Others, // de_potind_spring_planting,
174  fmc_Cultivation, // de_potind_hilling1,
175  fmc_Cultivation, // de_potind_hilling2,
176  fmc_Cultivation, // de_potind_hilling3,
177  fmc_Herbicide, // de_potind_herbicide1,
178  fmc_Cultivation, // de_potind_hilling4,
179  fmc_Cultivation, // de_potind_hilling5,
180  fmc_Cultivation, // de_potind_hilling6,
181  fmc_Herbicide, // de_potind_herbicide2,
182  fmc_Fertilizer, // de_potind_ferti_p6,
183  fmc_Fertilizer, // de_potind_ferti_s6,
184  fmc_Fertilizer, // de_potind_ferti_p7,
185  fmc_Fertilizer, // de_potind_ferti_s7,
186  fmc_Fungicide, // de_potind_fungicide1,
187  fmc_Fungicide, // de_potind_fungicide2,
188  fmc_Fungicide, // de_potind_fungicide3,
189  fmc_Fungicide, // de_potind_fungicide4,
190  fmc_Insecticide, // de_potind_insecticide1,
191  fmc_Insecticide, // de_potind_insecticide2,
192  fmc_Insecticide, // de_potind_insecticide3,
193  fmc_Others, // de_potind_dessication1,
194  fmc_Others, // de_potind_dessication2,
195  fmc_Harvest, // de_potind_harvest,
196  fmc_Fertilizer, // de_potind_ferti_p8,
197  fmc_Fertilizer, // de_potind_ferti_s8,
198  // no foobar entry
199 
200  };
201  // Iterate over the catlist elements and copy them to vector
202  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
203 
204  }

References DE_POTATOESINDUSTRY_BASE, de_potind_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DE_PotatoesIndustry().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
de_potind_autumn_harrow2
Definition: DE_PotatoesIndustry.h:77
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
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
de_potind_ferti_s5
Definition: DE_PotatoesIndustry.h:102
Farm::PreseedingCultivator
virtual bool PreseedingCultivator(LE *a_field, double a_user, int a_days)
Carry out preseeding cultivation on a_field (tilling set including cultivator and string roller to co...
Definition: FarmFuncs.cpp:312
Farm::SpringPlough
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
Definition: FarmFuncs.cpp:421
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
DE_POTIND_DID_STRIG1
#define DE_POTIND_DID_STRIG1
Definition: DE_PotatoesIndustry.h:61
de_potind_harvest
Definition: DE_PotatoesIndustry.h:117
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
de_potind_insecticide2b
Definition: DE_PotatoesIndustry.h:112
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::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
de_potind_ferti_p3
Definition: DE_PotatoesIndustry.h:85
de_potind_fungicide1
Definition: DE_PotatoesIndustry.h:105
de_potind_spring_harrow2
Definition: DE_PotatoesIndustry.h:87
Farm::StubblePlough
virtual bool StubblePlough(LE *a_field, double a_user, int a_days)
Carry out a stubble ploughing event on a_field. This is similar to normal plough but shallow (normall...
Definition: FarmFuncs.cpp:232
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
de_potind_hilling2
Definition: DE_PotatoesIndustry.h:94
de_potind_ferti_p4
Definition: DE_PotatoesIndustry.h:88
de_potind_hilling6
Definition: DE_PotatoesIndustry.h:99
DE_POTIND_DID_HILL
#define DE_POTIND_DID_HILL
Definition: DE_PotatoesIndustry.h:63
Farm::SpringSow
virtual bool SpringSow(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 spring on a_field.
Definition: FarmFuncs.cpp:501
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
de_potind_fungicide3
Definition: DE_PotatoesIndustry.h:107
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
de_potind_ferti_s6
Definition: DE_PotatoesIndustry.h:104
DE_POTIND_FERTI_P1
#define DE_POTIND_FERTI_P1
A flag used to indicate autumn ploughing status.
Definition: DE_PotatoesIndustry.h:58
DE_POTIND_DID_DESS
#define DE_POTIND_DID_DESS
Definition: DE_PotatoesIndustry.h:64
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
Farm::HillingUp
virtual bool HillingUp(LE *a_field, double a_user, int a_days)
Do hilling up on a_field, probably of potatoes.
Definition: FarmFuncs.cpp:1302
de_potind_hilling3
Definition: DE_PotatoesIndustry.h:95
de_potind_ferti_p1
Definition: DE_PotatoesIndustry.h:82
de_potind_spring_planting
Definition: DE_PotatoesIndustry.h:92
de_potind_herbicide2
Definition: DE_PotatoesIndustry.h:100
Farm::FP_PK
virtual bool FP_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:673
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
Farm::StriglingHill
virtual bool StriglingHill(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field followed by hilling up (probably on potatoes)
Definition: FarmFuncs.cpp:1287
CfgBool::value
bool value() const
Definition: Configurator.h:164
DE_POTIND_HILL_DATE
#define DE_POTIND_HILL_DATE
Definition: DE_PotatoesIndustry.h:62
de_potind_dessication2
Definition: DE_PotatoesIndustry.h:116
de_potind_hilling5
Definition: DE_PotatoesIndustry.h:98
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
DE_POTATOESINDUSTRY_BASE
#define DE_POTATOESINDUSTRY_BASE
Definition: DE_PotatoesIndustry.h:54
de_potind_autumn_harrow1
Definition: DE_PotatoesIndustry.h:76
de_potind_ferti_p2
Definition: DE_PotatoesIndustry.h:84
Calendar::Date
long Date(void)
Definition: Calendar.h:57
DE_POTIND_FERTI_S1
#define DE_POTIND_FERTI_S1
Definition: DE_PotatoesIndustry.h:59
Farm::FP_AmmoniumSulphate
virtual bool FP_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply Ammonium Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:882
de_potind_ferti_p6
Definition: DE_PotatoesIndustry.h:103
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
de_potind_ferti_s7
Definition: DE_PotatoesIndustry.h:119
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
Farm::FA_Calcium
virtual bool FA_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:1168
de_potind_insecticide1b
Definition: DE_PotatoesIndustry.h:110
Farm::FA_ManganeseSulphate
virtual bool FA_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply manganese sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1095
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
Farm::FP_Calcium
virtual bool FP_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:954
de_potind_ferti_s1
Definition: DE_PotatoesIndustry.h:81
de_potind_ferti_s3
Definition: DE_PotatoesIndustry.h:86
Crop::StartUpCrop
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 a...
Definition: Farm.cpp:652
Landscape::SupplyPestIncidenceFactor
double SupplyPestIncidenceFactor()
Returns Landscape::m_pestincidencefactor.
Definition: Landscape.h:325
de_potind_ferti_s4
Definition: DE_PotatoesIndustry.h:89
de_potind_hilling1
Definition: DE_PotatoesIndustry.h:93
de_potind_start
Definition: DE_PotatoesIndustry.h:73
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
de_potind_spring_harrow
Definition: DE_PotatoesIndustry.h:80
de_potind_spring_plough
Definition: DE_PotatoesIndustry.h:90
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
cfg_pest_potatoes_on
CfgBool cfg_pest_potatoes_on
Turn on pesticides for potatoes.
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
de_potind_herbicide1
Definition: DE_PotatoesIndustry.h:96
LE::GetGreenBiomass
virtual double GetGreenBiomass(void)
Definition: Elements.h:160
de_potind_insecticide2
Definition: DE_PotatoesIndustry.h:111
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
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
DE_POTIND_STUBBLE_PLOUGH
#define DE_POTIND_STUBBLE_PLOUGH
Definition: DE_PotatoesIndustry.h:60
de_potind_insecticide3b
Definition: DE_PotatoesIndustry.h:114
de_potind_insecticide1
Definition: DE_PotatoesIndustry.h:109
tov_DEPotatoesIndustry
Definition: LandscapeFarmingEnums.h:503
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
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
Farm::FA_AmmoniumSulphate
virtual bool FA_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply ammonium sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1081
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
de_potind_fungicide2
Definition: DE_PotatoesIndustry.h:106
DE_PotatoesIndustry::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DE_PotatoesIndustry.h:146
de_potind_ferti_p5
Definition: DE_PotatoesIndustry.h:101
Crop::m_date_modifier
static int m_date_modifier
Holds a value that shifts test pesticide use by this many days in crops modified to use it.
Definition: Farm.h:514
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
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.
Farm::WinterPlough
virtual bool WinterPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the winter on a_field.
Definition: FarmFuncs.cpp:395
de_potind_stubble_plough
Definition: DE_PotatoesIndustry.h:78
de_potind_stubble_harrow
Definition: DE_PotatoesIndustry.h:75
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Farm::FA_PK
virtual bool FA_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1010
de_potind_bed_forming
Definition: DE_PotatoesIndustry.h:91
de_potind_insecticide3
Definition: DE_PotatoesIndustry.h:113
g_landscape_ptr
Landscape * g_landscape_ptr
Definition: Landscape.cpp:352
de_potind_fungicide4
Definition: DE_PotatoesIndustry.h:108
de_potind_ferti_p7
Definition: DE_PotatoesIndustry.h:118
de_potind_dessication1
Definition: DE_PotatoesIndustry.h:115
de_potind_hilling4
Definition: DE_PotatoesIndustry.h:97
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
de_potind_foobar
Definition: DE_PotatoesIndustry.h:120
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
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
Farm::SpringHarrow
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: FarmFuncs.cpp:459
de_potind_winter_plough
Definition: DE_PotatoesIndustry.h:79
Crop::SimpleEvent_
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.
Definition: Farm.cpp:751
de_potind_ferti_s2
Definition: DE_PotatoesIndustry.h:83