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

#include <SpringBarleyStriglingCulm.h>

Inheritance diagram for SpringBarleyStriglingCulm:
Crop

Public Member Functions

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

◆ SpringBarleyStriglingCulm()

SpringBarleyStriglingCulm::SpringBarleyStriglingCulm ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
81  : Crop(a_tov, a_toc, a_L)
82  {
85  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

40  {
41  m_farm = a_farm;
42  m_field = a_field;
43  m_ev = a_ev;
44 
45  bool done = false;
46 
47  switch ( m_ev->m_todo ) {
48  case sbstc_start: {
49  a_field->ClearManagementActionSum();
50 
51  // Set up the date management stuff
52  // Could save the start day in case it is needed later
53  // m_field->m_startday = m_ev->m_startday;
54  m_last_date = g_date->DayInYear( 30, 8 );
55  // Start and stop dates for all events after harvest
56  int noDates = 2;
57  m_field->SetMDates( 0, 0, g_date->DayInYear( 20, 8 ) );
58  // Determined by harvest date - used to see if at all possible
59  m_field->SetMDates( 1, 0, g_date->DayInYear( 10, 8 ) );
60  m_field->SetMDates( 0, 1, g_date->DayInYear( 10, 8 ) );
61  m_field->SetMDates( 1, 1, g_date->DayInYear( 30, 8 ) );
62  // Check the next crop for early start, unless it is a spring crop
63  // in which case we ASSUME that no checking is necessary!!!!
64  // So DO NOT implement a crop that runs over the year boundary
65  if ( m_ev->m_startday > g_date->DayInYear( 1, 7 ) ) {
66  if ( m_field->GetMDates( 0, 0 ) >= m_ev->m_startday ) {
67  g_msg->Warn( WARN_BUG, "SpringBarley::Do(): ""Harvest too late for the next crop to start!!!", "" );
68  exit( 1 );
69  }
70  // Now fix any late finishing problems
71  for ( int i = 0; i < noDates; i++ ) {
72  if ( m_field->GetMDates( 0, i ) >= m_ev->m_startday )
73  m_field->SetMDates( 0, i, m_ev->m_startday - 1 );
74  if ( m_field->GetMDates( 1, i ) >= m_ev->m_startday )
75  m_field->SetMDates( 1, i, m_ev->m_startday - 1 );
76  }
77  }
78  // Now no operations can be timed after the start of the next crop.
79 
80  int d1;
81  if ( !m_ev->m_first_year ) {
82  int today = g_date->Date();
83  // Are we before July 1st?
84  d1 = g_date->OldDays() + g_date->DayInYear( 1, 7 );
85  if ( today < d1 ) {
86  // Yes, too early. We assumme this is because the last crop was late
87  g_msg->Warn( WARN_BUG, "SpringBarley::Do(): ""Crop start attempt between 1st Jan & 1st July", "" );
88  exit( 1 );
89  } else {
90  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
91  if ( today > d1 ) {
92  // Yes too late - should not happen - raise an error
93  g_msg->Warn( WARN_BUG, "SpringBarley::Do(): ""Crop start attempt after last possible start date", "" );
94  exit( 1 );
95  }
96  }
97  } else {
99  break;
100  }
101  // End single block date checking code. Please see next line
102  // comment as well.
103  // Reinit d1 to first possible starting date.
104  d1 = g_date->OldDays() + g_date->DayInYear( 1, 11 );
105  if ( g_date->Date() > d1 ) {
106  d1 = g_date->Date();
107  }
108 
109  // OK, let's go.
110  SimpleEvent( d1, sbstc_autumn_plough, false );
111  SBSTC_SLURRY_DONE = false;
112  SBSTC_MANURE_DONE = false;
113  SBSTC_SLURRY_EXEC = false;
114  SBSTC_MANURE_EXEC = false;
115  SBSTC_DID_AUTUMN_PLOUGH = false;
116  }
117  break;
118 
119  case sbstc_autumn_plough:
120  if ( m_ev->m_lock || m_farm->DoIt( 70 ) ) {
121  if ( !m_farm->AutumnPlough( m_field, 0.0, g_date->DayInYear( 30, 11 ) - g_date->DayInYear() ) ) {
122  SimpleEvent( g_date->Date() + 1, sbstc_autumn_plough, true );
123  break;
124  }
126  }
127  // +365 for next year
128  if ( m_farm->IsStockFarmer() ) // StockFarmer
129  {
130  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 3 ) + 365, sbstc_fertslurry_stock, false );
131  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 3 ) + 365, sbstc_fertmanure_stock_one, false );
132  } else { // PlantFarmer
133  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20, 3 ) + 365, sbstc_spring_plough, false );
134  }
135  break;
136 
137  //*** The stock farmers thread
139  if ( m_ev->m_lock || m_farm->DoIt( 90 ) ) {
140  if ( !m_farm->FA_Slurry( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
142  break;
143  }
144  SBSTC_SLURRY_EXEC = true;
145  }
146  SBSTC_SLURRY_DONE = true;
147  if ( SBSTC_MANURE_DONE ) {
148  // We are the last thread, so queue up spring plough.
150  }
151  break;
152 
154  if ( m_ev->m_lock || m_farm->DoIt( 67 ) ) {
155  if ( !m_farm->FA_Manure( m_field, 0.0, g_date->DayInYear( 15, 4 ) - g_date->DayInYear() ) ) {
157  break;
158  }
159  SBSTC_MANURE_EXEC = true;
160  }
161  SBSTC_MANURE_DONE = true;
162  if ( SBSTC_SLURRY_DONE ) {
164  }
165  break;
166 
167  case sbstc_spring_plough:
168  if ( !SBSTC_DID_AUTUMN_PLOUGH ) {
169  if ( !m_farm->SpringPlough( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
170  SimpleEvent( g_date->Date() + 1, sbstc_spring_plough, true );
171  break;
172  }
173  }
174  {
175  int d1 = g_date->Date();
176  if ( d1 < g_date->OldDays() + g_date->DayInYear( 20, 3 ) ) {
177  d1 = g_date->OldDays() + g_date->DayInYear( 20, 3 );
178  }
179  SimpleEvent( d1, sbstc_spring_harrow, false );
180  }
181  break;
182 
183  case sbstc_spring_harrow:
184  if ( !m_farm->SpringHarrow( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
185  SimpleEvent( g_date->Date() + 1, sbstc_spring_harrow, true );
186  break;
187  }
188  if ( m_farm->IsStockFarmer() ) {
190  } else {
192  }
193  break;
194 
196  if ( m_ev->m_lock || m_farm->DoIt( 65 ) || ( !SBSTC_SLURRY_EXEC && !SBSTC_MANURE_EXEC ) ) {
197  if ( !m_farm->FA_NPK( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
199  break;
200  }
201  }
202  {
203  int d1 = g_date->Date();
204  if ( d1 < g_date->OldDays() + g_date->DayInYear( 25, 3 ) ) {
205  d1 = g_date->OldDays() + g_date->DayInYear( 25, 3 );
206  }
207  SimpleEvent( d1, sbstc_spring_sow, false );
208  }
209  break;
210 
212  if ( m_ev->m_lock || m_farm->DoIt( 75 ) ) {
213  if ( !m_farm->FP_NPK( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
215  break;
216  }
217  // Did FP_NPK so go directly to spring sow.
218  {
219  int d1 = g_date->Date();
220  if ( d1 < g_date->OldDays() + g_date->DayInYear( 25, 3 ) ) {
221  d1 = g_date->OldDays() + g_date->DayInYear( 25, 3 );
222  }
223  SimpleEvent( d1, sbstc_spring_sow, false );
224  }
225  break;
226  }
228  break;
229 
231  if ( !m_farm->FP_LiquidNH3( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
232  SimpleEvent( g_date->Date() + 1, sbstc_fertlnh3_plant, true );
233  break;
234  }
236  break;
237 
238  case sbstc_fertpk_plant:
239  if ( !m_farm->FP_PK( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
240  SimpleEvent( g_date->Date() + 1, sbstc_fertpk_plant, true );
241  break;
242  }
243  {
244  int d1 = g_date->Date();
245  if ( d1 < g_date->OldDays() + g_date->DayInYear( 25, 3 ) ) {
246  d1 = g_date->OldDays() + g_date->DayInYear( 25, 3 );
247  }
248  SimpleEvent( d1, sbstc_spring_sow, false );
249  }
250  break;
251 
252  case sbstc_spring_sow:
253  if ( !m_farm->SpringSow( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
254  SimpleEvent( g_date->Date() + 1, sbstc_spring_sow, true );
255  break;
256  }
257  {
258  int d1 = g_date->Date();
259  if ( d1 < g_date->OldDays() + g_date->DayInYear( 5, 4 ) ) {
260  d1 = g_date->OldDays() + g_date->DayInYear( 5, 4 );
261  }
262  SimpleEvent( d1, sbstc_spring_roll, false );
263  }
264  break;
265 
266  case sbstc_spring_roll:
267  if ( m_ev->m_lock || m_farm->DoIt( 30 ) ) {
268  if ( !m_farm->SpringRoll( m_field, 0.0, g_date->DayInYear( 20, 4 ) - g_date->DayInYear() ) ) {
269  SimpleEvent( g_date->Date() + 1, sbstc_spring_roll, true );
270  break;
271  }
272  }
273  SBSTC_HERBI_DATE = 0;
274  SBSTC_GR_DATE = 0;
275  SBSTC_FUNGI_DATE = 0;
276  SBSTC_WATER_DATE = 0;
277  SBSTC_INSECT_DATE = 0;
279  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10, 5 ), sbstc_fungicide_one, false ); // Main.
280  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10, 5 ), sbstc_GR, false );
281  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 5 ), sbstc_water_one, false );
282  break;
283 
284 
285  case sbstc_strigling_one:
286  if ( !m_farm->Strigling( m_field, 0.0, 0 ) ) {
287  SimpleEvent( g_date->Date() + 1, sbstc_strigling_one, true );
288  break;
289  } else {
290  if ( cfg_CulmLastStriglingTime.value() > 1 )
292  }
293  break;
294  // end the thread
295 
296  case sbstc_strigling_two:
297  if ( !m_farm->Strigling( m_field, 0.0, 0 ) ) {
298  SimpleEvent( g_date->Date() + 1, sbstc_strigling_two, true );
299  break;
300  } else {
301  if ( cfg_CulmLastStriglingTime.value() > 2 )
303  }
304  break;
305  // end the thread
306 
308  if ( !m_farm->Strigling( m_field, 0.0, 0 ) ) {
309  SimpleEvent( g_date->Date() + 1, sbstc_strigling_three, true );
310  break;
311  } else {
312  if ( cfg_CulmLastStriglingTime.value() > 3 )
314  }
315  break;
316  // end the thread
317 
319  if ( !m_farm->Strigling( m_field, 0.0, 0 ) ) {
320  SimpleEvent( g_date->Date() + 1, sbstc_strigling_four, true );
321  break;
322  }
323  break;
324  // end the thread
325 
326  // GReg thread
327  case sbstc_GR:
328  if ( g_date->Date() < SBSTC_HERBI_DATE + 1 || g_date->Date() < SBSTC_FUNGI_DATE + 1 ) {
329  SimpleEvent( g_date->Date() + 1, sbstc_GR, m_ev->m_lock );
330  break;
331  }
332  if ( m_ev->m_lock || m_farm->DoIt( ( int )floor( 0.5 + 5 * cfg_greg_app_prop.value() ) ) ) {
333  if ( !m_farm->GrowthRegulator( m_field, 0.0, g_date->DayInYear( 25, 5 ) - g_date->DayInYear() ) ) {
334  SimpleEvent( g_date->Date() + 1, sbstc_GR, true );
335  break;
336  }
338  }
339  break;
340 
341  // Fungicide thread & MAIN THREAD
342  case sbstc_fungicide_one:
343  if ( g_date->Date() < SBSTC_HERBI_DATE + 1 || g_date->Date() < SBSTC_GR_DATE + 1 ) {
345  break;
346  }
347  if ( m_ev->m_lock || m_farm->DoIt( ( int )floor( 0.5 + 30 * cfg_fungi_app_prop1.value() ) ) ) {
348  if ( !m_farm->FungicideTreat( m_field, 0.0, g_date->DayInYear( 25, 5 ) - g_date->DayInYear() ) ) {
349  SimpleEvent( g_date->Date() + 1, sbstc_fungicide_one, true );
350  break;
351  }
353  {
354  int d1 = g_date->Date() + 10;
355  if ( d1 < g_date->OldDays() + g_date->DayInYear( 25, 5 ) ) {
356  d1 = g_date->OldDays() + g_date->DayInYear( 25, 5 );
357  }
358  SimpleEvent( d1, sbstc_fungicide_two, false );
359  }
360  }
361  {
362  int d1 = g_date->Date();
363  if ( d1 < g_date->OldDays() + g_date->DayInYear( 15, 5 ) ) {
364  d1 = g_date->OldDays() + g_date->DayInYear( 15, 5 );
365  }
366  SimpleEvent( d1, sbstc_insecticide, false );
367  }
368  break;
369 
370  case sbstc_fungicide_two:
371  if ( g_date->Date() < SBSTC_HERBI_DATE + 1 || g_date->Date() < SBSTC_GR_DATE + 1 ) {
373  break;
374  }
375  if ( m_ev->m_lock || m_farm->DoIt( ( int )floor( 0.5 + 33 * cfg_fungi_app_prop1.value() ) ) ) {
376  if ( !m_farm->FungicideTreat( m_field, 0.0, g_date->DayInYear( 10, 6 ) - g_date->DayInYear() ) ) {
377  SimpleEvent( g_date->Date() + 1, sbstc_fungicide_two, true );
378  break;
379  }
381  }
382  break;
383 
384  // Water thread
385  case sbstc_water_one:
386  if ( g_date->Date() < SBSTC_HERBI_DATE + 1 || g_date->Date() < SBSTC_FUNGI_DATE + 1 ) {
388  break;
389  }
390  if ( m_ev->m_lock || m_farm->DoIt( 20 ) ) {
391  if ( !m_farm->Water( m_field, 0.0, g_date->DayInYear( 30, 5 ) - g_date->DayInYear() ) ) {
392  SimpleEvent( g_date->Date() + 1, sbstc_water_one, true );
393  break;
394  }
396  }
397  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 6 ), sbstc_water_two, false );
398  break;
399 
400  case sbstc_water_two:
401  if ( g_date->Date() < SBSTC_INSECT_DATE + 1 ) {
403  break;
404  }
405  if ( m_ev->m_lock || m_farm->DoIt( 10 ) ) {
406  if ( !m_farm->Water( m_field, 0.0, g_date->DayInYear( 1, 7 ) - g_date->DayInYear() ) ) {
407  SimpleEvent( g_date->Date() + 1, sbstc_water_two, true );
408  break;
409  }
411  }
412  break;
413 
414  // Insecticide thread & MAIN THREAD
415  case sbstc_insecticide:
416  if ( g_date->Date() < SBSTC_WATER_DATE + 1 ) {
418  break;
419  }
420  if ( m_ev->m_lock || m_farm->DoIt( ( int )floor( 0.5 + 35 * cfg_ins_app_prop1.value() ) ) ) {
421  if ( !m_farm->InsecticideTreat( m_field, 0.0, g_date->DayInYear( 10, 6 ) - g_date->DayInYear() ) ) {
422  SimpleEvent( g_date->Date() + 1, sbstc_insecticide, true );
423  break;
424  }
426  }
427  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 8 ), sbstc_harvest, false );
428  break;
429 
430  case sbstc_harvest:
431  if ( !m_farm->Harvest( m_field, 0.0, g_date->DayInYear( 20, 8 ) - g_date->DayInYear() ) ) {
432  SimpleEvent( g_date->Date() + 1, sbstc_harvest, true );
433  break;
434  }
436  break;
437 
439  if ( m_ev->m_lock || m_farm->DoIt( 50 ) ) {
440  // Force straw chopping to happen on the same day as harvest.
441  if ( !m_farm->StrawChopping( m_field, 0.0, 0 ) ) {
442  // Shouldn't happen.
444  break;
445  }
446  // Did chop, so go directly to stubble harrowing.
448  break;
449  }
450  // Do hay baling first.
451  SimpleEvent( g_date->Date(), sbstc_hay_baling, false );
452  break;
453 
454  case sbstc_hay_baling:
455  if ( !m_farm->HayBailing( m_field, 0.0, m_field->GetMDates( 1, 0 ) - g_date->DayInYear() ) ) {
456  SimpleEvent( g_date->Date() + 1, sbstc_hay_baling, true );
457  break;
458  }
460  break;
461 
463  if ( m_ev->m_lock || m_farm->DoIt( 60 ) ) {
464  if ( !m_farm->StubbleHarrowing( m_field, 0.0, m_field->GetMDates( 1, 1 ) - g_date->DayInYear() ) ) {
465  SimpleEvent( g_date->Date() + 1, sbstc_stubble_harrow, true );
466  break;
467  }
468  }
469  // END MAIN THREAD
470  done = true;
471  break;
472 
473  default:
474  g_msg->Warn( WARN_BUG, "SpringBarley::Do(): ""Unknown event type! ", "" );
475  exit( 1 );
476  }
477  return done;
478 }

References Farm::AutumnPlough(), cfg_CulmLastStriglingTime, cfg_fungi_app_prop1, cfg_greg_app_prop, cfg_ins_app_prop1, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FP_LiquidNH3(), Farm::FP_NPK(), Farm::FP_PK(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), sbstc_autumn_plough, SBSTC_DID_AUTUMN_PLOUGH, sbstc_fertlnh3_plant, sbstc_fertmanure_plant, sbstc_fertmanure_stock_one, sbstc_fertmanure_stock_two, sbstc_fertpk_plant, sbstc_fertslurry_stock, SBSTC_FUNGI_DATE, sbstc_fungicide_one, sbstc_fungicide_two, sbstc_GR, SBSTC_GR_DATE, sbstc_harvest, sbstc_hay_baling, SBSTC_HERBI_DATE, SBSTC_INSECT_DATE, sbstc_insecticide, SBSTC_MANURE_DONE, SBSTC_MANURE_EXEC, SBSTC_SLURRY_DONE, SBSTC_SLURRY_EXEC, sbstc_spring_harrow, sbstc_spring_plough, sbstc_spring_roll, sbstc_spring_sow, sbstc_start, sbstc_straw_chopping, sbstc_strigling_four, sbstc_strigling_one, sbstc_strigling_three, sbstc_strigling_two, sbstc_stubble_harrow, SBSTC_WATER_DATE, sbstc_water_one, sbstc_water_two, LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::StrawChopping(), Farm::Strigling(), Farm::StubbleHarrowing(), CfgInt::value(), CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void SpringBarleyStriglingCulm::SetUpFarmCategoryInformation ( )
inline
86  {
87  const int elements = 2 + (sbstc_foobar - SBSTC_BASE);
89 
90  FarmManagementCategory catlist[elements] =
91  {
92  fmc_Others, // zero element unused but must be here
93  fmc_Others,//sbstc_start = 1, // Compulsory, start event must always be 1 (one).
94  fmc_Cultivation,//sbstc_autumn_plough = SBSTC_BASE,
95  fmc_Fertilizer,//sbstc_fertslurry_stock,
96  fmc_Fertilizer,//sbstc_fertmanure_stock_one,
97  fmc_Cultivation,//sbstc_spring_plough,
98  fmc_Cultivation,//sbstc_spring_harrow,
99  fmc_Fertilizer,//sbstc_fertmanure_plant,
100  fmc_Fertilizer,//sbstc_fertlnh3_plant,
101  fmc_Fertilizer,//sbstc_fertpk_plant,
102  fmc_Fertilizer,//sbstc_fertmanure_stock_two,
103  fmc_Fertilizer,//sbstc_fertnpk_stock,
104  fmc_Others,//sbstc_spring_sow,
105  fmc_Others,//sbstc_spring_roll,
106  fmc_Cultivation,//sbstc_strigling_one,
107  fmc_Cultivation,//sbstc_strigling_two,
108  fmc_Cultivation,//sbstc_strigling_three,
109  fmc_Cultivation,//sbstc_strigling_four,
110  fmc_Others,//sbstc_GR,
111  fmc_Fungicide,//sbstc_fungicide_one,
112  fmc_Insecticide,//sbstc_insecticide,
113  fmc_Fungicide,//sbstc_fungicide_two,
114  fmc_Watering,//sbstc_water_one,
115  fmc_Watering,//sbstc_water_two,
116  fmc_Harvest,//sbstc_harvest,
117  fmc_Others,//sbstc_straw_chopping,
118  fmc_Others,//sbstc_hay_baling,
119  fmc_Cultivation//sbstc_stubble_harrow
120 
121  // no foobar entry
122 
123  };
124  // Iterate over the catlist elements and copy them to vector
125  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
126 
127  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, Crop::m_ManagementCategories, SBSTC_BASE, and sbstc_foobar.

Referenced by SpringBarleyStriglingCulm().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
Farm::SpringRoll
virtual bool SpringRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the spring on a_field.
Definition: FarmFuncs.cpp:487
sbstc_spring_roll
Definition: SpringBarleyStriglingCulm.h:57
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
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
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
Farm::Strigling
virtual bool Strigling(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field.
Definition: FarmFuncs.cpp:1206
sbstc_spring_plough
Definition: SpringBarleyStriglingCulm.h:49
Farm::Harvest
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: FarmFuncs.cpp:1364
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
sbstc_fertmanure_stock_one
Definition: SpringBarleyStriglingCulm.h:48
sbstc_fertslurry_stock
Definition: SpringBarleyStriglingCulm.h:47
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::FP_NPK
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:645
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
sbstc_water_two
Definition: SpringBarleyStriglingCulm.h:67
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
Farm::FA_Manure
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1110
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
CfgFloat::value
double value() const
Definition: Configurator.h:142
SBSTC_MANURE_EXEC
#define SBSTC_MANURE_EXEC
Definition: SpringBarleyStriglingCulm.h:35
SBSTC_WATER_DATE
#define SBSTC_WATER_DATE
Definition: SpringBarleyStriglingCulm.h:41
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
SBSTC_FUNGI_DATE
#define SBSTC_FUNGI_DATE
Definition: SpringBarleyStriglingCulm.h:40
sbstc_fertmanure_plant
Definition: SpringBarleyStriglingCulm.h:51
SBSTC_BASE
#define SBSTC_BASE
Definition: SpringBarleyStriglingCulm.h:31
sbstc_spring_sow
Definition: SpringBarleyStriglingCulm.h:56
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
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
sbstc_GR
Definition: SpringBarleyStriglingCulm.h:62
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
sbstc_fungicide_one
Definition: SpringBarleyStriglingCulm.h:63
Farm::FP_PK
virtual bool FP_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:673
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
sbstc_hay_baling
Definition: SpringBarleyStriglingCulm.h:70
sbstc_fertlnh3_plant
Definition: SpringBarleyStriglingCulm.h:52
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
cfg_CulmLastStriglingTime
CfgInt cfg_CulmLastStriglingTime("STR_CULMLASTSTRIGLINGTIME", CFG_CUSTOM, 1)
sbstc_strigling_two
Definition: SpringBarleyStriglingCulm.h:59
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
SBSTC_SLURRY_DONE
#define SBSTC_SLURRY_DONE
Definition: SpringBarleyStriglingCulm.h:32
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
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
sbstc_strigling_four
Definition: SpringBarleyStriglingCulm.h:61
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
sbstc_fungicide_two
Definition: SpringBarleyStriglingCulm.h:65
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
sbstc_foobar
Definition: SpringBarleyStriglingCulm.h:72
cfg_greg_app_prop
CfgFloat cfg_greg_app_prop
SBSTC_INSECT_DATE
#define SBSTC_INSECT_DATE
Definition: SpringBarleyStriglingCulm.h:42
sbstc_insecticide
Definition: SpringBarleyStriglingCulm.h:64
cfg_fungi_app_prop1
CfgFloat cfg_fungi_app_prop1
sbstc_fertpk_plant
Definition: SpringBarleyStriglingCulm.h:53
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
CfgInt::value
int value() const
Definition: Configurator.h:116
SBSTC_HERBI_DATE
#define SBSTC_HERBI_DATE
Definition: SpringBarleyStriglingCulm.h:38
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
sbstc_start
Definition: SpringBarleyStriglingCulm.h:45
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
SBSTC_SLURRY_EXEC
#define SBSTC_SLURRY_EXEC
Definition: SpringBarleyStriglingCulm.h:34
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
sbstc_harvest
Definition: SpringBarleyStriglingCulm.h:68
sbstc_fertmanure_stock_two
Definition: SpringBarleyStriglingCulm.h:54
Farm::FP_LiquidNH3
virtual bool FP_LiquidNH3(LE *a_field, double a_user, int a_days)
Apply liquid ammonia fertilizer to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:808
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
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
sbstc_water_one
Definition: SpringBarleyStriglingCulm.h:66
SBSTC_GR_DATE
#define SBSTC_GR_DATE
Definition: SpringBarleyStriglingCulm.h:39
SBSTC_DID_AUTUMN_PLOUGH
#define SBSTC_DID_AUTUMN_PLOUGH
Definition: SpringBarleyStriglingCulm.h:36
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
sbstc_stubble_harrow
Definition: SpringBarleyStriglingCulm.h:71
SBSTC_MANURE_DONE
#define SBSTC_MANURE_DONE
Definition: SpringBarleyStriglingCulm.h:33
sbstc_autumn_plough
Definition: SpringBarleyStriglingCulm.h:46
SpringBarleyStriglingCulm::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: SpringBarleyStriglingCulm.h:86
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
sbstc_straw_chopping
Definition: SpringBarleyStriglingCulm.h:69
sbstc_spring_harrow
Definition: SpringBarleyStriglingCulm.h:50
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
sbstc_strigling_three
Definition: SpringBarleyStriglingCulm.h:60
WARN_BUG
Definition: MapErrorMsg.h:34
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
sbstc_strigling_one
Definition: SpringBarleyStriglingCulm.h:58
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