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

#include <DK_WinterFodderGrass.h>

Inheritance diagram for DK_WinterFodderGrass:
Crop

Public Member Functions

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

DK_WinterFodderGrass::DK_WinterFodderGrass ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
72  : Crop(a_tov, a_toc, a_L)
73  {
74  m_first_date = g_date->DayInYear(26, 8);
76  }

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

Member Function Documentation

◆ Do()

bool DK_WinterFodderGrass::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_DKWinterFodderGrass; // The current type - change to match the crop you have
51 
52  switch (m_ev->m_todo)
53  {
54  case dk_wfg_start:
55  {
56  DK_WFG_CUT = false;
57  DK_WFG_CC = false;
58 
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_wfg_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(26, 8) - g_date->DayInYear())) { // changed from 12/8 to fit rotation
88  break;
89  }
90  }
92  break;
93 
95  if (!m_farm->AutumnRoll(m_field, 0.0,
96  g_date->DayInYear(26, 8) - g_date->DayInYear())) {
98  break;
99  }
101  break;
102 
104  if (!m_farm->ShallowHarrow(m_field, 0.0,
105  g_date->DayInYear(27, 8) - g_date->DayInYear())) {
107  break;
108  }
109  if (a_farm->IsStockFarmer()) {
110  SimpleEvent(g_date->Date() + 1, dk_wfg_manure_pig_s, false);
111  break;
112  }
113  else SimpleEvent(g_date->Date() + 1, dk_wfg_manure_pig_p, false);
114  break;
115 
116  case dk_wfg_manure_pig_s:
117  if (!m_farm->FA_Slurry(m_field, 0.0,
118  g_date->DayInYear(28, 8) - g_date->DayInYear())) {
120  break;
121  }
122  SimpleEvent(g_date->Date() + 7, dk_wfg_npk_s, false);
123  break;
124 
125  case dk_wfg_manure_pig_p:
126  if (!m_farm->FP_Slurry(m_field, 0.0,
127  g_date->DayInYear(28, 8) - g_date->DayInYear())) {
129  break;
130  }
131  SimpleEvent(g_date->Date() + 7, dk_wfg_npk_p, false);
132  break;
133 
134  case dk_wfg_npk_s:
135  if (!m_farm->FA_NPK(m_field, 0.0,
136  g_date->DayInYear(5, 9) - g_date->DayInYear())) {
137  SimpleEvent(g_date->Date() + 1, dk_wfg_npk_s, true);
138  break;
139  }
140  if (m_ev->m_lock || m_farm->DoIt_prob(.5)) {
141  SimpleEvent(g_date->Date() + 1, dk_wfg_sow, false);
142  break;
143  }
144  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 8), dk_wfg_sow, false);
145  break;
146 
147  case dk_wfg_npk_p:
148  if (!m_farm->FP_NPK(m_field, 0.0,
149  g_date->DayInYear(5, 9) - g_date->DayInYear())) {
150  SimpleEvent(g_date->Date() + 1, dk_wfg_npk_p, true);
151  break;
152  }
153  if (m_ev->m_lock || m_farm->DoIt_prob(.5)) {
154  SimpleEvent(g_date->Date() + 1, dk_wfg_sow, false);
155  break;
156  }
157  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 8), dk_wfg_sow, false);
158  break;
159 
160  case dk_wfg_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_wfg_sow, true);
164  break;
165  }
167  break;
168 
169  case dk_wfg_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_wfg_herbicide1, false); // main thread
179  break;
180 
181  case dk_wfg_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_wfg_insecticide, true);
194  break;
195  }
196  }
197  break; // end of thread
198 
199  case dk_wfg_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_wfg_herbicide1, true);
204  break;
205  }
206  }
207  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, dk_wfg_sow_spot, false); // sow spot thread
208  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 4) + 365, dk_wfg_water, false); // water thread
209  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + 365, dk_wfg_cutting1, false);// main thread
210  break;
211 
212  case dk_wfg_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_wfg_sow_spot, true);
217  break;
218  }
219  }
220  break; // end of thread
221 
222  case dk_wfg_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_wfg_water, true);
227  break;
228  }
229  }
230  break; // end of thread
231 
232  case dk_wfg_cutting1:
233  if (m_ev->m_lock || m_farm->DoIt_prob(.10)) { // 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_wfg_cutting1, true);
237  break;
238  }
239  DK_WFG_CUT = true; //we need to remember who did cutting
240  SimpleEvent(g_date->Date() + 35, dk_wfg_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_wfg_grazing, false);
256  break;
257  }
259  break;
260 
261  case dk_wfg_cutting2:
262  if (DK_WFG_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_wfg_cutting2, true);
266  break;
267  }
268  }
270  break;
271 
272  case dk_wfg_grazing:
274  if (a_field->GetVegHeight() < cfg_farm_cattle_grass_low.value()) GRASS_READY_WFG = false;
276  SimpleEvent(g_date->Date() + 1, dk_wfg_grazing, true);
277  break;
278  }
279  SimpleEvent(g_date->Date() + 1, dk_wfg_cattle_out, false);
280  break;
281 
282  case dk_wfg_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_WFG = false;
287  SimpleEvent(g_date->Date() + 1, dk_wfg_cattle_out, false);
288  break;
289  }
290  SimpleEvent(g_date->Date() + 10, dk_wfg_herbicide2, false);
291  break;
292 
293  case dk_wfg_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_wfg_herbicide2, true);
297  break;
298  }
300  break;
301 
302  case dk_wfg_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_wfg_swathing, true);
306  break;
307  }
308  }
309  SimpleEvent(g_date->Date() + 2, dk_wfg_harvest, false);
310  break;
311 
312  case dk_wfg_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_wfg_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  done = true;
326  break;
327 
328 
329  default:
330  g_msg->Warn(WARN_BUG, "DK_WinterFodderGrass::Do(): "
331  "Unknown event type! ", "");
332  exit(1);
333  }
334 
335  return done;
336 }

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_wfg_autumn_harrow, dk_wfg_autumn_plough, dk_wfg_autumn_roll1, dk_wfg_autumn_roll2, dk_wfg_cattle_out, DK_WFG_CC, DK_WFG_CUT, dk_wfg_cutting1, dk_wfg_cutting2, dk_wfg_cutting_graze, dk_wfg_grass_collected, dk_wfg_grazing, dk_wfg_harvest, dk_wfg_herbicide1, dk_wfg_herbicide2, dk_wfg_insecticide, dk_wfg_manure_pig_p, dk_wfg_manure_pig_s, dk_wfg_npk_p, dk_wfg_npk_s, dk_wfg_sow, dk_wfg_sow_spot, dk_wfg_start, dk_wfg_swathing, dk_wfg_water, Farm::DoIt_prob(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FP_NPK(), Farm::FP_Slurry(), g_date, g_msg, LE::GetMDates(), LE::GetVegHeight(), GRASS_READY_WFG, 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_DKWinterFodderGrass, CfgInt::value(), CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_WinterFodderGrass::SetUpFarmCategoryInformation ( )
inline
77  {
78  const int elements = 2 + (dk_wfg_foobar - DK_WFG_BASE);
80 
81  FarmManagementCategory catlist[elements] =
82  {
83  fmc_Others, // zero element unused but must be here
84  fmc_Others, // dk_wfg_start = 1, // Compulsory, start event must always be 1 (one).
85  fmc_Harvest, // dk_wfg_harvest = DK_WFG_BASE,
86  fmc_Cultivation, // dk_wfg_autumn_plough,
87  fmc_Cultivation, // dk_wfg_autumn_roll1,
88  fmc_Cultivation, // dk_wfg_autumn_harrow,
89  fmc_Cultivation, // dk_wfg_autumn_roll2,
90  fmc_Fertilizer, // dk_wfg_manure_pig_s,
91  fmc_Fertilizer, // dk_wfg_npk_s,
92  fmc_Fertilizer, // dk_wfg_manure_pig_p,
93  fmc_Fertilizer, // dk_wfg_npk_p,
94  fmc_Others, // dk_wfg_sow,
95  fmc_Herbicide, // dk_wfg_herbicide1,
96  fmc_Insecticide, // dk_wfg_insecticide,
97  fmc_Others, // dk_wfg_sow_spot,
98  fmc_Cutting, // dk_wfg_cutting1,
99  fmc_Cutting, // dk_wfg_cutting_graze,
100  fmc_Cutting, // dk_wfg_cutting2,
101  fmc_Cutting, // dk_wfg_cutting3,
102  fmc_Cutting, // dk_wfg_cutting4,
103  fmc_Grazing, // dk_wfg_grazing,
104  fmc_Grazing, // dk_wfg_cattle_out,
105  fmc_Herbicide, // dk_wfg_herbicide2,
106  fmc_Watering, // dk_wfg_water,
107  fmc_Cutting, // dk_wfg_swathing,
108  fmc_Others, // dk_wfg_grass_collected.,
109  fmc_Others, // dk_wfg_wait,
110 
111  // no foobar entry
112 
113  };
114  // Iterate over the catlist elements and copy them to vector
115  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
116 
117  }

References DK_WFG_BASE, dk_wfg_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_WinterFodderGrass().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
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_wfg_water
Definition: DK_WinterFodderGrass.h:59
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
dk_wfg_sow
Definition: DK_WinterFodderGrass.h:47
dk_wfg_manure_pig_p
Definition: DK_WinterFodderGrass.h:45
dk_wfg_insecticide
Definition: DK_WinterFodderGrass.h:49
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
dk_wfg_autumn_roll2
Definition: DK_WinterFodderGrass.h:42
dk_wfg_cutting_graze
Definition: DK_WinterFodderGrass.h:52
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_WinterFodderGrass::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_WinterFodderGrass.h:77
dk_wfg_grass_collected
Definition: DK_WinterFodderGrass.h:61
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
DK_WFG_BASE
#define DK_WFG_BASE
Definition: DK_WinterFodderGrass.h:31
cfg_farm_cattle_grass_high
CfgInt cfg_farm_cattle_grass_high
dk_wfg_harvest
Definition: DK_WinterFodderGrass.h:38
Farm::StrawRemoval
virtual bool StrawRemoval(LE *a_field, double a_user, int a_days)
Straw covering applied on a_field.
Definition: FarmFuncs.cpp:1752
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_wfg_swathing
Definition: DK_WinterFodderGrass.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
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
dk_wfg_cutting1
Definition: DK_WinterFodderGrass.h:51
tov_DKWinterFodderGrass
Definition: LandscapeFarmingEnums.h:378
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_wfg_start
Definition: DK_WinterFodderGrass.h:37
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.
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
dk_wfg_grazing
Definition: DK_WinterFodderGrass.h:56
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
Calendar::Date
long Date(void)
Definition: Calendar.h:57
dk_wfg_npk_p
Definition: DK_WinterFodderGrass.h:46
dk_wfg_foobar
Definition: DK_WinterFodderGrass.h:63
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
GRASS_READY_WFG
#define GRASS_READY_WFG
Definition: DK_WinterFodderGrass.h:35
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
dk_wfg_autumn_plough
Definition: DK_WinterFodderGrass.h:39
LE::GetVegHeight
virtual double GetVegHeight(void)
Definition: Elements.h:148
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
dk_wfg_cutting2
Definition: DK_WinterFodderGrass.h:53
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
dk_wfg_autumn_roll1
Definition: DK_WinterFodderGrass.h:40
dk_wfg_manure_pig_s
Definition: DK_WinterFodderGrass.h:43
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
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
dk_wfg_cattle_out
Definition: DK_WinterFodderGrass.h:57
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
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
dk_wfg_autumn_harrow
Definition: DK_WinterFodderGrass.h:41
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
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_wfg_npk_s
Definition: DK_WinterFodderGrass.h:44
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_wfg_herbicide2
Definition: DK_WinterFodderGrass.h:58
cfg_farm_cattle_grass_low
CfgInt cfg_farm_cattle_grass_low
DK_WFG_CUT
#define DK_WFG_CUT
Definition: DK_WinterFodderGrass.h:34
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
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
dk_wfg_herbicide1
Definition: DK_WinterFodderGrass.h:48
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
dk_wfg_sow_spot
Definition: DK_WinterFodderGrass.h:50
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
cfg_pest_grass_on
CfgBool cfg_pest_grass_on
Turn on pesticides for grass.
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
DK_WFG_CC
#define DK_WFG_CC
Definition: DK_WinterFodderGrass.h:33
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
ppp_1
Definition: LandscapeFarmingEnums.h:1079
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001