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

#include <SpringBarleyStriglingSingle.h>

Inheritance diagram for SpringBarleyStriglingSingle:
Crop

Public Member Functions

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

◆ SpringBarleyStriglingSingle()

SpringBarleyStriglingSingle::SpringBarleyStriglingSingle ( 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 SpringBarleyStriglingSingle::Do ( Farm a_farm,
LE a_field,
FarmEvent a_ev 
)
virtual

Reimplemented from Crop.

43  {
44  m_farm = a_farm;
45  m_field = a_field;
46  m_ev = a_ev;
47 
48  bool done = false;
49 
50  switch ( m_ev->m_todo ) {
51  case sbsts_start: {
52  a_field->ClearManagementActionSum();
53 
54  // Set up the date management stuff
55  // Could save the start day in case it is needed later
56  // m_field->m_startday = m_ev->m_startday;
57  m_last_date = g_date->DayInYear( 30, 8 );
58  // Start and stop dates for all events after harvest
59  int noDates = 2;
60  m_field->SetMDates( 0, 0, g_date->DayInYear( 20, 8 ) );
61  // Determined by harvest date - used to see if at all possible
62  m_field->SetMDates( 1, 0, g_date->DayInYear( 10, 8 ) );
63  m_field->SetMDates( 0, 1, g_date->DayInYear( 10, 8 ) );
64  m_field->SetMDates( 1, 1, g_date->DayInYear( 30, 8 ) );
65  // Check the next crop for early start, unless it is a spring crop
66  // in which case we ASSUME that no checking is necessary!!!!
67  // So DO NOT implement a crop that runs over the year boundary
68  if ( m_ev->m_startday > g_date->DayInYear( 1, 7 ) ) {
69  if ( m_field->GetMDates( 0, 0 ) >= m_ev->m_startday ) {
70  g_msg->Warn( WARN_BUG, "SpringBarley::Do(): ""Harvest too late for the next crop to start!!!", "" );
71  exit( 1 );
72  }
73  // Now fix any late finishing problems
74  for ( int i = 0; i < noDates; i++ ) {
75  if ( m_field->GetMDates( 0, i ) >= m_ev->m_startday )
76  m_field->SetMDates( 0, i, m_ev->m_startday - 1 );
77  if ( m_field->GetMDates( 1, i ) >= m_ev->m_startday )
78  m_field->SetMDates( 1, i, m_ev->m_startday - 1 );
79  }
80  }
81  // Now no operations can be timed after the start of the next crop.
82 
83  int d1;
84  if ( !m_ev->m_first_year ) {
85  int today = g_date->Date();
86  // Are we before July 1st?
87  d1 = g_date->OldDays() + g_date->DayInYear( 1, 7 );
88  if ( today < d1 ) {
89  // Yes, too early. We assumme this is because the last crop was late
90  g_msg->Warn( WARN_BUG, "SpringBarley::Do(): ""Crop start attempt between 1st Jan & 1st July", "" );
91  exit( 1 );
92  } else {
93  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
94  if ( today > d1 ) {
95  // Yes too late - should not happen - raise an error
96  g_msg->Warn( WARN_BUG, "SpringBarley::Do(): ""Crop start attempt after last possible start date", "" );
97  exit( 1 );
98  }
99  }
100  } else {
102  break;
103  }
104  // End single block date checking code. Please see next line
105  // comment as well.
106  // Reinit d1 to first possible starting date.
107  d1 = g_date->OldDays() + g_date->DayInYear( 1, 11 );
108  if ( g_date->Date() > d1 ) {
109  d1 = g_date->Date();
110  }
111 
112  // OK, let's go.
113  SimpleEvent( d1, sbsts_autumn_plough, false );
114  SBSTS_SLURRY_DONE = false;
115  SBSTS_MANURE_DONE = false;
116  SBSTS_SLURRY_EXEC = false;
117  SBSTS_MANURE_EXEC = false;
118  SBSTS_DID_AUTUMN_PLOUGH = false;
119  }
120  break;
121 
122  case sbsts_autumn_plough:
123  if ( m_ev->m_lock || m_farm->DoIt( 70 ) ) {
124  if ( !m_farm->AutumnPlough( m_field, 0.0, g_date->DayInYear( 30, 11 ) - g_date->DayInYear() ) ) {
125  SimpleEvent( g_date->Date() + 1, sbsts_autumn_plough, true );
126  break;
127  }
129  }
130  // +365 for next year
131  if ( m_farm->IsStockFarmer() ) // StockFarmer
132  {
133  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 3 ) + 365, sbsts_fertslurry_stock, false );
134  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 3 ) + 365, sbsts_fertmanure_stock_one, false );
135  } else { // PlantFarmer
136  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20, 3 ) + 365, sbsts_spring_plough, false );
137  }
138  break;
139 
140  //*** The stock farmers thread
142  if ( m_ev->m_lock || m_farm->DoIt( 90 ) ) {
143  if ( !m_farm->FA_Slurry( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
145  break;
146  }
147  SBSTS_SLURRY_EXEC = true;
148  }
149  SBSTS_SLURRY_DONE = true;
150  if ( SBSTS_MANURE_DONE ) {
151  // We are the last thread, so queue up spring plough.
153  }
154  break;
155 
157  if ( m_ev->m_lock || m_farm->DoIt( 67 ) ) {
158  if ( !m_farm->FA_Manure( m_field, 0.0, g_date->DayInYear( 15, 4 ) - g_date->DayInYear() ) ) {
160  break;
161  }
162  SBSTS_MANURE_EXEC = true;
163  }
164  SBSTS_MANURE_DONE = true;
165  if ( SBSTS_SLURRY_DONE ) {
167  }
168  break;
169 
170  case sbsts_spring_plough:
171  if ( !SBSTS_DID_AUTUMN_PLOUGH ) {
172  if ( !m_farm->SpringPlough( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
173  SimpleEvent( g_date->Date() + 1, sbsts_spring_plough, true );
174  break;
175  }
176  }
177  {
178  int d1 = g_date->Date();
179  if ( d1 < g_date->OldDays() + g_date->DayInYear( 20, 3 ) ) {
180  d1 = g_date->OldDays() + g_date->DayInYear( 20, 3 );
181  }
182  SimpleEvent( d1, sbsts_spring_harrow, false );
183  }
184  break;
185 
186  case sbsts_spring_harrow:
187  if ( !m_farm->SpringHarrow( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
188  SimpleEvent( g_date->Date() + 1, sbsts_spring_harrow, true );
189  break;
190  }
191  if ( m_farm->IsStockFarmer() ) {
193  } else {
195  }
196  break;
197 
199  if ( m_ev->m_lock || m_farm->DoIt( 65 ) || ( !SBSTS_SLURRY_EXEC && !SBSTS_MANURE_EXEC ) ) {
200  if ( !m_farm->FA_NPK( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
202  break;
203  }
204  }
205  {
206  int d1 = g_date->Date();
207  if ( d1 < g_date->OldDays() + g_date->DayInYear( 25, 3 ) ) {
208  d1 = g_date->OldDays() + g_date->DayInYear( 25, 3 );
209  }
210  SimpleEvent( d1, sbsts_spring_sow, false );
211  }
212  break;
213 
215  if ( m_ev->m_lock || m_farm->DoIt( 75 ) ) {
216  if ( !m_farm->FP_NPK( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
218  break;
219  }
220  // Did FP_NPK so go directly to spring sow.
221  {
222  int d1 = g_date->Date();
223  if ( d1 < g_date->OldDays() + g_date->DayInYear( 25, 3 ) ) {
224  d1 = g_date->OldDays() + g_date->DayInYear( 25, 3 );
225  }
226  SimpleEvent( d1, sbsts_spring_sow, false );
227  }
228  break;
229  }
231  break;
232 
234  if ( !m_farm->FP_LiquidNH3( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
235  SimpleEvent( g_date->Date() + 1, sbsts_fertlnh3_plant, true );
236  break;
237  }
239  break;
240 
241  case sbsts_fertpk_plant:
242  if ( !m_farm->FP_PK( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
243  SimpleEvent( g_date->Date() + 1, sbsts_fertpk_plant, true );
244  break;
245  }
246  {
247  int d1 = g_date->Date();
248  if ( d1 < g_date->OldDays() + g_date->DayInYear( 25, 3 ) ) {
249  d1 = g_date->OldDays() + g_date->DayInYear( 25, 3 );
250  }
251  SimpleEvent( d1, sbsts_spring_sow, false );
252  }
253  break;
254 
255  case sbsts_spring_sow:
256  if ( !m_farm->SpringSow( m_field, 0.0, g_date->DayInYear( 10, 4 ) - g_date->DayInYear() ) ) {
257  SimpleEvent( g_date->Date() + 1, sbsts_spring_sow, true );
258  break;
259  }
260  {
261  int d1 = g_date->Date();
262  if ( d1 < g_date->OldDays() + g_date->DayInYear( 5, 4 ) ) {
263  d1 = g_date->OldDays() + g_date->DayInYear( 5, 4 );
264  }
265  SimpleEvent( d1, sbsts_spring_roll, false );
266  }
267  break;
268 
269  case sbsts_spring_roll:
270  if ( m_ev->m_lock || m_farm->DoIt( 30 ) ) {
271  if ( !m_farm->SpringRoll( m_field, 0.0, g_date->DayInYear( 20, 4 ) - g_date->DayInYear() ) ) {
272  SimpleEvent( g_date->Date() + 1, sbsts_spring_roll, true );
273  break;
274  }
275  }
276  SBSTS_HERBI_DATE = 0;
277  SBSTS_GR_DATE = 0;
278  SBSTS_FUNGI_DATE = 0;
279  SBSTS_WATER_DATE = 0;
280  SBSTS_INSECT_DATE = 0;
281  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10, 5 ), sbsts_fungicide_one, false ); // Main.
282  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10, 5 ), sbsts_GR, false );
283  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 5 ), sbsts_water_one, false );
284  //
285  if ( cfg_SingleStriglingTime.value() == 1 ) {
287  } else if ( cfg_SingleStriglingTime.value() == 2 ) {
289  } else if ( cfg_SingleStriglingTime.value() == 3 ) {
291  } else {
292  if ( cfg_SingleStriglingTime.value() == 4 )
293 // SimpleEvent( g_date->OldDays() + g_date->DayInYear(10,5), sbsts_strigling_one, true );
295  }
296  break;
297 
298  case sbsts_strigling_one:
299  if ( !m_farm->Strigling( m_field, 0.0, 0 ) ) {
300  SimpleEvent( g_date->Date() + 1, sbsts_strigling_one, true );
301  break;
302  }
303  // end the thread
304  break;
305 
306 
307  // GReg thread
308  case sbsts_GR:
309  if ( g_date->Date() < SBSTS_HERBI_DATE + 1 || g_date->Date() < SBSTS_FUNGI_DATE + 1 ) {
310  SimpleEvent( g_date->Date() + 1, sbsts_GR, m_ev->m_lock );
311  break;
312  }
313  if ( m_ev->m_lock || m_farm->DoIt( ( int )floor( 0.5 + 5 * cfg_greg_app_prop.value() ) ) ) {
314  if ( !m_farm->GrowthRegulator( m_field, 0.0, g_date->DayInYear( 25, 5 ) - g_date->DayInYear() ) ) {
315  SimpleEvent( g_date->Date() + 1, sbsts_GR, true );
316  break;
317  }
319  }
320  break;
321 
322  // Fungicide thread & MAIN THREAD
323  case sbsts_fungicide_one:
324  if ( g_date->Date() < SBSTS_HERBI_DATE + 1 || g_date->Date() < SBSTS_GR_DATE + 1 ) {
326  break;
327  }
328  if ( m_ev->m_lock || m_farm->DoIt( ( int )floor( 0.5 + 30 * cfg_fungi_app_prop1.value() ) ) ) {
329  if ( !m_farm->FungicideTreat( m_field, 0.0, g_date->DayInYear( 25, 5 ) - g_date->DayInYear() ) ) {
330  SimpleEvent( g_date->Date() + 1, sbsts_fungicide_one, true );
331  break;
332  }
334  {
335  int d1 = g_date->Date() + 10;
336  if ( d1 < g_date->OldDays() + g_date->DayInYear( 25, 5 ) ) {
337  d1 = g_date->OldDays() + g_date->DayInYear( 25, 5 );
338  }
339  SimpleEvent( d1, sbsts_fungicide_two, false );
340  }
341  }
342  {
343  int d1 = g_date->Date();
344  if ( d1 < g_date->OldDays() + g_date->DayInYear( 15, 5 ) ) {
345  d1 = g_date->OldDays() + g_date->DayInYear( 15, 5 );
346  }
347  SimpleEvent( d1, sbsts_insecticide, false );
348  }
349  break;
350 
351  case sbsts_fungicide_two:
352  if ( g_date->Date() < SBSTS_HERBI_DATE + 1 || g_date->Date() < SBSTS_GR_DATE + 1 ) {
354  break;
355  }
356  if ( m_ev->m_lock || m_farm->DoIt( ( int )floor( 0.5 + 33 * cfg_fungi_app_prop1.value() ) ) ) {
357  if ( !m_farm->FungicideTreat( m_field, 0.0, g_date->DayInYear( 10, 6 ) - g_date->DayInYear() ) ) {
358  SimpleEvent( g_date->Date() + 1, sbsts_fungicide_two, true );
359  break;
360  }
362  }
363  break;
364 
365  // Water thread
366  case sbsts_water_one:
367  if ( g_date->Date() < SBSTS_HERBI_DATE + 1 || g_date->Date() < SBSTS_FUNGI_DATE + 1 ) {
369  break;
370  }
371  if ( m_ev->m_lock || m_farm->DoIt( 20 ) ) {
372  if ( !m_farm->Water( m_field, 0.0, g_date->DayInYear( 30, 5 ) - g_date->DayInYear() ) ) {
373  SimpleEvent( g_date->Date() + 1, sbsts_water_one, true );
374  break;
375  }
377  }
378  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 6 ), sbsts_water_two, false );
379  break;
380 
381  case sbsts_water_two:
382  if ( g_date->Date() < SBSTS_INSECT_DATE + 1 ) {
384  break;
385  }
386  if ( m_ev->m_lock || m_farm->DoIt( 10 ) ) {
387  if ( !m_farm->Water( m_field, 0.0, g_date->DayInYear( 1, 7 ) - g_date->DayInYear() ) ) {
388  SimpleEvent( g_date->Date() + 1, sbsts_water_two, true );
389  break;
390  }
392  }
393  break;
394 
395  // Insecticide thread & MAIN THREAD
396  case sbsts_insecticide:
397  if ( g_date->Date() < SBSTS_WATER_DATE + 1 ) {
399  break;
400  }
401  if ( m_ev->m_lock || m_farm->DoIt( ( int )floor( 0.5 + 35 * cfg_ins_app_prop1.value() ) ) ) {
402  if ( !m_farm->InsecticideTreat( m_field, 0.0, g_date->DayInYear( 10, 6 ) - g_date->DayInYear() ) ) {
403  SimpleEvent( g_date->Date() + 1, sbsts_insecticide, true );
404  break;
405  }
407  }
408  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 8 ), sbsts_harvest, false );
409  break;
410 
411  case sbsts_harvest:
412  if ( !m_farm->Harvest( m_field, 0.0, g_date->DayInYear( 20, 8 ) - g_date->DayInYear() ) ) {
413  SimpleEvent( g_date->Date() + 1, sbsts_harvest, true );
414  break;
415  }
417  break;
418 
420  if ( m_ev->m_lock || m_farm->DoIt( 50 ) ) {
421  // Force straw chopping to happen on the same day as harvest.
422  if ( !m_farm->StrawChopping( m_field, 0.0, 0 ) ) {
423  // Shouldn't happen.
425  break;
426  }
427  // Did chop, so go directly to stubble harrowing.
429  break;
430  }
431  // Do hay baling first.
432  SimpleEvent( g_date->Date(), sbsts_hay_baling, false );
433  break;
434 
435  case sbsts_hay_baling:
436  if ( !m_farm->HayBailing( m_field, 0.0, m_field->GetMDates( 1, 0 ) - g_date->DayInYear() ) ) {
437  SimpleEvent( g_date->Date() + 1, sbsts_hay_baling, true );
438  break;
439  }
441  break;
442 
444  if ( m_ev->m_lock || m_farm->DoIt( 60 ) ) {
445  if ( !m_farm->StubbleHarrowing( m_field, 0.0, m_field->GetMDates( 1, 1 ) - g_date->DayInYear() ) ) {
446  SimpleEvent( g_date->Date() + 1, sbsts_stubble_harrow, true );
447  break;
448  }
449  }
450  // END MAIN THREAD
451  done = true;
452  break;
453 
454  default:
455  g_msg->Warn( WARN_BUG, "SpringBarley::Do(): ""Unknown event type! ", "" );
456  exit( 1 );
457  }
458  return done;
459 }

References Farm::AutumnPlough(), cfg_fungi_app_prop1, cfg_greg_app_prop, cfg_ins_app_prop1, cfg_SingleStriglingTime, 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(), sbsts_autumn_plough, SBSTS_DID_AUTUMN_PLOUGH, sbsts_fertlnh3_plant, sbsts_fertmanure_plant, sbsts_fertmanure_stock_one, sbsts_fertmanure_stock_two, sbsts_fertpk_plant, sbsts_fertslurry_stock, SBSTS_FUNGI_DATE, sbsts_fungicide_one, sbsts_fungicide_two, sbsts_GR, SBSTS_GR_DATE, sbsts_harvest, sbsts_hay_baling, SBSTS_HERBI_DATE, SBSTS_INSECT_DATE, sbsts_insecticide, SBSTS_MANURE_DONE, SBSTS_MANURE_EXEC, SBSTS_SLURRY_DONE, SBSTS_SLURRY_EXEC, sbsts_spring_harrow, sbsts_spring_plough, sbsts_spring_roll, sbsts_spring_sow, sbsts_start, sbsts_straw_chopping, sbsts_strigling_one, sbsts_stubble_harrow, SBSTS_WATER_DATE, sbsts_water_one, sbsts_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 SpringBarleyStriglingSingle::SetUpFarmCategoryInformation ( )
inline
86  {
87  const int elements = 2 + (sbsts_foobar - SBSTS_BASE);
89 
90  FarmManagementCategory catlist[elements] =
91  {
92  fmc_Others, // zero element unused but must be here
93  fmc_Others,//sbsts_start = 1, // Compulsory, start event must always be 1 (one).
94  fmc_Cultivation,//sbsts_autumn_plough = SBSTS_BASE,
95  fmc_Fertilizer,//sbsts_fertslurry_stock,
96  fmc_Fertilizer,//sbsts_fertmanure_stock_one,
97  fmc_Cultivation,//sbsts_spring_plough,
98  fmc_Cultivation,//sbsts_spring_harrow,
99  fmc_Fertilizer,//sbsts_fertmanure_plant,
100  fmc_Fertilizer,//sbsts_fertlnh3_plant,
101  fmc_Fertilizer,//sbsts_fertpk_plant,
102  fmc_Fertilizer,//sbsts_fertmanure_stock_two,
103  fmc_Fertilizer,//sbsts_fertnpk_stock,
104  fmc_Others,//sbsts_spring_sow,
105  fmc_Others,//sbsts_spring_roll,
106  fmc_Cultivation,//sbsts_strigling_one,
107  fmc_Cultivation,//sbsts_strigling_two,
108  fmc_Cultivation,//sbsts_strigling_three,
109  fmc_Cultivation,//sbsts_strigling_four,
110  fmc_Others,//sbsts_GR,
111  fmc_Fungicide,//sbsts_fungicide_one,
112  fmc_Insecticide,//sbsts_insecticide,
113  fmc_Fungicide,//sbsts_fungicide_two,
114  fmc_Watering,//sbsts_water_one,
115  fmc_Watering,//sbsts_water_two,
116  fmc_Harvest,//sbsts_harvest,
117  fmc_Others,//sbsts_straw_chopping,
118  fmc_Others,//sbsts_hay_baling,
119  fmc_Cultivation//sbsts_stubble_harrow
120 
121  //INSET YOUR FMCS HERE
122 
123  // no foobar entry
124 
125  };
126  // Iterate over the catlist elements and copy them to vector
127  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
128 
129  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, Crop::m_ManagementCategories, SBSTS_BASE, and sbsts_foobar.

Referenced by SpringBarleyStriglingSingle().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
sbsts_spring_plough
Definition: SpringBarleyStriglingSingle.h:49
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
sbsts_insecticide
Definition: SpringBarleyStriglingSingle.h:64
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
SpringBarleyStriglingSingle::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: SpringBarleyStriglingSingle.h:86
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
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
SBSTS_WATER_DATE
#define SBSTS_WATER_DATE
Definition: SpringBarleyStriglingSingle.h:41
cfg_SingleStriglingTime
CfgInt cfg_SingleStriglingTime("STR_SINGLESTRIGLINGTIME", CFG_CUSTOM, 1)
SBSTS_SLURRY_DONE
#define SBSTS_SLURRY_DONE
Definition: SpringBarleyStriglingSingle.h:32
SBSTS_GR_DATE
#define SBSTS_GR_DATE
Definition: SpringBarleyStriglingSingle.h:39
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
sbsts_fertmanure_stock_one
Definition: SpringBarleyStriglingSingle.h:48
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
sbsts_GR
Definition: SpringBarleyStriglingSingle.h:62
sbsts_hay_baling
Definition: SpringBarleyStriglingSingle.h:70
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
SBSTS_MANURE_EXEC
#define SBSTS_MANURE_EXEC
Definition: SpringBarleyStriglingSingle.h:35
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
sbsts_fertpk_plant
Definition: SpringBarleyStriglingSingle.h:53
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
sbsts_start
Definition: SpringBarleyStriglingSingle.h:45
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
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
sbsts_fertlnh3_plant
Definition: SpringBarleyStriglingSingle.h:52
sbsts_fungicide_two
Definition: SpringBarleyStriglingSingle.h:65
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
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
cfg_greg_app_prop
CfgFloat cfg_greg_app_prop
sbsts_harvest
Definition: SpringBarleyStriglingSingle.h:68
SBSTS_DID_AUTUMN_PLOUGH
#define SBSTS_DID_AUTUMN_PLOUGH
Definition: SpringBarleyStriglingSingle.h:36
sbsts_spring_roll
Definition: SpringBarleyStriglingSingle.h:57
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
sbsts_fertmanure_stock_two
Definition: SpringBarleyStriglingSingle.h:54
SBSTS_SLURRY_EXEC
#define SBSTS_SLURRY_EXEC
Definition: SpringBarleyStriglingSingle.h:34
SBSTS_MANURE_DONE
#define SBSTS_MANURE_DONE
Definition: SpringBarleyStriglingSingle.h:33
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
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
sbsts_water_one
Definition: SpringBarleyStriglingSingle.h:66
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
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
sbsts_water_two
Definition: SpringBarleyStriglingSingle.h:67
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
SBSTS_HERBI_DATE
#define SBSTS_HERBI_DATE
Definition: SpringBarleyStriglingSingle.h:38
Crop::m_field
LE * m_field
Definition: Farm.h:499
CfgInt::value
int value() const
Definition: Configurator.h:116
Crop::m_ManagementCategories
vector< FarmManagementCategory > m_ManagementCategories
Holds the translation between the farm operation enum for each crop and the farm management category ...
Definition: Farm.h:530
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
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
sbsts_fertmanure_plant
Definition: SpringBarleyStriglingSingle.h:51
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
sbsts_fungicide_one
Definition: SpringBarleyStriglingSingle.h:63
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
sbsts_spring_harrow
Definition: SpringBarleyStriglingSingle.h:50
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
sbsts_strigling_one
Definition: SpringBarleyStriglingSingle.h:58
SBSTS_FUNGI_DATE
#define SBSTS_FUNGI_DATE
Definition: SpringBarleyStriglingSingle.h:40
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
SBSTS_INSECT_DATE
#define SBSTS_INSECT_DATE
Definition: SpringBarleyStriglingSingle.h:42
SBSTS_BASE
#define SBSTS_BASE
Definition: SpringBarleyStriglingSingle.h:31
sbsts_stubble_harrow
Definition: SpringBarleyStriglingSingle.h:71
cfg_fungi_app_prop1
CfgFloat cfg_fungi_app_prop1
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
sbsts_spring_sow
Definition: SpringBarleyStriglingSingle.h:56
sbsts_foobar
Definition: SpringBarleyStriglingSingle.h:72
WARN_BUG
Definition: MapErrorMsg.h:34
sbsts_straw_chopping
Definition: SpringBarleyStriglingSingle.h:69
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
sbsts_autumn_plough
Definition: SpringBarleyStriglingSingle.h:46
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523
Farm::SpringHarrow
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: FarmFuncs.cpp:459
sbsts_fertslurry_stock
Definition: SpringBarleyStriglingSingle.h:47