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

DK_SeedGrassRye_Spring class
. More...

#include <DK_SeedGrassRye_Spring.h>

Inheritance diagram for DK_SeedGrassRye_Spring:
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...
 
 DK_SeedGrassRye_Spring (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

DK_SeedGrassRye_Spring class
.

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

◆ DK_SeedGrassRye_Spring()

DK_SeedGrassRye_Spring::DK_SeedGrassRye_Spring ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
107  : Crop(a_tov, a_toc, a_L)
108  {
109  // When we start it off, the first possible date for a farm operation
110  // This information is used by other crops when they decide how much post processing of
111  // the management is allowed after harvest before the next crop starts.
112  m_first_date = g_date->DayInYear(30, 11);
114  }

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

Member Function Documentation

◆ Do()

bool DK_SeedGrassRye_Spring::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 a_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 spring barley Fodder.

Reimplemented from Crop.

99 {
100  m_field = a_field; // this is needed because of possible calls to other methods and currently we do not pass parameters.
101  m_farm = a_farm; // this is needed because of possible calls to other methods and currently we do not pass parameters.
102  m_ev = a_ev;
103  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
104  int d1 = 0;
106  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
107  switch (a_ev->m_todo)
108  {
109  case dk_sgr_start:
110  {
112  DK_SGR_FORCESPRING = false;
113  a_field->ClearManagementActionSum();
114  m_last_date = g_date->DayInYear(1, 9); // Should match the last flexdate below
115  //Create a 2d array of 1 plus the number of operations you use. Change only 4+1 to what you need in the line below
116  std::vector<std::vector<int>> flexdates(3 + 1, std::vector<int>(2, 0));
117  // Set up the date management stuff
118  // Start and stop dates for all events after harvest
119  flexdates[0][1] = g_date->DayInYear(15, 8); // last possible day of swathing in this case
120  // Now these are done in pairs, start & end for each operation. If its not used then -1
121  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
122  flexdates[1][1] = g_date->DayInYear(31, 8); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1) - harvest
123  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 2 (start op 2)
124  flexdates[2][1] = g_date->DayInYear(31, 8); // This date will be moved back as far as necessary and potentially to flexdates 2 (end op 2) - straw chopping
125  flexdates[3][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 3 (start op 3)
126  flexdates[3][1] = g_date->DayInYear(1, 9); // This date will be moved back as far as necessary and potentially to flexdates 3 (end op 3) - burn straw
127 
128  // 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
129  int isSpring = 0;
130  if (StartUpCrop(isSpring, flexdates, int(dk_sgr_spring_plough))) break;
131  // OK, let's go.
132  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
133  if (m_ev->m_forcespring) {
134  if ((DK_SGR_EVERY_2ND_YEAR + g_date->GetYearNumber()) % 3 == 0)
135  {
136  d1 = g_date->OldDays() + g_date->DayInYear(20, 3);
137  if (g_date->Date() >= d1) d1 += 365;
138  SimpleEvent(d1, dk_sgr_ferti_s2, false);
139  }
140  else if ((DK_SGR_EVERY_2ND_YEAR + g_date->GetYearNumber()) % 3 == 1)
141  {
142  d1 = g_date->OldDays() + g_date->DayInYear(20, 3);
143  if (g_date->Date() >= d1) d1 += 365;
144  SimpleEvent(d1, dk_sgr_ferti_s2, false);
145  }
146  else if ((DK_SGR_EVERY_2ND_YEAR + g_date->GetYearNumber()) % 3 == 2)
147  {
148  d1 = g_date->OldDays() + g_date->DayInYear(1, 3);
149  if (g_date->Date() >= d1) d1 += 365;
150  SimpleEvent(d1, dk_sgr_spring_plough, false);
151  }
152  else if ((DK_SGR_EVERY_2ND_YEAR + g_date->GetYearNumber()) % 3 == 3)
153  {
154  d1 = g_date->OldDays() + g_date->DayInYear(1, 3);
155  if (g_date->Date() >= d1) d1 += 365;
156  SimpleEvent(d1, dk_sgr_spring_plough, false);
157  }
158 
159  DK_SGR_FORCESPRING = true;
160  break;
161  }
162  else
163 
164  // End single block date checking code. Please see next line comment as well.
165  // Reinit d1 to first possible starting date
166  if ((DK_SGR_EVERY_2ND_YEAR + g_date->GetYearNumber()) % 3 == 0)
167  {
168  d1 = g_date->OldDays() + g_date->DayInYear(20, 3);
169  if (g_date->Date() >= d1) d1 += 365;
170  SimpleEvent(d1, dk_sgr_ferti_s2, false);
171  }
172  else if ((DK_SGR_EVERY_2ND_YEAR + g_date->GetYearNumber()) % 3 == 1)
173  {
174  d1 = g_date->OldDays() + g_date->DayInYear(20, 3);
175  if (g_date->Date() >= d1) d1 += 365;
176  SimpleEvent(d1, dk_sgr_ferti_s2, false);
177  }
178  else if ((DK_SGR_EVERY_2ND_YEAR + g_date->GetYearNumber()) % 3 == 2)
179  {
180  d1 = g_date->OldDays() + g_date->DayInYear(1, 10);
181  SimpleEvent(d1, dk_sgr_autumn_plough, false);
182  }
183  else if ((DK_SGR_EVERY_2ND_YEAR + g_date->GetYearNumber()) % 3 == 3)
184  {
185  d1 = g_date->OldDays() + g_date->DayInYear(1, 10);
186  SimpleEvent(d1, dk_sgr_autumn_plough, false);
187  }
188  break;
189 
190  }
191  break;
192  // LKM: This is the first real farm operation
194  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)
195  {
196  if (a_ev->m_lock || a_farm->DoIt_prob(0.95)) {
197  if (!a_farm->AutumnPlough(a_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
199  break;
200  }
201  }
202  }
203  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, dk_sgr_spring_plough, false);
204  break;
205 
207  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(29, 4) - g_date->DayInYear())) {
209  break;
210  }
211  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_sgr_sow, false);
212  break;
213 
214  case dk_sgr_sow: // sow mix of seedgrass and cover crop - % doing cover crop is unknown atm
215  if (!a_farm->SpringSow(a_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
216  SimpleEvent(g_date->Date() + 1, dk_sgr_sow, true);
217  break;
218  }
219  SimpleEvent(g_date->Date() + 7, dk_sgr_herbicide1, false);
220  break;
221 
222  case dk_sgr_herbicide1:
223  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(22, 4) - g_date->DayInYear())) {
224  SimpleEvent(g_date->Date() + 1, dk_sgr_herbicide1, true);
225  break;
226  }
227  SimpleEvent(g_date->Date() + 7, dk_sgr_herbicide2, false);
228  break;
229 
230  case dk_sgr_herbicide2:
231  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
232  SimpleEvent(g_date->Date() + 1, dk_sgr_herbicide2, true);
233  break;
234  }
236  break;
237 
238  case dk_sgr_harvest: // harvest of cover crop
239  if (a_ev->m_lock || a_farm->DoIt_prob(1.0)) {
240  if (!a_farm->Harvest(a_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
241  SimpleEvent(g_date->Date() + 1, dk_sgr_harvest, true);
242  break;
243  }
244  }
246  break;
247 
249  if (a_ev->m_lock || a_farm->DoIt_prob(1.0)) {
250  if (!a_farm->StrawRemoval(a_field, 0.0, g_date->DayInYear(16, 9) - g_date->DayInYear())) {
252  break;
253  }
254  }
256  break;
257 
258  case dk_sgr_ferti_s1:
259  if (a_farm->IsStockFarmer()) {
260  if (a_ev->m_lock || a_farm->DoIt_prob(0.3)) {
261  if (!a_farm->FA_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(16, 9) - g_date->DayInYear())) {
262  SimpleEvent(g_date->Date() + 1, dk_sgr_ferti_s1, true);
263  break;
264  }
265  }
266  // End of management
267  done = true;
268  break;
269  }
270  else {
272  break;
273  }
274 
275  case dk_sgr_ferti_p1:
276  if (a_ev->m_lock || a_farm->DoIt_prob(0.3)) {
277  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(16, 9) - g_date->DayInYear())) {
278  SimpleEvent(g_date->Date() + 1, dk_sgr_ferti_p1, true);
279  break;
280  }
281  }
282  // End of management
283  done = true;
284  break;
285 
286  // year 1+2 after establishment year:
287  case dk_sgr_ferti_s2:
288  if (a_farm->IsStockFarmer()) {
289  if (a_ev->m_lock || a_farm->DoIt_prob(1.0)) {
290  if (!a_farm->FA_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
291  SimpleEvent(g_date->Date() + 1, dk_sgr_ferti_s2, true);
292  break;
293  }
294  }
296  break;
297  }
298  else {
300  break;
301  }
302 
303  case dk_sgr_ferti_p2:
304  if (a_ev->m_lock || a_farm->DoIt_prob(1.0)) {
305  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
306  SimpleEvent(g_date->Date() + 1, dk_sgr_ferti_p2, true);
307  break;
308  }
309  }
311  break;
312 
313  case dk_sgr_herbicide3:
314  if (a_ev->m_lock || a_farm->DoIt_prob(0.6)) {
315  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
316  SimpleEvent(g_date->Date() + 1, dk_sgr_herbicide3, true);
317  break;
318  }
319  }
320  //here comes a fork of parallel events:
321  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), dk_sgr_fungicide1, false); // fungi thread
322  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_sgr_growth_reg, false); // GR thread
323  if (a_farm->IsStockFarmer()) {
324  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_sgr_ferti_s3, false); // ferti thread - main thread
325  break;
326  }
327  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_sgr_ferti_p3, false); // ferti thread - main thread
328  break;
329 
330  case dk_sgr_fungicide1:
331  if (a_ev->m_lock || a_farm->DoIt_prob(0.3)) {
332  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
333  SimpleEvent(g_date->Date() + 1, dk_sgr_fungicide1, true);
334  break;
335  }
336  }
337  SimpleEvent(g_date->Date()+14, dk_sgr_fungicide2, false);
338  break;
339 
340  case dk_sgr_fungicide2:
341  if (a_ev->m_lock || a_farm->DoIt_prob(0.5)) {
342  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
343  SimpleEvent(g_date->Date() + 1, dk_sgr_fungicide2, true);
344  break;
345  }
346  }
347  break; //end of thread
348 
349  case dk_sgr_growth_reg:
350  if (a_ev->m_lock || a_farm->DoIt_prob(0.8)) {
351  if (!a_farm->GrowthRegulator(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
352  SimpleEvent(g_date->Date() + 1, dk_sgr_growth_reg, true);
353  break;
354  }
355  }
356  break; // end of thread
357 
358  case dk_sgr_ferti_s3:
359  if (a_farm->IsStockFarmer()) {
360  if (a_ev->m_lock || a_farm->DoIt_prob(0.90)) {
361  if (!a_farm->FA_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
362  SimpleEvent(g_date->Date() + 1, dk_sgr_ferti_s3, true);
363  break;
364  }
365 
366  }
368  break;
369  }
370  else {
372  break;
373  }
374 
375  case dk_sgr_ferti_p3:
376  if (a_ev->m_lock || a_farm->DoIt_prob(0.90)) {
377  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
378  SimpleEvent(g_date->Date() + 1, dk_sgr_ferti_p3, true);
379  break;
380  }
381  }
383  break;
384 
385  case dk_sgr_herbicide4:
386  if (a_ev->m_lock || a_farm->DoIt_prob(0.60)) {
387  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
388  SimpleEvent(g_date->Date() + 1, dk_sgr_herbicide4, true);
389  break;
390  }
391  }
393  break;
394 
395  case dk_sgr_swathing:
396  if (a_ev->m_lock || a_farm->DoIt_prob(0.03)) {
397  if (!a_farm->Swathing(a_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
398  SimpleEvent(g_date->Date() + 1, dk_sgr_swathing, true);
399  break;
400  }
402  break;
403  }
405  break;
406 
407 
408  case dk_sgr_seed_harvest:
409  if (a_ev->m_lock || a_farm->DoIt_prob(1.0)) {
410  if (!a_farm->Harvest(a_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
412  break;
413  }
414  }
416  break;
417 
418  case dk_sgr_straw_chopping2: // often the ryegrass will stay as a catch crop (thus no straw chopping/burning for 90%)
419  if (a_ev->m_lock || a_farm->DoIt_prob(0.1)) {
420  if (!a_farm->StrawChopping(a_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
422  break;
423  }
425  break;
426  }
427  // End of management
428  done = true;
429  break;
430 
431  case dk_sgr_burn_straw:
432  if (!a_farm->BurnStrawStubble(a_field, 0.0, m_field->GetMDates(1, 3) - g_date->DayInYear())) {
433  SimpleEvent(g_date->Date() + 1, dk_sgr_burn_straw, true);
434  break;
435  }
436  // End of management
437  done = true;
438  break;
439 
440  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
441  // END OF MAIN THREAD
442  default:
443  g_msg->Warn(WARN_BUG, "DK_SeedGrassRye_Spring::Do(): "
444  "Unknown event type! ", "");
445  exit(1);
446  }
447  return done;
448 }

References Farm::AutumnPlough(), Farm::BurnStrawStubble(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), dk_sgr_autumn_plough, dk_sgr_burn_straw, DK_SGR_EVERY_2ND_YEAR, dk_sgr_ferti_p1, dk_sgr_ferti_p2, dk_sgr_ferti_p3, dk_sgr_ferti_s1, dk_sgr_ferti_s2, dk_sgr_ferti_s3, DK_SGR_FORCESPRING, dk_sgr_fungicide1, dk_sgr_fungicide2, dk_sgr_growth_reg, dk_sgr_harvest, dk_sgr_herbicide1, dk_sgr_herbicide2, dk_sgr_herbicide3, dk_sgr_herbicide4, dk_sgr_remove_straw1, dk_sgr_seed_harvest, dk_sgr_sow, dk_sgr_spring_plough, dk_sgr_start, dk_sgr_straw_chopping2, dk_sgr_swathing, Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FP_AmmoniumSulphate(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), LE::GetSoilType(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), Crop::SimpleEvent(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StrawChopping(), Farm::StrawRemoval(), Farm::Swathing(), tos_LoamySand, tos_Sand, tos_SandyClayLoam, tos_SandyLoam, tov_DKSeedGrassRye_Spring, MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void DK_SeedGrassRye_Spring::SetUpFarmCategoryInformation ( )
inline
115  {
116  const int elements = 2 + (dk_sgr_foobar - DK_SGR_BASE);
118 
119  FarmManagementCategory catlist[elements] =
120  {
121  fmc_Others, // zero element unused but must be here
122  fmc_Others, // dk_sgr_start = 1, // Compulsory, must always be 1 (one).
123  fmc_Cultivation, // dk_sgr_plough = DK_SGR_BASE
124  fmc_Others, // dk_sgr_sow
125  fmc_Herbicide, // dk_sgr_herbicide1,
126  fmc_Harvest, // dk_sgr_harvest,
127  fmc_Others, // dk_sgr_remove_straw1
128  fmc_Fertilizer, // dk_sgr_ferti_s1,
129  fmc_Fertilizer, // dk_sgr_ferti_p1,
130  fmc_Cutting, // dk_sgr_straw_chopping1,
131  fmc_Fertilizer, // dk_sgr_ferti_s2,
132  fmc_Fertilizer, // dk_sgr_ferti_p2,
133  fmc_Herbicide, // dk_sgr_herbicide2,
134  fmc_Fungicide, // dk_sgr_fungicide1,
135  fmc_Fungicide, // dk_sgr_fungicide2,
136  fmc_Others, // dk_sgr_growth_reg,
137  fmc_Cutting, // dk_sgr_swathing,
138  fmc_Harvest, // dk_sgr_seed_harvest,
139  fmc_Cutting, // dk_sgr_straw_chopping2,
140  fmc_Others, // dk_sgr_burn_straw
141  fmc_Fertilizer, // dk_sgr_ferti_s3,
142  fmc_Fertilizer, // dk_sgr_ferti_p3,
143  fmc_Herbicide, // dk_sgr_herbicide3,
144  fmc_Herbicide, // dk_sgr_herbicide4,
145 
146  // no foobar entry
147 
148  };
149  // Iterate over the catlist elements and copy them to vector
150  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
151 
152  }

References DK_SGR_BASE, dk_sgr_foobar, fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_SeedGrassRye_Spring().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
dk_sgr_straw_chopping2
Definition: DK_SeedGrassRye_Spring.h:85
dk_sgr_ferti_p3
Definition: DK_SeedGrassRye_Spring.h:88
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_sgr_remove_straw1
Definition: DK_SeedGrassRye_Spring.h:73
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
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
dk_sgr_burn_straw
Definition: DK_SeedGrassRye_Spring.h:86
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
dk_sgr_swathing
Definition: DK_SeedGrassRye_Spring.h:83
Farm::StrawRemoval
virtual bool StrawRemoval(LE *a_field, double a_user, int a_days)
Straw covering applied on a_field.
Definition: FarmFuncs.cpp:1752
DK_SGR_BASE
#define DK_SGR_BASE
Definition: DK_SeedGrassRye_Spring.h:56
tos_SandyClayLoam
Definition: LandscapeFarmingEnums.h:722
dk_sgr_herbicide4
Definition: DK_SeedGrassRye_Spring.h:90
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_sgr_herbicide1
Definition: DK_SeedGrassRye_Spring.h:71
tos_SandyLoam
Definition: LandscapeFarmingEnums.h:721
Farm::SpringSow
virtual bool SpringSow(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 spring on a_field.
Definition: FarmFuncs.cpp:501
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
dk_sgr_sow
Definition: DK_SeedGrassRye_Spring.h:70
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_sgr_harvest
Definition: DK_SeedGrassRye_Spring.h:72
dk_sgr_herbicide3
Definition: DK_SeedGrassRye_Spring.h:89
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_sgr_ferti_p2
Definition: DK_SeedGrassRye_Spring.h:78
dk_sgr_autumn_plough
Definition: DK_SeedGrassRye_Spring.h:68
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_sgr_fungicide1
Definition: DK_SeedGrassRye_Spring.h:80
Calendar::Date
long Date(void)
Definition: Calendar.h:57
DK_SeedGrassRye_Spring::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_SeedGrassRye_Spring.h:115
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
dk_sgr_herbicide2
Definition: DK_SeedGrassRye_Spring.h:79
dk_sgr_ferti_p1
Definition: DK_SeedGrassRye_Spring.h:75
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
Farm::StrawChopping
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: FarmFuncs.cpp:1475
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
DK_SGR_EVERY_2ND_YEAR
#define DK_SGR_EVERY_2ND_YEAR
Definition: DK_SeedGrassRye_Spring.h:53
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
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
dk_sgr_fungicide2
Definition: DK_SeedGrassRye_Spring.h:81
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_sgr_ferti_s2
Definition: DK_SeedGrassRye_Spring.h:77
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
tos_Sand
Definition: LandscapeFarmingEnums.h:719
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
Farm::AutumnPlough
virtual bool AutumnPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the autumn on a_field.
Definition: FarmFuncs.cpp:212
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Farm::FA_AmmoniumSulphate
virtual bool FA_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply ammonium sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1081
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
dk_sgr_growth_reg
Definition: DK_SeedGrassRye_Spring.h:82
dk_sgr_seed_harvest
Definition: DK_SeedGrassRye_Spring.h:84
dk_sgr_start
Definition: DK_SeedGrassRye_Spring.h:67
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
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Farm::BurnStrawStubble
virtual bool BurnStrawStubble(LE *a_field, double a_user, int a_days)
Burn stubble on a_field.
Definition: FarmFuncs.cpp:1567
DK_SGR_FORCESPRING
#define DK_SGR_FORCESPRING
Definition: DK_SeedGrassRye_Spring.h:54
dk_sgr_spring_plough
Definition: DK_SeedGrassRye_Spring.h:69
Farm::Swathing
virtual bool Swathing(LE *a_field, double a_user, int a_days)
Cut the crop on a_field and leave it lying (probably rape)
Definition: FarmFuncs.cpp:1350
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
tos_LoamySand
Definition: LandscapeFarmingEnums.h:720
dk_sgr_foobar
Definition: DK_SeedGrassRye_Spring.h:91
WARN_BUG
Definition: MapErrorMsg.h:34
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
dk_sgr_ferti_s1
Definition: DK_SeedGrassRye_Spring.h:74
dk_sgr_ferti_s3
Definition: DK_SeedGrassRye_Spring.h:87
tov_DKSeedGrassRye_Spring
Definition: LandscapeFarmingEnums.h:408