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

FI_OCaraway1 class
. More...

#include <FI_OCaraway1.h>

Inheritance diagram for FI_OCaraway1:
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_OCaraway1 (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_OCaraway1 class
.

See FI_OCaraway1.h::FI_Caraway1ToDo for a complete list of all possible events triggered codes by the OCaraway1 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_OCaraway1()

FI_OCaraway1::FI_OCaraway1 ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
93  : Crop(a_tov, a_toc, a_L)
94  {
95  // When we start it off, the first possible date for a farm operation is 1st October
96  // This information is used by other crops when they decide how much post processing of
97  // the management is allowed after harvest before the next crop starts.
98  m_first_date = g_date->DayInYear(1, 12);
100  }

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

Member Function Documentation

◆ Do()

bool FI_OCaraway1::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.

87 {
88  m_field = a_field; // this is needed because of possible calls to other methods and currently we do not pass parameters.
89  m_farm = a_farm; // this is needed because of possible calls to other methods and currently we do not pass parameters.
90  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
91  int d1 = 0;
92  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
93  switch (a_ev->m_todo)
94  {
95  case fi_ocw1_start:
96  {
97  a_field->ClearManagementActionSum();
98 
99  // This is just to hold a local variable in scope and prevent compiler errors
100  // ww_start just sets up all the starting conditions and reference dates that are needed to start a ww
101  // crop off
102  // Record whether skylark scrapes are present and adjust flag accordingly
104  a_field->m_skylarkscrapes = true;
105  }
106  else {
107  a_field->m_skylarkscrapes = false;
108  }
109  // Set up the date management stuff
110  // The next bit of code just allows for altering dates after harvest if it is necessary
111  // to allow for a crop which starts its management early.
112 
113  // 3 start and stop dates for all events after harvest for this crop
114  int noDates = 1;
115  a_field->SetMDates(0, 0, g_date->DayInYear(30, 9)); // last possible day of harvest
116  a_field->SetMDates(1, 0, g_date->DayInYear(5, 10)); // last possible day of procedures after harvest
117  // Can be up to 10 of these. If the shortening code is triggered
118  // then these will be reduced in value to 0
119 
120  a_field->SetMConstants(0, 1);
121 
122  // Check the next crop for early start, unless it is a spring crop
123  // in which case we ASSUME that no checking is necessary!!!!
124  // So DO NOT implement a crop that runs over the year boundary (i.e. from spring to spring!), at least not without fixing this.
125 
126  //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)
127  int d1;
128  if (!(a_farm->GetType() == tof_OptimisingFarm && g_date->GetYearNumber() > 0)) {
129 
130  if (a_ev->m_startday > g_date->DayInYear(1, 7)) {
131  if (a_field->GetMDates(0, 0) >= a_ev->m_startday)
132  {
133  g_msg->Warn(WARN_BUG, "FI_OCaraway1::Do(): ", "Harvest too late for the next crop to start!!!");
134  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
135  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
136  }
137  // Now fix any late finishing problems
138  for (int i = 0; i < noDates; i++) {
139  if (a_field->GetMDates(0, i) >= a_ev->m_startday) {
140  a_field->SetMDates(0, i, a_ev->m_startday - 1); //move the starting date
141  }
142  if (a_field->GetMDates(1, i) >= a_ev->m_startday) {
143  a_field->SetMConstants(i, 0); //change the default value of the MConst (=1) to 0 (necessary to correctly execute farm events in case the finishing date (MDate) was moved)
144  a_field->SetMDates(1, i, a_ev->m_startday - 1); //move the finishing date
145  }
146  }
147  }
148  // Now no operations can be timed after the start of the next crop.
149 
150  if (!a_ev->m_first_year) {
151  // Are we before July 1st?
152  d1 = g_date->OldDays() + g_date->DayInYear(1, 7);
153  if (g_date->Date() < d1) {
154  // Yes, too early. We assumme this is because the last crop was late
155  printf("Poly: %d\n", a_field->GetPoly());
156  g_msg->Warn(WARN_BUG, "FI_OCaraway1::Do(): ", "Crop start attempt between 1st Jan & 1st July");
157  int prev = a_field->GetLandscape()->BackTranslateVegTypes(a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex()));
158  g_msg->Warn(WARN_BUG, "Previous Crop ", prev);
159  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
160  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
161  }
162  else {
163  d1 = g_date->OldDays() + m_first_date; // Add 365 for spring crop
164  if (g_date->Date() > d1) {
165  // Yes too late - should not happen - raise an error
166  g_msg->Warn(WARN_BUG, "FI_OCaraway1::Do(): ", "Crop start attempt after last possible start date");
167  g_msg->Warn(WARN_BUG, "Previous Crop ", "");
168  a_field->GetOwner()->GetPreviousTov(a_field->GetRotIndex());
169  int almassnum = a_field->GetLandscape()->BackTranslateVegTypes(a_ev->m_next_tov);
170  g_msg->Warn("Next Crop ", (double)almassnum); // this causes exit
171  }
172  }
173  }
174  else {
175  // Is the first year
176  // Some special code to cope with that first start-up year in ALMaSS - ignore for all practical purposes (start woth the first event on the after winter time)
178  break;
179  }
180  }//if
181 
182  // End single block date checking code. Please see next line comment as well.
183  // Reinit d1 to first possible starting date.
184  d1 = g_date->OldDays() + g_date->DayInYear(1, 8);
185  // OK, let's go.
186  // LKM: Here we queue up the first event -
187  //
189  }
190  break;
191  // This is the first real farm operation
193  if (a_ev->m_lock || a_farm->DoIt(100)) {
194  if (!a_farm->SleepAllDay(a_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear())) {
196  break;
197  }
198  }
199  // Here comes a fork with parallel events:
200  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 9), fi_ocw1_winter_plough, false); // winter plough thread - main thread
201  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 9), fi_ocw1_minimum_tillage, false); // minimum tillage thread
202  break;
204  if (a_ev->m_lock || a_farm->DoIt(30)) {
205  if (!a_farm->ShallowHarrow(a_field, 0.0, g_date->DayInYear(30, 9) - g_date->DayInYear())) {
207  break;
208  }
209  }
210  break;
212  if (a_ev->m_lock || a_farm->DoIt(50)) {
213  if (!a_farm->WinterPlough(a_field, 0.0, g_date->DayInYear(30, 9) - g_date->DayInYear())) {
215  break;
216  }
217  }
218  // Queue up the next event - in this case sleep all day in the beginning of next year
219  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, fi_ocw1_spring_plough, false);
220  break;
222  if (a_ev->m_lock || a_farm->DoIt(20)) {
223  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
225  break;
226  }
227  }
228  // Here comes a fork of parallel events:
230  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), fi_ocw1_preseeding_cultivation, false); // main thread
231  break;
232  case fi_ocw1_slurry:
233  if (a_ev->m_lock || a_farm->DoIt(15)) {
234  if (!a_farm->FA_Slurry(a_field, 0.0,
235  g_date->DayInYear(31, 5) - g_date->DayInYear())) {
236  SimpleEvent(g_date->Date() + 1, fi_ocw1_slurry, true);
237  break;
238  }
239  }
240  break;
241  case fi_ocw1_preseeding_cultivation: // 100% do this
242  if (!a_farm->PreseedingCultivator(m_field, 0.0, g_date->DayInYear(31, 5) - g_date->DayInYear())) {
244  break;
245  } // fertilizer when preseeding cultivator with sowing
246  SimpleEvent(g_date->Date(), fi_ocw1_npk, false);
247  break;
248  case fi_ocw1_npk:
249  if (a_ev->m_lock || a_farm->DoIt(85)) {
250  if (!a_farm->FP_NPK(a_field, 0.0,
251  g_date->DayInYear(20, 5) - g_date->DayInYear())) {
252  SimpleEvent(g_date->Date() + 1, fi_ocw1_npk, true);
253  break;
254  }
255  }// Queue up the next event - in this case sowing (pure or with associate crop)
257  break;
258  case fi_ocw1_sow_pure:
259  if (a_ev->m_lock || a_farm->DoIt(90)) { //90% do this (suggestion, crop scheme says 90-95%)
260  if (!a_farm->SpringSow(a_field, 0.0,
261  g_date->DayInYear(10, 6) - g_date->DayInYear())) {
262  SimpleEvent(g_date->Date() + 1, fi_ocw1_sow_pure, true);
263  break;
264  }
266  break;
267  }
268  else SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), fi_ocw1_sow_ac, false);
269  break;
270  case fi_ocw1_sow_ac: // 10% do sowing of associate crop
271  if (!a_farm->SpringSow(a_field, 0.0,
272  g_date->DayInYear(10, 6) - g_date->DayInYear())) {
273  SimpleEvent(g_date->Date() + 1, fi_ocw1_sow_ac, true);
274  break;
275  } // followed by sowing caraway after (but before emergence of first crop
276  SimpleEvent(g_date->Date() > 5, fi_ocw1_sow_ac_cw, false);
277  break;
278  case fi_ocw1_sow_ac_cw:
279  if (!a_farm->SpringSow(a_field, 0.0,
280  g_date->DayInYear(15, 6) - g_date->DayInYear())) {
281  SimpleEvent(g_date->Date() + 1, fi_ocw1_sow_ac_cw, true);
282  break;
283  }
284  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 9), fi_ocw1_harvest_ac, false); // no date available - suggestion
285  break;
286  case fi_ocw1_harvest_pure: // all that do associated crops with caraway
287  if (!a_farm->Harvest(a_field, 0.0,
288  g_date->DayInYear(30, 9) - g_date->DayInYear())) {
290  break;
291  } // end of pure caraway mangement first year
292  done = true;
293  break;
294  case fi_ocw1_harvest_ac: // all that do associated crops with caraway
295  if (!a_farm->Harvest(a_field, 0.0,
296  g_date->DayInYear(23, 9) - g_date->DayInYear())) {
297  SimpleEvent(g_date->Date() + 1, fi_ocw1_harvest_ac, true);
298  break;
299  }
301  break;
302  case fi_ocw1_harvest: // all that do associated crops with caraway
303  if (!a_farm->Harvest(a_field, 0.0,
304  g_date->DayInYear(30, 9) - g_date->DayInYear())) {
305  SimpleEvent(g_date->Date() + 1, fi_ocw1_harvest, true);
306  break;
307  }
309  break;
310  case fi_ocw1_straw_chopping_ac: // crop scheme not clear on date or % - thus suggestions
311  if (a_ev->m_lock || a_farm->DoIt(50)) {
312  if (!a_farm->StrawChopping(a_field, 0.0,
313  g_date->DayInYear(5, 10) - g_date->DayInYear())) {
315  break;
316  }
317  done = true;
318  break;
319  }
321  break;
322  case fi_ocw1_hay_bailing_ac: // crop scheme not clear on date or % - thus suggestions
323  if (!a_farm->HayBailing(a_field, 0.0,
324  g_date->DayInYear(5, 10) - g_date->DayInYear())) {
326  break;
327  }
328  done = true;
329  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
330  // END OF MAIN THREAD
331  break;
332  default:
333  g_msg->Warn(WARN_BUG, "FI_OCaraway1::Do(): "
334  "Unknown event type! ", "");
335  exit(1);
336  }
337  return done;
338 }

References cfg_FI_OCaraway1_SkScrapes, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::FA_Slurry(), fi_ocw1_harvest, fi_ocw1_harvest_ac, fi_ocw1_harvest_pure, fi_ocw1_hay_bailing_ac, fi_ocw1_minimum_tillage, fi_ocw1_npk, fi_ocw1_preseeding_cultivation, fi_ocw1_sleep_all_day, fi_ocw1_slurry, fi_ocw1_sow_ac, fi_ocw1_sow_ac_cw, fi_ocw1_sow_pure, fi_ocw1_spring_plough, fi_ocw1_start, fi_ocw1_straw_chopping_ac, fi_ocw1_winter_plough, Farm::FP_NPK(), g_date, g_msg, LE::GetMDates(), LE::GetOwner(), LE::GetPoly(), Farm::GetPreviousTov(), LE::GetRotIndex(), Farm::GetType(), Calendar::GetYearNumber(), Farm::Harvest(), Farm::HayBailing(), Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_next_tov, LE::m_skylarkscrapes, FarmEvent::m_startday, FarmEvent::m_todo, Calendar::OldDays(), Farm::PreseedingCultivator(), LE::SetMConstants(), LE::SetMDates(), Farm::ShallowHarrow(), Crop::SimpleEvent(), Farm::SleepAllDay(), Farm::SpringPlough(), Farm::SpringSow(), Farm::StrawChopping(), tof_OptimisingFarm, CfgBool::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::WinterPlough().

◆ SetUpFarmCategoryInformation()

void FI_OCaraway1::SetUpFarmCategoryInformation ( )
inline
101  {
102  const int elements = 2 + (fi_ocw1_foobar - FI_OCW1_BASE);
104 
105  FarmManagementCategory catlist[elements] =
106  {
107  fmc_Others, // zero element unused but must be here
108  fmc_Others, // fi_ocw1_start = 1, // Compulsory, must always be 1 (one).
109  fmc_Others, // fi_ocw1_sleep_all_day = FI_OCW1_BASE,
110  fmc_Cultivation, // fi_ocw1_winter_plough,
111  fmc_Cultivation, // fi_ocw1_minimum_tillage,
112  fmc_Cultivation, // fi_ocw1_spring_plough,
113  fmc_Fertilizer, // fi_ocw1_slurry,
114  fmc_Cultivation, // fi_ocw1_preseeding_cultivation,
115  fmc_Fertilizer, // fi_ocw1_npk,
116  fmc_Others, // fi_ocw1_sow_pure,
117  fmc_Harvest, // fi_ocw1_harvest_pure,
118  fmc_Others, // fi_ocw1_sow_ac,
119  fmc_Others, // fi_ocw1_sow_ac_cw,
120  fmc_Fertilizer, // fi_ocw1_harvest_ac,
121  fmc_Harvest, // fi_ocw1_harvest,
122  fmc_Cutting, // fi_ocw1_straw_chopping_ac,
123  fmc_Others // fi_ocw1_hay_bailing_ac,
124 
125 
126  // no foobar entry
127 
128  };
129  // Iterate over the catlist elements and copy them to vector
130  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
131 
132  }

References FI_OCW1_BASE, fi_ocw1_foobar, fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Harvest, fmc_Others, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FI_OCaraway1().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
FI_OCaraway1::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FI_OCaraway1.h:101
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
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::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_ocw1_start
Definition: FI_OCaraway1.h:61
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
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
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FI_OCW1_BASE
#define FI_OCW1_BASE
Definition: FI_OCaraway1.h:53
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
LE::GetPoly
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: Elements.h:238
fi_ocw1_preseeding_cultivation
Definition: FI_OCaraway1.h:67
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
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
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
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
CfgBool::value
bool value() const
Definition: Configurator.h:164
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
LE::m_skylarkscrapes
bool m_skylarkscrapes
For management testing of skylark scrapes.
Definition: Elements.h:95
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
fi_ocw1_harvest_pure
Definition: FI_OCaraway1.h:70
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
fi_ocw1_harvest_ac
Definition: FI_OCaraway1.h:73
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
fi_ocw1_npk
Definition: FI_OCaraway1.h:68
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
fi_ocw1_sow_ac_cw
Definition: FI_OCaraway1.h:72
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
fi_ocw1_winter_plough
Definition: FI_OCaraway1.h:63
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
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::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_ocw1_foobar
Definition: FI_OCaraway1.h:77
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
fi_ocw1_straw_chopping_ac
Definition: FI_OCaraway1.h:75
fi_ocw1_sleep_all_day
Definition: FI_OCaraway1.h:62
fi_ocw1_spring_plough
Definition: FI_OCaraway1.h:65
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
fi_ocw1_harvest
Definition: FI_OCaraway1.h:74
cfg_FI_OCaraway1_SkScrapes
CfgBool cfg_FI_OCaraway1_SkScrapes("DK_CROP_OCW1_SK_SCRAPES", CFG_CUSTOM, false)
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
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
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
fi_ocw1_sow_pure
Definition: FI_OCaraway1.h:69
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
fi_ocw1_sow_ac
Definition: FI_OCaraway1.h:71
fi_ocw1_hay_bailing_ac
Definition: FI_OCaraway1.h:76
WARN_BUG
Definition: MapErrorMsg.h:34
fi_ocw1_minimum_tillage
Definition: FI_OCaraway1.h:64
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
fi_ocw1_slurry
Definition: FI_OCaraway1.h:66