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

#include <DK_VegSeeds.h>

Inheritance diagram for DK_VegSeeds:
Crop

Public Member Functions

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

DK_VegSeeds::DK_VegSeeds ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
78  : Crop(a_tov, a_toc, a_L)
79  {
82  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

35 {
36  m_farm = a_farm;
37  m_field = a_field;
38  m_ev = a_ev;
39  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).
40  bool flag = false;
41  int d1 = 0;
42  int noDates = 1;
43  TTypesOfVegetation l_tov = tov_DKVegSeeds; // made from guideline for spinach seeds
44 
45  switch (m_ev->m_todo) {
46  case dk_vs_start:
47  {
48  a_field->ClearManagementActionSum();
49 
50  DK_VS_FORCESPRING = false;
51  DK_VS_AUTUMNPLOUGH = false;
52 
53  m_last_date = g_date->DayInYear(31, 8); // Should match the last flexdate below
54  //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
55  std::vector<std::vector<int>> flexdates(1 + 2, std::vector<int>(2, 0));
56  // Set up the date management stuff
57  // Start and stop dates for all events after harvest
58  flexdates[0][1] = g_date->DayInYear(14, 8); // last possible day
59  // Now these are done in pairs, start & end for each operation. If its not used then -1
60  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
61  flexdates[1][1] = g_date->DayInYear(22, 8); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
62  flexdates[2][0] = -1;
63  flexdates[2][1] = g_date->DayInYear(31, 8);
64 
65 // 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
66  int isSpring = 0;
67  if (StartUpCrop(isSpring, flexdates, int(dk_vs_molluscicide))) break;
68 
69  // End single block date checking code. Please see next line comment as well.
70  // Reinit d1 to first possible starting date.
71  d1 = g_date->OldDays() + g_date->DayInYear(1, 10);
72  // OK, let's go.
73  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
74  if (m_ev->m_forcespring) {
75  int day_num_shift = 365;
76  if (g_date->DayInYear() < 70) day_num_shift = 0;
77  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 2) + day_num_shift, dk_vs_molluscicide, false);
78  DK_VS_FORCESPRING = true;
79  break;
80  }
81  else SimpleEvent(d1, dk_vs_autumn_plough, false);
82  break;
83  }
84  break;
85 
87  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
88  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
90  break;
91  }
92  }
93  DK_VS_AUTUMNPLOUGH = true; // remember who did autumn plough
94  // LKM: Queue up next event - Molluscicide1 after 1st of March next year
95  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 2) + 365, dk_vs_molluscicide, false);
96  break;
97 
98  case dk_vs_molluscicide:
99  if (m_ev->m_lock || m_farm->DoIt_prob(0.10)) {
100  if (!m_farm->Molluscicide(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
101  SimpleEvent(g_date->Date() + 1, dk_vs_molluscicide, true);
102  break;
103  }
104  }
105  SimpleEvent(g_date->Date() + 1, dk_vs_spring_plough, false);
106  break;
107 
108  case dk_vs_spring_plough: // only if no autumn plough (force spring)
109  if (DK_VS_AUTUMNPLOUGH == false) {
110  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
112  break;
113  }
114  }
116  break;
117 
118  case dk_vs_ferti_s: // if stock farmer
119  if (a_farm->IsStockFarmer()) {
120  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
121  if (!m_farm->FA_NPKS(m_field, 0.0, g_date->DayInYear(25, 4) - g_date->DayInYear())) {
122  SimpleEvent(g_date->Date() + 1, dk_vs_ferti_s, true);
123  break;
124  }
125  }
127  break;
128  }
130  break;
131 
132  case dk_vs_ferti_p: // if arable farmer
133  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
134  if (!m_farm->FP_NPKS(m_field, 0.0, g_date->DayInYear(25, 4) - g_date->DayInYear())) {
135  SimpleEvent(g_date->Date() + 1, dk_vs_ferti_p, true);
136  break;
137  }
138  }
140  break;
141 
143  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
146  break;
147  }
148  }
149  SimpleEvent(g_date->Date() + 2, dk_vs_herbicide1, false); // herbi thread
150  SimpleEvent(g_date->Date() + 14, dk_vs_row_cultivation1, false); // row cultivation thread
151  SimpleEvent(g_date->Date() + 30, dk_vs_manganese, false); // Manganese thread
152  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5) + m_date_modifier, dk_vs_insecticide, false); // insecti thread
153  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), dk_vs_fungicide1, false); // fungi thread
154  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), dk_vs_water, false); // main thread
155  break;
156 
157  case dk_vs_herbicide1:
158  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
159  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(7, 5) - g_date->DayInYear())) {
160  SimpleEvent(g_date->Date() + 1, dk_vs_herbicide1, true);
161  break;
162  }
163  }
164  SimpleEvent(g_date->Date() + 7, dk_vs_herbicide2, false);
165  break;
166 
167  case dk_vs_herbicide2:
168  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
169  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
170  SimpleEvent(g_date->Date() + 1, dk_vs_herbicide2, true);
171  break;
172  }
173  }
174  SimpleEvent(g_date->Date() + 6, dk_vs_herbicide3, false);
175  break;
176 
177  case dk_vs_herbicide3:
178  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
179  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(24, 5) - g_date->DayInYear())) {
180  SimpleEvent(g_date->Date() + 1, dk_vs_herbicide3, true);
181  break;
182  }
183  }
184  SimpleEvent(g_date->Date() + 6, dk_vs_herbicide4, false);
185  break;
186 
187  case dk_vs_herbicide4:
188  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
189  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(2, 6) - g_date->DayInYear())) {
190  SimpleEvent(g_date->Date() + 1, dk_vs_herbicide4, true);
191  break;
192  }
193  }
194  SimpleEvent(g_date->Date() + 6, dk_vs_herbicide5, false);
195  break;
196 
197  case dk_vs_herbicide5:
198  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
199  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(11, 6) - g_date->DayInYear())) {
200  SimpleEvent(g_date->Date() + 1, dk_vs_herbicide5, true);
201  break;
202  }
203  }
204  break; // end of thread
205 
207  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
208  if (!m_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
210  break;
211  }
212  }
214  break;
215 
217  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
218  if (!m_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
220  break;
221  }
222  }
224  break;
225 
227  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
228  if (!m_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
230  break;
231  }
232  }
233  break; // end of thread
234 
235  case dk_vs_manganese:
236  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
237  if (!m_farm->FP_ManganeseSulphate(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
238  SimpleEvent(g_date->Date() + 1, dk_vs_manganese, true);
239  break;
240  }
241  }
242  break; // end of thread
243 
244  case dk_vs_insecticide:
245  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
246  // here we check whether we are using ERA pesticide or not
247  d1 = g_date->DayInYear(31, 5) - g_date->DayInYear();
248  if (!cfg_pest_veg_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
249  {
250  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
251  }
252  else {
253  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 3);
254  }
255  if (!flag) {
256  SimpleEvent(g_date->Date() + 1, dk_vs_insecticide, true);
257  break;
258  }
259  }
260  break; // end of thread
261 
262  case dk_vs_fungicide1:
263  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
264  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
265  SimpleEvent(g_date->Date() + 1, dk_vs_fungicide1, true);
266  break;
267  }
268  }
269  SimpleEvent(g_date->Date() + 14, dk_vs_fungicide2, false);
270  break;
271 
272  case dk_vs_fungicide2:
273  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
274  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
275  SimpleEvent(g_date->Date() + 1, dk_vs_fungicide2, true);
276  break;
277  }
278  }
279  break; // end of thread
280 
281  case dk_vs_water:
282  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)
283  {
284  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
285  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(1, 7) - g_date->DayInYear())) {
286  SimpleEvent(g_date->Date() + 1, dk_vs_water, true);
287  break;
288  }
289  }
290  }
291  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 7), dk_vs_swathing, false);
292  break;
293 
294  case dk_vs_swathing:
295  if (m_ev->m_lock || m_farm->DoIt_prob(0.90)) {
296  if (!m_farm->Swathing(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
297  SimpleEvent(g_date->Date() + 1, dk_vs_swathing, true);
298  break;
299  }
300  }
301  SimpleEvent(g_date->Date() + 7, dk_vs_herbicide6, false);
302  SimpleEvent(g_date->Date() + 14, dk_vs_harvest, false); // main thread
303  break;
304 
305  case dk_vs_herbicide6: // if uneven maturing
306  if (m_ev->m_lock || m_farm->DoIt_prob(0.20)) {
307  if (!m_farm->HerbicideTreat(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
308  SimpleEvent(g_date->Date() + 1, dk_vs_herbicide6, true);
309  break;
310  }
311  }
312  break; //end of thread
313 
314  case dk_vs_harvest:
315  if (m_ev->m_lock || m_farm->DoIt_prob(1.0)) {
316  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
317  SimpleEvent(g_date->Date() + 1, dk_vs_harvest, true);
318  break;
319  }
320  }
321  done = true;
322  break;
323 
324  default:
325  g_msg->Warn( WARN_BUG, "DK_VegSeeds::Do(): "
326  "Unknown event type! ", "" );
327  exit( 1 );
328  }
329 
330  return done;
331 }

References Farm::AutumnPlough(), cfg_pest_product_amounts, cfg_pest_veg_on, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), dk_vs_autumn_plough, DK_VS_AUTUMNPLOUGH, dk_vs_ferti_p, dk_vs_ferti_s, DK_VS_FORCESPRING, dk_vs_fungicide1, dk_vs_fungicide2, dk_vs_harvest, dk_vs_herbicide1, dk_vs_herbicide2, dk_vs_herbicide3, dk_vs_herbicide4, dk_vs_herbicide5, dk_vs_herbicide6, dk_vs_insecticide, dk_vs_manganese, dk_vs_molluscicide, dk_vs_row_cultivation1, dk_vs_row_cultivation2, dk_vs_row_cultivation3, dk_vs_sow_cultivation, dk_vs_spring_plough, dk_vs_start, dk_vs_swathing, dk_vs_water, Farm::DoIt_prob(), Farm::FA_NPKS(), Farm::FP_ManganeseSulphate(), Farm::FP_NPKS(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), LE::GetSoilType(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Farm::Molluscicide(), Calendar::OldDays(), ppp_1, Farm::PreseedingCultivatorSow(), Farm::ProductApplication(), Farm::RowCultivation(), Crop::SimpleEvent(), Farm::SpringPlough(), Crop::StartUpCrop(), Farm::Swathing(), tos_LoamySand, tos_Sand, tos_SandyClayLoam, tos_SandyLoam, tov_DKVegSeeds, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_VegSeeds::SetUpFarmCategoryInformation ( )
inline
83  {
84  const int elements = 2 + (dk_vs_foobar - DK_VS_BASE);
86 
87  FarmManagementCategory catlist[elements] =
88  {
89  fmc_Others, // zero element unused but must be here
90  fmc_Others, // dk_vs_start = 1, // Compulsory, start event must always be 1 (one).
91  fmc_Cultivation, // dk_vs_autumn_plough = DK_VS_BASE,
92  fmc_Others, // dk_vs_molluscicide,
93  fmc_Cultivation, // dk_vs_spring_plough,
94  fmc_Fertilizer, // dk_vs_ferti_s,
95  fmc_Fertilizer, // dk_vs_ferti_p,
96  fmc_Cultivation, // dk_vs_sow_cultivation,
97  fmc_Herbicide, // dk_vs_herbicide1,
98  fmc_Herbicide, // dk_vs_herbicide2,
99  fmc_Herbicide, // dk_vs_herbicide3,
100  fmc_Herbicide, // dk_vs_herbicide4,
101  fmc_Herbicide, // dk_vs_herbicide5,
102  fmc_Fertilizer, // dk_vs_manganese,
103  fmc_Cultivation, // dk_vs_row_cultivation1,
104  fmc_Cultivation, // dk_vs_row_cultivation2,
105  fmc_Cultivation, // dk_vs_row_cultivation3,
106  fmc_Fungicide, // dk_vs_fungicide1,
107  fmc_Fungicide, // dk_vs_fungicide2,
108  fmc_Insecticide, // dk_vs_insecticide,
109  fmc_Watering, // dk_vs_water,
110  fmc_Cutting, // dk_vs_swathing,
111  fmc_Herbicide, // dk_vs_herbicide6,
112  fmc_Harvest, // dk_vs_harvest,
113  };
114  // Iterate over the catlist elements and copy them to vector
115  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
116  }

References DK_VS_BASE, dk_vs_foobar, fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_VegSeeds().


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_vs_swathing
Definition: DK_VegSeeds.h:66
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
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::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
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::FP_ManganeseSulphate
virtual bool FP_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply Manganse Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:840
dk_vs_row_cultivation1
Definition: DK_VegSeeds.h:59
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
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
dk_vs_ferti_p
Definition: DK_VegSeeds.h:51
Farm::Molluscicide
virtual bool Molluscicide(LE *a_field, double a_user, int a_days)
Apply molluscicide to a_field.
Definition: FarmFuncs.cpp:2310
dk_vs_fungicide1
Definition: DK_VegSeeds.h:62
tos_SandyClayLoam
Definition: LandscapeFarmingEnums.h:722
dk_vs_water
Definition: DK_VegSeeds.h:65
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_VegSeeds::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_VegSeeds.h:83
tos_SandyLoam
Definition: LandscapeFarmingEnums.h:721
Farm::FA_NPKS
virtual bool FA_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:968
DK_VS_FORCESPRING
#define DK_VS_FORCESPRING
Definition: DK_VegSeeds.h:39
dk_vs_herbicide5
Definition: DK_VegSeeds.h:57
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
dk_vs_herbicide6
Definition: DK_VegSeeds.h:67
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
dk_vs_insecticide
Definition: DK_VegSeeds.h:64
dk_vs_autumn_plough
Definition: DK_VegSeeds.h:47
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
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
DK_VS_AUTUMNPLOUGH
#define DK_VS_AUTUMNPLOUGH
Definition: DK_VegSeeds.h:40
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_vs_start
Definition: DK_VegSeeds.h:46
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
dk_vs_fungicide2
Definition: DK_VegSeeds.h:63
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
dk_vs_sow_cultivation
Definition: DK_VegSeeds.h:52
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_vs_harvest
Definition: DK_VegSeeds.h:68
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_farm
Farm * m_farm
Definition: Farm.h:498
dk_vs_molluscicide
Definition: DK_VegSeeds.h:48
Crop::m_field
LE * m_field
Definition: Farm.h:499
dk_vs_herbicide3
Definition: DK_VegSeeds.h:55
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
Farm::PreseedingCultivatorSow
virtual bool PreseedingCultivatorSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out preseeding cultivation together with sow on a_field (tilling and sowing set including culti...
Definition: FarmFuncs.cpp:325
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
tos_Sand
Definition: LandscapeFarmingEnums.h:719
dk_vs_row_cultivation2
Definition: DK_VegSeeds.h:60
tov_DKVegSeeds
Definition: LandscapeFarmingEnums.h:416
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
dk_vs_herbicide4
Definition: DK_VegSeeds.h:56
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_vs_ferti_s
Definition: DK_VegSeeds.h:50
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
dk_vs_herbicide1
Definition: DK_VegSeeds.h:53
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
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
dk_vs_row_cultivation3
Definition: DK_VegSeeds.h:61
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
cfg_pest_veg_on
CfgBool cfg_pest_veg_on
Turn on pesticides for mixed vegetables.
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
dk_vs_manganese
Definition: DK_VegSeeds.h:58
DK_VS_BASE
#define DK_VS_BASE
Definition: DK_VegSeeds.h:42
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
dk_vs_spring_plough
Definition: DK_VegSeeds.h:49
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
tos_LoamySand
Definition: LandscapeFarmingEnums.h:720
dk_vs_foobar
Definition: DK_VegSeeds.h:69
dk_vs_herbicide2
Definition: DK_VegSeeds.h:54
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::FP_NPKS
virtual bool FP_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:630