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

#include <DK_WinterBarley.h>

Inheritance diagram for DK_WinterBarley:
Crop

Public Member Functions

bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 
 DK_WinterBarley (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...
 

Constructor & Destructor Documentation

◆ DK_WinterBarley()

DK_WinterBarley::DK_WinterBarley ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
76  : Crop(a_tov, a_toc, a_L)
77  {
78  m_first_date = g_date->DayInYear(25, 9);
80  }

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

Member Function Documentation

◆ Do()

bool DK_WinterBarley::Do ( Farm a_farm,
LE a_field,
FarmEvent a_ev 
)
virtual

Reimplemented from Crop.

41 {
42  m_farm = a_farm;
43  m_field = a_field;
44  m_ev = a_ev;
45  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true, m_farm, m_field).
46  bool flag = false;
47  int d1 = 0;
48  int noDates = 1;
50 
51  switch (m_ev->m_todo)
52  {
53  case dk_wb_start:
54  {
55 
56  DK_WB_MN_S = false;
57  DK_WB_MN_P = false;
58 
59  a_field->ClearManagementActionSum();
60 
61  m_last_date = g_date->DayInYear(31, 8); // Should match the last flexdate below
62  //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
63  std::vector<std::vector<int>> flexdates(3 + 1, std::vector<int>(2, 0));
64  // Set up the date management stuff
65  // Start and stop dates for all events after harvest
66  flexdates[0][1] = g_date->DayInYear(14, 8); // last possible day of herbicide3
67  // Now these are done in pairs, start & end for each operation. If its not used then -1
68  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
69  flexdates[1][1] = g_date->DayInYear(15, 8); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1) // harvest
70  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 2 (start op 2)
71  flexdates[2][1] = g_date->DayInYear(15, 8); // This date will be moved back as far as necessary and potentially to flexdates 2 (end op 2) // straw chopping
72  flexdates[3][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 3 (start op 3)
73  flexdates[3][1] = g_date->DayInYear(31, 8); // This date will be moved back as far as necessary and potentially to flexdates 3 (end op 3) // harvest
74 
75  // Below if this is a spring crop use 365, otherwise first parameter is always 0, second parameter is fixed, and the third is the start up operation in the first year
76  if (StartUpCrop(0, flexdates, int(dk_wb_wait))) break;
77 
78  // End single block date checking code. Please see next line comment as well.
79  // Reinit d1 to first possible starting date.
80  d1 = g_date->OldDays() + g_date->DayInYear(7, 9);
81  // OK, let's go.
82  SimpleEvent(d1, dk_wb_autumn_plough, false);
83  }
84  break;
85 
86  // done if manye weeds, or waste plants from earlier catch crops
88  if (m_ev->m_lock || m_farm->DoIt_prob(0.85)) {
89  if (!m_farm->AutumnPlough(m_field, 0.0,
90  g_date->DayInYear(25, 9) - g_date->DayInYear())) {
92  break;
93  }
95  break;
96  } // 15% no cultivation
97  else
99  break;
100 
101  case dk_wb_autumn_harrow:
102  if (m_ev->m_lock || m_farm->DoIt_prob(0.50 / 0.85)) {
103  if (!m_farm->AutumnHarrow(m_field, 0.0,
104  g_date->DayInYear(25, 9) - g_date->DayInYear())) {
106  break;
107  }
108  }
110  break;
111 
113  if (m_ev->m_lock || m_farm->DoIt_prob(0.80)) { //80% of the 15% not ploughing
114  if (!m_farm->AutumnHarrow(m_field, 0.0,
115  g_date->DayInYear(25, 9) - g_date->DayInYear())) {
117  break;
118  }
119  }
121  break;
122 
123  case dk_wb_autumn_roll:
124  if (!m_farm->AutumnRoll(m_field, 0.0,
125  g_date->DayInYear(25, 9) - g_date->DayInYear())) {
126  SimpleEvent(g_date->Date() + 1, dk_wb_autumn_roll, true);
127  break;
128  }
130  break;
131 
132  case dk_wb_molluscicide:
133  if (m_ev->m_lock || m_farm->DoIt_prob(0.05)) {
134  if (!m_farm->Molluscicide(m_field, 0.0,
135  g_date->DayInYear(25, 9) - g_date->DayInYear())) {
136  SimpleEvent(g_date->Date() + 1, dk_wb_molluscicide, true);
137  break;
138  }
139  }
141  break;
142 
143  case dk_wb_autumn_sow:
145  g_date->DayInYear(25, 9) - g_date->DayInYear())) {
146  SimpleEvent(g_date->Date() + 1, dk_wb_autumn_sow, true);
147  break;
148  }
149  if (a_farm->IsStockFarmer()) //Stock Farmer
150  {
152  break;
153  }
154  else SimpleEvent(g_date->Date(), dk_wb_ferti_p1, false);
155  break;
156 
157  case dk_wb_ferti_s1: // preventing Mn depletion
158  if (m_ev->m_lock || m_farm->DoIt_prob(0.05)) {
160  g_date->DayInYear(25, 9) - g_date->DayInYear())) {
161  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s1, true);
162  break;
163  }
164  }
165  SimpleEvent(g_date->Date() + 7, dk_wb_ferti_s2, false);
166  break;
167 
168  case dk_wb_ferti_p1:// preventing Mn depletion
169  if (m_ev->m_lock || m_farm->DoIt_prob(0.05)) {
171  g_date->DayInYear(25, 9) - g_date->DayInYear())) {
172  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p1, true);
173  break;
174  }
175  }
176  SimpleEvent(g_date->Date() + 7, dk_wb_ferti_p2, false);
177  break;
178 
179  case dk_wb_ferti_s2:
180  if (m_field->GetSoilType() == tos_Sand || m_field->GetSoilType() == tos_LoamySand || m_field->GetSoilType() == tos_SandyLoam || m_field->GetSoilType() == tos_SandyClayLoam) // on sandy soils (NL ZAND & LOSS)
181  {
183  g_date->DayInYear(3, 10) - g_date->DayInYear())) {
184  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s2, true);
185  break;
186  }
187  }
188  else if (m_ev->m_lock || m_farm->DoIt_prob(0.35)) {
190  g_date->DayInYear(3, 10) - g_date->DayInYear())) {
191  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s2, true);
192  break;
193  }
194  DK_WB_MN_S = true; // we need to remember who sprays Mn
195  }
196  SimpleEvent(g_date->Date() + 1, dk_wb_herbicide1, false);
197  break;
198 
199  case dk_wb_ferti_p2:
200  if (m_field->GetSoilType() == tos_Sand || m_field->GetSoilType() == tos_LoamySand || m_field->GetSoilType() == tos_SandyLoam || m_field->GetSoilType() == tos_SandyClayLoam) // on sandy soils (NL ZAND & LOSS)
201  {
203  g_date->DayInYear(3, 10) - g_date->DayInYear())) {
204  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p2, true);
205  break;
206  }
207  }
208  else if (m_ev->m_lock || m_farm->DoIt_prob(0.35)) {
210  g_date->DayInYear(3, 10) - g_date->DayInYear())) {
211  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p2, true);
212  break;
213  }
214  DK_WB_MN_P = true; // we need to remember who sprays Mn
215  }
216  SimpleEvent(g_date->Date() + 1, dk_wb_herbicide1, false);
217  break;
218 
219  case dk_wb_herbicide1:
220  if (!m_farm->HerbicideTreat(m_field, 0.0,
221  g_date->DayInYear(4, 10) - g_date->DayInYear())) {
222  SimpleEvent(g_date->Date() + 1, dk_wb_herbicide1, true);
223  break;
224  }
225  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 2) + 365, dk_wb_wait, false);
226  break;
227 
228  case dk_wb_wait:
229  if (!m_farm->SleepAllDay(m_field, 0.0,
230  g_date->DayInYear(28, 2) - g_date->DayInYear())) {
231  SimpleEvent(g_date->Date() + 1, dk_wb_wait, true);
232  break;
233  }
234  if (a_farm->IsStockFarmer()) //Stock Farmer
235  {
238  SimpleEvent(g_date->OldDays() + g_date->DayInYear(10, 3), dk_wb_ferti_s5, false);
239  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_wb_gr1, false);
241  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_wb_fungicide1, false); // main thread
242  break;
243  }
244  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3), dk_wb_ferti_p3, false);
246  SimpleEvent(g_date->OldDays() + g_date->DayInYear(10, 3), dk_wb_ferti_p5, false);
247  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_wb_gr1, false);
249  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_wb_fungicide1, false); // main thread
250  break;
251 
252  case dk_wb_ferti_s3:
253  if (m_field->GetSoilType() == tos_Sand || m_field->GetSoilType() == tos_LoamySand || m_field->GetSoilType() == tos_SandyLoam || m_field->GetSoilType() == tos_SandyClayLoam) // on sandy soils (NL ZAND & LOSS)
254  {
256  g_date->DayInYear(31, 3) - g_date->DayInYear())) {
257  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s3, true);
258  break;
259  }
260  }
261  else if (DK_WB_MN_S == true) {
263  g_date->DayInYear(31, 3) - g_date->DayInYear())) {
264  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s3, true);
265  break;
266  }
267  }
268  break; // end of thread
269 
270  case dk_wb_ferti_p3:
271  if (m_field->GetSoilType() == tos_Sand || m_field->GetSoilType() == tos_LoamySand || m_field->GetSoilType() == tos_SandyLoam || m_field->GetSoilType() == tos_SandyClayLoam) // on sandy soils (NL ZAND & LOSS)
272  {
274  g_date->DayInYear(31, 3) - g_date->DayInYear())) {
275  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p3, true);
276  break;
277  }
278  }
279  else if (DK_WB_MN_P == true) {
281  g_date->DayInYear(31, 3) - g_date->DayInYear())) {
282  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p3, true);
283  break;
284  }
285  }
286  break;
287 
288  case dk_wb_ferti_s4:
289  if (!m_farm->FA_Slurry(m_field, 0.0,
290  g_date->DayInYear(15, 4) - g_date->DayInYear())) {
291  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s4, true);
292  break;
293  }
294  break; // end of thread
295 
296  case dk_wb_ferti_p4:
297  if (!m_farm->FP_Slurry(m_field, 0.0,
298  g_date->DayInYear(15, 4) - g_date->DayInYear())) {
299  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p4, true);
300  break;
301  }
302  break; // end of thread
303 
304  case dk_wb_ferti_s5:
305  if (!m_farm->FA_NPK(m_field, 0.0,
306  g_date->DayInYear(20, 3) - g_date->DayInYear())) {
307  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s5, true);
308  break;
309  }
311  break;
312 
313  case dk_wb_ferti_p5:
314  if (!m_farm->FP_NPK(m_field, 0.0,
315  g_date->DayInYear(20, 3) - g_date->DayInYear())) {
316  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p5, true);
317  break;
318  }
320  break;
321 
322  case dk_wb_ferti_s6:
323  if (!m_farm->FA_NPK(m_field, 0.0,
324  g_date->DayInYear(20, 4) - g_date->DayInYear())) {
325  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s6, true);
326  break;
327  }
328  break; // end of thread
329 
330  case dk_wb_ferti_p6:
331  if (!m_farm->FP_NPK(m_field, 0.0,
332  g_date->DayInYear(20, 4) - g_date->DayInYear())) {
333  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p6, true);
334  break;
335  }
336  break; // end of thread
337 
338  case dk_wb_gr1:
339  if (m_ev->m_lock || m_farm->DoIt_prob(0.80)) {
340  if (!m_farm->GrowthRegulator(m_field, 0.0,
341  g_date->DayInYear(15, 5) - g_date->DayInYear())) {
342  SimpleEvent(g_date->Date() + 1, dk_wb_gr1, true);
343  break;
344  }
345  }
346  SimpleEvent(g_date->Date() + 14, dk_wb_gr2, false);
347  break;
348 
349  case dk_wb_gr2:
350  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
351  if (!m_farm->GrowthRegulator(m_field, 0.0,
352  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
353  SimpleEvent(g_date->Date() + 1, dk_wb_gr2, true);
354  break;
355  }
356  }
357  break; // end of thread
358 
359  case dk_wb_herbicide2:
360  if (m_ev->m_lock || m_farm->DoIt_prob(0.85)) {
361  if (!m_farm->HerbicideTreat(m_field, 0.0,
362  g_date->DayInYear(20, 4) - g_date->DayInYear())) {
363  SimpleEvent(g_date->Date() + 1, dk_wb_herbicide2, true);
364  break;
365  }
366  }
367  break; // end of thread
368 
369  case dk_wb_fungicide1:
370  if (m_ev->m_lock || m_farm->DoIt_prob(0.98)) {
371  if (!m_farm->FungicideTreat(m_field, 0.0,
372  g_date->DayInYear(15, 5) - g_date->DayInYear())) {
373  SimpleEvent(g_date->Date() + 1, dk_wb_fungicide1, true);
374  break;
375  }
376  }
377  SimpleEvent(g_date->Date() + 14, dk_wb_fungicide2, false);
378  break;
379 
380  case dk_wb_fungicide2:
381  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
382  if (!m_farm->FungicideTreat(m_field, 0.0,
383  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
384  SimpleEvent(g_date->Date() + 1, dk_wb_fungicide2, true);
385  break;
386  }
387  }
389  break;
390 
391  case dk_wb_herbicide3: // only if for fodder- not allowed for consume
392  if (m_ev->m_lock || m_farm->DoIt_prob(0.15)) {
393  if (!m_farm->HerbicideTreat(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
394  SimpleEvent(g_date->Date() + 1, dk_wb_herbicide3, true);
395  break;
396  }
397  }
398  if (a_farm->IsStockFarmer()) //Stock Farmer
399  {
400  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s7, false);
401  SimpleEvent(g_date->Date() + 14, dk_wb_harvest, false); // main thread
402  break;
403  }
404  else SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p7, false);
405  SimpleEvent(g_date->Date() + 14, dk_wb_harvest, false); // main thread
406  break;
407 
408  case dk_wb_ferti_s7:
409  if (m_ev->m_lock || m_farm->DoIt_prob(0.01)) {
410  if (!m_farm->FA_Calcium(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
411  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_s7, true);
412  break;
413  }
414  }
415  break; // end of thread
416 
417  case dk_wb_ferti_p7:
418  if (m_ev->m_lock || m_farm->DoIt_prob(0.01)) {
419  if (!m_farm->FP_Calcium(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
420  SimpleEvent(g_date->Date() + 1, dk_wb_ferti_p7, true);
421  break;
422  }
423  }
424  break; // end of thread
425 
426  case dk_wb_harvest:
427  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 3) - g_date->DayInYear())) {
428  SimpleEvent(g_date->Date() + 1, dk_wb_harvest, true);
429  break;
430  }
431  done = true;
432  break;
433 
434  default:
435  g_msg->Warn(WARN_BUG, "DK_WinterBarley::Do(): "
436  "Unknown event type! ", "");
437  exit(1);
438  }
439  return done;
440 }

References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnRoll(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), dk_wb_autumn_harrow, dk_wb_autumn_harrow_nt, dk_wb_autumn_plough, dk_wb_autumn_roll, dk_wb_autumn_sow, dk_wb_ferti_p1, dk_wb_ferti_p2, dk_wb_ferti_p3, dk_wb_ferti_p4, dk_wb_ferti_p5, dk_wb_ferti_p6, dk_wb_ferti_p7, dk_wb_ferti_s1, dk_wb_ferti_s2, dk_wb_ferti_s3, dk_wb_ferti_s4, dk_wb_ferti_s5, dk_wb_ferti_s6, dk_wb_ferti_s7, dk_wb_fungicide1, dk_wb_fungicide2, dk_wb_gr1, dk_wb_gr2, dk_wb_harvest, dk_wb_herbicide1, dk_wb_herbicide2, dk_wb_herbicide3, DK_WB_MN_P, DK_WB_MN_S, dk_wb_molluscicide, dk_wb_start, dk_wb_wait, Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FA_Calcium(), Farm::FA_ManganeseSulphate(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FP_AmmoniumSulphate(), Farm::FP_Calcium(), Farm::FP_ManganeseSulphate(), Farm::FP_NPK(), Farm::FP_Slurry(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), LE::GetSoilType(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Farm::Molluscicide(), Calendar::OldDays(), Farm::PreseedingCultivatorSow(), Crop::SimpleEvent(), Farm::SleepAllDay(), Crop::StartUpCrop(), tos_LoamySand, tos_Sand, tos_SandyClayLoam, tos_SandyLoam, tov_DKWinterBarley, MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void DK_WinterBarley::SetUpFarmCategoryInformation ( )
inline
81  {
82  const int elements = 2 + (dk_wb_foobar - DK_WB_BASE);
84 
85  FarmManagementCategory catlist[elements] =
86  {
87  fmc_Others, // zero element unused but must be here
88  fmc_Others, // dk_wb_start = 1, // Compulsory, start event must always be 1 (one).
89  fmc_Harvest, // dk_wb_harvest = DK_WB_BASE,
90  fmc_Cultivation, // dk_wb_autumn_plough,
91  fmc_Cultivation, // dk_wb_autumn_harrow,
92  fmc_Cultivation, // dk_wb_autumn_harrow_nt,
93  fmc_Others, // dk_wb_autumn_roll,
94  fmc_Others, // dk_wb_molluscicide,
95  fmc_Fertilizer, // dk_wb_ferti_s1,
96  fmc_Fertilizer, // dk_wb_ferti_p1,
97  fmc_Fertilizer, // dk_wb_ferti_s2,
98  fmc_Fertilizer, // dk_wb_ferti_p2,
99  fmc_Cultivation, // dk_wb_autumn_sow,
100  fmc_Herbicide, // dk_wb_herbicide1,
101  fmc_Fertilizer, // dk_wb_ferti_s3,
102  fmc_Fertilizer, // dk_wb_ferti_p3,
103  fmc_Fertilizer, // dk_wb_ferti_s4,
104  fmc_Fertilizer, // dk_wb_ferti_p4,
105  fmc_Fertilizer, // dk_wb_ferti_s5,
106  fmc_Fertilizer, // dk_wb_ferti_p5,
107  fmc_Fertilizer, // dk_wb_ferti_s6,
108  fmc_Fertilizer, // dk_wb_ferti_p6,
109  fmc_Fertilizer, // dk_wb_ferti_s7,
110  fmc_Fertilizer, // dk_wb_ferti_p7,
111  fmc_Herbicide, // dk_wb_herbicide2,
112  fmc_Herbicide, // dk_wb_herbicide3,
113  fmc_Fungicide, // dk_wb_fungicide1,
114  fmc_Fungicide, // dk_wb_fungicide2,
115  fmc_Others, // dk_wb_gr1,
116  fmc_Others, // dk_wb_gr2,
117  fmc_Others, // dk_wb_wait,
118 
119  // no foobar entry
120 
121  };
122  // Iterate over the catlist elements and copy them to vector
123  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
124  }

References DK_WB_BASE, dk_wb_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_WinterBarley().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
dk_wb_ferti_p1
Definition: DK_WinterBarley.h:45
Farm::FA_Slurry
virtual bool FA_Slurry(LE *a_field, double a_user, int a_days)
Spready slurry on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1067
dk_wb_ferti_p4
Definition: DK_WinterBarley.h:53
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
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::FP_ManganeseSulphate
virtual bool FP_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply Manganse Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:840
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
dk_wb_foobar
Definition: DK_WinterBarley.h:67
Farm::Molluscicide
virtual bool Molluscicide(LE *a_field, double a_user, int a_days)
Apply molluscicide to a_field.
Definition: FarmFuncs.cpp:2310
tos_SandyClayLoam
Definition: LandscapeFarmingEnums.h:722
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
dk_wb_herbicide3
Definition: DK_WinterBarley.h:61
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
dk_wb_autumn_plough
Definition: DK_WinterBarley.h:39
tos_SandyLoam
Definition: LandscapeFarmingEnums.h:721
dk_wb_ferti_p2
Definition: DK_WinterBarley.h:47
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
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
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
dk_wb_start
Definition: DK_WinterBarley.h:37
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
dk_wb_herbicide2
Definition: DK_WinterBarley.h:60
dk_wb_gr1
Definition: DK_WinterBarley.h:64
dk_wb_autumn_sow
Definition: DK_WinterBarley.h:48
dk_wb_ferti_p6
Definition: DK_WinterBarley.h:57
dk_wb_ferti_s2
Definition: DK_WinterBarley.h:46
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_wb_herbicide1
Definition: DK_WinterBarley.h:49
dk_wb_wait
Definition: DK_WinterBarley.h:66
dk_wb_ferti_p5
Definition: DK_WinterBarley.h:55
Calendar::Date
long Date(void)
Definition: Calendar.h:57
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
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
Farm::FA_Calcium
virtual bool FA_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:1168
dk_wb_harvest
Definition: DK_WinterBarley.h:38
dk_wb_fungicide1
Definition: DK_WinterBarley.h:62
Farm::FA_ManganeseSulphate
virtual bool FA_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply manganese sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1095
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
DK_WB_MN_P
#define DK_WB_MN_P
Definition: DK_WinterBarley.h:34
DK_WB_BASE
#define DK_WB_BASE
Definition: DK_WinterBarley.h:31
tov_DKWinterBarley
Definition: LandscapeFarmingEnums.h:417
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
Farm::FP_Calcium
virtual bool FP_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:954
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
dk_wb_ferti_s3
Definition: DK_WinterBarley.h:50
dk_wb_fungicide2
Definition: DK_WinterBarley.h:63
dk_wb_autumn_harrow_nt
Definition: DK_WinterBarley.h:41
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
DK_WinterBarley::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_WinterBarley.h:81
Farm::PreseedingCultivatorSow
virtual bool PreseedingCultivatorSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out preseeding cultivation together with sow on a_field (tilling and sowing set including culti...
Definition: FarmFuncs.cpp:325
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
tos_Sand
Definition: LandscapeFarmingEnums.h:719
dk_wb_autumn_roll
Definition: DK_WinterBarley.h:42
dk_wb_molluscicide
Definition: DK_WinterBarley.h:43
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_Slurry
virtual bool FP_Slurry(LE *a_field, double a_user, int a_days)
Apply slurry to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:823
Farm::SleepAllDay
virtual bool SleepAllDay(LE *a_field, double a_user, int a_days)
Nothing to to today on a_field.
Definition: FarmFuncs.cpp:272
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
dk_wb_autumn_harrow
Definition: DK_WinterBarley.h:40
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
dk_wb_ferti_s1
Definition: DK_WinterBarley.h:44
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
dk_wb_ferti_s4
Definition: DK_WinterBarley.h:52
dk_wb_gr2
Definition: DK_WinterBarley.h:65
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
dk_wb_ferti_s6
Definition: DK_WinterBarley.h:56
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
dk_wb_ferti_s7
Definition: DK_WinterBarley.h:58
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
dk_wb_ferti_s5
Definition: DK_WinterBarley.h:54
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
tos_LoamySand
Definition: LandscapeFarmingEnums.h:720
dk_wb_ferti_p3
Definition: DK_WinterBarley.h:51
WARN_BUG
Definition: MapErrorMsg.h:34
DK_WB_MN_S
#define DK_WB_MN_S
Definition: DK_WinterBarley.h:33
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
dk_wb_ferti_p7
Definition: DK_WinterBarley.h:59
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001