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

DK_OBushFruit_Perm1 class
. More...

#include <DK_OBushFruit_Perm1.h>

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

DK_OBushFruit_Perm1 class
.

See DK_OBushFruit_Perm1.h::DK_OBushFruit_Perm1ToDo 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

◆ DK_OBushFruit_Perm1()

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

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

Member Function Documentation

◆ Do()

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

Reimplemented from Crop.

60 {
61  m_farm = a_farm;
62  m_field = a_field;
63  m_ev = a_ev;
64  bool done = false; // The boolean value done indicates when we are totally finished with this plan (i.e. it is set to true).
65  int d1 = 0;
67  // Depending what event has occured jump to the correct bit of code
68  switch (m_ev->m_todo)
69  {
70  case dk_obfp1_start:
71  {
72  // dk_obfp1_start just sets up all the starting conditions and reference dates that are needed to start a dk_obfp1
73 
75 
76  a_field->ClearManagementActionSum();
77  m_last_date = g_date->DayInYear(31, 10); // Should match the last flexdate below
78  //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
79  std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
80  // Set up the date management stuff
81  // Start and stop dates for all events after harvest
82  flexdates[0][1] = g_date->DayInYear(31, 10); // last possible day of harvest - this is in effect day before the earliest date that a following crop can use - NO harvest here - this is hwater3 instead
83  // Now these are done in pairs, start & end for each operation. If its not used then -1
84  flexdates[1][0] = -1; // This date will be moved back as far as necessary and potentially to flexdates 1 (start op 1)
85  flexdates[1][1] = g_date->DayInYear(31, 10); // This date will be moved back as far as necessary and potentially to flexdates 1 (end op 1)
86 
87  // 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
88  if (StartUpCrop(365, flexdates, int(dk_obfp1_sleep_all_day))) 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(1, 3);
93  // OK, let's go.
94  // LKM: Here we queue up the first event
95  //Each field has assign randomly a DK_OBFP1_YEARS_AFTER_PLANT
97  {
98  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + 365;
100  }
101  else if ((DK_OBFP1_YEARS_AFTER_PLANT + g_date->GetYearNumber()) % 6 == 1)
102  {
103  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + 365;
104  SimpleEvent(d1, dk_obfp1_water2, false);
105  }
106  else
107  {
108  d1 = g_date->OldDays() + g_date->DayInYear(1, 3) + 365;
109  SimpleEvent(d1, dk_obfp_water1, false);
110  }
111  break;
112 
113  }
114  break;
115 
116  // LKM: This is the first real farm operation
118  if (!m_farm->SleepAllDay(m_field, 0.0, g_date->DayInYear(29, 4) - g_date->DayInYear())) {
120  break;
121  }
123  break;
124 
126  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
127  if (!m_farm->Molluscicide(m_field, 0.0, g_date->DayInYear(30, 10) - g_date->DayInYear())) {
129  break;
130  }
131  }
132  if (a_farm->IsStockFarmer()) {
134  break;
135  }
136  else SimpleEvent(g_date->Date() + 1, dk_obfp1_fertilizer1_p, false);
137  break;
138 
140  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
141  {
142  if (!a_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
144  break;
145  }
146  }
148  break;
149 
151  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
152  {
153  if (!a_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
155  break;
156  }
157  }
159  break;
160 
162  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
163  {
164  if (!a_farm->AutumnHarrow(m_field, 0.0, g_date->DayInYear(31, 10) - g_date->DayInYear())) {
166  break;
167  }
168  }
170  break;
172  if (!a_farm->AutumnHarrow(m_field, 0.0, g_date->DayInYear(7, 11) - g_date->DayInYear())) {
174  break;
175  }
177  break;
179  if (!a_farm->AutumnHarrow(m_field, 0.0, g_date->DayInYear(14, 11) - g_date->DayInYear())) {
181  break;
182  }
184  break;
186  if (!a_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(21, 11) - g_date->DayInYear())) {
188  break;
189  }
191  break;
193  if (!a_farm->ShallowHarrow(m_field, 0.0, g_date->DayInYear(22, 11) - g_date->DayInYear())) {
195  break;
196  }
198  break;
199  case dk_obfp1_plant:
200  if (!a_farm->AutumnSow(m_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
201  SimpleEvent(g_date->Date() + 1, dk_obfp1_plant, true);
202  break;
203  }
205  break;
206  case dk_obfp1_water1:
207  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(30, 11) - g_date->DayInYear())) {
208  SimpleEvent(g_date->Date() + 1, dk_obfp1_water1, true);
209  break;
210  }
212  break;
214  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(10, 12) - g_date->DayInYear())) {
216  break;
217  }
218  done = true;
219  break; //est year done
220 
221  // first year after est - no harvest
222  case dk_obfp1_water2:
223  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(29, 4) - g_date->DayInYear())) {
224  SimpleEvent(g_date->Date() + 1, dk_obfp1_water2, true);
225  break;
226  }
227  if (a_farm->IsStockFarmer()) {
229  break;
230  }
231  else SimpleEvent(g_date->Date() + 1, dk_obfp1_fertilizer2_p, false);
232  break;
233 
235  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
236  {
237  if (!a_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
239  break;
240  }
241  }
243  break;
244 
246  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
247  {
248  if (!a_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
250  break;
251  }
252  }
254  break;
256  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
258  break;
259  }
261  break;
263  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
265  break;
266  }
268  break;
270  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
272  break;
273  }
274  // fork of parallel events:
275  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 5), dk_obfp1_molluscicide2, false); // molluscicide thread
276  SimpleEvent(g_date->OldDays() + g_date->DayInYear(1, 6), dk_obfp1_water3, false); // water thread
277  if (a_farm->IsStockFarmer()) {
279  break;
280  }
281  else SimpleEvent(g_date->Date() + 1, dk_obfp1_fertilizer3_p, false);
282  break;
283 
285  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
286  if (!m_farm->Molluscicide(m_field, 0.0, g_date->DayInYear(1, 9) - g_date->DayInYear())) {
288  break;
289  }
290  }
291  break; // end of molluscicide thread
292  case dk_obfp1_water3:
293  if (!a_farm->Water(m_field, 0.0, g_date->DayInYear(31, 8) - g_date->DayInYear())) {
294  SimpleEvent(g_date->Date() + 1, dk_obfp1_water3, true);
295  break;
296  }
297  break; // end of water thread
299  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
300  {
301  if (!a_farm->FA_NPK(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
303  break;
304  }
305  }
307  break;
308 
310  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
311  {
312  if (!a_farm->FP_NPK(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
314  break;
315  }
316  }
318  break;
320  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
322  break;
323  }
325  break;
327  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(10, 7) - g_date->DayInYear())) {
329  break;
330  }
332  break;
334  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(20, 7) - g_date->DayInYear())) {
336  break;
337  }
339  break;
341  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(10, 8) - g_date->DayInYear())) {
343  break;
344  }
346  break;
348  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(20, 8) - g_date->DayInYear())) {
350  break;
351  }
353  break;
355  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(30, 8) - g_date->DayInYear())) {
357  break;
358  }
360  break;
361  case dk_obfp1_water4:
362  if (!a_farm->Water(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
363  SimpleEvent(g_date->Date() + 1, dk_obfp1_water4, true);
364  break;
365  }
366  done = true;
367  break; // first year after est done
368 
369  //4 years of harvest
370  case dk_obfp_water1:
371  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
372  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(29, 4) - g_date->DayInYear())) {
373  SimpleEvent(g_date->Date() + 1, dk_obfp_water1, true);
374  break;
375  }
376  }
377  if (a_farm->IsStockFarmer()) {
379  break;
380  }
381  else
383  break;
384 
386  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
387  {
388  if (!a_farm->FA_NK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
390  break;
391  }
392  }
394  break;
395 
397  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
398  {
399  if (!a_farm->FP_NK(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
401  break;
402  }
403  }
405  break;
406 
408  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(30, 4) - g_date->DayInYear())) {
410  break;
411  }
412 
413  //fork of parallel events:
416  SimpleEvent(g_date->Date() + 10, dk_obfp_row_cultivation2, false); // main thread
417  break;
419  if (m_ev->m_lock || m_farm->DoIt_prob(0.50)) {
420  if (!m_farm->Molluscicide(m_field, 0.0, g_date->DayInYear(1, 9) - g_date->DayInYear())) {
422  break;
423  }
424  }
425  break; // end of molluscicide thread
426  case dk_obfp_water2:
427  if (m_ev->m_lock || m_farm->DoIt_prob(1.00)) {
428  if (!m_farm->Water(m_field, 0.0, g_date->DayInYear(30, 6) - g_date->DayInYear())) {
429  SimpleEvent(g_date->Date() + 1, dk_obfp_water2, true);
430  break;
431  }
432  }
433  break; // end of water thread
435  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(10, 5) - g_date->DayInYear())) {
437  break;
438  }
440  break;
442  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(20, 5) - g_date->DayInYear())) {
444  break;
445  }
447  break;
449  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(25, 6) - g_date->DayInYear())) {
451  break;
452  }
454  break;
456  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(5, 7) - g_date->DayInYear())) {
458  break;
459  }
461  break;
463  if (!a_farm->RowCultivation(m_field, 0.0, g_date->DayInYear(15, 7) - g_date->DayInYear())) {
465  break;
466  }
468  break;
469  case dk_obfp_harvest:
470  if (!a_farm->HarvestBF_Machine(m_field, 0.0, g_date->DayInYear(15, 8) - g_date->DayInYear())) {
471  SimpleEvent(g_date->Date() + 1, dk_obfp_harvest, true);
472  break;
473  }
474  SimpleEvent(g_date->Date() + 1, dk_obfp_cut_bushes, false);
475  break;
476  case dk_obfp_cut_bushes:
477  if (!a_farm->Pruning(m_field, 0.0, g_date->DayInYear(16, 8) - g_date->DayInYear())) {
478  SimpleEvent(g_date->Date() + 1, dk_obfp_cut_bushes, true);
479  break;
480  }
481  if (a_farm->IsStockFarmer()) {
483  break;
484  }
485  else
487  break;
489  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
490  {
491  if (!a_farm->FA_NK(m_field, 0.0, g_date->DayInYear(17, 8) - g_date->DayInYear())) {
493  break;
494  }
495  }
497  break;
498 
500  if (m_ev->m_lock || m_farm->DoIt_prob(1.00))
501  {
502  if (!a_farm->FP_NK(m_field, 0.0, g_date->DayInYear(17, 8) - g_date->DayInYear())) {
504  break;
505  }
506  }
508  break;
509  case dk_obfp_water3:
510  if (!a_farm->Water(m_field, 0.0, m_field->GetMDates(1, 0) - g_date->DayInYear())) {
511  SimpleEvent(g_date->Date() + 1, dk_obfp_water3, true);
512  break;
513  }
514  done = true;
515  break;
516  // So we are done, and somewhere else the farmer will queue up the start event of the next crop (DK_BushFruit_Perm2)
517  // END of MAIN THREAD
518  break;
519  default:
520  g_msg->Warn(WARN_BUG, "DK_OBushFruit_Perm1::Do(): "
521  "Unknown event type! ", "");
522  exit(1);
523  }
524  return done;
525 }

References Farm::AutumnHarrow(), Farm::AutumnSow(), LE::ClearManagementActionSum(), Calendar::Date(), Calendar::DayInYear(), dk_obfp1_autumn_harrow1, dk_obfp1_autumn_harrow2, dk_obfp1_autumn_harrow3, dk_obfp1_fertilizer1_p, dk_obfp1_fertilizer1_s, dk_obfp1_fertilizer2_p, dk_obfp1_fertilizer2_s, dk_obfp1_fertilizer3_p, dk_obfp1_fertilizer3_s, dk_obfp1_molluscicide1, dk_obfp1_molluscicide2, dk_obfp1_plant, dk_obfp1_row_cultivation1, dk_obfp1_row_cultivation10, dk_obfp1_row_cultivation2, dk_obfp1_row_cultivation3, dk_obfp1_row_cultivation4, dk_obfp1_row_cultivation5, dk_obfp1_row_cultivation6, dk_obfp1_row_cultivation7, dk_obfp1_row_cultivation8, dk_obfp1_row_cultivation9, dk_obfp1_shallow_harrow1, dk_obfp1_shallow_harrow2, dk_obfp1_sleep_all_day, dk_obfp1_start, dk_obfp1_water1, dk_obfp1_water2, dk_obfp1_water3, dk_obfp1_water4, DK_OBFP1_YEARS_AFTER_PLANT, dk_obfp_cut_bushes, dk_obfp_fertilizer1_p, dk_obfp_fertilizer1_s, dk_obfp_fertilizer2_p, dk_obfp_fertilizer2_s, dk_obfp_harvest, dk_obfp_molluscicide, dk_obfp_row_cultivation1, dk_obfp_row_cultivation2, dk_obfp_row_cultivation3, dk_obfp_row_cultivation4, dk_obfp_row_cultivation5, dk_obfp_row_cultivation6, dk_obfp_water1, dk_obfp_water2, dk_obfp_water3, Farm::DoIt_prob(), Farm::FA_NK(), Farm::FA_NPK(), Farm::FP_NK(), Farm::FP_NPK(), g_date, g_msg, LE::GetMDates(), Calendar::GetYearNumber(), Farm::HarvestBF_Machine(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Farm::Molluscicide(), Calendar::OldDays(), Farm::Pruning(), Farm::RowCultivation(), Farm::ShallowHarrow(), Crop::SimpleEvent(), Farm::SleepAllDay(), Crop::StartUpCrop(), tov_DKOBushFruit_Perm1, MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().

◆ SetUpFarmCategoryInformation()

void DK_OBushFruit_Perm1::SetUpFarmCategoryInformation ( )
inline
105  {
106  const int elements = 2 + (dk_obfp1_foobar - DK_OBFP1_BASE);
108 
109  FarmManagementCategory catlist[elements] =
110  {
111  fmc_Others, // zero element unused but must be here
112  fmc_Others, // dk_obfp1_start = 1, // Compulsory, must always be 1 (one).
113  fmc_Others, // dk_obfp1_sleep_all_day = DK_OBFP1_BASE,
114  fmc_Others, // dk_obfp1_molluscicide1,
115  fmc_Fertilizer, // dk_obfp1_fertilizer1_s,
116  fmc_Fertilizer, // dk_obfp1_fertilizer1_p,
117  fmc_Cultivation, // dk_obfp1_spring_harrow1,
118  fmc_Cultivation, // dk_obfp1_spring_harrow2,
119  fmc_Cultivation, // dk_obfp1_spring_harrow3,
120  fmc_Cultivation, // dk_obfp1_shallow_harrow1,
121  fmc_Cultivation, // dk_obfp1_shallow_harrow2,
122  fmc_Others, // dk_obfp1_plant,
123  fmc_Watering, // dk_obfp1_water1,
124  fmc_Cultivation, // dk_obfp1_row_cultivation1,
125  fmc_Watering, // dk_obfp1_water2,
126  fmc_Fertilizer, // dk_obfp1_fertilizer2_s,
127  fmc_Fertilizer, // dk_obfp1_fertilizer2_p,
128  fmc_Cultivation, // dk_obfp1_row_cultivation2,
129  fmc_Cultivation, // dk_obfp1_row_cultivation3,
130  fmc_Cultivation, // dk_obfp1_row_cultivation4,
131  fmc_Fertilizer, // dk_obfp1_fertilizer3_s,
132  fmc_Fertilizer, // dk_obfp1_fertilizer3_p,
133  fmc_Watering, // dk_obfp1_water3,
134  fmc_Cultivation, // dk_obfp1_row_cultivation5,
135  fmc_Cultivation, // dk_obfp1_row_cultivation6,
136  fmc_Cultivation, // dk_obfp1_row_cultivation7,
137  fmc_Others, // dk_obfp1_molluscicide2,
138  fmc_Cultivation, // dk_obfp1_row_cultivation8,
139  fmc_Cultivation, // dk_obfp1_row_cultivation9,
140  fmc_Cultivation, // dk_obfp1_row_cultivation10,
141  fmc_Watering, // dk_obfp1_water4,
142  fmc_Watering, // dk_obfp_water1,
143  fmc_Fertilizer, // dk_obfp_fertilizer1_s,
144  fmc_Fertilizer, // dk_obfp_fertilizer1_p,
145  fmc_Cultivation, // dk_obfp_row_cultivation1,
146  fmc_Cultivation, // dk_obfp_row_cultivation2,
147  fmc_Cultivation, // dk_obfp_row_cultivation3,
148  fmc_Watering, // dk_obfp_water2,
149  fmc_Cultivation, // dk_obfp_row_cultivation4,
150  fmc_Cultivation, // dk_obfp_row_cultivation5,
151  fmc_Cultivation, // dk_obfp_row_cultivation6,
152  fmc_Others, // dk_obfp_molluscicide,
153  fmc_Harvest, // dk_obfp_harvest,
154  fmc_Cutting, // dk_obfp_cut_bushes,
155  fmc_Fertilizer, // dk_obfp_fertilizer2_s,
156  fmc_Fertilizer, // dk_obfp_fertilizer2_p,
157  fmc_Watering // dk_obfp_water3,
158 
159 
160  // no foobar entry
161 
162  };
163  // Iterate over the catlist elements and copy them to vector
164  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
165 
166  }

References DK_OBFP1_BASE, dk_obfp1_foobar, fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Harvest, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.

Referenced by DK_OBushFruit_Perm1().


The documentation for this class was generated from the following files:
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
DK_OBFP1_BASE
#define DK_OBFP1_BASE
Definition: DK_OBushFruit_Perm1.h:25
dk_obfp1_autumn_harrow1
Definition: DK_OBushFruit_Perm1.h:41
dk_obfp1_row_cultivation8
Definition: DK_OBushFruit_Perm1.h:62
dk_obfp1_fertilizer3_s
Definition: DK_OBushFruit_Perm1.h:55
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
dk_obfp1_water1
Definition: DK_OBushFruit_Perm1.h:47
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
dk_obfp_row_cultivation6
Definition: DK_OBushFruit_Perm1.h:75
dk_obfp1_sleep_all_day
Definition: DK_OBushFruit_Perm1.h:37
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
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
dk_obfp_fertilizer2_s
Definition: DK_OBushFruit_Perm1.h:79
Farm::Molluscicide
virtual bool Molluscicide(LE *a_field, double a_user, int a_days)
Apply molluscicide to a_field.
Definition: FarmFuncs.cpp:2310
dk_obfp_row_cultivation5
Definition: DK_OBushFruit_Perm1.h:74
dk_obfp1_fertilizer1_p
Definition: DK_OBushFruit_Perm1.h:40
dk_obfp1_row_cultivation2
Definition: DK_OBushFruit_Perm1.h:52
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
dk_obfp1_water3
Definition: DK_OBushFruit_Perm1.h:57
dk_obfp1_row_cultivation7
Definition: DK_OBushFruit_Perm1.h:60
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
dk_obfp_row_cultivation2
Definition: DK_OBushFruit_Perm1.h:70
dk_obfp1_fertilizer1_s
Definition: DK_OBushFruit_Perm1.h:39
DK_OBFP1_YEARS_AFTER_PLANT
#define DK_OBFP1_YEARS_AFTER_PLANT
Definition: DK_OBushFruit_Perm1.h:23
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
dk_obfp1_molluscicide2
Definition: DK_OBushFruit_Perm1.h:61
dk_obfp1_autumn_harrow3
Definition: DK_OBushFruit_Perm1.h:43
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
dk_obfp_molluscicide
Definition: DK_OBushFruit_Perm1.h:76
fmc_Cutting
Definition: LandscapeFarmingEnums.h:1009
dk_obfp1_molluscicide1
Definition: DK_OBushFruit_Perm1.h:38
dk_obfp1_water2
Definition: DK_OBushFruit_Perm1.h:49
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
dk_obfp1_row_cultivation3
Definition: DK_OBushFruit_Perm1.h:53
dk_obfp_row_cultivation3
Definition: DK_OBushFruit_Perm1.h:71
DK_OBushFruit_Perm1::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: DK_OBushFruit_Perm1.h:105
dk_obfp_fertilizer1_s
Definition: DK_OBushFruit_Perm1.h:67
dk_obfp1_shallow_harrow2
Definition: DK_OBushFruit_Perm1.h:45
Calendar::Date
long Date(void)
Definition: Calendar.h:57
dk_obfp_water2
Definition: DK_OBushFruit_Perm1.h:72
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
dk_obfp1_start
Definition: DK_OBushFruit_Perm1.h:36
dk_obfp_harvest
Definition: DK_OBushFruit_Perm1.h:77
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
fmc_Watering
Definition: LandscapeFarmingEnums.h:1011
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
dk_obfp1_row_cultivation10
Definition: DK_OBushFruit_Perm1.h:64
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
dk_obfp_row_cultivation1
Definition: DK_OBushFruit_Perm1.h:69
dk_obfp1_row_cultivation1
Definition: DK_OBushFruit_Perm1.h:48
dk_obfp1_fertilizer2_p
Definition: DK_OBushFruit_Perm1.h:51
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
tov_DKOBushFruit_Perm1
Definition: LandscapeFarmingEnums.h:444
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
dk_obfp1_row_cultivation9
Definition: DK_OBushFruit_Perm1.h:63
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
Farm::ShallowHarrow
virtual bool ShallowHarrow(LE *a_field, double a_user, int a_days)
Carry out a shallow harrow event on a_field, e.g., after grass cutting event.
Definition: FarmFuncs.cpp:473
Farm::SleepAllDay
virtual bool SleepAllDay(LE *a_field, double a_user, int a_days)
Nothing to to today on a_field.
Definition: FarmFuncs.cpp:272
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
Farm::Water
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: FarmFuncs.cpp:1330
dk_obfp1_plant
Definition: DK_OBushFruit_Perm1.h:46
Crop::m_last_date
int m_last_date
Definition: Farm.h:503
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
dk_obfp_fertilizer1_p
Definition: DK_OBushFruit_Perm1.h:68
dk_obfp1_foobar
Definition: DK_OBushFruit_Perm1.h:82
Farm::FA_NK
virtual bool FA_NK(LE *a_field, double a_user, int a_days)
Apply NK fertilizer, on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:779
dk_obfp_row_cultivation4
Definition: DK_OBushFruit_Perm1.h:73
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
dk_obfp_water3
Definition: DK_OBushFruit_Perm1.h:81
dk_obfp1_water4
Definition: DK_OBushFruit_Perm1.h:65
dk_obfp1_row_cultivation6
Definition: DK_OBushFruit_Perm1.h:59
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
Farm::HarvestBF_Machine
virtual bool HarvestBF_Machine(LE *a_field, double a_user, int a_days)
Harvest bush fruit on a_field - tramlines since fruits are picked by machine, the bush stays on field...
Definition: FarmFuncs.cpp:1814
dk_obfp_water1
Definition: DK_OBushFruit_Perm1.h:66
dk_obfp1_row_cultivation5
Definition: DK_OBushFruit_Perm1.h:58
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
Farm::FP_NK
virtual bool FP_NK(LE *a_field, double a_user, int a_days)
Apply NK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:766
Farm::Pruning
virtual bool Pruning(LE *a_field, double a_user, int a_days)
Pruning applied on a_field - details needs to be added (e.g., impact on biomass, influence/impacts in...
Definition: FarmFuncs.cpp:1897
dk_obfp1_row_cultivation4
Definition: DK_OBushFruit_Perm1.h:54
dk_obfp_cut_bushes
Definition: DK_OBushFruit_Perm1.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
dk_obfp1_shallow_harrow1
Definition: DK_OBushFruit_Perm1.h:44
dk_obfp_fertilizer2_p
Definition: DK_OBushFruit_Perm1.h:80
dk_obfp1_autumn_harrow2
Definition: DK_OBushFruit_Perm1.h:42
dk_obfp1_fertilizer2_s
Definition: DK_OBushFruit_Perm1.h:50
dk_obfp1_fertilizer3_p
Definition: DK_OBushFruit_Perm1.h:56
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
FarmManagementCategory
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001