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

#include <SugarBeet.h>

Inheritance diagram for SugarBeet:
Crop

Public Member Functions

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

◆ SugarBeet()

SugarBeet::SugarBeet ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
76  : Crop(a_tov, a_toc, a_L)
77  {
78  m_first_date=g_date->DayInYear(10,3); //
80  }

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

Member Function Documentation

◆ Do()

bool 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 sbe_start:
49  {
51  SB_DECIDE_TO_FI = 1;
52  a_field->ClearManagementActionSum();
53 
54  m_field->SetVegPatchy(true); // Root crop so is open until tall
55  // Set up the date management stuff
56  // Could save the start day in case it is needed later
57  // m_field->m_startday = m_ev->m_startday;
58  m_last_date = g_date->DayInYear(10, 11);
59  // Start and stop dates for all events after harvest
60  int noDates = 1;
61  m_field->SetMDates(0, 0, g_date->DayInYear(1, 10));
62  // 0,0 determined by harvest date - used to see if at all possible
63  m_field->SetMDates(1, 0, g_date->DayInYear(30, 12));
64  // Check the next crop for early start, unless it is a spring crop
65  // in which case we ASSUME that no checking is necessary!!!!
66  // So DO NOT implement a crop that runs over the year boundary
67 
68  //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)
69  int d1;
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, "SugarBeet::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  // CJT note:
94  // Start single block date checking code to be cut-'n-pasted...
95 
96  if (!m_ev->m_first_year)
97  {
98  // Are we before July 1st?
99  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
100  if (g_date->Date() < d1)
101  {
102  // Yes, too early. We assumme this is because the last crop was late
103  g_msg->Warn(WARN_BUG, "SugarBeet::Do(): "
104  "Crop start attempt between 1st Jan & 1st July", "");
105  exit(1);
106  }
107  else
108  {
109  d1 = g_date->OldDays() + m_first_date + 365; // Add 365 for spring crop
110  if (g_date->Date() > d1)
111  {
112  // Yes too late - should not happen - raise an error
113  g_msg->Warn(WARN_BUG, "SugarBeet::Do(): "
114  "Crop start attempt after last possible start date", "");
115  exit(1);
116  }
117  }
118  }
119  else
120  {
121  // If this is the first year of running then it is possibel to start
122  // on day 0, so need this to tell us what to do:
124  break;
125  }
126  }//if
127 
128  // End single block date checking code. Please see next line
129  // comment as well.
130  // Reinit d1 to first possible starting date.
131  d1 = g_date->OldDays() + g_date->DayInYear(10, 3) + 365;
132  // OK, let's go.
133  SimpleEvent(d1, sbe_spring_plough, false);
134  }
135  break;
136 
137  case sbe_spring_plough:
138  if (!m_farm->SpringPlough(m_field, 0.0,g_date->DayInYear(1, 4) -g_date->DayInYear()))
139  {
140  SimpleEvent(g_date->Date() + 1, sbe_spring_plough, true);
141  break;
142  }
144  break;
145 
147  // Today is the 16th of March, at the least.
148  SB_DID_HARROW = false;
149  SB_DID_NPKS_ONE = false;
150  SB_DID_SLURRY = false;
151  SB_SOW_DATE = 0;
153  SimpleEvent(g_date->Date() + 1, sbe_fertnpks_one, false);
154  SimpleEvent(g_date->Date() + 1, sbe_fertslurry, false);
155  break;
156 
157  case sbe_spring_harrow:
158  if (!m_farm->SpringHarrow(m_field, 0.0,
159  g_date->DayInYear(10, 4) -
160  g_date->DayInYear())) {
161  SimpleEvent(g_date->Date() + 1, sbe_spring_harrow, true);
162  break;
163  }
164  SB_DID_HARROW = true;
166  // We are the last surviving thread.
167  SimpleEvent(g_date->Date() + 1, sbe_spring_sow, false);
168  }
169  break;
170 
171  case sbe_fertnpks_one:
172  if (!m_farm->FA_NPK(m_field, 0.0,
173  g_date->DayInYear(10, 4) -
174  g_date->DayInYear())) {
175  SimpleEvent(g_date->Date() + 1, sbe_fertnpks_one, true);
176  break;
177  }
178  SB_DID_NPKS_ONE = true;
179  if (SB_DID_HARROW && SB_DID_SLURRY) {
180  // We are the last surviving thread.
181  SimpleEvent(g_date->Date() + 1, sbe_spring_sow, false);
182  }
183  break;
184 
185  case sbe_fertslurry:
186  if (!m_farm->FA_Slurry(m_field, 0.0,
187  g_date->DayInYear(10, 4) -
188  g_date->DayInYear())) {
189  SimpleEvent(g_date->Date() + 1, sbe_fertslurry, true);
190  break;
191  }
192  SB_DID_SLURRY = true;
194  // We are the last surviving thread.
195  SimpleEvent(g_date->Date() + 1, sbe_spring_sow, false);
196  }
197  break;
198 
199  case sbe_spring_sow:
200  if (!m_farm->SpringSow(m_field, 0.0,
201  g_date->DayInYear(14, 4) -
202  g_date->DayInYear())) {
203  SimpleEvent(g_date->Date() + 1, sbe_spring_sow, true);
204  break;
205  }
206  SB_SOW_DATE = g_date->Date();
208  break;
209 
210  case sbe_spring_roll:
211  if (m_ev->m_lock || m_farm->DoIt(80))
212  {
213  if (!m_farm->SpringRoll(m_field, 0.0,
214  g_date->DayInYear(15, 4) -
215  g_date->DayInYear())) {
216  SimpleEvent(g_date->Date() + 1, sbe_spring_roll, true);
217  break;
218  }
219  }
220  {
221  int d1 = g_date->OldDays() + g_date->DayInYear(20, 4);
222  if (d1 < SB_SOW_DATE + 10) {
223  d1 = SB_SOW_DATE;
224  }
225  SimpleEvent(d1, sbe_herbicide_one, false);
226  }
227  break;
228 
229  case sbe_herbicide_one:
230  if (m_ev->m_lock || m_farm->DoIt((int)(100 * cfg_herbi_app_prop.value() * m_farm->Prob_multiplier()))) //modified probability
231  {
232  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(11, 5) - g_date->DayInYear())) {
233  SimpleEvent(g_date->Date() + 1, sbe_herbicide_one, true);
234  break;
235  }
236  }
237  {
238  int d1 = g_date->Date() + 7;
239  if (d1 < g_date->OldDays() + g_date->DayInYear(2, 5)) {
240  d1 = g_date->OldDays() + g_date->DayInYear(2, 5);
241  }
242  SimpleEvent(d1, sbe_herbicide_two, false);
243  }
244  break;
245 
246  case sbe_herbicide_two:
247  if (m_ev->m_lock || m_farm->DoIt((int)(80 * cfg_herbi_app_prop.value() * SB_DECIDE_TO_HERB * m_farm->Prob_multiplier()))) //modified probability
248  {
249  if (!m_farm->HerbicideTreat(m_field, 0.0,
250  g_date->DayInYear(18, 5) -
251  g_date->DayInYear())) {
252  SimpleEvent(g_date->Date() + 1, sbe_herbicide_two, true);
253  break;
254  }
255  }
256  {
257  int d1 = g_date->Date() + 7;
258  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 5)) {
259  d1 = g_date->OldDays() + g_date->DayInYear(10, 5);
260  }
263 
264  }
265  break;
266 
267  case sbe_herbicide_three:
268  if (m_ev->m_lock || m_farm->DoIt((int)(60 * cfg_herbi_app_prop.value() * SB_DECIDE_TO_HERB * m_farm->Prob_multiplier()))) //modified probability
269  {
270  if (!m_farm->HerbicideTreat(m_field, 0.0,
271  g_date->DayInYear(18, 5) -
272  g_date->DayInYear())) {
273  SimpleEvent(g_date->Date() + 1, sbe_herbicide_two, true);
274  break;
275  }
276  }
277  break;
278 
280  if (m_ev->m_lock || m_farm->DoIt(10))
281  {
282  if (!m_farm->RowCultivation(m_field, 0.0,
283  g_date->DayInYear(25, 5) -
284  g_date->DayInYear())) {
286  break;
287  }
288  // Did first row cultivation, queue up the second too.
289  SB_DID_ROW_TWO = false;
290  {
291  int d1 = g_date->Date() + 7;
292  if (d1 < g_date->OldDays() + g_date->DayInYear(17, 5)) {
293  d1 = g_date->OldDays() + g_date->DayInYear(17, 5);
294  }
296  }
297  }
298  else {
299  // Didn't do row cultivation on this field. Signal already done.
300  SB_DID_ROW_TWO = true;
301  }
302  SB_DID_INSECT_ONE = false;
303  SB_DID_NPKS_TWO = false;
304  SB_DID_WATER_ONE = false;
305  SB_TRULY_DID_WATER_ONE = false;
307  sbe_insecticide_one, false);
309  sbe_fertnpks_two, false);
311  sbe_water_one, false);
312  break;
313 
315  if (!m_farm->RowCultivation(m_field, 0.0,
316  g_date->DayInYear(15, 6) -
317  g_date->DayInYear())) {
319  break;
320  }
321  SB_DID_ROW_TWO = true;
322  if (SB_DID_INSECT_ONE &&
323  SB_DID_NPKS_TWO &&
325  ) {
326  // We are the last surviving thread.
328  sbe_insecticide_two, false);
329  }
330  break;
331 
332  case sbe_insecticide_one:
333  if (m_ev->m_lock || m_farm->DoIt((int)(50 * cfg_ins_app_prop1.value() * m_farm->Prob_multiplier()))) // was 90 //modified probability
334  {
335  if (!m_farm->InsecticideTreat(m_field, 0.0, g_date->DayInYear(1, 6) - g_date->DayInYear())) {
337  break;
338  }
339  }
340  SB_DID_INSECT_ONE = true;
341  if (SB_DID_ROW_TWO &&
342  SB_DID_NPKS_TWO &&
344  ) {
345  // We are the last surviving thread.
347  sbe_insecticide_two, false);
348  }
349  break;
350 
351  case sbe_fertnpks_two:
352  if (m_ev->m_lock || m_farm->DoIt(40))
353  {
354  if (!m_farm->FA_NPK(m_field, 0.0,
355  g_date->DayInYear(15, 6) -
356  g_date->DayInYear())) {
357  SimpleEvent(g_date->Date() + 1, sbe_fertnpks_two, true);
358  break;
359  }
360  }
361  SB_DID_NPKS_TWO = true;
362  if (SB_DID_ROW_TWO &&
365  ) {
366  // We are the last surviving thread.
368  sbe_insecticide_two, false);
369  }
370  break;
371 
372  case sbe_water_one:
373  if (m_ev->m_lock || m_farm->DoIt(25))
374  {
375  if (!m_farm->Water(m_field, 0.0,
376  g_date->DayInYear(30, 7) -
377  g_date->DayInYear())) {
378  SimpleEvent(g_date->Date() + 1, sbe_water_one, true);
379  break;
380  }
381  SB_TRULY_DID_WATER_ONE = true;
382  }
383  SB_DID_WATER_ONE = true;
384  if (SB_DID_ROW_TWO &&
387  ) {
388  // We are the last surviving thread.
390  sbe_insecticide_two, false);
391  }
392  break;
393 
394  case sbe_insecticide_two:
395  if (m_ev->m_lock || m_farm->DoIt((int)(30 * cfg_ins_app_prop1.value()*SB_DECIDE_TO_FI * m_farm->Prob_multiplier()))) //modified probability
396  {
397  if (!m_farm->InsecticideTreat(m_field, 0.0,
398  g_date->DayInYear(25, 6) -
399  g_date->DayInYear())) {
401  break;
402  }
403  }
405  break;
406 
407  case sbe_water_two:
409  {
410  if (!m_farm->Water(m_field, 0.0,g_date->DayInYear(30, 8) -g_date->DayInYear()))
411  {
412  SimpleEvent(g_date->Date() + 1, sbe_water_two, true);
413  break;
414  }
415  }
416  ChooseNextCrop(1);
417  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 10), sbe_harvest, false);
418  break;
419 
420  case sbe_harvest:
421  if (m_field->GetMConstants(0) == 0) {
422  if (!m_farm->HarvestLong(m_field, 0.0, -1)) { //raise an error
423  g_msg->Warn(WARN_BUG, "Sugarbeet::Do(): failure in 'Harvest' execution", "");
424  exit(1);
425  }
426  }
427  else {
428  if (!m_farm->HarvestLong(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
429  SimpleEvent(g_date->Date() + 1, sbe_harvest, true);
430  break;
431  }
432  }
433  m_field->SetVegPatchy(false);
434  done = true;
435  break;
436 
437  default:
438  g_msg->Warn(WARN_BUG, "Sugarbeet::Do(): "
439  "Unknown event type! ", "");
440  exit(1);
441  }
442 
443  return done;
444 }

References cfg_herbi_app_prop, cfg_ins_app_prop1, Crop::ChooseNextCrop(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::FA_NPK(), Farm::FA_Slurry(), g_date, g_msg, LE::GetMConstants(), LE::GetMDates(), 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::Prob_multiplier(), Farm::RowCultivation(), SB_DECIDE_TO_FI, SB_DECIDE_TO_HERB, SB_DID_HARROW, SB_DID_INSECT_ONE, SB_DID_NPKS_ONE, SB_DID_NPKS_TWO, SB_DID_ROW_TWO, SB_DID_SLURRY, SB_DID_WATER_ONE, SB_SOW_DATE, SB_TRULY_DID_WATER_ONE, sbe_fertnpks_one, sbe_fertnpks_two, sbe_fertslurry, sbe_harvest, sbe_herbicide_one, sbe_herbicide_three, sbe_herbicide_two, sbe_insecticide_one, sbe_insecticide_two, sbe_row_cultivation_one, sbe_row_cultivation_two, sbe_spring_harrow, sbe_spring_plough, sbe_spring_roll, sbe_spring_sow, sbe_start, sbe_start_threads_one, sbe_water_one, sbe_water_two, LE::SetMConstants(), LE::SetMDates(), LE::SetVegPatchy(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), tof_OptimisingFarm, CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void SugarBeet::SetUpFarmCategoryInformation ( )
inline
81  {
82  const int elements = 2 + (sbe_foobar - SBeet_BASE);
84 
85  FarmManagementCategory catlist[elements] =
86  {
87  fmc_Others, // zero element unused but must be here
88  fmc_Others,//sbe_start = 1, // Compulsory, start event must always be 1 (one).
89  fmc_Fertilizer,//sbe_fertmanure = SBeet_BASE,
90  fmc_Cultivation,//sbe_spring_plough,
91  fmc_Others,//sbe_start_threads_one,
92  fmc_Cultivation,//sbe_spring_harrow,
93  fmc_Fertilizer,//sbe_fertnpks_one,
94  fmc_Fertilizer,//sbe_fertslurry,
95  fmc_Others,//sbe_spring_sow,
96  fmc_Others,//sbe_spring_roll,
97  fmc_Herbicide,//sbe_herbicide_one,
98  fmc_Herbicide,//sbe_herbicide_two,
99  fmc_Herbicide,//sbe_herbicide_three,
100  fmc_Cultivation,//sbe_row_cultivation_one,
101  fmc_Cultivation,//sbe_row_cultivation_two,
102  fmc_Insecticide,//sbe_insecticide_one,
103  fmc_Fertilizer,//sbe_fertnpks_two,
104  fmc_Watering,//sbe_water_one,
105  fmc_Insecticide,//sbe_insecticide_two,
106  fmc_Watering,//sbe_water_two,
107  fmc_Harvest//sbe_harvest
108 
109  // no foobar entry
110 
111  };
112  // Iterate over the catlist elements and copy them to vector
113  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
114 
115  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, Crop::m_ManagementCategories, sbe_foobar, and SBeet_BASE.

Referenced by SugarBeet().


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
SB_TRULY_DID_WATER_ONE
#define SB_TRULY_DID_WATER_ONE
Definition: SugarBeet.h:42
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
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
sbe_start
Definition: SugarBeet.h:47
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
sbe_fertnpks_two
Definition: SugarBeet.h:62
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
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
SB_DID_ROW_TWO
#define SB_DID_ROW_TWO
Definition: SugarBeet.h:38
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
sbe_harvest
Definition: SugarBeet.h:66
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
sbe_row_cultivation_two
Definition: SugarBeet.h:60
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
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
sbe_spring_plough
Definition: SugarBeet.h:49
SB_DID_NPKS_TWO
#define SB_DID_NPKS_TWO
Definition: SugarBeet.h:40
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
Farm::FA_NPK
virtual bool FA_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:982
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
sbe_water_one
Definition: SugarBeet.h:63
sbe_row_cultivation_one
Definition: SugarBeet.h:59
SBeet_BASE
#define SBeet_BASE
Definition: SugarBeet.h:31
sbe_herbicide_three
Definition: SugarBeet.h:58
SB_DID_WATER_ONE
#define SB_DID_WATER_ONE
Definition: SugarBeet.h:41
sbe_fertnpks_one
Definition: SugarBeet.h:52
Farm::Prob_multiplier
virtual double Prob_multiplier()
Definition: Farm.h:778
SB_DID_NPKS_ONE
#define SB_DID_NPKS_ONE
Definition: SugarBeet.h:34
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
sbe_start_threads_one
Definition: SugarBeet.h:50
SB_DECIDE_TO_FI
#define SB_DECIDE_TO_FI
Definition: SpringBarley.h:44
Calendar::Date
long Date(void)
Definition: Calendar.h:57
SB_DID_SLURRY
#define SB_DID_SLURRY
Definition: SugarBeet.h:35
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
SB_DECIDE_TO_HERB
#define SB_DECIDE_TO_HERB
Definition: SpringBarley.h:43
SugarBeet::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: SugarBeet.h:81
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
sbe_insecticide_one
Definition: SugarBeet.h:61
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
SB_DID_INSECT_ONE
#define SB_DID_INSECT_ONE
Definition: SugarBeet.h:39
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
sbe_water_two
Definition: SugarBeet.h:65
SB_SOW_DATE
#define SB_SOW_DATE
Definition: SugarBeet.h:36
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
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::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
sbe_herbicide_two
Definition: SugarBeet.h:57
Farm::RowCultivation
virtual bool RowCultivation(LE *a_field, double a_user, int a_days)
Carry out a harrowing between crop rows on a_field.
Definition: FarmFuncs.cpp:1183
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
Farm::Water
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: FarmFuncs.cpp:1330
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
sbe_foobar
Definition: SugarBeet.h:67
SB_DID_HARROW
#define SB_DID_HARROW
Definition: SugarBeet.h:33
sbe_herbicide_one
Definition: SugarBeet.h:56
sbe_spring_roll
Definition: SugarBeet.h:55
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
sbe_fertslurry
Definition: SugarBeet.h:53
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
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
cfg_herbi_app_prop
CfgFloat cfg_herbi_app_prop
sbe_spring_harrow
Definition: SugarBeet.h:51
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
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
WARN_BUG
Definition: MapErrorMsg.h:34
sbe_spring_sow
Definition: SugarBeet.h:54
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
sbe_insecticide_two
Definition: SugarBeet.h:64