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
|
DK_OrchPear class
.
More...
#include <DK_OrchPear.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_OrchPear class
.
See DK_OrchPear.h::DK_OrchPearToDo for a complete list of all possible events triggered codes by the management plan. When triggered these events are handled by Farm and are available as information for other objects such as animal and bird models.
◆ DK_OrchPear()
◆ Do()
The one and only method for a crop management plan. All farm actions go through here.
Called every time something is done to the crop by the farmer in the first instance it is always called with a_ev->todo set to start, but susequently will be called whenever the farmer wants to carry out a new operation.
This method details all the management and relationships between operations necessary to grow and ALMaSS crop.
Reimplemented from Crop.
87 std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
104 int day_num_shift = 365;
898 "Unknown event type! ",
"");
References cfg_pest_orchard_on, cfg_pest_product_amounts, LE::ClearManagementActionSum(), Farm::CutOrch(), Calendar::Date(), Calendar::DayInYear(), Farm::DeepPlough(), dk_ope_boron_p, dk_ope_boron_s, dk_ope_cutting1, dk_ope_cutting2, dk_ope_cutting3, dk_ope_cutting4, dk_ope_cutting5, dk_ope_cutting6, dk_ope_fungicide1, dk_ope_fungicide10, dk_ope_fungicide11, dk_ope_fungicide12, dk_ope_fungicide13, dk_ope_fungicide14, dk_ope_fungicide2, dk_ope_fungicide3, dk_ope_fungicide4, dk_ope_fungicide5, dk_ope_fungicide6, dk_ope_fungicide7, dk_ope_fungicide8, dk_ope_fungicide9, dk_ope_gr1, dk_ope_gr2, dk_ope_gr3, dk_ope_gr4, dk_ope_harvest, dk_ope_herbicide1, dk_ope_herbicide2, dk_ope_herbicide3, dk_ope_herbicide4, dk_ope_herbicide5, dk_ope_herbicide6, dk_ope_herbicide7, dk_ope_herbicide8, dk_ope_herbicide9, dk_ope_insecticide1, dk_ope_insecticide10, dk_ope_insecticide2, dk_ope_insecticide3, dk_ope_insecticide4, dk_ope_insecticide5, dk_ope_insecticide6, dk_ope_insecticide7, dk_ope_insecticide8, dk_ope_insecticide9, dk_ope_manual_cutting1, dk_ope_manual_cutting10, dk_ope_manual_cutting11, dk_ope_manual_cutting12, dk_ope_manual_cutting2, dk_ope_manual_cutting3, dk_ope_manual_cutting4, dk_ope_manual_cutting5, dk_ope_manual_cutting6, dk_ope_manual_cutting7, dk_ope_manual_cutting8, dk_ope_manual_cutting9, dk_ope_manure_p1, dk_ope_manure_p2, dk_ope_manure_s1, dk_ope_manure_s2, dk_ope_planting, dk_ope_remove_fruits, dk_ope_row_cultivation1, dk_ope_row_cultivation2, dk_ope_sleep_all_day, dk_ope_sow_grass, dk_ope_spring_plough, dk_ope_start, dk_ope_subsoiler, dk_ope_water1, dk_ope_water2, dk_ope_water3, dk_ope_water4, dk_ope_water5, dk_ope_water6, dk_ope_water7, DK_OPE_YEARS_AFTER_PLANT, Farm::DoIt_prob(), Farm::FA_Boron(), Farm::FA_Manure(), Farm::FP_Boron(), Farm::FP_Manure(), Farm::FruitHarvest(), Farm::FungicideTreat(), g_date, g_msg, LE::GetMDates(), Calendar::GetYearNumber(), Farm::GrowthRegulator(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::IsStockFarmer(), Crop::m_date_modifier, Crop::m_ev, Crop::m_farm, Crop::m_field, FarmEvent::m_forcespring, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::ProductApplication(), Farm::Pruning(), Farm::RowCultivation(), Crop::SimpleEvent(), Farm::SleepAllDay(), Farm::SpringPlough(), Farm::SpringSow(), Crop::StartUpCrop(), tov_DKOrchPear, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), WARN_BUG, and Farm::Water().
◆ SetUpFarmCategoryInformation()
void DK_OrchPear::SetUpFarmCategoryInformation |
( |
| ) |
|
|
inline |
References DK_OPE_BASE, dk_ope_foobar, fmc_Cultivation, fmc_Cutting, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, fmc_Watering, Crop::m_base_elements_no, and Crop::m_ManagementCategories.
Referenced by DK_OrchPear().
The documentation for this class was generated from the following files:
int GetMDates(int a, int b)
Definition: Elements.h:405
Definition: DK_OrchPear.h:73
bool m_forcespring
Definition: Farm.h:392
Definition: DK_OrchPear.h:50
Definition: LandscapeFarmingEnums.h:1005
Definition: DK_OrchPear.h:84
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
Definition: FarmFuncs.cpp:421
Definition: DK_OrchPear.h:81
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
bool IsStockFarmer(void)
Definition: Farm.h:961
Definition: DK_OrchPear.h:60
Definition: DK_OrchPear.h:38
Definition: DK_OrchPear.h:100
bool m_lock
Definition: Farm.h:384
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
CfgBool cfg_pest_orchard_on
Turn on pesticides for orchard.
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
Definition: DK_OrchPear.h:52
int GetYearNumber(void)
Definition: Calendar.h:72
Definition: DK_OrchPear.h:91
Definition: DK_OrchPear.h:43
Definition: DK_OrchPear.h:74
Definition: DK_OrchPear.h:115
bool DoIt_prob(double a_probability)
Return chance out of 0 to 1.
Definition: Farm.cpp:864
class Calendar * g_date
Definition: Calendar.cpp:37
Definition: DK_OrchPear.h:37
Definition: LandscapeFarmingEnums.h:1006
Definition: DK_OrchPear.h:76
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
Definition: FarmFuncs.cpp:1110
Definition: DK_OrchPear.h:57
virtual bool SpringSow(LE *a_field, double a_user, int a_days, double a_seed_coating_amount=-1, PlantProtectionProducts a_ppp=ppp_foobar)
Carry out a sowing event in the spring on a_field.
Definition: FarmFuncs.cpp:501
Definition: DK_OrchPear.h:47
int m_base_elements_no
Definition: Farm.h:505
Definition: LandscapeFarmingEnums.h:463
Definition: DK_OrchPear.h:58
Definition: DK_OrchPear.h:67
#define DK_OPE_BASE
Definition: DK_OrchPear.h:25
Definition: DK_OrchPear.h:107
int m_first_date
Definition: Farm.h:501
Definition: DK_OrchPear.h:68
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
Definition: DK_OrchPear.h:56
Definition: DK_OrchPear.h:88
Definition: DK_OrchPear.h:63
Definition: DK_OrchPear.h:93
Definition: DK_OrchPear.h:54
Definition: DK_OrchPear.h:71
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
#define DK_OPE_YEARS_AFTER_PLANT
Definition: DK_OrchPear.h:23
bool value() const
Definition: Configurator.h:164
Definition: DK_OrchPear.h:48
Definition: DK_OrchPear.h:96
virtual bool FP_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:896
Definition: DK_OrchPear.h:105
Definition: LandscapeFarmingEnums.h:1009
Definition: DK_OrchPear.h:59
Definition: DK_OrchPear.h:95
Definition: DK_OrchPear.h:108
Definition: LandscapeFarmingEnums.h:1004
Definition: DK_OrchPear.h:46
Definition: DK_OrchPear.h:77
Definition: DK_OrchPear.h:111
Definition: DK_OrchPear.h:44
Definition: DK_OrchPear.h:85
Definition: DK_OrchPear.h:86
long Date(void)
Definition: Calendar.h:57
Definition: DK_OrchPear.h:109
Definition: DK_OrchPear.h:66
Definition: LandscapeFarmingEnums.h:1008
Definition: DK_OrchPear.h:89
Definition: LandscapeFarmingEnums.h:1003
Definition: LandscapeFarmingEnums.h:1011
Definition: DK_OrchPear.h:42
long OldDays(void)
Definition: Calendar.h:60
Definition: DK_OrchPear.h:104
Definition: DK_OrchPear.h:70
Definition: DK_OrchPear.h:75
Definition: DK_OrchPear.h:39
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
virtual bool FA_Boron(LE *a_field, double a_user, int a_days)
Apply soluble Boron to a_field owned by a stock farmer.
Definition: FarmFuncs.cpp:868
virtual bool CutOrch(LE *a_field, double a_user, int a_days)
Cut vegetation on orchard crop. //based on cut to silage - values from cutting function of orchard.
Definition: FarmFuncs.cpp:1666
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
virtual bool FP_Boron(LE *a_field, double a_user, int a_days)
Apply soluble Boron to a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:854
Definition: DK_OrchPear.h:55
Definition: DK_OrchPear.h:87
Definition: DK_OrchPear.h:80
Farm * m_farm
Definition: Farm.h:498
LE * m_field
Definition: Farm.h:499
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_OrchPear.h:103
std::vector< double > value() const
Definition: Configurator.h:219
Definition: DK_OrchPear.h:65
int m_todo
Definition: Farm.h:388
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
Definition: DK_OrchPear.h:41
Definition: DK_OrchPear.h:45
Definition: DK_OrchPear.h:90
Definition: DK_OrchPear.h:110
virtual bool SleepAllDay(LE *a_field, double a_user, int a_days)
Nothing to to today on a_field.
Definition: FarmFuncs.cpp:272
Definition: DK_OrchPear.h:101
CfgArray_Double cfg_pest_product_amounts
Amount of pesticide applied in grams of active substance per hectare for each of the 10 pesticides.
virtual bool RowCultivation(LE *a_field, double a_user, int a_days)
Carry out a harrowing between crop rows on a_field.
Definition: FarmFuncs.cpp:1183
Definition: DK_OrchPear.h:49
Definition: DK_OrchPear.h:83
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: FarmFuncs.cpp:1330
Definition: DK_OrchPear.h:97
int m_last_date
Definition: Farm.h:503
Definition: DK_OrchPear.h:53
Definition: DK_OrchPear.h:92
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Definition: DK_OrchPear.h:113
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
Definition: DK_OrchPear.h:64
virtual bool DeepPlough(LE *a_field, double a_user, int a_days)
Carry out a deep ploughing event on a_field.
Definition: FarmFuncs.cpp:408
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
Definition: DK_OrchPear.h:69
Definition: LandscapeFarmingEnums.h:1012
virtual bool FruitHarvest(LE *a_field, double a_user, int a_days)
FruitHarvest (harvest of the mature fruits, e.g., grapes) applied on a_field.
Definition: FarmFuncs.cpp:1959
virtual bool Pruning(LE *a_field, double a_user, int a_days)
Pruning applied on a_field - details needs to be added (e.g., impact on biomass, influence/impacts in...
Definition: FarmFuncs.cpp:1897
Definition: DK_OrchPear.h:106
Definition: DK_OrchPear.h:40
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: FarmFuncs.cpp:2070
Definition: DK_OrchPear.h:82
int DayInYear(void)
Definition: Calendar.h:58
Definition: DK_OrchPear.h:99
Definition: DK_OrchPear.h:98
Definition: DK_OrchPear.h:112
void SetUpFarmCategoryInformation()
Definition: DK_OrchPear.h:138
Definition: DK_OrchPear.h:51
Definition: DK_OrchPear.h:94
Definition: DK_OrchPear.h:61
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Definition: DK_OrchPear.h:62
FarmEvent * m_ev
Definition: Farm.h:500
Definition: DK_OrchPear.h:72
Definition: MapErrorMsg.h:34
Definition: LandscapeFarmingEnums.h:1079
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
Definition: DK_OrchPear.h:102
Definition: DK_OrchPear.h:78
Definition: DK_OrchPear.h:79
Definition: DK_OrchPear.h:36