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
|
PTVineyards class
.
More...
#include <PTVineyards.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...
|
|
PTVineyards class
.
See PTVineyards.h::PTVineyardsToDo for a complete list of all possible events triggered codes by the winter wheat management plan. When triggered these events are handled by Farm and are available as information for other objects such as animal and bird models.
◆ PTVineyards()
◆ 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 m_ev->todo set to start, but subsequently 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 - in this case conventional winter wheat.
Reimplemented from Crop.
85 std::vector<std::vector<int>> flexdates(1 + 1, std::vector<int>(2, 0));
258 !
m_field->GetLandscape()->SupplyShouldSpray())
277 !
m_field->GetLandscape()->SupplyShouldSpray())
292 !
m_field->GetLandscape()->SupplyShouldSpray())
311 !
m_field->GetLandscape()->SupplyShouldSpray())
377 "Unknown event type! ",
"");
References cfg_pest_product_amounts, cfg_pest_vineyard_on, LE::ClearManagementActionSum(), Farm::CutOrch(), Calendar::Date(), Calendar::DayInYear(), Farm::FP_NPK(), Farm::FruitHarvest(), Farm::FungicideTreat(), g_date, g_msg, LE::GetLastTreatment(), LE::GetMDates(), Farm::GreenHarvest(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::LeafThinning(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_last_date, FarmEvent::m_todo, Calendar::OldDays(), ppp_1, Farm::ProductApplication(), Farm::Pruning(), pt_vine_autumn_pruning, pt_vine_fungicide1, pt_vine_fungicide2, pt_vine_fungicide3, pt_vine_fungicide4, pt_vine_fungicide5, pt_vine_fungicide6, pt_vine_greenharvest, pt_vine_harvest, pt_vine_herbicide1, pt_vine_herbicide2, pt_vine_insecticide1, pt_vine_insecticide2, pt_vine_insecticide3, pt_vine_insecticide4, pt_vine_leafthinning, pt_vine_mowing1, pt_vine_mowing2, pt_vine_npk1, pt_vine_npk2, PT_VINE_PRUNING_DATE, PT_VINE_PRUNING_DONE, pt_vine_shredding, pt_vine_spring_pruning, pt_vine_start, pt_vine_suckering, pt_vine_trimming, Farm::Shredding(), Crop::SimpleEvent(), Crop::SimpleEvent_(), Crop::StartUpCrop(), tov_PTVineyards, CfgBool::value(), CfgArray_Double::value(), MapErrorMsg::Warn(), and WARN_BUG.
◆ SetUpFarmCategoryInformation()
void PTVineyards::SetUpFarmCategoryInformation |
( |
| ) |
|
|
inline |
References fmc_Cutting, fmc_Fertilizer, fmc_Fungicide, fmc_Harvest, fmc_Herbicide, fmc_Insecticide, fmc_Others, Crop::m_base_elements_no, Crop::m_ManagementCategories, pt_vine_foobar, and PTVINEYARDS_BASE.
Referenced by PTVineyards().
The documentation for this class was generated from the following files:
int GetMDates(int a, int b)
Definition: Elements.h:405
Definition: PTVineyards.h:74
Definition: LandscapeFarmingEnums.h:1005
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: FarmFuncs.cpp:2025
Definition: PTVineyards.h:82
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
Definition: PTVineyards.h:71
void ClearManagementActionSum()
clears the management action counters
Definition: Elements.h:247
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition: FarmFuncs.cpp:645
Definition: PTVineyards.h:91
class Calendar * g_date
Definition: Calendar.cpp:37
Definition: LandscapeFarmingEnums.h:1006
void SetUpFarmCategoryInformation()
Definition: PTVineyards.h:117
Definition: PTVineyards.h:80
Definition: PTVineyards.h:84
int m_base_elements_no
Definition: Farm.h:505
int m_first_date
Definition: Farm.h:501
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: FarmFuncs.cpp:2101
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: Farm.cpp:747
bool value() const
Definition: Configurator.h:164
Definition: PTVineyards.h:65
Definition: PTVineyards.h:81
Definition: PTVineyards.h:70
Definition: LandscapeFarmingEnums.h:1009
Definition: LandscapeFarmingEnums.h:320
virtual bool GreenHarvest(LE *a_field, double a_user, int a_days)
GreenHarvest (remove of excess production that may affect the desired quality of the fruits,...
Definition: FarmFuncs.cpp:1942
Definition: PTVineyards.h:79
Definition: LandscapeFarmingEnums.h:1004
Definition: PTVineyards.h:64
long Date(void)
Definition: Calendar.h:57
Definition: PTVineyards.h:63
Definition: PTVineyards.h:88
CfgBool cfg_pest_vineyard_on
Turn on pesticides for wineyard.
Definition: LandscapeFarmingEnums.h:1003
long OldDays(void)
Definition: Calendar.h:60
int GetLastTreatment(int *a_index)
Definition: Elements.cpp:1077
Definition: PTVineyards.h:92
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
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
Definition: PTVineyards.h:85
#define PT_VINE_PRUNING_DONE
Definition: PTVineyards.h:51
Definition: PTVineyards.h:66
Definition: PTVineyards.h:76
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
std::vector< double > value() const
Definition: Configurator.h:219
int m_todo
Definition: Farm.h:388
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 InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: FarmFuncs.cpp:2135
Definition: PTVineyards.h:89
Definition: PTVineyards.h:67
Definition: PTVineyards.h:73
int m_last_date
Definition: Farm.h:503
Definition: PTVineyards.h:68
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
virtual bool LeafThinning(LE *a_field, double a_user, int a_days)
LeafThinning (leaf removal to increase areation and sun exposure of fruits, e.g., grapes) applied on ...
Definition: FarmFuncs.cpp:1927
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
Definition: PTVineyards.h:86
Definition: PTVineyards.h:59
virtual bool Shredding(LE *a_field, double a_user, int a_days)
Shredding (destruction of the pruning residues with a shredders using hammer mower) applied on a_fiel...
Definition: FarmFuncs.cpp:1912
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
#define PT_VINE_PRUNING_DATE
A flag used to indicate autumn ploughing status.
Definition: PTVineyards.h:50
int DayInYear(void)
Definition: Calendar.h:58
Crop(TTypesOfVegetation a_tov, TTypesOfCrops a_toc, Landscape *a_L)
Definition: Farm.cpp:733
Definition: PTVineyards.h:77
Definition: PTVineyards.h:87
FarmEvent * m_ev
Definition: Farm.h:500
Definition: MapErrorMsg.h:34
Definition: PTVineyards.h:62
Definition: LandscapeFarmingEnums.h:1079
Definition: LandscapeFarmingEnums.h:1007
FarmManagementCategory
Definition: LandscapeFarmingEnums.h:1001
#define PTVINEYARDS_BASE
Definition: PTVineyards.h:45
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