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

DK_OGrassGrazed_Perm class
. More...

#include <DK_OGrassGrazed_Perm.h>

Inheritance diagram for DK_OGrassGrazed_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_OGrassGrazed_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_OGrassGrazed_Perm class
.

See DK_OGrassGrazed_Perm.h::DK_OGrassGrazed_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_OGrassGrazed_Perm()

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

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

Member Function Documentation

◆ Do()

bool DK_OGrassGrazed_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.

61 {
62  m_farm = a_farm;
63  m_field = a_field;
64  m_ev = a_ev;
65  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
66  int d1 = 0;
68  // Depending what event has occured jump to the correct bit of code
69  switch (m_ev->m_todo)
70  {
71  case dk_oggp_start:
72  {
73  DK_OGGP_MANURE_S = false;
74  DK_OGGP_MANURE_P = false;
75  a_field->ClearManagementActionSum();
76 
77  m_last_date = g_date->DayInYear(1, 11); // Should match the last flexdate below
78  //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
79  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
80  // Set up the date management stuff
81  // Start and stop dates for all events after harvest
82  flexdates[0][1] = g_date->DayInYear(21, 10); // last possible day of straw chopping (cutting)
83  // Now these are done in pairs, start & end for each operation. If its not used then -1
84  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
85  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)
86 
87 
88  // 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
89  if (StartUpCrop(365, flexdates, int(dk_oggp_sleep_all_day))) break;
90 
91  // End single block date checking code. Please see next line comment as well.
92  // Reinit d1 to first possible starting date.
93  d1 = g_date->OldDays() + g_date->DayInYear(1, 1) + 365;
94  // OK, let's go.
96 
97  }
98  break;
99 
100  // 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)
101 
103  if (!a_farm->SleepAllDay(m_field, 0.0, g_date->DayInYear(1, 3) - g_date->DayInYear())) {
105  break;
106  }
107  SimpleEvent(g_date->Date() + 1, dk_oggp_manure_s2, false); // ferti thread - main thread
108  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), dk_oggp_water2, false);// water thread
109  break;
110 
111  case dk_oggp_water2:
112  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
113  SimpleEvent(g_date->Date() + 1, dk_oggp_water2, true);
114  break;
115  }
116  break; // end of thread
117 
118  case dk_oggp_manure_s2:
119  if (a_farm->IsStockFarmer()) {
120  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) { // 50% do cutting (and thus apply ferti)
121  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) { // 50% (25% of all) do ferti now, the rest in autumn
122  if (!a_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(15, 3) - g_date->DayInYear())) {
123  SimpleEvent(g_date->Date() + 1, dk_oggp_manure_s2, true);
124  break;
125  }
126  else { //we want to remember who did this
127  DK_OGGP_MANURE_S = true;
128  }
129  }
130  SimpleEvent(g_date->Date() + 14, dk_oggp_cutting4, false);
131  break;
132  }
133  else
135  break;
136  }
137  else SimpleEvent(g_date->Date() + 1, dk_oggp_manure_p2, false);
138  break;
139 
140  case dk_oggp_manure_p2:
141  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) { // 50% do cutting (and thus apply ferti)
142  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) { // 50% (25% of all) do ferti now, the rest in autumn
143  if (!a_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
144  SimpleEvent(g_date->Date() + 1, dk_oggp_manure_p2, true);
145  break;
146  }
147  else { //we want to remember who did this
148  DK_OGGP_MANURE_P = true;
149  }
150  }
151  SimpleEvent(g_date->Date() + 14, dk_oggp_cutting4, false);
152  break;
153  }
155  break;
156 
158  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
159  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(7, 4) - g_date->DayInYear())) {
161  break;
162  }
163  }
165  break;
166 
168  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(8, 4) - g_date->DayInYear())) {
170  break;
171  }
172  SimpleEvent(g_date->Date() + 7, dk_oggp_grazing2, false);
173  break;
174 
175  case dk_oggp_grazing2:
179  SimpleEvent(g_date->Date() + 1, dk_oggp_grazing2, true);
180  break;
181  }
182  SimpleEvent(g_date->Date() + 1, dk_oggp_cattle_out2, false); // main
183  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 8), dk_oggp_water1, false); // water thread
184  break;
185 
186  case dk_oggp_cattle_out2: // Keep the cattle out there
187  // CattleIsOut() returns false if it is not time to stop grazing
191  SimpleEvent(g_date->Date() + 1, dk_oggp_cattle_out2, false);
192  break;
193  }
194  // end of management for grazed grass
195  done = true;
196  break;
197 
198  case dk_oggp_cutting4:
199  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
200  SimpleEvent(g_date->Date() + 1, dk_oggp_cutting4, true);
201  break;
202  }
204  break;
205 
207  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(16, 4) - g_date->DayInYear())) {
209  break;
210  }
211  SimpleEvent(g_date->Date() + 45, dk_oggp_cutting5, false);
212  break;
213 
214  case dk_oggp_cutting5:
215  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
216  SimpleEvent(g_date->Date() + 1, dk_oggp_cutting5, true);
217  break;
218  }
220  break;
221 
223  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(16, 6) - g_date->DayInYear())) {
225  break;
226  }
227  SimpleEvent(g_date->Date() + 45, dk_oggp_cutting6, false);
228  break;
229 
230  case dk_oggp_cutting6:
231  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
232  SimpleEvent(g_date->Date() + 1, dk_oggp_cutting6, true);
233  break;
234  }
236  break;
237 
239  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(16, 8) - g_date->DayInYear())) {
241  break;
242  }
243  SimpleEvent(g_date->Date() + 1, dk_oggp_water1, false);
244  SimpleEvent(g_date->Date() + 14, dk_oggp_manure_s1, false);
245  break;
246 
247  case dk_oggp_water1:
248  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
249  SimpleEvent(g_date->Date() + 1, dk_oggp_water1, true);
250  break;
251  }
252  break;
253 
254  case dk_oggp_manure_s1:
255  if (a_farm->IsStockFarmer()) {
256  if (DK_OGGP_MANURE_S == false)
257  {
258  if (!a_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(1, 9) - g_date->DayInYear())) {
259  SimpleEvent(g_date->Date() + 1, dk_oggp_manure_s1, true);
260  break;
261  }
262 
263  }
264  SimpleEvent(g_date->Date() + 7, dk_oggp_cutting1, false);
265  break;
266  }
267  else SimpleEvent(g_date->Date() + 1, dk_oggp_manure_p1, false);
268  break;
269 
270  case dk_oggp_manure_p1:
271  if (DK_OGGP_MANURE_P == false)
272  {
273  if (!a_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(1, 9) - g_date->DayInYear())) {
274  SimpleEvent(g_date->Date() + 1, dk_oggp_manure_p1, true);
275  break;
276  }
277  }
278  SimpleEvent(g_date->Date() + 7, dk_oggp_cutting1, false);
279  break;
280 
281  case dk_oggp_cutting1:
282  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(20, 9) - g_date->DayInYear())) {
283  SimpleEvent(g_date->Date() + 1, dk_oggp_cutting1, true);
284  break;
285  }
287  break;
288 
290  if (!a_farm->StrawChopping(m_field, 0.0, g_date->DayInYear(21, 9) - g_date->DayInYear())) {
292  break;
293  }
294  SimpleEvent(g_date->Date() + 45, dk_oggp_cutting2, false);
295  break;
296 
297  case dk_oggp_cutting2:
298  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(20, 10) - g_date->DayInYear())) {
299  SimpleEvent(g_date->Date() + 1, dk_oggp_cutting2, true);
300  break;
301  }
303  break;
304 
306  if (!a_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
308  break;
309  }
310  d1 = g_date->OldDays() + g_date->DayInYear(5, 9);
311  if (g_date->Date() <= d1) {
312  SimpleEvent(g_date->Date() + 45, dk_oggp_cutting3, false);
313  break;
314  }
315  else // end of management for cut grass
316  done = true;
317  break;
318 
319  case dk_oggp_cutting3:
320  if (!a_farm->CutToHay(m_field, 0.0, g_date->DayInYear(20, 10) - g_date->DayInYear())) {
321  SimpleEvent(g_date->Date() + 1, dk_oggp_cutting3, true);
322  break;
323  }
325  break;
326 
328  if (!a_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
330  break;
331  }
332  // end of management for cut grass
333  done = true;
334  break;
335 
336  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
337  // END of MAIN THREAD
338  default:
339  g_msg->Warn(WARN_BUG, "DK_OGrassGrazed_Perm::Do(): "
340  "Unknown event type! ", "");
341  exit(1);
342  }
343  return done;
344 }

References Farm::CattleIsOut(), Farm::CattleOut(), cfg_farm_cattle_grass_high, cfg_farm_cattle_grass_low, LE::ClearManagementActionSum(), Farm::CutToHay(), Calendar::Date(), Calendar::DayInYear(), dk_oggp_cattle_out2, dk_oggp_cutting1, dk_oggp_cutting2, dk_oggp_cutting3, dk_oggp_cutting4, dk_oggp_cutting5, dk_oggp_cutting6, dk_oggp_cutting_graze, DK_OGGP_GRASS_READY, dk_oggp_grazing2, DK_OGGP_MANURE_P, dk_oggp_manure_p1, dk_oggp_manure_p2, DK_OGGP_MANURE_S, dk_oggp_manure_s1, dk_oggp_manure_s2, dk_oggp_sleep_all_day, dk_oggp_start, dk_oggp_straw_chopping1, dk_oggp_straw_chopping2, dk_oggp_straw_chopping3, dk_oggp_straw_chopping4, dk_oggp_straw_chopping5, dk_oggp_straw_chopping6, dk_oggp_straw_chopping_graze, dk_oggp_water1, dk_oggp_water2, Farm::DoIt_prob(), Farm::FA_Manure(), Farm::FP_Manure(), g_date, g_msg, LE::GetMDates(), LE::GetVegHeight(), 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_DKOGrassGrazed_Perm, CfgInt::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_OGrassGrazed_Perm::SetUpFarmCategoryInformation ( )
inline
88  {
89  const int elements = 2 + (dk_oggp_foobar - DK_OGGP_BASE);
91 
92  FarmManagementCategory catlist[elements] =
93  {
94  fmc_Others, // zero element unused but must be here
95  fmc_Others, // dk_oggp_start = 1, // Compulsory, must always be 1 (one).
96  fmc_Others, // dk_oggp_sleep_all_day = DK_oggp_BASE,
97  fmc_Fertilizer, //dk_oggp_manure_s1,
98  fmc_Fertilizer, //dk_oggp_manure_p1,
99  fmc_Fertilizer, //dk_oggp_manure_s2,
100  fmc_Fertilizer, //dk_oggp_manure_p2,
101  fmc_Cutting, //dk_oggp_cutting1,
102  fmc_Cutting, //dk_oggp_cutting2,
103  fmc_Cutting, //dk_oggp_cutting3,
104  fmc_Cutting, //dk_oggp_cutting4,
105  fmc_Cutting, //dk_oggp_cutting5,
106  fmc_Cutting, //dk_oggp_cutting6,
107  fmc_Cutting, //dk_oggp_cutting_graze,
108  fmc_Cutting, //dk_oggp_straw_chopping1,
109  fmc_Cutting, //dk_oggp_straw_chopping2,
110  fmc_Cutting, //dk_oggp_straw_chopping3,
111  fmc_Cutting, //dk_oggp_straw_chopping4,
112  fmc_Cutting, //dk_oggp_straw_chopping5,
113  fmc_Cutting, //dk_oggp_straw_chopping6,
114  fmc_Cutting, //dk_oggp_straw_chopping_graze,
115  fmc_Grazing, //dk_oggp_grazing1,
116  fmc_Grazing, //dk_oggp_grazing2,
117  fmc_Grazing, //dk_oggp_cattle_out1,
118  fmc_Grazing, //dk_oggp_cattle_out2,
119  fmc_Watering, // dk_oggp_water1,
120  fmc_Watering, // dk_oggp_water2,
121  fmc_Others, //dk_oggp_wait
122  // no foobar entry
123 
124  };
125  // Iterate over the catlist elements and copy them to vector
126  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
127 
128  }

References DK_OGGP_BASE, dk_oggp_foobar, fmc_Cutting, fmc_Fertilizer, fmc_Grazing, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_OGrassGrazed_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_oggp_cutting2
Definition: DK_OGrassGrazed_Perm.h:45
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
dk_oggp_manure_p1
Definition: DK_OGrassGrazed_Perm.h:41
cfg_farm_cattle_grass_high
CfgInt cfg_farm_cattle_grass_high
dk_oggp_straw_chopping_graze
Definition: DK_OGrassGrazed_Perm.h:57
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
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_OGrassGrazed_Perm::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_OGrassGrazed_Perm.h:88
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
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
dk_oggp_cutting1
Definition: DK_OGrassGrazed_Perm.h:44
dk_oggp_manure_s2
Definition: DK_OGrassGrazed_Perm.h:42
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
dk_oggp_foobar
Definition: DK_OGrassGrazed_Perm.h:65
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_oggp_cutting3
Definition: DK_OGrassGrazed_Perm.h:46
tov_DKOGrassGrazed_Perm
Definition: LandscapeFarmingEnums.h:454
dk_oggp_cattle_out2
Definition: DK_OGrassGrazed_Perm.h:61
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
dk_oggp_straw_chopping1
Definition: DK_OGrassGrazed_Perm.h:51
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_oggp_water1
Definition: DK_OGrassGrazed_Perm.h:62
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_oggp_straw_chopping2
Definition: DK_OGrassGrazed_Perm.h:52
Calendar::Date
long Date(void)
Definition: Calendar.h:57
DK_OGGP_BASE
#define DK_OGGP_BASE
Definition: DK_OGrassGrazed_Perm.h:27
dk_oggp_cutting_graze
Definition: DK_OGrassGrazed_Perm.h:50
dk_oggp_cutting4
Definition: DK_OGrassGrazed_Perm.h:47
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
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
cfg_farm_cattle_grass_low
CfgInt cfg_farm_cattle_grass_low
LE::GetVegHeight
virtual double GetVegHeight(void)
Definition: Elements.h:148
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
dk_oggp_water2
Definition: DK_OGrassGrazed_Perm.h:63
dk_oggp_manure_p2
Definition: DK_OGrassGrazed_Perm.h:43
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
dk_oggp_straw_chopping5
Definition: DK_OGrassGrazed_Perm.h:55
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
dk_oggp_manure_s1
Definition: DK_OGrassGrazed_Perm.h:40
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_OGGP_GRASS_READY
#define DK_OGGP_GRASS_READY
Definition: DK_OGrassGrazed_Perm.h:25
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
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_oggp_straw_chopping6
Definition: DK_OGrassGrazed_Perm.h:56
dk_oggp_start
Definition: DK_OGrassGrazed_Perm.h:38
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
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_oggp_straw_chopping3
Definition: DK_OGrassGrazed_Perm.h:53
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
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_oggp_sleep_all_day
Definition: DK_OGrassGrazed_Perm.h:39
dk_oggp_grazing2
Definition: DK_OGrassGrazed_Perm.h:59
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
DK_OGGP_MANURE_P
#define DK_OGGP_MANURE_P
Definition: DK_OGrassGrazed_Perm.h:24
dk_oggp_cutting5
Definition: DK_OGrassGrazed_Perm.h:48
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
dk_oggp_cutting6
Definition: DK_OGrassGrazed_Perm.h:49
DK_OGGP_MANURE_S
#define DK_OGGP_MANURE_S
Definition: DK_OGrassGrazed_Perm.h:23
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
dk_oggp_straw_chopping4
Definition: DK_OGrassGrazed_Perm.h:54