ALMaSS Rabbit ODdox  1.1
The rabbit model description following ODdox protocol
VegElement Class Reference

#include <elements.h>

Inheritance diagram for VegElement:
LE BeetleBank Field ForestElement GreenElement HedgeBank Hedges PermanentSetaside PermPasture PermPastureLowYield PermPastureTussocky RoadsideVerge WaterBufferZone

Public Member Functions

 VegElement (void)
 
virtual ~VegElement (void)
 
virtual void DoDevelopment (void)
 
virtual double GetDigestability (void)
 
virtual double GetLAGreen (void)
 
virtual double GetLATotal (void)
 
virtual double GetVegCover (void)
 
virtual double GetVegHeight (void)
 
virtual double GetVegBiomass (void)
 
virtual double GetDeadBiomass (void)
 
virtual double GetGreenBiomass (void)
 
virtual double GetWeedBiomass (void)
 
virtual int GetVegDensity (void)
 
virtual bool GetSkScrapes (void)
 
virtual bool GetVegPatchy (void)
 
virtual void SetVegPatchy (bool p)
 
virtual double GetInsectPop (void)
 
virtual void SetInsectPop (double insects)
 
virtual TTypesOfVegetation GetVegType (void)
 
virtual void Insecticide (double a_fraction)
 
virtual bool IsCereal ()
 
virtual bool IsMatureCereal ()
 
virtual bool IsMaize ()
 
virtual bool IsGrass ()
 
virtual bool IsGooseGrass ()
 
virtual void InsectMortality (double a_fraction)
 
virtual void ReduceWeedBiomass (double a_fraction)
 
virtual void ToggleCattleGrazing (void)
 
virtual void TogglePigGrazing (void)
 
virtual void GrazeVegetation (double a_grams, bool a_force)
 
virtual void GrazeVegetationTotal (double a_grams)
 
virtual void SetVegType (TTypesOfVegetation a_vege_type, TTypesOfVegetation a_weed_type)
 
virtual void SetCropData (double, double, double, TTypesOfVegetation, double, int)
 
virtual void SetCropDataAll (double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
 
virtual void SetVegHeight (double a_veg_height)
 
virtual void SetVegParameters (double a_veg_height, double a_LAtotal, double a_LAgreen, double a_WeedBiomass)
 
virtual void SetGrowthPhase (int a_phase)
 
virtual void StoreLAItotal ()
 
virtual void ForceGrowthInitialize (void)
 
virtual void ForceGrowthTest (void)
 
virtual void ForceGrowthDevelopment (void)
 
virtual void ZeroVeg (void)
 
virtual void ReduceVeg (double a_reduc)
 
virtual void ReduceVeg_Extended (double a_reduc)
 
void Set_taken (bool a_taken, int index)
 
bool Get_taken (int index)
 
void Set_tov_type (TTypesOfVegetation a_tov_type, int index)
 
void Set_area_in_crop_data (double a_area)
 
void Set_biomass_at_harvest (double a_biomass, int index)
 
void Set_harvested ()
 
bool Get_harvested (int index)
 
void Add_no_herb_app ()
 
void Add_no_fi_app ()
 
void Add_missed_herb_app ()
 
void Add_missed_fi_app ()
 
void Set_CropDataStorage (int index, CropActualValues a_struct)
 
CropActualValues Get_CropDataStorage (int index)
 
void Clean_CropDataStorage (int index)
 
virtual void ResetDigestability ()
 sets growth record to zero More...
 
virtual int GetVegPhase ()
 
- Public Member Functions inherited from LE
 LE (void)
 
virtual ~LE (void)
 
virtual double GetDayDegrees (void)
 Variable used to record the current grazing pressure by e.g. voles *‍/ double m_volegrazing; /**. More...
 
virtual void SetVegBiomass (int)
 
virtual void GrazeVeg_Extended (double)
 
virtual double GetTrafficLoad (void)
 
virtual TTypesOfVegetation GetPreviousCrop (int)
 
bool GetPoison (void)
 
void SetPoison (bool a_poison)
 
bool GetHigh (void)
 
int GetCattleGrazing (void)
 
bool GetPigGrazing (void)
 
bool HasTramlines (void)
 
bool IsRecentlyMown (void)
 
int IsRecentlySprayed (void)
 
int GetPoly (void)
 Returns the polyref number for this polygon. More...
 
int GetMapIndex (void)
 
void SetMapIndex (int a_map_index)
 
int GetOwnerFile (void)
 
int GetOwnerIndex (void)
 
int GetLastTreatment (int *a_index)
 
FarmGetOwner (void)
 
double GetArea (void)
 
double GetGooseGrazingForage (GooseSpecies a_goose)
 
double GetBirdSeed (void)
 
void SetBirdSeed (double a_forage)
 
double GetBirdMaize (void)
 
void SetBirdMaize (double a_forage)
 
int GetCountryDesignation (void)
 
void SetCountryDesignation (int a_designation)
 
long GetOldDays (void)
 
void SetOwner (Farm *a_owner, int a_owner_num, int a_owner_index)
 
void SetHigh (bool a_high)
 
void SetPoly (int a_poly)
 
void SetMapValid (bool a_valid)
 
bool GetMapValid (void)
 
void SetArea (double a_area)
 
int GetSoilType ()
 
int GetSoilTypeR ()
 
void SetSoilType (int a_st)
 
void SetLastSownVeg (TTypesOfVegetation a_tov)
 Records the last vegetation type to be sown. More...
 
TTypesOfVegetation GetLastSownVeg ()
 Returns the last vegetation type to be sown. More...
 
void SetLastTreatment (int a_treatment)
 
void SetSprayedToday (bool a_didit)
 
bool GetSprayedToday ()
 
void SetCopyTreatment (int a_treatment)
 
void SetOldDays (long a_days)
 
void SetRotIndex (int a_index)
 
int GetRotIndex (void)
 
void SetTramlinesDecay (int a_decaytime_days)
 
void SetHerbicideDelay (int a_decaytime_days)
 
void SetMownDecay (int a_decaytime_days)
 
void AddArea (double a_area_diff)
 
LEGetBorder (void)
 
int GetUnsprayedMarginPolyRef (void)
 
void SetBorder (LE *a_border)
 
void SetUnsprayedMarginPolyRef (int a_unsprayedmargin)
 
void SetPesticideCell (int a_cell)
 
int GetPesticideCell ()
 
void SetValidXY (int a_valid_x, int a_valid_y)
 
int GetValidX (void)
 
int GetValidY (void)
 
int GetMaxX (void)
 
int GetMaxY (void)
 
int GetMinX (void)
 
int GetMinY (void)
 
void SetMaxX (int x)
 
void SetMaxY (int y)
 
void SetMinX (int x)
 
void SetMinY (int y)
 
int GetMDates (int a, int b)
 
void SetMDates (int a, int b, int c)
 
int GetMConstants (int a)
 
void SetMConstants (int a, int c)
 
double GetVegDDegs ()
 Get the total of day degrees for the crop/veg on this element. More...
 
int GetOpenness (void)
 For goose model functionality, openness score for the polygon. More...
 
void SetGooseNos (int a_number, int a_day)
 
void SetGooseSpNos (int a_number, int a_day, GooseSpecies a_goose)
 
void SetGooseNosTimed (int a_number, int a_day)
 
void SetGooseSpNosTimed (int a_number, int a_day, GooseSpecies a_goose)
 
void SetGooseRoostDist (int a_dist, GooseSpecies a_goose)
 
int GetGooseNosToday ()
 For goose model functionality, returns the number of geese today. More...
 
int GetGooseNosTodayTimed ()
 For goose model functionality, returns the number of geese today at a predefined time. More...
 
int GetGooseNos ()
 For goose model functionality, returns the number of geese yesterday. More...
 
int GetQuarryNos ()
 For goose model functionality, returns the number of geese yesterday which can be hunted as legal quarry. More...
 
int GetGooseSpNosToday (GooseSpecies a_goose)
 For goose model functionality, returns the number of geese per species yesterday. More...
 
int GetGooseSpNosTodayTimed (GooseSpecies a_goose)
 For goose model functionality, returns the number of geese per species yesterday at a predefined time. More...
 
int GetGooseRoostDist (GooseSpecies a_goose)
 For goose model functionality, returns the distance to closest roost. More...
 
void SetOpenness (int a_openness)
 Records the openness statistic for this polygon. More...
 
void DoCopy (const LE *a_Le)
 a copy function to be used because a copy constuctor won't work More...
 
virtual void SetMaleNewtPresent (bool)
 Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic casts. More...
 
virtual bool IsMaleNewtPresent ()
 Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic casts. More...
 
void SetStubble (bool a_flag)
 Sets the in stubble flag. More...
 
bool GetStubble ()
 Return the in stubble flag. More...
 
bool GetOsmiaNest ()
 Test to see if a nest is found. More...
 
void ReleaseOsmiaNest ()
 Test to see if a nest is found. More...
 
void UpdateOsmiaNesting ()
 Recalculate the nest finding probability. More...
 
void IncOsmiaNesting ()
 Add an occupied nest. More...
 
void SetMaxOsmiaNests (double a_noNests)
 Add an occupied nest. More...
 
void SetPollenNectarData (int a_almasstype)
 sets the pollen and nectar information More...
 
virtual PollenNectarQuality GetPollen ()
 
virtual PollenNectarQuality GetNectar ()
 
virtual double GetTotalPollen ()
 
virtual double GetTotalNectar ()
 
void SetPollenNectarCurves (PollenNectarDevelopmentCurve *a_pollencurnve, PollenNectarDevelopmentCurve *a_nectarcurve)
 Set method for pollen and nectar curves. More...
 

Protected Member Functions

void ReadBugPercentageFile (void)
 
virtual void RecalculateBugsNStuff (void)
 This method is responsible for. More...
 
void CalcGooseForageResources ()
 Calculates spilled grain and grazing forage resources for geese. More...
 
void RandomVegStartValues (double *a_LAtotal, double *a_LAgreen, double *a_veg_height, double *a_weed_biomass)
 
void ForceGrowthSpringTest (void)
 
void PollenNectarPhenologyCalculation ()
 This methods calculates the daily availability of pollen and nectar per square meter and in total. More...
 
void ResetGeese (void)
 Reset geese numbers to zero in case this was not done by the population manager (the normal situation). More...
 

Protected Attributes

TTypesOfVegetation m_vege_type
 
int m_curve_num
 
int m_weed_curve_num
 
int m_veg_phase
 
double m_growth_scaler
 
int m_nutrient_status
 
double m_LAtotal
 
double m_oldLAtotal
 
double m_LAgreen
 
double m_insect_pop
 
double m_veg_biomass
 
double m_total_biomass
 
double m_total_biomass_old
 
double m_green_biomass
 
double m_dead_biomass
 
double m_weed_biomass
 
double m_veg_height
 
int m_veg_density
 
bool m_veg_patchy
 
double m_veg_cover
 
bool m_forced_phase_shift
 
double m_digestability
 
double m_oldnewgrowth [32]
 
int m_newoldgrowthindex
 
double m_newgrowthsum
 
double m_force_Weed
 
double m_force_LAgreen
 
double m_force_LAtotal
 
double m_force_veg_height
 
bool m_force_growth
 
ifstream m_ifile
 
CropActualValues m_CropDataStorage [2]
 Keeps data on pesticide applications, biomass at harvest etc. Data for maximum two crops can be stored (hence size - 2). Used by a farmer to make a yearly accounting (OptimisingFarm::ActualProfit()). More...
 
int m_crop_index
 
- Protected Attributes inherited from LE
int m_ptrace [256]
 
int m_pdates [256]
 
int m_pindex
 
long m_running
 
LEm_border
 
int m_unsprayedmarginpolyref
 
int m_valid_x
 
int m_valid_y
 
int m_centroidx
 
int m_centroidy
 
int m_vege_danger_store
 
int m_PesticideGridCell
 
bool m_is_in_map
 
int m_subtype
 
int m_maxx
 
int m_minx
 
int m_maxy
 
int m_miny
 
long m_olddays
 
long m_management_loop_detect_date
 
long m_management_loop_detect_count
 
Farmm_owner
 
int m_countrydesignation
 
int m_owner_file
 
int m_owner_index
 
int m_rot_index
 
bool m_sprayedtoday
 flag to indicate an overspray situation More...
 
int m_poly
 The polyref number for this polygon. More...
 
int m_map_index
 
int m_almass_le_type
 This holds the ALMaSS element type reference number. More...
 
int m_farmfunc_tried_to_do
 
int m_tramlinesdecay
 
int m_mowndecay
 
int m_herbicidedelay
 
TTypesOfLandscapeElement m_type
 
double m_area
 The element area in m2. More...
 
int m_gooseNos [366]
 The number of geese each day. More...
 
int m_gooseSpNos [366][gs_foobar]
 The number of geese of each species each day. More...
 
int m_gooseNosTimed [366]
 The number of geese at a predefined time per day. More...
 
int m_gooseSpNosTimed [366][gs_foobar]
 The number of geese of each species at a predefined time per day. More...
 
bool m_instubble
 A flag describing the state of the field from a visual perspective - will be in stubble following a cereal crop until either soil cultivation or March 1st. More...
 
double m_birdseedforage
 The grain forage present in KJ/m2. More...
 
double m_birdmaizeforage
 The maize forage present in KJ/m2. More...
 
double m_goosegrazingforage [gs_foobar]
 The grazing forage present in KJ/min. The last value indicates cereal 1 or not -1. More...
 
TTypesOfVegetation m_lastsownvegtype
 Records the last vegegetation type that was sown on the element. More...
 
int m_openness
 The openness metric for a field (if any) More...
 
double m_dist_to_closest_roost [gs_foobar]
 An array holding the distance to the nearest goose roost. More...
 
int m_vegage
 
int m_soiltype
 
int m_days_since_insecticide_spray
 
bool m_high
 
bool m_poison
 
int m_cattle_grazing
 
int m_default_grazing_level
 
bool m_pig_grazing
 
double m_vegddegs
 
double m_yddegs
 
double m_ddegs
 
vector< int > m_lasttreat
 
unsigned int m_lastindex
 
int MDates [2][25]
 
int MConsts [10]
 
LE_Signal m_signal_mask
 
double m_OsmiaNestProb
 to record the chance of osmia nesting More...
 
int m_maxOsmiaNests
 to record the number of possible osmia nests More...
 
int m_currentOsmiaNests
 to record the number of actual osmia nests More...
 
PollenNectarQuality m_pollenquality
 
PollenNectarQuality m_nectarquality
 
double m_totalPollen
 
double m_totalNectar
 
double m_PollenM2
 
double m_NectarM2
 
PollenNectarDevelopmentCurvem_pollencurve
 pointer to the correct pollen curve set More...
 
PollenNectarDevelopmentCurvem_nectarcurve
 pointer to the correct nectar curve set More...
 

Additional Inherited Members

- Public Attributes inherited from LE
int m_tried_to_do
 
int m_squares_in_map
 
bool m_skylarkscrapes
 For management testing of skylark scrapes. More...
 
- Static Protected Attributes inherited from LE
static double m_monthly_traffic []
 Used for birds that feed on grain on cereal fields 3% spill is expected. More...
 
static double m_largeroad_load []
 
static double m_smallroad_load []
 

Detailed Description

Definition at line 568 of file elements.h.

Constructor & Destructor Documentation

◆ VegElement()

VegElement::VegElement ( void  )

Definition at line 615 of file elements.cpp.

615  : LE() {
616  SetVegPatchy(false);
617  m_growth_scaler = 1.0; // default
618  m_veg_biomass = 0.0;
619  m_weed_biomass = 0.0;
620  m_veg_height = 0.0;
621  m_veg_cover = 0.0;
622  m_insect_pop = 1.0;
625  m_weed_curve_num = 99; // 99 used as zero growth curve
626  m_yddegs = 0.0;
627  m_vegddegs = -1.0;
628  m_ddegs = 0.0;
629  m_LAgreen = 0.0;
630  m_LAtotal = 0.0;
631  m_digestability = 1.0;
632  for (int i = 0; i < 32; i++) m_oldnewgrowth[i] = 0.5;
634  m_newgrowthsum = 8.0;
635  m_forced_phase_shift = false;
636  m_force_growth = false;
638  m_total_biomass = 0.0;
639  m_total_biomass_old = 0.0;
640 
641 
642 
643  g_biomass_scale[tov_Carrots] = 0.7857;
647  g_biomass_scale[ tov_BroadBeans ] = 0.857;
648  g_biomass_scale[ tov_FieldPeas ] = 0.857;
653  g_biomass_scale[tov_Maize] = 1.00;
656  g_biomass_scale[tov_NaturalGrass] = 0.567; //0.567 is scaled for actual yield
657  g_biomass_scale[tov_Heath] = 0.567; //0.567 is scaled for actual yield
659  g_biomass_scale[tov_None] = 0.0;
661  g_biomass_scale[tov_Oats] = 0.857;
663  g_biomass_scale[tov_OSBarleySilage] = 0.857 * 0.8;
664  g_biomass_scale[tov_OCarrots] = 0.7857 * 0.8;
668  g_biomass_scale[tov_OFieldPeas] = 0.857 * 0.8;
669  g_biomass_scale[tov_OFieldPeasSilage] = 0.857 * 0.8;
671  g_biomass_scale[tov_OGrazingPigs] = 0.7857 * 0.8;
672  g_biomass_scale[tov_OOats] = 0.857 * 0.8;
674  g_biomass_scale[tov_OPotatoes] = 0.857 * 0.8;
677  g_biomass_scale[tov_OSetaside] = 0.7857;
678  g_biomass_scale[tov_OSpringBarley] = 0.857 * 0.8;
679  g_biomass_scale[tov_OSpringBarleyExt] = 0.857 * 0.8 * 0.8;
682  g_biomass_scale[tov_OSpringBarleyPigs] = 0.857 * 0.8;
683  g_biomass_scale[tov_OTriticale] = 1.00 * 0.8;
684  g_biomass_scale[tov_OWinterBarley] = 0.857 * 0.8;
685  g_biomass_scale[tov_OWinterBarleyExt] = 0.857 * 0.8 * 0.8;
686  g_biomass_scale[tov_OWinterRape] = 1.071 * 0.8;
687  g_biomass_scale[tov_OWinterRye] = 0.857 * 0.8;
688  g_biomass_scale[ tov_OWinterWheat ] = 1.00 * 0.8;
690  g_biomass_scale[ tov_OWinterWheatUndersownExt ] = 1.00 * 0.8 * 0.8;
695  g_biomass_scale[tov_Potatoes] = 0.857;
701  g_biomass_scale[tov_Setaside] = 0.7857;
716  g_biomass_scale[tov_WinterWheat] = 1.00; // This gives approx 18 tonnes biomass for WW
735  g_biomass_scale[tov_YoungForest] = 0.7857 * 0.67;
736  g_biomass_scale[tov_Wasteland] = 0.7857 * 0.67;
738 
749  g_biomass_scale[tov_PLBeet] = 0.857;
752  g_biomass_scale[tov_PLCarrots] = 0.7857;
756  g_biomass_scale[tov_PLBeans] = 0.857;
757 
762  g_biomass_scale[tov_NLBeet] = 0.857;
763  g_biomass_scale[tov_NLCarrots] = 0.7857;
764  g_biomass_scale[tov_NLCabbage] = 0.7857;
765  g_biomass_scale[tov_NLTulips] = 0.7857;
778 
779 
780  g_biomass_scale[tov_DummyCropPestTesting] = 1.00; // just for testing of pesticide spraying distribution
781 
783  //ReadBugPercentageFile();
784  return;
785  }
786 
789  g_weed_percent[ tov_Maize ] = 0.05;
829  g_weed_percent[tov_OOats] = 0.1;
830  g_weed_percent[tov_Oats] = 0.1;
831  g_weed_percent[tov_Heath] = 0.1;
833  g_weed_percent[ tov_FieldPeas ] = 0.1;
850  g_weed_percent[tov_None] = 0.1;
875 
886  g_weed_percent[tov_PLBeet] = 0.1;
894 
899  g_weed_percent[tov_NLBeet] = 0.1;
915 
1007 
1026 
1047 
1048 
1136 
1155 
1176 
1264 
1283 
1304 
1391 
1410 
1431 
1432 
1433  //05.03.13 - modifications for farmer decision making, AM
1436  m_crop_index = 0;
1437 }

References Clean_CropDataStorage(), EL_BUG_PERCENT_A, EL_BUG_PERCENT_B, EL_BUG_PERCENT_C, EL_BUG_PERCENT_D, EL_BUG_PERCENT_Edges_A, EL_BUG_PERCENT_Edges_B, EL_BUG_PERCENT_Edges_C, EL_BUG_PERCENT_G_A, EL_BUG_PERCENT_G_B, EL_BUG_PERCENT_G_C, EL_BUG_PERCENT_SB_A, EL_BUG_PERCENT_SB_B, EL_BUG_PERCENT_SB_C, EL_BUG_PERCENT_WR_A, EL_BUG_PERCENT_WR_B, EL_BUG_PERCENT_WR_C, EL_BUG_PERCENT_WRy_A, EL_BUG_PERCENT_WRy_B, EL_BUG_PERCENT_WRy_C, EL_BUG_PERCENT_WW_A, EL_BUG_PERCENT_WW_B, EL_BUG_PERCENT_WW_C, g_biomass_scale, g_bug_percent_a, g_bug_percent_b, g_bug_percent_c, g_bug_percent_d, g_crops, g_weed_percent, janfirst, l_el_read_bug_percentage_file(), m_crop_index, m_curve_num, LE::m_ddegs, m_digestability, m_force_growth, m_forced_phase_shift, m_growth_scaler, m_insect_pop, m_LAgreen, m_LAtotal, m_newgrowthsum, m_newoldgrowthindex, m_oldnewgrowth, m_total_biomass, m_total_biomass_old, m_veg_biomass, m_veg_cover, m_veg_height, LE::m_vegddegs, m_vege_type, m_weed_biomass, m_weed_curve_num, LE::m_yddegs, SetGrowthPhase(), SetVegPatchy(), tov_AgroChemIndustryCereal, tov_BroadBeans, tov_Carrots, tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_DummyCropPestTesting, tov_FieldPeas, tov_FieldPeasSilage, tov_FieldPeasStrigling, tov_FodderBeet, tov_FodderGrass, tov_Heath, tov_Maize, tov_MaizeSilage, tov_MaizeStrigling, tov_NaturalGrass, tov_NLBeet, tov_NLBeetSpring, tov_NLCabbage, tov_NLCabbageSpring, tov_NLCarrots, tov_NLCarrotsSpring, tov_NLCatchPeaCrop, tov_NLGrassGrazed1, tov_NLGrassGrazed1Spring, tov_NLGrassGrazed2, tov_NLGrassGrazedLast, tov_NLMaize, tov_NLMaizeSpring, tov_NLPermanentGrassGrazed, tov_NLPotatoes, tov_NLPotatoesSpring, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLTulips, tov_NLWinterWheat, tov_NoGrowth, tov_None, tov_Oats, tov_OBarleyPeaCloverGrass, tov_OCarrots, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OCloverGrassSilage1, tov_OFieldPeas, tov_OFieldPeasSilage, tov_OFirstYearDanger, tov_OFodderBeet, tov_OGrazingPigs, tov_OMaizeSilage, tov_OOats, tov_OPermanentGrassGrazed, tov_OPotatoes, tov_OrchardCrop, tov_OSBarleySilage, tov_OSeedGrass1, tov_OSeedGrass2, tov_OSetaside, tov_OSpringBarley, tov_OSpringBarleyClover, tov_OSpringBarleyExt, tov_OSpringBarleyGrass, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRape, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_OWinterWheatUndersownExt, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetaside, tov_PLBeans, tov_PLBeet, tov_PLBeetSpr, tov_PLCarrots, tov_PLFodderLucerne1, tov_PLFodderLucerne2, tov_PLMaize, tov_PLMaizeSilage, tov_PLPotatoes, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRape, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_Potatoes, tov_PotatoesIndustry, tov_SeedGrass1, tov_SeedGrass2, tov_Setaside, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyCloverGrassStrigling, tov_SpringBarleyGrass, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySilage, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringRape, tov_SpringWheat, tov_SugarBeet, tov_Triticale, tov_Wasteland, tov_WaterBufferZone, tov_WinterBarley, tov_WinterBarleyStrigling, tov_WinterRape, tov_WinterRapeStrigling, tov_WinterRye, tov_WinterRyeStrigling, tov_WinterWheat, tov_WinterWheatShort, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, tov_WWheatPTreatment, tov_YoungForest, CfgBool::value(), and PlantGrowthData::VegTypeToCurveNum().

◆ ~VegElement()

virtual VegElement::~VegElement ( void  )
inlinevirtual

Definition at line 571 of file elements.h.

571 { ; };

Member Function Documentation

◆ Add_missed_fi_app()

void VegElement::Add_missed_fi_app ( )
inline

Definition at line 658 of file elements.h.

References m_CropDataStorage, and CropActualValues::missed_fi_app.

◆ Add_missed_herb_app()

void VegElement::Add_missed_herb_app ( )
inline

Definition at line 657 of file elements.h.

References m_CropDataStorage, and CropActualValues::missed_herb_app.

◆ Add_no_fi_app()

void VegElement::Add_no_fi_app ( )
inline

◆ Add_no_herb_app()

void VegElement::Add_no_herb_app ( )
inline

Definition at line 647 of file elements.h.

References m_CropDataStorage, and CropActualValues::no_herb_app.

Referenced by OptimisingFarm::HerbicideTreat().

◆ CalcGooseForageResources()

void VegElement::CalcGooseForageResources ( )
protected

Calculates spilled grain and grazing forage resources for geese.

The 1.0325 is a quick fix to account for higher energy intake on winter cereal - Based on Therkildsen & Madsen 2000 Energetics of feeding...

or potentially it is a grazable grass

Definition at line 1805 of file elements.cpp.

1806 {
1807  // For geese that eat spilled grain and maize we need to remove some of this daily (loss to other things than geese)
1808  // Get the Julian day
1809  int day = g_date->DayInYear();
1810  double rate;
1811  if ((day > March) && (day < July)) rate = cfg_goose_GrainDecayRateSpring.value();
1812  else rate = cfg_goose_GrainDecayRateWinter.value();
1813  m_birdseedforage *= rate;
1814  if (m_birdseedforage < 0.01) m_birdseedforage = 0.0;
1815  m_birdmaizeforage *= rate;
1816  if (m_birdmaizeforage < 0.01) m_birdmaizeforage = 0.0;
1817  // We also need to calculate non-grain forage for geese
1818  if (IsCereal()) {
1819  //if (m_green_biomass > 0.5) //Testing if this could be a suitable fix for the cereals
1820  //{
1821  for (unsigned i = 0; i < gs_foobar; i++) {
1824  }
1825  //}
1826  //else for (unsigned i = 0; i < gs_foobar; i++) {
1827  // m_goosegrazingforage[i] = 0.0;
1828  //}
1829  //m_goosegrazingforage[gs_foobar] = 1; // Is cereal
1830  }
1832  else {
1833  if (IsGooseGrass()) {
1834  for (unsigned i = 0; i < gs_foobar; i++) {
1835  //m_goosegrazingforage[ i ] = 0.0;
1837  }
1838  }
1839  else for (unsigned i = 0; i < gs_foobar; i++) m_goosegrazingforage[i] = 0.0;
1840  }
1841 }

References cfg_goose_GrainDecayRateSpring, cfg_goose_GrainDecayRateWinter, cfg_goose_grass_to_winter_cereal_scaler, Calendar::DayInYear(), g_date, g_landscape_p, IsCereal(), IsGooseGrass(), July, LE::m_birdmaizeforage, LE::m_birdseedforage, LE::m_goosegrazingforage, m_veg_height, March, Landscape::SupplyGooseGrazingForageH(), and CfgFloat::value().

Referenced by RecalculateBugsNStuff().

◆ Clean_CropDataStorage()

void VegElement::Clean_CropDataStorage ( int  index)

◆ DoDevelopment()

void VegElement::DoDevelopment ( void  )
virtual

Nest grows weeds proportionally to day degrees and using the weed curve if no herbicide effect before calling RecalculateBugsNStuff to caculate insect biomass, cover, digestability etc..

Here we need to set today's goose numbers to zero in case they are not written by the goose population manager (the normal situation)

Reimplemented in MownGrass, OrchardBand, Orchard, ForestElement, UnsprayedFieldMargin, Scrub, GreenElement, RoadsideSlope, WaterBufferZone, RoadsideVerge, BeetleBank, HedgeBank, Hedges, Field, Wasteland, NaturalGrassWet, and NaturalGrassDry.

Definition at line 2004 of file elements.cpp.

2004  {
2005  if (!m_force_growth) {
2006  //** First does the day degree calculations */
2007  m_yddegs = m_ddegs;
2009  if (m_vegddegs != -1.0) m_vegddegs += m_ddegs; // Sum up the vegetation day degrees since sowing
2010  m_ddegs += m_yddegs; // and sum up the phase ddegs
2011 
2015 
2016  m_LAgreen += dLAG;
2017  if (m_LAgreen < 0.0)
2018  m_LAgreen = 0.0;
2019  m_LAtotal += dLAT;
2020  if (m_LAtotal < 0.0)
2021  m_LAtotal = 0.0;
2022  int fintensity = 0;
2023 #ifdef __EXTSHRINKSHEIGHT
2024  if (this->m_owner_index != -1) { // This only works because only crops and similar structures have owners
2025  fintensity = g_landscape_p->SupplyFarmIntensity(m_poly);
2026  if (fintensity == 1) {
2027  // 1 means extensive, so reduce vegetation height change by 10%
2028  dHgt *= 0.9;
2029  }
2030  }
2031 #endif
2032  m_veg_height += dHgt;
2033  if (m_veg_height < 0.0) m_veg_height = 0.0;
2035  if (m_herbicidedelay == 0) {
2037  m_weed_biomass += dWee * cfg_ele_weedscaling.value()* (1 + fintensity);
2038  }
2039  if (m_weed_biomass < 0.0) m_weed_biomass = 0.0;
2040  }
2041  else {
2043  }
2046  ResetGeese();
2047 }

References cfg_ele_weedscaling, Calendar::Date(), ForceGrowthDevelopment(), g_crops, g_date, g_landscape_p, g_weather, Weather::GetDDDegs(), PlantGrowthData::GetHeightDiffScaled(), PlantGrowthData::GetLAgreenDiffScaled(), PlantGrowthData::GetLAtotalDiff(), PlantGrowthData::GetLAtotalDiffScaled(), m_curve_num, LE::m_ddegs, m_force_growth, m_growth_scaler, LE::m_herbicidedelay, m_LAgreen, m_LAtotal, LE::m_owner_index, LE::m_poly, m_veg_height, m_veg_phase, LE::m_vegddegs, m_weed_biomass, m_weed_curve_num, LE::m_yddegs, RecalculateBugsNStuff(), ResetGeese(), Landscape::SupplyFarmIntensity(), and CfgFloat::value().

Referenced by Field::DoDevelopment(), Hedges::DoDevelopment(), HedgeBank::DoDevelopment(), BeetleBank::DoDevelopment(), RoadsideVerge::DoDevelopment(), WaterBufferZone::DoDevelopment(), GreenElement::DoDevelopment(), Scrub::DoDevelopment(), NaturalGrassDry::DoDevelopment(), NaturalGrassWet::DoDevelopment(), Wasteland::DoDevelopment(), ForestElement::DoDevelopment(), Orchard::DoDevelopment(), OrchardBand::DoDevelopment(), and MownGrass::DoDevelopment().

◆ ForceGrowthDevelopment()

void VegElement::ForceGrowthDevelopment ( void  )
virtual

Reimplemented from LE.

Definition at line 1976 of file elements.cpp.

1976  {
1977  //if ( m_herbicidedelay == 0 ) m_weed_biomass += m_force_Weed; // ***CJT*** 12th Sept 2008 - rather than force growth, weeds might be allowed to grow on their own
1981 
1982  if (m_LAgreen < 0) m_LAgreen = 0;
1983  if (m_LAtotal < 0) m_LAtotal = 0;
1984  if (m_veg_height < 0) m_veg_height = 0;
1985 }

References m_force_LAgreen, m_force_LAtotal, m_force_veg_height, m_LAgreen, m_LAtotal, and m_veg_height.

Referenced by DoDevelopment().

◆ ForceGrowthInitialize()

void VegElement::ForceGrowthInitialize ( void  )
virtual

Reimplemented from LE.

Definition at line 1930 of file elements.cpp.

1930  {
1931  double LAgreen_target;
1932  double Weed_target;
1933  double LAtotal_target;
1934  double veg_height_target;
1935  int next_phase, daysleft;
1936 
1937  // Figure out what our target phase is.
1938  if ( g_date->DayInYear() < g_date->DayInYear( 3, 1 ) ) {
1939  daysleft = g_date->DayInYear( 1, 3 ) - g_date->DayInYear();
1940  next_phase = marchfirst;
1941  } else if ( g_date->DayInYear() >= g_date->DayInYear( 1, 11 ) ) {
1942  daysleft = 366 - g_date->DayInYear(); // Adjusted from 365 to prevent occaisional negative values
1943  next_phase = janfirst;
1944  } else {
1945  return;
1946  }
1947  if ( daysleft <= 0 )
1948  // Uh! Oh! This really shouldn't happen.
1949  return;
1950 
1951  if ( !g_crops->StartValid( m_curve_num, next_phase ) ) {
1952  // If no valid starting values for next phase, then
1953  // preinitialize the random starting values! Ie. make the
1954  // choice here and then do not choose another set come
1955  // next phase transition, but use the values we already
1956  // got at that point in time.
1957  RandomVegStartValues( & LAtotal_target, & LAgreen_target, & veg_height_target, & Weed_target );
1958  }
1959  else {
1960  //add +/- 20% variation
1961  double vari = (g_rand_uni() * 0.4) + 0.8;
1962  Weed_target = g_crops->GetStartValue(m_weed_curve_num, next_phase, 0) * vari;
1963  LAgreen_target = g_crops->GetStartValue(m_curve_num, next_phase, 0) * vari;
1964  LAtotal_target = g_crops->GetStartValue(m_curve_num, next_phase, 1) * vari;
1965  veg_height_target = g_crops->GetStartValue(m_curve_num, next_phase, 2) * vari;
1966  }
1967 
1968  m_force_growth = true;
1969  m_force_Weed = ( Weed_target - m_weed_biomass ) / ( double )daysleft;
1970  m_force_LAgreen = ( LAgreen_target - m_LAgreen ) / ( double )daysleft;
1971  m_force_LAtotal = ( LAtotal_target - m_LAtotal ) / ( double )daysleft;
1972  m_force_veg_height = ( veg_height_target - m_veg_height ) / ( double )daysleft;
1973 }

References Calendar::DayInYear(), g_crops, g_date, g_rand_uni, PlantGrowthData::GetStartValue(), janfirst, m_curve_num, m_force_growth, m_force_LAgreen, m_force_LAtotal, m_force_veg_height, m_force_Weed, m_LAgreen, m_LAtotal, m_veg_height, m_weed_biomass, m_weed_curve_num, marchfirst, RandomVegStartValues(), and PlantGrowthData::StartValid().

Referenced by ForceGrowthSpringTest(), and ForceGrowthTest().

◆ ForceGrowthSpringTest()

void VegElement::ForceGrowthSpringTest ( void  )
protected

Definition at line 1915 of file elements.cpp.

1915  {
1916  // Check if there are any positive growth differentials in the curve
1917  // for the first two months of the year. Do nothing if there is.
1918  // If we have any positive growth then no need to force either
1919  if (g_crops->GetLAgreenDiff(90000.0, 0.0, m_curve_num, janfirst) > 0.001
1920  || g_crops->GetLAtotalDiff(90000.0, 0.0, m_curve_num, janfirst) > 0.001
1921  || g_crops->GetHeightDiff(90000.0, 0.0, m_curve_num, janfirst) > 0.001) {
1922  return;
1923  }
1924  // No growth, force it.
1926 }

References ForceGrowthInitialize(), g_crops, PlantGrowthData::GetHeightDiff(), PlantGrowthData::GetLAgreenDiff(), PlantGrowthData::GetLAtotalDiff(), janfirst, and m_curve_num.

Referenced by SetGrowthPhase().

◆ ForceGrowthTest()

void VegElement::ForceGrowthTest ( void  )
virtual

Reimplemented from LE.

Definition at line 1904 of file elements.cpp.

1904  {
1905  // Called whenever the farmer does something 'destructive' to a
1906  // field, that reduced the vegetaion.
1907  if ( g_date->DayInYear() >= g_date->DayInYear( 1, 11 )
1908  || ( g_date->DayInYear() < g_date->DayInYear( 1, 3 ) && m_force_growth ) ) {
1910  }
1911 }

References Calendar::DayInYear(), ForceGrowthInitialize(), g_date, and m_force_growth.

Referenced by ReduceVeg(), ReduceVeg_Extended(), and ZeroVeg().

◆ Get_CropDataStorage()

CropActualValues VegElement::Get_CropDataStorage ( int  index)
inline

Definition at line 663 of file elements.h.

663 {return m_CropDataStorage[index];};

References m_CropDataStorage.

Referenced by OptimisingFarm::ActualProfit(), and OptimisingFarm::HandleEvents().

◆ Get_harvested()

bool VegElement::Get_harvested ( int  index)
inline

Definition at line 645 of file elements.h.

645 {return m_CropDataStorage[index].harvested;};

References CropActualValues::harvested, and m_CropDataStorage.

◆ Get_taken()

bool VegElement::Get_taken ( int  index)
inline

Definition at line 638 of file elements.h.

638 {return m_CropDataStorage[index].taken;};

References m_CropDataStorage, and CropActualValues::taken.

Referenced by OptimisingFarm::ActualProfit(), and OptimisingFarm::HandleEvents().

◆ GetDeadBiomass()

virtual double VegElement::GetDeadBiomass ( void  )
inlinevirtual

Reimplemented from LE.

Definition at line 579 of file elements.h.

579 { return m_dead_biomass; }

References m_dead_biomass.

◆ GetDigestability()

virtual double VegElement::GetDigestability ( void  )
inlinevirtual

Definition at line 573 of file elements.h.

573 { return m_digestability; }

References m_digestability.

◆ GetGreenBiomass()

virtual double VegElement::GetGreenBiomass ( void  )
inlinevirtual

Reimplemented from LE.

Definition at line 580 of file elements.h.

580 { return m_green_biomass; }

References m_green_biomass.

◆ GetInsectPop()

virtual double VegElement::GetInsectPop ( void  )
inlinevirtual

Reimplemented from LE.

Definition at line 586 of file elements.h.

586 { return m_insect_pop; }

References m_insect_pop.

◆ GetLAGreen()

virtual double VegElement::GetLAGreen ( void  )
inlinevirtual

Reimplemented from LE.

Definition at line 574 of file elements.h.

574 { return m_LAgreen; }

References m_LAgreen.

◆ GetLATotal()

virtual double VegElement::GetLATotal ( void  )
inlinevirtual

Reimplemented from LE.

Definition at line 575 of file elements.h.

575 { return m_LAtotal; }

References m_LAtotal.

◆ GetSkScrapes()

virtual bool VegElement::GetSkScrapes ( void  )
inlinevirtual

Definition at line 583 of file elements.h.

583 { return m_skylarkscrapes; }

References LE::m_skylarkscrapes.

◆ GetVegBiomass()

virtual double VegElement::GetVegBiomass ( void  )
inlinevirtual

Reimplemented from LE.

Definition at line 578 of file elements.h.

578 { return m_veg_biomass; }

References m_veg_biomass.

◆ GetVegCover()

virtual double VegElement::GetVegCover ( void  )
inlinevirtual

Definition at line 576 of file elements.h.

576 { return m_veg_cover; }

References m_veg_cover.

◆ GetVegDensity()

virtual int VegElement::GetVegDensity ( void  )
inlinevirtual

Definition at line 582 of file elements.h.

582 { return m_veg_density; }

References m_veg_density.

◆ GetVegHeight()

virtual double VegElement::GetVegHeight ( void  )
inlinevirtual

Definition at line 577 of file elements.h.

577 { return m_veg_height; }

References m_veg_height.

◆ GetVegPatchy()

virtual bool VegElement::GetVegPatchy ( void  )
inlinevirtual

Definition at line 584 of file elements.h.

584 { return m_veg_patchy; }

References m_veg_patchy.

◆ GetVegPhase()

virtual int VegElement::GetVegPhase ( void  )
inlinevirtual

Definition at line 673 of file elements.h.

673 { return m_veg_phase; }

References m_veg_phase.

◆ GetVegType()

virtual TTypesOfVegetation VegElement::GetVegType ( void  )
inlinevirtual

Definition at line 588 of file elements.h.

588 { return m_vege_type; }

References m_vege_type.

Referenced by OptimisingFarm::Harvest().

◆ GetWeedBiomass()

virtual double VegElement::GetWeedBiomass ( void  )
inlinevirtual

Reimplemented from LE.

Definition at line 581 of file elements.h.

581 { return m_weed_biomass; }

References m_weed_biomass.

◆ GrazeVegetation()

void VegElement::GrazeVegetation ( double  a_grams,
bool  a_force 
)
virtual

/brief Reduce the total vegetation biomass as a result of grazing per m2

Used to calculate the change in vegetation height and biomass as a result of grazing. Input parameter is the change in wet biomass/m2. The problem is to convert this into changes in LAtotal, LAgreen and height. We have an area, biomass, total biomass, height and density. If biomass is missing we need to change height and biomass before continuing and and do something with LA_total and LA_Green. Some assumptions: 1 - The grazing takes all LA equally 2 - That biomass is evenly distributed 3 - That LA is proportional to biomass in some way, so LA is also evenly distributed 4 - That we can use the current grazing pressure to alter a_reduc

Reimplemented from LE.

Definition at line 2061 of file elements.cpp.

2062 {
2074  if (!a_force) a_reduc *= m_default_grazing_level;
2075  if (a_reduc >= m_veg_biomass) return;
2076  double propreduc = 1.0 - (a_reduc / m_veg_biomass);
2077  m_veg_height *= propreduc;
2078  m_weed_biomass *= propreduc;
2079  m_veg_biomass -= a_reduc;
2080  // Need to do something with the LA too -
2081  m_LAgreen *= propreduc;
2082  m_LAtotal *= propreduc;
2083  m_oldLAtotal = m_LAtotal; // this stops double reduction of biomass later in RecalculateBugsNStuff();
2084 }

References LE::m_default_grazing_level, m_LAgreen, m_LAtotal, m_oldLAtotal, m_veg_biomass, m_veg_height, and m_weed_biomass.

Referenced by GrazeVegetationTotal().

◆ GrazeVegetationTotal()

void VegElement::GrazeVegetationTotal ( double  a_grams)
virtual

/brief Reduce the total vegetation biomass as a result of grazing per polygon

Reimplemented from LE.

Definition at line 2056 of file elements.cpp.

2057 {
2058  GrazeVegetation( a_grams/m_area, true );
2059 }

References GrazeVegetation(), and LE::m_area.

◆ Insecticide()

virtual void VegElement::Insecticide ( double  a_fraction)
inlinevirtual

Reimplemented from LE.

Definition at line 589 of file elements.h.

590  {
591  m_insect_pop *= a_fraction;
593  }

References LE::m_days_since_insecticide_spray, and m_insect_pop.

◆ InsectMortality()

void VegElement::InsectMortality ( double  a_fraction)
virtual

Reimplemented from LE.

Definition at line 2206 of file elements.cpp.

2206  {
2207  m_insect_pop *= a_fraction;
2208 }

References m_insect_pop.

◆ IsCereal()

bool VegElement::IsCereal ( void  )
virtual

Definition at line 1467 of file elements.cpp.

1468 {
1469  // NB Maize here is classed as cereal
1470  switch (m_lastsownvegtype)
1471  {
1472  case tov_SpringBarley:
1473  case tov_SpringBarleySpr:
1474  case tov_WinterBarley:
1475  case tov_SpringWheat:
1476  case tov_WinterWheat:
1477  case tov_WinterRye:
1478  case tov_Oats:
1479  case tov_Triticale:
1480  case tov_SpringBarleySeed:
1487  case tov_OWinterBarley:
1488  case tov_OWinterBarleyExt:
1489  case tov_OWinterRye:
1490  case tov_SpringBarleyGrass:
1494  case tov_OSpringBarley:
1495  case tov_OSpringBarleyPigs:
1497  case tov_OWinterWheat:
1498  case tov_OOats:
1499  case tov_OTriticale:
1500  case tov_WWheatPControl:
1502  case tov_WWheatPTreatment:
1506  case tov_OSpringBarleyExt:
1508  case tov_OSBarleySilage:
1510  case tov_PLWinterWheat:
1511  case tov_PLWinterBarley:
1512  case tov_PLWinterRye:
1513  case tov_PLWinterTriticale:
1514  case tov_PLSpringWheat:
1515  case tov_PLSpringBarley:
1516  case tov_PLSpringBarleySpr:
1517  case tov_PLWinterWheatLate:
1518  case tov_PLMaize:
1519  case tov_PLMaizeSilage:
1520  case tov_Maize:
1521  case tov_MaizeSilage:
1522  case tov_MaizeStrigling:
1523  case tov_NLSpringBarley:
1524  case tov_NLWinterWheat:
1525  case tov_NLMaize:
1527  case tov_NLMaizeSpring:
1528  return true;
1529  default: // No matching code so is should not be cereal
1530  return false;
1531  }
1532 }

References LE::m_lastsownvegtype, tov_AgroChemIndustryCereal, tov_Maize, tov_MaizeSilage, tov_MaizeStrigling, tov_NLMaize, tov_NLMaizeSpring, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLWinterWheat, tov_Oats, tov_OBarleyPeaCloverGrass, tov_OOats, tov_OSBarleySilage, tov_OSpringBarley, tov_OSpringBarleyClover, tov_OSpringBarleyExt, tov_OSpringBarleyGrass, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_PLMaize, tov_PLMaizeSilage, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyGrass, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringWheat, tov_Triticale, tov_WinterBarley, tov_WinterRye, tov_WinterWheat, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, and tov_WWheatPTreatment.

Referenced by CalcGooseForageResources().

◆ IsGooseGrass()

bool VegElement::IsGooseGrass ( )
inlinevirtual

◆ IsGrass()

bool VegElement::IsGrass ( )
inlinevirtual

Definition at line 1610 of file elements.cpp.

1611 {
1612  switch (m_vege_type)
1613  {
1614  case tov_NaturalGrass:
1618  case tov_PermanentSetaside:
1619  case tov_Setaside:
1620  case tov_SeedGrass1:
1621  case tov_SeedGrass2:
1622  case tov_OSeedGrass1:
1623  case tov_OSeedGrass2:
1628  case tov_OrchardCrop:
1629  case tov_YoungForest:
1630  case tov_FodderGrass:
1631  case tov_Heath:
1632  case tov_PLFodderLucerne1:
1633  case tov_PLFodderLucerne2:
1634  case tov_NLGrassGrazed1:
1636  case tov_NLGrassGrazed2:
1638  case tov_WaterBufferZone:
1639  return true;
1640  default: return false;
1641  }
1642 }

References m_vege_type, tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_FodderGrass, tov_Heath, tov_NaturalGrass, tov_NLGrassGrazed1, tov_NLGrassGrazed1Spring, tov_NLGrassGrazed2, tov_NLPermanentGrassGrazed, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OrchardCrop, tov_OSeedGrass1, tov_OSeedGrass2, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetaside, tov_PLFodderLucerne1, tov_PLFodderLucerne2, tov_SeedGrass1, tov_SeedGrass2, tov_Setaside, tov_WaterBufferZone, and tov_YoungForest.

◆ IsMaize()

bool VegElement::IsMaize ( void  )
virtual

Currently (18/03/2015) only used for goose foraging, so silage maize does not produce grain

Definition at line 1591 of file elements.cpp.

1592 {
1594  switch (m_vege_type)
1595  {
1596  case tov_Maize:
1597  case tov_OMaizeSilage:
1598  case tov_MaizeSilage:
1599  case tov_PLMaize:
1600  case tov_PLMaizeSilage:
1601  case tov_NLMaize:
1602  case tov_NLMaizeSpring:
1603  return true;
1604  default: // No matching code so is should not be maize
1605  return false;
1606  }
1607 }

References m_vege_type, tov_Maize, tov_MaizeSilage, tov_NLMaize, tov_NLMaizeSpring, tov_OMaizeSilage, tov_PLMaize, and tov_PLMaizeSilage.

◆ IsMatureCereal()

bool VegElement::IsMatureCereal ( void  )
virtual

Definition at line 1534 of file elements.cpp.

1535 {
1536  switch (m_vege_type)
1537  {
1538  case tov_SpringBarley:
1539  case tov_SpringBarleySpr:
1540  case tov_WinterBarley:
1541  case tov_SpringWheat:
1542  case tov_WinterWheat:
1543  case tov_WinterRye:
1544  case tov_Oats:
1545  case tov_Triticale:
1546  case tov_SpringBarleySeed:
1553  case tov_OWinterBarley:
1554  case tov_OWinterBarleyExt:
1555  case tov_OWinterRye:
1556  case tov_SpringBarleyGrass:
1559  case tov_OSpringBarley:
1560  case tov_OSpringBarleyPigs:
1562  case tov_OWinterWheat:
1563  case tov_OOats:
1564  case tov_OTriticale:
1565  case tov_WWheatPControl:
1567  case tov_WWheatPTreatment:
1571  case tov_OSpringBarleyExt:
1574  case tov_PLWinterWheat:
1575  case tov_PLWinterBarley:
1576  case tov_PLWinterRye:
1577  case tov_PLWinterTriticale:
1578  case tov_PLSpringWheat:
1579  case tov_PLSpringBarley:
1580  case tov_PLSpringBarleySpr:
1581  case tov_PLWinterWheatLate:
1582  case tov_NLSpringBarley:
1583  case tov_NLWinterWheat:
1585  return true;
1586  default: // No matching code so is should not be mature cereal
1587  return false;
1588  }
1589 }

References m_vege_type, tov_AgroChemIndustryCereal, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLWinterWheat, tov_Oats, tov_OOats, tov_OSpringBarley, tov_OSpringBarleyClover, tov_OSpringBarleyExt, tov_OSpringBarleyGrass, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyGrass, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringWheat, tov_Triticale, tov_WinterBarley, tov_WinterRye, tov_WinterWheat, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, and tov_WWheatPTreatment.

◆ PollenNectarPhenologyCalculation()

void VegElement::PollenNectarPhenologyCalculation ( )
protected

This methods calculates the daily availability of pollen and nectar per square meter and in total.

Here we need to first recalculate the daily m2 value in case some has been foraged, then supply the day number to each curve and get the slope per m2 for both pollen and nectar, then add this to the m2. If the total value is negative set it to zero, then recalculate the polygon total forage.

Definition at line 1790 of file elements.cpp.

1791 {
1797  int today = g_date->DayInYear();
1798  //need to store the correct pollen curve for fast look-up - this can be a pointer directly to the correct curve - avoiding the problem of tov vs tole
1800  m_NectarM2 = m_pollencurve->GetData(today);
1801  m_totalPollen = double(m_area) * m_PollenM2;
1802  m_totalNectar = double(m_area) * m_NectarM2;
1803 }

References Calendar::DayInYear(), g_date, PollenNectarDevelopmentCurve::GetData(), LE::m_area, LE::m_NectarM2, LE::m_pollencurve, LE::m_PollenM2, LE::m_pollenquality, PollenNectarQuality::m_quantity, LE::m_totalNectar, and LE::m_totalPollen.

Referenced by RecalculateBugsNStuff().

◆ RandomVegStartValues()

void VegElement::RandomVegStartValues ( double *  a_LAtotal,
double *  a_LAgreen,
double *  a_veg_height,
double *  a_weed_biomass 
)
protected

Definition at line 1843 of file elements.cpp.

1843  {
1844  * a_LAtotal = EL_VEG_START_LAIT * ( ( ( ( double )( random( 21 ) - 10 ) ) / 100.0 ) + 1.0 ); // +/- 10%
1845  * a_LAgreen = * a_LAtotal / 4.0;
1846  * a_veg_height = * a_LAgreen * EL_VEG_HEIGHTSCALE;
1847  * a_weed_biomass = * a_LAgreen * 0.1; // 10% weeds by biomass
1848 }

References EL_VEG_HEIGHTSCALE, and EL_VEG_START_LAIT.

Referenced by ForceGrowthInitialize().

◆ ReadBugPercentageFile()

void VegElement::ReadBugPercentageFile ( void  )
protected

Definition at line 1439 of file elements.cpp.

1439  {
1440  FILE* lm_ifile=fopen(l_el_bug_percentage_file.value(), "r" );
1441  if ( !lm_ifile ) {
1442  g_msg->Warn( WARN_FILE, "PlantGrowthData::ReadBugPercentageFile(): Unable to open file", l_el_bug_percentage_file.value() );
1443  exit( 1 );
1444  }
1445  for ( int i = 0; i < tov_Undefined; i++ ) {
1446  int vegnum;
1447  // **cjt** modified 31/01/2004
1448  float weedpercent, bugpercent_a, bugpercent_b, bugpercent_c, bugpercent_d;
1449  if ( 2 != fscanf( lm_ifile, "%d %f %f %f %f %f", & vegnum, & weedpercent, & bugpercent_a, & bugpercent_b,
1450  & bugpercent_c, & bugpercent_d ) ) {
1451  char vegnums[ 20 ];
1452  sprintf( vegnums, "%d", tov_Undefined );
1453  g_msg->Warn( WARN_FILE,
1454  "VegElement::ReadBugPercentageFile(): Unable to read"
1455  " sufficient number of int/double pairs from bug percentage file."" Lines expected:", vegnums );
1456  exit( 1 );
1457  }
1458  FloatToDouble( g_weed_percent[ vegnum ], weedpercent);
1459  FloatToDouble( g_bug_percent_a[ vegnum ] , bugpercent_a);
1460  FloatToDouble( g_bug_percent_b[ vegnum ] , bugpercent_b);
1461  FloatToDouble( g_bug_percent_c[ vegnum ] , bugpercent_c);
1462  FloatToDouble( g_bug_percent_d[ vegnum ] , bugpercent_d);
1463  }
1464  fclose( lm_ifile );
1465 }

References FloatToDouble(), g_bug_percent_a, g_bug_percent_b, g_bug_percent_c, g_bug_percent_d, g_msg, g_weed_percent, l_el_bug_percentage_file(), tov_Undefined, CfgStr::value(), MapErrorMsg::Warn(), and WARN_FILE.

◆ RecalculateBugsNStuff()

void VegElement::RecalculateBugsNStuff ( void  )
protectedvirtual

This method is responsible for.

This is the heart of the dynamics of vegetation elements. It calculates vegetation cover and uses this to determine vegetation biomass. It also calculates spilled grain and goose forage, as well a calculating insect biomass, vegetation density and dead biomass

Here we also want to know how much biomass we have on the field in total. So we multiply the current biomass by area

Once bugs, cover etc are calculated the pollen and nectar level calculations are done

Finally calculate the goose forage resource availability

Definition at line 1678 of file elements.cpp.

1678  {
1681  double newgrowth = 0;
1682  m_veg_cover = 1.0 - (exp(m_LAtotal * -0.6)); // Beer's Law to give cover
1683  double usefull_veg_cover = 1.0 - (exp(m_LAgreen * -0.4)); // This is used to calc growth rate
1684  // Need gloabal radiation today
1685  double glrad = g_landscape_p->SupplyGlobalRadiation();
1686  // This is different for maize (a C4 plant)
1687  int ptype;
1688  if ((m_vege_type == tov_Maize) || (m_vege_type == tov_OMaizeSilage) || (m_vege_type == tov_MaizeSilage) || (m_vege_type == tov_MaizeStrigling)) ptype = 1; else ptype = 0;
1689  int index = (int)floor(0.5 + g_landscape_p->SupplyTemp()) + 30; // There are 30 negative temps
1690  double radconv = c_SolarConversion[ptype][index];
1691  if (m_LAtotal >= m_oldLAtotal) {
1692  // we are in positive growth so grow depending on our equation
1693  newgrowth = usefull_veg_cover * glrad * radconv * g_biomass_scale[m_vege_type];
1694  if (m_owner_index != -1) { // This only works because only crops and similar structures have owners
1695  int fintensity = g_landscape_p->SupplyFarmIntensity(m_poly);
1696  if (fintensity == 1) {
1697  // 1 means extensive, so reduce vegetation biomass by 20%
1698  // NB this cannot be used with extensive crop types otherwise you get an additional 20% reduction
1699  // This way of doing things provides a quick and dirty general effect.
1700  m_veg_biomass += newgrowth * 0.8;
1701  }
1702  else m_veg_biomass += newgrowth;
1703  }
1704  else m_veg_biomass += newgrowth;
1705  }
1706  else {
1707  // Negative growth - so shrink proportional to the loss in LAI Total
1708  if (m_oldLAtotal > 0) {
1710  }
1711  }
1715  // NB The m_weed_biomass is calculated directly from the curve in Curves.pre
1716  // rather than going through the rigmorole of converting leaf-area index
1717 
1718  // Another thing to do is to calculate mean vegetation digestability
1719  // This is a 32-day running average of the amount of new growth per day divided by veg biomass
1720  // With a minimum value of 0.5
1721  ++m_newoldgrowthindex &= 31;
1722  if (m_veg_biomass > 0) {
1723  switch (m_vege_type) {
1724  case tov_NoGrowth:
1725  case tov_None:
1726  case tov_OFirstYearDanger:
1727  m_digestability = 0.0;
1728  break;
1729  case tov_OPotatoes:
1730  case tov_Maize:
1731  case tov_MaizeSilage:
1732  case tov_OMaizeSilage:
1733  case tov_MaizeStrigling:
1734  case tov_Potatoes:
1735  case tov_PotatoesIndustry:
1736  case tov_PLMaize:
1737  case tov_PLMaizeSilage:
1738  case tov_PLPotatoes:
1739  case tov_NLMaize:
1740  case tov_NLPotatoes:
1741  case tov_NLMaizeSpring:
1742  case tov_NLPotatoesSpring:
1743  m_digestability = 0.5;
1744  break;
1745  default:
1746  //m_oldnewgrowth[m_newoldgrowthindex]=(newgrowth/m_veg_biomass);
1747  m_oldnewgrowth[m_newoldgrowthindex] = (newgrowth);
1748  m_newgrowthsum = 0.0;
1749  for (int i = 0; i < 32; i++) {
1751  }
1753  m_digestability += 0.5;
1754  if (m_digestability > 0.8) m_digestability = 0.8;
1755  }
1756  }
1757  else {
1759  m_digestability = 0.0;
1760  }
1761  // The insect calculation part
1762  // Bugmass = a + b(biomass) + c(height)
1763  double temp_bugmass = //g_bug_percent_d[ m_vege_type ] // This was used as a scaler - now not used
1766  // Set a minimum value (regressions will otherwise sometimes give a -ve value
1767  if (temp_bugmass < 0.05) temp_bugmass = 0.05;
1768  // Now need to check for deviations caused by management
1769  // First spot the deviation - this is easy because the only deviation that does
1770  // not affect the vegetation too is insecticide spraying
1772  // Need to change insects still, so grow towards the target, but only when 21 days from zero effect
1775  }
1776  else {
1777  m_insect_pop = temp_bugmass;
1778  }
1779  m_veg_density = (int)(floor(0.5 + (m_veg_biomass / (1 + m_veg_height))));
1780  if (m_veg_density > 100) m_veg_density = 100; // to stop array bounds problems
1781  if (m_LAtotal == 0.0) m_green_biomass = 0.0;
1788 }

References c_SolarConversion, CalcGooseForageResources(), g_biomass_scale, g_bug_percent_a, g_bug_percent_b, g_bug_percent_c, g_landscape_p, LE::m_area, LE::m_days_since_insecticide_spray, m_dead_biomass, m_digestability, m_green_biomass, m_insect_pop, m_LAgreen, m_LAtotal, m_newgrowthsum, m_newoldgrowthindex, m_oldLAtotal, m_oldnewgrowth, LE::m_owner_index, LE::m_poly, m_total_biomass, m_total_biomass_old, m_veg_biomass, m_veg_cover, m_veg_density, m_veg_height, m_vege_type, m_weed_biomass, PollenNectarPhenologyCalculation(), Landscape::SupplyFarmIntensity(), Landscape::SupplyGlobalRadiation(), Landscape::SupplyTemp(), tov_Maize, tov_MaizeSilage, tov_MaizeStrigling, tov_NLMaize, tov_NLMaizeSpring, tov_NLPotatoes, tov_NLPotatoesSpring, tov_NoGrowth, tov_None, tov_OFirstYearDanger, tov_OMaizeSilage, tov_OPotatoes, tov_PLMaize, tov_PLMaizeSilage, tov_PLPotatoes, tov_Potatoes, and tov_PotatoesIndustry.

Referenced by RoadsideVerge::Cutting(), DoDevelopment(), and ZeroVeg().

◆ ReduceVeg()

void VegElement::ReduceVeg ( double  a_reduc)
virtual

Reimplemented from LE.

Definition at line 2086 of file elements.cpp.

2086  {
2087  m_LAgreen *= a_reduc;
2088  m_LAtotal *= a_reduc;
2089  m_veg_height *= a_reduc;
2090  m_veg_biomass *= a_reduc;
2091  m_weed_biomass *= a_reduc;
2092 
2093  ForceGrowthTest();
2094  m_oldLAtotal = m_LAtotal; // this stops double reduction of biomass later in RecalculateBugsNStuff();
2095 }

References ForceGrowthTest(), m_LAgreen, m_LAtotal, m_oldLAtotal, m_veg_biomass, m_veg_height, and m_weed_biomass.

Referenced by OrchardBand::DoDevelopment().

◆ ReduceVeg_Extended()

void VegElement::ReduceVeg_Extended ( double  a_reduc)
virtual

Reimplemented from LE.

Definition at line 2097 of file elements.cpp.

2097  {
2098  m_LAgreen *= a_reduc;
2099  m_LAtotal *= a_reduc;
2100  m_veg_height *= a_reduc;
2101  m_veg_biomass *= a_reduc;
2102  m_weed_biomass *= a_reduc;
2103 
2104  if ( a_reduc < EL_GROWTH_PHASE_SHIFT_LEVEL ) {
2105  m_yddegs = 0.0;
2107  }
2108 
2111  m_forced_phase_shift = true;
2112  }
2113 
2114  ForceGrowthTest();
2115  m_oldLAtotal = m_LAtotal; // this stops double reduction of biomass later in RecalculateBugsNStuff();
2116 }

References Calendar::DayInYear(), EL_GROWTH_DATE_MAGIC, EL_GROWTH_DAYDEG_MAGIC, EL_GROWTH_PHASE_SHIFT_LEVEL, ForceGrowthTest(), g_date, harvest1, LE::m_ddegs, m_forced_phase_shift, m_LAgreen, m_LAtotal, m_oldLAtotal, m_veg_biomass, m_veg_height, m_weed_biomass, LE::m_yddegs, and SetGrowthPhase().

◆ ReduceWeedBiomass()

virtual void VegElement::ReduceWeedBiomass ( double  a_fraction)
inlinevirtual

Reimplemented from LE.

Definition at line 600 of file elements.h.

601  {
602  m_weed_biomass *= a_fraction;
603  }

References m_weed_biomass.

◆ ResetDigestability()

virtual void VegElement::ResetDigestability ( )
inlinevirtual

sets growth record to zero

Reimplemented from LE.

Definition at line 668 of file elements.h.

669  {
670  for (int i = 0; i<32; i++) m_oldnewgrowth[i] = 0.0;
671  }

References m_oldnewgrowth.

◆ ResetGeese()

void VegElement::ResetGeese ( void  )
protected

Reset geese numbers to zero in case this was not done by the population manager (the normal situation).

Definition at line 2048 of file elements.cpp.

2048  {
2049  m_gooseNos[ g_date->DayInYear() ] = 0;
2050  for (unsigned i = 0; i < gs_foobar; i++) {
2051  m_gooseSpNos[ g_date->DayInYear() ][ (GooseSpecies)i ] = 0;
2052  m_gooseSpNosTimed[ g_date->DayInYear() ][ (GooseSpecies)i ] = 0;
2053  }
2054 }

References Calendar::DayInYear(), g_date, LE::m_gooseNos, LE::m_gooseSpNos, and LE::m_gooseSpNosTimed.

Referenced by DoDevelopment().

◆ Set_area_in_crop_data()

void VegElement::Set_area_in_crop_data ( double  a_area)
inline

Definition at line 641 of file elements.h.

641 {m_CropDataStorage[0].area = a_area;};

References CropActualValues::area, and m_CropDataStorage.

Referenced by OptimisingFarm::HandleEvents().

◆ Set_biomass_at_harvest()

void VegElement::Set_biomass_at_harvest ( double  a_biomass,
int  index 
)
inline

Definition at line 642 of file elements.h.

642 {m_CropDataStorage[index].biomass_at_harvest = a_biomass;};

References CropActualValues::biomass_at_harvest, and m_CropDataStorage.

Referenced by OptimisingFarm::Harvest().

◆ Set_CropDataStorage()

void VegElement::Set_CropDataStorage ( int  index,
CropActualValues  a_struct 
)
inline

Definition at line 662 of file elements.h.

662 {m_CropDataStorage[index] = a_struct;};

References m_CropDataStorage.

Referenced by OptimisingFarm::HandleEvents().

◆ Set_harvested()

void VegElement::Set_harvested ( )
inline

Definition at line 644 of file elements.h.

644 {m_CropDataStorage[0].harvested = true;};

References CropActualValues::harvested, and m_CropDataStorage.

Referenced by OptimisingFarm::Harvest().

◆ Set_taken()

void VegElement::Set_taken ( bool  a_taken,
int  index 
)
inline

Definition at line 637 of file elements.h.

637 {m_CropDataStorage[index].taken = a_taken;};

References m_CropDataStorage, and CropActualValues::taken.

Referenced by OptimisingFarm::HandleEvents().

◆ Set_tov_type()

void VegElement::Set_tov_type ( TTypesOfVegetation  a_tov_type,
int  index 
)
inline

Definition at line 639 of file elements.h.

639 {m_CropDataStorage[index].tov_type = a_tov_type;};

References m_CropDataStorage, and CropActualValues::tov_type.

Referenced by OptimisingFarm::HandleEvents().

◆ SetCropData()

void VegElement::SetCropData ( double  a_veg_height,
double  a_LAtotal,
double  a_LAgreen,
TTypesOfVegetation  a_veg,
double  a_cover,
int  a_grazed 
)
virtual

Reimplemented from LE.

Definition at line 2181 of file elements.cpp.

2182  {
2183  m_veg_height = a_veg_height;
2184  m_LAtotal = a_LAtotal;
2185  m_LAgreen = a_LAgreen;
2186  m_vege_type = a_veg;
2187  m_veg_cover = a_cover;
2188  m_cattle_grazing = a_grazed;
2189 }

References LE::m_cattle_grazing, m_LAgreen, m_LAtotal, m_veg_cover, m_veg_height, and m_vege_type.

◆ SetCropDataAll()

void VegElement::SetCropDataAll ( double  a_veg_height,
double  a_biomass,
double  a_LAtotal,
double  a_LAgreen,
TTypesOfVegetation  a_veg,
double  a_wb,
double  a_cover,
int  a_grazed,
double  a_ins,
bool  a_patchy,
double  a_dens 
)
virtual

Reimplemented from LE.

Definition at line 2191 of file elements.cpp.

2192  {
2193  m_veg_height = a_veg_height;
2194  m_veg_biomass = a_biomass;
2195  m_LAtotal = a_LAtotal;
2196  m_LAgreen = a_LAgreen;
2197  m_vege_type = a_veg;
2198  m_weed_biomass = a_wb;
2199  m_veg_cover = a_cover;
2200  m_cattle_grazing = a_grazed;
2201  m_insect_pop = a_ins;
2202  m_veg_density = (int) a_dens;
2203  m_veg_patchy = a_patchy;
2204 }

References LE::m_cattle_grazing, m_insect_pop, m_LAgreen, m_LAtotal, m_veg_biomass, m_veg_cover, m_veg_density, m_veg_height, m_veg_patchy, m_vege_type, and m_weed_biomass.

◆ SetGrowthPhase()

void VegElement::SetGrowthPhase ( int  a_phase)
virtual

If it is the first growth phase of the year then we might cause some unnecessary hops if e.g. our biomass is 0 and we suddenly jump up to 20 cm To stop this happening we check here and if our settings are lower than the targets we do nothing.

Reimplemented from LE.

Definition at line 1851 of file elements.cpp.

1851  {
1852 
1853  if (a_phase == sow) {
1854  m_vegddegs = 0.0;
1855  }
1856  else if (a_phase == harvest) m_vegddegs = -1;
1857  if (a_phase == janfirst) {
1858  m_forced_phase_shift = false;
1863  if (g_crops->StartValid(m_curve_num, a_phase)) {
1864  double temp_veg_height = g_crops->GetStartValue(m_curve_num, a_phase, 2);
1865  if (temp_veg_height < m_veg_height) { // Otherwise we are better off with the numbers we have to start with
1866  // Now with added variability
1867  m_LAgreen = g_crops->GetStartValue(m_curve_num, a_phase, 0);
1868  m_LAtotal = g_crops->GetStartValue(m_curve_num, a_phase, 1);
1870  }
1871  }
1872 
1873  }
1874  else if (g_crops->StartValid(m_curve_num, a_phase)) {
1875  m_LAgreen = g_crops->GetStartValue(m_curve_num, a_phase, 0);
1876  m_LAtotal = g_crops->GetStartValue(m_curve_num, a_phase, 1);
1878  }
1879  else if (!m_force_growth) {
1880  // If we are in forced growth mode (which is very likely),
1881  // then do not choose a new set of starting values, as we have
1882  // already calculated our way to a reasonable set of values.
1883  //RandomVegStartValues( & m_LAtotal, & m_LAgreen, & m_veg_height, & m_weed_biomass ); // **CJT** Testing removal 17/02/2015
1884  }
1885  m_veg_phase = a_phase;
1886  m_yddegs = 0.0;
1888  m_force_growth = false;
1889 
1890  if (m_veg_phase == janfirst) {
1891  // For some growth curves there is no growth in the first
1892  // two months of the year. This will more likely than
1893  // not cause a discontinuous jump in the growth curves
1894  // come March first. ForceGrowthSpringTest() tries
1895  // to avoid that by checking for positive growth values
1896  // for the January growth phase. If none are found, then
1897  // it initializes a forced growth/transition to the March
1898  // 1st starting values.
1899  ForceGrowthSpringTest(); // Removal of this causes continuous increase in vegetation growth year on year for any curve that does not have a hard reset (e.g. harvest).
1900  }
1901 }

References Calendar::Date(), ForceGrowthSpringTest(), g_crops, g_date, g_weather, Weather::GetDDDegs(), PlantGrowthData::GetStartValue(), harvest, janfirst, m_curve_num, LE::m_ddegs, m_force_growth, m_forced_phase_shift, m_LAgreen, m_LAtotal, m_veg_height, m_veg_phase, LE::m_vegddegs, LE::m_yddegs, sow, and PlantGrowthData::StartValid().

Referenced by Orchard::Cutting(), MownGrass::Cutting(), ReduceVeg_Extended(), and VegElement().

◆ SetInsectPop()

virtual void VegElement::SetInsectPop ( double  insects)
inlinevirtual

Reimplemented from LE.

Definition at line 587 of file elements.h.

587 { m_insect_pop=insects; }

References m_insect_pop.

◆ SetVegHeight()

virtual void VegElement::SetVegHeight ( double  a_veg_height)
inlinevirtual

Reimplemented from LE.

Definition at line 618 of file elements.h.

618 { m_veg_height = a_veg_height; }

References m_veg_height.

◆ SetVegParameters()

virtual void VegElement::SetVegParameters ( double  a_veg_height,
double  a_LAtotal,
double  a_LAgreen,
double  a_WeedBiomass 
)
inlinevirtual

Reimplemented from LE.

Definition at line 619 of file elements.h.

619  {
620  m_veg_height = a_veg_height;
621  m_LAtotal = a_LAtotal;
622  m_LAgreen = a_LAgreen;
623  m_weed_biomass = a_WeedBiomass;
624  //RecalculateBugsNStuff();
625  }

References m_LAgreen, m_LAtotal, m_veg_height, and m_weed_biomass.

◆ SetVegPatchy()

virtual void VegElement::SetVegPatchy ( bool  p)
inlinevirtual

Definition at line 585 of file elements.h.

585 { m_veg_patchy=p; }

References m_veg_patchy.

Referenced by Landscape::BeetleBankAdd(), and VegElement().

◆ SetVegType()

void VegElement::SetVegType ( TTypesOfVegetation  a_vege_type,
TTypesOfVegetation  a_weed_type 
)
virtual

Reimplemented from LE.

Definition at line 2144 of file elements.cpp.

2145 {
2146  m_vege_type = a_vege_type;
2147  m_curve_num = g_crops->VegTypeToCurveNum(a_vege_type);
2148  // -1 is used as a signal not to change the weed type
2149  // this is because it may be specific to that field
2150  if (a_weed_type != tov_Undefined) m_weed_curve_num = a_weed_type;
2152  if (m_unsprayedmarginpolyref != -1) {
2153  // Must have an unsprayed margin so need to pass the information on to it
2155  dynamic_cast<VegElement*>(um)->SetPollenNectarCurves(m_pollencurve, m_nectarcurve);
2156  }
2157 }

References g_crops, g_landscape_p, g_nectarpollen, m_curve_num, LE::m_nectarcurve, PollenNectarDevelopmentCurveSet::m_nectarcurveptr, LE::m_pollencurve, PollenNectarDevelopmentCurveSet::m_pollencurveptr, LE::m_unsprayedmarginpolyref, m_vege_type, m_weed_curve_num, LE::SetPollenNectarCurves(), Landscape::SupplyLEPointer(), tov_Undefined, PollenNectarDevelopmentData::tovGetPollenNectarCurvePtr(), and PlantGrowthData::VegTypeToCurveNum().

◆ StoreLAItotal()

virtual void VegElement::StoreLAItotal ( )
inlinevirtual

Reimplemented from LE.

Definition at line 627 of file elements.h.

627 { m_oldLAtotal = m_LAtotal; }

References m_LAtotal, and m_oldLAtotal.

◆ ToggleCattleGrazing()

virtual void VegElement::ToggleCattleGrazing ( void  )
inlinevirtual

Reimplemented from LE.

Definition at line 604 of file elements.h.

References LE::m_cattle_grazing, and LE::m_default_grazing_level.

◆ TogglePigGrazing()

virtual void VegElement::TogglePigGrazing ( void  )
inlinevirtual

Reimplemented from LE.

Definition at line 605 of file elements.h.

References LE::m_pig_grazing.

◆ ZeroVeg()

void VegElement::ZeroVeg ( void  )
virtual

Reimplemented from LE.

Definition at line 1989 of file elements.cpp.

1989  {
1990  m_LAgreen = 0.0;
1991  m_LAtotal = 0.0;
1992  m_veg_height = 0.0;
1993  m_veg_cover = 0.0;
1994  m_veg_biomass = 0.0;
1995  m_weed_biomass = 0.0;
1996  m_birdseedforage = 0.0;
1997  m_birdmaizeforage = 0.0;
1998  SetStubble(false);
1999  ForceGrowthTest();
2001 }

References ForceGrowthTest(), LE::m_birdmaizeforage, LE::m_birdseedforage, m_LAgreen, m_LAtotal, m_veg_biomass, m_veg_cover, m_veg_height, m_weed_biomass, RecalculateBugsNStuff(), and LE::SetStubble().

Referenced by WaterBufferZone::ResetingVeg().

Member Data Documentation

◆ m_crop_index

int VegElement::m_crop_index
protected

Definition at line 723 of file elements.h.

Referenced by VegElement().

◆ m_CropDataStorage

CropActualValues VegElement::m_CropDataStorage[2]
protected

Keeps data on pesticide applications, biomass at harvest etc. Data for maximum two crops can be stored (hence size - 2). Used by a farmer to make a yearly accounting (OptimisingFarm::ActualProfit()).

Definition at line 722 of file elements.h.

Referenced by Add_missed_fi_app(), Add_missed_herb_app(), Add_no_fi_app(), Add_no_herb_app(), Clean_CropDataStorage(), Get_CropDataStorage(), Get_harvested(), Get_taken(), Set_area_in_crop_data(), Set_biomass_at_harvest(), Set_CropDataStorage(), Set_harvested(), Set_taken(), and Set_tov_type().

◆ m_curve_num

◆ m_dead_biomass

double VegElement::m_dead_biomass
protected

Definition at line 690 of file elements.h.

Referenced by GetDeadBiomass(), and RecalculateBugsNStuff().

◆ m_digestability

◆ m_force_growth

bool VegElement::m_force_growth
protected

◆ m_force_LAgreen

double VegElement::m_force_LAgreen
protected

Definition at line 702 of file elements.h.

Referenced by ForceGrowthDevelopment(), and ForceGrowthInitialize().

◆ m_force_LAtotal

double VegElement::m_force_LAtotal
protected

Definition at line 703 of file elements.h.

Referenced by ForceGrowthDevelopment(), and ForceGrowthInitialize().

◆ m_force_veg_height

double VegElement::m_force_veg_height
protected

Definition at line 704 of file elements.h.

Referenced by ForceGrowthDevelopment(), and ForceGrowthInitialize().

◆ m_force_Weed

double VegElement::m_force_Weed
protected

Definition at line 701 of file elements.h.

Referenced by ForceGrowthInitialize().

◆ m_forced_phase_shift

bool VegElement::m_forced_phase_shift
protected

Definition at line 696 of file elements.h.

Referenced by ReduceVeg_Extended(), SetGrowthPhase(), and VegElement().

◆ m_green_biomass

double VegElement::m_green_biomass
protected

Definition at line 689 of file elements.h.

Referenced by GetGreenBiomass(), and RecalculateBugsNStuff().

◆ m_growth_scaler

◆ m_ifile

ifstream VegElement::m_ifile
protected

Definition at line 706 of file elements.h.

◆ m_insect_pop

◆ m_LAgreen

◆ m_LAtotal

◆ m_newgrowthsum

double VegElement::m_newgrowthsum
protected

Definition at line 700 of file elements.h.

Referenced by RecalculateBugsNStuff(), and VegElement().

◆ m_newoldgrowthindex

int VegElement::m_newoldgrowthindex
protected

Definition at line 699 of file elements.h.

Referenced by RecalculateBugsNStuff(), and VegElement().

◆ m_nutrient_status

int VegElement::m_nutrient_status
protected

Definition at line 681 of file elements.h.

◆ m_oldLAtotal

double VegElement::m_oldLAtotal
protected

◆ m_oldnewgrowth

double VegElement::m_oldnewgrowth[32]
protected

Definition at line 698 of file elements.h.

Referenced by RecalculateBugsNStuff(), ResetDigestability(), and VegElement().

◆ m_total_biomass

double VegElement::m_total_biomass
protected

Definition at line 687 of file elements.h.

Referenced by RecalculateBugsNStuff(), and VegElement().

◆ m_total_biomass_old

double VegElement::m_total_biomass_old
protected

Definition at line 688 of file elements.h.

Referenced by RecalculateBugsNStuff(), and VegElement().

◆ m_veg_biomass

◆ m_veg_cover

double VegElement::m_veg_cover
protected

◆ m_veg_density

int VegElement::m_veg_density
protected

◆ m_veg_height

◆ m_veg_patchy

◆ m_veg_phase

int VegElement::m_veg_phase
protected

◆ m_vege_type

◆ m_weed_biomass

◆ m_weed_curve_num

int VegElement::m_weed_curve_num
protected

The documentation for this class was generated from the following files:
tov_AgroChemIndustryCereal
Definition: tov_declaration.h:55
EL_BUG_PERCENT_SB_A
#define EL_BUG_PERCENT_SB_A
Definition: elements.cpp:38
tov_OSpringBarleyClover
Definition: tov_declaration.h:46
tov_SpringBarleyStrigling
Definition: tov_declaration.h:58
tov_PLWinterWheatLate
Definition: tov_declaration.h:85
tov_PLSpringWheat
Definition: tov_declaration.h:75
tov_NLSpringBarley
Definition: tov_declaration.h:93
Landscape::SupplyLEPointer
LE * SupplyLEPointer(int a_polyref)
Definition: landscape.h:1099
tov_NLMaizeSpring
Definition: tov_declaration.h:102
tov_Oats
Definition: tov_declaration.h:40
tov_OWinterBarley
Definition: tov_declaration.h:47
tov_NLPotatoes
Definition: tov_declaration.h:92
CfgStr::value
const char * value(void)
Definition: configurator.h:152
LE::m_area
double m_area
The element area in m2.
Definition: elements.h:489
Landscape::SupplyTemp
double SupplyTemp(void)
Definition: landscape.h:1386
VegElement::IsCereal
virtual bool IsCereal()
Definition: elements.cpp:1467
VegElement::m_newgrowthsum
double m_newgrowthsum
Definition: elements.h:700
LE::m_pollenquality
PollenNectarQuality m_pollenquality
Definition: elements.h:539
tov_OPermanentGrassGrazed
Definition: tov_declaration.h:44
PlantGrowthData::GetLAgreenDiff
double GetLAgreenDiff(double a_ddegs, double a_yddegs, int a_plant, int a_phase)
Get the differential in LA green for the day degrees experienced.
Definition: plants.h:107
EL_GROWTH_PHASE_SHIFT_LEVEL
#define EL_GROWTH_PHASE_SHIFT_LEVEL
Definition: elements.cpp:170
CropActualValues::taken
bool taken
Definition: elements.h:556
EL_BUG_PERCENT_WW_B
#define EL_BUG_PERCENT_WW_B
Definition: elements.cpp:45
tov_PLSpringBarleySpr
Definition: tov_declaration.h:84
EL_BUG_PERCENT_WW_A
#define EL_BUG_PERCENT_WW_A
Definition: elements.cpp:44
EL_BUG_PERCENT_WRy_A
#define EL_BUG_PERCENT_WRy_A
Definition: elements.cpp:50
tov_OOats
Definition: tov_declaration.h:44
VegElement::m_force_LAtotal
double m_force_LAtotal
Definition: elements.h:703
LE::m_gooseNos
int m_gooseNos[366]
The number of geese each day.
Definition: elements.h:491
VegElement::m_LAgreen
double m_LAgreen
Definition: elements.h:684
tov_OSetaside
Definition: tov_declaration.h:46
tov_PLMaizeSilage
Definition: tov_declaration.h:78
tov_OTriticale
Definition: tov_declaration.h:47
tov_MaizeStrigling
Definition: tov_declaration.h:58
July
const int July
Definition: landscape.h:42
VegElement::m_total_biomass_old
double m_total_biomass_old
Definition: elements.h:688
EL_BUG_PERCENT_SB_C
#define EL_BUG_PERCENT_SB_C
Definition: elements.cpp:40
VegElement::m_force_veg_height
double m_force_veg_height
Definition: elements.h:704
tov_OWinterWheatUndersown
Definition: tov_declaration.h:49
CropActualValues::missed_fi_app
int missed_fi_app
Definition: elements.h:564
tov_Undefined
Definition: tov_declaration.h:114
PlantGrowthData::GetLAtotalDiff
double GetLAtotalDiff(double a_ddegs, double a_yddegs, int a_plant, int a_phase)
Get the differential in LA total for the day degrees experienced.
Definition: plants.h:111
VegElement::m_green_biomass
double m_green_biomass
Definition: elements.h:689
VegElement::ForceGrowthTest
virtual void ForceGrowthTest(void)
Definition: elements.cpp:1904
LE::m_pollencurve
PollenNectarDevelopmentCurve * m_pollencurve
pointer to the correct pollen curve set
Definition: elements.h:546
VegElement::m_force_LAgreen
double m_force_LAgreen
Definition: elements.h:702
harvest
Definition: treatment.h:82
VegElement::m_veg_cover
double m_veg_cover
Definition: elements.h:695
tov_FieldPeasStrigling
Definition: tov_declaration.h:56
VegElement::SetGrowthPhase
virtual void SetGrowthPhase(int a_phase)
Definition: elements.cpp:1851
tov_WinterBarleyStrigling
Definition: tov_declaration.h:59
LE::m_totalNectar
double m_totalNectar
Definition: elements.h:542
tov_NLBeetSpring
Definition: tov_declaration.h:100
Weather::GetDDDegs
double GetDDDegs(long a_date)
Definition: weather.cpp:155
tov_PLFodderLucerne1
Definition: tov_declaration.h:81
tov_WinterWheat
Definition: tov_declaration.h:55
tov_OCloverGrassSilage1
Definition: tov_declaration.h:43
tov_PermanentGrassTussocky
Definition: tov_declaration.h:49
tov_PLWinterTriticale
Definition: tov_declaration.h:73
tov_Heath
Definition: tov_declaration.h:66
tov_OCloverGrassGrazed2
Definition: tov_declaration.h:43
tov_PLPotatoes
Definition: tov_declaration.h:79
tov_NLCabbage
Definition: tov_declaration.h:95
PollenNectarDevelopmentCurveSet::m_pollencurveptr
PollenNectarDevelopmentCurve * m_pollencurveptr
Definition: plants.h:211
VegElement::m_forced_phase_shift
bool m_forced_phase_shift
Definition: elements.h:696
tov_PLBeet
Definition: tov_declaration.h:80
VegElement::RandomVegStartValues
void RandomVegStartValues(double *a_LAtotal, double *a_LAgreen, double *a_veg_height, double *a_weed_biomass)
Definition: elements.cpp:1843
VegElement::m_insect_pop
double m_insect_pop
Definition: elements.h:685
VegElement::m_vege_type
TTypesOfVegetation m_vege_type
Definition: elements.h:676
tov_PermanentSetaside
Definition: tov_declaration.h:49
tov_NLSpringBarleySpring
Definition: tov_declaration.h:104
tov_PLWinterRye
Definition: tov_declaration.h:74
FloatToDouble
void FloatToDouble(double &, float)
VegElement::m_veg_phase
int m_veg_phase
Definition: elements.h:679
tov_OSpringBarley
Definition: tov_declaration.h:46
VegElement::ResetGeese
void ResetGeese(void)
Reset geese numbers to zero in case this was not done by the population manager (the normal situation...
Definition: elements.cpp:2048
EL_BUG_PERCENT_Edges_A
#define EL_BUG_PERCENT_Edges_A
Definition: elements.cpp:68
tov_Setaside
Definition: tov_declaration.h:50
PlantGrowthData::GetLAgreenDiffScaled
double GetLAgreenDiffScaled(double a_ddegs, double a_yddegs, int a_plant, int a_phase, double a_scaler)
Get the differential in LA green for the day degrees experienced, scalable depending on plant growth ...
Definition: plants.h:121
tov_OrchardCrop
Definition: tov_declaration.h:65
tov_SpringBarleySeed
Definition: tov_declaration.h:52
tov_SpringBarleySKManagement
Definition: tov_declaration.h:65
LE::m_herbicidedelay
int m_herbicidedelay
Definition: elements.h:486
tov_WWheatPToxicControl
Definition: tov_declaration.h:55
tov_NLMaize
Definition: tov_declaration.h:91
tov_OWinterWheat
Definition: tov_declaration.h:66
tov_SpringBarleyStriglingCulm
Definition: tov_declaration.h:62
tov_FieldPeasSilage
Definition: tov_declaration.h:65
VegElement::m_weed_curve_num
int m_weed_curve_num
Definition: elements.h:678
tov_OCarrots
Definition: tov_declaration.h:43
harvest1
Definition: plants.h:55
tov_OWinterWheatUndersownExt
Definition: tov_declaration.h:63
EL_BUG_PERCENT_SB_B
#define EL_BUG_PERCENT_SB_B
Definition: elements.cpp:39
tov_NLGrassGrazedLast
Definition: tov_declaration.h:108
PollenNectarDevelopmentCurve::GetData
double GetData(int a_index)
The basic return function for the curve - day indexed.
Definition: plants.h:193
VegElement::ForceGrowthSpringTest
void ForceGrowthSpringTest(void)
Definition: elements.cpp:1915
g_rand_uni
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
tov_OBarleyPeaCloverGrass
Definition: tov_declaration.h:41
LE::m_birdmaizeforage
double m_birdmaizeforage
The maize forage present in KJ/m2.
Definition: elements.h:503
tov_WinterWheatShort
Definition: tov_declaration.h:56
g_msg
class MapErrorMsg * g_msg
Definition: maperrormsg.cpp:41
tov_SpringBarleyGrass
Definition: tov_declaration.h:52
g_bug_percent_c
static double g_bug_percent_c[tov_Undefined]
Definition: elements.cpp:134
EL_BUG_PERCENT_A
#define EL_BUG_PERCENT_A
Definition: elements.cpp:32
VegElement::m_veg_patchy
bool m_veg_patchy
Definition: elements.h:694
VegElement::PollenNectarPhenologyCalculation
void PollenNectarPhenologyCalculation()
This methods calculates the daily availability of pollen and nectar per square meter and in total.
Definition: elements.cpp:1790
VegElement::IsGooseGrass
virtual bool IsGooseGrass()
Definition: elements.cpp:1644
tov_YoungForest
Definition: tov_declaration.h:60
VegElement::m_weed_biomass
double m_weed_biomass
Definition: elements.h:691
tov_OWinterBarleyExt
Definition: tov_declaration.h:65
tov_SpringBarleySilage
Definition: tov_declaration.h:52
LE::m_birdseedforage
double m_birdseedforage
The grain forage present in KJ/m2.
Definition: elements.h:501
tov_NLGrassGrazed1Spring
Definition: tov_declaration.h:107
PollenNectarDevelopmentData::tovGetPollenNectarCurvePtr
PollenNectarDevelopmentCurveSet tovGetPollenNectarCurvePtr(int a_tov_ref)
Definition: plants.cpp:582
EL_BUG_PERCENT_D
#define EL_BUG_PERCENT_D
Definition: elements.cpp:71
tov_DummyCropPestTesting
Definition: tov_declaration.h:112
LE::m_default_grazing_level
int m_default_grazing_level
Definition: elements.h:518
LE::m_pig_grazing
bool m_pig_grazing
Definition: elements.h:519
tov_SpringRape
Definition: tov_declaration.h:53
EL_BUG_PERCENT_WRy_B
#define EL_BUG_PERCENT_WRy_B
Definition: elements.cpp:51
EL_GROWTH_DAYDEG_MAGIC
#define EL_GROWTH_DAYDEG_MAGIC
Definition: elements.cpp:158
PollenNectarQuality::m_quantity
double m_quantity
Definition: plants.h:219
g_weed_percent
static double g_weed_percent[tov_Undefined]
Definition: elements.cpp:131
LE::m_skylarkscrapes
bool m_skylarkscrapes
For management testing of skylark scrapes.
Definition: elements.h:88
Calendar::Date
long Date(void)
Definition: calendar.h:57
tov_PotatoesIndustry
Definition: tov_declaration.h:50
CropActualValues::no_herb_app
int no_herb_app
Definition: elements.h:561
tov_SpringBarleyPTreatment
Definition: tov_declaration.h:63
tov_FodderGrass
Definition: tov_declaration.h:62
tov_PLBeetSpr
Definition: tov_declaration.h:86
tov_NLCatchPeaCrop
Definition: tov_declaration.h:106
tov_Carrots
Definition: tov_declaration.h:31
VegElement::Clean_CropDataStorage
void Clean_CropDataStorage(int index)
Definition: elements.cpp:2129
tov_NLCarrotsSpring
Definition: tov_declaration.h:101
LE::m_goosegrazingforage
double m_goosegrazingforage[gs_foobar]
The grazing forage present in KJ/min. The last value indicates cereal 1 or not -1.
Definition: elements.h:505
g_landscape_p
class Landscape * g_landscape_p
Definition: Landscape.cpp:258
tov_NLPotatoesSpring
Definition: tov_declaration.h:103
tov_SpringBarleyCloverGrass
Definition: tov_declaration.h:52
Landscape::SupplyGooseGrazingForageH
double SupplyGooseGrazingForageH(double a_height, GooseSpecies a_goose)
Returns the leaf forage resource as seen from a goose standpoint at a polygon based on the height onl...
Definition: landscape.h:541
LE::m_NectarM2
double m_NectarM2
Definition: elements.h:544
tov_WinterRape
Definition: tov_declaration.h:53
tov_OGrazingPigs
Definition: tov_declaration.h:44
tov_SugarBeet
Definition: tov_declaration.h:66
VegElement::ForceGrowthDevelopment
virtual void ForceGrowthDevelopment(void)
Definition: elements.cpp:1976
tov_NLBeet
Definition: tov_declaration.h:89
VegElement::m_CropDataStorage
CropActualValues m_CropDataStorage[2]
Keeps data on pesticide applications, biomass at harvest etc. Data for maximum two crops can be store...
Definition: elements.h:722
tov_OSBarleySilage
Definition: tov_declaration.h:56
tov_SpringBarleyPeaCloverGrassStrigling
Definition: tov_declaration.h:60
tov_PermanentGrassGrazed
Definition: tov_declaration.h:49
c_SolarConversion
const double c_SolarConversion[2][81]
Definition: elements.cpp:103
tov_CloverGrassGrazed2
Definition: tov_declaration.h:33
tov_WWheatPControl
Definition: tov_declaration.h:55
cfg_goose_GrainDecayRateWinter
CfgFloat cfg_goose_GrainDecayRateWinter
tov_PLWinterRape
Definition: tov_declaration.h:71
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: maperrormsg.cpp:59
tov_PLBeans
Definition: tov_declaration.h:87
tov_SpringBarleyCloverGrassStrigling
Definition: tov_declaration.h:58
LE::m_lastsownvegtype
TTypesOfVegetation m_lastsownvegtype
Records the last vegegetation type that was sown on the element.
Definition: elements.h:507
tov_Potatoes
Definition: tov_declaration.h:50
tov_WinterRyeStrigling
Definition: tov_declaration.h:59
tov_PLWinterBarley
Definition: tov_declaration.h:72
PlantGrowthData::GetHeightDiff
double GetHeightDiff(double a_ddegs, double a_yddegs, int a_plant, int a_phase)
Get the differential in veg height for the day degrees experienced.
Definition: plants.h:115
VegElement::m_newoldgrowthindex
int m_newoldgrowthindex
Definition: elements.h:699
VegElement::m_veg_biomass
double m_veg_biomass
Definition: elements.h:686
EL_VEG_START_LAIT
#define EL_VEG_START_LAIT
Definition: elements.cpp:187
tov_WinterWheatStriglingCulm
Definition: tov_declaration.h:62
LE::m_yddegs
double m_yddegs
Definition: elements.h:521
EL_BUG_PERCENT_Edges_B
#define EL_BUG_PERCENT_Edges_B
Definition: elements.cpp:69
tov_NLTulips
Definition: tov_declaration.h:96
l_el_read_bug_percentage_file
static CfgBool l_el_read_bug_percentage_file("ELEM_READ_BUG_PERCENTAGE_FILE", CFG_CUSTOM, false)
tov_WinterRapeStrigling
Definition: tov_declaration.h:59
CropActualValues::tov_type
TTypesOfVegetation tov_type
Definition: elements.h:557
PlantGrowthData::GetStartValue
double GetStartValue(int a_veg_type, int a_phase, int a_type)
Definition: plants.h:127
EL_BUG_PERCENT_C
#define EL_BUG_PERCENT_C
Definition: elements.cpp:34
PlantGrowthData::GetHeightDiffScaled
double GetHeightDiffScaled(double a_ddegs, double a_yddegs, int a_plant, int a_phase, double a_scaler)
Get the differential in veg height for the day degrees experienced, scalable depending on plant growt...
Definition: plants.h:125
VegElement::m_crop_index
int m_crop_index
Definition: elements.h:723
LE::m_gooseSpNos
int m_gooseSpNos[366][gs_foobar]
The number of geese of each species each day.
Definition: elements.h:493
EL_BUG_PERCENT_WRy_C
#define EL_BUG_PERCENT_WRy_C
Definition: elements.cpp:52
LE::m_days_since_insecticide_spray
int m_days_since_insecticide_spray
Definition: elements.h:514
tov_OMaizeSilage
Definition: tov_declaration.h:65
g_biomass_scale
static double g_biomass_scale[tov_Undefined]
Definition: elements.cpp:130
tov_Maize
Definition: tov_declaration.h:36
CropActualValues::biomass_at_harvest
double biomass_at_harvest
Definition: elements.h:558
CropActualValues::area
double area
Definition: elements.h:560
tov_OWinterRape
Definition: tov_declaration.h:47
tov_WWheatPTreatment
Definition: tov_declaration.h:55
CfgFloat::value
double value(void)
Definition: configurator.h:118
g_crops
class PlantGrowthData * g_crops
Definition: plants.cpp:41
EL_BUG_PERCENT_WR_C
#define EL_BUG_PERCENT_WR_C
Definition: elements.cpp:58
tov_FieldPeas
Definition: tov_declaration.h:34
tov_SpringBarleyStriglingSingle
Definition: tov_declaration.h:60
tov_BroadBeans
Definition: tov_declaration.h:66
VegElement::m_dead_biomass
double m_dead_biomass
Definition: elements.h:690
tov_Wasteland
Definition: tov_declaration.h:66
PollenNectarDevelopmentCurveSet::m_nectarcurveptr
PollenNectarDevelopmentCurve * m_nectarcurveptr
Definition: plants.h:212
tov_NLGrassGrazed1
Definition: tov_declaration.h:97
LE::m_owner_index
int m_owner_index
Definition: elements.h:472
tov_OSeedGrass1
Definition: tov_declaration.h:46
VegElement::m_oldLAtotal
double m_oldLAtotal
Definition: elements.h:683
LE::m_totalPollen
double m_totalPollen
Definition: elements.h:541
tov_OFodderBeet
Definition: tov_declaration.h:65
g_bug_percent_d
static double g_bug_percent_d[tov_Undefined]
Definition: elements.cpp:135
tov_NLWinterWheat
Definition: tov_declaration.h:94
LE::SetStubble
void SetStubble(bool a_flag)
Sets the in stubble flag.
Definition: elements.h:390
tov_PLMaize
Definition: tov_declaration.h:77
tov_OCloverGrassGrazed1
Definition: tov_declaration.h:43
VegElement::m_LAtotal
double m_LAtotal
Definition: elements.h:682
tov_OSpringBarleyPigs
Definition: tov_declaration.h:47
tov_SpringBarleySpr
Definition: tov_declaration.h:66
Landscape::SupplyGlobalRadiation
double SupplyGlobalRadiation()
Definition: landscape.h:1341
LE
Definition: elements.h:81
tov_PLSpringBarley
Definition: tov_declaration.h:76
tov_PermanentGrassLowYield
Definition: tov_declaration.h:63
cfg_goose_grass_to_winter_cereal_scaler
CfgFloat cfg_goose_grass_to_winter_cereal_scaler
tov_WinterWheatStrigling
Definition: tov_declaration.h:59
VegElement::m_force_Weed
double m_force_Weed
Definition: elements.h:701
LE::m_cattle_grazing
int m_cattle_grazing
Definition: elements.h:517
g_bug_percent_a
static double g_bug_percent_a[tov_Undefined]
Definition: elements.cpp:132
tov_WinterWheatStriglingSingle
Definition: tov_declaration.h:62
PlantGrowthData::GetLAtotalDiffScaled
double GetLAtotalDiffScaled(double a_ddegs, double a_yddegs, int a_plant, int a_phase, double a_scaler)
Get the differential in LA total for the day degrees experienced, scalable depending on plant growth ...
Definition: plants.h:123
LE::SetPollenNectarCurves
void SetPollenNectarCurves(PollenNectarDevelopmentCurve *a_pollencurnve, PollenNectarDevelopmentCurve *a_nectarcurve)
Set method for pollen and nectar curves.
Definition: elements.h:435
EL_BUG_PERCENT_G_B
#define EL_BUG_PERCENT_G_B
Definition: elements.cpp:63
EL_BUG_PERCENT_WR_A
#define EL_BUG_PERCENT_WR_A
Definition: elements.cpp:56
WARN_FILE
Definition: maperrormsg.h:37
LE::m_ddegs
double m_ddegs
Definition: elements.h:522
EL_BUG_PERCENT_G_A
#define EL_BUG_PERCENT_G_A
Definition: elements.cpp:62
tov_PLCarrots
Definition: tov_declaration.h:83
tov_WinterBarley
Definition: tov_declaration.h:53
VegElement::SetVegPatchy
virtual void SetVegPatchy(bool p)
Definition: elements.h:585
tov_NaturalGrass
Definition: tov_declaration.h:37
VegElement::m_curve_num
int m_curve_num
Definition: elements.h:677
VegElement::RecalculateBugsNStuff
virtual void RecalculateBugsNStuff(void)
This method is responsible for.
Definition: elements.cpp:1678
tov_SeedGrass2
Definition: tov_declaration.h:50
tov_WaterBufferZone
Definition: tov_declaration.h:110
VegElement::m_digestability
double m_digestability
Definition: elements.h:697
tov_MaizeSilage
Definition: tov_declaration.h:62
LE::m_vegddegs
double m_vegddegs
Definition: elements.h:520
l_el_bug_percentage_file
static CfgStr l_el_bug_percentage_file("ELEM_BUG_PERCENTAGE_FILE", CFG_CUSTOM,"bugpercents.txt")
tov_NoGrowth
Definition: tov_declaration.h:38
tov_OPotatoes
Definition: tov_declaration.h:44
CropActualValues::harvested
bool harvested
Definition: elements.h:559
VegElement::m_veg_density
int m_veg_density
Definition: elements.h:693
LE::m_gooseSpNosTimed
int m_gooseSpNosTimed[366][gs_foobar]
The number of geese of each species at a predefined time per day.
Definition: elements.h:497
EL_BUG_PERCENT_Edges_C
#define EL_BUG_PERCENT_Edges_C
Definition: elements.cpp:70
CropActualValues::no_fi_app
int no_fi_app
Definition: elements.h:563
tov_OSeedGrass2
Definition: tov_declaration.h:46
VegElement::m_total_biomass
double m_total_biomass
Definition: elements.h:687
janfirst
Definition: plants.h:52
PlantGrowthData::VegTypeToCurveNum
int VegTypeToCurveNum(TTypesOfVegetation VegReference)
Definition: plants.cpp:226
LE::m_nectarcurve
PollenNectarDevelopmentCurve * m_nectarcurve
pointer to the correct nectar curve set
Definition: elements.h:548
g_nectarpollen
class PollenNectarDevelopmentData * g_nectarpollen
Definition: Landscape.cpp:241
VegElement::m_growth_scaler
double m_growth_scaler
Definition: elements.h:680
tov_NLGrassGrazed2
Definition: tov_declaration.h:98
tov_OFieldPeasSilage
Definition: tov_declaration.h:56
Calendar::DayInYear
int DayInYear(void)
Definition: calendar.h:58
tov_SpringWheat
Definition: tov_declaration.h:53
tov_SpringBarley
Definition: tov_declaration.h:52
tov_OWinterRye
Definition: tov_declaration.h:49
tov_NLCarrots
Definition: tov_declaration.h:90
g_date
class Calendar * g_date
Definition: calendar.cpp:38
tov_OFirstYearDanger
Definition: tov_declaration.h:44
tov_CloverGrassGrazed1
Definition: tov_declaration.h:32
LE::m_PollenM2
double m_PollenM2
Definition: elements.h:543
EL_GROWTH_DATE_MAGIC
#define EL_GROWTH_DATE_MAGIC
Definition: elements.cpp:164
PlantGrowthData::StartValid
bool StartValid(int a_veg_type, int a_phase)
Definition: plants.cpp:409
tov_OFieldPeas
Definition: tov_declaration.h:43
tov_FodderBeet
Definition: tov_declaration.h:35
VegElement::m_oldnewgrowth
double m_oldnewgrowth[32]
Definition: elements.h:698
tov_WinterRye
Definition: tov_declaration.h:55
tov_PLFodderLucerne2
Definition: tov_declaration.h:82
tov_Triticale
Definition: tov_declaration.h:53
tov_PLWinterWheat
Definition: tov_declaration.h:70
VegElement::GrazeVegetation
virtual void GrazeVegetation(double a_grams, bool a_force)
Definition: elements.cpp:2061
CropActualValues::missed_herb_app
int missed_herb_app
Definition: elements.h:562
EL_BUG_PERCENT_B
#define EL_BUG_PERCENT_B
Definition: elements.cpp:33
March
const int March
Definition: landscape.h:38
LE::m_poly
int m_poly
The polyref number for this polygon.
Definition: elements.h:477
CfgBool::value
bool value(void)
Definition: configurator.h:135
EL_BUG_PERCENT_WW_C
#define EL_BUG_PERCENT_WW_C
Definition: elements.cpp:46
tov_NLPermanentGrassGrazed
Definition: tov_declaration.h:99
VegElement::m_force_growth
bool m_force_growth
Definition: elements.h:705
cfg_ele_weedscaling
static CfgFloat cfg_ele_weedscaling("ELE_WEEDSCALING", CFG_CUSTOM, 1.0)
cfg_goose_GrainDecayRateSpring
CfgFloat cfg_goose_GrainDecayRateSpring
tov_SeedGrass1
Definition: tov_declaration.h:50
EL_BUG_PERCENT_WR_B
#define EL_BUG_PERCENT_WR_B
Definition: elements.cpp:57
Landscape::SupplyFarmIntensity
int SupplyFarmIntensity(int a_x, int a_y)
Definition: Landscape.cpp:756
VegElement::CalcGooseForageResources
void CalcGooseForageResources()
Calculates spilled grain and grazing forage resources for geese.
Definition: elements.cpp:1805
EL_BUG_PERCENT_G_C
#define EL_BUG_PERCENT_G_C
Definition: elements.cpp:64
VegElement::ForceGrowthInitialize
virtual void ForceGrowthInitialize(void)
Definition: elements.cpp:1930
VegElement::m_veg_height
double m_veg_height
Definition: elements.h:692
tov_OSpringBarleyGrass
Definition: tov_declaration.h:46
g_weather
class Weather * g_weather
Definition: weather.cpp:41
LE::LE
LE(void)
Definition: elements.cpp:279
LE::m_unsprayedmarginpolyref
int m_unsprayedmarginpolyref
Definition: elements.h:448
tov_None
Definition: tov_declaration.h:39
g_bug_percent_b
static double g_bug_percent_b[tov_Undefined]
Definition: elements.cpp:133
tov_OSpringBarleyExt
Definition: tov_declaration.h:63
marchfirst
Definition: plants.h:54
sow
Definition: plants.h:53
EL_VEG_HEIGHTSCALE
#define EL_VEG_HEIGHTSCALE
Definition: elements.cpp:191
tov_NLCabbageSpring
Definition: tov_declaration.h:105