ALMaSS Vole ODDox  1.1
The vole model description following ODdox protocol
Fodderbeet.cpp
Go to the documentation of this file.
1 //
2 // Fodderbeet.cpp
3 //
4 /*
5 *******************************************************************************************************
6 Copyright (c) 2011, Christopher John Topping, University of Aarhus
7 All rights reserved.
8 
9 Redistribution and use in source and binary forms, with or without modification, are permitted provided
10 that the following conditions are met:
11 
12 Redistributions of source code must retain the above copyright notice, this list of conditions and the
13 following disclaimer.
14 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
15 the following disclaimer in the documentation and/or other materials provided with the distribution.
16 
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
18 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
20 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
22 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 ********************************************************************************************************
26 */
27 
28 #include "../../Landscape/ls.h"
29 #include "../../Landscape/cropprogs/Fodderbeet.h"
30 
31 extern CfgFloat cfg_ins_app_prop1;
32 extern CfgFloat cfg_herbi_app_prop;
33 extern CfgFloat cfg_fungi_app_prop1;
34 extern CfgFloat cfg_greg_app_prop;
35 
36 
37 bool Fodderbeet::Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev )
38 {
39  m_farm = a_farm;
40  m_field = a_field;
41  m_ev = a_ev;
42  // int d1;
43 
44  bool done = false;
45 
46  switch ( m_ev->m_todo )
47  {
48  case fb_start:
49  {
51  FB_DECIDE_TO_FI = 1;
52  m_field->SetVegPatchy(true); // Root crop so is open until tall
53  // Set up the date management stuff
54  // Could save the start day in case it is needed later
55  // m_field->m_startday = m_ev->m_startday;
56  m_last_date=g_date->DayInYear(10,11);
57  // Start and stop dates for all events after harvest
58  int noDates=1;
59  m_field->SetMDates(0,0,g_date->DayInYear(10,10));
60  // 0,0 determined by harvest date - used to see if at all possible
61  m_field->SetMDates(1,0,g_date->DayInYear(10,11));
62  // Check the next crop for early start, unless it is a spring crop
63  // in which case we ASSUME that no checking is necessary!!!!
64  // So DO NOT implement a crop that runs over the year boundary
65 
66  //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)
67  int d1;
68  if(!(m_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber()>0)){
69 
70  if (m_ev->m_startday>g_date->DayInYear(1,7))
71  {
72  if (m_field->GetMDates(0,0) >=m_ev->m_startday)
73  {
74  g_msg->Warn( WARN_BUG, "FodderBeet::Do(): "
75  "Harvest too late for the next crop to start!!!", "" );
76  exit( 1 );
77  }
78  // Now fix any late finishing problems
79  for (int i=0; i<noDates; i++) {
80  if(m_field->GetMDates(0,i)>=m_ev->m_startday) {
81  m_field->SetMDates(0,i,m_ev->m_startday-1); //move the starting date
82  }
83  if(m_field->GetMDates(1,i)>=m_ev->m_startday){
84  m_field->SetMConstants(i,0);
85  m_field->SetMDates(1,i,m_ev->m_startday-1); //move the finishing date
86  }
87  }
88  }
89  // Now no operations can be timed after the start of the next crop.
90 
91  // CJT note:
92  // Start single block date checking code to be cut-'n-pasted...
93 
94  if ( ! m_ev->m_first_year )
95  {
96  // Are we before July 1st?
97  d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
98  if (g_date->Date() < d1)
99  {
100  // Yes, too early. We assumme this is because the last crop was late
101  g_msg->Warn( WARN_BUG, "FodderBeet::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 (g_date->Date() > d1)
109  {
110  // Yes too late - should not happen - raise an error
111  g_msg->Warn( WARN_BUG, "FodderBeet::Do(): "
112  "Crop start attempt after last possible start date", "" );
113  exit( 1 );
114  }
115  }
116  }
117  else
118  {
119  // If this is the first year of running then it is possibel to start
120  // on day 0, so need this to tell us what to do:
121  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,3 ),
122  fb_spring_plough, false );
123  break;
124  }
125  }//if
126 
127  // End single block date checking code. Please see next line
128  // comment as well.
129  // Reinit d1 to first possible starting date.
130  d1 = g_date->OldDays() + g_date->DayInYear( 1,10 ); // Was 1,10
131  if ( g_date->Date() > d1 ) {
132  d1 = g_date->Date();
133  }
134  // OK, let's go.
135  SimpleEvent( d1, fb_autumn_plough, false );
136  }
137  break;
138 
139  case fb_autumn_plough:
140  if ( m_ev->m_lock || m_farm->DoIt( 40 ))
141  {
142  if (!m_farm->AutumnPlough( m_field, 0.0,
143  g_date->DayInYear( 15, 12 ) -
144  g_date->DayInYear())) {
145  SimpleEvent( g_date->Date() + 1, fb_autumn_plough, true );
146  break;
147  }
148  // Did autumn plough, so skip manure and spring plough.
149  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 3 ) + 365,
150  fb_start_threads_one, false );
151  break;
152  }
153  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 3 ) + 365,
154  fb_fertmanure, false );
155  break;
156 
157  case fb_fertmanure:
158  if ( m_ev->m_lock || m_farm->DoIt( 40 ))
159  {
160  if (!m_farm->FA_Manure( m_field, 0.0,
161  g_date->DayInYear( 9,4 ) -
162  g_date->DayInYear())) {
163  SimpleEvent( g_date->Date() + 1, fb_fertmanure, true );
164  break;
165  }
166  }
167  SimpleEvent( g_date->Date(), fb_spring_plough, false );
168  break;
169 
170  case fb_spring_plough:
171  if ( m_ev->m_lock || m_farm->DoIt( 60 ))
172  {
173  if (!m_farm->SpringPlough( m_field, 0.0,
174  g_date->DayInYear( 10,4 ) -
175  g_date->DayInYear())) {
176  SimpleEvent( g_date->Date() + 1, fb_spring_plough, true );
177  break;
178  }
179  }
180  SimpleEvent( g_date->Date() + 1, fb_start_threads_one, false );
181  break;
182 
184  // Today is the 15th of March, at the least.
185  FB_DID_HARROW = false;
186  FB_DID_NPKS_ONE = false;
187  FB_DID_SLURRY = false;
188  FB_SOW_DATE = 0;
189  SimpleEvent( g_date->Date(), fb_spring_harrow, false );
190  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,4 ),
191  fb_fertnpks_one, false );
192  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,4 ),
193  fb_fertslurry, false );
194  break;
195 
196  case fb_spring_harrow:
197  if (!m_farm->SpringHarrow( m_field, 0.0,
198  g_date->DayInYear( 11,4 ) -
199  g_date->DayInYear())) {
200  SimpleEvent( g_date->Date() + 1, fb_spring_harrow, true );
201  break;
202  }
203  FB_DID_HARROW = true;
204  if ( FB_DID_NPKS_ONE && FB_DID_SLURRY ) {
205  // We are the last surviving thread.
206  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,4 ),
207  fb_spring_sow, false );
208  }
209  break;
210 
211  case fb_fertnpks_one:
212  if (!m_farm->FA_NPK( m_field, 0.0,
213  g_date->DayInYear( 5,5 ) -
214  g_date->DayInYear())) {
215  SimpleEvent( g_date->Date() + 1, fb_fertnpks_one, true );
216  break;
217  }
218  FB_DID_NPKS_ONE= true;
219  if ( FB_DID_HARROW && FB_DID_SLURRY ) {
220  // We are the last surviving thread.
221  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,4 ),
222  fb_spring_sow, false );
223  }
224  break;
225 
226  case fb_fertslurry:
227  if (!m_farm->FA_Slurry( m_field, 0.0,
228  g_date->DayInYear( 5,5 ) -
229  g_date->DayInYear())) {
230  SimpleEvent( g_date->Date() + 1, fb_fertslurry, true );
231  break;
232  }
233  FB_DID_SLURRY= true;
234  if ( FB_DID_HARROW && FB_DID_NPKS_ONE ) {
235  // We are the last surviving thread.
236  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,4 ),
237  fb_spring_sow, false );
238  }
239  break;
240 
241  case fb_spring_sow:
242  if (!m_farm->SpringSow( m_field, 0.0,
243  g_date->DayInYear( 1,5 ) -
244  g_date->DayInYear())) {
245  SimpleEvent( g_date->Date() + 1, fb_spring_sow, true );
246  break;
247  }
248  FB_SOW_DATE = g_date->Date();
249  SimpleEvent( g_date->Date(), fb_spring_roll, false );
250  break;
251 
252  case fb_spring_roll:
253  if ( m_ev->m_lock || m_farm->DoIt( 80 ))
254  {
255  if (!m_farm->SpringRoll( m_field, 0.0,
256  g_date->DayInYear( 15,4 ) -
257  g_date->DayInYear())) {
258  SimpleEvent( g_date->Date() + 1, fb_spring_roll, true );
259  break;
260  }
261  }
262  {
263  int d1 = g_date->OldDays() + g_date->DayInYear( 20,4 );
264  if ( d1 < FB_SOW_DATE + 10 ) {
265  d1 = FB_SOW_DATE;
266  }
267  SimpleEvent( d1, fb_herbicide_one, false );
268  }
269  break;
270 
271  case fb_herbicide_one:
272  if ( m_ev->m_lock || m_farm->DoIt( (int) (100*cfg_herbi_app_prop.value() * m_farm->Prob_multiplier()))) //modified probability
273  {
274  //new - for decision making
275  TTypesOfVegetation tov = m_field->GetVegType();
276  if(!m_ev->m_lock && !m_farm->Spraying_herbicides(tov)){
277  Field * pf = dynamic_cast<Field*>(m_field);
278  pf->Add_missed_herb_app();
279  if(m_farm->DoIt(80)) pf->Add_missed_herb_app(); //the 2nd missed application
280  if(m_farm->DoIt(60)) pf->Add_missed_herb_app(); //the 2nd missed application
282  break;
283  } //end of the part for dec. making
284  else{
285  if (!m_farm->HerbicideTreat( m_field, 0.0, g_date->DayInYear( 11,5 ) -g_date->DayInYear())) {
286  SimpleEvent( g_date->Date() + 1, fb_herbicide_one, true );
287  break;
288  }
289  }
290  }
291  {
292  int d1 = g_date->Date() + 7;
293  if ( d1 < g_date->OldDays() + g_date->DayInYear( 2,5 ) ) {
294  d1 = g_date->OldDays() + g_date->DayInYear( 2,5 );
295  }
296  SimpleEvent( d1, fb_herbicide_two, false );
297  }
298  break;
299 
300  case fb_herbicide_two:
301  if ( m_ev->m_lock || m_farm->DoIt( (int) ( 80*cfg_herbi_app_prop.value() * FB_DECIDE_TO_HERB * m_farm->Prob_multiplier()))) //modified probability
302  {
303  if (!m_farm->HerbicideTreat( m_field, 0.0,
304  g_date->DayInYear( 18,5 ) -
305  g_date->DayInYear())) {
306  SimpleEvent( g_date->Date() + 1, fb_herbicide_two, true );
307  break;
308  }
309  }
310  {
311  int d1 = g_date->Date() + 7;
312  if ( d1 < g_date->OldDays() + g_date->DayInYear( 10,5 ) ) {
313  d1 = g_date->OldDays() + g_date->DayInYear( 10,5 );
314  }
315  SimpleEvent( g_date->DayInYear() + 14, fb_herbicide_three, false );
316  SimpleEvent( d1, fb_row_cultivation_one, false );
317 
318  }
319  break;
320 
321  case fb_herbicide_three:
322  if ( m_ev->m_lock || m_farm->DoIt( (int) ( 60*cfg_herbi_app_prop.value() * FB_DECIDE_TO_HERB * m_farm->Prob_multiplier()))) //modified probability
323  {
324  if (!m_farm->HerbicideTreat( m_field, 0.0,
325  g_date->DayInYear( 18,5 ) -
326  g_date->DayInYear())) {
327  SimpleEvent( g_date->Date() + 1, fb_herbicide_two, true );
328  break;
329  }
330  }
331  break;
332 
334  if ( m_ev->m_lock || m_farm->DoIt( 10 ))
335  {
336  if (!m_farm->RowCultivation( m_field, 0.0,
337  g_date->DayInYear( 25,5 ) -
338  g_date->DayInYear())) {
339  SimpleEvent( g_date->Date() + 1, fb_row_cultivation_one, true );
340  break;
341  }
342  // Did first row cultivation, queue up the second too.
343  FB_DID_ROW_TWO = false;
344  {
345  int d1 = g_date->Date() + 7;
346  if ( d1 < g_date->OldDays() + g_date->DayInYear( 17,5 ) ) {
347  d1 = g_date->OldDays() + g_date->DayInYear( 17,5 );
348  }
349  SimpleEvent( d1, fb_row_cultivation_two, false );
350  }
351  } else {
352  // Didn't do row cultivation on this field. Signal already done.
353  FB_DID_ROW_TWO = true;
354  }
355  FB_DID_INSECT_ONE = false;
356  FB_DID_NPKS_TWO = false;
357  FB_DID_WATER_ONE = false;
358  FB_TRULY_DID_WATER_ONE = false;
359  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,5 ),
360  fb_insecticide_one, false );
361  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
362  fb_fertnpks_two, false );
363  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,7 ),
364  fb_water_one, false );
365  break;
366 
368  if (!m_farm->RowCultivation( m_field, 0.0,
369  g_date->DayInYear( 15,6 ) -
370  g_date->DayInYear())) {
371  SimpleEvent( g_date->Date() + 1, fb_row_cultivation_two, true );
372  break;
373  }
374  FB_DID_ROW_TWO = true;
375  if ( FB_DID_INSECT_ONE &&
376  FB_DID_NPKS_TWO &&
378  ) {
379  // We are the last surviving thread.
380  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 8,6 ),
381  fb_insecticide_two, false );
382  }
383  break;
384 
385  case fb_insecticide_one:
386  if ( m_ev->m_lock || m_farm->DoIt( (int) (50*cfg_ins_app_prop1.value() * m_farm->Prob_multiplier()))) // was 90 //modified probability
387  {
388  //new - for decision making
389  TTypesOfVegetation tov = m_field->GetVegType();
390  if(!m_ev->m_lock && !m_farm->Spraying_fungins(tov)){
391  Field * pf = dynamic_cast<Field*>(m_field);
392  pf->Add_missed_fi_app();
393  if(m_farm->DoIt(81)) pf->Add_missed_fi_app(); //the 2nd missed application
394  FB_DECIDE_TO_FI=0;
395  } //end of the part for dec. making
396  else{
397  if (!m_farm->InsecticideTreat( m_field, 0.0,g_date->DayInYear( 1,6 ) - g_date->DayInYear())) {
398  SimpleEvent( g_date->Date() + 1, fb_insecticide_one, true );
399  break;
400  }
401  }
402  }
403  FB_DID_INSECT_ONE = true;
404  if ( FB_DID_ROW_TWO &&
405  FB_DID_NPKS_TWO &&
407  ) {
408  // We are the last surviving thread.
409  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 8,6 ),
410  fb_insecticide_two, false );
411  }
412  break;
413 
414  case fb_fertnpks_two:
415  if ( m_ev->m_lock || m_farm->DoIt( 40 ))
416  {
417  if (!m_farm->FA_NPK( m_field, 0.0,
418  g_date->DayInYear( 15,6 ) -
419  g_date->DayInYear())) {
420  SimpleEvent( g_date->Date() + 1, fb_fertnpks_two, true );
421  break;
422  }
423  }
424  FB_DID_NPKS_TWO = true;
425  if ( FB_DID_ROW_TWO &&
428  ) {
429  // We are the last surviving thread.
430  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 8,6 ),
431  fb_insecticide_two, false );
432  }
433  break;
434 
435  case fb_water_one:
436  if ( m_ev->m_lock || m_farm->DoIt( 25 ))
437  {
438  if (!m_farm->Water( m_field, 0.0,
439  g_date->DayInYear( 30,7 ) -
440  g_date->DayInYear())) {
441  SimpleEvent( g_date->Date() + 1, fb_water_one, true );
442  break;
443  }
444  FB_TRULY_DID_WATER_ONE = true;
445  }
446  FB_DID_WATER_ONE = true;
447  if ( FB_DID_ROW_TWO &&
450  ) {
451  // We are the last surviving thread.
452  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 8,6 ),
453  fb_insecticide_two, false );
454  }
455  break;
456 
457  case fb_insecticide_two:
458  if ( m_ev->m_lock || m_farm->DoIt( (int) (30*cfg_ins_app_prop1.value()*FB_DECIDE_TO_FI * m_farm->Prob_multiplier()))) //modified probability
459  {
460  if (!m_farm->InsecticideTreat( m_field, 0.0,
461  g_date->DayInYear( 25,6 ) -
462  g_date->DayInYear())) {
463  SimpleEvent( g_date->Date() + 1, fb_insecticide_two, true );
464  break;
465  }
466  }
467  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
468  fb_water_two, false );
469  break;
470 
471  case fb_water_two:
473  {
474  if (!m_farm->Water( m_field, 0.0,
475  g_date->DayInYear( 30,8 ) -
476  g_date->DayInYear())) {
477  SimpleEvent( g_date->Date() + 1, fb_water_two, true );
478  break;
479  }
480  }
481  ChooseNextCrop (1);
482  SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,10 ),
483  fb_harvest, false );
484  break;
485 
486  case fb_harvest:
487  if (m_field->GetMConstants(0)==0) {
488  if (!m_farm->Harvest( m_field, 0.0, -1)) { //raise an error
489  g_msg->Warn( WARN_BUG, "Fodderbeet::Do(): failure in 'Harvest' execution", "" );
490  exit( 1 );
491  }
492  }
493  else {
494  if (!m_farm->Harvest( m_field, 0.0, m_field->GetMDates(1,0) - g_date->DayInYear())) {
495  SimpleEvent( g_date->Date() + 1, fb_harvest, true );
496  break;
497  }
498  }
499  m_field->SetVegPatchy(false);
500  done = true;
501  break;
502 
503  default:
504  g_msg->Warn( WARN_BUG, "Fodderbeet::Do(): "
505  "Unknown event type! ", "" );
506  exit( 1 );
507  }
508 
509  return done;
510 }
511 
512 
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:525
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:965
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:444
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: farmfuncs.cpp:1156
fb_fertnpks_one
Definition: Fodderbeet.h:53
Fodderbeet::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Fodderbeet.cpp:37
Farm::Harvest
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: farmfuncs.cpp:1769
FarmEvent::m_lock
bool m_lock
Definition: farm.h:465
cfg_fungi_app_prop1
CfgFloat cfg_fungi_app_prop1
cfg_ins_app_prop1
CfgFloat cfg_ins_app_prop1
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
fb_fertnpks_two
Definition: Fodderbeet.h:63
FarmEvent::m_first_year
bool m_first_year
Definition: farm.h:467
tof_OptimisingFarm
Definition: farm.h:273
FB_SOW_DATE
#define FB_SOW_DATE
Definition: Fodderbeet.h:36
FB_DID_SLURRY
#define FB_DID_SLURRY
Definition: Fodderbeet.h:35
FB_DID_NPKS_ONE
#define FB_DID_NPKS_ONE
Definition: Fodderbeet.h:34
FB_TRULY_DID_WATER_ONE
#define FB_TRULY_DID_WATER_ONE
Definition: Fodderbeet.h:42
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:1036
fb_spring_harrow
Definition: Fodderbeet.h:52
fb_fertslurry
Definition: Fodderbeet.h:54
Farm::GetType
TTypesOfFarm GetType(void)
Definition: farm.h:901
fb_spring_sow
Definition: Fodderbeet.h:55
FB_DECIDE_TO_FI
#define FB_DECIDE_TO_FI
Definition: Fodderbeet.h:44
Crop::m_first_date
int m_first_date
Definition: farm.h:540
FarmEvent::m_startday
int m_startday
Definition: farm.h:466
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:917
cfg_herbi_app_prop
CfgFloat cfg_herbi_app_prop
fb_insecticide_one
Definition: Fodderbeet.h:62
fb_herbicide_two
Definition: Fodderbeet.h:58
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: farm.cpp:307
fb_spring_plough
Definition: Fodderbeet.h:50
fb_herbicide_three
Definition: Fodderbeet.h:59
Farm::Prob_multiplier
virtual double Prob_multiplier()
Definition: farm.h:786
fb_harvest
Definition: Fodderbeet.h:67
TTypesOfVegetation
TTypesOfVegetation
Definition: tov_declaration.h:30
FB_DID_INSECT_ONE
#define FB_DID_INSECT_ONE
Definition: Fodderbeet.h:39
Farm::Spraying_herbicides
virtual bool Spraying_herbicides(TTypesOfVegetation)
Definition: farm.h:784
fb_insecticide_two
Definition: Fodderbeet.h:65
FB_DID_ROW_TWO
#define FB_DID_ROW_TWO
Definition: Fodderbeet.h:38
FB_DID_HARROW
#define FB_DID_HARROW
Definition: Fodderbeet.h:33
fb_autumn_plough
Definition: Fodderbeet.h:48
Crop::m_farm
Farm * m_farm
Definition: farm.h:537
Crop::m_field
LE * m_field
Definition: farm.h:538
fb_row_cultivation_one
Definition: Fodderbeet.h:60
fb_start_threads_one
Definition: Fodderbeet.h:51
FarmEvent::m_todo
int m_todo
Definition: farm.h:469
Farm::InsecticideTreat
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: farmfuncs.cpp:1348
FB_DID_NPKS_TWO
#define FB_DID_NPKS_TWO
Definition: Fodderbeet.h:40
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:1510
Farm::Water
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: farmfuncs.cpp:1717
Crop::m_last_date
int m_last_date
Definition: farm.h:542
fb_spring_roll
Definition: Fodderbeet.h:56
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:132
Farm::SpringSow
virtual bool SpringSow(LE *a_field, double a_user, int a_days)
Carry out a sowing event in the spring on a_field.
Definition: farmfuncs.cpp:546
Farm
The base class for all farm types.
Definition: farm.h:767
fb_row_cultivation_two
Definition: Fodderbeet.h:61
FB_DECIDE_TO_HERB
#define FB_DECIDE_TO_HERB
Definition: Fodderbeet.h:43
fb_fertmanure
Definition: Fodderbeet.h:49
fb_water_one
Definition: Fodderbeet.h:64
FB_DID_WATER_ONE
#define FB_DID_WATER_ONE
Definition: Fodderbeet.h:41
fb_water_two
Definition: Fodderbeet.h:66
Crop::ChooseNextCrop
void ChooseNextCrop(int a_no_dates)
Chooses the next crop to grow in a field.
Definition: farm.cpp:318
Crop::m_ev
FarmEvent * m_ev
Definition: farm.h:539
fb_herbicide_one
Definition: Fodderbeet.h:57
cfg_greg_app_prop
CfgFloat cfg_greg_app_prop
Farm::Spraying_fungins
virtual bool Spraying_fungins(TTypesOfVegetation)
Definition: farm.h:785
fb_start
Definition: Fodderbeet.h:47
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:471