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

NLMaize class
. More...

#include <NLMaize.h>

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

NLMaize class
.

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

◆ NLMaize()

NLMaize::NLMaize ( TTypesOfVegetation  a_tov,
TTypesOfCrops  a_toc,
Landscape a_L 
)
inline
71  : Crop(a_tov, a_toc, a_L)
72  {
73  // When we start it off, the first possible date for a farm operation is 5th November
74  // This information is used by other crops when they decide how much post processing of
75  // the management is allowed after harvest before the next crop starts.
76  m_first_date=g_date->DayInYear( 31,10 );
77  m_forcespringpossible = true;
79  }

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

Member Function Documentation

◆ Do()

bool NLMaize::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 m_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 maize.

Reimplemented from Crop.

66 {
67  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
68  m_farm = a_farm;
69  m_field = a_field;
70  m_ev = a_ev;
71  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true, m_farm, m_field).
72  bool flag = false;
73  int d1 = 0;
74  int noDates = 1;
76  int l_nextcropstartdate;
77  /**********************************************To Here *************************************************************************/
78 
79  // Depending what event has occured jump to the correct bit of code
80  switch (m_ev->m_todo)
81  {
82  case nl_m_start:
83  {
84  NL_M_START_FERTI = false;
86 
87  m_last_date = g_date->DayInYear(8, 10); // Should match the last flexdate below
88  //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
89  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
90  // Set up the date management stuff
91  // Start and stop dates for all events after harvest
92  flexdates[0][1] = g_date->DayInYear(5, 10); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use
93 
94  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
95  flexdates[1][1] = g_date->DayInYear(8, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1) - straw chopping
96 
97  // Below if this is a spring crop use 365, otherwise set this to 0, second parameter is fixed, and the third is the start up operation in the first year
98  int isSpring = 0;
99  if (StartUpCrop(isSpring, flexdates, int(nl_m_spring_sow))) break;
100 
101  // End single block date checking code. Please see next line comment as well.
102  // Reinit d1 to first possible starting date.
103  d1 = g_date->OldDays() + g_date->DayInYear(1, 9) + isSpring;
104  // OK, let's go.
105  if (m_ev->m_forcespring) {
106  int day_num_shift = 365;
107  if (g_date->DayInYear() < 70) day_num_shift = 0;
108  if (m_farm->IsStockFarmer()) //Stock Farmer
109  {
110  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + day_num_shift, nl_m_ferti_s1, false, m_farm, m_field);
111  }
112  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + day_num_shift, nl_m_ferti_p1, false, m_farm, m_field);
113  break;
114  }
115  else {
116  // Here we queue up the first event - this differs depending on whether we have field on snady or clay soils
117  if (m_field->GetSoilType() == 2 || m_field->GetSoilType() == 6) { // on sandy soils (NL ZAND & LOSS)
119  }
120  else SimpleEvent_(d1, nl_m_stubble_harrow2, false, m_farm, m_field);
121  break;
122  }
123  }
124  break;
125 
126  // This is the first real farm operation
128  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
129  {
130  if (!m_farm->StubbleHarrowing(m_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
132  break;
133  }
134  }
135  d1 = g_date->Date() + 10;
136  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 10)) {
137  d1 = g_date->OldDays() + g_date->DayInYear(15, 10);
138  }
140  break;
141  case nl_m_winter_plough1:
142  if (m_ev->m_lock || m_farm->DoIt_prob(0))
143  {
144  if (!m_farm->WinterPlough(m_field, 0.0, g_date->DayInYear(1, 12) - g_date->DayInYear())) {
146  break;
147  }
148  }
149  if (m_farm->IsStockFarmer()) //Stock Farmer
150  {
151  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, nl_m_ferti_s1, false, m_farm, m_field);
152  }
153  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, nl_m_ferti_p1, false, m_farm, m_field);
154  break;
156  if (m_ev->m_lock || m_farm->DoIt_prob(0.20))
157  {
158  if (!m_farm->StubbleHarrowing(m_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
160  break;
161  }
162  }
163  d1 = g_date->Date() + 10;
164  if (d1 < g_date->OldDays() + g_date->DayInYear(15, 11)) {
165  d1 = g_date->OldDays() + g_date->DayInYear(15, 11);
166  }
168  break;
169  case nl_m_winter_plough2:
170  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
171  {
172  if (!m_farm->WinterPlough(m_field, 0.0, g_date->DayInYear(1, 12) - g_date->DayInYear())) {
174  break;
175  }
176  }
177  if (m_farm->IsStockFarmer()) //Stock Farmer
178  {
179  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, nl_m_ferti_s1, false, m_farm, m_field);
180  }
181  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 4) + 365, nl_m_ferti_p1, false, m_farm, m_field);
182  break;
183  case nl_m_ferti_p1:
184  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(25, 4) - g_date->DayInYear())) {
186  break;
187  }
188  if (m_field->GetSoilType() == 2 || m_field->GetSoilType() == 6) { // on sandy soils (NL ZAND & LOSS)
190  }
191  else SimpleEvent_(g_date->Date() + 1, nl_m_spring_plough2, false, m_farm, m_field);
192  break;
193  case nl_m_ferti_s1:
194  if (!m_farm->FA_Slurry(m_field, 0.0, g_date->DayInYear(25, 4) - g_date->DayInYear())) {
196  break;
197  }
198  if (m_field->GetSoilType() == 2 || m_field->GetSoilType() == 6) { // on sandy soils (NL ZAND & LOSS)
200  }
201  else SimpleEvent_(g_date->Date() + 1, nl_m_spring_plough2, false, m_farm, m_field);
202  break;
203  case nl_m_spring_plough1:
204  if (m_ev->m_lock || m_farm->DoIt_prob(0.20))
205  {
206  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
208  break;
209  }
210  }
212  break;
213  case nl_m_spring_plough2:
214  if (m_ev->m_lock || m_farm->DoIt_prob(0))
215  {
216  if (!m_farm->SpringPlough(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
218  break;
219  }
220  }
222  break;
226  break;
227  }
229  break;
231  // 75% will do sow with firtilizer
232  if (m_ev->m_lock || m_farm->DoIt_prob(0.75))
233  {
234  if (!m_farm->SpringSowWithFerti(m_field, 0.0, g_date->DayInYear(5, 5) - g_date->DayInYear())) {
236  break;
237  }
238  else
239  {
240  // 75% of farmers will do this, but the other 25% won't so we need to remember whether we are in one or the other group
241  NL_M_START_FERTI = true;
242  // Here is a fork leading to parallel events
243  SimpleEvent_(g_date->Date() + 3, nl_m_harrow, false, m_farm, m_field);
244  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), nl_m_herbicide1, false, m_farm, m_field); // Herbidide thread
245  if (m_farm->IsStockFarmer()) //Stock Farmer // N thread = MAIN
246  {
248  }
249  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(20, 5), nl_m_ferti_p2, false, m_farm, m_field);
250  break;
251  }
252  }
254  break;
255  case nl_m_spring_sow:
256  if (!m_farm->SpringSow(m_field, 0.0, g_date->DayInYear(5, 5) - g_date->DayInYear())) {
258  break;
259  }
260  // Here is a fork leading to parallel events
261  SimpleEvent_(g_date->Date() + 3, nl_m_harrow, false, m_farm, m_field);
262  SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 5), nl_m_herbicide1, false, m_farm, m_field); // Herbidide thread
263  if (m_farm->IsStockFarmer()) //Stock Farmer // N thread = MAIN
264  {
266  }
267  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(20, 5), nl_m_ferti_p2, false, m_farm, m_field);
268  break;
269  case nl_m_ferti_p2:
270  // Here comes N thread
271  if (m_ev->m_lock || m_farm->DoIt_prob(0.60) && (NL_M_START_FERTI==0))
272  {
273  if (!m_farm->FP_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
275  break;
276  }
277  }
279  break;
280  case nl_m_ferti_s2:
281  if (m_ev->m_lock || m_farm->DoIt_prob(0.60) && (NL_M_START_FERTI == 0))
282  {
283  if (!m_farm->FA_AmmoniumSulphate(m_field, 0.0, g_date->DayInYear(10, 6) - g_date->DayInYear())) {
285  break;
286  }
287  }
289  break;
290  case nl_m_herbicide1:
291  // Here comes the herbicide thread
292  if (m_field->GetGreenBiomass() <= 0)
293  {
295  }
296  else
297  {
298  if (m_ev->m_lock || m_farm->DoIt_prob(0.90))
299  {
300  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(25, 5) - g_date->DayInYear())) {
302  break;
303  }
304  }
305  }
306  // End of thread
307  break;
308  case nl_m_harrow:
309  // Here comes the MAIN thread
310  if (m_ev->m_lock || m_farm->DoIt_prob(0.15))
311  {
312  if (m_field->GetGreenBiomass() <= 0)
313  {
314  if (!m_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(15, 5) - g_date->DayInYear())) {
316  break;
317  }
318  }
319  else { SimpleEvent_(g_date->Date() + 1, nl_m_harrow, true, m_farm, m_field); }
320  }
321  // End of thread
322  break;
323  case nl_m_harvest:
324  // Here the MAIN thread continues
325  // We don't move harvest days
326  if (!m_farm->Harvest(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
328  break;
329  }
331  break;
332  case nl_m_straw_chopping:
333  if (!m_farm->StrawChopping(m_field, 0.0, m_field->GetMDates(1, 1) - g_date->DayInYear())) {
335  break;
336  }
338  // So we are done,but this crop uses a catch crop
339  l_nextcropstartdate = m_farm->GetNextCropStartDate(m_ev->m_field, l_tov);
340  m_field->BumpRunNum();
341  m_field->SetVegPatchy(false); // reverse the patchy before the next crop
342  m_farm->AddNewEvent(tov_NLCatchCropPea, g_date->Date(), m_ev->m_field, PROG_START, m_ev->m_field->GetRunNum(), false, l_nextcropstartdate, false, l_tov, fmc_Others, false, false);
343  m_field->SetVegType(tov_NLCatchCropPea, tov_Undefined); // Two vegetation curves are specified
344  if (m_field->GetUnsprayedMarginPolyRef() != -1)
345  {
348  }
349  // NB no "done = true" because this crop effectively continues into the catch crop.
350  break;
351  }
352  else
353  done = true;
354  break;
355  default:
356  g_msg->Warn(WARN_BUG, "NLMaize::Do(): "
357  "Unknown event type! ", "");
358  exit(1);
359  }
360  return done;
361 }

References Farm::AddNewEvent(), cfg_NLCatchCropPct, LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), Farm::FA_AmmoniumSulphate(), Farm::FA_Slurry(), fmc_Others, Farm::FP_AmmoniumSulphate(), Farm::FP_Slurry(), g_date, g_msg, LE::GetGreenBiomass(), LE::GetMDates(), Farm::GetNextCropStartDate(), LE::GetSoilType(), LE::GetUnsprayedMarginPolyRef(), Farm::Harvest(), Farm::HerbicideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, FarmEvent::m_field, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, Crop::m_OurLandscape, FarmEvent::m_todo, nl_m_ferti_p1, nl_m_ferti_p2, nl_m_ferti_s1, nl_m_ferti_s2, nl_m_harrow, nl_m_harvest, nl_m_herbicide1, nl_m_preseeding_cultivator, nl_m_spring_plough1, nl_m_spring_plough2, nl_m_spring_sow, nl_m_spring_sow_with_ferti, nl_m_start, NL_M_START_FERTI, nl_m_straw_chopping, nl_m_stubble_harrow1, nl_m_stubble_harrow2, nl_m_winter_plough1, nl_m_winter_plough2, Calendar::OldDays(), Farm::PreseedingCultivator(), PROG_START, LE::SetVegPatchy(), LE::SetVegType(), Farm::ShallowHarrow(), Crop::SimpleEvent_(), Farm::SpringPlough(), Farm::SpringSow(), Farm::SpringSowWithFerti(), Crop::StartUpCrop(), Farm::StrawChopping(), Farm::StubbleHarrowing(), Landscape::SupplyLEPointer(), tov_NLCatchCropPea, tov_NLMaize, tov_Undefined, CfgFloat::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::WinterPlough().

◆ SetUpFarmCategoryInformation()

void NLMaize::SetUpFarmCategoryInformation ( )
inline
80  {
81  const int elements = 2 + (nl_m_foobar - NLMAIZE_BASE);
83 
84  FarmManagementCategory catlist[elements] =
85  {
86  fmc_Others, // zero element unused but must be here
87  fmc_Others,//nl_m_start = 1, // Compulsory, must always be 1 (one).
88  fmc_Others,//nl_m_sleep_all_day = NLMAIZE_BASE,
89  fmc_Cultivation,//nl_m_stubble_harrow1,
90  fmc_Cultivation,//nl_m_stubble_harrow2,
91  fmc_Cultivation,//nl_m_winter_plough1,
92  fmc_Cultivation,//nl_m_winter_plough2,
93  fmc_Fertilizer,//nl_m_ferti_p1,
94  fmc_Fertilizer,//nl_m_ferti_s1,
95  fmc_Cultivation,//nl_m_spring_plough1,
96  fmc_Cultivation,//nl_m_spring_plough2,
97  fmc_Cultivation,//nl_m_preseeding_cultivator,
98  fmc_Fertilizer,//nl_m_spring_sow_with_ferti,
99  fmc_Others,//nl_m_spring_sow,
100  fmc_Cultivation,//nl_m_harrow,
101  fmc_Fertilizer,//nl_m_ferti_p2,
102  fmc_Fertilizer,//nl_m_ferti_s2,
103  fmc_Herbicide,//nl_m_herbicide1,
104  fmc_Harvest,//nl_m_harvest,
105  fmc_Others//nl_m_straw_chopping,
106 
107  // no foobar entry
108 
109  };
110  // Iterate over the catlist elements and copy them to vector
111  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
112 
113  }

References fmc_Cultivation, fmc_Fertilizer, fmc_Harvest, fmc_Herbicide, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, nl_m_foobar, and NLMAIZE_BASE.

Referenced by NLMaize().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
nl_m_ferti_p1
Definition: NLMaize.h:42
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
Landscape::SupplyLEPointer
LE * SupplyLEPointer(int a_polyref)
Returns a pointer to the object referred to by the polygon number.
Definition: Landscape.h:1722
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
nl_m_spring_sow_with_ferti
Definition: NLMaize.h:47
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
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
nl_m_stubble_harrow2
Definition: NLMaize.h:39
Farm::Harvest
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: FarmFuncs.cpp:1364
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
nl_m_spring_sow
Definition: NLMaize.h:48
NLMAIZE_BASE
#define NLMAIZE_BASE
Definition: NLMaize.h:24
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
nl_m_winter_plough2
Definition: NLMaize.h:41
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
nl_m_harrow
Definition: NLMaize.h:49
Farm::GetNextCropStartDate
int GetNextCropStartDate(LE *a_field, TTypesOfVegetation &a_curr_veg)
Returns the start date of the next crop in the rotation.
Definition: Farm.cpp:920
Farm::AddNewEvent
void AddNewEvent(TTypesOfVegetation a_event, long a_date, LE *a_field, int a_todo, long a_num, bool a_lock, int a_start, bool a_first_year, TTypesOfVegetation a_crop, FarmManagementCategory a_fmc, bool a_forcespring, bool a_forcespringOK)
Adds an event to the event queue for a farm.
Definition: Farm.cpp:845
Farm::SpringSow
virtual bool SpringSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out a sowing event in the spring on a_field.
Definition: FarmFuncs.cpp:501
CfgFloat::value
double value() const
Definition: Configurator.h:142
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
nl_m_spring_plough2
Definition: NLMaize.h:45
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
NL_M_START_FERTI
#define NL_M_START_FERTI
A flag used to indicate autumn ploughing status.
Definition: NLMaize.h:28
nl_m_spring_plough1
Definition: NLMaize.h:44
cfg_NLCatchCropPct
CfgFloat cfg_NLCatchCropPct
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
nl_m_ferti_p2
Definition: NLMaize.h:50
Calendar::Date
long Date(void)
Definition: Calendar.h:57
Farm::FP_AmmoniumSulphate
virtual bool FP_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply Ammonium Sulphate to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:882
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
tov_NLMaize
Definition: LandscapeFarmingEnums.h:253
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
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
nl_m_winter_plough1
Definition: NLMaize.h:40
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
nl_m_start
Definition: NLMaize.h:36
FarmEvent::m_field
LE * m_field
Definition: Farm.h:391
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
NLMaize::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: NLMaize.h:80
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
tov_Undefined
Definition: LandscapeFarmingEnums.h:610
LE::SetVegType
virtual void SetVegType(TTypesOfVegetation)
Definition: Elements.h:175
LE::GetGreenBiomass
virtual double GetGreenBiomass(void)
Definition: Elements.h:160
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::FP_Slurry
virtual bool FP_Slurry(LE *a_field, double a_user, int a_days)
Apply slurry to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:823
LE
Definition: Elements.h:86
nl_m_harvest
Definition: NLMaize.h:53
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Farm::SpringSowWithFerti
virtual bool SpringSowWithFerti(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 with start fertilizer in the spring on a_field.
Definition: FarmFuncs.cpp:537
Farm::FA_AmmoniumSulphate
virtual bool FA_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply ammonium sulphate to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1081
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
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
nl_m_ferti_s1
Definition: NLMaize.h:43
nl_m_straw_chopping
Definition: NLMaize.h:54
nl_m_herbicide1
Definition: NLMaize.h:52
nl_m_stubble_harrow1
Definition: NLMaize.h:38
LE::GetUnsprayedMarginPolyRef
int GetUnsprayedMarginPolyRef(void)
Definition: Elements.h:383
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
nl_m_foobar
Definition: NLMaize.h:55
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Crop::m_forcespringpossible
bool m_forcespringpossible
Used to signal that the crop can be forced to start in spring.
Definition: Farm.h:508
nl_m_preseeding_cultivator
Definition: NLMaize.h:46
PROG_START
#define PROG_START
Definition: Farm.h:69
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
tov_NLCatchCropPea
Definition: LandscapeFarmingEnums.h:268
Crop::m_OurLandscape
Landscape * m_OurLandscape
Definition: Farm.h:506
WARN_BUG
Definition: MapErrorMsg.h:34
nl_m_ferti_s2
Definition: NLMaize.h:51
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
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