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

IRGrassland_no_reseed class
. More...

#include <IRGrassland_no_reseed.h>

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

IRGrassland_no_reseed class
.

See IRGrassland_no_reseed.h::IRIRGrassland_no_reseedToDo 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

◆ IRGrassland_no_reseed()

IRGrassland_no_reseed::IRGrassland_no_reseed ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
128  : Crop(a_tov, a_toc, a_L)
129  {
130  // When we start it off, the first possible date for a farm operation is 1st October
131  // This information is used by other crops when they decide how much post processing of
132  // the management is allowed after harvest before the next crop starts.
133  m_first_date = g_date->DayInYear(16, 8);
135  }

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

Member Function Documentation

◆ Do()

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

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  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
103  int d1 = 0;
104  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
105  switch (a_ev->m_todo)
106  {
107  case ir_gnrs_start:
108  {
109  // This is just to hold a local variable in scope and prevent compiler errors
110  // ww_start just sets up all the starting conditions and reference dates that are needed to start a ww
111  // crop off
112  IR_GNRS_W_SIL = false; // 32% in total do sillage
113  IR_GNRS_W_SIL_1 = false; // 22% do with sillage in May
114  IR_GNRS_W_SIL_2 = false; // 8% do with sillage in June (and 2% in August)
115  IR_GNRS_EARLY = false; //30% graze by 1st of March
116  IR_GNRS_MID = false; // 60% graze by 17th of March
117  IR_GNRS_LATE = false; // 90% graze by 1st of April
118  IR_GNRS_PEST_APP = false; // 8% of all do pesticide appl.
119  IR_GNRS_PEST_APP_1 = false; // of the 8% above 80% do pesticide mid April
120  IR_GNRS_PEST_APP_2 = false; // of the 8% above 15% do pesticide mid June
121 
122  a_field->ClearManagementActionSum();
123 
124  // Record whether skylark scrapes are present and adjust flag accordingly
126  a_field->m_skylarkscrapes = true;
127  }
128  else {
129  a_field->m_skylarkscrapes = false;
130  }
131  // Set up the date management stuff
132  // The next bit of code just allows for altering dates after harvest if it is necessary
133  // to allow for a crop which starts its management early.
134 
135  int noDates = 1;
136  //a_field->SetMDates(0, 0, g_date->DayInYear(15, 8)); //
137  //a_field->SetMDates(1, 0, g_date->DayInYear(15, 8)); //
138  // Can be up to 10 of these. If the shortening code is triggered
139  // then these will be reduced in value to 0
140 
141  a_field->SetMConstants(0, 1);
142 
143  // Check the next crop for early start, unless it is a spring crop
144  // in which case we ASSUME that no checking is necessary!!!!
145  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
146 
147  //new if: do the check only for non-optimising farms and if year>0. (030713 - m_rotation used only in the hidden year, so I modified the condition from >7 to >0)
148  int d1;
149  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
150 
151  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
152  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
153  {
154  g_msg->Warn(WARN_BUG, "IRGrassland_no_reseed::Do(): ", "Harvest too late for the next crop to start!!!");
155  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
156  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
157  }
158  // Now fix any late finishing problems
159  for (int i = 0; i < noDates; i++) {
160  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
161  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
162  }
163  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
164  a_field->SetMConstants(i, 0); //change the default value of the MConst (=1) to 0 (necessary to correctly execute farm events in case the finishing date (MDate) was moved)
165  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
166  }
167  }
168  }
169  // Now no operations can be timed after the start of the next crop.
170 
171  if (!a_ev->m_first_year) {
172  // Are we before July 1st?
173  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
174  if (g_date->Date() < d1) {
175  // Yes, too early. We assumme this is because the last crop was late
176  printf("Poly: %d\n", a_field->GetPoly());
177  g_msg->Warn(WARN_BUG, "IRGrassland_no_reseed::Do(): ", "Crop start attempt between 1st Jan & 1st July");
178  int prev = a_field->GetLandscape()->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex()));
179  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
180  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
181  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
182  }
183  else {
184  d1 = g_date->OldDays() + m_first_date + 365; // Add 365 for spring crop
185  if (g_date->Date() > d1) {
186  // Yes too late - should not happen - raise an error
187  g_msg->Warn(WARN_BUG, "IRGrassland_no_reseed::Do(): ", "Crop start attempt after last possible start date");
188  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
189  a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex());
190  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
191  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
192  }
193  }
194  }
195  else {
196  // Is the first year
197  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes (start woth the first event on the after winter time) - Date here is a suggestion (not stated in crop scheme!)
198  if (a_farm->IsStockFarmer()) {
200  break;
201  }
202  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(14, 1), ir_gnrs_ferti_p1, false);
203  break;
204  }
205  }//if
206 
207  // End single block date checking code. Please see next line comment as well.
208  // Reinit d1 to first possible starting date.
209  d1 = g_date->OldDays() + g_date->DayInYear(14, 1);
210  if (g_date->Date() >= d1) d1 += 365;
211  // OK, let's go. 98% OF ALL GRASS IS NON-RESEED - 68% do grazing and no silage, 32% do grazing with silage
212  // LKM: Here we queue up the first event
213  //fertilizer - 100% do this in Feb-March, but if heavy covers of grass, grazing is done first (not coded for now)
214  if (a_farm->IsStockFarmer()) {
215  SimpleEvent(d1, ir_gnrs_ferti_s1, false);
216  break;
217  }
218  else SimpleEvent(d1, ir_gnrs_ferti_p1, false);
219  break;
220  }
221  break;
222  case ir_gnrs_ferti_s1: // here the timing of ferti is moved 14 days earlier to make room for 6 weeks of no grazing after application of slurry (and grazing is done March 1st (30%), March 17th (60%), April 1st (10%))
223  if (a_ev->m_lock || a_farm->DoIt_prob(.30)) {
224  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(15, 1) - g_date->DayInYear())) {
225  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s1, true);
226  break;
227  }
228  IR_GNRS_EARLY = true; // we need to remember who do early grazing
229  }
230  else if (a_ev->m_lock || a_farm->DoIt_prob(.60/.70)) {
231  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(31, 1) - g_date->DayInYear())) {
232  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s1, true);
233  break;
234  }
235  IR_GNRS_MID = true; // we need to remember who do intermediate grazing
236  }
237  else {
238  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(15, 2) - g_date->DayInYear())) {
239  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s1, true);
240  break;
241  }
242  IR_GNRS_LATE = true; // we need to remember who do late grazing
243  }
244  SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_s2, false);
245  break;
246 
247  case ir_gnrs_ferti_p1:
248  if (a_ev->m_lock || a_farm->DoIt_prob(.30)) {
249  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(15, 1) - g_date->DayInYear())) {
250  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p1, true);
251  break;
252  }
253  IR_GNRS_EARLY = true; // we need to remember who do early grazing
254  }
255  else if (a_ev->m_lock || a_farm->DoIt_prob(.60 / .70)) {
256  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(31, 1) - g_date->DayInYear())) {
257  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p1, true);
258  break;
259  }
260  IR_GNRS_MID = true; // we need to remember who do intermediate grazing
261  }
262  else {
263  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(15, 2) - g_date->DayInYear())) {
264  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p1, true);
265  break;
266  }
267  IR_GNRS_LATE = true; // we need to remember who do late grazing
268  }
269  SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_p2, false);
270  break;
271 
272  case ir_gnrs_ferti_s2:
273  if (IR_GNRS_EARLY == true) {
274  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(22, 1) - g_date->DayInYear())) {
275  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s2, true);
276  break;
277  }
278  }
279  else if (IR_GNRS_MID == true) {
280  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(8, 2) - g_date->DayInYear())) {
281  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s2, true);
282  break;
283  }
284  }
285  else if (IR_GNRS_LATE == true){
286  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(22, 2) - g_date->DayInYear())) {
287  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s2, true);
288  break;
289  }
290  }
291  SimpleEvent(g_date->Date() + 35, ir_gnrs_grazing1, false);
292  break;
293 
294  case ir_gnrs_ferti_p2:
295  if (IR_GNRS_EARLY == true) {
296  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(22, 1) - g_date->DayInYear())) {
297  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p2, true);
298  break;
299  }
300  }
301  else if (IR_GNRS_MID == true) {
302  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(8, 2) - g_date->DayInYear())) {
303  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p2, true);
304  break;
305  }
306  }
307  else if (IR_GNRS_LATE == true) {
308  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(22, 2) - g_date->DayInYear())) {
309  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p2, true);
310  break;
311  }
312  }
313  SimpleEvent(g_date->Date() + 35, ir_gnrs_grazing1, false); // main thread
314  break;
315 
316  case ir_gnrs_grazing1:
317  if (!a_farm->CattleOut(a_field, 0.0, g_date->DayInYear(1, 4) - g_date->DayInYear())) {
318  SimpleEvent(g_date->Date() + 1, ir_gnrs_grazing1, true);
319  break;
320  }
321  SimpleEvent(g_date->Date() + 1, ir_gnrs_cattle_out1, false);
322  break;
323 
324  case ir_gnrs_cattle_out1: // Keep the cattle out there
325  // CattleIsOut() returns false if it is not time to stop grazing
326  if (!m_farm->CattleIsOut(m_field, 0.0, g_date->DayInYear(1, 4) - g_date->DayInYear(), g_date->DayInYear(1, 4))) {
327  SimpleEvent(g_date->Date() + 1, ir_gnrs_cattle_out1, false);
328  break;
329  }
331  break;
332 
333  case ir_gnrs_herbicide1:
334  if (a_ev->m_lock || a_farm->DoIt_prob(.08)) {
335  if (a_ev->m_lock || a_farm->DoIt_prob(.80)) { // 80% of the 8%
336  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
337  SimpleEvent(g_date->Date() + 1, ir_gnrs_herbicide1, true);
338  break;
339  }
340  IR_GNRS_PEST_APP_1 = true; // we need to remember who did the pesticide applications now
341  }
342  IR_GNRS_PEST_APP = true; // we need to remember who do pesticide applications (8% of all)
343  }
344  SimpleEvent(g_date->OldDays() + g_date->DayInYear(10, 5), ir_gnrs_cutting1, false); // main thread
345  break;
346 
347  case ir_gnrs_cutting1:
348  if (a_ev->m_lock || a_farm->DoIt_prob(.32)) { // 32% of all (22% for this time, 8% later, 2% later again)
349  if (a_ev->m_lock || a_farm->DoIt_prob(.22 / .32)) {
350  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
351  SimpleEvent(g_date->Date() + 1, ir_gnrs_cutting1, true);
352  break;
353  }
354  IR_GNRS_W_SIL_1 = true; // we need to remember who did the silage now
355  }
356  IR_GNRS_W_SIL = true; // we need to remember who do silage in general
357  }
358  if (a_farm->IsStockFarmer()) {
360  break;
361  }
362  else
364  break;
365 
366  case ir_gnrs_ferti_s3:
367  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(23, 5) - g_date->DayInYear())) {
368  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s3, true);
369  break;
370  }
371  if (m_field->GetSoilType() != 2 && m_field->GetSoilType() != 6) {
372  SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_s4_c, false);
373  break;
374  }
375  else SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_s4_s, false);
376  break;
377 
378  case ir_gnrs_ferti_p3:
379  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(23, 5) - g_date->DayInYear())) {
380  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p3, true);
381  break;
382  }
383  if (m_field->GetSoilType() != 2 && m_field->GetSoilType() != 6) {
384  SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_p4_c, false);
385  break;
386  }
387  else SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_p4_s, false);
388  break;
389 
390  case ir_gnrs_ferti_s4_c:
391  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
392  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s4_c, true);
393  break;
394  }
396  break;
397 
398  case ir_gnrs_ferti_p4_c:
399  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
400  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p4_c, true);
401  break;
402  }
404  break;
405 
406  case ir_gnrs_ferti_s4_s:
407  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
408  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s4_s, true);
409  break;
410  }
412  break;
413 
414  case ir_gnrs_ferti_p4_s:
415  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
416  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p4_s, true);
417  break;
418  }
420  break;
421 
422  case ir_gnrs_herbicide2:
423  if ((IR_GNRS_PEST_APP == true) && (IR_GNRS_PEST_APP_1 == false)){
424  if (a_ev->m_lock || a_farm->DoIt_prob(.15 / .20)) { // 15% of the 20% left (of the 8% that do weed control)
425  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(20, 6) - g_date->DayInYear())) {
426  SimpleEvent(g_date->Date() + 1, ir_gnrs_herbicide2, true);
427  break;
428  }
429  IR_GNRS_PEST_APP_2 = true; // we need to remember who did the pesticide applications now - 15%
430  }
431  }
432  if ((IR_GNRS_W_SIL == true) && (IR_GNRS_W_SIL_1 == false)) {
433  if (a_ev->m_lock || a_farm->DoIt_prob(.08 / .10)) {
435  break;
436  }
437  else IR_GNRS_W_SIL_2 = true; // we need to remember who did the silage later (2%)
438  }
439  SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing2, false);
440  break;
441 
442  case ir_gnrs_cutting2:
443  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(13, 7) - g_date->DayInYear())) {
444  SimpleEvent(g_date->Date() + 1, ir_gnrs_cutting2, true);
445  break;
446  }
447  SimpleEvent(g_date->Date() + 14, ir_gnrs_grazing2, false);
448  break;
449 
450  case ir_gnrs_grazing2:
451  if (!a_farm->CattleOut(a_field, 0.0, g_date->DayInYear(28, 7) - g_date->DayInYear())) {
452  SimpleEvent(g_date->Date() + 1, ir_gnrs_grazing2, true);
453  break;
454  }
455  SimpleEvent(g_date->Date() + 1, ir_gnrs_cattle_out2, false);
456  break;
457 
458  case ir_gnrs_cattle_out2: // Keep the cattle out there
459  // CattleIsOut() returns false if it is not time to stop grazing
460  if (!m_farm->CattleIsOut(m_field, 0.0, g_date->DayInYear(29, 7) - g_date->DayInYear(), g_date->DayInYear(29, 7))) {
461  SimpleEvent(g_date->Date() + 1, ir_gnrs_cattle_out2, false);
462  break;
463  }
464  if (a_farm->IsStockFarmer()) {
465  SimpleEvent(g_date->Date()+1, ir_gnrs_ferti_s5, false);
466  break;
467  }
468  else
469  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p5, false);
470  break;
471 
472  case ir_gnrs_ferti_s5:
473  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
474  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s5, true);
475  break;
476  }
477  if (m_field->GetSoilType() != 2 && m_field->GetSoilType() != 6) {
478  SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_s6_c, false);
479  break;
480  }
481  else SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_s6_s, false);
482  break;
483 
484  case ir_gnrs_ferti_p5:
485  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
486  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p5, true);
487  break;
488  }
489  if (m_field->GetSoilType() != 2 && m_field->GetSoilType() != 6) {
490  SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_p6_c, false);
491  break;
492  }
493  else SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_p6_s, false);
494  break;
495 
496  case ir_gnrs_ferti_s6_c:
497  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(8, 8) - g_date->DayInYear())) {
498  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s6_c, true);
499  break;
500  }
501  if (IR_GNRS_W_SIL_2 == true) {
503  break;
504  }
505  SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing3, false); // main thread
506  break;
507 
508  case ir_gnrs_ferti_p6_c:
509  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(8, 8) - g_date->DayInYear())) {
510  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p6_c, true);
511  break;
512  }
513  if (IR_GNRS_W_SIL_2 == true) {
515  break;
516  }
517  SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing3, false); // main thread
518  break;
519 
520  case ir_gnrs_ferti_s6_s:
521  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(8, 8) - g_date->DayInYear())) {
522  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s6_s, true);
523  break;
524  }
525  if (IR_GNRS_W_SIL_2 == true) {
527  break;
528  }
529  SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing3, false); // main thread
530  break;
531 
532  case ir_gnrs_ferti_p6_s:
533  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(8, 8) - g_date->DayInYear())) {
534  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p6_s, true);
535  break;
536  }
537  if (IR_GNRS_W_SIL_2 == true) {
539  break;
540  }
541  SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing3, false); // main thread
542  break;
543 
544  case ir_gnrs_cutting3:
545  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
546  SimpleEvent(g_date->Date() + 1, ir_gnrs_cutting3, true);
547  break;
548  }
549  SimpleEvent(g_date->Date() + 14, ir_gnrs_grazing3, false);
550  break;
551 
552  case ir_gnrs_grazing3:
553  if (!a_farm->CattleOut(a_field, 0.0, g_date->DayInYear(10, 9) - g_date->DayInYear())) {
554  SimpleEvent(g_date->Date() + 1, ir_gnrs_grazing3, true);
555  break;
556  }
557  SimpleEvent(g_date->Date() + 1, ir_gnrs_cattle_out3, false);
558  break;
559 
560  case ir_gnrs_cattle_out3: // Keep the cattle out there
561  // CattleIsOut() returns false if it is not time to stop grazing
562  if (!m_farm->CattleIsOut(m_field, 0.0, g_date->DayInYear(10, 9) - g_date->DayInYear(), g_date->DayInYear(10, 9))) {
563  SimpleEvent(g_date->Date() + 1, ir_gnrs_cattle_out3, false);
564  break;
565  }
566  if (a_farm->IsStockFarmer()) {
567  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s7, false);
568  break;
569  }
570  else
571  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p7, false);
572  break;
573 
574  case ir_gnrs_ferti_s7:
575  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(12, 9) - g_date->DayInYear())) {
576  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s7, true);
577  break;
578  }
579  if (m_field->GetSoilType() != 2 && m_field->GetSoilType() != 6) {
580  SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_s8_c, false);
581  break;
582  }
583  else SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_s8_s, false);
584  break;
585 
586  case ir_gnrs_ferti_p7:
587  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(12, 9) - g_date->DayInYear())) {
588  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p7, true);
589  break;
590  }
591  if (m_field->GetSoilType() != 2 && m_field->GetSoilType() != 6) {
592  SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_p8_c, false);
593  break;
594  }
595  else SimpleEvent(g_date->Date() + 7, ir_gnrs_ferti_p8_s, false);
596  break;
597 
598  case ir_gnrs_ferti_s8_c:
599  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(20, 9) - g_date->DayInYear())) {
600  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s8_c, true);
601  break;
602  }
603  if ((IR_GNRS_PEST_APP == true) && (IR_GNRS_PEST_APP_1 == false) && (IR_GNRS_PEST_APP_2 == false)) {
604  SimpleEvent(g_date->Date() + 1, ir_gnrs_herbicide3, false);
605  break;
606  }
607  else SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing4, false);
608  break;
609 
610  case ir_gnrs_ferti_p8_c:
611  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(20, 9) - g_date->DayInYear())) {
612  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p8_c, true);
613  break;
614  }
615  if ((IR_GNRS_PEST_APP == true) && (IR_GNRS_PEST_APP_1 == false) && (IR_GNRS_PEST_APP_2 == false)) {
616  SimpleEvent(g_date->Date() + 1, ir_gnrs_herbicide3, false);
617  break;
618  }
619  else SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing4, false);
620  break;
621 
622  case ir_gnrs_ferti_s8_s:
623  if (!a_farm->FA_NPKS(a_field, 0.0, g_date->DayInYear(20, 9) - g_date->DayInYear())) {
624  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_s8_s, true);
625  break;
626  }
627  if ((IR_GNRS_PEST_APP == true) && (IR_GNRS_PEST_APP_1 == false) && (IR_GNRS_PEST_APP_2 == false)) {
628  SimpleEvent(g_date->Date() + 1, ir_gnrs_herbicide3, false);
629  break;
630  }
631  else SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing4, false);
632  break;
633 
634  case ir_gnrs_ferti_p8_s:
635  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(20, 9) - g_date->DayInYear())) {
636  SimpleEvent(g_date->Date() + 1, ir_gnrs_ferti_p8_s, true);
637  break;
638  }
639  if ((IR_GNRS_PEST_APP == true) && (IR_GNRS_PEST_APP_1 == false) && (IR_GNRS_PEST_APP_2 == false)) {
640  SimpleEvent(g_date->Date() + 1, ir_gnrs_herbicide3, false);
641  break;
642  }
643  else SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing4, false);
644  break;
645 
646  case ir_gnrs_herbicide3:
647  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(21, 9) - g_date->DayInYear())) {
648  SimpleEvent(g_date->Date() + 1, ir_gnrs_herbicide3, true);
649  break;
650  }
651  SimpleEvent(g_date->Date() + 7, ir_gnrs_grazing4, false);
652  break;
653 
654  case ir_gnrs_grazing4:
655  if (!a_farm->CattleOut(a_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
656  SimpleEvent(g_date->Date() + 1, ir_gnrs_grazing4, true);
657  break;
658  }
659  SimpleEvent(g_date->Date() + 1, ir_gnrs_cattle_out4, false);
660  break;
661 
662  case ir_gnrs_cattle_out4: // Keep the cattle out there
663  // CattleIsOut() returns false if it is not time to stop grazing
664  if (!m_farm->CattleIsOut(m_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear(), g_date->DayInYear(15, 11))) {
665  SimpleEvent(g_date->Date() + 1, ir_gnrs_cattle_out4, false);
666  break;
667  }
668 
669  done = true;
670  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
671  // END OF MAIN THREAD
672  break;
673  default:
674  g_msg->Warn(WARN_BUG, "IRGrassland_no_reseed::Do(): "
675  "Unknown event type! ", "");
676  exit(1);
677  }
678  return done;
679 }

References Farm::CattleIsOut(), Farm::CattleOut(), cfg_IR_Grassland_no_reseed_SkScrapes, LE::ClearManagementActionSum(), Farm::CutToSilage(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), Farm::FA_NPK(), Farm::FA_NPKS(), Farm::FA_Slurry(), Farm::FP_NPK(), Farm::FP_NPKS(), Farm::FP_Slurry(), g_date, g_msg, LE::GetMDates(), LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), LE::GetSoilType(), Farm::GetType(), Calendar::GetYearNumber(), Farm::HerbicideTreat(), ir_gnrs_cattle_out1, ir_gnrs_cattle_out2, ir_gnrs_cattle_out3, ir_gnrs_cattle_out4, ir_gnrs_cutting1, ir_gnrs_cutting2, ir_gnrs_cutting3, IR_GNRS_EARLY, ir_gnrs_ferti_p1, ir_gnrs_ferti_p2, ir_gnrs_ferti_p3, ir_gnrs_ferti_p4_c, ir_gnrs_ferti_p4_s, ir_gnrs_ferti_p5, ir_gnrs_ferti_p6_c, ir_gnrs_ferti_p6_s, ir_gnrs_ferti_p7, ir_gnrs_ferti_p8_c, ir_gnrs_ferti_p8_s, ir_gnrs_ferti_s1, ir_gnrs_ferti_s2, ir_gnrs_ferti_s3, ir_gnrs_ferti_s4_c, ir_gnrs_ferti_s4_s, ir_gnrs_ferti_s5, ir_gnrs_ferti_s6_c, ir_gnrs_ferti_s6_s, ir_gnrs_ferti_s7, ir_gnrs_ferti_s8_c, ir_gnrs_ferti_s8_s, ir_gnrs_grazing1, ir_gnrs_grazing2, ir_gnrs_grazing3, ir_gnrs_grazing4, ir_gnrs_herbicide1, ir_gnrs_herbicide2, ir_gnrs_herbicide3, IR_GNRS_LATE, IR_GNRS_MID, IR_GNRS_PEST_APP, IR_GNRS_PEST_APP_1, IR_GNRS_PEST_APP_2, ir_gnrs_start, IR_GNRS_W_SIL, IR_GNRS_W_SIL_1, IR_GNRS_W_SIL_2, Farm::IsStockFarmer(), Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, LE::m_skylarkscrapes, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent(), tof_OptimisingFarm, CfgBool::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void IRGrassland_no_reseed::SetUpFarmCategoryInformation ( )
inline
136  {
137  const int elements = 2 + (ir_gnrs_foobar - IR_GNRS_BASE);
139 
140  FarmManagementCategory catlist[elements] =
141  {
142  fmc_Others, // zero element unused but must be here ir_gnrs_start = 1, // Compulsory, must always be 1 (one).
143  fmc_Others, // ir_gnrs_sleep_all_day = IR_GNRS_BASE,
144  fmc_Fertilizer, // ir_gnrs_ferti_s1,
145  fmc_Fertilizer, // ir_gnrs_ferti_p1,
146  fmc_Fertilizer, // ir_gnrs_ferti_s2,
147  fmc_Fertilizer, // ir_gnrs_ferti_p2,
148  fmc_Grazing, // ir_gnrs_grazing1,
149  fmc_Grazing, // ir_gnrs_cattle_out1,
150  fmc_Fertilizer, // ir_gnrs_ferti_s3,
151  fmc_Fertilizer, // ir_gnrs_ferti_p3,
152  fmc_Herbicide, // ir_gnrs_herbicide1,
153  fmc_Fertilizer, // ir_gnrs_ferti_s4_s,
154  fmc_Fertilizer, // ir_gnrs_ferti_p4_s,
155  fmc_Fertilizer, // ir_gnrs_ferti_s4_c,
156  fmc_Fertilizer, // ir_gnrs_ferti_p4_c,
157  fmc_Cutting, // ir_gnrs_cutting1,
158  fmc_Grazing, // ir_gnrs_grazing2,
159  fmc_Grazing, // ir_gnrs_cattle_out2,
160  fmc_Fertilizer, // ir_gnrs_ferti_s5,
161  fmc_Fertilizer, // ir_gnrs_ferti_p5,
162  fmc_Herbicide, // ir_gnrs_herbicide2,
163  fmc_Fertilizer, // ir_gnrs_ferti_s6_s,
164  fmc_Fertilizer, // ir_gnrs_ferti_p6_s,
165  fmc_Fertilizer, // ir_gnrs_ferti_s6_c,
166  fmc_Fertilizer, // ir_gnrs_ferti_p6_c,
167  fmc_Cutting, // ir_gnrs_cutting2,
168  fmc_Grazing, // ir_gnrs_grazing3,
169  fmc_Grazing, // ir_gnrs_cattle_out3,
170  fmc_Fertilizer, // ir_gnrs_ferti_s7,
171  fmc_Fertilizer, // ir_gnrs_ferti_p7,
172  fmc_Herbicide, // ir_gnrs_herbicide3,
173  fmc_Fertilizer, // ir_gnrs_ferti_s8_c,
174  fmc_Fertilizer, // ir_gnrs_ferti_p8_c,
175  fmc_Fertilizer, // ir_gnrs_ferti_s8_s,
176  fmc_Fertilizer, // ir_gnrs_ferti_p8_s,
177  fmc_Cutting, // ir_gnrs_cutting3,
178  fmc_Grazing, // ir_gnrs_grazing4,
179  fmc_Grazing, // ir_gnrs_cattle_out4,
180 
181 
182 
183  // no foobar entry
184 
185  };
186  // Iterate over the catlist elements and copy them to vector
187  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
188 
189  }

References fmc_Cutting, fmc_Fertilizer, fmc_Grazing, fmc_Herbicide, fmc_Others, IR_GNRS_BASE, ir_gnrs_foobar, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by IRGrassland_no_reseed().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
ir_gnrs_cattle_out4
Definition: IRGrassland_no_reseed.h:111
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
ir_gnrs_ferti_p4_c
Definition: IRGrassland_no_reseed.h:88
ir_gnrs_ferti_p4_s
Definition: IRGrassland_no_reseed.h:86
IR_GNRS_W_SIL_1
#define IR_GNRS_W_SIL_1
Definition: IRGrassland_no_reseed.h:58
IR_GNRS_PEST_APP_1
#define IR_GNRS_PEST_APP_1
Definition: IRGrassland_no_reseed.h:64
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
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
ir_gnrs_herbicide1
Definition: IRGrassland_no_reseed.h:84
ir_gnrs_cattle_out2
Definition: IRGrassland_no_reseed.h:91
ir_gnrs_cutting2
Definition: IRGrassland_no_reseed.h:99
ir_gnrs_ferti_s2
Definition: IRGrassland_no_reseed.h:78
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
ir_gnrs_ferti_s8_s
Definition: IRGrassland_no_reseed.h:107
Farm::CattleIsOut
virtual bool CattleIsOut(LE *a_field, double a_user, int a_days, int a_max)
Generate a 'cattle_out' event for every day the cattle are on a_field.
Definition: FarmFuncs.cpp:2470
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
Farm::CutToSilage
virtual bool CutToSilage(LE *a_field, double a_user, int a_days)
Cut vegetation for silage on a_field.
Definition: FarmFuncs.cpp:1644
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
ir_gnrs_ferti_s1
Definition: IRGrassland_no_reseed.h:76
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
ir_gnrs_ferti_p2
Definition: IRGrassland_no_reseed.h:79
LE::GetPoly
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: Elements.h:238
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
ir_gnrs_cutting3
Definition: IRGrassland_no_reseed.h:109
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
ir_gnrs_ferti_p6_c
Definition: IRGrassland_no_reseed.h:98
IR_GNRS_BASE
#define IR_GNRS_BASE
Definition: IRGrassland_no_reseed.h:53
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
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
ir_gnrs_ferti_p5
Definition: IRGrassland_no_reseed.h:93
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
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
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
ir_gnrs_ferti_s6_s
Definition: IRGrassland_no_reseed.h:95
cfg_IR_Grassland_no_reseed_SkScrapes
CfgBool cfg_IR_Grassland_no_reseed_SkScrapes("IR_CROP_GNRS_SK_SCRAPES", CFG_CUSTOM, false)
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
ir_gnrs_ferti_p3
Definition: IRGrassland_no_reseed.h:83
IR_GNRS_PEST_APP
#define IR_GNRS_PEST_APP
Definition: IRGrassland_no_reseed.h:63
IR_GNRS_W_SIL_2
#define IR_GNRS_W_SIL_2
Definition: IRGrassland_no_reseed.h:59
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
ir_gnrs_ferti_p7
Definition: IRGrassland_no_reseed.h:103
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
ir_gnrs_cutting1
Definition: IRGrassland_no_reseed.h:89
IR_GNRS_W_SIL
#define IR_GNRS_W_SIL
A flag used to indicate autumn ploughing status.
Definition: IRGrassland_no_reseed.h:57
LE::m_skylarkscrapes
bool m_skylarkscrapes
For management testing of skylark scrapes.
Definition: Elements.h:95
Calendar::Date
long Date(void)
Definition: Calendar.h:57
ir_gnrs_ferti_p1
Definition: IRGrassland_no_reseed.h:77
IR_GNRS_LATE
#define IR_GNRS_LATE
Definition: IRGrassland_no_reseed.h:62
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
IR_GNRS_EARLY
#define IR_GNRS_EARLY
Definition: IRGrassland_no_reseed.h:60
ir_gnrs_grazing3
Definition: IRGrassland_no_reseed.h:100
ir_gnrs_ferti_s7
Definition: IRGrassland_no_reseed.h:102
ir_gnrs_ferti_s3
Definition: IRGrassland_no_reseed.h:82
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
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
ir_gnrs_grazing4
Definition: IRGrassland_no_reseed.h:110
ir_gnrs_ferti_s4_s
Definition: IRGrassland_no_reseed.h:85
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
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
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
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
ir_gnrs_ferti_s5
Definition: IRGrassland_no_reseed.h:92
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
ir_gnrs_ferti_p8_s
Definition: IRGrassland_no_reseed.h:108
ir_gnrs_herbicide2
Definition: IRGrassland_no_reseed.h:94
ir_gnrs_cattle_out3
Definition: IRGrassland_no_reseed.h:101
IRGrassland_no_reseed::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: IRGrassland_no_reseed.h:136
fmc_Grazing
Definition: LandscapeFarmingEnums.h:1010
ir_gnrs_herbicide3
Definition: IRGrassland_no_reseed.h:104
ir_gnrs_ferti_s6_c
Definition: IRGrassland_no_reseed.h:97
IR_GNRS_PEST_APP_2
#define IR_GNRS_PEST_APP_2
Definition: IRGrassland_no_reseed.h:65
ir_gnrs_grazing2
Definition: IRGrassland_no_reseed.h:90
ir_gnrs_ferti_p6_s
Definition: IRGrassland_no_reseed.h:96
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
ir_gnrs_ferti_s4_c
Definition: IRGrassland_no_reseed.h:87
ir_gnrs_ferti_p8_c
Definition: IRGrassland_no_reseed.h:106
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
ir_gnrs_cattle_out1
Definition: IRGrassland_no_reseed.h:81
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Farm::CattleOut
virtual bool CattleOut(LE *a_field, double a_user, int a_days)
Start a grazing event on a_field today.
Definition: FarmFuncs.cpp:2368
ir_gnrs_start
Definition: IRGrassland_no_reseed.h:74
ir_gnrs_ferti_s8_c
Definition: IRGrassland_no_reseed.h:105
WARN_BUG
Definition: MapErrorMsg.h:34
ir_gnrs_grazing1
Definition: IRGrassland_no_reseed.h:80
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
ir_gnrs_foobar
Definition: IRGrassland_no_reseed.h:112
IR_GNRS_MID
#define IR_GNRS_MID
Definition: IRGrassland_no_reseed.h:61
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