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

#include <DK_SpringBarleyCloverGrass.h>

Inheritance diagram for DK_SpringBarleyCloverGrass:
Crop

Public Member Functions

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

DK_SpringBarleyCloverGrass::DK_SpringBarleyCloverGrass ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
71  : Crop(a_tov, a_toc, a_L)
72  {
73  m_first_date = g_date->DayInYear(1, 11);
75  }

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

Member Function Documentation

◆ Do()

bool DK_SpringBarleyCloverGrass::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  int l_nextcropstartdate;
51 
52  switch (m_ev->m_todo)
53  {
54  case dk_sbcg_start:
55  {
56  a_field->ClearManagementActionSum();
57  DK_SBCG_FORCESPRING = false;
58  DK_SBCG_TILL_C = false;
59  DK_SBCG_TILL_S = false;
60  m_last_date = g_date->DayInYear(16, 10); // Should match the last flexdate below
61  //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
62  std::vector<std::vector<int>> flexdates(3 + 1, std::vector<int>(2, 0));
63  // Set up the date management stuff
64  // Start and stop dates for all events after harvest
65  flexdates[0][1] = g_date->DayInYear(31, 8); // last possible day of harvest in this case - this is in effect day before the earliest date that a following crop can use
66  // Now these are done in pairs, start & end for each operation. If its not used then -1
67  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
68  flexdates[1][1] = g_date->DayInYear(1, 9); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1) straw chopping
69  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 2 (start op 2)
70  flexdates[2][1] = g_date->DayInYear(1, 9); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 2) hay bailing
71  flexdates[3][0] = g_date->DayInYear(2, 9); // This date will be moved back as far as necessary and potentially to flexdates 3 (start op 3)
72  flexdates[3][1] = g_date->DayInYear(16, 10); // This date will be moved back as far as necessary and potentially to flexdates 3 (end op 3) cattle out
73 
74  // 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
75  int isSpring = 0;
76  if (StartUpCrop(isSpring, flexdates, int(dk_sbcg_ferti_s1))) 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(1, 9);
81  // OK, let's go.
82  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
83  if (m_ev->m_forcespring) {
84  int day_num_shift = 365;
85  if (g_date->DayInYear() < 70) day_num_shift = 0;
86  if (a_farm->IsStockFarmer()) //Stock Farmer
87  {
88  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + day_num_shift, dk_sbcg_ferti_s1, false);
89  break;
90  }
91  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + day_num_shift, dk_sbcg_ferti_p1, false);
92  DK_SBCG_FORCESPRING = true;
93  break;
94  }
95  else SimpleEvent(d1, dk_sbcg_autumn_plough, false);
96  break;
97  }
98  break;
99 
100  // done if manye weeds, or waste plants from earlier catch crops
102  if (m_field->GetSoilType() != tos_Sand && m_field->GetSoilType() != tos_LoamySand && m_field->GetSoilType() != tos_SandyLoam && m_field->GetSoilType() != tos_SandyClayLoam) // on clay soils (NL KLEI & VEEN)
103  {
104  if (m_ev->m_lock || m_farm->DoIt_prob(0.85)) {
105  if (!m_farm->AutumnPlough(m_field, 0.0,
106  g_date->DayInYear(1, 11) - g_date->DayInYear())) {
108  break;
109  }
110  DK_SBCG_TILL_C = true; // need to remember who did till
111  }
112  }
113  if (a_farm->IsStockFarmer()) //Stock Farmer
114  {
115  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, dk_sbcg_ferti_s1, false);
116  break;
117  }
118  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, dk_sbcg_ferti_p1, false);
119  break;
120 
121  case dk_sbcg_ferti_s1:
122  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
123  if (!m_farm->FA_Slurry(m_field, 0.0,
124  g_date->DayInYear(15, 4) - g_date->DayInYear())) {
125  SimpleEvent(g_date->Date() + 1, dk_sbcg_ferti_s1, true);
126  break;
127  }
128  }
129  SimpleEvent(g_date->Date() + 1, dk_sbcg_ferti_s2, false);
130  break;
131 
132  case dk_sbcg_ferti_p1:
133  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
134  if (!m_farm->FP_Slurry(m_field, 0.0,
135  g_date->DayInYear(15, 4) - g_date->DayInYear())) {
136  SimpleEvent(g_date->Date() + 1, dk_sbcg_ferti_p1, true);
137  break;
138  }
139  }
140  SimpleEvent(g_date->Date() + 1, dk_sbcg_ferti_p2, false);
141  break;
142 
143  case dk_sbcg_ferti_s2:
144  if (!m_farm->FA_NPKS(m_field, 0.0,
145  g_date->DayInYear(16, 4) - g_date->DayInYear())) {
146  SimpleEvent(g_date->Date() + 1, dk_sbcg_ferti_s2, true);
147  break;
148  }
150  break;
151 
152  case dk_sbcg_ferti_p2:
153  if (!m_farm->FP_NPKS(m_field, 0.0,
154  g_date->DayInYear(16, 4) - g_date->DayInYear())) {
155  SimpleEvent(g_date->Date() + 1, dk_sbcg_ferti_p2, true);
156  break;
157  }
159  break;
160 
162  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)
163  {
164  if (m_ev->m_lock || m_farm->DoIt_prob(0.85)) {
165  if (!m_farm->SpringPlough(m_field, 0.0,
166  g_date->DayInYear(20, 4) - g_date->DayInYear())) {
168  break;
169  }
170  DK_SBCG_TILL_S = true; // need to remember who did till
172  break;
173  }
175  break;
176  }
177  else if (DK_SBCG_TILL_C == false) {
179  break;
180  }
181  else SimpleEvent(g_date->Date(), dk_sbcg_spring_sow, false);
182  break;
183 
184  case dk_sbcg_spring_harrow_nt: // 80% of the 15% of clay and 15% of sandy soils that do no till (nt) harrows before sowing
185  if (m_ev->m_lock || m_farm->DoIt_prob(0.80)) {
186  if (!m_farm->SpringHarrow(m_field, 0.0,
187  g_date->DayInYear(20, 4) - g_date->DayInYear())) {
189  break;
190  }
191  }
193  break;
194 
195  case dk_sbcg_spring_sow:
196  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
198  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
199  SimpleEvent(g_date->Date() + 1, dk_sbcg_spring_sow, true);
200  break;
201  }
202  }
203  SimpleEvent(g_date->Date() + 1, dk_sbcg_herbicide1, false); // herbi thread
204  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_sbcg_fungicide1, false); // fungi thread
205  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_sbcg_gr1, false); // growth regulator thread
206  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6) + m_date_modifier, dk_sbcg_insecticide, false); // insecti thread
207  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 7), dk_sbcg_water1, false); // water thread
208  SimpleEvent(g_date->OldDays() + g_date->DayInYear(7, 7), dk_sbcg_herbicide4, false); // main thread
209  break;
210 
211  case dk_sbcg_herbicide1: // if sown layout of grass together with the BarleyCloverGrass
212  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
213  if (!m_farm->HerbicideTreat(m_field, 0.0,
214  g_date->DayInYear(5, 5) - g_date->DayInYear())) {
215  SimpleEvent(g_date->Date() + 1, dk_sbcg_herbicide1, true);
216  break;
217  }
218  }
219  SimpleEvent(g_date->Date() + 14, dk_sbcg_herbicide2, false);
220  break;
221 
222  case dk_sbcg_herbicide2:
223  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
224  if (!m_farm->HerbicideTreat(m_field, 0.0,
225  g_date->DayInYear(20, 5) - g_date->DayInYear())) {
226  SimpleEvent(g_date->Date() + 1, dk_sbcg_herbicide2, true);
227  break;
228  }
229  }
230  SimpleEvent(g_date->Date() + 14, dk_sbcg_herbicide3, false);
231  break;
232 
233  case dk_sbcg_herbicide3:
234  if (m_ev->m_lock || m_farm->DoIt_prob(0.15)) {
235  if (!m_farm->HerbicideTreat(m_field, 0.0,
236  g_date->DayInYear(5, 6) - g_date->DayInYear())) {
237  SimpleEvent(g_date->Date() + 1, dk_sbcg_herbicide3, true);
238  break;
239  }
240  }
241  break; // end of thread
242 
243  case dk_sbcg_fungicide1:
244  if (m_ev->m_lock || m_farm->DoIt_prob(0.95)) {
245  if (!m_farm->FungicideTreat(m_field, 0.0,
246  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
247  SimpleEvent(g_date->Date() + 1, dk_sbcg_fungicide1, true);
248  break;
249  }
250  }
251  SimpleEvent(g_date->Date()+14, dk_sbcg_fungicide2, false);
252  break;
253 
254  case dk_sbcg_fungicide2:
255  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
256  if (!m_farm->FungicideTreat(m_field, 0.0,
257  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
258  SimpleEvent(g_date->Date() + 1, dk_sbcg_fungicide2, true);
259  break;
260  }
261  }
262  break; // end of thread
263 
264  case dk_sbcg_gr1:
265  if (m_ev->m_lock || m_farm->DoIt_prob(0.25)) {
266  if (!m_farm->GrowthRegulator(m_field, 0.0,
267  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
268  SimpleEvent(g_date->Date() + 1, dk_sbcg_gr1, true);
269  break;
270  }
271  break; // end of thread
272  }
273  SimpleEvent(g_date->Date() + 30, dk_sbcg_gr2, false);
274  break;
275 
276  case dk_sbcg_gr2:
277  if (m_ev->m_lock || m_farm->DoIt_prob(0.30/0.75)) {
278  if (!m_farm->GrowthRegulator(m_field, 0.0,
279  g_date->DayInYear(30, 6) - g_date->DayInYear())) {
280  SimpleEvent(g_date->Date() + 1, dk_sbcg_gr2, true);
281  break;
282  }
283  }
284  break; // end of thread
285 
286  case dk_sbcg_insecticide:
287  if (m_ev->m_lock || m_farm->DoIt_prob(0.40) || AphidDamage(m_field)) {
288  // here we check whether we are using ERA pesticide or not
289  d1 = g_date->DayInYear(31, 7) - g_date->DayInYear();
290  if (!cfg_pest_springbarley_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  break; // end of thread
303 
304  case dk_sbcg_water1:
305  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)
306  {
307  if (m_ev->m_lock || m_farm->DoIt_prob(0.80)) {
308  if (!m_farm->Water(m_field, 0.0,
309  g_date->DayInYear(10, 7) - g_date->DayInYear())) {
310  SimpleEvent(g_date->Date() + 1, dk_sbcg_water1, true);
311  break;
312  }
313  SimpleEvent(g_date->Date()+14, dk_sbcg_water2, false);
314  break;
315  }
316  }
317  break; // end of thread
318 
319  case dk_sbcg_water2:
320  if (!m_farm->Water(m_field, 0.0,
321  g_date->DayInYear(31, 7) - g_date->DayInYear())) {
322  SimpleEvent(g_date->Date() + 1, dk_sbcg_water2, true);
323  break;
324  }
325  break; // end of thread
326 
327  case dk_sbcg_herbicide4:
328  if (m_ev->m_lock || m_farm->DoIt_prob(0.30)) {
329  if (!m_farm->HerbicideTreat(m_field, 0.0,
330  g_date->DayInYear(15, 8) - g_date->DayInYear())) {
331  SimpleEvent(g_date->Date() + 1, dk_sbcg_herbicide4, true);
332  break;
333  }
334  SimpleEvent(g_date->Date() + 14, dk_sbcg_harvest, false);
335  break;
336  }
338  break;
339 
340  case dk_sbcg_harvest:
341  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
342  SimpleEvent(g_date->Date() + 1, dk_sbcg_harvest, true);
343  break;
344  }
346  break;
347 
349  if (m_ev->m_lock || m_farm->DoIt_prob(0.25)) {
350  if (!m_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
352  break;
353  }
354  done = true;
355  break;
356  }
357  else if (m_ev->m_lock || m_farm->DoIt_prob(0.75 / 0.75)) {
359  break;
360  }
361 
362  case dk_sbcg_hay_bailing:
363  if (!m_farm->HayBailing(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
365  break;
366  }
367  // END OF MAIN THREAD
368  done = true;
369  break;
370 
371  default:
372  g_msg->Warn(WARN_BUG, "DK_SpringBarleyCloverGrass::Do(): "
373  "Unknown event type! ", "");
374  exit(1);
375  }
376  return done;
377 }

References Crop::AphidDamage(), Farm::AutumnPlough(), cfg_pest_product_amounts, cfg_pest_springbarley_on, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), dk_sbcg_autumn_plough, dk_sbcg_ferti_p1, dk_sbcg_ferti_p2, dk_sbcg_ferti_s1, dk_sbcg_ferti_s2, DK_SBCG_FORCESPRING, dk_sbcg_fungicide1, dk_sbcg_fungicide2, dk_sbcg_gr1, dk_sbcg_gr2, dk_sbcg_harvest, dk_sbcg_hay_bailing, dk_sbcg_herbicide1, dk_sbcg_herbicide2, dk_sbcg_herbicide3, dk_sbcg_herbicide4, dk_sbcg_insecticide, dk_sbcg_spring_harrow_nt, dk_sbcg_spring_plough, dk_sbcg_spring_sow, dk_sbcg_start, dk_sbcg_straw_chopping, DK_SBCG_TILL_C, DK_SBCG_TILL_S, dk_sbcg_water1, dk_sbcg_water2, Farm::DoIt_prob(), Farm::FA_NPKS(), Farm::FA_Slurry(), Farm::FP_NPKS(), Farm::FP_Slurry(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), LE::GetSoilType(), 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, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::PreseedingCultivatorSow(), Farm::ProductApplication(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Crop::StartUpCrop(), Farm::StrawChopping(), tos_LoamySand, tos_Sand, tos_SandyClayLoam, tos_SandyLoam, tov_DKSpringBarleyCloverGrass, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_SpringBarleyCloverGrass::SetUpFarmCategoryInformation ( )
inline
76  {
77  const int elements = 2 + (dk_sbcg_foobar - DK_SBCG_BASE);
79 
80  FarmManagementCategory catlist[elements] =
81  {
82  fmc_Others, // zero element unused but must be here
83  fmc_Others, // dk_sbcg_start = 1, // Compulsory, start event must always be 1 (one).
84  fmc_Harvest, // dk_sbcg_harvest = DK_SBCG_BASE,
85  fmc_Cultivation, // dk_sbcg_autumn_plough,
86  fmc_Fertilizer, // dk_sbcg_ferti_s1,
87  fmc_Fertilizer, // dk_sbcg_ferti_p1,
88  fmc_Fertilizer, // dk_sbcg_ferti_s2,
89  fmc_Fertilizer, // dk_sbcg_ferti_p2,
90  fmc_Cultivation, // dk_sbcg_spring_plough,
91  fmc_Cultivation, // dk_sbcg_spring_harrow_nt,
92  fmc_Cultivation, // dk_sbcg_spring_sow,
93  fmc_Herbicide, // dk_sbcg_herbicide1,
94  fmc_Herbicide, // dk_sbcg_herbicide2,
95  fmc_Herbicide, // dk_sbcg_herbicide3,
96  fmc_Herbicide, // dk_sbcg_herbicide4,
97  fmc_Insecticide, // dk_sbcg_insecticide,
98  fmc_Watering, // dk_sbcg_water1,
99  fmc_Watering, // dk_sbcg_water2,
100  fmc_Fungicide, // dk_sbcg_fungicide1,
101  fmc_Fungicide, // dk_sbcg_fungicide2,
102  fmc_Others, // dk_sbcg_gr1,
103  fmc_Others, // dk_sbcg_gr2,
104  fmc_Others, // dk_sbcg_straw_chopping,
105  fmc_Others, // dk_sbcg_hay_bailing,
106  fmc_Cultivation, // dk_sbcg_stubble_harrow,
107  fmc_Cultivation, // dk_sbcg_plough,
108 
109  // no foobar entry
110 
111  };
112  // Iterate over the catlist elements and copy them to vector
113  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
114  }

References DK_SBCG_BASE, dk_sbcg_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_SpringBarleyCloverGrass().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
dk_sbcg_spring_sow
Definition: DK_SpringBarleyCloverGrass.h:46
DK_SpringBarleyCloverGrass::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_SpringBarleyCloverGrass.h:76
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
dk_sbcg_gr1
Definition: DK_SpringBarleyCloverGrass.h:56
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
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
dk_sbcg_foobar
Definition: DK_SpringBarleyCloverGrass.h:62
Farm::SpringPlough
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
Definition: FarmFuncs.cpp:421
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
dk_sbcg_herbicide1
Definition: DK_SpringBarleyCloverGrass.h:47
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
dk_sbcg_herbicide4
Definition: DK_SpringBarleyCloverGrass.h:50
dk_sbcg_herbicide3
Definition: DK_SpringBarleyCloverGrass.h:49
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
dk_sbcg_start
Definition: DK_SpringBarleyCloverGrass.h:37
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
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
DK_SBCG_FORCESPRING
#define DK_SBCG_FORCESPRING
Definition: DK_SpringBarleyCloverGrass.h:32
tos_SandyLoam
Definition: LandscapeFarmingEnums.h:721
Farm::FA_NPKS
virtual bool FA_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:968
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
dk_sbcg_insecticide
Definition: DK_SpringBarleyCloverGrass.h:51
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
dk_sbcg_spring_harrow_nt
Definition: DK_SpringBarleyCloverGrass.h:45
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
CfgBool::value
bool value() const
Definition: Configurator.h:164
DK_SBCG_BASE
#define DK_SBCG_BASE
Definition: DK_SpringBarleyCloverGrass.h:31
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_sbcg_fungicide2
Definition: DK_SpringBarleyCloverGrass.h:55
dk_sbcg_straw_chopping
Definition: DK_SpringBarleyCloverGrass.h:58
Calendar::Date
long Date(void)
Definition: Calendar.h:57
dk_sbcg_water1
Definition: DK_SpringBarleyCloverGrass.h:52
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
cfg_pest_springbarley_on
CfgBool cfg_pest_springbarley_on
Turn on pesticides for spring barley.
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
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
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
dk_sbcg_ferti_p1
Definition: DK_SpringBarleyCloverGrass.h:41
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.
dk_sbcg_ferti_s2
Definition: DK_SpringBarleyCloverGrass.h:42
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
DK_SBCG_TILL_C
#define DK_SBCG_TILL_C
Definition: DK_SpringBarleyCloverGrass.h:33
dk_sbcg_autumn_plough
Definition: DK_SpringBarleyCloverGrass.h:39
dk_sbcg_spring_plough
Definition: DK_SpringBarleyCloverGrass.h:44
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::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
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
tos_Sand
Definition: LandscapeFarmingEnums.h:719
dk_sbcg_gr2
Definition: DK_SpringBarleyCloverGrass.h:57
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::Water
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: FarmFuncs.cpp:1330
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
dk_sbcg_hay_bailing
Definition: DK_SpringBarleyCloverGrass.h:59
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
tov_DKSpringBarleyCloverGrass
Definition: LandscapeFarmingEnums.h:362
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
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_sbcg_ferti_s1
Definition: DK_SpringBarleyCloverGrass.h:40
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
dk_sbcg_harvest
Definition: DK_SpringBarleyCloverGrass.h:38
dk_sbcg_fungicide1
Definition: DK_SpringBarleyCloverGrass.h:54
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
dk_sbcg_herbicide2
Definition: DK_SpringBarleyCloverGrass.h:48
dk_sbcg_water2
Definition: DK_SpringBarleyCloverGrass.h:53
Crop::AphidDamage
bool AphidDamage(LE *a_field)
Compares aphid numbers per m2 with a threshold to return true if threshold is exceeded.
Definition: Farm.cpp:726
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
tos_LoamySand
Definition: LandscapeFarmingEnums.h:720
dk_sbcg_ferti_p2
Definition: DK_SpringBarleyCloverGrass.h:43
DK_SBCG_TILL_S
#define DK_SBCG_TILL_S
Definition: DK_SpringBarleyCloverGrass.h:34
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::SpringHarrow
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: FarmFuncs.cpp:459
Farm::FP_NPKS
virtual bool FP_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:630