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

DK_GrassGrazed_Perm class
. More...

#include <DK_GrassGrazed_Perm.h>

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

DK_GrassGrazed_Perm class
.

See DK_GrassGrazed_Perm.h::DK_GrassGrazed_PermToDo 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

◆ DK_GrassGrazed_Perm()

DK_GrassGrazed_Perm::DK_GrassGrazed_Perm ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
81  : Crop(a_tov, a_toc, a_L)
82  {
83  // When we start it off, the first possible date for a farm operation is ...
84  // This information is used by other crops when they decide how much post processing of
85  // the management is allowed after harvest before the next crop starts.
88  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

66 {
67  m_farm = a_farm;
68  m_field = a_field;
69  m_ev = a_ev;
70  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
71  int d1 = 0;
73  // Depending what event has occured jump to the correct bit of code
74  switch (m_ev->m_todo)
75  {
76  case dk_ggp_start:
77  {
78  DK_GGP_MANURE_S = false;
79  DK_GGP_MANURE_P = false;
80  a_field->ClearManagementActionSum();
81 
82  m_last_date = g_date->DayInYear(1, 11); // Should match the last flexdate below
83  //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
84  std::vector<std::vector<int>> flexdates(2 + 1, std::vector<int>(2, 0));
85  // Set up the date management stuff
86  // Start and stop dates for all events after harvest
87  flexdates[0][1] = g_date->DayInYear(21, 10); // last possible day of straw chopping (cutting)
88  // Now these are done in pairs, start & end for each operation. If its not used then -1
89  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
90  flexdates[1][1] = g_date->DayInYear(21, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1) // straw chopping (cutting, if time)
91  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 2 (start op 2)
92  flexdates[2][1] = g_date->DayInYear(1, 11); // This date will be moved back as far as necessary and potentially to flexdates 2 (end op 2) // herbicide (grazing)
93 
94 
95  // 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
96  if (StartUpCrop(365, flexdates, int(dk_ggp_sleep_all_day))) break;
97 
98  // End single block date checking code. Please see next line comment as well.
99  // Reinit d1 to first possible starting date.
100  d1 = g_date->OldDays() + g_date->DayInYear(1, 1) + 365;
101  // OK, let's go.
102  SimpleEvent(d1, dk_ggp_sleep_all_day, false);
103 
104  }
105  break;
106 
107  // LKM: This is the first real farm operation // suggests 50% of all do grazing, 50% do cutting - of the 50% who cuts, 25% (half) fertilize now, rest in spring next year)
108 
110  if (!a_farm->SleepAllDay(m_field, 0.0, g_date->DayInYear(1, 3) - g_date->DayInYear())) {
112  break;
113  }
114  SimpleEvent(g_date->Date() + 1, dk_ggp_manure_s2, false); // ferti thread - main thread
115  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), dk_ggp_water2, false);// water thread
116  break;
117 
118  case dk_ggp_water2:
119  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
120  SimpleEvent(g_date->Date() + 1, dk_ggp_water2, true);
121  break;
122  }
123  break; // end of thread
124 
125  case dk_ggp_manure_s2:
126  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
127  if (a_farm->IsStockFarmer()) { // 50% do cutting (and thus apply ferti)
128  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) { // 50% (25% of all) do ferti now, the rest in autumn
129  if (!a_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(15, 3) - g_date->DayInYear())) {
130  SimpleEvent(g_date->Date() + 1, dk_ggp_manure_s2, true);
131  break;
132  }
133  else { //we want to remember who did this
134  DK_GGP_MANURE_S = true;
135  }
136  }
137  SimpleEvent(g_date->Date() + 14, dk_ggp_cutting4, false);
138  break;
139  }
140  else SimpleEvent(g_date->Date() + 1, dk_ggp_manure_p2, false);
141  break;
142  }
143  else{
145  break;
146  }
147 
148  case dk_ggp_manure_p2:
149  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) { // 50% (25% of all) do ferti now, the rest in autumn
150  if (!a_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
151  SimpleEvent(g_date->Date() + 1, dk_ggp_manure_p2, true);
152  break;
153  }
154  else { //we want to remember who did this
155  DK_GGP_MANURE_P = true;
156  }
157  }
158  SimpleEvent(g_date->Date() + 14, dk_ggp_cutting4, false);
159  break;
160 
162  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(7, 4) - g_date->DayInYear())) {
164  break;
165  }
167  break;
168 
170  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(8, 4) - g_date->DayInYear())) {
172  break;
173  }
174  SimpleEvent(g_date->Date() + 7, dk_ggp_grazing2, false);
175  break;
176 
177  case dk_ggp_grazing2:
181  SimpleEvent(g_date->Date() + 1, dk_ggp_grazing2, true);
182  break;
183  }
184  SimpleEvent(g_date->Date() + 1, dk_ggp_cattle_out2, false); // main
185  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 8), dk_ggp_water1, false); // water thread
186  break;
187 
188  case dk_ggp_cattle_out2: // Keep the cattle out there
189  // CattleIsOut() returns false if it is not time to stop grazing
193  SimpleEvent(g_date->Date() + 1, dk_ggp_cattle_out2, false);
194  break;
195  }
196  SimpleEvent(g_date->Date() + 14, dk_ggp_herbicide, false);
197  break;
198 
199  case dk_ggp_herbicide:
200  if (!m_farm->HerbicideTreat(m_field, 0.0, m_field->GetMDates(1,2) - g_date->DayInYear())) {
201  SimpleEvent(g_date->Date() + 1, dk_ggp_herbicide, true);
202  break;
203  } // end of management for grazed grass
204  done = true;
205  break;
206 
207  case dk_ggp_cutting4:
208  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
209  SimpleEvent(g_date->Date() + 1, dk_ggp_cutting4, true);
210  break;
211  }
213  break;
214 
216  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(16, 4) - g_date->DayInYear())) {
218  break;
219  }
220  SimpleEvent(g_date->Date() + 45, dk_ggp_cutting5, false);
221  break;
222 
223  case dk_ggp_cutting5:
224  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
225  SimpleEvent(g_date->Date() + 1, dk_ggp_cutting5, true);
226  break;
227  }
229  break;
230 
232  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(16, 6) - g_date->DayInYear())) {
234  break;
235  }
236  SimpleEvent(g_date->Date() + 45, dk_ggp_cutting6, false);
237  break;
238 
239  case dk_ggp_cutting6:
240  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
241  SimpleEvent(g_date->Date() + 1, dk_ggp_cutting6, true);
242  break;
243  }
245  break;
246 
248  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(16, 8) - g_date->DayInYear())) {
250  break;
251  }
252  SimpleEvent(g_date->Date() + 1, dk_ggp_water1, false);
253  SimpleEvent(g_date->Date() + 14, dk_ggp_manure_s1, false);
254  break;
255 
256  case dk_ggp_water1:
257  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
258  SimpleEvent(g_date->Date() + 1, dk_ggp_water1, true);
259  break;
260  }
261  break;
262 
263  case dk_ggp_manure_s1:
264  if (a_farm->IsStockFarmer()) {
265  if (DK_GGP_MANURE_S == false)
266  {
267  if (!a_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(1, 9) - g_date->DayInYear())) {
268  SimpleEvent(g_date->Date() + 1, dk_ggp_manure_s1, true);
269  break;
270  }
271 
272  }
273  SimpleEvent(g_date->Date() + 7, dk_ggp_cutting1, false);
274  break;
275  }
276  else SimpleEvent(g_date->Date() + 1, dk_ggp_manure_p1, false);
277  break;
278 
279  case dk_ggp_manure_p1:
280  if (DK_GGP_MANURE_P == false)
281  {
282  if (!a_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(1, 9) - g_date->DayInYear())) {
283  SimpleEvent(g_date->Date() + 1, dk_ggp_manure_p1, true);
284  break;
285  }
286  }
287  SimpleEvent(g_date->Date() + 7, dk_ggp_cutting1, false);
288  break;
289 
290  case dk_ggp_cutting1:
291  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(20, 9) - g_date->DayInYear())) {
292  SimpleEvent(g_date->Date() + 1, dk_ggp_cutting1, true);
293  break;
294  }
296  break;
297 
299  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(21, 9) - g_date->DayInYear())) {
301  break;
302  }
303  SimpleEvent(g_date->Date() + 45, dk_ggp_cutting2, false);
304  break;
305 
306  case dk_ggp_cutting2:
307  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(20, 10) - g_date->DayInYear())) {
308  SimpleEvent(g_date->Date() + 1, dk_ggp_cutting2, true);
309  break;
310  }
312  break;
313 
315  if (!a_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1,0) - g_date->DayInYear())) {
317  break;
318  }
319  d1 = g_date->OldDays() + g_date->DayInYear(5, 9);
320  if (g_date->Date() <= d1) {
321  SimpleEvent(g_date->Date() + 45, dk_ggp_cutting3, false);
322  break;
323  }
324  else // end of management for cut grass
325  done = true;
326  break;
327 
328  case dk_ggp_cutting3:
329  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(20, 10) - g_date->DayInYear())) {
330  SimpleEvent(g_date->Date() + 1, dk_ggp_cutting3, true);
331  break;
332  }
334  break;
335 
337  if (!a_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1,1) - g_date->DayInYear())) {
339  break;
340  }
341  // end of management for cut grass
342  done = true;
343  break;
344 
345  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
346  // END of MAIN THREAD
347  default:
348  g_msg->Warn(WARN_BUG, "DK_GrassGrazed_Perm::Do(): "
349  "Unknown event type! ", "");
350  exit(1);
351  }
352  return done;
353 }

References Farm::CattleIsOut(), Farm::CattleOut(), cfg_farm_cattle_grass_high, cfg_farm_cattle_grass_low, LE::ClearManagementActionSum(), Farm::CutToHay(), Calendar::Date(), Calendar::DayInYear(), dk_ggp_cattle_out2, dk_ggp_cutting1, dk_ggp_cutting2, dk_ggp_cutting3, dk_ggp_cutting4, dk_ggp_cutting5, dk_ggp_cutting6, dk_ggp_cutting_graze, DK_GGP_GRASS_READY, dk_ggp_grazing2, dk_ggp_herbicide, DK_GGP_MANURE_P, dk_ggp_manure_p1, dk_ggp_manure_p2, DK_GGP_MANURE_S, dk_ggp_manure_s1, dk_ggp_manure_s2, dk_ggp_sleep_all_day, dk_ggp_start, dk_ggp_straw_chopping1, dk_ggp_straw_chopping2, dk_ggp_straw_chopping3, dk_ggp_straw_chopping4, dk_ggp_straw_chopping5, dk_ggp_straw_chopping6, dk_ggp_straw_chopping_graze, dk_ggp_water1, dk_ggp_water2, Farm::DoIt_prob(), Farm::FA_Manure(), Farm::FP_Manure(), g_date, g_msg, LE::GetMDates(), LE::GetVegHeight(), Farm::HerbicideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), Crop::SimpleEvent(), Farm::SleepAllDay(), Crop::StartUpCrop(), Farm::StrawChopping(), tov_DKGrassGrazed_Perm, CfgInt::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_GrassGrazed_Perm::SetUpFarmCategoryInformation ( )
inline
89  {
90  const int elements = 2 + (dk_ggp_foobar - DK_GGP_BASE);
92 
93  FarmManagementCategory catlist[elements] =
94  {
95  fmc_Others, // zero element unused but must be here
96  fmc_Others, // dk_ggp_start = 1, // Compulsory, must always be 1 (one).
97  fmc_Others, // dk_ggp_sleep_all_day = DK_GGP_BASE,
98  fmc_Fertilizer, //dk_ggp_manure_s1,
99  fmc_Fertilizer, //dk_ggp_manure_p1,
100  fmc_Fertilizer, //dk_ggp_manure_s2,
101  fmc_Fertilizer, //dk_ggp_manure_p2,
102  fmc_Cutting, //dk_ggp_cutting1,
103  fmc_Cutting, //dk_ggp_cutting2,
104  fmc_Cutting, //dk_ggp_cutting3,
105  fmc_Cutting, //dk_ggp_cutting4,
106  fmc_Cutting, //dk_ggp_cutting5,
107  fmc_Cutting, //dk_ggp_cutting6,
108  fmc_Cutting, //dk_ggp_cutting_graze,
109  fmc_Cutting, //dk_ggp_straw_chopping1,
110  fmc_Cutting, //dk_ggp_straw_chopping2,
111  fmc_Cutting, //dk_ggp_straw_chopping3,
112  fmc_Cutting, //dk_ggp_straw_chopping4,
113  fmc_Cutting, //dk_ggp_straw_chopping5,
114  fmc_Cutting, //dk_ggp_straw_chopping6,
115  fmc_Cutting, //dk_ggp_straw_chopping_graze,
116  fmc_Grazing, //dk_ggp_grazing1,
117  fmc_Grazing, //dk_ggp_grazing2,
118  fmc_Grazing, //dk_ggp_cattle_out1,
119  fmc_Grazing, //dk_ggp_cattle_out2,
120  fmc_Watering, // dk_ggp_water1,
121  fmc_Watering, // dk_ggp_water2,
122  fmc_Herbicide, // dk_ggp_herbicide,
123  fmc_Others, //dk_ggp_wait
124  // no foobar entry
125 
126  };
127  // Iterate over the catlist elements and copy them to vector
128  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
129 
130  }

References DK_GGP_BASE, dk_ggp_foobar, fmc_Cutting, fmc_Fertilizer, fmc_Grazing, fmc_Herbicide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_GrassGrazed_Perm().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
dk_ggp_manure_p1
Definition: DK_GrassGrazed_Perm.h:41
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
cfg_farm_cattle_grass_low
CfgInt cfg_farm_cattle_grass_low
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
dk_ggp_cutting3
Definition: DK_GrassGrazed_Perm.h:46
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
dk_ggp_cutting_graze
Definition: DK_GrassGrazed_Perm.h:50
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
dk_ggp_manure_p2
Definition: DK_GrassGrazed_Perm.h:43
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
Farm::FA_Manure
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1110
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
Farm::CutToHay
virtual bool CutToHay(LE *a_field, double a_user, int a_days)
Carry out hay cutting on a_field.
Definition: FarmFuncs.cpp:1607
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
dk_ggp_water2
Definition: DK_GrassGrazed_Perm.h:63
dk_ggp_cutting4
Definition: DK_GrassGrazed_Perm.h:47
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
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_Cutting
Definition: LandscapeFarmingEnums.h:1009
dk_ggp_manure_s1
Definition: DK_GrassGrazed_Perm.h:40
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_ggp_manure_s2
Definition: DK_GrassGrazed_Perm.h:42
dk_ggp_straw_chopping3
Definition: DK_GrassGrazed_Perm.h:53
cfg_farm_cattle_grass_high
CfgInt cfg_farm_cattle_grass_high
dk_ggp_straw_chopping5
Definition: DK_GrassGrazed_Perm.h:55
DK_GrassGrazed_Perm::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_GrassGrazed_Perm.h:89
Calendar::Date
long Date(void)
Definition: Calendar.h:57
DK_GGP_MANURE_P
#define DK_GGP_MANURE_P
Definition: DK_GrassGrazed_Perm.h:24
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
dk_ggp_straw_chopping_graze
Definition: DK_GrassGrazed_Perm.h:57
Farm::StrawChopping
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: FarmFuncs.cpp:1475
dk_ggp_foobar
Definition: DK_GrassGrazed_Perm.h:66
LE::GetVegHeight
virtual double GetVegHeight(void)
Definition: Elements.h:148
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
dk_ggp_straw_chopping4
Definition: DK_GrassGrazed_Perm.h:54
DK_GGP_GRASS_READY
#define DK_GGP_GRASS_READY
Definition: DK_GrassGrazed_Perm.h:25
dk_ggp_cutting6
Definition: DK_GrassGrazed_Perm.h:49
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
tov_DKGrassGrazed_Perm
Definition: LandscapeFarmingEnums.h:460
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
dk_ggp_cutting5
Definition: DK_GrassGrazed_Perm.h:48
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
CfgInt::value
int value() const
Definition: Configurator.h:116
dk_ggp_cutting1
Definition: DK_GrassGrazed_Perm.h:44
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
dk_ggp_herbicide
Definition: DK_GrassGrazed_Perm.h:64
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
dk_ggp_straw_chopping1
Definition: DK_GrassGrazed_Perm.h:51
Farm::SleepAllDay
virtual bool SleepAllDay(LE *a_field, double a_user, int a_days)
Nothing to to today on a_field.
Definition: FarmFuncs.cpp:272
dk_ggp_cutting2
Definition: DK_GrassGrazed_Perm.h:45
DK_GGP_BASE
#define DK_GGP_BASE
Definition: DK_GrassGrazed_Perm.h:27
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
dk_ggp_start
Definition: DK_GrassGrazed_Perm.h:38
fmc_Grazing
Definition: LandscapeFarmingEnums.h:1010
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
dk_ggp_grazing2
Definition: DK_GrassGrazed_Perm.h:59
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
dk_ggp_cattle_out2
Definition: DK_GrassGrazed_Perm.h:61
dk_ggp_straw_chopping2
Definition: DK_GrassGrazed_Perm.h:52
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
dk_ggp_sleep_all_day
Definition: DK_GrassGrazed_Perm.h:39
dk_ggp_water1
Definition: DK_GrassGrazed_Perm.h:62
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
dk_ggp_straw_chopping6
Definition: DK_GrassGrazed_Perm.h:56
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
DK_GGP_MANURE_S
#define DK_GGP_MANURE_S
Definition: DK_GrassGrazed_Perm.h:23