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

FI_SpringBarley_Fodder class
. More...

#include <FI_SpringBarley_Fodder.h>

Inheritance diagram for FI_SpringBarley_Fodder:
Crop

Public Member Functions

virtual bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 The one and only method for a crop management plan. All farm actions go through here. More...
 
 FI_SpringBarley_Fodder (TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
 
void SetUpFarmCategoryInformation ()
 
- Public Member Functions inherited from Crop
virtual ~Crop ()
 
 Crop (TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
 
int GetFirstDate (void)
 
void ChooseNextCrop (int a_no_dates)
 Chooses the next crop to grow in a field. More...
 
int GetCropClassification ()
 
void SetCropClassification (int a_classification)
 
void GetCropType (TTypesOfCrops a_toc)
 
TTypesOfCrops GetCropType ()
 
FarmManagementCategory LookUpManagementCategory (int a_todo)
 
bool GetForceSpringOK ()
 

Additional Inherited Members

- Public Attributes inherited from Crop
TTypesOfVegetation m_tov
 
- Protected Member Functions inherited from Crop
void SimpleEvent (long a_date, int a_todo, bool a_lock)
 Adds an event to this crop management. More...
 
void SimpleEvent_ (long a_date, int a_todo, bool a_lock, Farm *a_farm, LE *a_field)
 Adds an event to this crop management without relying on member variables. More...
 
bool StartUpCrop (int a_spring, std::vector< std::vector< int >> a_flexdates, int a_todo)
 
Holds the translation between the farm operation enum for each cropand the farm management category associated with it More...
 
bool AphidDamage (LE *a_field)
 Compares aphid numbers per m2 with a threshold to return true if threshold is exceeded. More...
 
- Protected Attributes inherited from Crop
Farmm_farm
 
LEm_field
 
FarmEventm_ev
 
int m_first_date
 
int m_count
 
int m_last_date
 
int m_ddegstoharvest
 
int m_base_elements_no
 
Landscapem_OurLandscape
 
bool m_forcespringpossible = false
 Used to signal that the crop can be forced to start in spring. More...
 
TTypesOfCrops m_toc
 The Crop type in terms of the TTypesOfCrops list (smaller list than tov, no country designation) More...
 
int m_CropClassification
 Contains information on whether this is a winter crop, spring crop, or catch crop that straddles the year boundary (0,1,2) More...
 
vector< FarmManagementCategorym_ManagementCategories
 Holds the translation between the farm operation enum for each crop and the farm management category associated with it. More...
 
- Static Protected Attributes inherited from Crop
static int m_date_modifier = 0
 Holds a value that shifts test pesticide use by this many days in crops modified to use it. More...
 

Detailed Description

FI_SpringBarley_Fodder class
.

See FI_SpringBarley_Fodder.h::FI_SpringBarley_FodderToDo for a complete list of all possible events triggered codes by the spring barley Fodder management plan. When triggered these events are handled by Farm and are available as information for other objects such as animal and bird models.

Constructor & Destructor Documentation

◆ FI_SpringBarley_Fodder()

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

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

Member Function Documentation

◆ Do()

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

The one and only method for a crop management plan. All farm actions go through here.

Called every time something is done to the crop by the farmer in the first instance it is always called with a_ev->todo set to start, but susequently will be called whenever the farmer wants to carry out a new operation.
This method details all the management and relationships between operations necessary to grow and ALMaSS crop - in this case conventional spring barley Fodder.

Reimplemented from Crop.

99 {
100  m_field = a_field; // this is needed because of possible calls to other methods and currently we do not pass parameters.
101  m_farm = a_farm; // this is needed because of possible calls to other methods and currently we do not pass parameters.
102  m_ev = a_ev;
103  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
104  bool flag = false;
105  int noDates = 1;
106  int d1 = 0;
108  int l_nextcropstartdate;
109  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
110  switch (a_ev->m_todo)
111  {
112  case fi_sbf_start:
113  {
114  a_field->ClearManagementActionSum();
115  m_last_date = g_date->DayInYear(15, 10); // Should match the last flexdate below
116  //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
117  std::vector<std::vector<int>> flexdates(4 + 1, std::vector<int>(2, 0));
118  // Set up the date management stuff
119  // Start and stop dates for all events after harvest
120  flexdates[0][1] = g_date->DayInYear(30, 9); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use
121  // Now these are done in pairs, start & end for each operation. If its not used then -1
122  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
123  flexdates[1][1] = g_date->DayInYear(30, 9); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
124  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 2)
125  flexdates[2][1] = g_date->DayInYear(30, 9); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 2)
126  flexdates[3][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 3)
127  flexdates[3][1] = g_date->DayInYear(30, 9); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 3)
128  flexdates[4][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 4)
129  flexdates[4][1] = g_date->DayInYear(15, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 4)
130 
131  // 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
132  int isSpring = 0;
133  if (StartUpCrop(isSpring, flexdates, int(fi_sbf_spring_plough))) break;
134 
135  // End single block date checking code. Please see next line comment as well.
136  // Reinit d1 to first possible starting date.
137  d1 = g_date->OldDays() + g_date->DayInYear(1, 9);
138  // OK, let's go.
139  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
140  if (m_ev->m_forcespring) {
141  int day_num_shift = 365;
142  if (g_date->DayInYear() < 70) day_num_shift = 0;
143  SimpleEvent(g_date->OldDays() + g_date->DayInYear(20, 4) + day_num_shift, fi_sbf_spring_plough, false);
144  break;
145  }
146  else SimpleEvent(d1, fi_sbf_stubble_cultivator1, false);
147  break;
148  }
149  break;
150 
151  // This is the first real farm operation - LKM: done if there is time between 1st September-10th of October - 25% do this
153  if (a_ev->m_lock || a_farm->DoIt_prob(.25)) {
154  if (!a_farm->StubbleCultivatorHeavy(a_field, 0.0, g_date->DayInYear(10, 10) - g_date->DayInYear())) {
155  // If we don't succeed on the first try, then try and try again (until 10/10 when we will succeed)
157  break;
158  }
159  // Queue up the next event - in this case spring plough (the next year) - date is a suggestion (no date stated in crop scheme!) - 3% do this
160  SimpleEvent(g_date->OldDays() + g_date->DayInYear(20, 4) + 365, fi_sbf_spring_plough, false);
161  break;
162  }
163  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 9), fi_sbf_autumn_plough, false);
164  break;
166  if (!a_farm->AutumnPlough(a_field, 0.0, g_date->DayInYear(15, 10) - g_date->DayInYear())) {
168  break;
169  }
170  // Queue up the next event - in this case spring plough (the next year) - date is a suggestion (no date stated in crop scheme!) - 3% do this
172  break;
174  if (a_ev->m_lock || a_farm->DoIt(3)) {
175  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(5, 5) - g_date->DayInYear())) {
177  break;
178  }
179  }
180  // Queue up the next event - in this case fungicide 1 (seed dressing) - 90% do this (but don't know how many actually do it on the farm?)
182  break;
183  case fi_sbf_fungicide1:
184  if (a_ev->m_lock || a_farm->DoIt(90)) {
185  if (!a_farm->FungicideTreat(a_field, 0.0, g_date->DayInYear(5, 5) - g_date->DayInYear())) {
186  SimpleEvent(g_date->Date() + 1, fi_sbf_fungicide1, true);
187  break;
188  }
189  }
190  //Here comes a fork with parallel events:
191  SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 4), fi_sbf_preseeding_cultivation, false); //sowing thread - main thread
192  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), fi_sbf_slurry, false); //Slurry thread
193  break;
194  case fi_sbf_slurry: // 10% do this (if stock farm)
195  if (m_farm->IsStockFarmer()) {
196  if (a_ev->m_lock || a_farm->DoIt(10)) {
197  if (!a_farm->FA_Slurry(a_field, 0.0,
198  g_date->DayInYear(20, 6) - g_date->DayInYear())) {
199  SimpleEvent(g_date->Date() + 1, fi_sbf_slurry, true);
200  break;
201  }
202  }
203  }
204  break; //End of slurry thread
205  //Sowing thread - preseeding cultivation - 85% do this
207  break;
209  if (a_ev->m_lock || a_farm->DoIt(85)) {
210  if (!a_farm->PreseedingCultivator(a_field, 0.0,
211  g_date->DayInYear(15, 5) - g_date->DayInYear())) {
213  break;
214  }
215  SimpleEvent(g_date->Date(), fi_sbf_sow, false);
216  break;
217  } // the rest (15%) do preseeding cultivator with sow
218  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(30, 4), fi_sbf_preseeding_sow, false);
219  break;
220 
221  case fi_sbf_sow: // sowing with fertilizer - says only 70% in crop scheme - changed to 85% so all farmers actually sow ...
222  if (!a_farm->SpringSowWithFerti(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
223  SimpleEvent(g_date->Date() + 1, fi_sbf_sow, true);
224  break;
225  } // Queue up the next event - in this case harrow before emergence (suggest 7 days)
226  SimpleEvent(g_date->Date () +7, fi_sbf_harrow, false);
227  break;
229  if (!a_farm->PreseedingCultivatorSow(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
231  break;
232  } // fertilizer when preseeding cultivator with sowing
234  break;
235  case fi_sbf_fertilizer:
236  if (!a_farm->FP_NPKS(a_field, 0.0,
237  g_date->DayInYear(20, 5) - g_date->DayInYear())) {
238  SimpleEvent(g_date->Date() + 1, fi_sbf_fertilizer, true);
239  break;
240  }
241  // 20% of farmers sow cover crops simultaneously with sowing barley!
242  // Queue up the next event - in this case harrow before emergence (suggest 7 days)
243  SimpleEvent(g_date->Date() + 7, fi_sbf_harrow, false);
244  break;
245  case fi_sbf_harrow: // 8% do this
246  if (a_ev->m_lock || a_farm->DoIt(8)) {
247  if (!a_farm->SpringHarrow(a_field, 0.0,
248  g_date->DayInYear(27, 5) - g_date->DayInYear())) {
249  SimpleEvent(g_date->Date() + 1, fi_sbf_harrow, true);
250  break;
251  }
252  }
253  // LKM: Here is a fork leading to parallel events
254  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), fi_sbf_herbicide1, false); // Herbicide thread
255  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6) + m_date_modifier, fi_sbf_insecticide, false); // insecticide thread
256  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), fi_sbf_growth_reg, false); // growth regulator thread
257  SimpleEvent(g_date->OldDays() + g_date->DayInYear(26, 6), fi_sbf_fungicide2, false); // fungicide thread - main thread
258  break;
259  // Herbicide1 thread
260  case fi_sbf_herbicide1:
261  if (a_ev->m_lock || a_farm->DoIt(90)) { //90% do herbicide1
262  if (!a_farm->HerbicideTreat(a_field, 0.0,
263  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
264  SimpleEvent(g_date->Date() + 1, fi_sbf_herbicide1, true);
265  break;
266  }
267  }
268  //LKM: end of herbicide thread
269  break;
270  // Insecticide thread
271  case fi_sbf_insecticide:
272  if (a_ev->m_lock || a_farm->DoIt(5)) { //5% do insecticide
273  // here we check whether we are using ERA pesticide or not
274  d1 = g_date->DayInYear(30, 6) - g_date->DayInYear();
275  if (!cfg_pest_springbarley_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
276  {
277  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
278  }
279  else {
281  }
282  if (!flag) {
284  break;
285  }
286  }
287  //End of insecticide thread
288  break;
289  // growth regulator thread
290  case fi_sbf_growth_reg:
291  if (a_ev->m_lock || a_farm->DoIt(30)) { //30% do growth reg
292  if (!a_farm->GrowthRegulator(a_field, 0.0,
293  g_date->DayInYear(30, 6) - g_date->DayInYear())) {
294  SimpleEvent(g_date->Date() + 1, fi_sbf_growth_reg, true);
295  break;
296  }
297  }
298  //End of growth regulator
299  break;
300  // fungicide2 thread - main thread
301  case fi_sbf_fungicide2:
302  if (a_ev->m_lock || a_farm->DoIt(60)) { //60% do fungicide2
303  if (!a_farm->FungicideTreat(a_field, 0.0,
304  g_date->DayInYear(10, 7) - g_date->DayInYear())) {
305  SimpleEvent(g_date->Date() + 1, fi_sbf_fungicide2, true);
306  break;
307  }
308  }
310  break;
311  case fi_sbf_harvest:
312  // We don't move harvest days
313  if (!a_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
314  SimpleEvent(g_date->Date() + 1, fi_sbf_harvest, true);
315  break;
316  }
317  // 50% of farmers will do herbicide after harvest
319  break;
320  case fi_sbf_herbicide2:
321  if (a_ev->m_lock || a_farm->DoIt(50)) {
322  if (!a_farm->HerbicideTreat(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
323  SimpleEvent(g_date->Date() + 1, fi_sbf_herbicide2, true);
324  break;
325  }
326  }
327  // 75% of farmers will do straw chopping
329  break;
331  if (a_ev->m_lock || a_farm->DoIt(75)) {
332  if (!a_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
334  break;
335  } // next event - stubble cultivator2
337  break;
338  } // the 5% left will do hay bailing
339  else
341  break;
342 
343  case fi_sbf_hay_bailing:
344  if (!a_farm->HayBailing(m_field, 0.0, m_field->GetMDates(1, 3) - g_date->DayInYear())) {
345  SimpleEvent(g_date->Date() + 1, fi_sbf_hay_bailing, true);
346  break;
347  }// next event - stubble cultivator2
349  break;
350  case fi_sbf_stubble_cultivator2: // 50% do this
351  if (a_ev->m_lock || a_farm->DoIt(50)) {
352  if (!a_farm->StubbleCultivatorHeavy(m_field, 0.0, m_field->GetMDates(1, 4) - g_date->DayInYear())) {
354  break;
355  }
356  }
357  done = true;
358  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
359  // END OF MAIN THREAD
360  break;
361  default:
362  g_msg->Warn(WARN_BUG, "FI_SpringBarley_Fodder::Do(): "
363  "Unknown event type! ", "");
364  exit(1);
365  }
366  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
367  return done;
368 }

References Farm::AutumnPlough(), cfg_pest_product_amounts, cfg_pest_springbarley_on, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::DoIt_prob(), Farm::FA_Slurry(), fi_sbf_autumn_plough, fi_sbf_fertilizer, fi_sbf_fungicide1, fi_sbf_fungicide2, fi_sbf_growth_reg, fi_sbf_harrow, fi_sbf_harvest, fi_sbf_hay_bailing, fi_sbf_herbicide1, fi_sbf_herbicide2, fi_sbf_insecticide, fi_sbf_preseeding_cultivation, fi_sbf_preseeding_sow, fi_sbf_slurry, fi_sbf_sow, fi_sbf_spring_plough, fi_sbf_start, fi_sbf_straw_chopping, fi_sbf_stubble_cultivator1, fi_sbf_stubble_cultivator2, Farm::FP_NPKS(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), 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, Calendar::OldDays(), ppp_1, Farm::PreseedingCultivator(), Farm::PreseedingCultivatorSow(), Farm::ProductApplication(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSowWithFerti(), Crop::StartUpCrop(), Farm::StrawChopping(), Farm::StubbleCultivatorHeavy(), tov_FISpringBarley_Fodder, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void FI_SpringBarley_Fodder::SetUpFarmCategoryInformation ( )
inline
114  {
115  const int elements = 2 + (fi_sbf_foobar - FI_SBF_BASE);
117 
118  FarmManagementCategory catlist[elements] =
119  {
120  fmc_Others, // zero element unused but must be here
121  fmc_Others, // fi_sbf_start = 1, // Compulsory, must always be 1 (one).
122  fmc_Others, // fi_sbf_sleep_all_day = FI_SBF_BASE,
123  fmc_Cultivation, // fi_sbf_stubble_cultivator1,
124  fmc_Cultivation, // fi_sbf_autumn_plough,
125  fmc_Cultivation, // fi_sbf_spring_plough,
126  fmc_Fungicide, // fi_sbf_fungicide1,
127  fmc_Fertilizer, // fi_sbf_slurry,
128  fmc_Cultivation, // fi_sbf_preseeding_cultivation,
129  fmc_Cultivation, // fi_sbf_preseeding_sow,
130  fmc_Others, // fi_sbf_sow,
131  fmc_Fertilizer, // fi_sbf_fertilizer,
132  fmc_Cultivation, // fi_sbf_harrow,
133  fmc_Herbicide, // fi_sbf_herbicide1,
134  fmc_Insecticide, // fi_sbf_insecticide,
135  fmc_Others, // fi_sbf_growth_reg,
136  fmc_Fungicide, // fi_sbf_fungicide2,
137  fmc_Harvest, // fi_sbf_harvest,
138  fmc_Herbicide, // fi_sbf_herbicide2,
139  fmc_Others, // fi_sbf_straw_chopping,
140  fmc_Others, // fi_sbf_hay_bailing,
141  fmc_Cultivation // fi_sbf_stubble_cultivator2,
142 
143 
144  // no foobar entry
145 
146  };
147  // Iterate over the catlist elements and copy them to vector
148  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
149 
150  }

References FI_SBF_BASE, fi_sbf_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FI_SpringBarley_Fodder().


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
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
Farm::PreseedingCultivator
virtual bool PreseedingCultivator(LE *a_field, double a_user, int a_days)
Carry out preseeding cultivation on a_field (tilling set including cultivator and string roller to co...
Definition: FarmFuncs.cpp:312
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::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::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::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
fi_sbf_spring_plough
Definition: FI_SpringBarley_Fodder.h:72
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
FI_SpringBarley_Fodder::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FI_SpringBarley_Fodder.h:114
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
fi_sbf_harrow
Definition: FI_SpringBarley_Fodder.h:79
fi_sbf_harvest
Definition: FI_SpringBarley_Fodder.h:84
tov_FISpringBarley_Fodder
Definition: LandscapeFarmingEnums.h:553
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
fi_sbf_stubble_cultivator1
Definition: FI_SpringBarley_Fodder.h:70
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
fi_sbf_straw_chopping
Definition: FI_SpringBarley_Fodder.h:86
fi_sbf_herbicide1
Definition: FI_SpringBarley_Fodder.h:80
fi_sbf_hay_bailing
Definition: FI_SpringBarley_Fodder.h:87
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
fi_sbf_fertilizer
Definition: FI_SpringBarley_Fodder.h:78
fi_sbf_foobar
Definition: FI_SpringBarley_Fodder.h:89
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
fi_sbf_start
Definition: FI_SpringBarley_Fodder.h:68
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
fi_sbf_slurry
Definition: FI_SpringBarley_Fodder.h:74
Farm::HayBailing
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
Definition: FarmFuncs.cpp:1507
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
Farm::StrawChopping
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: FarmFuncs.cpp:1475
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
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
fi_sbf_autumn_plough
Definition: FI_SpringBarley_Fodder.h:71
fi_sbf_preseeding_cultivation
Definition: FI_SpringBarley_Fodder.h:75
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
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
fi_sbf_herbicide2
Definition: FI_SpringBarley_Fodder.h:85
fi_sbf_growth_reg
Definition: FI_SpringBarley_Fodder.h:82
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
FI_SBF_BASE
#define FI_SBF_BASE
Definition: FI_SpringBarley_Fodder.h:53
fi_sbf_stubble_cultivator2
Definition: FI_SpringBarley_Fodder.h:88
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
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
fi_sbf_insecticide
Definition: FI_SpringBarley_Fodder.h:81
cfg_pest_springbarley_on
CfgBool cfg_pest_springbarley_on
Turn on pesticides for spring barley.
fi_sbf_fungicide2
Definition: FI_SpringBarley_Fodder.h:83
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
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
Crop::m_forcespringpossible
bool m_forcespringpossible
Used to signal that the crop can be forced to start in spring.
Definition: Farm.h:508
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
fi_sbf_fungicide1
Definition: FI_SpringBarley_Fodder.h:73
fi_sbf_preseeding_sow
Definition: FI_SpringBarley_Fodder.h:76
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
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_Fungicide
Definition: LandscapeFarmingEnums.h:1007
fi_sbf_sow
Definition: FI_SpringBarley_Fodder.h:77
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
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
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
Crop::SimpleEvent_
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.
Definition: Farm.cpp:751