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

SE_WinterRape_Seed class
. More...

#include <SE_WinterRape_Seed.h>

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

SE_WinterRape_Seed class
.

See SE_WinterRape_Seed.h::SE_WinterRape_SeedToDo for a complete list of all possible events triggered codes by the SE_WinterRape_Seed 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

◆ SE_WinterRape_Seed()

SE_WinterRape_Seed::SE_WinterRape_Seed ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
105  : Crop(a_tov, a_toc, a_L)
106  {
107  // When we start it off, the first possible date for a farm operation is 1st October
108  // This information is used by other crops when they decide how much post processing of
109  // the management is allowed after harvest before the next crop starts.
110  m_first_date = g_date->DayInYear(1, 12);
112  }

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

Member Function Documentation

◆ Do()

bool SE_WinterRape_Seed::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.

101 {
102  m_field = a_field; // this is needed because of possible calls to other methods and currently we do not pass parameters.
103  m_farm = a_farm; // this is needed because of possible calls to other methods and currently we do not pass parameters.
104  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
105 
106  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
107  switch (a_ev->m_todo)
108  {
109  case se_wrs_start:
110  {
111  // This is just to hold a local variable in scope and prevent compiler errors
112  // ww_start just sets up all the starting conditions and reference dates that are needed to start a ww
113  // crop off
114  SE_WRS_HERBICIDE = false;
117 
118  a_field->ClearManagementActionSum();
119 
120  // Record whether skylark scrapes are present and adjust flag accordingly
122  a_field->m_skylarkscrapes = true;
123  }
124  else {
125  a_field->m_skylarkscrapes = false;
126  }
127  // Set up the date management stuff
128  // The next bit of code just allows for altering dates after harvest if it is necessary
129  // to allow for a crop which starts its management early.
130 
131  // 3 start and stop dates for all events after harvest for this crop
132  int noDates = 1;
133  a_field->SetMDates(0, 0, g_date->DayInYear(25, 8)); // last possible day of harvest
134  a_field->SetMDates(1, 0, g_date->DayInYear(25, 8)); // last possible day of management after harvest
135  // Can be up to 10 of these. If the shortening code is triggered
136  // then these will be reduced in value to 0
137 
138  a_field->SetMConstants(0, 1);
139 
140  // Check the next crop for early start, unless it is a spring crop
141  // in which case we ASSUME that no checking is necessary!!!!
142  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
143 
144  //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)
145  int d1;
146  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
147 
148  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
149  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
150  {
151  g_msg->Warn(WARN_BUG, "SE_WinterRape_Seed::Do(): ", "Harvest too late for the next crop to start!!!");
152  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
153  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
154  }
155  // Now fix any late finishing problems
156  for (int i = 0; i < noDates; i++) {
157  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
158  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
159  }
160  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
161  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)
162  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
163  }
164  }
165  }
166  // Now no operations can be timed after the start of the next crop.
167 
168  if (!a_ev->m_first_year) {
169  // Are we before July 1st?
170  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
171  if (g_date->Date() < d1) {
172  // Yes, too early. We assumme this is because the last crop was late
173  printf("Poly: %d\n", a_field->GetPoly());
174  g_msg->Warn(WARN_BUG, "SE_WinterRape_Seed::Do(): ", "Crop start attempt between 1st Jan & 1st July");
175  int prev = a_field->GetLandscape()->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex()));
176  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
177  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
178  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
179  }
180  else {
181  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
182  if (g_date->Date() > d1) {
183  // Yes too late - should not happen - raise an error
184  g_msg->Warn(WARN_BUG, "SE_WinterRape_Seed::Do(): ", "Crop start attempt after last possible start date");
185  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
186  a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex());
187  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
188  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
189  }
190  }
191  }
192  else {
193  // Is the first year
194  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
195  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), se_wrs_npk, false);
196  break;
197  }
198  }//if
199 
200  // End single block date checking code. Please see next line comment as well.
201  // Reinit d1 to first possible starting date.
202  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
203  // OK, let's go.
204  // LKM: Here we queue up the first event - a fork with parallel events
205  SimpleEvent(d1, se_wrs_straw_removal, false);
206  }
207  break;
208  // This is the first real farm operation
210  if (a_ev->m_lock || a_farm->DoIt(25)) { // crop scheme says 10-40%
211  if (!a_farm->StrawRemoval(a_field, 0.0, g_date->DayInYear(9, 8) - g_date->DayInYear())) {
212  // If we don't suceed on the first try, then try and try again
214  break;
215  }
216  }
217  // Queue up the next event - in this case herbicide
219  break;
220  case se_wrs_herbicide1a:
221  if (a_ev->m_lock || a_farm->DoIt_prob(.50)) {
222  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(10, 8) - g_date->DayInYear())) {
223  // If we don't suceed on the first try, then try and try again
224  SimpleEvent(g_date->Date() + 1, se_wrs_herbicide1a, true);
225  break;
226  }
227  else {
228  //Rest of farmers herbicide later so we need to remember who already did it
229  SE_WRS_HERBICIDE = true;
230  }
231  }
232  // Queue up the next event - in this case stubble cultivator
234  break;
236  if (a_ev->m_lock || a_farm->DoIt(85)) { // crop scheme says 80-90%
237  if (!a_farm->StubbleCultivatorHeavy(a_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
239  break;
240  }
242  break;
243  }
244  else SimpleEvent(g_date->Date() + 2, se_wrs_autumn_plough, false);
245  break;
247  if (!a_farm->AutumnPlough(a_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
249  break;
250  }
251  SimpleEvent(g_date->Date() + 1, se_wrs_herbicide1b, false);
252  break;
254  if (!a_farm->StubbleCultivatorHeavy(a_field, 0.0, g_date->DayInYear(20, 8) - g_date->DayInYear())) {
256  break;
257  }
258  // Queue up the next event - in this case slurry
259  SimpleEvent(g_date->Date(), se_wrs_herbicide1b, false); // no dates in scheme
260  break;
261  case se_wrs_herbicide1b:
262  if (a_ev->m_lock || a_farm->DoIt_prob(.50 / .50) && (SE_WRS_HERBICIDE == false)) {
263  if (!a_farm->HerbicideTreat(a_field, 0.0,
264  g_date->DayInYear(20, 8) - g_date->DayInYear())) {
265  SimpleEvent(g_date->Date() + 1, se_wrs_herbicide1b, true);
266  break;
267  }
268  }
269  SimpleEvent(g_date->Date(), se_wrs_autumn_harrow, false); // seedbed preparation - no dates
270  break;
272  if (a_ev->m_lock || a_farm->DoIt(30)) { // crop scheme says 20-40%
273  if (!a_farm->ShallowHarrow(a_field, 0.0,
274  g_date->DayInYear(20, 8) - g_date->DayInYear())) {
276  break;
277  }
278  }
280  break;
281  case se_wrs_autumn_sow:
282  if (a_ev->m_lock || a_farm->DoIt(100)) {
283  if (!a_farm->AutumnSowWithFerti(a_field, 0.0,
284  g_date->DayInYear(20, 8) - g_date->DayInYear())) {
285  SimpleEvent(g_date->Date() + 1, se_wrs_autumn_sow, true);
286  break;
287  }
288  }
289  // LKM: Here is a fork leading to parallel events
290  SimpleEvent(g_date->Date()+1, se_wrs_insecticide1, false); // insecticide thread // no dates in scheme
291  SimpleEvent(g_date->OldDays() + g_date->DayInYear(8, 8), se_wrs_herbicide2, false); // herbicide thread // no dates in scheme
292  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 8), se_wrs_growth_regulator, false); // growth regulator thread - main thread // no dates in scheme
293  break;
294 
295  case se_wrs_insecticide1:
296  if (a_ev->m_lock || a_farm->DoIt_prob(0.30)) { // crop scheme says 10-50%
297  if (!a_farm->InsecticideTreat(a_field, 0.0,
298  g_date->DayInYear(30, 8) - g_date->DayInYear())) {
300  break;
301  }
302  }
303  else SimpleEvent(g_date->Date()+15, se_wrs_insecticide2, false);
304  break;
305  case se_wrs_insecticide2:
306  if (a_ev->m_lock || a_farm->DoIt_prob(.40/.70)) { // crop scheme says 30-50% - 40% of all = 57% of remaining 70%
307  if (!a_farm->InsecticideTreat(a_field, 0.0,
308  g_date->DayInYear(15, 9) - g_date->DayInYear())) {
310  break;
311  }
312  }
313  //LKM: insecticide thread
314  break;
315  case se_wrs_herbicide2:
316  if (a_ev->m_lock || a_farm->DoIt(65)) { // crop scheme says 50-80%
317  if (!a_farm->HerbicideTreat(a_field, 0.0,
318  g_date->DayInYear(30, 8) - g_date->DayInYear())) {
319  SimpleEvent(g_date->Date() + 1, se_wrs_herbicide2, true);
320  break;
321  }
322  }
323  SimpleEvent(g_date->Date() + 10, se_wrs_herbicide3, false);
324  break;
325  case se_wrs_herbicide3:
326  if (a_ev->m_lock || a_farm->DoIt(65)) { // crop scheme says 50-80%
327  if (!a_farm->HerbicideTreat(a_field, 0.0,
328  g_date->DayInYear(10, 9) - g_date->DayInYear())) {
329  SimpleEvent(g_date->Date() + 1, se_wrs_herbicide3, true);
330  break;
331  }
332  }
333  //LKM: herbicide thread
334  break;
336  if (a_ev->m_lock || a_farm->DoIt(12)) { // crop scheme says 10-15 %
337  if (!a_farm->GrowthRegulator(a_field, 0.0,
338  g_date->DayInYear(15, 9) - g_date->DayInYear())) {
340  break;
341  }
342  }
343  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4)+365, se_wrs_npk, false);
344  break;
345  case se_wrs_npk:
346  if (a_ev->m_lock || a_farm->DoIt(50)) {
347  if (!a_farm->FP_NPK(a_field, 0.0,
348  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
349  SimpleEvent(g_date->Date() + 1, se_wrs_npk, true);
350  break;
351  }
352  // Queue up the next events - fork of parallel events
353  SimpleEvent(g_date->OldDays() + g_date->DayInYear(30, 4), se_wrs_ns2, false);
355  break;
356  }
357  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4), se_wrs_ns1, false);
358  break;
359  case se_wrs_ns1:
360  if (!a_farm->FP_NS(a_field, 0.0,
361  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
362  SimpleEvent(g_date->Date() + 1, se_wrs_ns1, true);
363  break;
364  }
365  SimpleEvent(g_date->OldDays() + g_date->DayInYear(30, 4), se_wrs_ns2, false);
367  break;
368  case se_wrs_ns2:
369  if (a_ev->m_lock || a_farm->DoIt(80)) { // crop scheme says 60-100%
370  if (!a_farm->FP_NS(a_field, 0.0,
371  g_date->DayInYear(30, 5) - g_date->DayInYear())) {
372  SimpleEvent(g_date->Date() + 1, se_wrs_ns2, true);
373  break;
374  }
375  }
376  break;
377  case se_wrs_herbicide4:
378  if (a_ev->m_lock || a_farm->DoIt(25)) { // crop scheme says 20-30%
379  if (!a_farm->HerbicideTreat(a_field, 0.0,
380  g_date->DayInYear(30, 5) - g_date->DayInYear())) {
381  SimpleEvent(g_date->Date() + 1, se_wrs_herbicide4, true);
382  break;
383  }
384  }
386  break;
387  case se_wrs_insecticide3:
388  if (a_ev->m_lock || a_farm->DoIt(30)) { // crop scheme says 20-40% // no dates
389  if (!a_farm->InsecticideTreat(a_field, 0.0,
390  g_date->DayInYear(30, 6) - g_date->DayInYear())) {
392  break;
393  }
394  }
396  break;
397  case se_wrs_herbicide5:
398  if (a_ev->m_lock || a_farm->DoIt(7)) { // crop scheme says 5-10 %
399  if (!a_farm->HerbicideTreat(a_field, 0.0,
400  g_date->DayInYear(11, 8) - g_date->DayInYear())) {
401  SimpleEvent(g_date->Date() + 1, se_wrs_herbicide5, true);
402  break;
403  }
404  }
405  SimpleEvent(g_date->Date()+14, se_wrs_harvest, false); // no dates in scheme
406  break;
407  case se_wrs_harvest:
408  // We don't move harvest days
409  if (!a_farm->Harvest(a_field, 0.0, a_field->GetMDates(0, 0) - g_date->DayInYear())) {
410  SimpleEvent(g_date->Date() + 1, se_wrs_harvest, true);
411  break;
412  }
413  done = true;
414  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
415  // END OF MAIN THREAD
416  break;
417  default:
418  g_msg->Warn(WARN_BUG, "SE_WinterRape_Seed::Do(): "
419  "Unknown event type! ", "");
420  exit(1);
421  }
422  return done;
423 }

References Farm::AutumnPlough(), Farm::AutumnSowWithFerti(), cfg_SE_WinterRape_Seed_SkScrapes, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::DoIt_prob(), Farm::FP_NPK(), Farm::FP_NS(), g_date, g_msg, LE::GetMDates(), LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), Farm::GetType(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), 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(), se_wrs_autumn_harrow, se_wrs_autumn_plough, se_wrs_autumn_sow, SE_WRS_DECIDE_TO_FI, SE_WRS_DECIDE_TO_HERB, se_wrs_growth_regulator, se_wrs_harvest, SE_WRS_HERBICIDE, se_wrs_herbicide1a, se_wrs_herbicide1b, se_wrs_herbicide2, se_wrs_herbicide3, se_wrs_herbicide4, se_wrs_herbicide5, se_wrs_insecticide1, se_wrs_insecticide2, se_wrs_insecticide3, se_wrs_npk, se_wrs_ns1, se_wrs_ns2, se_wrs_start, se_wrs_straw_removal, se_wrs_stubble_cultivator1, se_wrs_stubble_cultivator2, LE::SetMConstants(), LE::SetMDates(), Farm::ShallowHarrow(), Crop::SimpleEvent(), Farm::StrawRemoval(), Farm::StubbleCultivatorHeavy(), tof_OptimisingFarm, CfgBool::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void SE_WinterRape_Seed::SetUpFarmCategoryInformation ( )
inline
113  {
114  const int elements = 2 + (se_wrs_foobar - SE_WRS_BASE);
116 
117  FarmManagementCategory catlist[elements] =
118  {
119  fmc_Others, // zero element unused but must be here
120  fmc_Others, // se_wrs_start = 1, // Compulsory, must always be 1 (one).
121  fmc_Others, // se_wrs_straw_removal = SE_WRS_BASE,
122  fmc_Herbicide, // se_wrs_herbicide1a,
123  fmc_Cultivation, // se_wrs_autumn_plough,
124  fmc_Cultivation, // se_wrs_stubble_cultivator1,
125  fmc_Cultivation, // se_wrs_stubble_cultivator2,
126  fmc_Herbicide, // se_wrs_herbicide1b,
127  fmc_Cultivation, // se_wrs_autumn_harrow,
128  fmc_Others, // se_wrs_autumn_sow,
129  fmc_Insecticide, // se_wrs_insecticide1,
130  fmc_Herbicide, // se_wrs_herbicide2,
131  fmc_Herbicide, // se_wrs_herbicide3,
132  fmc_Insecticide, // se_wrs_insecticide2,
133  fmc_Others, // se_wrs_growth_regulator,
134  fmc_Fertilizer, // se_wrs_npk,
135  fmc_Fertilizer, // se_wrs_ns1,
136  fmc_Fertilizer, // se_wrs_ns2,
137  fmc_Herbicide, // se_wrs_herbicide4,
138  fmc_Insecticide, // se_wrs_insecticide3,
139  fmc_Herbicide, // se_wrs_herbicide5,
140  fmc_Harvest // se_wrs_harvest,
141 
142 
143  // no foobar entry
144 
145  };
146  // Iterate over the catlist elements and copy them to vector
147  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
148 
149  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, SE_WRS_BASE, and se_wrs_foobar.

Referenced by SE_WinterRape_Seed().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
se_wrs_stubble_cultivator1
Definition: SE_WinterRape_Seed.h:72
SE_WRS_DECIDE_TO_FI
#define SE_WRS_DECIDE_TO_FI
Definition: SE_WinterRape_Seed.h:59
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
se_wrs_foobar
Definition: SE_WinterRape_Seed.h:89
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
se_wrs_harvest
Definition: SE_WinterRape_Seed.h:88
se_wrs_growth_regulator
Definition: SE_WinterRape_Seed.h:81
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
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
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::FP_NPK
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:645
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
se_wrs_start
Definition: SE_WinterRape_Seed.h:68
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
Farm::StrawRemoval
virtual bool StrawRemoval(LE *a_field, double a_user, int a_days)
Straw covering applied on a_field.
Definition: FarmFuncs.cpp:1752
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
se_wrs_ns1
Definition: SE_WinterRape_Seed.h:83
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
Farm::AutumnSowWithFerti
virtual bool AutumnSowWithFerti(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 autumn on a_field.
Definition: FarmFuncs.cpp:592
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
se_wrs_autumn_harrow
Definition: SE_WinterRape_Seed.h:75
se_wrs_insecticide1
Definition: SE_WinterRape_Seed.h:77
CfgBool::value
bool value() const
Definition: Configurator.h:164
se_wrs_herbicide5
Definition: SE_WinterRape_Seed.h:87
se_wrs_straw_removal
Definition: SE_WinterRape_Seed.h:69
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
SE_WinterRape_Seed::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: SE_WinterRape_Seed.h:113
SE_WRS_DECIDE_TO_HERB
#define SE_WRS_DECIDE_TO_HERB
Definition: SE_WinterRape_Seed.h:58
se_wrs_insecticide2
Definition: SE_WinterRape_Seed.h:80
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
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
se_wrs_herbicide1a
Definition: SE_WinterRape_Seed.h:70
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
se_wrs_stubble_cultivator2
Definition: SE_WinterRape_Seed.h:73
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
se_wrs_ns2
Definition: SE_WinterRape_Seed.h:84
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
Farm::FP_NS
virtual bool FP_NS(LE *a_field, double a_user, int a_days)
Apply NS fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:740
SE_WRS_BASE
#define SE_WRS_BASE
Definition: SE_WinterRape_Seed.h:53
se_wrs_herbicide3
Definition: SE_WinterRape_Seed.h:79
SE_WRS_HERBICIDE
#define SE_WRS_HERBICIDE
A flag used to indicate autumn ploughing status.
Definition: SE_WinterRape_Seed.h:57
se_wrs_npk
Definition: SE_WinterRape_Seed.h:82
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
se_wrs_autumn_plough
Definition: SE_WinterRape_Seed.h:71
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::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
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
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
se_wrs_herbicide1b
Definition: SE_WinterRape_Seed.h:74
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
se_wrs_autumn_sow
Definition: SE_WinterRape_Seed.h:76
se_wrs_herbicide2
Definition: SE_WinterRape_Seed.h:78
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
se_wrs_insecticide3
Definition: SE_WinterRape_Seed.h:86
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
cfg_SE_WinterRape_Seed_SkScrapes
CfgBool cfg_SE_WinterRape_Seed_SkScrapes("SE_CROP_WRS_SK_SCRAPES", CFG_CUSTOM, false)
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
se_wrs_herbicide4
Definition: SE_WinterRape_Seed.h:85
WARN_BUG
Definition: MapErrorMsg.h:34
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001