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

NLPotatoesSpring class
. More...

#include <NLPotatoesSpring.h>

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

NLPotatoesSpring class
.

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

◆ NLPotatoesSpring()

NLPotatoesSpring::NLPotatoesSpring ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
95  : Crop(a_tov, a_toc, a_L)
96  {
97  // When we start it off, the first possible date for a farm operation is 5th November
98  // This information is used by other crops when they decide how much post processing of
99  // the management is allowed after harvest before the next crop starts.
100  m_first_date=g_date->DayInYear( 30,4 );
102  }

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

Member Function Documentation

◆ Do()

bool NLPotatoesSpring::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 m_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 potatoes.

Reimplemented from Crop.

65 {
66  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
67  m_farm = a_farm;
68  m_field = a_field;
69  m_ev = a_ev;
70  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).
71  bool flag = false;
72  int d1 = 0;
73  int noDates = 1;
75  int l_nextcropstartdate;
76  /**********************************************To Here *************************************************************************/
77 
78  // Depending what event has occured jump to the correct bit of code
79  switch (m_ev->m_todo)
80  {
81  case nl_pots_start:
82  {
83  NL_POTS_HERBI = false;
84  NL_POTS_FUNGI1 = false;
85  NL_POTS_FUNGI2 = false;
86  NL_POTS_FUNGI3 = false;
87  NL_POTS_FUNGI4 = false;
88  NL_POTS_FUNGI5 = false;
90 
91  m_last_date = g_date->DayInYear(30, 110); // Should match the last flexdate below
92  //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
93  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
94  // Set up the date management stuff
95  // Start and stop dates for all events after harvest
96  flexdates[0][1] = g_date->DayInYear(30, 10); // first possible day of finishing harvest - this is in effect day before the earliest date that a following crop can use
97 
98  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
99  flexdates[1][1] = g_date->DayInYear(30, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1) - straw chopping
100 
101  // Below if this is a spring crop use 365, otherwise set this to 0, second parameter is fixed, and the third is the start up operation in the first year
102  int isSpring = 365;
103  if (StartUpCrop(isSpring, flexdates, int(nl_pots_spring_planting))) break;
104 
105  // End single block date checking code. Please see next line comment as well.
106  // Reinit d1 to first possible starting date.
107  d1 = g_date->OldDays() + g_date->DayInYear(15, 3) + isSpring;
108  // OK, let's go.
109  if (m_field->GetSoilType() == 2 || m_field->GetSoilType() == 6) { // on sandy soils (NL ZAND & LOSS)
111  }
112  else {
113  if (m_farm->IsStockFarmer()) //Stock Farmer
114  {
116  }
117  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(10, 4) + 365, nl_pots_ferti_p2_clay, false, m_farm, m_field);
118  }
119  break;
120  }
121  break;
122 
123  // This is the first real farm operation
125  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
127  break;
128  }
129  d1 = g_date->Date() + 7;
130  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 4)) {
131  d1 = g_date->OldDays() + g_date->DayInYear(10, 4);
132  }
133  if (m_farm->IsStockFarmer()) //Stock Farmer
134  {
136  }
138  break;
140  if (m_ev->m_lock || m_farm->DoIt_prob(0.50))
141  {
142  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
144  break;
145  }
146  }
148  break;
150  if (m_ev->m_lock || m_farm->DoIt_prob(0.50))
151  {
152  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
154  break;
155  }
156  }
158  break;
160  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
162  break;
163  }
165  break;
167  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
169  break;
170  }
172  break;
173  case nl_pots_bed_forming:
174  if (!m_farm->BedForming(m_field, 0.0, g_date->DayInYear(9, 5) - g_date->DayInYear())) {
176  break;
177  }
179  break;
181  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
183  break;
184  }
185  // Here is a fork leading to four parallel events
186  SimpleEvent_(g_date->Date() + 14, nl_pots_hilling1, false, m_farm, m_field); // Hilling + herbicides = MAIN THREAD
187  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 6), nl_pots_fungicide1, false, m_farm, m_field); // Fungicide thread
188  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 6) + m_date_modifier, nl_pots_insecticide, false, m_farm, m_field); // Insecticide thread
189  if (m_farm->IsStockFarmer()) //Stock Farmer // N thread
190  {
192  }
194  if (m_farm->IsStockFarmer()) //Stock Farmer // microelements thread
195  {
197  }
199  break;
201  if (m_field->GetSoilType() != 2 && m_field->GetSoilType() != 6)// on clay soils (NL KLEI & VEEN)
202  {
203  if (m_ev->m_lock || m_farm->DoIt_prob(0.25))
204  {
205  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
207  break;
208  }
209  }
210  // End of thread
211  break;
212  }
213  if (m_farm->IsStockFarmer()) //Stock Farmer // N thread
214  {
216  }
218  break;
220  if (m_field->GetSoilType() != 2 && m_field->GetSoilType() != 6)// on clay soils (NL KLEI & VEEN)
221  {
222  if (m_ev->m_lock || m_farm->DoIt_prob(0.25))
223  {
224  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
226  break;
227  }
228  }
229  // End of thread
230  break;
231  }
232  if (m_farm->IsStockFarmer()) //Stock Farmer // N thread
233  {
235  }
237  break;
239  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
241  break;
242  }
243  // End of thread
244  break;
245 
247  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
249  break;
250  }
251  // End of thread
252  break;
253 
254  case nl_pots_ferti_p4:
255  if (m_ev->m_lock || m_farm->DoIt_prob(0.25))
256  {
257  if (!m_farm->FP_ManganeseSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
259  break;
260  }
261  }
262  // End of thread
263  break;
264  case nl_pots_ferti_s4:
265  if (m_ev->m_lock || m_farm->DoIt_prob(0.25))
266  {
267  if (!m_farm->FA_ManganeseSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
269  break;
270  }
271  }
272  // End of thread
273  break;
274  case nl_pots_hilling1:
275  if (!m_farm->HillingUp(m_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
277  break;
278  }
280  break;
281  case nl_pots_herbicide1:
282  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
283  {
284  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
286  break;
287  }
288  NL_POTS_HERBI = true;
289  }
291  break;
292  case nl_pots_herbicide2:
293  if (m_ev->m_lock || (m_farm->DoIt_prob(0.625) && NL_POTS_HERBI == 1)) // 50% of all farmers
294  {
295  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
297  break;
298  }
299  }
301  break;
303  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(15, 10) - g_date->DayInYear())) {
305  break;
306  }
308  break;
309 
311  if (m_ev->m_lock || m_farm->DoIt_prob(0.75))
312  {
313  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(20, 10) - g_date->DayInYear())) {
315  break;
316  }
317  }
319  break;
320  case nl_pots_fungicide1:
321  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(7, 6) - g_date->DayInYear())) {
323  break;
324  }
326  break;
327  case nl_pots_fungicide2:
328  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(14, 6) - g_date->DayInYear())) {
330  break;
331  }
333  break;
334  case nl_pots_fungicide3:
335  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(21, 6) - g_date->DayInYear())) {
337  break;
338  }
340  break;
341  case nl_pots_fungicide4:
342  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
344  break;
345  }
347  break;
348  case nl_pots_fungicide5:
349  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(7, 7) - g_date->DayInYear())) {
351  break;
352  }
354  break;
355  case nl_pots_fungicide6:
356  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(14, 7) - g_date->DayInYear())) {
358  break;
359  }
361  break;
362  case nl_pots_fungicide7:
363  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(21, 7) - g_date->DayInYear())) {
365  break;
366  }
368  break;
369  case nl_pots_fungicide8:
370  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
371  {
372  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
374  break;
375  }
376  NL_POTS_FUNGI1 = true;
377  }
379  break;
380  case nl_pots_fungicide9:
381  if (m_ev->m_lock || (m_farm->DoIt_prob(1.00) && NL_POTS_FUNGI1 == 1))
382  {
383  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(7, 8) - g_date->DayInYear())) {
385  break;
386  }
387  NL_POTS_FUNGI2 = true;
388  }
390  break;
391  case nl_pots_fungicide10:
392  if (m_ev->m_lock || (m_farm->DoIt_prob(0.875) && NL_POTS_FUNGI2 == 1)) // 70% of all farmers
393  {
394  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(14, 8) - g_date->DayInYear())) {
396  break;
397  }
398  NL_POTS_FUNGI3 = true;
399  }
401  break;
402  case nl_pots_fungicide11:
403  if (m_ev->m_lock || (m_farm->DoIt_prob(1.00) && NL_POTS_FUNGI3 == 1))
404  {
405  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(21, 8) - g_date->DayInYear())) {
407  break;
408  }
409  NL_POTS_FUNGI4 = true;
410  }
412  break;
413  case nl_pots_fungicide12:
414  if (m_ev->m_lock || (m_farm->DoIt_prob(0.857) && NL_POTS_FUNGI4 == 1)) // 60% of all farmers
415  {
416  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
418  break;
419  }
420  NL_POTS_FUNGI5 = true;
421  }
423  break;
424  case nl_pots_fungicide13:
425  if (m_ev->m_lock || (m_farm->DoIt_prob(1.00) && NL_POTS_FUNGI5 == 1))
426  {
427  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(7, 9) - g_date->DayInYear())) {
429  break;
430  }
431  }
433  break;
434  case nl_pots_fungicide14:
435  if (m_ev->m_lock || (m_farm->DoIt_prob(1.00) && NL_POTS_FUNGI5 == 1))
436  {
437  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(14, 9) - g_date->DayInYear())) {
439  break;
440  }
441  }
443  break;
444  case nl_pots_fungicide15:
445  if (m_ev->m_lock || (m_farm->DoIt_prob(1.00) && NL_POTS_FUNGI5 == 1))
446  {
447  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(21, 9) - g_date->DayInYear())) {
449  break;
450  }
451  }
452  // End of thread
453  break;
454  case nl_pots_insecticide:
455 #ifdef ECOSTACK_BIOPESTICIDE
456  if (m_ev->m_lock || m_farm->DoIt_prob(0.60))
457 #else
458  if (m_ev->m_lock || m_farm->DoIt_prob(0.60))
459 #endif
460  {
461  // here we check whether we are using ERA pesticide or not
462  d1 = g_date->DayInYear(30, 6) - g_date->DayInYear();
463  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
464  {
465 #ifdef ECOSTACK_BIOPESTICIDE
466  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
467 #else
468  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
469 #endif
470  }
471  else {
472  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
473  }
474  if (!flag) {
476  break;
477  }
478 #ifdef ECOSTACK_BIOPESTICIDE
480  break; // end of thread
481 #endif
482  }
483  // End of thread
484  break;
485 
486 #ifdef ECOSTACK_BIOPESTICIDE
488  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
489  // here we check whether we are using ERA pesticide or not
490  d1 = g_date->DayInYear(7, 7) - g_date->DayInYear();
491  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
492  if (!flag) {
494  break;
495  }
496  }
497  break; // end of thread
498 #endif
499 
500  case nl_pots_harvest:
501  // We don't move harvest days
502  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
504  break;
505  }
506  done = true;
507  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
508  // END of MAIN THREAD
509  break;
510  default:
511  g_msg->Warn(WARN_BUG, "NLPotatoesSpring::Do(): "
512  "Unknown event type! ", "");
513  exit(1);
514  }
515  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
516  return done;
517 }

References Farm::BedForming(), Farm::BiocideTreat(), cfg_pest_potatoes_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FA_ManganeseSulphate(), Farm::FA_NPK(), Farm::FP_AmmoniumSulphate(), Farm::FP_ManganeseSulphate(), Farm::FP_NPK(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), LE::GetSoilType(), Farm::Harvest(), 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, nl_pots_bed_forming, nl_pots_dessication1, nl_pots_dessication2, nl_pots_ferti_p2_clay, nl_pots_ferti_p2_sandy, nl_pots_ferti_p3_clay, nl_pots_ferti_p3_sandy, nl_pots_ferti_p4, nl_pots_ferti_s2_clay, nl_pots_ferti_s2_sandy, nl_pots_ferti_s3_clay, nl_pots_ferti_s3_sandy, nl_pots_ferti_s4, NL_POTS_FUNGI1, NL_POTS_FUNGI2, NL_POTS_FUNGI3, NL_POTS_FUNGI4, NL_POTS_FUNGI5, nl_pots_fungicide1, nl_pots_fungicide10, nl_pots_fungicide11, nl_pots_fungicide12, nl_pots_fungicide13, nl_pots_fungicide14, nl_pots_fungicide15, nl_pots_fungicide2, nl_pots_fungicide3, nl_pots_fungicide4, nl_pots_fungicide5, nl_pots_fungicide6, nl_pots_fungicide7, nl_pots_fungicide8, nl_pots_fungicide9, nl_pots_harvest, NL_POTS_HERBI, nl_pots_herbicide1, nl_pots_herbicide2, nl_pots_hilling1, nl_pots_insecticide, nl_pots_insecticideb, nl_pots_spring_planting, nl_pots_spring_plough_sandy, nl_pots_start, Calendar::OldDays(), ppp_1, Farm::ProductApplication(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), tov_NLPotatoesSpring, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void NLPotatoesSpring::SetUpFarmCategoryInformation ( )
inline
103  {
104  const int elements = 2 + (nl_pots_foobar - NLPOTATOESSPRING_BASE);
106 
107  FarmManagementCategory catlist[elements] =
108  {
109  fmc_Others, // zero element unused but must be here
110  fmc_Others,//nl_pots_start = 1, // Compulsory, must always be 1 (one).
111  fmc_Others,//nl_pots_sleep_all_day = NLPOTATOESSPRING_BASE,
112  fmc_Fertilizer,//nl_pots_ferti_p2_clay,
113  fmc_Fertilizer,//nl_pots_ferti_s2_clay,
114  fmc_Cultivation,//nl_pots_spring_plough_sandy,
115  fmc_Fertilizer,//nl_pots_ferti_p2_sandy,
116  fmc_Fertilizer,//nl_pots_ferti_s2_sandy,
117  fmc_Others,//nl_pots_bed_forming,
118  fmc_Others,//nl_pots_spring_planting,
119  fmc_Others,//nl_pots_hilling1,
120  fmc_Fertilizer,//nl_pots_ferti_p3_clay,
121  fmc_Fertilizer,//nl_pots_ferti_s3_clay,
122  fmc_Fertilizer,//nl_pots_ferti_p3_sandy,
123  fmc_Fertilizer,//nl_pots_ferti_s3_sandy,
124  fmc_Fertilizer,//nl_pots_ferti_p4,
125  fmc_Fertilizer,//nl_pots_ferti_s4,
126  fmc_Herbicide,//nl_pots_herbicide1,
127  fmc_Herbicide,//nl_pots_herbicide2,
128  fmc_Fungicide,//nl_pots_fungicide1,
129  fmc_Fungicide,//nl_pots_fungicide2,
130  fmc_Fungicide,//nl_pots_fungicide3,
131  fmc_Fungicide,//nl_pots_fungicide4,
132  fmc_Fungicide,//nl_pots_fungicide5,
133  fmc_Fungicide,//nl_pots_fungicide6,
134  fmc_Fungicide,//nl_pots_fungicide7,
135  fmc_Fungicide,//nl_pots_fungicide8,
136  fmc_Fungicide,//nl_pots_fungicide9,
137  fmc_Fungicide,//nl_pots_fungicide10,
138  fmc_Fungicide,//nl_pots_fungicide11,
139  fmc_Fungicide,//nl_pots_fungicide12,
140  fmc_Fungicide,//nl_pots_fungicide13,
141  fmc_Fungicide,//nl_pots_fungicide14,
142  fmc_Fungicide,//nl_pots_fungicide15,
143  fmc_Insecticide,//nl_pots_insecticide,
144  fmc_Others,//nl_pots_dessication1,
145  fmc_Others,//nl_pots_dessication2,
146  fmc_Harvest//nl_pots_harvest,
147 
148  // no foobar entry
149 
150  };
151  // Iterate over the catlist elements and copy them to vector
152  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
153 
154  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, nl_pots_foobar, and NLPOTATOESSPRING_BASE.

Referenced by NLPotatoesSpring().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
nl_pots_dessication2
Definition: NLPotatoesSpring.h:77
nl_pots_fungicide2
Definition: NLPotatoesSpring.h:60
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
nl_pots_hilling1
Definition: NLPotatoesSpring.h:50
nl_pots_foobar
Definition: NLPotatoesSpring.h:79
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
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
nl_pots_herbicide1
Definition: NLPotatoesSpring.h:57
nl_pots_herbicide2
Definition: NLPotatoesSpring.h:58
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
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
nl_pots_ferti_s4
Definition: NLPotatoesSpring.h:56
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
nl_pots_dessication1
Definition: NLPotatoesSpring.h:76
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
nl_pots_ferti_p3_clay
Definition: NLPotatoesSpring.h:51
nl_pots_fungicide12
Definition: NLPotatoesSpring.h:70
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
nl_pots_ferti_s3_clay
Definition: NLPotatoesSpring.h:52
Farm::BedForming
virtual bool BedForming(LE *a_field, double a_user, int a_days)
Do bed forming up on a_field, probably of carrots.
Definition: FarmFuncs.cpp:1316
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
nl_pots_start
Definition: NLPotatoesSpring.h:41
nl_pots_fungicide8
Definition: NLPotatoesSpring.h:66
NL_POTS_FUNGI2
#define NL_POTS_FUNGI2
Definition: NLPotatoesSpring.h:30
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
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
nl_pots_ferti_s2_sandy
Definition: NLPotatoesSpring.h:47
nl_pots_ferti_p2_sandy
Definition: NLPotatoesSpring.h:46
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
nl_pots_spring_plough_sandy
Definition: NLPotatoesSpring.h:45
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
nl_pots_fungicide9
Definition: NLPotatoesSpring.h:67
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
nl_pots_ferti_p3_sandy
Definition: NLPotatoesSpring.h:53
CfgBool::value
bool value() const
Definition: Configurator.h:164
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
tov_NLPotatoesSpring
Definition: LandscapeFarmingEnums.h:265
nl_pots_insecticideb
Definition: NLPotatoesSpring.h:75
NL_POTS_FUNGI1
#define NL_POTS_FUNGI1
Definition: NLPotatoesSpring.h:29
nl_pots_fungicide3
Definition: NLPotatoesSpring.h:61
nl_pots_fungicide4
Definition: NLPotatoesSpring.h:62
Calendar::Date
long Date(void)
Definition: Calendar.h:57
nl_pots_fungicide14
Definition: NLPotatoesSpring.h:72
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
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
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.
nl_pots_fungicide13
Definition: NLPotatoesSpring.h:71
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
NL_POTS_FUNGI4
#define NL_POTS_FUNGI4
Definition: NLPotatoesSpring.h:32
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
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
nl_pots_ferti_p2_clay
Definition: NLPotatoesSpring.h:43
nl_pots_ferti_s2_clay
Definition: NLPotatoesSpring.h:44
nl_pots_spring_planting
Definition: NLPotatoesSpring.h:49
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
nl_pots_harvest
Definition: NLPotatoesSpring.h:78
nl_pots_ferti_s3_sandy
Definition: NLPotatoesSpring.h:54
NL_POTS_HERBI
#define NL_POTS_HERBI
A flag used to indicate autumn ploughing status.
Definition: NLPotatoesSpring.h:28
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
nl_pots_fungicide7
Definition: NLPotatoesSpring.h:65
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
cfg_pest_potatoes_on
CfgBool cfg_pest_potatoes_on
Turn on pesticides for potatoes.
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::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
nl_pots_fungicide11
Definition: NLPotatoesSpring.h:69
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Farm::FA_AmmoniumSulphate
virtual bool FA_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply ammonium sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1081
NLPOTATOESSPRING_BASE
#define NLPOTATOESSPRING_BASE
Definition: NLPotatoesSpring.h:24
nl_pots_fungicide15
Definition: NLPotatoesSpring.h:73
nl_pots_ferti_p4
Definition: NLPotatoesSpring.h:55
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
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
nl_pots_fungicide5
Definition: NLPotatoesSpring.h:63
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
nl_pots_fungicide6
Definition: NLPotatoesSpring.h:64
nl_pots_fungicide1
Definition: NLPotatoesSpring.h:59
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
NL_POTS_FUNGI5
#define NL_POTS_FUNGI5
Definition: NLPotatoesSpring.h:33
NL_POTS_FUNGI3
#define NL_POTS_FUNGI3
Definition: NLPotatoesSpring.h:31
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
nl_pots_bed_forming
Definition: NLPotatoesSpring.h:48
nl_pots_fungicide10
Definition: NLPotatoesSpring.h:68
NLPotatoesSpring::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: NLPotatoesSpring.h:103
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
nl_pots_insecticide
Definition: NLPotatoesSpring.h:74
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
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