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

PLCarrots class
. More...

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

PLCarrots class
.

See PLCarrots.h::PLCarrotsToDo for a complete list of all possible events triggered codes by the carrots 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

◆ PLCarrots()

PLCarrots::PLCarrots ( )
inline
80  {
81  // When we start it off, the first possible date for a farm operation is 20th October
82  // This information is used by other crops when they decide how much post processing of
83  // the management is allowed after harvest before the next crop starts.
84  m_first_date=g_date->DayInYear( 5,11 );
85  }

References Crop::m_first_date.

Member Function Documentation

◆ Do()

bool PLCarrots::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 carrots.

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_ca_start:
72  {
73  // pl_ca_start just sets up all the starting conditions and reference dates that are needed to start a pl_sw
74  PL_CA_STUBBLE_PLOUGH = false;
75  PL_CA_WEEDING = false;
76  PL_CA_HERBI = 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 = 2;
84  a_field->SetMDates(0, 0, g_date->DayInYear(30, 10)); // last possible day of harvest
85  a_field->SetMDates(1, 0, g_date->DayInYear(30, 10));
86  a_field->SetMDates(0, 1, 0); // start day of calcium application
87  a_field->SetMDates(1, 1, g_date->DayInYear(30, 10)); // end day of calcium application
88  // Can be up to 10 of these. If the shortening code is triggered
89  // then these will be reduced in value to 0
90 
91  a_field->SetMConstants(0, 1);
92 
93  // Check the next crop for early start, unless it is a spring crop
94  // in which case we ASSUME that no checking is necessary!!!!
95  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
96 
97  //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)
98  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
99  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
100 
101  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
102  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
103  {
104  g_msg->Warn(WARN_BUG, "PLCarrots::Do(): ", "Harvest too late for the next crop to start!!!");
105  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
106  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
107  }
108  // Now fix any late finishing problems
109  for (int i = 0; i < noDates; i++) {
110  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
111  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
112  }
113  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
114  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)
115  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
116  }
117  }
118  }
119  // Now no operations can be timed after the start of the next crop.
120 
121  if (!a_ev->m_first_year) {
122  // Are we before July 1st?
123  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
124  if (g_date->Date() < d1) {
125  // Yes, too early. We assumme this is because the last crop was late
126  printf("Poly: %d\n", a_field->GetPoly());
127  g_msg->Warn(WARN_BUG, "PLCarrots::Do(): ", "Crop start attempt between 1st Jan & 1st July");
128  int prev = g_landscape_p->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousCrop(a_field->GetRotIndex()));
129  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
130  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
131  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
132  }
133  else {
134  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
135  if (g_date->Date() > d1) {
136  // Yes too late - should not happen - raise an error
137  g_msg->Warn(WARN_BUG, "PLCarrots::Do(): ", "Crop start attempt after last possible start date");
138  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
139  a_field->GetOwner()->GetPreviousCrop(a_field->GetRotIndex());
140  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
141  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
142  }
143  }
144  }
145  else {
146  // Is the first year
147  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
148  // Code for first spring treatment used
149  if (a_farm->IsStockFarmer()) //Stock Farmer
150  {
151  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(10, 3), pl_ca_ferti_s2, false, a_farm, a_field);
152  }
153  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(10, 3), pl_ca_ferti_p2, false, a_farm, a_field);
154  break;
155  }
156  }//if
157 
158  // End single block date checking code. Please see next line comment as well.
159  // Reinit d1 to first possible starting date.
160  d1 = g_date->OldDays() + g_date->DayInYear(20, 7);
161  // OK, let's go.
162  // Here we queue up the first event
163  SimpleEvent_(d1, pl_ca_stubble_plough, false, a_farm, a_field);
164  }
165  break;
166 
167  // This is the first real farm operation
169  // 20% will do stubble plough, but rest will get away with non-inversion cultivation
170  if (a_ev->m_lock || a_farm->DoIt(50))
171  {
172  if (!a_farm->StubblePlough(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
173  SimpleEvent_(g_date->Date() + 1, pl_ca_stubble_plough, true, a_farm, a_field);
174  break;
175  }
176  else
177  {
178  // 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
179  PL_CA_STUBBLE_PLOUGH = true;
180  // Queue up the next event
181  SimpleEvent_(g_date->Date() + 1, pl_ca_autumn_harrow1, false, a_farm, a_field);
182  break;
183  }
184  }
185  SimpleEvent_(g_date->Date() + 1, pl_ca_stubble_harrow, false, a_farm, a_field);
186  break;
188  if (!a_farm->AutumnHarrow(a_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
189  SimpleEvent_(g_date->Date() + 1, pl_ca_autumn_harrow1, true, a_farm, a_field);
190  break;
191  }
192  SimpleEvent_(g_date->Date() + 2, pl_ca_autumn_harrow2, false, a_farm, a_field);
193  break;
195  if (a_ev->m_lock || a_farm->DoIt(40))
196  {
197  if (!a_farm->AutumnHarrow(a_field, 0.0, g_date->Date() + 7 - g_date->DayInYear())) {
198  SimpleEvent_(g_date->Date() + 1, pl_ca_autumn_harrow2, true, a_farm, a_field);
199  break;
200  }
201  }
202  d1 = g_date->Date() + 1;
203  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 9)) {
204  d1 = g_date->OldDays() + g_date->DayInYear(10, 9);
205  }
206  if (a_farm->IsStockFarmer()) //Stock Farmer
207  {
208  SimpleEvent_(d1, pl_ca_ferti_s1, false, a_farm, a_field);
209  }
210  else SimpleEvent_(d1, pl_ca_ferti_p1, false, a_farm, a_field);
211  break;
213  if (!a_farm->StubbleHarrowing(a_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
214  SimpleEvent_(g_date->Date() + 1, pl_ca_stubble_harrow, true, a_farm, a_field);
215  break;
216  }
217  d1 = g_date->Date() + 1;
218  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 9)) {
219  d1 = g_date->OldDays() + g_date->DayInYear(10, 9);
220  }
221  if (a_farm->IsStockFarmer()) //Stock Farmer
222  {
223  SimpleEvent_(d1, pl_ca_ferti_s1, false, a_farm, a_field);
224  }
225  else SimpleEvent_(d1, pl_ca_ferti_p1, false, a_farm, a_field);
226  break;
227  case pl_ca_ferti_p1:
228  if (a_ev->m_lock || a_farm->DoIt(80))
229  {
230  if (!a_farm->FP_PK(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
231  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_p1, true, a_farm, a_field);
232  break;
233  }
234  }
235  SimpleEvent_(g_date->Date() + 1, pl_ca_winter_plough, false, a_farm, a_field);
236  break;
237  case pl_ca_ferti_s1:
238  if (a_ev->m_lock || a_farm->DoIt(80))
239  {
240  if (!a_farm->FA_PK(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
241  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_s1, true, a_farm, a_field);
242  break;
243  }
244  }
245  SimpleEvent_(g_date->Date() + 1, pl_ca_winter_plough, false, a_farm, a_field);
246  break;
247  case pl_ca_winter_plough:
248  if (!a_farm->WinterPlough(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
249  SimpleEvent_(g_date->Date() + 1, pl_ca_winter_plough, true, a_farm, a_field);
250  break;
251  }
252  if (a_farm->IsStockFarmer()) //Stock Farmer
253  {
254  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(10, 3) + 365, pl_ca_ferti_s2, false, a_farm, a_field);
255  }
256  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(10, 3) + 365, pl_ca_ferti_p2, false, a_farm, a_field);
257  break;
258  case pl_ca_ferti_p2:
259  if (a_ev->m_lock || a_farm->DoIt(90))
260  {
261  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
262  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_p2, true, a_farm, a_field);
263  break;
264  }
265  }
266  SimpleEvent_(g_date->Date() + 1, pl_ca_spring_harrow, false, a_farm, a_field);
267  break;
268  case pl_ca_ferti_s2:
269  if (a_ev->m_lock || a_farm->DoIt(90))
270  {
271  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
272  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_s2, true, a_farm, a_field);
273  break;
274  }
275  }
276  SimpleEvent_(g_date->Date() + 1, pl_ca_spring_harrow, false, a_farm, a_field);
277  break;
278  case pl_ca_spring_harrow:
279  if (!a_farm->SpringHarrow(a_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
280  SimpleEvent_(g_date->Date() + 1, pl_ca_spring_harrow, true, a_farm, a_field);
281  break;
282  }
283  d1 = g_date->Date() + 1;
284  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 4)) {
285  d1 = g_date->OldDays() + g_date->DayInYear(1, 4);
286  }
287  SimpleEvent_(d1, pl_ca_preseeding_cultivator, false, a_farm, a_field);
288  break;
290  // 20% will do only preseeding cultivation, the rest will do it together with bed forming
291  if (a_ev->m_lock || a_farm->DoIt(20))
292  {
293  if (!a_farm->PreseedingCultivator(a_field, 0.0, g_date->DayInYear(14, 5) - g_date->DayInYear())) {
294  SimpleEvent_(g_date->Date() + 1, pl_ca_preseeding_cultivator, true, a_farm, a_field);
295  break;
296  }
297  SimpleEvent_(g_date->Date() + 1, pl_ca_spring_sow, false, a_farm, a_field);
298  break;
299  }
300  SimpleEvent_(g_date->Date() + 1, pl_ca_bed_forming, false, a_farm, a_field);
301  break;
302  case pl_ca_bed_forming:
303  if (!a_farm->BedForming(a_field, 0.0, g_date->DayInYear(14, 5) - g_date->DayInYear())) {
304  SimpleEvent_(g_date->Date() + 1, pl_ca_bed_forming, true, a_farm, a_field);
305  break;
306  }
307  SimpleEvent_(g_date->Date() + 1, pl_ca_spring_sow, false, a_farm, a_field);
308  break;
309  case pl_ca_spring_sow:
310  if (!a_farm->SpringSow(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
311  SimpleEvent_(g_date->Date() + 1, pl_ca_spring_sow, true, a_farm, a_field);
312  break;
313  }
314  // Here is a fork leading to four parallel events
315  SimpleEvent_(g_date->Date() + 3, pl_ca_herbicide1, false, a_farm, a_field); // Herbidide thread
316  SimpleEvent_(g_date->Date() + 3, pl_ca_strigling, false, a_farm, a_field); // Row cultivation
317  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_ca_fungicide1, false, a_farm, a_field); // Fungicide thread
318  if (a_farm->IsStockFarmer()) //Stock Farmer // Microelemnts thread
319  {
320  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_ca_ferti_s3, false, a_farm, a_field);
321  }
322  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), pl_ca_ferti_p3, false, a_farm, a_field);
323  break;
324  case pl_ca_strigling:
325  if (a_field->GetGreenBiomass() <= 0)
326  {
327  if (a_ev->m_lock || a_farm->DoIt(30) && (PL_CA_HERBI == false)) // 60% of farmers who didn't do herbicide = 30 farmers
328  {
329  if (!a_farm->Strigling(a_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
330  SimpleEvent_(g_date->Date() + 1, pl_ca_strigling, true, a_farm, a_field);
331  break;
332  }
333  PL_CA_WEEDING = true;
334  }
335  }
336  // End of thread
337  break;
338  case pl_ca_herbicide1: // The first of the pesticide managements.
339  if (a_field->GetGreenBiomass() <= 0)
340  {
341  if (a_ev->m_lock || a_farm->DoIt(50) && (PL_CA_WEEDING == false)) // 71% of farmers who didn't do weeding = 50 farmers
342  {
343  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->Date() + 10 - g_date->DayInYear())) {
344  SimpleEvent_(g_date->Date() + 1, pl_ca_herbicide1, true, a_farm, a_field);
345  break;
346  }
347  PL_CA_HERBI = true;
348  }
349  SimpleEvent_(g_date->Date() + 5, pl_ca_herbicide2, false, a_farm, a_field);
350  break;
351  }
352  SimpleEvent_(g_date->Date() + 1, pl_ca_herbicide2, false, a_farm, a_field);
353  break;
354  case pl_ca_herbicide2:
355  if (a_field->GetGreenBiomass() <= 0) {
356  SimpleEvent_(g_date->Date() + 1, pl_ca_herbicide2, false, a_farm, a_field);
357  }
358  else
359  {
360  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->Date() + 14 - g_date->DayInYear())) {
361  SimpleEvent_(g_date->Date() + 1, pl_ca_herbicide2, true, a_farm, a_field);
362  break;
363  }
364  SimpleEvent_(g_date->Date() + 14, pl_ca_herbicide3, false, a_farm, a_field);
365  break;
366  }
367  break;
368  case pl_ca_herbicide3:
369  if (a_ev->m_lock || a_farm->DoIt(50))
370  {
371  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(5, 6) - g_date->DayInYear())) {
372  SimpleEvent_(g_date->Date() + 1, pl_ca_herbicide3, true, a_farm, a_field);
373  break;
374  }
375  }
376  // End of thread
377  break;
378  case pl_ca_fungicide1:
379  // Here comes the fungicide thread = MAIN thread
380  if (a_ev->m_lock || a_farm->DoIt(80))
381  {
382  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
383  SimpleEvent_(g_date->Date() + 1, pl_ca_fungicide1, true, a_farm, a_field);
384  break;
385  }
386  }
387  SimpleEvent_(g_date->Date() + 14, pl_ca_fungicide2, false, a_farm, a_field);
388  break;
389  case pl_ca_fungicide2:
390  if (a_ev->m_lock || a_farm->DoIt(40))
391  {
392  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
393  SimpleEvent_(g_date->Date() + 1, pl_ca_fungicide2, true, a_farm, a_field);
394  break;
395  }
396  }
397  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 9), pl_ca_harvest, false, a_farm, a_field);
398  break;
399  case pl_ca_ferti_p3:
400  if (a_ev->m_lock || a_farm->DoIt(60))
401  {
402  if (a_field->GetGreenBiomass() <= 0) {
403  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_p3, true, a_farm, a_field);
404  }
405  else
406  {
407  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
408  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_p3, true, a_farm, a_field);
409  break;
410  }
411  }
412  }
413  // End of thread
414  break;
415  case pl_ca_ferti_s3:
416  if (a_ev->m_lock || a_farm->DoIt(60))
417  {
418  if (a_field->GetGreenBiomass() <= 0) {
419  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_s3, true, a_farm, a_field);
420  }
421  else
422  {
423  if (!a_farm->FA_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
424  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_s3, true, a_farm, a_field);
425  break;
426  }
427  }
428  }
429  // End of thread
430  break;
431  case pl_ca_harvest:
432  // Here the MAIN thread continues
433  // We don't move harvest days
434  if (!a_farm->Harvest(a_field, 0.0, a_field->GetMDates(0, 0) - g_date->DayInYear())) {
435  SimpleEvent_(g_date->Date() + 1, pl_ca_harvest, true, a_farm, a_field);
436  break;
437  }
438  if (a_farm->IsStockFarmer()) //Stock Farmer
439  {
440  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_s4, false, a_farm, a_field);
441  }
442  else SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_p4, false, a_farm, a_field);
443  break;
444 
445 
446  case pl_ca_ferti_p4:
447  if (a_ev->m_lock || a_farm->DoIt(23))
448  {
449  if (a_field->GetMConstants(1) == 0) {
450  if (!a_farm->FP_Calcium(a_field, 0.0, -1)) { // raise an error
451  g_msg->Warn(WARN_BUG, "PLCarrots::Do(): failure in 'FP_Calcium' execution", "");
452  exit(1);
453  }
454  }
455  else {
456  if (!a_farm->FP_Calcium(a_field, 0.0, a_field->GetMDates(1, 1) - g_date->DayInYear())) {
457  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_p4, true, a_farm, a_field);
458  break;
459  }
460  }
461  }
462  done = true;
463  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
464  // END of MAIN THREAD
465  break;
466  case pl_ca_ferti_s4:
467  if (a_ev->m_lock || a_farm->DoIt(23))
468  {
469  if (a_field->GetMConstants(1) == 0) {
470  if (!a_farm->FA_Calcium(a_field, 0.0, -1)) { // raise an error
471  g_msg->Warn(WARN_BUG, "PLCarrots::Do(): failure in 'FA_Calcium' execution", "");
472  exit(1);
473  }
474  }
475  else {
476  if (!a_farm->FA_Calcium(a_field, 0.0, a_field->GetMDates(1, 1) - g_date->DayInYear())) {
477  SimpleEvent_(g_date->Date() + 1, pl_ca_ferti_s4, true, a_farm, a_field);
478  break;
479  }
480  }
481  }
482  done = true;
483  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
484  // END of MAIN THREAD
485  break;
486  default:
487  g_msg->Warn(WARN_BUG, "PLCarrots::Do(): "
488  "Unknown event type! ", "");
489  exit(1);
490  }
491  return done;
492 }

References Landscape::BackTranslateVegTypes(), Farm::DoIt(), 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_ca_autumn_harrow1, pl_ca_autumn_harrow2, pl_ca_bed_forming, pl_ca_ferti_p1, pl_ca_ferti_p2, pl_ca_ferti_p3, pl_ca_ferti_p4, pl_ca_ferti_s1, pl_ca_ferti_s2, pl_ca_ferti_s3, pl_ca_ferti_s4, pl_ca_fungicide1, pl_ca_fungicide2, pl_ca_harvest, PL_CA_HERBI, pl_ca_herbicide1, pl_ca_herbicide2, pl_ca_herbicide3, pl_ca_preseeding_cultivator, pl_ca_spring_harrow, pl_ca_spring_sow, pl_ca_start, pl_ca_strigling, pl_ca_stubble_harrow, PL_CA_STUBBLE_PLOUGH, pl_ca_stubble_plough, PL_CA_WEEDING, pl_ca_winter_plough, Crop::SimpleEvent_(), Farm::StubblePlough(), and tof_OptimisingFarm.


The documentation for this class was generated from the following files:
pl_ca_spring_sow
Definition: PLCarrots.h:52
pl_ca_ferti_s1
Definition: PLCarrots.h:45
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: farm.h:905
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_ca_ferti_p1
Definition: PLCarrots.h:44
FarmEvent::m_first_year
bool m_first_year
Definition: farm.h:467
Farm::StubblePlough
virtual bool StubblePlough(LE *a_field, double a_user, int a_days)
Carry out a stubble ploughing event on a_field. This is similar to normal plough but shallow (normall...
Definition: farmfuncs.cpp:169
tof_OptimisingFarm
Definition: farm.h:273
pl_ca_ferti_p2
Definition: PLCarrots.h:47
pl_ca_ferti_s2
Definition: PLCarrots.h:48
PL_CA_STUBBLE_PLOUGH
#define PL_CA_STUBBLE_PLOUGH
A flag used to indicate autumn ploughing status.
Definition: PLCarrots.h:28
pl_ca_winter_plough
Definition: PLCarrots.h:46
Landscape::BackTranslateVegTypes
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
Definition: Landscape.h:1669
pl_ca_autumn_harrow1
Definition: PLCarrots.h:41
Farm::GetType
TTypesOfFarm GetType(void)
Definition: farm.h:901
pl_ca_start
Definition: PLCarrots.h:38
Crop::m_first_date
int m_first_date
Definition: farm.h:540
FarmEvent::m_startday
int m_startday
Definition: farm.h:466
pl_ca_strigling
Definition: PLCarrots.h:53
pl_ca_spring_harrow
Definition: PLCarrots.h:49
pl_ca_ferti_s3
Definition: PLCarrots.h:60
pl_ca_stubble_harrow
Definition: PLCarrots.h:43
pl_ca_herbicide3
Definition: PLCarrots.h:56
pl_ca_ferti_s4
Definition: PLCarrots.h:63
pl_ca_ferti_p4
Definition: PLCarrots.h:62
pl_ca_fungicide2
Definition: PLCarrots.h:58
pl_ca_preseeding_cultivator
Definition: PLCarrots.h:50
pl_ca_bed_forming
Definition: PLCarrots.h:51
pl_ca_herbicide1
Definition: PLCarrots.h:54
PL_CA_HERBI
#define PL_CA_HERBI
Definition: PLCarrots.h:30
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: farm.h:471
FarmEvent::m_todo
int m_todo
Definition: farm.h:469
pl_ca_fungicide1
Definition: PLCarrots.h:57
pl_ca_harvest
Definition: PLCarrots.h:61
pl_ca_autumn_harrow2
Definition: PLCarrots.h:42
PL_CA_WEEDING
#define PL_CA_WEEDING
Definition: PLCarrots.h:29
pl_ca_ferti_p3
Definition: PLCarrots.h:59
g_landscape_p
Landscape * g_landscape_p
Definition: Landscape.cpp:258
pl_ca_stubble_plough
Definition: PLCarrots.h:40
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_ca_herbicide2
Definition: PLCarrots.h:55