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

UKSpringBarley class
. More...

#include <UKSpringBarley.h>

Inheritance diagram for UKSpringBarley:
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...
 
 UKSpringBarley (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

UKSpringBarley class
.

See UKSpringBarley.h::UKSpringBarleyToDo for a complete list of all possible events triggered codes by the spring barley 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

◆ UKSpringBarley()

UKSpringBarley::UKSpringBarley ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
72  : Crop(a_tov, a_toc, a_L)
73  {
74  // When we start it off, the first possible date for a farm operation is 1st September
75  // This information is used by other crops when they decide how much post processing of
76  // the management is allowed after harvest before the next crop starts.
77  m_first_date=g_date->DayInYear( 10,10 );
79  }

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

Member Function Documentation

◆ Do()

bool UKSpringBarley::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 m_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.

Reimplemented from Crop.

66 {
67  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
68  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
69  m_field = a_field;
70  m_ev = a_ev;
71  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
72  int d1 = 0;
73  int noDates = 1;
74  TTypesOfVegetation l_tov = tov_UKSpringBarley; // The current type - change to match the crop you have
75 /**********************************************To Here *************************************************************************/
76 
77  // Depending what event has occured jump to the correct bit of code
78  switch (m_ev->m_todo)
79  {
80  case uk_sb_start:
81  {
82  // uk_sb_start just sets up all the starting conditions and reference dates that are needed to start a uk_sb
83  UK_SB_FUNGII = false;
84 
86 
87  // Set up the date management stuff
88  // The next bit of code just allows for altering dates after harvest if it is necessary
89  // to allow for a crop which starts its management early.
90 
91  // 5 start and stop dates for all 'movable' events for this crop
92  int noDates = 2;
93  m_field->SetMDates(0, 0, g_date->DayInYear(15, 8)); // last possible day of harvest
94  m_field->SetMDates(1, 0, g_date->DayInYear(30, 8)); // last possible day of straw chopping
95  m_field->SetMDates(0, 1, 0); // start day of hay bailing (not used as it depend on previous treatment)
96  m_field->SetMDates(1, 1, g_date->DayInYear(30, 8)); // end day of hay bailing
97  // Can be up to 10 of these. If the shortening code is triggered
98  // then these will be reduced in value to 0
99 
100  m_field->SetMConstants(0, 1);
101 
102  // Check the next crop for early start, unless it is a spring crop
103  // in which case we ASSUME that no checking is necessary!!!!
104  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
105 
106  //new if: do the check only for non-optimising farms and if year>0. (030713 - m_rotation used only in the hidden year, so I modified the condition from >7 to >0)
107  //optimising farms not used for now so most of related code is removed (but not in 'start' case)
108  if (!(m_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
109 
110  if (m_ev->m_startday > g_date->DayInYear(1, 7)) {
111  if (m_field->GetMDates(0, 0) >= m_ev->m_startday)
112  {
113  g_msg->Warn(WARN_BUG, "UKSpringBarley::Do(): ", "Harvest too late for the next crop to start!!!");
114  int almassnum = m_field->GetLandscape()->BackTranslateVegTypes(m_ev->m_next_tov);
115  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
116  }
117  // Now fix any late finishing problems
118  for (int i = 0; i < noDates; i++) {
119  if (m_field->GetMDates(0, i) >= m_ev->m_startday) {
120  m_field->SetMDates(0, i, m_ev->m_startday - 1); //move the starting date
121  }
122  if (m_field->GetMDates(1, i) >= m_ev->m_startday) {
123  m_field->SetMConstants(i, 0); //change the default value of the MConst (=1) to 0 (necessary to correctly execute farm events in case the finishing date (MDate) was moved)
124  m_field->SetMDates(1, i, m_ev->m_startday - 1); //move the finishing date
125  }
126  }
127  }
128  // Now no operations can be timed after the start of the next crop.
129 
130  if (!m_ev->m_first_year) {
131  // Are we before July 1st?
132  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
133  if (g_date->Date() < d1) {
134  // Yes, too early. We assumme this is because the last crop was late
135  printf("Poly: %d\n", m_field->GetPoly());
136  g_msg->Warn(WARN_BUG, "UKSpringBarley::Do(): ", "Crop start attempt between 1st Jan & 1st July");
137  int prev = m_field->GetLandscape()->BackTranslateVegTypes(m_field->GetOwner()->GetPreviousTov(m_field->GetRotIndex()));
138  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
139  int almassnum = m_field->GetLandscape()->BackTranslateVegTypes(m_ev->m_next_tov);
140  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
141  exit(1);
142  }
143  else {
144  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
145  if (g_date->Date() > d1) {
146  // Yes too late - should not happen - raise an error
147  g_msg->Warn(WARN_BUG, "UKSpringBarley::Do(): ", "Crop start attempt after last possible start date");
148  int prev = m_field->GetLandscape()->BackTranslateVegTypes(m_field->GetOwner()->GetPreviousTov(m_field->GetRotIndex()));
149  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
150  int almassnum = m_field->GetLandscape()->BackTranslateVegTypes(m_ev->m_next_tov);
151  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
152  exit(1);
153  }
154  }
155  }
156  else {
157  // Is the first year
158  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes
159  // Code for first spring treatment used
160  if (m_farm->IsStockFarmer()) //Stock Farmer // slurry application
161  {
163  }
165  break;
166  }
167  }//if
168 
169  // End single block date checking code. Please see next line comment as well.
170  // Reinit d1 to first possible starting date.
171  d1 = g_date->OldDays() + g_date->DayInYear(1, 9);
173  }
174  break;
175  // This is the first real farm operation
176 
177  // Stubble cultivator 60% September-October
178  // If stubble cultivate (autumn harrow) then slurry is sometimes applied after which is sometimes ploughed in.
179  // If no stubble cultivate then spring plough instead
180  case uk_sb_autumn_harrow:
181  if (m_ev->m_lock || m_farm->DoIt_prob(0.6))
182  {
183  if (!m_farm->AutumnHarrow(m_field, 0.0, g_date->DayInYear(10, 10) - g_date->DayInYear())) {
185  break;
186  }
187  if (m_farm->IsStockFarmer()) //Stock Farmer // setting the next step which is slurry application
188  {
190  }
191  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, uk_sb_ferti_p1, false, m_farm, m_field);
192  break;
193  }
195  break;
196 
197  // Autumn plough October-December (all farmers which do not stubble cultivate)
198  case uk_sb_autumn_plough:
199  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(1, 12) - g_date->DayInYear())) {
201  break;
202  }
203  if (m_farm->IsStockFarmer()) //Stock Farmer // setting the next step which is N fertiliser application
204  {
206  }
207  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(5, 3) + 365, uk_sb_ferti_p2, false, m_farm, m_field);
208  break;
209 
210  // Slurry applications 40% chance after stubble cultivation
211  // 50% of those who apply slurry will then plough it in
212  // otheriwse if no slurry it goes straight to N application
213  case uk_sb_ferti_p1:
214  if (m_ev->m_lock || m_farm->DoIt_prob(0.40))
215  {
216  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(24, 3) - g_date->DayInYear())) {
218  break;
219  }
221  break;
222  }
224  break;
225  case uk_sb_ferti_s1:
226  if (m_ev->m_lock || m_farm->DoIt_prob(0.40))
227  {
228  if (!m_farm->FA_Slurry(m_field, 0.0, g_date->DayInYear(24, 3) - g_date->DayInYear())) {
230  break;
231  }
233  break;
234  }
236  break;
237  // Spring plough after slurry 20% March
238  case uk_sb_spring_plough:
239  if (m_ev->m_lock || m_farm->DoIt_prob(0.5))
240  {
241  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear())) {
243  break;
244  }
245  }
246  if (m_farm->IsStockFarmer()) //Stock Farmer // setting the next step which is N fertiliser application
247  {
249 
250  }
252  break;
253 
254 
255  // N Fertiliser 85% March
256  case uk_sb_ferti_p2:
257  if (m_ev->m_lock || m_farm->DoIt_prob(0.85))
258  {
259  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
261  break;
262  }
264  break;
265  }
267  break;
268  case uk_sb_ferti_s2:
269  if (m_ev->m_lock || m_farm->DoIt_prob(0.85))
270  {
271  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(30, 3) - g_date->DayInYear())) {
273  break;
274  }
276  break;
277  }
279  break;
280  // NPK application 50% before preseeding
281  case uk_sb_ferti_p3:
282  if (m_ev->m_lock || m_farm->DoIt_prob(0.5))
283  {
284  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
286  break;
287  }
288  }
290  break;
291  case uk_sb_ferti_s3:
292  if (m_ev->m_lock || m_farm->DoIt_prob(0.5))
293  {
294  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(10, 4) - g_date->DayInYear())) {
296  break;
297  }
298  }
300  break;
301 
302  // Preseeding cultivation 100% April
304  if (!m_farm->PreseedingCultivator(m_field, 0.0, g_date->DayInYear(15, 4) - g_date->DayInYear())) {
306  break;
307  }
309  break;
310  // Spring sow 100% April
311  case uk_sb_spring_sow:
312  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(20, 4) - g_date->DayInYear())) {
314  break;
315  }
316  // Here is a fork leading to parallel events. Harrowing. Herbicide. Fungicide. Insecticide. Growth Regulator.
317  // Then runs the fertiliser thread. If needed???? For UK this is sometimes a slurry after harvest.
318  SimpleEvent_(g_date->Date() + 4, uk_sb_harrow, false, m_farm, m_field); // Harrowing
319  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 4), uk_sb_herbicide1, false, m_farm, m_field); // Herbidide thread
320  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), uk_sb_fungicide1, false, m_farm, m_field); // Fungicide thread
321  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(15, 5), uk_sb_insecticide1, false, m_farm, m_field); // Insecticide thread = MAIN THREAD
322  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), uk_sb_growth_regulator1, false, m_farm, m_field); // GR thread
323  break;
324 
325  // Harrow 20% pre-em April
326  case uk_sb_harrow:
327  if (m_ev->m_lock || m_farm->DoIt_prob(0.20))
328  {
329  if (m_field->GetGreenBiomass() <= 0)
330  {
331  if (!m_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(25, 4) - g_date->DayInYear())) {
333  break;
334  }
335  }
336  }
337  // end of thread
338  break;
339 
340  // Herbicide thread
341  // Herbicide 1 90% April
342  case uk_sb_herbicide1: // The first of the managements.
343  // Here comes the herbicide thread
344  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
345  {
346  if (m_field->GetGreenBiomass() <= 0) {
348  }
349  else
350  {
351  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
353  break;
354  }
355  }
356  }
357  // End of thread
358  break;
359 
360  // Fungicide 1
361  case uk_sb_fungicide1:
362  if (m_ev->m_lock || m_farm->DoIt_prob(0.75))
363  {
364  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
366  break;
367  }
368  }
370  break;
371  // Fungicide 2
372  case uk_sb_fungicide2:
373  if (m_ev->m_lock || m_farm->DoIt_prob(0.75))
374  {
375  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(15, 6) - g_date->DayInYear())) {
377  break;
378  }
379  }
380  // End of thread
381  break;
382  // Here comes the insecticide thread = MAIN THREAD with growth regulator
383  case uk_sb_insecticide1:
384  // Here comes the insecticide thread = MAIN THREAD
385  if (m_ev->m_lock || m_farm->DoIt_prob(0.30))
386  {
387  // here we check wheter we are using ERA pesticide or not
389  !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
390  {
391  if (!m_farm->InsecticideTreat(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
393  break;
394  }
395  }
396  else {
398  }
399  }
401  break;
403  // Here comes the GR thread
404  if (m_ev->m_lock || m_farm->DoIt_prob(0.40))
405  {
406  if (!m_farm->GrowthRegulator(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
408  break;
409  }
410  }
411  // End of thread
412  break;
413  // Harvest 100% July-August
414  case uk_sb_harvest:
415  // Here the MAIN thread continues
416  // We don't move harvest days
417  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(0, 0) - g_date->DayInYear())) {
419  break;
420  }
422  break;
423  // Straw chopping 50% after harvest
425  if (m_ev->m_lock || m_farm->DoIt_prob(0.50))
426  {
427  if (m_field->GetMConstants(0) == 0) {
428  if (!m_farm->StrawChopping(m_field, 0.0, -1)) { // raise an error
429  g_msg->Warn(WARN_BUG, "UKSpringBarley::Do(): failure in 'StrawChopping' execution", "");
430  exit(1);
431  }
432  }
433  else {
434  if (!m_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
436  break;
437  }
438  }
439  done = true;
440  break;
441  }
443  break;
444  // Hay bailing 50% after harvest
445  case uk_sb_hay_bailing:
446  if (m_field->GetMConstants(1) == 0) {
447  if (!m_farm->HayBailing(m_field, 0.0, -1)) { // raise an error
448  g_msg->Warn(WARN_BUG, "UKSpringBarley::Do(): failure in 'HayBailing' execution", "");
449  exit(1);
450  }
451  }
452  else {
453  if (!m_farm->HayBailing(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
455  break;
456  }
457  }
458  done = true;
459  break;
460  default:
461  g_msg->Warn(WARN_BUG, "UKSpringBarley::Do(): "
462  "Unknown event type! ", "");
463  exit(1);
464  }
465  return done;
466 }

References Farm::AutumnHarrow(), Farm::AutumnPlough(), cfg_pest_product_amounts, cfg_pest_springbarley_on, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FP_AmmoniumSulphate(), Farm::FP_NPK(), Farm::FP_Slurry(), Farm::FungicideTreat(), g_date, g_msg, LE::GetGreenBiomass(), LE::GetMConstants(), LE::GetMDates(), LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), Farm::GetType(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::PreseedingCultivator(), Farm::ProductApplication(), LE::SetMConstants(), LE::SetMDates(), Farm::ShallowHarrow(), Crop::SimpleEvent_(), Farm::SpringPlough(), Farm::SpringSow(), Farm::StrawChopping(), tof_OptimisingFarm, tov_UKSpringBarley, uk_sb_autumn_harrow, uk_sb_autumn_plough, uk_sb_ferti_p1, uk_sb_ferti_p2, uk_sb_ferti_p3, uk_sb_ferti_s1, uk_sb_ferti_s2, uk_sb_ferti_s3, uk_sb_fungicide1, uk_sb_fungicide2, UK_SB_FUNGII, uk_sb_growth_regulator1, uk_sb_harrow, uk_sb_harvest, uk_sb_hay_bailing, uk_sb_herbicide1, uk_sb_insecticide1, uk_sb_preseeding_cultivator, uk_sb_spring_plough, uk_sb_spring_sow, uk_sb_start, uk_sb_straw_chopping, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void UKSpringBarley::SetUpFarmCategoryInformation ( )
inline
80  {
81  const int elements = 2 + (uk_sb_foobar - UKSPRINGBARLEY_BASE);
83  FarmManagementCategory catlist[elements] =
84  {
85  fmc_Others, // this needs to be at the zero line
86  fmc_Others,//uk_sb_start = 1, // Compulsory, must always be 1 (one).
87  fmc_Others,//uk_sb_sleep_all_day = UKSPRINGBARLEY_BASE,
88  fmc_Cultivation,//uk_sb_autumn_harrow, // Stubble cultivator 60% September-October
89  fmc_Cultivation,//uk_sb_autumn_plough, // Autumn plough 50% October-December
90  fmc_Fertilizer,//uk_sb_ferti_s1, // Slurry 40% March if no autumn plough
91  fmc_Fertilizer,//uk_sb_ferti_p1,
92  fmc_Cultivation,//uk_sb_spring_plough, //Spring plough 20% March if Slurry
93  fmc_Fertilizer,//uk_sb_ferti_s2, // N fertiliser 85% March
94  fmc_Fertilizer,//uk_sb_ferti_p2,
95  fmc_Fertilizer,//uk_sb_ferti_s3, // NPK application 50% before preseeding
96  fmc_Fertilizer,//uk_sb_ferti_p3,
97  fmc_Cultivation,//uk_sb_preseeding_cultivator, // Preseeding cultivation 100% April
98  fmc_Others,//uk_sb_spring_sow, // Spring sow 100% April
99  fmc_Cultivation,//uk_sb_harrow, // Harrow 20% pre-em April
100  fmc_Herbicide,//uk_sb_herbicide1, // Herbicide 1 90% April
101  fmc_Fungicide,//uk_sb_fungicide1, // Fungicide 1 80% June
102  fmc_Fungicide,//uk_sb_fungicide2, // Fungicide 2 40% 14-21 days after f1
103  fmc_Insecticide,//uk_sb_insecticide1, // Insecticide 1 30% June
104  fmc_Others,//uk_sb_growth_regulator1, // Growth Regulator 1 40% May-June
105  fmc_Harvest,//uk_sb_harvest, // Harvest 100% July-August
106  fmc_Others,//uk_sb_straw_chopping, // Straw chopping 50% after harvest
107  fmc_Others,//uk_sb_hay_bailing, // Hay bailing 50% after harvest
108  };
109  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
110  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, uk_sb_foobar, and UKSPRINGBARLEY_BASE.

Referenced by UKSpringBarley().


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
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
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
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
uk_sb_autumn_plough
Definition: UKSpringBarley.h:37
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
uk_sb_ferti_s1
Definition: UKSpringBarley.h:38
LE::GetMConstants
int GetMConstants(int a)
Definition: Elements.h:407
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
uk_sb_start
Definition: UKSpringBarley.h:34
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
uk_sb_ferti_s2
Definition: UKSpringBarley.h:41
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
uk_sb_straw_chopping
Definition: UKSpringBarley.h:54
LE::GetPoly
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: Elements.h:238
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
uk_sb_herbicide1
Definition: UKSpringBarley.h:48
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
uk_sb_growth_regulator1
Definition: UKSpringBarley.h:52
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
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
uk_sb_fungicide2
Definition: UKSpringBarley.h:50
uk_sb_preseeding_cultivator
Definition: UKSpringBarley.h:45
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
uk_sb_ferti_p3
Definition: UKSpringBarley.h:44
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::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
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.
CfgBool::value
bool value() const
Definition: Configurator.h:164
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
uk_sb_ferti_p2
Definition: UKSpringBarley.h:42
Calendar::Date
long Date(void)
Definition: Calendar.h:57
UK_SB_FUNGII
#define UK_SB_FUNGII
A flag used to indicate autumn ploughing status.
Definition: UKSpringBarley.h:25
Farm::FP_AmmoniumSulphate
virtual bool FP_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply Ammonium Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:882
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
UKSPRINGBARLEY_BASE
#define UKSPRINGBARLEY_BASE
Definition: UKSpringBarley.h:21
uk_sb_hay_bailing
Definition: UKSpringBarley.h:55
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
uk_sb_ferti_p1
Definition: UKSpringBarley.h:39
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
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
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
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
LE::GetGreenBiomass
virtual double GetGreenBiomass(void)
Definition: Elements.h:160
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
UKSpringBarley::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: UKSpringBarley.h:80
cfg_pest_springbarley_on
CfgBool cfg_pest_springbarley_on
Turn on pesticides for spring barley.
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
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::AutumnHarrow
virtual bool AutumnHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the autumn on a_field.
Definition: FarmFuncs.cpp:285
Farm::FA_AmmoniumSulphate
virtual bool FA_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply ammonium sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1081
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
uk_sb_ferti_s3
Definition: UKSpringBarley.h:43
uk_sb_spring_sow
Definition: UKSpringBarley.h:46
tov_UKSpringBarley
Definition: LandscapeFarmingEnums.h:283
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
uk_sb_fungicide1
Definition: UKSpringBarley.h:49
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
uk_sb_foobar
Definition: UKSpringBarley.h:56
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
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
uk_sb_autumn_harrow
Definition: UKSpringBarley.h:36
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
uk_sb_insecticide1
Definition: UKSpringBarley.h:51
WARN_BUG
Definition: MapErrorMsg.h:34
uk_sb_harvest
Definition: UKSpringBarley.h:53
uk_sb_harrow
Definition: UKSpringBarley.h:47
ppp_1
Definition: LandscapeFarmingEnums.h:1079
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
uk_sb_spring_plough
Definition: UKSpringBarley.h:40
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
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