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

PLFodderLucerne1 class
. More...

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

PLFodderLucerne1 class
.

See PLFodderLucerne1.h::PLFodderLucerne1ToDo for a complete list of all possible events triggered codes by the fodder lucerne1 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

◆ PLFodderLucerne1()

PLFodderLucerne1::PLFodderLucerne1 ( )
inline
84  {
85  // When we start it off, the first possible date for a farm operation is 31th October
86  // This information is used by other crops when they decide how much post processing of
87  // the management is allowed after harvest before the next crop starts.
88  m_first_date=g_date->DayInYear( 31,10 );
89  }

References Crop::m_first_date.

Member Function Documentation

◆ Do()

bool PLFodderLucerne1::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 fodder lucerne in the first year.

Reimplemented from Crop.

57 {
58  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
59  int d1 = 0;
60  // Depending what event has occured jump to the correct bit of code
61  switch (a_ev->m_todo)
62  {
63  case pl_fl1_start:
64  {
65  // pl_fl1_start just sets up all the starting conditions and reference dates that are needed to start a pl_sw
66  PL_FL1_FERTI_P1 = false;
67  PL_FL1_FERTI_S1 = false;
68  PL_FL1_STUBBLE_PLOUGH = false;
69  PL_FL1_WINTER_PLOUGH = false;
71  PL_FL1_HERBICIDE1 = false;
73 
74  // Set up the date management stuff
75 
76  // Check the next crop for early start, unless it is a spring crop
77  // in which case we ASSUME that no checking is necessary!!!!
78  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
79 
80  //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)
81  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
82  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
83 
84  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
85  if (g_date->DayInYear(10, 8) >= a_ev->m_startday)
86  {
87  g_msg->Warn(WARN_BUG, "PLFodderLucerne1::Do(): ", "Harvest too late for the next crop to start!!!");
88  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
89  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
90  }
91  }
92  // Now no operations can be timed after the start of the next crop.
93 
94  if (!a_ev->m_first_year) {
95  // Are we before July 1st?
96  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
97  if (g_date->Date() < d1) {
98  // Yes, too early. We assumme this is because the last crop was late
99  printf("Poly: %d\n", a_field->GetPoly());
100  g_msg->Warn(WARN_BUG, "PLFodderLucerne1::Do(): ", "Crop start attempt between 1st Jan & 1st July");
101  int prev = g_landscape_p->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousCrop(a_field->GetRotIndex()));
102  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
103  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
104  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
105  }
106  else {
107  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
108  if (g_date->Date() > d1) {
109  // Yes too late - should not happen - raise an error
110  g_msg->Warn(WARN_BUG, "PLFodderLucerne1::Do(): ", "Crop start attempt after last possible start date");
111  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
112  a_field->GetOwner()->GetPreviousCrop(a_field->GetRotIndex());
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  }
117  }
118  else {
119  //Is the first year
120  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
121  // Code for first spring treatment used
122  d1 = g_date->OldDays() + g_date->DayInYear(1, 3);
123  if (g_date->Date() >= d1) d1 += 365;
124  SimpleEvent_(d1, pl_fl1_spring_harrow, false, a_farm, a_field);
125  break;
126  }
127  }//if
128 
129  // End single block date checking code. Please see next line comment as well.
130  // Reinit d1 to first possible starting date.
131 
132  d1 = g_date->OldDays() + g_date->DayInYear(20, 7);
133  SimpleEvent_(d1, pl_fl1_herbicide0, false, a_farm, a_field);
134 
135 
136  }
137  break;
138 
139  // This is the first real farm operation
140  case pl_fl1_herbicide0:
141  if (a_ev->m_lock || a_farm->DoIt(28))
142  {
143  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
144  SimpleEvent_(g_date->Date() + 1, pl_fl1_herbicide0, true, a_farm, a_field);
145  break;
146  }
147  }
148  if (a_farm->IsStockFarmer()) //Stock Farmer
149  {
150  SimpleEvent_(g_date->Date() + 14, pl_fl1_ferti_s1, false, a_farm, a_field);
151  }
152  else SimpleEvent_(g_date->Date() + 14, pl_fl1_ferti_p1, false, a_farm, a_field);
153  break;
154  case pl_fl1_ferti_p1:
155  // In total 64% of arable farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
156  // We therefore assume that half of them (32%) do it now
157  if (a_ev->m_lock || a_farm->DoIt(32))
158  {
159  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
160  // If we don't suceed on the first try, then try and try again (until 20/8 when we will suceed)
161  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_p1, true, a_farm, a_field);
162  break;
163  }
164  else
165  {
166  //Rest of farmers do slurry before autumn plough/stubble cultivation so we need to remeber who already did it
167  PL_FL1_FERTI_P1 = true;
168  }
169  }
170  // Queue up the next event -in this case stubble ploughing
171  SimpleEvent_(g_date->Date() + 1, pl_fl1_stubble_plough, false, a_farm, a_field);
172  break;
173  case pl_fl1_ferti_s1:
174  // In total 64% of stock farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
175  // We therefore assume that half of them (32%) do it now
176  if (a_ev->m_lock || a_farm->DoIt(32))
177  {
178  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
179  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_s1, true, a_farm, a_field);
180  break;
181  }
182  else
183  {
184  //Rest of farmers do slurry before autumn plough/stubble cultivation so we need to remeber who already did it
185  PL_FL1_FERTI_S1 = true;
186  }
187  }
188  // Queue up the next event -in this case stubble ploughing
189  SimpleEvent_(g_date->Date() + 1, pl_fl1_stubble_plough, false, a_farm, a_field);
190  break;
192  // 60% will do stubble plough, but rest will get away with non-inversion cultivation
193  if (a_ev->m_lock || a_farm->DoIt(60))
194  {
195  if (!a_farm->StubblePlough(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
196  SimpleEvent_(g_date->Date() + 1, pl_fl1_stubble_plough, true, a_farm, a_field);
197  break;
198  }
199  else
200  {
201  // 60% of farmers will do this, but the other 40% won't so we need to remember whether we are in one or the other group
202  PL_FL1_STUBBLE_PLOUGH = true;
203  // Queue up the next event
204  SimpleEvent_(g_date->Date() + 1, pl_fl1_autumn_harrow1, false, a_farm, a_field);
205  break;
206  }
207  }
208  SimpleEvent_(g_date->Date() + 1, pl_fl1_stubble_harrow, false, a_farm, a_field);
209  break;
211  if (!a_farm->AutumnHarrow(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
212  SimpleEvent_(g_date->Date() + 1, pl_fl1_autumn_harrow1, true, a_farm, a_field);
213  break;
214  }
215  SimpleEvent_(g_date->Date() + 2, pl_fl1_autumn_harrow2, false, a_farm, a_field);
216  break;
218  if (a_ev->m_lock || a_farm->DoIt(40))
219  {
220  if (!a_farm->AutumnHarrow(a_field, 0.0, g_date->Date() + 7 - g_date->DayInYear())) {
221  SimpleEvent_(g_date->Date() + 1, pl_fl1_autumn_harrow2, true, a_farm, a_field);
222  break;
223  }
224  }
225  d1 = g_date->Date() + 1;
226  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 9)) {
227  d1 = g_date->OldDays() + g_date->DayInYear(10, 9);
228  }
229  if (a_farm->IsStockFarmer()) //Stock Farmer
230  {
231  SimpleEvent_(d1, pl_fl1_ferti_s2, false, a_farm, a_field);
232  }
233  else SimpleEvent_(d1, pl_fl1_ferti_p2, false, a_farm, a_field);
234  break;
236  if (!a_farm->StubbleHarrowing(a_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
237  SimpleEvent_(g_date->Date() + 1, pl_fl1_stubble_harrow, true, a_farm, a_field);
238  break;
239  }
240  d1 = g_date->Date() + 1;
241  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 9)) {
242  d1 = g_date->OldDays() + g_date->DayInYear(10, 9);
243  }
244  if (a_farm->IsStockFarmer()) //Stock Farmer
245  {
246  SimpleEvent_(d1, pl_fl1_ferti_s2, false, a_farm, a_field);
247  }
248  else SimpleEvent_(d1, pl_fl1_ferti_p2, false, a_farm, a_field);
249  break;
250  case pl_fl1_ferti_p2:
251  // In total 64% of arable farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
252  // We therefore assume that half of them (32%) do it now (if haven't done before)
253  if ((a_ev->m_lock || a_farm->DoIt(static_cast<int>((32.0/68.0)*100)))&&(PL_FL1_FERTI_P1==false))
254  {
255  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
256  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_p2, true, a_farm, a_field);
257  break;
258  }
259  }
260  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_p3, false, a_farm, a_field);
261  break;
262  case pl_fl1_ferti_s2:
263  // In total 64% of stock farmers do slurry in the autumn, either before stubble plough/harrow or later before autumn plough/cultivation
264  // We therefore assume that half of them (32%) do it now (if haven't done before)
265  if ((a_ev->m_lock || a_farm->DoIt(static_cast<int>((32.0/68.0)*100))) && (PL_FL1_FERTI_S1==false))
266  {
267  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
268  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_s2, true, a_farm, a_field);
269  break;
270  }
271  }
272  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_s3, false, a_farm, a_field);
273  break;
274  case pl_fl1_ferti_p3:
275  if (a_ev->m_lock || a_farm->DoIt(41))
276  {
277  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
278  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_p3, true, a_farm, a_field);
279  break;
280  }
281  }
282  SimpleEvent_(g_date->Date() + 1, pl_fl1_winter_plough, false, a_farm, a_field);
283  break;
284  case pl_fl1_ferti_s3:
285  if (a_ev->m_lock || a_farm->DoIt(41))
286  {
287  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
288  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_s3, true, a_farm, a_field);
289  break;
290  }
291  }
292  SimpleEvent_(g_date->Date() + 1, pl_fl1_winter_plough, false, a_farm, a_field);
293  break;
295  // 88% will do winter plough, but rest will get away with non-inversion cultivation
296  if (a_ev->m_lock || a_farm->DoIt(88))
297  {
298  if (!a_farm->WinterPlough(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
299  SimpleEvent_(g_date->Date() + 1, pl_fl1_winter_plough, true, a_farm, a_field);
300  break;
301  }
302  else
303  {
304  // 88% of farmers will do this, but the other 12% won't so we need to remember whether we are in one or the other group
305  PL_FL1_WINTER_PLOUGH = true;
306  // Queue up the next event
307  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, pl_fl1_spring_harrow, false, a_farm, a_field);
308  break;
309  }
310  }
311  SimpleEvent_(g_date->Date() + 1, pl_fl1_winter_stubble_cultivator_heavy, false, a_farm, a_field);
312  break;
314  // the rest 12% who did not plough do heavy stubble cultivation
315  if (!a_farm->StubbleCultivatorHeavy(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
316  SimpleEvent_(g_date->Date() + 1, pl_fl1_winter_stubble_cultivator_heavy, true, a_farm, a_field);
317  break;
318  }
319  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, pl_fl1_spring_harrow, false, a_farm, a_field);
320  break;
322  if ((a_ev->m_lock) || a_farm->DoIt(90))
323  {
324  if (!a_farm->SpringHarrow(a_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
325  SimpleEvent_(g_date->Date() + 1, pl_fl1_spring_harrow, true, a_farm, a_field);
326  break;
327  }
328  }
329  d1 = g_date->Date() + 1;
330  if (d1 < g_date->OldDays() + g_date->DayInYear(5, 3)) {
331  d1 = g_date->OldDays() + g_date->DayInYear(5, 3);
332  }
333  if (a_farm->IsStockFarmer()) //Stock Farmer
334  {
335  SimpleEvent_(d1, pl_fl1_ferti_s4, false, a_farm, a_field);
336  }
337  else SimpleEvent_(d1, pl_fl1_ferti_p4, false, a_farm, a_field);
338  break;
339  case pl_fl1_ferti_p4:
340  if (a_ev->m_lock || a_farm->DoIt(78))
341  {
342  if (!a_farm->FP_PK(a_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
343  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_p4, true, a_farm, a_field);
344  break;
345  }
346  PL_FL1_SPRING_FERTI = true;
347  }
348  SimpleEvent_(g_date->Date() + 1, pl_fl1_heavy_cultivator, false, a_farm, a_field);
349  break;
350  case pl_fl1_ferti_s4:
351  if (a_ev->m_lock || a_farm->DoIt(78))
352  {
353  if (!a_farm->FA_PK(a_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
354  SimpleEvent_(g_date->Date() + 1, pl_fl1_ferti_s4, true, a_farm, a_field);
355  break;
356  }
358  }
359  SimpleEvent_(g_date->Date() + 1, pl_fl1_heavy_cultivator, false, a_farm, a_field);
360  break;
362  if (PL_FL1_SPRING_FERTI == 1)
363  {
364  if (!a_farm->HeavyCultivatorAggregate(a_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
365  SimpleEvent_(g_date->Date() + 1, pl_fl1_heavy_cultivator, true, a_farm, a_field);
366  break;
367  }
368  }
369  d1 = g_date->Date() + 3;
370  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 4)) {
371  d1 = g_date->OldDays() + g_date->DayInYear(1, 4);
372  }
373  SimpleEvent_(d1, pl_fl1_herbicide1, false, a_farm, a_field);
374  break;
375  case pl_fl1_herbicide1:
376  // Together 30% of farmers will do glyphosate spraying, but 15% before sow and the rest before emergence
377  if (a_ev->m_lock || a_farm->DoIt(15))
378  {
379  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
380  SimpleEvent_(g_date->Date() + 1, pl_fl1_herbicide1, true, a_farm, a_field);
381  break;
382  }
383  PL_FL1_HERBICIDE1 = true;
384  }
385  // Queue up the next event
386  d1 = g_date->Date() + 3;
387  if (d1 < g_date->OldDays() + g_date->DayInYear(20, 4)) {
388  d1 = g_date->OldDays() + g_date->DayInYear(20, 4);
389  }
390  SimpleEvent_(d1, pl_fl1_preseeding_cultivator, false, a_farm, a_field);
391  break;
393  if (a_ev->m_lock || a_farm->DoIt(98))
394  {
395  if (!a_farm->PreseedingCultivator(a_field, 0.0, g_date->DayInYear(4, 5) - g_date->DayInYear())) {
396  SimpleEvent_(g_date->Date() + 1, pl_fl1_preseeding_cultivator, true, a_farm, a_field);
397  break;
398  }
399  }
400  SimpleEvent_(g_date->Date() + 1, pl_fl1_spring_sow, false, a_farm, a_field);
401  break;
402  case pl_fl1_spring_sow:
403  if (!a_farm->SpringSow(a_field, 0.0, g_date->DayInYear(5, 5) - g_date->DayInYear())) {
404  SimpleEvent_(g_date->Date() + 1, pl_fl1_spring_sow, true, a_farm, a_field);
405  break;
406  }
407  // Here is a fork leading to four parallel events
408  SimpleEvent_(g_date->Date() + 3, pl_fl1_herbicide2, false, a_farm, a_field); // Herbidide thread
409  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(20, 5), pl_fl1_cut_to_silage1, false, a_farm, a_field); // Cutting thread
410  break;
411  case pl_fl1_herbicide2:
412  // Here comes the herbicide thread
413  // Check biomass
414  if (a_field->GetGreenBiomass() <= 0)
415  {
416  // The rest 15% of farmers do glyphosate spraying before emergence
417  if ((a_ev->m_lock || (a_farm->DoIt(static_cast<int>((15.0 / 85.0) * 100))) && (PL_FL1_HERBICIDE1 == false)))
418  {
419  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
420  SimpleEvent_(g_date->Date() + 1, pl_fl1_herbicide2, true, a_farm, a_field);
421  break;
422  }
423  }
424  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 5), pl_fl1_herbicide3, false, a_farm, a_field);
425  break;
426  }
427  else {
428  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 5), pl_fl1_herbicide3, false, a_farm, a_field);
429  }
430  break;
431  case pl_fl1_herbicide3:
432  if (a_ev->m_lock || a_farm->DoIt(49))
433  {
434  if (a_field->GetGreenBiomass() <= 0) {
435  SimpleEvent_(g_date->Date() + 1, pl_fl1_herbicide3, true, a_farm, a_field);
436  }
437  else
438  {
439  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(15, 7) - g_date->DayInYear())) {
440  SimpleEvent_(g_date->Date() + 1, pl_fl1_herbicide3, true, a_farm, a_field);
441  break;
442  }
443  PL_FL1_HERBI_DATE = g_date->Date();
444  }
445  }
446  // End of thread
447  break;
449  // Here comes cutting thread
450  if (PL_FL1_HERBI_DATE >= g_date->Date() - 2) { // Should by at least 3 days after herbicide
451  SimpleEvent_(g_date->Date() + 1, pl_fl1_cut_to_silage1, false, a_farm, a_field);
452  }
453  else
454  {
455  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
456  SimpleEvent_(g_date->Date() + 1, pl_fl1_cut_to_silage1, true, a_farm, a_field);
457  break;
458  }
459  }
460  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(20, 7), pl_fl1_cut_to_silage2, false, a_farm, a_field);
461  break;
463  if (PL_FL1_HERBI_DATE >= g_date->Date() - 2) { // Should by at least 3 days after herbicide
464  SimpleEvent_(g_date->Date() + 1, pl_fl1_cut_to_silage2, false, a_farm, a_field);
465  }
466  else
467  {
468  if (a_ev->m_lock || a_farm->DoIt(73))
469  {
470  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(10, 8) - g_date->DayInYear())) {
471  SimpleEvent_(g_date->Date() + 1, pl_fl1_cut_to_silage2, true, a_farm, a_field);
472  break;
473  }
474  }
475  }
476  done = true;
477  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
478  // END of MAIN THREAD
479  break;
480  default:
481  g_msg->Warn(WARN_BUG, "PLFodderLucerne1::Do(): "
482  "Unknown event type! ", "");
483  exit(1);
484  }
485  return done;
486 }

References Landscape::BackTranslateVegTypes(), Farm::DoIt(), g_landscape_p, Farm::GetType(), Farm::HerbicideTreat(), Farm::IsStockFarmer(), Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, FarmEvent::m_startday, FarmEvent::m_todo, pl_fl1_autumn_harrow1, pl_fl1_autumn_harrow2, pl_fl1_cut_to_silage1, pl_fl1_cut_to_silage2, PL_FL1_FERTI_P1, pl_fl1_ferti_p1, pl_fl1_ferti_p2, pl_fl1_ferti_p3, pl_fl1_ferti_p4, PL_FL1_FERTI_S1, pl_fl1_ferti_s1, pl_fl1_ferti_s2, pl_fl1_ferti_s3, pl_fl1_ferti_s4, pl_fl1_heavy_cultivator, PL_FL1_HERBI_DATE, pl_fl1_herbicide0, PL_FL1_HERBICIDE1, pl_fl1_herbicide1, pl_fl1_herbicide2, pl_fl1_herbicide3, pl_fl1_preseeding_cultivator, PL_FL1_SPRING_FERTI, pl_fl1_spring_harrow, pl_fl1_spring_sow, pl_fl1_start, pl_fl1_stubble_harrow, PL_FL1_STUBBLE_PLOUGH, pl_fl1_stubble_plough, PL_FL1_WINTER_PLOUGH, pl_fl1_winter_plough, pl_fl1_winter_stubble_cultivator_heavy, Crop::SimpleEvent_(), and tof_OptimisingFarm.


The documentation for this class was generated from the following files:
pl_fl1_herbicide3
Definition: PLFodderLucerne1.h:65
pl_fl1_winter_plough
Definition: PLFodderLucerne1.h:55
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: farmfuncs.cpp:1156
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: farm.h:905
pl_fl1_autumn_harrow1
Definition: PLFodderLucerne1.h:48
FarmEvent::m_lock
bool m_lock
Definition: farm.h:465
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
pl_fl1_autumn_harrow2
Definition: PLFodderLucerne1.h:49
FarmEvent::m_first_year
bool m_first_year
Definition: farm.h:467
pl_fl1_spring_harrow
Definition: PLFodderLucerne1.h:57
tof_OptimisingFarm
Definition: farm.h:273
PL_FL1_FERTI_S1
#define PL_FL1_FERTI_S1
Definition: PLFodderLucerne1.h:29
pl_fl1_herbicide1
Definition: PLFodderLucerne1.h:61
pl_fl1_ferti_s1
Definition: PLFodderLucerne1.h:46
Landscape::BackTranslateVegTypes
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
Definition: Landscape.h:1669
pl_fl1_ferti_s2
Definition: PLFodderLucerne1.h:52
Farm::GetType
TTypesOfFarm GetType(void)
Definition: farm.h:901
pl_fl1_herbicide0
Definition: PLFodderLucerne1.h:44
Crop::m_first_date
int m_first_date
Definition: farm.h:540
FarmEvent::m_startday
int m_startday
Definition: farm.h:466
pl_fl1_stubble_harrow
Definition: PLFodderLucerne1.h:50
PL_FL1_STUBBLE_PLOUGH
#define PL_FL1_STUBBLE_PLOUGH
Definition: PLFodderLucerne1.h:30
pl_fl1_start
Definition: PLFodderLucerne1.h:42
pl_fl1_preseeding_cultivator
Definition: PLFodderLucerne1.h:62
pl_fl1_cut_to_silage1
Definition: PLFodderLucerne1.h:66
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: farm.h:471
PL_FL1_WINTER_PLOUGH
#define PL_FL1_WINTER_PLOUGH
Definition: PLFodderLucerne1.h:31
pl_fl1_heavy_cultivator
Definition: PLFodderLucerne1.h:60
pl_fl1_ferti_s3
Definition: PLFodderLucerne1.h:54
FarmEvent::m_todo
int m_todo
Definition: farm.h:469
pl_fl1_ferti_p1
Definition: PLFodderLucerne1.h:45
pl_fl1_stubble_plough
Definition: PLFodderLucerne1.h:47
pl_fl1_cut_to_silage2
Definition: PLFodderLucerne1.h:67
PL_FL1_HERBICIDE1
#define PL_FL1_HERBICIDE1
Definition: PLFodderLucerne1.h:33
PL_FL1_SPRING_FERTI
#define PL_FL1_SPRING_FERTI
Definition: PLFodderLucerne1.h:32
pl_fl1_ferti_p3
Definition: PLFodderLucerne1.h:53
pl_fl1_ferti_p4
Definition: PLFodderLucerne1.h:58
PL_FL1_HERBI_DATE
#define PL_FL1_HERBI_DATE
Definition: PLFodderLucerne1.h:34
PL_FL1_FERTI_P1
#define PL_FL1_FERTI_P1
A flag used to indicate autumn ploughing status.
Definition: PLFodderLucerne1.h:28
pl_fl1_ferti_s4
Definition: PLFodderLucerne1.h:59
pl_fl1_ferti_p2
Definition: PLFodderLucerne1.h:51
pl_fl1_spring_sow
Definition: PLFodderLucerne1.h:63
g_landscape_p
Landscape * g_landscape_p
Definition: Landscape.cpp:258
pl_fl1_winter_stubble_cultivator_heavy
Definition: PLFodderLucerne1.h:56
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_fl1_herbicide2
Definition: PLFodderLucerne1.h:64