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

#include <MaizeSilage.h>

Inheritance diagram for MaizeSilage:
Crop

Public Member Functions

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

◆ MaizeSilage()

MaizeSilage::MaizeSilage ( 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 MaizeSilage::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 ms_start:
46  {
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(1,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,9));
58  m_field->SetMDates(0,1,g_date->DayInYear(15,9));
59  m_field->SetMDates(1,1,g_date->DayInYear(30,9));
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  char veg_type[ 20 ];
72  //char farm_no[20];
73  //sprintf (farm_no, "%d", m_almass_no);
74  sprintf( veg_type, "%d", m_ev->m_next_tov );
75  g_msg->Warn( WARN_FILE, "MaizeSilage::Do(): Harvest too late for the next crop to start!!! The next crop is: ", veg_type);
76 
77  //g_msg->Warn( WARN_BUG, "MaizeSilage::Do(): Harvest too late for the next crop to start!!!", "" );
78  exit( 1 );
79  }
80  // Now fix any late finishing problems
81  for (int i=0; i<noDates; i++) {
82  if(m_field->GetMDates(0,i)>=m_ev->m_startday) {
83  m_field->SetMDates(0,i,m_ev->m_startday-1); //move the starting date
84  }
85  if(m_field->GetMDates(1,i)>=m_ev->m_startday){
86  m_field->SetMConstants(i,0);
87  m_field->SetMDates(1,i,m_ev->m_startday-1); //move the finishing date
88  }
89  }
90  }
91  // Now no operations can be timed after the start of the next crop.
92 
93  if ( ! m_ev->m_first_year )
94  {
95  int today=g_date->Date();
96  // Are we before July 1st?
97  d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
98  if (today < d1)
99  {
100  // Yes, too early. We assumme this is because the last crop was late
101  g_msg->Warn( WARN_BUG, "MaizeSilage::Do(): "
102  "Crop start attempt between 1st Jan & 1st July", "" );
103  exit( 1 );
104  }
105  else
106  {
107  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
108  if (today > d1)
109  {
110  // Yes too late - should not happen - raise an error
111  g_msg->Warn( WARN_BUG, "MaizeSilage::Do(): "
112  "Crop start attempt after last possible start date", "" );
113  exit( 1 );
114  }
115  }
116  }
117  else
118  {
120  ms_spring_plough, false );
121  break;
122  }
123  }//if
124 
125  // End single block date checking code. Please see next line
126  // comment as well.
127  // Reinit d1 to first possible starting date.
128  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
129  if ( g_date->Date() > d1 ) {
130  d1 = g_date->Date();
131  }
132  // OK, let's go.
133  if ( m_farm->DoIt( 50 ))
134  {
135  SimpleEvent( d1, ms_fa_manure_a, false );
136  }
137  else
138  {
139  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20, 3 ) + 365,
140  ms_fa_manure_b, false );
141  }
142  break;
143  }
144 
145  case ms_fa_manure_a:
146  if (!m_farm->FA_Manure( m_field, 0.0,
147  g_date->DayInYear( 30, 11 ) - g_date->DayInYear())) {
148  SimpleEvent( g_date->Date() + 1, ms_fa_manure_a, false );
149  break;
150  }
151  SimpleEvent( g_date->Date(), ms_autumn_plough, false );
152  break;
153 
154  case ms_autumn_plough:
155  if (!m_farm->AutumnPlough( m_field, 0.0,
156  g_date->DayInYear( 30, 11 ) - g_date->DayInYear())) {
157  SimpleEvent( g_date->Date() + 1, ms_autumn_plough, false );
158  break;
159  }
160  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 4 ) + 365,
161  ms_spring_harrow, false );
162  break;
163 
164  case ms_fa_manure_b:
165  if (!m_farm->FA_Manure( m_field, 0.0,
166  g_date->DayInYear( 25, 4 ) - g_date->DayInYear())) {
167  SimpleEvent( g_date->Date() + 1, ms_fa_manure_b, false );
168  break;
169  }
170  {
171  d1 = g_date->OldDays() + g_date->DayInYear( 1, 4 );
172  if ( g_date->Date()+1 > d1 ) {
173  d1 = g_date->Date()+1;
174  }
175  SimpleEvent( d1, ms_fa_slurry_one, false );
176  }
177  break;
178 
179  case ms_fa_slurry_one:
180  if (!m_farm->FA_Slurry( m_field, 0.0,
181  g_date->DayInYear( 30, 4 ) - g_date->DayInYear())) {
182  SimpleEvent( g_date->Date() + 1, ms_fa_slurry_one, false );
183  break;
184  }
185  SimpleEvent( g_date->Date() + 1, ms_spring_plough, false );
186  break;
187 
188  case ms_spring_plough:
189  if (!m_farm->SpringPlough( m_field, 0.0,
190  g_date->DayInYear( 1, 5 ) - g_date->DayInYear())) {
191  SimpleEvent( g_date->Date() + 1, ms_spring_plough, false );
192  break;
193  }
194  SimpleEvent( g_date->Date(), ms_spring_harrow, false );
195  break;
196 
197  case ms_spring_harrow:
198  if (!m_farm->SpringHarrow( m_field, 0.0,
199  g_date->DayInYear( 10, 5 ) - g_date->DayInYear())) {
200  SimpleEvent( g_date->Date() + 1, ms_spring_harrow, false );
201  break;
202  }
203  {
204  d1 = g_date->OldDays() + g_date->DayInYear( 25, 4 );
205  if ( g_date->Date() > d1 ) {
206  d1 = g_date->Date();
207  }
208  SimpleEvent( d1, ms_spring_sow, false );
209  }
210  break;
211 
212  case ms_spring_sow:
213  if (!m_farm->SpringSow( m_field, 0.0,
214  g_date->DayInYear( 15, 5 ) - g_date->DayInYear())) {
215  SimpleEvent( g_date->Date() + 1, ms_spring_sow, false );
216  break;
217  }
219  SimpleEvent( g_date->Date(), ms_fa_npk, false );
220  break;
221 
222  case ms_fa_npk:
223  if (!m_farm->FA_NPK( m_field, 0.0,
224  g_date->DayInYear( 20, 5 ) - g_date->DayInYear())) {
225  SimpleEvent( g_date->Date() + 1, ms_fa_npk, false );
226  break;
227  }
228  if ( m_farm->DoIt( 70 )) {
229  {
230  d1 = g_date->OldDays() + g_date->DayInYear( 1, 5 );
231  if ( MAIZESILAGE_SOW_DATE + 5 > d1 ) {
232  d1 = MAIZESILAGE_SOW_DATE + 5;
233  }
234  SimpleEvent( d1, ms_herbi_one, false );
235  }
236  } else {
237  {
238  d1 = g_date->OldDays() + g_date->DayInYear( 2, 5 );
239  if ( MAIZESILAGE_SOW_DATE + 7 > d1 ) {
240  d1 = MAIZESILAGE_SOW_DATE + 7;
241  }
242  SimpleEvent( d1, ms_row_one, false );
243  }
244  }
245  break;
246 
247  case ms_herbi_one:
248  if ( m_ev->m_lock || m_farm->DoIt( (int) (100*cfg_herbi_app_prop.value() * m_farm->Prob_multiplier()) )) { //modified probability
249 
250  if (!m_farm->HerbicideTreat( m_field, 0.0, g_date->DayInYear( 25, 5 ) - g_date->DayInYear())) {
251  SimpleEvent( g_date->Date() + 1, ms_herbi_one, false );
252  break;
253  }
254  }
256  {
257  d1 = g_date->OldDays() + g_date->DayInYear( 1, 5 );
258  if ( MAIZESILAGE_SOW_DATE + 5 > d1 ) {
259  d1 = MAIZESILAGE_SOW_DATE + 5;
260  }
261  SimpleEvent( d1, ms_fa_slurry_two, false );
262  }
263  break;
264 
265  case ms_row_one:
266  if (!m_farm->RowCultivation( m_field, 0.0,
267  g_date->DayInYear( 25, 5 ) - g_date->DayInYear())) {
268  SimpleEvent( g_date->Date() + 1, ms_row_one, false );
269  break;
270  }
271  {
272  d1 = g_date->OldDays() + g_date->DayInYear( 1, 5 );
273  if ( MAIZESILAGE_SOW_DATE + 5 > d1 ) {
274  d1 = MAIZESILAGE_SOW_DATE + 5;
275  }
276  SimpleEvent( d1, ms_fa_slurry_two, false );
277  }
278  break;
279 
280  case ms_fa_slurry_two:
281  if (!m_farm->FA_Slurry( m_field, 0.0,
282  g_date->DayInYear( 25, 5 ) - g_date->DayInYear())) {
283  SimpleEvent( g_date->Date() + 1, ms_fa_slurry_two, false );
284  break;
285  }
286  if ( m_farm->DoIt( 86 )) {
287  {
288  d1 = g_date->OldDays() + g_date->DayInYear( 10, 5 );
289  if ( MAIZESILAGE_HERBI_ONE_DATE + 10 > d1 ) {
290  d1 = MAIZESILAGE_HERBI_ONE_DATE + 10;
291  }
292  SimpleEvent( d1, ms_herbi_two, false );
293  }
294  } else {
295  {
296  d1 = g_date->OldDays() + g_date->DayInYear( 21, 5 );
297  if ( g_date->Date() + 1 > d1 ) {
298  d1 = g_date->Date() + 1;
299  }
300  SimpleEvent( d1, ms_row_two, false );
301  }
302  }
303  break;
304 
305  case ms_herbi_two:
306  if ( m_ev->m_lock || m_farm->DoIt( (int) (59*cfg_herbi_app_prop.value() * m_farm->Prob_multiplier()))) { //modified probability
307  if (!m_farm->HerbicideTreat( m_field, 0.0,
308  g_date->DayInYear( 5, 6 ) - g_date->DayInYear())) {
309  SimpleEvent( g_date->Date() + 1, ms_herbi_two, false );
310  break;
311  }
312  }
313  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 7 ),
314  ms_water_one, false );
315  break;
316 
317  case ms_row_two:
318  if (!m_farm->RowCultivation( m_field, 0.0,
319  g_date->DayInYear( 20, 6 ) - g_date->DayInYear())) {
320  SimpleEvent( g_date->Date() + 1, ms_row_two, false );
321  break;
322  }
323  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 7 ),
324  ms_water_one, false );
325  break;
326 
327  case ms_water_one:
328  if ( m_ev->m_lock || m_farm->DoIt( 30 )) {
329  if (!m_farm->Water( m_field, 0.0,
330  g_date->DayInYear( 15, 7 ) - g_date->DayInYear())) {
331  SimpleEvent( g_date->Date() + 1, ms_water_one, false );
332  break;
333  }
334  }
335  {
336  d1 = g_date->OldDays() + g_date->DayInYear( 16, 7 );
337  if ( g_date->Date() + 7 > d1 ) {
338  d1 = g_date->Date() + 7;
339  }
340  SimpleEvent( d1, ms_water_two, false );
341  }
342  break;
343 
344  case ms_water_two:
345  if (!m_farm->Water( m_field, 0.0,
346  g_date->DayInYear( 30, 7 ) - g_date->DayInYear())) {
347  SimpleEvent( g_date->Date() + 1, ms_water_two, false );
348  break;
349  }
350  ChooseNextCrop (2);
351  //*that's it
352  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1, 9 ),
353  ms_harvest, false );
354  break;
355 
356  case ms_harvest:
357  if (m_field->GetMConstants(0)==0) {
358  if (!m_farm->Harvest( m_field, 0.0, -1)) { //raise an error
359  g_msg->Warn( WARN_BUG, "MaizeSilage::Do(): failure in 'Harvest' execution", "" );
360  exit( 1 );
361  }
362  }
363  else {
364  if (!m_farm->Harvest( m_field, 0.0, m_field->GetMDates(1,0) - g_date->DayInYear())) {
365  SimpleEvent( g_date->Date() + 1, ms_harvest, false );
366  break;
367  }
368  }
369  {
370  d1 = g_date->OldDays() + m_field->GetMDates(0,1);
371  if ( g_date->Date() > d1 ) {
372  d1 = g_date->Date();
373  }
374  SimpleEvent( d1, ms_stubble, false );
375  }
376  break;
377 
378  case ms_stubble:
379  if ( m_ev->m_lock || m_farm->DoIt( 25 )) {
380  if (m_field->GetMConstants(1)==0) {
381  if (!m_farm->StubbleHarrowing( m_field, 0.0, -1)) { //raise an error
382  g_msg->Warn( WARN_BUG, "MaizeSilage::Do(): failure in 'StubbleHarrowing' execution", "" );
383  exit( 1 );
384  }
385  }
386  else {
387  if (!m_farm->StubbleHarrowing( m_field, 0.0, m_field->GetMDates(1,1) - g_date->DayInYear())) {
388  SimpleEvent( g_date->Date() + 1, ms_stubble, false );
389  break;
390  }
391  }
392  }
393  d1=g_date->DayInYear();
394  done = true;
395  break;
396 
397  default:
398  g_msg->Warn( WARN_BUG, "MaizeSilage::Do(): "
399  "Unknown event type! ", "" );
400  exit( 1 );
401  }
402 
403  return done;
404 }

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::GetMConstants(), 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_next_tov, FarmEvent::m_startday, FarmEvent::m_todo, MAIZESILAGE_HERBI_ONE_DATE, MAIZESILAGE_SOW_DATE, ms_autumn_plough, ms_fa_manure_a, ms_fa_manure_b, ms_fa_npk, ms_fa_slurry_one, ms_fa_slurry_two, ms_harvest, ms_herbi_one, ms_herbi_two, ms_row_one, ms_row_two, ms_spring_harrow, ms_spring_plough, ms_spring_sow, ms_start, ms_stubble, ms_water_one, ms_water_two, Calendar::OldDays(), Farm::Prob_multiplier(), Farm::RowCultivation(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSow(), Farm::StubbleHarrowing(), tof_OptimisingFarm, CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, WARN_FILE, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void MaizeSilage::SetUpFarmCategoryInformation ( )
inline
68  {
69  const int elements = 2 + (ms_foobar - MAIZESILAGE_BASE);
71 
72  FarmManagementCategory catlist[elements] =
73  {
74  fmc_Others, // zero element unused but must be here
75  fmc_Others, // ms_start = 1, // Compulsory, start event must always be 1 (one).
76  fmc_Fertilizer, // ms_fa_manure_a = MAIZESILAGE_BASE,
77  fmc_Fertilizer, // ms_fa_manure_b,
78  fmc_Cultivation, // ms_autumn_plough,
79  fmc_Fertilizer, // ms_fa_slurry_one,
80  fmc_Cultivation, // ms_spring_plough,
81  fmc_Cultivation, // ms_spring_harrow,
82  fmc_Others, // ms_spring_sow,
83  fmc_Fertilizer, // ms_fa_npk,
84  fmc_Herbicide, // ms_herbi_one,
85  fmc_Cultivation, // ms_row_one,
86  fmc_Fertilizer, // ms_fa_slurry_two,
87  fmc_Herbicide, // ms_herbi_two,
88  fmc_Cultivation, // ms_row_two,
89  fmc_Watering, // ms_water_one,
90  fmc_Watering, // ms_water_two,
91  fmc_Harvest, // ms_harvest,
92  fmc_Cultivation // ms_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, MAIZESILAGE_BASE, and ms_foobar.

Referenced by MaizeSilage().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
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
MAIZESILAGE_SOW_DATE
#define MAIZESILAGE_SOW_DATE
Definition: MaizeSilage.h:32
WARN_FILE
Definition: MapErrorMsg.h:37
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
LE::GetMConstants
int GetMConstants(int a)
Definition: Elements.h:407
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
ms_herbi_two
Definition: MaizeSilage.h:48
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
ms_autumn_plough
Definition: MaizeSilage.h:39
ms_harvest
Definition: MaizeSilage.h:52
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
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
cfg_herbi_app_prop
CfgFloat cfg_herbi_app_prop
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
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
ms_foobar
Definition: MaizeSilage.h:54
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
ms_stubble
Definition: MaizeSilage.h:53
ms_water_two
Definition: MaizeSilage.h:51
ms_row_one
Definition: MaizeSilage.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::Prob_multiplier
virtual double Prob_multiplier()
Definition: Farm.h:778
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
MAIZESILAGE_BASE
#define MAIZESILAGE_BASE
Definition: MaizeSilage.h:31
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
ms_fa_slurry_two
Definition: MaizeSilage.h:47
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
ms_spring_harrow
Definition: MaizeSilage.h:42
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
ms_start
Definition: MaizeSilage.h:36
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
ms_fa_manure_b
Definition: MaizeSilage.h:38
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
MaizeSilage::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: MaizeSilage.h:68
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
MAIZESILAGE_HERBI_ONE_DATE
#define MAIZESILAGE_HERBI_ONE_DATE
Definition: MaizeSilage.h:33
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
ms_fa_manure_a
Definition: MaizeSilage.h:37
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
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
ms_fa_slurry_one
Definition: MaizeSilage.h:40
ms_spring_plough
Definition: MaizeSilage.h:41
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
ms_row_two
Definition: MaizeSilage.h:49
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
ms_spring_sow
Definition: MaizeSilage.h:43
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
ms_fa_npk
Definition: MaizeSilage.h:44
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
ms_herbi_one
Definition: MaizeSilage.h:45
ms_water_one
Definition: MaizeSilage.h:50
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