Loading [MathJax]/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
BEGrassGrazed2 Class Reference

BEGrassGrazed2 class
. More...

#include <BEGrassGrazed2.h>

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

◆ BEGrassGrazed2()

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

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

Member Function Documentation

◆ Do()

bool BEGrassGrazed2::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_BEGrassGrazed2; // 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_gg2_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_GG2_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  a_field->SetMDates(0, 1, 0); // start day of winter plough (not used as it depend on previous treatment)
86  a_field->SetMDates(1, 1, g_date->DayInYear(1, 12)); // last possible day of winter plough
87 
88  a_field->SetMConstants(0, 1);
89 
90  // Check the next crop for early start, uBEess it is a spring crop
91  // in which case we ASSUME that no checking is necessary!!!!
92  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
93 
94  //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)
95  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
96  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
97 
98  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
99  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
100  {
101  g_msg->Warn(WARN_BUG, "BEGrassGrazed2::Do(): ", "Harvest too late for the next crop to start!!!");
102  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
103  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
104  }
105  // Now fix any late finishing problems
106  for (int i = 0; i < noDates; i++) {
107  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
108  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
109  }
110  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
111  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)
112  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
113  }
114  }
115  }
116  // Now no operations can be timed after the start of the next crop.
117 
118  if (!a_ev->m_first_year) {
119  d1 = g_date->OldDays() + 365 + m_first_date; // Add 365 for spring crop
120  if (g_date->Date() > d1) {
121  // Yes too late - should not happen - raise an error
122  g_msg->Warn(WARN_BUG, "BEGrassGrazed2::Do(): ", "Crop start attempt after last possible start date");
123  int prev = a_field->GetLandscape()->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex()));
124  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
125  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
126  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
127  exit(1);
128  }
129  }
130  else {
131  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3), BE_gg2_starting, false, a_farm, a_field);
132  break;
133  }
134  }//if
135 
136  // End single block date checking code. Please see next line comment as well.
137  // Reinit d1 to first possible starting date.
138 
139  d1 = g_date->OldDays() + g_date->DayInYear(15, 3);
140  if (g_date->Date() >= d1) d1 += 365;
141  // OK, let's go.
142  // Here we queue up the first event
143  SimpleEvent_(d1, BE_gg2_starting, false, a_farm, a_field);
144 
145  }
146  break;
147 
148  // This is the first real farm operation
149  case BE_gg2_starting:
150  if (a_farm->IsStockFarmer()) //Stock Farmer
151  {
152  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s1, false, a_farm, a_field);
153  }
154  else SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p1, false, a_farm, a_field);
155  break;
156  case BE_gg2_ferti_p1:
157  if (!a_farm->FP_Slurry(a_field, 0.0, g_date->DayInYear(22, 3) - g_date->DayInYear())) {
158  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p1, true, a_farm, a_field);
159  break;
160  }
161  SimpleEvent_(g_date->Date() + 1, BE_gg2_spring_sow, false, a_farm, a_field);
162  break;
163  case BE_gg2_ferti_s1:
164  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(22, 3) - g_date->DayInYear())) {
165  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s1, true, a_farm, a_field);
166  break;
167  }
168  SimpleEvent_(g_date->Date() + 1, BE_gg2_spring_sow, false, a_farm, a_field);
169  break;
170  case BE_gg2_spring_sow:
171  if (!a_farm->SpringSow(a_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear())) {
172  SimpleEvent_(g_date->Date() + 1, BE_gg2_spring_sow, true, a_farm, a_field);
173  break;
174  }
175  d1 = g_date->Date() + 7;
176  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 3)) {
177  d1 = g_date->OldDays() + g_date->DayInYear(1, 3);
178  }
179  if (a_farm->IsStockFarmer()) //Stock Farmer
180  {
181  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s2, false, a_farm, a_field);
182  }
183  else SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p2, false, a_farm, a_field);
184  break;
185  case BE_gg2_ferti_p2:
186  if (a_farm->DoIt_prob(0.90)) {
187  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
188  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p2, true, a_farm, a_field);
189  break;
190  }
191  }
192  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(25, 4), BE_gg2_cut_to_silage1, false, a_farm, a_field);
193  break;
194  case BE_gg2_ferti_s2:
195  if (a_farm->DoIt_prob(0.90)) {
196  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
197  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s2, true, a_farm, a_field);
198  break;
199  }
200  }
201  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(25, 4), BE_gg2_cut_to_silage1, false, a_farm, a_field);
202  break;
204  // At least 7 days from last watering and 21 from last application of fertilizer.
205  if (g_date->Date() < BE_GG2_WATER_DATE + 7) {
206  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage1, true, a_farm, a_field);
207  break;
208  }
209  else
210  {
211  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
212  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage1, true, a_farm, a_field);
213  break;
214  }
216  if (a_farm->IsStockFarmer()) //Stock Farmer
217  {
218  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s3, false, a_farm, a_field);
219  }
220  else SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p3, false, a_farm, a_field);
221  // Start water thread
222  break;
223  }
224  break;
225 
226  case BE_gg2_ferti_s3:
227  if (!a_farm->FA_Slurry(a_field, 0.0, (BE_GG2_CUT_DATE + 4) - g_date->DayInYear())) {
228  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s3, true, a_farm, a_field);
229  break;
230  }
231  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s4, false, a_farm, a_field);
232  break;
233  case BE_gg2_ferti_p3:
234  if (!a_farm->FP_Slurry(a_field, 0.0, (BE_GG2_CUT_DATE + 4) - g_date->DayInYear())) {
235  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p3, true, a_farm, a_field);
236  break;
237  }
238  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p4, false, a_farm, a_field);
239  break;
240  case BE_gg2_ferti_s4:
241  if (a_ev->m_lock || a_farm->DoIt_prob(0.9))
242  {
243  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
244  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s4, true, a_farm, a_field);
245  break;
246  }
247  }
248  SimpleEvent_(g_date->Date() + 21, BE_gg2_cut_to_silage2, false, a_farm, a_field);
249  break;
250  case BE_gg2_ferti_p4:
251  if (a_ev->m_lock || a_farm->DoIt_prob(0.9))
252  {
253  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
254  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p4, true, a_farm, a_field);
255  break;
256  }
257  }
258  SimpleEvent_(g_date->Date() + 21, BE_gg2_cut_to_silage2, false, a_farm, a_field);
259  break;
261  // At least 7 days from last watering and 21 from last application of fertilizer.
262  if (g_date->Date() < BE_GG2_WATER_DATE + 7) {
263  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage2, true, a_farm, a_field);
264  break;
265  }
266  else
267  {
268  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
269  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage2, true, a_farm, a_field);
270  break;
271  }
273  if (a_farm->IsStockFarmer()) //Stock Farmer
274  {
275  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s5, false, a_farm, a_field);
276  }
277  else SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p5, false, a_farm, a_field);
278  break;
279  }
280  break;
281  case BE_gg2_ferti_s5:
282  if (!a_farm->FA_Slurry(a_field, 0.0, (BE_GG2_CUT_DATE + 4) - g_date->DayInYear())) {
283  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s5, true, a_farm, a_field);
284  break;
285  }
286  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s6, false, a_farm, a_field);
287  break;
288  case BE_gg2_ferti_p5:
289  if (!a_farm->FP_Slurry(a_field, 0.0, (BE_GG2_CUT_DATE + 4) - g_date->DayInYear())) {
290  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p5, true, a_farm, a_field);
291  break;
292  }
293  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p6, false, a_farm, a_field);
294  break;
295  case BE_gg2_ferti_s6:
296  if (a_ev->m_lock || a_farm->DoIt_prob(0.9))
297  {
298  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
299  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s6, true, a_farm, a_field);
300  break;
301  }
302  }
303  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 4), BE_gg2_cattle_out, false, a_farm, a_field);
304  break;
305 
306  case BE_gg2_ferti_p6:
307  if (a_ev->m_lock || a_farm->DoIt_prob(0.9))
308  {
309  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
310  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p6, true, a_farm, a_field);
311  break;
312  }
313  }
314  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 4), BE_gg2_cattle_out, false, a_farm, a_field);
315  break;
316 
318  // At least 7 days from last watering and 21 from last application of fertilizer.
319  if (g_date->Date() < BE_GG2_WATER_DATE + 7) {
320  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage3, true, a_farm, a_field);
321  break;
322  }
323  else
324  {
325  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(25, 7) - g_date->DayInYear())) {
326  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage3, true, a_farm, a_field);
327  break;
328  }
330  if (a_farm->IsStockFarmer()) //Stock Farmer
331  {
332  SimpleEvent_(g_date->Date() + 5, BE_gg2_ferti_s7, false, a_farm, a_field);
333  }
334  else SimpleEvent_(g_date->Date() + 5, BE_gg2_ferti_p7, false, a_farm, a_field);
335  break;
336  }
337  break;
338  case BE_gg2_ferti_s7:
339  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear())) {
340  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s7, true, a_farm, a_field);
341  break;
342  }
343  SimpleEvent_(g_date->Date() + 21, BE_gg2_cut_to_silage4, false, a_farm, a_field);
344  break;
345  case BE_gg2_ferti_p7:
346  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear())) {
347  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p7, true, a_farm, a_field);
348  break;
349  }
350  SimpleEvent_(g_date->Date() + 21, BE_gg2_cut_to_silage4, false, a_farm, a_field);
351  break;
353  // At least 7 days from last watering and 21 from last application of fertilizer.
354  if (g_date->Date() < BE_GG2_WATER_DATE + 7) {
355  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage4, true, a_farm, a_field);
356  break;
357  }
358  else
359  {
360  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
361  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage4, true, a_farm, a_field);
362  break;
363  }
365  if (a_farm->IsStockFarmer()) //Stock Farmer
366  {
367  SimpleEvent_(g_date->Date() + 5, BE_gg2_ferti_s8, false, a_farm, a_field);
368  }
369  else SimpleEvent_(g_date->Date() + 5, BE_gg2_ferti_p8, false, a_farm, a_field);
370  break;
371  }
372  break;
373  case BE_gg2_ferti_s8:
374  if (a_ev->m_lock || a_farm->DoIt_prob(0.90))
375  {
376  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(10, 9) - g_date->DayInYear())) {
377  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_s8, true, a_farm, a_field);
378  break;
379  }
380  }
381  SimpleEvent_(g_date->Date() + 21, BE_gg2_cut_to_silage5, false, a_farm, a_field);
382  break;
383  case BE_gg2_ferti_p8:
384  if (a_ev->m_lock || a_farm->DoIt_prob(0.90))
385  {
386  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(10, 9) - g_date->DayInYear())) {
387  SimpleEvent_(g_date->Date() + 1, BE_gg2_ferti_p8, true, a_farm, a_field);
388  break;
389  }
390  }
391  SimpleEvent_(g_date->Date() + 5, BE_gg2_cut_to_silage5, false, a_farm, a_field);
392  break;
394  // At least 7 days from last watering and 21 from last application of fertilizer.
395  if (g_date->Date() < BE_GG2_WATER_DATE + 7) {
396  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage5, true, a_farm, a_field);
397  break;
398  }
399  else
400  {
401  if (a_ev->m_lock || a_farm->DoIt_prob(0.40))
402  {
403  if (!a_farm->CutToSilage(a_field, 0.0, g_date->DayInYear(9, 10) - g_date->DayInYear())) {
404  SimpleEvent_(g_date->Date() + 1, BE_gg2_cut_to_silage5, true, a_farm, a_field);
405  break;
406  }
407  }
408  }
409  done = true;
410  break;
411  case BE_gg2_cattle_out:
412  if (a_ev->m_lock || a_farm->DoIt_prob(0.50))
413  {
414  if (!a_farm->CattleOut(a_field, 0.0, g_date->DayInYear(26, 6) - g_date->DayInYear())) {
415  SimpleEvent_(g_date->Date() + 1, BE_gg2_cattle_out, true, a_farm, a_field);
416  break;
417  }
418  // Keep them out there
419  SimpleEvent_(g_date->Date() + 1, BE_gg2_cattle_is_out, false, a_farm, a_field);
420  break;
421  }
422  SimpleEvent_(g_date->Date() + 21, BE_gg2_cut_to_silage3, false, a_farm, a_field);
423  break;
424 
425  case BE_gg2_cattle_is_out: // Keep the cattle out there
426  // CattleIsOut() returns false if it is not time to stop grazing
427  if (!a_farm->CattleIsOut(a_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear(), g_date->DayInYear(31, 8))) {
428  SimpleEvent_(g_date->Date() + 1, BE_gg2_cattle_is_out, false, a_farm, a_field);
429  break;
430  }
431  done = true;
432  break;
433  default:
434  g_msg->Warn(WARN_BUG, "BEGrassGrazed2::Do(): "
435  "Unknown event type! ", "");
436  exit(1);
437  }
438  return done;
439 }

References BE_gg2_cattle_is_out, BE_gg2_cattle_out, BE_GG2_CUT_DATE, BE_gg2_cut_to_silage1, BE_gg2_cut_to_silage2, BE_gg2_cut_to_silage3, BE_gg2_cut_to_silage4, BE_gg2_cut_to_silage5, BE_GG2_FERTI_DATE, BE_gg2_ferti_p1, BE_gg2_ferti_p2, BE_gg2_ferti_p3, BE_gg2_ferti_p4, BE_gg2_ferti_p5, BE_gg2_ferti_p6, BE_gg2_ferti_p7, BE_gg2_ferti_p8, BE_gg2_ferti_s1, BE_gg2_ferti_s2, BE_gg2_ferti_s3, BE_gg2_ferti_s4, BE_gg2_ferti_s5, BE_gg2_ferti_s6, BE_gg2_ferti_s7, BE_gg2_ferti_s8, BE_gg2_spring_sow, BE_gg2_start, BE_gg2_starting, BE_GG2_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(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent_(), tof_OptimisingFarm, tov_BEGrassGrazed2, 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_gg2_ferti_p7
Definition: BEGrassGrazed2.h:60
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
BE_GG2_CUT_DATE
#define BE_GG2_CUT_DATE
Definition: BEGrassGrazed2.h:29
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
BE_gg2_ferti_p5
Definition: BEGrassGrazed2.h:56
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
BE_gg2_cut_to_silage5
Definition: BEGrassGrazed2.h:49
BE_gg2_cut_to_silage2
Definition: BEGrassGrazed2.h:46
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
BE_gg2_ferti_s4
Definition: BEGrassGrazed2.h:55
BE_gg2_cut_to_silage1
Definition: BEGrassGrazed2.h:45
BE_GG2_WATER_DATE
#define BE_GG2_WATER_DATE
Definition: BEGrassGrazed2.h:30
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
BE_gg2_cattle_out
Definition: BEGrassGrazed2.h:64
BE_gg2_cattle_is_out
Definition: BEGrassGrazed2.h:65
BE_gg2_spring_sow
Definition: BEGrassGrazed2.h:41
BE_gg2_ferti_s6
Definition: BEGrassGrazed2.h:59
BE_gg2_ferti_s2
Definition: BEGrassGrazed2.h:51
Calendar::Date
long Date(void)
Definition: Calendar.h:57
BE_gg2_ferti_s3
Definition: BEGrassGrazed2.h:53
BE_gg2_start
Definition: BEGrassGrazed2.h:39
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
BE_gg2_ferti_s5
Definition: BEGrassGrazed2.h:57
BE_gg2_ferti_p8
Definition: BEGrassGrazed2.h:62
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
BE_gg2_ferti_p6
Definition: BEGrassGrazed2.h:58
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
tov_BEGrassGrazed2
Definition: LandscapeFarmingEnums.h:294
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_gg2_ferti_p1
Definition: BEGrassGrazed2.h:43
BE_gg2_ferti_s7
Definition: BEGrassGrazed2.h:61
BE_gg2_ferti_s8
Definition: BEGrassGrazed2.h:63
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
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_gg2_cut_to_silage4
Definition: BEGrassGrazed2.h:48
BE_GG2_FERTI_DATE
#define BE_GG2_FERTI_DATE
A flag used to indicate autumn ploughing status.
Definition: BEGrassGrazed2.h:28
BE_gg2_ferti_p2
Definition: BEGrassGrazed2.h:50
BE_gg2_cut_to_silage3
Definition: BEGrassGrazed2.h:47
BE_gg2_ferti_p3
Definition: BEGrassGrazed2.h:52
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
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
BE_gg2_ferti_p4
Definition: BEGrassGrazed2.h:54
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
BE_gg2_ferti_s1
Definition: BEGrassGrazed2.h:44
WARN_BUG
Definition: MapErrorMsg.h:34
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
BE_gg2_starting
Definition: BEGrassGrazed2.h:42