File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DE_WinterWheatLate Class Reference

DE_WinterWheatLate class
. More...

#include <DE_WinterWheatLate.h>

Inheritance diagram for DE_WinterWheatLate:
Crop

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...
 
 DE_WinterWheatLate (TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
 
void SetUpFarmCategoryInformation ()
 
- Public Member Functions inherited from Crop
virtual ~Crop ()
 
 Crop (TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
 
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)
 
void GetCropType (TTypesOfCrops a_toc)
 
TTypesOfCrops GetCropType ()
 
FarmManagementCategory LookUpManagementCategory (int a_todo)
 
bool GetForceSpringOK ()
 

Additional Inherited Members

- Public Attributes inherited from Crop
TTypesOfVegetation m_tov
 
- 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...
 
bool StartUpCrop (int a_spring, std::vector< std::vector< int >> a_flexdates, int a_todo)
 
Holds the translation between the farm operation enum for each cropand the farm management category associated with it More...
 
bool AphidDamage (LE *a_field)
 Compares aphid numbers per m2 with a threshold to return true if threshold is exceeded. More...
 
- Protected Attributes inherited from Crop
Farmm_farm
 
LEm_field
 
FarmEventm_ev
 
int m_first_date
 
int m_count
 
int m_last_date
 
int m_ddegstoharvest
 
int m_base_elements_no
 
Landscapem_OurLandscape
 
bool m_forcespringpossible = false
 Used to signal that the crop can be forced to start in spring. More...
 
TTypesOfCrops m_toc
 The Crop type in terms of the TTypesOfCrops list (smaller list than tov, no country designation) More...
 
int m_CropClassification
 Contains information on whether this is a winter crop, spring crop, or catch crop that straddles the year boundary (0,1,2) More...
 
vector< FarmManagementCategorym_ManagementCategories
 Holds the translation between the farm operation enum for each crop and the farm management category associated with it. More...
 
- Static Protected Attributes inherited from Crop
static int m_date_modifier = 0
 Holds a value that shifts test pesticide use by this many days in crops modified to use it. More...
 

Detailed Description

DE_WinterWheatLate class
.

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

◆ DE_WinterWheatLate()

DE_WinterWheatLate::DE_WinterWheatLate ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline

When we start it off, the first possible date for a farm operation is 15th September This information is used by other crops when they decide how much post processing of the management is allowed after harvest before the next crop starts.

112  : Crop(a_tov, a_toc, a_L)
113  {
119  m_first_date=g_date->DayInYear( 25,10 );
121  }

References Calendar::DayInYear(), g_date, Crop::m_first_date, and SetUpFarmCategoryInformation().

Member Function Documentation

◆ Do()

bool DE_WinterWheatLate::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 m_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 wheat.

Reimplemented from Crop.

92 {
93 /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
94  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
95  m_field = a_field;
96  m_ev = a_ev;
97  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
98  bool flag = false;
99  int d1 = 0;
100  int noDates = 1;
101  TTypesOfVegetation l_tov = tov_DEWinterWheatLate; // The current type - change to match the crop you have
102 /**********************************************To Here *************************************************************************/
103 
104  // Depending what event has occured jump to the correct bit of code
105  switch (m_ev->m_todo)
106  {
107  case de_wwl_start:
108  {
109  DE_WWL_AUTUMN_PLOUGH = false;
110  DE_WWL_DECIDE_TO_GR = false;
111 
113 
114  m_last_date = g_date->DayInYear(31, 8); // Should match the last flexdate below
115  //Create a 2d array of 1 plus the number of operations you use. Change only 4+1 to what you need in the line below
116  std::vector<std::vector<int>> flexdates(2 + 1, std::vector<int>(2, 0));
117  // Set up the date management stuff
118  // Start and stop dates for all events after harvest
119  flexdates[0][1] = g_date->DayInYear(25, 8); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use
120  // Now these are done in pairs, start & end for each operation. If its not used then -1
121  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
122  flexdates[1][1] = g_date->DayInYear(31, 8); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
123  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
124  flexdates[2][1] = g_date->DayInYear(31, 8); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 2)
125 
126  // Below if this is a spring crop use 365, otherwise set this to 0, second parameter is fixed, and the third is the start up operation in the first year
127  int isSpring = 0;
128  if (StartUpCrop(isSpring, flexdates, int(de_wwl_ferti_s2))) break;
129 
130  // End single block date checking code. Please see next line comment as well.
131  // Reinit d1 to first possible starting date.
132  d1 = g_date->OldDays() + g_date->DayInYear(1, 9) + isSpring;
133  // OK, let's go.
134  SimpleEvent(d1, de_wwl_autumn_plough, false);
135  break;
136  }
137  break;
138 
139  // This is the first real farm operation
141  if (m_ev->m_lock || m_farm->DoIt(50))
142  {
143  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(25, 10) - g_date->DayInYear())) {
145  break;
146  }
147  // Queue up the next event - in this case autumn roll
149  break;
150  }
152  break;
153  case de_wwl_autumn_roll:
154  if (!m_farm->AutumnRoll(m_field, 0.0, g_date->DayInYear(20, 10) - g_date->DayInYear())) {
156  break;
157  }
158  // Queue up the next event - in this case autumn sow
160  break;
162  // some will do stubble plough, but rest will get away with non-inversion cultivation or non-tillage
163  if (!m_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(25, 10) - g_date->DayInYear())) {
165  break;
166  }
168  break;
169  //LKM: no-till and till branches meet here
170  case de_wwl_autumn_sow:
171  if (!m_farm->AutumnSow(m_field, 0.0, g_date->DayInYear(30, 10) - g_date->DayInYear())) {
173  break;
174  }
175  // Here is a fork leading to four parallel events
176  SimpleEvent_(g_date->Date() + 14, de_wwl_herbicide1, false, m_farm, m_field); // Herbidide thread
177  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, de_wwl_fungicide1, false, m_farm, m_field);; // Fungicide thread
178  SimpleEvent_(g_date->Date() + 14 + m_date_modifier, de_wwl_insecticide1, false, m_farm, m_field); // Insecticide thread
179  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, de_wwl_growth_regulator1, false, m_farm, m_field); // GR thread
180  if (m_farm->IsStockFarmer()) //Stock Farmer // P thread
181  {
183  }
184  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, de_wwl_ferti_p1, false, m_farm, m_field);
185  if (m_farm->IsStockFarmer()) //Stock Farmer // Main (N) thread
186  {
188  }
189  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, de_wwl_ferti_p2, false, m_farm, m_field);
190  if (m_farm->IsStockFarmer()) //Stock Farmer // Microelemnts thread (K)
191  {
193  }
194  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, de_wwl_ferti_p5, false, m_farm, m_field);
195  break;
196  case de_wwl_herbicide1: // The first of the pesticide managements.
197  // Here comes the herbicide thread
198  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
199  {
200  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
202  break;
203  }
204  }
206  break;
207  case de_wwl_herbicide2:
208  if (m_ev->m_lock || m_farm->DoIt_prob(0.73))
209  {
210  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
212  break;
213  }
214  }
215  // End of thread
216  break;
217  case de_wwl_fungicide1:
218  // Here comes the fungicide thread
219  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
220  {
221  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
223  break;
224  }
225  }
226  d1 = g_date->Date() + 14;
227  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 5)) {
228  d1 = g_date->OldDays() + g_date->DayInYear(1, 5);
229  }
231  break;
232  case de_wwl_fungicide2:
233  if (m_ev->m_lock || m_farm->DoIt_prob(0.68))
234  {
235  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
237  break;
238  }
239  }
240  d1 = g_date->Date() + 14;
241  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 6)) {
242  d1 = g_date->OldDays() + g_date->DayInYear(1, 6);
243  }
245  break;
246  case de_wwl_fungicide3:
247  if (m_ev->m_lock || m_farm->DoIt_prob(0.15))
248  {
249  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
251  break;
252  }
253  }
254  // End of thread
255  break;
256  case de_wwl_insecticide1:
257  // Here comes the insecticide thread
258 #ifdef ECOSTACK_BIOPESTICIDE
260 #else
262 #endif
263  {
264  if (m_field->GetGreenBiomass() <= 0) {
266  }
267  else
268  {
269  // here we check wheter we are using ERA pesticide or not
270  d1 = g_date->DayInYear(15, 11) - g_date->DayInYear();
271  if (!cfg_pest_winterwheat_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
272  {
273 #ifdef ECOSTACK_BIOPESTICIDE
274  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
275 #else
276  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
277 #endif
278  }
279  else {
281  }
282  if (!flag) {
284  break;
285  }
287  break;
288  }
289  }
291  break;
292 
293  case de_wwl_insecticide2:
294 #ifdef ECOSTACK_BIOPESTICIDE
296 #else
298 #endif
299  {
300  // here we check wheter we are using ERA pesticide or not
301  d1 = g_date->DayInYear(30, 5) - g_date->DayInYear();
302  if (!cfg_pest_winterwheat_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
303  {
304 #ifdef ECOSTACK_BIOPESTICIDE
305  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
306 #else
307  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
308 #endif
309  }
310  else {
312  }
313  if (!flag) {
315  break;
316  }
317  }
318 #ifdef ECOSTACK_BIOPESTICIDE
319  d1 = g_date->Date() + 7;
320 #else
321  d1 = g_date->Date() + 14;
322 #endif
323  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 6) + m_date_modifier) {
324  d1 = g_date->OldDays() + g_date->DayInYear(1, 6) + m_date_modifier;
325  }
327  break;
328 
329  case de_wwl_insecticide3:
330 #ifdef ECOSTACK_BIOPESTICIDE
332 #else
334 #endif
335  {
336  // here we check wheter we are using ERA pesticide or not
337  d1 = g_date->DayInYear(30, 6) - g_date->DayInYear();
338  if (!cfg_pest_winterwheat_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
339  {
340 #ifdef ECOSTACK_BIOPESTICIDE
341  flag = m_farm->BiocideTreat(m_field, 0.0, d1);
342 #else
343  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
344 #endif
345  }
346  else {
348  }
349  if (!flag) {
351  break;
352  }
353  }
354  // End of thread
355  break;
357  // Here comes the GR thread
358  if (m_ev->m_lock || m_farm->DoIt_prob(0.68))
359  {
360  if (!m_farm->GrowthRegulator(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
362  break;
363  }
364  else
365  {
366  //We need to remeber who did GR I
367  DE_WWL_DECIDE_TO_GR = true;
368  }
369  }
371  break;
374  {
375  if (!m_farm->GrowthRegulator(m_field, 0.0, g_date->Date() + 21 - g_date->DayInYear())) {
377  break;
378  }
379  }
380  // End of thread
381  break;
382  case de_wwl_ferti_p1:
383  // Here comes the P thread
384  if (m_ev->m_lock || m_farm->DoIt_prob(0.50))
385  {
386  if (!m_farm->FP_P(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
388  break;
389  }
390  }
391  // End of thread
392  break;
393  case de_wwl_ferti_s1:
394  // Here comes the P thread
395  if (m_ev->m_lock || m_farm->DoIt_prob(0.50))
396  {
397  if (!m_farm->FA_P(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
399  break;
400  }
401  }
402  // End of thread
403  break;
404  case de_wwl_ferti_p2:
405  // Here comes the MAIN thread
406  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
408  break;
409  }
410  d1 = g_date->Date() + 7;
411  if (d1 < g_date->OldDays() + g_date->DayInYear(20, 3)) {
412  d1 = g_date->OldDays() + g_date->DayInYear(20, 3);
413  }
415  break;
416  case de_wwl_ferti_s2:
417  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
419  break;
420  }
421  d1 = g_date->Date() + 7;
422  if (d1 < g_date->OldDays() + g_date->DayInYear(20, 3)) {
423  d1 = g_date->OldDays() + g_date->DayInYear(20, 3);
424  }
426  break;
427  case de_wwl_ferti_p3:
428  if (m_ev->m_lock || m_farm->DoIt_prob(0.95))
429  {
430  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
432  break;
433  }
434  }
435  d1 = g_date->Date() + 7;
436  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 4)) {
437  d1 = g_date->OldDays() + g_date->DayInYear(15, 4);
438  }
440  break;
441  case de_wwl_ferti_s3:
442  if (m_ev->m_lock || m_farm->DoIt_prob(0.95))
443  {
444  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
446  break;
447  }
448  }
449  d1 = g_date->Date() + 7;
450  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 4)) {
451  d1 = g_date->OldDays() + g_date->DayInYear(15, 4);
452  }
454  break;
455  case de_wwl_ferti_p4:
456  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
457  {
458  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
460  break;
461  }
462  }
464  break;
465  case de_wwl_ferti_s4:
466  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
467  {
468  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
470  break;
471  }
472  }
474  break;
475  case de_wwl_ferti_p5:
476  // Here comes the K thread
477  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
478  {
479  if (!m_farm->FP_K(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
481  break;
482  }
483  }
484  break;
485  case de_wwl_ferti_s5:
486  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
487  {
488  if (!m_farm->FA_K(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
490  break;
491  }
492  }
493  break;
494  case de_wwl_harvest:
495  // We don't move harvest days
496  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
498  break;
499  }
500  // 90% of farmers will leave straw on field and rest will do hay bailing
501  if (m_farm->DoIt_prob(0.90))
502  {
504  }
505  else
506  {
508  }
509  break;
511  if (!m_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
513  break;
514  }
515  done = true;
516  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
517  // END of MAIN THREAD
518  break;
519  case de_wwl_hay_bailing:
520  if (!m_farm->HayBailing(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
522  break;
523  }
524  done = true;
525  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
526  // END of MAIN THREAD
527  break;
528  default:
529  g_msg->Warn(WARN_BUG, "DE_WinterWheatLate::Do(): "
530  "Unknown event type! ", "");
531  exit(1);
532  }
533  return done;
534 }

References Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), Farm::BiocideTreat(), cfg_pest_product_amounts, cfg_pest_winterwheat_on, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), de_wwl_autumn_harrow_notill, DE_WWL_AUTUMN_PLOUGH, de_wwl_autumn_plough, de_wwl_autumn_roll, de_wwl_autumn_sow, DE_WWL_DECIDE_TO_GR, de_wwl_ferti_p1, de_wwl_ferti_p2, de_wwl_ferti_p3, de_wwl_ferti_p4, de_wwl_ferti_p5, de_wwl_ferti_s1, de_wwl_ferti_s2, de_wwl_ferti_s3, de_wwl_ferti_s4, de_wwl_ferti_s5, de_wwl_fungicide1, de_wwl_fungicide2, de_wwl_fungicide3, de_wwl_growth_regulator1, de_wwl_growth_regulator2, de_wwl_harvest, de_wwl_hay_bailing, de_wwl_herbicide1, de_wwl_herbicide2, de_wwl_insecticide1, de_wwl_insecticide2, de_wwl_insecticide3, de_wwl_start, de_wwl_straw_chopping, Farm::DoIt(), Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FA_K(), Farm::FA_P(), Farm::FP_AmmoniumSulphate(), Farm::FP_K(), Farm::FP_P(), Farm::FungicideTreat(), g_date, g_landscape_ptr, g_msg, LE::GetGreenBiomass(), LE::GetMDates(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::ProductApplication(), Farm::ShallowHarrow(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Crop::StartUpCrop(), Farm::StrawChopping(), Landscape::SupplyPestIncidenceFactor(), tov_DEWinterWheatLate, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void DE_WinterWheatLate::SetUpFarmCategoryInformation ( )
inline
122  {
123  const int elements = 2 + (de_wwl_foobar - DE_WINTERWHEATLATE_BASE);
125 
126  FarmManagementCategory catlist[elements] =
127  {
128  fmc_Others, // zero element unused but must be here
129  // ALL THE NECESSARY ENTRIES HERE
130  fmc_Others, // de_car_start = 1, // Compulsory, must always be 1 (one).
131  fmc_Others, // de_car_sleep_all_day
132  fmc_Cultivation, // de_wwl_autumn_harrow_notill,
133  fmc_Cultivation, // de_wwl_stubble_cultivator,
134  fmc_Cultivation, // de_wwl_autumn_plough,
135  fmc_Cultivation, // de_wwl_autumn_roll,
136  fmc_Cultivation, // de_wwl_autumn_sow,
137  fmc_Fertilizer, // de_wwl_ferti_s1,
138  fmc_Fertilizer, // de_wwl_ferti_p1,
139  fmc_Fertilizer, // de_wwl_ferti_s2,
140  fmc_Fertilizer, // de_wwl_ferti_p2,
141  fmc_Fertilizer, // de_wwl_ferti_s3,
142  fmc_Fertilizer, // de_wwl_ferti_p3,
143  fmc_Fertilizer, // de_wwl_ferti_s4,
144  fmc_Fertilizer, // de_wwl_ferti_p4,
145  fmc_Fertilizer, // de_wwl_ferti_p5,
146  fmc_Fertilizer, // de_wwl_ferti_s5,
147  fmc_Herbicide, // de_wwl_herbicide1,
148  fmc_Herbicide, // de_wwl_herbicide2,
149  fmc_Insecticide, // de_wwl_insecticide1,
150  fmc_Insecticide, // de_wwl_insecticide2,
151  fmc_Insecticide, // de_wwl_insecticide3,
152  fmc_Fungicide, // de_wwl_fungicide1,
153  fmc_Fungicide, // de_wwl_fungicide2,
154  fmc_Fungicide, // de_wwl_fungicide3,
155  fmc_Others, // de_wwl_growth_regulator1,
156  fmc_Others, // de_wwl_growth_regulator2,
157  fmc_Harvest, // de_wwl_harvest,
158  fmc_Others, // de_wwl_straw_chopping,
159  fmc_Others, // de_wwl_hay_bailing,
160  // no foobar entry
161 
162  };
163  // Iterate over the catlist elements and copy them to vector
164  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
165 
166  }

References DE_WINTERWHEATLATE_BASE, de_wwl_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DE_WinterWheatLate().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
de_wwl_ferti_s1
Definition: DE_WinterWheatLate.h:73
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
de_wwl_insecticide3
Definition: DE_WinterWheatLate.h:87
Farm::Harvest
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: FarmFuncs.cpp:1364
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
Farm::ProductApplication
virtual bool ProductApplication(LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp, bool a_isgranularpesticide=false, int a_orcharddrifttype=0)
Apply test pesticide to a_field.
Definition: FarmFuncs.cpp:2267
de_wwl_herbicide2
Definition: DE_WinterWheatLate.h:84
tov_DEWinterWheatLate
Definition: LandscapeFarmingEnums.h:510
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
de_wwl_insecticide1
Definition: DE_WinterWheatLate.h:85
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
cfg_pest_product_amounts
CfgArray_Double cfg_pest_product_amounts
Amount of pesticide applied in grams of active substance per hectare for each of the 10 pesticides.
de_wwl_straw_chopping
Definition: DE_WinterWheatLate.h:94
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
de_wwl_harvest
Definition: DE_WinterWheatLate.h:93
de_wwl_growth_regulator2
Definition: DE_WinterWheatLate.h:92
Farm::FA_P
virtual bool FA_P(LE *a_field, double a_user, int a_days)
Apply P fertilizer, on a_field owned by stock farmer.
Definition: FarmFuncs.cpp:1024
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
de_wwl_autumn_harrow_notill
Definition: DE_WinterWheatLate.h:68
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
de_wwl_autumn_sow
Definition: DE_WinterWheatLate.h:71
de_wwl_ferti_p4
Definition: DE_WinterWheatLate.h:80
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
de_wwl_ferti_p3
Definition: DE_WinterWheatLate.h:78
de_wwl_ferti_p2
Definition: DE_WinterWheatLate.h:76
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
de_wwl_fungicide3
Definition: DE_WinterWheatLate.h:90
CfgBool::value
bool value() const
Definition: Configurator.h:164
cfg_pest_winterwheat_on
CfgBool cfg_pest_winterwheat_on
Turn on pesticides for winter wheat.
de_wwl_growth_regulator1
Definition: DE_WinterWheatLate.h:91
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
Calendar::Date
long Date(void)
Definition: Calendar.h:57
de_wwl_start
Definition: DE_WinterWheatLate.h:66
Farm::FP_AmmoniumSulphate
virtual bool FP_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply Ammonium Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:882
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
Farm::HayBailing
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
Definition: FarmFuncs.cpp:1507
de_wwl_hay_bailing
Definition: DE_WinterWheatLate.h:95
de_wwl_ferti_s2
Definition: DE_WinterWheatLate.h:75
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
Farm::StrawChopping
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: FarmFuncs.cpp:1475
DE_WinterWheatLate::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DE_WinterWheatLate.h:122
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
de_wwl_fungicide2
Definition: DE_WinterWheatLate.h:89
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
Farm::FA_K
virtual bool FA_K(LE *a_field, double a_user, int a_days)
Apply K fertilizer, on a_field owned by stock farmer.
Definition: FarmFuncs.cpp:1038
Crop::StartUpCrop
bool StartUpCrop(int a_spring, std::vector< std::vector< int >> a_flexdates, int a_todo)
Holds the translation between the farm operation enum for each cropand the farm management category a...
Definition: Farm.cpp:652
Landscape::SupplyPestIncidenceFactor
double SupplyPestIncidenceFactor()
Returns Landscape::m_pestincidencefactor.
Definition: Landscape.h:325
DE_WINTERWHEATLATE_BASE
#define DE_WINTERWHEATLATE_BASE
Definition: DE_WinterWheatLate.h:51
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
Crop::m_ManagementCategories
vector< FarmManagementCategory > m_ManagementCategories
Holds the translation between the farm operation enum for each crop and the farm management category ...
Definition: Farm.h:530
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
Farm::FP_P
virtual bool FP_P(LE *a_field, double a_user, int a_days)
Apply P fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:687
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
Farm::AutumnRoll
virtual bool AutumnRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the autumn on a_field.
Definition: FarmFuncs.cpp:299
Farm::FP_K
virtual bool FP_K(LE *a_field, double a_user, int a_days)
Apply K fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:726
LE::GetGreenBiomass
virtual double GetGreenBiomass(void)
Definition: Elements.h:160
Farm::ShallowHarrow
virtual bool ShallowHarrow(LE *a_field, double a_user, int a_days)
Carry out a shallow harrow event on a_field, e.g., after grass cutting event.
Definition: FarmFuncs.cpp:473
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
de_wwl_ferti_p5
Definition: DE_WinterWheatLate.h:81
g_landscape_ptr
Landscape * g_landscape_ptr
Definition: Landscape.cpp:352
de_wwl_fungicide1
Definition: DE_WinterWheatLate.h:88
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
Farm::AutumnPlough
virtual bool AutumnPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the autumn on a_field.
Definition: FarmFuncs.cpp:212
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Farm::FA_AmmoniumSulphate
virtual bool FA_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply ammonium sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1081
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
DE_WWL_AUTUMN_PLOUGH
#define DE_WWL_AUTUMN_PLOUGH
A flag used to indicate autumn ploughing status.
Definition: DE_WinterWheatLate.h:55
de_wwl_insecticide2
Definition: DE_WinterWheatLate.h:86
de_wwl_autumn_plough
Definition: DE_WinterWheatLate.h:69
Crop::m_date_modifier
static int m_date_modifier
Holds a value that shifts test pesticide use by this many days in crops modified to use it.
Definition: Farm.h:514
Farm::AutumnSow
virtual bool AutumnSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out a sowing event in the autumn on a_field.
Definition: FarmFuncs.cpp:360
de_wwl_foobar
Definition: DE_WinterWheatLate.h:96
DE_WWL_DECIDE_TO_GR
#define DE_WWL_DECIDE_TO_GR
Definition: DE_WinterWheatLate.h:58
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
de_wwl_herbicide1
Definition: DE_WinterWheatLate.h:83
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
de_wwl_ferti_s3
Definition: DE_WinterWheatLate.h:77
de_wwl_autumn_roll
Definition: DE_WinterWheatLate.h:70
de_wwl_ferti_s5
Definition: DE_WinterWheatLate.h:82
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
de_wwl_ferti_s4
Definition: DE_WinterWheatLate.h:79
de_wwl_ferti_p1
Definition: DE_WinterWheatLate.h:74
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
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:751