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

BEGrassGrazed2 class
. More...

#include <BEGrassGrazed1Spring.h>

Inheritance diagram for BEGrassGrazed1Spring:
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...
 
 BEGrassGrazed1Spring (TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
 
- 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

BEGrassGrazed2 class
.

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

◆ BEGrassGrazed1Spring()

BEGrassGrazed1Spring::BEGrassGrazed1Spring ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
81  : Crop(a_tov, a_toc, a_L)
82  {
83  // When we start it off, the first possible date for a farm operation is 5th November
84  // This information is used by other crops when they decide how much post processing of
85  // the management is allowed after harvest before the next crop starts.
87  }

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

Member Function Documentation

◆ Do()

bool BEGrassGrazed1Spring::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 TemporalGrassGrazed2.

Reimplemented from Crop.

55 {
56  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
57  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
58  m_field = a_field;
59  m_ev = a_ev;
60  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
61  bool flag = false;
62  int d1 = 0;
63  int noDates = 1;
64  TTypesOfVegetation l_tov = tov_BEGrassGrazed1Spring; // The current type - change to match the crop you have
65  /**********************************************To Here *************************************************************************/
66  // Depending what event has occured jump to the correct bit of code
67  switch (a_ev->m_todo)
68  {
69  case BE_gg1s_start:
70  {
71  // BE_gg1s_start just sets up all the starting conditions and reference dates that are needed to start a BE_pot
73  BE_gg1s_CUT_DATE = 0;
75 
76 
77  // Set up the date management stuff
78  // The next bit of code just allows for altering dates after harvest if it is necessary
79  // to allow for a crop which starts its management early.
80 
81  // 1 start and stop dates for all 'movable' events for this crop
82  int noDates = 1;
83  a_field->SetMDates(0, 0, g_date->DayInYear(10, 10)); // last possible day of last cutting
84  a_field->SetMDates(1, 0, g_date->DayInYear(10, 10)); // last possible day of NPK application
85 
86  a_field->SetMConstants(0, 1);
87 
88  // Check the next crop for early start, uBEess it is a spring crop
89  // in which case we ASSUME that no checking is necessary!!!!
90  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
91 
92  //new if: do the check only for non-optimising farms and if year>0. (030713 - ms_rotation used only in the hidden year, so I modified the condition from >7 to >0)
93  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
94  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
95 
96  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
97  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
98  {
99  g_msg->Warn(WARN_BUG, "BEGrassGrazed1Spring::Do(): ", "Harvest too late for the next crop to start!!!");
100  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
101  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
102  }
103  // Now fix any late finishing problems
104  for (int i = 0; i < noDates; i++) {
105  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
106  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
107  }
108  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
109  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)
110  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
111  }
112  }
113  }
114  // Now no operations can be timed after the start of the next crop.
115 
116  if (!a_ev->m_first_year) {
117  d1 = g_date->OldDays() + 365 + m_first_date; // Add 365 for spring crop
118  if (g_date->Date() > d1) {
119  // Yes too late - should not happen - raise an error
120  g_msg->Warn(WARN_BUG, "BEGrassGrazed1Spring::Do(): ", "Crop start attempt after last possible start date");
121  int prev = a_field->GetLandscape()->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex()));
122  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
123  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
124  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
125  exit(1);
126  }
127  }
128  else {
129  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3), BE_gg1s_preseeding_cultivator, false, a_farm, a_field);
130  break;
131  }
132  }//if
133 
134  // End single block date checking code. Please see next line comment as well.
135  // Reinit d1 to first possible starting date.
136 
137  d1 = g_date->OldDays() + g_date->DayInYear(15, 3);
138  if (g_date->Date() >= d1) d1 += 365;
139  // OK, let's go.
140  // Here we queue up the first event
141  SimpleEvent_(d1, BE_gg1s_preseeding_cultivator, false, a_farm, a_field);
142 
143  }
144  break;
145 
146  // This is the first real farm operation
148  if (!a_farm->PreseedingCultivator(a_field, 0.0, g_date->DayInYear(20, 3) - g_date->DayInYear())) {
149  SimpleEvent_(g_date->Date() + 1, BE_gg1s_preseeding_cultivator, true, a_farm, a_field);
150  break;
151  }
152  if (a_farm->IsStockFarmer()) //Stock Farmer
153  {
154  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s1, false, a_farm, a_field);
155  }
156  else SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p1, false, a_farm, a_field);
157  break;
158  case BE_gg1s_ferti_p1:
159  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(22, 3) - g_date->DayInYear())) {
160  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p1, true, a_farm, a_field);
161  break;
162  }
163  SimpleEvent_(g_date->Date() + 1, BE_gg1s_spring_sow, false, a_farm, a_field);
164  break;
165  case BE_gg1s_ferti_s1:
166  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(22, 3) - g_date->DayInYear())) {
167  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s1, true, a_farm, a_field);
168  break;
169  }
170  SimpleEvent_(g_date->Date() + 1, BE_gg1s_spring_sow, false, a_farm, a_field);
171  break;
172  case BE_gg1s_spring_sow:
173  if (!a_farm->SpringSow(a_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear())) {
174  SimpleEvent_(g_date->Date() + 1, BE_gg1s_spring_sow, true, a_farm, a_field);
175  break;
176  }
177  d1 = g_date->Date() + 7;
178  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 3)) {
179  d1 = g_date->OldDays() + g_date->DayInYear(1, 3);
180  }
181  if (a_farm->IsStockFarmer()) //Stock Farmer
182  {
183  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s2, false, a_farm, a_field);
184  }
185  else SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p2, false, a_farm, a_field);
186  break;
187  case BE_gg1s_ferti_p2:
188  if (a_farm->DoIt_prob(0.90)) {
189  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
190  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p2, true, a_farm, a_field);
191  break;
192  }
193  }
194  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(25, 4), BE_gg1s_cut_to_silage1, false, a_farm, a_field);
195  break;
196  case BE_gg1s_ferti_s2:
197  if (a_farm->DoIt_prob(0.90)) {
198  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
199  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s2, true, a_farm, a_field);
200  break;
201  }
202  }
203  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(25, 4), BE_gg1s_cut_to_silage1, false, a_farm, a_field);
204  break;
206  // At least 7 days from last watering and 21 from last application of fertilizer.
207  if (g_date->Date() < BE_gg1s_WATER_DATE + 7) {
208  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage1, true, a_farm, a_field);
209  break;
210  }
211  else
212  {
213  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
214  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage1, true, a_farm, a_field);
215  break;
216  }
218  if (a_farm->IsStockFarmer()) //Stock Farmer
219  {
220  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s3, false, a_farm, a_field);
221  }
222  else SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p3, false, a_farm, a_field);
223  // Start water thread
224  break;
225  }
226  break;
227  case BE_gg1s_ferti_s3:
228  if (!a_farm->FA_Slurry(a_field, 0.0, (BE_gg1s_CUT_DATE + 4) - g_date->DayInYear())) {
229  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s3, true, a_farm, a_field);
230  break;
231  }
232  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s4, false, a_farm, a_field);
233  break;
234  case BE_gg1s_ferti_p3:
235  if (!a_farm->FP_Slurry(a_field, 0.0, (BE_gg1s_CUT_DATE + 4) - g_date->DayInYear())) {
236  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p3, true, a_farm, a_field);
237  break;
238  }
239  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p4, false, a_farm, a_field);
240  break;
241  case BE_gg1s_ferti_s4:
242  if (a_ev->m_lock || a_farm->DoIt_prob(0.90))
243  {
244  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
245  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s4, true, a_farm, a_field);
246  break;
247  }
248  }
249  SimpleEvent_(g_date->Date() + 21, BE_gg1s_cut_to_silage2, false, a_farm, a_field);
250  break;
251  case BE_gg1s_ferti_p4:
252  if (a_ev->m_lock || a_farm->DoIt_prob(0.90))
253  {
254  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
255  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p4, true, a_farm, a_field);
256  break;
257  }
258  }
259  SimpleEvent_(g_date->Date() + 21, BE_gg1s_cut_to_silage2, false, a_farm, a_field);
260  break;
262  // At least 7 days from last watering and 21 from last application of fertilizer.
263  if (g_date->Date() < BE_gg1s_WATER_DATE + 7) {
264  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage2, true, a_farm, a_field);
265  break;
266  }
267  else
268  {
269  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
270  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage2, true, a_farm, a_field);
271  break;
272  }
274  if (a_farm->IsStockFarmer()) //Stock Farmer
275  {
276  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s5, false, a_farm, a_field);
277  }
278  else SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p5, false, a_farm, a_field);
279  break;
280  }
281  break;
282  case BE_gg1s_ferti_s5:
283  if (!a_farm->FA_Slurry(a_field, 0.0, (BE_gg1s_CUT_DATE + 4) - g_date->DayInYear())) {
284  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s5, true, a_farm, a_field);
285  break;
286  }
287  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s6, false, a_farm, a_field);
288  break;
289  case BE_gg1s_ferti_p5:
290  if (!a_farm->FP_Slurry(a_field, 0.0, (BE_gg1s_CUT_DATE + 4) - g_date->DayInYear())) {
291  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p5, true, a_farm, a_field);
292  break;
293  }
294  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p6, false, a_farm, a_field);
295  break;
296  case BE_gg1s_ferti_s6:
297  if (a_ev->m_lock || a_farm->DoIt_prob(0.9))
298  {
299  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
300  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s6, true, a_farm, a_field);
301  break;
302  }
303  }
304  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 4), BE_gg1s_cattle_out, false, a_farm, a_field);
305  break;
306 
307  case BE_gg1s_ferti_p6:
308  if (a_ev->m_lock || a_farm->DoIt_prob(0.9))
309  {
310  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
311  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p6, true, a_farm, a_field);
312  break;
313  }
314  }
315  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 4), BE_gg1s_cattle_out, false, a_farm, a_field);
316  break;
317 
319  // At least 7 days from last watering and 21 from last application of fertilizer.
320  if (g_date->Date() < BE_gg1s_WATER_DATE + 7) {
321  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage3, true, a_farm, a_field);
322  break;
323  }
324  else
325  {
326  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(25, 7) - g_date->DayInYear())) {
327  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage3, true, a_farm, a_field);
328  break;
329  }
331  if (a_farm->IsStockFarmer()) //Stock Farmer
332  {
333  SimpleEvent_(g_date->Date() + 5, BE_gg1s_ferti_s7, false, a_farm, a_field);
334  }
335  else SimpleEvent_(g_date->Date() + 5, BE_gg1s_ferti_p7, false, a_farm, a_field);
336  break;
337  }
338  break;
339  case BE_gg1s_ferti_s7:
340  if (a_ev->m_lock || a_farm->DoIt_prob(0.9))
341  {
342  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear())) {
343  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s7, true, a_farm, a_field);
344  break;
345  }
346  }
347  SimpleEvent_(g_date->Date() + 21, BE_gg1s_cut_to_silage4, false, a_farm, a_field);
348  break;
349  case BE_gg1s_ferti_p7:
350  if (a_ev->m_lock || a_farm->DoIt_prob(0.9))
351  {
352  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear())) {
353  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p7, true, a_farm, a_field);
354  break;
355  }
356  }
357  SimpleEvent_(g_date->Date() + 21, BE_gg1s_cut_to_silage4, false, a_farm, a_field);
358  break;
360  // At least 7 days from last watering and 21 from last application of fertilizer.
361  if (g_date->Date() < BE_gg1s_WATER_DATE + 7) {
362  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage4, true, a_farm, a_field);
363  break;
364  }
365  else
366  {
367  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
368  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage4, true, a_farm, a_field);
369  break;
370  }
372  if (a_farm->IsStockFarmer()) //Stock Farmer
373  {
374  SimpleEvent_(g_date->Date() + 5, BE_gg1s_ferti_s8, false, a_farm, a_field);
375  }
376  else SimpleEvent_(g_date->Date() + 5, BE_gg1s_ferti_p8, false, a_farm, a_field);
377  break;
378  }
379  break;
380  case BE_gg1s_ferti_s8:
381  if (a_ev->m_lock || a_farm->DoIt_prob(0.90))
382  {
383  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(10, 9) - g_date->DayInYear())) {
384  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_s8, true, a_farm, a_field);
385  break;
386  }
387  }
388  SimpleEvent_(g_date->Date() + 21, BE_gg1s_cut_to_silage5, false, a_farm, a_field);
389  break;
390  case BE_gg1s_ferti_p8:
391  if (a_ev->m_lock || a_farm->DoIt_prob(0.90))
392  {
393  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(10, 9) - g_date->DayInYear())) {
394  SimpleEvent_(g_date->Date() + 1, BE_gg1s_ferti_p8, true, a_farm, a_field);
395  break;
396  }
397  }
398  SimpleEvent_(g_date->Date() + 5, BE_gg1s_cut_to_silage5, false, a_farm, a_field);
399  break;
401  // At least 7 days from last watering and 21 from last application of fertilizer.
402  if (g_date->Date() < BE_gg1s_WATER_DATE + 7) {
403  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage5, true, a_farm, a_field);
404  break;
405  }
406  else
407  {
408  if (a_ev->m_lock || a_farm->DoIt_prob(0.40))
409  {
410  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(9, 10) - g_date->DayInYear())) {
411  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cut_to_silage5, true, a_farm, a_field);
412  break;
413  }
414  done = true;
415  break;
416  }
417  }
418  done = true;
419  break;
420  case BE_gg1s_cattle_out:
421  if (a_ev->m_lock || a_farm->DoIt_prob(.5)) {
422  if (!a_farm->CattleOut(a_field, 0.0, g_date->DayInYear(26, 6) - g_date->DayInYear())) {
423  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cattle_out, true, a_farm, a_field);
424  break;
425  }
426  // Keep them out there
427  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cattle_is_out, false, a_farm, a_field);
428  break;
429  }
430  SimpleEvent_(g_date->Date() + 21, BE_gg1s_cut_to_silage3, false, a_farm, a_field);
431  break;
432 
433  case BE_gg1s_cattle_is_out: // Keep the cattle out there
434  // CattleIsOut() returns false if it is not time to stop grazing
435  if (!a_farm->CattleIsOut(a_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear(), g_date->DayInYear(31, 8))) {
436  SimpleEvent_(g_date->Date() + 1, BE_gg1s_cattle_is_out, false, a_farm, a_field);
437  break;
438  }
439  done = true;
440  break;
441  // End of thread
442  default:
443  g_msg->Warn(WARN_BUG, "BEGrassGrazed1Spring::Do(): "
444  "Unknown event type! ", "");
445  exit(1);
446  }
447  return done;
448 }

References BE_gg1s_cattle_is_out, BE_gg1s_cattle_out, BE_gg1s_CUT_DATE, BE_gg1s_cut_to_silage1, BE_gg1s_cut_to_silage2, BE_gg1s_cut_to_silage3, BE_gg1s_cut_to_silage4, BE_gg1s_cut_to_silage5, BE_gg1s_FERTI_DATE, BE_gg1s_ferti_p1, BE_gg1s_ferti_p2, BE_gg1s_ferti_p3, BE_gg1s_ferti_p4, BE_gg1s_ferti_p5, BE_gg1s_ferti_p6, BE_gg1s_ferti_p7, BE_gg1s_ferti_p8, BE_gg1s_ferti_s1, BE_gg1s_ferti_s2, BE_gg1s_ferti_s3, BE_gg1s_ferti_s4, BE_gg1s_ferti_s5, BE_gg1s_ferti_s6, BE_gg1s_ferti_s7, BE_gg1s_ferti_s8, BE_gg1s_preseeding_cultivator, BE_gg1s_spring_sow, BE_gg1s_start, BE_gg1s_WATER_DATE, Calendar::Date(), Calendar::DayInYear(), g_date, g_msg, LE::GetMDates(), LE::GetOwner(), Farm::GetPreviousTov(), LE::GetRotIndex(), Farm::GetType(), Calendar::GetYearNumber(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), Farm::PreseedingCultivator(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent_(), tof_OptimisingFarm, tov_BEGrassGrazed1Spring, MapErrorMsg::Warn(), and WARN_BUG.


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
BE_gg1s_cut_to_silage5
Definition: BEGrassGrazed1Spring.h:48
BE_gg1s_ferti_p6
Definition: BEGrassGrazed1Spring.h:57
BE_gg1s_ferti_s6
Definition: BEGrassGrazed1Spring.h:58
Farm::PreseedingCultivator
virtual bool PreseedingCultivator(LE *a_field, double a_user, int a_days)
Carry out preseeding cultivation on a_field (tilling set including cultivator and string roller to co...
Definition: FarmFuncs.cpp:312
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
BE_gg1s_ferti_s2
Definition: BEGrassGrazed1Spring.h:50
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
BE_gg1s_ferti_p2
Definition: BEGrassGrazed1Spring.h:49
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
BE_gg1s_cut_to_silage3
Definition: BEGrassGrazed1Spring.h:46
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
BE_gg1s_ferti_p7
Definition: BEGrassGrazed1Spring.h:59
BE_gg1s_ferti_s8
Definition: BEGrassGrazed1Spring.h:62
Calendar::Date
long Date(void)
Definition: Calendar.h:57
BE_gg1s_ferti_s7
Definition: BEGrassGrazed1Spring.h:60
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
BE_gg1s_WATER_DATE
#define BE_gg1s_WATER_DATE
Definition: BEGrassGrazed1Spring.h:30
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
BE_gg1s_FERTI_DATE
#define BE_gg1s_FERTI_DATE
A flag used to indicate autumn ploughing status.
Definition: BEGrassGrazed1Spring.h:28
BE_gg1s_ferti_p5
Definition: BEGrassGrazed1Spring.h:55
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
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
BE_gg1s_CUT_DATE
#define BE_gg1s_CUT_DATE
Definition: BEGrassGrazed1Spring.h:29
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
BE_gg1s_ferti_s4
Definition: BEGrassGrazed1Spring.h:54
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
BE_gg1s_preseeding_cultivator
Definition: BEGrassGrazed1Spring.h:40
tov_BEGrassGrazed1Spring
Definition: LandscapeFarmingEnums.h:293
BE_gg1s_ferti_p3
Definition: BEGrassGrazed1Spring.h:51
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
BE_gg1s_ferti_s3
Definition: BEGrassGrazed1Spring.h:52
BE_gg1s_start
Definition: BEGrassGrazed1Spring.h:38
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
BE_gg1s_cattle_out
Definition: BEGrassGrazed1Spring.h:63
BE_gg1s_cut_to_silage4
Definition: BEGrassGrazed1Spring.h:47
BE_gg1s_ferti_s1
Definition: BEGrassGrazed1Spring.h:43
BE_gg1s_ferti_p1
Definition: BEGrassGrazed1Spring.h:42
BE_gg1s_ferti_s5
Definition: BEGrassGrazed1Spring.h:56
BE_gg1s_spring_sow
Definition: BEGrassGrazed1Spring.h:41
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
BE_gg1s_cut_to_silage2
Definition: BEGrassGrazed1Spring.h:45
BE_gg1s_ferti_p4
Definition: BEGrassGrazed1Spring.h:53
BE_gg1s_cut_to_silage1
Definition: BEGrassGrazed1Spring.h:44
WARN_BUG
Definition: MapErrorMsg.h:34
BE_gg1s_cattle_is_out
Definition: BEGrassGrazed1Spring.h:64
BE_gg1s_ferti_p8
Definition: BEGrassGrazed1Spring.h:61
Crop::SimpleEvent_
void SimpleEvent_(long a_date, int a_todo, bool a_lock, Farm *a_farm, LE *a_field)
Adds an event to this crop management without relying on member variables.
Definition: Farm.cpp:751