Loading [MathJax]/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
BEPotatoesSpring.h
Go to the documentation of this file.
1 
16 //
17 // BEPotatoesSpring.h
18 //
19 
20 
21 #ifndef BEPOTATOESSPRING_H
22 #define BEPOTATOESSPRING_H
23 
24 #define BEPOTATOESSPRING_BASE 26500
25 
28 #define BE_POTS_HERBI a_field->m_user[1]
29 #define BE_POTS_FUNGI1 a_field->m_user[2]
30 #define BE_POTS_FUNGI2 a_field->m_user[3]
31 #define BE_POTS_FUNGI3 a_field->m_user[4]
32 #define BE_POTS_FUNGI4 a_field->m_user[5]
33 #define BE_POTS_FUNGI5 a_field->m_user[6]
34 
40 typedef enum {
41  BE_pots_start = 1, // Compulsory, must always be 1 (one).
78 
79 
88 class BEPotatoesSpring: public Crop
89 {
90  public:
91  virtual bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
92  BEPotatoesSpring(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape* a_L) : Crop(a_tov, a_toc, a_L)
93  {
94  // When we start it off, the first possible date for a farm operation is 5th November
95  // This information is used by other crops when they decide how much post processing of
96  // the management is allowed after harvest before the next crop starts.
97  m_first_date=g_date->DayInYear( 30,4 );
98  }
99 };
100 
101 #endif // BEPOTATOESSPRING_H
102 
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
BE_pots_insecticide
Definition: BEPotatoesSpring.h:73
cfg_pest_potatoes_on
CfgBool cfg_pest_potatoes_on
Turn on pesticides for potatoes.
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
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
BE_pots_hilling1
Definition: BEPotatoesSpring.h:50
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
BE_pots_fungicide3
Definition: BEPotatoesSpring.h:60
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
BE_pots_ferti_s3_clay
Definition: BEPotatoesSpring.h:52
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
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: Farm.h:372
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
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
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
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
cfg_POT_InsecticideMonth
CfgInt cfg_POT_InsecticideMonth
Provided to allow configuration control of the first insecticide spray in potatoes crops - this chang...
BE_pots_fungicide4
Definition: BEPotatoesSpring.h:61
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
BE_pots_fungicide6
Definition: BEPotatoesSpring.h:63
BE_pots_bed_forming
Definition: BEPotatoesSpring.h:48
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
cfg_POT_InsecticideDay
CfgInt cfg_POT_InsecticideDay
Provided to allow configuration control of the first insecticide spray in potatoes crops - this chang...
BEPOTATOESSPRING_BASE
#define BEPOTATOESSPRING_BASE
Definition: BEPotatoesSpring.h:24
BE_pots_fungicide10
Definition: BEPotatoesSpring.h:67
BE_pots_ferti_s3_sandy
Definition: BEPotatoesSpring.h:54
BE_POTS_FUNGI2
#define BE_POTS_FUNGI2
Definition: BEPotatoesSpring.h:30
Crop
The base class for all crops.
Definition: Farm.h:495
BE_pots_ferti_p3_clay
Definition: BEPotatoesSpring.h:51
CfgBool::value
bool value() const
Definition: Configurator.h:164
BEPotatoesSpring::BEPotatoesSpring
BEPotatoesSpring(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: BEPotatoesSpring.h:92
BE_pots_ferti_p2_clay
Definition: BEPotatoesSpring.h:43
BE_pots_fungicide15
Definition: BEPotatoesSpring.h:72
Landscape
The landscape class containing all environmental and topographical data.
Definition: Landscape.h:142
BE_pots_ferti_s2_clay
Definition: BEPotatoesSpring.h:44
Calendar::Date
long Date(void)
Definition: Calendar.h:57
BE_pots_fungicide9
Definition: BEPotatoesSpring.h:66
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
BE_POTS_FUNGI3
#define BE_POTS_FUNGI3
Definition: BEPotatoesSpring.h:31
CfgBool
Bool configurator entry class.
Definition: Configurator.h:155
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
CfgArray_Double
Definition: Configurator.h:208
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
BE_pots_fungicide11
Definition: BEPotatoesSpring.h:68
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
Crop::m_farm
Farm * m_farm
Definition: Farm.h:498
Crop::m_field
LE * m_field
Definition: Farm.h:499
BE_pots_dessication2
Definition: BEPotatoesSpring.h:75
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
BE_pots_fungicide8
Definition: BEPotatoesSpring.h:65
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
BE_pots_dessication1
Definition: BEPotatoesSpring.h:74
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
BE_pots_fungicide12
Definition: BEPotatoesSpring.h:69
TTypesOfCrops
TTypesOfCrops
Definition: LandscapeFarmingEnums.h:781
BE_pots_herbicide1
Definition: BEPotatoesSpring.h:57
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
LE
Definition: Elements.h:86
l_pest_insecticide_amount
CfgFloat l_pest_insecticide_amount
BE_POTS_FUNGI4
#define BE_POTS_FUNGI4
Definition: BEPotatoesSpring.h:32
BE_pots_start
Definition: BEPotatoesSpring.h:41
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
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.
BE_pots_sleep_all_day
Definition: BEPotatoesSpring.h:42
BE_pots_spring_planting
Definition: BEPotatoesSpring.h:49
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
CfgInt
Integer configurator entry class.
Definition: Configurator.h:102
BE_pots_ferti_p4
Definition: BEPotatoesSpring.h:55
BE_pots_ferti_p2_sandy
Definition: BEPotatoesSpring.h:46
Farm
The base class for all farm types.
Definition: Farm.h:755
BE_pots_ferti_s2_sandy
Definition: BEPotatoesSpring.h:47
BE_POTS_FUNGI1
#define BE_POTS_FUNGI1
Definition: BEPotatoesSpring.h:29
BEPotatoesSpringToDo
BEPotatoesSpringToDo
Definition: BEPotatoesSpring.h:40
tov_BEPotatoesSpring
Definition: LandscapeFarmingEnums.h:300
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
CfgFloat
Double configurator entry class.
Definition: Configurator.h:126
BE_pots_fungicide2
Definition: BEPotatoesSpring.h:59
BEPotatoesSpring::Do
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.
Definition: BEPotatoesSpring.cpp:64
BE_POTS_FUNGI5
#define BE_POTS_FUNGI5
Definition: BEPotatoesSpring.h:33
BE_pots_harvest
Definition: BEPotatoesSpring.h:76
BE_pots_spring_plough_sandy
Definition: BEPotatoesSpring.h:45
BEPotatoesSpring
BEPotatoesSpring class .
Definition: BEPotatoesSpring.h:88
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
BE_POTS_HERBI
#define BE_POTS_HERBI
A flag used to indicate autumn ploughing status.
Definition: BEPotatoesSpring.h:28
BE_pots_fungicide7
Definition: BEPotatoesSpring.h:64
BE_pots_ferti_s4
Definition: BEPotatoesSpring.h:56
BE_pots_ferti_p3_sandy
Definition: BEPotatoesSpring.h:53
BE_pots_fungicide1
Definition: BEPotatoesSpring.h:58
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
BE_pots_fungicide14
Definition: BEPotatoesSpring.h:71
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
BE_pots_fungicide13
Definition: BEPotatoesSpring.h:70
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
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
BE_pots_fungicide5
Definition: BEPotatoesSpring.h:62