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

NLGrassGrazedLast class
. More...

#include <NLGrassGrazedLast.h>

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

NLGrassGrazedLast class
.

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

◆ NLGrassGrazedLast()

NLGrassGrazedLast::NLGrassGrazedLast ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
89  : Crop(a_tov, a_toc, a_L)
90  {
91  // When we start it off, the first possible date for a farm operation is 5th November
92  // This information is used by other crops when they decide how much post processing of
93  // the management is allowed after harvest before the next crop starts.
94  m_first_date=g_date->DayInYear( 30,3 );
96  }

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

Member Function Documentation

◆ Do()

bool NLGrassGrazedLast::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 TemporalGrassGrazedLast.

Reimplemented from Crop.

55 {
56  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
57  m_farm = a_farm;
58  m_field = a_field;
59  m_ev = a_ev;
60  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true, m_farm, m_field).
61  bool flag = false;
62  int d1 = 0;
63  int noDates = 1;
65  int l_nextcropstartdate;
66  /**********************************************To Here *************************************************************************/
67 
68  // Depending what event has occured jump to the correct bit of code
69  switch (m_ev->m_todo)
70  {
71  case nl_ggl_start:
72  {
74  NL_GGL_CUT_DATE = 0;
77 
78  m_last_date = g_date->DayInYear(1, 12); // Should match the last flexdate below
79  //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
80  std::vector<std::vector<int>> flexdates(2 + 1, std::vector<int>(2, 0));
81  // Set up the date management stuff
82  // Start and stop dates for all events after harvest
83  flexdates[0][1] = g_date->DayInYear(10, 10); // first possible day of finishing harvest - this is in effect day before the earliest date that a following crop can use
84 
85  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
86  flexdates[1][1] = g_date->DayInYear(31, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
87  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 2 (start op 2)
88  flexdates[2][1] = g_date->DayInYear(1, 12); // This date will be moved back as far as necessary and potentially to flexdates 2 (end op 2
89 
90  // 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
91  int isSpring = 365;
92  if (StartUpCrop(isSpring, flexdates, int(nl_ggl_cut_to_silage1))) break;
93 
94  // End single block date checking code. Please see next line comment as well.
95  // Reinit d1 to first possible starting date.
96  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + isSpring;
97  // OK, let's go.
98  if (m_farm->IsStockFarmer()) //Stock Farmer
99  {
101  }
102  else SimpleEvent_(d1, nl_ggl_ferti_p1, false, m_farm, m_field);
103  break;
104  }
105  break;
106 
107  // This is the first real farm operation
108  case nl_ggl_ferti_p1:
109  if (m_farm->DoIt_prob(0.90)) {
110  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
112  break;
113  }
114  }
115  if (m_farm->DoIt_prob(0.50)) {
117  }
119  break;
120  case nl_ggl_ferti_s1:
121  if (m_farm->DoIt_prob(0.90)) {
122  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
124  break;
125  }
126  }
127  if (m_farm->DoIt_prob(0.50)) {
129  }
131  break;
133  // At least 7 days from last watering and 21 from last application of fertilizer.
134  if (g_date->Date() < NL_GGL_WATER_DATE + 7) {
136  break;
137  }
138  else
139  {
140  if (!m_farm->CutToSilage(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
142  break;
143  }
145  if (m_farm->IsStockFarmer()) //Stock Farmer
146  {
148  }
149  else SimpleEvent_(g_date->Date() + 1, nl_ggl_ferti_p2, false, m_farm, m_field);
150  // Start water thread
152  break;
153  }
154  break;
155 
156  case nl_ggl_ferti_s2:
157  if (!m_farm->FA_Slurry(m_field, 0.0, (NL_GGL_CUT_DATE + 4) - g_date->DayInYear())) {
159  break;
160  }
162  break;
163  case nl_ggl_ferti_p2:
164  if (!m_farm->FP_Slurry(m_field, 0.0, (NL_GGL_CUT_DATE + 4) - g_date->DayInYear())) {
166  break;
167  }
169  break;
170  case nl_ggl_ferti_s3:
171  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
172  {
173  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
175  break;
176  }
177  }
179  break;
180  case nl_ggl_ferti_p3:
181  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
182  {
183  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
185  break;
186  }
187  }
189  break;
191  // At least 7 days from last watering and 21 from last application of fertilizer.
192  if (g_date->Date() < NL_GGL_WATER_DATE + 7) {
194  break;
195  }
196  else
197  {
198  if (!m_farm->CutToSilage(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
200  break;
201  }
203  if (m_farm->IsStockFarmer()) //Stock Farmer
204  {
206  }
207  else SimpleEvent_(g_date->Date() + 1, nl_ggl_ferti_p4, false, m_farm, m_field);
208  break;
209  }
210  break;
211  case nl_ggl_ferti_s4:
212  if (!m_farm->FA_Slurry(m_field, 0.0, (NL_GGL_CUT_DATE + 4) - g_date->DayInYear())) {
214  break;
215  }
217  break;
218  case nl_ggl_ferti_p4:
219  if (!m_farm->FP_Slurry(m_field, 0.0, (NL_GGL_CUT_DATE + 4) - g_date->DayInYear())) {
221  break;
222  }
224  break;
225  case nl_ggl_ferti_s5:
226  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
227  {
228  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
230  break;
231  }
232  }
234  break;
235  case nl_ggl_ferti_p5:
236  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
237  {
238  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
240  break;
241  }
242  }
244  break;
246  // At least 7 days from last watering and 21 from last application of fertilizer.
247  if (g_date->Date() < NL_GGL_WATER_DATE + 7) {
249  break;
250  }
251  else
252  {
253  if (!m_farm->CutToSilage(m_field, 0.0, g_date->DayInYear(25, 7) - g_date->DayInYear())) {
255  break;
256  }
258  if (m_farm->IsStockFarmer()) //Stock Farmer
259  {
261  }
262  else SimpleEvent_(g_date->Date() + 1, nl_ggl_ferti_p6, false, m_farm, m_field);
263  break;
264  }
265  break;
266  case nl_ggl_ferti_s6:
267  if (!m_farm->FA_Slurry(m_field, 0.0, (NL_GGL_CUT_DATE + 4) - g_date->DayInYear())) {
269  break;
270  }
272  break;
273  case nl_ggl_ferti_p6:
274  if (!m_farm->FP_Slurry(m_field, 0.0, (NL_GGL_CUT_DATE + 4) - g_date->DayInYear())) {
276  break;
277  }
279  break;
280  case nl_ggl_ferti_s7:
281  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
282  {
283  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear())) {
285  break;
286  }
287  }
289  break;
290  case nl_ggl_ferti_p7:
291  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
292  {
293  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(5, 8) - g_date->DayInYear())) {
295  break;
296  }
297  }
299  break;
301  // At least 7 days from last watering and 21 from last application of fertilizer.
302  if (g_date->Date() < NL_GGL_WATER_DATE + 7) {
304  break;
305  }
306  else
307  {
308  if (!m_farm->CutToSilage(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
310  break;
311  }
313  if (m_farm->IsStockFarmer()) //Stock Farmer
314  {
316  }
317  else SimpleEvent_(g_date->Date() + 1, nl_ggl_ferti_p8, false, m_farm, m_field);
318  break;
319  }
320  break;
321  case nl_ggl_ferti_s8:
322  if (!m_farm->FA_Slurry(m_field, 0.0, (NL_GGL_CUT_DATE + 4) - g_date->DayInYear())) {
324  break;
325  }
327  break;
328  case nl_ggl_ferti_p8:
329  if (!m_farm->FP_Slurry(m_field, 0.0, (NL_GGL_CUT_DATE + 4) - g_date->DayInYear())) {
331  break;
332  }
334  break;
335  case nl_ggl_ferti_s9:
336  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
337  {
338  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(10, 9) - g_date->DayInYear())) {
340  break;
341  }
342  }
344  break;
345  case nl_ggl_ferti_p9:
346  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
347  {
348  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(10, 9) - g_date->DayInYear())) {
350  break;
351  }
352  }
354  break;
356  // At least 7 days from last watering and 21 from last application of fertilizer.
357  if (g_date->Date() < NL_GGL_WATER_DATE + 7) {
359  break;
360  }
361  else
362  {
363  if (m_ev->m_lock || m_farm->DoIt_prob(0.40))
364  {
365  if (!m_farm->CutToSilage(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
367  break;
368  }
370  }
371  if (m_farm->IsStockFarmer()) //Stock Farmer
372  {
374  }
376  break;
377  }
378  break;
379  case nl_ggl_ferti_s11:
380  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
381  {
382  if (!m_farm->FA_NPK(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
384  break;
385  }
386  }
388  break;
389  case nl_ggl_ferti_p11:
390  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
391  {
392  if (!m_farm->FP_NPK(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
394  break;
395  }
396  }
398  break;
399  case nl_ggl_cattle_out:
400  if (!m_farm->CattleOut(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
402  break;
403  }
404  // Keep them out there
406  break;
407  case nl_ggl_cattle_is_out: // Keep the cattle out there
408  // CattleIsOut() returns false if it is not time to stop grazing
409  if (!m_farm->CattleIsOut(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear(), g_date->DayInYear(31, 8))) {
411  break;
412  }
413  if (m_farm->IsStockFarmer()) //Stock Farmer
414  {
416  }
417  else SimpleEvent_(g_date->Date() + 1, nl_ggl_ferti_p10, false, m_farm, m_field);
418  break;
419  case nl_ggl_ferti_s10:
420  if (!m_farm->FA_Slurry(m_field, 0.0, g_date->DayInYear(5, 9) - g_date->DayInYear())) {
422  break;
423  }
425  break;
426  case nl_ggl_ferti_p10:
427  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(5, 9) - g_date->DayInYear())) {
429  break;
430  }
432  break;
434  if (!m_farm->CutToSilage(m_field, 0.0, m_field->GetMDates(0, 0) - g_date->DayInYear())) {
436  break;
437  }
438  if (m_farm->IsStockFarmer()) //Stock Farmer
439  {
441  }
443  break;
444  case nl_ggl_watering:
445  if (m_ev->m_lock || m_farm->DoIt_prob(0.40))
446  {
447  if (g_date->Date() < NL_GGL_CUT_DATE + 3) {
448  // Too close to silage cutting, so try again tomorrow.
450  }
451  else
452  {
453  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
455  break;
456  }
458  }
459  }
460  // End of thread
461  break;
463  if (!m_farm->WinterPlough(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
465  break;
466  }
467  done = true;
468  break;
469  default:
470  g_msg->Warn(WARN_BUG, "NLGrassGrazedLast::Do(): "
471  "Unknown event type! ", "");
472  exit(1);
473  }
474  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
475  return done;
476 }

References Farm::CattleIsOut(), Farm::CattleOut(), LE::ClearManagementActionSum(), Farm::CutToSilage(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FP_NPK(), Farm::FP_Slurry(), g_date, g_msg, LE::GetMDates(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, nl_ggl_cattle_is_out, nl_ggl_cattle_out, NL_GGL_CUT_DATE, nl_ggl_cut_to_silage1, nl_ggl_cut_to_silage2, nl_ggl_cut_to_silage3, nl_ggl_cut_to_silage4, nl_ggl_cut_to_silage5, nl_ggl_cut_to_silage6, NL_GGL_FERTI_DATE, nl_ggl_ferti_p1, nl_ggl_ferti_p10, nl_ggl_ferti_p11, nl_ggl_ferti_p2, nl_ggl_ferti_p3, nl_ggl_ferti_p4, nl_ggl_ferti_p5, nl_ggl_ferti_p6, nl_ggl_ferti_p7, nl_ggl_ferti_p8, nl_ggl_ferti_p9, nl_ggl_ferti_s1, nl_ggl_ferti_s10, nl_ggl_ferti_s11, nl_ggl_ferti_s2, nl_ggl_ferti_s3, nl_ggl_ferti_s4, nl_ggl_ferti_s5, nl_ggl_ferti_s6, nl_ggl_ferti_s7, nl_ggl_ferti_s8, nl_ggl_ferti_s9, nl_ggl_start, NL_GGL_WATER_DATE, nl_ggl_watering, nl_ggl_winter_plough_clay, Calendar::OldDays(), Crop::SimpleEvent_(), Crop::StartUpCrop(), tov_NLGrassGrazedLast, MapErrorMsg::Warn(), WARN_BUG, Farm::Water(), and Farm::WinterPlough().

◆ SetUpFarmCategoryInformation()

void NLGrassGrazedLast::SetUpFarmCategoryInformation ( )
inline
97  {
98  const int elements = 2 + (nl_ggl_foobar - NLGRASSGRAZEDLAST_BASE);
100 
101  FarmManagementCategory catlist[elements] =
102  {
103  fmc_Others, // zero element unused but must be here
104  fmc_Others,//nl_ggl_start = 1, // Compulsory, must always be 1 (one).
105  fmc_Others,//nl_ggl_sleep_all_day = NLGRASSGRAZEDLAST_BASE,
106  fmc_Fertilizer,//nl_ggl_ferti_p1,
107  fmc_Fertilizer,//nl_ggl_ferti_s1,
108  fmc_Cutting,//nl_ggl_cut_to_silage1,
109  fmc_Cutting,//nl_ggl_cut_to_silage2,
110  fmc_Cutting,//nl_ggl_cut_to_silage3,
111  fmc_Cutting,//nl_ggl_cut_to_silage4,
112  fmc_Cutting,//nl_ggl_cut_to_silage5,
113  fmc_Cutting,//nl_ggl_cut_to_silage6,
114  fmc_Fertilizer,//nl_ggl_ferti_p2,
115  fmc_Fertilizer,//nl_ggl_ferti_s2,
116  fmc_Fertilizer,//nl_ggl_ferti_p3,
117  fmc_Fertilizer,//nl_ggl_ferti_s3,
118  fmc_Fertilizer,//nl_ggl_ferti_p4,
119  fmc_Fertilizer,//nl_ggl_ferti_s4,
120  fmc_Fertilizer,//nl_ggl_ferti_p5,
121  fmc_Fertilizer,//nl_ggl_ferti_s5,
122  fmc_Fertilizer,//nl_ggl_ferti_p6,
123  fmc_Fertilizer,//nl_ggl_ferti_s6,
124  fmc_Fertilizer,//nl_ggl_ferti_p7,
125  fmc_Fertilizer,//nl_ggl_ferti_s7,
126  fmc_Fertilizer,//nl_ggl_ferti_p8,
127  fmc_Fertilizer,//nl_ggl_ferti_s8,
128  fmc_Fertilizer,//nl_ggl_ferti_p9,
129  fmc_Fertilizer,//nl_ggl_ferti_s9,
130  fmc_Fertilizer,//nl_ggl_ferti_p10,
131  fmc_Fertilizer,//nl_ggl_ferti_s10,
132  fmc_Fertilizer,//nl_ggl_ferti_p11,
133  fmc_Fertilizer,//nl_ggl_ferti_s11,
134  fmc_Watering,//nl_ggl_watering,
135  fmc_Grazing,//nl_ggl_cattle_out,
136  fmc_Grazing,//nl_ggl_cattle_is_out,
137  fmc_Cultivation//nl_ggl_winter_plough_clay,
138 
139  // no foobar entry
140 
141  };
142  // Iterate over the catlist elements and copy them to vector
143  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
144 
145  }

References fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Grazing, fmc_Others, fmc_Watering, Crop::m_base_elements_no, Crop::m_ManagementCategories, nl_ggl_foobar, and NLGRASSGRAZEDLAST_BASE.

Referenced by NLGrassGrazedLast().


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
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::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
nl_ggl_ferti_s10
Definition: NLGrassGrazedLast.h:66
nl_ggl_ferti_p6
Definition: NLGrassGrazedLast.h:57
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
nl_ggl_ferti_s9
Definition: NLGrassGrazedLast.h:64
Farm::CattleIsOut
virtual bool CattleIsOut(LE *a_field, double a_user, int a_days, int a_max)
Generate a 'cattle_out' event for every day the cattle are on a_field.
Definition: FarmFuncs.cpp:2470
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
nl_ggl_cut_to_silage6
Definition: NLGrassGrazedLast.h:48
nl_ggl_ferti_s1
Definition: NLGrassGrazedLast.h:42
nl_ggl_ferti_p1
Definition: NLGrassGrazedLast.h:41
nl_ggl_ferti_p9
Definition: NLGrassGrazedLast.h:63
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
nl_ggl_start
Definition: NLGrassGrazedLast.h:39
nl_ggl_watering
Definition: NLGrassGrazedLast.h:69
nl_ggl_cut_to_silage1
Definition: NLGrassGrazedLast.h:43
nl_ggl_cut_to_silage2
Definition: NLGrassGrazedLast.h:44
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
NL_GGL_CUT_DATE
#define NL_GGL_CUT_DATE
Definition: NLGrassGrazedLast.h:29
nl_ggl_ferti_p10
Definition: NLGrassGrazedLast.h:65
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
NLGrassGrazedLast::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: NLGrassGrazedLast.h:97
nl_ggl_ferti_s11
Definition: NLGrassGrazedLast.h:68
nl_ggl_cut_to_silage3
Definition: NLGrassGrazedLast.h:45
nl_ggl_cattle_out
Definition: NLGrassGrazedLast.h:70
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
nl_ggl_ferti_p2
Definition: NLGrassGrazedLast.h:49
nl_ggl_ferti_s7
Definition: NLGrassGrazedLast.h:60
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
nl_ggl_ferti_s8
Definition: NLGrassGrazedLast.h:62
nl_ggl_ferti_s5
Definition: NLGrassGrazedLast.h:56
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
nl_ggl_ferti_p8
Definition: NLGrassGrazedLast.h:61
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
nl_ggl_ferti_s4
Definition: NLGrassGrazedLast.h:54
nl_ggl_ferti_p3
Definition: NLGrassGrazedLast.h:51
nl_ggl_foobar
Definition: NLGrassGrazedLast.h:73
nl_ggl_ferti_s3
Definition: NLGrassGrazedLast.h:52
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
nl_ggl_ferti_p7
Definition: NLGrassGrazedLast.h:59
nl_ggl_ferti_p4
Definition: NLGrassGrazedLast.h:53
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
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::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
Farm::Water
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: FarmFuncs.cpp:1330
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
nl_ggl_ferti_s2
Definition: NLGrassGrazedLast.h:50
fmc_Grazing
Definition: LandscapeFarmingEnums.h:1010
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
tov_NLGrassGrazedLast
Definition: LandscapeFarmingEnums.h:270
nl_ggl_ferti_s6
Definition: NLGrassGrazedLast.h:58
nl_ggl_cut_to_silage5
Definition: NLGrassGrazedLast.h:47
NLGRASSGRAZEDLAST_BASE
#define NLGRASSGRAZEDLAST_BASE
Definition: NLGrassGrazedLast.h:24
NL_GGL_WATER_DATE
#define NL_GGL_WATER_DATE
Definition: NLGrassGrazedLast.h:30
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
nl_ggl_winter_plough_clay
Definition: NLGrassGrazedLast.h:72
nl_ggl_ferti_p5
Definition: NLGrassGrazedLast.h:55
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
nl_ggl_ferti_p11
Definition: NLGrassGrazedLast.h:67
nl_ggl_cattle_is_out
Definition: NLGrassGrazedLast.h:71
NL_GGL_FERTI_DATE
#define NL_GGL_FERTI_DATE
A flag used to indicate autumn ploughing status.
Definition: NLGrassGrazedLast.h:28
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
nl_ggl_cut_to_silage4
Definition: NLGrassGrazedLast.h:46
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
Farm::CattleOut
virtual bool CattleOut(LE *a_field, double a_user, int a_days)
Start a grazing event on a_field today.
Definition: FarmFuncs.cpp:2368
WARN_BUG
Definition: MapErrorMsg.h:34
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
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