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

#include <FieldPeasSilage.h>

Inheritance diagram for FieldPeasSilage:
Crop

Public Member Functions

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

◆ FieldPeasSilage()

FieldPeasSilage::FieldPeasSilage ( 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 FieldPeasSilage::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  double ins_app_prop=cfg_ins_app_prop1.value();
43  double herbi_app_prop=cfg_herbi_app_prop.value();
44 
45  bool done = false;
46 
47  switch ( m_ev->m_todo )
48  {
49  case fpsi_start:
50  {
55  a_field->ClearManagementActionSum();
56 
57  // Set up the date management stuff
58  // Could save the start day in case it is needed later
59  // m_field->m_startday = m_ev->m_startday;
61  // Start and stop dates for all events after harvest
62  int noDates=1;
63  m_field->SetMDates(0,0,g_date->DayInYear(30,8));
64  // 0,0 determined by harvest date - used to see if at all possible
65  m_field->SetMDates(1,0,g_date->DayInYear(30,8));
66  // Check the next crop for early start, unless it is a spring crop
67  // in which case we ASSUME that no checking is necessary!!!!
68  // So DO NOT implement a crop that runs over the year boundary
69 
70  //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)
71  int d1;
73 
74  if (m_ev->m_startday>g_date->DayInYear(1,7))
75  {
76  if (m_field->GetMDates(0,0) >=m_ev->m_startday)
77  {
78  //g_msg->Warn( WARN_BUG, "FieldPeas::Do(): Harvest too late for the next crop to start!!!", "" );
79 
80  char veg_type[ 20 ];
81  sprintf( veg_type, "%d", m_ev->m_next_tov );
82  g_msg->Warn( WARN_FILE, "FieldPeas::Do(): Harvest too late for the next crop to start!!! The next crop is: ", veg_type );
83 
84  exit( 1 );
85  }
86  // Now fix any late finishing problems
87  for (int i=0; i<noDates; i++) {
88  if(m_field->GetMDates(0,i)>=m_ev->m_startday) {
89  m_field->SetMDates(0,i,m_ev->m_startday-1); //move the starting date
90  }
91  if(m_field->GetMDates(1,i)>=m_ev->m_startday){
92  m_field->SetMConstants(i,0);
93  m_field->SetMDates(1,i,m_ev->m_startday-1); //move the finishing date
94  }
95  }
96  }
97  // Now no operations can be timed after the start of the next crop.
98 
99  // CJT note:
100  // Start single block date checking code to be cut-'n-pasted...
101 
102  if ( ! m_ev->m_first_year )
103  {
104  // Are we before July 1st?
105  d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
106  if (g_date->Date() < d1)
107  {
108  // Yes, too early. We assumme this is because the last crop was late
109  g_msg->Warn( WARN_BUG, "FieldPeasSilage::Do(): "
110  "Crop start attempt between 1st Jan & 1st July", "" );
111  exit( 1 );
112  }
113  else
114  {
115  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
116  if (g_date->Date() > d1)
117  {
118  // Yes too late - should not happen - raise an error
119  g_msg->Warn( WARN_BUG, "FieldPeasSilage::Do(): Crop start attempt after last possible start date", "" );
120  exit( 1 );
121  }
122  }
123  }
124  else
125  {
126  // If this is the first year of running then it is possible to start
127  // on day 0, so need this to tell us what to do:
128  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,3 ),
129  fpsi_spring_plough, false );
130  break;
131  }
132  }//if
133 
134  // End single block date checking code. Please see next line
135  // comment as well.
136  // Reinit d1 to first possible starting date.
137  d1 = g_date->OldDays() + g_date->DayInYear( 1,10 );
138  if ( g_date->Date() > d1 ) {
139  d1 = g_date->Date();
140  }
141  // OK, let's go.
142  SimpleEvent( d1, fpsi_autumn_plough, false );
143  }
144  break;
145 
146  case fpsi_autumn_plough:
147  if ( m_ev->m_lock || m_farm->DoIt( 90 )) {
148  if (!m_farm->AutumnPlough( m_field, 0.0,
149  g_date->DayInYear( 1, 12 ) -
150  g_date->DayInYear())) {
151  SimpleEvent( g_date->Date() + 1, fpsi_autumn_plough, true );
152  break;
153  }
154  }
155  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,3 ) + 365,
156  fpsi_spring_plough, false );
157  break;
158 
159  case fpsi_spring_plough:
160  if ( m_ev->m_lock || m_farm->DoIt( 100 )) {
161  if (!m_farm->SpringPlough( m_field, 0.0,
162  g_date->DayInYear( 1,4 ) -
163  g_date->DayInYear())) {
164  SimpleEvent( g_date->Date() + 1, fpsi_spring_plough, true );
165  break;
166  }
167  }
168  {
169  int d1 = g_date->Date()+1;
170  int d2 = g_date->OldDays() + g_date->DayInYear( 5,3 );
171  if ( d1 < d2 ) {
172  d1 = d2;
173  }
174  SimpleEvent( d1, fpsi_spring_harrow, false );
175  }
176  break;
177 
178  case fpsi_spring_harrow:
179  if (!m_farm->SpringHarrow( m_field, 0.0,
180  g_date->DayInYear( 5,4 ) - g_date->DayInYear())) {
181  SimpleEvent( g_date->Date() + 1, fpsi_spring_harrow, true );
182  break;
183  }
184  {
186  if ( m_farm->IsStockFarmer()) {
187  dothis = fpsi_fertmanure_stock;
188  }
189 
190  int d1 = g_date->Date();
191  int d2 = g_date->OldDays() + g_date->DayInYear( 20,3 );
192  if ( d1 < d2 ) {
193  d1 = d2;
194  }
195  SimpleEvent( d1, dothis, false );
196  }
197  break;
198 
200  if (!m_farm->FP_Manure( m_field, 0.0,
201  g_date->DayInYear( 15,4 ) -
202  g_date->DayInYear())) {
203  SimpleEvent( g_date->Date() + 1, fpsi_fertmanure_plant, true );
204  break;
205  }
206  {
207  int d1 = g_date->Date();
208  int d2 = g_date->OldDays() + g_date->DayInYear( 25,3 );
209  if ( d1 < d2 ) {
210  d1 = d2;
211  }
212  SimpleEvent( d1, fpsi_spring_sow, false );
213  }
214  break;
215 
217  if ( m_ev->m_lock || m_farm->DoIt( 75 )) {
218  if (!m_farm->FA_Manure( m_field, 0.0,
219  g_date->DayInYear( 15,4 ) -
220  g_date->DayInYear())) {
221  SimpleEvent( g_date->Date() + 1, fpsi_fertmanure_stock, true );
222  break;
223  }
224  }
225  {
226  int d1 = g_date->Date();
227  int d2 = g_date->OldDays() + g_date->DayInYear( 25,3 );
228  if ( d1 < d2 ) {
229  d1 = d2;
230  }
231  SimpleEvent( d1, fpsi_spring_sow, false );
232  }
233  break;
234 
235  case fpsi_spring_sow:
236  if (!m_farm->SpringSow( m_field, 0.0,
237  g_date->DayInYear( 15,4 ) -
238  g_date->DayInYear())) {
239  SimpleEvent( g_date->Date() + 1, fpsi_spring_sow, true );
240  break;
241  }
242  SimpleEvent( g_date->Date(), fpsi_spring_roll, false );
243  break;
244 
245  case fpsi_spring_roll:
246  if (!m_farm->SpringRoll( m_field, 0.0,
247  g_date->DayInYear( 15,4 ) -
248  g_date->DayInYear())) {
249  SimpleEvent( g_date->Date() + 1, fpsi_spring_roll, true );
250  break;
251  }
252  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,4 ),
253  fpsi_herbicide_one, false );
254  break;
255 
256  case fpsi_herbicide_one:
257  if ( m_ev->m_lock || m_farm->DoIt( (int) (100*herbi_app_prop * m_farm->Prob_multiplier()))) { //modified probability
258 
259  if (!m_farm->HerbicideTreat( m_field, 0.0, g_date->DayInYear( 20,4 ) - g_date->DayInYear())) {
260  SimpleEvent( g_date->Date() + 1, fpsi_herbicide_one, true );
261  break;
262  }
263  }
264  {
265  int d1 = g_date->OldDays() + g_date->DayInYear( 25,4 );
266  if ( d1 < g_date->Date() + 7 ) {
267  d1 = g_date->Date() + 7;
268  }
269  SimpleEvent( d1, fpsi_herbicide_two, false );
270  }
271  break;
272 
273  case fpsi_herbicide_two:
274  if ( m_ev->m_lock || m_farm->DoIt( (int) (95*herbi_app_prop *FPEASSI_DECIDE_TO_HERB * m_farm->Prob_multiplier()))) { //modified probability
275  if (!m_farm->HerbicideTreat( m_field, 0.0,
276  g_date->DayInYear( 10,5 ) -
277  g_date->DayInYear())) {
278  SimpleEvent( g_date->Date() + 1, fpsi_herbicide_two, true );
279  break;
280  }
281  }
282  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
283  fpsi_insecticide, false );
284  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
285  fpsi_fungicide, false );
286 
287  // Water carries the main thread.
288  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
289  fpsi_water_one, false );
290  break;
291 
292  case fpsi_fungicide:
293  if ( m_ev->m_lock || m_farm->DoIt( (int)( 10*cfg_fungi_app_prop1.value() ))) {
294 
295 
296  // Check for proximity of watering.
297  {
298  int d1 = g_date->Date();
299  if ( d1 < FPEADSI_WATER_DATE + 2 ) {
300  // Too close, try tomorrow.
301  SimpleEvent( g_date->Date() + 1, fpsi_fungicide, true );
302  break;
303  }
304  }
305  if (!m_farm->FungicideTreat( m_field, 0.0, g_date->DayInYear( 15,6 ) - g_date->DayInYear())) {
306  SimpleEvent( g_date->Date() + 1, fpsi_fungicide, true );
307  break;
308  }
310  }
311  // End of thread.
312  break;
313 
314  case fpsi_insecticide:
315  if ( m_ev->m_lock || m_farm->DoIt( (int) (90*ins_app_prop )) || AphidDamage(m_field)) {
316  {
317  int d1 = g_date->Date();
318  if ( d1 < FPEADSI_WATER_DATE + 2 ) {
319  // Too close, try tomorrow.
320  SimpleEvent( g_date->Date() + 1, fpsi_insecticide, true );
321  break;
322  }
323  }
324  if (!m_farm->InsecticideTreat( m_field, 0.0,
325  g_date->DayInYear( 15,6 ) -
326  g_date->DayInYear())) {
327  SimpleEvent( g_date->Date() + 1, fpsi_insecticide, true );
328  break;
329  }
331  }
332  // End of thread.
333  break;
334 
335  case fpsi_water_one:
336  if ( m_ev->m_lock || m_farm->DoIt( 30 ))
337  {
338  {
339  int d1 = g_date->Date();
340  if ( d1 < FPEADSI_INSECT_DATE + 2 ||
341  d1 < FPEADSI_FUNGI_DATE + 2 ) {
342  // Too close, try tomorrow.
343  SimpleEvent( g_date->Date() + 1, fpsi_water_one, true );
344  break;
345  }
346  }
347  if (!m_farm->Water( m_field, 0.0,
348  g_date->DayInYear( 15,6 ) - g_date->DayInYear())) {
349  SimpleEvent( g_date->Date() + 1, fpsi_water_one, true );
350  break;
351  }
353  // Did first water, so do the second one too.
354  {
355  int d1 = g_date->OldDays() + g_date->DayInYear( 16,6 );
356  if ( d1 < g_date->Date() + 7 ) {
357  d1 = g_date->Date() + 7;
358  }
359  SimpleEvent( d1, fpsi_water_two, false );
360  }
361  }
362  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,8 ),
363  fpsi_growth_reg, false );
364  break;
365 
366  case fpsi_water_two:
367  {
368  int d1 = g_date->Date();
369  if ( d1 < FPEADSI_INSECT_DATE + 2 ||
370  d1 < FPEADSI_FUNGI_DATE + 2 ) {
371  // Too close, try tomorrow.
372  SimpleEvent( g_date->Date() + 1, fpsi_water_two, true );
373  break;
374  }
375  }
376  if (!m_farm->Water( m_field, 0.0,
377  g_date->DayInYear( 1,7 ) -
378  g_date->DayInYear())) {
379  SimpleEvent( g_date->Date() + 1, fpsi_water_two, true );
380  break;
381  }
383  // End of thread.
384  break;
385 
386  case fpsi_growth_reg:
387  if ( m_ev->m_lock || m_farm->DoIt( (int) (20*cfg_greg_app_prop.value() )))
388  {
389  if (!m_farm->GrowthRegulator( m_field, 0.0,
390  g_date->DayInYear( 20,8 ) -
391  g_date->DayInYear())) {
392  SimpleEvent( g_date->Date() + 1, fpsi_growth_reg, true );
393  break;
394  }
395  // Did apply growth regulator, so wait seven days before
396  // harvesting.
397 
398  ChooseNextCrop (1);
399  SimpleEvent( g_date->Date()+7, fpsi_harvest, false );
400  break;
401  }
402  // No growth regulator, try harvesting today.
403 
404  ChooseNextCrop (1);
405  SimpleEvent( g_date->Date(), fpsi_harvest, false );
406  break;
407 
408  case fpsi_harvest:
409  if (!m_farm->Harvest( m_field, 0.0,
410  g_date->DayInYear( 30,8 ) -
411  g_date->DayInYear())) {
412  SimpleEvent( g_date->Date() + 1, fpsi_harvest, true );
413  break;
414  }
416  break;
417 
418  case fpsi_straw_chopping:
419  if (m_field->GetMConstants(0)==0) {
420  if (!m_farm->StrawChopping( m_field, 0.0, -1)) { //raise an error
421  g_msg->Warn( WARN_BUG, "FieldPeas::Do(): failure in 'StrawChopping' execution", "" );
422  exit( 1 );
423  }
424  }
425  else {
426  if (!m_farm->StrawChopping( m_field, 0.0, m_field->GetMDates(1,0) - g_date->DayInYear())) {
428  break;
429  }
430  }
431  // End Main Thread
432  done=true;
433  break;
434 
435  default:
436  g_msg->Warn( WARN_BUG, "FieldPeas::Do(): "
437  "Unknown event type! ", "" );
438  exit( 1 );
439  }
440 
441  return done;
442 }

References Crop::AphidDamage(), Farm::AutumnPlough(), 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::FP_Manure(), FPEADSI_FUNGI_DATE, FPEADSI_INSECT_DATE, FPEADSI_WATER_DATE, FPEASSI_DECIDE_TO_HERB, fpsi_autumn_plough, fpsi_fertmanure_plant, fpsi_fertmanure_stock, fpsi_fungicide, fpsi_growth_reg, fpsi_harvest, fpsi_herbicide_one, fpsi_herbicide_two, fpsi_insecticide, fpsi_spring_harrow, fpsi_spring_plough, fpsi_spring_roll, fpsi_spring_sow, fpsi_start, fpsi_straw_chopping, fpsi_water_one, fpsi_water_two, Farm::FungicideTreat(), g_date, g_msg, LE::GetMConstants(), LE::GetMDates(), Farm::GetType(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HerbicideTreat(), 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_next_tov, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), Farm::Prob_multiplier(), LE::SetMConstants(), LE::SetMDates(), Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::StrawChopping(), tof_OptimisingFarm, CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, WARN_FILE, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void FieldPeasSilage::SetUpFarmCategoryInformation ( )
inline
71  {
72  const int elements = 2 + (fpsi_foobar - FPEASSI_BASE);
74 
75  FarmManagementCategory catlist[elements] =
76  {
77  fmc_Others, // zero element unused but must be here
78  fmc_Others, // fpsi_start = 1, // Compulsory, start event must always be 1 (one).
79  fmc_Harvest, // fpsi_harvest= FPEASSI_BASE,
80  fmc_Cultivation, // fpsi_autumn_plough,
81  fmc_Cultivation, // fpsi_spring_plough,
82  fmc_Cultivation, // fpsi_spring_harrow,
83  fmc_Fertilizer, // fpsi_fertmanure_plant,
84  fmc_Fertilizer, // fpsi_fertmanure_stock,
85  fmc_Others, // fpsi_spring_sow,
86  fmc_Cultivation, // fpsi_spring_roll,
87  fmc_Herbicide, // fpsi_herbicide_one,
88  fmc_Herbicide, // fpsi_herbicide_two,
89  fmc_Insecticide, // fpsi_insecticide,
90  fmc_Fungicide, // fpsi_fungicide,
91  fmc_Watering, // fpsi_water_one,
92  fmc_Watering, // fpsi_water_two,
93  fmc_Others, // fpsi_growth_reg,
94  fmc_Others// fpsi_straw_chopping,
95 
96 
97  // no foobar entry
98 
99  };
100  // Iterate over the catlist elements and copy them to vector
101  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
102 
103  }

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

Referenced by FieldPeasSilage().


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
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
WARN_FILE
Definition: MapErrorMsg.h:37
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
fpsi_autumn_plough
Definition: FieldPeasSilage.h:42
cfg_greg_app_prop
CfgFloat cfg_greg_app_prop
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
fpsi_insecticide
Definition: FieldPeasSilage.h:51
fpsi_spring_harrow
Definition: FieldPeasSilage.h:44
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
fpsi_spring_plough
Definition: FieldPeasSilage.h:43
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
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
fpsi_herbicide_two
Definition: FieldPeasSilage.h:50
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
FPEASSI_BASE
#define FPEASSI_BASE
Definition: FieldPeasSilage.h:31
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
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
fpsi_growth_reg
Definition: FieldPeasSilage.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
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
fpsi_herbicide_one
Definition: FieldPeasSilage.h:49
Farm::Prob_multiplier
virtual double Prob_multiplier()
Definition: Farm.h:778
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
fpsi_harvest
Definition: FieldPeasSilage.h:41
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
fpsi_fungicide
Definition: FieldPeasSilage.h:52
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
fpsi_water_two
Definition: FieldPeasSilage.h:54
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
fpsi_spring_sow
Definition: FieldPeasSilage.h:47
fpsi_foobar
Definition: FieldPeasSilage.h:57
cfg_fungi_app_prop1
CfgFloat cfg_fungi_app_prop1
FPEADSI_FUNGI_DATE
#define FPEADSI_FUNGI_DATE
Definition: FieldPeasSilage.h:34
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
fpsi_spring_roll
Definition: FieldPeasSilage.h:48
fpsi_fertmanure_stock
Definition: FieldPeasSilage.h:46
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
Crop::m_ManagementCategories
vector< FarmManagementCategory > m_ManagementCategories
Holds the translation between the farm operation enum for each crop and the farm management category ...
Definition: Farm.h:530
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
fpsi_start
Definition: FieldPeasSilage.h:40
fpsi_straw_chopping
Definition: FieldPeasSilage.h:56
FPEADSI_WATER_DATE
#define FPEADSI_WATER_DATE
Definition: FieldPeasSilage.h:35
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
fpsi_fertmanure_plant
Definition: FieldPeasSilage.h:45
FPEASSI_DECIDE_TO_HERB
#define FPEASSI_DECIDE_TO_HERB
Definition: FieldPeasSilage.h:36
FieldPeasSilageToDo
FieldPeasSilageToDo
Definition: FieldPeasSilage.h:39
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
fpsi_water_one
Definition: FieldPeasSilage.h:53
FPEADSI_INSECT_DATE
#define FPEADSI_INSECT_DATE
Definition: FieldPeasSilage.h:33
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
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
FieldPeasSilage::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FieldPeasSilage.h:71
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
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
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