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

FI_Caraway1 class
. More...

#include <FI_Caraway1.h>

Inheritance diagram for FI_Caraway1:
Crop

Public Member Functions

virtual bool Do (Farm *a_farm, LE *a_field, FarmEvent *a_ev)
 The one and only method for a crop management plan. All farm actions go through here. More...
 
 FI_Caraway1 (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...
 

Detailed Description

FI_Caraway1 class
.

See FI_Caraway1.h::FI_Caraway1ToDo for a complete list of all possible events triggered codes by the Caraway1 management plan. When triggered these events are handled by Farm and are available as information for other objects such as animal and bird models.

Constructor & Destructor Documentation

◆ FI_Caraway1()

FI_Caraway1::FI_Caraway1 ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
101  : Crop(a_tov, a_toc, a_L)
102  {
103  // When we start it off, the first possible date for a farm operation is 1st October
104  // This information is used by other crops when they decide how much post processing of
105  // the management is allowed after harvest before the next crop starts.
106  m_first_date=g_date->DayInYear( 1,12 );
108  }

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

Member Function Documentation

◆ Do()

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

The one and only method for a crop management plan. All farm actions go through here.

Called every time something is done to the crop by the farmer in the first instance it is always called with a_ev->todo set to start, but susequently will be called whenever the farmer wants to carry out a new operation.
This method details all the management and relationships between operations necessary to grow and ALMaSS crop - in this case conventional Caraway1.

Reimplemented from Crop.

99 {
100  m_field = a_field; // this is needed because of possible calls to other methods and currently we do not pass parameters.
101  m_farm = a_farm; // this is needed because of possible calls to other methods and currently we do not pass parameters.
102  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
103  int d1 = 0;
104  m_ev = a_ev;
106  int l_nextcropstartdate;
107  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
108  switch (a_ev->m_todo)
109  {
110  case fi_cw1_start:
111  {
112  a_field->ClearManagementActionSum();
113 
114  m_last_date = g_date->DayInYear(5, 10); // Should match the last flexdate below
115  //Create a 2d array of 1 plus the number of operations you use. Change only 4+1 to what you need in the line below
116  std::vector<std::vector<int>> flexdates(2 + 1, std::vector<int>(2, 0));
117  // Set up the date management stuff
118  // Start and stop dates for all events after harvest
119  flexdates[0][1] = g_date->DayInYear(30, 9); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use
120  // Now these are done in pairs, start & end for each operation. If its not used then -1
121  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
122  flexdates[1][1] = g_date->DayInYear(5, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
123  flexdates[2][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 2 (start op 2)
124  flexdates[2][1] = g_date->DayInYear(5, 10); // This date will be moved back as far as necessary and potentially to flexdates 2 (end op 2)
125 
126  // Below if this is a spring crop use 365, otherwise first parameter is always 0, second parameter is fixed, and the third is the start up operation in the first year
127  int isSpring = 0;
128  if (StartUpCrop(isSpring, flexdates, int(fi_cw1_sleep_all_day))) break;
129 
130  // End single block date checking code. Please see next line comment as well.
131  // Reinit d1 to first possible starting date.
132  d1 = g_date->OldDays() + g_date->DayInYear(1, 8);
133  // OK, let's go.
134  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
135  if (m_ev->m_forcespring) {
136  int day_num_shift = 365;
137  if (g_date->DayInYear() < 70) day_num_shift = 0;
138  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + day_num_shift, fi_cw1_sleep_all_day, false);
139  break;
140  }
141  else SimpleEvent(d1, fi_cw1_herbicide1, false);
142  break;
143  }
144  break;
145 
146  // This is the first real farm operation - LKM: 70% do herbicide
147  case fi_cw1_herbicide1:
148  if (a_ev->m_lock || a_farm->DoIt_prob(0.70)) {
149  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear())) {
150  SimpleEvent(g_date->Date() + 1, fi_cw1_herbicide1, true);
151  break;
152  }
153  SimpleEvent(g_date->Date() + 21, fi_cw1_winter_plough, false);
154  break;
155  }
156  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 9), fi_cw1_winter_plough, false);
157  break;
159  if (a_ev->m_lock || a_farm->DoIt_prob(.50)) {
160  if (!a_farm->WinterPlough(a_field, 0.0, g_date->DayInYear(30, 9) - g_date->DayInYear())) {
162  break;
163  }
164  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 3) + 365, fi_cw1_sleep_all_day, false);
165  break;
166  }
167  else if (a_ev->m_lock || a_farm->DoIt_prob(.30 / .50)) {
169  break;
170  }
171  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, fi_cw1_slurry_sp, false);
172  break;
174  if (!a_farm->ShallowHarrow(a_field, 0.0, g_date->DayInYear(30, 9) - g_date->DayInYear())) {
176  break;
177  }
178  // Queue up the next event - in this case sleep all day in the beginning of next year
180  break;
182  if (a_ev->m_lock || a_farm->DoIt(100)) {
183  if (!a_farm->SleepAllDay(a_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
185  break;
186  }
187  }
189  break;
190  case fi_cw1_slurry:
191  if (a_ev->m_lock || a_farm->DoIt(15)) {
192  if (!a_farm->FA_Slurry(a_field, 0.0,
193  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
194  SimpleEvent(g_date->Date() + 1, fi_cw1_slurry, true);
195  break;
196  }
197  }
199  break;
200 
201  case fi_cw1_slurry_sp:
202  if (a_ev->m_lock || a_farm->DoIt(15)) {
203  if (!a_farm->FA_Slurry(a_field, 0.0,
204  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
205  SimpleEvent(g_date->Date() + 1, fi_cw1_slurry_sp, true);
206  break;
207  }
208  }
210  break;
212  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
214  break;
215  }
217  break;
218 
219  case fi_cw1_preseeding_cultivation: // 100% do this
220  if (!a_farm->PreseedingCultivator(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
222  break;
223  } // fertilizer when preseeding cultivator with sowing
224  SimpleEvent(g_date->Date(), fi_cw1_npk, false);
225  break;
226  case fi_cw1_npk:
227  if (a_ev->m_lock || a_farm->DoIt(85)) {
228  if (!a_farm->FP_NPK(a_field, 0.0,
229  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
230  SimpleEvent(g_date->Date() + 1, fi_cw1_npk, true);
231  break;
232  }
233  }// Queue up the next event - in this case sowing (pure or with associate crop)
235  break;
236  case fi_cw1_sow_pure:
237  if (a_ev->m_lock || a_farm->DoIt(90)) { //90% do this (suggestion, crop scheme says 90-95%)
238  if (!a_farm->SpringSow(a_field, 0.0,
239  g_date->DayInYear(10, 6) - g_date->DayInYear())) {
240  SimpleEvent(g_date->Date() + 1, fi_cw1_sow_pure, true);
241  break;
242  }
244  break;
245  }
246  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), fi_cw1_sow_ac, false);
247  break;
248  case fi_cw1_sow_ac: // 10% do sowing of associate crop (faba bean, peas, barley)
249  if (!a_farm->SpringSow(a_field, 0.0,
250  g_date->DayInYear(5, 6) - g_date->DayInYear())) {
251  SimpleEvent(g_date->Date() + 1, fi_cw1_sow_ac, true);
252  break;
253  } // followed by sowing caraway after (but before emergence of first crop
254  SimpleEvent(g_date->Date() >5, fi_cw1_sow_ac_cw, false);
255  break;
256  case fi_cw1_sow_ac_cw:
257  if (!a_farm->SpringSow(a_field, 0.0,
258  g_date->DayInYear(10, 6) - g_date->DayInYear())) {
259  SimpleEvent(g_date->Date() + 1, fi_cw1_sow_ac_cw, true);
260  break;
261  }
263  break;
264  case fi_cw1_herbicide2_pure: // 50% of the once sowing pure caraway do this
265  if (a_ev->m_lock || a_farm->DoIt(50)) {
266  if (!a_farm->HerbicideTreat(a_field, 0.0,
267  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
269  break;
270  }
271  } // next event - herbicide 3
273  break;
274  case fi_cw1_herbicide2_ac: // 50% of the once sowing with associate crop + caraway do this
275  if (a_ev->m_lock || a_farm->DoIt(50)) {
276  if (!a_farm->HerbicideTreat(a_field, 0.0,
277  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
279  break;
280  }
281  }
282  // here comes a fork of parallel events:
283  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 8), fi_cw1_fungicide_ac, false); // no date available - suggestion
284  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 8), fi_cw1_growth_regulator_ac, false); // no date available - suggestion
285  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 8), fi_cw1_herbicide3_ac, false); // main thread
286  break;
287  case fi_cw1_herbicide3_pure: // 40% of the once sowing pure caraway do this
288  if (a_ev->m_lock || a_farm->DoIt(40)) {
289  if (!a_farm->HerbicideTreat(a_field, 0.0,
290  g_date->DayInYear(15, 9) - g_date->DayInYear())) {
292  break;
293  }
294  }
296  break;
297  case fi_cw1_harvest_pure: // all that do associated crops with caraway
298  if (!a_farm->Harvest(a_field, 0.0,
299  g_date->DayInYear(30, 9) - g_date->DayInYear())) {
301  break;
302  } // end of pure caraway mangement first year
303  done = true;
304  break;
305  case fi_cw1_fungicide_ac:
306  if (a_ev->m_lock || a_farm->DoIt(5)) { //5% do fungicide (of doing caraway + associated crops?)
307  if (!a_farm->FungicideTreat(a_field, 0.0,
308  g_date->DayInYear(15, 8) - g_date->DayInYear())) {
310  break;
311  }
312  }
313  break;
315  if (a_ev->m_lock || a_farm->DoIt(70)) { //70% do growth regulator (of doing caraway + associated crops?)
316  if (!a_farm->GrowthRegulator(a_field, 0.0,
317  g_date->DayInYear(15, 8) - g_date->DayInYear())) {
319  break;
320  }
321  }
322  break;
323  case fi_cw1_herbicide3_ac: // 40% of the once sowing with associate crop + caraway do this
324  if (a_ev->m_lock || a_farm->DoIt(40)) {
325  if (!a_farm->HerbicideTreat(a_field, 0.0,
326  g_date->DayInYear(15, 9) - g_date->DayInYear())) {
328  break;
329  }
330  }
331  SimpleEvent(g_date->Date()+1, fi_cw1_harvest_ac, false); // no date available - suggestion
332  break;
333  case fi_cw1_harvest_ac: // all that do associated crops with caraway
334  if (!a_farm->Harvest(a_field, 0.0,
335  g_date->DayInYear(23, 9) - g_date->DayInYear())) {
336  SimpleEvent(g_date->Date() + 1, fi_cw1_harvest_ac, true);
337  break;
338  }
339  SimpleEvent(g_date->Date() <7, fi_cw1_harvest, false);
340  break;
341  case fi_cw1_harvest: // all that do associated crops with caraway
342  if (!a_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
343  SimpleEvent(g_date->Date() + 1, fi_cw1_harvest, true);
344  break;
345  }
347  break;
348  case fi_cw1_straw_chopping_ac: // crop scheme not clear on date or % - thus suggestions
349  if (a_ev->m_lock || a_farm->DoIt(50)) {
350  if (!a_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
352  break;
353  }
354  done = true;
355  break;
356  }
357  else SimpleEvent(g_date->Date(), fi_cw1_hay_bailing_ac, false);
358  break;
359  case fi_cw1_hay_bailing_ac: // crop scheme not clear on date or % - thus suggestions
360  if (!a_farm->HayBailing(m_field, 0.0, m_field->GetMDates(1, 2) - g_date->DayInYear())) {
362  break;
363  }
364  done = true;
365  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
366  // END OF MAIN THREAD
367  break;
368  default:
369  g_msg->Warn(WARN_BUG, "FI_Caraway1::Do(): "
370  "Unknown event type! ", "");
371  exit(1);
372  }
373  return done;
374 }

References LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::DoIt_prob(), Farm::FA_Slurry(), fi_cw1_fungicide_ac, fi_cw1_growth_regulator_ac, fi_cw1_harvest, fi_cw1_harvest_ac, fi_cw1_harvest_pure, fi_cw1_hay_bailing_ac, fi_cw1_herbicide1, fi_cw1_herbicide2_ac, fi_cw1_herbicide2_pure, fi_cw1_herbicide3_ac, fi_cw1_herbicide3_pure, fi_cw1_minimum_tillage, fi_cw1_npk, fi_cw1_preseeding_cultivation, fi_cw1_sleep_all_day, fi_cw1_slurry, fi_cw1_slurry_sp, fi_cw1_sow_ac, fi_cw1_sow_ac_cw, fi_cw1_sow_pure, fi_cw1_spring_plough, fi_cw1_start, fi_cw1_straw_chopping_ac, fi_cw1_winter_plough, Farm::FP_NPK(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::HerbicideTreat(), Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), Farm::PreseedingCultivator(), Farm::ShallowHarrow(), Crop::SimpleEvent(), Farm::SleepAllDay(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StrawChopping(), tov_FICaraway1, MapErrorMsg::Warn(), WARN_BUG, and Farm::WinterPlough().

◆ SetUpFarmCategoryInformation()

void FI_Caraway1::SetUpFarmCategoryInformation ( )
inline
109  {
110  const int elements = 2 + (fi_cw1_foobar - FI_CW1_BASE);
112 
113  FarmManagementCategory catlist[elements] =
114  {
115  fmc_Others, // zero element unused but must be here
116  fmc_Others, // fi_cw1_start = 1, // Compulsory, must always be 1 (one).
117  fmc_Others, // fi_cw1_sleep_all_day = FI_CW1_BASE,
118  fmc_Herbicide, // fi_cw1_herbicide1,
119  fmc_Cultivation, // fi_cw1_winter_plough,
120  fmc_Cultivation, // fi_cw1_minimum_tillage,
121  fmc_Fertilizer, // fi_cw1_slurry_sp,
122  fmc_Cultivation, // fi_cw1_spring_plough,
123  fmc_Fertilizer, // fi_cw1_slurry,
124  fmc_Cultivation, // fi_cw1_preseeding_cultivation,
125  fmc_Fertilizer, // fi_cw1_npk,
126  fmc_Others, // fi_cw1_sow_pure,
127  fmc_Others, // fi_cw1_sow_ac,
128  fmc_Others, // fi_cw1_sow_ac_cw,
129  fmc_Herbicide, // fi_cw1_herbicide2_pure,
130  fmc_Herbicide, // fi_cw1_herbicide2_ac,
131  fmc_Herbicide, // fi_cw1_herbicide3_pure,
132  fmc_Herbicide, // fi_cw1_herbicide3_ac,
133  fmc_Harvest, // fi_cw1_harvest_pure,
134  fmc_Fungicide, // fi_cw1_fungicide_ac,
135  fmc_Others, // fi_cw1_growth_regulator_ac,
136  fmc_Harvest, // fi_cw1_harvest_ac,
137  fmc_Harvest, // fi_cw1_harvest,
138  fmc_Others, // fi_cw1_straw_chopping_ac,
139  fmc_Others // fi_cw1_hay_bailing_ac,
140 
141 
142  // no foobar entry
143 
144  };
145  // Iterate over the catlist elements and copy them to vector
146  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
147 
148  }

References FI_CW1_BASE, fi_cw1_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FI_Caraway1().


The documentation for this class was generated from the following files:
fi_cw1_herbicide1
Definition: FI_Caraway1.h:63
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
fi_cw1_minimum_tillage
Definition: FI_Caraway1.h:65
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
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
Farm::PreseedingCultivator
virtual bool PreseedingCultivator(LE *a_field, double a_user, int a_days)
Carry out preseeding cultivation on a_field (tilling set including cultivator and string roller to co...
Definition: FarmFuncs.cpp:312
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
fi_cw1_hay_bailing_ac
Definition: FI_Caraway1.h:84
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
fi_cw1_slurry_sp
Definition: FI_Caraway1.h:66
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
fi_cw1_spring_plough
Definition: FI_Caraway1.h:67
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Farm::FP_NPK
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:645
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
fi_cw1_sleep_all_day
Definition: FI_Caraway1.h:62
fi_cw1_sow_ac_cw
Definition: FI_Caraway1.h:73
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
fi_cw1_herbicide3_pure
Definition: FI_Caraway1.h:76
FI_Caraway1::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FI_Caraway1.h:109
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
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
fi_cw1_foobar
Definition: FI_Caraway1.h:85
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
fi_cw1_harvest_pure
Definition: FI_Caraway1.h:78
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
fi_cw1_fungicide_ac
Definition: FI_Caraway1.h:79
fi_cw1_slurry
Definition: FI_Caraway1.h:68
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
fi_cw1_sow_ac
Definition: FI_Caraway1.h:72
tov_FICaraway1
Definition: LandscapeFarmingEnums.h:565
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fi_cw1_harvest
Definition: FI_Caraway1.h:82
fi_cw1_growth_regulator_ac
Definition: FI_Caraway1.h:80
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
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
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
Crop::StartUpCrop
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 a...
Definition: Farm.cpp:652
fi_cw1_preseeding_cultivation
Definition: FI_Caraway1.h:69
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
fi_cw1_herbicide3_ac
Definition: FI_Caraway1.h:77
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
FI_CW1_BASE
#define FI_CW1_BASE
Definition: FI_Caraway1.h:53
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::ShallowHarrow
virtual bool ShallowHarrow(LE *a_field, double a_user, int a_days)
Carry out a shallow harrow event on a_field, e.g., after grass cutting event.
Definition: FarmFuncs.cpp:473
Farm::SleepAllDay
virtual bool SleepAllDay(LE *a_field, double a_user, int a_days)
Nothing to to today on a_field.
Definition: FarmFuncs.cpp:272
fi_cw1_start
Definition: FI_Caraway1.h:61
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
fi_cw1_npk
Definition: FI_Caraway1.h:70
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
fi_cw1_herbicide2_ac
Definition: FI_Caraway1.h:75
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Farm::WinterPlough
virtual bool WinterPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the winter on a_field.
Definition: FarmFuncs.cpp:395
Farm::GrowthRegulator
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
fi_cw1_straw_chopping_ac
Definition: FI_Caraway1.h:83
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
fi_cw1_sow_pure
Definition: FI_Caraway1.h:71
fi_cw1_winter_plough
Definition: FI_Caraway1.h:64
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
fi_cw1_harvest_ac
Definition: FI_Caraway1.h:81
fi_cw1_herbicide2_pure
Definition: FI_Caraway1.h:74
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