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

#include <OSpringBarley.h>

Inheritance diagram for OSpringBarley:
Crop

Public Member Functions

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

◆ OSpringBarley()

OSpringBarley::OSpringBarley ( 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()

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

Reimplemented from Crop.

34 {
35  m_farm = a_farm;
36  m_field = a_field;
37  m_ev = a_ev;
38 
39  bool done = false;
40 
41  switch ( m_ev->m_todo )
42  {
43  case osb_start:
44  {
45  a_field->ClearManagementActionSum();
46 
47  // Set up the date management stuff
48  // Could save the start day in case it is needed later
49  // m_field->m_startday = m_ev->m_startday;
51  // Start and stop dates for all events after harvest
52  int noDates=3;
53  m_field->SetMDates(0,0,g_date->DayInYear(1,8));
54  // Determined by harvest date - used to see if at all possible
55  m_field->SetMDates(1,0,g_date->DayInYear(15,8));
56  m_field->SetMDates(0,1,g_date->DayInYear(15,8));
57  m_field->SetMDates(1,1,g_date->DayInYear(15,8));
58  m_field->SetMDates(0,2,g_date->DayInYear(5,8));
59  m_field->SetMDates(1,2,g_date->DayInYear(20,8));
60  // Check the next crop for early start, unless it is a spring crop
61  // in which case we ASSUME that no checking is necessary!!!!
62  // So DO NOT implement a crop that runs over the year boundary
63  if (m_ev->m_startday>g_date->DayInYear(1,7))
64  {
65  if (m_field->GetMDates(0,0) >=m_ev->m_startday)
66  {
67  g_msg->Warn( WARN_BUG, "OSpringBarley::Do(): "
68  "Harvest too late for the next crop to start!!!", "" );
69  exit( 1 );
70  }
71  // Now fix any late finishing problems
72  for (int i=0; i<noDates; i++)
73  {
74  if (m_field->GetMDates(0,i)>=m_ev->m_startday)
76  if (m_field->GetMDates(1,i)>=m_ev->m_startday)
78  }
79  }
80  // Now no operations can be timed after the start of the next crop.
81 
82  int d1;
83  if ( ! m_ev->m_first_year )
84  {
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  {
90  // Yes, too early. We assumme this is because the last crop was late
91  g_msg->Warn( WARN_BUG, "OSpringBarley::Do(): "
92  "Crop start attempt between 1st Jan & 1st July", "" );
93  exit( 1 );
94  }
95  else
96  {
97  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
98  if (today > d1)
99  {
100  // Yes too late - should not happen - raise an error
101  g_msg->Warn( WARN_BUG, "OSpringBarley::Do(): "
102  "Crop start attempt after last possible start date", "" );
103  exit( 1 );
104  }
105  }
106  }
107  else
108  {
109  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ),
110  osb_spring_harrow, false );
111  break;
112  }
113  // End single block date checking code. Please see next line
114  // comment as well.
115  // Reinit d1 to first possible starting date.
116  d1 = g_date->OldDays() + m_first_date;
117  if ( g_date->Date() > d1 ) {
118  d1 = g_date->Date();
119  }
120  // OK, let's go.
121  SimpleEvent( d1, osb_autumn_plough, false );
122  OSB_ISAUTUMNPLOUGH=false;
123  OSB_SOW_DATE=0;
125  }
126  break;
127 
128  case osb_autumn_plough:
129  if ( m_ev->m_lock || m_farm->DoIt( 20 ))
130  {
131  if (!m_farm->AutumnPlough( m_field, 0.0,
132  g_date->DayInYear( 15, 12 ) - g_date->DayInYear())) {
133  SimpleEvent( g_date->Date() + 1, osb_autumn_plough, true );
134  break;
135  }
136  OSB_ISAUTUMNPLOUGH=true;
137  if (m_farm->IsStockFarmer()) // StockFarmer
138  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,3 ) + 365,
139  osb_ferti_s2, false );
140  else // PlantFarmer
141  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 4 ) + 365,
142  osb_ferti_p2, false );
143  // both must start this second thread
144  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10, 3 ) + 365,
145  osb_spring_harrow, false );
146  break;
147  }
148  if (m_farm->IsStockFarmer()) // StockFarmer
149  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10, 3 ) + 365,
150  osb_ferti_s1, false );
151  else // PlantFarmer
152  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10, 3 ) + 365,
153  osb_ferti_p1, false );
154  break;
155 
156  //*** The plant farmers thread
157  case osb_ferti_p1:
158  if ( m_ev->m_lock || m_farm->DoIt( 12 ))
159  {
160  if (!m_farm->FP_Manure( m_field, 0.0,
161  g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
162  SimpleEvent( g_date->Date() + 1, osb_ferti_p1, true );
163  break;
164  }
165  }
166  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10, 3 ),
167  osb_spring_plough_p, false );
168  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 30 ,4 ),
169  osb_ferti_p2, false );
170  break;
171 
172  case osb_spring_plough_p:
173  if (!m_farm->SpringPlough( m_field, 0.0,
174  g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
175  SimpleEvent( g_date->Date() + 1, osb_spring_plough_p, true );
176  break;
177  }
178  // --FN--
180  break;
181 
182  case osb_ferti_p2:
183  if ( m_ev->m_lock || m_farm->DoIt( 10 ))
184  {
185  if (!m_farm->FP_Slurry( m_field, 0.0,
186  g_date->DayInYear( 30, 4 ) - g_date->DayInYear())) {
187  SimpleEvent( g_date->Date() + 1, osb_ferti_p2, true );
188  break;
189  }
190  }
191  // end of thread
192  break;
193 
194  // END of the special plant thread - this now joins at obs_spring_harrow
195 
196  //*** The stock farmers thread
197  case osb_ferti_s1:
198  if ( m_ev->m_lock || m_farm->DoIt( 62 ))
199  {
200  if (!m_farm->FA_Manure( m_field, 0.0,
201  g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
202  SimpleEvent( g_date->Date() + 1, osb_ferti_s1, true );
203  break;
204  }
205  }
206  SimpleEvent( g_date->Date(),
207  osb_spring_plough_s, false );
208  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,3 ),
209  osb_ferti_s2, false );
210  break;
211 
212  case osb_spring_plough_s:
213  if (!m_farm->SpringPlough( m_field, 0.0,
214  g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
215  SimpleEvent( g_date->Date() + 1, osb_spring_plough_s, true );
216  break;
217  }
218  SimpleEvent( g_date->Date(),
219  osb_spring_harrow, false );
220  break;
221 
222  case osb_ferti_s2:
223  if ( m_ev->m_lock || m_farm->DoIt( 80 ))
224  {
225  if (!m_farm->FA_Slurry( m_field, 0.0,
226  g_date->DayInYear( 20, 4 ) - g_date->DayInYear())) {
227  SimpleEvent( g_date->Date() + 1, osb_ferti_s2, true );
228  break;
229  }
230  }
231  // end of thread
232  break;
233  // END of the special stock thread - this now joins at obs_spring_harrow
234 
235  case osb_spring_harrow:
236  if (!m_farm->SpringHarrow( m_field, 0.0,
237  g_date->DayInYear( 15,4 ) - g_date->DayInYear())) {
238  SimpleEvent( g_date->Date() + 1, osb_spring_harrow, true );
239  break;
240  }
241  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 ),
242  osb_spring_sow1, false );
243  break;
244 
245  case osb_spring_sow1:
246  if (!m_farm->SpringSow( m_field, 0.0,
247  g_date->DayInYear( 15,4 ) - g_date->DayInYear())) {
248  SimpleEvent( g_date->Date() + 1, osb_spring_sow1, true );
249  break;
250  }
252  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
253  osb_spring_sow2, false );
254  break;
255 
256  case osb_spring_sow2:
257  if ( m_ev->m_lock || m_farm->DoIt( 60 ))
258  {
259  if (!m_farm->SpringSow( m_field, 0.0,
260  g_date->DayInYear( 15,4 ) - g_date->DayInYear())) {
261  SimpleEvent( g_date->Date() + 1, osb_spring_sow2, true );
262  break;
263  }
264  }
265  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 16,3 ),
266  osb_spring_roll, false );
267  break;
268 
269  case osb_spring_roll:
270  if ( m_ev->m_lock || m_farm->DoIt( 90 ))
271  {
272  if (!m_farm->SpringRoll( m_field, 0.0,
273  g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
274  SimpleEvent( g_date->Date() + 1, osb_spring_roll, true );
275  break;
276  }
277  }
278  if (OSB_SOW_DATE+5 >g_date->DayInYear( 20,3 ))
280  osb_strigling1, false );
281  else
282  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,3 ),
283  osb_strigling1, false );
284  break;
285 
286  case osb_strigling1:
287  if ( m_ev->m_lock || (cfg_strigling_prop.value()*m_farm->DoIt( 90 )))
288  {
289  if (!m_farm->Strigling( m_field, 0.0,
290  g_date->DayInYear( 20,4 ) - g_date->DayInYear())) {
291  SimpleEvent( g_date->Date() + 1, osb_strigling1, true );
292  break;
293  }
294  else
295  {
297  if ( g_date->Date()+5<g_date->DayInYear( 10,4 ))
298  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,4 ),
299  osb_strigling2, false );
300  else SimpleEvent( g_date->Date()+5, osb_strigling2, false );
301  }
302  break;
303  }
304  // didn't do strigling so straight to harvest
305  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
306  osb_harvest, false );
307  break;
308 
309  case osb_strigling2:
310  if (!m_farm->Strigling( m_field, 0.0,
311  g_date->DayInYear( 25,4 ) - g_date->DayInYear())) {
312  SimpleEvent( g_date->Date() + 1, osb_strigling2, true );
313  break;
314  }
315  else
316  {
318  if ( g_date->Date()+5<g_date->DayInYear( 21,4 ))
319  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 21,4 ),
320  osb_strigling3, false );
321  else SimpleEvent( g_date->Date()+5, osb_strigling3, false );
322  }
323  break;
324 
325  case osb_strigling3:
326  if ( m_ev->m_lock || (cfg_strigling_prop.value()*m_farm->DoIt( 89 )))
327  {
328  if (!m_farm->Strigling( m_field, 0.0,
329  g_date->DayInYear( 5,5 ) - g_date->DayInYear())) {
330  SimpleEvent( g_date->Date() + 1, osb_strigling3, true );
331  break;
332  }
333  }
335  osb_harvest, false );
336  break;
337 
338  case osb_harvest:
339  if (!m_farm->Harvest( m_field, 0.0,
340  m_field->GetMDates(1,0) - g_date->DayInYear())) {
341  SimpleEvent( g_date->Date() + 1, osb_harvest, true );
342  break;
343  }
345  break;
346 
347  case osb_straw_chopping:
348  if ( m_ev->m_lock || m_farm->DoIt( 20 ))
349  {
350  if (!m_farm->StrawChopping( m_field, 0.0,
351  m_field->GetMDates(1,1) - g_date->DayInYear())) {
352  SimpleEvent( g_date->Date() + 1, osb_straw_chopping, true );
353  break;
354  }
355  // END MAIN THREAD
356  done=true;
357  // --FN--
358  break;
359  }
361  osb_hay, false );
362  break;
363 
364  case osb_hay:
365  if (!m_farm->HayBailing( m_field, 0.0,
366  m_field->GetMDates(1,2) - g_date->DayInYear())) {
367  SimpleEvent( g_date->Date() + 1, osb_hay, true );
368  break;
369  }
370  // END MAIN THREAD
371  done=true;
372  break;
373 
374  default:
375  g_msg->Warn( WARN_BUG, "OSpringBarley::Do(): "
376  "Unknown event type! ", "" );
377  exit( 1 );
378  }
379 
380  return done;
381 }

References Farm::AutumnPlough(), cfg_strigling_prop, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_Slurry(), Farm::FP_Manure(), Farm::FP_Slurry(), g_date, g_msg, LE::GetMDates(), Farm::Harvest(), Farm::HayBailing(), 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(), osb_autumn_plough, osb_ferti_p1, osb_ferti_p2, osb_ferti_s1, osb_ferti_s2, osb_harvest, osb_hay, OSB_ISAUTUMNPLOUGH, OSB_SOW_DATE, osb_spring_harrow, osb_spring_plough_p, osb_spring_plough_s, osb_spring_roll, osb_spring_sow1, osb_spring_sow2, osb_start, osb_straw_chopping, osb_strigling1, osb_strigling2, osb_strigling3, OSB_STRIGLING_DATE, LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::StrawChopping(), Farm::Strigling(), CfgFloat::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void OSpringBarley::SetUpFarmCategoryInformation ( )
inline
70  {
71  const int elements = 2 + (osb_foobar - OSBarley_BASE);
73 
74  FarmManagementCategory catlist[elements] =
75  {
76  fmc_Others, // zero element unused but must be here
77  fmc_Others, // osb_start = 1, // Compulsory, start event must always be 1 (one).
78  fmc_Fertilizer, // osb_ferti_p1 = OSBarley_BASE,
79  fmc_Fertilizer, // osb_ferti_p2,
80  fmc_Fertilizer, // osb_ferti_s1,
81  fmc_Fertilizer, // osb_ferti_s2,
82  fmc_Harvest, // osb_harvest,
83  fmc_Cultivation, // osb_spring_plough_p,
84  fmc_Cultivation, // osb_spring_plough_s,
85  fmc_Cultivation, // osb_autumn_plough,
86  fmc_Cultivation, // osb_spring_harrow,
87  fmc_Cultivation, // osb_spring_roll,
88  fmc_Others, // osb_spring_sow1,
89  fmc_Others, // osb_spring_sow2,
90  fmc_Others, // osb_hay,
91  fmc_Cultivation, // osb_strigling1,
92  fmc_Cultivation, // osb_strigling2,
93  fmc_Cultivation, // osb_strigling3,
94  fmc_Others // osb_straw_chopping,
95 
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_Harvest, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, osb_foobar, and OSBarley_BASE.

Referenced by OSpringBarley().


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
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
osb_strigling1
Definition: OSpringBarley.h:51
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
osb_spring_harrow
Definition: OSpringBarley.h:46
osb_ferti_s2
Definition: OSpringBarley.h:41
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
osb_spring_roll
Definition: OSpringBarley.h:47
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
OSB_STRIGLING_DATE
#define OSB_STRIGLING_DATE
Definition: OSpringBarley.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
osb_start
Definition: OSpringBarley.h:37
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
OSBarley_BASE
#define OSBarley_BASE
Definition: OSpringBarley.h:31
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
osb_ferti_p2
Definition: OSpringBarley.h:39
Farm::FP_Manure
virtual bool FP_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:896
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
osb_ferti_s1
Definition: OSpringBarley.h:40
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
osb_strigling3
Definition: OSpringBarley.h:53
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
Farm::StrawChopping
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: FarmFuncs.cpp:1475
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
osb_strigling2
Definition: OSpringBarley.h:52
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
osb_spring_plough_s
Definition: OSpringBarley.h:44
osb_harvest
Definition: OSpringBarley.h:42
OSpringBarley::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: OSpringBarley.h:70
osb_spring_sow1
Definition: OSpringBarley.h:48
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
cfg_strigling_prop
CfgFloat cfg_strigling_prop
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::FP_Slurry
virtual bool FP_Slurry(LE *a_field, double a_user, int a_days)
Apply slurry to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:823
osb_foobar
Definition: OSpringBarley.h:55
OSB_SOW_DATE
#define OSB_SOW_DATE
Definition: OSpringBarley.h:33
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
osb_autumn_plough
Definition: OSpringBarley.h:45
osb_spring_sow2
Definition: OSpringBarley.h:49
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
osb_hay
Definition: OSpringBarley.h:50
osb_straw_chopping
Definition: OSpringBarley.h:54
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
OSB_ISAUTUMNPLOUGH
#define OSB_ISAUTUMNPLOUGH
Definition: OSpringBarley.h:32
osb_spring_plough_p
Definition: OSpringBarley.h:43
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
osb_ferti_p1
Definition: OSpringBarley.h:38
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