ALMaSS Skylark ODDox  1.1
The skylark model description following ODdox protocol
PLSpringWheat Class Reference

PLSpringWheat class
. More...

#include <PLSpringWheat.h>

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...
 
 PLSpringWheat ()
 
- Public Member Functions inherited from Crop
virtual ~Crop ()
 
 Crop ()
 
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)
 

Additional Inherited Members

- 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...
 
- Protected Attributes inherited from Crop
Farmm_farm
 
LE * m_field
 
FarmEventm_ev
 
int m_first_date
 
int m_count
 
int m_last_date
 
int m_ddegstoharvest
 
int m_CropClassification
 

Detailed Description

PLSpringWheat class
.

See PLSpringWheat.h::PLSpringWheatToDo for a complete list of all possible events triggered codes by the spring wheat 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

◆ PLSpringWheat()

PLSpringWheat::PLSpringWheat ( )
inline
103  {
104  // When we start it off, the first possible date for a farm operation is 5th November
105  // This information is used by other crops when they decide how much post processing of
106  // the management is allowed after harvest before the next crop starts.
107  m_first_date=g_date->DayInYear( 5,11 );
108  }

References Crop::m_first_date.

Member Function Documentation

◆ Do()

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

The one and only method for a crop management plan. All farm actions go through here.

Called every time something is done to the crop by the farmer in the first instance it is always called with a_ev->todo set to start, but susequently will be called whenever the farmer wants to carry out a new operation.
This method details all the management and relationships between operations necessary to grow and ALMaSS crop - in this case conventional spring wheat.

Reimplemented from Crop.

65 {
66  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
67  int d1 = 0;
68  // Depending what event has occured jump to the correct bit of code
69  switch (a_ev->m_todo)
70  {
71  case pl_sw_start:
72  {
73  // pl_sw_start just sets up all the starting conditions and reference dates that are needed to start a pl_sw
74  PL_SW_FERTI_P1 = false;
75  PL_SW_FERTI_S1 = false;
76  PL_SW_STUBBLE_PLOUGH = false;
77  PL_SW_FERTI_P4 = false;
78  PL_SW_FERTI_S4 = false;
80  PL_SW_DECIDE_TO_GR = false;
81 
82  // Set up the date management stuff
83  // The next bit of code just allows for altering dates after harvest if it is necessary
84  // to allow for a crop which starts its management early.
85 
86  // 5 start and stop dates for all 'movable' events for this crop
87  int noDates = 4;
88  a_field->SetMDates(0, 0, g_date->DayInYear(15, 8)); // last possible day of harvest
89  a_field->SetMDates(1, 0, g_date->DayInYear(20, 8)); // last possible day of starw chopping, equal to harvest in this case
90  a_field->SetMDates(0, 1, 0); // start day of hay bailing (not used as it depend on previous treatment)
91  a_field->SetMDates(1, 1, g_date->DayInYear(25, 8)); // end day of hay bailing
92  a_field->SetMDates(0, 2, 0); // start day of RSM
93  a_field->SetMDates(1, 2, g_date->DayInYear(25, 8)); // end day of RSM
94  a_field->SetMDates(0, 3, 0); // start day of calcium application
95  a_field->SetMDates(1, 3, g_date->DayInYear(25, 8)); // end day of calcium application
96  // Can be up to 10 of these. If the shortening code is triggered
97  // then these will be reduced in value to 0
98 
99  a_field->SetMConstants(0, 1);
100 
101  // Check the next crop for early start, unless it is a spring crop
102  // in which case we ASSUME that no checking is necessary!!!!
103  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
104 
105  //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)
106  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
107  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
108 
109  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
110  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
111  {
112  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): ", "Harvest too late for the next crop to start!!!");
113  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
114  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
115  }
116  // Now fix any late finishing problems
117  for (int i = 0; i < noDates; i++) {
118  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
119  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
120  }
121  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
122  a_field->SetMConstants(i, 0); //change the default value of the MConst (=1) to 0 (necessary to correctly execute farm events in case the finishing date (MDate) was moved)
123  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
124  }
125  }
126  }
127  // Now no operations can be timed after the start of the next crop.
128 
129  if (!a_ev->m_first_year) {
130  // Are we before July 1st?
131  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
132  if (g_date->Date() < d1) {
133  // Yes, too early. We assumme this is because the last crop was late
134  printf("Poly: %d\n", a_field->GetPoly());
135  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): ", "Crop start attempt between 1st Jan & 1st July");
136  int prev = g_landscape_p->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousCrop(a_field->GetRotIndex()));
137  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
138  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
139  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
140  }
141  else {
142  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
143  if (g_date->Date() > d1) {
144  // Yes too late - should not happen - raise an error
145  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): ", "Crop start attempt after last possible start date");
146  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
147  a_field->GetOwner()->GetPreviousCrop(a_field->GetRotIndex());
148  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
149  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
150  }
151  }
152  }
153  else {
154  // Is the first year
155  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
156  // Code for first spring treatment used
157  if (a_farm->IsStockFarmer()) //Stock Farmer
158  {
159  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3), pl_sw_ferti_s4, false, a_farm, a_field);
160  }
161  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3), pl_sw_ferti_p4, false, a_farm, a_field);
162  break;
163  }
164  }//if
165 
166  // End single block date checking code. Please see next line comment as well.
167  // Reinit d1 to first possible starting date.
168  d1 = g_date->OldDays() + g_date->DayInYear(20, 7);
169  // OK, let's go.
170  // Here we queue up the first event - this differs depending on whether we have a
171  // stock or arable farmer
172  if (a_farm->IsStockFarmer()) { // StockFarmer
173  SimpleEvent_(d1, pl_sw_ferti_s1, false, a_farm, a_field);
174  }
175  else SimpleEvent_(d1, pl_sw_ferti_p1, false, a_farm, a_field);
176  }
177  break;
178 
179  // This is the first real farm operation
180  case pl_sw_ferti_p1:
181  // In total 10% of arable farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
182  // We therefore assume that half of them (5%) do it now
183  if (a_ev->m_lock || a_farm->DoIt(5))
184  {
185  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
186  // If we don't suceed on the first try, then try and try again (until 20/8 when we will suceed)
187  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p1, true, a_farm, a_field);
188  break;
189  }
190  else
191  {
192  //Rest of farmers do slurry before autumn plough/stubble cultivation so we need to remeber who already did it
193  PL_SW_FERTI_P1 = true;
194  }
195  }
196  // Queue up the next event -in this case stubble ploughing
197  SimpleEvent_(g_date->Date() + 1, pl_sw_stubble_plough, false, a_farm, a_field);
198  break;
199  case pl_sw_ferti_s1:
200  // In total 80% of stock farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
201  // We therefore assume that half of them (40%) do it now
202  if (a_ev->m_lock || a_farm->DoIt(40))
203  {
204  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
205  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s1, true, a_farm, a_field);
206  break;
207  }
208  else
209  {
210  //Rest of farmers do slurry before autumn plough/stubble cultivation so we need to remeber who already did it
211  PL_SW_FERTI_S1 = true;
212  }
213  }
214  // Queue up the next event -in this case stubble ploughing
215  SimpleEvent_(g_date->Date() + 1, pl_sw_stubble_plough, false, a_farm, a_field);
216  break;
218  // 20% will do stubble plough, but rest will get away with non-inversion cultivation
219  if (a_ev->m_lock || a_farm->DoIt(20))
220  {
221  if (!a_farm->StubblePlough(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
222  SimpleEvent_(g_date->Date() + 1, pl_sw_stubble_plough, true, a_farm, a_field);
223  break;
224  }
225  else
226  {
227  // 20% of farmers will do this, but the other 80% won't so we need to remember whether we are in one or the other group
228  PL_SW_STUBBLE_PLOUGH = true;
229  // Queue up the next event
230  SimpleEvent_(g_date->Date() + 1, pl_sw_autumn_harrow1, false, a_farm, a_field);
231  break;
232  }
233  }
234  SimpleEvent_(g_date->Date() + 1, pl_sw_stubble_harrow, false, a_farm, a_field);
235  break;
237  if (!a_farm->AutumnHarrow(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
238  SimpleEvent_(g_date->Date() + 1, pl_sw_autumn_harrow1, true, a_farm, a_field);
239  break;
240  }
241  SimpleEvent_(g_date->Date() + 2, pl_sw_autumn_harrow2, false, a_farm, a_field);
242  break;
244  if (a_ev->m_lock || a_farm->DoIt(40))
245  {
246  if (!a_farm->AutumnHarrow(a_field, 0.0, g_date->Date() + 7 - g_date->DayInYear())) {
247  SimpleEvent_(g_date->Date() + 1, pl_sw_autumn_harrow2, true, a_farm, a_field);
248  break;
249  }
250  }
251  d1 = g_date->Date() + 1;
252  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 9)) {
253  d1 = g_date->OldDays() + g_date->DayInYear(10, 9);
254  }
255  if (a_farm->IsStockFarmer()) //Stock Farmer
256  {
257  SimpleEvent_(d1, pl_sw_ferti_s2, false, a_farm, a_field);
258  }
259  else SimpleEvent_(d1, pl_sw_ferti_p2, false, a_farm, a_field);
260  break;
262  if (!a_farm->StubbleHarrowing(a_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
263  SimpleEvent_(g_date->Date() + 1, pl_sw_stubble_harrow, true, a_farm, a_field);
264  break;
265  }
266  d1 = g_date->Date() + 1;
267  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 9)) {
268  d1 = g_date->OldDays() + g_date->DayInYear(10, 9);
269  }
270  if (a_farm->IsStockFarmer()) //Stock Farmer
271  {
272  SimpleEvent_(d1, pl_sw_ferti_s2, false, a_farm, a_field);
273  }
274  else SimpleEvent_(d1, pl_sw_ferti_p2, false, a_farm, a_field);
275  break;
276  case pl_sw_ferti_p2:
277  // In total 10% of arable farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
278  // We therefore assume that half of them (5%) do it now (if haven't done before)
279  if ((a_ev->m_lock || a_farm->DoIt(static_cast<int>((5.0/95.0)*100)))&&(PL_SW_FERTI_P1==false))
280  {
281  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
282  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p2, true, a_farm, a_field);
283  break;
284  }
285  }
286  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p3, false, a_farm, a_field);
287  break;
288  case pl_sw_ferti_s2:
289  // In total 80% of stock farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
290  // We therefore assume that half of them (40%) do it now (if haven't done before)
291  if ((a_ev->m_lock || a_farm->DoIt(static_cast<int>((40.0/60.0)*100))) && (PL_SW_FERTI_S1==false))
292  {
293  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
294  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s2, true, a_farm, a_field);
295  break;
296  }
297  }
298  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s3, false, a_farm, a_field);
299  break;
300  case pl_sw_ferti_p3:
301  if (a_ev->m_lock || a_farm->DoIt(3))
302  {
303  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
304  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p3, true, a_farm, a_field);
305  break;
306  }
307  }
308  SimpleEvent_(g_date->Date() + 1, pl_sw_winter_plough, false, a_farm, a_field);
309  break;
310  case pl_sw_ferti_s3:
311  if (a_ev->m_lock || a_farm->DoIt(3))
312  {
313  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
314  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s3, true, a_farm, a_field);
315  break;
316  }
317  }
318  SimpleEvent_(g_date->Date() + 1, pl_sw_winter_plough, false, a_farm, a_field);
319  break;
320  case pl_sw_winter_plough:
321  if (a_ev->m_lock || a_farm->DoIt(27))
322  {
323  if (!a_farm->WinterPlough(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
324  SimpleEvent_(g_date->Date() + 1, pl_sw_winter_plough, true, a_farm, a_field);
325  break;
326  }
327  }
328  if (a_farm->IsStockFarmer()) //Stock Farmer
329  {
330  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, pl_sw_ferti_s4, false, a_farm, a_field);
331  }
332  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, pl_sw_ferti_p4, false, a_farm, a_field);
333  break;
334  case pl_sw_ferti_p4:
335  if (a_ev->m_lock || a_farm->DoIt(18))
336  {
337  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear())) {
338  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p4, true, a_farm, a_field);
339  break;
340  }
341  else
342  {
343  //All farmers who do spring slurry have to do harrow
344  PL_SW_FERTI_P4 = true;
345  }
346  }
347  SimpleEvent_(g_date->Date() + 1, pl_sw_spring_harrow, false, a_farm, a_field);
348  break;
349  case pl_sw_ferti_s4:
350  if (a_ev->m_lock || a_farm->DoIt(18))
351  {
352  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear())) {
353  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s4, true, a_farm, a_field);
354  break;
355  }
356  else
357  {
358  //All farmers who do spring slurry have to do harrow
359  PL_SW_FERTI_S4 = true;
360  }
361  }
362  SimpleEvent_(g_date->Date() + 1, pl_sw_spring_harrow, false, a_farm, a_field);
363  break;
364  case pl_sw_spring_harrow:
365  if ((a_ev->m_lock) || (PL_SW_FERTI_P4) || (PL_SW_FERTI_S4) || (a_farm->DoIt(12)))
366  {
367  if (!a_farm->SpringHarrow(a_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear())) {
368  SimpleEvent_(g_date->Date() + 1, pl_sw_spring_harrow, true, a_farm, a_field);
369  break;
370  }
371  }
372  d1 = g_date->Date() + 1;
373  if (d1 < g_date->OldDays() + g_date->DayInYear(5, 3)) {
374  d1 = g_date->OldDays() + g_date->DayInYear(5, 3);
375  }
376  if (a_farm->IsStockFarmer()) //Stock Farmer
377  {
378  SimpleEvent_(d1, pl_sw_ferti_s5, false, a_farm, a_field);
379  }
380  else SimpleEvent_(d1, pl_sw_ferti_p5, false, a_farm, a_field);
381  break;
382  case pl_sw_ferti_p5:
383  if (a_ev->m_lock || a_farm->DoIt(98))
384  {
385  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
386  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p5, true, a_farm, a_field);
387  break;
388  }
389  PL_SW_SPRING_FERTI = true;
390  }
391  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p6, false, a_farm, a_field);
392  break;
393  case pl_sw_ferti_s5:
394  if (a_ev->m_lock || a_farm->DoIt(98))
395  {
396  if (!a_farm->FA_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
397  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s5, true, a_farm, a_field);
398  break;
399  }
400  PL_SW_SPRING_FERTI = true;
401  }
402  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s6, false, a_farm, a_field);
403  break;
404  case pl_sw_ferti_p6:
405  if (a_ev->m_lock || a_farm->DoIt(90))
406  {
407  if (!a_farm->FP_PK(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
408  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p6, true, a_farm, a_field);
409  break;
410  }
411  PL_SW_SPRING_FERTI = true;
412  }
413  SimpleEvent_(g_date->Date() + 1, pl_sw_heavy_cultivator, false, a_farm, a_field);
414  break;
415  case pl_sw_ferti_s6:
416  if (a_ev->m_lock || a_farm->DoIt(90))
417  {
418  if (!a_farm->FA_PK(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
419  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s6, true, a_farm, a_field);
420  break;
421  }
422  PL_SW_SPRING_FERTI = 1;
423  }
424  SimpleEvent_(g_date->Date() + 1, pl_sw_heavy_cultivator, false, a_farm, a_field);
425  break;
427  if (PL_SW_SPRING_FERTI == 1)
428  {
429  if (!a_farm->HeavyCultivatorAggregate(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
430  SimpleEvent_(g_date->Date() + 1, pl_sw_heavy_cultivator, true, a_farm, a_field);
431  break;
432  }
433  }
434  d1 = g_date->Date() + 1;
435  if (d1 < g_date->OldDays() + g_date->DayInYear(20, 3)) {
436  d1 = g_date->OldDays() + g_date->DayInYear(20, 3);
437  }
438  SimpleEvent_(d1, pl_sw_preseeding_cultivator, false, a_farm, a_field);
439  break;
441  // 20% will do preseeding cultivation, the rest will do it together with sow
442  if (a_ev->m_lock || a_farm->DoIt(20))
443  {
444  if (!a_farm->PreseedingCultivator(a_field, 0.0, g_date->DayInYear(9, 4) - g_date->DayInYear())) {
445  SimpleEvent_(g_date->Date() + 1, pl_sw_preseeding_cultivator, true, a_farm, a_field);
446  break;
447  }
448  SimpleEvent_(g_date->Date() + 1, pl_sw_spring_sow, false, a_farm, a_field);
449  break;
450  }
451  SimpleEvent_(g_date->Date() + 1, pl_sw_preseeding_cultivator_sow, false, a_farm, a_field);
452  break;
453  case pl_sw_spring_sow:
454  if (!a_farm->SpringSow(a_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
455  SimpleEvent_(g_date->Date() + 1, pl_sw_spring_sow, true, a_farm, a_field);
456  break;
457  }
458  // Here is a fork leading to four parallel events
459  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(10, 4), pl_sw_herbicide1, false, a_farm, a_field); // Herbidide thread
460  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_fungicide1, false, a_farm, a_field); // Fungicide thread
461  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 5), pl_sw_insecticide1, false, a_farm, a_field); // Insecticide thread = MAIN THREAD
462  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_growth_regulator1, false, a_farm, a_field); // GR thread
463  if (a_farm->IsStockFarmer()) //Stock Farmer // N thread
464  {
465  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_ferti_s7, false, a_farm, a_field);
466  }
467  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_ferti_p7, false, a_farm, a_field);
468  if (a_farm->IsStockFarmer()) //Stock Farmer // Microelemnts thread
469  {
470  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_ferti_s8, false, a_farm, a_field);
471  }
472  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_ferti_p8, false, a_farm, a_field);
473  break;
475  // 80% will do preseeding cultivation with sow
476  if (!a_farm->PreseedingCultivatorSow(a_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
477  SimpleEvent_(g_date->Date() + 1, pl_sw_preseeding_cultivator_sow, true, a_farm, a_field);
478  break;
479  }
480  // Here is a fork leading to four parallel events
481  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(10, 4), pl_sw_herbicide1, false, a_farm, a_field); // Herbidide thread
482  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_fungicide1, false, a_farm, a_field); // Fungicide thread
483  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 5), pl_sw_insecticide1, false, a_farm, a_field); // Insecticide thread = MAIN THREAD
484  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_growth_regulator1, false, a_farm, a_field); // GR thread
485  if (a_farm->IsStockFarmer()) //Stock Farmer // N thread
486  {
487  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_ferti_s7, false, a_farm, a_field);
488  }
489  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_ferti_p7, false, a_farm, a_field);
490  if (a_farm->IsStockFarmer()) //Stock Farmer // Microelemnts thread
491  {
492  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_ferti_s8, false, a_farm, a_field);
493  }
494  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_sw_ferti_p8, false, a_farm, a_field);
495  break;
496  case pl_sw_ferti_p7:
497  // Here comes N thread
498  if (a_ev->m_lock || a_farm->DoIt(94))
499  {
500  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
501  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p7, true, a_farm, a_field);
502  break;
503  }
504  }
505  // End of thread
506  break;
507  case pl_sw_ferti_s7:
508  if (a_ev->m_lock || a_farm->DoIt(94))
509  {
510  if (!a_farm->FA_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
511  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s7, true, a_farm, a_field);
512  break;
513  }
514  }
515  // End of thread
516  break;
517  case pl_sw_ferti_p8:
518  // Here comes the mickroelements thread
519  if (a_ev->m_lock || a_farm->DoIt(40))
520  {
521  if (!a_farm->FP_ManganeseSulphate(a_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
522  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p8, true, a_farm, a_field);
523  break;
524  }
525  }
526  d1 = g_date->Date() + 14;
527  if (d1 < g_date->OldDays() + g_date->DayInYear(25, 5)) {
528  d1 = g_date->OldDays() + g_date->DayInYear(25, 5);
529  }
530  SimpleEvent_(d1, pl_sw_ferti_p9, false, a_farm, a_field);
531  break;
532  case pl_sw_ferti_s8:
533  if (a_ev->m_lock || a_farm->DoIt(40))
534  {
535  if (!a_farm->FA_ManganeseSulphate(a_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
536  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s8, true, a_farm, a_field);
537  break;
538  }
539  }
540  d1 = g_date->Date() + 14;
541  if (d1 < g_date->OldDays() + g_date->DayInYear(25, 5)) {
542  d1 = g_date->OldDays() + g_date->DayInYear(25, 5);
543  }
544  SimpleEvent_(d1, pl_sw_ferti_s9, false, a_farm, a_field);
545  break;
546  case pl_sw_ferti_p9:
547  if (a_ev->m_lock || a_farm->DoIt(5))
548  {
549  if (!a_farm->FP_ManganeseSulphate(a_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
550  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p9, true, a_farm, a_field);
551  break;
552  }
553  }
554  // End of thread
555  break;
556  case pl_sw_ferti_s9:
557  if (a_ev->m_lock || a_farm->DoIt(5))
558  {
559  if (!a_farm->FA_ManganeseSulphate(a_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
560  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s9, true, a_farm, a_field);
561  break;
562  }
563  }
564  // End of thread
565  break;
566  case pl_sw_herbicide1: // The first of the pesticide managements.
567  // Here comes the herbicide thread
568  if (a_ev->m_lock || a_farm->DoIt(97))
569  {
570  if (a_field->GetGreenBiomass() <= 0) {
571  SimpleEvent_(g_date->Date() + 5, pl_sw_herbicide1, true, a_farm, a_field);
572  }
573  else
574  {
575  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
576  SimpleEvent_(g_date->Date() + 1, pl_sw_herbicide1, true, a_farm, a_field);
577  break;
578  }
579  }
580  }
581  // End of thread
582  break;
583  case pl_sw_fungicide1:
584  // Here comes the fungicide thread
585  if (a_ev->m_lock || a_farm->DoIt(87))
586  {
587  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
588  SimpleEvent_(g_date->Date() + 1, pl_sw_fungicide1, true, a_farm, a_field);
589  break;
590  }
591  }
592  SimpleEvent_(g_date->Date() + 14, pl_sw_fungicide2, false, a_farm, a_field);
593  break;
594  case pl_sw_fungicide2:
595  if (a_ev->m_lock || a_farm->DoIt(30))
596  {
597  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
598  SimpleEvent_(g_date->Date() + 1, pl_sw_fungicide2, true, a_farm, a_field);
599  break;
600  }
601  }
602  d1 = g_date->Date() + 14;
603  if (d1 < g_date->OldDays() + g_date->DayInYear(20, 5)) {
604  d1 = g_date->OldDays() + g_date->DayInYear(20, 5);
605  }
606  SimpleEvent_(d1, pl_sw_fungicide3, false, a_farm, a_field);
607  break;
608  case pl_sw_fungicide3:
609  if (a_ev->m_lock || a_farm->DoIt(10))
610  {
611  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(20, 6) - g_date->DayInYear())) {
612  SimpleEvent_(g_date->Date() + 1, pl_sw_fungicide3, true, a_farm, a_field);
613  break;
614  }
615  }
616  // End of thread
617  break;
618  case pl_sw_insecticide1:
619  // Here comes the insecticide thread = MAIN THREAD
620  if (a_ev->m_lock || a_farm->DoIt(68))
621  {
622  // here we check wheter we are using ERA pesticide or not
623  if (!cfg_pest_springwheat_on.value() ||
624  !g_landscape_p->SupplyShouldSpray()) // Not using pesticide spray
625  {
626  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
627  SimpleEvent_(g_date->Date() + 1, pl_sw_insecticide1, true, a_farm, a_field);
628  break;
629  }
630  }
631  else {
632  a_farm->ProductApplication(a_field, 0.0, 0, cfg_pest_product_1_amount.value(), ppp_1);
633  }
634  }
635  SimpleEvent_(g_date->Date() + 14, pl_sw_insecticide2, false, a_farm, a_field);
636  break;
637  case pl_sw_insecticide2:
638  if (a_ev->m_lock || a_farm->DoIt(30))
639  {
640  // here we check wheter we are using ERA pesticide or not
641  if (!cfg_pest_springwheat_on.value() ||
642  !g_landscape_p->SupplyShouldSpray()) // Not using pesticide spray
643  {
644  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
645  SimpleEvent_(g_date->Date() + 1, pl_sw_insecticide2, true, a_farm, a_field);
646  break;
647  }
648  }
649  else {
650  a_farm->ProductApplication(a_field, 0.0, 0, cfg_pest_product_1_amount.value(), ppp_1);
651  }
652  }
653  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(20, 7), pl_sw_harvest, false, a_farm, a_field);
654  break;
656  // Here comes the GR thread
657  if (a_ev->m_lock || a_farm->DoIt(25))
658  {
659  if (!a_farm->GrowthRegulator(a_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
660  SimpleEvent_(g_date->Date() + 1, pl_sw_growth_regulator1, true, a_farm, a_field);
661  break;
662  }
663  else
664  {
665  //We need to remeber who did GR I
666  PL_SW_DECIDE_TO_GR = true;
667  }
668  }
669  SimpleEvent_(g_date->Date() + 7, pl_sw_growth_regulator2, false, a_farm, a_field);
670  break;
672  if (a_ev->m_lock || a_farm->DoIt(6*PL_SW_DECIDE_TO_GR))
673  {
674  if (!a_farm->GrowthRegulator(a_field, 0.0, g_date->Date() + 21 - g_date->DayInYear())) {
675  SimpleEvent_(g_date->Date() + 1, pl_sw_growth_regulator2, true, a_farm, a_field);
676  break;
677  }
678  }
679  // End of thread
680  break;
681  case pl_sw_harvest:
682  // Here the MAIN thread continues
683  // We don't move harvest days
684  if (!a_farm->Harvest(a_field, 0.0, a_field->GetMDates(0, 0) - g_date->DayInYear())) {
685  SimpleEvent_(g_date->Date() + 1, pl_sw_harvest, true, a_farm, a_field);
686  break;
687  }
688  SimpleEvent_(g_date->Date() + 1, pl_sw_straw_chopping, false, a_farm, a_field);
689  break;
691  if (a_farm->IsStockFarmer()) //Stock Farmer
692  {
693  // 10% of stock farmers will do straw chopping, but rest will do hay bailing instead
694  if (a_ev->m_lock || a_farm->DoIt(10))
695  {
696  if (a_field->GetMConstants(0) == 0) {
697  if (!a_farm->StrawChopping(a_field, 0.0, -1)) { // raise an error
698  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): failure in 'StrawChopping' execution", "");
699  exit(1);
700  }
701  }
702  else {
703  if (!a_farm->StrawChopping(a_field, 0.0, a_field->GetMDates(1, 0) - g_date->DayInYear())) {
704  SimpleEvent_(g_date->Date() + 1, pl_sw_straw_chopping, true, a_farm, a_field);
705  break;
706  }
707  else
708  {
709  // Queue up the next event
710  SimpleEvent_(g_date->Date(), pl_sw_ferti_s10, false, a_farm, a_field);
711  break;
712  }
713  }
714 
715  }
716  SimpleEvent_(g_date->Date() + 1, pl_sw_hay_bailing, false, a_farm, a_field);
717  break;
718  }
719  else
720  {
721  // 90% of arable farmers will do straw chopping, but rest will do hay bailing instead
722  if (a_ev->m_lock || a_farm->DoIt(90))
723  {
724  if (a_field->GetMConstants(0) == 0) {
725  if (!a_farm->StrawChopping(a_field, 0.0, -1)) { // raise an error
726  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): failure in 'StrawChopping' execution", "");
727  exit(1);
728  }
729  }
730  else {
731  if (!a_farm->StrawChopping(a_field, 0.0, a_field->GetMDates(1, 0) - g_date->DayInYear())) {
732  SimpleEvent_(g_date->Date() + 1, pl_sw_straw_chopping, true, a_farm, a_field);
733  break;
734  }
735  else
736  {
737  // Queue up the next event
738  SimpleEvent_(g_date->Date(), pl_sw_ferti_p10, false, a_farm, a_field);
739  break;
740  }
741  }
742 
743  }
744  SimpleEvent_(g_date->Date() + 1, pl_sw_hay_bailing, false, a_farm, a_field);
745  break;
746  }
747  case pl_sw_hay_bailing:
748  if (a_field->GetMConstants(1) == 0) {
749  if (!a_farm->HayBailing(a_field, 0.0, -1)) { // raise an error
750  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): failure in 'HayBailing' execution", "");
751  exit(1);
752  }
753  }
754  else {
755  if (!a_farm->HayBailing(a_field, 0.0, a_field->GetMDates(1, 1) - g_date->DayInYear())) {
756  SimpleEvent_(g_date->Date() + 1, pl_sw_hay_bailing, true, a_farm, a_field);
757  break;
758  }
759  }
760  if (a_farm->IsStockFarmer()) //Stock Farmer
761  {
762  SimpleEvent_(g_date->Date(), pl_sw_ferti_s11, false, a_farm, a_field);
763  }
764  else SimpleEvent_(g_date->Date(), pl_sw_ferti_p11, false, a_farm, a_field);
765  break;
766  case pl_sw_ferti_p10:
767  if (a_ev->m_lock || a_farm->DoIt(18))
768  {
769  if (a_field->GetMConstants(2) == 0) {
770  if (!a_farm->FP_RSM(a_field, 0.0, -1)) { // raise an error
771  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): failure in 'FP_RSM' execution", "");
772  exit(1);
773  }
774  }
775  else {
776  if (!a_farm->FP_RSM(a_field, 0.0, a_field->GetMDates(1, 2) - g_date->DayInYear())) {
777  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p10, true, a_farm, a_field);
778  break;
779  }
780  }
781  }
782  if (a_farm->IsStockFarmer()) //Stock Farmer
783  {
784  SimpleEvent_(g_date->Date(), pl_sw_ferti_s11, false, a_farm, a_field);
785  }
786  else SimpleEvent_(g_date->Date(), pl_sw_ferti_p11, false, a_farm, a_field);
787  break;
788  case pl_sw_ferti_s10:
789  if (a_ev->m_lock || a_farm->DoIt(18))
790  {
791  if (a_field->GetMConstants(2) == 0) {
792  if (!a_farm->FA_RSM(a_field, 0.0, -1)) { // raise an error
793  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): failure in 'FA_RSM' execution", "");
794  exit(1);
795  }
796  }
797  else {
798  if (!a_farm->FA_RSM(a_field, 0.0, a_field->GetMDates(1, 2) - g_date->DayInYear())) {
799  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s10, true, a_farm, a_field);
800  break;
801  }
802  }
803  }
804  if (a_farm->IsStockFarmer()) //Stock Farmer
805  {
806  SimpleEvent_(g_date->Date(), pl_sw_ferti_s11, false, a_farm, a_field);
807  }
808  else SimpleEvent_(g_date->Date(), pl_sw_ferti_p11, false, a_farm, a_field);
809  break;
810  case pl_sw_ferti_p11:
811  if (a_ev->m_lock || a_farm->DoIt(23))
812  {
813  if (a_field->GetMConstants(3) == 0) {
814  if (!a_farm->FP_Calcium(a_field, 0.0, -1)) { // raise an error
815  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): failure in 'FP_Calcium' execution", "");
816  exit(1);
817  }
818  }
819  else {
820  if (!a_farm->FP_Calcium(a_field, 0.0, a_field->GetMDates(1, 3) - g_date->DayInYear())) {
821  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_p11, true, a_farm, a_field);
822  break;
823  }
824  }
825  }
826  done = true;
827  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
828  // END of MAIN THREAD
829  break;
830  case pl_sw_ferti_s11:
831  if (a_ev->m_lock || a_farm->DoIt(23))
832  {
833  if (a_field->GetMConstants(3) == 0) {
834  if (!a_farm->FA_Calcium(a_field, 0.0, -1)) { // raise an error
835  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): failure in 'FA_Calcium' execution", "");
836  exit(1);
837  }
838  }
839  else {
840  if (!a_farm->FA_Calcium(a_field, 0.0, a_field->GetMDates(1, 3) - g_date->DayInYear())) {
841  SimpleEvent_(g_date->Date() + 1, pl_sw_ferti_s11, true, a_farm, a_field);
842  break;
843  }
844  }
845  }
846  done = true;
847  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
848  // END of MAIN THREAD
849  break;
850  default:
851  g_msg->Warn(WARN_BUG, "PLSpringWheat::Do(): "
852  "Unknown event type! ", "");
853  exit(1);
854  }
855  return done;
856 }

References Landscape::BackTranslateVegTypes(), cfg_pest_product_1_amount, cfg_pest_springwheat_on, Farm::DoIt(), Farm::FP_Slurry(), g_landscape_p, Farm::GetType(), Farm::IsStockFarmer(), Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, FarmEvent::m_startday, FarmEvent::m_todo, pl_sw_autumn_harrow1, pl_sw_autumn_harrow2, PL_SW_DECIDE_TO_GR, PL_SW_FERTI_P1, pl_sw_ferti_p1, pl_sw_ferti_p10, pl_sw_ferti_p11, pl_sw_ferti_p2, pl_sw_ferti_p3, PL_SW_FERTI_P4, pl_sw_ferti_p4, pl_sw_ferti_p5, pl_sw_ferti_p6, pl_sw_ferti_p7, pl_sw_ferti_p8, pl_sw_ferti_p9, PL_SW_FERTI_S1, pl_sw_ferti_s1, pl_sw_ferti_s10, pl_sw_ferti_s11, pl_sw_ferti_s2, pl_sw_ferti_s3, PL_SW_FERTI_S4, pl_sw_ferti_s4, pl_sw_ferti_s5, pl_sw_ferti_s6, pl_sw_ferti_s7, pl_sw_ferti_s8, pl_sw_ferti_s9, pl_sw_fungicide1, pl_sw_fungicide2, pl_sw_fungicide3, pl_sw_growth_regulator1, pl_sw_growth_regulator2, pl_sw_harvest, pl_sw_hay_bailing, pl_sw_heavy_cultivator, pl_sw_herbicide1, pl_sw_insecticide1, pl_sw_insecticide2, pl_sw_preseeding_cultivator, pl_sw_preseeding_cultivator_sow, PL_SW_SPRING_FERTI, pl_sw_spring_harrow, pl_sw_spring_sow, pl_sw_start, pl_sw_straw_chopping, pl_sw_stubble_harrow, PL_SW_STUBBLE_PLOUGH, pl_sw_stubble_plough, pl_sw_winter_plough, ppp_1, Crop::SimpleEvent_(), Landscape::SupplyShouldSpray(), and tof_OptimisingFarm.


The documentation for this class was generated from the following files:
pl_sw_preseeding_cultivator
Definition: PLSpringWheat.h:63
pl_sw_ferti_p11
Definition: PLSpringWheat.h:85
pl_sw_heavy_cultivator
Definition: PLSpringWheat.h:62
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: farm.h:905
pl_sw_ferti_p10
Definition: PLSpringWheat.h:83
FarmEvent::m_lock
bool m_lock
Definition: farm.h:465
Landscape::SupplyShouldSpray
bool SupplyShouldSpray()
Definition: Landscape.h:357
pl_sw_ferti_s1
Definition: PLSpringWheat.h:45
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
pl_sw_ferti_p8
Definition: PLSpringWheat.h:76
FarmEvent::m_first_year
bool m_first_year
Definition: farm.h:467
tof_OptimisingFarm
Definition: farm.h:273
pl_sw_growth_regulator2
Definition: PLSpringWheat.h:73
pl_sw_spring_sow
Definition: PLSpringWheat.h:65
pl_sw_straw_chopping
Definition: PLSpringWheat.h:81
pl_sw_harvest
Definition: PLSpringWheat.h:80
Landscape::BackTranslateVegTypes
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
Definition: Landscape.h:1669
pl_sw_ferti_p3
Definition: PLSpringWheat.h:52
pl_sw_hay_bailing
Definition: PLSpringWheat.h:82
Farm::GetType
TTypesOfFarm GetType(void)
Definition: farm.h:901
pl_sw_herbicide1
Definition: PLSpringWheat.h:66
pl_sw_ferti_s11
Definition: PLSpringWheat.h:86
pl_sw_ferti_p6
Definition: PLSpringWheat.h:60
pl_sw_ferti_s5
Definition: PLSpringWheat.h:59
pl_sw_ferti_s9
Definition: PLSpringWheat.h:79
pl_sw_ferti_p4
Definition: PLSpringWheat.h:55
Crop::m_first_date
int m_first_date
Definition: farm.h:540
FarmEvent::m_startday
int m_startday
Definition: farm.h:466
pl_sw_ferti_s4
Definition: PLSpringWheat.h:56
pl_sw_spring_harrow
Definition: PLSpringWheat.h:57
PL_SW_STUBBLE_PLOUGH
#define PL_SW_STUBBLE_PLOUGH
Definition: PLSpringWheat.h:30
pl_sw_winter_plough
Definition: PLSpringWheat.h:54
pl_sw_ferti_s3
Definition: PLSpringWheat.h:53
pl_sw_insecticide1
Definition: PLSpringWheat.h:70
PL_SW_DECIDE_TO_GR
#define PL_SW_DECIDE_TO_GR
Definition: PLSpringWheat.h:34
pl_sw_fungicide3
Definition: PLSpringWheat.h:69
PL_SW_FERTI_P4
#define PL_SW_FERTI_P4
Definition: PLSpringWheat.h:31
pl_sw_ferti_p5
Definition: PLSpringWheat.h:58
pl_sw_autumn_harrow2
Definition: PLSpringWheat.h:48
pl_sw_ferti_p7
Definition: PLSpringWheat.h:74
pl_sw_growth_regulator1
Definition: PLSpringWheat.h:72
pl_sw_stubble_plough
Definition: PLSpringWheat.h:46
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: farm.h:471
pl_sw_ferti_p1
Definition: PLSpringWheat.h:44
pl_sw_fungicide1
Definition: PLSpringWheat.h:67
pl_sw_preseeding_cultivator_sow
Definition: PLSpringWheat.h:64
PL_SW_FERTI_S4
#define PL_SW_FERTI_S4
Definition: PLSpringWheat.h:32
FarmEvent::m_todo
int m_todo
Definition: farm.h:469
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:701
ppp_1
Definition: farm.h:422
pl_sw_ferti_s7
Definition: PLSpringWheat.h:75
pl_sw_fungicide2
Definition: PLSpringWheat.h:68
pl_sw_ferti_s8
Definition: PLSpringWheat.h:77
pl_sw_stubble_harrow
Definition: PLSpringWheat.h:49
pl_sw_ferti_p9
Definition: PLSpringWheat.h:78
pl_sw_ferti_p2
Definition: PLSpringWheat.h:50
pl_sw_ferti_s10
Definition: PLSpringWheat.h:84
pl_sw_insecticide2
Definition: PLSpringWheat.h:71
cfg_pest_springwheat_on
CfgBool cfg_pest_springwheat_on
cfg_pest_product_1_amount
CfgFloat cfg_pest_product_1_amount
pl_sw_autumn_harrow1
Definition: PLSpringWheat.h:47
pl_sw_start
Definition: PLSpringWheat.h:42
pl_sw_ferti_s6
Definition: PLSpringWheat.h:61
PL_SW_FERTI_S1
#define PL_SW_FERTI_S1
Definition: PLSpringWheat.h:29
PL_SW_FERTI_P1
#define PL_SW_FERTI_P1
A flag used to indicate autumn ploughing status.
Definition: PLSpringWheat.h:28
pl_sw_ferti_s2
Definition: PLSpringWheat.h:51
g_landscape_p
Landscape * g_landscape_p
Definition: Landscape.cpp:258
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:312
PL_SW_SPRING_FERTI
#define PL_SW_SPRING_FERTI
Definition: PLSpringWheat.h:33