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

#include <SpringBarleyCloverGrassStrigling.h>

Inheritance diagram for SpringBarleyCloverGrassStrigling:
Crop

Public Member Functions

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

◆ SpringBarleyCloverGrassStrigling()

SpringBarleyCloverGrassStrigling::SpringBarleyCloverGrassStrigling ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
66  : Crop(a_tov, a_toc, a_L)
67  {
70  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

39 {
40  m_farm = a_farm;
41  m_field = a_field;
42  m_ev = a_ev;
43  int d1=0;
44  int noDates=3;
45  bool done = false;
46 
47  switch ( m_ev->m_todo )
48  {
49  case sbcgs_start:
50  {
52  SBCGS_FERTI_DONE=false;
53  SBCGS_SPRAY=0;
54  a_field->ClearManagementActionSum();
55 
56  // Set up the date management stuff
57  // Could save the start day in case it is needed later
58  // m_field->m_startday = m_ev->m_startday;
60  // Start and stop dates for all events after harvest
61  m_field->SetMDates(0,0,g_date->DayInYear(1,8));
62  // Determined by harvest date - used to see if at all possible
63  m_field->SetMDates(1,0,g_date->DayInYear(25,8));
64  m_field->SetMDates(0,1,g_date->DayInYear(5,8));
65  m_field->SetMDates(1,1,g_date->DayInYear(30,8));
66  m_field->SetMDates(0,2,g_date->DayInYear(1,9));
67  m_field->SetMDates(1,2,g_date->DayInYear(15,10));
68  // Check the next crop for early start, unless it is a spring crop
69  // in which case we ASSUME that no checking is necessary!!!!
70  // SO DO NOT implement a crop that runs over the year boundary
71  if (m_ev->m_startday>g_date->DayInYear(1,7))
72  {
73  if (m_field->GetMDates(0,0) >=m_ev->m_startday)
74  {
75  g_msg->Warn( WARN_BUG, "SpringBarleyCloverGrass::Do(): "
76  "Harvest too late for the next crop to start!!!", "" );
77  exit( 1 );
78  }
79  // Now fix any late finishing problems
80  for (int i=0; i<noDates; i++)
81  {
82  if (m_field->GetMDates(0,i)>=m_ev->m_startday)
84  if (m_field->GetMDates(1,i)>=m_ev->m_startday)
86  }
87  }
88  // Now no operations can be timed after the start of the next crop.
89  if ( ! m_ev->m_first_year )
90  {
91  // Are we before July 1st?
92  d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
93  if (g_date->Date() < d1)
94  {
95  // Yes, too early. We assumme this is because the last crop was late
96  g_msg->Warn( WARN_BUG, "SpringBarleyCloverGrass::Do(): "
97  "Crop start attempt between 1st Jan & 1st July", "" );
98  exit( 1 );
99  }
100  else
101  {
102  d1 = g_date->OldDays() + m_first_date; // start day
103  if (g_date->Date() > d1)
104  {
105  // Yes too late - should not happen - raise an error
106  g_msg->Warn( WARN_BUG, "SpringBarleyCloverGrass::Do(): "
107  "Crop start attempt after last possible start date", "" );
108  exit( 1 );
109  }
110  }
111  }
112  else
113  {
114  m_field->SetLastSownVeg( m_field->GetVegType() ); //Force last sown, needed for goose habitat classification
115  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 ),
116  sbcgs_spring_plough, false );
117  break;
118  }
119  // End single block date checking code. Please see next line
120  // comment as well.
121  // Reinit d1 to first possible starting date.
122  d1 = g_date->OldDays() + g_date->DayInYear( 1, 11 );
123  if (g_date->Date() >= d1) d1 += 365;
124  SimpleEvent( d1, sbcgs_autumn_plough, false );
125  }
126  break;
127 
128  case sbcgs_autumn_plough:
129  if ( m_ev->m_lock || m_farm->DoIt( 70 ))
130  {
131  if (!m_farm->AutumnPlough( m_field, 0.0,
132  g_date->DayInYear( 30,11 ) - g_date->DayInYear())) {
133  SimpleEvent( g_date->Date() + 1, sbcgs_autumn_plough, true );
134  break;
135  }
137  }
138  // +365 for next year
139  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 )+365,
140  sbcgs_ferti_s1, false );
141  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 )+365,
142  sbcgs_ferti_s2, false );
143  break;
144 
145  case sbcgs_ferti_s1:
146  if ( m_ev->m_lock || m_farm->DoIt( 90 ))
147  {
148  if (!m_farm->FA_Slurry( m_field, 0.0,
149  g_date->DayInYear( 15, 4 ) - g_date->DayInYear())) {
150  SimpleEvent( g_date->Date() + 1, sbcgs_ferti_s1, true );
151  break;
152  }
153  // Done fertilizer so remember
154  SBCGS_FERTI_DONE=true;
155  }
156  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 ),
157  sbcgs_spring_plough, false );
158  break;
159 
160  case sbcgs_ferti_s2:
161  if (( m_ev->m_lock || m_farm->DoIt( 67 ) ) && (!SBCGS_ISAUTUMNPLOUGH))
162  {
163  if (!m_farm->FA_Manure( m_field, 0.0,
164  g_date->DayInYear( 15, 4 ) - g_date->DayInYear()))
165  {
166  SimpleEvent( g_date->Date()+1, sbcgs_ferti_s2, true );
167  break;
168  }
169  else
170  {
171  // Done fertilizer so remember
172  SBCGS_FERTI_DONE=true;
173  }
174  }
175  break;
176 
177  case sbcgs_spring_plough:
178  if ( !SBCGS_ISAUTUMNPLOUGH ) // Don't plough if you have already
179  {
180  if (!m_farm->SpringPlough( m_field, 0.0,
181  g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
182  SimpleEvent( g_date->Date() + 1, sbcgs_spring_plough, true );
183  break;
184  }
185  }
186  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
187  sbcgs_spring_harrow, false );
188  break;
189 
190  case sbcgs_spring_harrow:
191  if (!m_farm->SpringHarrow( m_field, 0.0,
192  g_date->DayInYear( 10,4 ) - g_date->DayInYear())) {
193  SimpleEvent( g_date->Date() + 1, sbcgs_spring_harrow, true );
194  break;
195  }
196  SimpleEvent( g_date->Date(), sbcgs_ferti_s3, false );
197  break;
198 
199  case sbcgs_ferti_s3: // The catch all
200  if ((!SBCGS_FERTI_DONE)||( m_ev->m_lock || m_farm->DoIt( 70 ) ))
201  {
202  if (!m_farm->FA_NPK( m_field, 0.0,
203  g_date->DayInYear( 10, 4 ) - g_date->DayInYear()))
204  {
205  SimpleEvent( g_date->Date()+1, sbcgs_ferti_s3, true );
206  break;
207  }
208  }
209  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
210  sbcgs_spring_sow, false );
211  break;
212 
213  case sbcgs_spring_sow:
214  if (!m_farm->SpringSow( m_field, 0.0,
215  g_date->DayInYear( 20,4 ) - g_date->DayInYear())) {
216  SimpleEvent( g_date->Date() + 1, sbcgs_spring_sow, true );
217  break;
218  }
219  SimpleEvent( g_date->Date()+1, sbcgs_spring_roll, false );
220  break;
221 
222  case sbcgs_spring_roll:
223  if ( m_ev->m_lock || m_farm->DoIt( 90 ))
224  {
225  if (!m_farm->SpringRoll( m_field, 0.0,
226  g_date->DayInYear( 21,4 ) - g_date->DayInYear())) {
227  SimpleEvent( g_date->Date() + 1, sbcgs_spring_roll, true );
228  break;
229  }
230  }
231  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,3 ),
232  sbcgs_strigling1, false );
233  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
234  sbcgs_strigling_sow, false );
235  break;
236 
237 case sbcgs_strigling1:
238  if ( m_ev->m_lock || (cfg_strigling_prop.value() * m_farm->DoIt( 90 )))
239  {
240  if (!m_farm->Strigling( m_field, 0.0,
241  g_date->DayInYear( 20,4 ) - g_date->DayInYear())) {
242  SimpleEvent( g_date->Date() + 1, sbcgs_strigling1, true );
243  break;
244  }
245  }
246 // End of thread
247 
248  case sbcgs_strigling_sow:
249  if ( m_ev->m_lock || m_farm->DoIt( 100 ))
250  {
251  if (!m_farm->StriglingSow( m_field, 0.0,
252  g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
253  SimpleEvent( g_date->Date() + 1, sbcgs_strigling_sow, true );
254  break;
255  }
256  }
257  // Carry on with the next after first treatment or no treatment
258  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,5 ),
259  sbcgs_GR, false );
260  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,5 ),
261  sbcgs_fungicide, false );
262  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
263  sbcgs_water1, false );
264  break;
265 
266 
267  // GR Thread
268  case sbcgs_GR:
269  if ( m_ev->m_lock || m_farm->DoIt( (int) (5*cfg_greg_app_prop.value()))) // was 60
270  {
271  if (!m_farm->GrowthRegulator( m_field, 0.0,
272  g_date->DayInYear( 25,5 ) - g_date->DayInYear())) {
273  SimpleEvent( g_date->Date() + 1, sbcgs_GR, true );
274  break;
275  }
276  }
277  break;
278 
279  // Water thread
280  case sbcgs_water1:
281  if ( m_ev->m_lock || m_farm->DoIt( 20 ))
282  {
283  if ((!m_farm->Water( m_field, 0.0,
284  g_date->DayInYear( 15,6 ) - g_date->DayInYear()))
285  || (SBCGS_SPRAY==g_date->DayInYear()))
286  {
287  SimpleEvent( g_date->Date() + 1, sbcgs_water1, true );
288  break;
289  }
290  if (g_date->DayInYear()+5<g_date->DayInYear( 16,6 ))
291  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 16,6 ),
292  sbcgs_water2, false );
293  else
294  SimpleEvent( g_date->Date()+5, sbcgs_water2, false );
295  }
296  break;
297 
298  case sbcgs_water2:
299  if ( m_ev->m_lock || m_farm->DoIt( 50 ))
300  {
301  if ((!m_farm->Water( m_field, 0.0,
302  g_date->DayInYear( 1,7 ) - g_date->DayInYear()))
303  || (SBCGS_SPRAY==g_date->DayInYear()))
304  {
305  SimpleEvent( g_date->Date() + 1, sbcgs_water2, true );
306  break;
307  }
308  }
309  break;
310 
311  // Fungicide thread & MAIN THREAD
312  case sbcgs_fungicide:
313  if ( m_ev->m_lock || m_farm->DoIt( (int) (40*cfg_herbi_app_prop.value() ))) // was 60
314  {
315  if (!m_farm->FungicideTreat( m_field, 0.0,
316  g_date->DayInYear( 25,5 ) - g_date->DayInYear())) {
317  SimpleEvent( g_date->Date() + 1, sbcgs_fungicide, true );
318  break;
319  }
320  else
321  {
323  }
324  }
325  // can also try insecticide
326  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,5 ),
327  sbcgs_insecticide, false );
328  break;
329 
330  // Insecticide & MAIN THREAD
331  case sbcgs_insecticide:
332  if ( m_ev->m_lock || m_farm->DoIt( (int) (35*cfg_ins_app_prop1.value() ))) // was 50
333  {
334  if (!m_farm->InsecticideTreat( m_field, 0.0,
335  g_date->DayInYear( 10,6 ) - g_date->DayInYear())) {
336  SimpleEvent( g_date->Date() + 1, sbcgs_insecticide, true );
337  break;
338  }
339  else SBCGS_SPRAY=g_date->DayInYear();
340  }
341  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
342  sbcgs_harvest, false );
343  break;
344 
345  case sbcgs_harvest:
346  if (!m_farm->Harvest( m_field, 0.0,
347  m_field->GetMDates(1,0) - g_date->DayInYear())) {
348  SimpleEvent( g_date->Date() + 1, sbcgs_harvest, true );
349  break;
350  }
352  sbcgs_hay_baling, false );
353  break;
354 
355  case sbcgs_hay_baling:
356  if (!m_farm->HayBailing( m_field, 0.0,
357  m_field->GetMDates(1,1) - g_date->DayInYear()))
358  {
359  SimpleEvent( g_date->Date() + 1, sbcgs_hay_baling, true );
360  break;
361  }
362  // Something special here.
363  // If the cattle out period is very short then we don't want to do it at all
364  if (m_field->GetMDates(1,2)-m_field->GetMDates(0,2)<14) done=true;
365  else SimpleEvent( g_date->OldDays() + m_field->GetMDates(0,2),
366  sbcgs_cattle_out, false );
367  break;
368 
369  case sbcgs_cattle_out:
370 // ***CJT*** 010904 possibly causing a problem with unsprayed margins
371  // Uncomment the break if this is a problem
372 done=true;
373 //break;
374 // **CJT*** END
375  if (!m_farm->CattleOut( m_field, 0.0,
376  m_field->GetMDates(1,2) - g_date->DayInYear()))
377  {
378  SimpleEvent( g_date->Date() + 1, sbcgs_cattle_out, true );
379  break;
380  }
381  SimpleEvent( g_date->Date() + 1, sbcgs_cattle_is_out, false );
382  break;
383 
384  case sbcgs_cattle_is_out:
385  if (!m_farm->CattleIsOut( m_field, 0.0,
387  {
388  SimpleEvent( g_date->Date() + 1, sbcgs_cattle_is_out, false );
389  break;
390  }
391  // END OF MAIN THREAD
392  done=true;
393  break;
394 
395  default:
396  g_msg->Warn( WARN_BUG, "SpringBarleyCloverGrass::Do(): "
397  "Unknown event type! ", "" );
398  exit( 1 );
399  }
400  return done;
401 }

References Farm::AutumnPlough(), Farm::CattleIsOut(), Farm::CattleOut(), cfg_greg_app_prop, cfg_herbi_app_prop, cfg_ins_app_prop1, cfg_strigling_prop, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::InsecticideTreat(), 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(), sbcgs_autumn_plough, sbcgs_cattle_is_out, sbcgs_cattle_out, SBCGS_FERTI_DONE, sbcgs_ferti_s1, sbcgs_ferti_s2, sbcgs_ferti_s3, sbcgs_fungicide, sbcgs_GR, sbcgs_harvest, sbcgs_hay_baling, sbcgs_insecticide, SBCGS_ISAUTUMNPLOUGH, SBCGS_SPRAY, sbcgs_spring_harrow, sbcgs_spring_plough, sbcgs_spring_roll, sbcgs_spring_sow, sbcgs_start, sbcgs_strigling1, sbcgs_strigling_sow, sbcgs_water1, sbcgs_water2, LE::SetLastSownVeg(), LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::Strigling(), Farm::StriglingSow(), CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void SpringBarleyCloverGrassStrigling::SetUpFarmCategoryInformation ( )
inline
71  {
72  const int elements = 2 + (sbcgs_foobar - SBARLEYCGS_BASE);
74 
75  FarmManagementCategory catlist[elements] =
76  {
77  fmc_Others, // zero element unused but must be here
78  fmc_Others,//sbcgs_start = 1, // Compulsory, start event must always be 1 (one).
79  fmc_Fertilizer,//sbcgs_ferti_s1 = SBARLEYCGS_BASE,
80  fmc_Fertilizer,//sbcgs_ferti_s2,
81  fmc_Fertilizer,//sbcgs_ferti_s3,
82  fmc_Harvest,//sbcgs_harvest,
83  fmc_Cultivation,//sbcgs_spring_plough,
84  fmc_Cultivation,//sbcgs_autumn_plough,
85  fmc_Cultivation,//sbcgs_spring_harrow,
86  fmc_Others,//sbcgs_spring_roll,
87  fmc_Others,//sbcgs_spring_sow,
88  fmc_Others,//sbcgs_hay_baling,
89  fmc_Others,//sbcgs_GR,
90  fmc_Watering,//sbcgs_water1,
91  fmc_Watering,//sbcgs_water2,
92  fmc_Cultivation,//sbcgs_strigling1,
93  fmc_Cultivation,//sbcgs_strigling_sow,
94  fmc_Insecticide,//sbcgs_insecticide,
95  fmc_Fungicide,//sbcgs_fungicide,
96  fmc_Grazing,//sbcgs_cattle_out,
97  fmc_Grazing//sbcgs_cattle_is_out
98 
99  // no foobar entry
100 
101  };
102  // Iterate over the catlist elements and copy them to vector
103  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
104 
105  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Grazing, fmc_Harvest, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, Crop::m_ManagementCategories, SBARLEYCGS_BASE, and sbcgs_foobar.

Referenced by SpringBarleyCloverGrassStrigling().


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
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
sbcgs_water1
Definition: SpringBarleyCloverGrassStrigling.h:49
sbcgs_spring_plough
Definition: SpringBarleyCloverGrassStrigling.h:42
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
LE::SetLastSownVeg
void SetLastSownVeg(TTypesOfVegetation a_tov)
Records the last vegetation type to be sown.
Definition: Elements.h:357
sbcgs_strigling1
Definition: SpringBarleyCloverGrassStrigling.h:51
sbcgs_fungicide
Definition: SpringBarleyCloverGrassStrigling.h:54
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
SpringBarleyCloverGrassStrigling::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: SpringBarleyCloverGrassStrigling.h:71
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
sbcgs_insecticide
Definition: SpringBarleyCloverGrassStrigling.h:53
cfg_herbi_app_prop
CfgFloat cfg_herbi_app_prop
sbcgs_ferti_s1
Definition: SpringBarleyCloverGrassStrigling.h:38
Farm::CattleIsOut
virtual bool CattleIsOut(LE *a_field, double a_user, int a_days, int a_max)
Generate a 'cattle_out' event for every day the cattle are on a_field.
Definition: FarmFuncs.cpp:2470
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
sbcgs_ferti_s2
Definition: SpringBarleyCloverGrassStrigling.h:39
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
cfg_strigling_prop
CfgFloat cfg_strigling_prop
cfg_greg_app_prop
CfgFloat cfg_greg_app_prop
sbcgs_start
Definition: SpringBarleyCloverGrassStrigling.h:37
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
sbcgs_harvest
Definition: SpringBarleyCloverGrassStrigling.h:41
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
SBCGS_SPRAY
#define SBCGS_SPRAY
Definition: SpringBarleyCloverGrassStrigling.h:34
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
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
sbcgs_GR
Definition: SpringBarleyCloverGrassStrigling.h:48
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
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
sbcgs_spring_harrow
Definition: SpringBarleyCloverGrassStrigling.h:44
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
sbcgs_foobar
Definition: SpringBarleyCloverGrassStrigling.h:57
sbcgs_hay_baling
Definition: SpringBarleyCloverGrassStrigling.h:47
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
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
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
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
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
sbcgs_strigling_sow
Definition: SpringBarleyCloverGrassStrigling.h:52
SBARLEYCGS_BASE
#define SBARLEYCGS_BASE
Definition: SpringBarleyCloverGrassStrigling.h:31
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
sbcgs_autumn_plough
Definition: SpringBarleyCloverGrassStrigling.h:43
sbcgs_water2
Definition: SpringBarleyCloverGrassStrigling.h:50
sbcgs_ferti_s3
Definition: SpringBarleyCloverGrassStrigling.h:40
sbcgs_spring_roll
Definition: SpringBarleyCloverGrassStrigling.h:45
fmc_Grazing
Definition: LandscapeFarmingEnums.h:1010
sbcgs_spring_sow
Definition: SpringBarleyCloverGrassStrigling.h:46
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
sbcgs_cattle_out
Definition: SpringBarleyCloverGrassStrigling.h:55
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
SBCGS_ISAUTUMNPLOUGH
#define SBCGS_ISAUTUMNPLOUGH
Definition: SpringBarleyCloverGrassStrigling.h:32
SBCGS_FERTI_DONE
#define SBCGS_FERTI_DONE
Definition: SpringBarleyCloverGrassStrigling.h:33
sbcgs_cattle_is_out
Definition: SpringBarleyCloverGrassStrigling.h:56
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
Farm::CattleOut
virtual bool CattleOut(LE *a_field, double a_user, int a_days)
Start a grazing event on a_field today.
Definition: FarmFuncs.cpp:2368
Farm::StriglingSow
virtual bool StriglingSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out a mechanical weeding followed by sowing on a_field.
Definition: FarmFuncs.cpp:1226
WARN_BUG
Definition: MapErrorMsg.h:34
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
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