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

#include <FI_PotatoIndustry_North.h>

Inheritance diagram for FI_PotatoIndustry_North:
Crop

Public Member Functions

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

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ FI_PotatoIndustry_North()

FI_PotatoIndustry_North::FI_PotatoIndustry_North ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
69  : Crop(a_tov, a_toc, a_L)
70  {
71  m_first_date=g_date->DayInYear(1,12); //
73  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

39 {
40  m_farm = a_farm;
41  m_field = a_field;
42  m_ev = a_ev;
43  bool flag = false;
44  int d1 = 0;
45 
46  bool done = false;
47 
48  switch (m_ev->m_todo)
49  {
50  case fi_pin_start:
51  {
54 
55  a_field->ClearManagementActionSum();
56 
57  m_field->SetVegPatchy(true); // Root crop so is open until tall
58  // Set up the date management stuff
59  // Could save the start day in case it is needed later
60  // m_field->m_startday = m_ev->m_startday;
61  m_last_date = g_date->DayInYear(11, 10);
62  // Start and stop dates for all events after harvest
63  int noDates = 1;
64  m_field->SetMDates(0, 0, g_date->DayInYear(11, 10));
65  // 0,0 determined by harvest date - used to see if at all possible
66  m_field->SetMDates(1, 0, g_date->DayInYear(11, 10));
67  // Check the next crop for early start, unless it is a spring crop
68  // in which case we ASSUME that no checking is necessary!!!!
69  // So DO NOT implement a crop that runs over the year boundary
70 
71  //new if: do the check only for non-optimising farms and if year>0. (030713 - m_rotation used only in the hidden year, so I modified the condition from >7 to >0)
72  int d1;
73  if (!(m_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
74 
75  if (m_ev->m_startday > g_date->DayInYear(1, 7))
76  {
77  if (m_field->GetMDates(0, 0) >= m_ev->m_startday)
78  {
79  g_msg->Warn(WARN_BUG, "FI_PotatoIndustry_North::Do(): "
80  "Harvest too late for the next crop to start!!!", "");
81  exit(1);
82  }
83  // Now fix any late finishing problems
84  for (int i = 0; i < noDates; i++) {
85  if (m_field->GetMDates(0, i) >= m_ev->m_startday) {
86  m_field->SetMDates(0, i, m_ev->m_startday - 1); //move the starting date
87  }
88  if (m_field->GetMDates(1, i) >= m_ev->m_startday) {
89  m_field->SetMConstants(i, 0);
90  m_field->SetMDates(1, i, m_ev->m_startday - 1); //move the finishing date
91  }
92  }
93  }
94  // Now no operations can be timed after the start of the next crop.
95 
96  // CJT note:
97  // Start single block date checking code to be cut-'n-pasted...
98 
99  if (!m_ev->m_first_year)
100  {
101  // Are we before July 1st?
102  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
103  if (g_date->Date() < d1)
104  {
105  // Yes, too early. We assumme this is because the last crop was late
106  g_msg->Warn(WARN_BUG, "FI_PotatoIndustry_North::Do(): "
107  "Crop start attempt between 1st Jan & 1st July", "");
108  exit(1);
109  }
110  else
111  {
112  d1 = g_date->OldDays() + m_first_date + 365; // Add 365 for spring crop
113  if (g_date->Date() > d1)
114  {
115  // Yes too late - should not happen - raise an error
116  g_msg->Warn(WARN_BUG, "FI_PotatoIndustry_North::Do(): "
117  "Crop start attempt after last possible start date", "");
118  exit(1);
119  }
120  }
121  }
122  else
123  {
124  // If this is the first year of running then it is possible to start
125  // on day 0, so need this to tell us what to do:
127  break;
128  }
129  }//if
130 
131  // End single block date checking code. Please see next line
132  // comment as well.
133  // Reinit d1 to first possible starting date.
134  d1 = g_date->OldDays() + g_date->DayInYear(1, 9);
135  // This is the first real farm operation
137  }
138  break;
139  // OK, Let's go - LKM: first treatment, stubble cultivator, do it before the 10 of October - if not done, try again +1 day until the the 10 of October when we succeed - 2% of farmers do this
141  if (m_ev->m_lock || m_farm->DoIt_prob(0.02))
142  {
145  break;
146  }
147  //Here comes a fork of parallel events:
148  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pin_slurry, false); //Slurry thread
149  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pin_n_minerals1, false); //N minerals thread
150  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5) + 365, fi_pin_fertilizer, false); //Sowing thread - main thread
151  break;
152  }
153  else if (m_ev->m_lock || m_farm->DoIt_prob(0.24 / 0.98)) { // autumn plough, done after 15th of October - before the 1st of December - 24% do this
155  break;
156  }
157  else if (m_ev->m_lock || m_farm->DoIt_prob(0.74 / 0.74)) { //Here comes a fork of parallel events:
158  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pin_slurry, false); //Slurry thread
159  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pin_n_minerals1, false); //N minerals thread
160  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pin_spring_plough, false); //Spring plough thread
161  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5) + 365, fi_pin_fertilizer, false); //Sowing thread - main thread
162  break;
163  }
164 
166  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(1, 12) - g_date->DayInYear())) {
168  break;
169  }
170  //Here comes a fork of parallel events:
171  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pin_slurry, false); //Slurry thread
172  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pin_n_minerals1, false); //N minerals thread
173  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5) + 365, fi_pin_fertilizer, false); //Sowing thread - main thread
174  break;
175  // Slurry thread
176  case fi_pin_slurry: //rarely applied on conventional farms (mostly organic) 5% do this, done before 25th of May
177  if (m_ev->m_lock || m_farm->DoIt_prob(0.05)) {
178  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
179  SimpleEvent(g_date->Date() + 1, fi_pin_slurry, true);
180  break;
181  }
182  }
183  break; //end of Slurry thread
184  // N minerals thread
185  case fi_pin_n_minerals1: //sometimes applied - 10% do this, done before 10th of May
186  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
187  if (!m_farm->FP_NPKS(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
188  SimpleEvent(g_date->Date() + 1, fi_pin_n_minerals1, true);
189  break;
190  }
191  }
192  break; //end of N minerals thread
193  // Spring plough thread (the 74% from before)
194  case fi_pin_spring_plough: // done before 25th of May
195  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
197  break;
198  }
199  break; //end of Spring plough thread
200  // Sowing thread - starts with fertilizer, 95% do this, before 30th of May
201  case fi_pin_fertilizer:
202  if (m_ev->m_lock || m_farm->DoIt_prob(0.95)) {
203  if (!m_farm->FP_NPKS(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
204  SimpleEvent(g_date->Date() + 1, fi_pin_fertilizer, true);
205  break;
206  }
207  }
208  // LKM: Queue up next event preseeding cultivation right after - done before the 30th of May
210  break;
212  if (m_ev->m_lock || m_farm->DoIt_prob(0.95)) {
213  if (!m_farm->PreseedingCultivator(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
215  break;
216  }
217  // LKM: Queue up next event planting right after - done before the 30th of May
218  SimpleEvent(g_date->Date(), fi_pin_plant, false);
219  break;
220  }
221  else if (m_ev->m_lock || m_farm->DoIt_prob(0.05 / 0.05)) { // 5% plant with the preseeding cultivation
222  // LKM: Queue up next event planting right after - done before the 30th of May
224  break;
225  }
229  break;
230  }
231  // LKM: Queue up next event harrow, done 7 days after
232  SimpleEvent(g_date->Date() + 7, fi_pin_harrow, false);
233  break;
234  case fi_pin_plant:
235  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
236  SimpleEvent(g_date->Date() + 1, fi_pin_plant, true);
237  break;
238  }
239  // LKM: Queue up next event harrow, done 7 days after
240  SimpleEvent(g_date->Date() + 7, fi_pin_harrow, false);
241  break;
242  case fi_pin_harrow: // 98% do this, done before 7th of June
243  if (m_ev->m_lock || m_farm->DoIt_prob(0.98)) {
244  if (!m_farm->SpringHarrow(m_field, 0.0, g_date->DayInYear(7, 6) - g_date->DayInYear())) {
245  SimpleEvent(g_date->Date() + 1, fi_pin_harrow, true);
246  break;
247  }
248  }
249  // LKM: Here comes a fork with parallel events:
250  SimpleEvent(g_date->Date() + 2, fi_pin_herbicide1, false); // herbicide thread
251  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), fi_pin_fungicide1, false); // Fungicide thread - main thread - date not stated (suggestion)
252  SimpleEvent(g_date->OldDays() + g_date->DayInYear(20, 6), fi_pin_n_minerals2, false); // N minerals2 thread
253  break;
254  // herbicide1 thread - done before the 12th of June, 90% do this
255  case fi_pin_herbicide1:
256  if (m_ev->m_lock || m_farm->DoIt_prob(0.90)) {
257  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(12, 6) - g_date->DayInYear())) {
258  SimpleEvent(g_date->Date() + 1, fi_pin_herbicide1, true);
259  break;
260  }
261  }
262  SimpleEvent(g_date->Date()+10, fi_pin_herbicide2, false); // herbicide2 thread
263  break;
264 
265  case fi_pin_herbicide2:
266  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
267  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(26, 6) - g_date->DayInYear())) {
268  SimpleEvent(g_date->Date() + 1, fi_pin_herbicide2, true);
269  break;
270  }
271  }
272  SimpleEvent(g_date->Date()+10, fi_pin_herbicide3, false);
273  break;
274  case fi_pin_herbicide3:
275  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
276  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(10, 7) - g_date->DayInYear())) {
277  SimpleEvent(g_date->Date() + 1, fi_pin_herbicide3, true);
278  break;
279  }
280  }
281  break; // End of herbicide thread
282  // N minerals2 thread - done before the 15th of July, 20% do this
283  case fi_pin_n_minerals2:
284  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
285  if (!m_farm->FP_NPKS(m_field, 0.0, g_date->DayInYear(15, 7) - g_date->DayInYear())) {
286  SimpleEvent(g_date->Date() + 1, fi_pin_n_minerals2, true);
287  break;
288  }
289  }
290  break; // End of N minerals2 thread
291  // Fungicide thread - done before the 20th of June
292  case fi_pin_fungicide1:
293  if (m_ev->m_lock || m_farm->DoIt_prob(0.98)) {
294  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(20, 6) - g_date->DayInYear())) {
295  SimpleEvent(g_date->Date() + 1, fi_pin_fungicide1, true);
296  break;
297  }
298  }
299  // LKM: Queue up next event - fungicide2 done 7-14 days later - 98% do this
300  SimpleEvent(g_date->Date() + 7, fi_pin_fungicide2, false);
301  break;
302  case fi_pin_fungicide2:
303  if (m_ev->m_lock || m_farm->DoIt_prob(0.98)) {
304  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(4, 7) - g_date->DayInYear())) {
305  SimpleEvent(g_date->Date() + 1, fi_pin_fungicide2, true);
306  break;
307  }
308  }
309  // LKM: Queue up next event - fungicide3 done 7 days later - 60% do this
310  SimpleEvent(g_date->Date() + 7, fi_pin_fungicide3, false);
311  break;
312  case fi_pin_fungicide3:
313  if (m_ev->m_lock || m_farm->DoIt_prob(0.60)) {
314  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(11, 7) - g_date->DayInYear())) {
315  SimpleEvent(g_date->Date() + 1, fi_pin_fungicide3, true);
316  break;
317  }
318  }
319  // LKM: Queue up next event - fungicide4 done 7 days later - 50% do this
320  SimpleEvent(g_date->Date() + 7, fi_pin_fungicide4, false);
321  break;
322  case fi_pin_fungicide4:
323  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
324  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(18, 7) - g_date->DayInYear())) {
325  SimpleEvent(g_date->Date() + 1, fi_pin_fungicide4, true);
326  break;
327  }
328  }
329  // LKM: Queue up next event - fungicide5 done 7 days later - 20% do this
330  SimpleEvent(g_date->Date() + 7, fi_pin_fungicide5, false);
331  break;
332  case fi_pin_fungicide5: // no later than 24th of August
333  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
334  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(25, 7) - g_date->DayInYear())) {
335  SimpleEvent(g_date->Date() + 1, fi_pin_fungicide5, true);
336  break;
337  }
338  }
339  // LKM: Queue up next event - fungicide6 done 7 days later - 5% do this
340  SimpleEvent(g_date->Date() + 7, fi_pin_fungicide6, false);
341  break;
342  case fi_pin_fungicide6: // no later than 24th of August
343  if (m_ev->m_lock || m_farm->DoIt_prob(0.05)) {
344  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
345  SimpleEvent(g_date->Date() + 1, fi_pin_fungicide6, true);
346  break;
347  }
348  }
349  // LKM: Queue up next event - insecticide (no dates) - 3% do this
351  break;
352  case fi_pin_insecticide: // no later than 31st of August (suggestion)
353 #ifdef ECOSTACK_BIOPESTICIDE
354  if (m_ev->m_lock || m_farm->DoIt_prob(0.06)) {
355 #else
356  if (m_ev->m_lock || m_farm->DoIt_prob(0.03)) {
357 #endif
358  // here we check whether we are using ERA pesticide or not
359  d1 = g_date->DayInYear(31, 8) - g_date->DayInYear();
360  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
361  {
362 #ifdef ECOSTACK_BIOPESTICIDE
363  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
364 #else
365  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
366 #endif
367  }
368  else {
369  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
370  }
371  if (!flag) {
373  break;
374  }
375 #ifdef ECOSTACK_BIOPESTICIDE
376  if (!m_farm->BiocideTreat(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
377  SimpleEvent(g_date->Date() + 1, fi_pin_insecticide, true);
378  break;
379 #else
380  if (!m_farm->InsecticideTreat(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
381  SimpleEvent(g_date->Date() + 1, fi_pin_insecticide, true);
382  break;
383 #endif
384  }
385  }
386  // LKM: Queue up the next event - harvest done after the 20th of August
388  break;
389  // LKM: do harvest before 7th of October
390  case fi_pin_harvest:
391  if (!m_farm->HarvestLong(m_field, 0.0, g_date->DayInYear(10, 10) - g_date->DayInYear())) {
392  SimpleEvent(g_date->Date() + 1, fi_pin_harvest, true);
393  break;
394  }
395  m_field->SetVegPatchy(false);
396  done = true;
397  break;
398 
399  default:
400  g_msg->Warn(WARN_BUG, "FI_PotatoIndustry_North::Do(): "
401  "Unknown event type! ", "");
402  exit(1);
403  }
404  return done;
405 }

References Farm::AutumnPlough(), Farm::BiocideTreat(), cfg_pest_potatoes_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), fi_pin_autumn_plough, FI_PIN_DECIDE_TO_FI, FI_PIN_DECIDE_TO_HERB, fi_pin_fertilizer, fi_pin_fungicide1, fi_pin_fungicide2, fi_pin_fungicide3, fi_pin_fungicide4, fi_pin_fungicide5, fi_pin_fungicide6, fi_pin_harrow, fi_pin_harvest, fi_pin_herbicide1, fi_pin_herbicide2, fi_pin_herbicide3, fi_pin_insecticide, fi_pin_n_minerals1, fi_pin_n_minerals2, fi_pin_plant, fi_pin_preseeding_cultivation, fi_pin_preseeding_plant, fi_pin_slurry, fi_pin_spring_plough, fi_pin_start, fi_pin_stubble_cultivator, Farm::FP_NPKS(), Farm::FP_Slurry(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Farm::GetType(), Calendar::GetYearNumber(), Farm::HarvestLong(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::PreseedingCultivator(), Farm::PreseedingCultivatorSow(), Farm::ProductApplication(), LE::SetMConstants(), LE::SetMDates(), LE::SetVegPatchy(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSow(), Farm::StubbleCultivatorHeavy(), tof_OptimisingFarm, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void FI_PotatoIndustry_North::SetUpFarmCategoryInformation ( )
inline
74  {
75  const int elements = 2 + (fi_pin_foobar - FI_PIN_BASE);
77 
78  FarmManagementCategory catlist[elements] =
79  {
80  fmc_Others, // zero element unused but must be here
81  fmc_Others, // fi_pin_start = 1, // Compulsory, start event must always be 1 (one).
82  fmc_Harvest, // fi_pin_harvest = FI_PIN_BASE,
83  fmc_Cultivation, // fi_pin_stubble_cultivator,
84  fmc_Cultivation, // fi_pin_autumn_plough,
85  fmc_Fertilizer, // fi_pin_slurry,
86  fmc_Cultivation, // fi_pin_spring_plough,
87  fmc_Fertilizer, // fi_pin_n_minerals1,
88  fmc_Fertilizer, // fi_pin_n_minerals2,
89  fmc_Cultivation, // fi_pin_preseeding_cultivation,
90  fmc_Fertilizer, // fi_pin_fertilizer,
91  fmc_Cultivation, // fi_pin_preseeding_plant,
92  fmc_Others, // fi_pin_plant,
93  fmc_Cultivation, // fi_pin_harrow,
94  fmc_Herbicide, // fi_pin_herbicide1,
95  fmc_Herbicide, // fi_pin_herbicide2,
96  fmc_Herbicide, // fi_pin_herbicide3,
97  fmc_Fungicide, // fi_pin_fungicide1,
98  fmc_Fungicide, // fi_pin_fungicide2,
99  fmc_Fungicide, // fi_pin_fungicide3,
100  fmc_Fungicide, // fi_pin_fungicide4,
101  fmc_Fungicide, // fi_pin_fungicide5,
102  fmc_Fungicide, // fi_pin_fungicide6,
103  fmc_Insecticide // fi_pin_insecticide,
104 
105 
106  // no foobar entry
107 
108  };
109  // Iterate over the catlist elements and copy them to vector
110  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
111 
112  }

References FI_PIN_BASE, fi_pin_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FI_PotatoIndustry_North().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
fi_pin_herbicide1
Definition: FI_PotatoIndustry_North.h:50
Farm::PreseedingCultivator
virtual bool PreseedingCultivator(LE *a_field, double a_user, int a_days)
Carry out preseeding cultivation on a_field (tilling set including cultivator and string roller to co...
Definition: FarmFuncs.cpp:312
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
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
fi_pin_fertilizer
Definition: FI_PotatoIndustry_North.h:46
fi_pin_harrow
Definition: FI_PotatoIndustry_North.h:49
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
cfg_pest_potatoes_on
CfgBool cfg_pest_potatoes_on
Turn on pesticides for potatoes.
Farm::ProductApplication
virtual bool ProductApplication(LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp, bool a_isgranularpesticide=false, int a_orcharddrifttype=0)
Apply test pesticide to a_field.
Definition: FarmFuncs.cpp:2267
Farm::StubbleCultivatorHeavy
virtual bool StubbleCultivatorHeavy(LE *a_field, double a_user, int a_days)
Carry out a stubble cultivation event on a_field. This is non-inversion type of cultivation which can...
Definition: FarmFuncs.cpp:245
fi_pin_insecticide
Definition: FI_PotatoIndustry_North.h:59
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
fi_pin_herbicide2
Definition: FI_PotatoIndustry_North.h:51
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
fi_pin_harvest
Definition: FI_PotatoIndustry_North.h:38
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
fi_pin_stubble_cultivator
Definition: FI_PotatoIndustry_North.h:39
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
fi_pin_spring_plough
Definition: FI_PotatoIndustry_North.h:42
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
fi_pin_preseeding_cultivation
Definition: FI_PotatoIndustry_North.h:45
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
fi_pin_fungicide1
Definition: FI_PotatoIndustry_North.h:53
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
fi_pin_fungicide2
Definition: FI_PotatoIndustry_North.h:54
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
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
FI_PotatoIndustry_North::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FI_PotatoIndustry_North.h:74
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
fi_pin_foobar
Definition: FI_PotatoIndustry_North.h:60
fi_pin_fungicide3
Definition: FI_PotatoIndustry_North.h:55
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
fi_pin_herbicide3
Definition: FI_PotatoIndustry_North.h:52
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
fi_pin_fungicide5
Definition: FI_PotatoIndustry_North.h:57
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
Farm::PreseedingCultivatorSow
virtual bool PreseedingCultivatorSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out preseeding cultivation together with sow on a_field (tilling and sowing set including culti...
Definition: FarmFuncs.cpp:325
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
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::FP_Slurry
virtual bool FP_Slurry(LE *a_field, double a_user, int a_days)
Apply slurry to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:823
Farm::HarvestLong
virtual bool HarvestLong(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field (only differs in the DoIt chance cf harvest)
Definition: FarmFuncs.cpp:1421
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
fi_pin_fungicide6
Definition: FI_PotatoIndustry_North.h:58
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
fi_pin_n_minerals2
Definition: FI_PotatoIndustry_North.h:44
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
FI_PIN_DECIDE_TO_HERB
#define FI_PIN_DECIDE_TO_HERB
Definition: FI_PotatoIndustry_North.h:33
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
fi_pin_n_minerals1
Definition: FI_PotatoIndustry_North.h:43
fi_pin_start
Definition: FI_PotatoIndustry_North.h:37
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
FI_PIN_DECIDE_TO_FI
#define FI_PIN_DECIDE_TO_FI
Definition: FI_PotatoIndustry_North.h:34
fi_pin_plant
Definition: FI_PotatoIndustry_North.h:48
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
FI_PIN_BASE
#define FI_PIN_BASE
Definition: FI_PotatoIndustry_North.h:31
fi_pin_fungicide4
Definition: FI_PotatoIndustry_North.h:56
fi_pin_autumn_plough
Definition: FI_PotatoIndustry_North.h:40
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
fi_pin_preseeding_plant
Definition: FI_PotatoIndustry_North.h:47
fi_pin_slurry
Definition: FI_PotatoIndustry_North.h:41
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
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
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::SpringHarrow
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: FarmFuncs.cpp:459
Farm::FP_NPKS
virtual bool FP_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:630
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