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

#include <FI_Potato_South.h>

Inheritance diagram for FI_Potato_South:
Crop

Public Member Functions

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

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

Member Function Documentation

◆ Do()

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

References Farm::AutumnPlough(), Farm::BiocideTreat(), cfg_pest_potatoes_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), fi_ps_autumn_plough, fi_ps_fertilizer, fi_ps_fungicide1, fi_ps_fungicide2, fi_ps_fungicide3, fi_ps_fungicide4, fi_ps_fungicide5, fi_ps_fungicide6, fi_ps_fungicide7, fi_ps_harrow, fi_ps_harvest, fi_ps_herbicide1, fi_ps_herbicide2, fi_ps_herbicide3, fi_ps_insecticide, fi_ps_n_minerals1, fi_ps_n_minerals2, fi_ps_plant, fi_ps_preseeding_cultivation, fi_ps_preseeding_plant, fi_ps_slurry, fi_ps_spring_plough, fi_ps_start, fi_ps_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_FIPotato_South, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void FI_Potato_South::SetUpFarmCategoryInformation ( )
inline
76  {
77  const int elements = 2 + (fi_ps_foobar - FI_PS_BASE);
79 
80  FarmManagementCategory catlist[elements] =
81  {
82  fmc_Others, // zero element unused but must be here
83  fmc_Others, // fi_ps_start = 1, // Compulsory, start event must always be 1 (one).
84  fmc_Harvest, // fi_ps_harvest = FI_PS_BASE,
85  fmc_Cultivation, // fi_ps_stubble_cultivator,
86  fmc_Cultivation, // fi_ps_autumn_plough,
87  fmc_Fertilizer, // fi_ps_slurry,
88  fmc_Cultivation, // fi_ps_spring_plough,
89  fmc_Fertilizer, // fi_ps_n_minerals1,
90  fmc_Fertilizer, // fi_ps_n_minerals2,
91  fmc_Cultivation, // fi_ps_preseeding_cultivation,
92  fmc_Fertilizer, // fi_ps_fertilizer,
93  fmc_Cultivation, // fi_ps_preseeding_plant,
94  fmc_Others, // fi_ps_plant,
95  fmc_Cultivation, // fi_ps_harrow,
96  fmc_Herbicide, // fi_ps_herbicide1,
97  fmc_Herbicide, // fi_ps_herbicide2,
98  fmc_Herbicide, // fi_ps_herbicide3,
99  fmc_Fungicide, // fi_ps_fungicide1,
100  fmc_Fungicide, // fi_ps_fungicide2,
101  fmc_Fungicide, // fi_ps_fungicide3,
102  fmc_Fungicide, // fi_ps_fungicide4,
103  fmc_Fungicide, // fi_ps_fungicide5,
104  fmc_Fungicide, // fi_ps_fungicide6,
105  fmc_Fungicide, // fi_ps_fungicide7,
106  fmc_Insecticide // fi_ps_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_PS_BASE, fi_ps_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_Potato_South().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
fi_ps_herbicide1
Definition: FI_Potato_South.h:50
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
FI_Potato_South::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FI_Potato_South.h:76
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.
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
fi_ps_preseeding_cultivation
Definition: FI_Potato_South.h:45
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
fi_ps_spring_plough
Definition: FI_Potato_South.h:42
fi_ps_herbicide3
Definition: FI_Potato_South.h:52
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
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
fi_ps_harvest
Definition: FI_Potato_South.h:38
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_ps_stubble_cultivator
Definition: FI_Potato_South.h:39
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
fi_ps_autumn_plough
Definition: FI_Potato_South.h:40
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
fi_ps_fungicide4
Definition: FI_Potato_South.h:56
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
fi_ps_foobar
Definition: FI_Potato_South.h:61
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
fi_ps_insecticide
Definition: FI_Potato_South.h:60
CfgBool::value
bool value() const
Definition: Configurator.h:164
fi_ps_n_minerals1
Definition: FI_Potato_South.h:43
fi_ps_start
Definition: FI_Potato_South.h:37
fi_ps_fungicide7
Definition: FI_Potato_South.h:59
fi_ps_fungicide6
Definition: FI_Potato_South.h:58
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
tov_FIPotato_South
Definition: LandscapeFarmingEnums.h:540
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
FI_PS_BASE
#define FI_PS_BASE
Definition: FI_Potato_South.h:31
fi_ps_n_minerals2
Definition: FI_Potato_South.h:44
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
fi_ps_fungicide2
Definition: FI_Potato_South.h:54
fi_ps_plant
Definition: FI_Potato_South.h:48
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
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_ps_fungicide1
Definition: FI_Potato_South.h:53
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
fi_ps_preseeding_plant
Definition: FI_Potato_South.h:47
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
fi_ps_fungicide5
Definition: FI_Potato_South.h:57
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_ps_fertilizer
Definition: FI_Potato_South.h:46
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
fi_ps_harrow
Definition: FI_Potato_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
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
fi_ps_herbicide2
Definition: FI_Potato_South.h:51
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
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_potatoes_on
CfgBool cfg_pest_potatoes_on
Turn on pesticides for potatoes.
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
fi_ps_fungicide3
Definition: FI_Potato_South.h:55
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
fi_ps_slurry
Definition: FI_Potato_South.h:41
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