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

PTCloverGrassGrazed1 class
. More...

#include <PTCloverGrassGrazed1.h>

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

PTCloverGrassGrazed1 class
.

See PTCloverGrassGrazed1.h::PTCloverGrassGrazed1ToDo for a complete list of all possible events triggered codes by the clover grass grazed management plan in the first year. 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

◆ PTCloverGrassGrazed1()

PTCloverGrassGrazed1::PTCloverGrassGrazed1 ( 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 15th September
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( 10,10 );// AAS:Last possible date to do the first operation, i.e. plough or sow
108  }

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

Member Function Documentation

◆ Do()

bool PTCloverGrassGrazed1::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 subsequently 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.

54 {
55  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
56  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
57  m_field = a_field;
58  m_ev = a_ev;
59  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
60  int d1 = 0;
61  TTypesOfVegetation l_tov = tov_PTCloverGrassGrazed1; // The current type - change to match the crop you have
62 /**********************************************To Here *************************************************************************/
63 
64  // Depending what event has occured jump to the correct bit of code
65  switch (m_ev->m_todo)
66  {
67  case pt_cgg1_start:
68  {
69  // pt_cgg1_start just sets up all the starting conditions and reference dates that are needed to start a pt_cgg1
73 
75 
76  m_last_date = g_date->DayInYear(11, 8); // Should match the last flexdate below
77  //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
78  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
79  // Set up the date management stuff
80  // Start and stop dates for all events after harvest
81  flexdates[0][1] = g_date->DayInYear(11, 8); // last possible day of cattle being out on a field - this is in effect day before the earliest date that a following crop can use
82 
83  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
84  flexdates[1][1] = g_date->DayInYear(11, 8); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
85 
86  // 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
87  int isSpring = 0;
88  if (StartUpCrop(isSpring, flexdates, int(pt_cgg1_harvest1))) break;
89 
90  // End single block date checking code. Please see next line comment as well.
91  // Reinit d1 to first possible starting date.
92  d1 = g_date->OldDays() + g_date->DayInYear(10, 9) + isSpring;
93  // OK, let's go.
94  // Here we queue up the first event which changes dependent on whether it is a forced spring sow or not
96  break;
97  }
98  break;
99 
100  // This is the first real farm operation
102  if (m_ev->m_lock || m_farm->DoIt_prob(0.50))
103  {
104  if (!m_farm->AutumnPlough(m_field, 0.0, g_date->DayInYear(10, 10) - g_date->DayInYear())) {
106  break;
107  }
108  // Fork of two events: NPK/organic and calcium
109  if (m_farm->IsStockFarmer()) //Stock Farmer // slurry thread
110  {
112  }
113  else SimpleEvent_(g_date->Date()+1, pt_cgg1_ferti_p1, false, m_farm, m_field);
114  if (m_farm->IsStockFarmer()) //Stock Farmer // calcium thread
115  {
117  }
118  else SimpleEvent_(g_date->Date()+1, pt_cgg1_ferti_p3, false, m_farm, m_field);
119  break;
120  }
122  break;
123  case pt_cgg1_ferti_s1:
124  if (m_ev->m_lock || m_farm->DoIt_prob(0.25))
125  {
126  if (!m_farm->FA_Slurry(m_field, 0.0, g_date->DayInYear(11, 10) - g_date->DayInYear())) {
128  break;
129  }
131  break;
132  }
134  break;
135  case pt_cgg1_ferti_p1:
136  if (m_ev->m_lock || m_farm->DoIt_prob(0.25))
137  {
138  if (!m_farm->FP_Slurry(m_field, 0.0, g_date->DayInYear(11, 10) - g_date->DayInYear())) {
140  break;
141  }
143  break;
144  }
146  break;
147  case pt_cgg1_ferti_s2:
148  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(12, 10) - g_date->DayInYear())) {
150  break;
151  }
153  break;
154  case pt_cgg1_ferti_p2:
155  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(12, 10) - g_date->DayInYear())) {
157  break;
158  }
160  break;
161  case pt_cgg1_ferti_s3:
162  if (!m_farm->FA_Calcium(m_field, 0.0, g_date->DayInYear(11, 10) - g_date->DayInYear())) {
164  break;
165  }
166  // End of thread
167  break;
168  case pt_cgg1_ferti_p3:
169  if (!m_farm->FP_Calcium(m_field, 0.0, g_date->DayInYear(11, 10) - g_date->DayInYear())) {
171  break;
172  }
173  // End of thread
174  break;
175  case pt_cgg1_autumn_roll:
176  if (!m_farm->AutumnRoll(m_field, 0.0, g_date->DayInYear(13, 10) - g_date->DayInYear())) {
178  break;
179  }
181  break;
182  case pt_cgg1_autumn_sow:// to cattle_out1
183  if (!m_farm->AutumnSow(m_field, 0.0, g_date->DayInYear(14, 10) - g_date->DayInYear())) {
185  break;
186  }
188  break;
189 
190  // preseeding_cultivator_sow // to cattle_out1
194  break;
195  }
196  // Fork of two events: NPK and calcium
197  if (m_farm->IsStockFarmer()) //Stock Farmer // NPK thread
198  {
200  }
201  else SimpleEvent_(g_date->Date()+1, pt_cgg1_ferti_p4, false, m_farm, m_field);
202  if (m_farm->IsStockFarmer()) //Stock Farmer // calcium thread
203  {
205  }
206  else SimpleEvent_(g_date->Date()+1, pt_cgg1_ferti_p3, false, m_farm, m_field);
207  break;
208  case pt_cgg1_ferti_s4:
209  if (!m_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(12, 10) - g_date->DayInYear())) {
211  break;
212  }
214  break;
215  case pt_cgg1_ferti_p4:
216  if (!m_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(12, 10) - g_date->DayInYear())) {
218  break;
219  }
221  break;
222  //
223 
224  case pt_cgg1_cattle_out1:
225  if (!m_farm->CattleOutLowGrazing(m_field, 0.0, g_date->DayInYear(13, 12) - g_date->DayInYear())) {// the cattle need to be out at least 7 days, so put it out no later than 20.12 - 7 days = 13.12
227  break;
228  }
231  break;
232 
233  case pt_cgg1_cattle_is_out1: // Keep the cattle out there
236  break;
237  }
238  if (m_farm->DoIt_prob(0.70))
239  {
241  }
242  else SimpleEvent_(g_date->OldDays() + g_date->DayInYear(1, 7) + 365, pt_cgg1_harvest2, false, m_farm, m_field);
243  break;
244 
245  case pt_cgg1_harvest1:
246  if (!m_farm->Harvest(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
248  break;
249  }
251  break;
252 
254  if (!m_farm->HayBailing(m_field, 0.0, g_date->DayInYear(21, 5) - g_date->DayInYear())) {
256  break;
257  }
259  break;
260 
261  case pt_cgg1_cattle_out2:
262  if (!m_farm->CattleOutLowGrazing(m_field, 0.0, g_date->DayInYear(30, 5) - g_date->DayInYear())) {
264  break;
265  }
268  break;
269 
270  case pt_cgg1_cattle_is_out2: // Keep the cattle out there
271  // CattleIsOutLow() returns false if it is not time to stop grazing
274  break;
275  }
277  break;
278 
279  case pt_cgg1_wait:
280  done = true;
281  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
282  // END of MAIN THREAD
283  break;
284 
285  case pt_cgg1_harvest2:
286  if (!m_farm->Harvest(m_field, 0.0, g_date->DayInYear(31, 7) - g_date->DayInYear())) {
288  break;
289  }
291  break;
292 
294  if (!m_farm->HayBailing(m_field, 0.0, g_date->DayInYear(1, 8) - g_date->DayInYear())) {
296  break;
297  }
299  break;
300 
301  case pt_cgg1_cattle_out3:
302  if (!m_farm->CattleOutLowGrazing(m_field, 0.0, g_date->DayInYear(10, 8) - g_date->DayInYear())) {
304  break;
305  }
308  break;
309 
310  case pt_cgg1_cattle_is_out3: // Keep the cattle out there
311  // CattleIsOutLow() returns false if it is not time to stop grazing
314  break;
315  }
316  done = true;
317  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
318  // END of MAIN THREAD
319  break;
320  default:
321  g_msg->Warn(WARN_BUG, "PTCloverGrassGrazed1::Do(): "
322  "Unknown event type! ", "");
323  exit(1);
324  }
325  return done;
326 }

References Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), Farm::CattleIsOutLow2(), Farm::CattleOutLowGrazing(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), Farm::DoIt_prob(), Farm::FA_Calcium(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FP_Calcium(), Farm::FP_NPK(), Farm::FP_Slurry(), g_date, g_msg, LE::GetMDates(), Farm::Harvest(), Farm::HayBailing(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), Farm::PreseedingCultivatorSow(), PT_CGG1_1_CATTLEOUT_DATE, PT_CGG1_2_CATTLEOUT_DATE, PT_CGG1_3_CATTLEOUT_DATE, pt_cgg1_autumn_plough, pt_cgg1_autumn_roll, pt_cgg1_autumn_sow, pt_cgg1_cattle_is_out1, pt_cgg1_cattle_is_out2, pt_cgg1_cattle_is_out3, pt_cgg1_cattle_out1, pt_cgg1_cattle_out2, pt_cgg1_cattle_out3, pt_cgg1_ferti_p1, pt_cgg1_ferti_p2, pt_cgg1_ferti_p3, pt_cgg1_ferti_p4, pt_cgg1_ferti_s1, pt_cgg1_ferti_s2, pt_cgg1_ferti_s3, pt_cgg1_ferti_s4, pt_cgg1_harvest1, pt_cgg1_harvest2, pt_cgg1_hay_bailing1, pt_cgg1_hay_bailing2, pt_cgg1_preseeding_cultivator_sow, pt_cgg1_start, pt_cgg1_wait, Crop::SimpleEvent(), Crop::SimpleEvent_(), Crop::StartUpCrop(), tov_PTCloverGrassGrazed1, MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void PTCloverGrassGrazed1::SetUpFarmCategoryInformation ( )
inline
109  {
110  const int elements = 2 + (pt_cgg1_foobar - PTCLOVERGRASSGRAZED1_BASE);
112 
113  FarmManagementCategory catlist[elements] =
114  {
115  fmc_Others, // zero element unused but must be here
116  fmc_Others, //pt_cgg1_start = 1, // Compulsory, must always be 1 (one).
117  fmc_Others, //pt_cgg1_sleep_all_day = PTCLOVERGRASSGRAZED1_BASE,
118  fmc_Cultivation, //pt_cgg1_autumn_plough,
119  fmc_Fertilizer, //pt_cgg1_ferti_p1, // slurry
120  fmc_Fertilizer, //pt_cgg1_ferti_s1,
121  fmc_Fertilizer, //pt_cgg1_ferti_p2, // NPK
122  fmc_Fertilizer, //pt_cgg1_ferti_s2,
123  fmc_Fertilizer, //pt_cgg1_ferti_p3, // Calcium
124  fmc_Fertilizer, //pt_cgg1_ferti_s3,
125  fmc_Fertilizer, //pt_cgg1_ferti_p4, // NPK
126  fmc_Fertilizer, //pt_cgg1_ferti_s4,
127  fmc_Others, //pt_cgg1_autumn_roll,
128  fmc_Others, //pt_cgg1_autumn_sow,
129  fmc_Cultivation, //pt_cgg1_preseeding_cultivator_sow,
130  fmc_Harvest, //pt_cgg1_harvest1,
131  fmc_Harvest, //pt_cgg1_harvest2,
132  fmc_Others, //pt_cgg1_hay_bailing1,
133  fmc_Others, //pt_cgg1_hay_bailing2,
134  fmc_Grazing, //pt_cgg1_cattle_out1,
135  fmc_Grazing, //pt_cgg1_cattle_is_out1,
136  fmc_Grazing, //pt_cgg1_cattle_out2,
137  fmc_Grazing, //pt_cgg1_cattle_is_out2,
138  fmc_Grazing, //pt_cgg1_cattle_out3,
139  fmc_Grazing, //pt_cgg1_cattle_is_out3,
140  fmc_Others, //pt_cgg1_wait,
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 fmc_Cultivation, fmc_Fertilizer, fmc_Grazing, fmc_Harvest, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, pt_cgg1_foobar, and PTCLOVERGRASSGRAZED1_BASE.

Referenced by PTCloverGrassGrazed1().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
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::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
pt_cgg1_preseeding_cultivator_sow
Definition: PTCloverGrassGrazed1.h:72
tov_PTCloverGrassGrazed1
Definition: LandscapeFarmingEnums.h:314
pt_cgg1_ferti_p2
Definition: PTCloverGrassGrazed1.h:64
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
pt_cgg1_autumn_plough
Definition: PTCloverGrassGrazed1.h:61
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
pt_cgg1_ferti_p4
Definition: PTCloverGrassGrazed1.h:68
pt_cgg1_start
Definition: PTCloverGrassGrazed1.h:59
Farm::DoIt_prob
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
PT_CGG1_3_CATTLEOUT_DATE
#define PT_CGG1_3_CATTLEOUT_DATE
Definition: PTCloverGrassGrazed1.h:51
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
pt_cgg1_ferti_s1
Definition: PTCloverGrassGrazed1.h:63
pt_cgg1_cattle_out1
Definition: PTCloverGrassGrazed1.h:77
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
pt_cgg1_ferti_s2
Definition: PTCloverGrassGrazed1.h:65
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Farm::FA_NPK
virtual bool FA_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:982
PTCloverGrassGrazed1::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: PTCloverGrassGrazed1.h:109
Farm::CattleIsOutLow2
virtual bool CattleIsOutLow2(LE *a_field, double a_user, int a_days, int a_max, int a_max_days)
Generate a 'cattle_out_low2' event for every day the cattle are on a_field, cattle is low grazing and...
Definition: FarmFuncs.cpp:2607
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
Farm::CattleOutLowGrazing
virtual bool CattleOutLowGrazing(LE *a_field, double a_user, int a_days)
Start a extensive grazing event on a_field today.
Definition: FarmFuncs.cpp:2439
pt_cgg1_hay_bailing1
Definition: PTCloverGrassGrazed1.h:75
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
pt_cgg1_cattle_is_out2
Definition: PTCloverGrassGrazed1.h:80
Calendar::Date
long Date(void)
Definition: Calendar.h:57
pt_cgg1_cattle_is_out1
Definition: PTCloverGrassGrazed1.h:78
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::FA_Calcium
virtual bool FA_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:1168
pt_cgg1_ferti_s3
Definition: PTCloverGrassGrazed1.h:67
pt_cgg1_cattle_is_out3
Definition: PTCloverGrassGrazed1.h:82
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
pt_cgg1_ferti_s4
Definition: PTCloverGrassGrazed1.h:69
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
pt_cgg1_harvest2
Definition: PTCloverGrassGrazed1.h:74
PTCLOVERGRASSGRAZED1_BASE
#define PTCLOVERGRASSGRAZED1_BASE
Definition: PTCloverGrassGrazed1.h:45
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
pt_cgg1_harvest1
Definition: PTCloverGrassGrazed1.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
pt_cgg1_autumn_roll
Definition: PTCloverGrassGrazed1.h:70
Farm::PreseedingCultivatorSow
virtual bool PreseedingCultivatorSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out preseeding cultivation together with sow on a_field (tilling and sowing set including culti...
Definition: FarmFuncs.cpp:325
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::AutumnRoll
virtual bool AutumnRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the autumn on a_field.
Definition: FarmFuncs.cpp:299
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
pt_cgg1_foobar
Definition: PTCloverGrassGrazed1.h:84
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
Farm::AutumnPlough
virtual bool AutumnPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the autumn on a_field.
Definition: FarmFuncs.cpp:212
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
pt_cgg1_autumn_sow
Definition: PTCloverGrassGrazed1.h:71
fmc_Grazing
Definition: LandscapeFarmingEnums.h:1010
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
pt_cgg1_cattle_out2
Definition: PTCloverGrassGrazed1.h:79
pt_cgg1_cattle_out3
Definition: PTCloverGrassGrazed1.h:81
Farm::AutumnSow
virtual bool AutumnSow(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 autumn on a_field.
Definition: FarmFuncs.cpp:360
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
pt_cgg1_ferti_p3
Definition: PTCloverGrassGrazed1.h:66
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
pt_cgg1_ferti_p1
Definition: PTCloverGrassGrazed1.h:62
PT_CGG1_1_CATTLEOUT_DATE
#define PT_CGG1_1_CATTLEOUT_DATE
A flag used to indicate cattle out dates.
Definition: PTCloverGrassGrazed1.h:49
Crop::Crop
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
pt_cgg1_wait
Definition: PTCloverGrassGrazed1.h:83
pt_cgg1_hay_bailing2
Definition: PTCloverGrassGrazed1.h:76
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
PT_CGG1_2_CATTLEOUT_DATE
#define PT_CGG1_2_CATTLEOUT_DATE
Definition: PTCloverGrassGrazed1.h:50
WARN_BUG
Definition: MapErrorMsg.h:34
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
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