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
BEWinterBarleyCC.h
Go to the documentation of this file.
1 
16 //
17 // BEWinterBarleyCC.h
18 //
19 
20 
21 #ifndef BEWinterBarleyCC_H
22 #define BEWinterBarleyCC_H
23 
24 #define BEWinterBarleyCC_BASE 25400
25 
34 typedef enum {
35  BE_wbcc_start = 1, // Compulsory, must always be 1 (one).
44  BE_wbcc_ferti_p1, // slurry
62 
63 
72 class BEWinterBarleyCC: public Crop
73 {
74  public:
75  virtual bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
76  BEWinterBarleyCC(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape* a_L) : Crop(a_tov, a_toc, a_L)
77  {
78  // When we start it off, the first possible date for a farm operation is 15th September
79  // This information is used by other crops when they decide how much post processing of
80  // the management is allowed after harvest before the next crop starts.
81  m_first_date=g_date->DayInYear( 10,10 );
82  }
83 };
84 
85 #endif // BEWinterBarleyCC_H
86 
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
BE_wbcc_mole_plough
Definition: BEWinterBarleyCC.h:39
Landscape::SupplyLEPointer
LE * SupplyLEPointer(int a_polyref)
Returns a pointer to the object referred to by the polygon number.
Definition: Landscape.h:1722
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
Farm::HerbicideTreat
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
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
cfg_WB_InsecticideMonth
CfgInt cfg_WB_InsecticideMonth
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: Farm.h:372
LE::GetMConstants
int GetMConstants(int a)
Definition: Elements.h:407
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
BE_wbcc_ferti_s3
Definition: BEWinterBarleyCC.h:47
LE::GetPoly
int GetPoly(void)
Returns the polyref number for this polygon.
Definition: Elements.h:238
tov_BECatchPeaCrop
Definition: LandscapeFarmingEnums.h:291
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
BE_wbcc_sleep_all_day
Definition: BEWinterBarleyCC.h:36
Farm::GetNextCropStartDate
int GetNextCropStartDate(LE *a_field, TTypesOfVegetation &a_curr_veg)
Returns the start date of the next crop in the rotation.
Definition: Farm.cpp:920
Farm::AddNewEvent
void AddNewEvent(TTypesOfVegetation a_event, long a_date, LE *a_field, int a_todo, long a_num, bool a_lock, int a_start, bool a_first_year, TTypesOfVegetation a_crop, FarmManagementCategory a_fmc, bool a_forcespring, bool a_forcespringOK)
Adds an event to the event queue for a farm.
Definition: Farm.cpp:845
BE_wbcc_insecticide2
Definition: BEWinterBarleyCC.h:55
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
BE_wbcc_herbicide2
Definition: BEWinterBarleyCC.h:42
BE_wbcc_harvest
Definition: BEWinterBarleyCC.h:58
BEWinterBarleyCC1ToDo
BEWinterBarleyCC1ToDo
A flag used to indicate autumn ploughing status.
Definition: BEWinterBarleyCC.h:34
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
BE_wbcc_ferti_p4
Definition: BEWinterBarleyCC.h:48
BE_wbcc_herbicide4
Definition: BEWinterBarleyCC.h:52
Crop
The base class for all crops.
Definition: Farm.h:495
cfg_WB_InsecticideDay
CfgInt cfg_WB_InsecticideDay
BE_wbcc_growth_regulator1
Definition: BEWinterBarleyCC.h:56
CfgBool::value
bool value() const
Definition: Configurator.h:164
BE_wbcc_herbicide3
Definition: BEWinterBarleyCC.h:43
BE_wbcc_hay_bailing
Definition: BEWinterBarleyCC.h:60
Landscape
The landscape class containing all environmental and topographical data.
Definition: Landscape.h:142
BE_wbcc_ferti_s5
Definition: BEWinterBarleyCC.h:51
BE_wbcc_autumn_plough
Definition: BEWinterBarleyCC.h:40
BEWinterBarleyCC
BEWinterBarleyCC class .
Definition: BEWinterBarleyCC.h:72
tov_BEWinterBarleyCC
Definition: LandscapeFarmingEnums.h:305
Calendar::Date
long Date(void)
Definition: Calendar.h:57
BE_wbcc_ferti_s1
Definition: BEWinterBarleyCC.h:45
BE_wbcc_start
Definition: BEWinterBarleyCC.h:35
CfgBool
Bool configurator entry class.
Definition: Configurator.h:155
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
BE_wbcc_stubble_cultivator
Definition: BEWinterBarleyCC.h:37
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_wbcc_preseeding_cultivator_sow
Definition: BEWinterBarleyCC.h:41
BE_wbcc_ferti_p3
Definition: BEWinterBarleyCC.h:46
FarmEvent::m_field
LE * m_field
Definition: Farm.h:391
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
BE_wbcc_fungicide2
Definition: BEWinterBarleyCC.h:54
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
BEWinterBarleyCC_BASE
#define BEWinterBarleyCC_BASE
Definition: BEWinterBarleyCC.h:24
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
tov_Undefined
Definition: LandscapeFarmingEnums.h:610
BE_wbcc_ferti_p1
Definition: BEWinterBarleyCC.h:44
LE::SetVegType
virtual void SetVegType(TTypesOfVegetation)
Definition: Elements.h:175
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_wbcc_straw_chopping
Definition: BEWinterBarleyCC.h:59
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
Farm
The base class for all farm types.
Definition: Farm.h:755
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_wbcc_growth_regulator2
Definition: BEWinterBarleyCC.h:57
LE::GetUnsprayedMarginPolyRef
int GetUnsprayedMarginPolyRef(void)
Definition: Elements.h:383
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
BE_wbcc_ferti_s4
Definition: BEWinterBarleyCC.h:49
cfg_pest_winterbarley_on
CfgBool cfg_pest_winterbarley_on
Turn on pesticides for winter barley.
BEWinterBarleyCC::BEWinterBarleyCC
BEWinterBarleyCC(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: BEWinterBarleyCC.h:76
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.
l_pest_insecticide_amount
CfgFloat l_pest_insecticide_amount
PROG_START
#define PROG_START
Definition: Farm.h:69
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
BE_wbcc_fungicide1
Definition: BEWinterBarleyCC.h:53
BE_wbcc_ferti_p5
Definition: BEWinterBarleyCC.h:50
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
Crop::m_OurLandscape
Landscape * m_OurLandscape
Definition: Farm.h:506
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
BE_wbcc_herbicide1
Definition: BEWinterBarleyCC.h:38
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
BEWinterBarleyCC::Do
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and oBEy method for a crop management plan. All farm actions go through here.
Definition: BEWinterBarleyCC.cpp:64
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