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

DK_OrchPear class
. More...

#include <DK_OrchPear.h>

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

DK_OrchPear class
.

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

◆ DK_OrchPear()

DK_OrchPear::DK_OrchPear ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
130  : Crop(a_tov, a_toc, a_L)
131  {
132  // When we start it off, the first possible date for a farm operation is ...
133  // This information is used by other crops when they decide how much post processing of
134  // the management is allowed after harvest before the next crop starts.
135  m_first_date=g_date->DayInYear( 30,4 );
137  }

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

Member Function Documentation

◆ Do()

bool DK_OrchPear::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.

Reimplemented from Crop.

65 {
66  m_farm = a_farm;
67  m_field = a_field;
68  m_ev = a_ev;
69  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true, m_farm, m_field).
70  bool flag = false;
71  int d1 = 0;
72  int noDates = 1;
74  // Depending what event has occured jump to the correct bit of code
75  switch (m_ev->m_todo)
76  {
77  case dk_ope_start:
78  {
79  // dk_ope_start just sets up all the starting conditions and reference dates that are needed to start a dk_ope
80 
82 
83  a_field->ClearManagementActionSum();
84 
85  m_last_date = g_date->DayInYear(31, 12); // Should match the last flexdate below
86  //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
87  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
88  // Set up the date management stuff
89  // Start and stop dates for all events after harvest
90  flexdates[0][1] = g_date->DayInYear(31, 12); // last possible day of cutting orch
91  // Now these are done in pairs, start & end for each operation. If its not used then -1
92  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
93  flexdates[1][1] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
94 
95  // Below if this is a spring crop use 365, otherwise first parameter is always 0, second parameter is fixed, and the third is the start up operation in the first year
96  int isSpring = 365;
97  if (StartUpCrop(isSpring, flexdates, int(dk_ope_spring_plough))) break;
98 
99  // End single block date checking code. Please see next line comment as well.
100  // Reinit d1 to first possible starting date.
101  // Here we queue up the first event
102  //Each field has assign randomly a DK_oap_YEARS_AFTER_PLANT
103  if (m_ev->m_forcespring) {
104  int day_num_shift = 365;
105  if (g_date->DayInYear() < 70) day_num_shift = 0;
106  if ((DK_OPE_YEARS_AFTER_PLANT + g_date->GetYearNumber()) % 1 == 1)
107  {
108  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + day_num_shift;
109  SimpleEvent(d1, dk_ope_spring_plough, false);
110  }
111  else if ((DK_OPE_YEARS_AFTER_PLANT + g_date->GetYearNumber()) % 1 == 0)
112  {
113  d1 = g_date->OldDays() + g_date->DayInYear(1, 1) + day_num_shift;
114  SimpleEvent(d1, dk_ope_sleep_all_day, false);
115  }
116  break;
117  }
118  else
119  if ((DK_OPE_YEARS_AFTER_PLANT + g_date->GetYearNumber()) % 1 == 1)
120  {
121  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + isSpring;
122  SimpleEvent(d1, dk_ope_spring_plough, false);
123  }
124  else if ((DK_OPE_YEARS_AFTER_PLANT + g_date->GetYearNumber()) % 1 == 0)
125  {
126  d1 = g_date->OldDays() + g_date->DayInYear(1, 1) + isSpring;
127  SimpleEvent(d1, dk_ope_sleep_all_day, false);
128  }
129  break;
130 
131  }
132  break;
133 
134  // LKM: This is the first real farm operation
136  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
137  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
139  break;
140  }
141  }
142  SimpleEvent(g_date->Date() + 1, dk_ope_manure_s1, false);
143  break;
144 
145  case dk_ope_manure_s1:
146  if (a_farm->IsStockFarmer()) {
147  if (!a_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
148  SimpleEvent(g_date->Date() + 1, dk_ope_manure_s1, true);
149  break;
150  }
151  SimpleEvent(g_date->Date() + 1, dk_ope_water1, false);
152  break;
153  }
155  break;
156 
157  case dk_ope_manure_p1:
158  if (!a_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
159  SimpleEvent(g_date->Date() + 1, dk_ope_manure_p1, true);
160  break;
161  }
162  SimpleEvent(g_date->Date() + 1, dk_ope_water1, false);
163  break;
164 
165  case dk_ope_water1:
166  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
167  SimpleEvent(g_date->Date() + 1, dk_ope_water1, true);
168  break;
169  }
170  SimpleEvent(g_date->Date() + 1, dk_ope_subsoiler, false);
171  break;
172 
173  case dk_ope_subsoiler:
174  if (!a_farm->DeepPlough(m_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
175  SimpleEvent(g_date->Date() + 1, dk_ope_subsoiler, true);
176  break;
177  }
178  d1 = g_date->Date();
179  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 4)) {
180  d1 = g_date->OldDays() + g_date->DayInYear(1, 4);
181  }
182  SimpleEvent(d1, dk_ope_planting, false);
183  break;
184  case dk_ope_planting:
185  if (!a_farm->SpringSow(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
186  SimpleEvent(g_date->Date() + 1, dk_ope_planting, true);
187  break;
188  }
189  SimpleEvent(g_date->Date(), dk_ope_sow_grass, false); // sow thread
190  SimpleEvent(g_date->Date(), dk_ope_manual_cutting5, false); // cutting thread
191  d1 = g_date->Date();
192  if (d1 > g_date->OldDays() + g_date->DayInYear(1, 5)) {
193  d1 = g_date->OldDays() + g_date->DayInYear(1, 5);
194  }
195  SimpleEvent(d1, dk_ope_herbicide1, false); // herbicide thread
196  break;
197 
198  case dk_ope_sow_grass:
199  if (!a_farm->SpringSow(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
200  SimpleEvent(g_date->Date() + 1, dk_ope_sow_grass, true);
201  break;
202  }
203  break; // end of thread
204 
205  case dk_ope_herbicide1: // Starane
206  if (!a_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
207  SimpleEvent(g_date->Date() + 1, dk_ope_herbicide1, true);
208  break;
209  }
211  break;
212 
213  case dk_ope_herbicide2:// Round Up
214  if (!a_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
215  SimpleEvent(g_date->Date() + 1, dk_ope_herbicide2, true);
216  break;
217  }
219  break;
220 
221  case dk_ope_herbicide3: // MCPA
222  if (!a_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
223  SimpleEvent(g_date->Date() + 1, dk_ope_herbicide3, true);
224  break;
225  }
227  break;
228 
229  case dk_ope_herbicide4: // Round Up
230  if (!a_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
231  SimpleEvent(g_date->Date() + 1, dk_ope_herbicide4, true);
232  break;
233  }
234  done = true;
235  break; // end of establishment
236 
237  // start of years after planting year:
239  if (!a_farm->SleepAllDay(m_field, 0.0, g_date->DayInYear(31, 1) - g_date->DayInYear())) {
241  break;
242  }
244  break;
245 
247  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(31, 1) - g_date->DayInYear())) {
249  break;
250  }
251  SimpleEvent(g_date->Date() + 25, dk_ope_manual_cutting2, false); // thread for manual cutting (once a month)
252  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3), dk_ope_manure_s2, false); // main thread
253  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3), dk_ope_herbicide5, false); // herbicide thread
254  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3), dk_ope_fungicide1, false); // fungicide thread
255  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4) + m_date_modifier, dk_ope_insecticide1, false); // insecticide1 thread
256  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4) + m_date_modifier, dk_ope_insecticide2, false); // insecticide2 thread
257  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4) + m_date_modifier, dk_ope_insecticide3, false); // insecticide3 thread
258  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_ope_gr1, false); // growth regulator1 thread
259  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_ope_gr3, false); // growth regulator3 thread
260  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_ope_boron_s, false); // fertilizer thread
261  break;
263  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(28, 2) - g_date->DayInYear())) {
265  break;
266  }
268  break;
270  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
272  break;
273  }
275  break;
277  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
279  break;
280  }
282  break;
284  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
286  break;
287  }
289  break;
291  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
293  break;
294  }
296  break;
298  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
300  break;
301  }
303  break;
305  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
307  break;
308  }
310  break;
312  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(30, 9) - g_date->DayInYear())) {
314  break;
315  }
317  break;
319  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
321  break;
322  }
324  break;
326  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
328  break;
329  }
330  break;
331  // end of cutting thread
332 
333  case dk_ope_herbicide5: // Round Up
334  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
335  if (!a_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
336  SimpleEvent(g_date->Date() + 1, dk_ope_herbicide5, true);
337  break;
338  }
339  }
341  break;
342 
343  case dk_ope_herbicide6: // Starane
344  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
345  if (!a_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
346  SimpleEvent(g_date->Date() + 1, dk_ope_herbicide6, true);
347  break;
348  }
349  }
351  break;
352 
353  case dk_ope_herbicide7:// Round Up
354  if (!a_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
355  SimpleEvent(g_date->Date() + 1, dk_ope_herbicide7, true);
356  break;
357  }
359  break;
360 
361  case dk_ope_herbicide8: // MCPA
362  if (!a_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
363  SimpleEvent(g_date->Date() + 1, dk_ope_herbicide8, true);
364  break;
365  }
367  break;
368 
369  case dk_ope_herbicide9: // Round Up
370  if (!a_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
371  SimpleEvent(g_date->Date() + 1, dk_ope_herbicide9, true);
372  break;
373  }
374  break; // end of thread
375 
376 
377  // fertilizer thread:
378  case dk_ope_boron_s:
379  if (a_farm->IsStockFarmer()) {
380  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
381  if (!a_farm->FA_Boron(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
382  SimpleEvent(g_date->Date() + 1, dk_ope_boron_s, true);
383  break;
384  }
385  }
386  break;
387  }
388  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_ope_boron_p, false);
389  break;
390 
391  case dk_ope_boron_p:
392  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
393  if (!a_farm->FP_Boron(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
394  SimpleEvent(g_date->Date() + 1, dk_ope_boron_p, true);
395  break;
396  }
397  }
398  break;
399  // end of fertilizer thread
400  // pesticide thread:
401  case dk_ope_fungicide1: //Syllit
402  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
403  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
404  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide1, true);
405  break;
406  }
407  }
408  SimpleEvent(g_date->Date()+10, dk_ope_fungicide2, false);
416  break;
417 
418  case dk_ope_fungicide2: // Syllit
419  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
420  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
421  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide2, true);
422  break;
423  }
424  }
425  break;
426 
427  case dk_ope_fungicide3: // Candit
428  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
429  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
430  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide3, true);
431  break;
432  }
433  }
434  break;
435 
436  case dk_ope_fungicide4: // Scala
437  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
438  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide4, true);
439  break;
440  }
441  break;
442 
443  case dk_ope_fungicide5: // Kumulus S
444  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(22, 4) - g_date->DayInYear())) {
445  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide5, true);
446  break;
447  }
448  SimpleEvent(g_date->Date() + 7, dk_ope_fungicide6, false);
449  break;
450 
451  case dk_ope_fungicide6: // Kumulus S
452  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
453  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide6, true);
454  break;
455  }
456  break;
457 
458  case dk_ope_fungicide7: // Difcor
459  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
460  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide7, true);
461  break;
462  }
463  break;
464 
465  case dk_ope_fungicide8: // Talius
466  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
467  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide8, true);
468  break;
469  }
470  break;
471 
472  case dk_ope_fungicide9: // Delan WG
473  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
474  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide9, true);
475  break;
476  }
477  SimpleEvent(g_date->Date() + 10, dk_ope_fungicide10, false);
478  break;
479 
480  case dk_ope_fungicide10: // Delan WG
481  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(10, 8) - g_date->DayInYear())) {
482  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide10, true);
483  break;
484  }
485  SimpleEvent(g_date->Date() + 10, dk_ope_fungicide11, false);
486  break;
487 
488  case dk_ope_fungicide11: // Delan WG
489  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(20, 8) - g_date->DayInYear())) {
490  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide11, true);
491  break;
492  }
493  SimpleEvent(g_date->Date() + 10, dk_ope_fungicide12, false);
494  break;
495 
496  case dk_ope_fungicide12: // Delan WG
497  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(12, 8) - g_date->DayInYear())) {
498  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide12, true);
499  break;
500  }
501  break;
502 
503  case dk_ope_fungicide13: // Kumulus S
504  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(23, 8) - g_date->DayInYear())) {
505  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide13, true);
506  break;
507  }
508  SimpleEvent(g_date->Date() + 7, dk_ope_fungicide14, false);
509  break;
510 
511  case dk_ope_fungicide14: // Kumulus S
512  if (!a_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
513  SimpleEvent(g_date->Date() + 1, dk_ope_fungicide14, true);
514  break;
515  }
516  break;
517  // end of thread
518 
519  case dk_ope_insecticide1: // Teppeki/Mospilan
520  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
521  // here we check whether we are using ERA pesticide or not
522  d1 = g_date->DayInYear(30, 4) - g_date->DayInYear();
523  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
524  {
525  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
526  }
527  else {
528  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
529  }
530  if (!flag) {
532  break;
533  }
534  }
535  break;
536 
537  case dk_ope_insecticide2: // Lamdex
538  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
539  // here we check whether we are using ERA pesticide or not
540  d1 = g_date->DayInYear(30, 4) - g_date->DayInYear();
541  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
542  {
543  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
544  }
545  else {
546  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
547  }
548  if (!flag) {
550  break;
551  }
552  }
553  break;
554 
555  case dk_ope_insecticide3: // Steward
556  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
557  // here we check whether we are using ERA pesticide or not
558  d1 = g_date->DayInYear(30, 4) - g_date->DayInYear();
559  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
560  {
561  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
562  }
563  else {
564  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
565  }
566  if (!flag) {
568  break;
569  }
570  }
572  break;
573 
574  case dk_ope_insecticide4: // Mospilan
575  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
576  // here we check whether we are using ERA pesticide or not
577  d1 = g_date->DayInYear(31, 5) - g_date->DayInYear();
578  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
579  {
580  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
581  }
582  else {
583  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
584  }
585  if (!flag) {
587  break;
588  }
589  }
593  break;
594 
595  case dk_ope_insecticide5:// Madex Top
596  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
597  // here we check whether we are using ERA pesticide or not
598  d1 = g_date->DayInYear(10, 8) - g_date->DayInYear();
599  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
600  {
601  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
602  }
603  else {
604  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
605  }
606  if (!flag) {
608  break;
609  }
610  }
612  break;
613 
614  case dk_ope_insecticide6:// Madex Top
615  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
616  // here we check whether we are using ERA pesticide or not
617  d1 = g_date->DayInYear(20, 8) - g_date->DayInYear();
618  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
619  {
620  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
621  }
622  else {
623  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
624  }
625  if (!flag) {
627  break;
628  }
629  }
630  SimpleEvent(g_date->Date() + 10, dk_ope_insecticide7, false);
631  break;
632 
633  case dk_ope_insecticide7:// Madex Top
634  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
635  // here we check whether we are using ERA pesticide or not
636  d1 = g_date->DayInYear(31, 8) - g_date->DayInYear();
637  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
638  {
639  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
640  }
641  else {
642  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
643  }
644  if (!flag) {
646  break;
647  }
648  }
649  break;
650 
651  case dk_ope_insecticide8:// Teppeki
652  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
653  // here we check whether we are using ERA pesticide or not
654  d1 = g_date->DayInYear(31, 8) - g_date->DayInYear();
655  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
656  {
657  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
658  }
659  else {
660  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
661  }
662  if (!flag) {
664  break;
665  }
666  }
667  break;
668 
669  case dk_ope_insecticide9:// Signum
670  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
671  // here we check whether we are using ERA pesticide or not
672  d1 = g_date->DayInYear(2, 9) - g_date->DayInYear();
673  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
674  {
675  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
676  }
677  else {
678  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
679  }
680  if (!flag) {
682  break;
683  }
684  }
685  SimpleEvent(g_date->Date() + 10, dk_ope_insecticide10, false);
686  break;
687 
688  case dk_ope_insecticide10:// Signum
689  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
690  // here we check whether we are using ERA pesticide or not
691  d1 = g_date->DayInYear(12, 9) - g_date->DayInYear();
692  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
693  {
694  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
695  }
696  else {
697  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
698  }
699  if (!flag) {
701  break;
702  }
703  }
704  break; // end of thread
705 
706  //GR threads
707  case dk_ope_gr1: // Cerone
708  if (!a_farm->GrowthRegulator(m_field, 0.0, g_date->DayInYear(20, 8) - g_date->DayInYear())) {
709  SimpleEvent(g_date->Date() + 1, dk_ope_gr1, true);
710  break;
711  }
712  SimpleEvent(g_date->Date() + 7, dk_ope_gr2, false);
713  break;
714 
715  case dk_ope_gr2: // Cerone
716  if (!a_farm->GrowthRegulator(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
717  SimpleEvent(g_date->Date() + 1, dk_ope_gr2, true);
718  break;
719  }
720  break;
721 
722  case dk_ope_gr3: // Regalis plus
723  if (!a_farm->GrowthRegulator(m_field, 0.0, g_date->DayInYear(7, 5) - g_date->DayInYear())) {
724  SimpleEvent(g_date->Date() + 1, dk_ope_gr3, true);
725  break;
726  }
727  SimpleEvent(g_date->Date() + 21, dk_ope_gr4, false);
728  break;
729 
730  case dk_ope_gr4: // Regalis Plus
731  if (!a_farm->GrowthRegulator(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
732  SimpleEvent(g_date->Date() + 1, dk_ope_gr4, true);
733  break;
734  }
735  break;
736  // end of GRs threads
737 
738  case dk_ope_manure_s2:
739  if (a_farm->IsStockFarmer()) {
740  if (!a_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(1, 4) - g_date->DayInYear())) {
741  SimpleEvent(g_date->Date() + 1, dk_ope_manure_s2, true);
742  break;
743  }
744  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_ope_row_cultivation1, false); //row cultivation thread
745  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_ope_water2, false); // water thread
746  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_ope_cutting1, false); // cutting grass thread
747  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 6), dk_ope_remove_fruits, false); // main thread
748  break;
749  }
750  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3), dk_ope_manure_p2, false);
751  break;
752 
753  case dk_ope_manure_p2:
754  if (!a_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(1, 4) - g_date->DayInYear())) {
755  SimpleEvent(g_date->Date() + 1, dk_ope_manure_s2, true);
756  break;
757  }
758  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_ope_row_cultivation1, false); //row cultivation thread
759  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_ope_water2, false); // water thread
760  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_ope_cutting1, false); // cutting grass thread
761  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 6), dk_ope_remove_fruits, false); // main thread
762  break;
763 
765  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) { // suggestion - not so often in conv. orchards
766  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
768  break;
769  }
770  }
772  break;
773 
775  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) { // suggestion - not so often in conv. orchards
776  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
778  break;
779  }
780  }
781  break;
782  // end of thread
783 
784  //Here comes water thread:
785  case dk_ope_water2:
786  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(1, 5) - g_date->DayInYear())) {
787  SimpleEvent(g_date->Date() + 1, dk_ope_water2, true);
788  break;
789  }
790  SimpleEvent(g_date->Date() + 25, dk_ope_water3, false);
791  break;
792  case dk_ope_water3:
793  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(1, 6) - g_date->DayInYear())) {
794  SimpleEvent(g_date->Date() + 1, dk_ope_water3, true);
795  break;
796  }
797  SimpleEvent(g_date->Date() + 25, dk_ope_water4, false);
798  break;
799  case dk_ope_water4:
800  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(1, 7) - g_date->DayInYear())) {
801  SimpleEvent(g_date->Date() + 1, dk_ope_water4, true);
802  break;
803  }
804  SimpleEvent(g_date->Date() + 25, dk_ope_water5, false);
805  break;
806  case dk_ope_water5:
807  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
808  SimpleEvent(g_date->Date() + 1, dk_ope_water5, true);
809  break;
810  }
811  SimpleEvent(g_date->Date() + 25, dk_ope_water6, false);
812  break;
813  case dk_ope_water6:
814  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(1, 9) - g_date->DayInYear())) {
815  SimpleEvent(g_date->Date() + 1, dk_ope_water6, true);
816  break;
817  }
818  SimpleEvent(g_date->Date() + 25, dk_ope_water7, false);
819  break;
820  case dk_ope_water7:
821  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(1, 10) - g_date->DayInYear())) {
822  SimpleEvent(g_date->Date() + 1, dk_ope_water7, true);
823  break;
824  }
825  break;
826  // end of thread
827  // cutting grass thread:
828 
829  case dk_ope_cutting1:
830  if (!a_farm->CutOrch(m_field, 0.0, g_date->DayInYear(1, 6) - g_date->DayInYear())) {
831  SimpleEvent(g_date->Date() + 1, dk_ope_cutting1, true);
832  break;
833  }
834  SimpleEvent(g_date->Date() + 25, dk_ope_cutting2, false);
835  break;
836  case dk_ope_cutting2:
837  if (!a_farm->CutOrch(m_field, 0.0, g_date->DayInYear(1, 7) - g_date->DayInYear())) {
838  SimpleEvent(g_date->Date() + 1, dk_ope_cutting2, true);
839  break;
840  }
841  SimpleEvent(g_date->Date() + 25, dk_ope_cutting3, false);
842  break;
843  case dk_ope_cutting3:
844  if (!a_farm->CutOrch(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
845  SimpleEvent(g_date->Date() + 1, dk_ope_cutting3, true);
846  break;
847  }
848  SimpleEvent(g_date->Date() + 25, dk_ope_cutting4, false);
849  break;
850  case dk_ope_cutting4:
851  if (!a_farm->CutOrch(m_field, 0.0, g_date->DayInYear(1, 9) - g_date->DayInYear())) {
852  SimpleEvent(g_date->Date() + 1, dk_ope_cutting4, true);
853  break;
854  }
855  SimpleEvent(g_date->Date() + 25, dk_ope_cutting5, false);
856  break;
857  case dk_ope_cutting5:
858  if (!a_farm->CutOrch(m_field, 0.0, g_date->DayInYear(1, 10) - g_date->DayInYear())) {
859  SimpleEvent(g_date->Date() + 1, dk_ope_cutting5, true);
860  break;
861  }
862  SimpleEvent(g_date->Date() + 25, dk_ope_cutting6, false);
863  break;
864  case dk_ope_cutting6:
865  if (!a_farm->CutOrch(m_field, 0.0, g_date->DayInYear(1, 11) - g_date->DayInYear())) {
866  SimpleEvent(g_date->Date() + 1, dk_ope_cutting6, true);
867  break;
868  }
869  break;
870  // end of thread
871 
873  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
875  break;
876  }
878  break;
879  case dk_ope_harvest:
880  if (!a_farm->FruitHarvest(m_field, 0.0, g_date->DayInYear(1, 11) - g_date->DayInYear())) {
881  SimpleEvent(g_date->Date() + 1, dk_ope_harvest, true);
882  break;
883  }
885  break;
887  if (!a_farm->Pruning(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
889  break;
890  }
891  done = true;
892  break;
893  // So we are done, and somewhere else the farmer will queue up the start event of the next crop (DK_OrchPear)
894  // END of MAIN THREAD
895  break;
896  default:
897  g_msg->Warn(WARN_BUG, "DK_OrchPear::Do(): "
898  "Unknown event type! ", "");
899  exit(1);
900  }
901  if (done) m_ev->m_forcespring = true; // Here we need to force the next crop to spring operation, so set the ev->forcespring to true
902  return done;
903 }

References cfg_pest_orchard_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Farm::CutOrch(), Calendar::Date(), Calendar::DayInYear(), Farm::DeepPlough(), dk_ope_boron_p, dk_ope_boron_s, dk_ope_cutting1, dk_ope_cutting2, dk_ope_cutting3, dk_ope_cutting4, dk_ope_cutting5, dk_ope_cutting6, dk_ope_fungicide1, dk_ope_fungicide10, dk_ope_fungicide11, dk_ope_fungicide12, dk_ope_fungicide13, dk_ope_fungicide14, dk_ope_fungicide2, dk_ope_fungicide3, dk_ope_fungicide4, dk_ope_fungicide5, dk_ope_fungicide6, dk_ope_fungicide7, dk_ope_fungicide8, dk_ope_fungicide9, dk_ope_gr1, dk_ope_gr2, dk_ope_gr3, dk_ope_gr4, dk_ope_harvest, dk_ope_herbicide1, dk_ope_herbicide2, dk_ope_herbicide3, dk_ope_herbicide4, dk_ope_herbicide5, dk_ope_herbicide6, dk_ope_herbicide7, dk_ope_herbicide8, dk_ope_herbicide9, dk_ope_insecticide1, dk_ope_insecticide10, dk_ope_insecticide2, dk_ope_insecticide3, dk_ope_insecticide4, dk_ope_insecticide5, dk_ope_insecticide6, dk_ope_insecticide7, dk_ope_insecticide8, dk_ope_insecticide9, dk_ope_manual_cutting1, dk_ope_manual_cutting10, dk_ope_manual_cutting11, dk_ope_manual_cutting12, dk_ope_manual_cutting2, dk_ope_manual_cutting3, dk_ope_manual_cutting4, dk_ope_manual_cutting5, dk_ope_manual_cutting6, dk_ope_manual_cutting7, dk_ope_manual_cutting8, dk_ope_manual_cutting9, dk_ope_manure_p1, dk_ope_manure_p2, dk_ope_manure_s1, dk_ope_manure_s2, dk_ope_planting, dk_ope_remove_fruits, dk_ope_row_cultivation1, dk_ope_row_cultivation2, dk_ope_sleep_all_day, dk_ope_sow_grass, dk_ope_spring_plough, dk_ope_start, dk_ope_subsoiler, dk_ope_water1, dk_ope_water2, dk_ope_water3, dk_ope_water4, dk_ope_water5, dk_ope_water6, dk_ope_water7, DK_OPE_YEARS_AFTER_PLANT, Farm::DoIt_prob(), Farm::FA_Boron(), Farm::FA_Manure(), Farm::FP_Boron(), Farm::FP_Manure(), Farm::FruitHarvest(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::HerbicideTreat(), 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::ProductApplication(), Farm::Pruning(), Farm::RowCultivation(), Crop::SimpleEvent(), Farm::SleepAllDay(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), tov_DKOrchPear, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_OrchPear::SetUpFarmCategoryInformation ( )
inline
138  {
139  const int elements = 2 + (dk_ope_foobar - DK_OPE_BASE);
141 
142  FarmManagementCategory catlist[elements] =
143  {
144  fmc_Others, // zero element unused but must be here
145  fmc_Others, // dk_ope_start = 1, // Compulsory, must always be 1 (one).
146  fmc_Others, // dk_ope_sleep_all_day = DK_OPE_BASE,
147  fmc_Cultivation, //dk_ope_spring_plough,
148  fmc_Fertilizer, //dk_ope_manure_s1,
149  fmc_Fertilizer, //dk_ope_manure_p1,
150  fmc_Watering, //dk_ope_water1,
151  fmc_Cultivation, //dk_ope_subsoiler,
152  fmc_Others, //dk_ope_planting,
153  fmc_Others, //dk_ope_sow_grass,
154  fmc_Insecticide, //dk_ope_insecticide1,
155  fmc_Insecticide, //dk_ope_insecticide2,
156  fmc_Insecticide, //dk_ope_insecticide3,
157  fmc_Insecticide, //dk_ope_insecticide4,
158  fmc_Insecticide, //dk_ope_insecticide5,
159  fmc_Insecticide, //dk_ope_insecticide6,
160  fmc_Insecticide, //dk_ope_insecticide7,
161  fmc_Insecticide, //dk_ope_insecticide8,
162  fmc_Insecticide, //dk_ope_insecticide9,
163  fmc_Insecticide, //dk_ope_insecticide10,
164  fmc_Herbicide, //dk_ope_herbicide1
165  fmc_Herbicide, //dk_ope_herbicide2
166  fmc_Cutting, //dk_ope_manual_cutting1,
167  fmc_Cutting, //dk_ope_manual_cutting2,
168  fmc_Cutting, //dk_ope_manual_cutting3,
169  fmc_Cutting, //dk_ope_manual_cutting4,
170  fmc_Cutting, //dk_ope_manual_cutting5,
171  fmc_Cutting, //dk_ope_manual_cutting6,
172  fmc_Cutting, //dk_ope_manual_cutting7,
173  fmc_Cutting, //dk_ope_manual_cutting8,
174  fmc_Cutting, //dk_ope_manual_cutting9,
175  fmc_Cutting, //dk_ope_manual_cutting10,
176  fmc_Cutting, //dk_ope_manual_cutting11,
177  fmc_Cutting, //dk_ope_manual_cutting12,
178  fmc_Cutting, //dk_ope_manure_s2,
179  fmc_Cutting, //dk_ope_manure_p2,
180  fmc_Cultivation, //dk_ope_row_cultivation1,
181  fmc_Watering, //dk_ope_water2,
182  fmc_Watering, //dk_ope_water3,
183  fmc_Watering, //dk_ope_water4,
184  fmc_Watering, //dk_ope_water5,
185  fmc_Watering, //dk_ope_water6,
186  fmc_Watering, //dk_ope_water7,
187  fmc_Cutting, //dk_ope_cutting1,
188  fmc_Cutting, //dk_ope_cutting2,
189  fmc_Cutting, //dk_ope_cutting3,
190  fmc_Cutting, //dk_ope_cutting4,
191  fmc_Cutting, //dk_ope_cutting5,
192  fmc_Cutting, //dk_ope_cutting6,
193  fmc_Cultivation, //dk_ope_row_cultivation2,
194  fmc_Fungicide, //dk_ope_fungicide1,
195  fmc_Fertilizer, //dk_ope_boron_s,
196  fmc_Fertilizer, //dk_ope_boron_p,
197  fmc_Fungicide, //dk_ope_fungicide2,
198  fmc_Herbicide, //dk_ope_herbicide3
199  fmc_Herbicide, //dk_ope_herbicide4
200  fmc_Herbicide, //dk_ope_herbicide5
201  fmc_Herbicide, //dk_ope_herbicide6
202  fmc_Herbicide, //dk_ope_herbicide7
203  fmc_Herbicide, //dk_ope_herbicide8
204  fmc_Herbicide, //dk_ope_herbicide9
205  fmc_Cutting, //dk_ope_remove_fruits,
206  fmc_Fungicide, //dk_ope_fungicide3,
207  fmc_Harvest, //dk_ope_harvest,
208  fmc_Fungicide, //dk_ope_fungicide4,
209  fmc_Fungicide, //dk_ope_fungicide5,
210  fmc_Fungicide, //dk_ope_fungicide6,
211  fmc_Fungicide, //dk_ope_fungicide7,
212  fmc_Fungicide, //dk_ope_fungicide8,
213  fmc_Fungicide, //dk_ope_fungicide9,
214  fmc_Fungicide, //dk_ope_fungicide10,
215  fmc_Fungicide, //dk_ope_fungicide11,
216  fmc_Fungicide, //dk_ope_fungicide12,
217  fmc_Fungicide, //dk_ope_fungicide13,
218  fmc_Fungicide, //dk_ope_fungicide14
219  fmc_Others, // dk_ope_gr1
220  fmc_Others, // dk_ope_gr2
221  fmc_Others, // dk_ope_gr3
222  fmc_Others, // dk_ope_gr4
223  // no foobar entry
224 
225  };
226  // Iterate over the catlist elements and copy them to vector
227  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
228 
229  }

References DK_OPE_BASE, dk_ope_foobar, fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_OrchPear().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
dk_ope_water3
Definition: DK_OrchPear.h:73
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
dk_ope_insecticide6
Definition: DK_OrchPear.h:50
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
dk_ope_row_cultivation2
Definition: DK_OrchPear.h:84
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
dk_ope_cutting4
Definition: DK_OrchPear.h:81
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
dk_ope_manual_cutting4
Definition: DK_OrchPear.h:60
dk_ope_spring_plough
Definition: DK_OrchPear.h:38
dk_ope_fungicide5
Definition: DK_OrchPear.h:100
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
cfg_pest_orchard_on
CfgBool cfg_pest_orchard_on
Turn on pesticides for orchard.
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
dk_ope_insecticide8
Definition: DK_OrchPear.h:52
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
dk_ope_herbicide5
Definition: DK_OrchPear.h:91
dk_ope_planting
Definition: DK_OrchPear.h:43
dk_ope_water4
Definition: DK_OrchPear.h:74
dk_ope_foobar
Definition: DK_OrchPear.h:115
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
dk_ope_sleep_all_day
Definition: DK_OrchPear.h:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
dk_ope_water6
Definition: DK_OrchPear.h:76
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
dk_ope_manual_cutting1
Definition: DK_OrchPear.h:57
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
dk_ope_insecticide3
Definition: DK_OrchPear.h:47
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
tov_DKOrchPear
Definition: LandscapeFarmingEnums.h:463
dk_ope_manual_cutting2
Definition: DK_OrchPear.h:58
dk_ope_manual_cutting11
Definition: DK_OrchPear.h:67
DK_OPE_BASE
#define DK_OPE_BASE
Definition: DK_OrchPear.h:25
dk_ope_fungicide12
Definition: DK_OrchPear.h:107
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
dk_ope_manual_cutting12
Definition: DK_OrchPear.h:68
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
dk_ope_herbicide2
Definition: DK_OrchPear.h:56
dk_ope_fungicide2
Definition: DK_OrchPear.h:88
dk_ope_manual_cutting7
Definition: DK_OrchPear.h:63
dk_ope_herbicide7
Definition: DK_OrchPear.h:93
dk_ope_insecticide10
Definition: DK_OrchPear.h:54
dk_ope_row_cultivation1
Definition: DK_OrchPear.h:71
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
DK_OPE_YEARS_AFTER_PLANT
#define DK_OPE_YEARS_AFTER_PLANT
Definition: DK_OrchPear.h:23
CfgBool::value
bool value() const
Definition: Configurator.h:164
dk_ope_insecticide4
Definition: DK_OrchPear.h:48
dk_ope_remove_fruits
Definition: DK_OrchPear.h:96
Farm::FP_Manure
virtual bool FP_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:896
dk_ope_fungicide10
Definition: DK_OrchPear.h:105
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
dk_ope_manual_cutting3
Definition: DK_OrchPear.h:59
dk_ope_herbicide9
Definition: DK_OrchPear.h:95
dk_ope_fungicide13
Definition: DK_OrchPear.h:108
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_ope_insecticide2
Definition: DK_OrchPear.h:46
dk_ope_water7
Definition: DK_OrchPear.h:77
dk_ope_gr2
Definition: DK_OrchPear.h:111
dk_ope_sow_grass
Definition: DK_OrchPear.h:44
dk_ope_fungicide1
Definition: DK_OrchPear.h:85
dk_ope_boron_s
Definition: DK_OrchPear.h:86
Calendar::Date
long Date(void)
Definition: Calendar.h:57
dk_ope_fungicide14
Definition: DK_OrchPear.h:109
dk_ope_manual_cutting10
Definition: DK_OrchPear.h:66
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
dk_ope_herbicide3
Definition: DK_OrchPear.h:89
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
dk_ope_subsoiler
Definition: DK_OrchPear.h:42
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
dk_ope_fungicide9
Definition: DK_OrchPear.h:104
dk_ope_manure_p2
Definition: DK_OrchPear.h:70
dk_ope_water5
Definition: DK_OrchPear.h:75
dk_ope_manure_s1
Definition: DK_OrchPear.h:39
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
Farm::FA_Boron
virtual bool FA_Boron(LE *a_field, double a_user, int a_days)
Apply soluble Boron to a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:868
Farm::CutOrch
virtual bool CutOrch(LE *a_field, double a_user, int a_days)
Cut vegetation on orchard crop. //based on cut to silage - values from cutting function of orchard.
Definition: FarmFuncs.cpp:1666
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
Farm::FP_Boron
virtual bool FP_Boron(LE *a_field, double a_user, int a_days)
Apply soluble Boron to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:854
dk_ope_herbicide1
Definition: DK_OrchPear.h:55
dk_ope_boron_p
Definition: DK_OrchPear.h:87
dk_ope_cutting3
Definition: DK_OrchPear.h:80
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
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
dk_ope_fungicide8
Definition: DK_OrchPear.h:103
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
dk_ope_manual_cutting9
Definition: DK_OrchPear.h:65
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
dk_ope_water1
Definition: DK_OrchPear.h:41
dk_ope_insecticide1
Definition: DK_OrchPear.h:45
dk_ope_herbicide4
Definition: DK_OrchPear.h:90
dk_ope_gr1
Definition: DK_OrchPear.h:110
Farm::SleepAllDay
virtual bool SleepAllDay(LE *a_field, double a_user, int a_days)
Nothing to to today on a_field.
Definition: FarmFuncs.cpp:272
dk_ope_fungicide6
Definition: DK_OrchPear.h:101
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::RowCultivation
virtual bool RowCultivation(LE *a_field, double a_user, int a_days)
Carry out a harrowing between crop rows on a_field.
Definition: FarmFuncs.cpp:1183
dk_ope_insecticide5
Definition: DK_OrchPear.h:49
dk_ope_cutting6
Definition: DK_OrchPear.h:83
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
dk_ope_fungicide3
Definition: DK_OrchPear.h:97
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
dk_ope_insecticide9
Definition: DK_OrchPear.h:53
dk_ope_herbicide6
Definition: DK_OrchPear.h:92
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
dk_ope_gr4
Definition: DK_OrchPear.h:113
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
dk_ope_manual_cutting8
Definition: DK_OrchPear.h:64
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
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
dk_ope_manure_s2
Definition: DK_OrchPear.h:69
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Farm::FruitHarvest
virtual bool FruitHarvest(LE *a_field, double a_user, int a_days)
FruitHarvest (harvest of the mature fruits, e.g., grapes) applied on a_field.
Definition: FarmFuncs.cpp:1959
Farm::Pruning
virtual bool Pruning(LE *a_field, double a_user, int a_days)
Pruning applied on a_field - details needs to be added (e.g., impact on biomass, influence/impacts in...
Definition: FarmFuncs.cpp:1897
dk_ope_fungicide11
Definition: DK_OrchPear.h:106
dk_ope_manure_p1
Definition: DK_OrchPear.h:40
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
dk_ope_cutting5
Definition: DK_OrchPear.h:82
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
dk_ope_fungicide4
Definition: DK_OrchPear.h:99
dk_ope_harvest
Definition: DK_OrchPear.h:98
dk_ope_gr3
Definition: DK_OrchPear.h:112
DK_OrchPear::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_OrchPear.h:138
dk_ope_insecticide7
Definition: DK_OrchPear.h:51
dk_ope_herbicide8
Definition: DK_OrchPear.h:94
dk_ope_manual_cutting5
Definition: DK_OrchPear.h:61
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
dk_ope_manual_cutting6
Definition: DK_OrchPear.h:62
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
dk_ope_water2
Definition: DK_OrchPear.h:72
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
dk_ope_fungicide7
Definition: DK_OrchPear.h:102
dk_ope_cutting1
Definition: DK_OrchPear.h:78
dk_ope_cutting2
Definition: DK_OrchPear.h:79
dk_ope_start
Definition: DK_OrchPear.h:36