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

#include <DE_OSugarBeet.h>

Inheritance diagram for DE_OSugarBeet:
Crop

Public Member Functions

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

◆ DE_OSugarBeet()

DE_OSugarBeet::DE_OSugarBeet ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
71  : Crop(a_tov, a_toc, a_L)
72  {
73  m_first_date=g_date->DayInYear(20, 11); //
75  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

33 {
34  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
35  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
36  m_field = a_field;
37  m_ev = a_ev;
38  bool flag = false;
39  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
40  int d1 = 0;
41  TTypesOfVegetation l_tov = tov_DEOSugarBeet; // The current type - change to match the crop you have
42 /**********************************************To Here *************************************************************************/
43 
44  // Depending what event has occured jump to the correct bit of code
45  switch (m_ev->m_todo)
46  {
47  case de_osbe_start:
48  {
51  DE_OSB_WINTER_PLOUGH = false;
52 
53 
55 
56  m_field->SetVegPatchy(true); // Root
57 
58  m_last_date = g_date->DayInYear(15, 11); // Should match the last flexdate below
59  //Create a 2d array of 1 plus the number of operations you use. Change only 4+1 to what you need in the line below
60  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
61  // Set up the date management stuff
62  // Start and stop dates for all events after harvest
63  flexdates[0][1] = g_date->DayInYear(15, 11); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use
64  // Now these are done in pairs, start & end for each operation. If its not used then -1
65  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
66  flexdates[1][1] = g_date->DayInYear(15, 11); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
67 
68  // Below if this is a spring crop use 365, otherwise set this to 0, second parameter is fixed, and the third is the start up operation in the first year
69  int isSpring = 0;
70  if (StartUpCrop(isSpring, flexdates, int(de_osbe_spring_plough))) break;
71 
72  // End single block date checking code. Please see next line comment as well.
73  // Reinit d1 to first possible starting date.
74  d1 = g_date->OldDays() + g_date->DayInYear(10, 10) + isSpring;
75  // OK, let's go.
76  if (m_ev->m_forcespring) {
77  int day_num_shift = 365;
78  if (g_date->DayInYear() < 70) day_num_shift = 0;
79  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 2) + day_num_shift, de_osbe_ferti_p2, false, m_farm, m_field);
80  break;
81  }
82  else {
83  if (m_farm->IsStockFarmer()) { // StockFarmer
85  }
86  else SimpleEvent_(d1, de_osbe_ferti_p1, false, m_farm, m_field);
87  break;
88  }
89  }
90  break;
91 
92  // This is the first real farm operation
93  case de_osbe_ferti_p1:
94  if (m_ev->m_lock || m_farm->DoIt_prob(.50))
95  {
96  if (!m_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(20, 11) - g_date->DayInYear())) {
98  break;
99  }
101  break;
102  }
103  else if (m_ev->m_lock || m_farm->DoIt_prob(.40 / .50)) {
104  // Queue up the next event -in this case autumn ploughing
106  break;
107  }
108  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 2) + 365, de_osbe_ferti_p2, false, m_farm, m_field);
109  break;
110 
111  case de_osbe_ferti_s1:
112  if (m_ev->m_lock || m_farm->DoIt(50))
113  {
114  if (!m_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(20, 11) - g_date->DayInYear())) {
116  break;
117  }
119  break;
120  }
121  else if (m_ev->m_lock || m_farm->DoIt_prob(.40 / .50)) {
122  // Queue up the next event -in this case autumn ploughing
124  break;
125  }
126  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 2) + 365, de_osbe_ferti_s2, false, m_farm, m_field);
127  break;
128 
130  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(21, 11) - g_date->DayInYear())) {
132  break;
133  }
134  DE_OSB_WINTER_PLOUGH = true;
135  if (m_farm->IsStockFarmer()) { // StockFarmer
137  }
138  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 2) + 365, de_osbe_ferti_p2, false, m_farm, m_field);
139  break;
140  case de_osbe_ferti_s2:
141  if (!m_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(25, 2) - g_date->DayInYear())) {
143  break;
144  }
145  // LKM: Queue up the next event - spring plough (suggests 10% since it is not common) done after the 5th of March and before the 25th of April - if not done, try again +1 day until the 25th of April when we will succeed
147  de_osbe_spring_plough, false);
148  break;
149  case de_osbe_ferti_p2:
150  if (!m_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(25, 2) - g_date->DayInYear())) {
152  break;
153  }
154  // LKM: Queue up the next event - spring plough (suggests 10% since it is not common) done after the 5th of March and before the 25th of April - if not done, try again +1 day until the 25th of April when we will succeed
156  de_osbe_spring_plough, false);
157  break;
159  // the 10% who did not autumn plough will do spring plough
160  if (DE_OSB_WINTER_PLOUGH == false)
161  {
162  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear()))
163  {
165  break;
166  }
167  }
168  // LKM: Queue up the next event - shallow harrow1 (making seedbed) done after the 28th of March and before the 28th of April - if not done, try again +1 day until the 28th of April when we will succeed
170  break;
171  case de_osbe_sharrow1:
172  if (!m_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(28, 4) - g_date->DayInYear()))
173  {
175  break;
176  }
177  // LKM: Queue up the next event - sow done the day after, and before 1st of May - if not done, try again +1 day until the 1st of May when we will succeed
178  SimpleEvent_(g_date->Date() + 1, de_osbe_sow, false, m_farm, m_field);
179  break;
180  case de_osbe_sow:
181  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(1, 5) - g_date->DayInYear()))
182  {
184  break;
185  }
186  //Here comes a fork of two
187  SimpleEvent_(g_date->Date() + 15, de_osbe_strigling, false, m_farm, m_field); // soil treatment thread
188  if (m_farm->IsStockFarmer()) {
190  }
191  else {
193  }
194  break;
195 
196  // LKM: Here comes soil treatment thread (main thread) - strigling done 15 days after
197  case de_osbe_strigling:
198  //LKM: do strigling before 15th of May - if not done, try again +1 day until the 27th of May when we succeed
199  if (!m_farm->Strigling(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
201  break;
202  }
203  // LKM: Queue up the next event - harrow done 15 days after
205  break;
206  case de_osbe_harrow:
207  //LKM: do harrow before 30th May - if not done, try again +1 day until the 30th of May when we succeed
208  if (!m_farm->SpringHarrow(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
210  break;
211  }
212  // LKM: Queue up the next event - row cultivation1 done 15 days after
214  break;
216  //LKM: do row cultivaton before 15th of June - if not done, try again +1 day until the 15th of June when we succeed
217  if (!m_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
219  break;
220  }
221  // LKM: Queue up the next event - row cultivation2 done 15 days after
223  break;
224 
226  //LKM: do row cultivaton before 30th of June - if not done, try again +1 day until the 30th of June when we succeed
227  if (!m_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
229  break;
230  }
231  // LKM: Queue up the next event - row cultivation3 done 15 days after
232  SimpleEvent_(g_date->Date() + 15, de_osbe_row_cultivation3, false, m_farm, m_field); // MAIN THREAD
233  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 7), de_osbe_water1, false, m_farm, m_field); // watering thread
234  break;
235 
236  // Here comes water thread
237  case de_osbe_water1:
238  if (m_ev->m_lock || m_farm->DoIt_prob(0.10))
239  {
240  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(30, 7) -
241  g_date->DayInYear())) {
243  break;
244  }
245  }
246 
247  d1 = g_date->Date() + 10;
248  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 7)) {
249  d1 = g_date->OldDays() + g_date->DayInYear(15, 7);
250  }
252  break;
253  //LKM: do water2 before 30 of August - if not done, try again +1 day until the the 30 of July when we succeed
254  case de_osbe_water2:
255  if (m_ev->m_lock || m_farm->DoIt_prob(0.3))
256  {
257  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(30, 8) -
258  g_date->DayInYear())) {
260  break;
261  }
262  }
263  break;
264  //End of thread
265 
267  if (m_ev->m_lock || m_farm->DoIt_prob(0.80))
268  {
269  //LKM: do row cultivaton before 15th of July - if not done, try again +1 day until the the 15th of July when we succeed
270  if (!m_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(15, 7) - g_date->DayInYear())) {
272  break;
273  }
274  }
275  break; // end of thread
276 
277  case de_osbe_fertiFP_S:
278  // Here comes the microelements thread
279  if (m_ev->m_lock || m_farm->DoIt(25))
280  {
281  if (!m_farm->FP_ManganeseSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
283  break;
284  }
285  }
287  break;
288 
289  case de_osbe_fertiFP_B:
290  // Here comes the microelements thread
291  if (m_ev->m_lock || m_farm->DoIt(25))
292  {
293  if (!m_farm->FP_Boron(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
295  break;
296  }
297  }
298  // LKM: Queue up the next event - manual weeding (remove wild beets) done after 15th of July
300  break;
301 
302  case de_osbe_fertiFA_S:
303  if (m_ev->m_lock || m_farm->DoIt(25))
304  {
305  if (!m_farm->FA_ManganeseSulphate(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
307  break;
308  }
309  }
311  break;
312 
313  case de_osbe_fertiFA_B:
314  // Here comes the microelements thread
315  if (m_ev->m_lock || m_farm->DoIt(25))
316  {
317  if (!m_farm->FA_Boron(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
319  break;
320  }
321  }
322  // LKM: Queue up the next event - manual weeding (remove wild beets) done after 1st of July
324  break;
325 
326  //LKM: do manual weeding before 1st of August - if not done, try again +1 day until the 1st of August when we succeed (need af new function!)
328  if (!m_farm->ManualWeeding(m_field, 0.0, g_date->DayInYear(1, 8) -
329  g_date->DayInYear())) {
331  break;
332  }
334  break;
336  if (m_ev->m_lock || m_farm->DoIt_prob(0.50))
337  {
338  if (!m_farm->ManualWeeding(m_field, 0.0, g_date->DayInYear(31, 8) -
339  g_date->DayInYear())) {
341  break;
342  }
343  }
344  // LKM: Queue up the next event - harvest done after the 15th of September
346  break;
347  // LKM: do harvest before 15th of November - if not done, try again + 1 day until the 15th of November when we succeed
348  case de_osbe_harvest:
349  // We don't move harvest days
350  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
352  break;
353  }
354  m_field->SetVegPatchy( false);
355  done = true;
356  break;
357 
358  default:
359  g_msg->Warn(WARN_BUG, "DE_OSugarbeet::Do(): "
360  "Unknown event type! ", "");
361  exit(1);
362  }
363  return done;
364 }

References Farm::AutumnPlough(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), DE_OSB_DECIDE_TO_FI, DE_OSB_DECIDE_TO_HERB, DE_OSB_WINTER_PLOUGH, de_osbe_autumn_plough, de_osbe_ferti_p1, de_osbe_ferti_p2, de_osbe_ferti_s1, de_osbe_ferti_s2, de_osbe_fertiFA_B, de_osbe_fertiFA_S, de_osbe_fertiFP_B, de_osbe_fertiFP_S, de_osbe_harrow, de_osbe_harvest, de_osbe_manualweeding1, de_osbe_manualweeding2, de_osbe_row_cultivation1, de_osbe_row_cultivation2, de_osbe_row_cultivation3, de_osbe_sharrow1, de_osbe_sow, de_osbe_spring_plough, de_osbe_start, de_osbe_strigling, de_osbe_water1, de_osbe_water2, Farm::DoIt(), Farm::DoIt_prob(), Farm::FA_Boron(), Farm::FA_ManganeseSulphate(), Farm::FA_Manure(), Farm::FP_Boron(), Farm::FP_ManganeseSulphate(), Farm::FP_Manure(), g_date, g_msg, LE::GetMDates(), Farm::Harvest(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Farm::ManualWeeding(), Calendar::OldDays(), Farm::RowCultivation(), LE::SetVegPatchy(), Farm::ShallowHarrow(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::Strigling(), tov_DEOSugarBeet, MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DE_OSugarBeet::SetUpFarmCategoryInformation ( )
inline
76  {
77  const int elements = 2 + (de_osbe_foobar - DE_OSB_BASE);
79 
80  FarmManagementCategory catlist[elements] =
81  {
82  fmc_Others, // zero element unused but must be here
83  fmc_Others, // de_osbe_start = 1, // Compulsory, start event must always be 1 (one).
84  fmc_Others, // de_osbe_sleep_all_day = DE_OSB_BASE,
85  fmc_Fertilizer, // de_osbe_ferti_p1,
86  fmc_Fertilizer, // de_osbe_ferti_s1,
87  fmc_Cultivation, // de_osbe_autumn_plough,
88  fmc_Fertilizer, // de_osbe_ferti_s2,
89  fmc_Fertilizer, // de_osbe_ferti_p2,
90  fmc_Cultivation, // de_osbe_spring_plough,
91  fmc_Cultivation, // de_osbe_sharrow1,
92  fmc_Others, // de_osbe_sow,
93  fmc_Cultivation, // de_osbe_strigling,
94  fmc_Cultivation, // de_osbe_harrow,
95  fmc_Cultivation, // de_osbe_row_cultivation1,
96  fmc_Watering, // de_osbe_water1,
97  fmc_Watering, // de_osbe_water2,
98  fmc_Cultivation, // de_osbe_row_cultivation2,
99  fmc_Cultivation, // de_osbe_row_cultivation3,
100  fmc_Fertilizer, // de_osbe_fertiFA_B,
101  fmc_Fertilizer, // de_osbe_fertiFP_B,
102  fmc_Fertilizer, // de_osbe_fertiFA_S,
103  fmc_Fertilizer, // de_osbe_fertiFP_S,
104  fmc_Cultivation, // de_osbe_manualweeding1,
105  fmc_Cultivation, // de_osbe_manualweeding2,
106  fmc_Harvest, // de_osbe_harvest,
107 
108  // no foobar entry
109 
110  };
111  // Iterate over the catlist elements and copy them to vector
112  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
113 
114  }

References DE_OSB_BASE, de_osbe_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DE_OSugarBeet().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
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
tov_DEOSugarBeet
Definition: LandscapeFarmingEnums.h:492
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
Farm::Strigling
virtual bool Strigling(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field.
Definition: FarmFuncs.cpp:1206
DE_OSugarBeet::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DE_OSugarBeet.h:76
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
de_osbe_ferti_s2
Definition: DE_OSugarBeet.h:43
Farm::FP_ManganeseSulphate
virtual bool FP_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply Manganse Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:840
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
de_osbe_fertiFA_S
Definition: DE_OSugarBeet.h:57
de_osbe_strigling
Definition: DE_OSugarBeet.h:48
de_osbe_sharrow1
Definition: DE_OSugarBeet.h:46
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
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
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
de_osbe_manualweeding2
Definition: DE_OSugarBeet.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
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
de_osbe_fertiFP_S
Definition: DE_OSugarBeet.h:58
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
DE_OSB_WINTER_PLOUGH
#define DE_OSB_WINTER_PLOUGH
Definition: DE_OSugarBeet.h:33
de_osbe_row_cultivation1
Definition: DE_OSugarBeet.h:50
Farm::FP_Manure
virtual bool FP_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:896
de_osbe_spring_plough
Definition: DE_OSugarBeet.h:45
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
de_osbe_foobar
Definition: DE_OSugarBeet.h:62
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
DE_OSB_DECIDE_TO_FI
#define DE_OSB_DECIDE_TO_FI
Definition: DE_OSugarBeet.h:35
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Farm::FA_ManganeseSulphate
virtual bool FA_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply manganese sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1095
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
Farm::FA_Boron
virtual bool FA_Boron(LE *a_field, double a_user, int a_days)
Apply soluble Boron to a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:868
Crop::StartUpCrop
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 a...
Definition: Farm.cpp:652
Farm::FP_Boron
virtual bool FP_Boron(LE *a_field, double a_user, int a_days)
Apply soluble Boron to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:854
de_osbe_fertiFA_B
Definition: DE_OSugarBeet.h:55
Farm::ManualWeeding
virtual bool ManualWeeding(LE *a_field, double a_user, int a_days)
Manual weeding on a_field - no tramlines since weeding by hand, the bush stays on field with same veg...
Definition: FarmFuncs.cpp:2002
DE_OSB_BASE
#define DE_OSB_BASE
Definition: DE_OSugarBeet.h:31
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
de_osbe_row_cultivation3
Definition: DE_OSugarBeet.h:54
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
de_osbe_water2
Definition: DE_OSugarBeet.h:52
de_osbe_water1
Definition: DE_OSugarBeet.h:51
Farm::ShallowHarrow
virtual bool ShallowHarrow(LE *a_field, double a_user, int a_days)
Carry out a shallow harrow event on a_field, e.g., after grass cutting event.
Definition: FarmFuncs.cpp:473
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
de_osbe_harrow
Definition: DE_OSugarBeet.h:49
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
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
de_osbe_autumn_plough
Definition: DE_OSugarBeet.h:42
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
de_osbe_ferti_s1
Definition: DE_OSugarBeet.h:41
de_osbe_sow
Definition: DE_OSugarBeet.h:47
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
de_osbe_ferti_p2
Definition: DE_OSugarBeet.h:44
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
de_osbe_fertiFP_B
Definition: DE_OSugarBeet.h:56
de_osbe_ferti_p1
Definition: DE_OSugarBeet.h:40
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
de_osbe_harvest
Definition: DE_OSugarBeet.h:61
DE_OSB_DECIDE_TO_HERB
#define DE_OSB_DECIDE_TO_HERB
Definition: DE_OSugarBeet.h:34
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
de_osbe_start
Definition: DE_OSugarBeet.h:38
WARN_BUG
Definition: MapErrorMsg.h:34
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
de_osbe_manualweeding1
Definition: DE_OSugarBeet.h:59
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
de_osbe_row_cultivation2
Definition: DE_OSugarBeet.h:53
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