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

#include <DK_WinterCloverGrassGrazedSown.h>

Inheritance diagram for DK_WinterCloverGrassGrazedSown:
Crop

Public Member Functions

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

Constructor & Destructor Documentation

◆ DK_WinterCloverGrassGrazedSown()

DK_WinterCloverGrassGrazedSown::DK_WinterCloverGrassGrazedSown ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
74  : Crop(a_tov, a_toc, a_L)
75  {
76  m_first_date = g_date->DayInYear(12, 8);
78  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

42 {
43  m_farm = a_farm;
44  m_field = a_field;
45  m_ev = a_ev;
46  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).
47  bool flag = false;
48  int d1 = 0;
49  int noDates = 1;
50  TTypesOfVegetation l_tov = tov_DKWinterCloverGrassGrazedSown; // The current type - change to match the crop you have
51 
52  switch (m_ev->m_todo)
53  {
54  case dk_wcs_start:
55  {
56 
57  DK_WCS_CUT = false;
58  DK_WCS_CC = false;
59  a_field->ClearManagementActionSum();
60 
61  m_last_date = g_date->DayInYear(10, 8); // Should match the last flexdate below
62  //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
63  std::vector<std::vector<int>> flexdates(2 + 1, std::vector<int>(2, 0));
64  // Set up the date management stuff
65  // Start and stop dates for all events after harvest
66  flexdates[0][1] = g_date->DayInYear(8, 8); // last possible day of swathing
67  // Now these are done in pairs, start & end for each operation. If its not used then -1
68  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
69  flexdates[1][1] = g_date->DayInYear(10, 8); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1) // harvest
70  flexdates[2][0] = -1;; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 2)
71  flexdates[2][1] = g_date->DayInYear(10, 8); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 2) // straw removal
72  // 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
73  if (StartUpCrop(0, flexdates, int(dk_wcs_cutting1))) break;
74 
75  // End single block date checking code. Please see next line comment as well.
76  // Reinit d1 to first possible starting date.
77  d1 = g_date->OldDays() + g_date->DayInYear(11, 8);
78  // OK, let's go.
80  }
81  break;
82 
84  if (m_ev->m_lock || m_farm->DoIt_prob(.85)) {
85  if (!m_farm->AutumnPlough(m_field, 0.0,
86  g_date->DayInYear(12, 8) - g_date->DayInYear())) {
88  break;
89  }
90  }
92  break;
93 
95  if (!m_farm->AutumnRoll(m_field, 0.0,
96  g_date->DayInYear(12, 8) - g_date->DayInYear())) {
98  break;
99  }
101  break;
102 
104  if (!m_farm->ShallowHarrow(m_field, 0.0,
105  g_date->DayInYear(13, 8) - g_date->DayInYear())) {
107  break;
108  }
109  if (a_farm->IsStockFarmer()) {
110  SimpleEvent(g_date->Date() + 1, dk_wcs_manure_pig_s, false);
111  break;
112  }
113  else SimpleEvent(g_date->Date() + 1, dk_wcs_manure_pig_p, false);
114  break;
115 
116  case dk_wcs_manure_pig_s:
117  if (!m_farm->FA_Slurry(m_field, 0.0,
118  g_date->DayInYear(14, 8) - g_date->DayInYear())) {
120  break;
121  }
122  SimpleEvent(g_date->Date() + 7, dk_wcs_npk_s, false);
123  break;
124 
125  case dk_wcs_manure_pig_p:
126  if (!m_farm->FP_Slurry(m_field, 0.0,
127  g_date->DayInYear(14, 8) - g_date->DayInYear())) {
129  break;
130  }
131  SimpleEvent(g_date->Date() + 7, dk_wcs_npk_p, false);
132  break;
133 
134  case dk_wcs_npk_s:
135  if (!m_farm->FA_NPK(m_field, 0.0,
136  g_date->DayInYear(24, 8) - g_date->DayInYear())) {
137  SimpleEvent(g_date->Date() + 1, dk_wcs_npk_s, true);
138  break;
139  }
140  if (m_ev->m_lock || m_farm->DoIt_prob(.5)) {
141  SimpleEvent(g_date->Date() + 1, dk_wcs_sow, false);
142  break;
143  }
144  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 8), dk_wcs_sow, false);
145  break;
146 
147  case dk_wcs_npk_p:
148  if (!m_farm->FP_NPK(m_field, 0.0,
149  g_date->DayInYear(24, 8) - g_date->DayInYear())) {
150  SimpleEvent(g_date->Date() + 1, dk_wcs_npk_p, true);
151  break;
152  }
153  if (m_ev->m_lock || m_farm->DoIt_prob(.5)) {
154  SimpleEvent(g_date->Date() + 1, dk_wcs_sow, false);
155  break;
156  }
157  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 8), dk_wcs_sow, false);
158  break;
159 
160  case dk_wcs_sow:
161  if (!m_farm->AutumnSow(m_field, 0.0,
162  g_date->DayInYear(6, 9) - g_date->DayInYear())) {
163  SimpleEvent(g_date->Date() + 1, dk_wcs_sow, true);
164  break;
165  }
167  break;
168 
169  case dk_wcs_autumn_roll2:
170  if (m_ev->m_lock || m_farm->DoIt_prob(.8)) {
171  if (!m_farm->AutumnRoll(m_field, 0.0,
172  g_date->DayInYear(6, 9) - g_date->DayInYear())) {
174  break;
175  }
176  }
178  SimpleEvent(g_date->Date() + 7, dk_wcs_herbicide1, false); // main thread
179  break;
180 
181  case dk_wcs_insecticide:
182  if (m_ev->m_lock || m_farm->DoIt_prob(.02) ) {
183  // here we check whether we are using ERA pesticide or not
184  d1 = g_date->DayInYear(30, 9) - g_date->DayInYear();
185  if (!cfg_pest_grass_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
186  {
187  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
188  }
189  else {
191  }
192  if (!flag) {
193  SimpleEvent(g_date->Date() + 1, dk_wcs_insecticide, true);
194  break;
195  }
196  }
197  break; // end of thread
198 
199  case dk_wcs_herbicide1:
200  if (m_ev->m_lock || m_farm->DoIt_prob(.8)) {
201  if (!m_farm->HerbicideTreat(m_field, 0.0,
202  g_date->DayInYear(30, 9) - g_date->DayInYear())) {
203  SimpleEvent(g_date->Date() + 1, dk_wcs_herbicide1, true);
204  break;
205  }
206  }
207  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, dk_wcs_sow_spot, false); // sow spot thread
208  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 4) + 365, dk_wcs_water, false); // water thread
209  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, dk_wcs_cutting1, false);// main thread
210  break;
211 
212  case dk_wcs_sow_spot:
213  if (m_ev->m_lock || m_farm->DoIt_prob(.04)) {
214  if (!m_farm->SpringSow(m_field, 0.0,
215  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
216  SimpleEvent(g_date->Date() + 1, dk_wcs_sow_spot, true);
217  break;
218  }
219  }
220  break; // end of thread
221 
222  case dk_wcs_water:
223  if (m_ev->m_lock || m_farm->DoIt_prob(.50)) { // 50% water
224  if (!m_farm->Water(m_field, 0.0,
225  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
226  SimpleEvent(g_date->Date() + 1, dk_wcs_water, true);
227  break;
228  }
229  }
230  break; // end of thread
231 
232  case dk_wcs_cutting1:
233  if (m_ev->m_lock || m_farm->DoIt_prob(.90)) { // 90% cut to silage, 10% graze
234  if (!m_farm->CutToSilage(m_field, 0.0,
235  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
236  SimpleEvent(g_date->Date() + 1, dk_wcs_cutting1, true);
237  break;
238  }
239  DK_WCS_CUT = true; //we need to remember who did cutting
240  SimpleEvent(g_date->Date() + 35, dk_wcs_cutting2, false);
241  break;
242  }
243  else{
245  break;
246  }
247 
249  if (m_ev->m_lock || m_farm->DoIt_prob(.50)) { // 50% cut to silage of the 10% that will do grazing
250  if (!m_farm->CutToSilage(m_field, 0.0,
251  g_date->DayInYear(1, 6) - g_date->DayInYear())) {
253  break;
254  }
255  SimpleEvent(g_date->Date() + 14, dk_wcs_grazing, false);
256  break;
257  }
259  break;
260 
261  case dk_wcs_cutting2:
262  if (DK_WCS_CUT == true) {
263  if (!m_farm->CutToSilage(m_field, 0.0,
264  g_date->DayInYear(20, 7) - g_date->DayInYear())) {
265  SimpleEvent(g_date->Date() + 1, dk_wcs_cutting2, true);
266  break;
267  }
268  }
270  break;
271 
272  case dk_wcs_grazing:
274  if (a_field->GetVegHeight() < cfg_farm_cattle_grass_low.value()) GRASS_READY_WCS = false;
276  SimpleEvent(g_date->Date() + 1, dk_wcs_grazing, true);
277  break;
278  }
279  SimpleEvent(g_date->Date() + 1, dk_wcs_cattle_out, false);
280  break;
281 
282  case dk_wcs_cattle_out: // Keep the cattle out there
283  // CattleIsOut() returns false if it is not time to stop grazing
285  if (a_field->GetVegHeight() < cfg_farm_cattle_grass_low.value()) GRASS_READY_WCS = false;
287  SimpleEvent(g_date->Date() + 1, dk_wcs_cattle_out, false);
288  break;
289  }
290  SimpleEvent(g_date->Date() + 10, dk_wcs_herbicide2, false);
291  break;
292 
293  case dk_wcs_herbicide2:
294  if (!m_farm->HerbicideTreat(m_field, 0.0,
295  g_date->DayInYear(6, 8) - g_date->DayInYear())) {
296  SimpleEvent(g_date->Date() + 1, dk_wcs_herbicide2, true);
297  break;
298  }
300  break;
301 
302  case dk_wcs_swathing:
303  if (m_ev->m_lock || m_farm->DoIt_prob(.10)) { // 10% do swathing
304  if (!m_farm->Swathing(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
305  SimpleEvent(g_date->Date() + 1, dk_wcs_swathing, true);
306  break;
307  }
308  }
309  SimpleEvent(g_date->Date() + 2, dk_wcs_harvest, false);
310  break;
311 
312  case dk_wcs_harvest:
313  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
314  SimpleEvent(g_date->Date() + 1, dk_wcs_harvest, true);
315  break;
316  }
318  break;
319 
321  if (!m_farm->StrawRemoval(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
323  break;
324  }
325  SimpleEvent(g_date->Date() + 1, dk_wcs_force_growth, false);
326  break;
327  case dk_wcs_force_growth: // Need to add this in the end to make sure grass decays in winter
328  if (g_date->DayInYear() < g_date->DayInYear(1, 11)) {
330  break;
331  }
332  else if (g_date->DayInYear() < g_date->DayInYear(31, 12)) {
333  a_field->ForceGrowthTest();
335  break;
336  }
337  done = true;
338  break;
339 
340 
341  default:
342  g_msg->Warn(WARN_BUG, "DK_WinterCloverGrassGrazedSown::Do(): "
343  "Unknown event type! ", "");
344  exit(1);
345  }
346 
347  return done;
348 }

References Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), 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_wcs_autumn_harrow, dk_wcs_autumn_plough, dk_wcs_autumn_roll1, dk_wcs_autumn_roll2, dk_wcs_cattle_out, DK_WCS_CC, DK_WCS_CUT, dk_wcs_cutting1, dk_wcs_cutting2, dk_wcs_cutting_graze, dk_wcs_force_growth, dk_wcs_grass_collected, dk_wcs_grazing, dk_wcs_harvest, dk_wcs_herbicide1, dk_wcs_herbicide2, dk_wcs_insecticide, dk_wcs_manure_pig_p, dk_wcs_manure_pig_s, dk_wcs_npk_p, dk_wcs_npk_s, dk_wcs_sow, dk_wcs_sow_spot, dk_wcs_start, dk_wcs_swathing, dk_wcs_water, Farm::DoIt_prob(), Farm::FA_NPK(), Farm::FA_Slurry(), LE::ForceGrowthTest(), Farm::FP_NPK(), Farm::FP_Slurry(), g_date, g_msg, LE::GetMDates(), LE::GetVegHeight(), GRASS_READY_WCS, Farm::Harvest(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::ProductApplication(), Farm::ShallowHarrow(), Crop::SimpleEvent(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StrawRemoval(), Farm::Swathing(), tov_DKWinterCloverGrassGrazedSown, CfgInt::value(), CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_WinterCloverGrassGrazedSown::SetUpFarmCategoryInformation ( )
inline
79  {
80  const int elements = 2 + (dk_wcs_foobar - DK_WCS_BASE);
82 
83  FarmManagementCategory catlist[elements] =
84  {
85  fmc_Others, // zero element unused but must be here
86  fmc_Others, // dk_wcs_start = 1, // Compulsory, start event must always be 1 (one).
87  fmc_Harvest, // dk_wcs_harvest = DK_LW_BASE,
88  fmc_Cultivation, // dk_wcs_autumn_plough,
89  fmc_Cultivation, // dk_wcs_autumn_roll1,
90  fmc_Cultivation, // dk_wcs_autumn_harrow,
91  fmc_Cultivation, // dk_wcs_autumn_roll2,
92  fmc_Fertilizer, // dk_wcs_manure_pig_s,
93  fmc_Fertilizer, // dk_wcs_npk_s,
94  fmc_Fertilizer, // dk_wcs_manure_pig_p,
95  fmc_Fertilizer, // dk_wcs_npk_p,
96  fmc_Others, // dk_wcs_sow,
97  fmc_Herbicide, // dk_wcs_herbicide1,
98  fmc_Insecticide, // dk_wcs_insecticide,
99  fmc_Others, // dk_wcs_sow_spot,
100  fmc_Cutting, // dk_wcs_cutting1,
101  fmc_Cutting, // dk_wcs_cutting_graze,
102  fmc_Cutting, // dk_wcs_cutting2,
103  fmc_Cutting, // dk_wcs_cutting3,
104  fmc_Cutting, // dk_wcs_cutting4,
105  fmc_Grazing, // dk_wcs_grazing,
106  fmc_Grazing, // dk_wcs_cattle_out,
107  fmc_Herbicide, // dk_wcs_herbicide2,
108  fmc_Watering, // dk_wcs_water,
109  fmc_Cutting, // dk_wcs_swathing,
110  fmc_Others, // dk_wcs_grass_collected.,
111  fmc_Others, // dk_wcs_wait,
112  fmc_Others, // dk_wcs_force_growth,
113 
114  // no foobar entry
115 
116  };
117  // Iterate over the catlist elements and copy them to vector
118  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
119 
120  }

References DK_WCS_BASE, dk_wcs_foobar, fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Grazing, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_WinterCloverGrassGrazedSown().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
dk_wcs_harvest
Definition: DK_WinterCloverGrassGrazedSown.h:39
dk_wcs_cutting1
Definition: DK_WinterCloverGrassGrazedSown.h:52
dk_wcs_manure_pig_p
Definition: DK_WinterCloverGrassGrazedSown.h:46
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
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
dk_wcs_force_growth
Definition: DK_WinterCloverGrassGrazedSown.h:64
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
dk_wcs_cattle_out
Definition: DK_WinterCloverGrassGrazedSown.h:58
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
cfg_farm_cattle_grass_low
CfgInt cfg_farm_cattle_grass_low
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
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
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_wcs_foobar
Definition: DK_WinterCloverGrassGrazedSown.h:65
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
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
dk_wcs_npk_p
Definition: DK_WinterCloverGrassGrazedSown.h:47
dk_wcs_water
Definition: DK_WinterCloverGrassGrazedSown.h:60
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
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
dk_wcs_cutting_graze
Definition: DK_WinterCloverGrassGrazedSown.h:53
dk_wcs_start
Definition: DK_WinterCloverGrassGrazedSown.h:38
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Farm::FA_NPK
virtual bool FA_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:982
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_wcs_insecticide
Definition: DK_WinterCloverGrassGrazedSown.h:50
CfgBool::value
bool value() const
Definition: Configurator.h:164
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
DK_WCS_CC
#define DK_WCS_CC
Definition: DK_WinterCloverGrassGrazedSown.h:33
tov_DKWinterCloverGrassGrazedSown
Definition: LandscapeFarmingEnums.h:369
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_wcs_autumn_roll1
Definition: DK_WinterCloverGrassGrazedSown.h:41
DK_WinterCloverGrassGrazedSown::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_WinterCloverGrassGrazedSown.h:79
Calendar::Date
long Date(void)
Definition: Calendar.h:57
cfg_pest_grass_on
CfgBool cfg_pest_grass_on
Turn on pesticides for grass.
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
dk_wcs_herbicide1
Definition: DK_WinterCloverGrassGrazedSown.h:49
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
dk_wcs_npk_s
Definition: DK_WinterCloverGrassGrazedSown.h:45
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_wcs_autumn_roll2
Definition: DK_WinterCloverGrassGrazedSown.h:43
dk_wcs_herbicide2
Definition: DK_WinterCloverGrassGrazedSown.h:59
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
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_wcs_grazing
Definition: DK_WinterCloverGrassGrazedSown.h:57
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
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
dk_wcs_sow
Definition: DK_WinterCloverGrassGrazedSown.h:48
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
Farm::AutumnRoll
virtual bool AutumnRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the autumn on a_field.
Definition: FarmFuncs.cpp:299
Farm::ShallowHarrow
virtual bool ShallowHarrow(LE *a_field, double a_user, int a_days)
Carry out a shallow harrow event on a_field, e.g., after grass cutting event.
Definition: FarmFuncs.cpp:473
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
GRASS_READY_WCS
#define GRASS_READY_WCS
Definition: DK_WinterCloverGrassGrazedSown.h:35
dk_wcs_manure_pig_s
Definition: DK_WinterCloverGrassGrazedSown.h:44
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
dk_wcs_cutting2
Definition: DK_WinterCloverGrassGrazedSown.h:54
Farm::AutumnPlough
virtual bool AutumnPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the autumn on a_field.
Definition: FarmFuncs.cpp:212
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_wcs_autumn_harrow
Definition: DK_WinterCloverGrassGrazedSown.h:42
Crop::m_date_modifier
static int m_date_modifier
Holds a value that shifts test pesticide use by this many days in crops modified to use it.
Definition: Farm.h:514
Farm::AutumnSow
virtual bool AutumnSow(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 autumn on a_field.
Definition: FarmFuncs.cpp:360
dk_wcs_grass_collected
Definition: DK_WinterCloverGrassGrazedSown.h:62
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
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.
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
dk_wcs_sow_spot
Definition: DK_WinterCloverGrassGrazedSown.h:51
cfg_farm_cattle_grass_high
CfgInt cfg_farm_cattle_grass_high
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
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::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_wcs_autumn_plough
Definition: DK_WinterCloverGrassGrazedSown.h:40
dk_wcs_swathing
Definition: DK_WinterCloverGrassGrazedSown.h:61
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
DK_WCS_BASE
#define DK_WCS_BASE
Definition: DK_WinterCloverGrassGrazedSown.h:31
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
DK_WCS_CUT
#define DK_WCS_CUT
Definition: DK_WinterCloverGrassGrazedSown.h:34