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
PTOliveGroveTradOrganic.h
Go to the documentation of this file.
1 
14 //
15 //PTOliveGroveTradOrganic.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 PTOLIVEGROVETRADORGANIC_H
43 #define PTOLIVEGROVETRADORGANIC_H
44 #define PTOLIVEGROVETRADORGANIC_BASE 31400
45 
46 typedef enum {
65 
67 {
68 public:
69  virtual bool Do(Farm* a_farm, LE* a_field, FarmEvent* a_ev);
70  PTOliveGroveTradOrganic(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape* a_L) : Crop(a_tov, a_toc, a_L)
71  {
72  m_first_date = g_date->DayInYear(1, 2);
74  }
76  const int elements = 2 + (pt_ol_t_o_foobar - PTOLIVEGROVETRADORGANIC_BASE);
78 
79  FarmManagementCategory catlist[elements] =
80  {
81  //INSET YOUR FMCS HERE
82  fmc_Others,
83  fmc_Others,
84  fmc_Others,
85  fmc_Others,
86  fmc_Others,
91  fmc_Others,
99 
100  // no foobar entry
101 
102  };
103  // Iterate over the catlist elements and copy them to vector
104  copy(begin(catlist), end(catlist), back_inserter(m_ManagementCategories));
105 
106  }
107 
108 };
109 
110 #endif // !PTOLIVEGROVETRADORGANIC_H
111 
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::Suckering
virtual bool Suckering(LE *a_field, double a_user, int a_days)
Definition: FarmFuncs.cpp:570
pt_ol_t_o_pruning
Definition: PTOliveGroveTradOrganic.h:49
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
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
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
pt_ol_t_o_slurry
Definition: PTOliveGroveTradOrganic.h:56
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
Crop
The base class for all crops.
Definition: Farm.h:495
pt_ol_t_o_spring_plough_b1
Definition: PTOliveGroveTradOrganic.h:57
pt_ol_t_o_fungi_b2
Definition: PTOliveGroveTradOrganic.h:59
pt_ol_t_o_harrow_2
Definition: PTOliveGroveTradOrganic.h:54
pt_ol_t_o_harvest
Definition: PTOliveGroveTradOrganic.h:62
pt_ol_t_o_mowing_b2
Definition: PTOliveGroveTradOrganic.h:61
Landscape
The landscape class containing all environmental and topographical data.
Definition: Landscape.h:142
fmc_Fertilizer
Definition: LandscapeFarmingEnums.h:1004
pt_ol_t_o_shredding
Definition: PTOliveGroveTradOrganic.h:50
Calendar::Date
long Date(void)
Definition: Calendar.h:57
pt_ol_t_o_harrow
Definition: PTOliveGroveTradOrganic.h:53
fmc_Cultivation
Definition: LandscapeFarmingEnums.h:1008
PTOliveGroveTradOrganic
Definition: PTOliveGroveTradOrganic.h:66
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
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
pt_ol_t_o_foobar
Definition: PTOliveGroveTradOrganic.h:63
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
pt_ol_t_o_mowing_b1
Definition: PTOliveGroveTradOrganic.h:60
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
PTOliveGroveTradOrganic::SetUpFarmCategoryInformation
void SetUpFarmCategoryInformation()
Definition: PTOliveGroveTradOrganic.h:75
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
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_ol_t_o_suckering
Definition: PTOliveGroveTradOrganic.h:55
TTypesOfCrops
TTypesOfCrops
Definition: LandscapeFarmingEnums.h:781
LE
Definition: Elements.h:86
PTOliveGroveTradOrganic::PTOliveGroveTradOrganic
PTOliveGroveTradOrganic(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: PTOliveGroveTradOrganic.h:70
pt_ol_t_o_spring_plough_a1
Definition: PTOliveGroveTradOrganic.h:51
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
pt_ol_t_o_sleep_all_day
Definition: PTOliveGroveTradOrganic.h:48
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
PTOLIVEGROVETRADORGANIC_BASE
#define PTOLIVEGROVETRADORGANIC_BASE
Definition: PTOliveGroveTradOrganic.h:44
Farm
The base class for all farm types.
Definition: Farm.h:755
PTOliveGroveTradOrganic::Do
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: PTOliveGroveTradOrganic.cpp:45
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
fmc_Harvest
Definition: LandscapeFarmingEnums.h:1012
pt_ol_t_o_pest_b1
Definition: PTOliveGroveTradOrganic.h:58
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
pt_ol_t_o_start
Definition: PTOliveGroveTradOrganic.h:47
PTOliveGroveTradOrganicToDo
PTOliveGroveTradOrganicToDo
Definition: PTOliveGroveTradOrganic.h:46
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
pt_ol_t_o_spring_plough_a2
Definition: PTOliveGroveTradOrganic.h:52
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