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
PTOliveGroveTraditional.h
Go to the documentation of this file.
1 
14 //
15 //PTOliveGroveTraditional.h
16 //
17 /*
18 *******************************************************************************************************
19 Copyright (c) 2024, Christopher John Topping, University of Aarhus
20 All rights reserved.
21 
22 Redistribution and use in source and binary forms, with or without modification, are permitted provided
23 that the following conditions are met:
24 
25 Redistributions of source code must retain the above copyright notice, this list of conditions and the
26 following disclaimer.
27 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
28 the following disclaimer in the documentation and/or other materials provided with the distribution.
29 
30 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
31 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
32 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
33 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
35 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
37 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 ********************************************************************************************************
39 */
40 
41 
42 #ifndef PTOLIVEGROVETRADITIONAL_H
43 #define PTOLIVEGROVETRADITIONAL_H
44 #define PTOLIVEGROVETRADITIONAL_BASE 31300
45 
46 typedef enum {
51 
60 
67 
74 
81 
83 {
84 public:
85  virtual bool Do(Farm* a_farm, LE* a_field, FarmEvent* a_ev);
86  PTOliveGroveTraditional(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape* a_L) : Crop(a_tov, a_toc, a_L)
87  {
88  m_first_date = g_date->DayInYear(18, 1);
90  }
92  const int elements = 2 + (pt_ol_t_foobar - PTOLIVEGROVETRADITIONAL_BASE);
94 
95  FarmManagementCategory catlist[elements] =
96  {
97  //INSET YOUR FMCS HERE
98  fmc_Others,
99  fmc_Others,
100  fmc_Others,
101  fmc_Others,
102  fmc_Others,
103 
111  fmc_Others,
112 
113 
114 
118  fmc_Others,
119 
126 
129  fmc_Others,
130  fmc_Harvest,
131 
132  // no foobar entry
133 
134  };
135  // Iterate over the catlist elements and copy them to vector
136  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
137 
138  }
139 
140 
141 };
142 
143 
144 #endif // !PTOLIVEGROVETRADITIONAL_H
pt_ol_t_fungi_c2
Definition: PTOliveGroveTraditional.h:73
pt_ol_t_ferti_c2
Definition: PTOliveGroveTraditional.h:71
pt_ol_t_mow_a2
Definition: PTOliveGroveTraditional.h:57
pt_ol_t_mow_b1
Definition: PTOliveGroveTraditional.h:64
fmc_Insecticide
Definition: LandscapeFarmingEnums.h:1005
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
pt_ol_t_herb_b1
Definition: PTOliveGroveTraditional.h:63
Farm::Suckering
virtual bool Suckering(LE *a_field, double a_user, int a_days)
Definition: FarmFuncs.cpp:570
pt_ol_t_start
Definition: PTOliveGroveTraditional.h:47
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
pt_ol_t_mow_d2
Definition: PTOliveGroveTraditional.h:76
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: Farm.h:372
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
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
pt_ol_t_ferti_bc1
Definition: PTOliveGroveTraditional.h:61
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
pt_ol_t_shredding
Definition: PTOliveGroveTraditional.h:50
fmc_Herbicide
Definition: LandscapeFarmingEnums.h:1006
pt_ol_t_herb_a1
Definition: PTOliveGroveTraditional.h:54
pt_ol_t_herb_c1
Definition: PTOliveGroveTraditional.h:69
Crop::m_base_elements_no
int m_base_elements_no
Definition: Farm.h:505
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
Crop
The base class for all crops.
Definition: Farm.h:495
pt_ol_t_foobar
Definition: PTOliveGroveTraditional.h:79
pt_ol_t_pest_a2
Definition: PTOliveGroveTraditional.h:58
Landscape
The landscape class containing all environmental and topographical data.
Definition: Landscape.h:142
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
pt_ol_t_fungi_a1
Definition: PTOliveGroveTraditional.h:52
pt_ol_t_fungi_c1
Definition: PTOliveGroveTraditional.h:68
Calendar::Date
long Date(void)
Definition: Calendar.h:57
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
pt_ol_t_mow_b2
Definition: PTOliveGroveTraditional.h:65
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
pt_ol_t_pest_a1
Definition: PTOliveGroveTraditional.h:55
Farm::Mowing
virtual bool Mowing(LE *a_field, double a_user, int a_days)
Physical/mechanical weed control in the between-row area using a rotary mower cutter.
Definition: FarmFuncs.cpp:434
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
pt_ol_t_harvest
Definition: PTOliveGroveTraditional.h:78
PTOLIVEGROVETRADITIONAL_BASE
#define PTOLIVEGROVETRADITIONAL_BASE
Definition: PTOliveGroveTraditional.h:44
pt_ol_t_sleep_all_day
Definition: PTOliveGroveTraditional.h:48
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
pt_ol_t_pest_c1
Definition: PTOliveGroveTraditional.h:70
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_ol_t_pruning
Definition: PTOliveGroveTraditional.h:49
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
pt_ol_t_suckering_a1
Definition: PTOliveGroveTraditional.h:59
pt_ol_t_mow_d1
Definition: PTOliveGroveTraditional.h:75
TTypesOfCrops
TTypesOfCrops
Definition: LandscapeFarmingEnums.h:781
LE
Definition: Elements.h:86
PTOliveGroveTraditional
Definition: PTOliveGroveTraditional.h:82
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
Farm
The base class for all farm types.
Definition: Farm.h:755
pt_ol_t_suckering_d1
Definition: PTOliveGroveTraditional.h:77
Farm::Shredding
virtual bool Shredding(LE *a_field, double a_user, int a_days)
Shredding (destruction of the pruning residues with a shredders using hammer mower) applied on a_fiel...
Definition: FarmFuncs.cpp:1912
pt_ol_t_suckering_b1
Definition: PTOliveGroveTraditional.h:66
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
Farm::FruitHarvest
virtual bool FruitHarvest(LE *a_field, double a_user, int a_days)
FruitHarvest (harvest of the mature fruits, e.g., grapes) applied on a_field.
Definition: FarmFuncs.cpp:1959
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
PTOliveGroveTraditional::Do
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: PTOliveGroveTraditional.cpp:45
pt_ol_t_mow_a1
Definition: PTOliveGroveTraditional.h:56
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
pt_ol_t_spring_plough_b1
Definition: PTOliveGroveTraditional.h:62
pt_ol_t_ferti_a1
Definition: PTOliveGroveTraditional.h:53
PTOliveGroveTraditional::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: PTOliveGroveTraditional.h:91
pt_ol_t_pest_c2
Definition: PTOliveGroveTraditional.h:72
PTOliveGroveTraditionalToDo
PTOliveGroveTraditionalToDo
Definition: PTOliveGroveTraditional.h:46
PTOliveGroveTraditional::PTOliveGroveTraditional
PTOliveGroveTraditional(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: PTOliveGroveTraditional.h:86
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
fmc_Fungicide
Definition: LandscapeFarmingEnums.h:1007
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
Farm::CutWeeds
virtual bool CutWeeds(LE *a_field, double a_user, int a_days)
Carry out weed topping on a_field.
Definition: FarmFuncs.cpp:1629