Loading [MathJax]/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DK_PotatoIndustry Class Reference

#include <DK_PotatoIndustry.h>

Inheritance diagram for DK_PotatoIndustry:
Crop

Public Member Functions

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

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ DK_PotatoIndustry()

DK_PotatoIndustry::DK_PotatoIndustry ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
94  : Crop(a_tov, a_toc, a_L)
95  {
96  m_first_date = g_date->DayInYear(1, 12); //
98  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

40 {
41  m_farm = a_farm;
42  m_field = a_field;
43  m_ev = a_ev;
44  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).
45  bool flag = false;
46  int d1 = 0;
47  int noDates = 1;
49 
50  switch (m_ev->m_todo)
51  {
52  case dk_pi_start:
53  {
54  a_field->ClearManagementActionSum();
55  m_field->SetVegPatchy(true); // Root crop so is open until tall
56  DK_PI_FORCESPRING = false;
57  m_last_date = g_date->DayInYear(24, 10); // Should match the last flexdate below
58  //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
59  std::vector<std::vector<int>> flexdates(3 + 1, std::vector<int>(2, 0));
60  // Set up the date management stuff
61  // Start and stop dates for all events after harvest
62  flexdates[0][1] = g_date->DayInYear(25, 9); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use - 31/10
63  // Now these are done in pairs, start & end for each operation. If its not used then -1
64  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
65  flexdates[1][1] = g_date->DayInYear(12, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1) - 1/11
66  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 2 (start op 2)
67  flexdates[2][1] = g_date->DayInYear(13, 10); // This date will be moved back as far as necessary and potentially to flexdates 2 (end op 2) - 2/11
68  flexdates[3][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 3 (start op 3)
69  flexdates[3][1] = g_date->DayInYear(14, 10); // This date will be moved back as far as necessary and potentially to flexdates 3 (end op 3) - 3/11
70 
71  // 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
72  int isSpring = 0;
73  if (StartUpCrop(isSpring, flexdates, int(dk_pi_deep_harrow))) break;
74 
75  // End single block date checking code. Please see next line comment as well.
76  // Reinit d1 to first possible starting date.
77  d1 = g_date->OldDays() + g_date->DayInYear(1, 8);
78  // OK, let's go.
79  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
80  if (m_ev->m_forcespring) {
81  int day_num_shift = 365;
82  if (g_date->DayInYear() < 70) day_num_shift = 0;
83  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + day_num_shift, dk_pi_deep_harrow, false);
84  DK_PI_FORCESPRING = true;
85  break;
86  }
87  else SimpleEvent(d1, dk_pi_remove_straw, false);
88  break;
89  }
90  break;
91 
92  case dk_pi_remove_straw:
93  if (m_ev->m_lock || m_farm->DoIt_prob(0.80)) {
94  if (!m_farm->StrawRemoval(m_field, 0.0, g_date->DayInYear(28, 9) - g_date->DayInYear())) {
96  break;
97  }
98  }
99  SimpleEvent(g_date->Date() + 1, dk_pi_stoneburier, false);
100  break;
101 
102  case dk_pi_stoneburier:
103  if (m_ev->m_lock || m_farm->DoIt_prob(0.40)) {
105  SimpleEvent(g_date->Date() + 1, dk_pi_stoneburier, true);
106  break;
107  }
108  }
109  SimpleEvent(g_date->Date() + 1, dk_pi_autumn_plough, false);
110  break;
111 
112  case dk_pi_autumn_plough:
113  if (m_ev->m_lock || m_farm->DoIt_prob(0.40)) {
116  break;
117  }
118  if (a_farm->IsStockFarmer()) {
119  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, dk_pi_ferti_s1, false);
120  break;
121  }
122  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, dk_pi_ferti_p1, false);
123  break;
124  }
125  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, dk_pi_herbicide, false);
126  break;
127 
128  case dk_pi_herbicide:
129  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
130  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide, true);
131  break;
132  }
133  SimpleEvent(g_date->Date() + 1, dk_pi_deep_harrow, false);
134  break;
135 
136  case dk_pi_deep_harrow:
137  if (!m_farm->StubbleHarrowing(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
138  SimpleEvent(g_date->Date() + 1, dk_pi_deep_harrow, true);
139  break;
140  }
141  if (a_farm->IsStockFarmer()) {
143  break;
144  }
145  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_pi_ferti_p1, false);
146  break;
147 
148  case dk_pi_ferti_s1:
149  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(19, 4) - g_date->DayInYear())) {
150  SimpleEvent(g_date->Date() + 1, dk_pi_ferti_s1, true);
151  break;
152  }
153  SimpleEvent(g_date->Date() + 1, dk_pi_sow, false); // main thread
154  SimpleEvent(g_date->Date() + 15, dk_pi_ferti_s2, false); // ferti thread
155  break;
156 
157  case dk_pi_ferti_p1:
158  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(19, 4) - g_date->DayInYear())) {
159  SimpleEvent(g_date->Date() + 1, dk_pi_ferti_p1, true);
160  break;
161  }
162  SimpleEvent(g_date->Date() + 1, dk_pi_sow, false); // main thread
163  SimpleEvent(g_date->Date() + 15, dk_pi_ferti_p2, false); // ferti thread
164  break;
165 
166  case dk_pi_sow:
167  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
168  SimpleEvent(g_date->Date() + 1, dk_pi_sow, true);
169  break;
170  }
171  SimpleEvent(g_date->Date() + 1, dk_pi_strigling, false);
172  break;
173 
174  case dk_pi_ferti_s2:
175  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
176  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(1, 7) - g_date->DayInYear())) {
177  SimpleEvent(g_date->Date() + 1, dk_pi_ferti_s2, true);
178  break;
179  }
180  }
181  break; // end of thread
182 
183  case dk_pi_ferti_p2:
184  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
185  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(1, 7) - g_date->DayInYear())) {
186  SimpleEvent(g_date->Date() + 1, dk_pi_ferti_p2, true);
187  break;
188  }
189  }
190  break; // end of thread
191 
192  case dk_pi_strigling:
193  if (m_ev->m_lock || m_farm->DoIt_prob(0.05)) {
194  if (!m_farm->Strigling(m_field, 0.0, g_date->DayInYear(27, 4) - g_date->DayInYear())) {
195  SimpleEvent(g_date->Date() + 1, dk_pi_strigling, true);
196  break;
197  }
198  SimpleEvent(g_date->Date() + 1, dk_pi_harrow1, false);
199  break;
200  }
201  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide1, false); // herbi thread
202  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5) + m_date_modifier, dk_pi_insecticide1, false); // insecti1 thread
203  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5), dk_pi_water, false); // water thread
204  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5), dk_pi_fungicide1, false); // main thread
205  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6) + m_date_modifier, dk_pi_insecticide3, false); // insecti3 thread
206  break;
207 
208  case dk_pi_harrow1:
209  if (!m_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(28, 4) - g_date->DayInYear())) {
210  SimpleEvent(g_date->Date() + 1, dk_pi_harrow1, true);
211  break;
212  }
213  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide_mw, false); //the 5% doing mechanical weeding (mw) - 75% of those will have one herbi treatment before sprouts
214  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_pi_hill_up1, false); // hill up thread
215  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5) + m_date_modifier, dk_pi_insecticide1, false); // insecti1 thread
216  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5), dk_pi_water, false); // water thread
217  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5), dk_pi_fungicide1, false); // main thread
218  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6) + m_date_modifier, dk_pi_insecticide3, false); // insecti3 thread
219  break;
220 
221  case dk_pi_hill_up1:
222  if (!m_farm->HillingUp(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
223  SimpleEvent(g_date->Date() + 1, dk_pi_hill_up1, true);
224  break;
225  }
226  SimpleEvent(g_date->Date() + 30, dk_pi_hill_up2, false); // hill up thread
227  break;
228 
229  case dk_pi_hill_up2:
230  if (!m_farm->HillingUp(m_field, 0.0, g_date->DayInYear(30, 7) - g_date->DayInYear())) {
231  SimpleEvent(g_date->Date() + 1, dk_pi_hill_up2, true);
232  break;
233  }
234  SimpleEvent(g_date->Date() + 30, dk_pi_hill_up3, false); // hill up thread
235  break;
236 
237  case dk_pi_hill_up3:
238  if (!m_farm->HillingUp(m_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear())) {
239  SimpleEvent(g_date->Date() + 1, dk_pi_hill_up3, true);
240  break;
241  }
242  break; // end of thread
243 
244  case dk_pi_herbicide_mw:
245  if (m_ev->m_lock || m_farm->DoIt_prob(0.75)) {
246  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
247  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide_mw, true);
248  break;
249  }
250  }
251  break; // end of thread
252 
253  case dk_pi_herbicide1:
254  if (m_ev->m_lock || m_farm->DoIt_prob(0.85)) {
255  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
256  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide1, true);
257  break;
258  }
259  }
261  break;
262 
263  case dk_pi_herbicide2:
264  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
265  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
266  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide2, true);
267  break;
268  }
269  }
271  break;
272 
273  case dk_pi_herbicide3:
274  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
275  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
276  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide3, true);
277  break;
278  }
279  }
281  break;
282 
283  case dk_pi_herbicide4:
284  if (m_ev->m_lock || m_farm->DoIt_prob(0.30)) {
285  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
286  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide4, true);
287  break;
288  }
289  }
290  SimpleEvent(g_date->Date() + 7, dk_pi_herbicide5, false);
291  break;
292 
293  case dk_pi_herbicide5:
294  if (m_ev->m_lock || m_farm->DoIt_prob(0.25)) {
295  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
296  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide5, true);
297  break;
298  }
299  }
300  SimpleEvent(g_date->Date() + 7, dk_pi_herbicide6, false);
301  break;
302 
303  case dk_pi_herbicide6:
304  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
305  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
306  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide6, true);
307  break;
308  }
309  }
310  break; // end of thread
311 
312  case dk_pi_insecticide1:
313 #ifdef ECOSTACK_BIOPESTICIDE
314  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
315 #else
316  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
317 #endif
318  // here we check whether we are using ERA pesticide or not
319  d1 = g_date->DayInYear(15, 6) - g_date->DayInYear();
320  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
321  {
322 #ifdef ECOSTACK_BIOPESTICIDE
323  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
324 #else
325  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
326 #endif
327  }
328  else {
329  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
330  }
331  if (!flag) {
332  SimpleEvent(g_date->Date() + 1, dk_pi_insecticide1, true);
333  break;
334  }
335 #ifdef ECOSTACK_BIOPESTICIDE
336  SimpleEvent(g_date->Date() + 7, dk_pi_insecticide1b, false); //If successful apply a second time (1b)
337  SimpleEvent(g_date->Date() + 30, dk_pi_insecticide2, false); //But also queue up insecticide2
338  break;
339 #endif
340  }
341  SimpleEvent(g_date->Date() + 30, dk_pi_insecticide2, false);
342  break;
343 
344 #ifdef ECOSTACK_BIOPESTICIDE
345  case dk_pi_insecticide1b:
346  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
347  // here we check whether we are using ERA pesticide or not
348  d1 = g_date->DayInYear(22, 6) - g_date->DayInYear();
349  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
350  if (!flag) {
352  break;
353  }
354  }
355  break; // end of thread
356 #endif
357  case dk_pi_insecticide2:
358 #ifdef ECOSTACK_BIOPESTICIDE
359  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
360 #else
361  if (m_ev->m_lock || m_farm->DoIt_prob(0.50) || AphidDamage(m_field)) {
362 #endif
363  // here we check whether we are using ERA pesticide or not
364  d1 = g_date->DayInYear(16, 7) - g_date->DayInYear();
365  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
366  {
367 #ifdef ECOSTACK_BIOPESTICIDE
368  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
369 #else
370  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
371 #endif
372  }
373  else {
374  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
375  }
376  if (!flag) {
377  SimpleEvent(g_date->Date() + 1, dk_pi_insecticide2, true);
378  break;
379  }
380  }
381  break; // end of thread
382 
383  case dk_pi_insecticide3:
384 #ifdef ECOSTACK_BIOPESTICIDE
385  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
386 #else
387  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
388 #endif
389  // here we check whether we are using ERA pesticide or not
390  d1 = g_date->DayInYear(30, 6) - g_date->DayInYear();
391  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
392  {
393 #ifdef ECOSTACK_BIOPESTICIDE
394  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
395 #else
396  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
397 #endif
398  }
399  else {
400  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
401  }
402  if (!flag) {
403  SimpleEvent(g_date->Date() + 1, dk_pi_insecticide3, true);
404  break;
405  }
406 #ifdef ECOSTACK_BIOPESTICIDE
407  SimpleEvent(g_date->Date() + 7, dk_pi_insecticide3b, false);
408  break; // end of thread
409 #endif
410  }
411  break; // end of thread
412 #ifdef ECOSTACK_BIOPESTICIDE
413  case dk_pi_insecticide3b:
414  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
415  // here we check whether we are using ERA pesticide or not
416  d1 = g_date->DayInYear(7, 7) - g_date->DayInYear();
417  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
418  if (!flag) {
420  break;
421  }
422  }
423  break; // end of thread
424 #endif
425 
426  case dk_pi_water:
427  if (m_ev->m_lock || m_farm->DoIt_prob(0.75)) {
428  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
429  SimpleEvent(g_date->Date() + 1, dk_pi_water, true);
430  break;
431  }
432  }
433  break; // end of thread
434 
435  case dk_pi_fungicide1:
436  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
437  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(29, 5) - g_date->DayInYear())) {
438  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide1, true);
439  break;
440  }
441  }
442  if (a_farm->IsStockFarmer()) {
444  break;
445  }
446  else SimpleEvent(g_date->Date(), dk_pi_ferti_p3, false);
447  break;
448 
449  case dk_pi_ferti_s3:
450  if (m_ev->m_lock || m_farm->DoIt_prob(0.01)) {
451  if (!m_farm->FA_ManganeseSulphate(m_field, 0.0, g_date->DayInYear(29, 5) - g_date->DayInYear())) {
452  SimpleEvent(g_date->Date() + 1, dk_pi_ferti_s3, true);
453  break;
454  }
455  }
456  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide2, false);
457  break;
458 
459  case dk_pi_ferti_p3:
460  if (m_ev->m_lock || m_farm->DoIt_prob(0.01)) {
461  if (!m_farm->FP_ManganeseSulphate(m_field, 0.0, g_date->DayInYear(29, 5) - g_date->DayInYear())) {
462  SimpleEvent(g_date->Date() + 1, dk_pi_ferti_p3, true);
463  break;
464  }
465  }
466  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide2, false);
467  break;
468 
469  case dk_pi_fungicide2:
470  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
471  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(6, 6) - g_date->DayInYear())) {
472  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide2, true);
473  break;
474  }
475  }
476  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide3, false);
477  break;
478 
479  case dk_pi_fungicide3:
480  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
481  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(14, 6) - g_date->DayInYear())) {
482  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide3, true);
483  break;
484  }
485  }
486  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide4, false);
487  break;
488 
489  case dk_pi_fungicide4:
490  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
491  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(22, 6) - g_date->DayInYear())) {
492  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide4, true);
493  break;
494  }
495  }
496  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide5, false);
497  break;
498 
499  case dk_pi_fungicide5:
500  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
501  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
502  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide5, true);
503  break;
504  }
505  }
506  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide6, false);
507  break;
508 
509  case dk_pi_fungicide6:
510  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
511  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(6, 7) - g_date->DayInYear())) {
512  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide6, true);
513  break;
514  }
515  }
516  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide7, false);
517  break;
518 
519  case dk_pi_fungicide7:
520  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
521  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(14, 7) - g_date->DayInYear())) {
522  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide7, true);
523  break;
524  }
525  }
526  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide8, false);
527  break;
528 
529  case dk_pi_fungicide8:
530  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
531  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(22, 7) - g_date->DayInYear())) {
532  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide8, true);
533  break;
534  }
535  }
536  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide9, false);
537  break;
538 
539  case dk_pi_fungicide9:
540  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
541  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 7) - g_date->DayInYear())) {
542  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide9, true);
543  break;
544  }
545  }
546  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide10, false);
547  break;
548 
549  case dk_pi_fungicide10:
550  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
551  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(6, 8) - g_date->DayInYear())) {
552  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide10, true);
553  break;
554  }
555  }
556  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide11, false);
557  break;
558 
559  case dk_pi_fungicide11:
560  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
561  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(14, 8) - g_date->DayInYear())) {
562  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide11, true);
563  break;
564  }
565  }
566  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide12, false);
567  break;
568 
569  case dk_pi_fungicide12:
570  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
571  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(22, 8) - g_date->DayInYear())) {
572  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide12, true);
573  break;
574  }
575  }
576  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide13, false);
577  break;
578 
579  case dk_pi_fungicide13:
580  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
581  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear())) {
582  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide13, true);
583  break;
584  }
585  }
586  SimpleEvent(g_date->Date() + 7, dk_pi_fungicide14, false);
587  break;
588 
589  case dk_pi_fungicide14:
590  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
591  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(6, 9) - g_date->DayInYear())) {
592  SimpleEvent(g_date->Date() + 1, dk_pi_fungicide14, true);
593  break;
594  }
595  }
596  SimpleEvent(g_date->Date() + 7, dk_pi_harvest, false);
597  break;
598 
599  case dk_pi_harvest:
600  if (!m_farm->HarvestLong(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
601  SimpleEvent(g_date->Date() + 1, dk_pi_harvest, true);
602  break;
603  }
604  SimpleEvent(g_date->Date() + 1, dk_pi_harrow2, false);
605  break;
606  m_field->SetVegPatchy(false);
607  done = true;
608  break;
609 
610  case dk_pi_harrow2:
611  if (m_ev->m_lock || m_farm->DoIt_prob(0.25)) {
612  if (!m_farm->AutumnHarrow(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
613  SimpleEvent(g_date->Date() + 1, dk_pi_harrow2, true);
614  break;
615  }
616  SimpleEvent(g_date->Date() + 1, dk_pi_harrow3, false);
617  break;
618  }
619  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide7, false);
620  break;
621 
622  case dk_pi_harrow3:
623  if (!m_farm->AutumnHarrow(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
624  SimpleEvent(g_date->Date() + 1, dk_pi_harrow3, true);
625  break;
626  }
627  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide7, false);
628  break;
629 
630  case dk_pi_herbicide7:
631  if (m_ev->m_lock || m_farm->DoIt_prob(0.25)) {
632  if (!m_farm->HerbicideTreat(m_field, 0.0, m_field->GetMDates(1, 3) - g_date->DayInYear())) {
633  SimpleEvent(g_date->Date() + 1, dk_pi_herbicide7, true);
634  break;
635  }
636  }
637  done = true;
638  break;
639 
640  default:
641  g_msg->Warn(WARN_BUG, "DK_PotatoIndustry::Do(): "
642  "Unknown event type! ", "");
643  exit(1);
644  }
645  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
646  return done;
647 }

References Crop::AphidDamage(), Farm::AutumnHarrow(), Farm::BiocideTreat(), cfg_pest_potatoes_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), dk_pi_autumn_plough, dk_pi_deep_harrow, dk_pi_ferti_p1, dk_pi_ferti_p2, dk_pi_ferti_p3, dk_pi_ferti_s1, dk_pi_ferti_s2, dk_pi_ferti_s3, DK_PI_FORCESPRING, dk_pi_fungicide1, dk_pi_fungicide10, dk_pi_fungicide11, dk_pi_fungicide12, dk_pi_fungicide13, dk_pi_fungicide14, dk_pi_fungicide2, dk_pi_fungicide3, dk_pi_fungicide4, dk_pi_fungicide5, dk_pi_fungicide6, dk_pi_fungicide7, dk_pi_fungicide8, dk_pi_fungicide9, dk_pi_harrow1, dk_pi_harrow2, dk_pi_harrow3, dk_pi_harvest, dk_pi_herbicide, dk_pi_herbicide1, dk_pi_herbicide2, dk_pi_herbicide3, dk_pi_herbicide4, dk_pi_herbicide5, dk_pi_herbicide6, dk_pi_herbicide7, dk_pi_herbicide_mw, dk_pi_hill_up1, dk_pi_hill_up2, dk_pi_hill_up3, dk_pi_insecticide1, dk_pi_insecticide1b, dk_pi_insecticide2, dk_pi_insecticide3, dk_pi_insecticide3b, dk_pi_remove_straw, dk_pi_sow, dk_pi_start, dk_pi_stoneburier, dk_pi_strigling, dk_pi_water, Farm::DoIt_prob(), Farm::FA_ManganeseSulphate(), Farm::FA_NPK(), Farm::FP_ManganeseSulphate(), Farm::FP_NPK(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Farm::HarvestLong(), Farm::HerbicideTreat(), Farm::HillingUp(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::ProductApplication(), LE::SetVegPatchy(), Farm::ShallowHarrow(), Crop::SimpleEvent(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StrawRemoval(), Farm::Strigling(), Farm::StubbleCultivatorHeavy(), Farm::StubbleHarrowing(), tov_DKPotatoIndustry, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_PotatoIndustry::SetUpFarmCategoryInformation ( )
inline
99  {
100  const int elements = 2 + (dk_pi_foobar - DK_PI_BASE);
102 
103  FarmManagementCategory catlist[elements] =
104  {
105  fmc_Others, // zero element unused but must be here
106  fmc_Others, // dk_pi_start = 1, // Compulsory, start event must always be 1 (one).
107  fmc_Harvest, // dk_pi_harvest = DK_PI_BASE,
108  fmc_Others, // dk_pi_remove_straw,
109  fmc_Cultivation, //dk_pi_stoneburier,
110  fmc_Cultivation, //dk_pi_autumn_plough,
111  fmc_Cultivation, // dk_pi_deep_harrow,
112  fmc_Fertilizer, // dk_pi_ferti_s1,
113  fmc_Fertilizer, // dk_pi_ferti_p1,
114  fmc_Fertilizer, // dk_pi_ferti_s2,
115  fmc_Fertilizer, // dk_pi_ferti_p2,
116  fmc_Others, // dk_pi_sow,
117  fmc_Watering, // dk_pi_water,
118  fmc_Cultivation, // dk_pi_strigling,
119  fmc_Cultivation, // dk_pi_harrow1,
120  fmc_Cultivation, // dk_pi_hill_up1,
121  fmc_Cultivation, // dk_pi_hill_up2,
122  fmc_Cultivation, // dk_pi_hill_up3,
123  fmc_Herbicide, // dk_pi_herbicide,
124  fmc_Herbicide, // dk_pi_herbicide_mw,
125  fmc_Herbicide, // dk_pi_herbicide1,
126  fmc_Herbicide, // dk_pi_herbicide2,
127  fmc_Herbicide, // dk_pi_herbicide3,
128  fmc_Herbicide, // dk_pi_herbicide4,
129  fmc_Herbicide, // dk_pi_herbicide5,
130  fmc_Herbicide, // dk_pi_herbicide6,
131  fmc_Fertilizer, // dk_pi_ferti_s3,
132  fmc_Fertilizer, // dk_pi_ferti_p3,
133  fmc_Fungicide, // dk_pi_fungicide1,
134  fmc_Fungicide, // dk_pi_fungicide2,
135  fmc_Fungicide, // dk_pi_fungicide3,
136  fmc_Fungicide, // dk_pi_fungicide4,
137  fmc_Fungicide, // dk_pi_fungicide5,
138  fmc_Fungicide, // dk_pi_fungicide6,
139  fmc_Fungicide, // dk_pi_fungicide7,
140  fmc_Fungicide, // dk_pi_fungicide8,
141  fmc_Fungicide, // dk_pi_fungicide9,
142  fmc_Fungicide, // dk_pi_fungicide10,
143  fmc_Fungicide, // dk_pi_fungicide11,
144  fmc_Fungicide, // dk_pi_fungicide12,
145  fmc_Fungicide, // dk_pi_fungicide13,
146  fmc_Fungicide, // dk_pi_fungicide14,
147  fmc_Insecticide, // dk_pi_insecticide1,
148  fmc_Insecticide, // dk_pi_insecticide2,
149  fmc_Insecticide, // dk_pi_insecticide3,
150  fmc_Cultivation, // dk_pi_harrow2,
151  fmc_Cultivation, // dk_pi_harrow3,
152  fmc_Herbicide, // dk_pi_herbicide7,
153 
154 
155  // no foobar entry
156 
157  };
158  // Iterate over the catlist elements and copy them to vector
159  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
160 
161  }

References DK_PI_BASE, dk_pi_foobar, fmc_Cultivation, 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_PotatoIndustry().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
dk_pi_start
Definition: DK_PotatoIndustry.h:36
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
dk_pi_ferti_p1
Definition: DK_PotatoIndustry.h:43
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
dk_pi_herbicide_mw
Definition: DK_PotatoIndustry.h:54
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
Farm::Strigling
virtual bool Strigling(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field.
Definition: FarmFuncs.cpp:1206
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
Farm::FP_ManganeseSulphate
virtual bool FP_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply Manganse Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:840
dk_pi_harrow1
Definition: DK_PotatoIndustry.h:49
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
Farm::StubbleCultivatorHeavy
virtual bool StubbleCultivatorHeavy(LE *a_field, double a_user, int a_days)
Carry out a stubble cultivation event on a_field. This is non-inversion type of cultivation which can...
Definition: FarmFuncs.cpp:245
dk_pi_remove_straw
Definition: DK_PotatoIndustry.h:38
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
DK_PotatoIndustry::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_PotatoIndustry.h:99
Farm::StrawRemoval
virtual bool StrawRemoval(LE *a_field, double a_user, int a_days)
Straw covering applied on a_field.
Definition: FarmFuncs.cpp:1752
dk_pi_herbicide5
Definition: DK_PotatoIndustry.h:59
dk_pi_fungicide5
Definition: DK_PotatoIndustry.h:67
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
dk_pi_fungicide4
Definition: DK_PotatoIndustry.h:66
dk_pi_fungicide2
Definition: DK_PotatoIndustry.h:64
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_pi_ferti_p3
Definition: DK_PotatoIndustry.h:62
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
dk_pi_fungicide8
Definition: DK_PotatoIndustry.h:70
dk_pi_autumn_plough
Definition: DK_PotatoIndustry.h:40
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
dk_pi_ferti_p2
Definition: DK_PotatoIndustry.h:45
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
Farm::HillingUp
virtual bool HillingUp(LE *a_field, double a_user, int a_days)
Do hilling up on a_field, probably of potatoes.
Definition: FarmFuncs.cpp:1302
dk_pi_ferti_s1
Definition: DK_PotatoIndustry.h:42
dk_pi_strigling
Definition: DK_PotatoIndustry.h:48
dk_pi_insecticide1
Definition: DK_PotatoIndustry.h:77
dk_pi_harvest
Definition: DK_PotatoIndustry.h:37
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.
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_pi_herbicide1
Definition: DK_PotatoIndustry.h:55
CfgBool::value
bool value() const
Definition: Configurator.h:164
dk_pi_sow
Definition: DK_PotatoIndustry.h:46
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_pi_ferti_s2
Definition: DK_PotatoIndustry.h:44
cfg_pest_potatoes_on
CfgBool cfg_pest_potatoes_on
Turn on pesticides for potatoes.
dk_pi_fungicide7
Definition: DK_PotatoIndustry.h:69
dk_pi_fungicide9
Definition: DK_PotatoIndustry.h:71
Calendar::Date
long Date(void)
Definition: Calendar.h:57
dk_pi_harrow2
Definition: DK_PotatoIndustry.h:82
DK_PI_BASE
#define DK_PI_BASE
Definition: DK_PotatoIndustry.h:31
dk_pi_insecticide3b
Definition: DK_PotatoIndustry.h:81
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
dk_pi_harrow3
Definition: DK_PotatoIndustry.h:83
dk_pi_hill_up1
Definition: DK_PotatoIndustry.h:50
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
dk_pi_herbicide2
Definition: DK_PotatoIndustry.h:56
dk_pi_fungicide12
Definition: DK_PotatoIndustry.h:74
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
dk_pi_fungicide6
Definition: DK_PotatoIndustry.h:68
Farm::FA_ManganeseSulphate
virtual bool FA_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply manganese sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1095
dk_pi_fungicide1
Definition: DK_PotatoIndustry.h:63
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
dk_pi_foobar
Definition: DK_PotatoIndustry.h:85
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
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
tov_DKPotatoIndustry
Definition: LandscapeFarmingEnums.h:405
dk_pi_herbicide
Definition: DK_PotatoIndustry.h:53
dk_pi_fungicide10
Definition: DK_PotatoIndustry.h:72
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
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
dk_pi_hill_up2
Definition: DK_PotatoIndustry.h:51
dk_pi_herbicide7
Definition: DK_PotatoIndustry.h:84
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
Farm::ShallowHarrow
virtual bool ShallowHarrow(LE *a_field, double a_user, int a_days)
Carry out a shallow harrow event on a_field, e.g., after grass cutting event.
Definition: FarmFuncs.cpp:473
dk_pi_ferti_s3
Definition: DK_PotatoIndustry.h:61
Farm::HarvestLong
virtual bool HarvestLong(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field (only differs in the DoIt chance cf harvest)
Definition: FarmFuncs.cpp:1421
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
dk_pi_fungicide13
Definition: DK_PotatoIndustry.h:75
dk_pi_water
Definition: DK_PotatoIndustry.h:47
dk_pi_fungicide14
Definition: DK_PotatoIndustry.h:76
Farm::Water
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: FarmFuncs.cpp:1330
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Farm::AutumnHarrow
virtual bool AutumnHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the autumn on a_field.
Definition: FarmFuncs.cpp:285
dk_pi_deep_harrow
Definition: DK_PotatoIndustry.h:41
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
dk_pi_insecticide1b
Definition: DK_PotatoIndustry.h:78
dk_pi_fungicide11
Definition: DK_PotatoIndustry.h:73
dk_pi_stoneburier
Definition: DK_PotatoIndustry.h:39
dk_pi_herbicide6
Definition: DK_PotatoIndustry.h:60
dk_pi_herbicide4
Definition: DK_PotatoIndustry.h:58
dk_pi_fungicide3
Definition: DK_PotatoIndustry.h:65
Crop::m_date_modifier
static int m_date_modifier
Holds a value that shifts test pesticide use by this many days in crops modified to use it.
Definition: Farm.h:514
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
DK_PI_FORCESPRING
#define DK_PI_FORCESPRING
Definition: DK_PotatoIndustry.h:33
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Crop::AphidDamage
bool AphidDamage(LE *a_field)
Compares aphid numbers per m2 with a threshold to return true if threshold is exceeded.
Definition: Farm.cpp:726
dk_pi_hill_up3
Definition: DK_PotatoIndustry.h:52
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
dk_pi_insecticide2
Definition: DK_PotatoIndustry.h:79
dk_pi_insecticide3
Definition: DK_PotatoIndustry.h:80
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_pi_herbicide3
Definition: DK_PotatoIndustry.h:57
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523