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

FR_Sunflower class
. More...

#include <FR_Sunflower.h>

Inheritance diagram for FR_Sunflower:
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...
 
 FR_Sunflower (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

FR_Sunflower class
.

See FR_Sunflower.h::FR_SunflowerToDo for a complete list of all possible events triggered codes by the 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

◆ FR_Sunflower()

FR_Sunflower::FR_Sunflower ( 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 FR_Sunflower::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 winter wheat.

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  bool flag = false;
104  int d1 = 0;
105  m_ev = a_ev;
106  // Depending what event has occured jump to the correct bit of code e.g. for ww_start jump to line 67 below
107  switch (a_ev->m_todo)
108  {
109  case fr_sf_start:
110  {
111  // This is just to hold a local variable in scope and prevent compiler errors
112  // ww_start just sets up all the starting conditions and reference dates that are needed to start a ww
113  // crop off
114  FR_SF_PLOUGH = false;
115  FR_SF_SLURRY = false;
116 
117  a_field->ClearManagementActionSum();
118 
119  m_last_date = g_date->DayInYear(5, 10); // Should match the last flexdate below
120  //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
121  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
122  // Set up the date management stuff
123  // Start and stop dates for all events after harvest
124  flexdates[0][1] = g_date->DayInYear(5, 10); // last possible day harvest
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(fr_sf_fertilizer))) 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  // OK, let's go.
133  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
134  if (m_ev->m_forcespring) {
135  int day_num_shift = 365;
136  if (g_date->DayInYear() < 70) day_num_shift = 0;
137  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 2) + day_num_shift, fr_sf_fertilizer, false);
138  break;
139  }
140  else
141  // End single block date checking code. Please see next line comment as well.
142  // Reinit d1 to first possible starting date.
143  d1 = g_date->OldDays() + g_date->DayInYear(10, 10);
144  SimpleEvent(d1, fr_sf_mineral, false);
145  break;
146 
147  }
148  break;
149  // This is the first real farm operation
150  case fr_sf_mineral:
151  if (a_ev->m_lock || a_farm->DoIt_prob(.20)) {
152  if (!a_farm->FP_Calcium(a_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
153  SimpleEvent(g_date->Date() + 1, fr_sf_mineral, true);
154  break;
155  }
156  }
158  break;
159 
161  if (a_ev->m_lock || a_farm->DoIt_prob(.30)) {
162  if (!a_farm->StubblePlough(a_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
164  break;
165  }
166  SimpleEvent(g_date->Date() + 7, fr_sf_autumn_harrow, false);
167  break;
168  }
169  else if (a_ev->m_lock || a_farm->DoIt_prob(.50 / .70)) {
171  break;
172  }
173  SimpleEvent(g_date->OldDays() + g_date->DayInYear(31, 10), fr_sf_slurry, false);
174  break;
175 
177  if (!a_farm->StubbleHarrowing(a_field, 0.0, g_date->DayInYear(10, 11) - g_date->DayInYear())) {
179  break;
180  }
181  SimpleEvent(g_date->OldDays() + g_date->DayInYear(31, 10), fr_sf_slurry, false);
182  break;
183 
184  case fr_sf_autumn_harrow:
185  if (!a_farm->AutumnHarrow(a_field, 0.0, g_date->DayInYear(17, 11) - g_date->DayInYear())) {
187  break;
188  }
189  SimpleEvent(g_date->OldDays() + g_date->DayInYear(31, 10), fr_sf_slurry, false);
190  break;
191 
192  case fr_sf_slurry:
193  if (m_farm->IsStockFarmer()) { // StockFarmer
194  if (a_ev->m_lock || a_farm->DoIt_prob(.30)) {
195  if (!a_farm->FA_Slurry(a_field, 0.0, g_date->DayInYear(15, 12) - g_date->DayInYear())) {
196  SimpleEvent(g_date->Date() + 1, fr_sf_slurry, true);
197  break;
198  }
199  else {
200  //remember who use manure
201  FR_SF_SLURRY = true;
202  }
203  }
204  }
206  break;
207 
208  case fr_sf_winter_plough:
209  if (a_ev->m_lock || a_farm->DoIt_prob(.20)) { //
210  if (!a_farm->WinterPlough(a_field, 0.0, g_date->DayInYear(31, 12) - g_date->DayInYear())) {
212  break;
213  }
214  else {
215  //remember who ploughs
216  FR_SF_PLOUGH = true;
217  }
218  }
219  SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 2)+365, fr_sf_fertilizer, false);
220  break;
221 
222  case fr_sf_fertilizer:
223  if (FR_SF_SLURRY == false && a_ev->m_lock || a_farm->DoIt_prob(.10/.70)) {
224  if (!a_farm->FP_Manure(a_field, 0.0, g_date->DayInYear(28, 2) - g_date->DayInYear())) {
225  SimpleEvent(g_date->Date() + 1, fr_sf_fertilizer, true);
226  break;
227  }
228  }
231  break;
232 
233  case fr_sf_spring_plough:
234  if (FR_SF_PLOUGH == true) {
236  break;
237  }
238  else if (a_ev->m_lock || a_farm->DoIt_prob(.50/.80)) { // suggested to fit with the crop scheme text (70% in crop scheme) - 70% in total ploughs - 20% in autumn, 50% in spring
239  if (!a_farm->SpringPlough(a_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
241  break;
242  }
244  break;
245  }
246  else if (a_ev->m_lock || a_farm->DoIt_prob(.20 / .30)) {
248  break;
249  }
250  else
252  break;
253 
254  case fr_sf_herbicide1:
255  if (a_ev->m_lock || a_farm->DoIt_prob(.50)) {
256  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
257  SimpleEvent(g_date->Date() + 1, fr_sf_herbicide1, true);
258  break;
259  }
260  }
261  break;
262 
263  case fr_sf_spring_harrow:
264  if (!a_farm->SpringHarrow(a_field, 0.0, g_date->DayInYear(31, 3) - g_date->DayInYear())) {
266  break;
267  }
269  break;
270 
271  case fr_sf_harrow1:
272  if (!a_farm->SpringHarrow(a_field, 0.0, g_date->DayInYear(23, 4) - g_date->DayInYear())) {
273  SimpleEvent(g_date->Date() + 1, fr_sf_harrow1, true);
274  break;
275  }
277  break;
278 
280  if (a_ev->m_lock || a_farm->DoIt_prob(.90)) {
281  if (!a_farm->PreseedingCultivator(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
283  break;
284  }
285  }
286  SimpleEvent(g_date->Date(), fr_sf_sow, false);
287  break;
288  case fr_sf_sow:
289  if (!a_farm->SpringSow(a_field, 0.0,
290  g_date->DayInYear(30, 4) - g_date->DayInYear())) {
291  SimpleEvent(g_date->Date() + 1, fr_sf_sow, true);
292  break;
293  }
295  SimpleEvent(g_date->Date() + 2, fr_sf_herbicide2, false);
296  SimpleEvent(g_date->Date() + 7, fr_sf_harrow2, false);
297  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), fr_sf_n, false);
298  SimpleEvent(g_date->Date() + 44 + m_date_modifier, fr_sf_insecticide, false); // main thread
299  break;
300 
301  case fr_sf_fertilizer2:
302  if (a_ev->m_lock || a_farm->DoIt(50)) {
303  if (!a_farm->FP_P(a_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
304  SimpleEvent(g_date->Date() + 1, fr_sf_fertilizer2, true);
305  break;
306  }
307  }
308  break;
309 
310  case fr_sf_herbicide2:
311  if (a_ev->m_lock || a_farm->DoIt(90)) {
312  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(2, 5) - g_date->DayInYear())) {
313  SimpleEvent(g_date->Date() + 1, fr_sf_herbicide2, true);
314  break;
315  }
316  SimpleEvent(g_date->Date() + 30, fr_sf_herbicide3, false);
317  break;
318  }
319  break;
320 
321  case fr_sf_herbicide3:
322  if (a_ev->m_lock || a_farm->DoIt(50)) { //50% of the 90% doing herbicide2
323  if (!a_farm->HerbicideTreat(a_field, 0.0, g_date->DayInYear(2, 6) - g_date->DayInYear())) {
324  SimpleEvent(g_date->Date() + 1, fr_sf_herbicide3, true);
325  break;
326  }
327  }
328  break;
329 
330  case fr_sf_harrow2:
331  if (a_ev->m_lock || a_farm->DoIt(15)) {
332  if (!a_farm->SpringHarrow(a_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
333  SimpleEvent(g_date->Date() + 1, fr_sf_harrow2, true);
334  break;
335  }
336  }
337  break;
338 
339  case fr_sf_n:
340  if (!a_farm->FP_N(a_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
341  SimpleEvent(g_date->Date() + 1, fr_sf_n, true);
342  break;
343  }
344  break;
345 
346  case fr_sf_insecticide:
347  if (a_ev->m_lock || a_farm->DoIt(5)) {
348  // here we check whether we are using ERA pesticide or not
349  d1 = g_date->DayInYear(30, 6) - g_date->DayInYear();
350  if (!cfg_pest_sunflower_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
351  {
352  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
353  }
354  else {
356  }
357  if (!flag) {
359  break;
360  }
361  }
362  SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 8), fr_sf_harvest, false);
363  break;
364  case fr_sf_harvest:
365  // We don't move harvest days
366  if (!a_farm->Harvest(a_field, 0.0, a_field->GetMDates(1, 0) - g_date->DayInYear())) {
367  SimpleEvent(g_date->Date() + 1, fr_sf_harvest, true);
368  break;
369  }
370  done = true;
371  // So we are done, and somewhere else the farmer will queue up the start event of the next crop
372  // END OF MAIN THREAD
373  break;
374  default:
375  g_msg->Warn(WARN_BUG, "FR_Sunflower::Do(): "
376  "Unknown event type! ", "");
377  exit(1);
378  }
379  return done;
380 }

References Farm::AutumnHarrow(), cfg_pest_product_amounts, cfg_pest_sunflower_on, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt(), Farm::DoIt_prob(), Farm::FA_Slurry(), Farm::FP_Calcium(), Farm::FP_Manure(), Farm::FP_N(), Farm::FP_P(), fr_sf_autumn_harrow, fr_sf_fertilizer, fr_sf_fertilizer2, fr_sf_harrow1, fr_sf_harrow2, fr_sf_harvest, fr_sf_herbicide1, fr_sf_herbicide2, fr_sf_herbicide3, fr_sf_insecticide, fr_sf_mineral, fr_sf_n, FR_SF_PLOUGH, fr_sf_preseed_cultivation, FR_SF_SLURRY, fr_sf_slurry, fr_sf_sow, fr_sf_spring_harrow, fr_sf_spring_plough, fr_sf_start, fr_sf_stubble_harrow, fr_sf_stubble_plough, fr_sf_winter_plough, g_date, g_msg, LE::GetMDates(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::PreseedingCultivator(), Farm::ProductApplication(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), Farm::StubbleHarrowing(), Farm::StubblePlough(), CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::WinterPlough().

◆ SetUpFarmCategoryInformation()

void FR_Sunflower::SetUpFarmCategoryInformation ( )
inline
109  {
110  const int elements = 2 + (fr_sf_foobar - FR_SF_BASE);
112 
113  FarmManagementCategory catlist[elements] =
114  {
115  fmc_Others, // zero element unused but must be here
116  fmc_Others, //fr_m_start = 1, // Compulsory, must always be 1 (one).
117  fmc_Others, //fr_m_sleep_all_day = FR_SF_BASE,
118  fmc_Fertilizer, //fr_sf_mineral,
119  fmc_Cultivation, //fr_sf_stubble_harrow,
120  fmc_Cultivation, //fr_sf_stubble_plough,
121  fmc_Cultivation, //fr_sf_autumn_harrow,
122  fmc_Fertilizer, //fr_sf_manure,
123  fmc_Cultivation, //fr_sf_winter_plough,
124  fmc_Fertilizer, //fr_sf_fertilizer,
125  fmc_Cultivation, //fr_sf_spring_plough,
126  fmc_Cultivation, //fr_sf_spring_harrow,
127  fmc_Cultivation, //fr_sf_harrow1,
128  fmc_Herbicide, //fr_sf_herbicide1,
129  fmc_Cultivation, //fr_sf_preseed_cultivation,
130  fmc_Others, //fr_sf_sow,
131  fmc_Fertilizer, //fr_sf_fertilizer2,
132  fmc_Cultivation, //fr_sf_harrow2,
133  fmc_Herbicide, // fr_sf_herbicide2,
134  fmc_Herbicide, //fr_sf_herbicide3,
135  fmc_Insecticide, //fr_sf_insecticide,
136  fmc_Fertilizer, //fr_sf_n,
137  fmc_Harvest, //fr_sf_harvest,
138 
139 
140  // no foobar entry
141 
142  };
143  // Iterate over the catlist elements and copy them to vector
144  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
145 
146  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, FR_SF_BASE, fr_sf_foobar, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by FR_Sunflower().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
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
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
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
fr_sf_slurry
Definition: FR_Sunflower.h:69
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
fr_sf_preseed_cultivation
Definition: FR_Sunflower.h:76
fr_sf_insecticide
Definition: FR_Sunflower.h:82
fr_sf_herbicide3
Definition: FR_Sunflower.h:81
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
Farm::ProductApplication
virtual bool ProductApplication(LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp, bool a_isgranularpesticide=false, int a_orcharddrifttype=0)
Apply test pesticide to a_field.
Definition: FarmFuncs.cpp:2267
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
fr_sf_fertilizer2
Definition: FR_Sunflower.h:78
Farm::DoIt
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
Farm::StubblePlough
virtual bool StubblePlough(LE *a_field, double a_user, int a_days)
Carry out a stubble ploughing event on a_field. This is similar to normal plough but shallow (normall...
Definition: FarmFuncs.cpp:232
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
FR_SF_BASE
#define FR_SF_BASE
Definition: FR_Sunflower.h:52
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
fr_sf_n
Definition: FR_Sunflower.h:83
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
fr_sf_harrow1
Definition: FR_Sunflower.h:74
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
cfg_pest_product_amounts
CfgArray_Double cfg_pest_product_amounts
Amount of pesticide applied in grams of active substance per hectare for each of the 10 pesticides.
fr_sf_autumn_harrow
Definition: FR_Sunflower.h:68
CfgBool::value
bool value() const
Definition: Configurator.h:164
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
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fr_sf_spring_plough
Definition: FR_Sunflower.h:72
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
Farm::FP_N
virtual bool FP_N(LE *a_field, double a_user, int a_days)
Apply N fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:700
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
FR_Sunflower::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: FR_Sunflower.h:109
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
Farm::FP_Calcium
virtual bool FP_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:954
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
fr_sf_stubble_plough
Definition: FR_Sunflower.h:67
fr_sf_herbicide2
Definition: FR_Sunflower.h:80
fr_sf_fertilizer
Definition: FR_Sunflower.h:71
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
fr_sf_spring_harrow
Definition: FR_Sunflower.h:73
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
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
Farm::FP_P
virtual bool FP_P(LE *a_field, double a_user, int a_days)
Apply P fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:687
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
fr_sf_start
Definition: FR_Sunflower.h:63
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
fr_sf_sow
Definition: FR_Sunflower.h:77
fr_sf_stubble_harrow
Definition: FR_Sunflower.h:66
Farm::AutumnHarrow
virtual bool AutumnHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the autumn on a_field.
Definition: FarmFuncs.cpp:285
cfg_pest_sunflower_on
CfgBool cfg_pest_sunflower_on
Turn on pesticides for sunflower.
Crop::m_date_modifier
static int m_date_modifier
Holds a value that shifts test pesticide use by this many days in crops modified to use it.
Definition: Farm.h:514
fr_sf_harrow2
Definition: FR_Sunflower.h:79
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
fr_sf_winter_plough
Definition: FR_Sunflower.h:70
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
FR_SF_SLURRY
#define FR_SF_SLURRY
Definition: FR_Sunflower.h:50
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
fr_sf_mineral
Definition: FR_Sunflower.h:65
fr_sf_foobar
Definition: FR_Sunflower.h:85
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
fr_sf_herbicide1
Definition: FR_Sunflower.h:75
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
fr_sf_harvest
Definition: FR_Sunflower.h:84
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
FR_SF_PLOUGH
#define FR_SF_PLOUGH
Definition: FR_Sunflower.h:49
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523
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
Crop::SimpleEvent_
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.
Definition: Farm.cpp:751