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

FR_SpringBarley class
. More...

#include <FR_SpringOats.h>

Inheritance diagram for FR_SpringOats:
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...
 
 FR_SpringOats (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...
 

Detailed Description

FR_SpringBarley class
.

See FR_SpringOats.h::FR_SpringOatsToDo for a complete list of all possible events triggered codes by the management plan. When triggered these events are handled by Farm and are available as information for other objects such as animal and bird models.

Constructor & Destructor Documentation

◆ FR_SpringOats()

FR_SpringOats::FR_SpringOats ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
95  : Crop(a_tov, a_toc, a_L)
96  {
97  // When we start it off, the first possible date for a farm operation is 1st October
98  // This information is used by other crops when they decide how much post processing of
99  // the management is allowed after harvest before the next crop starts.
100  m_first_date=g_date->DayInYear( 17,10 );
102  }

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

Member Function Documentation

◆ Do()

bool FR_SpringOats::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 a_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 winter wheat.

Reimplemented from Crop.

99 {
100  m_field = a_field; // this is needed because of possible calls to other methods and currently we do not pass parameters.
101  m_farm = a_farm; // this is needed because of possible calls to other methods and currently we do not pass parameters.
102  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
103  bool flag = false;
104  int d1 = 0;
105  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
106  switch (a_ev->m_todo)
107  {
108  case fr_so_start:
109  {
110  // This is just to hold a local variable in scope and prevent compiler errors
111  // ww_start just sets up all the starting conditions and reference dates that are needed to start a ww
112  // crop off
113 
114  a_field->ClearManagementActionSum();
115 
116  // Record whether skylark scrapes are present and adjust flag accordingly
118  a_field->m_skylarkscrapes = true;
119  }
120  else {
121  a_field->m_skylarkscrapes = false;
122  }
123  // Set up the date management stuff
124  // The next bit of code just allows for altering dates after harvest if it is necessary
125  // to allow for a crop which starts its management early.
126 
127  // 3 start and stop dates for all events after harvest for this crop
128  int noDates = 3;
129  a_field->SetMDates(0, 0, g_date->DayInYear(30, 8)); // last possible day of harvest
130  a_field->SetMDates(1, 0, g_date->DayInYear(3, 9)); // last possible day of straw chopping
131  a_field->SetMDates(0, 1, 0); // start day of hay bailing (not used as it depend on previous treatment)
132  a_field->SetMDates(1, 1, g_date->DayInYear(7, 9)); // end day of hay bailing
133  // Can be up to 10 of these. If the shortening code is triggered
134  // then these will be reduced in value to 0
135 
136  a_field->SetMConstants(0, 1);
137 
138  // Check the next crop for early start, unless it is a spring crop
139  // in which case we ASSUME that no checking is necessary!!!!
140  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
141 
142  //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)
143  int d1;
144  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
145 
146  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
147  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
148  {
149  g_msg->Warn(WARN_BUG, "FR_SpringOats::Do(): ", "Harvest too late for the next crop to start!!!");
150  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
151  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
152  }
153  // Now fix any late finishing problems
154  for (int i = 0; i < noDates; i++) {
155  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
156  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
157  }
158  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
159  a_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)
160  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
161  }
162  }
163  }
164  // Now no operations can be timed after the start of the next crop.
165 
166  if (!a_ev->m_first_year) {
167  // Are we before July 1st?
168  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
169  if (g_date->Date() < d1) {
170  // Yes, too early. We assumme this is because the last crop was late
171  printf("Poly: %d\n", a_field->GetPoly());
172  g_msg->Warn(WARN_BUG, "FR_SpringOats::Do(): ", "Crop start attempt between 1st Jan & 1st July");
173  int prev = a_field->GetLandscape()->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex()));
174  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
175  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
176  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
177  }
178  else {
179  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
180  if (g_date->Date() > d1) {
181  // Yes too late - should not happen - raise an error
182  g_msg->Warn(WARN_BUG, "FR_SpringOats::Do(): ", "Crop start attempt after last possible start date");
183  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
184  a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex());
185  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
186  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
187  }
188  }
189  }
190  else {
191  // Is the first year
192  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes (start woth the first event on the after winter time) - Date here is a suggestion (not stated in crop scheme!)
194  break;
195  }
196  }//if
197 
198  // End single block date checking code. Please see next line comment as well.
199  // Reinit d1 to first possible starting date.
200  // Reinit d1 to first possible starting date // calcium is only used every 4-5 (4 here) years
201  d1 = g_date->OldDays() + g_date->DayInYear(1, 8);
202  SimpleEvent(d1, fr_so_fertilizer, false);
203 
204  }
205  break;
206  // This is the first real farm operation
207  case fr_so_fertilizer:
208  if (a_ev->m_lock || a_farm->DoIt(10)) { //
209  if (!a_farm->FP_Manure(a_field, 0.0, g_date->DayInYear(17, 10) - g_date->DayInYear())) {
210  SimpleEvent(g_date->Date() + 1, fr_so_fertilizer, true);
211  break;
212  }
213  }
215  break;
216 
218  if (a_ev->m_lock || a_farm->DoIt_prob(.90)) {
219  if (!a_farm->StubbleCultivatorHeavy(a_field, 0.0, g_date->DayInYear(19, 10) - g_date->DayInYear())) {
221  break;
222  }
223  SimpleEvent(g_date->Date()+7, fr_so_manure, false);
224  break;
225  }
226  else
228  break;
230  if (!a_farm->StubblePlough(a_field, 0.0, g_date->DayInYear(19, 10) - g_date->DayInYear())) {
232  break;
233  }
234  SimpleEvent(g_date->Date() + 7, fr_so_manure, false);
235  break;
236 
237  case fr_so_manure:
238  if (a_farm->IsStockFarmer()) {//Stock Farmer
239  if (a_ev->m_lock || a_farm->DoIt(30)) { //
240  if (!a_farm->FP_Manure(a_field, 0.0, g_date->DayInYear(2, 11) - g_date->DayInYear())) {
241  SimpleEvent(g_date->Date() + 1, fr_so_manure, true);
242  break;
243  }
244  }
245  }
246  SimpleEvent(g_date->OldDays() + g_date->DayInYear(20, 1)+365, fr_so_s_mineral, false);
247  break;
248 
249  case fr_so_s_mineral:
250  if (a_ev->m_lock || a_farm->DoIt(20)) { //
251  if (!a_farm->FP_NPKS(a_field, 0.0, g_date->DayInYear(20, 2) - g_date->DayInYear())) {
252  SimpleEvent(g_date->Date() + 1, fr_so_s_mineral, true);
253  break;
254  }
255  }
256  SimpleEvent(g_date->Date() + 14, fr_so_spring_plough, false);
257  break;
258 
259  case fr_so_spring_plough:
260  if (a_ev->m_lock || a_farm->DoIt(20)) {
261  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(6, 3) - g_date->DayInYear())) {
263  break;
264  }
265  SimpleEvent(g_date->Date() + 14, fr_so_preseeding_sow, false);
266  break;
267  }
268  else SimpleEvent(g_date->Date(), fr_so_spring_harrow, false);
269  break;
270 
271  case fr_so_spring_harrow:
272  if (!a_farm->SpringHarrow(a_field, 0.0,
273  g_date->DayInYear(6, 3) - g_date->DayInYear())) {
275  break;
276  }
277  SimpleEvent(g_date->Date() + 14, fr_so_preseeding_sow, false);
278  break;
279 
281  if (a_ev->m_lock || a_farm->DoIt(90)) {
282  if (!a_farm->PreseedingCultivatorSow(m_field, 0.0, g_date->DayInYear(20, 3) - g_date->DayInYear())) {
284  break;
285  }
286  SimpleEvent(g_date->Date()+5, fr_so_harrow, false);
291  break;
292  }
293  else
294  SimpleEvent(g_date->Date(), fr_so_sow, false);
295  break;
296  case fr_so_sow:
297  if (!a_farm->SpringSow(a_field, 0.0,
298  g_date->DayInYear(20, 3) - g_date->DayInYear())) {
299  SimpleEvent(g_date->Date() + 1, fr_so_sow, true);
300  break;
301  }
302  SimpleEvent(g_date->Date() + 5, fr_so_harrow, false);
307  break;
308 
309  case fr_so_harrow:
310  if (a_ev->m_lock || a_farm->DoIt(20)) {
311  if (!a_farm->SpringHarrow(a_field, 0.0,
312  g_date->DayInYear(30, 3) - g_date->DayInYear())) {
313  SimpleEvent(g_date->Date() + 1, fr_so_harrow, true);
314  break;
315  }
316  }
317  break;
318 
319  case fr_so_herbicide:
320  if (a_ev->m_lock || a_farm->DoIt(80)) {
321  if (!a_farm->HerbicideTreat(a_field, 0.0,
322  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
323  SimpleEvent(g_date->Date() + 1, fr_so_herbicide, true);
324  break;
325  }
326  }
327  break;
328 
330  if (a_ev->m_lock || a_farm->DoIt(20)) {
331  if (!a_farm->GrowthRegulator(a_field, 0.0,
332  g_date->DayInYear(15, 5) - g_date->DayInYear())) {
334  break;
335  }
336  }
337  break;
338 
339  case fr_so_fungicide:
340  if (a_ev->m_lock || a_farm->DoIt(75)) {
341  if (!a_farm->FungicideTreat(a_field, 0.0,
342  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
343  SimpleEvent(g_date->Date() + 1, fr_so_fungicide, true);
344  break;
345  }
346  }
347  break;
348 
349  case fr_so_insecticide:
350  if (a_ev->m_lock || a_farm->DoIt(20)) {
351  // here we check whether we are using ERA pesticide or not
352  d1 = g_date->DayInYear(30, 6) - g_date->DayInYear();
353  if (!cfg_pest_oats_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
354  {
355  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
356  }
357  else {
359  }
360  if (!flag) {
362  break;
363  }
364  }
365  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 7), fr_so_harvest, false);
366  break;
367 
368  case fr_so_harvest:
369  // We don't move harvest days
370  if (!a_farm->Harvest(a_field, 0.0, a_field->GetMDates(0, 0) - g_date->DayInYear())) {
371  SimpleEvent(g_date->Date() + 1, fr_so_harvest, true);
372  break;
373  }
375  break;
377  if (a_field->GetMConstants(0) == 0) {
378  if (!a_farm->StrawChopping(a_field, 0.0, -1)) { // raise an error
379  g_msg->Warn(WARN_BUG, "FR_SpringOats::Do(): failure in 'StrawChopping' execution", "");
380  exit(1);
381  }
382  }
383  else {
384  if (!a_farm->StrawChopping(a_field, 0.0, a_field->GetMDates(1, 0) - g_date->DayInYear())) {
386  break;
387  }
388  }
390  break;
391  case fr_so_hay_bailing:
392  if (a_ev->m_lock || a_farm->DoIt_prob(.50)) {
393  if (a_field->GetMConstants(1) == 0) {
394  if (!a_farm->HayBailing(a_field, 0.0, -1)) { // raise an error
395  g_msg->Warn(WARN_BUG, "FR_SpringOats::Do(): failure in 'HayBailing' execution", "");
396  exit(1);
397  }
398  }
399  else {
400  if (!a_farm->HayBailing(a_field, 0.0, a_field->GetMDates(1, 1) - g_date->DayInYear())) {
401  SimpleEvent(g_date->Date() + 1, fr_so_hay_bailing, true);
402  break;
403  }
404  }
405  }
406  done = true;
407  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
408  // END OF MAIN THREAD
409  break;
410  default:
411  g_msg->Warn(WARN_BUG, "FR_SpringOats::Do(): "
412  "Unknown event type! ", "");
413  exit(1);
414  }
415  return done;
416 }

References cfg_FR_SpringOats_SkScrapes, cfg_pest_oats_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::DoIt_prob(), Farm::FP_Manure(), Farm::FP_NPKS(), fr_so_fertilizer, fr_so_fungicide, fr_so_growth_regulator, fr_so_harrow, fr_so_harvest, fr_so_hay_bailing, fr_so_herbicide, fr_so_insecticide, fr_so_manure, fr_so_preseeding_sow, fr_so_s_mineral, fr_so_sow, fr_so_spring_harrow, fr_so_spring_plough, fr_so_start, fr_so_straw_chopping, fr_so_stubble_cultivation, fr_so_stubble_plough, Farm::FungicideTreat(), g_date, g_msg, LE::GetMConstants(), LE::GetMDates(), LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), Farm::GetType(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, LE::m_skylarkscrapes, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::PreseedingCultivatorSow(), Farm::ProductApplication(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSow(), Farm::StrawChopping(), Farm::StubbleCultivatorHeavy(), Farm::StubblePlough(), tof_OptimisingFarm, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void FR_SpringOats::SetUpFarmCategoryInformation ( )
inline
103  {
104  const int elements = 2 + (fr_so_foobar - FR_SO_BASE);
106 
107  FarmManagementCategory catlist[elements] =
108  {
109  fmc_Others, // zero element unused but must be here
110  fmc_Others, //fr_so_start = 1, // Compulsory, must always be 1 (one).
111  fmc_Others, //fr_so_sleep_all_day = FR_SB_BASE,
112  fmc_Cultivation, //fr_so_stubble_cultivation,
113  fmc_Cultivation, //fr_so_stubble_plough,
114  fmc_Fertilizer, // fr_so_fertilizer,
115  fmc_Fertilizer, // fr_so_manure,
116  fmc_Fertilizer, //fr_so_s_mineral,
117  fmc_Cultivation, // fr_so_spring_harrow,
118  fmc_Cultivation, // fr_so_spring_plough,
119  fmc_Cultivation, //fr_so_preseeding_sow,
120  fmc_Others, //fr_so_sow,
121  fmc_Cultivation, // fr_so_harrow,
122  fmc_Herbicide, //fr_so_herbicide,
123  fmc_Fungicide, //fr_so_fungicide,
124  fmc_Insecticide, //fr_so_insecticide,
125  fmc_Others, //fr_so_growth_regulator,
126  fmc_Harvest, //fr_so_harvest,
127  fmc_Cutting, //fr_so_straw_chopping,
128  fmc_Others, //fr_so_hay_bailing,
129 
130 
131  // no foobar entry
132 
133  };
134  // Iterate over the catlist elements and copy them to vector
135  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
136 
137  }

References fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, FR_SO_BASE, fr_so_foobar, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FR_SpringOats().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
fr_so_stubble_cultivation
Definition: FR_SpringOats.h:62
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
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
fr_so_stubble_plough
Definition: FR_SpringOats.h:63
Farm::ProductApplication
virtual bool ProductApplication(LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp, bool a_isgranularpesticide=false, int a_orcharddrifttype=0)
Apply test pesticide to a_field.
Definition: FarmFuncs.cpp:2267
Farm::StubbleCultivatorHeavy
virtual bool StubbleCultivatorHeavy(LE *a_field, double a_user, int a_days)
Carry out a stubble cultivation event on a_field. This is non-inversion type of cultivation which can...
Definition: FarmFuncs.cpp:245
fr_so_harrow
Definition: FR_SpringOats.h:71
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
fr_so_manure
Definition: FR_SpringOats.h:65
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
cfg_FR_SpringOats_SkScrapes
CfgBool cfg_FR_SpringOats_SkScrapes("FR_CROP_SO_SK_SCRAPES", CFG_CUSTOM, false)
Farm::StubblePlough
virtual bool StubblePlough(LE *a_field, double a_user, int a_days)
Carry out a stubble ploughing event on a_field. This is similar to normal plough but shallow (normall...
Definition: FarmFuncs.cpp:232
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
fr_so_harvest
Definition: FR_SpringOats.h:76
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
FR_SO_BASE
#define FR_SO_BASE
Definition: FR_SpringOats.h:49
fr_so_fertilizer
Definition: FR_SpringOats.h:64
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
fr_so_insecticide
Definition: FR_SpringOats.h:74
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
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
fr_so_preseeding_sow
Definition: FR_SpringOats.h:69
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
fr_so_spring_plough
Definition: FR_SpringOats.h:68
CfgBool::value
bool value() const
Definition: Configurator.h:164
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
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
fr_so_hay_bailing
Definition: FR_SpringOats.h:78
fr_so_fungicide
Definition: FR_SpringOats.h:73
LE::m_skylarkscrapes
bool m_skylarkscrapes
For management testing of skylark scrapes.
Definition: Elements.h:95
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fr_so_growth_regulator
Definition: FR_SpringOats.h:75
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
Farm::HayBailing
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
Definition: FarmFuncs.cpp:1507
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
Farm::StrawChopping
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: FarmFuncs.cpp:1475
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
fr_so_spring_harrow
Definition: FR_SpringOats.h:67
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
fr_so_straw_chopping
Definition: FR_SpringOats.h:77
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
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
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
fr_so_herbicide
Definition: FR_SpringOats.h:72
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
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
cfg_pest_product_amounts
CfgArray_Double cfg_pest_product_amounts
Amount of pesticide applied in grams of active substance per hectare for each of the 10 pesticides.
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
fr_so_foobar
Definition: FR_SpringOats.h:79
fr_so_start
Definition: FR_SpringOats.h:60
fr_so_sow
Definition: FR_SpringOats.h:70
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
fr_so_s_mineral
Definition: FR_SpringOats.h:66
FR_SpringOats::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FR_SpringOats.h:103
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
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_pest_oats_on
CfgBool cfg_pest_oats_on
Turn on pesticides for spring oats.
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
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
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