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
BECatchPeaCrop.h
Go to the documentation of this file.
1 
16 //
17 // BECatchPeaCrop.h
18 //
19 
20 
21 #ifndef BECATCHPEACROP_H
22 #define BECATCHPEACROP_H
23 
24 #define BECATCHPEACROP_BASE 26100
25 #define BE_CC_ENDDATE a_field->m_user[0]
26 
32 typedef enum {
33  BE_cpc_start = 1, // Compulsory, must always be 1 (one).
43 
44 
53 class BECatchPeaCrop: public Crop
54 {
55  public:
56  virtual bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
57  BECatchPeaCrop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape* a_L) : Crop(a_tov, a_toc, a_L)
58  {
59  // When we start it off, the first possible date for a farm operation is 5th November
60  // This information is used by other crops when they decide how much post processing of
61  // the management is allowed after harvest before the next crop starts.
62  m_first_date=g_date->DayInYear( 11,10 );
64  }
65 };
66 
67 #endif // BECATCHPEACROP_H
68 
LE::GetMDates
int GetMDates(int a, int b)
Definition: Elements.h:405
FarmEvent::m_forcespring
bool m_forcespring
Definition: Farm.h:392
LE::SetMDates
void SetMDates(int a, int b, int c)
Definition: Elements.h:406
BECatchPeaCrop::BECatchPeaCrop
BECatchPeaCrop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: BECatchPeaCrop.h:57
Farm::IsStockFarmer
bool IsStockFarmer(void)
Definition: Farm.h:961
FarmEvent::m_lock
bool m_lock
Definition: Farm.h:384
g_farm_fixed_crop_enable
CfgBool g_farm_fixed_crop_enable
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: Farm.h:372
LE::ClearManagementActionSum
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
BE_cpc_ferti_p1_clay
Definition: BECatchPeaCrop.h:38
BE_cpc_stubble_cultivator
Definition: BECatchPeaCrop.h:35
BECATCHPEACROP_BASE
#define BECATCHPEACROP_BASE
Definition: BECatchPeaCrop.h:24
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
BE_cpc_ferti_p1_sand
Definition: BECatchPeaCrop.h:36
Crop::m_first_date
int m_first_date
Definition: Farm.h:501
FarmEvent::m_startday
int m_startday
Definition: Farm.h:385
BECatchPeaCropToDo
BECatchPeaCropToDo
Definition: BECatchPeaCrop.h:32
BE_cpc_ferti_s1_sand
Definition: BECatchPeaCrop.h:37
Crop
The base class for all crops.
Definition: Farm.h:495
Landscape
The landscape class containing all environmental and topographical data.
Definition: Landscape.h:142
BE_cpc_winter_plough_clay
Definition: BECatchPeaCrop.h:41
Calendar::Date
long Date(void)
Definition: Calendar.h:57
BE_CC_ENDDATE
#define BE_CC_ENDDATE
Definition: BECatchPeaCrop.h:25
LE::GetSoilType
int GetSoilType()
Definition: Elements.h:302
CfgBool
Bool configurator entry class.
Definition: Configurator.h:155
BE_cpc_sleep_all_day
Definition: BECatchPeaCrop.h:34
BECatchPeaCrop::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: BECatchPeaCrop.cpp:56
Calendar::OldDays
long OldDays(void)
Definition: Calendar.h:60
tocc_Catch
Definition: LandscapeFarmingEnums.h:627
BECatchPeaCrop
BECatchPeaCrop class .
Definition: BECatchPeaCrop.h:53
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
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
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_cpc_preseeding_cultivator_with_sow
Definition: BECatchPeaCrop.h:40
LE
Definition: Elements.h:86
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
BE_cpc_ferti_s1_clay
Definition: BECatchPeaCrop.h:39
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
Farm
The base class for all farm types.
Definition: Farm.h:755
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
Crop::SetCropClassification
void SetCropClassification(int a_classification)
Definition: Farm.h:549
BE_cpc_start
Definition: BECatchPeaCrop.h:33
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
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