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

ITOOrchardd class
. More...

#include <ITOOrchard.h>

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

ITOOrchardd class
.

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

◆ ITOOrchard()

ITOOrchard::ITOOrchard ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
173  : Crop(a_tov, a_toc, a_L)
174  {
175  // When we start it off, the first possible date for a farm operation
176  // This information is used by other crops when they decide how much post processing of
177  // the management is allowed after harvest before the next crop starts.
178  m_first_date = g_date->DayInYear(1, 1);
180  }

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

Member Function Documentation

◆ Do()

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

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

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

Reimplemented from Crop.

83 {
84  m_field = a_field; // this is needed because of possible calls to other methods and currently we do not pass parameters.
85  m_farm = a_farm; // this is needed because of possible calls to other methods and currently we do not pass parameters.
86  m_ev = a_ev;
87  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
88  int d1 = 0;
89  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
90  switch (a_ev->m_todo)
91  {
92  case it_oo_start:
93  {
94  IT_OO_EARLY = false;
95  IT_OO_MID = false;
96  IT_OO_LATE = false;
97  // Check the next crop for early start, unless it is a spring crop
98  // in which case we ASSUME that no checking is necessary!!!!
99  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
100  a_field->ClearManagementActionSum();
101 
102  //new if: do the check only for non-optimising farms and if year>0. (030713 - m_rotation used only in the hidden year, so I modified the condition from >7 to >0)
103  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
104  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
105  //Checking the future...
106  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
107  if (g_date->DayInYear(1, 7) >= a_ev->m_startday)
108  {
109  g_msg->Warn(WARN_BUG, "ITOOrchard::Do(): ", "Harvest too late for the next crop to start!!!");
110  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
111  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
112  exit(1);
113  }
114  }
115  // Now no operations can be timed after the start of the next crop.
116 
117  if (!a_ev->m_first_year) {
118  // Are we before July 1st?
119  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
120  if (g_date->Date() < d1) {
121  // Yes, too early. We assumme this is because the last crop was late
122  printf("Poly: %d\n", a_field->GetPoly());
123  g_msg->Warn(WARN_BUG, "ITOOrchard::Do(): ", "Crop start attempt between 1st Jan & 1st July");
124  int prev = a_field->GetLandscape()->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex()));
125  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
126  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
127  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
128  exit(1);
129  }
130  else {
131  d1 = g_date->OldDays() + 365 + m_first_date; // Add 365 for spring crop
132  if (g_date->Date() > d1) {
133  // Yes too late - should not happen - raise an error
134  g_msg->Warn(WARN_BUG, "ITOOrchard::Do(): ", "Crop start attempt after last possible start date");
135  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
136  a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex());
137  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
138  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
139  exit(1);
140  }
141  }
142  }
143  else {
144  //only for the first year
146  break;
147  }
148  }//if
149 
150  // End single block date checking code. Please see next line comment as well.
151  // OK, let's go.
152  // Here we queue up the first event
153  d1 = g_date->OldDays() + m_first_date;
154  if (!m_ev->m_first_year) d1 += 365; // Add 365 for spring crop (not 1st yr)
155  if (g_date->Date() > d1) {
156  d1 = g_date->Date();
157  }
158  // OK, let's go. - LKM: Queue first operation
159  SimpleEvent(d1, it_oo_winter_pruning, false);
160  }
161  break;
162 
164  if (!a_farm->Pruning(a_field, 0.0, g_date->DayInYear(28, 2) - g_date->DayInYear())) {
166  break;
167  }
168  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3), it_oo_irrigation_early, false); // water thread
169  SimpleEvent(g_date->OldDays() + g_date->DayInYear(6, 3), it_oo_fungi_1, false); // fungicide thread
170  SimpleEvent(g_date->OldDays() + g_date->DayInYear(8, 3), it_oo_insecti_1, false); // insecticide thread
171  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), it_oo_mechanical_thin_1, false); // thinning thread - main thread
172  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), it_oo_GR_growth_inhib, false); // growth regulator1 thread
173  SimpleEvent(g_date->OldDays() + g_date->DayInYear(17, 4), it_oo_GR_russet_1, false);// growth regulator2 thread
174  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), it_oo_weed_mowing_1, false); // mowing thread
175 
176  // fertilizer threads
177  if (m_farm->IsStockFarmer()) //Stock Farmer
178  {
181  break;
182  }
183  else
184  {
187  break;
188  }
189  break;
190 
191  case it_oo_irrigation_early:// 25% of farmers cultivate orchard w. early maturation
192  if (a_ev->m_lock || a_farm->DoIt_prob(0.25)) {
193  if (!a_farm->Water(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
195  break;
196  }
197  IT_OO_EARLY = true;
199  break;
200  }
202  break;
203 
204  case it_oo_irrigation_mid:// 50% of farmers cultivate orchard w. early maturation
205  if (a_ev->m_lock || a_farm->DoIt_prob(0.50/0.75)) {
206  if (!a_farm->Water(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
208  break;
209  }
210  IT_OO_MID = true;
212  break;
213  }
215  break;
216 
217  case it_oo_irrigation_late:// 25% of farmers cultivate orchard w. early maturation
218  if (a_ev->m_lock || a_farm->DoIt_prob(0.25 / 0.25)) {
219  if (!a_farm->Water(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
221  break;
222  }
223  IT_OO_LATE = true;
224  }
226  break;
227 
228  case it_oo_DI_continued_early: // Keep watering every day until 5/8
229  if (!a_farm->Irrigation(a_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear(), g_date->DayInYear(5, 8))) {
231  break;
232  }
233  break;
234 
235  case it_oo_DI_continued_mid: // Keep watering every day until 15/9
236  if (!a_farm->Irrigation(a_field, 0.0, g_date->DayInYear(15, 9) - g_date->DayInYear(), g_date->DayInYear(15, 9))) {
238  break;
239  }
240  break;
241 
242  case it_oo_DI_continued_late: // Keep watering every day until 1/10
243  if (!a_farm->Irrigation(a_field, 0.0, g_date->DayInYear(1, 10) - g_date->DayInYear(), g_date->DayInYear(1, 10))) {
245  break;
246  }
247  break; // end of water thread
248 
249  case it_oo_insecti_1:
250  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(18, 3) - g_date->DayInYear())) {
251  SimpleEvent(g_date->Date() + 1, it_oo_insecti_1, true);
252  break;
253  }
255  break;
256 
257  case it_oo_insecti_2:
258  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(24, 3) - g_date->DayInYear())) {
259  SimpleEvent(g_date->Date() + 1, it_oo_insecti_2, true);
260  break;
261  }
263  break;
264 
265  case it_oo_insecti_3:
266  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(6, 4) - g_date->DayInYear())) {
267  SimpleEvent(g_date->Date() + 1, it_oo_insecti_3, true);
268  break;
269  }
271  break;
272 
273  case it_oo_insecti_4:
274  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(7, 5) - g_date->DayInYear())) {
275  SimpleEvent(g_date->Date() + 1, it_oo_insecti_4, true);
276  break;
277  }
279  break;
280 
281  case it_oo_insecti_5:
282  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(19, 6) - g_date->DayInYear())) {
283  SimpleEvent(g_date->Date() + 1, it_oo_insecti_5, true);
284  break;
285  }
287  break;
288 
289  case it_oo_insecti_6:
290  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
291  SimpleEvent(g_date->Date() + 1, it_oo_insecti_6, true);
292  break;
293  }
294  break; // end of insecti thread
295 
296  case it_oo_fungi_1:// only done if late maturation
297  if (IT_OO_LATE == 1) {
298  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(16, 3) - g_date->DayInYear())) {
299  SimpleEvent(g_date->Date() + 1, it_oo_fungi_1, true);
300  break;
301  }
302  }
304  break;
305 
306  case it_oo_fungi_2:// only done if early or late maturation
307  if (IT_OO_MID == false) {
308  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(17, 3) - g_date->DayInYear())) {
309  SimpleEvent(g_date->Date() + 1, it_oo_fungi_2, true);
310  break;
311  }
312  }
313  SimpleEvent(g_date->OldDays() + g_date->DayInYear(10, 3), it_oo_fungi_3, false);
314  break;
315 
316  case it_oo_fungi_3:// only done if early or late maturation
317  if (IT_OO_MID == false) {
318  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(20, 3) - g_date->DayInYear())) {
319  SimpleEvent(g_date->Date() + 1, it_oo_fungi_3, true);
320  break;
321  }
322  }
323  SimpleEvent(g_date->OldDays() + g_date->DayInYear(14, 3), it_oo_fungi_4, false);
324  break;
325 
326  case it_oo_fungi_4:// only done if early or mid maturation
327  if (IT_OO_LATE == false) {
328  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(24, 4) - g_date->DayInYear())) {
329  SimpleEvent(g_date->Date() + 1, it_oo_fungi_4, true);
330  break;
331  }
332  }
333  SimpleEvent(g_date->OldDays() + g_date->DayInYear(28, 3), it_oo_fungi_5, false);
334  break;
335 
336  case it_oo_fungi_5:
337  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(7, 4) - g_date->DayInYear())) {
338  SimpleEvent(g_date->Date() + 1, it_oo_fungi_5, true);
339  break;
340  }
341  SimpleEvent(g_date->OldDays() + g_date->DayInYear(31, 3), it_oo_fungi_6, false);
342  break;
343 
344  case it_oo_fungi_6:// only done if early or late maturation
345  if (IT_OO_MID == false) {
346  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
347  SimpleEvent(g_date->Date() + 1, it_oo_fungi_6, true);
348  break;
349  }
350  }
352  break;
353 
354  case it_oo_fungi_7:// only done if early or late maturation
355  if (IT_OO_MID == false) {
356  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(14, 4) - g_date->DayInYear())) {
357  SimpleEvent(g_date->Date() + 1, it_oo_fungi_7, true);
358  break;
359  }
360  }
362  break;
363 
364  case it_oo_fungi_8:// only done if early or late maturation
365  if (IT_OO_MID == false) {
366  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(16, 4) - g_date->DayInYear())) {
367  SimpleEvent(g_date->Date() + 1, it_oo_fungi_8, true);
368  break;
369  }
370  }
372  break;
373 
374  case it_oo_fungi_9:// only done if early or late maturation
375  if (IT_OO_MID == false) {
376  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(18, 4) - g_date->DayInYear())) {
377  SimpleEvent(g_date->Date() + 1, it_oo_fungi_9, true);
378  break;
379  }
380  }
382  break;
383 
384  case it_oo_fungi_10:// only done if early or mid maturation
385  if (IT_OO_LATE == false) {
386  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(21, 4) - g_date->DayInYear())) {
387  SimpleEvent(g_date->Date() + 1, it_oo_fungi_10, true);
388  break;
389  }
390  }
392  break;
393 
394  case it_oo_fungi_11:// only done if early maturation
395  if (IT_OO_EARLY == 1) {
396  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(24, 4) - g_date->DayInYear())) {
397  SimpleEvent(g_date->Date() + 1, it_oo_fungi_11, true);
398  break;
399  }
400  }
402  break;
403 
404  case it_oo_fungi_12:// only done if early or late maturation
405  if (IT_OO_MID == false) {
406  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(27, 4) - g_date->DayInYear())) {
407  SimpleEvent(g_date->Date() + 1, it_oo_fungi_12, true);
408  break;
409  }
410  }
412  break;
413 
414  case it_oo_fungi_13:// only done if early or late maturation
415  if (IT_OO_MID == false) {
416  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(29, 4) - g_date->DayInYear())) {
417  SimpleEvent(g_date->Date() + 1, it_oo_fungi_13, true);
418  break;
419  }
420  }
422  break;
423 
424  case it_oo_fungi_14:// only done if early or late maturation
425  if (IT_OO_MID == false) {
426  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
427  SimpleEvent(g_date->Date() + 1, it_oo_fungi_14, true);
428  break;
429  }
430  }
432  break;
433 
434  case it_oo_fungi_15:// only done if early or late maturation
435  if (IT_OO_MID == false) {
436  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(4, 5) - g_date->DayInYear())) {
437  SimpleEvent(g_date->Date() + 1, it_oo_fungi_15, true);
438  break;
439  }
440  }
442  break;
443 
444  case it_oo_fungi_16:// only done if early or late maturation
445  if (IT_OO_MID == false) {
446  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(7, 5) - g_date->DayInYear())) {
447  SimpleEvent(g_date->Date() + 1, it_oo_fungi_16, true);
448  break;
449  }
450  }
452  break;
453 
454  case it_oo_fungi_17:// only done if early or late maturation
455  if (IT_OO_MID == false) {
456  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(13, 5) - g_date->DayInYear())) {
457  SimpleEvent(g_date->Date() + 1, it_oo_fungi_17, true);
458  break;
459  }
460  }
462  break;
463 
464  case it_oo_fungi_18:// only done if early or late maturation
465  if (IT_OO_MID == false) {
466  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
467  SimpleEvent(g_date->Date() + 1, it_oo_fungi_18, true);
468  break;
469  }
470  }
472  break;
473 
474  case it_oo_fungi_19:
475  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(22, 5) - g_date->DayInYear())) {
476  SimpleEvent(g_date->Date() + 1, it_oo_fungi_19, true);
477  break;
478  }
480  break;
481 
482  case it_oo_fungi_20:// only done if early or late maturation
483  if (IT_OO_MID == false) {
484  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
485  SimpleEvent(g_date->Date() + 1, it_oo_fungi_20, true);
486  break;
487  }
488  }
490  break;
491 
492  case it_oo_fungi_21:
493  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(29, 5) - g_date->DayInYear())) {
494  SimpleEvent(g_date->Date() + 1, it_oo_fungi_21, true);
495  break;
496  }
498  break;
499 
500  case it_oo_fungi_22:
501  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(4, 6) - g_date->DayInYear())) {
502  SimpleEvent(g_date->Date() + 1, it_oo_fungi_22, true);
503  break;
504  }
506  break;
507 
508  case it_oo_fungi_23:// only done if early or late maturation
509  if (IT_OO_MID == false) {
510  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
511  SimpleEvent(g_date->Date() + 1, it_oo_fungi_23, true);
512  break;
513  }
514  }
516  break;
517 
518  case it_oo_fungi_24: // only done if mid maturation
519  if (IT_OO_MID == 1) {
520  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(12, 6) - g_date->DayInYear())) {
521  SimpleEvent(g_date->Date() + 1, it_oo_fungi_24, true);
522  break;
523  }
524  }
526  break;
527 
528  case it_oo_fungi_25:// only done if mid maturation
529  if (IT_OO_MID == 1) {
530  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(19, 6) - g_date->DayInYear())) {
531  SimpleEvent(g_date->Date() + 1, it_oo_fungi_25, true);
532  break;
533  }
534  }
536  break;
537 
538  case it_oo_fungi_26:// only done if early or late maturation
539  if (IT_OO_MID == false) {
540  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(23, 6) - g_date->DayInYear())) {
541  SimpleEvent(g_date->Date() + 1, it_oo_fungi_26, true);
542  break;
543  }
544  }
546  break;
547 
548  case it_oo_fungi_27:
549  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(6, 7) - g_date->DayInYear())) {
550  SimpleEvent(g_date->Date() + 1, it_oo_fungi_27, true);
551  break;
552  }
554  break;
555 
556  case it_oo_fungi_28:
557  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(17, 7) - g_date->DayInYear())) {
558  SimpleEvent(g_date->Date() + 1, it_oo_fungi_28, true);
559  break;
560  }
562  break;
563 
564  case it_oo_fungi_29:// only done if early or late maturation
565  if (IT_OO_MID == false) {
566  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
567  SimpleEvent(g_date->Date() + 1, it_oo_fungi_29, true);
568  break;
569  }
570  }
572  break;
573 
574  case it_oo_fungi_30:// only done if mid maturation
575  if (IT_OO_MID == 1) {
576  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(3, 8) - g_date->DayInYear())) {
577  SimpleEvent(g_date->Date() + 1, it_oo_fungi_30, true);
578  break;
579  }
580  }
582  break;
583 
584  case it_oo_fungi_31:// only done if early or late maturation
585  if (IT_OO_MID == false) {
586  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(10, 8) - g_date->DayInYear())) {
587  SimpleEvent(g_date->Date() + 1, it_oo_fungi_31, true);
588  break;
589  }
590  }
592  break;
593 
594  case it_oo_fungi_32:// only done if late maturation
595  if (IT_OO_LATE == 1) {
596  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(7, 9) - g_date->DayInYear())) {
597  SimpleEvent(g_date->Date() + 1, it_oo_fungi_32, true);
598  break;
599  }
600  }
602  break;
603 
604  case it_oo_fungi_33:// only done if mid or late maturation
605  if (IT_OO_EARLY == false) {
606  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(14, 9) - g_date->DayInYear())) {
607  SimpleEvent(g_date->Date() + 1, it_oo_fungi_33, true);
608  break;
609  }
610  }
612  break;
613 
614  case it_oo_fungi_34:// only done if late maturation
615  if (IT_OO_LATE == 1) {
616  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(22, 9) - g_date->DayInYear())) {
617  SimpleEvent(g_date->Date() + 1, it_oo_fungi_34, true);
618  break;
619  }
620  }
621  break; // end of fungi thread
622 
624  if (!a_farm->GrowthRegulator(a_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
626  break;
627  }
628  break; // end of GR1 thread
629 
630  case it_oo_GR_russet_1:// only done if early or late maturation
631  if (IT_OO_MID == false) {
632  if (!a_farm->GrowthRegulator(a_field, 0.0, g_date->DayInYear(27, 4) - g_date->DayInYear())) {
633  SimpleEvent(g_date->Date() + 1, it_oo_GR_russet_1, true);
634  break;
635  }
637  break;
638  }
639  break;
640 
641  case it_oo_GR_russet_2:
642  if (!a_farm->GrowthRegulator(a_field, 0.0, g_date->DayInYear(7, 5) - g_date->DayInYear())) {
643  SimpleEvent(g_date->Date() + 1, it_oo_GR_russet_2, true);
644  break;
645  }
646  break; // end of GR2 thread
647 
648  case it_oo_weed_mowing_1:
649  if (!a_farm->CutOrch(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
651  break;
652  }
654  break;
655 
656  case it_oo_weed_mowing_2:
657  if (!a_farm->CutOrch(a_field, 0.0, g_date->DayInYear(30, 7) - g_date->DayInYear())) {
659  break;
660  }
661  SimpleEvent(g_date->Date() + 30, it_oo_weed_mowing_3, false);
662  break;
663 
664  case it_oo_weed_mowing_3:
665  if (!a_farm->CutOrch(a_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear())) {
667  break;
668  }
669  SimpleEvent(g_date->Date() + 30, it_oo_weed_mowing_4, false);
670  break;
671 
672  case it_oo_weed_mowing_4:
673  if (!a_farm->CutOrch(a_field, 0.0, g_date->DayInYear(30, 9) - g_date->DayInYear())) {
675  break;
676  }
677  break; // end of weed mow thread
678 
679  case it_oo_ferti_s1:
680  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
681  SimpleEvent(g_date->Date() + 1, it_oo_ferti_s1, true);
682  break;
683  }
684  break;
685  // end of feti thread
686 
687  case it_oo_ferti_p1:
688  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
689  SimpleEvent(g_date->Date() + 1, it_oo_ferti_p1, true);
690  break;
691  }
692  break;
693  // end of ferti thread
694 
696  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear())) {
698  break;
699  }
701  break;
703  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(9, 4) - g_date->DayInYear())) {
705  break;
706  }
707  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_s3, false);
708  break;
710  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(24, 4) - g_date->DayInYear())) {
712  break;
713  }
714  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_s4, false);
715  break;
717  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(9, 5) - g_date->DayInYear())) {
719  break;
720  }
721  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_s5, false);
722  break;
724  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(24, 5) - g_date->DayInYear())) {
726  break;
727  }
728  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_s6, false);
729  break;
731  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(8, 6) - g_date->DayInYear())) {
733  break;
734  }
735  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_s7, false);
736  break;
738  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(23, 6) - g_date->DayInYear())) {
740  break;
741  }
742  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_s8, false);
743  break;
745  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(8, 7) - g_date->DayInYear())) {
747  break;
748  }
749  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_s9, false);
750  break;
752  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(23, 7) - g_date->DayInYear())) {
754  break;
755  }
756  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_s10, false);
757  break;
759  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(7, 8) - g_date->DayInYear())) {
761  break;
762  }
763  break; // end of foliar feed stock thread
764 
766  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear())) {
768  break;
769  }
770  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_p2, false);
771  break;
773  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(9, 4) - g_date->DayInYear())) {
775  break;
776  }
777  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_p3, false);
778  break;
780  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(24, 4) - g_date->DayInYear())) {
782  break;
783  }
784  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_p4, false);
785  break;
787  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(9, 5) - g_date->DayInYear())) {
789  break;
790  }
791  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_p5, false);
792  break;
794  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(24, 5) - g_date->DayInYear())) {
796  break;
797  }
798  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_p6, false);
799  break;
801  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(8, 6) - g_date->DayInYear())) {
803  break;
804  }
805  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_p7, false);
806  break;
808  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(23, 6) - g_date->DayInYear())) {
810  break;
811  }
812  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_p8, false);
813  break;
815  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(8, 7) - g_date->DayInYear())) {
817  break;
818  }
819  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_p9, false);
820  break;
822  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(23, 7) - g_date->DayInYear())) {
824  break;
825  }
826  SimpleEvent(g_date->Date() + 14, it_oo_foliar_feed_p10, false);
827  break;
829  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(7, 8) - g_date->DayInYear())) {
831  break;
832  }
833  break; // end of foliar feed stock thread
834 
836  if (!a_farm->LeafThinning(a_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
838  break;
839  }
841  break;
842 
844  if (!a_farm->LeafThinning(a_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
846  break;
847  }
849  break;
850 
852  if (!a_farm->LeafThinning(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
854  break;
855  }
857  break;
858 
859  case it_oo_manual_thin:
860  if (!a_farm->Pruning(a_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
861  SimpleEvent(g_date->Date() + 1, it_oo_manual_thin, true);
862  break;
863  }
866  break;
867 
869  if (!a_farm->Pruning(a_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
871  break;
872  }
873  break;
874 
876  if (IT_OO_EARLY == 1) {
877  if (!a_farm->FruitHarvest(a_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
879  break;
880  }
882  break;
883  }
885  break;
886 
887  case it_oo_harvest_mid1:
888  if (a_ev->m_lock || a_farm->DoIt_prob(1.00) && IT_OO_MID == 1) {
889  if (!a_farm->FruitHarvest(a_field, 0.0, g_date->DayInYear(15, 9) - g_date->DayInYear())) {
890  SimpleEvent(g_date->Date() + 1, it_oo_harvest_mid1, true);
891  break;
892  }
894  break;
895  }
897  break;
898 
899  case it_oo_harvest_late1:
900  if (!a_farm->FruitHarvest(a_field, 0.0, g_date->DayInYear(8, 10) - g_date->DayInYear())) {
902  break;
903  }
905  break;
906 
908  if (!a_farm->FruitHarvest(a_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
910  break;
911  }
913  break;
914 
915  case it_oo_harvest_mid2:
916  if (!a_farm->FruitHarvest(a_field, 0.0, g_date->DayInYear(30, 9) - g_date->DayInYear())) {
917  SimpleEvent(g_date->Date() + 1, it_oo_harvest_mid2, true);
918  break;
919  }
921  break;
922 
923  case it_oo_harvest_late2:
924  if (!a_farm->FruitHarvest(a_field, 0.0, g_date->DayInYear(15, 10) - g_date->DayInYear())) {
926  break;
927  }
929  break;
930 
931  case it_oo_sleep_all_day:
932  if (!a_farm->SleepAllDay(a_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
934  break;
935  }
936  // End of management
937  done = true;
938  break;
939  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
940  // END OF MAIN THREAD
941  default:
942  g_msg->Warn(WARN_BUG, "ITOOrchard::Do(): "
943  "Unknown event type! ", "");
944  exit(1);
945  }
946  return done;
947 }

References LE::ClearManagementActionSum(), Farm::CutOrch(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), Farm::FA_NPK(), Farm::FA_NPKS(), Farm::FP_NPK(), Farm::FP_NPKS(), Farm::FruitHarvest(), Farm::FungicideTreat(), g_date, g_msg, LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), Farm::GetType(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::InsecticideTreat(), Farm::Irrigation(), Farm::IsStockFarmer(), it_oo_DI_continued_early, it_oo_DI_continued_late, it_oo_DI_continued_mid, IT_OO_EARLY, it_oo_ferti_p1, it_oo_ferti_s1, it_oo_foliar_feed_p1, it_oo_foliar_feed_p10, it_oo_foliar_feed_p2, it_oo_foliar_feed_p3, it_oo_foliar_feed_p4, it_oo_foliar_feed_p5, it_oo_foliar_feed_p6, it_oo_foliar_feed_p7, it_oo_foliar_feed_p8, it_oo_foliar_feed_p9, it_oo_foliar_feed_s1, it_oo_foliar_feed_s10, it_oo_foliar_feed_s2, it_oo_foliar_feed_s3, it_oo_foliar_feed_s4, it_oo_foliar_feed_s5, it_oo_foliar_feed_s6, it_oo_foliar_feed_s7, it_oo_foliar_feed_s8, it_oo_foliar_feed_s9, it_oo_fungi_1, it_oo_fungi_10, it_oo_fungi_11, it_oo_fungi_12, it_oo_fungi_13, it_oo_fungi_14, it_oo_fungi_15, it_oo_fungi_16, it_oo_fungi_17, it_oo_fungi_18, it_oo_fungi_19, it_oo_fungi_2, it_oo_fungi_20, it_oo_fungi_21, it_oo_fungi_22, it_oo_fungi_23, it_oo_fungi_24, it_oo_fungi_25, it_oo_fungi_26, it_oo_fungi_27, it_oo_fungi_28, it_oo_fungi_29, it_oo_fungi_3, it_oo_fungi_30, it_oo_fungi_31, it_oo_fungi_32, it_oo_fungi_33, it_oo_fungi_34, it_oo_fungi_4, it_oo_fungi_5, it_oo_fungi_6, it_oo_fungi_7, it_oo_fungi_8, it_oo_fungi_9, it_oo_GR_growth_inhib, it_oo_GR_russet_1, it_oo_GR_russet_2, it_oo_harvest_early1, it_oo_harvest_early2, it_oo_harvest_late1, it_oo_harvest_late2, it_oo_harvest_mid1, it_oo_harvest_mid2, it_oo_insecti_1, it_oo_insecti_2, it_oo_insecti_3, it_oo_insecti_4, it_oo_insecti_5, it_oo_insecti_6, it_oo_irrigation_early, it_oo_irrigation_late, it_oo_irrigation_mid, IT_OO_LATE, it_oo_manual_thin, it_oo_mechanical_thin_1, it_oo_mechanical_thin_2, it_oo_mechanical_thin_3, IT_OO_MID, it_oo_sleep_all_day, it_oo_start, it_oo_summer_pruning, it_oo_weed_mowing_1, it_oo_weed_mowing_2, it_oo_weed_mowing_3, it_oo_weed_mowing_4, it_oo_winter_pruning, Farm::LeafThinning(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), Farm::Pruning(), Crop::SimpleEvent(), Farm::SleepAllDay(), tof_OptimisingFarm, MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void ITOOrchard::SetUpFarmCategoryInformation ( )
inline
181  {
182  const int elements = 2 + (it_oo_foobar - IT_OO_BASE);
184 
185  FarmManagementCategory catlist[elements] =
186  {
187  fmc_Others, // zero element unused but must be here it_oo_start = 1, // Compulsory, must always be 1 (one).
188  fmc_Others, // it_oo_sleep_all_day = IT_O_BASE,
189  fmc_Cutting, // it_oo_winter_pruning,
190  fmc_Fertilizer, // it_oo_ferti_s1,
191  fmc_Fertilizer, // it_oo_ferti_p1,
192  fmc_Watering, // it_oo_irrigation,
193  fmc_Watering, // it_oo_irrigation,
194  fmc_Watering, // it_oo_irrigation,
195  fmc_Fungicide, // it_oo_fungi_1,
196  fmc_Fungicide, // it_oo_fungi_2,
197  fmc_Fungicide, // it_oo_fungi_3,
198  fmc_Fungicide, // it_oo_fungi_4,
199  fmc_Fungicide, // it_oo_fungi_5,
200  fmc_Fungicide, // it_oo_fungi_6,
201  fmc_Fungicide, // it_oo_fungi_7,
202  fmc_Fungicide, // it_oo_fungi_8,
203  fmc_Fungicide, // it_oo_fungi_9,
204  fmc_Fungicide, // it_oo_fungi_10,
205  fmc_Fungicide, // it_oo_fungi_11,
206  fmc_Fungicide, // it_oo_fungi_12,
207  fmc_Fungicide, // it_oo_fungi_13,
208  fmc_Fungicide, // it_oo_fungi_14,
209  fmc_Fungicide, // it_oo_fungi_15,
210  fmc_Fungicide, // it_oo_fungi_16,
211  fmc_Fungicide, // it_oo_fungi_17,
212  fmc_Fungicide, // it_oo_fungi_18,
213  fmc_Fungicide, // it_oo_fungi_19,
214  fmc_Fungicide, // it_oo_fungi_20,
215  fmc_Fungicide, // it_oo_fungi_21,
216  fmc_Fungicide, // it_oo_fungi_22,
217  fmc_Fungicide, // it_oo_fungi_23,
218  fmc_Fungicide, // it_oo_fungi_24,
219  fmc_Fungicide, // it_oo_fungi_25,
220  fmc_Fungicide, // it_oo_fungi_26,
221  fmc_Fungicide, // it_oo_fungi_27,
222  fmc_Fungicide, // it_oo_fungi_28,
223  fmc_Fungicide, // it_oo_fungi_29,
224  fmc_Fungicide, // it_oo_fungi_30,
225  fmc_Fungicide, // it_oo_fungi_31,
226  fmc_Fungicide, // it_oo_fungi_32,
227  fmc_Fungicide, // it_oo_fungi_33,
228  fmc_Fungicide, // it_oo_fungi_34,
229  fmc_Insecticide, // it_oo_insecti_1,
230  fmc_Insecticide, // it_oo_insecti_2,
231  fmc_Insecticide, // it_oo_insecti_3,
232  fmc_Insecticide, // it_oo_insecti_4,
233  fmc_Insecticide, // it_oo_insecti_5,
234  fmc_Insecticide, // it_oo_insecti_6,
235  fmc_Fertilizer, // it_oo_foliar_feed_s1,
236  fmc_Fertilizer, // it_oo_foliar_feed_s2,
237  fmc_Fertilizer, // it_oo_foliar_feed_s3,
238  fmc_Fertilizer, // it_oo_foliar_feed_s4,
239  fmc_Fertilizer, // it_oo_foliar_feed_s5,
240  fmc_Fertilizer, // it_oo_foliar_feed_s6,
241  fmc_Fertilizer, // it_oo_foliar_feed_s7,
242  fmc_Fertilizer, // it_oo_foliar_feed_s8,
243  fmc_Fertilizer, // it_oo_foliar_feed_s9,
244  fmc_Fertilizer, // it_oo_foliar_feed_s10,
245  fmc_Fertilizer, // it_oo_foliar_feed_p1,
246  fmc_Fertilizer, // it_oo_foliar_feed_p2,
247  fmc_Fertilizer, // it_oo_foliar_feed_p3,
248  fmc_Fertilizer, // it_oo_foliar_feed_p4,
249  fmc_Fertilizer, // it_oo_foliar_feed_p5,
250  fmc_Fertilizer, // it_oo_foliar_feed_p6,
251  fmc_Fertilizer, // it_oo_foliar_feed_p7,
252  fmc_Fertilizer, // it_oo_foliar_feed_p8,
253  fmc_Fertilizer, // it_oo_foliar_feed_p9,
254  fmc_Fertilizer, // it_oo_foliar_feed_p10,
255  fmc_Others, // it_oo_GR_russet_1,
256  fmc_Others, // it_oo_GR_russet_2,
257  fmc_Cutting, // it_oo_mechanical_thin_1,
258  fmc_Cutting, // it_oo_mechanical_thin_2,
259  fmc_Cutting, // it_oo_mechanical_thin_3,
260  fmc_Others, // it_oo_GR_growth_inhib,
261  fmc_Cutting, // it_oo_weed_mowing_1,
262  fmc_Cutting, // it_oo_weed_mowing_2,
263  fmc_Cutting, // it_oo_weed_mowing_3,
264  fmc_Cutting, // it_oo_weed_mowing_4,
265  fmc_Watering, // it_oo_DI_continued_early,
266  fmc_Watering, // it_oo_DI_continued_mid,
267  fmc_Watering, // it_oo_DI_continued_late,
268  fmc_Cutting, // it_oo_manual_thin,
269  fmc_Harvest, // it_oo_harvest_early1,
270  fmc_Harvest, // it_oo_harvest_early2,
271  fmc_Harvest, // it_oo_harvest_mid1,
272  fmc_Harvest, // it_oo_harvest_mid2,
273  fmc_Harvest, // it_oo_harvest_late1,
274  fmc_Harvest, // it_oo_harvest_late2,
275  fmc_Cutting, // it_oo_summer_pruning,
276 
277  // no foobar entry
278 
279  };
280  // Iterate over the catlist elements and copy them to vector
281  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
282 
283  }

References fmc_Cutting, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Insecticide, fmc_Others, fmc_Watering, IT_OO_BASE, it_oo_foobar, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by ITOOrchard().


The documentation for this class was generated from the following files:
it_oo_foliar_feed_p1
Definition: ITOOrchard.h:126
it_oo_foliar_feed_p8
Definition: ITOOrchard.h:133
it_oo_fungi_30
Definition: ITOOrchard.h:105
it_oo_foliar_feed_s10
Definition: ITOOrchard.h:125
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
it_oo_ferti_s1
Definition: ITOOrchard.h:71
it_oo_weed_mowing_2
Definition: ITOOrchard.h:143
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
it_oo_irrigation_early
Definition: ITOOrchard.h:73
Farm::Irrigation
virtual bool Irrigation(LE *a_field, double a_user, int a_days, int a_max)
Generate an 'irrigation' event with a frequency defined by a_freq in the irrigation period on a_field...
Definition: FarmFuncs.cpp:1856
it_oo_foliar_feed_s3
Definition: ITOOrchard.h:118
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::FP_NPK
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:645
it_oo_fungi_29
Definition: ITOOrchard.h:104
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
it_oo_fungi_21
Definition: ITOOrchard.h:96
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
it_oo_fungi_15
Definition: ITOOrchard.h:90
LE::GetPoly
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: Elements.h:238
it_oo_fungi_16
Definition: ITOOrchard.h:91
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
it_oo_foliar_feed_p6
Definition: ITOOrchard.h:131
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
it_oo_harvest_mid2
Definition: ITOOrchard.h:153
ITOOrchard::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: ITOOrchard.h:181
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
Farm::FA_NPKS
virtual bool FA_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:968
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
it_oo_foliar_feed_s6
Definition: ITOOrchard.h:121
it_oo_fungi_2
Definition: ITOOrchard.h:77
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
it_oo_fungi_8
Definition: ITOOrchard.h:83
it_oo_fungi_3
Definition: ITOOrchard.h:78
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
Farm::FA_NPK
virtual bool FA_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:982
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
it_oo_weed_mowing_3
Definition: ITOOrchard.h:144
it_oo_DI_continued_mid
Definition: ITOOrchard.h:147
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
it_oo_fungi_23
Definition: ITOOrchard.h:98
it_oo_fungi_33
Definition: ITOOrchard.h:108
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
IT_OO_BASE
#define IT_OO_BASE
Definition: ITOOrchard.h:57
IT_OO_EARLY
#define IT_OO_EARLY
Definition: ITOOrchard.h:53
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
it_oo_fungi_28
Definition: ITOOrchard.h:103
it_oo_weed_mowing_1
Definition: ITOOrchard.h:142
it_oo_fungi_1
Definition: ITOOrchard.h:76
it_oo_insecti_2
Definition: ITOOrchard.h:111
it_oo_fungi_11
Definition: ITOOrchard.h:86
it_oo_fungi_14
Definition: ITOOrchard.h:89
it_oo_insecti_1
Definition: ITOOrchard.h:110
it_oo_foliar_feed_p7
Definition: ITOOrchard.h:132
Calendar::Date
long Date(void)
Definition: Calendar.h:57
it_oo_fungi_31
Definition: ITOOrchard.h:106
it_oo_foliar_feed_p9
Definition: ITOOrchard.h:134
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
it_oo_weed_mowing_4
Definition: ITOOrchard.h:145
it_oo_foliar_feed_s7
Definition: ITOOrchard.h:122
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
it_oo_GR_growth_inhib
Definition: ITOOrchard.h:141
it_oo_fungi_32
Definition: ITOOrchard.h:107
it_oo_fungi_4
Definition: ITOOrchard.h:79
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
it_oo_foliar_feed_p10
Definition: ITOOrchard.h:135
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
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
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
it_oo_mechanical_thin_2
Definition: ITOOrchard.h:139
it_oo_fungi_26
Definition: ITOOrchard.h:101
it_oo_harvest_early1
Definition: ITOOrchard.h:150
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
it_oo_foliar_feed_s1
Definition: ITOOrchard.h:116
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
it_oo_foliar_feed_p3
Definition: ITOOrchard.h:128
IT_OO_LATE
#define IT_OO_LATE
Definition: ITOOrchard.h:55
it_oo_fungi_34
Definition: ITOOrchard.h:109
it_oo_ferti_p1
Definition: ITOOrchard.h:72
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
it_oo_sleep_all_day
Definition: ITOOrchard.h:69
it_oo_fungi_7
Definition: ITOOrchard.h:82
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
it_oo_GR_russet_2
Definition: ITOOrchard.h:137
it_oo_foliar_feed_p2
Definition: ITOOrchard.h:127
it_oo_mechanical_thin_3
Definition: ITOOrchard.h:140
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
it_oo_harvest_early2
Definition: ITOOrchard.h:151
it_oo_fungi_19
Definition: ITOOrchard.h:94
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
it_oo_insecti_4
Definition: ITOOrchard.h:113
it_oo_fungi_13
Definition: ITOOrchard.h:88
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
it_oo_DI_continued_late
Definition: ITOOrchard.h:148
Farm::LeafThinning
virtual bool LeafThinning(LE *a_field, double a_user, int a_days)
LeafThinning (leaf removal to increase areation and sun exposure of fruits, e.g., grapes) applied on ...
Definition: FarmFuncs.cpp:1927
it_oo_irrigation_mid
Definition: ITOOrchard.h:74
it_oo_mechanical_thin_1
Definition: ITOOrchard.h:138
it_oo_DI_continued_early
Definition: ITOOrchard.h:146
it_oo_harvest_late1
Definition: ITOOrchard.h:154
it_oo_start
Definition: ITOOrchard.h:68
it_oo_fungi_6
Definition: ITOOrchard.h:81
it_oo_fungi_9
Definition: ITOOrchard.h:84
it_oo_fungi_27
Definition: ITOOrchard.h:102
it_oo_fungi_24
Definition: ITOOrchard.h:99
it_oo_foliar_feed_p4
Definition: ITOOrchard.h:129
it_oo_manual_thin
Definition: ITOOrchard.h:149
it_oo_fungi_20
Definition: ITOOrchard.h:95
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
it_oo_foliar_feed_s4
Definition: ITOOrchard.h:119
it_oo_harvest_late2
Definition: ITOOrchard.h:155
it_oo_insecti_6
Definition: ITOOrchard.h:115
it_oo_insecti_5
Definition: ITOOrchard.h:114
it_oo_insecti_3
Definition: ITOOrchard.h:112
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
it_oo_summer_pruning
Definition: ITOOrchard.h:156
IT_OO_MID
#define IT_OO_MID
Definition: ITOOrchard.h:54
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
it_oo_foliar_feed_s8
Definition: ITOOrchard.h:123
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
it_oo_fungi_25
Definition: ITOOrchard.h:100
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
it_oo_fungi_22
Definition: ITOOrchard.h:97
it_oo_irrigation_late
Definition: ITOOrchard.h:75
it_oo_fungi_12
Definition: ITOOrchard.h:87
it_oo_GR_russet_1
Definition: ITOOrchard.h:136
it_oo_fungi_5
Definition: ITOOrchard.h:80
it_oo_foliar_feed_s5
Definition: ITOOrchard.h:120
it_oo_winter_pruning
Definition: ITOOrchard.h:70
it_oo_fungi_18
Definition: ITOOrchard.h:93
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
it_oo_foobar
Definition: ITOOrchard.h:157
it_oo_fungi_10
Definition: ITOOrchard.h:85
it_oo_fungi_17
Definition: ITOOrchard.h:92
it_oo_foliar_feed_s9
Definition: ITOOrchard.h:124
WARN_BUG
Definition: MapErrorMsg.h:34
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
it_oo_foliar_feed_p5
Definition: ITOOrchard.h:130
it_oo_foliar_feed_s2
Definition: ITOOrchard.h:117
Farm::FP_NPKS
virtual bool FP_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:630
it_oo_harvest_mid1
Definition: ITOOrchard.h:152