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

#include <Oats.h>

Inheritance diagram for Oats:
Crop

Public Member Functions

bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 
 Oats (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...
 

Constructor & Destructor Documentation

◆ Oats()

Oats::Oats ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
64  : Crop(a_tov, a_toc, a_L)
65  {
66  //m_first_date=g_date->DayInYear(1,10);
67  // Use below if no autumn plough
70  }

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

Member Function Documentation

◆ Do()

bool Oats::Do ( Farm a_farm,
LE a_field,
FarmEvent a_ev 
)
virtual

Reimplemented from Crop.

36 {
37  double ins_app_prop = cfg_ins_app_prop1.value();
38  double herbi_app_prop = cfg_herbi_app_prop.value();
39 
40  m_farm = a_farm;
41  m_field = a_field;
42  m_ev = a_ev;
43  int d1;
44 
45  bool done = false;
46 
47  switch (m_ev->m_todo)
48  {
49  case oa_start:
50  {
51  a_field->ClearManagementActionSum();
52 
54  // Set up the date management stuff
55  // Could save the start day in case it is needed later
56  // m_field->m_startday = m_ev->m_startday;
57  m_last_date = g_date->DayInYear(25, 8);
58  // Start and stop dates for all events after harvest
59  int noDates = 2;
60  m_field->SetMDates(0, 0, g_date->DayInYear(11, 8));
61  // Determined by harvest date - used to see if at all possible
62  m_field->SetMDates(1, 0, g_date->DayInYear(20, 8));
63  m_field->SetMDates(0, 1, g_date->DayInYear(25, 8));
64  m_field->SetMDates(1, 1, g_date->DayInYear(25, 8));
65  // Check the next crop for early start, unless it is a spring crop
66  // in which case we ASSUME that no checking is necessary!!!!
67  // So DO NOT implement a crop that runs over the year boundary
68 
69  //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)
70  if (!(m_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
71 
72  if (m_ev->m_startday > g_date->DayInYear(1, 7))
73  {
74  if (m_field->GetMDates(0, 0) >= m_ev->m_startday)
75  {
76  g_msg->Warn(WARN_BUG, "Oats::Do(): "
77  "Harvest too late for the next crop to start!!!", "");
78  exit(1);
79  }
80  // Now fix any late finishing problems
81  for (int i = 0; i < noDates; i++) {
82  if (m_field->GetMDates(0, i) >= m_ev->m_startday) {
83  m_field->SetMDates(0, i, m_ev->m_startday - 1); //move the starting date
84  }
85  if (m_field->GetMDates(1, i) >= m_ev->m_startday) {
86  m_field->SetMConstants(i, 0);
87  m_field->SetMDates(1, i, m_ev->m_startday - 1); //move the finishing date
88  }
89  }
90  }
91  // Now no operations can be timed after the start of the next crop.
92 
93  if (!m_ev->m_first_year)
94  {
95  int today = g_date->Date();
96  // Are we before July 1st?
97  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
98  if (today < d1)
99  {
100  // Yes, too early. We assumme this is because the last crop was late
101  g_msg->Warn(WARN_BUG, " Oats::Do(): "
102  "Crop start attempt between 1st Jan & 1st July", "");
103  exit(1);
104  }
105  else
106  {
107  d1 = g_date->OldDays() + m_first_date + 365; // Add 365 for spring crop
108  if (today > d1)
109  {
110  // Yes too late - should not happen - raise an error
111  g_msg->Warn(WARN_BUG, " Oats::Do(): "
112  "Crop start attempt after last possible start date", "");
113  exit(1);
114  }
115  }
116  }
117  else
118  {
120  oa_spring_harrow, false);
121  break;
122  }
123  }//if
124 
125  // End single block date checking code. Please see next line
126  // comment as well.
127  // Reinit d1 to first possible starting date.
128  d1 = g_date->OldDays() + m_first_date;
129  if (g_date->Date() > d1) {
130  d1 = g_date->Date();
131  }
132  // OK, let's go.
133  OA_SOW_DATE = 0;
134  OA_DID_STRIGLING_ONE = false;
136  oa_herbicide_one, false);
137  // Altered 30 6 2009 to prevent autumn plough
138  SimpleEvent(d1, oa_autumn_plough, false);
139  /*
140  if ( m_farm->IsStockFarmer()) {
141  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5, 3 ),
142  oa_fertmanure_stock, false );
143  } else {
144  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5, 3 ),
145  oa_spring_plough, false );
146  }
147  */
148  }
149  break;
150 
151  case oa_herbicide_one:
152  if (m_ev->m_lock || m_farm->DoIt((int)floor(0.5 + 60 * herbi_app_prop * m_farm->Prob_multiplier()))) //modified probability
153  {
154  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear()))
155  {
156  SimpleEvent(g_date->Date() + 1, oa_herbicide_one, true);
157  break;
158  }
159  // Did first spray so see if should do another, 14 days later (min)
160  {
161  d1 = g_date->Date() + 10;
162  if (d1 < g_date->OldDays() + g_date->DayInYear(16, 5)) {
163  d1 = g_date->OldDays() + g_date->DayInYear(16, 5);
164  }
165  SimpleEvent(d1, oa_herbicide_two, false);
166  }
167  }
168  break;
169 
170  case oa_herbicide_two:
171  if (m_ev->m_lock || m_farm->DoIt((int)floor(0.5 + herbi_app_prop * 72 * OA_DECIDE_TO_HERB * m_farm->Prob_multiplier()))) //added *100 /16.04.13 - later 100 changed to 72. //modified probability
172  {
173  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
174  SimpleEvent(g_date->Date() + 1, oa_herbicide_two, true);
175  break;
176  }
177  }
178  break;
179 
180  case oa_autumn_plough:
181  if (m_ev->m_lock || m_farm->DoIt(0)) // Altered here to remove this possibility
182  {
183  if (!m_farm->AutumnPlough(m_field, 0.0,
184  g_date->DayInYear(31, 12) -
185  g_date->DayInYear())) {
186  SimpleEvent(g_date->Date() + 1, oa_autumn_plough, true);
187  break;
188  }
189  // Did autumn plough, so skip to spring harrow.
190  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4) + 365,
191  oa_spring_harrow, false);
192  break;
193  }
194  if (m_farm->IsStockFarmer()) {
195  SimpleEvent(g_date->OldDays() + g_date->DayInYear(5, 3) + 365,
196  oa_fertmanure_stock, false);
197  }
198  else {
199  SimpleEvent(g_date->OldDays() + g_date->DayInYear(5, 3) + 365,
200  oa_spring_plough, false);
201  }
202  break;
203 
204  case oa_fertmanure_stock:
205  if (m_ev->m_lock || m_farm->DoIt(70))
206  {
207  if (!m_farm->FA_Manure(m_field, 0.0,
208  g_date->DayInYear(30, 3) -
209  g_date->DayInYear())) {
211  break;
212  }
213  }
215  break;
216 
217  case oa_spring_plough:
218  if (!m_farm->SpringPlough(m_field, 0.0,
219  g_date->DayInYear(30, 3) -
220  g_date->DayInYear())) {
221  SimpleEvent(g_date->Date() + 1, oa_spring_plough, true);
222  break;
223  }
225  oa_spring_harrow, false);
226  break;
227 
228  case oa_spring_harrow:
229  if (!m_farm->SpringHarrow(m_field, 0.0,
230  g_date->DayInYear(20, 4) -
231  g_date->DayInYear())) {
232  SimpleEvent(g_date->Date() + 1, oa_spring_harrow, true);
233  break;
234  }
235  if (m_farm->IsStockFarmer()) {
237  }
238  else {
240  }
241  break;
242 
243  case oa_fertslurry_stock:
244  if (!m_farm->FA_Slurry(m_field, 0.0,
245  g_date->DayInYear(20, 4) -
246  g_date->DayInYear())) {
248  break;
249  }
251  break;
252 
253  case oa_spring_sow_one:
254  if (!m_farm->SpringSow(m_field, 0.0,
255  g_date->DayInYear(20, 4) -
256  g_date->DayInYear())) {
257  SimpleEvent(g_date->Date() + 1, oa_spring_sow_one, true);
258  break;
259  }
260  OA_SOW_DATE = g_date->Date();
261  if (m_farm->IsStockFarmer()) {
262  d1 = g_date->Date();
263  if (d1 < g_date->OldDays() + g_date->DayInYear(5, 4)) {
264  d1 = g_date->OldDays() + g_date->DayInYear(5, 4);
265  }
266  SimpleEvent(d1, oa_spring_roll, false);
267  }
268  else {
269  SimpleEvent(g_date->Date() + 1, oa_spring_sow_two, false);
270  }
271  break;
272 
273  case oa_spring_sow_two:
274  if (m_ev->m_lock || m_farm->DoIt(60))
275  {
276  if (!m_farm->SpringSow(m_field, 0.0,
277  g_date->DayInYear(22, 4) -
278  g_date->DayInYear())) {
279  SimpleEvent(g_date->Date() + 1, oa_spring_sow_two, true);
280  break;
281  }
282  OA_SOW_DATE = g_date->Date();
283  }
285  oa_spring_roll, false);
286  break;
287 
288  case oa_spring_roll:
289  if (m_ev->m_lock || m_farm->DoIt(80))
290  {
291  if (!m_farm->SpringRoll(m_field, 0.0,
292  g_date->DayInYear(20, 4) -
293  g_date->DayInYear())) {
294  SimpleEvent(g_date->Date() + 1, oa_spring_roll, true);
295  break;
296  }
297  }
298  d1 = g_date->OldDays() + g_date->DayInYear(15, 4);
299  if (d1 < OA_SOW_DATE + 10) {
300  d1 = OA_SOW_DATE + 10;
301  }
303  break;
304 
305  case oa_insecticide:
306  if (m_ev->m_lock || m_farm->DoIt((int)floor(0.5 + 62 * ins_app_prop * m_farm->Prob_multiplier()))) //modified probability
307  {
308  if (!m_farm->InsecticideTreat(m_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear()))
309  {
310  SimpleEvent(g_date->Date() + 1, oa_insecticide, true);
311  break;
312  }
313  }
314 
315  ChooseNextCrop(2);
316  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 8), oa_harvest, false);
317  break;
318 
319  case oa_harvest:
320  if (m_field->GetMConstants(0) == 0) {
321  if (!m_farm->Harvest(m_field, 0.0, -1)) { //raise an error
322  g_msg->Warn(WARN_BUG, "Oats::Do(): failure in 'Harvest' execution", "");
323  exit(1);
324  }
325  }
326  else {
327  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
328  SimpleEvent(g_date->Date() + 1, oa_harvest, true);
329  break;
330  }
331  }
333  break;
334 
335  case oa_straw_chopping:
336  if (m_ev->m_lock || m_farm->DoIt(80))
337  {
338  if (m_field->GetMConstants(1) == 0) {
339  if (!m_farm->StrawChopping(m_field, 0.0, -1)) { //raise an error
340  g_msg->Warn(WARN_BUG, "Oats::Do(): failure in 'StrawChopping' execution", "");
341  exit(1);
342  }
343  }
344  else {
345  if (!m_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(0, 1) - g_date->DayInYear())) {
346  SimpleEvent(g_date->Date() + 1, oa_straw_chopping, true);
347  break;
348  }
349  }
350  done = true;
351  break;
352  }
354  break;
355 
356  case oa_hay_bailing:
357  if (m_field->GetMConstants(1) == 0) {
358  if (!m_farm->HayBailing(m_field, 0.0, -1)) { //raise an error
359  g_msg->Warn(WARN_BUG, "Oats::Do(): failure in 'HayBailing' execution", "");
360  exit(1);
361  }
362  }
363  else {
364  if (!m_farm->HayBailing(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
365  SimpleEvent(g_date->Date() + 1, oa_hay_bailing, true);
366  break;
367  }
368  }
369  done = true;
370  break;
371 
372  default:
373  g_msg->Warn(WARN_BUG, "Oats::Do(): "
374  "Unknown event type! ", "");
375  exit(1);
376  }
377 
378  return done;
379 }

References Farm::AutumnPlough(), cfg_herbi_app_prop, cfg_ins_app_prop1, Crop::ChooseNextCrop(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_Slurry(), g_date, g_msg, LE::GetMConstants(), LE::GetMDates(), Farm::GetType(), Calendar::GetYearNumber(), Farm::Harvest(), Farm::HayBailing(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_startday, FarmEvent::m_todo, oa_autumn_plough, OA_DECIDE_TO_HERB, OA_DID_STRIGLING_ONE, oa_fertmanure_stock, oa_fertslurry_stock, oa_harvest, oa_hay_bailing, oa_herbicide_one, oa_herbicide_two, oa_insecticide, OA_SOW_DATE, oa_spring_harrow, oa_spring_plough, oa_spring_roll, oa_spring_sow_one, oa_spring_sow_two, oa_start, oa_straw_chopping, Calendar::OldDays(), Farm::Prob_multiplier(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::StrawChopping(), tof_OptimisingFarm, CfgFloat::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void Oats::SetUpFarmCategoryInformation ( )
inline
71  {
72  const int elements = 2 + (oa_foobar - Oats_BASE);
74 
75  FarmManagementCategory catlist[elements] =
76  {
77  fmc_Others, // zero element unused but must be here
78  fmc_Others, // oa_start = 1, // Compulsory, start event must always be 1 (one).
79  fmc_Cultivation, // oa_autumn_plough = Oats_BASE,
80  fmc_Fertilizer, // oa_fertmanure_stock,
81  fmc_Cultivation, // oa_spring_plough,
82  fmc_Cultivation, // oa_spring_harrow,
83  fmc_Fertilizer, // oa_fertslurry_stock,
84  fmc_Others, // oa_spring_sow_one,
85  fmc_Others, // oa_spring_sow_two,
86  fmc_Cultivation, // oa_spring_roll,
87  fmc_Herbicide, // oa_herbicide_one,
88  fmc_Herbicide, // oa_herbicide_two,
89  fmc_Insecticide, // oa_insecticide,
90  fmc_Harvest, // oa_harvest,
91  fmc_Others, // oa_straw_chopping,
92  fmc_Others // oa_hay_bailing,
93 
94 
95  // no foobar entry
96 
97  };
98  // Iterate over the catlist elements and copy them to vector
99  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
100 
101  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, oa_foobar, and Oats_BASE.

Referenced by Oats().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
Farm::SpringRoll
virtual bool SpringRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the spring on a_field.
Definition: FarmFuncs.cpp:487
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
OA_SOW_DATE
#define OA_SOW_DATE
Definition: Oats.h:34
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
cfg_herbi_app_prop
CfgFloat cfg_herbi_app_prop
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
Farm::SpringPlough
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
Definition: FarmFuncs.cpp:421
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
oa_insecticide
Definition: Oats.h:50
oa_herbicide_two
Definition: Oats.h:49
Farm::Harvest
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: FarmFuncs.cpp:1364
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
oa_spring_harrow
Definition: Oats.h:43
LE::GetMConstants
int GetMConstants(int a)
Definition: Elements.h:407
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
OA_DID_STRIGLING_ONE
#define OA_DID_STRIGLING_ONE
Definition: Oats.h:35
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
oa_fertslurry_stock
Definition: Oats.h:44
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
Farm::FA_Manure
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1110
oa_straw_chopping
Definition: Oats.h:52
Farm::SpringSow
virtual bool SpringSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out a sowing event in the spring on a_field.
Definition: FarmFuncs.cpp:501
CfgFloat::value
double value() const
Definition: Configurator.h:142
oa_fertmanure_stock
Definition: Oats.h:41
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
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
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
oa_spring_plough
Definition: Oats.h:42
Farm::Prob_multiplier
virtual double Prob_multiplier()
Definition: Farm.h:778
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
OA_DECIDE_TO_HERB
#define OA_DECIDE_TO_HERB
Definition: Oats.h:36
Oats_BASE
#define Oats_BASE
Definition: Oats.h:32
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
Farm::HayBailing
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
Definition: FarmFuncs.cpp:1507
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
Farm::StrawChopping
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: FarmFuncs.cpp:1475
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
oa_spring_sow_one
Definition: Oats.h:45
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
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
oa_foobar
Definition: Oats.h:54
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
oa_spring_roll
Definition: Oats.h:47
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
Farm::AutumnPlough
virtual bool AutumnPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the autumn on a_field.
Definition: FarmFuncs.cpp:212
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
oa_harvest
Definition: Oats.h:51
oa_herbicide_one
Definition: Oats.h:48
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Oats::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: Oats.h:71
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
oa_start
Definition: Oats.h:39
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
oa_hay_bailing
Definition: Oats.h:53
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
oa_autumn_plough
Definition: Oats.h:40
Crop::ChooseNextCrop
void ChooseNextCrop(int a_no_dates)
Chooses the next crop to grow in a field.
Definition: Farm.cpp:756
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
oa_spring_sow_two
Definition: Oats.h:46
WARN_BUG
Definition: MapErrorMsg.h:34
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::SpringHarrow
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: FarmFuncs.cpp:459