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_Triticale Class Reference

DE_Triticale class
. More...

#include <DE_Triticale.h>

Inheritance diagram for DE_Triticale:
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_Triticale (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_Triticale class
.

See DE_Triticale.h::DE_TriticaleToDo for a complete list of all possible events triggered codes by the Triticale management plan. When triggered these events are handled by Farm and are available as information for other objects such as animal and bird models.

Constructor & Destructor Documentation

◆ DE_Triticale()

DE_Triticale::DE_Triticale ( 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(15, 9);
121  }

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

Member Function Documentation

◆ Do()

bool DE_Triticale::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.

91 {
92  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
93  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
94  m_field = a_field;
95  m_ev = a_ev;
96  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
97  bool flag = false;
98  int d1 = 0;
99  int noDates = 1;
100  TTypesOfVegetation l_tov = tov_DETriticale; // The current type - change to match the crop you have
101 /**********************************************To Here *************************************************************************/
102 
103  // Depending what event has occured jump to the correct bit of code
104  switch (m_ev->m_todo)
105  {
106  case de_wt_start:
107  {
108  DE_WT_NOTILL = false;
109  DE_WT_DECIDE_TO_GR = false;
110 
112 
113  m_last_date = g_date->DayInYear(5, 9); // Should match the last flexdate below
114  //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
115  std::vector<std::vector<int>> flexdates(2 + 1, std::vector<int>(2, 0));
116  // Set up the date management stuff
117  // Start and stop dates for all events after harvest
118  flexdates[0][1] = g_date->DayInYear(31, 8); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use
119  // Now these are done in pairs, start & end for each operation. If its not used then -1
120  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
121  flexdates[1][1] = g_date->DayInYear(5, 9); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
122  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
123  flexdates[2][1] = g_date->DayInYear(5, 9); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 2)
124 
125  // 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
126  int isSpring = 0;
127  if (StartUpCrop(isSpring, flexdates, int(de_wt_growth_regulator1))) break;
128 
129  // End single block date checking code. Please see next line comment as well.
130  // Reinit d1 to first possible starting date.
131  d1 = g_date->OldDays() + g_date->DayInYear(15, 8) + isSpring;
133  break;
134  }
135  break;
136 
137  // This is the first real farm operation
138  case de_wt_autumn_harrow:
139  if (m_ev->m_lock || m_farm->DoIt(100))
140  {
141  if (!m_farm->AutumnHarrow(m_field, 0.0, g_date->DayInYear(15, 9) - g_date->DayInYear())) {
143  break;
144  }
145  }
146  if (m_farm->IsStockFarmer()) //Stock Farmer // P thread (K is applied before harvest)
147  {
149  }
151  break;
152 
153  case de_wt_ferti_s1:
154  if (m_ev->m_lock || m_farm->DoIt_prob(0.30))
155  {
156  if (!m_farm->FA_PK(m_field, 0.0, g_date->DayInYear(15, 9) - g_date->DayInYear())) {
158  break;
159  }
161  break;
162  }
163  else if (m_ev->m_lock || m_farm->DoIt_prob(0.15 / 0.70)) {
165  break;
166  }
168  break;
169 
170  case de_wt_ferti_p1:
171  if (m_ev->m_lock || m_farm->DoIt_prob(0.30))
172  {
173  if (!m_farm->FP_PK(m_field, 0.0, g_date->DayInYear(15, 9) - g_date->DayInYear())) {
175  break;
176  }
178  break;
179  }
180  else if (m_ev->m_lock || m_farm->DoIt_prob(0.15 / 0.70)) {
182  break;
183  }
185  break;
186 
187  case de_wt_ferti_s2:
188  if (!m_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(15, 9) - g_date->DayInYear())) {
190  break;
191  }
193  break;
194 
195  case de_wt_ferti_p2:
196  if (!m_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(15, 9) - g_date->DayInYear())) {
198  break;
199  }
201  break;
202 
203  case de_wt_mole_plough:
204  if (m_ev->m_lock || m_farm->DoIt_prob(0.08)) {
205  if (!m_farm->DeepPlough(m_field, 0.0, g_date->DayInYear(20, 10) - g_date->DayInYear())) {
207  break;
208  }
210  break;
211  }
212  else if (m_ev->m_lock || m_farm->DoIt_prob(0.67 / 0.92)) {
214  break;
215  }
217  break;
218 
219  case de_wt_autumn_plough:
220  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(20, 10) - g_date->DayInYear())) {
222  break;
223  }
225  break;
226 
228  if (!m_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(20, 10) - g_date->DayInYear())) {
230  break;
231  }
233  break;
234  //LKM: no-till and till branches meet here
235  case de_wt_autumn_sow:
236  if (!m_farm->AutumnSow(m_field, 0.0, g_date->DayInYear(25, 10) - g_date->DayInYear())) {
238  break;
239  }
240  // here comes a fork of event:
241  SimpleEvent_(g_date->Date() + 7, de_wt_herbicide1, false, m_farm, m_field); // Herbicide thread
242  SimpleEvent_(g_date->Date() + 14 + m_date_modifier, de_wt_insecticide1, false, m_farm, m_field); // Insecticide thread
243  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, de_wt_growth_regulator1, false, m_farm, m_field); // GR thread = MAIN
244  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 4) + 365, de_wt_fungicide1, false, m_farm, m_field); // Fungicide thread
245  if (m_farm->IsStockFarmer()) //Stock Farmer // P thread (K is applied before harvest)
246  {
248  }
249  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, de_wt_ferti_p3, false, m_farm, m_field);
250  if (m_farm->IsStockFarmer()) //Stock Farmer
251  {
253  }
254  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, de_wt_ferti_p4, false, m_farm, m_field);
255  break;
256 
257  case de_wt_herbicide1: // The first of the pesticide managements.
258  // Here comes the herbicide thread
259  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
260  {
261  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
263  break;
264  }
265  }
267  break;
268  case de_wt_herbicide2:
269  if (m_ev->m_lock || m_farm->DoIt_prob(0.60))
270  {
271  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
273  break;
274  }
275  }
276  // End of thread
277  break;
278 
279  case de_wt_insecticide1:
280  // Here comes the insecticide thread
281  if (m_ev->m_lock || m_farm->DoIt_prob(0.10 * g_landscape_ptr->SupplyPestIncidenceFactor())) // only 10% use insecticides
282  {
283  if (m_field->GetGreenBiomass() <= 0) {
285  }
286  else
287  {
288  // here we check whether we are using ERA pesticide or not
289  d1 = g_date->DayInYear(10, 11) - g_date->DayInYear();
290  if (!cfg_pest_wintertriticale_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
291  {
292  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
293  }
294  else {
296  }
297  if (!flag) {
299  break;
300  }
301  }
302  }
304  break;
305  case de_wt_insecticide2:
307  {
308  // here we check whether we are using ERA pesticide or not
309  d1 = g_date->DayInYear(15, 5) - g_date->DayInYear();
310  if (!cfg_pest_wintertriticale_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
311  {
312  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
313  }
314  else {
316  }
317  if (!flag) {
319  break;
320  }
321  }
323  break;
324  case de_wt_insecticide3:
326  {
327  // here we check whether we are using ERA pesticide or not
328  d1 = g_date->DayInYear(31, 5) - g_date->DayInYear();
329  if (!cfg_pest_wintertriticale_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
330  {
331  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
332  }
333  else {
335  }
336  if (!flag) {
338  break;
339  }
340  }
341  // End of thread
342  break;
343 
344  case de_wt_fungicide1:
345  // Here comes the fungicide thread
346  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
347  {
348  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
350  break;
351  }
352  }
353  d1 = g_date->Date() + 14;
354  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 5)) {
355  d1 = g_date->OldDays() + g_date->DayInYear(1, 5);
356  }
358  break;
359  case de_wt_fungicide2:
360  if (m_ev->m_lock || m_farm->DoIt_prob(0.70))
361  {
362  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
364  break;
365  }
366  }
367  d1 = g_date->Date() + 14;
368  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 5)) {
369  d1 = g_date->OldDays() + g_date->DayInYear(15, 5);
370  }
372  break;
373  case de_wt_fungicide3:
374  if (m_ev->m_lock || m_farm->DoIt_prob(0.05))
375  {
376  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 6) - g_date->DayInYear())) {
378  break;
379  }
380  }
381  // End of thread
382  break;
383 
385  // Here comes the GR thread
386  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
387  {
388  if (!m_farm->GrowthRegulator(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
390  break;
391  }
392  else
393  {
394  //We need to remember who did GR I
395  DE_WT_DECIDE_TO_GR = true;
396  }
397  }
399  break;
401  if (m_ev->m_lock || m_farm->DoIt_prob(0.44 * DE_WT_DECIDE_TO_GR)) // 40% of all farmers
402  {
403  if (!m_farm->GrowthRegulator(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
405  break;
406  }
407  }
409  break;
410 
411  case de_wt_ferti_s3:
412  // Here comes the P thread
413  if (m_ev->m_lock || m_farm->DoIt_prob(0.30))
414  {
415  if (!m_farm->FA_PK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
417  break;
418  }
419  }
420  // End of thread
421  break;
422  case de_wt_ferti_p3:
423  if (m_ev->m_lock || m_farm->DoIt_prob(0.30))
424  {
425  if (!m_farm->FP_PK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
427  break;
428  }
429  }
430  // End of thread
431  break;
432  case de_wt_ferti_p4:
433  // Here comes the MAIN thread
434  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
436  break;
437  }
438  d1 = g_date->Date() + 10;
439  if (d1 < g_date->OldDays() + g_date->DayInYear(20, 3)) {
440  d1 = g_date->OldDays() + g_date->DayInYear(20, 3);
441  }
443  break;
444 
445  case de_wt_ferti_s4:
446  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
448  break;
449  }
450  d1 = g_date->Date() + 10;
451  if (d1 < g_date->OldDays() + g_date->DayInYear(20, 3)) {
452  d1 = g_date->OldDays() + g_date->DayInYear(20, 3);
453  }
455  break;
456 
457  case de_wt_ferti_p5:
458  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
459  {
460  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
462  break;
463  }
464  }
465  d1 = g_date->Date() + 10;
466  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 4)) {
467  d1 = g_date->OldDays() + g_date->DayInYear(15, 4);
468  }
470  break;
471 
472  case de_wt_ferti_p6:
473  if (m_ev->m_lock || m_farm->DoIt_prob(0.15))
474  {
475  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
477  break;
478  }
479  }
480  // end of threat
481  break;
482  case de_wt_ferti_s5:
483  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
484  {
485  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
487  break;
488  }
489  }
490  d1 = g_date->Date() + 10;
491  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 4)) {
492  d1 = g_date->OldDays() + g_date->DayInYear(15, 4);
493  }
495  break;
496 
497  case de_wt_ferti_s6:
498  if (m_ev->m_lock || m_farm->DoIt_prob(0.15))
499  {
500  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
502  break;
503  }
504  }
505  // end of threat
506  break;
507 
508  case de_wt_harvest:
509  // Here the MAIN thread continues
510  // We don't move harvest days
511  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
513  break;
514  }
515  // 90% of farmers will leave straw on field and rest will do hay bailing
516  if (m_farm->DoIt_prob(0.90))
517  {
519  }
520  else
521  {
523  }
524  break;
526  if (!m_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
528  break;
529  }
530  done = true;
531  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
532  // END of MAIN THREAD
533  break;
534  case de_wt_hay_bailing:
535  if (!m_farm->HayBailing(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
537  break;
538  }
539  done = true;
540  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
541  // END of MAIN THREAD
542  break;
543  default:
544  g_msg->Warn(WARN_BUG, "DE_Triticale::Do(): "
545  "Unknown event type! ", "");
546  exit(1);
547  }
548  return done;
549 }

References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnSow(), cfg_pest_product_amounts, cfg_pest_wintertriticale_on, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), de_wt_autumn_harrow, de_wt_autumn_harrow_notill, de_wt_autumn_plough, de_wt_autumn_sow, DE_WT_DECIDE_TO_GR, de_wt_ferti_p1, de_wt_ferti_p2, de_wt_ferti_p3, de_wt_ferti_p4, de_wt_ferti_p5, de_wt_ferti_p6, de_wt_ferti_s1, de_wt_ferti_s2, de_wt_ferti_s3, de_wt_ferti_s4, de_wt_ferti_s5, de_wt_ferti_s6, de_wt_fungicide1, de_wt_fungicide2, de_wt_fungicide3, de_wt_growth_regulator1, de_wt_growth_regulator2, de_wt_harvest, de_wt_hay_bailing, de_wt_herbicide1, de_wt_herbicide2, de_wt_insecticide1, de_wt_insecticide2, de_wt_insecticide3, de_wt_mole_plough, DE_WT_NOTILL, de_wt_start, de_wt_straw_chopping, Farm::DeepPlough(), Farm::DoIt(), Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FA_Manure(), Farm::FA_PK(), Farm::FP_AmmoniumSulphate(), Farm::FP_Manure(), Farm::FP_PK(), 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::StartUpCrop(), Farm::StrawChopping(), Landscape::SupplyPestIncidenceFactor(), tov_DETriticale, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void DE_Triticale::SetUpFarmCategoryInformation ( )
inline
122  {
123  const int elements = 2 + (de_wt_foobar - DE_TRITICALE_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_wt_start = 1, // Compulsory, must always be 1 (one).
131  fmc_Others, // de_wt_sleep_all_day
132  fmc_Cultivation, // de_wt_autumn_plough,
133  fmc_Cultivation, // de_wt_mole_plough
134  fmc_Cultivation, // de_wt_autumn_harrow,
135  fmc_Cultivation, // de_wt_autumn_harrow_notill,
136  fmc_Cultivation, // de_wt_autmn_sow,
137  fmc_Fertilizer, // de_wt_ferti_s1, // PK
138  fmc_Fertilizer, // de_wt_ferti_p1, // PK
139  fmc_Fertilizer, // de_wt_ferti_s2,
140  fmc_Fertilizer, // de_wt_ferti_p2,
141  fmc_Fertilizer, // de_wt_ferti_s3,
142  fmc_Fertilizer, // de_wt_ferti_p3,
143  fmc_Fertilizer, // de_wt_ferti_s4,
144  fmc_Fertilizer, // de_wt_ferti_p4,
145  fmc_Fertilizer, // de_wt_ferti_s5,
146  fmc_Fertilizer, // de_wt_ferti_p5,
147  fmc_Fertilizer, // de_wt_ferti_s6,
148  fmc_Fertilizer, // de_wt_ferti_p6,
149  fmc_Herbicide, // de_wt_herbicide1,
150  fmc_Herbicide, // de_wt_herbicide2,
151  fmc_Insecticide, // de_wt_insecticide1,
152  fmc_Insecticide, // de_wt_insecticide2,
153  fmc_Insecticide, // de_wt_insecticide3,
154  fmc_Fungicide, // de_wt_fungicide1,
155  fmc_Fungicide, // de_wt_fungicide2,
156  fmc_Fungicide, // de_wt_fungicide3,
157  fmc_Others, // de_wt_growth_regulator1,
158  fmc_Others, // de_wt_growth_regulator2,
159  fmc_Harvest, // de_wt_harvest,
160  fmc_Others, // de_wt_straw_chopping,
161  fmc_Others, // de_wt_hay_bailing,
162  // no foobar entry
163 
164  };
165  // Iterate over the catlist elements and copy them to vector
166  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
167 
168  }

References DE_TRITICALE_BASE, de_wt_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_Triticale().


The documentation for this class was generated from the following files:
de_wt_ferti_s6
Definition: DE_Triticale.h:81
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
de_wt_fungicide2
Definition: DE_Triticale.h:89
de_wt_start
Definition: DE_Triticale.h:64
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
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
g_landscape_ptr
Landscape * g_landscape_ptr
Definition: Landscape.cpp:352
de_wt_insecticide3
Definition: DE_Triticale.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
de_wt_growth_regulator1
Definition: DE_Triticale.h:91
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_Triticale::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DE_Triticale.h:122
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
de_wt_herbicide1
Definition: DE_Triticale.h:83
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
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
Farm::FA_Manure
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1110
de_wt_ferti_p4
Definition: DE_Triticale.h:78
de_wt_ferti_p2
Definition: DE_Triticale.h:74
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
de_wt_autumn_harrow
Definition: DE_Triticale.h:68
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
DE_TRITICALE_BASE
#define DE_TRITICALE_BASE
Definition: DE_Triticale.h:52
de_wt_fungicide3
Definition: DE_Triticale.h:90
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
tov_DETriticale
Definition: LandscapeFarmingEnums.h:505
Farm::FP_PK
virtual bool FP_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:673
CfgBool::value
bool value() const
Definition: Configurator.h:164
Farm::FP_Manure
virtual bool FP_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:896
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
de_wt_ferti_p1
Definition: DE_Triticale.h:72
de_wt_harvest
Definition: DE_Triticale.h:93
Calendar::Date
long Date(void)
Definition: Calendar.h:57
de_wt_autumn_sow
Definition: DE_Triticale.h:70
de_wt_ferti_s4
Definition: DE_Triticale.h:77
de_wt_ferti_p5
Definition: DE_Triticale.h:80
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
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
cfg_pest_wintertriticale_on
CfgBool cfg_pest_wintertriticale_on
Turn on pesticides for winter triticale.
de_wt_fungicide1
Definition: DE_Triticale.h:88
de_wt_ferti_s3
Definition: DE_Triticale.h:75
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
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_wt_insecticide2
Definition: DE_Triticale.h:86
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
de_wt_straw_chopping
Definition: DE_Triticale.h:94
de_wt_mole_plough
Definition: DE_Triticale.h:67
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_wt_foobar
Definition: DE_Triticale.h:96
de_wt_autumn_plough
Definition: DE_Triticale.h:66
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
de_wt_growth_regulator2
Definition: DE_Triticale.h:92
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
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
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
de_wt_ferti_s1
Definition: DE_Triticale.h:71
de_wt_autumn_harrow_notill
Definition: DE_Triticale.h:69
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
de_wt_ferti_p6
Definition: DE_Triticale.h:82
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::AutumnHarrow
virtual bool AutumnHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the autumn on a_field.
Definition: FarmFuncs.cpp:285
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_wt_herbicide2
Definition: DE_Triticale.h:84
Farm::DeepPlough
virtual bool DeepPlough(LE *a_field, double a_user, int a_days)
Carry out a deep ploughing event on a_field.
Definition: FarmFuncs.cpp:408
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
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
DE_WT_NOTILL
#define DE_WT_NOTILL
A flag used to indicate autumn ploughing status.
Definition: DE_Triticale.h:56
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
de_wt_hay_bailing
Definition: DE_Triticale.h:95
de_wt_ferti_s5
Definition: DE_Triticale.h:79
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
DE_WT_DECIDE_TO_GR
#define DE_WT_DECIDE_TO_GR
Definition: DE_Triticale.h:57
de_wt_insecticide1
Definition: DE_Triticale.h:85
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Farm::FA_PK
virtual bool FA_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1010
de_wt_ferti_p3
Definition: DE_Triticale.h:76
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
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
de_wt_ferti_s2
Definition: DE_Triticale.h:73