Goose Management Model ODdox  1.02
Field Class Reference

#include <elements.h>

Public Member Functions

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

Additional Inherited Members

- Public Attributes inherited from LE
bool m_skylarkscrapes
 For management testing of skylark scrapes. More...
 
int m_squares_in_map
 
int m_tried_to_do
 
- Protected Member Functions inherited from VegElement
void CalcGooseForageResources ()
 Calculates spilled grain and grazing forage resources for geese. More...
 
void ForceGrowthSpringTest (void)
 
void PollenNectarPhenologyCalculation ()
 This methods calculates the daily availability of pollen and nectar per square meter and in total. More...
 
void RandomVegStartValues (double *a_LAtotal, double *a_LAgreen, double *a_veg_height, double *a_weed_biomass)
 
void ReadBugPercentageFile (void)
 
virtual void RecalculateBugsNStuff (void)
 This method is responsible for. 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
int m_crop_index
 
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_curve_num
 
double m_dead_biomass
 
double m_digestability
 
bool m_force_growth
 
double m_force_LAgreen
 
double m_force_LAtotal
 
double m_force_veg_height
 
double m_force_Weed
 
bool m_forced_phase_shift
 
double m_green_biomass
 
double m_growth_scaler
 
ifstream m_ifile
 
double m_insect_pop
 
double m_LAgreen
 
double m_LAtotal
 
double m_newgrowthsum
 
int m_newoldgrowthindex
 
int m_nutrient_status
 
double m_oldLAtotal
 
double m_oldnewgrowth [32]
 
double m_total_biomass
 
double m_total_biomass_old
 
double m_veg_biomass
 
double m_veg_cover
 
int m_veg_density
 
double m_veg_height
 
bool m_veg_patchy
 
int m_veg_phase
 
TTypesOfVegetation m_vege_type
 
double m_weed_biomass
 
int m_weed_curve_num
 
- Protected Attributes inherited from LE
int m_almass_le_type
 This holds the ALMaSS element type reference number. More...
 
double m_area
 The element area in m2. More...
 
double m_birdmaizeforage
 The maize forage present in KJ/m2. More...
 
double m_birdseedforage
 The grain forage present in KJ/m2. More...
 
LEm_border
 
int m_cattle_grazing
 
int m_centroidx
 
int m_centroidy
 
int m_countrydesignation
 
int m_currentOsmiaNests
 to record the number of actual osmia nests More...
 
int m_days_since_insecticide_spray
 
double m_ddegs
 
int m_default_grazing_level
 
double m_dist_to_closest_roost [gs_foobar]
 An array holding the distance to the nearest goose roost. More...
 
int m_farmfunc_tried_to_do
 
double m_goosegrazingforage [gs_foobar]
 The grazing forage present in KJ/min. The last value indicates cereal 1 or not -1. More...
 
int m_gooseNos [366]
 The number of geese each day. More...
 
int m_gooseNosTimed [366]
 The number of geese at a predefined time per day. More...
 
int m_gooseSpNos [366][gs_foobar]
 The number of geese of each species each day. More...
 
int m_gooseSpNosTimed [366][gs_foobar]
 The number of geese of each species at a predefined time per day. More...
 
int m_herbicidedelay
 
bool m_high
 
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...
 
bool m_is_in_map
 
unsigned int m_lastindex
 
TTypesOfVegetation m_lastsownvegtype
 Records the last vegegetation type that was sown on the element. More...
 
vector< int > m_lasttreat
 
long m_management_loop_detect_count
 
long m_management_loop_detect_date
 
int m_map_index
 
int m_maxOsmiaNests
 to record the number of possible osmia nests More...
 
int m_maxx
 
int m_maxy
 
int m_minx
 
int m_miny
 
int m_mowndecay
 
PollenNectarDevelopmentCurvem_nectarcurve
 pointer to the correct nectar curve set More...
 
double m_NectarM2
 
PollenNectarQuality m_nectarquality
 
long m_olddays
 
int m_openness
 The openness metric for a field (if any) More...
 
double m_OsmiaNestProb
 to record the chance of osmia nesting More...
 
Farmm_owner
 
int m_owner_file
 
int m_owner_index
 
int m_pdates [256]
 
int m_PesticideGridCell
 
bool m_pig_grazing
 
int m_pindex
 
bool m_poison
 
PollenNectarDevelopmentCurvem_pollencurve
 pointer to the correct pollen curve set More...
 
double m_PollenM2
 
PollenNectarQuality m_pollenquality
 
int m_poly
 The polyref number for this polygon. More...
 
int m_ptrace [256]
 
int m_rot_index
 
long m_running
 
LE_Signal m_signal_mask
 
int m_soiltype
 
bool m_sprayedtoday
 flag to indicate an overspray situation More...
 
int m_subtype
 
double m_totalNectar
 
double m_totalPollen
 
int m_tramlinesdecay
 
TTypesOfLandscapeElement m_type
 
int m_unsprayedmarginpolyref
 
int m_valid_x
 
int m_valid_y
 
int m_vegage
 
double m_vegddegs
 
int m_vege_danger_store
 
double m_yddegs
 
int MConsts [10]
 
int MDates [2][25]
 
- Static Protected Attributes inherited from LE
static double m_largeroad_load []
 
static double m_monthly_traffic []
 Used for birds that feed on grain on cereal fields 3% spill is expected. More...
 
static double m_smallroad_load []
 

Detailed Description

Definition at line 727 of file elements.h.

Constructor & Destructor Documentation

◆ Field()

Field::Field ( void  )

Definition at line 2122 of file elements.cpp.

2122  : VegElement() {
2123  m_type = tole_Field;
2125 }

References LE::m_default_grazing_level, LE::m_type, and tole_Field.

Member Function Documentation

◆ DoDevelopment()

void Field::DoDevelopment ( void  )
virtual

Reimplemented from VegElement.

Definition at line 2160 of file elements.cpp.

2160  {
2162  SetSprayedToday(false); // Reset the overspray flag in case it is set
2163  // Now if we have an unsprayed field margin, we need to transfer the crop
2164  // data to it.
2165  if ( GetUnsprayedMarginPolyRef() != -1 ) {
2172  }
2173 }

References VegElement::DoDevelopment(), g_landscape_p, LE::GetUnsprayedMarginPolyRef(), LE::m_cattle_grazing, VegElement::m_insect_pop, VegElement::m_LAgreen, VegElement::m_LAtotal, LE::m_type, VegElement::m_veg_biomass, VegElement::m_veg_cover, VegElement::m_veg_density, VegElement::m_veg_height, VegElement::m_veg_patchy, VegElement::m_vege_type, VegElement::m_weed_biomass, LE::SetCropData(), LE::SetCropDataAll(), LE::SetSprayedToday(), Landscape::SupplyLEPointer(), tole_PermPasture, tole_PermPastureLowYield, and tole_PermPastureTussocky.

◆ GetPreviousCrop()

TTypesOfVegetation Field::GetPreviousCrop ( int  a_index)
virtual

Reimplemented from LE.

Definition at line 2176 of file elements.cpp.

2176  {
2177  return m_owner->GetPreviousCrop(a_index);
2178 }

References Farm::GetPreviousCrop(), and LE::m_owner.


The documentation for this class was generated from the following files:
Landscape::SupplyLEPointer
LE * SupplyLEPointer(int a_polyref)
Definition: landscape.h:1099
VegElement::DoDevelopment
virtual void DoDevelopment(void)
Definition: elements.cpp:2004
VegElement::m_LAgreen
double m_LAgreen
Definition: elements.h:684
LE::SetCropData
virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int)
Definition: elements.h:167
VegElement::m_veg_cover
double m_veg_cover
Definition: elements.h:695
VegElement::m_insect_pop
double m_insect_pop
Definition: elements.h:685
VegElement::m_vege_type
TTypesOfVegetation m_vege_type
Definition: elements.h:676
VegElement::m_veg_patchy
bool m_veg_patchy
Definition: elements.h:694
LE::SetSprayedToday
void SetSprayedToday(bool a_didit)
Definition: elements.h:303
VegElement::m_weed_biomass
double m_weed_biomass
Definition: elements.h:691
VegElement::VegElement
VegElement(void)
Definition: elements.cpp:615
LE::m_default_grazing_level
int m_default_grazing_level
Definition: elements.h:518
LE::SetCropDataAll
virtual void SetCropDataAll(double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
Definition: elements.h:168
tole_PermPasture
Definition: tole_declaration.h:47
g_landscape_p
class Landscape * g_landscape_p
Definition: Landscape.cpp:258
VegElement::m_veg_biomass
double m_veg_biomass
Definition: elements.h:686
VegElement::m_LAtotal
double m_LAtotal
Definition: elements.h:682
tole_PermPastureTussocky
Definition: tole_declaration.h:45
LE::m_cattle_grazing
int m_cattle_grazing
Definition: elements.h:517
tole_Field
Definition: tole_declaration.h:43
tole_PermPastureLowYield
Definition: tole_declaration.h:44
LE::m_owner
Farm * m_owner
Definition: elements.h:469
VegElement::m_veg_density
int m_veg_density
Definition: elements.h:693
LE::GetUnsprayedMarginPolyRef
int GetUnsprayedMarginPolyRef(void)
Definition: elements.h:319
Farm::GetPreviousCrop
TTypesOfVegetation GetPreviousCrop(int a_index)
Definition: farm.h:909
VegElement::m_veg_height
double m_veg_height
Definition: elements.h:692
LE::m_type
TTypesOfLandscapeElement m_type
Definition: elements.h:487