Goose Management Model ODdox
1.02
|
Ponds are defined as freshwater bodies between 25m2 and 5000m2. For newts the effective size is limited to 400m2. More...
#include <elements.h>
Public Member Functions | |
void | CalcLarvalFood () |
Calculates the amount of larval food present More... | |
void | CalcPondPesticide () |
Calculates the amount of pesticide per unit pond water More... | |
virtual void | DoDevelopment (void) |
bool | IsMaleNewtPresent () |
Gets whether there is a male newt as present. More... | |
Pond (void) | |
virtual void | SetMaleNewtPresent (bool a_ispresent) |
Sets a male as present/absent. More... | |
bool | SubtractLarvalFood (double a_food) |
Called by a larva when feeding, removes an age specific amount of larval food More... | |
double | SupplyPondPesticide () |
supply the current pesticide concentration per litre More... | |
Public Member Functions inherited from Freshwater | |
Freshwater (void) | |
Public Member Functions inherited from NonVegElement | |
NonVegElement (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... | |
virtual void | ForceGrowthDevelopment (void) |
virtual void | ForceGrowthInitialize (void) |
virtual void | ForceGrowthTest (void) |
double | GetArea (void) |
double | GetBirdMaize (void) |
double | GetBirdSeed (void) |
LE * | GetBorder (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... | |
virtual double | GetDeadBiomass (void) |
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... | |
virtual double | GetGreenBiomass (void) |
bool | GetHigh (void) |
virtual double | GetInsectPop (void) |
virtual double | GetLAGreen (void) |
TTypesOfVegetation | GetLastSownVeg () |
Returns the last vegetation type to be sown. More... | |
int | GetLastTreatment (int *a_index) |
virtual double | GetLATotal (void) |
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... | |
Farm * | GetOwner (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... | |
virtual TTypesOfVegetation | GetPreviousCrop (int) |
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) |
virtual double | GetVegBiomass (void) |
double | GetVegDDegs () |
Get the total of day degrees for the crop/veg on this element. More... | |
virtual double | GetWeedBiomass (void) |
virtual void | GrazeVeg_Extended (double) |
virtual void | GrazeVegetation (double, bool) |
virtual void | GrazeVegetationTotal (double) |
bool | HasTramlines (void) |
void | IncOsmiaNesting () |
Add an occupied nest. More... | |
virtual void | Insecticide (double) |
virtual void | InsectMortality (double) |
bool | IsRecentlyMown (void) |
int | IsRecentlySprayed (void) |
LE (void) | |
virtual void | ReduceVeg (double) |
virtual void | ReduceVeg_Extended (double) |
virtual void | ReduceWeedBiomass (double) |
void | ReleaseOsmiaNest () |
Test to see if a nest is found. More... | |
virtual void | ResetDigestability () |
sets growth record to zero in descendent classes 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) |
virtual void | SetCropData (double, double, double, TTypesOfVegetation, double, int) |
virtual void | SetCropDataAll (double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double) |
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) |
virtual void | SetGrowthPhase (int) |
void | SetHerbicideDelay (int a_decaytime_days) |
void | SetHigh (bool a_high) |
virtual void | SetInsectPop (double) |
void | SetLastSownVeg (TTypesOfVegetation a_tov) |
Records the last vegetation type to be sown. More... | |
void | SetLastTreatment (int a_treatment) |
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) |
virtual void | SetVegHeight (double) |
virtual void | SetVegParameters (double, double, double, double) |
virtual void | SetVegType (TTypesOfVegetation, TTypesOfVegetation) |
virtual void | StoreLAItotal () |
virtual void | ToggleCattleGrazing (void) |
virtual void | TogglePigGrazing (void) |
void | UpdateOsmiaNesting () |
Recalculate the nest finding probability. More... | |
virtual void | ZeroVeg (void) |
virtual | ~LE (void) |
Protected Attributes | |
double | m_LarvalFood |
The amount of larval food present More... | |
double | m_LarvalFoodScaler |
The proportion of larval food per m2 More... | |
bool | m_MaleNewtPresent |
Flag for presence of a male newt. More... | |
double | m_pondpesticide |
Holds the pesticide content per unit pond water. More... | |
double | m_pondquality |
a factor used to alter the pond qualities (default behaviour is random 0.0-1.0) More... | |
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... | |
LE * | m_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 |
PollenNectarDevelopmentCurve * | m_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... | |
Farm * | m_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 |
PollenNectarDevelopmentCurve * | m_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] |
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 |
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 [] |
Ponds are defined as freshwater bodies between 25m2 and 5000m2. For newts the effective size is limited to 400m2.
Currently the only pond 'behviour' is related to provision of food for newt larvae. This is determined daily and can be seasonally adjusted.
Definition at line 1183 of file elements.h.
Pond::Pond | ( | void | ) |
Definition at line 2776 of file elements.cpp.
References cfg_randompondquality, g_rand_uni, m_LarvalFood, m_MaleNewtPresent, m_pondquality, LE::m_type, tole_Pond, and CfgBool::value().
void Pond::CalcLarvalFood | ( | ) |
Calculates the amount of larval food present
The larval food is calculated assuming a logistic equation in the form of Nt+1 = Nt+(N*r * (1-N/K)) t = one day, N is a scaler which is multiplied by a constant and the area of the pond to get the total larval food, K & r are carrying capacity and instantaneous reproductive rate respectively. K can change with season and this is currently hard coded, but could be an input variable later. The values are held in LarvalFoodMonthlyK
The steps in the calculation are:
Definition at line 2822 of file elements.cpp.
References cfg_PondLarvalFoodBiomassConst, cfg_PondLarvalFoodR, g_date, Calendar::GetMonth(), LE::m_area, m_LarvalFood, m_LarvalFoodScaler, m_pondquality, and CfgFloat::value().
Referenced by DoDevelopment().
void Pond::CalcPondPesticide | ( | ) |
Calculates the amount of pesticide per unit pond water
The pesticide is calculated based on the mean concentration per m2 which is then multiplied by a factor representing run-off from the surroundings or other movements of pesticides through soil into the pond. This method assumes a uniform depth of water, which is then ignored (so can be seen as being part of the run-off factor). The pesticide concentration is calculated each day. These calculations are heavy on CPU time because of the need to search the landscape map for pond 1m2 and sum pesticide. So this has to be set to run by flagging using cfg_calc_pond_pesticide
To create the sum of pesticide the map is searched from min x,y to max x,y coords, and pond cells are summed for their pesticide content. Then the mean found.
We assume a mean pond depth of 1 m, so pesticide per l = m_pondpesticide/1000 to get per litre then multiplied buy the run-off factor
Definition at line 2791 of file elements.cpp.
References cfg_calc_pond_pesticide, cfg_pondpesticiderunoff, g_landscape_p, LE::m_area, LE::m_maxx, LE::m_maxy, LE::m_minx, LE::m_miny, LE::m_poly, m_pondpesticide, ppp_1, Landscape::SupplyPesticide(), Landscape::SupplyPolyRef(), CfgFloat::value(), and CfgBool::value().
Referenced by DoDevelopment().
|
virtual |
DoDevelopment is needed due to special development for this element type, i.e. larval food calculations for newts.
Definition at line 2783 of file elements.cpp.
References CalcLarvalFood(), CalcPondPesticide(), and m_MaleNewtPresent.
|
inlinevirtual |
Gets whether there is a male newt as present.
Reimplemented from LE.
Definition at line 1212 of file elements.h.
References m_MaleNewtPresent.
|
inlinevirtual |
Sets a male as present/absent.
Reimplemented from LE.
Definition at line 1210 of file elements.h.
References m_MaleNewtPresent.
bool Pond::SubtractLarvalFood | ( | double | a_food | ) |
Called by a larva when feeding, removes an age specific amount of larval food
If the total amount of food is low then there is a probability test to determine if food can be found. If failed the return code false means no food was removed. If passed then this removes the amount of food passed in a_food and return true.
Definition at line 2849 of file elements.cpp.
References m_LarvalFood.
|
inline |
supply the current pesticide concentration per litre
Definition at line 1208 of file elements.h.
References m_pondpesticide.
|
protected |
The amount of larval food present
Definition at line 1186 of file elements.h.
Referenced by CalcLarvalFood(), Pond(), and SubtractLarvalFood().
|
protected |
The proportion of larval food per m2
Definition at line 1188 of file elements.h.
Referenced by CalcLarvalFood().
|
protected |
Flag for presence of a male newt.
Definition at line 1192 of file elements.h.
Referenced by DoDevelopment(), IsMaleNewtPresent(), Pond(), and SetMaleNewtPresent().
|
protected |
Holds the pesticide content per unit pond water.
Definition at line 1190 of file elements.h.
Referenced by CalcPondPesticide(), and SupplyPondPesticide().
|
protected |
a factor used to alter the pond qualities (default behaviour is random 0.0-1.0)
Definition at line 1194 of file elements.h.
Referenced by CalcLarvalFood(), and Pond().