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

#include <OWinterWheat.h>

Inheritance diagram for OWinterWheat:
Crop

Public Member Functions

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

◆ OWinterWheat()

OWinterWheat::OWinterWheat ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
68  : Crop(a_tov, a_toc, a_L)
69  {
72  }

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

Member Function Documentation

◆ Do()

bool OWinterWheat::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 oww_start:
44  {
45  OWW_PLOUGH_RUNS = false;
46  OWW_HARROW_RUNS = false;
47  a_field->ClearManagementActionSum();
48 
49  // Set up the date management stuff
51  // Start and stop dates for all events after harvest
52  int noDates= 7;
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(20,8));
56  m_field->SetMDates(0,1,g_date->DayInYear(5,8));
57  m_field->SetMDates(1,1,g_date->DayInYear(5,9));
58  m_field->SetMDates(0,2,g_date->DayInYear(25,8));
59  m_field->SetMDates(1,2,g_date->DayInYear(25,8));
60  m_field->SetMDates(0,3,g_date->DayInYear(25,8));
61  m_field->SetMDates(1,3,g_date->DayInYear(30,8));
62  m_field->SetMDates(0,4,g_date->DayInYear(5,8));
63  m_field->SetMDates(1,4,g_date->DayInYear(5,8)); // not needed
64  m_field->SetMDates(0,5,g_date->DayInYear(15,9));
65  m_field->SetMDates(1,5,g_date->DayInYear(15,9));
66  m_field->SetMDates(0,6,g_date->DayInYear(1,8));
67  m_field->SetMDates(1,6,g_date->DayInYear(30,8));
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, "OWinterWheat::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 
90  int d1;
91  if ( ! m_ev->m_first_year )
92  {
93  int today=g_date->Date();
94  // Are we before July 1st?
95  d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
96  if (today < d1)
97  {
98  // Yes, too early. We assumme this is because the last crop was late
99  g_msg->Warn( WARN_BUG, "OWinterWheat::Do(): "
100  "Crop start attempt between 1st Jan & 1st July", "" );
101  exit( 1 );
102  }
103  else
104  {
105  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
106  if (today > d1)
107  {
108  // Yes too late - should not happen - raise an error
109  g_msg->Warn( WARN_BUG, "OWinterWheat::Do(): "
110  "Crop start attempt after last possible start date", "" );
111  exit( 1 );
112  }
113  }
114  }
115  else
116  {
118  oww_harvest, false );
119  break;
120  }
121  // End single block date checking code. Please see next line
122  // comment as well.
123  // Reinit d1 to first possible starting date.
124  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
125  if ( g_date->Date() > d1 ) {
126  d1 = g_date->Date();
127  }
128 
129  // OK, let's go.
130  if (m_farm->IsStockFarmer()) // StockFarmer
131  {
132  SimpleEvent( d1, oww_ferti_s1, false );
133  }
134  else SimpleEvent( d1, oww_ferti_p1, false );
135  }
136  break;
137 
138  case oww_ferti_p1:
139  if ( m_ev->m_lock || m_farm->DoIt( 10 ))
140  {
141  if (!m_farm->FP_Manure( m_field, 0.0,
142  g_date->DayInYear( 30,9 ) - g_date->DayInYear())) {
143  SimpleEvent( g_date->Date() + 1, oww_ferti_p1, true );
144  break;
145  }
146  }
148  break;
149 
150  case oww_ferti_s1:
151  if ( m_ev->m_lock || m_farm->DoIt( 40 ))
152  {
153  if (!m_farm->FA_Manure( m_field, 0.0,
154  g_date->DayInYear( 30,9 ) - g_date->DayInYear())) {
155  SimpleEvent( g_date->Date() + 1, oww_ferti_s1, true );
156  break;
157  }
158  }
160  break;
161 
162  case oww_autumn_plough:
163  if (!m_farm->AutumnPlough( m_field, 0.0,
164  g_date->DayInYear( 30,9 ) - g_date->DayInYear())) {
165  SimpleEvent( g_date->Date() + 1, oww_autumn_plough, true );
166  break;
167  }
168  SimpleEvent( g_date->Date()+1,oww_autumn_harrow, false );
169  break;
170 
171  case oww_autumn_harrow:
172  if (!m_farm->AutumnHarrow( m_field, 0.0,
173  g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
174  SimpleEvent( g_date->Date() + 1, oww_autumn_harrow, true );
175  break;
176  }
177  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,9 ),
178  oww_autumn_sow, false );
179  break;
180 
181  case oww_autumn_sow:
182  if (!m_farm->AutumnSow( m_field, 0.0,
183  g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
184  SimpleEvent( g_date->Date() + 1, oww_autumn_sow, true );
185  break;
186  }
187  {
188  long newdate1 = g_date->OldDays() + g_date->DayInYear( 10,9 );
189  long newdate2 = g_date->Date() + 10;
190  if ( newdate2 > newdate1 )
191  newdate1 = newdate2;
192  SimpleEvent( newdate1, oww_strigling1, false );
193  }
194  break;
195 
196  case oww_strigling1:
197  if (!m_farm->Strigling( m_field, 0.0,
198  g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
199  SimpleEvent( g_date->Date() + 1, oww_strigling1, true );
200  break;
201  }
202  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 24,9 ),
203  oww_strigling2, false );
204  break;
205 
206  case oww_strigling2:
207  // --FN--
208  if ( m_ev->m_lock || (cfg_strigling_prop.value() * m_farm->DoIt( 70 )))
209  // **CJT** Soil Type 2-4 later implementation
210  {
211  if (!m_farm->Strigling( m_field, 0.0,
212  g_date->DayInYear( 24,10 ) - g_date->DayInYear())) {
213  SimpleEvent( g_date->Date() + 1, oww_strigling2, true );
214  break;
215  }
216  }
217  // Next year
218  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 )+365,
219  oww_strigling_sow, false );
220  break;
221 
222  case oww_strigling_sow:
223  if (!m_farm->StriglingSow( m_field, 0.0,
224  g_date->DayInYear( 15,4 ) - g_date->DayInYear())) {
225  SimpleEvent( g_date->Date() + 1, oww_strigling_sow, true );
226  break;
227  }
228  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ),
229  oww_spring_roll1, false );
230  break;
231 
232  case oww_spring_roll1:
233  if ( m_ev->m_lock || m_farm->DoIt( 5 ))
234  {
235  if (!m_farm->SpringRoll( m_field, 0.0,
236  g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
237  SimpleEvent( g_date->Date() + 1, oww_spring_roll1, true );
238  break;
239  }
240  }
241  if (m_farm->IsStockFarmer()) // StockFarmer
242  {
243  SimpleEvent( g_date->Date() + 1, oww_ferti_s2, false );
244  }
245  else
246  SimpleEvent( g_date->Date() + 1, oww_ferti_p2, false );
247  break;
248 
249  case oww_ferti_p2:
250  if (!m_farm->FP_Slurry( m_field, 0.0,
251  g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
252  SimpleEvent( g_date->Date() + 1, oww_ferti_p2, true );
253  break;
254  }
255  SimpleEvent( g_date->Date()+1,oww_spring_roll2, false );
256  break;
257 
258  case oww_ferti_s2:
259  if (!m_farm->FA_Slurry( m_field, 0.0,
260  g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
261  SimpleEvent( g_date->Date() + 1, oww_ferti_s2, true );
262  break;
263  }
264  SimpleEvent( g_date->Date()+1,oww_spring_roll2, false );
265  break;
266 
267  case oww_spring_roll2:
268  if ( m_ev->m_lock || m_farm->DoIt( 5 ))
269  {
270  if (!m_farm->SpringRoll( m_field, 0.0,
271  g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
272  SimpleEvent( g_date->Date() + 1, oww_spring_roll2, true );
273  break;
274  }
275  }
276  if (m_farm->IsStockFarmer()) // StockFarmer
277  {
278  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,5 ),
279  oww_ferti_s3, false );
280  }
281  else
282  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
283  oww_harvest, false );
284  break;
285 
286  case oww_ferti_s3:
287  if ( m_ev->m_lock || m_farm->DoIt( 50 ))
288  {
289  if (!m_farm->FA_Slurry( m_field, 0.0,
290  g_date->DayInYear( 30,5 ) - g_date->DayInYear())) {
291  SimpleEvent( g_date->Date() + 1, oww_ferti_s3, true );
292  break;
293  }
294  }
295  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
296  oww_harvest, false );
297  break;
298 
299  case oww_harvest:
300  if (!m_farm->Harvest( m_field, 0.0,
301  m_field->GetMDates(1,0) - g_date->DayInYear())) {
302  SimpleEvent( g_date->Date() + 1, oww_harvest, true );
303  break;
304  }
306  break;
307 
308  case oww_straw_chopping:
309  {
310  if ( m_ev->m_lock || m_farm->DoIt( 60 ))
311  {
312  if (!m_farm->StrawChopping( m_field, 0.0,
313  m_field->GetMDates(1,0) - g_date->DayInYear()))
314  {
315  SimpleEvent( g_date->Date() + 1, oww_straw_chopping, true );
316  break;
317  }
318  else
319  {
320  // Did Chopping so test for stubble harrow/deep_plough
321  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
322  oww_deep_plough, false );
324  oww_stubble_harrow1, false );
325  break;
326  }
327  }
328  int d1=g_date->Date() + 3;
329  if (d1>m_field->GetMDates(0,2)) d1=m_field->GetMDates(0,2);
330  SimpleEvent( d1, oww_hay_turning, false );
331  }
332  break;
333 
334  case oww_hay_turning:
335  if ( m_ev->m_lock || m_farm->DoIt( 20 ))
336  {
337  if (!m_farm->HayTurning( m_field, 0.0,
338  m_field->GetMDates(1,2) - g_date->DayInYear())) {
339  SimpleEvent( g_date->Date() + 1, oww_hay_turning, true );
340  break;
341  }
342  }
343  {
344  long d1 = g_date->OldDays() + g_date->DayInYear( 7,8 );
345  long d2 = g_date->Date() + 3;
346  if ( d2 > d1 ) d1 = d2;
347  if (d1>m_field->GetMDates(0,3)) d1=m_field->GetMDates(0,3);
348  SimpleEvent( d1, oww_hay_baling, false );
349  }
350  break;
351 
352  case oww_hay_baling:
353  if (!m_farm->HayBailing( m_field, 0.0,
354  m_field->GetMDates(1,3) - g_date->DayInYear())) {
355  SimpleEvent( g_date->Date() + 1, oww_hay_baling, true );
356  break;
357  }
358  // These events will almost certainly predate
359  // 'today' due to the ending date used above.
361  oww_deep_plough, false );
363  oww_stubble_harrow1, false );
364  break;
365 
366  case oww_stubble_harrow1:
367  OWW_HARROW_RUNS = true;
368  if ( m_ev->m_lock || m_farm->DoIt( 20 ))
369  {
370  if (!m_farm->StubbleHarrowing( m_field, 0.0,
371  m_field->GetMDates(1,1) - g_date->DayInYear())) {
372  SimpleEvent( g_date->Date() + 1, oww_stubble_harrow1, true );
373  break;
374  }
375  int d1=g_date->Date()+10;
376  if (d1>m_field->GetMDates(0,5)) d1=m_field->GetMDates(0,5);
377  SimpleEvent( d1,oww_stubble_harrow2, false );
378  break;
379  }
380  OWW_HARROW_RUNS = false;
381  SimpleEvent( g_date->Date(), oww_catch_all, false );
382  break;
383 
384  case oww_stubble_harrow2:
385  if (!m_farm->StubbleHarrowing( m_field, 0.0,
386  m_field->GetMDates(1,5) - g_date->DayInYear()))
387  {
388  SimpleEvent( g_date->Date() + 1, oww_stubble_harrow2, true );
389  break;
390  }
391  OWW_HARROW_RUNS = false;
392  SimpleEvent( g_date->Date(), oww_catch_all, false );
393  break;
394 
395  case oww_deep_plough:
396  OWW_PLOUGH_RUNS = true;
397  if ( m_ev->m_lock || m_farm->DoIt( 5 ))
398  {
399  if (!m_farm->DeepPlough( m_field, 0.0,
400  m_field->GetMDates(1,6) - g_date->DayInYear()))
401  {
402  SimpleEvent( g_date->Date() + 1, oww_deep_plough, true );
403  break;
404  }
405  // if we deep plough then finish plan here
406  done=true;
407  // END OF MAIN THREAD
408  break; //
409  }
410  OWW_PLOUGH_RUNS = false;
411  SimpleEvent( g_date->Date(), oww_catch_all, false );
412  break;
413 
414  case oww_catch_all:
415  if ( !OWW_PLOUGH_RUNS || !OWW_HARROW_RUNS )
416  done = true;
417  break;
418 
419  default:
420  g_msg->Warn( WARN_BUG, "OWinterWheat::Do(): "
421  "Unknown event type! ", "" );
422  exit( 1 );
423  }
424  return done;
425 }

References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnSow(), cfg_strigling_prop, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DeepPlough(), 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::HayTurning(), 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(), oww_autumn_harrow, oww_autumn_plough, oww_autumn_sow, oww_catch_all, oww_deep_plough, oww_ferti_p1, oww_ferti_p2, oww_ferti_s1, oww_ferti_s2, oww_ferti_s3, OWW_HARROW_RUNS, oww_harvest, oww_hay_baling, oww_hay_turning, OWW_PLOUGH_RUNS, oww_spring_roll1, oww_spring_roll2, oww_start, oww_straw_chopping, oww_strigling1, oww_strigling2, oww_strigling_sow, oww_stubble_harrow1, oww_stubble_harrow2, LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringRoll(), Farm::StrawChopping(), Farm::Strigling(), Farm::StriglingSow(), Farm::StubbleHarrowing(), CfgFloat::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void OWinterWheat::SetUpFarmCategoryInformation ( )
inline
73  {
74  const int elements = 2 + (oww_foobar - OWINTERWHEAT_BASE);
76 
77  FarmManagementCategory catlist[elements] =
78  {
79  fmc_Others, // zero element unused but must be here
80  fmc_Others, // oww_start = 1, // Compulsory, must always be 1 (one).
81  fmc_Others, // oww_sleep_all_day = OWINTERWHEAT_BASE,
82  fmc_Fertilizer, // oww_ferti_s1,
83  fmc_Fertilizer, // oww_ferti_s2,
84  fmc_Fertilizer, // oww_ferti_s3,
85  fmc_Fertilizer, // oww_ferti_p1,
86  fmc_Fertilizer, // oww_ferti_p2,
87  fmc_Cultivation, // oww_autumn_plough,
88  fmc_Cultivation, // oww_autumn_harrow,
89  fmc_Others, // oww_autumn_sow,
90  fmc_Cultivation, // oww_strigling1,
91  fmc_Cultivation, // oww_strigling2,
92  fmc_Cultivation, // oww_strigling_sow,
93  fmc_Others, // oww_spring_sow,
94  fmc_Cultivation, // oww_spring_roll1,
95  fmc_Cultivation, // oww_spring_roll2,
96  fmc_Harvest, // oww_harvest,
97  fmc_Others, // oww_hay_turning,
98  fmc_Others, // oww_straw_chopping,
99  fmc_Others, // oww_hay_baling,
100  fmc_Cultivation, // oww_stubble_harrow1,
101  fmc_Cultivation, // oww_stubble_harrow2,
102  fmc_Cultivation, // oww_deep_plough,
103  fmc_Others // oww_catch_all,
104 
105 
106  // no foobar entry
107 
108  };
109  // Iterate over the catlist elements and copy them to vector
110  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
111 
112  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, OWINTERWHEAT_BASE, and oww_foobar.

Referenced by OWinterWheat().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
oww_hay_turning
Definition: OWinterWheat.h:53
oww_spring_roll1
Definition: OWinterWheat.h:50
oww_start
Definition: OWinterWheat.h:36
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
oww_ferti_s1
Definition: OWinterWheat.h:38
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
OWW_PLOUGH_RUNS
#define OWW_PLOUGH_RUNS
Definition: OWinterWheat.h:32
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
oww_hay_baling
Definition: OWinterWheat.h:55
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
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
oww_harvest
Definition: OWinterWheat.h:52
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
oww_autumn_plough
Definition: OWinterWheat.h:43
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
OWW_HARROW_RUNS
#define OWW_HARROW_RUNS
Definition: OWinterWheat.h:33
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
oww_stubble_harrow1
Definition: OWinterWheat.h:56
CfgFloat::value
double value() const
Definition: Configurator.h:142
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
oww_strigling1
Definition: OWinterWheat.h:46
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
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
oww_autumn_harrow
Definition: OWinterWheat.h:44
OWinterWheat::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: OWinterWheat.h:73
oww_stubble_harrow2
Definition: OWinterWheat.h:57
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
oww_foobar
Definition: OWinterWheat.h:60
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
oww_autumn_sow
Definition: OWinterWheat.h:45
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
oww_straw_chopping
Definition: OWinterWheat.h:54
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
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::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
oww_spring_roll2
Definition: OWinterWheat.h:51
OWINTERWHEAT_BASE
#define OWINTERWHEAT_BASE
Definition: OWinterWheat.h:31
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
Farm::AutumnHarrow
virtual bool AutumnHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the autumn on a_field.
Definition: FarmFuncs.cpp:285
oww_ferti_p1
Definition: OWinterWheat.h:41
oww_ferti_p2
Definition: OWinterWheat.h:42
Farm::DeepPlough
virtual bool DeepPlough(LE *a_field, double a_user, int a_days)
Carry out a deep ploughing event on a_field.
Definition: FarmFuncs.cpp:408
oww_ferti_s2
Definition: OWinterWheat.h:39
Farm::AutumnSow
virtual bool AutumnSow(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 autumn on a_field.
Definition: FarmFuncs.cpp:360
oww_catch_all
Definition: OWinterWheat.h:59
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
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
oww_strigling_sow
Definition: OWinterWheat.h:48
cfg_strigling_prop
CfgFloat cfg_strigling_prop
oww_ferti_s3
Definition: OWinterWheat.h:40
Farm::HayTurning
virtual bool HayTurning(LE *a_field, double a_user, int a_days)
Carry out hay turning on a_field.
Definition: FarmFuncs.cpp:1491
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
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
oww_strigling2
Definition: OWinterWheat.h:47
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
oww_deep_plough
Definition: OWinterWheat.h:58