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

#include <FI_PotatoIndustry_South.h>

Inheritance diagram for FI_PotatoIndustry_South:
Crop

Public Member Functions

bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 
 FI_PotatoIndustry_South (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_South()

FI_PotatoIndustry_South::FI_PotatoIndustry_South ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline

Member Function Documentation

◆ Do()

bool FI_PotatoIndustry_South::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  int d1 = 0;
44  bool flag = false;
45  bool done = false;
46 
48  int l_nextcropstartdate;
49 
50  switch (m_ev->m_todo)
51  {
52  case fi_pis_start:
53  {
54  a_field->ClearManagementActionSum();
55 
56  m_last_date = g_date->DayInYear(30, 9); // Should match the last flexdate below
57  //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
58  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
59  // Set up the date management stuff
60  // Start and stop dates for all events after harvest
61  flexdates[0][1] = g_date->DayInYear(30, 9); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use
62 
63  // 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
64  int isSpring = 0;
65  if (StartUpCrop(isSpring, flexdates, int(fi_pis_fertilizer))) break;
66 
67  // End single block date checking code. Please see next line comment as well.
68  // Reinit d1 to first possible starting date.
69  d1 = g_date->OldDays() + g_date->DayInYear(1, 9);
70  // OK, let's go.
71  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
72  if (m_ev->m_forcespring) {
73  int day_num_shift = 365;
74  if (g_date->DayInYear() < 70) day_num_shift = 0;
75  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + day_num_shift, fi_pis_slurry, false); //Slurry thread
76  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + day_num_shift, fi_pis_n_minerals1, false); //N minerals thread
77  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + day_num_shift, fi_pis_spring_plough, false); //Spring plough thread
78  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5) + day_num_shift, fi_pis_fertilizer, false); //Sowing thread - main thread
79  break;
80  }
81  else SimpleEvent(d1, fi_pis_stubble_cultivator, false);
82  break;
83  }
84  break;
85  // 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
87  if (m_ev->m_lock || m_farm->DoIt_prob(0.02))
88  {
91  break;
92  }
93  //Here comes a fork of parallel events:
94  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pis_n_minerals1, false); //N minerals thread
95  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pis_slurry, false); //Slurry thread
96  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5) + 365, fi_pis_fertilizer, false); //Sowing thread - main thread
97  break;
98  }
99  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
101  break;
102  }
103  else if (m_ev->m_lock || m_farm->DoIt_prob(0.74 / 0.74)) { //Here comes a fork of parallel events:
104  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pis_n_minerals1, false); //N minerals thread
105  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pis_slurry, false); //Slurry thread
106  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pis_spring_plough, false); //Spring plough thread
107  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5) + 365, fi_pis_fertilizer, false); //Sowing thread - main thread
108  break;
109  }
110 
112  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(1, 12) - g_date->DayInYear())) {
114  break;
115  }
116  //Here comes a fork of parallel events:
117  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pis_n_minerals1, false); //N minerals thread
118  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, fi_pis_slurry, false); //Slurry thread
119  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 5) + 365, fi_pis_fertilizer, false); //Sowing thread - main thread
120  break;
121  // N minerals thread
122  case fi_pis_n_minerals1: //sometimes applied - 10% do this, done before 10th of May
123  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
124  if (!m_farm->FP_NPKS(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
125  SimpleEvent(g_date->Date() + 1, fi_pis_n_minerals1, true);
126  break;
127  }
128  }
129  break; //end of N minerals thread
130  // Slurry thread
131  case fi_pis_slurry: //rarely applied on conventional farms (mostly organic) 5% do this, done before 25th of May
132  if (m_ev->m_lock || m_farm->DoIt_prob(0.05)) {
133  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
134  SimpleEvent(g_date->Date() + 1, fi_pis_slurry, true);
135  break;
136  }
137  }
138  break; //end of Slurry thread
139  // Spring plough thread (the 74% from before)
140  case fi_pis_spring_plough: // done before 25th of May
141  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
143  break;
144  }
145  break; //end of Spring plough thread
146  // Sowing thread - starts with fertilizer, 95% do this, before 30th of May
147  case fi_pis_fertilizer:
148  if (m_ev->m_lock || m_farm->DoIt_prob(0.95)) {
149  if (!m_farm->FP_NPKS(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
150  SimpleEvent(g_date->Date() + 1, fi_pis_fertilizer, true);
151  break;
152  }
153  }
154  // LKM: Queue up next event preseeding cultivation right after - done before the 30th of May
156  break;
158  if (m_ev->m_lock || m_farm->DoIt_prob(0.95)) {
159  if (!m_farm->PreseedingCultivator(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
161  break;
162  }
163  // LKM: Queue up next event planting right after - done before the 30th of May
164  SimpleEvent(g_date->Date(), fi_pis_plant, false);
165  break;
166  }
167  else if (m_ev->m_lock || m_farm->DoIt_prob(0.05 / 0.05)) { // 5% plant with the preseeding cultivation
168  // LKM: Queue up next event planting right after - done before the 30th of May
170  break;
171  }
175  break;
176  }
177  // LKM: Queue up next event harrow, done 7 days after
178  SimpleEvent(g_date->Date() + 7, fi_pis_harrow, false);
179  break;
180  case fi_pis_plant:
181  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
182  SimpleEvent(g_date->Date() + 1, fi_pis_plant, true);
183  break;
184  }
185  // LKM: Queue up next event harrow, done 7 days after
186  SimpleEvent(g_date->Date() + 7, fi_pis_harrow, false);
187  break;
188  case fi_pis_harrow: // 98% do this, done before 7th of June
189  if (m_ev->m_lock || m_farm->DoIt_prob(0.98)) {
190  if (!m_farm->SpringHarrow(m_field, 0.0, g_date->DayInYear(7, 6) - g_date->DayInYear())) {
191  SimpleEvent(g_date->Date() + 1, fi_pis_harrow, true);
192  break;
193  }
194  }
195  // LKM: Here comes a fork with parallel events:
196  SimpleEvent(g_date->Date() + 2, fi_pis_herbicide1, false); // herbicide thread
197  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), fi_pis_fungicide1, false); // Fungicide thread - main thread - date not stated (suggestion)
198  SimpleEvent(g_date->OldDays() + g_date->DayInYear(20, 6), fi_pis_n_minerals2, false); // N minerals2 thread
199  break;
200  // herbicide1 thread - done before the 12th of June, 90% do this
201  case fi_pis_herbicide1:
202  if (m_ev->m_lock || m_farm->DoIt_prob(0.90)) {
203  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(12, 6) - g_date->DayInYear())) {
204  SimpleEvent(g_date->Date() + 1, fi_pis_herbicide1, true);
205  break;
206  }
207  }
208  SimpleEvent(g_date->Date()+10, fi_pis_herbicide2, false);
209  break;
210 
211  case fi_pis_herbicide2:
212  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
213  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(26, 6) - g_date->DayInYear())) {
214  SimpleEvent(g_date->Date() + 1, fi_pis_herbicide2, true);
215  break;
216  }
217  }
218  SimpleEvent(g_date->Date()+10, fi_pis_herbicide3, false);
219  break;
220  case fi_pis_herbicide3:
221  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
222  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(10, 7) - g_date->DayInYear())) {
223  SimpleEvent(g_date->Date() + 1, fi_pis_herbicide3, true);
224  break;
225  }
226  }
227  break; // End of herbicide thread
228  // N minerals2 thread - done before the 15th of July, 20% do this
229  case fi_pis_n_minerals2:
230  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
231  if (!m_farm->FP_NPKS(m_field, 0.0, g_date->DayInYear(15, 7) - g_date->DayInYear())) {
232  SimpleEvent(g_date->Date() + 1, fi_pis_n_minerals2, true);
233  break;
234  }
235  }
236  break; // End of N minerals2 thread
237  // Fungicide thread - done before the 20th of June
238  case fi_pis_fungicide1:
239  if (m_ev->m_lock || m_farm->DoIt_prob(0.98)) {
240  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(20, 6) - g_date->DayInYear())) {
241  SimpleEvent(g_date->Date() + 1, fi_pis_fungicide1, true);
242  break;
243  }
244  }
245  // LKM: Queue up next event - fungicide2 done 7-14 days later - 98% do this
246  SimpleEvent(g_date->Date() + 7, fi_pis_fungicide2, false);
247  break;
248  case fi_pis_fungicide2:
249  if (m_ev->m_lock || m_farm->DoIt_prob(0.98)) {
250  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(4, 7) - g_date->DayInYear())) {
251  SimpleEvent(g_date->Date() + 1, fi_pis_fungicide2, true);
252  break;
253  }
254  }
255  // LKM: Queue up next event - fungicide3 done 7-14 days later - 98% do this
256  SimpleEvent(g_date->Date() + 7, fi_pis_fungicide3, false);
257  break;
258  case fi_pis_fungicide3:
259  if (m_ev->m_lock || m_farm->DoIt_prob(0.98)) {
260  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(18, 7) - g_date->DayInYear())) {
261  SimpleEvent(g_date->Date() + 1, fi_pis_fungicide3, true);
262  break;
263  }
264  }
265  // LKM: Queue up next event - fungicide4 done 7-14 days later - 70% do this
266  SimpleEvent(g_date->Date() + 7, fi_pis_fungicide4, false);
267  break;
268  case fi_pis_fungicide4:
269  if (m_ev->m_lock || m_farm->DoIt_prob(0.70)) {
270  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
271  SimpleEvent(g_date->Date() + 1, fi_pis_fungicide4, true);
272  break;
273  }
274  }
275  // LKM: Queue up next event - fungicide5 done 7 days later - 45% do this
276  SimpleEvent(g_date->Date() + 7, fi_pis_fungicide5, false);
277  break;
278  case fi_pis_fungicide5:
279  if (m_ev->m_lock || m_farm->DoIt_prob(0.45)) {
280  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(8, 8) - g_date->DayInYear())) {
281  SimpleEvent(g_date->Date() + 1, fi_pis_fungicide5, true);
282  break;
283  }
284  }
285  // LKM: Queue up next event - fungicide6 done 7 days later - 20% do this
286  SimpleEvent(g_date->Date() + 7, fi_pis_fungicide6, false);
287  break;
288  case fi_pis_fungicide6:
289  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
290  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
291  SimpleEvent(g_date->Date() + 1, fi_pis_fungicide6, true);
292  break;
293  }
294  }
295  // LKM: Queue up next event - fungicide7 done 7 days later - 2% do this
296  SimpleEvent(g_date->Date() + 7, fi_pis_fungicide7, false);
297  break;
298  case fi_pis_fungicide7:
299  if (m_ev->m_lock || m_farm->DoIt_prob(0.02)) {
300  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(22, 8) - g_date->DayInYear())) {
301  SimpleEvent(g_date->Date() + 1, fi_pis_fungicide7, true);
302  break;
303  }
304  }
305  // LKM: Queue up next event - insecticide (no dates) - 3% do this
307  break;
308  case fi_pis_insecticide: // no later than 31st of August (suggestion)
309 #ifdef ECOSTACK_BIOPESTICIDE
310  if (m_ev->m_lock || m_farm->DoIt_prob(0.06)) {
311 #else
312  if (m_ev->m_lock || m_farm->DoIt_prob(0.03)) {
313 #endif
314  // here we check whether we are using ERA pesticide or not
315  d1 = g_date->DayInYear(31, 8) - g_date->DayInYear();
316  if (!cfg_pest_potatoes_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
317  {
318 #ifdef ECOSTACK_BIOPESTICIDE
319  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
320 #else
321  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
322 #endif
323  }
324  else {
325  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
326  }
327  if (!flag) {
329  break;
330  }
331  }
332  // LKM: Queue up the next event - harvest done after the 20th of August
334  break;
335  // LKM: do harvest before 7th of October
336  case fi_pis_harvest:
337  if (!m_farm->HarvestLong(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
338  SimpleEvent(g_date->Date() + 1, fi_pis_harvest, true);
339  break;
340  }
341  m_field->SetVegPatchy(false);
342  done = true;
343  break;
344 
345  default:
346  g_msg->Warn(WARN_BUG, "FI_PotatoIndustry_South::Do(): "
347  "Unknown event type! ", "");
348  exit(1);
349  }
350  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
351  return done;
352 }

References Farm::AutumnPlough(), Farm::BiocideTreat(), cfg_pest_potatoes_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), fi_pis_autumn_plough, fi_pis_fertilizer, fi_pis_fungicide1, fi_pis_fungicide2, fi_pis_fungicide3, fi_pis_fungicide4, fi_pis_fungicide5, fi_pis_fungicide6, fi_pis_fungicide7, fi_pis_harrow, fi_pis_harvest, fi_pis_herbicide1, fi_pis_herbicide2, fi_pis_herbicide3, fi_pis_insecticide, fi_pis_n_minerals1, fi_pis_n_minerals2, fi_pis_plant, fi_pis_preseeding_cultivation, fi_pis_preseeding_plant, fi_pis_slurry, fi_pis_spring_plough, fi_pis_start, fi_pis_stubble_cultivator, Farm::FP_NPKS(), Farm::FP_Slurry(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Farm::HarvestLong(), 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::PreseedingCultivator(), Farm::PreseedingCultivatorSow(), Farm::ProductApplication(), LE::SetVegPatchy(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StubbleCultivatorHeavy(), tov_FIPotatoIndustry_South, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void FI_PotatoIndustry_South::SetUpFarmCategoryInformation ( )
inline
76  {
77  const int elements = 2 + (fi_pis_foobar - FI_PIS_BASE);
79 
80  FarmManagementCategory catlist[elements] =
81  {
82  fmc_Others, // zero element unused but must be here
83  fmc_Others, // fi_pis_start = 1, // Compulsory, start event must always be 1 (one).
84  fmc_Harvest, // fi_pis_harvest = FI_PIS_BASE,
85  fmc_Cultivation, // fi_pis_stubble_cultivator,
86  fmc_Cultivation, // fi_pis_autumn_plough,
87  fmc_Fertilizer, // fi_pis_n_minerals1,
88  fmc_Fertilizer, // fi_pis_slurry,
89  fmc_Cultivation, // fi_pis_spring_plough,
90  fmc_Fertilizer, // fi_pis_n_minerals2,
91  fmc_Cultivation, // fi_pis_preseeding_cultivation,
92  fmc_Fertilizer, // fi_pis_fertilizer,
93  fmc_Cultivation, // fi_pis_preseeding_plant,
94  fmc_Others, // fi_pis_plant,
95  fmc_Cultivation, // fi_pis_harrow,
96  fmc_Herbicide, // fi_pis_herbicide1,
97  fmc_Herbicide, // fi_pis_herbicide2,
98  fmc_Herbicide, // fi_pis_herbicide3,
99  fmc_Fungicide, // fi_pis_fungicide1,
100  fmc_Fungicide, // fi_pis_fungicide2,
101  fmc_Fungicide, // fi_pis_fungicide3,
102  fmc_Fungicide, // fi_pis_fungicide4,
103  fmc_Fungicide, // fi_pis_fungicide5,
104  fmc_Fungicide, // fi_pis_fungicide6,
105  fmc_Fungicide, // fi_pis_fungicide7,
106  fmc_Insecticide // fi_pis_insecticide,
107 
108 
109  // no foobar entry
110 
111  };
112  // Iterate over the catlist elements and copy them to vector
113  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
114 
115  }

References FI_PIS_BASE, fi_pis_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_South().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
fi_pis_spring_plough
Definition: FI_PotatoIndustry_South.h:43
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
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
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
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
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
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
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_pis_insecticide
Definition: FI_PotatoIndustry_South.h:60
fi_pis_n_minerals2
Definition: FI_PotatoIndustry_South.h:44
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
fi_pis_fungicide5
Definition: FI_PotatoIndustry_South.h:57
fi_pis_fungicide7
Definition: FI_PotatoIndustry_South.h:59
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
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
fi_pis_herbicide2
Definition: FI_PotatoIndustry_South.h:51
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
tov_FIPotatoIndustry_South
Definition: LandscapeFarmingEnums.h:544
FI_PotatoIndustry_South::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FI_PotatoIndustry_South.h:76
fi_pis_herbicide1
Definition: FI_PotatoIndustry_South.h:50
fi_pis_foobar
Definition: FI_PotatoIndustry_South.h:61
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
fi_pis_fungicide1
Definition: FI_PotatoIndustry_South.h:53
Calendar::Date
long Date(void)
Definition: Calendar.h:57
cfg_pest_potatoes_on
CfgBool cfg_pest_potatoes_on
Turn on pesticides for potatoes.
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
fi_pis_fungicide4
Definition: FI_PotatoIndustry_South.h:56
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
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
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
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
fi_pis_harvest
Definition: FI_PotatoIndustry_South.h:38
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
fi_pis_preseeding_plant
Definition: FI_PotatoIndustry_South.h:47
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_pis_fungicide6
Definition: FI_PotatoIndustry_South.h:58
fi_pis_stubble_cultivator
Definition: FI_PotatoIndustry_South.h:39
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
fi_pis_autumn_plough
Definition: FI_PotatoIndustry_South.h:40
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
fi_pis_fungicide2
Definition: FI_PotatoIndustry_South.h:54
fi_pis_fungicide3
Definition: FI_PotatoIndustry_South.h:55
fi_pis_harrow
Definition: FI_PotatoIndustry_South.h:49
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
fi_pis_plant
Definition: FI_PotatoIndustry_South.h:48
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
fi_pis_preseeding_cultivation
Definition: FI_PotatoIndustry_South.h:45
fi_pis_slurry
Definition: FI_PotatoIndustry_South.h:42
fi_pis_n_minerals1
Definition: FI_PotatoIndustry_South.h:41
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
fi_pis_start
Definition: FI_PotatoIndustry_South.h:37
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Crop::m_forcespringpossible
bool m_forcespringpossible
Used to signal that the crop can be forced to start in spring.
Definition: Farm.h:508
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.
fi_pis_fertilizer
Definition: FI_PotatoIndustry_South.h:46
FI_PIS_BASE
#define FI_PIS_BASE
Definition: FI_PotatoIndustry_South.h:31
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
fi_pis_herbicide3
Definition: FI_PotatoIndustry_South.h:52
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