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

FR_Maize_Silage class
. More...

#include <FR_Maize_Silage.h>

Inheritance diagram for FR_Maize_Silage:
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_Maize_Silage (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_Maize_Silage class
.

See FR_Maize_Silage.h::FR_Maize_SilageToDo 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_Maize_Silage()

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

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

Member Function Documentation

◆ Do()

bool FR_Maize_Silage::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  m_ev = a_ev;
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 fr_ms_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  FR_MS_EVERY_4_YEAR = 0;
115 
116  a_field->ClearManagementActionSum();
117 
118  m_last_date = g_date->DayInYear(31, 10); // Should match the last flexdate below
119  //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
120  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
121  // Set up the date management stuff
122  // Start and stop dates for all events after harvest
123  flexdates[0][1] = g_date->DayInYear(31, 10); // last possible day harvest
124 
125  // Below if this is a spring crop use 365, otherwise first parameter is always 0, second parameter is fixed, and the third is the start up operation in the first year
126  int isSpring = 0;
127  if (StartUpCrop(isSpring, flexdates, int(fr_ms_spring_plough))) break;
128 
129  // End single block date checking code. Please see next line comment as well.
130  // Reinit d1 to first possible starting date.
131  // OK, let's go.
132  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
133  if (m_ev->m_forcespring) {
134  int day_num_shift = 365;
135  if (g_date->DayInYear() < 70) day_num_shift = 0;
136  d1 = g_date->OldDays() + g_date->DayInYear(1, 2) + day_num_shift;
137  SimpleEvent(d1, fr_ms_spring_plough, false);
138  }
139  else if ((FR_MS_EVERY_4_YEAR + g_date->GetYearNumber()) % 4 == 0)
140  {
141  d1 = g_date->OldDays() + g_date->DayInYear(8, 9);
142  SimpleEvent(d1, fr_ms_calcium, false);
143  }
144  else if ((FR_MS_EVERY_4_YEAR + g_date->GetYearNumber()) % 4 == 1)
145  {
146  d1 = g_date->OldDays() + g_date->DayInYear(8, 9);
147  SimpleEvent(d1, fr_ms_stubble_harrow, false);
148  }
149  else if ((FR_MS_EVERY_4_YEAR + g_date->GetYearNumber()) % 4 == 2)
150  {
151  d1 = g_date->OldDays() + g_date->DayInYear(8, 9);
152  SimpleEvent(d1, fr_ms_stubble_harrow, false);
153  }
154  else if ((FR_MS_EVERY_4_YEAR + g_date->GetYearNumber()) % 4 == 3)
155  {
156  d1 = g_date->OldDays() + g_date->DayInYear(8, 9);
157  SimpleEvent(d1, fr_ms_stubble_harrow, false);
158  }
159  else if ((FR_MS_EVERY_4_YEAR + g_date->GetYearNumber()) % 4 == 4)
160  {
161  d1 = g_date->OldDays() + g_date->DayInYear(8, 9);
162  SimpleEvent(d1, fr_ms_stubble_harrow, false);
163  }
164  break;
165 
166  }
167  break;
168  // This is the first real farm operation
169  case fr_ms_calcium:
170  if (a_ev->m_lock || a_farm->DoIt_prob(.30)) {
171  if (!a_farm->FP_Calcium(a_field, 0.0, g_date->DayInYear(14, 11) - g_date->DayInYear())) {
172  SimpleEvent(g_date->Date() + 1, fr_ms_calcium, true);
173  break;
174  }
175  }
177  break;
178 
180  if (a_ev->m_lock || a_farm->DoIt_prob(.80)) {
181  if (!a_farm->StubbleHarrowing(a_field, 0.0, g_date->DayInYear(14, 11) - g_date->DayInYear())) {
183  break;
184  }
185  SimpleEvent(g_date->OldDays() + g_date->DayInYear(31, 10), fr_ms_manure, false);
186  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 2) + 365, fr_ms_spring_plough, false);
187  break;
188  }
189  else
191  break;
193  if (!a_farm->StubblePlough(a_field, 0.0, g_date->DayInYear(14, 11) - g_date->DayInYear())) {
195  break;
196  }
197  SimpleEvent(g_date->OldDays() + g_date->DayInYear(31, 10), fr_ms_manure, false);
198  SimpleEvent(g_date->Date() + 7, fr_ms_harrow1, false);
199  break;
200  case fr_ms_harrow1:
201  if (!a_farm->AutumnHarrow(a_field, 0.0, g_date->DayInYear(21, 11) - g_date->DayInYear())) {
202  SimpleEvent(g_date->Date() + 1, fr_ms_harrow1, true);
203  break;
204  }
205  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 2) + 365, fr_ms_spring_plough, false);
206  break;
207  case fr_ms_manure:
208  if (a_ev->m_lock || a_farm->DoIt(65)) { //
209  if (!a_farm->FP_Manure (a_field, 0.0, g_date->DayInYear(15, 12) - g_date->DayInYear())) {
210  SimpleEvent(g_date->Date() + 1, fr_ms_manure, true);
211  break;
212  }
213  }
214  break;
215 
216  case fr_ms_spring_plough:
217  if (a_ev->m_lock || a_farm->DoIt(20)) { // suggestion - doesn't fit in crop scheme
218  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(31, 4) - g_date->DayInYear())) {
220  break;
221  }
222  d1 = g_date->Date();
223  if (d1 > g_date->OldDays() + g_date->DayInYear(1, 3)) {
225  break;
226  }
227  else {
228  SimpleEvent(g_date->Date() + 30, fr_ms_preseeding_sow, false);
229  break;
230  }
231  }
232  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3), fr_ms_spring_harrow, false);
233  break;
234  case fr_ms_spring_harrow:
235  if (!a_farm->SpringHarrow(a_field, 0.0,
236  g_date->DayInYear(15, 5) - g_date->DayInYear())) {
238  break;
239  }
240  d1 = g_date->Date();
241  if (d1 > g_date->OldDays() + g_date->DayInYear(15, 3)) {
243  break;
244  }
245  else {
246  SimpleEvent(g_date->Date() + 14, fr_ms_preseeding_sow, false);
247  break;
248  }
249 
251  if (!a_farm->PreseedingCultivatorSow(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
253  break;
254  }
255  SimpleEvent(g_date->Date(), fr_ms_npk, false);
256  break;
257  case fr_ms_npk:
258  if (a_ev->m_lock || a_farm->DoIt(90)) {
259  if (!a_farm->FP_NPK(a_field, 0.0,
260  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
261  SimpleEvent(g_date->Date() + 1, fr_ms_npk, true);
262  break;
263  }
264  }
265  SimpleEvent(g_date->Date()+7, fr_ms_harrow2, false);
266  SimpleEvent(g_date->Date() + 2, fr_ms_herbicide1, false);
267  SimpleEvent(g_date->Date() + 30, fr_ms_n1, false);
268  SimpleEvent(g_date->Date() + 30, fr_ms_npks, false);
269  SimpleEvent(g_date->Date() + 44 + m_date_modifier, fr_ms_insecticide, false); // main thread
270  break;
271 
272  case fr_ms_harrow2:
273  if (a_ev->m_lock || a_farm->DoIt(10)) {
274  if (!a_farm->SpringHarrow(a_field, 0.0,
275  g_date->DayInYear(7, 6) - g_date->DayInYear())) {
276  SimpleEvent(g_date->Date() + 1, fr_ms_harrow2, true);
277  break;
278  }
279  }
280  break;
281 
282  case fr_ms_herbicide1:
283  if (a_ev->m_lock || a_farm->DoIt(80)) {
284  if (!a_farm->HerbicideTreat(a_field, 0.0,
285  g_date->DayInYear(2, 6) - g_date->DayInYear())) {
286  SimpleEvent(g_date->Date() + 1, fr_ms_herbicide1, true);
287  break;
288  }
289  SimpleEvent(g_date->Date() + 28, fr_ms_herbicide2, false);
290  break;
291  }
292  break;
293 
294  case fr_ms_herbicide2:
295  if (a_ev->m_lock || a_farm->DoIt(30)) {
296  if (!a_farm->HerbicideTreat(a_field, 0.0,
297  g_date->DayInYear(16, 7) - g_date->DayInYear())) {
298  SimpleEvent(g_date->Date() + 1, fr_ms_herbicide2, true);
299  break;
300  }
301  }
302  break;
303 
304  case fr_ms_n1:
305  if (a_ev->m_lock || a_farm->DoIt(70)) {
306  if (!a_farm->FP_N(a_field, 0.0,
307  g_date->DayInYear(15, 7) - g_date->DayInYear())) {
308  SimpleEvent(g_date->Date() + 1, fr_ms_n1, true);
309  break;
310  }
311  SimpleEvent(g_date->Date() + 30, fr_ms_n2, false);
312  break;
313  }
314  break;
315 
316  case fr_ms_n2:
317  if (a_ev->m_lock || a_farm->DoIt(30)) {
318  if (!a_farm->FP_N(a_field, 0.0,
319  g_date->DayInYear(15, 8) - g_date->DayInYear())) {
320  SimpleEvent(g_date->Date() + 1, fr_ms_n2, true);
321  break;
322  }
323  }
324  break;
325 
326  case fr_ms_npks:
327  if (a_ev->m_lock || a_farm->DoIt(10)) {
328  if (!a_farm->FP_NPKS(a_field, 0.0,
329  g_date->DayInYear(15, 7) - g_date->DayInYear())) {
330  SimpleEvent(g_date->Date() + 1, fr_ms_npks, true);
331  break;
332  }
333  }
334  break;
335 
336  case fr_ms_insecticide:
337  if (a_ev->m_lock || a_farm->DoIt(70)) {
338  // here we check whether we are using ERA pesticide or not
339  d1 = g_date->DayInYear(31, 7) - g_date->DayInYear();
340  if (!cfg_pest_maize_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
341  {
342  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
343  }
344  else {
345  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
346  }
347  if (!flag) {
349  break;
350  }
351  SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 8), fr_ms_harvest, false);
352  break;
353  }
354  else SimpleEvent(g_date->Date(), fr_ms_insecticide_bio, false);
355  break;
356 
358  if (!a_farm->BiocideTreat(a_field, 0.0,
359  g_date->DayInYear(31, 7) - g_date->DayInYear())) {
361  break;
362  }
363  SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 8), fr_ms_harvest, false);
364  break;
365  case fr_ms_harvest:
366  // We don't move harvest days
367  if (!a_farm->Harvest(a_field, 0.0, a_field->GetMDates(1, 0) - g_date->DayInYear())) {
368  SimpleEvent(g_date->Date() + 1, fr_ms_harvest, true);
369  break;
370  }
371  done = true;
372  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
373  // END OF MAIN THREAD
374  break;
375  default:
376  g_msg->Warn(WARN_BUG, "FR_Maize_Silage::Do(): "
377  "Unknown event type! ", "");
378  exit(1);
379  }
380  if (done) m_ev->m_forcespring = true; // Here we need to force the next crop to spring operation, so set the ev->forcespring to true
381  return done;
382 }

References Farm::AutumnHarrow(), Farm::BiocideTreat(), cfg_pest_maize_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::DoIt_prob(), Farm::FP_Calcium(), Farm::FP_Manure(), Farm::FP_N(), Farm::FP_NPK(), Farm::FP_NPKS(), fr_ms_calcium, FR_MS_EVERY_4_YEAR, fr_ms_harrow1, fr_ms_harrow2, fr_ms_harvest, fr_ms_herbicide1, fr_ms_herbicide2, fr_ms_insecticide, fr_ms_insecticide_bio, fr_ms_manure, fr_ms_n1, fr_ms_n2, fr_ms_npk, fr_ms_npks, fr_ms_preseeding_sow, fr_ms_spring_harrow, fr_ms_spring_plough, fr_ms_start, fr_ms_stubble_harrow, fr_ms_stubble_plough, g_date, g_msg, LE::GetMDates(), Calendar::GetYearNumber(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::PreseedingCultivatorSow(), Farm::ProductApplication(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringHarrow(), Farm::SpringPlough(), Crop::StartUpCrop(), Farm::StubbleHarrowing(), Farm::StubblePlough(), CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void FR_Maize_Silage::SetUpFarmCategoryInformation ( )
inline
106  {
107  const int elements = 2 + (fr_ms_foobar - FR_MS_BASE);
109 
110  FarmManagementCategory catlist[elements] =
111  {
112  fmc_Others, // zero element unused but must be here
113  fmc_Others, //fr_ms_start = 1, // Compulsory, must always be 1 (one).
114  fmc_Others, //fr_ms_sleep_all_day = FR_MS_BASE,
115  fmc_Fertilizer, //fr_ms_calcium,
116  fmc_Fertilizer, //fr_ms_manure,
117  fmc_Cultivation, //fr_ms_stubble_harrow,
118  fmc_Cultivation, //fr_ms_stubble_plough,
119  fmc_Cultivation, //fr_ms_harrow1,
120  fmc_Cultivation, //fr_ms_spring_plough,
121  fmc_Cultivation, //fr_ms_spring_harrow,
122  fmc_Cultivation, //fr_ms_preseeding_sow,
123  fmc_Fertilizer, //fr_ms_npk,
124  fmc_Cultivation, //fr_ms_harrow2,
125  fmc_Herbicide, //fr_ms_herbicide1,
126  fmc_Herbicide, //fr_ms_herbicide2,
127  fmc_Insecticide, //fr_ms_insecticide,
128  fmc_Others, //fr_ms_insecticide_bio,
129  fmc_Fertilizer, // fr_ms_n1,
130  fmc_Fertilizer, // fr_ms_n2,
131  fmc_Fertilizer, // fr_ms_npks,
132  fmc_Harvest, //fr_ms_harvest,
133 
134 
135  // no foobar entry
136 
137  };
138  // Iterate over the catlist elements and copy them to vector
139  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
140 
141  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, FR_MS_BASE, fr_ms_foobar, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FR_Maize_Silage().


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
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
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
fr_ms_npk
Definition: FR_Maize_Silage.h:72
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
fr_ms_manure
Definition: FR_Maize_Silage.h:65
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::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
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
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
fr_ms_n1
Definition: FR_Maize_Silage.h:78
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
fr_ms_npks
Definition: FR_Maize_Silage.h:80
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
fr_ms_harrow2
Definition: FR_Maize_Silage.h:73
FR_Maize_Silage::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FR_Maize_Silage.h:106
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
FR_MS_BASE
#define FR_MS_BASE
Definition: FR_Maize_Silage.h:51
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
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.
fr_ms_insecticide
Definition: FR_Maize_Silage.h:76
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
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_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
fr_ms_insecticide_bio
Definition: FR_Maize_Silage.h:77
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
Farm::FP_N
virtual bool FP_N(LE *a_field, double a_user, int a_days)
Apply N fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:700
fr_ms_preseeding_sow
Definition: FR_Maize_Silage.h:71
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
FR_MS_EVERY_4_YEAR
#define FR_MS_EVERY_4_YEAR
Definition: FR_Maize_Silage.h:49
fr_ms_harvest
Definition: FR_Maize_Silage.h:81
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
fr_ms_spring_plough
Definition: FR_Maize_Silage.h:69
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
Farm::FP_Calcium
virtual bool FP_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:954
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
fr_ms_herbicide1
Definition: FR_Maize_Silage.h:74
fr_ms_foobar
Definition: FR_Maize_Silage.h:82
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
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
cfg_pest_maize_on
CfgBool cfg_pest_maize_on
Turn on pesticides for maize.
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
fr_ms_start
Definition: FR_Maize_Silage.h:62
fr_ms_harrow1
Definition: FR_Maize_Silage.h:68
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Farm::AutumnHarrow
virtual bool AutumnHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the autumn on a_field.
Definition: FarmFuncs.cpp:285
fr_ms_stubble_harrow
Definition: FR_Maize_Silage.h:66
Crop::m_date_modifier
static int m_date_modifier
Holds a value that shifts test pesticide use by this many days in crops modified to use it.
Definition: Farm.h:514
fr_ms_calcium
Definition: FR_Maize_Silage.h:64
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
fr_ms_n2
Definition: FR_Maize_Silage.h:79
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
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
fr_ms_stubble_plough
Definition: FR_Maize_Silage.h:67
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
fr_ms_herbicide2
Definition: FR_Maize_Silage.h:75
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
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
fr_ms_spring_harrow
Definition: FR_Maize_Silage.h:70