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

#include <elements.h>

Inheritance diagram for RoadsideVerge:
VegElement LE RoadsideSlope

Public Member Functions

 RoadsideVerge (void)
 
virtual void DoDevelopment (void)
 
- Public Member Functions inherited from VegElement
 VegElement (void)
 
virtual ~VegElement (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...
 

Private Member Functions

void Cutting (int a_today)
 

Private Attributes

long m_DateCut
 

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...
 
- Protected Member Functions inherited from VegElement
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 inherited from VegElement
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...
 
- 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 795 of file elements.h.

Constructor & Destructor Documentation

◆ RoadsideVerge()

Member Function Documentation

◆ Cutting()

void RoadsideVerge::Cutting ( int  a_today)
private

◆ DoDevelopment()

void RoadsideVerge::DoDevelopment ( void  )
virtual

Reimplemented from VegElement.

Reimplemented in RoadsideSlope.

Definition at line 2284 of file elements.cpp.

2284  {
2286  // Add cutting functionality when ready.
2287  long today = g_date->DayInYear();
2288 
2289  if ( g_date->JanFirst() ) {
2290  // beginning of year so restart the cutting
2291  m_DateCut = 0;
2292  }
2293 
2294  if ( today > RV_MAY_1ST ) // No cutting before May 1st
2295  {
2296  long SinceCut = today - m_DateCut; // how many days since last cut
2297  int month = g_date->GetMonth();
2298  switch ( month ) {
2299  case 5:
2300  if ( random( 14 ) + SinceCut > RV_CUT_MAY ) Cutting( today );
2301  break;
2302  case 6:
2303  if ( random( 14 ) + SinceCut > RV_CUT_JUN ) Cutting( today );
2304  break;
2305  case 7:
2306  if ( random( 14 ) + SinceCut > RV_CUT_JUL ) Cutting( today );
2307  break;
2308  case 8:
2309  if ( random( 14 ) + SinceCut > RV_CUT_AUG ) Cutting( today );
2310  break;
2311  case 9:
2312  if ( random( 14 ) + SinceCut > RV_CUT_SEP ) Cutting( today );
2313  break;
2314  case 10:
2315  if ( random( 14 ) + SinceCut > RV_CUT_OCT ) Cutting( today );
2316  break;
2317  default:
2318  break;
2319  }
2320  }
2321 }

References Cutting(), Calendar::DayInYear(), VegElement::DoDevelopment(), g_date, Calendar::GetMonth(), Calendar::JanFirst(), m_DateCut, RV_CUT_AUG, RV_CUT_JUL, RV_CUT_JUN, RV_CUT_MAY, RV_CUT_OCT, RV_CUT_SEP, and RV_MAY_1ST.

Referenced by RoadsideSlope::DoDevelopment().

Member Data Documentation

◆ m_DateCut

long RoadsideVerge::m_DateCut
private

Definition at line 799 of file elements.h.

Referenced by Cutting(), and DoDevelopment().


The documentation for this class was generated from the following files:
RV_MAY_1ST
#define RV_MAY_1ST
Definition: elements.cpp:212
VegElement::DoDevelopment
virtual void DoDevelopment(void)
Definition: elements.cpp:2004
VegElement::m_LAgreen
double m_LAgreen
Definition: elements.h:684
RV_CUT_TOTAL
#define RV_CUT_TOTAL
Definition: elements.cpp:219
RV_CUT_HEIGHT
#define RV_CUT_HEIGHT
Definition: elements.cpp:215
RV_CUT_AUG
#define RV_CUT_AUG
Definition: elements.cpp:203
tole_RoadsideVerge
Definition: tole_declaration.h:38
Calendar::GetMonth
int GetMonth(void)
Definition: calendar.h:69
RV_CUT_SEP
#define RV_CUT_SEP
Definition: elements.cpp:206
VegElement::m_vege_type
TTypesOfVegetation m_vege_type
Definition: elements.h:676
g_rand_uni
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
RV_CUT_JUL
#define RV_CUT_JUL
Definition: elements.cpp:200
VegElement::m_veg_patchy
bool m_veg_patchy
Definition: elements.h:694
VegElement::VegElement
VegElement(void)
Definition: elements.cpp:615
mow
Definition: treatment.h:93
RV_CUT_JUN
#define RV_CUT_JUN
Definition: elements.cpp:197
CfgFloat::value
double value(void)
Definition: configurator.h:118
RV_CUT_OCT
#define RV_CUT_OCT
Definition: elements.cpp:209
g_crops
class PlantGrowthData * g_crops
Definition: plants.cpp:41
RoadsideVerge::Cutting
void Cutting(int a_today)
Definition: elements.cpp:2323
VegElement::m_LAtotal
double m_LAtotal
Definition: elements.h:682
LE::SetLastTreatment
void SetLastTreatment(int a_treatment)
Definition: elements.cpp:490
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
cfg_PermanentVegGrowthMinScaler
CfgFloat cfg_PermanentVegGrowthMinScaler("VEG_GROWTHSCALERMIN", CFG_CUSTOM, 1.0)
Scales the growth of vegetation - min value.
PlantGrowthData::VegTypeToCurveNum
int VegTypeToCurveNum(TTypesOfVegetation VegReference)
Definition: plants.cpp:226
VegElement::m_growth_scaler
double m_growth_scaler
Definition: elements.h:680
RV_CUT_GREEN
#define RV_CUT_GREEN
Definition: elements.cpp:217
Calendar::DayInYear
int DayInYear(void)
Definition: calendar.h:58
g_date
class Calendar * g_date
Definition: calendar.cpp:38
RV_CUT_MAY
#define RV_CUT_MAY
Definition: elements.cpp:194
RoadsideVerge::m_DateCut
long m_DateCut
Definition: elements.h:799
Calendar::JanFirst
bool JanFirst(void)
Definition: calendar.h:74
VegElement::m_veg_height
double m_veg_height
Definition: elements.h:692
cfg_PermanentVegGrowthMaxScaler
CfgFloat cfg_PermanentVegGrowthMaxScaler("VEG_GROWTHSCALERMAX", CFG_CUSTOM, 1.0)
Scales the growth of vegetation - max value.
LE::m_type
TTypesOfLandscapeElement m_type
Definition: elements.h:487