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

DE_Orchard class
. More...

#include <DE_Orchard.h>

Inheritance diagram for DE_Orchard:
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_Orchard (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_Orchard class
.

See DE_Orchard.h::DE_OrchardToDo for a complete list of all possible events triggered codes by the Spring Rye 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_Orchard()

DE_Orchard::DE_Orchard ( 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.

117  : Crop(a_tov, a_toc, a_L)
118  {
124  m_first_date = g_date->DayInYear(31, 12);
126  }

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

Member Function Documentation

◆ Do()

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

90 {
91 /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
92  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
93  m_field = a_field;
94  m_ev = a_ev;
95  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
96  bool flag = false;
97  int d1 = 0;
98  int noDates = 1;
99  TTypesOfVegetation l_tov = tov_DEOrchard; // The current type - change to match the crop you have
100 /**********************************************To Here *************************************************************************/
101  // Depending what event has occured jump to the correct bit of code
102  switch (m_ev->m_todo)
103  {
104  case de_orch_start:
105  {
107 
108  m_last_date = g_date->DayInYear(15, 9); // Should match the last flexdate below
109  //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
110  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
111  // Set up the date management stuff
112  // Start and stop dates for all events after harvest
113  flexdates[0][1] = g_date->DayInYear(15, 9); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use
114 
115  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
116  flexdates[1][1] = g_date->DayInYear(15, 9); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
117 
118  // 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
119  int isSpring = 0;
120  if (StartUpCrop(isSpring, flexdates, int(de_orch_ferti_s2))) break;
121 
122  // End single block date checking code. Please see next line comment as well.
123  // Reinit d1 to first possible starting date.
124  d1 = g_date->OldDays() + g_date->DayInYear(1, 11) + isSpring;
125  // OK, let's go.
126  // Here we queue up the first event - this differs depending on whether we have field on sandy (2) or clay (1) soils
127  if (a_farm->IsStockFarmer()) //Stock Farmer
128  {
129  SimpleEvent(d1, de_orch_ferti_s1, false);
130  break;
131  }
132  else SimpleEvent(d1, de_orch_ferti_p1, false);
133  break;
134  }
135  break;
136 
137  // This is the first real farm operation
138  case de_orch_ferti_p1:
139  if (m_ev->m_lock || m_farm->DoIt_prob(0.30))
140  {
141  if (!m_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(31, 12) - g_date->DayInYear())) {
143  break;
144  }
145  }
147  break;
148 
149  case de_orch_ferti_s1:
150  if (m_ev->m_lock || m_farm->DoIt_prob(0.30))
151  {
152  if (!m_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(31, 12) - g_date->DayInYear())) {
154  break;
155  }
156  }
158  break;
159 
160  case de_orch_ferti_p2:
161  if (m_ev->m_lock || m_farm->DoIt_prob(1.0))
162  {
163  if (!m_farm->FP_PK(m_field, 0.0, g_date->DayInYear(28, 2) - g_date->DayInYear())) {
165  break;
166  }
167  }
169  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(25, 3), de_orch_fungicide1, false, m_farm, m_field); // main thread
170  break;
171 
172  case de_orch_ferti_s2:
173  if (m_ev->m_lock || m_farm->DoIt_prob(1.0))
174  {
175  if (!m_farm->FA_PK(m_field, 0.0, g_date->DayInYear(28, 2) - g_date->DayInYear())) {
177  break;
178  }
179  }
181  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(25, 3), de_orch_fungicide1, false, m_farm, m_field); // main thread
182  break;
183 
184  case de_orch_ferti_p3:
185  if (m_ev->m_lock || m_farm->DoIt_prob(0.3))
186  {
187  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
189  break;
190  }
191  }
193  break;
194 
195  case de_orch_ferti_s3:
196  if (m_ev->m_lock || m_farm->DoIt_prob(0.3))
197  {
198  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
200  break;
201  }
202  }
204  break;
205 
206  case de_orch_ferti_p4:
207  if (m_ev->m_lock || m_farm->DoIt_prob(0.6))
208  {
209  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
211  break;
212  }
213  }
215  break;
216 
217  case de_orch_ferti_s4:
218  if (m_ev->m_lock || m_farm->DoIt_prob(0.6))
219  {
220  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
222  break;
223  }
224  }
226  break;
227 
228  case de_orch_ferti_p5:
229  if (m_ev->m_lock || m_farm->DoIt_prob(0.5))
230  {
231  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
233  break;
234  }
235  }
236  break;
237 
238  case de_orch_ferti_s5:
239  if (m_ev->m_lock || m_farm->DoIt_prob(0.5))
240  {
241  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
243  break;
244  }
245  }
246  break;
247 
248  case de_orch_fungicide1:
249  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
250  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(1, 4) - g_date->DayInYear())) {
252  break;
253  }
254  }
256  break;
257 
258  case de_orch_fungicide2:
259  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
260  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(8, 4) - g_date->DayInYear())) {
262  break;
263  }
264  }
266  break;
267 
268  case de_orch_fungicide3:
269  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
270  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(11, 4) - g_date->DayInYear())) {
272  break;
273  }
274  }
276  break;
277 
278  case de_orch_fungicide4:
279  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
280  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
282  break;
283  }
284  }
286  break;
287 
289  // here we check whether we are using ERA pesticide or not
290  d1 = g_date->DayInYear(15, 4) - g_date->DayInYear();
292  {
293  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
294  {
295  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
296  }
297  else {
298  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
299  }
300  if (!flag) {
302  break;
303  }
304  }
305 
307  break;
308 
309  case de_orch_fungicide5:
310  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
311  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(22, 4) - g_date->DayInYear())) {
313  break;
314  }
315  }
317  break;
318 
319  case de_orch_fungicide6:
320  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
321  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
323  break;
324  }
325  }
327  SimpleEvent_(g_date->Date() + 7, de_orch_fungicide7, false, m_farm, m_field); // main thread
329  break;
330 
331  case de_orch_herbicide:
332  if (m_ev->m_lock || m_farm->DoIt_prob(0.6)) {
333  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(7, 5) - g_date->DayInYear())) {
335  break;
336  }
337  }
338  break;
339 
341  // here we check whether we are using ERA pesticide or not
342  d1 = g_date->DayInYear(7, 5) - g_date->DayInYear();
344  {
345  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
346  {
347  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
348  }
349  else {
350  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
351  }
352  if (!flag) {
354  break;
355  }
356  }
358  break;
359 
361  // here we check whether we are using ERA pesticide or not
362  d1 = g_date->DayInYear(22, 5) - g_date->DayInYear();
364  {
365  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
366  {
367  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
368  }
369  else {
370  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
371  }
372  if (!flag) {
374  break;
375  }
376  }
377  break;
378 
379  case de_orch_fungicide7:
380  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
381  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(7, 5) - g_date->DayInYear())) {
383  break;
384  }
385  }
386  SimpleEvent_(g_date->Date() + 7, de_orch_fungicide8, false, m_farm, m_field); // main thread
387  break;
388 
389  case de_orch_fungicide8:
390  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
391  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(14, 5) - g_date->DayInYear())) {
393  break;
394  }
395  }
396  SimpleEvent_(g_date->Date() + 7, de_orch_fungicide9, false, m_farm, m_field); // main thread
397  break;
398 
399  case de_orch_fungicide9:
400  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
401  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(21, 5) - g_date->DayInYear())) {
403  break;
404  }
405  }
406  SimpleEvent_(g_date->Date() + 7, de_orch_fungicide10, false, m_farm, m_field); // main thread
407  break;
408 
409  case de_orch_fungicide10:
410  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
411  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
413  break;
414  }
415  }
417  break;
418 
420  // here we check whether we are using ERA pesticide or not
421  d1 = g_date->DayInYear(31, 5) - g_date->DayInYear();
423  {
424  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
425  {
426  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
427  }
428  else {
429  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
430  }
431  if (!flag) {
433  break;
434  }
435  }
436  d1 = g_date->Date() + 14;
437  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 6)) {
438  d1 = g_date->OldDays() + g_date->DayInYear(1, 6);
439  }
440  SimpleEvent_(g_date->Date() + 7, de_orch_fungicide11, false, m_farm, m_field); // main thread
442  break;
443 
445  // here we check whether we are using ERA pesticide or not
446  d1 = g_date->DayInYear(15, 6) - g_date->DayInYear();
448  {
449  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
450  {
451  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
452  }
453  else {
454  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
455  }
456  if (!flag) {
458  break;
459  }
460  }
462  break;
463 
464 
466  // here we check whether we are using ERA pesticide or not
467  d1 = g_date->DayInYear(30, 6) - g_date->DayInYear();
469  {
470  if (!cfg_pest_orchard_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
471  {
472  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
473  }
474  else {
475  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 1);
476  }
477  if (!flag) {
479  break;
480  }
481  }
482  // of thread
483  break;
484 
485  case de_orch_fungicide11:
486  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
487  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(7, 6) - g_date->DayInYear())) {
489  break;
490  }
491  }
492  SimpleEvent_(g_date->Date() + 7, de_orch_fungicide12, false, m_farm, m_field); // main thread
493  break;
494 
495  case de_orch_fungicide12:
496  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
497  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(14, 6) - g_date->DayInYear())) {
499  break;
500  }
501  }
502  SimpleEvent_(g_date->Date() + 7, de_orch_fungicide13, false, m_farm, m_field); // main thread
503  break;
504 
505  case de_orch_fungicide13:
506  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
507  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(21, 6) - g_date->DayInYear())) {
509  break;
510  }
511  }
512  SimpleEvent_(g_date->Date() + 7, de_orch_fungicide14, false, m_farm, m_field); // main thread
513  break;
514 
515  case de_orch_fungicide14:
516  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
517  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
519  break;
520  }
521  }
522  SimpleEvent_(g_date->Date() + 7, de_orch_fungicide15, false, m_farm, m_field); // main thread
523  break;
524 
525  case de_orch_fungicide15:
526  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
527  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(7, 7) - g_date->DayInYear())) {
529  break;
530  }
531  }
533  break;
534 
535  case de_orch_fungicide16:
536  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
537  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(25, 7) - g_date->DayInYear())) {
539  break;
540  }
541  }
543  break;
544 
545  case de_orch_fungicide17:
546  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
547  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
549  break;
550  }
551  }
553  break;
554 
555  case de_orch_fungicide18:
556  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
557  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(15, 9) - g_date->DayInYear())) {
559  break;
560  }
561  }
563  break;
564 
565  case de_orch_harvest:
566  if (!a_farm->FruitHarvest(m_field, 0.0, g_date->DayInYear(1, 11) - g_date->DayInYear())) {
567  SimpleEvent(g_date->Date() + 1, de_orch_harvest, true);
568  break;
569  }
570  done = true;
571  break;
572 
573  default:
574  g_msg->Warn(WARN_BUG, "DE_ORCHARD::Do(): "
575  "Unknown event type! ", "");
576  exit(1);
577  }
578  return done;
579 }

References cfg_pest_orchard_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), de_orch_ferti_p1, de_orch_ferti_p2, de_orch_ferti_p3, de_orch_ferti_p4, de_orch_ferti_p5, de_orch_ferti_s1, de_orch_ferti_s2, de_orch_ferti_s3, de_orch_ferti_s4, de_orch_ferti_s5, de_orch_fungicide1, de_orch_fungicide10, de_orch_fungicide11, de_orch_fungicide12, de_orch_fungicide13, de_orch_fungicide14, de_orch_fungicide15, de_orch_fungicide16, de_orch_fungicide17, de_orch_fungicide18, de_orch_fungicide2, de_orch_fungicide3, de_orch_fungicide4, de_orch_fungicide5, de_orch_fungicide6, de_orch_fungicide7, de_orch_fungicide8, de_orch_fungicide9, de_orch_harvest, de_orch_herbicide, de_orch_insecticide1, de_orch_insecticide2, de_orch_insecticide3, de_orch_insecticide4, de_orch_insecticide5, de_orch_insecticide6, de_orch_start, Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_PK(), Farm::FP_AmmoniumSulphate(), Farm::FP_Manure(), Farm::FP_NPK(), Farm::FP_PK(), Farm::FruitHarvest(), Farm::FungicideTreat(), g_date, g_landscape_ptr, g_msg, 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(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Crop::StartUpCrop(), Landscape::SupplyPestIncidenceFactor(), tov_DEOrchard, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void DE_Orchard::SetUpFarmCategoryInformation ( )
inline
127  {
128  const int elements = 2 + (de_orch_foobar - DE_ORCH_BASE);
130 
131  FarmManagementCategory catlist[elements] =
132  {
133  fmc_Others, // zero element unused but must be here
134  // ALL THE NECESSARY ENTRIES HERE
135  fmc_Others, // de_orch_start = 1, // Compulsory, must always be 1 (one).
136  fmc_Harvest, // de_orch_harvest
137  fmc_Fertilizer, // de_orch_ferti_p1,
138  fmc_Fertilizer, // de_orch_ferti_s1,
139  fmc_Fertilizer, // de_orch_ferti_p2,
140  fmc_Fertilizer, // de_orch_ferti_s2,
141  fmc_Fertilizer, // de_orch_ferti_p3,
142  fmc_Fertilizer, // de_orch_ferti_s3,
143  fmc_Fertilizer, // de_orch_ferti_p4,
144  fmc_Fertilizer, // de_orch_ferti_s4,
145  fmc_Fertilizer, // de_orch_ferti_p5,
146  fmc_Fertilizer, // de_orch_ferti_s5,
147  fmc_Fungicide, // de_orch_fungicide,
148  fmc_Fungicide, // de_orch_fungicide,
149  fmc_Fungicide, // de_orch_fungicide,
150  fmc_Fungicide, // de_orch_fungicide,
151  fmc_Fungicide, // de_orch_fungicide,
152  fmc_Fungicide, // de_orch_fungicide,
153  fmc_Fungicide, // de_orch_fungicide,
154  fmc_Fungicide, // de_orch_fungicide,
155  fmc_Fungicide, // de_orch_fungicide,
156  fmc_Fungicide, // de_orch_fungicide,
157  fmc_Fungicide, // de_orch_fungicide,
158  fmc_Fungicide, // de_orch_fungicide,
159  fmc_Fungicide, // de_orch_fungicide,
160  fmc_Fungicide, // de_orch_fungicide,
161  fmc_Fungicide, // de_orch_fungicide,
162  fmc_Fungicide, // de_orch_fungicide,
163  fmc_Fungicide, // de_orch_fungicide,
164  fmc_Fungicide, // de_orch_fungicide,
165  fmc_Insecticide, // de_orch_insecticide,
166  fmc_Insecticide, // de_orch_insecticide,
167  fmc_Insecticide, // de_orch_insecticide,
168  fmc_Insecticide, // de_orch_insecticide,
169  fmc_Insecticide, // de_orch_insecticide,
170  fmc_Insecticide, // de_orch_insecticide,
171  fmc_Herbicide, // de_orch_herbicide,
172 
173  // no foobar entry
174 
175  };
176  // Iterate over the catlist elements and copy them to vector
177  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
178 
179  }

References DE_ORCH_BASE, de_orch_foobar, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DE_Orchard().


The documentation for this class was generated from the following files:
de_orch_fungicide8
Definition: DE_Orchard.h:83
DE_ORCH_BASE
#define DE_ORCH_BASE
Definition: DE_Orchard.h:51
de_orch_fungicide13
Definition: DE_Orchard.h:88
de_orch_fungicide17
Definition: DE_Orchard.h:92
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
de_orch_fungicide11
Definition: DE_Orchard.h:86
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
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
de_orch_insecticide6
Definition: DE_Orchard.h:99
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_orch_ferti_p3
Definition: DE_Orchard.h:70
de_orch_ferti_s2
Definition: DE_Orchard.h:69
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::FP_NPK
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:645
de_orch_fungicide9
Definition: DE_Orchard.h:84
de_orch_fungicide16
Definition: DE_Orchard.h:91
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
de_orch_insecticide5
Definition: DE_Orchard.h:98
de_orch_fungicide1
Definition: DE_Orchard.h:76
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_orch_herbicide
Definition: DE_Orchard.h:100
de_orch_harvest
Definition: DE_Orchard.h:65
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
de_orch_fungicide15
Definition: DE_Orchard.h:90
de_orch_fungicide3
Definition: DE_Orchard.h:78
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Farm::FA_NPK
virtual bool FA_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:982
de_orch_fungicide2
Definition: DE_Orchard.h:77
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
de_orch_ferti_p2
Definition: DE_Orchard.h:68
de_orch_fungicide10
Definition: DE_Orchard.h:85
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
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_orch_insecticide2
Definition: DE_Orchard.h:95
CfgBool::value
bool value() const
Definition: Configurator.h:164
de_orch_fungicide12
Definition: DE_Orchard.h:87
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_Orchard::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DE_Orchard.h:127
de_orch_fungicide7
Definition: DE_Orchard.h:82
cfg_pest_orchard_on
CfgBool cfg_pest_orchard_on
Turn on pesticides for orchard.
Calendar::Date
long Date(void)
Definition: Calendar.h:57
de_orch_ferti_s3
Definition: DE_Orchard.h:71
de_orch_ferti_p1
Definition: DE_Orchard.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_Others
Definition: LandscapeFarmingEnums.h:1003
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
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
de_orch_fungicide6
Definition: DE_Orchard.h:81
Landscape::SupplyPestIncidenceFactor
double SupplyPestIncidenceFactor()
Returns Landscape::m_pestincidencefactor.
Definition: Landscape.h:325
de_orch_ferti_p4
Definition: DE_Orchard.h:72
de_orch_ferti_s4
Definition: DE_Orchard.h:73
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
g_landscape_ptr
Landscape * g_landscape_ptr
Definition: Landscape.cpp:352
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
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
de_orch_fungicide4
Definition: DE_Orchard.h:79
de_orch_insecticide1
Definition: DE_Orchard.h:94
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
de_orch_fungicide18
Definition: DE_Orchard.h:93
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.
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
tov_DEOrchard
Definition: LandscapeFarmingEnums.h:518
de_orch_foobar
Definition: DE_Orchard.h:101
de_orch_start
Definition: DE_Orchard.h:64
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
de_orch_insecticide3
Definition: DE_Orchard.h:96
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Farm::FruitHarvest
virtual bool FruitHarvest(LE *a_field, double a_user, int a_days)
FruitHarvest (harvest of the mature fruits, e.g., grapes) applied on a_field.
Definition: FarmFuncs.cpp:1959
de_orch_fungicide5
Definition: DE_Orchard.h:80
de_orch_ferti_s1
Definition: DE_Orchard.h:67
de_orch_fungicide14
Definition: DE_Orchard.h:89
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
de_orch_insecticide4
Definition: DE_Orchard.h:97
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_orch_ferti_s5
Definition: DE_Orchard.h:75
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
de_orch_ferti_p5
Definition: DE_Orchard.h:74
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