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

#include <Maize.h>

Inheritance diagram for Maize:
Crop

Public Member Functions

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

◆ Maize()

Maize::Maize ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
63  : Crop(a_tov, a_toc, a_L)
64  {
67  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

37 {
38  m_farm = a_farm;
39  m_field = a_field;
40  m_ev = a_ev;
41  int d1=0;
42 
43  bool done = false;
44  switch ( m_ev->m_todo ) {
45  case ma_start:
46  {
47  MAIZE_SOW_DATE = 0;
49  a_field->ClearManagementActionSum();
50 
51  // Set up the date management stuff
53  // Start and stop dates for all events after harvest
54  int noDates= 2;
55  m_field->SetMDates(0,0,g_date->DayInYear(25,9));
56  // 0,0 determined by harvest date - used to see if at all possible
57  m_field->SetMDates(1,0,g_date->DayInYear(10,11));
58  m_field->SetMDates(0,1,g_date->DayInYear(15,10));
59  m_field->SetMDates(1,1,g_date->DayInYear(30,11));
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 
64  //new if: do the check only for non-optimising farms and if year>0. (030713 - m_rotation used only in the hidden year, so I modified the condition from >7 to >0)
66 
67  if (m_ev->m_startday>g_date->DayInYear(1,7))
68  {
69  if (m_field->GetMDates(0,0) >=m_ev->m_startday)
70  {
71  g_msg->Warn( WARN_BUG, "Maize::Do(): "
72  "Harvest too late for the next crop to start!!!", "" );
73  exit( 1 );
74  }
75  // Now fix any late finishing problems
76  for (int i=0; i<noDates; i++)
77  {
78  if (m_field->GetMDates(0,i)>=m_ev->m_startday)
80  if (m_field->GetMDates(1,i)>=m_ev->m_startday)
82  }
83  }
84  // Now no operations can be timed after the start of the next crop.
85 
86  if ( ! m_ev->m_first_year )
87  {
88  int today=g_date->Date();
89  // Are we before July 1st?
90  d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
91  if (today < d1)
92  {
93  // Yes, too early. We assumme this is because the last crop was late
94  g_msg->Warn( WARN_BUG, "Maize::Do(): "
95  "Crop start attempt between 1st Jan & 1st July", "" );
96  exit( 1 );
97  }
98  else
99  {
100  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
101  if (today > d1)
102  {
103  // Yes too late - should not happen - raise an error
104  g_msg->Warn( WARN_BUG, "Maize::Do(): "
105  "Crop start attempt after last possible start date", "" );
106  exit( 1 );
107  }
108  }
109  }
110  else
111  {
113  ma_spring_plough, false );
114  break;
115  }
116 
117  }//if
118 
119 
120  // End single block date checking code. Please see next line
121  // comment as well.
122  // Reinit d1 to first possible starting date.
123  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
124  if ( g_date->Date() > d1 ) {
125  d1 = g_date->Date();
126  }
127  // OK, let's go.
128  if ( m_farm->DoIt( 50 ))
129  {
130  SimpleEvent( d1, ma_fa_manure_a, false );
131  }
132  else
133  {
134  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20, 3 ) + 365,
135  ma_fa_manure_b, false );
136  }
137  break;
138  }
139 
140  case ma_fa_manure_a:
141  if (!m_farm->FA_Manure( m_field, 0.0,
142  g_date->DayInYear( 30, 11 ) - g_date->DayInYear())) {
143  SimpleEvent( g_date->Date() + 1, ma_fa_manure_a, false );
144  break;
145  }
146  SimpleEvent( g_date->Date(), ma_autumn_plough, false );
147  break;
148 
149  case ma_autumn_plough:
150  if (!m_farm->AutumnPlough( m_field, 0.0,
151  g_date->DayInYear( 30, 11 ) - g_date->DayInYear())) {
152  SimpleEvent( g_date->Date() + 1, ma_autumn_plough, false );
153  break;
154  }
155  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 4 ) + 365,
156  ma_spring_harrow, false );
157  break;
158 
159  case ma_fa_manure_b:
160  if (!m_farm->FA_Manure( m_field, 0.0,
161  g_date->DayInYear( 25, 4 ) - g_date->DayInYear())) {
162  SimpleEvent( g_date->Date() + 1, ma_fa_manure_b, false );
163  break;
164  }
165  {
166  d1 = g_date->OldDays() + g_date->DayInYear( 1, 4 );
167  if ( g_date->Date()+1 > d1 ) {
168  d1 = g_date->Date()+1;
169  }
170  SimpleEvent( d1, ma_fa_slurry_one, false );
171  }
172  break;
173 
174  case ma_fa_slurry_one:
175  if (!m_farm->FA_Slurry( m_field, 0.0,
176  g_date->DayInYear( 30, 4 ) - g_date->DayInYear())) {
177  SimpleEvent( g_date->Date() + 1, ma_fa_slurry_one, false );
178  break;
179  }
180  SimpleEvent( g_date->Date() + 1, ma_spring_plough, false );
181  break;
182 
183  case ma_spring_plough:
184  if (!m_farm->SpringPlough( m_field, 0.0,
185  g_date->DayInYear( 1, 5 ) - g_date->DayInYear())) {
186  SimpleEvent( g_date->Date() + 1, ma_spring_plough, false );
187  break;
188  }
189  SimpleEvent( g_date->Date(), ma_spring_harrow, false );
190  break;
191 
192  case ma_spring_harrow:
193  if (!m_farm->SpringHarrow( m_field, 0.0,
194  g_date->DayInYear( 10, 5 ) - g_date->DayInYear())) {
195  SimpleEvent( g_date->Date() + 1, ma_spring_harrow, false );
196  break;
197  }
198  {
199  d1 = g_date->OldDays() + g_date->DayInYear( 25, 4 );
200  if ( g_date->Date() > d1 ) {
201  d1 = g_date->Date();
202  }
203  SimpleEvent( d1, ma_spring_sow, false );
204  }
205  break;
206 
207  case ma_spring_sow:
208  if (!m_farm->SpringSow( m_field, 0.0,
209  g_date->DayInYear( 15, 5 ) - g_date->DayInYear())) {
210  SimpleEvent( g_date->Date() + 1, ma_spring_sow, false );
211  break;
212  }
214  SimpleEvent( g_date->Date(), ma_fa_npk, false );
215  break;
216 
217  case ma_fa_npk:
218  if (!m_farm->FA_NPK( m_field, 0.0,
219  g_date->DayInYear( 20, 5 ) - g_date->DayInYear())) {
220  SimpleEvent( g_date->Date() + 1, ma_fa_npk, false );
221  break;
222  }
223  if ( m_farm->DoIt( 70 )) {
224  {
225  d1 = g_date->OldDays() + g_date->DayInYear( 1, 5 );
226  if ( MAIZE_SOW_DATE + 5 > d1 ) {
227  d1 = MAIZE_SOW_DATE + 5;
228  }
229  SimpleEvent( d1, ma_herbi_one, false );
230  }
231  } else {
232  {
233  d1 = g_date->OldDays() + g_date->DayInYear( 2, 5 );
234  if ( MAIZE_SOW_DATE + 7 > d1 ) {
235  d1 = MAIZE_SOW_DATE + 7;
236  }
237  SimpleEvent( d1, ma_row_one, false );
238  }
239  }
240  break;
241 
242  case ma_herbi_one:
243  if ( m_ev->m_lock || m_farm->DoIt( (int) (100*cfg_herbi_app_prop.value()* m_farm->Prob_multiplier()) )) { //modified probability
244 
245  if (!m_farm->HerbicideTreat( m_field, 0.0, g_date->DayInYear( 25, 5 ) - g_date->DayInYear())) {
246  SimpleEvent( g_date->Date() + 1, ma_herbi_one, false );
247  break;
248  }
249  }
251  {
252  d1 = g_date->OldDays() + g_date->DayInYear( 1, 5 );
253  if ( MAIZE_SOW_DATE + 5 > d1 ) {
254  d1 = MAIZE_SOW_DATE + 5;
255  }
256  SimpleEvent( d1, ma_fa_slurry_two, false );
257  }
258  break;
259 
260  case ma_row_one:
261  if (!m_farm->RowCultivation( m_field, 0.0,
262  g_date->DayInYear( 25, 5 ) - g_date->DayInYear())) {
263  SimpleEvent( g_date->Date() + 1, ma_row_one, false );
264  break;
265  }
266  {
267  d1 = g_date->OldDays() + g_date->DayInYear( 1, 5 );
268  if ( MAIZE_SOW_DATE + 5 > d1 ) {
269  d1 = MAIZE_SOW_DATE + 5;
270  }
271  SimpleEvent( d1, ma_fa_slurry_two, false );
272  }
273  break;
274 
275  case ma_fa_slurry_two:
276  if (!m_farm->FA_Slurry( m_field, 0.0,
277  g_date->DayInYear( 25, 5 ) - g_date->DayInYear())) {
278  SimpleEvent( g_date->Date() + 1, ma_fa_slurry_two, false );
279  break;
280  }
281  if ( m_farm->DoIt( 86 )) {
282  {
283  d1 = g_date->OldDays() + g_date->DayInYear( 10, 5 );
284  if ( MAIZE_HERBI_ONE_DATE + 10 > d1 ) {
285  d1 = MAIZE_HERBI_ONE_DATE + 10;
286  }
287  SimpleEvent( d1, ma_herbi_two, false );
288  }
289  } else {
290  {
291  d1 = g_date->OldDays() + g_date->DayInYear( 21, 5 );
292  if ( g_date->Date() + 1 > d1 ) {
293  d1 = g_date->Date() + 1;
294  }
295  SimpleEvent( d1, ma_row_two, false );
296  }
297  }
298  break;
299 
300  case ma_herbi_two:
301  if ( m_ev->m_lock || m_farm->DoIt( (int) (59*cfg_herbi_app_prop.value() * m_farm->Prob_multiplier() ))) { //modified probability, was 100
302  if (!m_farm->HerbicideTreat( m_field, 0.0,
303  g_date->DayInYear( 5, 6 ) - g_date->DayInYear())) {
304  SimpleEvent( g_date->Date() + 1, ma_herbi_two, false );
305  break;
306  }
307  }
308  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 7 ),
309  ma_water_one, false );
310  break;
311 
312  case ma_row_two:
313  if (!m_farm->RowCultivation( m_field, 0.0,
314  g_date->DayInYear( 20, 6 ) - g_date->DayInYear())) {
315  SimpleEvent( g_date->Date() + 1, ma_row_two, false );
316  break;
317  }
318  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 7 ),
319  ma_water_one, false );
320  break;
321 
322  case ma_water_one:
323  if ( m_ev->m_lock || m_farm->DoIt( 30 )) {
324  if (!m_farm->Water( m_field, 0.0,
325  g_date->DayInYear( 15, 7 ) - g_date->DayInYear())) {
326  SimpleEvent( g_date->Date() + 1, ma_water_one, false );
327  break;
328  }
329  }
330  {
331  d1 = g_date->OldDays() + g_date->DayInYear( 16, 7 );
332  if ( g_date->Date() + 7 > d1 ) {
333  d1 = g_date->Date() + 7;
334  }
335  SimpleEvent( d1, ma_water_two, false );
336  }
337  break;
338 
339  case ma_water_two:
340  if (!m_farm->Water( m_field, 0.0,
341  g_date->DayInYear( 30, 7 ) - g_date->DayInYear())) {
342  SimpleEvent( g_date->Date() + 1, ma_water_two, false );
343  break;
344  }
345  ChooseNextCrop (2);
346  //*that's it
347  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25, 9 ), // was changed 30 June 2009 from 10, 10
348  ma_harvest, false );
349  break;
350 
351  case ma_harvest:
352  if (!m_farm->Harvest( m_field, 0.0,
353  m_field->GetMDates(1,0) - g_date->DayInYear())) {
354  SimpleEvent( g_date->Date() + 1, ma_harvest, false );
355  break;
356  }
357  {
358  d1 = g_date->OldDays() + m_field->GetMDates(0,1);
359  if ( g_date->Date() > d1 ) {
360  d1 = g_date->Date();
361  }
362  SimpleEvent( d1, ma_stubble, false );
363  }
364  break;
365 
366  case ma_stubble:
367  if ( m_ev->m_lock || m_farm->DoIt( 25 )) {
368  if (!m_farm->StubbleHarrowing( m_field, 0.0,
369  m_field->GetMDates(1,1) -
370  g_date->DayInYear())) {
371  SimpleEvent( g_date->Date() + 1, ma_stubble, false );
372  break;
373  }
374  }
375  d1=g_date->DayInYear();
376  done = true;
377  break;
378 
379  default:
380  g_msg->Warn( WARN_BUG, "Maize::Do(): "
381  "Unknown event type! ", "" );
382  exit( 1 );
383  }
384 
385  return done;
386 }

References Farm::AutumnPlough(), cfg_herbi_app_prop, Crop::ChooseNextCrop(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_Slurry(), g_date, g_msg, LE::GetMDates(), Farm::GetType(), Calendar::GetYearNumber(), Farm::Harvest(), Farm::HerbicideTreat(), 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, ma_autumn_plough, ma_fa_manure_a, ma_fa_manure_b, ma_fa_npk, ma_fa_slurry_one, ma_fa_slurry_two, ma_harvest, ma_herbi_one, ma_herbi_two, ma_row_one, ma_row_two, ma_spring_harrow, ma_spring_plough, ma_spring_sow, ma_start, ma_stubble, ma_water_one, ma_water_two, MAIZE_HERBI_ONE_DATE, MAIZE_SOW_DATE, Calendar::OldDays(), Farm::Prob_multiplier(), Farm::RowCultivation(), LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSow(), Farm::StubbleHarrowing(), tof_OptimisingFarm, CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void Maize::SetUpFarmCategoryInformation ( )
inline
68  {
69  const int elements = 2 + (ma_foobar - MAIZE_BASE);
71 
72  FarmManagementCategory catlist[elements] =
73  {
74  fmc_Others, // zero element unused but must be here
75  fmc_Others, // ma_start = 1, // Compulsory, start event must always be 1 (one).
76  fmc_Fertilizer, // ma_fa_manure_a = MAIZE_BASE,
77  fmc_Fertilizer, // ma_fa_manure_b,
78  fmc_Cultivation, // ma_autumn_plough,
79  fmc_Fertilizer, // ma_fa_slurry_one,
80  fmc_Cultivation, // ma_spring_plough,
81  fmc_Cultivation, // ma_spring_harrow,
82  fmc_Others, // ma_spring_sow,
83  fmc_Fertilizer, // ma_fa_npk,
84  fmc_Herbicide, // ma_herbi_one,
85  fmc_Cultivation, // ma_row_one,
86  fmc_Fertilizer, // ma_fa_slurry_two,
87  fmc_Herbicide, // ma_herbi_two,
88  fmc_Cultivation, // ma_row_two,
89  fmc_Watering, // ma_water_one,
90  fmc_Watering, // ma_water_two,
91  fmc_Harvest, // ma_harvest,
92  fmc_Cultivation // ma_stubble,
93 
94 
95  // no foobar entry
96 
97  };
98  // Iterate over the catlist elements and copy them to vector
99  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
100 
101  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Herbicide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, Crop::m_ManagementCategories, ma_foobar, and MAIZE_BASE.

Referenced by Maize().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
ma_start
Definition: Maize.h:36
MAIZE_HERBI_ONE_DATE
#define MAIZE_HERBI_ONE_DATE
Definition: Maize.h:33
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
ma_fa_npk
Definition: Maize.h:44
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
Farm::SpringPlough
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
Definition: FarmFuncs.cpp:421
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
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
ma_stubble
Definition: Maize.h:53
ma_water_two
Definition: Maize.h:51
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
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
ma_spring_harrow
Definition: Maize.h:42
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
ma_harvest
Definition: Maize.h:52
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
ma_fa_slurry_one
Definition: Maize.h:40
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
Maize::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: Maize.h:68
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
ma_herbi_two
Definition: Maize.h:48
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
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
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
ma_water_one
Definition: Maize.h:50
MAIZE_BASE
#define MAIZE_BASE
Definition: Maize.h:31
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
ma_row_one
Definition: Maize.h:46
Farm::Prob_multiplier
virtual double Prob_multiplier()
Definition: Farm.h:778
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
ma_autumn_plough
Definition: Maize.h:39
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
MAIZE_SOW_DATE
#define MAIZE_SOW_DATE
Definition: Maize.h:32
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
ma_foobar
Definition: Maize.h:54
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
cfg_herbi_app_prop
CfgFloat cfg_herbi_app_prop
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
ma_spring_plough
Definition: Maize.h:41
Farm::RowCultivation
virtual bool RowCultivation(LE *a_field, double a_user, int a_days)
Carry out a harrowing between crop rows on a_field.
Definition: FarmFuncs.cpp:1183
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
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
ma_fa_manure_a
Definition: Maize.h:37
ma_row_two
Definition: Maize.h:49
ma_herbi_one
Definition: Maize.h:45
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
ma_fa_manure_b
Definition: Maize.h:38
ma_spring_sow
Definition: Maize.h:43
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
ma_fa_slurry_two
Definition: Maize.h:47
Crop::ChooseNextCrop
void ChooseNextCrop(int a_no_dates)
Chooses the next crop to grow in a field.
Definition: Farm.cpp:756
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523
Farm::SpringHarrow
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: FarmFuncs.cpp:459