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

DE_GrasslandSilageAnnual class
. More...

#include <DE_GrasslandSilageAnnual.h>

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

DE_GrasslandSilageAnnual class
.

See DE_GrasslandSilageAnnual.h::DEGrasslandSilageAnnualToDo for a complete list of all possible events triggered codes by the grassland silage annual 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

◆ DE_GrasslandSilageAnnual()

DE_GrasslandSilageAnnual::DE_GrasslandSilageAnnual ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
110  : Crop(a_tov, a_toc, a_L)
111  {
112  // When we start it off, the first possible date for a farm operation is 1st October
113  // This information is used by other crops when they decide how much post processing of
114  // the management is allowed after harvest before the next crop starts.
115  m_first_date=g_date->DayInYear( 31,10 );
116  m_forcespringpossible = true;
118  }

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

Member Function Documentation

◆ Do()

bool DE_GrasslandSilageAnnual::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 grassland silage annual.

Reimplemented from Crop.

88 {
89  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
90  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
91  m_field = a_field;
92  m_ev = a_ev;
93  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
94  int d1 = 0;
95  TTypesOfVegetation l_tov = tov_DEGrasslandSilageAnnual; // The current type - change to match the crop you have
96 /**********************************************To Here *************************************************************************/
97 
98  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
99  switch (m_ev->m_todo)
100  {
101  case de_gsa_start:
102  {
103  DE_GSA_STUBBLE_PLOUGH = false;
104  DE_GSA_WINTER_PLOUGH = false;
106  DE_GSA_HERBICIDE1 = false;
107  DE_GSA_HERBI_DATE = 0;
108 
110 
111  m_last_date = g_date->DayInYear(10, 8); // Should match the last flexdate below
112  //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
113  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
114  // Set up the date management stuff
115  // Start and stop dates for all events after harvest
116  flexdates[0][1] = g_date->DayInYear(10, 8); // last possible day of cut to silage2 - this is in effect day before the earliest date that a following crop can use
117 
118  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
119  flexdates[1][1] = g_date->DayInYear(10, 8); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
120 
121  // Below if this is a spring crop use 365, otherwise set this to 0, second parameter is fixed, and the third is the start up operation in the first year
122  int isSpring = 0;
123  if (StartUpCrop(isSpring, flexdates, int(de_gsa_spring_sow))) break;
124 
125  // End single block date checking code. Please see next line comment as well.
126  // Reinit d1 to first possible starting date.
127  d1 = g_date->OldDays() + g_date->DayInYear(31, 10) + isSpring;
128  // OK, let's go.
129  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
130  if (m_ev->m_forcespring) {
131  int day_num_shift = 365;
132  if (g_date->DayInYear() < 70) day_num_shift = 0;
133  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + day_num_shift, de_gsa_spring_harrow, false);
134  break;
135  }
136  else SimpleEvent(d1, de_gsa_herbicide0, false);
137  break;
138  }
139  break;
140 
141  // This is the first real farm operation
142  case de_gsa_herbicide0:
143  if (m_ev->m_lock || m_farm->DoIt(20))
144  {
145  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
147  break;
148  }
149  }
150  if (m_farm->IsStockFarmer()) //Stock Farmer
151  {
153  }
154  else SimpleEvent_(g_date->Date() + 14, de_gsa_ferti_p1, false, m_farm, m_field);
155  break;
156  case de_gsa_ferti_p1:
157  if (m_ev->m_lock || m_farm->DoIt(40))
158  {
159  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
160  // If we don't suceed on the first try, then try and try again (until 20/8 when we will suceed)
162  break;
163  }
164  }
166  break;
167  case de_gsa_ferti_s1:
168  if (m_ev->m_lock || m_farm->DoIt(40))
169  {
170  if (!m_farm->FA_Slurry(m_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
172  break;
173  }
174  }
175  // Queue up the next event -in this case stubble ploughing
177  break;
179  // 30% will do stubble plough, but rest will get away with non-inversion cultivation
180  if (m_ev->m_lock || m_farm->DoIt(30))
181  {
182  if (!m_farm->StubblePlough(m_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
184  break;
185  }
186  else
187  {
188  // 30% of farmers will do this, but the other 70% won't so we need to remember whether we are in one or the other group
189  DE_GSA_STUBBLE_PLOUGH = true;
190  // Queue up the next event
192  break;
193  }
194  }
196  break;
197  case de_gsa_autumn_harrow1:
198  // all farmers who did stubble plough (30%)
199  if (!m_farm->AutumnHarrow(m_field, 0.0, g_date->DayInYear(5, 11) - g_date->DayInYear())) {
201  break;
202  }
204  break;
206  // 70% of the 30% who did stubble plough = 21% of all farmers
207  if (m_ev->m_lock || m_farm->DoIt(70))
208  {
209  if (!m_farm->AutumnHarrow(m_field, 0.0, g_date->Date() + 7 - g_date->DayInYear())) {
211  break;
212  }
213  }
214  d1 = g_date->Date() + 1;
215  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 11)) {
216  d1 = g_date->OldDays() + g_date->DayInYear(10, 11);
217  }
218  if (m_farm->IsStockFarmer()) //Stock Farmer
219  {
221  }
222  else SimpleEvent_(d1, de_gsa_ferti_p2, false, m_farm, m_field);
223  break;
225  if (!m_farm->StubbleHarrowing(m_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
227  break;
228  }
229  d1 = g_date->Date() + 1;
230  if (d1 < g_date->OldDays() + g_date->DayInYear(10, 11)) {
231  d1 = g_date->OldDays() + g_date->DayInYear(10, 11);
232  }
233  if (m_farm->IsStockFarmer()) //Stock Farmer
234  {
236  }
237  else SimpleEvent_(d1, de_gsa_ferti_p2, false, m_farm, m_field);
238  break;
239  case de_gsa_ferti_p2:
240  if (m_ev->m_lock || m_farm->DoIt(50))
241  {
242  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
244  break;
245  }
246  }
248  break;
249  case de_gsa_ferti_s2:
250  if (m_ev->m_lock || m_farm->DoIt(50))
251  {
252  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
254  break;
255  }
256  }
258  break;
260  // 60% will do winter plough, but rest will get away with non-inversion cultivation
261  if (m_ev->m_lock || m_farm->DoIt(60))
262  {
263  if (!m_farm->WinterPlough(m_field, 0.0, g_date->DayInYear(15, 11) - g_date->DayInYear())) {
265  break;
266  }
267  else
268  {
269  // 60% of farmers will do this, but the other 40% won't so we need to remember whether we are in one or the other group
270  DE_GSA_WINTER_PLOUGH = true;
271  // Queue up the next event
273  break;
274  }
275  }
277  break;
279  // the rest 40% who did not plough do heavy stubble cultivation
282  break;
283  }
285  break;
287  if ((m_ev->m_lock) || m_farm->DoIt(90))
288  {
289  if (!m_farm->SpringHarrow(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
291  break;
292  }
293  }
294  if (m_farm->IsStockFarmer()) //Stock Farmer
295  {
297  }
299  break;
300  case de_gsa_ferti_p3:
301  if (m_ev->m_lock || m_farm->DoIt(80))
302  {
303  if (!m_farm->FP_PK(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
305  break;
306  }
307  DE_GSA_SPRING_FERTI = true;
308  }
310  break;
311  case de_gsa_ferti_s3:
312  if (m_ev->m_lock || m_farm->DoIt(80))
313  {
314  if (!m_farm->FA_PK(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
316  break;
317  }
319  }
321  break;
323  if (DE_GSA_SPRING_FERTI == 1)
324  {
327  break;
328  }
329  }
330  d1 = g_date->Date() + 3;
331  if (d1 < g_date->OldDays() + g_date->DayInYear(20, 4)) {
332  d1 = g_date->OldDays() + g_date->DayInYear(20, 4);
333  }
335  break;
336  case de_gsa_herbicide1:
337  // Together 20% of farmers will do glyphosate spraying, but 15% before sow and the rest before emergence
338  if (m_ev->m_lock || m_farm->DoIt(10))
339  {
340  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
342  break;
343  }
344  DE_GSA_HERBICIDE1 = true;
345  }
347  break;
349  if (m_ev->m_lock || m_farm->DoIt(98))
350  {
353  break;
354  }
355  }
357  break;
358  case de_gsa_spring_sow:
359  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(5, 5) - g_date->DayInYear())) {
361  break;
362  }
363  // Here is a fork leading to four parallel events
364  SimpleEvent_(g_date->Date() + 3, de_gsa_herbicide2, false, m_farm, m_field); // Herbidide thread
365  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(20, 5), de_gsa_cut_to_silage1, false, m_farm, m_field); // Cutting thread
366  break;
367  case de_gsa_herbicide2:
368  // Here comes the herbicide thread
369  // Check biomass
370  if (m_field->GetGreenBiomass() <= 0)
371  {
372  // The rest 10% of farmers do glyphosate spraying before emergence
373  if ((m_ev->m_lock || (m_farm->DoIt(static_cast<int>((10.0 / 90.0) * 100))) && (DE_GSA_HERBICIDE1 == false)))
374  {
375  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
377  break;
378  }
380  }
381  }
382  // End of thread
383  break;
385  // Here comes cutting thread
386  if (DE_GSA_HERBI_DATE >= g_date->Date() - 2) { // Should by at least 3 days after herbicide
388  }
389  else
390  {
391  if (!m_farm->CutToSilage(m_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
393  break;
394  }
395  }
397  break;
399  if (DE_GSA_HERBI_DATE >= g_date->Date() - 2) { // Should by at least 3 days after herbicide
401  }
402  else
403  {
404  if (m_ev->m_lock || m_farm->DoIt(73))
405  {
406  if (!m_farm->CutToSilage(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
408  break;
409  }
410  }
411  }
412  done = true;
413  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
414  // END of MAIN THREAD
415  break;
416  default:
417  g_msg->Warn(WARN_BUG, "DE_GrasslandSilageAnnual::Do(): "
418  "Unknown event type! ", "");
419  exit(1);
420  }
421  return done;
422 }

References Farm::AutumnHarrow(), LE::ClearManagementActionSum(), Farm::CutToSilage(), Calendar::Date(), Calendar::DayInYear(), de_gsa_autumn_harrow1, de_gsa_autumn_harrow2, de_gsa_cut_to_silage1, de_gsa_cut_to_silage2, de_gsa_ferti_p1, de_gsa_ferti_p2, de_gsa_ferti_p3, de_gsa_ferti_s1, de_gsa_ferti_s2, de_gsa_ferti_s3, de_gsa_heavy_cultivator, DE_GSA_HERBI_DATE, de_gsa_herbicide0, DE_GSA_HERBICIDE1, de_gsa_herbicide1, de_gsa_herbicide2, de_gsa_preseeding_cultivator, DE_GSA_SPRING_FERTI, de_gsa_spring_harrow, de_gsa_spring_sow, de_gsa_start, de_gsa_stubble_harrow, DE_GSA_STUBBLE_PLOUGH, de_gsa_stubble_plough, DE_GSA_WINTER_PLOUGH, de_gsa_winter_plough, de_gsa_winter_stubble_cultivator_heavy, Farm::DoIt(), Farm::FA_NPK(), Farm::FA_PK(), Farm::FA_Slurry(), Farm::FP_NPK(), Farm::FP_PK(), Farm::FP_Slurry(), g_date, g_msg, LE::GetGreenBiomass(), LE::GetMDates(), Farm::HeavyCultivatorAggregate(), Farm::HerbicideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), Farm::PreseedingCultivator(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringHarrow(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StubbleCultivatorHeavy(), Farm::StubbleHarrowing(), Farm::StubblePlough(), tov_DEGrasslandSilageAnnual, MapErrorMsg::Warn(), WARN_BUG, and Farm::WinterPlough().

◆ SetUpFarmCategoryInformation()

void DE_GrasslandSilageAnnual::SetUpFarmCategoryInformation ( )
inline
119  {
120  const int elements = 2 + (de_gsa_foobar - DE_GSA_BASE);
122 
123  FarmManagementCategory catlist[elements] =
124  {
125  fmc_Others, // zero element unused but must be here
126  // ALL THE NECESSARY ENTRIES HERE
127  fmc_Others, // de_gsa_start = 1, // Compulsory, must always be 1 (one).
128  fmc_Others, // de_gsa_sleep_all_day,
129  fmc_Herbicide, // de_gsa_herbicide0,
130  fmc_Fertilizer, // de_gsa_ferti_p1,
131  fmc_Fertilizer, // de_gsa_ferti_s1,
132  fmc_Cultivation, // de_gsa_stubble_plough,
133  fmc_Cultivation, // de_gsa_autumn_harrow1,
134  fmc_Cultivation, // de_gsa_autumn_harrow2,
135  fmc_Cultivation, // de_gsa_stubble_harrow,
136  fmc_Fertilizer, // de_gsa_ferti_p2,
137  fmc_Fertilizer, // de_gsa_ferti_s2,
138  fmc_Cultivation, // de_gsa_winter_plough,
139  fmc_Cultivation, // de_gsa_winter_stubble_cultivator_heavy,
140  fmc_Cultivation, // de_gsa_spring_harrow,
141  fmc_Fertilizer, // de_gsa_ferti_p3,
142  fmc_Fertilizer, // de_gsa_ferti_s3,
143  fmc_Cultivation, // de_gsa_heavy_cultivator,
144  fmc_Herbicide, // de_gsa_herbicide1,
145  fmc_Cultivation, // de_gsa_preseeding_cultivator,
146  fmc_Cultivation, // de_gsa_spring_sow,
147  fmc_Herbicide, // de_gsa_herbicide2,
148  fmc_Cutting, // de_gsa_cut_to_silage1,
149  fmc_Cutting, // de_gsa_cut_to_silage2,
150  // no foobar entry
151 
152  };
153  // Iterate over the catlist elements and copy them to vector
154  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
155 
156  }

References DE_GSA_BASE, de_gsa_foobar, fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Herbicide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DE_GrasslandSilageAnnual().


The documentation for this class was generated from the following files:
de_gsa_autumn_harrow1
Definition: DE_GrasslandSilageAnnual.h:77
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
de_gsa_herbicide1
Definition: DE_GrasslandSilageAnnual.h:88
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
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
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
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
de_gsa_heavy_cultivator
Definition: DE_GrasslandSilageAnnual.h:87
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
de_gsa_winter_plough
Definition: DE_GrasslandSilageAnnual.h:82
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::CutToSilage
virtual bool CutToSilage(LE *a_field, double a_user, int a_days)
Cut vegetation for silage on a_field.
Definition: FarmFuncs.cpp:1644
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
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
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
DE_GSA_SPRING_FERTI
#define DE_GSA_SPRING_FERTI
Definition: DE_GrasslandSilageAnnual.h:59
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
DE_GSA_STUBBLE_PLOUGH
#define DE_GSA_STUBBLE_PLOUGH
Flags.
Definition: DE_GrasslandSilageAnnual.h:57
de_gsa_stubble_plough
Definition: DE_GrasslandSilageAnnual.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
de_gsa_ferti_s2
Definition: DE_GrasslandSilageAnnual.h:81
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
de_gsa_cut_to_silage2
Definition: DE_GrasslandSilageAnnual.h:93
tov_DEGrasslandSilageAnnual
Definition: LandscapeFarmingEnums.h:474
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Farm::FA_NPK
virtual bool FA_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:982
de_gsa_cut_to_silage1
Definition: DE_GrasslandSilageAnnual.h:92
Farm::FP_PK
virtual bool FP_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:673
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
DE_GSA_HERBI_DATE
#define DE_GSA_HERBI_DATE
Definition: DE_GrasslandSilageAnnual.h:61
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
de_gsa_herbicide0
Definition: DE_GrasslandSilageAnnual.h:73
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
de_gsa_ferti_p3
Definition: DE_GrasslandSilageAnnual.h:85
de_gsa_preseeding_cultivator
Definition: DE_GrasslandSilageAnnual.h:89
de_gsa_ferti_s1
Definition: DE_GrasslandSilageAnnual.h:75
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
de_gsa_spring_harrow
Definition: DE_GrasslandSilageAnnual.h:84
de_gsa_herbicide2
Definition: DE_GrasslandSilageAnnual.h:91
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
de_gsa_ferti_s3
Definition: DE_GrasslandSilageAnnual.h:86
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
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
de_gsa_start
Definition: DE_GrasslandSilageAnnual.h:71
de_gsa_stubble_harrow
Definition: DE_GrasslandSilageAnnual.h:79
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
de_gsa_ferti_p1
Definition: DE_GrasslandSilageAnnual.h:74
LE::GetGreenBiomass
virtual double GetGreenBiomass(void)
Definition: Elements.h:160
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
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
DE_GrasslandSilageAnnual::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DE_GrasslandSilageAnnual.h:119
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
de_gsa_spring_sow
Definition: DE_GrasslandSilageAnnual.h:90
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
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
de_gsa_winter_stubble_cultivator_heavy
Definition: DE_GrasslandSilageAnnual.h:83
de_gsa_foobar
Definition: DE_GrasslandSilageAnnual.h:94
DE_GSA_WINTER_PLOUGH
#define DE_GSA_WINTER_PLOUGH
Definition: DE_GrasslandSilageAnnual.h:58
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
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
de_gsa_autumn_harrow2
Definition: DE_GrasslandSilageAnnual.h:78
DE_GSA_BASE
#define DE_GSA_BASE
Definition: DE_GrasslandSilageAnnual.h:53
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Farm::FA_PK
virtual bool FA_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1010
DE_GSA_HERBICIDE1
#define DE_GSA_HERBICIDE1
Definition: DE_GrasslandSilageAnnual.h:60
Crop::m_forcespringpossible
bool m_forcespringpossible
Used to signal that the crop can be forced to start in spring.
Definition: Farm.h:508
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
Farm::HeavyCultivatorAggregate
virtual bool HeavyCultivatorAggregate(LE *a_field, double a_user, int a_days)
Carry out a heavy cultivation event on a_field. This is non-inversion type of cultivation which can b...
Definition: FarmFuncs.cpp:259
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
Farm::SpringHarrow
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: FarmFuncs.cpp:459
de_gsa_ferti_p2
Definition: DE_GrasslandSilageAnnual.h:80
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