ALMaSS Rabbit ODdox
1.00
The rabbit model description following ODdox protocol
|
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 | |
Pond (void) | |
virtual void | DoDevelopment (void) |
void | CalcPondPesticide () |
Calculates the amount of pesticide per unit pond water. More... | |
void | CalcLarvalFood () |
Calculates the amount of larval food present. 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... | |
virtual void | SetMaleNewtPresent (bool a_ispresent) |
Sets a male as present/absent. More... | |
bool | IsMaleNewtPresent () |
Gets whether there is a male newt as present. More... | |
Public Member Functions inherited from Freshwater | |
Freshwater (void) | |
Public Member Functions inherited from NonVegElement | |
NonVegElement (void) | |
Public Member Functions inherited from LE | |
LE (void) | |
virtual | ~LE (void) |
LE_Signal | GetSignal (void) |
void | SetSignal (LE_Signal a_signal) |
int | GetSubType (void) |
void | SetSubType (int a_subtype) |
int | GetALMaSSEleType (void) |
void | SetALMaSSEleType (int a_type) |
virtual TTypesOfLandscapeElement | GetElementType (void) |
void | SetElementType (int a_type) |
void | Trace (int a_value) |
void | ResetTrace (void) |
long | GetRunNum (void) |
void | BumpRunNum (void) |
long | GetMgtLoopDetectDate (void) |
void | SetMgtLoopDetectDate (long a_num) |
long | GetMgtLoopDetectCount (void) |
void | SetMgtLoopDetectCount (long a_num) |
void | Tick (void) |
virtual TTypesOfVegetation | GetVegType (void) |
int | GetVegStore (void) |
void | SetVegStore (int a_veg) |
void | ZeroVegAge () |
int | GetVegAge () |
virtual void | RecalculateBugsNStuff (void) |
virtual int | GetVegPhase (void) |
virtual double | GetVegCover (void) |
virtual double | GetVegHeight (void) |
virtual APoint | GetCentroid () |
virtual int | GetCentroidX () |
virtual int | GetCentroidY () |
virtual void | SetCentroid (int x, int y) |
virtual double | GetDigestability (void) |
virtual int | GetVegDensity (void) |
virtual bool | GetSkScrapes (void) |
virtual bool | IsMatureCereal () |
virtual bool | IsCereal () |
virtual bool | IsGrass () |
virtual bool | GetVegPatchy (void) |
virtual void | SetVegPatchy (bool) |
virtual double | GetDayDegrees (void) |
virtual double | GetLAGreen (void) |
virtual double | GetLATotal (void) |
virtual double | GetGreenBiomass (void) |
virtual double | GetDeadBiomass (void) |
virtual double | GetVegBiomass (void) |
virtual double | GetWeedBiomass (void) |
virtual double | GetInsectPop (void) |
virtual void | SetInsectPop (double) |
virtual void | Insecticide (double) |
virtual void | InsectMortality (double) |
virtual void | ReduceWeedBiomass (double) |
virtual void | ToggleCattleGrazing (void) |
virtual void | TogglePigGrazing (void) |
virtual void | SetVegBiomass (int) |
virtual void | SetVegType (TTypesOfVegetation, TTypesOfVegetation) |
virtual void | SetVegHeight (double) |
virtual void | SetVegParameters (double, double, double, double) |
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 | StoreLAItotal () |
virtual void | SetGrowthPhase (int) |
virtual void | ForceGrowthInitialize (void) |
virtual void | ForceGrowthTest (void) |
virtual void | ForceGrowthDevelopment (void) |
virtual void | ZeroVeg (void) |
virtual void | ReduceVeg (double) |
virtual void | ReduceVeg_Extended (double) |
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) |
Farm * | GetOwner (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) |
virtual void | GrazeVegetation (double, bool) |
virtual void | GrazeVegetationTotal (double) |
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) |
LE * | GetBorder (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) |
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 | 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... | |
void | SetOpenness (int a_openness) |
Records the openness statistic for this polygon. More... | |
virtual void | ResetDigestability () |
sets growth record to zero in descendent classes More... | |
void | DoCopy (const LE *a_Le) |
a copy function to be used because a copy constuctor won't work More... | |
Protected Attributes | |
double | m_LarvalFood |
The amount of larval food present. More... | |
double | m_LarvalFoodScaler |
The proportion of larval food per m2. More... | |
double | m_pondpesticide |
Holds the pesticide content per unit pond water. More... | |
bool | m_MaleNewtPresent |
Flag for presence of a male newt. More... | |
Protected Attributes inherited from LE | |
long | m_running |
LE * | m_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 |
Farm * | m_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 |
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... | |
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. 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... | |
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 |
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... | |
long | m_user [EL_MAX_USERSPACE] |
Variable used to record the current grazing pressure by e.g. voles. More... | |
bool | m_repeat_start |
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 [] |
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 1082 of file elements.h.
Pond::Pond | ( | void | ) |
Definition at line 2377 of file elements.cpp.
References LE_TypeClass::BackTranslateEleTypes(), m_LarvalFood, m_MaleNewtPresent, LE::m_type, LE::SetALMaSSEleType(), and tole_Pond.
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 2423 of file elements.cpp.
References cfg_PondLarvalFoodBiomassConst, cfg_PondLarvalFoodR, g_date, Calendar::GetMonth(), LE::m_area, m_LarvalFood, m_LarvalFoodScaler, 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 2392 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, 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.
Reimplemented from LE.
Definition at line 2384 of file elements.cpp.
References CalcLarvalFood(), CalcPondPesticide(), LE::DoDevelopment(), and m_MaleNewtPresent.
|
inlinevirtual |
Gets whether there is a male newt as present.
Reimplemented from LE.
Definition at line 1109 of file elements.h.
|
inlinevirtual |
Sets a male as present/absent.
Reimplemented from LE.
Definition at line 1107 of file elements.h.
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 2449 of file elements.cpp.
References g_rand_uni, m_LarvalFood, and m_LarvalFoodScaler.
|
inline |
supply the current pesticide concentration per litre
Definition at line 1105 of file elements.h.
|
protected |
The amount of larval food present.
Definition at line 1085 of file elements.h.
Referenced by CalcLarvalFood(), Pond(), and SubtractLarvalFood().
|
protected |
The proportion of larval food per m2.
Definition at line 1087 of file elements.h.
Referenced by CalcLarvalFood(), and SubtractLarvalFood().
|
protected |
Flag for presence of a male newt.
Definition at line 1091 of file elements.h.
Referenced by DoDevelopment(), and Pond().
|
protected |
Holds the pesticide content per unit pond water.
Definition at line 1089 of file elements.h.
Referenced by CalcPondPesticide().