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

BEBeet class
. More...

#include <BEBeet.h>

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

BEBeet class
.

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

◆ BEBeet()

BEBeet::BEBeet ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
73  : Crop(a_tov, a_toc, a_L)
74  {
75  // When we start it off, the first possible date for a farm operation is 20th October
76  // This information is used by other crops when they decide how much post processing of
77  // the management is allowed after harvest before the next crop starts.
78  m_first_date=g_date->DayInYear( 31, 12);
80  }

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

Member Function Documentation

◆ Do()

bool BEBeet::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 beet.

Reimplemented from Crop.

65 {
66  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
67  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
68  m_field = a_field;
69  m_ev = a_ev;
70  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
71  bool flag = false;
72  int d1 = 0;
73  int noDates = 1;
74  TTypesOfVegetation l_tov = tov_BEBeet; // The current type - change to match the crop you have
75  /**********************************************To Here *************************************************************************/
76  // Depending what event has occured jump to the correct bit of code
77  switch (a_ev->m_todo)
78  {
79  case BE_be_start:
80  {
81  // BE_be_start just sets up all the starting conditions and reference dates that are needed to start a BE_be
82  BE_BE_HERBI1 = false;
83  BE_BE_FUNGI1 = false;
84 
85 
86  // Set up the date management stuff
87  // The next bit of code just allows for altering dates after harvest if it is necessary
88  // to allow for a crop which starts its management early.
89 
90  // 2 start and stop dates for all 'movable' events for this crop
91  int noDates = 1;
92  a_field->SetMDates(0, 0, g_date->DayInYear(15, 12)); // last possible day of harvest
93  a_field->SetMDates(1, 0, g_date->DayInYear(15, 12));
94 
95  a_field->SetMConstants(0, 1);
96 
97  // Check the next crop for early start, uBEess it is a spring crop
98  // in which case we ASSUME that no checking is necessary!!!!
99  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
100 
101  //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)
102  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
103  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
104 
105  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
106  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
107  {
108  g_msg->Warn(WARN_BUG, "BEBeet::Do(): ", "Harvest too late for the next crop to start!!!");
109  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
110  g_msg->Warn("Next Crop ", (double)almassnum);
111  exit(0);
112  }
113  // Now fix any late finishing problems
114  for (int i = 0; i < noDates; i++) {
115  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
116  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
117  }
118  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
119  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)
120  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
121  }
122  }
123  }
124  // Now no operations can be timed after the start of the next crop.
125 
126  if (!a_ev->m_first_year) {
127  // Are we before July 1st?
128  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
129  if (g_date->Date() < d1) {
130  // Yes, too early. We assumme this is because the last crop was late
131  printf("Poly: %d\n", a_field->GetPoly());
132  g_msg->Warn(WARN_BUG, "BEBeet::Do(): ", "Crop start attempt between 1st Jan & 1st July");
133  int prev = a_field->GetLandscape()->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex()));
134  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
135  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
136  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
137  exit(0);
138  }
139  else {
140  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
141  if (g_date->Date() > d1) {
142  // Yes too late - should not happen - raise an error
143  g_msg->Warn(WARN_BUG, "BEBeet::Do(): ", "Crop start attempt after last possible start date");
144  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
145  a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex());
146  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
147  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
148  exit(0);
149  }
150  }
151  }
152  else {
153  // Is the first year
154  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
155  // Code for first spring treatment used
156  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3), BE_be_spring_sow, false, a_farm, a_field);
157  break;
158  }
159  }//if
160 
161  // End single block date checking code. Please see next line comment as well.
162  // Reinit d1 to first possible starting date.
163  d1 = g_date->OldDays() + g_date->DayInYear(1, 9);
164  // OK, let's go.
165  // Here we queue up the first event - this differs depending on whether we have field on snady or clay soils
166  if (a_field->GetSoilType() <= 5 || a_field->GetSoilType() == 7) { // on sandy soils (BE ZAND & LOSS)
167  SimpleEvent_(d1, BE_be_stubble_harrow_sandy, false, a_farm, a_field);
168  }
169  else SimpleEvent_(d1, BE_be_stubble_harrow_clay, false, a_farm, a_field);
170  }
171  break;
172 
173  // This is the first real farm operation
175  if (!a_farm->StubbleHarrowing(a_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
176  SimpleEvent_(g_date->Date() + 1, BE_be_stubble_harrow_sandy, true, a_farm, a_field);
177  break;
178  }
179  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, BE_be_spring_plough_sandy, false, a_farm, a_field);
180  break;
182  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
183  SimpleEvent_(g_date->Date() + 1, BE_be_spring_plough_sandy, true, a_farm, a_field);
184  break;
185  }
186  if (a_farm->IsStockFarmer()) //Stock Farmer
187  {
188  SimpleEvent_(g_date->Date() + 7, BE_be_ferti_s1, false, a_farm, a_field);
189  }
190  else SimpleEvent_(g_date->Date() + 7, BE_be_ferti_p1, false, a_farm, a_field);
191  break;
193  if (a_ev->m_lock || a_farm->DoIt_prob(0.15))
194  {
195  if (!a_farm->StubbleHarrowing(a_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
196  SimpleEvent_(g_date->Date() + 1, BE_be_stubble_harrow_clay, true, a_farm, a_field);
197  break;
198  }
199  }
200  d1 = g_date->Date() + 21;
201  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 10)) {
202  d1 = g_date->OldDays() + g_date->DayInYear(15, 10);
203  }
204  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 10), BE_be_winter_plough_clay, false, a_farm, a_field);
205  break;
207  if (!a_farm->WinterPlough(a_field, 0.0, g_date->DayInYear(1, 12) - g_date->DayInYear())) {
208  SimpleEvent_(g_date->Date() + 1, BE_be_winter_plough_clay, true, a_farm, a_field);
209  break;
210  }
211  if (a_farm->IsStockFarmer()) //Stock Farmer
212  {
213  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, BE_be_ferti_s1, false, a_farm, a_field);
214  }
215  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, BE_be_ferti_p1, false, a_farm, a_field);
216  break;
217  case BE_be_ferti_p1:
218  if (a_ev->m_lock || a_farm->DoIt_prob(0.60))
219  {
220  if (!a_farm->FP_NPK(a_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
221  SimpleEvent_(g_date->Date() + 1, BE_be_ferti_p1, true, a_farm, a_field);
222  break;
223  }
224  }
225  SimpleEvent_(g_date->Date() + 1, BE_be_preseeding_cultivator, false, a_farm, a_field);
226  break;
227  case BE_be_ferti_s1:
228  if (a_ev->m_lock || a_farm->DoIt_prob(0.60))
229  {
230  if (!a_farm->FA_NPK(a_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
231  SimpleEvent_(g_date->Date() + 1, BE_be_ferti_s1, true, a_farm, a_field);
232  break;
233  }
234  }
235  SimpleEvent_(g_date->Date() + 1, BE_be_preseeding_cultivator, false, a_farm, a_field);
236  break;
238  if (!a_farm->PreseedingCultivator(a_field, 0.0, g_date->DayInYear(14, 4) - g_date->DayInYear())) {
239  SimpleEvent_(g_date->Date() + 1, BE_be_preseeding_cultivator, true, a_farm, a_field);
240  break;
241  }
242  SimpleEvent_(g_date->Date() + 1, BE_be_spring_sow, false, a_farm, a_field);
243  break;
244  case BE_be_spring_sow:
245  if (!a_farm->SpringSow(a_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
246  SimpleEvent_(g_date->Date() + 1, BE_be_spring_sow, true, a_farm, a_field);
247  break;
248  }
249  // Here is a fork leading to four parallel events
250  SimpleEvent_(g_date->Date() + 5, BE_be_herbicide1, false, a_farm, a_field); // Herbicide thread
251  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 7), BE_be_fungicide1, false, a_farm, a_field); // Fungicide thread = MAIN THREAD
252  if (a_farm->IsStockFarmer()) //Stock Farmer
253  {
254  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 4), BE_be_ferti_s2, false, a_farm, a_field); // Fertilizers thread
255  }
256  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 4), BE_be_ferti_p2, false, a_farm, a_field);
257  break;
258  case BE_be_ferti_p2:
259  // Here comes fertilizers thread
260  if (a_field->GetGreenBiomass() <= 0) {
261  SimpleEvent_(g_date->Date() + 1, BE_be_ferti_p2, false, a_farm, a_field);
262  }
263  else
264  {
265  if (!a_farm->FP_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
266  SimpleEvent_(g_date->Date() + 1, BE_be_ferti_p2, true, a_farm, a_field);
267  break;
268  }
269  }
270  // End of thread
271  break;
272  case BE_be_ferti_s2:
273  if (a_field->GetGreenBiomass() <= 0) {
274  SimpleEvent_(g_date->Date() + 1, BE_be_ferti_s2, false, a_farm, a_field);
275  break;
276  }
277  else
278  {
279  if (!a_farm->FA_AmmoniumSulphate(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
280  SimpleEvent_(g_date->Date() + 1, BE_be_ferti_s2, true, a_farm, a_field);
281  break;
282  }
283  }
284  // End of thread
285  break;
286  case BE_be_herbicide1: // The first of the pesticide managements.
287  // Here comes the herbicide thread
288  // We assume that farmers do max 3 herbicide treatments
289  if (a_field->GetGreenBiomass() <= 0)
290  {
291  if (a_ev->m_lock || a_farm->DoIt_prob(0.75))
292  {
293  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
294  SimpleEvent_(g_date->Date() + 1, BE_be_herbicide1, true, a_farm, a_field);
295  break;
296  }
297  BE_BE_HERBI1 = true;
298  }
299  SimpleEvent_(g_date->Date() + 7, BE_be_herbicide2, false, a_farm, a_field);
300  break;
301  }
302  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 3), BE_be_herbicide2, false, a_farm, a_field);
303  break;
304  case BE_be_herbicide2:
305  if (a_field->GetGreenBiomass() <= 0) {
306  SimpleEvent_(g_date->Date() + 1, BE_be_herbicide2, false, a_farm, a_field);
307  }
308  else
309  {
310  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(7, 5) - g_date->DayInYear())) {
311  SimpleEvent_(g_date->Date() + 1, BE_be_herbicide2, true, a_farm, a_field);
312  break;
313  }
314  SimpleEvent_(g_date->Date() + 7, BE_be_herbicide3, false, a_farm, a_field);
315  break;
316  }
317  break;
318  case BE_be_herbicide3:
319  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(21, 5) - g_date->DayInYear())) {
320  SimpleEvent_(g_date->Date() + 1, BE_be_herbicide3, true, a_farm, a_field);
321  break;
322  }
323  SimpleEvent_(g_date->Date() + 14, BE_be_herbicide4, false, a_farm, a_field);
324  break;
325  case BE_be_herbicide4:
326  if (a_ev->m_lock || (a_farm->DoIt_prob(0.20) && (BE_BE_HERBI1 == false)))
327  {
328  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(7, 6) - g_date->DayInYear())) {
329  SimpleEvent_(g_date->Date() + 1, BE_be_herbicide4, true, a_farm, a_field);
330  break;
331  }
332  }
333  // End of thread
334  break;
335  case BE_be_fungicide1:
336  // Here comes the fungicide thread
337  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear())) {
338  SimpleEvent_(g_date->Date() + 1, BE_be_fungicide1, true, a_farm, a_field);
339  break;
340  }
341  SimpleEvent_(g_date->Date() + 21, BE_be_fungicide2, false, a_farm, a_field);
342  break;
343  case BE_be_fungicide2:
344  if (a_ev->m_lock || a_farm->DoIt_prob(0.75))
345  {
346  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(25, 8) - g_date->DayInYear())) {
347  SimpleEvent_(g_date->Date() + 1, BE_be_fungicide2, true, a_farm, a_field);
348  break;
349  }
350  SimpleEvent_(g_date->Date() + 21, BE_be_fungicide3, false, a_farm, a_field);
351  break;
352  }
353  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(20, 9), BE_be_harvest, false, a_farm, a_field);
354  break;
355  case BE_be_fungicide3:
356  if (a_ev->m_lock || a_farm->DoIt_prob(0.667)) // 50% of all farmers
357  {
358  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(15, 9) - g_date->DayInYear())) {
359  SimpleEvent_(g_date->Date() + 1, BE_be_fungicide3, true, a_farm, a_field);
360  break;
361  }
362  }
363  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(20, 9), BE_be_harvest, false, a_farm, a_field);
364  break;
365  case BE_be_harvest:
366  // Here the MAIN thread continues
367  // We don't move harvest days
368  if (!a_farm->Harvest(a_field, 0.0, a_field->GetMDates(0, 0) - g_date->DayInYear())) {
369  SimpleEvent_(g_date->Date() + 1, BE_be_harvest, true, a_farm, a_field);
370  break;
371  }
372  done = true;
373  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
374  // END of MAIN THREAD
375  break;
376  default:
377  g_msg->Warn(WARN_BUG, "BEBeet::Do(): "
378  "Unknown event type! ", "");
379  exit(1);
380  }
381  return done;
382 }

References BE_be_ferti_p1, BE_be_ferti_p2, BE_be_ferti_s1, BE_be_ferti_s2, BE_BE_FUNGI1, BE_be_fungicide1, BE_be_fungicide2, BE_be_fungicide3, BE_be_harvest, BE_BE_HERBI1, BE_be_herbicide1, BE_be_herbicide2, BE_be_herbicide3, BE_be_herbicide4, BE_be_preseeding_cultivator, BE_be_spring_plough_sandy, BE_be_spring_sow, BE_be_start, BE_be_stubble_harrow_clay, BE_be_stubble_harrow_sandy, BE_be_winter_plough_clay, Calendar::Date(), Calendar::DayInYear(), g_date, g_msg, LE::GetGreenBiomass(), LE::GetMDates(), LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), LE::GetSoilType(), Farm::GetType(), Calendar::GetYearNumber(), 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_(), Farm::StubbleHarrowing(), tof_OptimisingFarm, tov_BEBeet, 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
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
BEBEET_BASE
#define BEBEET_BASE
Definition: BEBeet.h:24
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
BE_be_spring_sow
Definition: BEBeet.h:47
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
BE_be_stubble_harrow_sandy
Definition: BEBeet.h:40
BE_be_herbicide1
Definition: BEBeet.h:50
LE::GetPoly
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: Elements.h:238
BE_BE_FUNGI1
#define BE_BE_FUNGI1
Definition: BEBeet.h:29
BE_be_ferti_s2
Definition: BEBeet.h:49
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_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
BE_be_preseeding_cultivator
Definition: BEBeet.h:46
BE_be_herbicide4
Definition: BEBeet.h:53
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
BE_be_winter_plough_clay
Definition: BEBeet.h:43
BE_BE_HERBI1
#define BE_BE_HERBI1
A flag used to indicate autumn ploughing status.
Definition: BEBeet.h:28
Calendar::Date
long Date(void)
Definition: Calendar.h:57
BE_be_herbicide2
Definition: BEBeet.h:51
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
BE_be_harvest
Definition: BEBeet.h:57
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_be_start
Definition: BEBeet.h:38
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
BE_be_fungicide3
Definition: BEBeet.h:56
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
BE_be_fungicide1
Definition: BEBeet.h:54
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
LE::GetGreenBiomass
virtual double GetGreenBiomass(void)
Definition: Elements.h:160
tov_BEBeet
Definition: LandscapeFarmingEnums.h:289
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
BE_be_spring_plough_sandy
Definition: BEBeet.h:41
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_be_ferti_p2
Definition: BEBeet.h:48
BE_be_herbicide3
Definition: BEBeet.h:52
BE_be_ferti_p1
Definition: BEBeet.h:44
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_be_stubble_harrow_clay
Definition: BEBeet.h:42
BE_be_fungicide2
Definition: BEBeet.h:55
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
BE_be_ferti_s1
Definition: BEBeet.h:45
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523
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