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

UKTempGrass class
. More...

#include <UKTempGrass.h>

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

UKTempGrass class
.

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

◆ UKTempGrass()

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

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

Member Function Documentation

◆ Do()

bool UKTempGrass::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 TemporalGrassGrazed1Spring.

Reimplemented from Crop.

56 {
57  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
58  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
59  m_field = a_field;
60  m_ev = a_ev;
61  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
62  int d1 = 0;
63  int noDates = 1;
64  TTypesOfVegetation l_tov = tov_UKTempGrass; // The current type - change to match the crop you have
65 /**********************************************To Here *************************************************************************/
66 
67  // Depending what event has occured jump to the correct bit of code
68  switch (m_ev->m_todo)
69  {
70  case uk_tg_start:
71  {
72  // uk_tg_start just sets up all the starting conditions and reference dates that are needed to start a uk_pot
73  UK_TG_CUT_DATE = 0;
74  UK_TG_WATER_DATE = 0;
75 
77 
78  // Set up the date management stuff
79  // The next bit of code just allows for altering dates after harvest if it is necessary
80  // to allow for a crop which starts its management early.
81 
82  // 1 start and stop dates for all 'movable' events for this crop
83  int noDates = 1;
84  m_field->SetMDates(0, 0, g_date->DayInYear(20, 8)); // last possible day of last cutting
85  m_field->SetMDates(1, 0, g_date->DayInYear(30, 8)); // last possible day of NPK application
86 
87  m_field->SetMConstants(0, 1);
88 
89  // Check the next crop for early start, unless it is a spring crop
90  // in which case we ASSUME that no checking is necessary!!!!
91  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
92 
93  //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)
94  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
95  if (!(m_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
96 
97  if (m_ev->m_startday > g_date->DayInYear(1, 7)) {
98  if (m_field->GetMDates(0, 0) >= m_ev->m_startday)
99  {
100  g_msg->Warn(WARN_BUG, "UKTempGrass::Do(): ", "Harvest too late for the next crop to start!!!");
101  int almassnum = m_field->GetLandscape()->BackTranslateVegTypes(m_ev->m_next_tov);
102  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
103  }
104  // Now fix any late finishing problems
105  for (int i = 0; i < noDates; i++) {
106  if (m_field->GetMDates(0, i) >= m_ev->m_startday) {
107  m_field->SetMDates(0, i, m_ev->m_startday - 1); //move the starting date
108  }
109  if (m_field->GetMDates(1, i) >= m_ev->m_startday) {
110  m_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)
111  m_field->SetMDates(1, i, m_ev->m_startday - 1); //move the finishing date
112  }
113  }
114  }
115  // Now no operations can be timed after the start of the next crop.
116 
117  if (!m_ev->m_first_year) {
118  d1 = g_date->OldDays() + m_first_date + 365; // Add 365 for spring crop
119  if (g_date->Date() > d1) {
120  // Yes too late - should not happen - raise an error
121  printf("Poly: %d\n", m_field->GetPoly());
122  g_msg->Warn(WARN_BUG, "UKTempGrass::Do(): ", "Crop start attempt between 1st Jan & 1st July");
123  int prev = m_field->GetLandscape()->BackTranslateVegTypes(m_field->GetOwner()->GetPreviousTov(m_field->GetRotIndex()));
124  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
125  int almassnum = m_field->GetLandscape()->BackTranslateVegTypes(m_ev->m_next_tov);
126  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
127  exit(1);
128  }
129  }
130  else {
131  // Is the first year
132  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
133  // Code for first spring treatment used
135  break;
136  }
137  }//if
138 
139  // End single block date checking code. Please see next line comment as well.
140  // Reinit d1 to first possible starting date.
141  d1 = g_date->OldDays() + g_date->DayInYear(1, 3);
142  if (g_date->Date() >= d1) d1 += 365;
143  // OK, let's go.
144  // Here we queue up the first event
146 
147  }
148  break;
149 
150  // This is the first real farm operation
154  break;
155  }
157  break;
158  case uk_tg_spring_sow:
159  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(3, 3) - g_date->DayInYear())) {
161  break;
162  }
163  d1 = g_date->Date() + 7;
164  if (d1 < g_date->OldDays() + g_date->DayInYear(1, 3)) {
165  d1 = g_date->OldDays() + g_date->DayInYear(1, 3);
166  }
167  if (m_farm->IsStockFarmer()) //Stock Farmer
168  {
170  }
171  else SimpleEvent_(d1, uk_tg_ferti_p2, false, m_farm, m_field);
172  break;
173  case uk_tg_ferti_p2:
174  if (m_farm->DoIt_prob(0.90)) {
175  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(10, 3) - g_date->DayInYear())) {
177  break;
178  }
179  }
180  if (m_farm->DoIt_prob(0.50)) {
182  }
184  break;
185  case uk_tg_ferti_s2:
186  if (m_farm->DoIt_prob(0.90)) {
187  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(10, 3) - g_date->DayInYear())) {
189  break;
190  }
191  }
192  if (m_farm->DoIt_prob(0.50)) {
194  }
196  break;
198  // At least 7 days from last watering and 21 from last application of fertilizer.
199  if (g_date->Date() < UK_TG_WATER_DATE + 7) {
201  break;
202  }
203  else
204  {
205  if (!m_farm->CutToSilage(m_field, 0.0, g_date->DayInYear(1, 4) - g_date->DayInYear())) {
207  break;
208  }
210  if (m_farm->IsStockFarmer()) //Stock Farmer
211  {
213  }
214  else SimpleEvent_(g_date->Date() + 1, uk_tg_ferti_p3, false, m_farm, m_field);
215  // Start water thread
217  break;
218  }
219  break;
220 
221  case uk_tg_ferti_s3:
222  if (!m_farm->FA_Slurry(m_field, 0.0, (UK_TG_CUT_DATE + 4) - g_date->DayInYear())) {
224  break;
225  }
227  break;
228  case uk_tg_ferti_p3:
229  if (!m_farm->FP_Slurry(m_field, 0.0, (UK_TG_CUT_DATE + 4) - g_date->DayInYear())) {
231  break;
232  }
234  break;
235  case uk_tg_ferti_s4:
236  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
237  {
238  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
240  break;
241  }
242  }
244  break;
245  case uk_tg_ferti_p4:
246  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
247  {
248  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
250  break;
251  }
252  }
254  break;
256  // At least 7 days from last watering and 21 from last application of fertilizer.
257  if (g_date->Date() < UK_TG_WATER_DATE + 7) {
259  break;
260  }
261  else
262  {
263  if (!m_farm->CutToSilage(m_field, 0.0, g_date->DayInYear(1, 5) - g_date->DayInYear())) {
265  break;
266  }
268  if (m_farm->IsStockFarmer()) //Stock Farmer
269  {
271  }
272  else SimpleEvent_(g_date->Date() + 1, uk_tg_ferti_p5, false, m_farm, m_field);
273  break;
274  }
275  break;
276  case uk_tg_ferti_s5:
277  if (!m_farm->FA_Slurry(m_field, 0.0, (UK_TG_CUT_DATE + 4) - g_date->DayInYear())) {
279  break;
280  }
282  break;
283  case uk_tg_ferti_p5:
284  if (!m_farm->FP_Slurry(m_field, 0.0, (UK_TG_CUT_DATE + 4) - g_date->DayInYear())) {
286  break;
287  }
289  break;
290  case uk_tg_ferti_s6:
291  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
292  {
293  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
295  break;
296  }
297  }
299  break;
300  case uk_tg_ferti_p6:
301  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
302  {
303  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
305  break;
306  }
307  }
309  break;
311  // At least 7 days from last watering and 21 from last application of fertilizer.
312  if (g_date->Date() < UK_TG_WATER_DATE + 7) {
314  break;
315  }
316  else
317  {
318  if (!m_farm->CutToSilage(m_field, 0.0, g_date->DayInYear(1, 6) - g_date->DayInYear())) {
320  break;
321  }
323  if (m_farm->IsStockFarmer()) //Stock Farmer
324  {
326  }
327  else SimpleEvent_(g_date->Date() + 1, uk_tg_ferti_p7, false, m_farm, m_field);
328  break;
329  }
330  break;
331 
332  case uk_tg_ferti_s7:
333  if (!m_farm->FA_Slurry(m_field, 0.0, (UK_TG_CUT_DATE + 4) - g_date->DayInYear())) {
335  break;
336  }
338  break;
339  case uk_tg_ferti_p7:
340  if (!m_farm->FP_Slurry(m_field, 0.0, (UK_TG_CUT_DATE + 4) - g_date->DayInYear())) {
342  break;
343  }
345  break;
346  case uk_tg_ferti_s8:
347  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
348  {
349  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
351  break;
352  }
353  }
355  break;
356  case uk_tg_ferti_p8:
357  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
358  {
359  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
361  break;
362  }
363  }
365  break;
367  // At least 7 days from last watering and 21 from last application of fertilizer.
368  if (g_date->Date() < UK_TG_WATER_DATE + 7) {
370  break;
371  }
372  else
373  {
374  if (!m_farm->CutToSilage(m_field, 0.0, g_date->DayInYear(1, 7) - g_date->DayInYear())) {
376  break;
377  }
379  if (m_farm->IsStockFarmer()) //Stock Farmer
380  {
382  }
383  else SimpleEvent_(g_date->Date() + 1, uk_tg_ferti_p9, false, m_farm, m_field);
384  break;
385  }
386  break;
387  case uk_tg_ferti_s9:
388  if (!m_farm->FA_Slurry(m_field, 0.0, (UK_TG_CUT_DATE + 4) - g_date->DayInYear())) {
390  break;
391  }
393  break;
394  case uk_tg_ferti_p9:
395  if (!m_farm->FP_Slurry(m_field, 0.0, (UK_TG_CUT_DATE + 4) - g_date->DayInYear())) {
397  break;
398  }
400  break;
401  case uk_tg_ferti_s10:
402  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
403  {
404  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(10, 7) - g_date->DayInYear())) {
406  break;
407  }
408  }
410  break;
411  case uk_tg_ferti_p10:
412  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
413  {
414  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(10, 7) - g_date->DayInYear())) {
416  break;
417  }
418  }
420  break;
422  // At least 7 days from last watering and 21 from last application of fertilizer.
423  if (g_date->Date() < UK_TG_WATER_DATE + 7) {
425  break;
426  }
427  else
428  {
429  if (m_ev->m_lock || m_farm->DoIt_prob(0.40))
430  {
431  if (!m_farm->CutToSilage(m_field, 0.0, m_field->GetMDates(0, 0) - g_date->DayInYear())) {
433  break;
434  }
436  }
437  if (m_farm->IsStockFarmer()) //Stock Farmer
438  {
440  }
442  break;
443  }
444  break;
445  case uk_tg_ferti_s12:
446  if (m_field->GetMConstants(0) == 0) {
447  if (!m_farm->FA_NPK(m_field, 0.0, -1)) { // raise an error
448  g_msg->Warn(WARN_BUG, "UKTempGrass::Do(): failure in 'NPK application' execution", "");
449  exit(1);
450  }
451  }
452  else {
453  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
454  {
455  if (!m_farm->FA_NPK(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
457  break;
458  }
459  }
460  }
461  done = true;
462  break;
463  case uk_tg_ferti_p12:
464  if (m_field->GetMConstants(0) == 0) {
465  if (!m_farm->FP_NPK(m_field, 0.0, -1)) { // raise an error
466  g_msg->Warn(WARN_BUG, "UKTempGrass::Do(): failure in 'NPK application' execution", "");
467  exit(1);
468  }
469  }
470  else {
471  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
472  {
473  if (!m_farm->FP_NPK(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
475  break;
476  }
477  }
478  }
479  done = true;
480  break;
481  case uk_tg_cattle_out:
482  if (!m_farm->CattleOut(m_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
484  break;
485  }
486  // Keep them out there
488  break;
489 
490  case uk_tg_cattle_is_out: // Keep the cattle out there
491  // CattleIsOut() returns false if it is not time to stop grazing
492  if (!m_farm->CattleIsOut(m_field, 0.0, g_date->DayInYear(14, 8) - g_date->DayInYear(), g_date->DayInYear(31, 8))) {
494  break;
495  }
496  if (m_farm->IsStockFarmer()) //Stock Farmer
497  {
499  }
500  else SimpleEvent_(g_date->Date() + 1, uk_tg_ferti_p11, false, m_farm, m_field);
501  break;
502 
503  case uk_tg_ferti_s11:
504  if (!m_farm->FA_Slurry(m_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
506  break;
507  }
509  break;
510  case uk_tg_ferti_p11:
511  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
513  break;
514  }
516  break;
518  if (!m_farm->CutToSilage(m_field, 0.0, m_field->GetMDates(0, 0) - g_date->DayInYear())) {
520  break;
521  }
522  if (m_farm->IsStockFarmer()) //Stock Farmer
523  {
525  }
527  break;
528  case uk_tg_watering:
529  if (m_ev->m_lock || m_farm->DoIt_prob(0.40))
530  {
531  if (g_date->Date() < UK_TG_CUT_DATE + 3) {
532  // Too close to silage cutting, so try again tomorrow.
534  }
535  else
536  {
537  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear())) {
539  break;
540  }
542  }
543  }
544  // End of thread
545  break;
546  default:
547  g_msg->Warn(WARN_BUG, "UKTempGrass::Do(): "
548  "Unknown event type! ", "");
549  exit(1);
550  }
551  return done;
552 }

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::GetMConstants(), LE::GetMDates(), LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), Farm::GetType(), Calendar::GetYearNumber(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), Farm::PreseedingCultivator(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent_(), Farm::SpringSow(), tof_OptimisingFarm, tov_UKTempGrass, uk_tg_cattle_is_out, uk_tg_cattle_out, UK_TG_CUT_DATE, uk_tg_cut_to_silage1, uk_tg_cut_to_silage2, uk_tg_cut_to_silage3, uk_tg_cut_to_silage4, uk_tg_cut_to_silage5, uk_tg_cut_to_silage6, uk_tg_ferti_p10, uk_tg_ferti_p11, uk_tg_ferti_p12, uk_tg_ferti_p2, uk_tg_ferti_p3, uk_tg_ferti_p4, uk_tg_ferti_p5, uk_tg_ferti_p6, uk_tg_ferti_p7, uk_tg_ferti_p8, uk_tg_ferti_p9, uk_tg_ferti_s10, uk_tg_ferti_s11, uk_tg_ferti_s12, uk_tg_ferti_s2, uk_tg_ferti_s3, uk_tg_ferti_s4, uk_tg_ferti_s5, uk_tg_ferti_s6, uk_tg_ferti_s7, uk_tg_ferti_s8, uk_tg_ferti_s9, uk_tg_preseeding_cultivator, uk_tg_spring_sow, uk_tg_start, UK_TG_WATER_DATE, uk_tg_watering, MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void UKTempGrass::SetUpFarmCategoryInformation ( )
inline
94  {
95  const int elements = 2 + (uk_tg_foobar - UKTEMPGRASS_BASE);
97  FarmManagementCategory catlist[elements] =
98  {
99  fmc_Others, // this needs to be at the zero line
100  fmc_Others, //uk_tg_start = 1, // Compulsory, must always be 1 (one).
101  fmc_Others, //uk_tg_sleep_all_day = UKTEMPGRASS_BASE,
102  fmc_Cultivation,//uk_tg_preseeding_cultivator,
103  fmc_Others, //uk_tg_spring_sow,
104  fmc_Fertilizer,//uk_tg_ferti_p2,
105  fmc_Fertilizer,//uk_tg_ferti_s2,
106  fmc_Cutting,//uk_tg_cut_to_silage1,
107  fmc_Cutting,//uk_tg_cut_to_silage2,
108  fmc_Cutting,//uk_tg_cut_to_silage3,
109  fmc_Cutting,//uk_tg_cut_to_silage4,
110  fmc_Cutting,//uk_tg_cut_to_silage5,
111  fmc_Cutting,//uk_tg_cut_to_silage6,
112  fmc_Fertilizer,//uk_tg_ferti_p3,
113  fmc_Fertilizer,//uk_tg_ferti_s3,
114  fmc_Fertilizer,//uk_tg_ferti_p4,
115  fmc_Fertilizer,//uk_tg_ferti_s4,
116  fmc_Fertilizer,//uk_tg_ferti_p5,
117  fmc_Fertilizer,//uk_tg_ferti_s5,
118  fmc_Fertilizer,//uk_tg_ferti_p6,
119  fmc_Fertilizer,//uk_tg_ferti_s6,
120  fmc_Fertilizer,//uk_tg_ferti_p7,
121  fmc_Fertilizer,//uk_tg_ferti_s7,
122  fmc_Fertilizer,//uk_tg_ferti_p8,
123  fmc_Fertilizer,//uk_tg_ferti_s8,
124  fmc_Fertilizer,//uk_tg_ferti_p9,
125  fmc_Fertilizer,//uk_tg_ferti_s9,
126  fmc_Fertilizer,//uk_tg_ferti_p10,
127  fmc_Fertilizer,//uk_tg_ferti_s10,
128  fmc_Fertilizer,//uk_tg_ferti_p11,
129  fmc_Fertilizer,//uk_tg_ferti_s11,
130  fmc_Fertilizer,//uk_tg_ferti_p12,
131  fmc_Fertilizer,//uk_tg_ferti_s12,
132  fmc_Watering,//uk_tg_watering,
133  fmc_Grazing,//uk_tg_cattle_out,
134  fmc_Grazing,//uk_tg_cattle_is_out,
135  };
136  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
137  }

References fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Grazing, fmc_Others, fmc_Watering, Crop::m_base_elements_no, Crop::m_ManagementCategories, uk_tg_foobar, and UKTEMPGRASS_BASE.

Referenced by UKTempGrass().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
uk_tg_cattle_is_out
Definition: UKTempGrass.h:69
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
uk_tg_ferti_p10
Definition: UKTempGrass.h:61
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
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
uk_tg_ferti_p4
Definition: UKTempGrass.h:49
LE::GetMConstants
int GetMConstants(int a)
Definition: Elements.h:407
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
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
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
uk_tg_cut_to_silage5
Definition: UKTempGrass.h:45
uk_tg_ferti_s6
Definition: UKTempGrass.h:54
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
uk_tg_ferti_s4
Definition: UKTempGrass.h:50
uk_tg_ferti_p8
Definition: UKTempGrass.h:57
uk_tg_spring_sow
Definition: UKTempGrass.h:38
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
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
UK_TG_WATER_DATE
#define UK_TG_WATER_DATE
Definition: UKTempGrass.h:26
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
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
uk_tg_ferti_s7
Definition: UKTempGrass.h:56
uk_tg_ferti_s8
Definition: UKTempGrass.h:58
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
tov_UKTempGrass
Definition: LandscapeFarmingEnums.h:284
uk_tg_foobar
Definition: UKTempGrass.h:70
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
uk_tg_preseeding_cultivator
Definition: UKTempGrass.h:37
uk_tg_ferti_s2
Definition: UKTempGrass.h:40
uk_tg_ferti_s12
Definition: UKTempGrass.h:66
Calendar::Date
long Date(void)
Definition: Calendar.h:57
uk_tg_ferti_p9
Definition: UKTempGrass.h:59
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
uk_tg_cut_to_silage4
Definition: UKTempGrass.h:44
UKTEMPGRASS_BASE
#define UKTEMPGRASS_BASE
Definition: UKTempGrass.h:21
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
uk_tg_ferti_p3
Definition: UKTempGrass.h:47
uk_tg_ferti_s3
Definition: UKTempGrass.h:48
uk_tg_ferti_p11
Definition: UKTempGrass.h:63
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
uk_tg_ferti_s5
Definition: UKTempGrass.h:52
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
uk_tg_cut_to_silage1
Definition: UKTempGrass.h:41
uk_tg_ferti_s9
Definition: UKTempGrass.h:60
uk_tg_cut_to_silage6
Definition: UKTempGrass.h:46
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
uk_tg_ferti_p6
Definition: UKTempGrass.h:53
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
Crop::m_ManagementCategories
vector< FarmManagementCategory > m_ManagementCategories
Holds the translation between the farm operation enum for each crop and the farm management category ...
Definition: Farm.h:530
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
uk_tg_ferti_p7
Definition: UKTempGrass.h:55
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
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
uk_tg_ferti_s10
Definition: UKTempGrass.h:62
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
uk_tg_ferti_p2
Definition: UKTempGrass.h:39
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
fmc_Grazing
Definition: LandscapeFarmingEnums.h:1010
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
uk_tg_cut_to_silage3
Definition: UKTempGrass.h:43
uk_tg_watering
Definition: UKTempGrass.h:67
uk_tg_cattle_out
Definition: UKTempGrass.h:68
UK_TG_CUT_DATE
#define UK_TG_CUT_DATE
A flag used to indicate autumn ploughing status.
Definition: UKTempGrass.h:25
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
UKTempGrass::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: UKTempGrass.h:94
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
uk_tg_ferti_p5
Definition: UKTempGrass.h:51
uk_tg_ferti_p12
Definition: UKTempGrass.h:65
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
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
uk_tg_cut_to_silage2
Definition: UKTempGrass.h:42
uk_tg_start
Definition: UKTempGrass.h:35
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
uk_tg_ferti_s11
Definition: UKTempGrass.h:64