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

#include <Triticale.h>

Inheritance diagram for Triticale:
Crop

Public Member Functions

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

◆ Triticale()

Triticale::Triticale ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
70  : Crop(a_tov, a_toc, a_L)
71  {
74  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

38 {
39  m_farm = a_farm;
40  m_field = a_field;
41  m_ev = a_ev;
42  int d1=0;
43  int noDates=2;
44  bool done = false;
45 
46  switch ( m_ev->m_todo )
47  {
48  case tri_start:
50  a_field->ClearManagementActionSum();
51 
52  // Set up the date management stuff
54  // Start and stop dates for all events after harvest
55  m_field->SetMDates(0,0,g_date->DayInYear(5,8));
56  // Determined by harvest date - used to see if at all possible
57  m_field->SetMDates(1,0,g_date->DayInYear(20,8));
58  m_field->SetMDates(0,1,g_date->DayInYear(20,8));
59  m_field->SetMDates(1,1,g_date->DayInYear(15,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  if (m_ev->m_startday>g_date->DayInYear(1,7))
67  {
68  if (m_field->GetMDates(0,0) >=m_ev->m_startday)
69  {
70  g_msg->Warn( WARN_BUG, "Triticale::Do(): "
71  "Harvest too late for the next crop to start!!!", "" );
72  exit( 1 );
73  }
74  // Now fix any late finishing problems
75  for (int i=0; i<noDates; i++) {
76  if(m_field->GetMDates(0,i)>=m_ev->m_startday) {
77  m_field->SetMDates(0,i,m_ev->m_startday-1); //move the starting date
78  }
79  if(m_field->GetMDates(1,i)>=m_ev->m_startday){
80  m_field->SetMConstants(i,0);
81  m_field->SetMDates(1,i,m_ev->m_startday-1); //move the finishing date
82  }
83  }
84  }
85  // Now no operations can be timed after the start of the next crop.
86  // Start single block date checking code to be cut-'n-pasted...
87  if ( ! m_ev->m_first_year )
88  {
89  // Are we before July 1st?
90  d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
91  if (g_date->Date() < d1)
92  {
93  // Yes, too early. We assumme this is because the last crop was late
94  g_msg->Warn( WARN_BUG, "Triticale::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 (g_date->Date() > d1)
102  {
103  // Yes too late - should not happen - raise an error
104  g_msg->Warn( WARN_BUG, "Triticale::Do(): "
105  "Crop start attempt after last possible start date", "" );
106  exit( 1 );
107  }
108  }
109  }
110  else
111  {
112  // Is the first year so must start in spring like nothing was unusual
114  ,tri_harvest, false );
115  break;
116  }
117  }//if
118 
119  // End single block date checking code. Please see next line
120  // comment as well.
121  // Reinit d1 to first possible starting date.
122  d1 = g_date->OldDays() + g_date->DayInYear( 20,8 );
123  if ( g_date->Date() > d1 ) {
124  d1 = g_date->Date();
125  }
126 
127  // OK, let's go.
128  TRI_OCCUP_DATE = 0;
129  TRI_WATER_DATE = 0;
130 
131  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,8 ),
132  tri_fa_manure, false );
133  break;
134 
135  case tri_fa_manure:
136  if ( m_ev->m_lock || m_farm->DoIt( 40 )) {
137  if (!m_farm->FA_Manure( m_field, 0.0,
138  g_date->DayInYear( 5,10 ) -
139  g_date->DayInYear())) {
140  SimpleEvent( g_date->Date() + 1, tri_fa_manure, true );
141  break;
142  }
143  }
144  {
145  d1 = g_date->Date();
146  if ( d1 < g_date->OldDays() + g_date->DayInYear( 1,9 ))
147  d1 = g_date->OldDays() + g_date->DayInYear( 1,9 );
148  SimpleEvent( d1, tri_autumn_plough, false );
149  }
150  break;
151 
152  case tri_autumn_plough:
153  if (!m_farm->AutumnPlough( m_field, 0.0,
154  g_date->DayInYear( 15,10 ) -
155  g_date->DayInYear())) {
156  SimpleEvent( g_date->Date() + 1, tri_autumn_plough, true );
157  break;
158  }
159  SimpleEvent( g_date->Date() + 1, tri_autumn_harrow, false );
160  break;
161 
162  case tri_autumn_harrow:
163  if (!m_farm->AutumnHarrow( m_field, 0.0,
164  g_date->DayInYear( 15,10 ) -
165  g_date->DayInYear())) {
166  SimpleEvent( g_date->Date() + 1, tri_autumn_harrow, true );
167  break;
168  }
169  SimpleEvent( g_date->Date(), tri_autumn_sow, false );
170  break;
171 
172  case tri_autumn_sow:
173  if (!m_farm->AutumnSow( m_field, 0.0,
174  g_date->DayInYear( 15,10 ) -
175  g_date->DayInYear())) {
176  SimpleEvent( g_date->Date() + 1, tri_autumn_sow, true );
177  break;
178  }
179  SimpleEvent( g_date->Date(), tri_autumn_roll, false );
180  break;
181 
182  case tri_autumn_roll:
183  if ( m_ev->m_lock || m_farm->DoIt( 5 )) {
184  if (!m_farm->AutumnRoll( m_field, 0.0,
185  g_date->DayInYear( 10,10 ) -
186  g_date->DayInYear())) {
187  SimpleEvent( g_date->Date() + 1, tri_autumn_roll, true );
188  break;
189  }
190  }
191  {
192  d1 = g_date->Date();
193  if ( d1 < g_date->OldDays() + g_date->DayInYear( 15,9 ))
194  d1 = g_date->OldDays() + g_date->DayInYear( 15,9 );
195  SimpleEvent( d1, tri_herbi_one, false );
196  }
197  break;
198 
199  case tri_herbi_one:
200  if ( m_ev->m_lock || m_farm->DoIt( (int) (90*cfg_herbi_app_prop.value() * m_farm->Prob_multiplier()))) { //modified probability
201 
202  if (!m_farm->HerbicideTreat( m_field, 0.0, g_date->DayInYear( 15,10 ) - g_date->DayInYear())) {
203  SimpleEvent( g_date->Date() + 1, tri_herbi_one, true );
204  break;
205  }
206  }
207  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ) + 365,
208  tri_spring_roll, false );
209  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ) + 365,
210  tri_fa_npk, false );
211  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,4 ) + 365,
212  tri_fa_slurry, false );
213  if ( m_farm->DoIt( 15 ))
214  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,4 ) + 365,
215  tri_herbi_two, false );
216  else
217  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ) + 365,
218  tri_strigling, false );
219  break;
220 
221  case tri_spring_roll:
222  if ( m_ev->m_lock || m_farm->DoIt( 15 ))
223  {
224  if (!m_farm->SpringRoll( m_field, 0.0,
225  g_date->DayInYear( 10,4 ) -
226  g_date->DayInYear())) {
227  SimpleEvent( g_date->Date() + 1, tri_spring_roll, true );
228  break;
229  }
230  }
231  break;
232 
233  case tri_fa_npk:
234  if (!m_farm->FA_NPK( m_field, 0.0,
235  g_date->DayInYear( 30, 4 ) -
236  g_date->DayInYear())) {
237  SimpleEvent( g_date->Date() + 1, tri_fa_npk, true );
238  break;
239  }
240  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,5 ),
241  tri_GR_one, false );
242  break;
243 
244  case tri_fa_slurry:
245  if ( m_ev->m_lock || m_farm->DoIt( 90 ))
246  {
247  if (!m_farm->FA_Slurry( m_field, 0.0,
248  g_date->DayInYear( 25,4 ) -
249  g_date->DayInYear())) {
250  SimpleEvent( g_date->Date() + 1, tri_fa_slurry, true );
251  break;
252  }
253  }
254  break;
255 
256  case tri_herbi_two:
257  if ( m_ev->m_lock || m_farm->DoIt( (int) (50*cfg_herbi_app_prop.value() *TRI_DECIDE_TO_HERB * m_farm->Prob_multiplier()))) { //modified probability
258  if (!m_farm->HerbicideTreat( m_field, 0.0,
259  g_date->DayInYear( 30,5 ) -
260  g_date->DayInYear())) {
261  SimpleEvent( g_date->Date() + 1, tri_herbi_two, true );
262  break;
263  }
264  }
265  break;
266 
267  case tri_strigling:
268  if ( m_ev->m_lock || m_farm->DoIt( 10 )) {
269  if (!m_farm->Strigling( m_field, 0.0,
270  g_date->DayInYear( 30,4 ) -
271  g_date->DayInYear())) {
272  SimpleEvent( g_date->Date() + 1, tri_strigling, true );
273  break;
274  }
275  }
276  break;
277 
278  case tri_GR_one:
279  if ( m_ev->m_lock || m_farm->DoIt( (int) (70*cfg_greg_app_prop.value() )))
280  {
281  if (!m_farm->GrowthRegulator( m_field, 0.0,
282  g_date->DayInYear( 15,5 ) -
283  g_date->DayInYear())) {
284  SimpleEvent( g_date->Date() + 1, tri_GR_one, true );
285  break;
286  }
287  }
288  {
289  d1 = g_date->Date() + 10;
290  if ( d1 < g_date->OldDays() + g_date->DayInYear( 20,5 ))
291  d1 = g_date->OldDays() + g_date->DayInYear( 20,5 );
292  SimpleEvent( d1, tri_GR_two, true );
293  SimpleEvent( d1, tri_fungicide, true );
294  }
295  break;
296 
297  case tri_GR_two:
298  if ( m_ev->m_lock || m_farm->DoIt( (int) (60*cfg_greg_app_prop.value() )))
299  {
300  if (!m_farm->GrowthRegulator( m_field, 0.0,
301  g_date->DayInYear( 1,6 ) -
302  g_date->DayInYear())) {
303  SimpleEvent( g_date->Date() + 1, tri_GR_two, true );
304  break;
305  }
306 
307  }
308  SimpleEvent( g_date->Date() + 1, tri_water, true );
309  break;
310 
311  case tri_fungicide:
312  if ( g_date->Date() < TRI_WATER_DATE + 1 ) {
314  break;
315  }
316  if ( m_ev->m_lock || m_farm->DoIt( (int) (75*cfg_fungi_app_prop1.value() * m_farm->Prob_multiplier()))) //modified probability
317  {
318  if (!m_farm->FungicideTreat( m_field, 0.0, g_date->DayInYear( 10,6 ) - g_date->DayInYear())) {
319  SimpleEvent( g_date->Date() + 1, tri_fungicide, true );
320  break;
321  }
322 
324  }
325  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,6 ),
326  tri_insecticide, false );
327  break;
328 
329  case tri_insecticide:
330  if ( g_date->Date() < TRI_WATER_DATE + 1 ) {
332  break;
333  }
334  if ( m_ev->m_lock || m_farm->DoIt( (int) (16*cfg_ins_app_prop1.value() * m_farm->Prob_multiplier()))) //modified probability
335  {
336  if (!m_farm->InsecticideTreat( m_field, 0.0, g_date->DayInYear( 10,7 ) - g_date->DayInYear())) {
337  SimpleEvent( g_date->Date() + 1, tri_insecticide, true );
338  break;
339  }
340 
342  }
343  ChooseNextCrop (2);
344  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,8 ),
345  tri_harvest, false );
346  break;
347 
348  case tri_water:
349  if ( g_date->Date() < TRI_OCCUP_DATE + 1 ) {
351  break;
352  }
353  if ( m_ev->m_lock || m_farm->DoIt( 15 ))
354  {
355  if (!m_farm->Water( m_field, 0.0,
356  g_date->DayInYear( 30,6 ) -
357  g_date->DayInYear())) {
358  SimpleEvent( g_date->Date() + 1, tri_water, true );
359  break;
360  }
362  }
363  break;
364 
365  case tri_harvest:
366  if (m_field->GetMConstants(0)==0) {
367  if (!m_farm->Harvest( m_field, 0.0, -1)) { //raise an error
368  g_msg->Warn( WARN_BUG, "Triticale::Do(): failure in 'Harvest' execution", "" );
369  exit( 1 );
370  }
371  }
372  else {
373  if (!m_farm->Harvest( m_field, 0.0, m_field->GetMDates(1,0) - g_date->DayInYear())) {
374  SimpleEvent( g_date->Date() + 1, tri_harvest, true );
375  break;
376  }
377  }
378  if ( m_farm->DoIt( 75 ))
379  SimpleEvent( g_date->Date(), tri_chopping, true );
380  else
381  SimpleEvent( g_date->Date(), tri_hay_turning, true );
382  break;
383 
384  case tri_chopping:
385  if (m_field->GetMConstants(0)==0) {
386  if (!m_farm->StrawChopping( m_field, 0.0, -1)) { //raise an error
387  g_msg->Warn( WARN_BUG, "Triticale::Do(): failure in 'StrawChopping' execution", "" );
388  exit( 1 );
389  }
390  }
391  else {
392  if (!m_farm->StrawChopping( m_field, 0.0, m_field->GetMDates(1,0) - g_date->DayInYear())) {
393  SimpleEvent( g_date->Date() + 1, tri_chopping, true );
394  break;
395  }
396  }
398  break;
399 
400  case tri_hay_turning:
401  if ( m_ev->m_lock || m_farm->DoIt( 20 )) {
402  if (m_field->GetMConstants(0)==0) {
403  if (!m_farm->HayTurning( m_field, 0.0, -1)) { //raise an error
404  g_msg->Warn( WARN_BUG, "Triticale::Do(): failure in 'HayTurning' execution", "" );
405  exit( 1 );
406  }
407  }
408  else {
409  if (!m_farm->HayTurning( m_field, 0.0, m_field->GetMDates(1,0) - g_date->DayInYear())) {
410  SimpleEvent( g_date->Date() + 1, tri_hay_turning, true );
411  break;
412  }
413  }
414  }
415  SimpleEvent( g_date->Date(), tri_hay_bailing, false );
416  break;
417 
418  case tri_hay_bailing:
419  if (m_field->GetMConstants(0)==0) {
420  if (!m_farm->HayBailing( m_field, 0.0, -1)) { //raise an error
421  g_msg->Warn( WARN_BUG, "Triticale::Do(): failure in 'HayBailing' execution", "" );
422  exit( 1 );
423  }
424  }
425  else {
426  if (!m_farm->HayBailing( m_field, 0.0, m_field->GetMDates(1,0) - g_date->DayInYear())) {
427  SimpleEvent( g_date->Date() + 1, tri_hay_bailing, true );
428  break;
429  }
430  }
432  break;
433 
434  case tri_stubble_harrow:
435  if (m_field->GetMConstants(1)==0) {
436  if (!m_farm->StubbleHarrowing( m_field, 0.0, -1)) { //raise an error
437  g_msg->Warn( WARN_BUG, "Triticale::Do(): failure in 'StubbleHarrowing' execution", "" );
438  exit( 1 );
439  }
440  }
441  else {
442  if (!m_farm->StubbleHarrowing( m_field, 0.0, m_field->GetMDates(1,1) - g_date->DayInYear())) {
443  SimpleEvent( g_date->Date() + 1, tri_stubble_harrow, true );
444  break;
445  }
446  }
447  done = true;
448  break;
449 
450  default:
451  g_msg->Warn( WARN_BUG, "Triticale::Do(): "
452  "Unknown event type! ", "" );
453  exit( 1 );
454  }
455  return done;
456 }

References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), cfg_fungi_app_prop1, cfg_greg_app_prop, cfg_herbi_app_prop, cfg_ins_app_prop1, Crop::ChooseNextCrop(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMConstants(), LE::GetMDates(), Farm::GetType(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::HayTurning(), Farm::HerbicideTreat(), 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(), Farm::Prob_multiplier(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringRoll(), Farm::StrawChopping(), Farm::Strigling(), Farm::StubbleHarrowing(), tof_OptimisingFarm, tri_autumn_harrow, tri_autumn_plough, tri_autumn_roll, tri_autumn_sow, tri_chopping, TRI_DECIDE_TO_HERB, tri_fa_manure, tri_fa_npk, tri_fa_slurry, tri_fungicide, tri_GR_one, tri_GR_two, tri_harvest, tri_hay_bailing, tri_hay_turning, tri_herbi_one, tri_herbi_two, tri_insecticide, TRI_OCCUP_DATE, tri_spring_roll, tri_start, tri_strigling, tri_stubble_harrow, tri_water, TRI_WATER_DATE, CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void Triticale::SetUpFarmCategoryInformation ( )
inline
75  {
76  const int elements = 2 + (tri_foobar - TRITICALE_BASE);
78 
79  FarmManagementCategory catlist[elements] =
80  {
81  fmc_Others, // zero element unused but must be here
82  fmc_Others,//tri_start = 1, // Compulsory, start event must always be 1 (one).
83  fmc_Fertilizer,//tri_fa_manure = TRITICALE_BASE,
84  fmc_Cultivation,//tri_autumn_plough,
85  fmc_Cultivation,//tri_autumn_harrow,
86  fmc_Others,//tri_autumn_sow,
87  fmc_Others,//tri_autumn_roll,
88  fmc_Herbicide,//tri_herbi_one,
89  fmc_Others,//tri_spring_roll,
90  fmc_Fertilizer,//tri_fa_npk,
91  fmc_Fertilizer,//tri_fa_slurry,
92  fmc_Herbicide,//tri_herbi_two,
93  fmc_Cultivation,//tri_strigling,
94  fmc_Others,//tri_GR_one,
95  fmc_Others,//tri_GR_two,
96  fmc_Watering,//tri_water,
97  fmc_Fungicide,//tri_fungicide,
98  fmc_Insecticide,//tri_insecticide,
99  fmc_Harvest,//tri_harvest,
100  fmc_Others,//tri_chopping,
101  fmc_Others,//tri_hay_turning,
102  fmc_Others,//tri_hay_bailing,
103  fmc_Cultivation//tri_stubble_harrow
104 
105  // no foobar entry
106 
107  };
108  // Iterate over the catlist elements and copy them to vector
109  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
110 
111  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, Crop::m_ManagementCategories, tri_foobar, and TRITICALE_BASE.

Referenced by Triticale().


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
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
tri_chopping
Definition: Triticale.h:57
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
TRITICALE_BASE
#define TRITICALE_BASE
Definition: Triticale.h:31
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
tri_herbi_one
Definition: Triticale.h:45
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
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
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
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
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
tri_spring_roll
Definition: Triticale.h:46
tri_fa_manure
Definition: Triticale.h:40
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
tri_herbi_two
Definition: Triticale.h:49
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
cfg_herbi_app_prop
CfgFloat cfg_herbi_app_prop
tri_insecticide
Definition: Triticale.h:55
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
tri_water
Definition: Triticale.h:53
Farm::Prob_multiplier
virtual double Prob_multiplier()
Definition: Farm.h:778
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
tri_foobar
Definition: Triticale.h:61
tri_fungicide
Definition: Triticale.h:54
cfg_greg_app_prop
CfgFloat cfg_greg_app_prop
Calendar::Date
long Date(void)
Definition: Calendar.h:57
tri_hay_bailing
Definition: Triticale.h:59
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
tri_fa_npk
Definition: Triticale.h:47
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
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
tri_start
Definition: Triticale.h:39
TRI_OCCUP_DATE
#define TRI_OCCUP_DATE
Definition: Triticale.h:33
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
tri_strigling
Definition: Triticale.h:50
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
Farm::AutumnRoll
virtual bool AutumnRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the autumn on a_field.
Definition: FarmFuncs.cpp:299
tri_fa_slurry
Definition: Triticale.h:48
tri_stubble_harrow
Definition: Triticale.h:60
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
TRI_DECIDE_TO_HERB
#define TRI_DECIDE_TO_HERB
Definition: Triticale.h:35
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
tri_autumn_plough
Definition: Triticale.h:41
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
TRI_WATER_DATE
#define TRI_WATER_DATE
Definition: Triticale.h:34
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
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
cfg_fungi_app_prop1
CfgFloat cfg_fungi_app_prop1
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
tri_GR_one
Definition: Triticale.h:51
tri_GR_two
Definition: Triticale.h:52
tri_autumn_roll
Definition: Triticale.h:44
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
tri_autumn_sow
Definition: Triticale.h:43
tri_autumn_harrow
Definition: Triticale.h:42
tri_hay_turning
Definition: Triticale.h:58
Triticale::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: Triticale.h:75
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Crop::ChooseNextCrop
void ChooseNextCrop(int a_no_dates)
Chooses the next crop to grow in a field.
Definition: Farm.cpp:756
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
WARN_BUG
Definition: MapErrorMsg.h:34
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
tri_harvest
Definition: Triticale.h:56
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