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
BEPotatoes.h
Go to the documentation of this file.
1 
16 //
17 // BEPotatoes.h
18 //
19 
20 
21 #ifndef BEPOTATOES_H
22 #define BEPOTATOES_H
23 
24 #define BEPOTATOES_BASE 25300
25 
28 #define BE_POT_HERBI a_field->m_user[1]
29 #define BE_POT_FUNGI1 a_field->m_user[2]
30 #define BE_POT_FUNGI2 a_field->m_user[3]
31 #define BE_POT_FUNGI3 a_field->m_user[4]
32 #define BE_POT_FUNGI4 a_field->m_user[5]
33 #define BE_POT_FUNGI5 a_field->m_user[6]
34 
40 typedef enum {
41  BE_pot_start = 1, // Compulsory, must always be 1 (one).
83 
84 
93 class BEPotatoes: public Crop
94 {
95  public:
96  virtual bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
97  BEPotatoes(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape* a_L) : Crop(a_tov, a_toc, a_L)
98  {
99  // When we start it off, the first possible date for a farm operation is 5th November
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( 5,11 );
103  }
104 };
105 
106 #endif // BEPOTATOES_H
107 
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
cfg_POT_InsecticideMonth
CfgInt cfg_POT_InsecticideMonth
Provided to allow configuration control of the first insecticide spray in potatoes crops - this chang...
cfg_POT_InsecticideDay
CfgInt cfg_POT_InsecticideDay
Provided to allow configuration control of the first insecticide spray in potatoes crops - this chang...
BE_pot_dessication2
Definition: BEPotatoes.h:80
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
BE_pot_fungicide6
Definition: BEPotatoes.h:68
BEPotatoes
BEPotatoes class .
Definition: BEPotatoes.h:93
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
BE_pot_fungicide13
Definition: BEPotatoes.h:75
BEPotatoes::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: BEPotatoes.cpp:64
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
cfg_pest_potatoes_on
CfgBool cfg_pest_potatoes_on
Turn on pesticides for potatoes.
BE_pot_spring_plough_sandy
Definition: BEPotatoes.h:50
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
BE_pot_fungicide11
Definition: BEPotatoes.h:73
LE::GetPoly
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: Elements.h:238
BE_pot_fungicide14
Definition: BEPotatoes.h:76
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
BE_pot_ferti_p3_clay
Definition: BEPotatoes.h:56
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
BEPotatoesToDo
BEPotatoesToDo
Definition: BEPotatoes.h:40
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
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_POT_FUNGI1
#define BE_POT_FUNGI1
Definition: BEPotatoes.h:29
BE_pot_insecticide
Definition: BEPotatoes.h:78
BE_pot_fungicide1
Definition: BEPotatoes.h:63
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
BE_POT_FUNGI3
#define BE_POT_FUNGI3
Definition: BEPotatoes.h:31
BE_POT_FUNGI2
#define BE_POT_FUNGI2
Definition: BEPotatoes.h:30
Crop
The base class for all crops.
Definition: Farm.h:495
BE_pot_ferti_p1_sandy
Definition: BEPotatoes.h:48
CfgBool::value
bool value() const
Definition: Configurator.h:164
tov_BEPotatoes
Definition: LandscapeFarmingEnums.h:299
BE_POT_FUNGI5
#define BE_POT_FUNGI5
Definition: BEPotatoes.h:33
BE_pot_herbicide1
Definition: BEPotatoes.h:62
Landscape
The landscape class containing all environmental and topographical data.
Definition: Landscape.h:142
BE_pot_fungicide8
Definition: BEPotatoes.h:70
BE_pot_fungicide7
Definition: BEPotatoes.h:69
BE_pot_spring_planting
Definition: BEPotatoes.h:54
Calendar::Date
long Date(void)
Definition: Calendar.h:57
l_pest_insecticide_amount
CfgFloat l_pest_insecticide_amount
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
CfgBool
Bool configurator entry class.
Definition: Configurator.h:155
BE_pot_harvest
Definition: BEPotatoes.h:81
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
BE_pot_winter_plough_clay
Definition: BEPotatoes.h:45
BE_pot_ferti_s2_sandy
Definition: BEPotatoes.h:52
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_POT_FUNGI4
#define BE_POT_FUNGI4
Definition: BEPotatoes.h:32
BE_pot_sleep_all_day
Definition: BEPotatoes.h:42
BE_POT_HERBI
#define BE_POT_HERBI
A flag used to indicate autumn ploughing status.
Definition: BEPotatoes.h:28
BE_pot_fungicide4
Definition: BEPotatoes.h:66
BE_pot_ferti_s3_sandy
Definition: BEPotatoes.h:59
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
CfgArray_Double::value
std::vector< double > value() const
Definition: Configurator.h:219
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_pot_start
Definition: BEPotatoes.h:41
BE_pot_fungicide12
Definition: BEPotatoes.h:74
BE_pot_fungicide10
Definition: BEPotatoes.h:72
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
BE_pot_fungicide2
Definition: BEPotatoes.h:64
TTypesOfCrops
TTypesOfCrops
Definition: LandscapeFarmingEnums.h:781
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
LE
Definition: Elements.h:86
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
BE_pot_ferti_s3_clay
Definition: BEPotatoes.h:57
BE_pot_hilling1
Definition: BEPotatoes.h:55
BE_pot_fungicide15
Definition: BEPotatoes.h:77
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_pot_ferti_p3_sandy
Definition: BEPotatoes.h:58
BE_pot_fungicide9
Definition: BEPotatoes.h:71
Farm
The base class for all farm types.
Definition: Farm.h:755
BE_pot_ferti_s2_clay
Definition: BEPotatoes.h:47
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_pot_fungicide5
Definition: BEPotatoes.h:67
Farm::WinterPlough
virtual bool WinterPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the winter on a_field.
Definition: FarmFuncs.cpp:395
BE_pot_fungicide3
Definition: BEPotatoes.h:65
BEPotatoes::BEPotatoes
BEPotatoes(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: BEPotatoes.h:97
BE_pot_ferti_p2_sandy
Definition: BEPotatoes.h:51
BE_pot_ferti_s1_sandy
Definition: BEPotatoes.h:49
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
BE_pot_ferti_p4
Definition: BEPotatoes.h:60
BE_pot_ferti_p2_clay
Definition: BEPotatoes.h:46
BE_pot_stubble_harrow
Definition: BEPotatoes.h:43
BE_pot_dessication1
Definition: BEPotatoes.h:79
BE_pot_bed_forming
Definition: BEPotatoes.h:53
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
BEPOTATOES_BASE
#define BEPOTATOES_BASE
Definition: BEPotatoes.h:24
BE_pot_winter_plough_sandy
Definition: BEPotatoes.h:44
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
BE_pot_ferti_s4
Definition: BEPotatoes.h:61
Farm::StubbleHarrowing
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: FarmFuncs.cpp:1523
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