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

PLWinterTriticale class
. More...

#include <PLWinterTriticale.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...
 
 PLWinterTriticale ()
 
- 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

PLWinterTriticale class
.

See PLWinterTriticale.h::PLWinterTriticaleToDo for a complete list of all possible events triggered codes by the winter triticale 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

◆ PLWinterTriticale()

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

References Crop::m_first_date.

Member Function Documentation

◆ Do()

bool PLWinterTriticale::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 winter triticale.

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

References Landscape::BackTranslateVegTypes(), cfg_pest_product_1_amount, cfg_pest_wintertriticale_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_wt_autumn_harrow1, pl_wt_autumn_harrow2, pl_wt_autumn_plough, pl_wt_autumn_roll, pl_wt_autumn_sow, PL_WT_FERTI_P1, pl_wt_ferti_p1, pl_wt_ferti_p10, pl_wt_ferti_p11, pl_wt_ferti_p2, pl_wt_ferti_p3, pl_wt_ferti_p4, pl_wt_ferti_p5, pl_wt_ferti_p6, pl_wt_ferti_p7, pl_wt_ferti_p8, pl_wt_ferti_p9, PL_WT_FERTI_S1, pl_wt_ferti_s1, pl_wt_ferti_s10, pl_wt_ferti_s11, pl_wt_ferti_s2, pl_wt_ferti_s3, pl_wt_ferti_s4, pl_wt_ferti_s5, pl_wt_ferti_s6, pl_wt_ferti_s7, pl_wt_ferti_s8, pl_wt_ferti_s9, pl_wt_fungicide1, pl_wt_fungicide2, pl_wt_fungicide3, pl_wt_fungicide4, pl_wt_growth_regulator1, pl_wt_harvest, pl_wt_hay_bailing, pl_wt_herbicide1, pl_wt_herbicide2, pl_wt_insecticide1, pl_wt_insecticide2, pl_wt_insecticide3, pl_wt_preseeding_cultivator, pl_wt_preseeding_cultivator_sow, pl_wt_start, pl_wt_straw_chopping, pl_wt_stubble_cultivator_heavy, pl_wt_stubble_harrow, PL_WT_STUBBLE_PLOUGH, pl_wt_stubble_plough, ppp_1, Crop::SimpleEvent_(), Landscape::SupplyShouldSpray(), and tof_OptimisingFarm.


The documentation for this class was generated from the following files:
pl_wt_ferti_p3
Definition: PLWinterTriticale.h:51
pl_wt_ferti_s9
Definition: PLWinterTriticale.h:70
pl_wt_herbicide1
Definition: PLWinterTriticale.h:56
pl_wt_growth_regulator1
Definition: PLWinterTriticale.h:77
pl_wt_ferti_s3
Definition: PLWinterTriticale.h:52
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: farm.h:905
pl_wt_ferti_s4
Definition: PLWinterTriticale.h:60
PL_WT_FERTI_P1
#define PL_WT_FERTI_P1
A flag used to indicate autumn ploughing status.
Definition: PLWinterTriticale.h:28
FarmEvent::m_lock
bool m_lock
Definition: farm.h:465
pl_wt_ferti_p8
Definition: PLWinterTriticale.h:67
Landscape::SupplyShouldSpray
bool SupplyShouldSpray()
Definition: Landscape.h:357
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
pl_wt_herbicide2
Definition: PLWinterTriticale.h:71
pl_wt_autumn_plough
Definition: PLWinterTriticale.h:48
FarmEvent::m_first_year
bool m_first_year
Definition: farm.h:467
tof_OptimisingFarm
Definition: farm.h:273
pl_wt_ferti_p5
Definition: PLWinterTriticale.h:61
Landscape::BackTranslateVegTypes
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
Definition: Landscape.h:1669
Farm::GetType
TTypesOfFarm GetType(void)
Definition: farm.h:901
pl_wt_fungicide4
Definition: PLWinterTriticale.h:74
pl_wt_ferti_s7
Definition: PLWinterTriticale.h:66
Crop::m_first_date
int m_first_date
Definition: farm.h:540
FarmEvent::m_startday
int m_startday
Definition: farm.h:466
cfg_pest_product_1_amount
CfgFloat cfg_pest_product_1_amount
pl_wt_insecticide1
Definition: PLWinterTriticale.h:58
cfg_pest_wintertriticale_on
CfgBool cfg_pest_wintertriticale_on
pl_wt_insecticide3
Definition: PLWinterTriticale.h:76
pl_wt_ferti_p6
Definition: PLWinterTriticale.h:63
pl_wt_ferti_s11
Definition: PLWinterTriticale.h:84
pl_wt_ferti_p11
Definition: PLWinterTriticale.h:83
pl_wt_straw_chopping
Definition: PLWinterTriticale.h:79
pl_wt_autumn_harrow1
Definition: PLWinterTriticale.h:43
pl_wt_autumn_roll
Definition: PLWinterTriticale.h:49
pl_wt_preseeding_cultivator
Definition: PLWinterTriticale.h:53
pl_wt_ferti_s2
Definition: PLWinterTriticale.h:47
pl_wt_ferti_s10
Definition: PLWinterTriticale.h:82
pl_wt_ferti_p4
Definition: PLWinterTriticale.h:59
PL_WT_FERTI_S1
#define PL_WT_FERTI_S1
Definition: PLWinterTriticale.h:29
pl_wt_ferti_p2
Definition: PLWinterTriticale.h:46
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: farm.h:471
pl_wt_ferti_p9
Definition: PLWinterTriticale.h:69
pl_wt_ferti_p10
Definition: PLWinterTriticale.h:81
pl_wt_fungicide1
Definition: PLWinterTriticale.h:57
FarmEvent::m_todo
int m_todo
Definition: farm.h:469
pl_wt_ferti_s1
Definition: PLWinterTriticale.h:41
pl_wt_autumn_harrow2
Definition: PLWinterTriticale.h:44
pl_wt_ferti_p1
Definition: PLWinterTriticale.h:40
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_wt_ferti_p7
Definition: PLWinterTriticale.h:65
pl_wt_harvest
Definition: PLWinterTriticale.h:78
pl_wt_ferti_s6
Definition: PLWinterTriticale.h:64
pl_wt_hay_bailing
Definition: PLWinterTriticale.h:80
pl_wt_stubble_cultivator_heavy
Definition: PLWinterTriticale.h:50
pl_wt_ferti_s5
Definition: PLWinterTriticale.h:62
pl_wt_preseeding_cultivator_sow
Definition: PLWinterTriticale.h:54
pl_wt_stubble_harrow
Definition: PLWinterTriticale.h:45
pl_wt_ferti_s8
Definition: PLWinterTriticale.h:68
pl_wt_fungicide3
Definition: PLWinterTriticale.h:73
pl_wt_start
Definition: PLWinterTriticale.h:38
pl_wt_insecticide2
Definition: PLWinterTriticale.h:75
pl_wt_fungicide2
Definition: PLWinterTriticale.h:72
pl_wt_stubble_plough
Definition: PLWinterTriticale.h:42
g_landscape_p
Landscape * g_landscape_p
Definition: Landscape.cpp:258
pl_wt_autumn_sow
Definition: PLWinterTriticale.h:55
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_WT_STUBBLE_PLOUGH
#define PL_WT_STUBBLE_PLOUGH
Definition: PLWinterTriticale.h:30