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

FR_Potatoes class
. More...

#include <FR_Potatoes.h>

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

FR_Potatoes class
.

See FR_Potatoes.h::FR_PotatoesToDo 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

◆ FR_Potatoes()

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

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

Member Function Documentation

◆ Do()

bool FR_Potatoes::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 winter wheat.

Reimplemented from Crop.

99 {
100  m_field = a_field; // this is needed because of possible calls to other methods and currently we do not pass parameters.
101  m_farm = a_farm; // this is needed because of possible calls to other methods and currently we do not pass parameters.
102  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
103  bool flag = false;
104  int d1 = 0;
105  m_ev = a_ev;
106  switch (a_ev->m_todo)
107  {
108  case fr_p_start:
109  {
110  // This is just to hold a local variable in scope and prevent compiler errors
111  // ww_start just sets up all the starting conditions and reference dates that are needed to start a ww
112  // crop off
113  FR_P_PLOUGH = false;
114  FR_P_SLURRY = false;
115 
116  a_field->ClearManagementActionSum();
117 
118  m_last_date = g_date->DayInYear(5, 10); // Should match the last flexdate below
119  //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
120  std::vector<std::vector<int>> flexdates(3 + 1, std::vector<int>(2, 0));
121  // Set up the date management stuff
122  // Start and stop dates for all events after harvest
123  flexdates[0][1] = g_date->DayInYear(5, 10); // last possible day harvest
124 
125  // 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
126  int isSpring = 0;
127  if (StartUpCrop(isSpring, flexdates, int(fr_p_herbicide1))) break;
128 
129  // End single block date checking code. Please see next line comment as well.
130  // OK, let's go.
131  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
132  if (m_ev->m_forcespring) {
133  int day_num_shift = 365;
134  if (g_date->DayInYear() < 70) day_num_shift = 0;
135  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 2) + day_num_shift, fr_p_herbicide1, false);
136  break;
137  }
138  else
139  d1 = g_date->OldDays() + g_date->DayInYear(10, 10);
140  SimpleEvent(d1, fr_p_stubble_plough, false);
141  break;
142 
143  }
144  break;
145  // This is the first real farm operation
146 
147  case fr_p_stubble_plough:
148  if (a_ev->m_lock || a_farm->DoIt_prob(.80)) {
149  if (!a_farm->StubblePlough(a_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
151  break;
152  }
153  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 9), fr_p_pk, false);
154  break;
155  }
156  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 8), fr_p_stubble_harrow, false);
157  break;
158 
159  case fr_p_stubble_harrow:
160  if (!a_farm->StubbleHarrowing(a_field, 0.0, g_date->DayInYear(2, 8) - g_date->DayInYear())) {
162  break;
163  }
164  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 9), fr_p_pk, false);
165  break;
166 
167  case fr_p_pk:
168  if (a_ev->m_lock || a_farm->DoIt_prob(.40)) {
169  if (!a_farm->FP_PK(a_field, 0.0, g_date->DayInYear(30, 9) - g_date->DayInYear())) {
170  SimpleEvent(g_date->Date() + 1, fr_p_pk, true);
171  break;
172  }
173  }
174  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1,2)+365, fr_p_herbicide1, false);
175  break;
176 
177  case fr_p_herbicide1:
178  if (a_ev->m_lock || a_farm->DoIt_prob(.40)) {
179  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(28, 2) - g_date->DayInYear())) {
180  SimpleEvent(g_date->Date() + 1, fr_p_herbicide1, true);
181  break;
182  }
183  }
185  break;
186 
187  case fr_p_fertilizer:
188  if (a_ev->m_lock || a_farm->DoIt_prob(.30)) {
189  if (!a_farm->FP_Manure(a_field, 0.0, g_date->DayInYear(15, 3) - g_date->DayInYear())) {
190  SimpleEvent(g_date->Date() + 1, fr_p_fertilizer, true);
191  break;
192  }
193  }
195  break;
196 
197  case fr_p_subsoiler:
198  if (a_ev->m_lock || a_farm->DoIt_prob(.30)) {
199  if (!a_farm->DeepPlough(a_field, 0.0, g_date->DayInYear(15, 3) - g_date->DayInYear())) {
200  SimpleEvent(g_date->Date() + 1, fr_p_subsoiler, true);
201  break;
202  }
203  }
205  break;
206 
207  case fr_p_spring_plough:
208  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(15, 3) - g_date->DayInYear())) {
209  SimpleEvent(g_date->Date() + 1, fr_p_spring_plough, true);
210  break;
211  }
212  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 3), fr_p_sow, false);
213  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 4), fr_p_fungicide1, false); // main thread
214  break;
215 
216  case fr_p_sow:
217  if (!a_farm->SpringSow(a_field, 0.0,
218  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
219  SimpleEvent(g_date->Date() + 1, fr_p_sow, true);
220  break;
221  }
222  SimpleEvent(g_date->Date(), fr_p_n1, false);
223  break;
224 
225  case fr_p_n1:
226  if (a_ev->m_lock || a_farm->DoIt(100)) {
227  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
228  SimpleEvent(g_date->Date() + 1, fr_p_n1, true);
229  break;
230  }
231  }
233  break;
234 
236  if (a_ev->m_lock || a_farm->DoIt(50)) {
237  if (!a_farm->StriglingHill(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
239  break;
240  }
241  SimpleEvent(g_date->Date() + 1, fr_p_herbicide2, false);
242  SimpleEvent(g_date->Date() + 30, fr_p_n2, false);
243  break;
244  }
245  else SimpleEvent(g_date->Date() + 30, fr_p_strigling_hill2, false);
246  break;
247 
249  if (!a_farm->StriglingHill(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
251  break;
252  }
253  SimpleEvent(g_date->Date(), fr_p_n2, false);
254  SimpleEvent(g_date->Date() + 1, fr_p_herbicide2, false);
255  break;
256 
257  case fr_p_n2:
258  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
259  SimpleEvent(g_date->Date() + 1, fr_p_n2, true);
260  break;
261  }
263  break;
264 
265  case fr_p_insecticide1:
266 #ifdef ECOSTACK_BIOPESTICIDE
267  if (a_ev->m_lock || a_farm->DoIt(80)) {
268 #else
269  if (a_ev->m_lock || a_farm->DoIt(80)) {
270 #endif
271  // here we check whether we are using ERA pesticide or not
272  d1 = g_date->DayInYear(30, 6) - g_date->DayInYear();
273  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
274  {
275 #ifdef ECOSTACK_BIOPESTICIDE
276  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
277 #else
278  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
279 #endif
280  }
281  else {
282  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
283  }
284  if (!flag) {
286  break;
287  }
288 #ifdef ECOSTACK_BIOPESTICIDE
289  SimpleEvent(g_date->Date() + 7, fr_p_insecticide1b, false);
290  SimpleEvent(g_date->Date() + 14, fr_p_insecticide2, false);
291  break;
292 #else
293  SimpleEvent(g_date->Date()+14, fr_p_insecticide2, false);
294  break;
295 #endif
296  }
297  break;
298 
299 #ifdef ECOSTACK_BIOPESTICIDE
300  case fr_p_insecticide1b:
301  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
302  // here we check whether we are using ERA pesticide or not
303  d1 = g_date->DayInYear(37, 6) - g_date->DayInYear();
304  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
305  if (!flag) {
306  SimpleEvent(g_date->Date() + 1, fr_p_insecticide1b, true);
307  break;
308  }
309  }
310  break; // end of thread
311 #endif
312 
313  case fr_p_insecticide2:
314 #ifdef ECOSTACK_BIOPESTICIDE
315  if (a_ev->m_lock || a_farm->DoIt(100)) {
316 #else
317  if (a_ev->m_lock || a_farm->DoIt(50)) {
318 #endif
319  // here we check whether we are using ERA pesticide or not
320  d1 = g_date->DayInYear(15, 7) - g_date->DayInYear();
321  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
322  {
323 #ifdef ECOSTACK_BIOPESTICIDE
324  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
325 #else
326  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
327 #endif
328  }
329  else {
330  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
331  }
332  if (!flag) {
334  break;
335  }
336  }
337  break;
338 
339  case fr_p_herbicide2:
340  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
341  SimpleEvent(g_date->Date() + 1, fr_p_herbicide2, true);
342  break;
343  }
345  break;
346 
347  case fr_p_herbicide3:
348  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(16, 6) - g_date->DayInYear())) {
349  SimpleEvent(g_date->Date() + 1, fr_p_herbicide3, true);
350  break;
351  }
352  break;
353 
354  case fr_p_fungicide1:
355  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(25, 4) - g_date->DayInYear())) {
356  SimpleEvent(g_date->Date() + 1, fr_p_fungicide1, true);
357  break;
358  }
359  SimpleEvent(g_date->Date() + 5, fr_p_fungicide2, false);
360  break;
361 
362  case fr_p_fungicide2:
363  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(5, 5) - g_date->DayInYear())) {
364  SimpleEvent(g_date->Date() + 1, fr_p_fungicide2, true);
365  break;
366  }
367  SimpleEvent(g_date->Date() + 5, fr_p_fungicide3, false);
368  break;
369 
370  case fr_p_fungicide3:
371  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
372  SimpleEvent(g_date->Date() + 1, fr_p_fungicide3, true);
373  break;
374  }
375  SimpleEvent(g_date->Date() + 5, fr_p_fungicide4, false);
376  break;
377 
378  case fr_p_fungicide4:
379  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
380  SimpleEvent(g_date->Date() + 1, fr_p_fungicide4, true);
381  break;
382  }
383  SimpleEvent(g_date->Date() + 5, fr_p_fungicide5, false);
384  break;
385 
386  case fr_p_fungicide5:
387  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(5, 6) - g_date->DayInYear())) {
388  SimpleEvent(g_date->Date() + 1, fr_p_fungicide5, true);
389  break;
390  }
391  SimpleEvent(g_date->Date() + 5, fr_p_fungicide6, false);
392  break;
393 
394  case fr_p_fungicide6:
395  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
396  SimpleEvent(g_date->Date() + 1, fr_p_fungicide6, true);
397  break;
398  }
399  SimpleEvent(g_date->Date() + 5, fr_p_fungicide7, false);
401  break;
402 
403  case fr_p_herbicide4:
404  if (a_ev->m_lock || a_farm->DoIt(80)) {
405  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(23, 7) - g_date->DayInYear())) {
406  SimpleEvent(g_date->Date() + 1, fr_p_herbicide4, true);
407  break;
408  }
409  break;
410  }
411  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(23, 6), fr_p_swathing, false);
412  break;
413 
414  case fr_p_swathing:
415  if (!a_farm->Swathing(a_field, 0.0, g_date->DayInYear(23, 7) - g_date->DayInYear())) {
416  SimpleEvent(g_date->Date() + 1, fr_p_swathing, true);
417  break;
418  }
419  break;
420 
421  case fr_p_fungicide7:
422  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
423  SimpleEvent(g_date->Date() + 1, fr_p_fungicide7, true);
424  break;
425  }
426  SimpleEvent(g_date->Date() + 5, fr_p_fungicide8, false);
427  break;
428 
429  case fr_p_fungicide8:
430  if (a_ev->m_lock || a_farm->DoIt(80)) {
431  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(5, 7) - g_date->DayInYear())) {
432  SimpleEvent(g_date->Date() + 1, fr_p_fungicide8, true);
433  break;
434  }
435  }
436  SimpleEvent(g_date->Date() + 5, fr_p_fungicide9, false);
437  break;
438 
439  case fr_p_fungicide9:
440  if (a_ev->m_lock || a_farm->DoIt(80)) {
441  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 7) - g_date->DayInYear())) {
442  SimpleEvent(g_date->Date() + 1, fr_p_fungicide9, true);
443  break;
444  }
445  }
446  SimpleEvent(g_date->Date() + 5, fr_p_fungicide10, false);
447  break;
448 
449  case fr_p_fungicide10:
450  if (a_ev->m_lock || a_farm->DoIt(80)) {
451  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(25, 7) - g_date->DayInYear())) {
452  SimpleEvent(g_date->Date() + 1, fr_p_fungicide10, true);
453  break;
454  }
455  }
456  SimpleEvent(g_date->Date() + 5, fr_p_fungicide11, false);
457  break;
458 
459  case fr_p_fungicide11:
460  if (a_ev->m_lock || a_farm->DoIt(50)) {
461  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear())) {
462  SimpleEvent(g_date->Date() + 1, fr_p_fungicide11, true);
463  break;
464  }
465  }
466  SimpleEvent(g_date->Date() + 5, fr_p_fungicide12, false);
467  break;
468 
469  case fr_p_fungicide12:
470  if (a_ev->m_lock || a_farm->DoIt(25)) {
471  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
472  SimpleEvent(g_date->Date() + 1, fr_p_fungicide12, true);
473  break;
474  }
475  }
476  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 7), fr_p_harvest, false);
477  break;
478 
479  case fr_p_harvest:
480  // We don't move harvest days
481  if (!a_farm->Harvest(a_field, 0.0, a_field->GetMDates(1, 0) - g_date->DayInYear())) {
482  SimpleEvent(g_date->Date() + 1, fr_p_harvest, true);
483  break;
484  }
485  done = true;
486  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
487  // END OF MAIN THREAD
488  break;
489  default:
490  g_msg->Warn(WARN_BUG, "FR_Potatoes::Do(): "
491  "Unknown event type! ", "");
492  exit(1);
493  }
494  return done;
495 }

References Farm::BiocideTreat(), cfg_pest_potatoes_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DeepPlough(), Farm::DoIt(), Farm::DoIt_prob(), Farm::FP_AmmoniumSulphate(), Farm::FP_Manure(), Farm::FP_PK(), fr_p_fertilizer, fr_p_fungicide1, fr_p_fungicide10, fr_p_fungicide11, fr_p_fungicide12, fr_p_fungicide2, fr_p_fungicide3, fr_p_fungicide4, fr_p_fungicide5, fr_p_fungicide6, fr_p_fungicide7, fr_p_fungicide8, fr_p_fungicide9, fr_p_harvest, fr_p_herbicide1, fr_p_herbicide2, fr_p_herbicide3, fr_p_herbicide4, fr_p_insecticide1, fr_p_insecticide1b, fr_p_insecticide2, fr_p_n1, fr_p_n2, fr_p_pk, FR_P_PLOUGH, FR_P_SLURRY, fr_p_sow, fr_p_spring_plough, fr_p_start, fr_p_strigling_hill1, fr_p_strigling_hill2, fr_p_stubble_harrow, fr_p_stubble_plough, fr_p_subsoiler, fr_p_swathing, Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), 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(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StriglingHill(), Farm::StubbleHarrowing(), Farm::StubblePlough(), Farm::Swathing(), CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void FR_Potatoes::SetUpFarmCategoryInformation ( )
inline
121  {
122  const int elements = 2 + (fr_p_foobar - FR_P_BASE);
124 
125  FarmManagementCategory catlist[elements] =
126  {
127  fmc_Others, // zero element unused but must be here
128  fmc_Others, //fr_m_start = 1, // Compulsory, must always be 1 (one).
129  fmc_Others, //fr_m_sleep_all_day = FR_P_BASE,
130  fmc_Cultivation, //fr_p_stubble_harrow,
131  fmc_Cultivation, //fr_p_stubble_plough,
132  fmc_Fertilizer, //fr_p_pk,
133  fmc_Herbicide, //fr_p_herbicide1,
134  fmc_Fertilizer, //fr_p_fertilizer,
135  fmc_Cultivation, //fr_p_subsoiler,
136  fmc_Cultivation, //fr_p_spring_plough,
137  fmc_Others, //fr_p_sow,
138  fmc_Fertilizer, //fr_p_n1,
139  fmc_Cultivation, //fr_p_strigling_hill1,
140  fmc_Fertilizer, //fr_p_n2,
141  fmc_Cultivation, //r_p_strigling_hill2,
142  fmc_Herbicide, //fr_p_herbicide2,
143  fmc_Herbicide, //fr_p_herbicide3,
144  fmc_Fungicide, //fr_p_fungicide1,
145  fmc_Fungicide, //fr_p_fungicide2,
146  fmc_Fungicide, //fr_p_fungicide3,
147  fmc_Fungicide, //fr_p_fungicide4,
148  fmc_Fungicide, //fr_p_fungicide5,
149  fmc_Fungicide, //fr_p_fungicide6,
150  fmc_Fungicide, //fr_p_fungicide7,
151  fmc_Fungicide, //fr_p_fungicide8,
152  fmc_Fungicide, //fr_p_fungicide9,
153  fmc_Fungicide, //fr_p_fungicide10,
154  fmc_Fungicide, //fr_p_fungicide11,
155  fmc_Fungicide, //fr_p_fungicide12,
156  fmc_Insecticide, //fr_p_insecticide1,
157  fmc_Insecticide, //fr_p_insecticide2,
158  fmc_Herbicide, //fr_p_herbicide4,
159  fmc_Cutting, //fr_p_swathing,
160  fmc_Harvest, //fr_p_harvest,
161 
162 
163  // no foobar entry
164 
165  };
166  // Iterate over the catlist elements and copy them to vector
167  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
168 
169  }

References fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, FR_P_BASE, fr_p_foobar, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FR_Potatoes().


The documentation for this class was generated from the following files:
fr_p_fungicide6
Definition: FR_Potatoes.h:84
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
fr_p_fungicide2
Definition: FR_Potatoes.h:80
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
fr_p_pk
Definition: FR_Potatoes.h:67
fr_p_fungicide3
Definition: FR_Potatoes.h:81
Farm::SpringPlough
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
Definition: FarmFuncs.cpp:421
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
fr_p_fungicide5
Definition: FR_Potatoes.h:83
fr_p_subsoiler
Definition: FR_Potatoes.h:70
Farm::Harvest
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: FarmFuncs.cpp:1364
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
fr_p_harvest
Definition: FR_Potatoes.h:96
Farm::ProductApplication
virtual bool ProductApplication(LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp, bool a_isgranularpesticide=false, int a_orcharddrifttype=0)
Apply test pesticide to a_field.
Definition: FarmFuncs.cpp:2267
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
fr_p_start
Definition: FR_Potatoes.h:63
Farm::StubblePlough
virtual bool StubblePlough(LE *a_field, double a_user, int a_days)
Carry out a stubble ploughing event on a_field. This is similar to normal plough but shallow (normall...
Definition: FarmFuncs.cpp:232
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fr_p_foobar
Definition: FR_Potatoes.h:97
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
fr_p_fungicide8
Definition: FR_Potatoes.h:86
Farm::SpringSow
virtual bool SpringSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out a sowing event in the spring on a_field.
Definition: FarmFuncs.cpp:501
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
fr_p_sow
Definition: FR_Potatoes.h:72
FR_P_PLOUGH
#define FR_P_PLOUGH
Definition: FR_Potatoes.h:49
fr_p_fungicide4
Definition: FR_Potatoes.h:82
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
fr_p_fungicide7
Definition: FR_Potatoes.h:85
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
FR_Potatoes::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FR_Potatoes.h:121
fr_p_fertilizer
Definition: FR_Potatoes.h:69
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
Farm::StriglingHill
virtual bool StriglingHill(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field followed by hilling up (probably on potatoes)
Definition: FarmFuncs.cpp:1287
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
CfgBool::value
bool value() const
Definition: Configurator.h:164
cfg_pest_potatoes_on
CfgBool cfg_pest_potatoes_on
Turn on pesticides for potatoes.
Farm::FP_Manure
virtual bool FP_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:896
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
fr_p_herbicide1
Definition: FR_Potatoes.h:68
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
fr_p_n2
Definition: FR_Potatoes.h:75
Calendar::Date
long Date(void)
Definition: Calendar.h:57
Farm::FP_AmmoniumSulphate
virtual bool FP_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply Ammonium Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:882
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
fr_p_fungicide1
Definition: FR_Potatoes.h:79
fr_p_fungicide12
Definition: FR_Potatoes.h:90
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
fr_p_stubble_plough
Definition: FR_Potatoes.h:66
fr_p_n1
Definition: FR_Potatoes.h:73
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
fr_p_fungicide9
Definition: FR_Potatoes.h:87
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
fr_p_strigling_hill1
Definition: FR_Potatoes.h:74
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
fr_p_fungicide11
Definition: FR_Potatoes.h:89
fr_p_insecticide2
Definition: FR_Potatoes.h:93
fr_p_herbicide4
Definition: FR_Potatoes.h:94
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
fr_p_herbicide3
Definition: FR_Potatoes.h:78
Farm::DeepPlough
virtual bool DeepPlough(LE *a_field, double a_user, int a_days)
Carry out a deep ploughing event on a_field.
Definition: FarmFuncs.cpp:408
Crop::m_date_modifier
static int m_date_modifier
Holds a value that shifts test pesticide use by this many days in crops modified to use it.
Definition: Farm.h:514
fr_p_fungicide10
Definition: FR_Potatoes.h:88
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
fr_p_insecticide1
Definition: FR_Potatoes.h:91
fr_p_insecticide1b
Definition: FR_Potatoes.h:92
fr_p_strigling_hill2
Definition: FR_Potatoes.h:76
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
fr_p_swathing
Definition: FR_Potatoes.h:95
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
FR_P_SLURRY
#define FR_P_SLURRY
Definition: FR_Potatoes.h:50
fr_p_stubble_harrow
Definition: FR_Potatoes.h:65
cfg_pest_product_amounts
CfgArray_Double cfg_pest_product_amounts
Amount of pesticide applied in grams of active substance per hectare for each of the 10 pesticides.
Farm::Swathing
virtual bool Swathing(LE *a_field, double a_user, int a_days)
Cut the crop on a_field and leave it lying (probably rape)
Definition: FarmFuncs.cpp:1350
fr_p_spring_plough
Definition: FR_Potatoes.h:71
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FR_P_BASE
#define FR_P_BASE
Definition: FR_Potatoes.h:52
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523
Crop::SimpleEvent_
void SimpleEvent_(long a_date, int a_todo, bool a_lock, Farm *a_farm, LE *a_field)
Adds an event to this crop management without relying on member variables.
Definition: Farm.cpp:751
fr_p_herbicide2
Definition: FR_Potatoes.h:77