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

#include <UKMaize.h>

Inheritance diagram for UKMaize:
Crop

Public Member Functions

virtual bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 The one and only method for a crop management plan. All farm actions go through here. More...
 
 UKMaize (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

◆ UKMaize()

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

When we start it off, the first possible date for a farm operation is 1st September This information is used by other crops when they decide how much post processing of the management is allowed after harvest before the next crop starts.

50  : Crop(a_tov, a_toc, a_L)
51  {
59  }

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

Member Function Documentation

◆ Do()

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

The one and only method for a crop management plan. All farm actions go through here.

Called every time something is done to the crop by the farmer in the first instance it is always called with m_ev->todo set to start, but susequently will be called whenever the farmer wants to carry out a new operation.
This method details all the management and relationships between operations necessary to grow and ALMaSS crop - in this case conventional maize.

Reimplemented from Crop.

65 {
66  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
67  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
68  m_field = a_field;
69  m_ev = a_ev;
70  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
71  int d1 = 0;
72  int noDates = 1;
73  TTypesOfVegetation l_tov = tov_UKMaize; // The current type - change to match the crop you have
74 /**********************************************To Here *************************************************************************/
75 
76  // Depending what event has occured jump to the correct bit of code
77  switch (m_ev->m_todo)
78  {
79  case uk_ma_start:
80  {
81  // uk_m_start just sets up all the starting conditions and reference dates that are needed to start a uk_maize
82  // Set up the date management stuff
83 
85 
86  // The next bit of code just allows for altering dates after harvest if it is necessary
87  // to allow for a crop which starts its management early.
88 
89  // start and stop dates for all 'movable' events for this crop
90  int noDates = 1;
91  m_field->SetMDates(0, 0, g_date->DayInYear(30, 8)); // last possible day of harvest
92  m_field->SetMDates(1, 0, g_date->DayInYear(31, 8)); // last possible day of straw chopping
93  // then these will be reduced in value to 0
94 
95  m_field->SetMConstants(0, 1);
96 
97  // Check the next crop for early start, unless it is a spring crop
98  // in which case we ASSUME that no checking is necessary!!!!
99  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
100 
101  //new if: do the check only for non-optimising farms and if year>0. (030713 - m_rotation used only in the hidden year, so I modified the condition from >7 to >0)
102  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
103  if (!(m_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
104 
105  if (m_ev->m_startday > g_date->DayInYear(1, 7)) {
106  if (m_field->GetMDates(0, 0) >= m_ev->m_startday)
107  {
108  g_msg->Warn(WARN_BUG, "UKMaize::Do(): ", "Harvest too late for the next crop to start!!!");
109  int almassnum = m_field->GetLandscape()->BackTranslateVegTypes(m_ev->m_next_tov);
110  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
111  }
112  // Now fix any late finishing problems
113  for (int i = 0; i < noDates; i++) {
114  if (m_field->GetMDates(0, i) >= m_ev->m_startday) {
115  m_field->SetMDates(0, i, m_ev->m_startday - 1); //move the starting date
116  }
117  if (m_field->GetMDates(1, i) >= m_ev->m_startday) {
118  m_field->SetMConstants(i, 0); //change the default value of the MConst (=1) to 0 (necessary to correctly execute farm events in case the finishing date (MDate) was moved)
119  m_field->SetMDates(1, i, m_ev->m_startday - 1); //move the finishing date
120  }
121  }
122  }
123  // Now no operations can be timed after the start of the next crop.
124 
125  if (!m_ev->m_first_year) {
126  // Are we before July 1st?
127  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
128  if (g_date->Date() < d1) {
129  // Yes, too early. We assumme this is because the last crop was late
130  printf("Poly: %d\n", m_field->GetPoly());
131  g_msg->Warn(WARN_BUG, "UKMaize::Do(): ", "Crop start attempt between 1st Jan & 1st July");
132  int prev = m_field->GetLandscape()->BackTranslateVegTypes(m_field->GetOwner()->GetPreviousTov(m_field->GetRotIndex()));
133  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
134  int almassnum = m_field->GetLandscape()->BackTranslateVegTypes(m_ev->m_next_tov);
135  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
136  exit(1);
137  }
138  else {
139  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
140  if (g_date->Date() > d1) {
141  // Yes too late - should not happen - raise an error
142  g_msg->Warn(WARN_BUG, "UKMaize::Do(): ", "Crop start attempt after last possible start date");
143  int prev = m_field->GetLandscape()->BackTranslateVegTypes(m_field->GetOwner()->GetPreviousTov(m_field->GetRotIndex()));
144  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
145  int almassnum = m_field->GetLandscape()->BackTranslateVegTypes(m_ev->m_next_tov);
146  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
147  exit(1);
148  }
149  }
150  }
151  else {
152  // Is the first year
153  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
154  // Code for first spring treatment used
156  break;
157  }
158  }//if
159 
160  // End single block date checking code. Please see next line comment as well.
161  // Reinit d1 to first possible starting date.
162  d1 = g_date->OldDays() + g_date->DayInYear(20, 9);
163  // OK, let's go.
164  {
165  // Here we queue up the first event
167  }
168  break;
169  }
170  // This is the first real farm operation
171 
172  // Stubble cultivator 60%: Septmeber - uk_ma_autumn_harrow
173  case uk_ma_autumn_harrow:
174  if (m_ev->m_lock || m_farm->DoIt_prob(0.6))
175  {
176  if (!m_farm->StubbleHarrowing(m_field, 0.0, g_date->DayInYear(10, 10) - g_date->DayInYear())) {
178  break;
179  }
180  }
182  break;
183 
184  // Winter plough 50%
185  case uk_ma_autumn_plough:
186  if (m_ev->m_lock || m_farm->DoIt_prob(0.5))
187  {
188  if (!m_farm->WinterPlough(m_field, 0.0, g_date->DayInYear(1, 12) - g_date->DayInYear())) {
190  break;
191  }
192  }
193  if (m_farm->IsStockFarmer()) //Stock Farmer
194  {
196  }
197  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, uk_ma_ferti_p1, false, m_farm, m_field);
198  break;
199 
200  // Slurry
201  case uk_ma_ferti_p1:
202  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(24, 4) - g_date->DayInYear())) {
204  break;
205  }
207  break;
208  case uk_ma_ferti_s1:
209  if (!m_farm->FA_Slurry(m_field, 0.0, g_date->DayInYear(24, 4) - g_date->DayInYear())) {
211  break;
212  }
214  break;
215 
216  // Spring plough 20%
217  case uk_ma_spring_plough:
218  if (m_ev->m_lock || m_farm->DoIt_prob(0.2))
219  {
220  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(27, 4) - g_date->DayInYear())) {
222  break;
223  }
224  }
226  break;
227 
228  // Presseding cultivation
230  if (!m_farm->PreseedingCultivator(m_field, 0.0, g_date->DayInYear(14, 5) - g_date->DayInYear())) {
232  break;
233  }
235  break;
236 
237  // sow (25%) or sow with fertiliser (75%)
239  if (m_ev->m_lock || m_farm->DoIt_prob(0.75))
240  {
241  if (!m_farm->SpringSowWithFerti(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
243  break;
244  }
246  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), uk_ma_herbicide1, false, m_farm, m_field); // Herbidide thread
247  break;
248  }
250  break;
251  case uk_ma_spring_sow:
252  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
254  break;
255  }
256  // Here is a fork leading to parallel events. Harrow. Herbicide. Feritliser.
258  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), uk_ma_herbicide1, false, m_farm, m_field); // Herbidide thread
259  if (m_farm->IsStockFarmer()) //Stock Farmer // N thread = MAIN
260  {
262  }
264  break;
265 
266  // Fertiliser NI (25% who did not sow with fertiliser)
267  case uk_ma_ferti_p2:
268  // Here comes N thread
269  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(16, 5) - g_date->DayInYear())) {
271  break;
272  }
273  // End of thread
274  break;
275  case uk_ma_ferti_s2:
276  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(16, 5) - g_date->DayInYear())) {
278  break;
279  }
280  // End of thread
281  break;
282 
283  // Herbicide application (90%)
284  case uk_ma_herbicide1:
285  // Here comes the herbicide thread
286  {
287  if (m_field->GetGreenBiomass() <= 0)
288  {
290  }
291  else
292  {
293  if (m_ev->m_lock || m_farm->DoIt_prob(0.9))
294  {
295  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
297  break;
298  }
299  }
300  }
301  }
302  break;
303  // End of thread
304 
305  // Harrow pre emergence (15%)
306  case uk_ma_spring_harrow:
307  if (m_ev->m_lock || m_farm->DoIt_prob(0.15))
308  {
309  if (m_field->GetGreenBiomass() <= 0)
310  {
311  if (!m_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(19, 5) - g_date->DayInYear())) {
313  break;
314 
315  }
316  else SimpleEvent_(g_date->Date() + 1, uk_ma_spring_harrow, false, m_farm, m_field);
317  break;
318  }
319  }
321  break;
322 
323 
324  // harvest
325  case uk_ma_harvest:
326  // Here the MAIN thread continues
327  // We don't move harvest days
328  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(0, 0) - g_date->DayInYear())) {
330  break;
331  }
333  break;
334 
335  // staw chop:
337  if (m_field->GetMConstants(0) == 0) {
338  if (!m_farm->StrawChopping(m_field, 0.0, -1)) { // raise an error
339  g_msg->Warn(WARN_BUG, "UKMaize::Do(): failure in 'StrawChopping' execution", "");
340  exit(1);
341  }
342  }
343  else {
344  if (!m_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
346  break;
347  }
348  }
349  done = true;
350  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
351  // END of MAIN THREAD
352  break;
353  default:
354  g_msg->Warn(WARN_BUG, "UKMaize::Do(): "
355  "Unknown event type! ", "");
356  exit(1);
357  }
358  return done;
359 }

References LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FA_Slurry(), Farm::FP_AmmoniumSulphate(), Farm::FP_Slurry(), g_date, g_msg, LE::GetGreenBiomass(), LE::GetMConstants(), LE::GetMDates(), LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), Farm::GetType(), Calendar::GetYearNumber(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), Farm::PreseedingCultivator(), LE::SetMConstants(), LE::SetMDates(), Farm::ShallowHarrow(), Crop::SimpleEvent_(), Farm::SpringPlough(), Farm::SpringSow(), Farm::SpringSowWithFerti(), Farm::StrawChopping(), Farm::StubbleHarrowing(), tof_OptimisingFarm, tov_UKMaize, uk_ma_autumn_harrow, uk_ma_autumn_plough, uk_ma_ferti_p1, uk_ma_ferti_p2, uk_ma_ferti_s1, uk_ma_ferti_s2, uk_ma_harvest, uk_ma_herbicide1, uk_ma_preseeding_cultivator, uk_ma_spring_harrow, uk_ma_spring_plough, uk_ma_spring_sow, uk_ma_spring_sow_with_ferti, uk_ma_start, uk_ma_straw_chopping, MapErrorMsg::Warn(), WARN_BUG, and Farm::WinterPlough().

◆ SetUpFarmCategoryInformation()

void UKMaize::SetUpFarmCategoryInformation ( )
inline
60  {
61  const int elements = 2 + (uk_ma_foobar - UKMAIZE_BASE);
63  FarmManagementCategory catlist[elements] =
64  {
65  fmc_Others, // this needs to be at the zero line
66  fmc_Others,//uk_ma_start = 1, // Compulsory, start event must always be 1 (one).
67  fmc_Others,//uk_ma_sleep_all_day = UKMAIZE_BASE,
68  fmc_Cultivation,//uk_ma_autumn_harrow,
69  fmc_Cultivation,//uk_ma_autumn_plough,
70  fmc_Fertilizer,//uk_ma_ferti_s1, // Slurry
71  fmc_Fertilizer,//uk_ma_ferti_p1,
72  fmc_Cultivation,//uk_ma_spring_plough,
73  fmc_Cultivation,//uk_ma_preseeding_cultivator,
74  fmc_Others,//uk_ma_spring_sow, // SpringSow
75  fmc_Others, //uk_ma_spring_sow_with_ferti, // SpringSowWithFerti
76  fmc_Cultivation,//uk_ma_spring_harrow,
77  fmc_Fertilizer,//uk_ma_ferti_s2, // NPK if no ferti with sow
78  fmc_Fertilizer,//uk_ma_ferti_p2,
79  fmc_Herbicide,//uk_ma_herbicide1,
80  fmc_Harvest,//uk_ma_harvest,
81  fmc_Others,//uk_ma_straw_chopping,
82  };
83  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
84  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Herbicide, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, uk_ma_foobar, and UKMAIZE_BASE.

Referenced by UKMaize().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
uk_ma_herbicide1
Definition: UKMaize.h:38
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
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
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
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
UKMaize::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: UKMaize.h:60
uk_ma_ferti_s1
Definition: UKMaize.h:29
LE::GetMConstants
int GetMConstants(int a)
Definition: Elements.h:407
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
LE::GetPoly
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: Elements.h:238
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::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
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
uk_ma_spring_sow
Definition: UKMaize.h:33
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
uk_ma_spring_sow_with_ferti
Definition: UKMaize.h:34
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
uk_ma_spring_plough
Definition: UKMaize.h:31
uk_ma_ferti_s2
Definition: UKMaize.h:36
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
uk_ma_start
Definition: UKMaize.h:25
uk_ma_autumn_plough
Definition: UKMaize.h:28
Calendar::Date
long Date(void)
Definition: Calendar.h:57
Farm::FP_AmmoniumSulphate
virtual bool FP_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply Ammonium Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:882
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
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
uk_ma_ferti_p1
Definition: UKMaize.h:30
UKMAIZE_BASE
#define UKMAIZE_BASE
Definition: UKMaize.h:20
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
uk_ma_ferti_p2
Definition: UKMaize.h:37
tov_UKMaize
Definition: LandscapeFarmingEnums.h:280
uk_ma_foobar
Definition: UKMaize.h:41
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
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
uk_ma_autumn_harrow
Definition: UKMaize.h:27
LE::GetGreenBiomass
virtual double GetGreenBiomass(void)
Definition: Elements.h:160
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::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
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
uk_ma_straw_chopping
Definition: UKMaize.h:40
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
Farm::FA_AmmoniumSulphate
virtual bool FA_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply ammonium sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1081
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
uk_ma_preseeding_cultivator
Definition: UKMaize.h:32
Farm::WinterPlough
virtual bool WinterPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the winter on a_field.
Definition: FarmFuncs.cpp:395
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
uk_ma_harvest
Definition: UKMaize.h:39
uk_ma_spring_harrow
Definition: UKMaize.h:35
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
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
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523
Crop::SimpleEvent_
void SimpleEvent_(long a_date, int a_todo, bool a_lock, Farm *a_farm, LE *a_field)
Adds an event to this crop management without relying on member variables.
Definition: Farm.cpp:751