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

DK_BushFruit_Perm2 class
. More...

#include <DK_BushFruit_Perm2.h>

Inheritance diagram for DK_BushFruit_Perm2:
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_BushFruit_Perm2 (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_BushFruit_Perm2 class
.

See DK_BushFruit_Perm2.h::DK_BushFruit_Perm2ToDo 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_BushFruit_Perm2()

DK_BushFruit_Perm2::DK_BushFruit_Perm2 ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
110  : Crop(a_tov, a_toc, a_L)
111  {
112  // When we start it off, the first possible date for a farm operation is ...
113  // This information is used by other crops when they decide how much post processing of
114  // the management is allowed after harvest before the next crop starts.
115  m_first_date=g_date->DayInYear( 31,3 );
117  }

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

Member Function Documentation

◆ Do()

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

64 {
65  m_farm = a_farm;
66  m_field = a_field;
67  m_ev = a_ev;
68  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).
69  bool flag = false;
70  int d1 = 0;
71  int noDates = 1;
73  // Depending what event has occured jump to the correct bit of code
74  switch (m_ev->m_todo)
75  {
76  case dk_bfp2_start:
77  {
78  // dk_bfp2_start just sets up all the starting conditions and reference dates that are needed to start a dk_bfp1
79  DK_BFP2_AFTER_EST = false;
80 
81  m_last_date = g_date->DayInYear(31, 10); // Should match the last flexdate below
82  //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
83  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
84  // Set up the date management stuff
85  // Start and stop dates for all events after harvest
86  flexdates[0][1] = g_date->DayInYear(31, 12); // last possible day of cutting orch
87  // Now these are done in pairs, start & end for each operation. If its not used then -1
88  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
89  flexdates[1][1] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
90 
91  // 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
92  if (StartUpCrop(365, flexdates, int(dk_bfp2_sleep_all_day))) break;
93 
94  // End single block date checking code. Please see next line comment as well.
95  // Reinit d1 to first possible starting date.
96  // Here we queue up the first event
97  //Each field has assign randomly a DK_och_YEARS_AFTER_PLANT
98 
99  if ((DK_BFP2_AFTER_EST + g_date->GetYearNumber()) % 10 == 0) // establishment
100  {
101  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + 365;
103  }
104  else if ((DK_BFP2_AFTER_EST + g_date->GetYearNumber()) % 10 == 1) // 1st year after est - no harvest
105  {
106  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + 365;
108  }
109  else
110  {
111  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + 365; // harvest years
113  }
114  break;
115 
116  }
117  break;
118 
119 
120  // LKM: This is the first real farm operation - wait
122  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
123  if (!m_farm->SleepAllDay(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
125  break;
126  }
127  }
129  break;
130 
132  if (m_ev->m_lock || m_farm->DoIt_prob(0.1)) { // suggests 10%
133  if (!m_farm->Molluscicide(m_field, 0.0, g_date->DayInYear(26, 11) - g_date->DayInYear())) {
135  break;
136  }
137  }
139  break;
140 
142  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(27, 11) - g_date->DayInYear())) {
144  break;
145  }
147  break;
148 
150  if (!m_farm->AutumnHarrow(m_field, 0.0, g_date->DayInYear(28, 11) - g_date->DayInYear())) {
152  break;
153  }
154  if (a_farm->IsStockFarmer()) {
155  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_s1, false);
156  break;
157  }
158  else SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_p1, false);
159  break;
160 
161  case dk_bfp2_ferti_s1: // PK + micronutrients
162  if (!m_farm->FA_PK(m_field, 0.0, g_date->DayInYear(29, 11) - g_date->DayInYear())) {
163  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_s1, true);
164  break;
165  }
166  SimpleEvent(g_date->Date() + 1, dk_bfp2_plant, false);
167  break;
168 
169  case dk_bfp2_ferti_p1: // PK + micronutrients
170  if (!m_farm->FP_PK(m_field, 0.0, g_date->DayInYear(29, 11) - g_date->DayInYear())) {
171  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_p1, true);
172  break;
173  }
174  SimpleEvent(g_date->Date() + 1, dk_bfp2_plant, false);
175  break;
176 
177  case dk_bfp2_plant: // plant 1-year bushes
178  if (!m_farm->AutumnSow(m_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
179  SimpleEvent(g_date->Date() + 1, dk_bfp2_plant, true);
180  break;
181  }
182  SimpleEvent(g_date->Date() + 7, dk_bfp2_herbicide1, false);
183  break;
184 
185  case dk_bfp2_herbicide1: // if needed - suggest 50%
186  if (m_ev->m_lock || m_farm->DoIt_prob(0.5)) { // suggests 50%
187  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(10, 12) - g_date->DayInYear())) {
188  SimpleEvent(g_date->Date() + 1, dk_bfp2_herbicide1, true);
189  break;
190  }
191  }
192  done = true; // end of est autumn
193  break;
194 
195  case dk_bfp2_molluscicide2: // start of 1st year after est - no harvest
196  if (m_ev->m_lock || m_farm->DoIt_prob(0.1)) { // suggests 10%
197  if (!m_farm->Molluscicide(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
199  break;
200  }
201  }
202  //fork of events:
203  SimpleEvent(g_date->Date() + 1 + m_date_modifier, dk_bfp2_insecticide1, false); // insecti thread
204  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide1, false); // fungi thread - main
205  SimpleEvent(g_date->Date() + 1, dk_bfp2_herbicide2, false); // herbi / weeding thread
206  if (a_farm->IsStockFarmer()) { // ferti thread
207  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_s2, false);
208  break;
209  }
210  else SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_p2, false);
211  break;
212 
213  case dk_bfp2_insecticide1: // Lamdex
214  // here we check whether we are using ERA pesticide or not
215  d1 = g_date->DayInYear(30, 4) - g_date->DayInYear();
216  if (!cfg_pest_bushfruit_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
217  {
218  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
219  }
220  else {
221  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 4);
222  }
223  if (!flag) {
225  break;
226  }
227  d1 = g_date->Date() + 14;
228  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 5))
229  {
231  break;
232  }
233  else
234  SimpleEvent(g_date->Date() + 14, dk_bfp2_insecticide2, false);
235  break;
236 
237  case dk_bfp2_insecticide2: // Lamdex
238  // here we check whether we are using ERA pesticide or not
239  d1 = g_date->DayInYear(31, 7) - g_date->DayInYear();
240  if (!cfg_pest_bushfruit_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
241  {
242  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
243  }
244  else {
245  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 4);
246  }
247  if (!flag) {
249  break;
250  }
251  break; // end of thread
252 
253  case dk_bfp2_fungicide1: // Kumulus S
254  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
255  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide1, true);
256  break;
257  }
258  SimpleEvent(g_date->Date() + 14, dk_bfp2_fungicide2, false);
259  break;
260 
261  case dk_bfp2_fungicide2: // Signum
262  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
263  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide2, true);
264  break;
265  }
266  d1 = g_date->Date() + 14;
267  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 5))
268  {
272  break;
273  }
274  else
275  SimpleEvent(g_date->Date() + 14, dk_bfp2_fungicide3, false);
278  break;
279 
280  case dk_bfp2_fungicide3: // Signum
281  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
282  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide3, true);
283  break;
284  }
286  break;
287 
288  case dk_bfp2_fungicide4: // Signum
289  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
290  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide4, true);
291  break;
292  }
293  break;
294 
295  case dk_bfp2_fungicide5: // Kumulus S
296  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
297  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide5, true);
298  break;
299  }
300  break;
301 
302  case dk_bfp2_fungicide6: // Switch
303  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
304  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide6, true);
305  break;
306  }
307  break; // end of thread
308 
309  case dk_bfp2_ferti_s2: // NPK
310  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
311  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_s2, true);
312  break;
313  }
314  SimpleEvent(g_date->Date() + 30, dk_bfp2_ferti_s3, false);
315  break;
316 
317  case dk_bfp2_ferti_p2: // NPK
318  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
319  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_p2, true);
320  break;
321  }
322  SimpleEvent(g_date->Date() + 30, dk_bfp2_ferti_p3, false);
323  break;
324 
325  case dk_bfp2_ferti_s3: // NPK
326  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
327  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_s3, true);
328  break;
329  }
330  break; // end of thread
331 
332  case dk_bfp2_ferti_p3: // NPK
333  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
334  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_p3, true);
335  break;
336  }
337  break; // end of thread
338 
339  case dk_bfp2_herbicide2: // Kerb 400 SC
340  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
341  SimpleEvent(g_date->Date() + 1, dk_bfp2_herbicide2, true);
342  break;
343  }
344  // fork of events:
345  SimpleEvent(g_date->Date() + 14, dk_bfp2_row_cultivation1, false); // weeding thread - main thread
346  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_bfp2_molluscicide3, false); // mollusci thread
347  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_bfp2_water1, false); // water thread
348  break;
349 
351  if (!m_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
353  break;
354  }
356  break;
357 
359  if (!m_farm->ManualWeeding(m_field, 0.0, g_date->DayInYear(16, 5) - g_date->DayInYear())) {
361  break;
362  }
364  break;
365 
367  if (!m_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
369  break;
370  }
372  break;
373 
375  if (!m_farm->ManualWeeding(m_field, 0.0, g_date->DayInYear(1, 6) - g_date->DayInYear())) {
377  break;
378  }
380  break;
381 
383  if (!m_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(16, 6) - g_date->DayInYear())) {
385  break;
386  }
388  break;
389 
391  if (!m_farm->ManualWeeding(m_field, 0.0, g_date->DayInYear(17, 6) - g_date->DayInYear())) {
393  break;
394  }
395  SimpleEvent(g_date->Date() + 14, dk_bfp2_herbicide3, false);
396  break;
397 
398  case dk_bfp2_herbicide3: // Finalsan
399  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(10, 7) - g_date->DayInYear())) {
400  SimpleEvent(g_date->Date() + 1, dk_bfp2_herbicide3, true);
401  break;
402  }
403  SimpleEvent(g_date->OldDays() + g_date->DayInYear(31, 7), dk_bfp2_wait, false);
404  break;
405 
406  case dk_bfp2_molluscicide3:
407  if (m_ev->m_lock || m_farm->DoIt_prob(0.1)) { // suggests 10%
408  if (!m_farm->Molluscicide(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
410  break;
411  }
412  }
413  break; // end of thread
414 
415  case dk_bfp2_water1: // 100% of sandy soils
416  if (m_field->GetSoilType() == tos_Sand || m_field->GetSoilType() == tos_LoamySand || m_field->GetSoilType() == tos_SandyLoam || m_field->GetSoilType() == tos_SandyClayLoam) // on sandy soils (NL ZAND & LOSS)
417  {
418  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
419  SimpleEvent(g_date->Date() + 1, dk_bfp2_water1, true);
420  break;
421  }
423  break;
424  }
425  else
427  break;
428 
429  case dk_bfp2_water1_clay: // suggests 50% of clay soils
430  if (m_ev->m_lock || m_farm->DoIt_prob(0.5)) {
431  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
433  break;
434  }
435  }
437  break;
438 
439  case dk_bfp2_water2: // 100% of sandy soils,
440  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
441  SimpleEvent(g_date->Date() + 1, dk_bfp2_water2, true);
442  break;
443  }
444  break;
445 
446  case dk_bfp2_water2_clay: // 50% of clay
447  if (m_ev->m_lock || m_farm->DoIt_prob(0.5)) {
448  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
450  break;
451  }
452  }
453  break;
454 
455  case dk_bfp2_wait:
456  if (!m_farm->SleepAllDay(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
457  SimpleEvent(g_date->Date() + 1, dk_bfp2_wait, true);
458  break;
459  }
460  done = true; // end of 1st year after est
461  break;
462 
463  case dk_bfp2_molluscicide4: // start of harvest years
464  if (m_ev->m_lock || m_farm->DoIt_prob(0.1)) { // suggests 10%
465  if (!m_farm->Molluscicide(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
467  break;
468  }
469  }
470  //fork of events:
471  SimpleEvent(g_date->Date() + 1 + m_date_modifier, dk_bfp2_insecticide3, false); // insecti thread
472  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide7, false); // fungi thread
473  SimpleEvent(g_date->Date() + 1, dk_bfp2_herbicide4, false); // herbi / weeding thread - main
474  if (a_farm->IsStockFarmer()) { // ferti thread
475  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_s4, false);
476  break;
477  }
478  else SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_p4, false);
479  break;
480 
481  case dk_bfp2_insecticide3: // Lamdex
482  // here we check whether we are using ERA pesticide or not
483  d1 = g_date->DayInYear(30, 4) - g_date->DayInYear();
484  if (!cfg_pest_bushfruit_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
485  {
486  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
487  }
488  else {
489  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 4);
490  }
491  if (!flag) {
493  break;
494  }
495  d1 = g_date->Date() + 14;
496  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 5))
497  {
499  break;
500  }
501  else
502  SimpleEvent(g_date->Date() + 14, dk_bfp2_insecticide4, false);
503  break;
504 
505  case dk_bfp2_insecticide4: // Lamdex
506  // here we check whether we are using ERA pesticide or not
507  d1 = g_date->DayInYear(31, 7) - g_date->DayInYear();
508  if (!cfg_pest_bushfruit_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
509  {
510  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
511  }
512  else {
513  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 4);
514  }
515  if (!flag) {
517  break;
518  }
519  break; // end of thread
520 
521  case dk_bfp2_fungicide7: // Kumulus S
522  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
523  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide7, true);
524  break;
525  }
526  SimpleEvent(g_date->Date() + 14, dk_bfp2_fungicide8, false);
527  break;
528 
529  case dk_bfp2_fungicide8: // Signum
530  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
531  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide8, true);
532  break;
533  }
534  d1 = g_date->Date() + 14;
535  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 5))
536  {
540  break;
541  }
542  else
543  SimpleEvent(g_date->Date() + 14, dk_bfp2_fungicide9, false);
546  break;
547 
548  case dk_bfp2_fungicide9: // Signum
549  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
550  SimpleEvent(g_date->Date() + 1, dk_bfp2_fungicide9, true);
551  break;
552  }
554  break;
555 
556  case dk_bfp2_fungicide10: // Signum
557  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
559  break;
560  }
561  break;
562 
563  case dk_bfp2_fungicide11: // Kumulus S
564  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
566  break;
567  }
568  break;
569 
570  case dk_bfp2_fungicide12: // Switch
571  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
573  break;
574  }
575  break; // end of thread
576 
577  case dk_bfp2_ferti_s4: // NPK
578  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
579  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_s4, true);
580  break;
581  }
582  break;
583 
584  case dk_bfp2_ferti_p4: // NPK
585  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
586  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_p4, true);
587  break;
588  }
589  break; // end of thread
590 
591  case dk_bfp2_herbicide4: // Finalsan
592  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
593  SimpleEvent(g_date->Date() + 1, dk_bfp2_herbicide4, true);
594  break;
595  }
596  // fork of events:
597  SimpleEvent(g_date->Date() + 14, dk_bfp2_cutting1, false); // weeding / cutting thread
598  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_bfp2_molluscicide5, false); // mollusci thread
599  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_bfp2_water3, false); // water thread
600  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 7), dk_bfp2_harvest, false); // harvest - main thread
601  break;
602 
603  case dk_bfp2_cutting1: // cutting grass between rows
604  if (!m_farm->CutOrch(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
605  SimpleEvent(g_date->Date() + 1, dk_bfp2_cutting1, true);
606  break;
607  }
608  SimpleEvent(g_date->Date() + 14, dk_bfp2_cutting2, false);
609  break;
610 
611  case dk_bfp2_cutting2:
612  if (!m_farm->CutOrch(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
613  SimpleEvent(g_date->Date() + 1, dk_bfp2_cutting2, true);
614  break;
615  }
616  SimpleEvent(g_date->Date() + 14, dk_bfp2_cutting3, false);
617  break;
618 
619  case dk_bfp2_cutting3:
620  if (!m_farm->CutOrch(m_field, 0.0, g_date->DayInYear(16, 6) - g_date->DayInYear())) {
621  SimpleEvent(g_date->Date() + 1, dk_bfp2_cutting3, true);
622  break;
623  }
624  SimpleEvent(g_date->Date() + 14, dk_bfp2_herbicide5, false);
625  break;
626 
627  case dk_bfp2_herbicide5: // Finalsan
628  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(10, 7) - g_date->DayInYear())) {
629  SimpleEvent(g_date->Date() + 1, dk_bfp2_herbicide5, true);
630  break;
631  }
632  break; // end of thread
633 
635  if (m_ev->m_lock || m_farm->DoIt_prob(0.1)) { // suggests 10%
636  if (!m_farm->Molluscicide(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
638  break;
639  }
640  }
641  break; // end of thread
642 
643  case dk_bfp2_water3: // 100% of sandy soils
644  if (m_field->GetSoilType() == tos_Sand || m_field->GetSoilType() == tos_LoamySand || m_field->GetSoilType() == tos_SandyLoam || m_field->GetSoilType() == tos_SandyClayLoam) // on sandy soils (NL ZAND & LOSS)
645  {
646  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
647  SimpleEvent(g_date->Date() + 1, dk_bfp2_water3, true);
648  break;
649  }
651  break;
652  }
653  else
655  break;
656 
657  case dk_bfp2_water3_clay: // suggests 50% of clay soils
658  if (m_ev->m_lock || m_farm->DoIt_prob(0.5)) {
659  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
661  break;
662  }
663  }
665  break;
666 
667  case dk_bfp2_water4: // 100% of sandy soils,
668  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
669  SimpleEvent(g_date->Date() + 1, dk_bfp2_water4, true);
670  break;
671  }
672  break;
673 
674  case dk_bfp2_water4_clay: // 50% of clay
675  if (m_ev->m_lock || m_farm->DoIt_prob(0.5)) {
676  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
678  break;
679  }
680  }
681  break;
682  case dk_bfp2_harvest:
683  if (!m_farm->HarvestBF_Machine(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
684  SimpleEvent(g_date->Date() + 1, dk_bfp2_harvest, true);
685  break;
686  }
687  if (a_farm->IsStockFarmer()) { // ferti thread
688  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_s5, false);
689  break;
690  }
691  else SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_p5, false);
692  break;
693  case dk_bfp2_ferti_s5: // NPK
694  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(2, 8) - g_date->DayInYear())) {
695  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_s5, true);
696  break;
697  }
698  SimpleEvent(g_date->Date() + 1, dk_bfp2_pruning, false);
699  break;
700 
701  case dk_bfp2_ferti_p5: // NPK
702  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(2, 8) - g_date->DayInYear())) {
703  SimpleEvent(g_date->Date() + 1, dk_bfp2_ferti_p5, true);
704  break;
705  }
706  SimpleEvent(g_date->Date() + 1, dk_bfp2_pruning, false);
707  break;
708 
709  case dk_bfp2_pruning:
710  if (!m_farm->Pruning(m_field, 0.0, g_date->DayInYear(3, 8) - g_date->DayInYear())) {
711  SimpleEvent(g_date->Date() + 1, dk_bfp2_pruning, true);
712  break;
713  }
715  break;
716 
717  case dk_bfp2_insecticide5: // Lamdex
718  // here we check whether we are using ERA pesticide or not
719  d1 = g_date->DayInYear(15, 5) - g_date->DayInYear();
720  if (!cfg_pest_bushfruit_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
721  {
722  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
723  }
724  else {
725  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 4);
726  }
727  if (!flag) {
729  break;
730  }
731  done = true; // end of harvest year
732  break;
733  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
734  // END of MAIN THREAD
735  break;
736  default:
737  g_msg->Warn(WARN_BUG, "DK_BushFruit_Perm2::Do(): "
738  "Unknown event type! ", "");
739  exit(1);
740  }
741  return done;
742 }

References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnSow(), cfg_pest_bushfruit_on, cfg_pest_product_amounts, Farm::CutOrch(), Calendar::Date(), Calendar::DayInYear(), DK_BFP2_AFTER_EST, dk_bfp2_autumn_harrow, dk_bfp2_autumn_plough, dk_bfp2_cutting1, dk_bfp2_cutting2, dk_bfp2_cutting3, dk_bfp2_ferti_p1, dk_bfp2_ferti_p2, dk_bfp2_ferti_p3, dk_bfp2_ferti_p4, dk_bfp2_ferti_p5, dk_bfp2_ferti_s1, dk_bfp2_ferti_s2, dk_bfp2_ferti_s3, dk_bfp2_ferti_s4, dk_bfp2_ferti_s5, dk_bfp2_fungicide1, dk_bfp2_fungicide10, dk_bfp2_fungicide11, dk_bfp2_fungicide12, dk_bfp2_fungicide2, dk_bfp2_fungicide3, dk_bfp2_fungicide4, dk_bfp2_fungicide5, dk_bfp2_fungicide6, dk_bfp2_fungicide7, dk_bfp2_fungicide8, dk_bfp2_fungicide9, dk_bfp2_harvest, dk_bfp2_herbicide1, dk_bfp2_herbicide2, dk_bfp2_herbicide3, dk_bfp2_herbicide4, dk_bfp2_herbicide5, dk_bfp2_insecticide1, dk_bfp2_insecticide2, dk_bfp2_insecticide3, dk_bfp2_insecticide4, dk_bfp2_insecticide5, dk_bfp2_manual_weeding1, dk_bfp2_manual_weeding2, dk_bfp2_manual_weeding3, dk_bfp2_molluscicide1, dk_bfp2_molluscicide2, dk_bfp2_molluscicide3, dk_bfp2_molluscicide4, dk_bfp2_molluscicide5, dk_bfp2_plant, dk_bfp2_pruning, dk_bfp2_row_cultivation1, dk_bfp2_row_cultivation2, dk_bfp2_row_cultivation3, dk_bfp2_sleep_all_day, dk_bfp2_start, dk_bfp2_wait, dk_bfp2_water1, dk_bfp2_water1_clay, dk_bfp2_water2, dk_bfp2_water2_clay, dk_bfp2_water3, dk_bfp2_water3_clay, dk_bfp2_water4, dk_bfp2_water4_clay, Farm::DoIt_prob(), Farm::FA_NPK(), Farm::FA_PK(), Farm::FP_NPK(), Farm::FP_PK(), Farm::FungicideTreat(), g_date, g_msg, LE::GetSoilType(), Calendar::GetYearNumber(), Farm::HarvestBF_Machine(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Farm::ManualWeeding(), Farm::Molluscicide(), Calendar::OldDays(), ppp_1, Farm::ProductApplication(), Farm::Pruning(), Farm::RowCultivation(), Crop::SimpleEvent(), Farm::SleepAllDay(), Crop::StartUpCrop(), tos_LoamySand, tos_Sand, tos_SandyClayLoam, tos_SandyLoam, tov_DKBushFruit_Perm2, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_BushFruit_Perm2::SetUpFarmCategoryInformation ( )
inline
118  {
119  const int elements = 2 + (dk_bfp2_foobar - DK_BFP2_BASE);
121 
122  FarmManagementCategory catlist[elements] =
123  {
124  fmc_Others, // zero element unused but must be here
125  fmc_Others, // dk_bfp2_start = 1, // Compulsory, must always be 1 (one).
126  fmc_Others, // dk_bfp2_sleep_all_day = DK_BFP2_BASE,
127  fmc_Others, // dk_bfp2_mollucicide1, //est autumn
128  fmc_Cultivation, // dk_bfp2_autumn_plough,
129  fmc_Cultivation, // dk_bfp2_autumn_harrow,
130  fmc_Herbicide, // dk_bfp2_herbicide1,
131  fmc_Fertilizer, // dk_bfp2_ferti_s1,
132  fmc_Fertilizer, // dk_bfp2_ferti_p1,
133  fmc_Others, // dk_bfp2_plant,
134  fmc_Others, // dk_bfp2_molluscicide2, // 1st year after est autumn
135  fmc_Fertilizer, // dk_bfp2_ferti_s2,
136  fmc_Fertilizer, // dk_bfp2_ferti_p2,
137  fmc_Insecticide, // dk_bfp2_insecticide1,
138  fmc_Fungicide, // dk_bfp2_fungicide1,
139  fmc_Herbicide, // dk_bfp2_herbicide2,
140  fmc_Fungicide, // dk_bfp2_fungicide2,
141  fmc_Fertilizer, // dk_bfp2_ferti_s3,
142  fmc_Fertilizer, // dk_bfp2_ferti_p3,
143  fmc_Cultivation, // dk_bfp2_row_cultivation1,
144  fmc_Cultivation, // dk_bfp2_manual_weeding1,
145  fmc_Cultivation, // dk_bfp2_row_cultivation2,
146  fmc_Cultivation, // dk_bfp2_manual_weeding2,
147  fmc_Cultivation, // dk_bfp2_row_cultivation3,
148  fmc_Cultivation, // dk_bfp2_manual_weeding3,
149  fmc_Herbicide, // dk_bfp2_herbicide3,
150  fmc_Others, // dk_bfp2_mollusicide3,
151  fmc_Fungicide, // dk_bfp2_fungicide3,
152  fmc_Insecticide, // dk_bfp2_insecticide2,
153  fmc_Fungicide, // dk_bfp2_fungicide4,
154  fmc_Fungicide, // dk_bfp2_fungicide5,
155  fmc_Fungicide, // dk_bfp2_fungicide6,
156  fmc_Watering, // dk_bfp2_water1,
157  fmc_Watering, // dk_bfp2_water1_clay,
158  fmc_Watering, // dk_bfp2_water2,
159  fmc_Watering, // dk_bfp2_water2_clay,
160  fmc_Others, // dk_bfp2_molluscicide4, // harvest years (+10 years)
161  fmc_Fertilizer, // dk_bfp2_ferti_s4,
162  fmc_Fertilizer, // dk_bfp2_ferti_p4,
163  fmc_Insecticide, // dk_bfp2_insecticide3,
164  fmc_Fungicide, // dk_bfp2_fungicide7,
165  fmc_Herbicide, // dk_bfp2_herbicide4,
166  fmc_Fungicide, // dk_bfp2_fungicide8,
167  fmc_Cutting, // dk_bfp2_cutting1,
168  fmc_Cutting, // dk_bfp2_cutting2,
169  fmc_Cutting, // dk_bfp2_cutting3,
170  fmc_Herbicide, // dk_bfp2_herbicide5,
171  fmc_Others, // dk_bfp2_mollusicide5,
172  fmc_Fungicide, // dk_bfp2_fungicide9,
173  fmc_Insecticide, // dk_bfp2_insecticide4,
174  fmc_Fungicide, // dk_bfp2_fungicide10,
175  fmc_Fungicide, // dk_bfp2_fungicide11,
176  fmc_Fungicide, // dk_bfp2_fungicide13,
177  fmc_Watering, // dk_bfp2_water3,
178  fmc_Watering, // dk_bfp2_water3_clay,
179  fmc_Watering, // dk_bfp2_water4,
180  fmc_Watering, // dk_bfp2_water�4_clay,
181  fmc_Harvest, // dk_bfp2_harvest,
182  fmc_Fertilizer, // dk_bfp2_ferti_s5,
183  fmc_Fertilizer, // dk_bfp2_ferti_p5,
184  fmc_Cutting, // dk_bfp2_pruning,
185  fmc_Insecticide, // dk_bfp2_insecticide5,
186  fmc_Others, // dk_bfp2_wait,
187 
188  // no foobar entry
189 
190  };
191  // Iterate over the catlist elements and copy them to vector
192  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
193  }

References DK_BFP2_BASE, dk_bfp2_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_BushFruit_Perm2().


The documentation for this class was generated from the following files:
dk_bfp2_ferti_s3
Definition: DK_BushFruit_Perm2.h:49
dk_bfp2_herbicide4
Definition: DK_BushFruit_Perm2.h:73
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
dk_bfp2_plant
Definition: DK_BushFruit_Perm2.h:41
dk_bfp2_water2
Definition: DK_BushFruit_Perm2.h:66
dk_bfp2_molluscicide1
Definition: DK_BushFruit_Perm2.h:35
dk_bfp2_molluscicide2
Definition: DK_BushFruit_Perm2.h:42
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_bfp2_water1
Definition: DK_BushFruit_Perm2.h:64
dk_bfp2_insecticide1
Definition: DK_BushFruit_Perm2.h:45
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
DK_BushFruit_Perm2::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_BushFruit_Perm2.h:118
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::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
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
dk_bfp2_insecticide4
Definition: DK_BushFruit_Perm2.h:81
Farm::Molluscicide
virtual bool Molluscicide(LE *a_field, double a_user, int a_days)
Apply molluscicide to a_field.
Definition: FarmFuncs.cpp:2310
tos_SandyClayLoam
Definition: LandscapeFarmingEnums.h:722
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_bfp2_row_cultivation2
Definition: DK_BushFruit_Perm2.h:53
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
dk_bfp2_ferti_p4
Definition: DK_BushFruit_Perm2.h:70
tos_SandyLoam
Definition: LandscapeFarmingEnums.h:721
dk_bfp2_fungicide5
Definition: DK_BushFruit_Perm2.h:62
dk_bfp2_water3
Definition: DK_BushFruit_Perm2.h:85
dk_bfp2_insecticide5
Definition: DK_BushFruit_Perm2.h:93
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
dk_bfp2_foobar
Definition: DK_BushFruit_Perm2.h:95
DK_BFP2_AFTER_EST
#define DK_BFP2_AFTER_EST
Definition: DK_BushFruit_Perm2.h:23
dk_bfp2_ferti_p5
Definition: DK_BushFruit_Perm2.h:91
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
dk_bfp2_autumn_plough
Definition: DK_BushFruit_Perm2.h:36
dk_bfp2_fungicide8
Definition: DK_BushFruit_Perm2.h:74
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
dk_bfp2_cutting3
Definition: DK_BushFruit_Perm2.h:77
dk_bfp2_harvest
Definition: DK_BushFruit_Perm2.h:89
Farm::FP_PK
virtual bool FP_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:673
dk_bfp2_ferti_p2
Definition: DK_BushFruit_Perm2.h:44
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_bfp2_herbicide1
Definition: DK_BushFruit_Perm2.h:38
CfgBool::value
bool value() const
Definition: Configurator.h:164
dk_bfp2_water4_clay
Definition: DK_BushFruit_Perm2.h:88
dk_bfp2_cutting2
Definition: DK_BushFruit_Perm2.h:76
dk_bfp2_fungicide4
Definition: DK_BushFruit_Perm2.h:61
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_bfp2_fungicide11
Definition: DK_BushFruit_Perm2.h:83
dk_bfp2_fungicide1
Definition: DK_BushFruit_Perm2.h:46
dk_bfp2_molluscicide5
Definition: DK_BushFruit_Perm2.h:79
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.
Calendar::Date
long Date(void)
Definition: Calendar.h:57
dk_bfp2_ferti_s5
Definition: DK_BushFruit_Perm2.h:90
dk_bfp2_fungicide2
Definition: DK_BushFruit_Perm2.h:48
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
dk_bfp2_molluscicide3
Definition: DK_BushFruit_Perm2.h:58
dk_bfp2_insecticide3
Definition: DK_BushFruit_Perm2.h:71
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
dk_bfp2_fungicide10
Definition: DK_BushFruit_Perm2.h:82
dk_bfp2_water2_clay
Definition: DK_BushFruit_Perm2.h:67
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
dk_bfp2_row_cultivation1
Definition: DK_BushFruit_Perm2.h:51
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
DK_BFP2_BASE
#define DK_BFP2_BASE
Definition: DK_BushFruit_Perm2.h:25
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
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::ManualWeeding
virtual bool ManualWeeding(LE *a_field, double a_user, int a_days)
Manual weeding on a_field - no tramlines since weeding by hand, the bush stays on field with same veg...
Definition: FarmFuncs.cpp:2002
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
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
tos_Sand
Definition: LandscapeFarmingEnums.h:719
dk_bfp2_fungicide7
Definition: DK_BushFruit_Perm2.h:72
dk_bfp2_insecticide2
Definition: DK_BushFruit_Perm2.h:60
dk_bfp2_ferti_p1
Definition: DK_BushFruit_Perm2.h:40
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_bfp2_start
Definition: DK_BushFruit_Perm2.h:33
dk_bfp2_fungicide3
Definition: DK_BushFruit_Perm2.h:59
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_bfp2_fungicide12
Definition: DK_BushFruit_Perm2.h:84
dk_bfp2_manual_weeding2
Definition: DK_BushFruit_Perm2.h:54
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
Farm::AutumnPlough
virtual bool AutumnPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the autumn on a_field.
Definition: FarmFuncs.cpp:212
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
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_bfp2_molluscicide4
Definition: DK_BushFruit_Perm2.h:68
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
dk_bfp2_water3_clay
Definition: DK_BushFruit_Perm2.h:86
dk_bfp2_ferti_s2
Definition: DK_BushFruit_Perm2.h:43
dk_bfp2_sleep_all_day
Definition: DK_BushFruit_Perm2.h:34
dk_bfp2_cutting1
Definition: DK_BushFruit_Perm2.h:75
Farm::HarvestBF_Machine
virtual bool HarvestBF_Machine(LE *a_field, double a_user, int a_days)
Harvest bush fruit on a_field - tramlines since fruits are picked by machine, the bush stays on field...
Definition: FarmFuncs.cpp:1814
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_bfp2_herbicide2
Definition: DK_BushFruit_Perm2.h:47
Farm::AutumnSow
virtual bool AutumnSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out a sowing event in the autumn on a_field.
Definition: FarmFuncs.cpp:360
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
dk_bfp2_fungicide6
Definition: DK_BushFruit_Perm2.h:63
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_bfp2_row_cultivation3
Definition: DK_BushFruit_Perm2.h:55
dk_bfp2_ferti_s1
Definition: DK_BushFruit_Perm2.h:39
dk_bfp2_manual_weeding3
Definition: DK_BushFruit_Perm2.h:56
dk_bfp2_water1_clay
Definition: DK_BushFruit_Perm2.h:65
dk_bfp2_water4
Definition: DK_BushFruit_Perm2.h:87
dk_bfp2_ferti_s4
Definition: DK_BushFruit_Perm2.h:69
dk_bfp2_pruning
Definition: DK_BushFruit_Perm2.h:92
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
dk_bfp2_herbicide5
Definition: DK_BushFruit_Perm2.h:78
dk_bfp2_wait
Definition: DK_BushFruit_Perm2.h:94
dk_bfp2_autumn_harrow
Definition: DK_BushFruit_Perm2.h:37
dk_bfp2_herbicide3
Definition: DK_BushFruit_Perm2.h:57
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
tov_DKBushFruit_Perm2
Definition: LandscapeFarmingEnums.h:443
Farm::FA_PK
virtual bool FA_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1010
dk_bfp2_manual_weeding1
Definition: DK_BushFruit_Perm2.h:52
dk_bfp2_ferti_p3
Definition: DK_BushFruit_Perm2.h:50
dk_bfp2_fungicide9
Definition: DK_BushFruit_Perm2.h:80
cfg_pest_bushfruit_on
CfgBool cfg_pest_bushfruit_on
Turn on pesticides for bush fruit.
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
tos_LoamySand
Definition: LandscapeFarmingEnums.h:720
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001