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

#include <DE_AsparagusEstablishedPlantation.h>

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

Constructor & Destructor Documentation

◆ DE_AsparagusEstablishedPlantation()

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

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

Member Function Documentation

◆ Do()

bool DE_AsparagusEstablishedPlantation::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 spring barley Fodder.

Reimplemented from Crop.

90 {
91  /******************** This block can be added to the top of all Crop::Do methods ***********************************************/
92  m_farm = a_farm; // These assignments are necessary, not for this method but for related event calls
93  m_field = a_field;
94  m_ev = a_ev;
95  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
96  bool flag = false;
97  int d1 = 0;
98  int today = g_date->Date();
100 
101  // Depending what event has occured jump to the correct bit of code
102  switch (m_ev->m_todo)
103  {
104  case de_aep_start:
105  {
107 
108  CROP_HARVEST_DO = 50;
109 
110  m_last_date = g_date->DayInYear(10, 12); // Should match the last flexdate below
111  //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
112  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
113  // Set up the date management stuff
114  // Start and stop dates for all events after harvest
115  flexdates[0][1] = g_date->DayInYear(10, 12); // last possible day of cutting2 - this is in effect day before the earliest date that a following crop can use
116 
117  flexdates[1][0] = -1;
118  flexdates[1][1] = g_date->DayInYear(10, 12); // last possible day of grazing
119 
120  // 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
121  int isSpring = 365;
122  if (StartUpCrop(isSpring, flexdates, int(de_aep_herbicide))) break;
123 
124  // End single block date checking code. Please see next line comment as well.
125  // Reinit d1 to first possible starting date.
126  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + isSpring;
127  // OK, let's go.
129  break;
130  }
131  break;
132 
133  // This is the first real farm operation
134  // This how the asparagus is managed if it is already an established plantation
135  // All events are 100% for now
136 
137  case de_aep_herbicide:
138  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
139  {
140  if (!m_farm->HerbicideTreat(m_field, 0.0, g_date->DayInYear(10, 3) - g_date->DayInYear())) {
142  break;
143  }
144  }
145  d1 = g_date->Date() + 1;
146  if (d1 < g_date->OldDays() + g_date->DayInYear(5, 3)) {
147  d1 = g_date->OldDays() + g_date->DayInYear(5, 3);
148  }
149  if (m_farm->IsStockFarmer()) //Stock Farmer
150  {
152  }
153  else SimpleEvent_(d1, de_aep_ferti_p1, false, m_farm, m_field);
154  break;
155 
156  case de_aep_ferti_s1:
157  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
158  {
159  if (!m_farm->FA_PK(m_field, 0.0, g_date->DayInYear(15, 3) - g_date->DayInYear())) {
161  break;
162  }
163  }
165  break;
166 
167  case de_aep_ferti_p1:
168  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
169  {
170  if (!m_farm->FP_PK(m_field, 0.0, g_date->DayInYear(15, 3) - g_date->DayInYear())) {
172  break;
173  }
174  }
176  break;
177 
179  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
180  {
181  if (!m_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(16, 3) - g_date->DayInYear())) {
183  break;
184  }
185  }
187  break;
188 
189  case de_aep_hilling:
190  // hilling up should be before the emergence which is ~ 427 GDD, according to weather in Brandenburg in years 2011 - 2020 this GDD was earliest reached on 27.03, but in most cases ~ 10.04
191  if (!m_farm->HillingUp(m_field, 0.0, g_date->DayInYear(25, 3) - g_date->DayInYear())) {
193  break;
194  }
196  break;
197 
198  case de_aep_harvesting: // ~55 events per year
199  // continuous harvesting till 15 June, every day
200  m_farm->HarvestShoots(m_field, 0.0, 0);
201  if (today < g_date->OldDays() + g_date->DayInYear(15, 6)) {
203  break;
204  }
205 
206  // fork of events
207  // N fertilizer treat
208  if (m_farm->IsStockFarmer()) //Stock Farmer
209  {
211  }
212  else SimpleEvent_(g_date->Date() + 1, de_aep_ferti_p2, false, m_farm, m_field);
213  // fungicide treat = MAIN
215  // insecticide treat
217  // watering treat
219  break;
220 
221  case de_aep_watering_start: // Start irrigation
222  if (!m_farm->IrrigationStart(m_field, 0.0, g_date->DayInYear(15, 7) - g_date->DayInYear())) {
224  break;
225  }
226  //Continue the irrigation
228  break;
229 
230  case de_aep_watering: // Performing irrigation once a week if no raining
231  if (!m_farm->Irrigation(m_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear(), g_date->DayInYear(30, 8))) {
233  break;
234  }
235  // end of treat
236  break;
237 
238  case de_aep_ferti_s2:
239  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
240  {
241  if (!m_farm->FA_N(m_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
243  break;
244  }
245  }
247  break;
248 
249  case de_aep_ferti_p2:
250  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
251  {
252  if (!m_farm->FP_N(m_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
254  break;
255  }
256  }
258  break;
259 
260  case de_aep_ferti_s3:
261  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
262  {
263  if (!m_farm->FA_N(m_field, 0.0, g_date->DayInYear(25, 7) - g_date->DayInYear())) {
265  break;
266  }
267  }
268  // end of treat
269  break;
270 
271  case de_aep_ferti_p3:
272  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
273  {
274  if (!m_farm->FP_N(m_field, 0.0, g_date->DayInYear(25, 7) - g_date->DayInYear())) {
276  break;
277  }
278  }
279  // end of treat
280  break;
281 
282  case de_aep_fungicide1:
283  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
284  {
285  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 7) - g_date->DayInYear())) {
287  break;
288  }
289  }
291  break;
292 
293  case de_aep_fungicide2:
294  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
295  {
296  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear())) {
298  break;
299  }
300  }
302  break;
303 
304  case de_aep_fungicide3:
305  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
306  {
307  if (!m_farm->FungicideTreat(m_field, 0.0, g_date->DayInYear(30, 9) - g_date->DayInYear())) {
309  break;
310  }
311  }
313  break;
314 
315  case de_aep_insecticide1:
316  // here we check wheter we are using ERA pesticide or not
317  d1 = g_date->DayInYear(30, 7) - g_date->DayInYear();
319  {
320  if (!cfg_pest_asparagus_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
321  {
322  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
323  }
324  else {
325  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 4);
326  }
327  if (!flag) {
329  break;
330  }
331  }
333  break;
334 
335  case de_aep_insecticide2: // 70%
336  // here we check wheter we are using ERA pesticide or not
337  d1 = g_date->DayInYear(30, 8) - g_date->DayInYear();
339  {
340  if (!cfg_pest_asparagus_on.value() || !m_field->GetLandscape()->SupplyShouldSpray()) // Not using pesticide spray
341  {
342  flag = m_farm->InsecticideTreat(m_field, 0.0, d1);
343  }
344  else {
345  flag = m_farm->ProductApplication(m_field, 0.0, d1, cfg_pest_product_amounts.value(0), ppp_1, false, 4);
346  }
347  if (!flag) {
349  break;
350  }
351  }
352  // end of treat
353  break;
354 
356  if (!m_farm->HarvestShoots(m_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
358  break;
359  }
360  if (m_farm->IsStockFarmer()) //Stock Farmer
361  {
363  break;
364  }
365  else SimpleEvent_(g_date->Date() + 1, de_aep_ferti_p4, false, m_farm, m_field);
366  break;
367 
368  case de_aep_ferti_s4:
369  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
370  {
371  if (!m_farm->FA_Manure(m_field, 0.0, g_date->DayInYear(5, 12) - g_date->DayInYear())) {
373  break;
374  }
375  }
377  break;
378 
379  case de_aep_ferti_p4:
380  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
381  {
382  if (!m_farm->FP_Manure(m_field, 0.0, g_date->DayInYear(5, 12) - g_date->DayInYear())) {
384  break;
385  }
386  }
388  break;
389 
391  if (!m_farm->RowCultivation(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
393  break;
394  }
395  done = true;
396  // So we are done, and somwhere else the farmer will queue up the start event of the next crop
397  // END of MAIN THREAD
398  break;
399 
400  default:
401  g_msg->Warn(WARN_BUG, "DE_AsparagusEstablishedPlantation::Do(): "
402  "Unknown event type! ", "");
403  exit(1);
404  }
405  return done;
406 }

References cfg_pest_asparagus_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), CROP_HARVEST_DO, Calendar::Date(), Calendar::DayInYear(), de_aep_cutting_plants, de_aep_ferti_p1, de_aep_ferti_p2, de_aep_ferti_p3, de_aep_ferti_p4, de_aep_ferti_s1, de_aep_ferti_s2, de_aep_ferti_s3, de_aep_ferti_s4, de_aep_fungicide1, de_aep_fungicide2, de_aep_fungicide3, de_aep_harrowing_rows, de_aep_harvesting, de_aep_herbicide, de_aep_hilling, de_aep_insecticide1, de_aep_insecticide2, de_aep_spring_harrow, de_aep_start, de_aep_watering, de_aep_watering_start, Farm::DoIt_prob(), Farm::FA_Manure(), Farm::FA_N(), Farm::FA_PK(), Farm::FP_Manure(), Farm::FP_N(), Farm::FP_PK(), Farm::FungicideTreat(), g_date, g_landscape_ptr, g_msg, LE::GetMDates(), Farm::HarvestShoots(), Farm::HerbicideTreat(), Farm::HillingUp(), Farm::InsecticideTreat(), Farm::Irrigation(), Farm::IrrigationStart(), Farm::IsStockFarmer(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::ProductApplication(), Farm::RowCultivation(), Farm::ShallowHarrow(), Crop::SimpleEvent_(), Crop::StartUpCrop(), Landscape::SupplyPestIncidenceFactor(), tov_DEAsparagusEstablishedPlantation, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.

◆ SetUpFarmCategoryInformation()

void DE_AsparagusEstablishedPlantation::SetUpFarmCategoryInformation ( )
inline
106  {
107  const int elements = 2 + (de_aep_foobar - DE_AEP_BASE);
109 
110  FarmManagementCategory catlist[elements] =
111  {
112  fmc_Others, // zero element unused but must be here
113  fmc_Others, // de_aep_start = 1, // Compulsory, must always be 1 (one).
114  fmc_Others, // de_aep_sleep_all_day = DE_AEP_BASE,
115  fmc_Herbicide, // de_aep_herbicide,
116  fmc_Fertilizer, // de_aep_ferti_p2, // PK on spring
117  fmc_Fertilizer, // de_aep_ferti_s2,
118  fmc_Cultivation, // de_aep_spring_harrow,
119  fmc_Cultivation, // de_aep_hilling,
120  fmc_Harvest, // de_aep_harvesting,
121  fmc_Fertilizer, // de_aep_ferti_p3, // N fertilizer I
122  fmc_Fertilizer, // de_aep_ferti_s3,
123  fmc_Fertilizer, // de_aep_ferti_p4, // N fertilizer II
124  fmc_Fertilizer, // de_aep_ferti_s4,
125  fmc_Watering, // de_aep_watering_start,
126  fmc_Watering, // de_aep_watering,
127  fmc_Fungicide, // de_aep_fungicide1,
128  fmc_Fungicide, // de_aep_fungicide2,
129  fmc_Fungicide, // de_aep_fungicide3,
130  fmc_Insecticide, // de_aep_insecticide1,
131  fmc_Insecticide, // de_aep_insecticide2,
132  fmc_Others, // de_aep_cutting_plants,
133  fmc_Fertilizer, // de_aep_ferti_p1, //organic fertilizer autumn
134  fmc_Fertilizer, // de_aep_ferti_s1,
135  fmc_Cultivation, // de_aep_harrowing_rows, //de-constructing rows before winter
136 
137  // no foobar entry
138 
139  };
140  // Iterate over the catlist elements and copy them to vector
141  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
142 
143  }

References DE_AEP_BASE, de_aep_foobar, fmc_Cultivation, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DE_AsparagusEstablishedPlantation().


The documentation for this class was generated from the following files:
DE_AsparagusEstablishedPlantation::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DE_AsparagusEstablishedPlantation.h:106
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
de_aep_ferti_p2
Definition: DE_AsparagusEstablishedPlantation.h:74
de_aep_start
Definition: DE_AsparagusEstablishedPlantation.h:66
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
de_aep_harvesting
Definition: DE_AsparagusEstablishedPlantation.h:73
de_aep_ferti_s2
Definition: DE_AsparagusEstablishedPlantation.h:75
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
de_aep_insecticide1
Definition: DE_AsparagusEstablishedPlantation.h:83
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
de_aep_watering
Definition: DE_AsparagusEstablishedPlantation.h:79
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
Farm::Irrigation
virtual bool Irrigation(LE *a_field, double a_user, int a_days, int a_max)
Generate an 'irrigation' event with a frequency defined by a_freq in the irrigation period on a_field...
Definition: FarmFuncs.cpp:1856
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
de_aep_fungicide1
Definition: DE_AsparagusEstablishedPlantation.h:80
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
Farm::FA_Manure
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1110
CROP_HARVEST_DO
#define CROP_HARVEST_DO
A flag used to indicate autumn ploughing status.
Definition: DE_AsparagusEstablishedPlantation.h:58
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
de_aep_herbicide
Definition: DE_AsparagusEstablishedPlantation.h:68
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
Farm::FungicideTreat
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
Farm::HillingUp
virtual bool HillingUp(LE *a_field, double a_user, int a_days)
Do hilling up on a_field, probably of potatoes.
Definition: FarmFuncs.cpp:1302
Farm::FP_PK
virtual bool FP_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:673
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.
de_aep_foobar
Definition: DE_AsparagusEstablishedPlantation.h:89
CfgBool::value
bool value() const
Definition: Configurator.h:164
cfg_pest_asparagus_on
CfgBool cfg_pest_asparagus_on
Turn on pesticides for asparagus.
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
Farm::IrrigationStart
virtual bool IrrigationStart(LE *a_field, double a_user, int a_days)
Start a irrigation event on a_field today.
Definition: FarmFuncs.cpp:1834
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
de_aep_harrowing_rows
Definition: DE_AsparagusEstablishedPlantation.h:88
de_aep_insecticide2
Definition: DE_AsparagusEstablishedPlantation.h:84
Calendar::Date
long Date(void)
Definition: Calendar.h:57
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
Farm::HarvestShoots
virtual bool HarvestShoots(LE *a_field, double a_user, int a_days)
HarvestShoots applied on a_field (e.g. asparagus) - details needs to be added (e.g....
Definition: FarmFuncs.cpp:1883
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
de_aep_ferti_s1
Definition: DE_AsparagusEstablishedPlantation.h:70
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
de_aep_fungicide2
Definition: DE_AsparagusEstablishedPlantation.h:81
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
Farm::FA_N
virtual bool FA_N(LE *a_field, double a_user, int a_days)
Apply N fertilizer, on a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:713
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
Landscape::SupplyPestIncidenceFactor
double SupplyPestIncidenceFactor()
Returns Landscape::m_pestincidencefactor.
Definition: Landscape.h:325
de_aep_ferti_p3
Definition: DE_AsparagusEstablishedPlantation.h:76
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
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
g_landscape_ptr
Landscape * g_landscape_ptr
Definition: Landscape.cpp:352
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
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
de_aep_ferti_p1
Definition: DE_AsparagusEstablishedPlantation.h:69
Farm::RowCultivation
virtual bool RowCultivation(LE *a_field, double a_user, int a_days)
Carry out a harrowing between crop rows on a_field.
Definition: FarmFuncs.cpp:1183
de_aep_fungicide3
Definition: DE_AsparagusEstablishedPlantation.h:82
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
de_aep_ferti_s4
Definition: DE_AsparagusEstablishedPlantation.h:87
de_aep_ferti_s3
Definition: DE_AsparagusEstablishedPlantation.h:77
DE_AEP_BASE
#define DE_AEP_BASE
Definition: DE_AsparagusEstablishedPlantation.h:53
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
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
de_aep_hilling
Definition: DE_AsparagusEstablishedPlantation.h:72
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
de_aep_watering_start
Definition: DE_AsparagusEstablishedPlantation.h:78
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
Farm::FA_PK
virtual bool FA_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer to a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1010
de_aep_ferti_p4
Definition: DE_AsparagusEstablishedPlantation.h:86
de_aep_spring_harrow
Definition: DE_AsparagusEstablishedPlantation.h:71
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
de_aep_cutting_plants
Definition: DE_AsparagusEstablishedPlantation.h:85
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
tov_DEAsparagusEstablishedPlantation
Definition: LandscapeFarmingEnums.h:511
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