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

#include <FI_StarchPotato.h>

Inheritance diagram for FI_SugarBeet:
Crop Crop

Public Member Functions

bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 
 FI_SugarBeet (TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
 
bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 
 FI_SugarBeet (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

◆ FI_SugarBeet() [1/2]

FI_SugarBeet::FI_SugarBeet ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
62  : Crop(a_tov, a_toc, a_L)
63  {
64  m_first_date=g_date->DayInYear(15,11); //
65  }

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

◆ FI_SugarBeet() [2/2]

FI_SugarBeet::FI_SugarBeet ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline

Member Function Documentation

◆ Do() [1/2]

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

Reimplemented from Crop.

38 {
39  m_farm = a_farm;
40  m_field = a_field;
41  m_ev = a_ev;
42  // int d1;
43 
44  bool done = false;
45 
46  switch (m_ev->m_todo)
47  {
48  case fi_sbe_start:
49  {
52  m_field->SetVegPatchy(true); // Root crop so is open until tall
53  // Set up the date management stuff
54  // Could save the start day in case it is needed later
55  // m_field->m_startday = m_ev->m_startday;
56  m_last_date = g_date->DayInYear(15, 11);
57  // Start and stop dates for all events after harvest
58  int noDates = 1;
59  m_field->SetMDates(0, 0, g_date->DayInYear(1, 10));
60  // 0,0 determined by harvest date - used to see if at all possible
61  m_field->SetMDates(1, 0, g_date->DayInYear(10, 11));
62  // Check the next crop for early start, unless it is a spring crop
63  // in which case we ASSUME that no checking is necessary!!!!
64  // So DO NOT implement a crop that runs over the year boundary
65 
66  //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)
67  int d1;
68  if (!(m_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
69 
70  if (m_ev->m_startday > g_date->DayInYear(1, 7))
71  {
72  if (m_field->GetMDates(0, 0) >= m_ev->m_startday)
73  {
74  g_msg->Warn(WARN_BUG, "FI_SugarBeet::Do(): "
75  "Harvest too late for the next crop to start!!!", "");
76  exit(1);
77  }
78  // Now fix any late finishing problems
79  for (int i = 0; i < noDates; i++) {
80  if (m_field->GetMDates(0, i) >= m_ev->m_startday) {
81  m_field->SetMDates(0, i, m_ev->m_startday - 1); //move the starting date
82  }
83  if (m_field->GetMDates(1, i) >= m_ev->m_startday) {
84  m_field->SetMConstants(i, 0);
85  m_field->SetMDates(1, i, m_ev->m_startday - 1); //move the finishing date
86  }
87  }
88  }
89  // Now no operations can be timed after the start of the next crop.
90 
91  // CJT note:
92  // Start single block date checking code to be cut-'n-pasted...
93 
94  if (!m_ev->m_first_year)
95  {
96  // Are we before July 1st?
97  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
98  if (g_date->Date() < d1)
99  {
100  // Yes, too early. We assumme this is because the last crop was late
101  g_msg->Warn(WARN_BUG, "FI_SugarBeet::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 (g_date->Date() > d1)
109  {
110  // Yes too late - should not happen - raise an error
111  g_msg->Warn(WARN_BUG, "FI_SugarBeet::Do(): "
112  "Crop start attempt after last possible start date", "");
113  exit(1);
114  }
115  }
116  }
117  else
118  {
119  // If this is the first year of running then it is possible to start
120  // on day 0, so need this to tell us what to do:
121  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 4), fi_sbe_slurry, false);
122  break;
123  }
124  }//if
125 
126  // End single block date checking code. Please see next line
127  // comment as well.
128  // Reinit d1 to first possible starting date.
129  d1 = g_date->OldDays() + g_date->DayInYear(15, 10);
130  // This is the first real farm operation
132  }
133  break;
134  // OK, Let's go - LKM: first treatment, autumn plough, do it before the 15 of November - if not done, try again +1 day until the the 15 of November when we succeed - 100% of farmers (w clay soil) do this
136  if (m_field->GetSoilType() != 2 && m_field->GetSoilType() != 6) // on clay soils (NL KLEI & VEEN)
137  {
138  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
140  break;
141  }
142  }
143  // LKM: Queue up next event - Slurry, done after 15th of April (next year)
144  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 4) + 365, fi_sbe_slurry, false);
145  break;
146  // LKM: Do slurry before 30th of April - 30% do this
147  case fi_sbe_slurry:
148  if (m_ev->m_lock || m_farm->DoIt_prob(0.30))
149  {
150  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(25, 4) - g_date->DayInYear())) {
151  SimpleEvent(g_date->Date() + 1, fi_sbe_slurry, true);
152  break;
153  }
154  }
155  // LKM: spring plough done after the 1st of March and before the 25th of March - 20% of farmers without clay soils
157  break;
159  if (m_field->GetSoilType() == 2 || m_field->GetSoilType() == 6) { // on sandy soils (NL ZAND & LOSS) - Maybe not the same scale for Finland?
160  if (m_ev->m_lock || m_farm->DoIt_prob(0.20))
161  {
162  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(25, 4) - g_date->DayInYear()))
163  {
165  break;
166  }
167  }
168  }
169  // LKM: Next event is preseeding cultivation (a few days before or on the same day as sowing)
171  break;
175  break;
176  }
178  break;
180  // LKM: Next event differs depending on whether there is presseing cultivation with sow or not - suggests 50% each (is not stated)
181  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
184  break;
185  }
186  // LKM: Queue up the next event - fertilizer done the same day
188  break;
189  }
190  else if (m_ev->m_lock || m_farm->DoIt_prob(0.50 / 0.50)) {
191  SimpleEvent(g_date->OldDays() + g_date->DayInYear(20, 4), fi_sbe_sow, false);
192  }
193  break;
194  // LKM: sow without preseeding cultivator at the same time (fertilizer at the same time) (50%)
195  case fi_sbe_sow:
196  if (!m_farm->SpringSowWithFerti(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
197  SimpleEvent(g_date->Date() + 1, fi_sbe_sow, true);
198  break;
199  }
200  // LKM: Queue up the next event - harrow before emergence
201  SimpleEvent(g_date->Date()+7, fi_sbe_harrow, false);
202  break;
203  case fi_sbe_fertilizer1:
204  // LKM: done on same day as preseeding sow - no later than May 10
205  if (!m_farm->FP_NPKS(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
206  SimpleEvent(g_date->Date() + 1, fi_sbe_fertilizer1, true);
207  break;
208  }
209  // LKM: Queue up the next event - harrow before emergence
210  SimpleEvent(g_date->Date() + 7, fi_sbe_harrow, false);
211  break;
212  case fi_sbe_harrow:
213  // LKM: 20-30% does this
214  if (m_ev->m_lock || m_farm->DoIt_prob(0.30)) {
215  if (!m_farm->SpringHarrow(m_field, 0.0, g_date->DayInYear(17, 5) - g_date->DayInYear())) {
216  SimpleEvent(g_date->Date() + 1, fi_sbe_harrow, true);
217  break;
218  }
219  }
220  //Here comes a fork of parallel events:
221  SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 5), fi_sbe_herbicide1, false); //herbicide1 thread
222  SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 5), fi_sbe_herbicide2, false); //herbicide2 thread
223  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), fi_sbe_insecticide, false); //insecticide thread
224  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 6), fi_sbe_herbicide3, false); //herbicide3 thread
225  SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 6), fi_sbe_fertilizer2, false); //fertilizer thread
226  SimpleEvent(g_date->OldDays() + g_date->DayInYear(20, 7), fi_sbe_fungicide, false); //fungicide thread - main thread
227  break;
228  case fi_sbe_herbicide1:
229  // LKM: start of herbicide1 thread - done before 10th of June
230  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
231  SimpleEvent(g_date->Date() + 1, fi_sbe_herbicide1, true);
232  break;
233  } //end of thread
234  break;
235  case fi_sbe_herbicide2:
236  // LKM: start of herbicide2 thread - done before 10th of July
237  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(10, 7) - g_date->DayInYear())) {
238  SimpleEvent(g_date->Date() + 1, fi_sbe_herbicide2, true);
239  break;
240  } //end of thread
241  break;
242  case fi_sbe_insecticide:
243  // LKM: start of insecticide thread - done before 15th of June
244 #ifdef ECOSTACK_BIOPESTICIDE
245  if (!m_farm->BiocideTreat(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
246  SimpleEvent(g_date->Date() + 1, fi_sbe_insecticide, true);
247  break;
248 #else
249  if (!m_farm->InsecticideTreat(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
250  SimpleEvent(g_date->Date() + 1, fi_sbe_insecticide, true);
251  break;
252 #endif
253  } //end of thread
254  break;
255  case fi_sbe_herbicide3:
256  // LKM: start of herbicide3 thread - done before 25th of June
257  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
258  SimpleEvent(g_date->Date() + 1, fi_sbe_herbicide3, true);
259  break;
260  } //end of thread
261  break;
262  case fi_sbe_fertilizer2:
263  // LKM: start of fertilizer2 thread - done before 5th of July
264  // LKM: 20-30% does this
265  if (m_ev->m_lock || m_farm->DoIt_prob(0.30)) {
266  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(5, 7) - g_date->DayInYear())) {
267  SimpleEvent(g_date->Date() + 1, fi_sbe_fertilizer2, true);
268  break;
269  }
270  } //end of thread
271  break;
272  case fi_sbe_fungicide:
273  // LKM: start of fungicide thread - done before 5th of August
274  // LKM: 10-20% does this
275  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
276  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear())) {
277  SimpleEvent(g_date->Date() + 1, fi_sbe_fungicide, true);
278  break;
279  }
280  }
281  // LKM: Queue up the next event - harvest done after the 1st of October
283  break;
284  // LKM: do harvest before 10th of November
285  case fi_sbe_harvest:
286  if (!m_farm->HarvestLong(m_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
287  SimpleEvent(g_date->Date() + 1, fi_sbe_harvest, true);
288  break;
289  }
290  m_field->SetVegPatchy(false);
291  // LKM: Queue up the next event - plough done after the 25th of October
293  break;
294  // LKM: do plough before 31st of November
296  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(31, 11) - g_date->DayInYear())) {
298  break;
299  }
300  done = true;
301  break;
302 
303  default:
304  g_msg->Warn(WARN_BUG, "FI_Sugarbeet::Do(): "
305  "Unknown event type! ", "");
306  exit(1);
307  }
308  return done;
309 }

References Farm::AutumnPlough(), Farm::BiocideTreat(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), FI_SB_DECIDE_TO_FI, FI_SB_DECIDE_TO_HERB, fi_sbe_autumn_plough1, fi_sbe_autumn_plough2, fi_sbe_fertilizer1, fi_sbe_fertilizer2, fi_sbe_fungicide, fi_sbe_harrow, fi_sbe_harvest, fi_sbe_herbicide1, fi_sbe_herbicide2, fi_sbe_herbicide3, fi_sbe_insecticide, fi_sbe_preseeding_cultivation, fi_sbe_preseeding_sow, fi_sbe_slurry, fi_sbe_sow, fi_sbe_spring_plough, fi_sbe_start, Farm::FP_NPK(), Farm::FP_NPKS(), Farm::FP_Slurry(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), LE::GetSoilType(), Farm::GetType(), Calendar::GetYearNumber(), Farm::HarvestLong(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), 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, Calendar::OldDays(), Farm::PreseedingCultivator(), Farm::PreseedingCultivatorSow(), LE::SetMConstants(), LE::SetMDates(), LE::SetVegPatchy(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSowWithFerti(), tof_OptimisingFarm, MapErrorMsg::Warn(), and WARN_BUG.

◆ Do() [2/2]

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

Reimplemented from Crop.

◆ SetUpFarmCategoryInformation()

void FI_SugarBeet::SetUpFarmCategoryInformation ( )
inline
69  {
70  const int elements = 2 + (fi_sbe_foobar - FI_SB_BASE);
72 
73  FarmManagementCategory catlist[elements] =
74  {
75  fmc_Others, // zero element unused but must be here
76  fmc_Others, // fi_sbe_start = 1, // Compulsory, start event must always be 1 (one).
77  fmc_Harvest, // fi_sbe_harvest = FI_SB_BASE,
78  fmc_Cultivation, // fi_sbe_autumn_plough1,
79  fmc_Fertilizer, // fi_sbe_slurry,
80  fmc_Cultivation, // fi_sbe_spring_plough,
81  fmc_Cultivation, // fi_sbe_preseeding_cultivation,
82  fmc_Cultivation, // fi_sbe_preseeding_sow,
83  fmc_Others, // fi_sbe_sow,
84  fmc_Fertilizer, // fi_sbe_fertilizer1,
85  fmc_Cultivation, // fi_sbe_harrow,
86  fmc_Herbicide, // fi_sbe_herbicide1,
87  fmc_Insecticide, // fi_sbe_insecticide,
88  fmc_Herbicide, // fi_sbe_herbicide2,
89  fmc_Herbicide, // fi_sbe_herbicide3,
90  fmc_Fertilizer, // fi_sbe_fertilizer2,
91  fmc_Fungicide, // fi_sbe_fungicide,
92  fmc_Cultivation // fi_sbe_autumn_plough2,
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 FI_SB_BASE, fi_sbe_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FI_SugarBeet().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
fi_sbe_fungicide
Definition: FI_StarchPotato.h:52
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::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
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
Farm::FP_NPK
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:645
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
fi_sbe_herbicide1
Definition: FI_StarchPotato.h:47
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
FI_SB_DECIDE_TO_FI
#define FI_SB_DECIDE_TO_FI
Definition: FI_SugarBeet.h:34
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
fi_sbe_fertilizer1
Definition: FI_StarchPotato.h:45
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
fi_sbe_herbicide2
Definition: FI_StarchPotato.h:49
fi_sbe_insecticide
Definition: FI_StarchPotato.h:48
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FI_SugarBeet::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FI_SugarBeet.h:69
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
fi_sbe_autumn_plough1
Definition: FI_SugarBeet.h:39
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
fi_sbe_sow
Definition: FI_SugarBeet.h:44
FI_SB_DECIDE_TO_HERB
#define FI_SB_DECIDE_TO_HERB
Definition: FI_SugarBeet.h:33
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fi_sbe_harrow
Definition: FI_StarchPotato.h:46
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
fi_sbe_slurry
Definition: FI_SugarBeet.h:40
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
fi_sbe_preseeding_cultivation
Definition: FI_SugarBeet.h:42
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
fi_sbe_foobar
Definition: FI_SugarBeet.h:54
fi_sbe_spring_plough
Definition: FI_SugarBeet.h:41
fi_sbe_start
Definition: FI_SugarBeet.h:37
fi_sbe_harvest
Definition: FI_SugarBeet.h:38
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
fi_sbe_fertilizer2
Definition: FI_StarchPotato.h:51
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
Farm::PreseedingCultivatorSow
virtual bool PreseedingCultivatorSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out preseeding cultivation together with sow on a_field (tilling and sowing set including culti...
Definition: FarmFuncs.cpp:325
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
Farm::FP_Slurry
virtual bool FP_Slurry(LE *a_field, double a_user, int a_days)
Apply slurry to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:823
Farm::HarvestLong
virtual bool HarvestLong(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field (only differs in the DoIt chance cf harvest)
Definition: FarmFuncs.cpp:1421
fi_sbe_autumn_plough2
Definition: FI_StarchPotato.h:53
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
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
Farm::SpringSowWithFerti
virtual bool SpringSowWithFerti(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 with start fertilizer in the spring on a_field.
Definition: FarmFuncs.cpp:537
fi_sbe_herbicide3
Definition: FI_StarchPotato.h:50
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
fi_sbe_preseeding_sow
Definition: FI_SugarBeet.h:43
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Crop::m_forcespringpossible
bool m_forcespringpossible
Used to signal that the crop can be forced to start in spring.
Definition: Farm.h:508
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
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
Farm::FP_NPKS
virtual bool FP_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:630
FI_SB_BASE
#define FI_SB_BASE
Definition: FI_SugarBeet.h:31