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
BEWinterWheatCC.h
Go to the documentation of this file.
1 
16 //
17 // BEWinterWheatCC.h
18 //
19 
20 
21 #ifndef BEWinterWheatCC_H
22 #define BEWinterWheatCC_H
23 
24 #define BEWinterWheatCC_BASE 25400
25 
34 typedef enum {
35  BE_wwcc_start = 1, // Compulsory, must always be 1 (one).
44  BE_wwcc_ferti_p1, // slurry
64 
65 
74 class BEWinterWheatCC: public Crop
75 {
76  public:
77  virtual bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
78  BEWinterWheatCC(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape* a_L) : Crop(a_tov, a_toc, a_L)
79  {
80  // When we start it off, the first possible date for a farm operation is 15th September
81  // This information is used by other crops when they decide how much post processing of
82  // the management is allowed after harvest before the next crop starts.
83  m_first_date=g_date->DayInYear( 10,10 );
84  }
85 };
86 
87 #endif // BEWinterWheatCC_H
88 
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
BE_wwcc_fungicide3
Definition: BEWinterWheatCC.h:55
Landscape::SupplyLEPointer
LE * SupplyLEPointer(int a_polyref)
Returns a pointer to the object referred to by the polygon number.
Definition: Landscape.h:1722
BE_wwcc_fungicide2
Definition: BEWinterWheatCC.h:54
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
BEWinterWheatCC::BEWinterWheatCC
BEWinterWheatCC(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: BEWinterWheatCC.h:78
BE_wwcc_autumn_plough
Definition: BEWinterWheatCC.h:40
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
LE::GetMConstants
int GetMConstants(int a)
Definition: Elements.h:407
BE_wwcc_ferti_p4
Definition: BEWinterWheatCC.h:48
Calendar::GetYearNumber
int GetYearNumber(void)
Definition: Calendar.h:72
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
BE_wwcc_insecticide2b
Definition: BEWinterWheatCC.h:57
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_wwcc_ferti_s3
Definition: BEWinterWheatCC.h:47
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_wwcc_straw_chopping
Definition: BEWinterWheatCC.h:61
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
BE_wwcc_herbicide1
Definition: BEWinterWheatCC.h:38
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
BE_wwcc_ferti_p5
Definition: BEWinterWheatCC.h:50
BE_wwcc_growth_regulator1
Definition: BEWinterWheatCC.h:58
Crop
The base class for all crops.
Definition: Farm.h:495
Crop::SimpleEvent
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
BE_wwcc_preseeding_cultivator_sow
Definition: BEWinterWheatCC.h:41
CfgBool::value
bool value() const
Definition: Configurator.h:164
BE_wwcc_ferti_s4
Definition: BEWinterWheatCC.h:49
BE_wwcc_start
Definition: BEWinterWheatCC.h:35
Landscape
The landscape class containing all environmental and topographical data.
Definition: Landscape.h:142
Calendar::Date
long Date(void)
Definition: Calendar.h:57
BEWinterWheatCC1ToDo
BEWinterWheatCC1ToDo
A flag used to indicate autumn ploughing status.
Definition: BEWinterWheatCC.h:34
CfgBool
Bool configurator entry class.
Definition: Configurator.h:155
BE_wwcc_sleep_all_day
Definition: BEWinterWheatCC.h:36
fmc_Others
Definition: LandscapeFarmingEnums.h:1003
BE_wwcc_stubble_cultivator
Definition: BEWinterWheatCC.h:37
LE::SetVegPatchy
void SetVegPatchy(bool p)
Definition: Elements.h:229
cfg_WW_InsecticideDay
CfgInt cfg_WW_InsecticideDay
Provided to allow configuration control of the first insecticide spray in winter wheat - this changes...
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_wwcc_fungicide1
Definition: BEWinterWheatCC.h:53
l_pest_insecticide_amount
CfgFloat l_pest_insecticide_amount
BE_wwcc_ferti_p3
Definition: BEWinterWheatCC.h:46
FarmEvent::m_field
LE * m_field
Definition: Farm.h:391
BE_wwcc_hay_bailing
Definition: BEWinterWheatCC.h:62
FarmEvent::m_next_tov
TTypesOfVegetation m_next_tov
Definition: Farm.h:390
BE_wwcc_herbicide3
Definition: BEWinterWheatCC.h:43
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
tov_Undefined
Definition: LandscapeFarmingEnums.h:610
BE_wwcc_herbicide2
Definition: BEWinterWheatCC.h:42
LE::SetVegType
virtual void SetVegType(TTypesOfVegetation)
Definition: Elements.h:175
BE_wwcc_herbicide4
Definition: BEWinterWheatCC.h:52
Farm::BiocideTreat
virtual bool BiocideTreat(LE *a_field, double a_user, int a_days)
Apply Biocide to a_field.
Definition: FarmFuncs.cpp:2175
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.
TTypesOfCrops
TTypesOfCrops
Definition: LandscapeFarmingEnums.h:781
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
BE_wwcc_harvest
Definition: BEWinterWheatCC.h:60
LE
Definition: Elements.h:86
BE_wwcc_ferti_s1
Definition: BEWinterWheatCC.h:45
tov_DKWinterWheat_CC
Definition: LandscapeFarmingEnums.h:422
cfg_pest_winterwheat_on
CfgBool cfg_pest_winterwheat_on
Turn on pesticides for winter wheat.
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
CfgInt
Integer configurator entry class.
Definition: Configurator.h:102
BE_wwcc_ferti_s5
Definition: BEWinterWheatCC.h:51
BEWinterWheatCC_BASE
#define BEWinterWheatCC_BASE
Definition: BEWinterWheatCC.h:24
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_wwcc_mole_plough
Definition: BEWinterWheatCC.h:39
BE_wwcc_ferti_p1
Definition: BEWinterWheatCC.h:44
LE::GetUnsprayedMarginPolyRef
int GetUnsprayedMarginPolyRef(void)
Definition: Elements.h:383
cfg_WW_InsecticideMonth
CfgInt cfg_WW_InsecticideMonth
Provided to allow configuration control of the first insecticide spray in winter wheat - this changes...
BEWinterWheatCC::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: BEWinterWheatCC.cpp:64
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
BE_wwcc_insecticide2
Definition: BEWinterWheatCC.h:56
BEWinterWheatCC
BEWinterWheatCC class .
Definition: BEWinterWheatCC.h:74
PROG_START
#define PROG_START
Definition: Farm.h:69
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
Crop::m_OurLandscape
Landscape * m_OurLandscape
Definition: Farm.h:506
BE_wwcc_growth_regulator2
Definition: BEWinterWheatCC.h:59
WARN_BUG
Definition: MapErrorMsg.h:34
ppp_1
Definition: LandscapeFarmingEnums.h:1079
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