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

DK_CloverGrassGrazed2 class
. More...

#include <DK_CloverGrassGrazed2.h>

Inheritance diagram for DK_CloverGrassGrazed2:
Crop

Public Member Functions

virtual bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 
 DK_CloverGrassGrazed2 (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_CloverGrassGrazed2 class
.

See CloverGrassGrazed2.h::OCloverGrassGrazed2ToDo for a complete list of all possible events triggered codes by the OCloverGrassGrazed2 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_CloverGrassGrazed2()

DK_CloverGrassGrazed2::DK_CloverGrassGrazed2 ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
104  : Crop(a_tov, a_toc, a_L)
105  {
106  // When we start it off, the first possible date for a farm operation
107  // This information is used by other crops when they decide how much post processing of
108  // the management is allowed after harvest before the next crop starts.
109  m_first_date = g_date->DayInYear(1, 12);
111  }

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

Member Function Documentation

◆ Do()

bool DK_CloverGrassGrazed2::Do ( Farm a_farm,
LE a_field,
FarmEvent a_ev 
)
virtual

Reimplemented from Crop.

83 {
84  m_farm = a_farm;
85  m_field = a_field;
86  m_ev = a_ev;
87  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).
88  bool flag = false;
89  int d1 = 0;
90  int noDates = 1;
91  TTypesOfVegetation l_tov = tov_DKCloverGrassGrazed2; // The current type - change to match the crop you have
92 
93  switch (m_ev->m_todo)
94  {
95  case dk_c2_start:
96  {
97  a_field->ClearManagementActionSum();
98 
99  DK_C2_CUT = false;
100  DK_C2_CC = false;
101 
102  m_last_date = g_date->DayInYear(5, 9); // Should match the last flexdate below - 15/9
103  //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
104  std::vector<std::vector<int>> flexdates(2 + 1, std::vector<int>(2, 0));
105  // Set up the date management stuff
106  // Start and stop dates for all events after harvest
107  flexdates[0][1] = g_date->DayInYear(3, 9); // last possible day (swathing) - 13/9
108  // Now these are done in pairs, start & end for each operation. If its not used then -1
109  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
110  flexdates[1][1] = g_date->DayInYear(5, 9); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1) harvest -. 15/9
111  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 2 (start op 2)
112  flexdates[2][1] = g_date->DayInYear(5, 9); // This date will be moved back as far as necessary and potentially to flexdates 2 (end op 2) straw removal - 15/9
113 
114  // 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
115  int isSpring = 365;
116  if (StartUpCrop(isSpring, flexdates, int(dk_c2_sow_spot))) break;
117 
118  // End single block date checking code. Please see next line comment as well.
119  // Reinit d1 to first possible starting date.
120  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + isSpring;
121  // OK, let's go.
122  SimpleEvent(d1, dk_c2_sow_spot, false);
123  }
124  break; // this code is only for the first year of clover grass (establishment) w/o cover crop
125 
126  case dk_c2_sow_spot:
127  if (m_ev->m_lock || m_farm->DoIt_prob(.04)) {
128  if (!m_farm->SpringSow(m_field, 0.0,
129  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
130  SimpleEvent(g_date->Date() + 1, dk_c2_sow_spot, true);
131  break;
132  }
133  }
134  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 4), dk_c2_water, false); // water thread
135  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_c2_cutting1, false);// main thread
136  break;
137 
138  case dk_c2_water:
139  if (m_ev->m_lock || m_farm->DoIt_prob(.50)) { // 50% water
140  if (!m_farm->Water(m_field, 0.0,
141  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
142  SimpleEvent(g_date->Date() + 1, dk_c2_water, true);
143  break;
144  }
145  }
146  break; // end of thread
147 
148  case dk_c2_cutting1:
149  if (m_ev->m_lock || m_farm->DoIt_prob(.90)) { // 90% cut to silage, 10% graze
150  if (!m_farm->CutToSilage(m_field, 0.0,
151  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
152  SimpleEvent(g_date->Date() + 1, dk_c2_cutting1, true);
153  break;
154  }
155  DK_C2_CUT = true; //we need to remember who did cutting
156  SimpleEvent(g_date->Date() + 35, dk_c2_cutting2, false);
157  break;
158  }
159  else{
161  break;
162  }
163 
164  case dk_c2_cutting_graze:
165  if (m_ev->m_lock || m_farm->DoIt_prob(.50)) { // 50% cut to silage of the 10% that will do grazing
166  if (!m_farm->CutToSilage(m_field, 0.0,
167  g_date->DayInYear(1, 6) - g_date->DayInYear())) {
169  break;
170  }
171  SimpleEvent(g_date->Date() + 14, dk_c2_grazing, false);
172  break;
173  }
175  break;
176 
177  case dk_c2_cutting2:
178  if (DK_C2_CUT == true) {
179  if (!m_farm->CutToSilage(m_field, 0.0,
180  g_date->DayInYear(20, 7) - g_date->DayInYear())) {
181  SimpleEvent(g_date->Date() + 1, dk_c2_cutting2, true);
182  break;
183  }
184  }
185  SimpleEvent(g_date->Date() + 35, dk_c2_cutting3, false);
186  break;
187 
188  case dk_c2_cutting3:
189  if (DK_C2_CUT == true) {
190  if (!m_farm->CutToSilage(m_field, 0.0,
191  g_date->DayInYear(25, 8) - g_date->DayInYear())) {
192  SimpleEvent(g_date->Date() + 1, dk_c2_cutting3, true);
193  break;
194  }
195  }
196  d1 = g_date->Date();
197  if (d1 < g_date->OldDays() + g_date->DayInYear(25, 7)) {
198  SimpleEvent(g_date->Date() + 35, dk_c2_cutting4, false);
199  break;
200  }
201  else SimpleEvent(g_date->Date() + 20, dk_c2_insecticide, false);
202  break;
203 
204  case dk_c2_cutting4:
205  if (DK_C2_CUT == true) {
206  if (!m_farm->CutToSilage(m_field, 0.0,
207  g_date->DayInYear(31, 8) - g_date->DayInYear())) {
208  SimpleEvent(g_date->Date() + 1, dk_c2_cutting4, true);
209  break;
210  }
211  }
212  SimpleEvent(g_date->Date() + 20, dk_c2_insecticide, false);
213  break;
214 
215  case dk_c2_grazing:
216  if (a_field->GetVegHeight() > cfg_farm_cattle_grass_high.value()) GRASS_READY_C2 = true;
217  if (a_field->GetVegHeight() < cfg_farm_cattle_grass_low.value()) GRASS_READY_C2 = false;
218  if (!m_farm->CattleOut(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear(), GRASS_READY_C2)) {
219  SimpleEvent(g_date->Date() + 1, dk_c2_grazing, true);
220  break;
221  }
222  SimpleEvent(g_date->Date() + 1, dk_c2_cattle_out, false);
223  break;
224 
225  case dk_c2_cattle_out: // Keep the cattle out there
226  // CattleIsOut() returns false if it is not time to stop grazing
227  if (a_field->GetVegHeight() > cfg_farm_cattle_grass_high.value()) GRASS_READY_C2 = true;
228  if (a_field->GetVegHeight() < cfg_farm_cattle_grass_low.value()) GRASS_READY_C2 = false;
229  if (!a_farm->CattleIsOut(a_field, 0.0, g_date->DayInYear(10, 8) - g_date->DayInYear(), g_date->DayInYear(10, 8), GRASS_READY_C2)) {
230  SimpleEvent(g_date->Date() + 1, dk_c2_cattle_out, false);
231  break;
232  }
233  SimpleEvent(g_date->Date() + 10, dk_c2_herbicide2, false);
234  break;
235 
236  case dk_c2_herbicide2:
237  if (!m_farm->HerbicideTreat(m_field, 0.0,
238  g_date->DayInYear(20, 8) - g_date->DayInYear())) {
239  SimpleEvent(g_date->Date() + 1, dk_c2_herbicide2, true);
240  break;
241  }
242  SimpleEvent(g_date->Date() + 20, dk_c2_insecticide, false);
243  break;
244 
245  case dk_c2_insecticide:
246  d1 = g_date->Date();
247  if (d1 > g_date->OldDays() + g_date->DayInYear(1, 9)) {
248  if (m_ev->m_lock || m_farm->DoIt_prob(.02) || AphidDamage(m_field)) {
249  // here we check whether we are using ERA pesticide or not
250  d1 = g_date->DayInYear(28, 9) - g_date->DayInYear();
251  if (!cfg_pest_grass_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
252  {
253  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
254  }
255  else {
257  }
258  if (!flag) {
259  SimpleEvent(g_date->Date() + 1, dk_c2_insecticide, true);
260  break;
261  }
262  }
263  SimpleEvent(g_date->Date() + 1, dk_c2_swathing, false);
264  break;
265  }
267  break;
268 
269  case dk_c2_swathing:
270  if (m_ev->m_lock || m_farm->DoIt_prob(.10)) { // 10% do swathing
271  if (!m_farm->Swathing(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
272  SimpleEvent(g_date->Date() + 1, dk_c2_swathing, true);
273  break;
274  }
275  }
276  SimpleEvent(g_date->Date() + 2, dk_c2_harvest, false);
277  break;
278 
279  case dk_c2_harvest:
280  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
281  SimpleEvent(g_date->Date() + 1, dk_c2_harvest, true);
282  break;
283  }
285  break;
286 
288  if (!m_farm->StrawRemoval(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
290  break;
291  }
292  SimpleEvent(g_date->Date() + 1, dk_c2_force_growth, false);
293  break;
294  case dk_c2_force_growth: // Need to add this in the end to make sure grass decays in winter
295  if (g_date->DayInYear() < g_date->DayInYear(1, 11)) {
296  SimpleEvent(g_date->Date() + 1, dk_c2_force_growth, true);
297  break;
298  }
299  else if (g_date->DayInYear() < g_date->DayInYear(31, 12)) {
300  a_field->ForceGrowthTest();
301  SimpleEvent(g_date->Date() + 1, dk_c2_force_growth, true);
302  break;
303  }
304  done = true;
305  break;
306  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
307  // END OF MAIN THREAD
308  default:
309  g_msg->Warn(WARN_BUG, "DK_CloverGrassGrazed2::Do(): "
310  "Unknown event type! ", "");
311  exit(1);
312  }
313  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
314  return done;
315 }

References Crop::AphidDamage(), Farm::CattleIsOut(), Farm::CattleOut(), cfg_farm_cattle_grass_high, cfg_farm_cattle_grass_low, cfg_pest_grass_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Farm::CutToSilage(), Calendar::Date(), Calendar::DayInYear(), dk_c2_cattle_out, DK_C2_CC, DK_C2_CUT, dk_c2_cutting1, dk_c2_cutting2, dk_c2_cutting3, dk_c2_cutting4, dk_c2_cutting_graze, dk_c2_force_growth, dk_c2_grass_collected, dk_c2_grazing, dk_c2_harvest, dk_c2_herbicide2, dk_c2_insecticide, dk_c2_sow_spot, dk_c2_start, dk_c2_swathing, dk_c2_water, Farm::DoIt_prob(), LE::ForceGrowthTest(), g_date, g_msg, LE::GetMDates(), LE::GetVegHeight(), GRASS_READY_C2, Farm::Harvest(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::ProductApplication(), Crop::SimpleEvent(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StrawRemoval(), Farm::Swathing(), tov_DKCloverGrassGrazed2, CfgInt::value(), CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_CloverGrassGrazed2::SetUpFarmCategoryInformation ( )
inline
112  {
113  const int elements = 2 + (dk_c2_foobar - DK_C2_BASE);
115 
116  FarmManagementCategory catlist[elements] =
117  {
118  fmc_Others, // zero element unused but must be here
119  fmc_Others, // dk_c2_start = 1, // Compulsory, must always be 1 (one).
120  fmc_Others, // dk_c2_sleep_all_day = DK_C2_BASE,
121  fmc_Others, // dk_c2_sow_spot,
122  fmc_Cutting, // dk_c2_cutting1,
123  fmc_Cutting, // dk_c2_cutting_graze,
124  fmc_Cutting, // dk_c2_cutting2,
125  fmc_Cutting, // dk_c2_cutting3,
126  fmc_Cutting, // dk_c2_cutting4,
127  fmc_Grazing, // dk_c2_grazing,
128  fmc_Grazing, // dk_c2_cattle_out,
129  fmc_Herbicide, // dk_c2_herbicide2,
130  fmc_Watering, // dk_c2_water,
131  fmc_Cutting, // dk_c2_swathing,
132  fmc_Others, // dk_c2_grass_collected.,
133  fmc_Others, // dk_c2_wait,
134  fmc_Others // dk_c2_force_growth
135 
136 
137  // no foobar entry
138 
139  };
140  // Iterate over the catlist elements and copy them to vector
141  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
142 
143  }

References DK_C2_BASE, dk_c2_foobar, fmc_Cutting, fmc_Grazing, fmc_Herbicide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_CloverGrassGrazed2().


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
cfg_farm_cattle_grass_high
CfgInt cfg_farm_cattle_grass_high
dk_c2_herbicide2
Definition: DK_CloverGrassGrazed2.h:80
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
dk_c2_cutting_graze
Definition: DK_CloverGrassGrazed2.h:74
Farm::Harvest
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: FarmFuncs.cpp:1364
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
Farm::ProductApplication
virtual bool ProductApplication(LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp, bool a_isgranularpesticide=false, int a_orcharddrifttype=0)
Apply test pesticide to a_field.
Definition: FarmFuncs.cpp:2267
dk_c2_cattle_out
Definition: DK_CloverGrassGrazed2.h:79
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::CutToSilage
virtual bool CutToSilage(LE *a_field, double a_user, int a_days)
Cut vegetation for silage on a_field.
Definition: FarmFuncs.cpp:1644
Farm::StrawRemoval
virtual bool StrawRemoval(LE *a_field, double a_user, int a_days)
Straw covering applied on a_field.
Definition: FarmFuncs.cpp:1752
DK_C2_BASE
#define DK_C2_BASE
Definition: DK_CloverGrassGrazed2.h:53
LE::ForceGrowthTest
virtual void ForceGrowthTest(void)
Definition: Elements.h:188
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
DK_C2_CUT
#define DK_C2_CUT
Definition: DK_CloverGrassGrazed2.h:56
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
DK_C2_CC
#define DK_C2_CC
Definition: DK_CloverGrassGrazed2.h:55
DK_CloverGrassGrazed2::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_CloverGrassGrazed2.h:112
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
cfg_pest_product_amounts
CfgArray_Double cfg_pest_product_amounts
Amount of pesticide applied in grams of active substance per hectare for each of the 10 pesticides.
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
dk_c2_cutting2
Definition: DK_CloverGrassGrazed2.h:75
tov_DKCloverGrassGrazed2
Definition: LandscapeFarmingEnums.h:371
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
CfgBool::value
bool value() const
Definition: Configurator.h:164
dk_c2_cutting3
Definition: DK_CloverGrassGrazed2.h:76
dk_c2_cutting1
Definition: DK_CloverGrassGrazed2.h:73
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
GRASS_READY_C2
#define GRASS_READY_C2
Definition: DK_CloverGrassGrazed2.h:57
cfg_farm_cattle_grass_low
CfgInt cfg_farm_cattle_grass_low
Calendar::Date
long Date(void)
Definition: Calendar.h:57
dk_c2_water
Definition: DK_CloverGrassGrazed2.h:81
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
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_c2_grazing
Definition: DK_CloverGrassGrazed2.h:78
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
dk_c2_insecticide
Definition: DK_CloverGrassGrazed2.h:82
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_c2_force_growth
Definition: DK_CloverGrassGrazed2.h:86
dk_c2_swathing
Definition: DK_CloverGrassGrazed2.h:83
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_c2_start
Definition: DK_CloverGrassGrazed2.h:69
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
dk_c2_grass_collected
Definition: DK_CloverGrassGrazed2.h:84
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
cfg_pest_grass_on
CfgBool cfg_pest_grass_on
Turn on pesticides for grass.
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
dk_c2_cutting4
Definition: DK_CloverGrassGrazed2.h:77
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
dk_c2_harvest
Definition: DK_CloverGrassGrazed2.h:71
Farm::Swathing
virtual bool Swathing(LE *a_field, double a_user, int a_days)
Cut the crop on a_field and leave it lying (probably rape)
Definition: FarmFuncs.cpp:1350
Crop::AphidDamage
bool AphidDamage(LE *a_field)
Compares aphid numbers per m2 with a threshold to return true if threshold is exceeded.
Definition: Farm.cpp:726
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
dk_c2_sow_spot
Definition: DK_CloverGrassGrazed2.h:72
dk_c2_foobar
Definition: DK_CloverGrassGrazed2.h:87
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001