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

#include <BarleyPeaCloverGrassStrigling.h>

Inheritance diagram for SpringBarleyPeaCloverGrassStrigling:
Crop Crop

Public Member Functions

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

◆ SpringBarleyPeaCloverGrassStrigling() [1/2]

SpringBarleyPeaCloverGrassStrigling::SpringBarleyPeaCloverGrassStrigling ( )
inline
74  {
76  }

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

◆ SpringBarleyPeaCloverGrassStrigling() [2/2]

SpringBarleyPeaCloverGrassStrigling::SpringBarleyPeaCloverGrassStrigling ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
65  : Crop(a_tov, a_toc, a_L)
66  {
69  }

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

Member Function Documentation

◆ Do() [1/2]

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

Reimplemented from Crop.

◆ Do() [2/2]

bool SpringBarleyPeaCloverGrassStrigling::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 sbpcgs_start:
50  {
52  SBPCGS_FERTI_DONE=false;
53  SBPCGS_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  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 ),
115  sbpcgs_spring_plough, false );
116  break;
117  }
118  // End single block date checking code. Please see next line
119  // comment as well.
120  // Reinit d1 to first possible starting date.
121 
122  d1 = g_date->OldDays() + g_date->DayInYear( 1, 11 );
123  if (g_date->Date() >= d1) d1 += 365;
124  SimpleEvent( d1, sbpcgs_autumn_plough, false );
125  }
126  break;
127 
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, sbpcgs_autumn_plough, true );
134  break;
135  }
137  }
138  // +365 for next year
139  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 )+365,
140  sbpcgs_ferti_s1, false );
141  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 )+365,
142  sbpcgs_ferti_s2, false );
143  break;
144 
145  case sbpcgs_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, sbpcgs_ferti_s1, true );
151  break;
152  }
153  // Done fertilizer so remember
154  SBPCGS_FERTI_DONE=true;
155  }
156  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 ),
157  sbpcgs_spring_plough, false );
158  break;
159 
160  case sbpcgs_ferti_s2:
161  if (( m_ev->m_lock || m_farm->DoIt( 67 ) ) && (!SBPCGS_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, sbpcgs_ferti_s2, true );
167  break;
168  }
169  else
170  {
171  // Done fertilizer so remember
172  SBPCGS_FERTI_DONE=true;
173  }
174  }
175  break;
176 
178  if ( !SBPCGS_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, sbpcgs_spring_plough, true );
183  break;
184  }
185  }
186  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
187  sbpcgs_spring_harrow, false );
188  break;
189 
191  if (!m_farm->SpringHarrow( m_field, 0.0,
192  g_date->DayInYear( 10,4 ) - g_date->DayInYear())) {
193  SimpleEvent( g_date->Date() + 1, sbpcgs_spring_harrow, true );
194  break;
195  }
196  SimpleEvent( g_date->Date(), sbpcgs_ferti_s3, false );
197  break;
198 
199  case sbpcgs_ferti_s3: // The catch all
200  if ((!SBPCGS_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, sbpcgs_ferti_s3, true );
206  break;
207  }
208  }
209  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
210  sbpcgs_spring_sow, false );
211  break;
212 
213  case sbpcgs_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, sbpcgs_spring_sow, true );
217  break;
218  }
219  SimpleEvent( g_date->Date()+1, sbpcgs_spring_roll, false );
220  break;
221 
222  case sbpcgs_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, sbpcgs_spring_roll, true );
228  break;
229  }
230  }
231  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
232  sbpcgs_strigling_sow, false );
233  break;
234 
235 
237  if ( m_ev->m_lock || m_farm->DoIt( 100 ))
238  {
239  if (!m_farm->StriglingSow( m_field, 0.0,
240  g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
241  SimpleEvent( g_date->Date() + 1, sbpcgs_strigling_sow, true );
242  break;
243  }
244  }
245  // Carry on with the next after first treatment or no treatment
246  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,5 ),
247  sbpcgs_GR, false );
248  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,5 ),
249  sbpcgs_fungicide, false );
250  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
251  sbpcgs_water1, false );
252  break;
253 
254 
255  // GR Thread
256  case sbpcgs_GR:
257  if ( m_ev->m_lock || m_farm->DoIt( (int) (5*cfg_greg_app_prop.value() ))) // was 60
258  {
259  if (!m_farm->GrowthRegulator( m_field, 0.0,
260  g_date->DayInYear( 25,5 ) - g_date->DayInYear())) {
261  SimpleEvent( g_date->Date() + 1, sbpcgs_GR, true );
262  break;
263  }
264  }
265  break;
266 
267  // Water thread
268  case sbpcgs_water1:
269  if ( m_ev->m_lock || m_farm->DoIt( 20 ))
270  {
271  if ((!m_farm->Water( m_field, 0.0,
272  g_date->DayInYear( 15,6 ) - g_date->DayInYear()))
273  || (SBPCGS_SPRAY==g_date->DayInYear()))
274  {
275  SimpleEvent( g_date->Date() + 1, sbpcgs_water1, true );
276  break;
277  }
278  if (g_date->DayInYear()+5<g_date->DayInYear( 16,6 ))
279  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 16,6 ),
280  sbpcgs_water2, false );
281  else
282  SimpleEvent( g_date->Date()+5, sbpcgs_water2, false );
283  }
284  break;
285 
286  case sbpcgs_water2:
287  if ( m_ev->m_lock || m_farm->DoIt( 50 ))
288  {
289  if ((!m_farm->Water( m_field, 0.0,
290  g_date->DayInYear( 1,7 ) - g_date->DayInYear()))
291  || (SBPCGS_SPRAY==g_date->DayInYear()))
292  {
293  SimpleEvent( g_date->Date() + 1, sbpcgs_water2, true );
294  break;
295  }
296  }
297  break;
298 
299  // Fungicide thread & MAIN THREAD
300  case sbpcgs_fungicide:
301  if ( m_ev->m_lock || m_farm->DoIt( (int) (40*cfg_herbi_app_prop.value() ))) // was 60
302  {
303  if (!m_farm->FungicideTreat( m_field, 0.0,
304  g_date->DayInYear( 25,5 ) - g_date->DayInYear())) {
305  SimpleEvent( g_date->Date() + 1, sbpcgs_fungicide, true );
306  break;
307  }
308  else
309  {
311  }
312  }
313  // can also try insecticide
314  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,5 ),
315  sbpcgs_insecticide, false );
316  break;
317 
318  // Insecticide & MAIN THREAD
319  case sbpcgs_insecticide:
320  if ( m_ev->m_lock || m_farm->DoIt( (int) (35*cfg_ins_app_prop1.value() ))) // was 50
321  {
322  if (!m_farm->InsecticideTreat( m_field, 0.0,
323  g_date->DayInYear( 10,6 ) - g_date->DayInYear())) {
324  SimpleEvent( g_date->Date() + 1, sbpcgs_insecticide, true );
325  break;
326  }
327  else SBPCGS_SPRAY=g_date->DayInYear();
328  }
329  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
330  sbpcgs_harvest, false );
331  break;
332 
333  case sbpcgs_harvest:
334  if (!m_farm->Harvest( m_field, 0.0,
335  m_field->GetMDates(1,0) - g_date->DayInYear())) {
336  SimpleEvent( g_date->Date() + 1, sbpcgs_harvest, true );
337  break;
338  }
340  sbpcgs_hay_baling, false );
341  break;
342 
343  case sbpcgs_hay_baling:
344  if (!m_farm->HayBailing( m_field, 0.0,
345  m_field->GetMDates(1,1) - g_date->DayInYear()))
346  {
347  SimpleEvent( g_date->Date() + 1, sbpcgs_hay_baling, true );
348  break;
349  }
350  // Something special here.
351  // If the cattle out period is very short then we don't want to do it at all
352  if (m_field->GetMDates(1,2)-m_field->GetMDates(0,2)<14) done=true;
353  else SimpleEvent( g_date->OldDays() + m_field->GetMDates(0,2),
354  sbpcgs_cattle_out, false );
355  break;
356 
357  case sbpcgs_cattle_out:
358 // ***CJT*** 010904 possibly causing a problem with unsprayed margins
359  // Uncomment the break if this is a problem
360 done=true;
361 //break;
362 // **CJT*** END
363  if (!m_farm->CattleOut( m_field, 0.0,
364  m_field->GetMDates(1,2) - g_date->DayInYear()))
365  {
366  SimpleEvent( g_date->Date() + 1, sbpcgs_cattle_out, true );
367  break;
368  }
369  SimpleEvent( g_date->Date() + 1, sbpcgs_cattle_is_out, false );
370  break;
371 
373  if (!m_farm->CattleIsOut( m_field, 0.0,
375  {
376  SimpleEvent( g_date->Date() + 1, sbpcgs_cattle_is_out, false );
377  break;
378  }
379  // END OF MAIN THREAD
380  done=true;
381  break;
382 
383  default:
384  g_msg->Warn( WARN_BUG, "SpringBarleyCloverGrass::Do(): "
385  "Unknown event type! ", "" );
386  exit( 1 );
387  }
388  return done;
389 }

References Farm::AutumnPlough(), Farm::CattleIsOut(), Farm::CattleOut(), cfg_greg_app_prop, cfg_herbi_app_prop, cfg_ins_app_prop1, 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(), sbpcgs_autumn_plough, sbpcgs_cattle_is_out, sbpcgs_cattle_out, SBPCGS_FERTI_DONE, sbpcgs_ferti_s1, sbpcgs_ferti_s2, sbpcgs_ferti_s3, sbpcgs_fungicide, sbpcgs_GR, sbpcgs_harvest, sbpcgs_hay_baling, sbpcgs_insecticide, SBPCGS_ISAUTUMNPLOUGH, SBPCGS_SPRAY, sbpcgs_spring_harrow, sbpcgs_spring_plough, sbpcgs_spring_roll, sbpcgs_spring_sow, sbpcgs_start, sbpcgs_strigling_sow, sbpcgs_water1, sbpcgs_water2, LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::StriglingSow(), CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void SpringBarleyPeaCloverGrassStrigling::SetUpFarmCategoryInformation ( )
inline
70  {
71  const int elements = 2 + (sbpcgs_foobar - SBARLEYPCGS_BASE);
73 
74  FarmManagementCategory catlist[elements] =
75  {
76  fmc_Others, // zero element unused but must be here
77  fmc_Others,//sbpcgs_start = 1, // Compulsory, start event must always be 1 (one).
78  fmc_Fertilizer,//sbpcgs_ferti_s1 = SBARLEYPCGS_BASE,
79  fmc_Fertilizer,//sbpcgs_ferti_s2,
80  fmc_Fertilizer,//sbpcgs_ferti_s3,
81  fmc_Harvest,//sbpcgs_harvest,
82  fmc_Cultivation,//sbpcgs_spring_plough,
83  fmc_Cultivation,//sbpcgs_autumn_plough,
84  fmc_Cultivation,//sbpcgs_spring_harrow,
85  fmc_Others,//sbpcgs_spring_roll,
86  fmc_Others,//sbpcgs_spring_sow,
87  fmc_Cultivation,//sbpcgs_strigling_sow,
88  fmc_Others,//sbpcgs_hay_baling,
89  fmc_Others,//sbpcgs_GR,
90  fmc_Watering,//sbpcgs_water1,
91  fmc_Watering,//sbpcgs_water2,
92  fmc_Insecticide,//sbpcgs_insecticide,
93  fmc_Fungicide,//sbpcgs_fungicide,
94  fmc_Grazing,//sbpcgs_cattle_out,
95  fmc_Grazing//sbpcgs_cattle_is_out
96 
97  // no foobar entry
98 
99  };
100  // Iterate over the catlist elements and copy them to vector
101  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
102 
103  }

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, SBARLEYPCGS_BASE, and sbpcgs_foobar.

Referenced by SpringBarleyPeaCloverGrassStrigling().


The documentation for this class was generated from the following files:
sbpcgs_hay_baling
Definition: BarleyPeaCloverGrassStrigling.h:57
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
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
sbpcgs_water2
Definition: BarleyPeaCloverGrassStrigling.h:60
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
sbpcgs_cattle_out
Definition: BarleyPeaCloverGrassStrigling.h:63
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
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
sbpcgs_spring_plough
Definition: BarleyPeaCloverGrassStrigling.h:51
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
cfg_herbi_app_prop
CfgFloat cfg_herbi_app_prop
sbpcgs_fungicide
Definition: BarleyPeaCloverGrassStrigling.h:62
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
sbpcgs_spring_sow
Definition: BarleyPeaCloverGrassStrigling.h:55
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
SBPCGS_SPRAY
#define SBPCGS_SPRAY
Definition: BarleyPeaCloverGrassStrigling.h:43
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
sbpcgs_autumn_plough
Definition: BarleyPeaCloverGrassStrigling.h:52
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
sbpcgs_spring_roll
Definition: BarleyPeaCloverGrassStrigling.h:54
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
sbpcgs_ferti_s1
Definition: BarleyPeaCloverGrassStrigling.h:47
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
sbpcgs_spring_harrow
Definition: BarleyPeaCloverGrassStrigling.h:53
sbpcgs_harvest
Definition: BarleyPeaCloverGrassStrigling.h:50
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
cfg_greg_app_prop
CfgFloat cfg_greg_app_prop
SBARLEYPCGS_BASE
#define SBARLEYPCGS_BASE
Definition: SpringBarleyPeaCloverGrassStrigling.h:31
sbpcgs_insecticide
Definition: BarleyPeaCloverGrassStrigling.h:61
SBPCGS_ISAUTUMNPLOUGH
#define SBPCGS_ISAUTUMNPLOUGH
Definition: BarleyPeaCloverGrassStrigling.h:41
sbpcgs_water1
Definition: BarleyPeaCloverGrassStrigling.h:59
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
SBPCGS_FERTI_DONE
#define SBPCGS_FERTI_DONE
Definition: BarleyPeaCloverGrassStrigling.h:42
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
sbpcgs_GR
Definition: BarleyPeaCloverGrassStrigling.h:58
fmc_Grazing
Definition: LandscapeFarmingEnums.h:1010
sbpcgs_start
Definition: BarleyPeaCloverGrassStrigling.h:46
sbpcgs_ferti_s3
Definition: BarleyPeaCloverGrassStrigling.h:49
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
sbpcgs_foobar
Definition: SpringBarleyPeaCloverGrassStrigling.h:56
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
SpringBarleyPeaCloverGrassStrigling::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: SpringBarleyPeaCloverGrassStrigling.h:70
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
sbpcgs_ferti_s2
Definition: BarleyPeaCloverGrassStrigling.h:48
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
sbpcgs_cattle_is_out
Definition: BarleyPeaCloverGrassStrigling.h:64
sbpcgs_strigling_sow
Definition: BarleyPeaCloverGrassStrigling.h:56
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