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

#include <FieldPeasStrigling.h>

Inheritance diagram for FieldPeasStrigling:
Crop

Public Member Functions

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

◆ FieldPeasStrigling()

FieldPeasStrigling::FieldPeasStrigling ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
66  : Crop(a_tov, a_toc, a_L)
67  {
70  }

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

39 {
40  m_farm = a_farm;
41  m_field = a_field;
42  m_ev = a_ev;
43 
44  bool done = false;
45 
46  switch ( m_ev->m_todo )
47  {
48  case fpst_start:
49  {
53  a_field->ClearManagementActionSum();
54 
55  // Set up the date management stuff
56  // Could save the start day in case it is needed later
57  // m_field->m_startday = m_ev->m_startday;
59  // Start and stop dates for all events after harvest
60  int noDates=1;
61  m_field->SetMDates(0,0,g_date->DayInYear(30,8));
62  // 0,0 determined by harvest date - used to see if at all possible
63  m_field->SetMDates(1,0,g_date->DayInYear(30,8));
64  // Check the next crop for early start, unless it is a spring crop
65  // in which case we ASSUME that no checking is necessary!!!!
66  // So DO NOT implement a crop that runs over the year boundary
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, "FieldPeas::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  if (m_field->GetMDates(0,i)>=m_ev->m_startday)
79  if (m_field->GetMDates(1,i)>=m_ev->m_startday)
81  }
82  }
83  // Now no operations can be timed after the start of the next crop.
84 
85  // CJT note:
86  // Start single block date checking code to be cut-'n-pasted...
87  int d1;
88  if ( ! m_ev->m_first_year )
89  {
90  // Are we before July 1st?
91  d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
92  if (g_date->Date() < d1)
93  {
94  // Yes, too early. We assumme this is because the last crop was late
95  g_msg->Warn( WARN_BUG, "FieldPeas::Do(): "
96  "Crop start attempt between 1st Jan & 1st July", "" );
97  exit( 1 );
98  }
99  else
100  {
101  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
102  if (g_date->Date() > d1)
103  {
104  // Yes too late - should not happen - raise an error
105  g_msg->Warn( WARN_BUG, "FieldPeas::Do(): "
106  "Crop start attempt after last possible start date", "" );
107  exit( 1 );
108  }
109  }
110  }
111  else
112  {
113  // If this is the first year of running then it is possible to start
114  // on day 0, so need this to tell us what to do:
115  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,3 ),
116  fpst_spring_plough, false );
117  break;
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( 1,10 );
123  if ( g_date->Date() > d1 ) {
124  d1 = g_date->Date();
125  }
126  // OK, let's go.
127  SimpleEvent( d1, fpst_autumn_plough, false );
128  }
129  break;
130 
131  case fpst_autumn_plough:
132  if ( m_ev->m_lock || m_farm->DoIt( 90 )) {
133  if (!m_farm->AutumnPlough( m_field, 0.0,
134  g_date->DayInYear( 1, 12 ) -
135  g_date->DayInYear())) {
136  SimpleEvent( g_date->Date() + 1, fpst_autumn_plough, true );
137  break;
138  }
139  }
140  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,3 ) + 365,
141  fpst_spring_plough, false );
142  break;
143 
144  case fpst_spring_plough:
145  if ( m_ev->m_lock || m_farm->DoIt( 100 )) {
146  if (!m_farm->SpringPlough( m_field, 0.0,
147  g_date->DayInYear( 1,4 ) -
148  g_date->DayInYear())) {
149  SimpleEvent( g_date->Date() + 1, fpst_spring_plough, true );
150  break;
151  }
152  }
153  {
154  int d1 = g_date->Date()+1;
155  int d2 = g_date->OldDays() + g_date->DayInYear( 5,3 );
156  if ( d1 < d2 ) {
157  d1 = d2;
158  }
159  SimpleEvent( d1, fpst_spring_harrow, false );
160  }
161  break;
162 
163  case fpst_spring_harrow:
164  if (!m_farm->SpringHarrow( m_field, 0.0,
165  g_date->DayInYear( 5,4 ) - g_date->DayInYear())) {
166  SimpleEvent( g_date->Date() + 1, fpst_spring_harrow, true );
167  break;
168  }
169  {
171  if ( m_farm->IsStockFarmer()) {
172  dothis = fpst_fertmanure_stock;
173  }
174 
175  int d1 = g_date->Date();
176  int d2 = g_date->OldDays() + g_date->DayInYear( 20,3 );
177  if ( d1 < d2 ) {
178  d1 = d2;
179  }
180  SimpleEvent( d1, dothis, false );
181  }
182  break;
183 
185  if (!m_farm->FP_Manure( m_field, 0.0,
186  g_date->DayInYear( 15,4 ) -
187  g_date->DayInYear())) {
188  SimpleEvent( g_date->Date() + 1, fpst_fertmanure_plant, true );
189  break;
190  }
191  {
192  int d1 = g_date->Date();
193  int d2 = g_date->OldDays() + g_date->DayInYear( 25,3 );
194  if ( d1 < d2 ) {
195  d1 = d2;
196  }
197  SimpleEvent( d1, fpst_spring_sow, false );
198  }
199  break;
200 
202  if ( m_ev->m_lock || m_farm->DoIt( 75 )) {
203  if (!m_farm->FA_Manure( m_field, 0.0,
204  g_date->DayInYear( 15,4 ) -
205  g_date->DayInYear())) {
206  SimpleEvent( g_date->Date() + 1, fpst_fertmanure_stock, true );
207  break;
208  }
209  }
210  {
211  int d1 = g_date->Date();
212  int d2 = g_date->OldDays() + g_date->DayInYear( 25,3 );
213  if ( d1 < d2 ) {
214  d1 = d2;
215  }
216  SimpleEvent( d1, fpst_spring_sow, false );
217  }
218  break;
219 
220  case fpst_spring_sow:
221  if (!m_farm->SpringSow( m_field, 0.0,
222  g_date->DayInYear( 15,4 ) -
223  g_date->DayInYear())) {
224  SimpleEvent( g_date->Date() + 1, fpst_spring_sow, true );
225  break;
226  }
227  SimpleEvent( g_date->Date(), fpst_spring_roll, false );
228  break;
229 
230  case fpst_spring_roll:
231  if (!m_farm->SpringRoll( m_field, 0.0,
232  g_date->DayInYear( 15,4 ) -
233  g_date->DayInYear())) {
234  SimpleEvent( g_date->Date() + 1, fpst_spring_roll, true );
235  break;
236  }
237  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,4 ),
238  fpst_strigling1, false );
239  break;
240 
241  case fpst_strigling1:
242  if ( m_ev->m_lock || (cfg_strigling_prop.value()*m_farm->DoIt( 100 )))
243  {
244  if (!m_farm->Strigling( m_field, 0.0,
245  g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
246  SimpleEvent( g_date->Date() + 1, fpst_strigling1, true );
247  break;
248  }
249  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,5 ),
250  fpst_strigling2, false );
251  break;
252  }
253  else {
254  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
255  fpst_insecticide, false );
256  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
257  fpst_fungicide, false );
258 
259  // Water carries the main thread.
260  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
261  fpst_water_one, false );
262  break;
263  }
264 
265  case fpst_strigling2:
266  if ( m_ev->m_lock || (cfg_strigling_prop.value()*m_farm->DoIt( 100 )))
267  {
268  if (!m_farm->Strigling( m_field, 0.0,
269  g_date->DayInYear( 10,5 ) - g_date->DayInYear())) {
270  SimpleEvent( g_date->Date() + 1, fpst_strigling2, true );
271  break;
272  }
273  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 11,5 ),
274  fpst_strigling3, false );
275  break;
276  }
277  else {
278  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
279  fpst_insecticide, false );
280  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
281  fpst_fungicide, false );
282 
283  // Water carries the main thread.
284  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
285  fpst_water_one, false );
286  break;
287  }
288 
289  case fpst_strigling3:
290  if ( m_ev->m_lock || (cfg_strigling_prop.value()*m_farm->DoIt( 100 )))
291  {
292  if (!m_farm->Strigling( m_field, 0.0,
293  g_date->DayInYear( 15,5 ) - g_date->DayInYear())) {
294  SimpleEvent( g_date->Date() + 1, fpst_strigling3, true );
295  break;
296  }
297  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 16,5 ),
298  fpst_strigling4, false );
299  break;
300  }
301  else {
302  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
303  fpst_insecticide, false );
304  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
305  fpst_fungicide, false );
306 
307  // Water carries the main thread.
308  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
309  fpst_water_one, false );
310  break;
311  }
312 
313 
314  case fpst_strigling4:
315  if ( m_ev->m_lock || (cfg_strigling_prop.value()*m_farm->DoIt( 50 )))
316  {
317  if (!m_farm->Strigling( m_field, 0.0,
318  g_date->DayInYear( 26,5 ) - g_date->DayInYear())) {
319  SimpleEvent( g_date->Date() + 1, fpst_strigling4, true );
320  break;
321  }
322  }
323  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
324  fpst_insecticide, false );
325  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
326  fpst_fungicide, false );
327 
328  // Water carries the main thread.
329  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
330  fpst_water_one, false );
331  break;
332 
333  case fpst_fungicide:
334  if ( m_ev->m_lock || m_farm->DoIt( (int) (10*cfg_fungi_app_prop1.value() ))) {
335  // Check for proximity of watering.
336  {
337  int d1 = g_date->Date();
338  if ( d1 < FPEASS_WATER_DATE + 2 ) {
339  // Too close, try tomorrow.
340  SimpleEvent( g_date->Date() + 1, fpst_fungicide, true );
341  break;
342  }
343  }
344  if (!m_farm->FungicideTreat( m_field, 0.0,
345  g_date->DayInYear( 15,6 ) -
346  g_date->DayInYear())) {
347  SimpleEvent( g_date->Date() + 1, fpst_fungicide, true );
348  break;
349  }
351  }
352  // End of thread.
353  break;
354 
355  case fpst_insecticide:
356  if ( m_ev->m_lock || m_farm->DoIt( (int) (90*cfg_ins_app_prop1.value() )) || AphidDamage(m_field)) {
357  {
358  int d1 = g_date->Date();
359  if ( d1 < FPEASS_WATER_DATE + 2 ) {
360  // Too close, try tomorrow.
361  SimpleEvent( g_date->Date() + 1, fpst_insecticide, true );
362  break;
363  }
364  }
365  if (!m_farm->InsecticideTreat( m_field, 0.0,
366  g_date->DayInYear( 15,6 ) -
367  g_date->DayInYear())) {
368  SimpleEvent( g_date->Date() + 1, fpst_insecticide, true );
369  break;
370  }
372  }
373  // End of thread.
374  break;
375 
376  case fpst_water_one:
377  if ( m_ev->m_lock || m_farm->DoIt( 30 ))
378  {
379  {
380  int d1 = g_date->Date();
381  if ( d1 < FPEASS_INSECT_DATE + 2 ||
382  d1 < FPEASS_FUNGI_DATE + 2 ) {
383  // Too close, try tomorrow.
384  SimpleEvent( g_date->Date() + 1, fpst_water_one, true );
385  break;
386  }
387  }
388  if (!m_farm->Water( m_field, 0.0,
389  g_date->DayInYear( 15,6 ) - g_date->DayInYear())) {
390  SimpleEvent( g_date->Date() + 1, fpst_water_one, true );
391  break;
392  }
394  // Did first water, so do the second one too.
395  {
396  int d1 = g_date->OldDays() + g_date->DayInYear( 16,6 );
397  if ( d1 < g_date->Date() + 7 ) {
398  d1 = g_date->Date() + 7;
399  }
400  SimpleEvent( d1, fpst_water_two, false );
401  }
402  }
403  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,8 ),
404  fpst_growth_reg, false );
405  break;
406 
407  case fpst_water_two:
408  {
409  int d1 = g_date->Date();
410  if ( d1 < FPEASS_INSECT_DATE + 2 ||
411  d1 < FPEASS_FUNGI_DATE + 2 ) {
412  // Too close, try tomorrow.
413  SimpleEvent( g_date->Date() + 1, fpst_water_two, true );
414  break;
415  }
416  }
417  if (!m_farm->Water( m_field, 0.0,
418  g_date->DayInYear( 1,7 ) -
419  g_date->DayInYear())) {
420  SimpleEvent( g_date->Date() + 1, fpst_water_two, true );
421  break;
422  }
424  // End of thread.
425  break;
426 
427  case fpst_growth_reg:
428  if ( m_ev->m_lock || m_farm->DoIt( (int) (20*cfg_greg_app_prop.value() )))
429  {
430  if (!m_farm->GrowthRegulator( m_field, 0.0,
431  g_date->DayInYear( 20,8 ) -
432  g_date->DayInYear())) {
433  SimpleEvent( g_date->Date() + 1, fpst_growth_reg, true );
434  break;
435  }
436  // Did apply growth regulator, so wait seven days before
437  // harvesting.
438  SimpleEvent( g_date->Date()+7, fpst_harvest, false );
439  break;
440  }
441  // No growth regulator, try harvesting today.
442  SimpleEvent( g_date->Date(), fpst_harvest, false );
443  break;
444 
445  case fpst_harvest:
446  if (!m_farm->Harvest( m_field, 0.0,
447  g_date->DayInYear( 30,8 ) -
448  g_date->DayInYear())) {
449  SimpleEvent( g_date->Date() + 1, fpst_harvest, true );
450  break;
451  }
453  break;
454 
455  case fpst_straw_chopping:
456  if (!m_farm->StrawChopping( m_field, 0.0,
457  m_field->GetMDates(1,0) -
458  g_date->DayInYear())) {
460  break;
461  }
462  // End Main Thread
463  done=true;
464  break;
465 
466  default:
467  g_msg->Warn( WARN_BUG, "FieldPeas::Do(): "
468  "Unknown event type! ", "" );
469  exit( 1 );
470  }
471 
472  return done;
473 }

References Crop::AphidDamage(), Farm::AutumnPlough(), cfg_fungi_app_prop1, cfg_greg_app_prop, cfg_ins_app_prop1, cfg_strigling_prop, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::FA_Manure(), Farm::FP_Manure(), FPEASS_FUNGI_DATE, FPEASS_INSECT_DATE, FPEASS_WATER_DATE, fpst_autumn_plough, fpst_fertmanure_plant, fpst_fertmanure_stock, fpst_fungicide, fpst_growth_reg, fpst_harvest, fpst_insecticide, fpst_spring_harrow, fpst_spring_plough, fpst_spring_roll, fpst_spring_sow, fpst_start, fpst_straw_chopping, fpst_strigling1, fpst_strigling2, fpst_strigling3, fpst_strigling4, fpst_water_one, fpst_water_two, Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::InsecticideTreat(), 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(), LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::StrawChopping(), Farm::Strigling(), CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void FieldPeasStrigling::SetUpFarmCategoryInformation ( )
inline
71  {
72  const int elements = 2 + (fpst_foobar - FPEASS_BASE);
74 
75  FarmManagementCategory catlist[elements] =
76  {
77  fmc_Others, // zero element unused but must be here
78  fmc_Others, // fpst_start = 1, // Compulsory, start event must always be 1 (one).
79  fmc_Harvest, // fpst_harvest= FPEASS_BASE,
80  fmc_Cultivation, // fpst_autumn_plough,
81  fmc_Cultivation, // fpst_spring_plough,
82  fmc_Cultivation, // fpst_spring_harrow,
83  fmc_Fertilizer, // fpst_fertmanure_plant,
84  fmc_Fertilizer, // fpst_fertmanure_stock,
85  fmc_Others, // fpst_spring_sow,
86  fmc_Cultivation, // fpst_spring_roll,
87  fmc_Cultivation, // fpst_strigling1,
88  fmc_Cultivation, // fpst_strigling2,
89  fmc_Cultivation, // fpst_strigling3,
90  fmc_Cultivation, // fpst_strigling4,
91  fmc_Insecticide, // fpst_insecticide,
92  fmc_Fungicide, // fpst_fungicide,
93  fmc_Watering, // fpst_water_one,
94  fmc_Watering, // fpst_water_two,
95  fmc_Others, // fpst_growth_reg,
96  fmc_Others // fpst_straw_chopping,
97 
98 
99  // no foobar entry
100 
101  };
102  // Iterate over the catlist elements and copy them to vector
103  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
104 
105  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Insecticide, fmc_Others, fmc_Watering, FPEASS_BASE, fpst_foobar, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FieldPeasStrigling().


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
fpst_straw_chopping
Definition: FieldPeasStrigling.h:56
fpst_autumn_plough
Definition: FieldPeasStrigling.h:40
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
fpst_strigling2
Definition: FieldPeasStrigling.h:48
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::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
Farm::Strigling
virtual bool Strigling(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field.
Definition: FarmFuncs.cpp:1206
Farm::Harvest
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: FarmFuncs.cpp:1364
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
fpst_strigling1
Definition: FieldPeasStrigling.h:47
fpst_strigling4
Definition: FieldPeasStrigling.h:50
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
Farm::FA_Manure
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1110
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
fpst_spring_plough
Definition: FieldPeasStrigling.h:41
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
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
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
cfg_strigling_prop
CfgFloat cfg_strigling_prop
FieldPeasStrigling::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FieldPeasStrigling.h:71
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
cfg_fungi_app_prop1
CfgFloat cfg_fungi_app_prop1
fpst_spring_sow
Definition: FieldPeasStrigling.h:45
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
cfg_greg_app_prop
CfgFloat cfg_greg_app_prop
fpst_start
Definition: FieldPeasStrigling.h:38
fpst_water_one
Definition: FieldPeasStrigling.h:53
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
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
fpst_fungicide
Definition: FieldPeasStrigling.h:52
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
fpst_harvest
Definition: FieldPeasStrigling.h:39
FieldPeasSToDo
FieldPeasSToDo
Definition: FieldPeasStrigling.h:37
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
FPEASS_BASE
#define FPEASS_BASE
Definition: FieldPeasStrigling.h:31
FPEASS_FUNGI_DATE
#define FPEASS_FUNGI_DATE
Definition: FieldPeasStrigling.h:34
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
fpst_fertmanure_stock
Definition: FieldPeasStrigling.h:44
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
FPEASS_INSECT_DATE
#define FPEASS_INSECT_DATE
Definition: FieldPeasStrigling.h:33
fpst_insecticide
Definition: FieldPeasStrigling.h:51
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
fpst_spring_roll
Definition: FieldPeasStrigling.h:46
fpst_fertmanure_plant
Definition: FieldPeasStrigling.h:43
fpst_growth_reg
Definition: FieldPeasStrigling.h:55
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
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
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
fpst_strigling3
Definition: FieldPeasStrigling.h:49
fpst_foobar
Definition: FieldPeasStrigling.h:57
fpst_spring_harrow
Definition: FieldPeasStrigling.h:42
FPEASS_WATER_DATE
#define FPEASS_WATER_DATE
Definition: FieldPeasStrigling.h:35
Crop::AphidDamage
bool AphidDamage(LE *a_field)
Compares aphid numbers per m2 with a threshold to return true if threshold is exceeded.
Definition: Farm.cpp:726
fpst_water_two
Definition: FieldPeasStrigling.h:54
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::SpringHarrow
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: FarmFuncs.cpp:459