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

NLCabbage class
. More...

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

NLCabbage class
.

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

◆ NLCabbage()

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

References Crop::m_first_date.

Member Function Documentation

◆ Do()

bool NLCabbage::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 cabbage.

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 nl_cab_start:
72  {
73  // nl_cab_start just sets up all the starting conditions and reference dates that are needed to start a nl_ca
74  NL_CAB_WINTER_PLOUGH = false;
75 
76 
77  // Set up the date management stuff
78  // The next bit of code just allows for altering dates after harvest if it is necessary
79  // to allow for a crop which starts its management early.
80 
81  // 2 start and stop dates for all 'movable' events for this crop
82  int noDates = 1;
83  a_field->SetMDates(0, 0, g_date->DayInYear(30, 10)); // last possible day of harvest
84  a_field->SetMDates(1, 0, g_date->DayInYear(30, 10));
85 
86  a_field->SetMConstants(0, 1);
87 
88  // Check the next crop for early start, unless it is a spring crop
89  // in which case we ASSUME that no checking is necessary!!!!
90  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
91 
92  //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)
93  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
94  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
95 
96  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
97  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
98  {
99  g_msg->Warn(WARN_BUG, "NLCabbage::Do(): ", "Harvest too late for the next crop to start!!!");
100  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
101  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
102  }
103  // Now fix any late finishing problems
104  for (int i = 0; i < noDates; i++) {
105  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
106  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
107  }
108  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
109  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)
110  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
111  }
112  }
113  }
114  // Now no operations can be timed after the start of the next crop.
115 
116  if (!a_ev->m_first_year) {
117  // Are we before July 1st?
118  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
119  if (g_date->Date() < d1) {
120  // Yes, too early. We assumme this is because the last crop was late
121  printf("Poly: %d\n", a_field->GetPoly());
122  g_msg->Warn(WARN_BUG, "NLCabbage::Do(): ", "Crop start attempt between 1st Jan & 1st July");
123  int prev = g_landscape_p->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousCrop(a_field->GetRotIndex()));
124  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
125  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
126  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
127  }
128  else {
129  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
130  if (g_date->Date() > d1) {
131  // Yes too late - should not happen - raise an error
132  g_msg->Warn(WARN_BUG, "NLCabbage::Do(): ", "Crop start attempt after last possible start date");
133  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
134  a_field->GetOwner()->GetPreviousCrop(a_field->GetRotIndex());
135  int almassnum = g_landscape_p->BackTranslateVegTypes(a_ev->m_next_tov);
136  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
137  }
138  }
139  }
140  else {
141  // Is the first year
142  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
143  // Code for first spring treatment used
144  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(25, 4), nl_cab_spring_planting, false, a_farm, a_field);
145  break;
146  }
147  }//if
148 
149  // End single block date checking code. Please see next line comment as well.
150  // Reinit d1 to first possible starting date.
151  d1 = g_date->OldDays() + g_date->DayInYear(1, 10);
152  // OK, let's go.
153  // Here we queue up the first event - this differs depending on whether we have field on snady or clay soils
154  SimpleEvent_(d1, nl_cab_winter_plough_clay, false, a_farm, a_field);
155  }
156  break;
157 
158  // This is the first real farm operation
160  if (a_field->GetSoilType() != 2 && a_field->GetSoilType() != 6) // on clay soils (NL KLEI & VEEN)
161  {
162  if (a_ev->m_lock || a_farm->DoIt_prob(0.80))
163  {
164  if (!a_farm->WinterPlough(a_field, 0.0, g_date->DayInYear(1, 12) - g_date->DayInYear())) {
165  SimpleEvent_(g_date->Date() + 1, nl_cab_winter_plough_clay, true, a_farm, a_field);
166  break;
167  }
168  }
169  if (a_farm->IsStockFarmer()) //Stock Farmer
170  {
171  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 3) + 365, nl_cab_ferti_s1, false, a_farm, a_field);
172  }
173  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 3) + 365, nl_cab_ferti_p1, false, a_farm, a_field);
174  break;
175  }
176  if (a_farm->IsStockFarmer()) //Stock Farmer
177  {
178  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 3) + 365, nl_cab_ferti_s1, false, a_farm, a_field);
179  }
180  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 3) + 365, nl_cab_ferti_p1, false, a_farm, a_field);
181  break;
182  case nl_cab_ferti_s1:
183  if (a_ev->m_lock || a_farm->DoIt_prob(0.50))
184  {
185  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(14, 4) - g_date->DayInYear())) {
186  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_s1, true, a_farm, a_field);
187  break;
188  }
189  }
190  SimpleEvent_(g_date->Date() + 1, nl_cab_spring_plough_sandy, false, a_farm, a_field);
191  break;
192  case nl_cab_ferti_p1:
193  if (a_ev->m_lock || a_farm->DoIt_prob(0.50))
194  {
195  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(14, 4) - g_date->DayInYear())) {
196  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_p1, true, a_farm, a_field);
197  break;
198  }
199  }
200  SimpleEvent_(g_date->Date() + 1, nl_cab_spring_plough_sandy, false, a_farm, a_field);
201  break;
203  if (a_field->GetSoilType() == 2 || a_field->GetSoilType() == 6) // on sandy soils
204  {
205  if (a_ev->m_lock || a_farm->DoIt_prob(0.80))
206  {
207  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
208  SimpleEvent_(g_date->Date() + 1, nl_cab_spring_plough_sandy, true, a_farm, a_field);
209  break;
210  }
211  }
212  d1 = g_date->Date() + 7;
213  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 4)) {
214  d1 = g_date->OldDays() + g_date->DayInYear(10, 4);
215  }
216  if (a_farm->IsStockFarmer()) //Stock Farmer
217  {
218  SimpleEvent_(d1, nl_cab_ferti_s2, false, a_farm, a_field);
219  }
220  else SimpleEvent_(d1, nl_cab_ferti_p2, false, a_farm, a_field);
221  break;
222  }
223  d1 = g_date->Date() + 7;
224  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 4)) {
225  d1 = g_date->OldDays() + g_date->DayInYear(10, 4);
226  }
227  if (a_farm->IsStockFarmer()) //Stock Farmer
228  {
229  SimpleEvent_(d1, nl_cab_ferti_s2, false, a_farm, a_field);
230  }
231  else SimpleEvent_(d1, nl_cab_ferti_p2, false, a_farm, a_field);
232  break;
233  case nl_cab_ferti_s2:
234  if (a_ev->m_lock || a_farm->DoIt_prob(0.80))
235  {
236  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
237  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_s2, true, a_farm, a_field);
238  break;
239  }
240  }
241  d1 = g_date->Date() + 1;
242  if (d1 < g_date->OldDays() + g_date->DayInYear(25, 4)) {
243  d1 = g_date->OldDays() + g_date->DayInYear(25, 4);
244  }
245  SimpleEvent_(d1, nl_cab_preseeding_cultivator, false, a_farm, a_field);
246  break;
247  case nl_cab_ferti_p2:
248  if (a_ev->m_lock || a_farm->DoIt_prob(0.80))
249  {
250  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
251  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_p2, true, a_farm, a_field);
252  break;
253  }
254  }
255  d1 = g_date->Date() + 1;
256  if (d1 < g_date->OldDays() + g_date->DayInYear(25, 4)) {
257  d1 = g_date->OldDays() + g_date->DayInYear(25, 4);
258  }
259  SimpleEvent_(d1, nl_cab_preseeding_cultivator, false, a_farm, a_field);
260  break;
262  if (!a_farm->PreseedingCultivator(a_field, 0.0, g_date->DayInYear(14, 5) - g_date->DayInYear())) {
263  SimpleEvent_(g_date->Date() + 3, nl_cab_preseeding_cultivator, true, a_farm, a_field);
264  break;
265  }
266  SimpleEvent_(g_date->Date() + 1, nl_cab_spring_planting, false, a_farm, a_field);
267  break;
268 
270  if (!a_farm->SpringSow(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
271  SimpleEvent_(g_date->Date() + 1, nl_cab_spring_planting, true, a_farm, a_field);
272  break;
273  }
274  // Here is a fork leading to four parallel events
275  SimpleEvent_(g_date->Date() + 5, nl_cab_weeding1, false, a_farm, a_field); // Weeding + Herbicide thread
276  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 7), nl_cab_fungicide1, false, a_farm, a_field); // Fungicide thread
277  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 7), nl_cab_insecticide1, false, a_farm, a_field); // Insecticide thread = MAIN THREAD
278  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 7), nl_cab_watering, false, a_farm, a_field); // Watering thread
279  if (a_farm->IsStockFarmer()) //Stock Farmer
280  {
281  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 5), nl_cab_ferti_s3, false, a_farm, a_field); // N thread
282  }
283  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 5), nl_cab_ferti_p3, false, a_farm, a_field);
284  if (a_farm->IsStockFarmer()) //Stock Farmer
285  {
286  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 5), nl_cab_ferti_s5, false, a_farm, a_field); // microelements thread
287  }
288  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 5), nl_cab_ferti_p5, false, a_farm, a_field);
289  break;
290  case nl_cab_ferti_s3:
291  if (!a_farm->FA_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
292  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_s3, true, a_farm, a_field);
293  break;
294  }
295  if (a_farm->IsStockFarmer()) //Stock Farmer
296  {
297  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 6), nl_cab_ferti_s4, false, a_farm, a_field);
298  }
299  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 6), nl_cab_ferti_p4, false, a_farm, a_field);
300  break;
301  case nl_cab_ferti_p3:
302  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
303  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_p3, true, a_farm, a_field);
304  break;
305  }
306  if (a_farm->IsStockFarmer()) //Stock Farmer
307  {
308  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 6), nl_cab_ferti_s4, false, a_farm, a_field);
309  }
310  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 6), nl_cab_ferti_p4, false, a_farm, a_field);
311  break;
312  case nl_cab_ferti_s4:
313  if (a_ev->m_lock || a_farm->DoIt_prob(0.60))
314  {
315  if (!a_farm->FA_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
316  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_s4, true, a_farm, a_field);
317  break;
318  }
319  }
320  // End of thread
321  break;
322  case nl_cab_ferti_p4:
323  if (a_ev->m_lock || a_farm->DoIt_prob(0.60))
324  {
325  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
326  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_p4, true, a_farm, a_field);
327  break;
328  }
329  }
330  // End of thread
331  break;
332  case nl_cab_ferti_s5:
333  if (a_ev->m_lock || a_farm->DoIt_prob(0.50))
334  {
335  if (!a_farm->FA_ManganeseSulphate(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
336  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_s5, true, a_farm, a_field);
337  break;
338  }
339  }
340  // End of thread
341  break;
342  case nl_cab_ferti_p5:
343  if (a_ev->m_lock || a_farm->DoIt_prob(0.50))
344  {
345  if (!a_farm->FP_ManganeseSulphate(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
346  SimpleEvent_(g_date->Date() + 1, nl_cab_ferti_p5, true, a_farm, a_field);
347  break;
348  }
349  }
350  // End of thread
351  break;
352  case nl_cab_watering:
353  if (a_ev->m_lock || a_farm->DoIt_prob(0.50))
354  {
355  if (!a_farm->Water(a_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
356  SimpleEvent_(g_date->Date() + 1, nl_cab_watering, true, a_farm, a_field);
357  break;
358  }
359  }
360  // End of thread
361  break;
362  case nl_cab_weeding1:
363  if (a_field->GetGreenBiomass() <= 0) {
364  SimpleEvent_(g_date->Date() + 1, nl_cab_weeding1, false, a_farm, a_field);
365  }
366  else
367  {
368  if (a_ev->m_lock || a_farm->DoIt_prob(0.20))
369  {
370  if (!a_farm->ShallowHarrow(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
371  SimpleEvent_(g_date->Date() + 1, nl_cab_weeding1, true, a_farm, a_field);
372  break;
373  }
374  // end of thread
375  break;
376  }
377  SimpleEvent_(g_date->Date() + 1, nl_cab_herbicide1, false, a_farm, a_field);
378  break;
379  }
380  break;
381  case nl_cab_herbicide1:
382  if (a_field->GetGreenBiomass() <= 0) {
383  SimpleEvent_(g_date->Date() + 1, nl_cab_herbicide1, false, a_farm, a_field);
384  }
385  else
386  {
387  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
388  SimpleEvent_(g_date->Date() + 1, nl_cab_herbicide1, true, a_farm, a_field);
389  break;
390  }
391  SimpleEvent_(g_date->Date() + 14, nl_cab_weeding2, false, a_farm, a_field);
392  break;
393  }
394  break;
395  case nl_cab_weeding2:
396  if (!a_farm->ShallowHarrow(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
397  SimpleEvent_(g_date->Date() + 1, nl_cab_weeding2, true, a_farm, a_field);
398  break;
399  }
400  // end of thread
401  break;
402  case nl_cab_fungicide1:
403  // Here comes the fungicide thread
404  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(25, 7) - g_date->DayInYear())) {
405  SimpleEvent_(g_date->Date() + 1, nl_cab_fungicide1, true, a_farm, a_field);
406  break;
407  }
408  SimpleEvent_(g_date->Date() + 14, nl_cab_fungicide2, false, a_farm, a_field);
409  break;
410  case nl_cab_fungicide2:
411  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(20, 8) - g_date->DayInYear())) {
412  SimpleEvent_(g_date->Date() + 1, nl_cab_fungicide2, true, a_farm, a_field);
413  break;
414  }
415  SimpleEvent_(g_date->Date() + 14, nl_cab_fungicide3, false, a_farm, a_field);
416  break;
417  case nl_cab_fungicide3:
418  if (a_ev->m_lock || a_farm->DoIt_prob(0.80))
419  {
420  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(5, 9) - g_date->DayInYear())) {
421  SimpleEvent_(g_date->Date() + 1, nl_cab_fungicide3, true, a_farm, a_field);
422  break;
423  }
424  }
425  // End of thread
426  break;
427  case nl_cab_insecticide1:
428  // Here comes the insecticide thread
429  // here we check wheter we are using ERA pesticide or not
430  if (!cfg_pest_cabbage_on.value() ||
431  !g_landscape_p->SupplyShouldSpray()) // Not using pesticide spray
432  {
433  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(10, 9) - g_date->DayInYear())) {
434  SimpleEvent_(g_date->Date() + 1, nl_cab_insecticide1, true, a_farm, a_field);
435  break;
436  }
437  }
438  else {
439  a_farm->ProductApplication(a_field, 0.0, 0, cfg_pest_product_1_amount.value(), ppp_1);
440  }
441  SimpleEvent_(g_date->Date() + 14, nl_cab_insecticide2, false, a_farm, a_field);
442  break;
443  case nl_cab_insecticide2:
444  // here we check wheter we are using ERA pesticide or not
445  if (!cfg_pest_cabbage_on.value() ||
446  !g_landscape_p->SupplyShouldSpray()) // Not using pesticide spray
447  {
448  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(25, 9) - g_date->DayInYear())) {
449  SimpleEvent_(g_date->Date() + 1, nl_cab_insecticide2, true, a_farm, a_field);
450  break;
451  }
452  }
453  else {
454  a_farm->ProductApplication(a_field, 0.0, 0, cfg_pest_product_1_amount.value(), ppp_1);
455  }
456  SimpleEvent_(g_date->Date() + 14, nl_cab_insecticide3, false, a_farm, a_field);
457  break;
458  case nl_cab_insecticide3:
459  // here we check wheter we are using ERA pesticide or not
460  if (!cfg_pest_cabbage_on.value() ||
461  !g_landscape_p->SupplyShouldSpray()) // Not using pesticide spray
462  {
463  if (!a_farm->InsecticideTreat(a_field, 0.0, g_date->DayInYear(5, 10) - g_date->DayInYear())) {
464  SimpleEvent_(g_date->Date() + 1, nl_cab_insecticide3, true, a_farm, a_field);
465  break;
466  }
467  }
468  else {
469  a_farm->ProductApplication(a_field, 0.0, 0, cfg_pest_product_1_amount.value(), ppp_1);
470  }
471  SimpleEvent_(g_date->Date() + 10, nl_cab_harvest, false, a_farm, a_field);
472  break;
473  case nl_cab_harvest:
474  // Here the MAIN thread continues
475  // We don't move harvest days
476  if (!a_farm->Harvest(a_field, 0.0, a_field->GetMDates(0, 0) - g_date->DayInYear())) {
477  SimpleEvent_(g_date->Date() + 1, nl_cab_harvest, true, a_farm, a_field);
478  break;
479  }
480  done = true;
481  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
482  // END of MAIN THREAD
483  break;
484  default:
485  g_msg->Warn(WARN_BUG, "NLCabbage::Do(): "
486  "Unknown event type! ", "");
487  exit(1);
488  }
489  return done;
490 }

References Landscape::BackTranslateVegTypes(), cfg_pest_cabbage_on, cfg_pest_product_1_amount, Farm::DoIt_prob(), 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, nl_cab_ferti_p1, nl_cab_ferti_p2, nl_cab_ferti_p3, nl_cab_ferti_p4, nl_cab_ferti_p5, nl_cab_ferti_s1, nl_cab_ferti_s2, nl_cab_ferti_s3, nl_cab_ferti_s4, nl_cab_ferti_s5, nl_cab_fungicide1, nl_cab_fungicide2, nl_cab_fungicide3, nl_cab_harvest, nl_cab_herbicide1, nl_cab_insecticide1, nl_cab_insecticide2, nl_cab_insecticide3, nl_cab_preseeding_cultivator, nl_cab_spring_planting, nl_cab_spring_plough_sandy, nl_cab_start, nl_cab_watering, nl_cab_weeding1, nl_cab_weeding2, NL_CAB_WINTER_PLOUGH, nl_cab_winter_plough_clay, ppp_1, Crop::SimpleEvent_(), Landscape::SupplyShouldSpray(), tof_OptimisingFarm, and Farm::WinterPlough().


The documentation for this class was generated from the following files:
nl_cab_ferti_p2
Definition: NLCabbage.h:42
cfg_pest_product_1_amount
CfgFloat cfg_pest_product_1_amount
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: farm.h:905
nl_cab_ferti_s3
Definition: NLCabbage.h:56
FarmEvent::m_lock
bool m_lock
Definition: farm.h:465
Landscape::SupplyShouldSpray
bool SupplyShouldSpray()
Definition: Landscape.h:357
FarmEvent::m_first_year
bool m_first_year
Definition: farm.h:467
tof_OptimisingFarm
Definition: farm.h:273
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: farm.cpp:808
Landscape::BackTranslateVegTypes
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
Definition: Landscape.h:1669
nl_cab_spring_planting
Definition: NLCabbage.h:45
Farm::GetType
TTypesOfFarm GetType(void)
Definition: farm.h:901
Crop::m_first_date
int m_first_date
Definition: farm.h:540
FarmEvent::m_startday
int m_startday
Definition: farm.h:466
nl_cab_preseeding_cultivator
Definition: NLCabbage.h:44
nl_cab_weeding1
Definition: NLCabbage.h:46
nl_cab_ferti_p5
Definition: NLCabbage.h:59
nl_cab_fungicide3
Definition: NLCabbage.h:51
nl_cab_watering
Definition: NLCabbage.h:61
nl_cab_ferti_s4
Definition: NLCabbage.h:58
nl_cab_insecticide1
Definition: NLCabbage.h:52
nl_cab_winter_plough_clay
Definition: NLCabbage.h:38
nl_cab_spring_plough_sandy
Definition: NLCabbage.h:41
nl_cab_ferti_s5
Definition: NLCabbage.h:60
cfg_pest_cabbage_on
CfgBool cfg_pest_cabbage_on
nl_cab_insecticide2
Definition: NLCabbage.h:53
nl_cab_fungicide1
Definition: NLCabbage.h:49
nl_cab_fungicide2
Definition: NLCabbage.h:50
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: farm.h:471
nl_cab_ferti_s1
Definition: NLCabbage.h:40
nl_cab_ferti_p1
Definition: NLCabbage.h:39
FarmEvent::m_todo
int m_todo
Definition: farm.h:469
nl_cab_harvest
Definition: NLCabbage.h:62
nl_cab_start
Definition: NLCabbage.h:36
ppp_1
Definition: farm.h:422
nl_cab_ferti_s2
Definition: NLCabbage.h:43
NL_CAB_WINTER_PLOUGH
#define NL_CAB_WINTER_PLOUGH
A flag used to indicate autumn ploughing status.
Definition: NLCabbage.h:28
Farm::WinterPlough
virtual bool WinterPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the winter on a_field.
Definition: farmfuncs.cpp:392
nl_cab_herbicide1
Definition: NLCabbage.h:47
nl_cab_ferti_p4
Definition: NLCabbage.h:57
nl_cab_insecticide3
Definition: NLCabbage.h:54
nl_cab_ferti_p3
Definition: NLCabbage.h:55
nl_cab_weeding2
Definition: NLCabbage.h:48
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