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
BEMaizeSpring.h
Go to the documentation of this file.
1 
16 //
17 // BEMaizeSpring.h
18 //
19 
20 
21 #ifndef BEMAIZESPRING_H
22 #define BEMAIZESPRING_H
23 
24 #define BEMAIZESPRING_BASE 26400
25 
28 #define BE_MS_START_FERTI a_field->m_user[1]
29 
35 typedef enum {
36  BE_ms_start = 1, // Compulsory, must always be 1 (one).
50 
51 
60 class BEMaizeSpring: public Crop
61 {
62  public:
63  virtual bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
64  BEMaizeSpring(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape* a_L) : Crop(a_tov, a_toc, a_L)
65  {
66  // When we start it off, the first possible date for a farm operation is 5th November
67  // This information is used by other crops when they decide how much post processing of
68  // the management is allowed after harvest before the next crop starts.
69  m_first_date=g_date->DayInYear( 30,4 );
70  }
71 };
72 
73 #endif // BEMAIZESPRING_H
74 
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
BE_MS_START_FERTI
#define BE_MS_START_FERTI
A flag used to indicate autumn ploughing status.
Definition: BEMaizeSpring.h:28
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
BE_ms_harvest
Definition: BEMaizeSpring.h:47
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
BE_ms_ferti_s2
Definition: BEMaizeSpring.h:45
FarmEvent::m_first_year
bool m_first_year
Definition: Farm.h:386
BE_ms_ferti_s1
Definition: BEMaizeSpring.h:39
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
BE_ms_ferti_p2
Definition: BEMaizeSpring.h:44
Farm::GetPreviousTov
TTypesOfVegetation GetPreviousTov(int a_index)
Definition: Farm.h:966
Farm::GetType
TTypesOfFarm GetType(void)
Definition: Farm.h:956
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
l_pest_insecticide_amount
CfgFloat l_pest_insecticide_amount
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
Crop
The base class for all crops.
Definition: Farm.h:495
BE_ms_herbicide1
Definition: BEMaizeSpring.h:46
BEMAIZESPRING_BASE
#define BEMAIZESPRING_BASE
Definition: BEMaizeSpring.h:24
BE_ms_spring_sow_with_ferti
Definition: BEMaizeSpring.h:42
Landscape
The landscape class containing all environmental and topographical data.
Definition: Landscape.h:142
BEMaizeSpring
BEMaizeSpring class .
Definition: BEMaizeSpring.h:60
Calendar::Date
long Date(void)
Definition: Calendar.h:57
cfg_MS_InsecticideDay
CfgInt cfg_MS_InsecticideDay
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
CfgBool
Bool configurator entry class.
Definition: Configurator.h:155
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.
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
BE_ms_ferti_p1
Definition: BEMaizeSpring.h:38
LE::GetRotIndex
int GetRotIndex(void)
Definition: Elements.h:373
BE_ms_preseeding_cultivator
Definition: BEMaizeSpring.h:41
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
FarmEvent::m_todo
int m_todo
Definition: Farm.h:388
BEMaizeSpringToDo
BEMaizeSpringToDo
Definition: BEMaizeSpring.h:35
LE::GetGreenBiomass
virtual double GetGreenBiomass(void)
Definition: Elements.h:160
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
TTypesOfCrops
TTypesOfCrops
Definition: LandscapeFarmingEnums.h:781
BE_ms_spring_plough_sandy
Definition: BEMaizeSpring.h:40
tof_OptimisingFarm
Definition: LandscapeFarmingEnums.h:696
LE
Definition: Elements.h:86
BE_ms_straw_chopping
Definition: BEMaizeSpring.h:48
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
BEMaizeSpring::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: BEMaizeSpring.cpp:64
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
tov_BEMaizeSpring
Definition: LandscapeFarmingEnums.h:297
CfgFloat
Double configurator entry class.
Definition: Configurator.h:126
cfg_pest_springwheat_on
CfgBool cfg_pest_springwheat_on
Turn on pesticides for spring wheat.
BEMaizeSpring::BEMaizeSpring
BEMaizeSpring(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: BEMaizeSpring.h:64
BE_ms_start
Definition: BEMaizeSpring.h:36
LE::GetOwner
Farm * GetOwner(void)
Definition: Elements.h:256
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
cfg_MS_InsecticideMonth
CfgInt cfg_MS_InsecticideMonth
LE::SetMConstants
void SetMConstants(int a, int c)
Definition: Elements.h:408
Crop::m_ev
FarmEvent * m_ev
Definition: Farm.h:500
WARN_BUG
Definition: MapErrorMsg.h:34
BE_ms_sleep_all_day
Definition: BEMaizeSpring.h:37
BE_ms_spring_sow
Definition: BEMaizeSpring.h:43
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