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

#include <DK_OPotato.h>

Inheritance diagram for DK_OPotato:
Crop

Public Member Functions

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

DK_OPotato::DK_OPotato ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
83  : Crop(a_tov, a_toc, a_L)
84  {
85  m_first_date = g_date->DayInYear(1, 12);
87  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

33 {
34  m_farm = a_farm;
35  m_field = a_field;
36  m_ev = a_ev;
37  bool done = false;
38  int d1;
40 
41  switch ( m_ev->m_todo ) {
42  case dk_opo_start:
43  {
44  a_field->ClearManagementActionSum();
45  DK_OPO_FORCESPRING = false;
46  DK_OPO_SANDY = false;
47 
48  m_last_date = g_date->DayInYear(1, 10); // Should match the last flexdate below
49  //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
50  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
51  // Set up the date management stuff
52  // Start and stop dates for all events after harvest
53  flexdates[0][1] = g_date->DayInYear(15, 9); // last possible day
54  // Now these are done in pairs, start & end for each operation. If its not used then -1
55  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
56  flexdates[1][1] = g_date->DayInYear(1, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
57 
58  // 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
59  int isSpring = 0;
60  if (StartUpCrop(isSpring, flexdates, int(dk_opo_spring_remove_straw))) break;
61 
62  // End single block date checking code. Please see next line comment as well.
63  // Reinit d1 to first possible starting date.
64  d1 = g_date->OldDays() + g_date->DayInYear(1, 10);
65  // OK, let's go.
66  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
67  if (m_ev->m_forcespring) {
68  int day_num_shift = 365;
69  if (g_date->DayInYear() < 70) day_num_shift = 0;
70  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 2) + day_num_shift, dk_opo_spring_remove_straw, false);
71  DK_OPO_FORCESPRING = true;
72  break;
73  }
74  else SimpleEvent(d1, dk_opo_autumn_remove_straw, false);
75  }
76  break;
77 
79  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
80  if (!m_farm->StrawRemoval(m_field, 0.0,
81  g_date->DayInYear(29, 11) - g_date->DayInYear())) {
83  break;
84  }
85  }
87  break;
88 
89  case dk_opo_autumn_stoneburier: // if many stones or tussocks - suggests 10%
90  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
92  g_date->DayInYear(30, 11) - g_date->DayInYear())) {
94  break;
95  }
96  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 2) + 365, dk_opo_deep_harrow1, false);
97  break;
98  }
100  break;
101 
103  if (!m_farm->AutumnPlough(m_field, 0.0,
104  g_date->DayInYear(30, 11) - g_date->DayInYear())) {
106  break;
107  }
108  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 2) + 365, dk_opo_deep_harrow1, false);
109  break;
110 
112  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
113  if (!m_farm->StrawRemoval(m_field, 0.0,
114  g_date->DayInYear(14, 3) - g_date->DayInYear())) {
116  break;
117  }
118  }
120  break;
121 
122  case dk_opo_spring_stoneburier: // if many stones or tussocks - suggests 10%
123  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
125  g_date->DayInYear(15, 3) - g_date->DayInYear())) {
127  break;
128  }
129  SimpleEvent(g_date->Date() + 1, dk_opo_deep_harrow1, false);
130  break;
131  }
133  break;
134 
136  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
137  if (!m_farm->SpringPlough(m_field, 0.0,
138  g_date->DayInYear(15, 3) - g_date->DayInYear())) {
140  break;
141  }
142  }
143  SimpleEvent(g_date->Date() + 1, dk_opo_deep_harrow1, false);
144  break;
145 
146  case dk_opo_deep_harrow1:
147  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
148  if (!m_farm->StubbleHarrowing(m_field, 0.0,
149  g_date->DayInYear(31, 3) - g_date->DayInYear())) {
151  break;
152  }
153  }
154  if (a_farm->IsStockFarmer()) {
156  break;
157  }
158  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(31, 3), dk_opo_ferti_p, false);
159  break;
160 
161  case dk_opo_ferti_s:
162  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
163  if (!m_farm->FA_NPK(m_field, 0.0,
164  g_date->DayInYear(18, 4) - g_date->DayInYear())) {
165  SimpleEvent(g_date->Date() + 1, dk_opo_ferti_s, true);
166  break;
167  }
168  }
170  break;
171 
172  case dk_opo_ferti_p:
173  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
174  if (!m_farm->FP_NPK(m_field, 0.0,
175  g_date->DayInYear(18, 4) - g_date->DayInYear())) {
176  SimpleEvent(g_date->Date() + 1, dk_opo_ferti_p, true);
177  break;
178  }
179  }
181  break;
182 
183  case dk_opo_ferti_sow:
184  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
185  if (!m_farm->SpringSowWithFerti(m_field, 0.0,
186  g_date->DayInYear(20, 4) - g_date->DayInYear())) {
187  SimpleEvent(g_date->Date() + 1, dk_opo_ferti_sow, true);
188  break;
189  }
190  }
192  SimpleEvent(g_date->Date() + 2, dk_opo_harrow, false);
193  break;
194 
196  if (m_field->GetSoilType() == tos_Sand || m_field->GetSoilType() == tos_LoamySand || m_field->GetSoilType() == tos_SandyLoam || m_field->GetSoilType() == tos_SandyClayLoam) // on sandy soils (NL ZAND & LOSS)
197  {
198  if (a_farm->IsStockFarmer()) {
199  if (!m_farm->FA_Calcium(m_field, 0.0,
200  g_date->DayInYear(5, 5) - g_date->DayInYear())) {
202  break;
203  }
204  break;
205  }
206  else SimpleEvent(g_date->Date() + 1, dk_opo_calcium_sand_p, false);
207  break;
208  }
209  break;
210  // end of thread
211 
213  if (m_field->GetSoilType() == tos_Sand || m_field->GetSoilType() == tos_LoamySand || m_field->GetSoilType() == tos_SandyLoam || m_field->GetSoilType() == tos_SandyClayLoam) // on sandy soils (NL ZAND & LOSS)
214  {
215  if (!m_farm->FP_Calcium(m_field, 0.0,
216  g_date->DayInYear(5, 5) - g_date->DayInYear())) {
218  break;
219  }
220  break;
221  }
222  break; // end of thread
223 
224  case dk_opo_harrow:
225  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
226  if (!m_farm->SpringHarrow(m_field, 0.0,
227  g_date->DayInYear(23, 4) - g_date->DayInYear())) {
228  SimpleEvent(g_date->Date() + 1, dk_opo_harrow, true);
229  break;
230  }
231  }
232  SimpleEvent(g_date->Date() + 1, dk_opo_hilling_up1, false);
233  break;
234 
235  case dk_opo_hilling_up1:
236  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
237  if (!m_farm->HillingUp(m_field, 0.0,
238  g_date->DayInYear(24, 4) - g_date->DayInYear())) {
239  SimpleEvent(g_date->Date() + 1, dk_opo_hilling_up1, true);
240  break;
241  }
242  }
243  SimpleEvent(g_date->Date() + 20, dk_opo_row_cultivation1, false); // main thread
244  if (m_field->GetSoilType() == tos_Sand || m_field->GetSoilType() == tos_LoamySand || m_field->GetSoilType() == tos_SandyLoam || m_field->GetSoilType() == tos_SandyClayLoam) // on sandy soils (NL ZAND & LOSS)
245  {
246  SimpleEvent(g_date->Date() + 45, dk_opo_water1_s, false); // sand water thread
247  break;
248  }
249  else SimpleEvent(g_date->Date() + 45, dk_opo_water1_c, false); // clay water thread
250  break;
251 
252  case dk_opo_water1_s:
253  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
254  if (!m_farm->Water(m_field, 0.0,
255  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
256  SimpleEvent(g_date->Date() + 1, dk_opo_water1_s, true);
257  break;
258  }
259  }
260  SimpleEvent(g_date->Date() + 30, dk_opo_water2_s, false);
261  break;
262 
263  case dk_opo_water2_s:
264  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
265  if (!m_farm->Water(m_field, 0.0,
266  g_date->DayInYear(15, 7) - g_date->DayInYear())) {
267  SimpleEvent(g_date->Date() + 1, dk_opo_water2_s, true);
268  break;
269  }
270  }
271  break; // end of thread
272 
273  case dk_opo_water1_c:
274  if (m_ev->m_lock || m_farm->DoIt_prob(0.25)) { // 50% of sandy soils, suggest 25% of clay soils
275  if (!m_farm->Water(m_field, 0.0,
276  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
277  SimpleEvent(g_date->Date() + 1, dk_opo_water1_c, true);
278  break;
279  }
280  }
281  SimpleEvent(g_date->Date() + 30, dk_opo_water2_c, false);
282  break;
283 
284  case dk_opo_water2_c:
285  if (m_ev->m_lock || m_farm->DoIt_prob(0.25)) { // 100% of sandy soils, suggest 50% of clay soils
286  if (!m_farm->Water(m_field, 0.0,
287  g_date->DayInYear(15, 7) - g_date->DayInYear())) {
288  SimpleEvent(g_date->Date() + 1, dk_opo_water2_c, true);
289  break;
290  }
291  }
292  break; // end of thread
293 
295  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
296  if (!m_farm->RowCultivation(m_field, 0.0,
297  g_date->DayInYear(15, 5) - g_date->DayInYear())) {
299  break;
300  }
301  }
302  SimpleEvent(g_date->Date() + 1, dk_opo_hilling_up2, false);
303  break;
304 
305  case dk_opo_hilling_up2:
306  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
307  if (!m_farm->HillingUp(m_field, 0.0,
308  g_date->DayInYear(16, 5) - g_date->DayInYear())) {
309  SimpleEvent(g_date->Date() + 1, dk_opo_hilling_up2, true);
310  break;
311  }
312  }
314  break;
315 
317  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
318  if (!m_farm->RowCultivation(m_field, 0.0,
319  g_date->DayInYear(6, 6) - g_date->DayInYear())) {
321  break;
322  }
323  }
324  SimpleEvent(g_date->Date() + 1, dk_opo_hilling_up3, false);
325  break;
326 
327  case dk_opo_hilling_up3:
328  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
329  if (!m_farm->HillingUp(m_field, 0.0,
330  g_date->DayInYear(7, 6) - g_date->DayInYear())) {
331  SimpleEvent(g_date->Date() + 1, dk_opo_hilling_up3, true);
332  break;
333  }
334  }
336  break;
337 
339  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
340  if (!m_farm->RowCultivation(m_field, 0.0,
341  g_date->DayInYear(28, 6) - g_date->DayInYear())) {
343  break;
344  }
345  }
346  SimpleEvent(g_date->Date() + 1, dk_opo_hilling_up4, false);
347  break;
348 
349  case dk_opo_hilling_up4:
350  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
351  if (!m_farm->HillingUp(m_field, 0.0,
352  g_date->DayInYear(29, 6) - g_date->DayInYear())) {
353  SimpleEvent(g_date->Date() + 1, dk_opo_hilling_up4, true);
354  break;
355  }
356  }
357  SimpleEvent(g_date->Date()+7, dk_opo_top_off, false);
358  break;
359 
360  case dk_opo_top_off:
361  if (m_ev->m_lock || m_farm->DoIt_prob(0.30)) { //% suggestion
362  if (!m_farm->BurnTop(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
363  SimpleEvent(g_date->Date() + 1, dk_opo_top_off, true);
364  break;
365  }
366  }
367  SimpleEvent(g_date->Date() + 10, dk_opo_harvest, false);
368  break;
369 
370  case dk_opo_harvest:
371  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
372  if (!m_farm->HarvestLong(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
373  SimpleEvent(g_date->Date() + 1, dk_opo_harvest, true);
374  break;
375  }
376  }
377  // SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 10), dk_opo_deep_harrow2, false);
378  // break;
379 
380  //case dk_opo_deep_harrow2:
381  // if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
382  // if (!m_farm->StubbleHarrowing(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
383  // SimpleEvent(g_date->Date() + 1, dk_opo_deep_harrow2, true);
384  // break;
385  // }
386  // }
387  done = true;
388  break;
389 
390  default:
391  g_msg->Warn( WARN_BUG, "DK_OPotato::Do(): "
392  "Unknown event type! ", "" );
393  exit( 1 );
394  }
395  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
396  return done;
397 }

References Farm::AutumnPlough(), Farm::BurnTop(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), dk_opo_autumn_plough, dk_opo_autumn_remove_straw, dk_opo_autumn_stoneburier, dk_opo_calcium_sand_p, dk_opo_calcium_sand_s, dk_opo_deep_harrow1, dk_opo_ferti_p, dk_opo_ferti_s, dk_opo_ferti_sow, DK_OPO_FORCESPRING, dk_opo_harrow, dk_opo_harvest, dk_opo_hilling_up1, dk_opo_hilling_up2, dk_opo_hilling_up3, dk_opo_hilling_up4, dk_opo_row_cultivation1, dk_opo_row_cultivation2, dk_opo_row_cultivation3, DK_OPO_SANDY, dk_opo_spring_plough, dk_opo_spring_remove_straw, dk_opo_spring_stoneburier, dk_opo_start, dk_opo_top_off, dk_opo_water1_c, dk_opo_water1_s, dk_opo_water2_c, dk_opo_water2_s, Farm::DoIt_prob(), Farm::FA_Calcium(), Farm::FA_NPK(), Farm::FP_Calcium(), Farm::FP_NPK(), g_date, g_msg, LE::GetMDates(), LE::GetSoilType(), Farm::HarvestLong(), Farm::HillingUp(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), Farm::RowCultivation(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSowWithFerti(), Crop::StartUpCrop(), Farm::StrawRemoval(), Farm::StubbleCultivatorHeavy(), Farm::StubbleHarrowing(), tos_LoamySand, tos_Sand, tos_SandyClayLoam, tos_SandyLoam, tov_DKOPotato, MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_OPotato::SetUpFarmCategoryInformation ( )
inline
88  {
89  const int elements = 2 + (dk_opo_foobar - DK_OPO_BASE);
91 
92  FarmManagementCategory catlist[elements] =
93  {
94  fmc_Others, // zero element unused but must be here
95  fmc_Others, // dk_opo_autumn_remove_straw = DK_OPO_BASE,
96  fmc_Others, // dk_opo_spring_remove_straw,
97  fmc_Cultivation, // dk_opo_autumn_stoneburier,
98  fmc_Cultivation, // dk_opo_autumn_plough,
99  fmc_Cultivation, // dk_opo_spring_stoneburier,
100  fmc_Cultivation, // dk_opo_spring_plough,
101  fmc_Cultivation, // dk_opo_deep_harrow1,
102  fmc_Fertilizer, // dk_opo_ferti_s,
103  fmc_Fertilizer, // dk_opo_ferti_p,
104  fmc_Fertilizer, // dk_opo_ferti_sow,
105  fmc_Fertilizer, // dk_opo_calcium_sand_s,
106  fmc_Fertilizer, // dk_opo_calcium_sand_p,
107  fmc_Watering, // dk_opo_water1,
108  fmc_Watering, // dk_opo_water2,
109  fmc_Watering, // dk_opo_water3,
110  fmc_Watering, // dk_opo_water1,
111  fmc_Watering, // dk_opo_water2,
112  fmc_Watering, // dk_opo_water3,
113  fmc_Cultivation, // dk_opo_row_cultivation1,
114  fmc_Cultivation, // dk_opo_hilling_up1,
115  fmc_Cultivation, // dk_opo_row_cultivation2,
116  fmc_Cultivation, // dk_opo_hilling_up2,
117  fmc_Cultivation, // dk_opo_harrow,
118  fmc_Cultivation, // dk_opo_hilling_up3,
119  fmc_Cultivation, // dk_opo_row_cultivation3,
120  fmc_Cultivation, // dk_opo_hilling_up4,
121  fmc_Others, // dk_opo_top_off,
122  fmc_Harvest, // dk_opo_harvest,
123  fmc_Cultivation, // dk_opo_deep_harrow2,
124  };
125  // Iterate over the catlist elements and copy them to vector
126  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
127  }

References DK_OPO_BASE, dk_opo_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_OPotato().


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
DK_OPotato::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_OPotato.h:88
dk_opo_spring_plough
Definition: DK_OPotato.h:50
Farm::SpringPlough
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
Definition: FarmFuncs.cpp:421
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
DK_OPO_BASE
#define DK_OPO_BASE
Definition: DK_OPotato.h:39
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
Farm::StubbleCultivatorHeavy
virtual bool StubbleCultivatorHeavy(LE *a_field, double a_user, int a_days)
Carry out a stubble cultivation event on a_field. This is non-inversion type of cultivation which can...
Definition: FarmFuncs.cpp:245
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
dk_opo_harrow
Definition: DK_OPotato.h:67
dk_opo_water1_c
Definition: DK_OPotato.h:60
dk_opo_water2_s
Definition: DK_OPotato.h:58
Farm::StrawRemoval
virtual bool StrawRemoval(LE *a_field, double a_user, int a_days)
Straw covering applied on a_field.
Definition: FarmFuncs.cpp:1752
tos_SandyClayLoam
Definition: LandscapeFarmingEnums.h:722
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
dk_opo_ferti_p
Definition: DK_OPotato.h:53
tos_SandyLoam
Definition: LandscapeFarmingEnums.h:721
dk_opo_row_cultivation2
Definition: DK_OPotato.h:65
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
dk_opo_spring_remove_straw
Definition: DK_OPotato.h:46
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
Farm::HillingUp
virtual bool HillingUp(LE *a_field, double a_user, int a_days)
Do hilling up on a_field, probably of potatoes.
Definition: FarmFuncs.cpp:1302
dk_opo_top_off
Definition: DK_OPotato.h:71
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_opo_start
Definition: DK_OPotato.h:44
dk_opo_water1_s
Definition: DK_OPotato.h:57
dk_opo_deep_harrow1
Definition: DK_OPotato.h:51
DK_OPO_SANDY
#define DK_OPO_SANDY
Definition: DK_OPotato.h:41
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_opo_spring_stoneburier
Definition: DK_OPotato.h:49
dk_opo_calcium_sand_s
Definition: DK_OPotato.h:55
dk_opo_ferti_s
Definition: DK_OPotato.h:52
dk_opo_water2_c
Definition: DK_OPotato.h:61
dk_opo_row_cultivation3
Definition: DK_OPotato.h:69
dk_opo_foobar
Definition: DK_OPotato.h:74
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
DK_OPO_FORCESPRING
#define DK_OPO_FORCESPRING
Definition: DK_OPotato.h:40
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
Farm::FA_Calcium
virtual bool FA_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:1168
dk_opo_hilling_up1
Definition: DK_OPotato.h:64
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
dk_opo_row_cultivation1
Definition: DK_OPotato.h:63
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
Farm::FP_Calcium
virtual bool FP_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:954
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_opo_hilling_up4
Definition: DK_OPotato.h:70
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
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
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
tos_Sand
Definition: LandscapeFarmingEnums.h:719
Farm::HarvestLong
virtual bool HarvestLong(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field (only differs in the DoIt chance cf harvest)
Definition: FarmFuncs.cpp:1421
dk_opo_hilling_up2
Definition: DK_OPotato.h:66
Farm::RowCultivation
virtual bool RowCultivation(LE *a_field, double a_user, int a_days)
Carry out a harrowing between crop rows on a_field.
Definition: FarmFuncs.cpp:1183
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
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
Farm::SpringSowWithFerti
virtual bool SpringSowWithFerti(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 with start fertilizer in the spring on a_field.
Definition: FarmFuncs.cpp:537
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
dk_opo_autumn_remove_straw
Definition: DK_OPotato.h:45
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
dk_opo_hilling_up3
Definition: DK_OPotato.h:68
dk_opo_autumn_stoneburier
Definition: DK_OPotato.h:47
dk_opo_autumn_plough
Definition: DK_OPotato.h:48
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
tov_DKOPotato
Definition: LandscapeFarmingEnums.h:389
tos_LoamySand
Definition: LandscapeFarmingEnums.h:720
dk_opo_calcium_sand_p
Definition: DK_OPotato.h:56
dk_opo_harvest
Definition: DK_OPotato.h:72
Farm::BurnTop
virtual bool BurnTop(LE *a_field, double a_user, int a_days)
Burn tops of e.g. potatoes on a_field.
Definition: FarmFuncs.cpp:1587
dk_opo_ferti_sow
Definition: DK_OPotato.h:54
WARN_BUG
Definition: MapErrorMsg.h:34
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523
Farm::SpringHarrow
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: FarmFuncs.cpp:459