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
|
#include <DK_GrassLowYield_Perm.h>
|
TTypesOfVegetation | m_tov |
|
void | SimpleEvent (long a_date, int a_todo, bool a_lock) |
| Adds an event to this crop management. More...
|
|
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. More...
|
|
bool | StartUpCrop (int a_spring, std::vector< std::vector< int >> a_flexdates, int a_todo) |
|
Holds the translation between the farm operation enum for each cropand the farm management category associated with it More...
|
|
bool | AphidDamage (LE *a_field) |
| Compares aphid numbers per m2 with a threshold to return true if threshold is exceeded. More...
|
|
Farm * | m_farm |
|
LE * | m_field |
|
FarmEvent * | m_ev |
|
int | m_first_date |
|
int | m_count |
|
int | m_last_date |
|
int | m_ddegstoharvest |
|
int | m_base_elements_no |
|
Landscape * | m_OurLandscape |
|
bool | m_forcespringpossible = false |
| Used to signal that the crop can be forced to start in spring. More...
|
|
TTypesOfCrops | m_toc |
| The Crop type in terms of the TTypesOfCrops list (smaller list than tov, no country designation) More...
|
|
int | m_CropClassification |
| Contains information on whether this is a winter crop, spring crop, or catch crop that straddles the year boundary (0,1,2) More...
|
|
vector< FarmManagementCategory > | m_ManagementCategories |
| Holds the translation between the farm operation enum for each crop and the farm management category associated with it. More...
|
|
static int | m_date_modifier = 0 |
| Holds a value that shifts test pesticide use by this many days in crops modified to use it. More...
|
|
◆ DK_GrassLowYield_Perm()
◆ Do()
bool DK_GrassLowYield_Perm::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
58 std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
144 g_msg->
Warn(
WARN_BUG,
"DK_GrassLowYield_Perm::Do(): failure in 'CattleOut' execution",
"");
163 g_msg->
Warn(
WARN_BUG,
"DK_GrassLowYield_Perm::Do(): failure in 'CattleOut' execution",
"");
192 g_msg->
Warn(
WARN_BUG,
"DK_GrassLowYield_Perm::Do(): failure in 'CattleIsOut' execution",
"");
257 "Unknown event type! ",
"");
References Farm::CattleIsOut(), Farm::CattleOut(), cfg_farm_cattle_grass_high, cfg_farm_cattle_grass_low, cfg_herbi_app_prop, Crop::ChooseNextCrop(), LE::ClearManagementActionSum(), Farm::CutToHay(), Farm::CutWeeds(), Calendar::Date(), Calendar::DayInYear(), dk_glyp_cattle_is_out, dk_glyp_cattle_out1, dk_glyp_cattle_out2, dk_glyp_compress_straw, DK_GLYP_CUT_DATE, dk_glyp_cut_to_hay, dk_glyp_cut_weeds, dk_glyp_force_growth, DK_GLYP_GRASS_READY, dk_glyp_herbicide, dk_glyp_raking1, dk_glyp_raking2, dk_glyp_start, dk_glyp_wait, Farm::DoIt(), LE::ForceGrowthTest(), g_date, g_msg, LE::GetMConstants(), LE::GetMDates(), LE::GetVegHeight(), Farm::HayBailing(), Farm::HayTurning(), Farm::HerbicideTreat(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), Farm::Prob_multiplier(), Crop::SimpleEvent(), Crop::StartUpCrop(), tov_DKGrassLowYield_Perm, CfgInt::value(), CfgFloat::value(), MapErrorMsg::Warn(), and WARN_BUG.
◆ SetUpFarmCategoryInformation()
void DK_GrassLowYield_Perm::SetUpFarmCategoryInformation |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following files:
int GetMDates(int a, int b)
Definition: Elements.h:405
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
Definition: DK_GrassLowYield_Perm.h:47
bool m_lock
Definition: Farm.h:384
int GetMConstants(int a)
Definition: Elements.h:407
virtual bool CattleIsOut(LE *a_field, double a_user, int a_days, int a_max)
Generate a 'cattle_out' event for every day the cattle are on a_field.
Definition: FarmFuncs.cpp:2470
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: Farm.cpp:856
CfgInt cfg_farm_cattle_grass_high
Definition: DK_GrassLowYield_Perm.h:44
Definition: DK_GrassLowYield_Perm.h:42
virtual void ForceGrowthTest(void)
Definition: Elements.h:188
class Calendar * g_date
Definition: Calendar.cpp:37
Definition: LandscapeFarmingEnums.h:1006
Definition: DK_GrassLowYield_Perm.h:46
double value() const
Definition: Configurator.h:142
Definition: DK_GrassLowYield_Perm.h:40
int m_base_elements_no
Definition: Farm.h:505
Definition: DK_GrassLowYield_Perm.h:36
virtual bool CutToHay(LE *a_field, double a_user, int a_days)
Carry out hay cutting on a_field.
Definition: FarmFuncs.cpp:1607
int m_first_date
Definition: Farm.h:501
#define DK_GLYP_CUT_DATE
Definition: DK_GrassLowYield_Perm.h:32
Definition: DK_GrassLowYield_Perm.h:45
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
Definition: LandscapeFarmingEnums.h:1009
virtual double Prob_multiplier()
Definition: Farm.h:778
long Date(void)
Definition: Calendar.h:57
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
Definition: FarmFuncs.cpp:1507
Definition: LandscapeFarmingEnums.h:461
Definition: LandscapeFarmingEnums.h:1003
virtual double GetVegHeight(void)
Definition: Elements.h:148
void SetUpFarmCategoryInformation()
Definition: DK_GrassLowYield_Perm.h:62
long OldDays(void)
Definition: Calendar.h:60
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
bool StartUpCrop(int a_spring, std::vector< std::vector< int >> a_flexdates, int a_todo)
Holds the translation between the farm operation enum for each cropand the farm management category a...
Definition: Farm.cpp:652
Definition: DK_GrassLowYield_Perm.h:41
Farm * m_farm
Definition: Farm.h:498
LE * m_field
Definition: Farm.h:499
int value() const
Definition: Configurator.h:116
CfgInt cfg_farm_cattle_grass_low
vector< FarmManagementCategory > m_ManagementCategories
Holds the translation between the farm operation enum for each crop and the farm management category ...
Definition: Farm.h:530
Definition: DK_GrassLowYield_Perm.h:43
int m_todo
Definition: Farm.h:388
#define DK_GLYP_BASE
Definition: DK_GrassLowYield_Perm.h:31
int m_last_date
Definition: Farm.h:503
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Definition: LandscapeFarmingEnums.h:1010
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
Definition: DK_GrassLowYield_Perm.h:39
Definition: DK_GrassLowYield_Perm.h:38
CfgFloat cfg_herbi_app_prop
#define DK_GLYP_GRASS_READY
Definition: DK_GrassLowYield_Perm.h:33
int DayInYear(void)
Definition: Calendar.h:58
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Definition: DK_GrassLowYield_Perm.h:37
void ChooseNextCrop(int a_no_dates)
Chooses the next crop to grow in a field.
Definition: Farm.cpp:756
virtual bool HayTurning(LE *a_field, double a_user, int a_days)
Carry out hay turning on a_field.
Definition: FarmFuncs.cpp:1491
FarmEvent * m_ev
Definition: Farm.h:500
virtual bool CattleOut(LE *a_field, double a_user, int a_days)
Start a grazing event on a_field today.
Definition: FarmFuncs.cpp:2368
Definition: DK_GrassLowYield_Perm.h:48
Definition: MapErrorMsg.h:34
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
virtual bool CutWeeds(LE *a_field, double a_user, int a_days)
Carry out weed topping on a_field.
Definition: FarmFuncs.cpp:1629