ALMaSS Rabbit ODdox
1.00
The rabbit model description following ODdox protocol
|
The landscape class containing all environmental and topographical data. More...
#include <landscape.h>
Public Member Functions | |
void | FillVegAreaData () |
double | GetVegArea (int v) |
void | DumpVegAreaData (int a_day) |
void | SkylarkEvaluation (SkTerritories *a_skt) |
void | RodenticidePredatorsEvaluation (RodenticidePredators_Population_Manager *a_rppm) |
Population_Manager * | SupplyThePopManager () |
Get the pointer to the current main population manager. More... | |
void | SetThePopManager (Population_Manager *a_ptr) |
Set the pointer to the current main population manager. More... | |
int | SupplyFarmAnimalCensus (int a_farm_ref, int a_LifeStage) |
int | SupplyVegPhase (int a_poly) |
~Landscape (void) | |
Landscape (const char *a_configfile, const char *a_errorfile) | |
void | SimulationClosingActions () |
void | Tick (void) |
void | TurnTheWorld (void) |
int | HowManyPonds () |
Returns the number of ponds in the landscape. More... | |
int | SupplyRandomPondIndex () |
Returns random pond index. More... | |
int | SupplyRandomPondRef () |
Returns random pond polyref. More... | |
int | SupplyPondIndex (int a_pondref) |
Returns the index of a pond based on pondref or -1 if not found. More... | |
void | SetMaleNewtPresent (int a_InPondIndex) |
Sets a male as being present in a pond. More... | |
bool | SupplyMaleNewtPresent (int a_InPondIndex) |
Determines if a male is present in a pond. More... | |
Farm * | SupplyFarmPtr (int a_owner) |
FarmManager * | SupplyFarmManagerPtr () |
int | SupplyLargestPolyNumUsed () |
bool | SupplyShouldSpray () |
double | SupplyVegDigestabilityVector (unsigned int a_index) |
double | SupplyVegDigestability (int a_polyref) |
double | SupplyVegDigestability (int a_x, int a_y) |
double | SupplyVegHeightVector (unsigned int a_index) |
double | SupplyVegHeight (int a_polyref) |
double | SupplyVegHeight (int a_x, int a_y) |
double | SupplyVegBiomassVector (unsigned int a_index) |
double | SupplyVegBiomass (int a_polyref) |
double | SupplyVegBiomass (int a_x, int a_y) |
int | SupplyVegDensity (int a_polyref) |
int | SupplyVegDensity (int a_x, int a_y) |
double | SupplyWeedBiomass (int a_polyref) |
double | SupplyWeedBiomass (int a_x, int a_y) |
bool | SupplySkScrapes (int a_polyref) |
bool | SupplyVegPatchy (int a_polyref) |
bool | SupplyVegPatchy (int a_x, int a_y) |
double | SupplyGreenBiomass (int a_polyref) |
double | SupplyGreenBiomass (int a_x, int a_y) |
double | SupplyDeadBiomass (int a_polyref) |
double | SupplyDeadBiomass (int a_x, int a_y) |
double | SupplyLAGreen (int a_polyref) |
double | SupplyLAGreen (int a_x, int a_y) |
double | SupplyLATotal (int a_x, int a_y) |
double | SupplyVegCover (int a_polyref) |
double | SupplyVegCoverVector (unsigned int a_index) |
double | SupplyVegCover (int a_x, int a_y) |
TTypesOfVegetation | SupplyLastSownVeg (int a_polyref) |
TTypesOfVegetation | SupplyLastSownVeg (int a_x, int a_y) |
TTypesOfVegetation | SupplyLastSownVegVector (unsigned int a_index) |
double | SupplyInsects (int a_polyref) |
double | SupplyInsects (int a_x, int a_y) |
bool | SubtractPondLarvalFood (double a_food, int a_polyrefindex) |
Removes larval food from a pond and returns true if it was possible, otherwise false. More... | |
double | SupplyRodenticide (int a_x, int a_y) |
Gets total rodenticide for a location. More... | |
bool | SupplyPesticideDecay () |
Returns true if there is any pesticide in the system at all at this point. More... | |
double | SupplyPesticide (int a_x, int a_y) |
Gets total pesticide for a location. More... | |
bool | SupplyOverspray (int a_x, int a_y) |
Gets the overspray flag. More... | |
double | SupplyPesticideP (int a_x, int a_y) |
Gets plant pesticide for a location. More... | |
double | SupplyPesticideS (int a_x, int a_y) |
Gets soil pesticide for a location. More... | |
double | SupplyPesticide (int a_polyref) |
Gets total pesticide for the centroid of a polygon. More... | |
double | SupplyPesticideP (int a_polyref) |
Gets plant pesticide for the centroid of a polygon. More... | |
double | SupplyPesticideS (int a_polyref) |
Gets soil pesticide for the centroid of a polygon. More... | |
RodenticidePredators_Population_Manager * | SupplyRodenticidePredatoryManager () |
TTypesOfPesticide | SupplyPesticideType (void) |
GooseFieldList * | GetGooseFields (double) |
Gets the list of suitable goose foraging fields today. More... | |
void | CalculateOpenness (bool a_realcalc) |
Causes openness to be calulated and stored for all polygons. More... | |
void | WriteOpenness (void) |
Stores openness for all polygons to a standard file. More... | |
void | ReadOpenness (void) |
Reads openness values from a standard input file for all polygons. More... | |
int | CalulateFieldOpennessCentroid (int a_pref) |
Provides a measure of the shortest distance in 360 degree, e-g- looking NE % SW before tall obstacles are encountered at both ends. Searches from centroid. More... | |
int | CalulateFieldOpennessAllCells (int a_pref) |
Provides a measure of the shortest distance in 360 degree, e-g- looking NE % SW before tall obstacles are encountered at both ends. Checks all field 1m2. More... | |
int | LineHighTest (int a_cx, int a_cy, double a_offsetx, double a_offsety) |
Provides a measure of the shortest distance in using a vector from a_cx,a_cy unitl tall obstacles are encountered in both +ve & -ve directions. More... | |
int | SupplyOpenness (int a_poly) |
Get openness for a polygon. More... | |
int | SupplyOpenness (int a_x, int a_y) |
Get openness for a location. More... | |
bool | SupplyLEHigh (int a_x, int a_y) |
Tests whether the polygon at a_x,a_y is designated as high. More... | |
polylist * | SupplyLargeOpenFieldsNearXY (int x, int y, int range, int a_openness) |
Returns a pointer to a list of polygonrefs to large open fields within a range of location x,y. More... | |
int | SupplySoilType (int a_x, int a_y) |
Returns the soil type in ALMaSS types reference numbers. More... | |
int | SupplySoilTypeR (int a_x, int a_y) |
Returns the soil type in rabbit warren reference numbers. More... | |
APoint | SupplyCentroid (int a_polyref) |
APoint | SupplyCentroidIndex (int a_polyrefindex) |
int | SupplyCentroidX (int a_polyref) |
int | SupplyCentroidY (int a_polyref) |
int | SupplyCentroidX (int a_x, int a_y) |
int | SupplyCentroidY (int a_x, int a_y) |
int | SupplyFarmIntensity (int a_x, int a_y) |
int | SupplyFarmIntensity (int a_polyref) |
int | SupplyFarmIntensityI (int a_polyindex) |
TTypesOfLandscapeElement | SupplyElementType (int a_polyref) |
TTypesOfLandscapeElement | SupplyElementType (int a_x, int a_y) |
TTypesOfLandscapeElement | SupplyElementTypeCC (int a_x, int a_y) |
int | SupplyCountryDesig (int a_x, int a_y) |
int | SupplyElementSubType (int a_polyref) |
int | SupplyElementSubType (int a_x, int a_y) |
TTypesOfVegetation | SupplyVegType (int a_x, int a_y) |
TTypesOfVegetation | SupplyVegType (int polyref) |
TTypesOfVegetation | SupplyVegTypeVector (unsigned int a_index) |
int | SupplyGrazingPressureVector (unsigned int a_index) |
int | SupplyGrazingPressure (int a_polyref) |
int | SupplyGrazingPressure (int a_x, int a_y) |
bool | SupplyIsCereal (int a_polyref) |
bool | SupplyIsMatureCereal (int a_polyref) |
bool | SupplyIsGrass (int a_polyref) |
bool | SupplyHasTramlines (int a_x, int a_y) |
bool | SupplyHasTramlines (int a_polyref) |
bool | SupplyJustMownVector (unsigned int a_index) |
bool | SupplyJustMown (int a_polyref) |
int | SupplyJustSprayedVector (unsigned int a_index) |
int | SupplyJustSprayed (int a_polyref) |
int | SupplyJustSprayed (int a_x, int a_y) |
int | SupplyTreeAge (int a_Polyref) |
int | SupplyTreeAge (int, int) |
int | SupplyVegAge (int a_Polyref) |
int | SupplyVegAge (int a_x, int a_y) |
int | SupplyNumberOfFarms () |
int | SupplyFarmOwner (int a_x, int a_y) |
int | SupplyFarmOwner (int a_polyref) |
int | SupplyFarmOwnerIndex (int a_x, int a_y) |
int | SupplyFarmOwnerIndex (int a_polyref) |
TTypesOfFarm | SupplyFarmType (int a_polyref) |
TTypesOfFarm | SupplyFarmType (int a_x, int a_y) |
TTypesOfOptFarms | SupplyOptFarmType (int a_x, int a_y) |
int | SupplyFarmArea (int a_polyref) |
double | SupplyPolygonAreaVector (int a_polyref) |
Returns the area of a polygon using the vector index as a reference. More... | |
double | SupplyPolygonArea (int a_polyref) |
void | SetBirdSeedForage (int a_polyref, double a_fooddensity) |
Sets the grain forage resource as seen from a goose standpoint at a polygon. More... | |
void | SetBirdMaizeForage (int a_polyref, double a_fooddensity) |
Sets the maize forage resource as seen from a goose standpoint at a polygon. More... | |
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 only. More... | |
double | SupplyGooseGrazingForageH (int a_polygon, GooseSpecies a_goose) |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by number based on height only. More... | |
double | GetActualGooseGrazingForage (int a_x, int a_y, GooseSpecies a_goose) |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by x,y location. More... | |
double | GetActualGooseGrazingForage (int a_polygon, GooseSpecies a_goose) |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by x,y location The amount of food avaiable as grazing resource based on the vegetation height is species specific. More... | |
double | SupplyBirdSeedForage (int a_polyref) |
Returns the grain forage resource. More... | |
double | SupplyBirdSeedForage (int a_x, int a_y) |
Returns the grain forage resource as seen from a goose standpoint at an x,y location. More... | |
double | SupplyBirdMaizeForage (int a_polyref) |
Returns the maize forage resource. More... | |
double | SupplyBirdMaizeForage (int a_x, int a_y) |
Returns the maize forage resource as seen from a goose standpoint at an x,y location. More... | |
void | RecordGooseNumbers (int a_poly, int a_number) |
This records the number of geese on the polygon the day before. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers() More... | |
void | RecordGooseSpNumbers (int a_poly, int a_number, GooseSpecies a_goose) |
This records the number of geese of each species on the polygon the day before. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers() More... | |
void | RecordGooseNumbersTimed (int a_poly, int a_number) |
This records the number of geese on the polygon the day before at a predefined time. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers() More... | |
void | RecordGooseSpNumbersTimed (int a_poly, int a_number, GooseSpecies a_goose) |
This records the number of geese of each species on the polygon the day before at a predefined time. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers() More... | |
void | GrazeVegetation (int a_poly, double a_forage) |
Removes grazing forage from a poly per m2. More... | |
void | GrazeVegetationTotal (int a_poly, double a_forage) |
Removes grazing forage from a poly and divides this out per m2. More... | |
int | GetGooseNumbers (int a_poly) |
This returns the number of geese on the polygon the day before. More... | |
int | GetGooseNumbers (int a_x, int a_y) |
This returns the number of geese on the polygon specifed by a_x, a_y the day before. More... | |
int | SupplyLastTreatment (int a_polyref, int *a_index) |
int | SupplyLastTreatment (int a_x, int a_y, int *a_index) |
double | GetHareFoodQuality (int a_polygon) |
double | SupplyGlobalRadiation () |
double | SupplyGlobalRadiation (long a_date) |
double | SupplyRain (void) |
double | SupplyTemp (void) |
double | SupplyHumidity (void) |
double | SupplyMeanTemp (long a_date, unsigned int a_period) |
double | SupplyWind (void) |
int | SupplyWindDirection (void) |
double | SupplySnowDepth (void) |
bool | SupplySnowcover (void) |
int | SupplyDaylength (void) |
double | SupplyRain (long a_date) |
double | SupplyTemp (long a_date) |
double | SupplyWind (long a_date) |
double | SupplyDayDegrees (int a_polyref) |
double | SupplyRainPeriod (long a_date, int a_period) |
double | SupplyWindPeriod (long a_date, int a_period) |
double | SupplyTempPeriod (long a_date, int a_period) |
bool | SupplySnowcover (long a_date) |
bool | IsFieldType (TTypesOfLandscapeElement a_tole) |
int | SupplyPolyRef (int a_x, int a_y) |
int | SupplyPolyRefIndex (int a_x, int a_y) |
int | SupplyPolyRefCC (int a_x, int a_y) |
int | SupplySimAreaWidth (void) |
int | SupplySimAreaHeight (void) |
int | SupplySimAreaMaxExtent (void) |
int | SupplySimAreaMinExtent (void) |
int | SupplyDaylength (long a_date) |
int | SupplyDayInYear (void) |
int | SupplyHour (void) |
Get the hour of the day. More... | |
int | SupplyMinute (void) |
Get the minute of the hour. More... | |
unsigned int | SupplyNumberOfPolygons (void) |
TTypesOfLandscapeElement | SupplyElementTypeFromVector (unsigned int a_index) |
int | SupplyPolyRefVector (unsigned int a_index) |
int | SupplyPesticideCell (int a_polyref) |
int | SupplyValidX (int a_polyref) |
int | SupplyValidY (int a_polyref) |
double | SupplyPondPesticide (int a_poly_index) |
Get the pesticide concentration per liter from a pond (must be a pond index on calling) More... | |
void | CorrectCoords (int &x, int &y) |
Function to prevent wrap around errors with co-ordinates using x/y pair. More... | |
APoint | CorrectCoordsPt (int x, int y) |
Function to prevent wrap around errors with co-ordinates using x/y pair. More... | |
void | CorrectCoordsPointNoWrap (APoint &a_pt) |
Function to prevent wrap around errors with co-ordinates using a APoint. More... | |
int | CorrectWidth (int x) |
int | CorrectHeight (int y) |
void | SetPolyMaxMinExtents (void) |
void | CalculateCentroids (void) |
void | DumpCentroids (void) |
void | BuildingDesignationCalc () |
used to calculate whether a building is rural or town - for rodenticide use More... | |
void | CentroidSpiralOut (int a_polyref, int &a_x, int &a_y) |
void | CentroidSpiralOutBlocks (int a_polyref, int &a_x, int &a_y) |
const char * | SupplyVersion (void) |
void | DumpPublicSymbols (const char *a_dumpfile, CfgSecureLevel a_level) |
void | DumpAllSymbolsAndExit (const char *a_dumpfile) |
bool | ReadSymbols (const char *a_cfgfile) |
void | DumpMapInfoByArea (const char *a_filename, bool a_append, bool a_dump_zero_areas, bool a_write_veg_names) |
void | Warn (std::string a_msg1, std::string a_msg2) |
int * | SupplyMagicMapP (int a_x, int a_y) |
int | MagicMapP2PolyRef (int a_magic) |
int | SupplyRoadWidth (int, int) |
double | SupplyTrafficLoad (int a_x, int a_y) |
double | SupplyTrafficLoad (int a_polyref) |
int | SupplyTreeHeight (int, int) |
int | SupplyUnderGrowthWidth (int, int) |
int | SupplyTreeHeight (int) |
int | SupplyUnderGrowthWidth (int) |
long | SupplyGlobalDate (void) |
int | SupplyYear (void) |
int | SupplyYearNumber (void) |
int | SupplyMonth (void) |
int | SupplyDayInMonth (void) |
double | SupplyDaylightProp () |
double | SupplyNightProp () |
void | SupplyLEReset (void) |
int | SupplyLENext (void) |
int | SupplyLECount (void) |
LE_Signal | SupplyLESignal (int a_polyref) |
void | SetLESignal (int a_polyref, LE_Signal a_signal) |
void | IncTreatCounter (int a_treat) |
TTypesOfLandscapeElement | TranslateEleTypes (int EleReference) |
TTypesOfVegetation | TranslateVegTypes (int VegReference) |
LE * | SupplyLEPointer (int a_polyref) |
int | BackTranslateEleTypes (TTypesOfLandscapeElement EleReference) |
int | BackTranslateVegTypes (TTypesOfVegetation VegReference) |
std::string | EventtypeToString (int a_event) |
std::string | PolytypeToString (TTypesOfLandscapeElement a_le_type) |
std::string | VegtypeToString (TTypesOfVegetation a_veg) |
Protected Member Functions | |
void | GISASCII_Output (string outpfile, int UTMX, int UTMY) |
Write ASCII file of the ALMaSS map. More... | |
void | AddGreenElement (LE *a_green) |
void | ReadPolys (const char *a_polyfile) |
void | ReadPolys2 (const char *a_polyfile) |
reads in polygon information. Version 2 including centroid and openness information More... | |
void | PolysValidate (bool a_exit_on_invalid) |
void | PolysRemoveInvalid (void) |
void | PolysDump (const char *a_filename) |
void | DumpMap (const char *a_filename) |
void | ConsolidatePolys (void) |
void | CountMapSquares (void) |
void | PolysRenumber (void) |
void | RebuildPolyMapping () |
void | ForceArea (void) |
void | ChangeMapMapping (void) |
LE * | NewElement (TTypesOfLandscapeElement a_type) |
void | RemoveMissingValues () |
A method for replacing missing values in the map with corrected ones - slow. More... | |
void | TestCropManagement (void) |
void | VegDump (int x, int y) |
void | EventDump (int x, int y, int x2, int y2) |
void | EventDumpPesticides (int x1, int y1) |
void | DegreesDump () |
Prints the sum of day degrees. See FarmManager::daydegrees. More... | |
bool | BorderNeed (TTypesOfLandscapeElement a_letype) |
void | BorderAdd (LE *a_field, TTypesOfLandscapeElement a_type) |
void | BorderRemoval (void) |
int | RemoveSmallPolygons (void) |
Removes small polygons from the map. More... | |
void | CreatePondList () |
Creates a list of pond polygon refs/indexes for easy look up. More... | |
void | UnsprayedMarginAdd (LE *a_field) |
void | UnsprayedMarginScan (LE *a_field, int a_width) |
void | BorderScan (LE *a_field, int a_width) |
bool | BorderTest (int a_fieldpoly, int a_borderpoly, int a_x, int a_y) |
bool | StepOneValid (int a_polyindex, int a_x, int a_y, int step) |
bool | UMarginTest (int a_fieldpoly, int a_borderpoly, int a_x, int a_y, int a_width) |
bool | FindValidXY (int a_field, int &a_x, int &a_y) |
bool | BorderStep (int a_fieldpoly, int a_borderpoly, int *a_x, int *a_y) |
bool | BorderStep (int a_fieldpoly, int a_borderpoly, APoint *a_coord) |
void | AddBeetleBanks (TTypesOfLandscapeElement a_tole) |
bool | BeetleBankPossible (LE *a_field, TTypesOfLandscapeElement a_tole) |
void | BeetleBankAdd (int x, int y, int angle, int length, LE *a_field, TTypesOfLandscapeElement a_tole) |
bool | FindFieldCenter (LE *a_field, int *x, int *y) |
int | FindLongestAxis (int *x, int *y, int *a_length) |
void | AxisLoop (int a_poly, int *a_x, int *a_y, int a_axis) |
void | AxisLoop (int a_poly, APoint *a_cor, int a_axis) |
void | AxisLoopLtd (int a_poly, APoint *a_cor, int a_axis, int a_limit) |
void | hb_Add (void) |
void | hb_AddNewHedgebanks (int a_orig_poly_num) |
int | hb_StripingDist (void) |
void | hb_GenerateHBPolys (void) |
void | hb_FindHedges (void) |
bool | hb_FindBoundingBox (int a_poly_num) |
void | hb_UpPolyNumbers (void) |
void | hb_ClearPolygon (int a_poly_num) |
void | hb_PaintBorder (int a_color) |
bool | hb_MapBorder (int a_x, int a_y) |
bool | hb_HasOtherNeighbour (int a_x, int a_y) |
bool | hb_PaintWhoHasNeighbourColor (int a_neighbour_color, int a_new_color) |
bool | hb_HasNeighbourColor (int a_x, int a_y, int a_neighbour_color) |
void | hb_MarkTopFromLocalMax (int a_color) |
void | hb_MarkTheBresenhamWay (void) |
int | hb_MaxUnpaintedNegNeighbour (int a_x, int a_y) |
void | hb_ResetColorBits (void) |
void | hb_RestoreHedgeCore (int a_orig_poly_number) |
void | hb_DownPolyNumbers (void) |
void | hb_Cleanup (void) |
void | DumpMapGraphics (const char *a_filename) |
void | DumpTreatCounters (const char *a_filename) |
bool | CIPELandscapeMaker () |
void | MakeCluster (void) |
Reset all polygons natural grazing level to zero. More... | |
void | ReadInput (int *, int *, int *, APoint *) |
APoint | RandomLocation (void) |
APoint | GetNextSeed (int) |
int | AddToClusterList (int *, int *, int *, int *, int *) |
void | ModifyPolyRef (int *) |
Protected Attributes | |
int | m_treatment_counts [last_treatment] |
int | m_LargestPolyNumUsed |
vector< int > | m_PondIndexList |
List of pond indexes. More... | |
vector< int > | m_PondRefsList |
List of pond polyrefs. More... | |
vector< int > | hb_hedges |
vector< LE * > | hb_new_hbs |
int | m_x_add [8] |
int | m_y_add [8] |
int * | hb_map |
int | hb_width |
int | hb_height |
int | hb_size |
int | hb_min_x |
int | hb_max_x |
int | hb_min_y |
int | hb_max_y |
int | hb_first_free_poly_num |
int | hb_core_pixels |
int | hb_border_pixels |
TTypesOfPesticide | m_PesticideType |
An attribute to hold the pesticide type being tested, if there is one, if not default is -1. More... | |
bool | m_toxShouldSpray |
int | le_signal_index |
Private Attributes | |
char | m_versioninfo [30] |
FarmManager * | m_FarmManager |
List of all the farms. More... | |
vector< LE * > | m_elems |
List of all landscape elements. The index is a sequential number, to get the polynum look this number up in m_polymapping. More... | |
RasterMap * | m_land |
The big map. More... | |
int | m_width |
int | m_height |
int | m_width10 |
int | m_height10 |
int | m_maxextent |
bool | m_NeedCentroidCalculation |
a flag to ensure centroid calculation on object construction More... | |
bool | m_NeedOpennessCalculation |
a flag to ensure openness calculation on object construction More... | |
bool | m_DoMissingPolygonsManipulations |
double * | l_vegtype_areas |
Population_Manager * | m_ThePopManager |
a pointer to the current main population manager More... | |
RodenticideManager * | m_RodenticideManager |
RodenticidePredators_Population_Manager * | m_RodenticidePreds |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_PF |
Curve relatning goose intake rates in KJ/min to vegetation height. More... | |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_BG |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_GL |
The landscape class containing all environmental and topographical data.
Definition at line 109 of file landscape.h.
Landscape::~Landscape | ( | void | ) |
Definition at line 1255 of file Landscape.cpp.
References cfg_rodenticide_enable, g_crops, g_date, g_letype, g_msg, g_pest, g_weather, l_map_dump_treatcounts_enable, l_map_dump_treatcounts_file, CfgBool::value(), and CfgStr::value().
Landscape::Landscape | ( | const char * | a_configfile, |
const char * | a_errorfile | ||
) |
If the farmer decision making model is on, the FarmManager::InitFarms() is called here to initialise the farms. The FarmManager::FindNeighbours() function is called.
Next job after checking the basic map validity is to deal with any missing polygon information This is done by identifying the polygons that are large contiguous areas and making them wasteland. The rest are left and nibbled away to join adjacent polygons. This is a time consuming operation so is only done if there have been any missing info polygons found.
To be sure we have enough space to do map manipulations if required, then the polygons need to be renumbered - unless they are done already.
Rodenticide handling code. If enabled then rodenticide mapping provides access to predicted relative density of poisoned rodents per unit area.
Definition at line 677 of file Landscape.cpp.
References cfg_AddBeetleBanks, cfg_BeetleBankType, cfg_dumpvegjan, cfg_dumpvegjanfile, cfg_dumpvegjune, cfg_dumpvegjunefile, cfg_HedgeSubtypeMaximum, cfg_HedgeSubtypeMinimum, cfg_MaxPondSize, cfg_pesticidetesttype, cfg_rodenticide_enable, LE::DoCopy(), g_cfg, g_crops, g_date, g_letype, g_map_le_border_chance, g_map_le_borderremoval, g_map_le_borders, g_map_le_borders_min_field_size, g_map_le_borderstype, g_map_le_borderwidth, g_map_le_unsprayedmargins, g_map_orchards_borders, g_msg, g_pest, g_weather, l_map_art_hedgebanks, l_map_ascii_utm_x, l_map_ascii_utm_y, l_map_calc_openness, l_map_consolidatepolys, l_map_cropcurves_file, l_map_dump_enable, l_map_dump_event_enable, l_map_dump_gfx_enable, l_map_dump_gfx_file, l_map_dump_map_file, l_map_dump_poly_file, l_map_dump_veg_enable, l_map_map_file, l_map_no_pesticide_fields, l_map_poly_file, l_map_print_version_info, l_map_removesmallpolygons, l_map_weather_file, l_map_write_ascii, last_treatment, RasterMap::MapWidth(), Configurator::ReadSymbols(), Calendar::Reset(), LE::SetALMaSSEleType(), LE::SetArea(), LE::SetCentroid(), LE::SetElementType(), LE::SetOpenness(), LE::SetPoly(), LE::SetSoilType(), LE::SetUnsprayedMarginPolyRef(), MapErrorMsg::SetWarnLevel(), tole_Field, tole_Freshwater, tole_HedgeBank, tole_Hedges, tole_Missing, tole_Orchard, tole_Pond, tole_Wasteland, tov_Undefined, CfgInt::value(), CfgFloat::value(), CfgBool::value(), CfgStr::value(), MapErrorMsg::Warn(), WARN_ALL, WARN_BUG, and WARN_FILE.
|
protected |
Beetle-bank addition - tests whether we can add a bank to this field, and then decides where to put it an adds it.
For each element, if it is a field then assess whether should have a beetle bank. This will depend on whether it is in the region defined for adding the bank, and a probability. This code requires polygon centroids to be active, either calculated or via l_map_read_openness == true.
To provide for more flexibilty, a tole_type is passed, and beetlebanks may be created of this tole_type instead of tole_BeetleBank
Definition at line 2504 of file Landscape.cpp.
References cfg_BeetleBankChance, cfg_BeetleBankInvert, cfg_BeetleBankMaxX, cfg_BeetleBankMaxY, cfg_BeetleBankMinX, cfg_BeetleBankMinY, g_msg, tole_Field, CfgInt::value(), CfgBool::value(), MapErrorMsg::Warn(), and WARN_MSG.
|
protected |
|
protected |
|
protected |
Starting at a_x,a_y each location is tested along a vector given by m_x_add & m_y_add until we step outside the polygon. a_x & a_y are modified on return.
Definition at line 2719 of file Landscape.cpp.
|
protected |
Starting at a_x,a_y each location is tested along a vector given by m_x_add & m_y_add until we step outside the polygon. a_x & a_y are modified on return.
Definition at line 2679 of file Landscape.cpp.
|
protected |
Starting at a_x,a_y each location is tested along a vector given by m_x_add & m_y_add until we step outside the polygon. a_x & a_y are modified on return.
Definition at line 2698 of file Landscape.cpp.
|
inline |
Definition at line 1588 of file landscape.h.
References LE_TypeClass::BackTranslateEleTypes(), and g_letype.
|
inline |
Definition at line 1595 of file landscape.h.
References LE_TypeClass::BackTranslateVegTypes(), and g_letype.
|
protected |
Definition at line 2752 of file Landscape.cpp.
References LE::AddArea(), LE_TypeClass::BackTranslateEleTypes(), cfg_BeetleBankWidth, g_letype, LE::SetALMaSSEleType(), LE::SetArea(), LE::SetMapValid(), LE::SetPoly(), LE::SetValidXY(), LE::SetVegPatchy(), start, tole_BeetleBank, tole_MownGrass, tole_PermanentSetaside, and CfgInt::value().
|
protected |
Beetle bank placement rules are:
No bank if the total bank area is going to be >=5% of the field area
No bank if the field is < 1Ha
No bank if the breadth of the field is < 100m
Definition at line 2553 of file Landscape.cpp.
References cfg_BeetleBankMaxArea, cfg_BeetleBankWidth, LE::GetArea(), LE::GetCentroidX(), LE::GetCentroidY(), CfgInt::value(), and CfgFloat::value().
|
protected |
Definition at line 2129 of file Landscape.cpp.
References g_map_le_borderwidth, g_msg, LE::GetValidX(), LE::GetValidY(), LE::SetArea(), LE::SetBorder(), LE::SetPoly(), CfgInt::value(), MapErrorMsg::Warn(), and WARN_BUG.
|
protected |
Definition at line 4147 of file Landscape.cpp.
References g_msg, tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_Freshwater, tole_Garden, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_MixedForest, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_OrchardBand, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_Vildtager, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_BUG.
|
protected |
Definition at line 2053 of file Landscape.cpp.
References tole_Field, tole_FieldBoundary, tole_HedgeBank, and tole_Hedges.
|
protected |
Requires centroid calculation before calling this method. Centroids must be inside the polygon and valid.
Loop through this procedure the width of the margin times. Each time a dummy margin is added using polyref=-99 and all locations this is done are remembered. Then later all positions covered by -99 are replaced with the real polygon index.
Definition at line 2147 of file Landscape.cpp.
References LE::AddArea(), g_msg, LE::GetArea(), LE::GetBorder(), LE::GetCentroidX(), LE::GetCentroidY(), LE::GetPoly(), l_map_exit_on_zero_area, LE::SetMapValid(), CfgBool::value(), MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Definition at line 2260 of file Landscape.cpp.
|
protected |
Definition at line 2318 of file Landscape.cpp.
|
protected |
Definition at line 2233 of file Landscape.cpp.
void Landscape::BuildingDesignationCalc | ( | ) |
used to calculate whether a building is rural or town - for rodenticide use
Runs through all elements and identifies the ones where rodenticide bait may be placed. If it is a building then we count the number of buildings near to it and designate it town if there are more than cfg_mintownbuildingnumber.
Definition at line 3066 of file Landscape.cpp.
References cfg_mintownbuildingdistance, cfg_mintownbuildingnumber, tole_Building, tole_ConiferousForest, tole_DeciduousForest, tole_MixedForest, tole_YoungForest, and CfgInt::value().
void Landscape::CalculateCentroids | ( | void | ) |
Finds a location inside each polygon as a roughly calculated centre point. The point will be within the polygon. This also uses the stored Max/Min coordinates for each polygon that form a rectangle around it.
Definition at line 2821 of file Landscape.cpp.
void Landscape::CalculateOpenness | ( | bool | a_realcalc | ) |
Causes openness to be calulated and stored for all polygons.
First must calculate centroid. Runs through the list of elements and any that are marsh, field, or pasture will have an openness score calculated
Definition at line 302 of file Landscape.cpp.
References tole_Field, tole_Marsh, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, and tole_Scrub.
int Landscape::CalulateFieldOpennessAllCells | ( | int | a_pref | ) |
Provides a measure of the shortest distance in 360 degree, e-g- looking NE % SW before tall obstacles are encountered at both ends. Checks all field 1m2.
Starts with North West and moves round the points of the compass 180 degrees. For each point tested we want the minimum length found, but between points we are interested in the max
runs a line out and also in 180 degrees, two lines.
runs a line out and also in 180 degrees, two lines.
Definition at line 379 of file Landscape.cpp.
int Landscape::CalulateFieldOpennessCentroid | ( | int | a_pref | ) |
Provides a measure of the shortest distance in 360 degree, e-g- looking NE % SW before tall obstacles are encountered at both ends. Searches from centroid.
Starts with North West and moves round the points of the compass 180 degrees.
runs a line out and also in 180 degrees, two lines.
runs a line out and also in 180 degrees, two lines.
Definition at line 337 of file Landscape.cpp.
void Landscape::CentroidSpiralOut | ( | int | a_polyref, |
int & | a_x, | ||
int & | a_y | ||
) |
Definition at line 2853 of file Landscape.cpp.
References g_msg, and MapErrorMsg::Warn().
void Landscape::CentroidSpiralOutBlocks | ( | int | a_polyref, |
int & | a_x, | ||
int & | a_y | ||
) |
Definition at line 2900 of file Landscape.cpp.
|
protected |
Our map is an array of polygon indentifiers, where we really want to know the associated landscape element of a X-Y coordinate pair.
Changing this to m_elems[] indices will save us one redirection when inquiring information from the landscape, and only costs us the fixed translation step performed here at startup.
Definition at line 1944 of file Landscape.cpp.
References PEST_GRIDSIZE, and PEST_GRIDSIZE_POW2.
|
protected |
|
protected |
Runs through the map checking each cell for polygon type. If it is in our replace list then it re-written as the first instance of that polygon type encountered. All subsequent instances of that type are then deleted.
replaceList contains the types of all tole types with no behaviour that can be consolidated. This list needs to be kept up-to-date.
Definition at line 1175 of file Landscape.cpp.
References g_msg, tole_BareRock, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_Garden, tole_HeritageSite, tole_IndividualTree, tole_PlantNursery, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_Saltwater, tole_SandDune, tole_StoneWall, tole_UrbanNoVeg, MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
Function to prevent wrap around errors with co-ordinates using x/y pair.
m_width10 & m_height10 are used to avoid problems with co-ordinate values that are very large. Problems will only occur if coords passed are >10x the world width or height.
Definition at line 1461 of file landscape.h.
|
inline |
Function to prevent wrap around errors with co-ordinates using a APoint.
This just cuts off extremes of coordinate values so that the point stays in landscape. Can't use a modulus or we get wrap around, and in this case we don't want that
Definition at line 1481 of file landscape.h.
|
inline |
Function to prevent wrap around errors with co-ordinates using x/y pair.
m_width10 & m_height10 are used to avoid problems with co-ordinate values that are very large. Problems will only occur if coords passed are >10x the world width or height.
Definition at line 1470 of file landscape.h.
|
inline |
Definition at line 1499 of file landscape.h.
|
inline |
Definition at line 1493 of file landscape.h.
|
protected |
Definition at line 1854 of file Landscape.cpp.
|
protected |
Creates a list of pond polygon refs/indexes for easy look up.
Just creates an unordered list of polyref numbers and m_elems indices for all ponds. This is for easy look-up by e.g. newts
Definition at line 2375 of file Landscape.cpp.
References tole_Pond.
|
protected |
Prints the sum of day degrees. See FarmManager::daydegrees.
Definition at line 1498 of file Landscape.cpp.
|
inline |
Definition at line 734 of file landscape.h.
References Configurator::DumpAllSymbolsAndExit(), and g_cfg.
void Landscape::DumpCentroids | ( | void | ) |
Definition at line 3054 of file Landscape.cpp.
|
protected |
Definition at line 1217 of file Landscape.cpp.
|
protected |
Definition at line 3363 of file Landscape.cpp.
References g_msg, tole_Field, MapErrorMsg::Warn(), and WARN_FILE.
void Landscape::DumpMapInfoByArea | ( | const char * | a_filename, |
bool | a_append, | ||
bool | a_dump_zero_areas, | ||
bool | a_write_veg_names | ||
) |
Definition at line 3416 of file Landscape.cpp.
References Calendar::DayInYear(), g_date, g_msg, Calendar::OldDays(), tov_OFirstYearDanger, tov_Undefined, MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
Definition at line 730 of file landscape.h.
References Configurator::DumpPublicSymbols(), and g_cfg.
|
protected |
Definition at line 3350 of file Landscape.cpp.
References g_msg, last_treatment, start, MapErrorMsg::Warn(), and WARN_FILE.
void Landscape::DumpVegAreaData | ( | int | a_day | ) |
Definition at line 4295 of file Landscape.cpp.
References cfg_dumpvegjan, cfg_dumpvegjanfile, cfg_dumpvegjune, cfg_dumpvegjunefile, CfgBool::value(), and CfgStr::value().
|
protected |
Definition at line 1508 of file Landscape.cpp.
References g_msg, sleep_all_day, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Definition at line 1531 of file Landscape.cpp.
References fungicide_treat, g_msg, herbicide_treat, insecticide_treat, sleep_all_day, MapErrorMsg::Warn(), and WARN_FILE.
std::string Landscape::EventtypeToString | ( | int | a_event | ) |
Definition at line 3670 of file Landscape.cpp.
References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, burn_straw_stubble, cattle_out, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, fa_ammoniumsulphate, fa_greenmanure, fa_manure, fa_npk, fa_pk, fa_sludge, fa_slurry, flammebehandling, fp_greenmanure, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_npk, fp_npks, fp_pk, fp_sludge, fp_slurry, fungicide_treat, g_msg, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, herbicide_treat, hilling_up, insecticide_treat, molluscicide, mow, pigs_out, product_treat, row_cultivation, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, start, straw_chopping, strigling, strigling_sow, stubble_harrowing, swathing, syninsecticide_treat, trial_control, trial_insecticidetreat, trial_toxiccontrol, MapErrorMsg::Warn(), WARN_FILE, water, and winter_plough.
void Landscape::FillVegAreaData | ( | ) |
Definition at line 3405 of file Landscape.cpp.
References tov_Undefined.
|
protected |
Definition at line 2580 of file Landscape.cpp.
References LE::GetPoly().
|
protected |
Definition at line 2632 of file Landscape.cpp.
|
protected |
Definition at line 2469 of file Landscape.cpp.
|
protected |
Definition at line 1886 of file Landscape.cpp.
References g_msg, MapErrorMsg::Warn(), and WARN_BUG.
|
inline |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by x,y location.
a_x | [in] The x-coordinate in a polygon we are interested in (assumed grass or cereals). This needs to be checked before calling |
a_y | [in] The x-coordinate in a polygon we are interested in (assumed grass or cereals). This needs to be checked before calling |
a_goose | [in] Is the type of goose calling which is needed to determine how to assess the value of the current forage availability (ie its different for different types of geese) |
Definition at line 559 of file landscape.h.
References RasterMap::Get().
|
inline |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by x,y location The amount of food avaiable as grazing resource based on the vegetation height is species specific.
a_polygon | [in] The polygon refence number for the polygon we are interested in (assumed grass or cereals). This needs to be checked before calling |
a_goose | [in] Is the type of goose calling which is needed to determine how to assess the value of the current forage availability (ie its different for different types of geese) |
Definition at line 570 of file landscape.h.
References m_polymapping.
GooseFieldList * Landscape::GetGooseFields | ( | double | a_minopenness | ) |
Gets the list of suitable goose foraging fields today.
Here we need to go through all possible goose feeding locations to find out if they have any forage in them, and then create a list of those to return.
To make this efficient we need to have a list of fields.
First must calculate centroid. Runs through the list of elements and any that have an openness score bigger than our target are saved.
Definition at line 564 of file Landscape.cpp.
References GooseFieldListItem::digestability, GooseFieldListItem::geese, GooseFieldListItem::geesesp, GooseFieldListItem::geesespTimed, GooseFieldListItem::geeseTimed, GooseFieldListItem::grain, GooseFieldListItem::grass, GooseFieldListItem::lastsownveg, GooseFieldListItem::maize, GooseFieldListItem::openness, GooseFieldListItem::polyref, GooseFieldListItem::previouscrop, GooseFieldListItem::vegheight, GooseFieldListItem::vegphase, GooseFieldListItem::vegtype, and GooseFieldListItem::vegtypechr.
int Landscape::GetGooseNumbers | ( | int | a_poly | ) |
This returns the number of geese on the polygon the day before.
Definition at line 3154 of file Landscape.cpp.
int Landscape::GetGooseNumbers | ( | int | a_x, |
int | a_y | ||
) |
This returns the number of geese on the polygon specifed by a_x, a_y the day before.
This returns the number of geese on the polygon the day before.
Definition at line 3162 of file Landscape.cpp.
double Landscape::GetHareFoodQuality | ( | int | a_polygon | ) |
Definition at line 3168 of file Landscape.cpp.
References g_FarmIntensivenessH, tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_FishFarm, tole_Freshwater, tole_Garden, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_MixedForest, tole_Parkland, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideVerge, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UrbanNoVeg, tole_UrbanPark, tole_Vildtager, tole_Wasteland, tole_WindTurbine, tole_WoodlandMargin, and tole_WoodyEnergyCrop.
|
protected |
|
inline |
Definition at line 154 of file landscape.h.
|
protected |
Write ASCII file of the ALMaSS map.
Here we write a ASCII file of the current map. Useful when visualizing output from simulations. The function will output the entity that is defined in the config: l_map_ascii_map_entity. The default is polyref number (l_map_ascii_map_entity = 1).
[in] | outpfile | Name of the output file |
[in] | UTMX | Utm x-coordinate of the lower lefthand corner of the map |
[in] | UTMY | Utm y-coordinate of the lower lefthand corner of the map |
Definition at line 3271 of file Landscape.cpp.
References g_msg, l_map_ascii_map_entity, CfgInt::value(), MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
Removes grazing forage from a poly per m2.
Definition at line 623 of file landscape.h.
References m_polymapping.
|
inline |
Removes grazing forage from a poly and divides this out per m2.
Definition at line 629 of file landscape.h.
References m_polymapping.
|
protected |
Definition at line 56 of file hedgebanks.cpp.
References RasterMap::GetMagicP(), hb_AddNewHedgebanks(), hb_border_pixels, hb_ClearPolygon(), hb_core_pixels, hb_DownPolyNumbers(), hb_FindBoundingBox(), hb_FindHedges(), hb_hedges, hb_height, HB_MAGIC, hb_map, hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), hb_RestoreHedgeCore(), hb_size, hb_UpPolyNumbers(), hb_width, l_map_art_hb_core_thres, l_map_art_hb_width, m_elems, m_land, m_polymapping, RasterMap::MapHeight(), RasterMap::MapWidth(), PolytypeToString(), tole_FieldBoundary, and CfgFloat::value().
|
protected |
Definition at line 198 of file hedgebanks.cpp.
References hb_GenerateHBPolys(), HB_MAGIC, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, hb_StripingDist(), and hb_width.
Referenced by hb_Add().
|
protected |
|
protected |
Definition at line 413 of file hedgebanks.cpp.
References HB_MAGIC_COLOR, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
protected |
Definition at line 715 of file hedgebanks.cpp.
References HB_MAGIC, hb_map, hb_size, hb_width, m_elems, m_polymapping, SV_UINT32, SV_UINT8, and tole_Foobar.
Referenced by hb_Add().
|
protected |
|
protected |
Definition at line 276 of file hedgebanks.cpp.
References hb_hedges, m_elems, and tole_Hedges.
Referenced by hb_Add().
|
protected |
Definition at line 180 of file hedgebanks.cpp.
References hb_first_free_poly_num, hb_new_hbs, l_map_art_hb_nums, m_elems, m_polymapping, NewElement(), tole_HedgeBank, and CfgInt::value().
Referenced by hb_AddNewHedgebanks().
|
inlineprotected |
Definition at line 452 of file hedgebanks.cpp.
References hb_height, hb_map, and hb_width.
Referenced by hb_PaintWhoHasNeighbourColor().
|
inlineprotected |
Definition at line 339 of file hedgebanks.cpp.
References HB_MAGIC, hb_map, hb_MapBorder(), and hb_width.
Referenced by hb_PaintBorder().
|
inlineprotected |
Definition at line 325 of file hedgebanks.cpp.
References hb_height, and hb_width.
Referenced by hb_HasOtherNeighbour().
|
protected |
Definition at line 629 of file hedgebanks.cpp.
References HB_MAGIC, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, hb_width, l_map_art_hb_seg_len, l_map_art_hb_width, and CfgFloat::value().
Referenced by hb_Add().
|
protected |
Definition at line 679 of file hedgebanks.cpp.
References HB_MAGIC_PAINTER_BIT, hb_map, hb_max_x, hb_max_y, hb_MaxUnpaintedNegNeighbour(), hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
inlineprotected |
Definition at line 548 of file hedgebanks.cpp.
References hb_height, HB_MAGIC_PAINTER_BIT, hb_map, and hb_width.
Referenced by hb_MarkTopFromLocalMax().
|
protected |
Definition at line 429 of file hedgebanks.cpp.
References hb_border_pixels, hb_core_pixels, hb_HasOtherNeighbour(), HB_MAGIC_COLOR, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
protected |
Definition at line 526 of file hedgebanks.cpp.
References hb_HasNeighbourColor(), HB_MAGIC_COLOR, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
protected |
Definition at line 298 of file hedgebanks.cpp.
References HB_MAGIC_PAINTER_BIT, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
protected |
|
protected |
Definition at line 225 of file hedgebanks.cpp.
References LE::GetPoly(), hb_new_hbs, l_map_art_hb_nums, l_map_art_hb_tran_prob, and CfgInt::value().
Referenced by hb_AddNewHedgebanks().
|
protected |
|
inline |
Returns the number of ponds in the landscape.
Definition at line 315 of file landscape.h.
void Landscape::IncTreatCounter | ( | int | a_treat | ) |
Definition at line 3339 of file Landscape.cpp.
References g_msg, last_treatment, MapErrorMsg::Warn(), and WARN_BUG.
Referenced by LE::SetLastTreatment().
|
inline |
Definition at line 676 of file landscape.h.
References tole_Field, tole_Orchard, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PermPastureTussockyWet, tole_Vildtager, tole_WoodyEnergyCrop, and tole_YoungForest.
|
inline |
Provides a measure of the shortest distance in using a vector from a_cx,a_cy unitl tall obstacles are encountered in both +ve & -ve directions.
Will only stop when two consecutive squares return 'high'.
The criteria for threat or non-open are based on geese and include tall objects and roads
Definition at line 439 of file Landscape.cpp.
References tole_HedgeBank, tole_LargeRoad, and tole_SmallRoad.
|
inline |
Definition at line 1442 of file landscape.h.
|
protected |
Reset all polygons natural grazing level to zero.
Inc volegrazing at x,y Get volegrazing at x,y Calculate all vole grazing densities
|
protected |
|
protected |
Definition at line 3455 of file Landscape.cpp.
References g_msg, LE::SetALMaSSEleType(), LE::SetElementType(), tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Chameleon, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_Freshwater, tole_Garden, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_Missing, tole_MixedForest, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_OrchardBand, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_Vildtager, tole_Wasteland, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.
Referenced by hb_GenerateHBPolys().
|
protected |
Definition at line 1612 of file Landscape.cpp.
References g_msg, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
PolysValidate or ChangeMapMapping must be called after this method
Definition at line 1584 of file Landscape.cpp.
|
protected |
Definition at line 1871 of file Landscape.cpp.
References g_msg, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Definition at line 1557 of file Landscape.cpp.
References g_msg, MapErrorMsg::Warn(), and WARN_FILE.
std::string Landscape::PolytypeToString | ( | TTypesOfLandscapeElement | a_le_type | ) |
Definition at line 3801 of file Landscape.cpp.
References g_msg, tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_Foobar, tole_Freshwater, tole_Garden, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_MixedForest, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_OrchardBand, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnknownGrass, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_Vildtager, tole_Wasteland, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.
Referenced by hb_Add().
|
protected |
|
protected |
void Landscape::ReadOpenness | ( | void | ) |
Reads openness values from a standard input file for all polygons.
|
protected |
|
protected |
reads in polygon information. Version 2 including centroid and openness information
The polygon file consists of 9 columns:
As of December 2014 there is a header row of information to be skipped here
As of July 2013 we have the need to use really big maps, hence polygon reference numbers need to be kept within reasonable bounds. It is now a requirement that any polyref number is < twice the total number of polygons in the file.
This is a quick way to replace one type with another for some simulations, polygon type 150 therefore has some special uses
With the polygons renumbered, we can safely set the hb_first_free_poly_num to the number of polygons we have.
Definition at line 1701 of file Landscape.cpp.
References g_letype, g_map_le_border_chance, g_map_le_borders, g_map_le_unsprayedmargins, g_map_le_unsprayedmargins_chance, g_msg, LE::GetElementType(), l_map_chameleon_replace_num, LE::SetALMaSSEleType(), LE::SetArea(), LE::SetBorder(), LE::SetCentroid(), LE::SetOpenness(), LE::SetPoly(), LE::SetSoilType(), LE::SetUnsprayedMarginPolyRef(), tole_Field, tole_Missing, tole_Orchard, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PlantNursery, tole_Vildtager, tole_WoodyEnergyCrop, tole_YoungForest, LE_TypeClass::TranslateEleTypes(), CfgInt::value(), CfgBool::value(), MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
|
inlineprotected |
Definition at line 191 of file landscape.h.
References m_polymapping.
void Landscape::RecordGooseNumbers | ( | int | a_poly, |
int | a_number | ||
) |
This records the number of geese on the polygon the day before. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers()
This records the number of geese on the polygon the day before. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers()
Note that the record is the for the day before because this method is called by DoFirst, so there are no geese today
Definition at line 3106 of file Landscape.cpp.
void Landscape::RecordGooseNumbersTimed | ( | int | a_poly, |
int | a_number | ||
) |
This records the number of geese on the polygon the day before at a predefined time. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers()
This records the number of geese on the polygon the day before at a predefined time. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers()
Definition at line 3119 of file Landscape.cpp.
void Landscape::RecordGooseSpNumbers | ( | int | a_poly, |
int | a_number, | ||
GooseSpecies | a_goose | ||
) |
This records the number of geese of each species on the polygon the day before. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers()
This records the number of geese on the polygon the day before by species. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers()
Note that the record is the for the day before because this method is called by DoFirst, so there are no geese today
Definition at line 3130 of file Landscape.cpp.
void Landscape::RecordGooseSpNumbersTimed | ( | int | a_poly, |
int | a_number, | ||
GooseSpecies | a_goose | ||
) |
This records the number of geese of each species on the polygon the day before at a predefined time. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers()
This records the number of geese on the polygon the day before at a predefined time by species. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers()
Definition at line 3141 of file Landscape.cpp.
|
protected |
A method for replacing missing values in the map with corrected ones - slow.
Definition at line 1904 of file Landscape.cpp.
References tole_Missing.
|
protected |
Removes small polygons from the map.
The method removes small polygons from the map and joins them with polygons that are close too them - there different rules depending on the type of polygon we have. Some small polygons can be legal, others need something done. Field polygons with management also have some minimum restrictions which are different from normal polygons.
This method is not written for efficiency, so simple brute force approaches are taken - it will take time to execute.
Rules:
Definition at line 1998 of file Landscape.cpp.
References tole_FieldBoundary, tole_HedgeBank, tole_Hedges, tole_IndividualTree, tole_MetalledPath, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, and tole_UnsprayedFieldMargin.
void Landscape::RodenticidePredatorsEvaluation | ( | RodenticidePredators_Population_Manager * | a_rppm | ) |
Definition at line 2813 of file Landscape.cpp.
|
inline |
Sets the maize forage resource as seen from a goose standpoint at a polygon.
Definition at line 499 of file landscape.h.
References m_polymapping.
|
inline |
Sets the grain forage resource as seen from a goose standpoint at a polygon.
Definition at line 492 of file landscape.h.
References m_polymapping.
void Landscape::SetLESignal | ( | int | a_polyref, |
LE_Signal | a_signal | ||
) |
Definition at line 3334 of file Landscape.cpp.
|
inline |
Sets a male as being present in a pond.
Definition at line 328 of file landscape.h.
void Landscape::SetPolyMaxMinExtents | ( | void | ) |
Definition at line 1434 of file Landscape.cpp.
|
inline |
Set the pointer to the current main population manager.
Definition at line 161 of file landscape.h.
void Landscape::SimulationClosingActions | ( | ) |
These are the things that are needed to be done after the simulation ends, but before landscape objects are deleted.
Definition at line 1282 of file Landscape.cpp.
References CfgBool::value().
void Landscape::SkylarkEvaluation | ( | SkTerritories * | a_skt | ) |
Definition at line 2806 of file Landscape.cpp.
|
protected |
Definition at line 2210 of file Landscape.cpp.
bool Landscape::SubtractPondLarvalFood | ( | double | a_food, |
int | a_polyrefindex | ||
) |
Removes larval food from a pond and returns true if it was possible, otherwise false.
Definition at line 559 of file Landscape.cpp.
|
inline |
Returns the maize forage resource.
Definition at line 591 of file landscape.h.
References m_polymapping.
|
inline |
Returns the maize forage resource as seen from a goose standpoint at an x,y location.
Definition at line 597 of file landscape.h.
References RasterMap::Get().
|
inline |
Returns the grain forage resource.
Definition at line 577 of file landscape.h.
References m_polymapping.
|
inline |
Returns the grain forage resource as seen from a goose standpoint at an x,y location.
Definition at line 584 of file landscape.h.
References RasterMap::Get().
APoint Landscape::SupplyCentroid | ( | int | a_polyref | ) |
Definition at line 629 of file Landscape.cpp.
APoint Landscape::SupplyCentroidIndex | ( | int | a_polyrefindex | ) |
Definition at line 634 of file Landscape.cpp.
|
inline |
Definition at line 436 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 440 of file landscape.h.
References RasterMap::Get().
|
inline |
Definition at line 439 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 441 of file landscape.h.
References RasterMap::Get(), and GooseFieldListItem::polyref.
|
inline |
Definition at line 1053 of file landscape.h.
|
inline |
Definition at line 1250 of file landscape.h.
References m_polymapping.
|
inline |
|
inline |
Definition at line 1522 of file landscape.h.
References Calendar::DayInYear(), and g_date.
Referenced by Rabbit_Population_Manager::DoFirst(), Rabbit_Population_Manager::DoLast(), FarmManager::FarmManagement(), and Rabbit_Warren::UpdateForageInformation().
|
inline |
|
inline |
|
inline |
Definition at line 774 of file landscape.h.
References g_date, and Calendar::GetDaylightProportion().
|
inline |
Definition at line 950 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 955 of file landscape.h.
|
inline |
Definition at line 1042 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1047 of file landscape.h.
|
inline |
Definition at line 1031 of file landscape.h.
References m_polymapping.
Referenced by Rabbit_Population_Manager::WarrenLegalPos().
|
inline |
Definition at line 1036 of file landscape.h.
|
inline |
Definition at line 1060 of file landscape.h.
|
inline |
Definition at line 1025 of file landscape.h.
int Landscape::SupplyFarmAnimalCensus | ( | int | a_farm_ref, |
int | a_LifeStage | ||
) |
Definition at line 608 of file Landscape.cpp.
Referenced by FarmManager::FarmManagement().
|
inline |
Definition at line 1127 of file landscape.h.
References m_polymapping.
int Landscape::SupplyFarmIntensity | ( | int | a_x, |
int | a_y | ||
) |
Definition at line 619 of file Landscape.cpp.
Referenced by VegElement::DoDevelopment(), and VegElement::RecalculateBugsNStuff().
int Landscape::SupplyFarmIntensity | ( | int | a_polyref | ) |
Definition at line 624 of file Landscape.cpp.
int Landscape::SupplyFarmIntensityI | ( | int | a_polyindex | ) |
Definition at line 614 of file Landscape.cpp.
|
inline |
Definition at line 332 of file landscape.h.
|
inline |
Definition at line 1073 of file landscape.h.
|
inline |
Definition at line 1079 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1086 of file landscape.h.
|
inline |
Definition at line 1093 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 331 of file landscape.h.
References FarmManager::GetFarmPtr().
|
inline |
Definition at line 1100 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1107 of file landscape.h.
|
inline |
Definition at line 1547 of file landscape.h.
References Calendar::Date(), and g_date.
Referenced by Rabbit_Female::st_EvaluateTerritory(), Rabbit_Female::st_GiveBirth(), and Rabbit_Warren::UpdateForageInformation().
|
inline |
Definition at line 1267 of file landscape.h.
References g_weather, and Weather::GetGlobalRadiation().
Referenced by VegElement::RecalculateBugsNStuff().
|
inline |
Definition at line 1272 of file landscape.h.
References g_weather, and Weather::GetGlobalRadiation().
|
inline |
Returns the leaf forage resource as seen from a goose standpoint at a polygon based on the height only.
a_height | [in] The vegetation height (assumed grass or cereals). This needs to be checked before calling |
a_goose | [in] Is the type of goose calling which is needed to determine how to assess the value of the current forage availability (ie its different for different types of geese) |
Definition at line 505 of file landscape.h.
Referenced by VegElement::RecalculateBugsNStuff().
|
inline |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by number based on height only.
a_polygon | [in] The polygon refence number for the polygon we are interested in (assumed grass or cereals). This needs to be checked before calling |
a_goose | [in] Is the type of goose calling which is needed to determine how to assess the value of the current forage availability (ie its different for different types of geese) |
Definition at line 530 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1148 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1160 of file landscape.h.
|
inline |
Definition at line 1153 of file landscape.h.
|
inline |
Definition at line 938 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 943 of file landscape.h.
|
inline |
Definition at line 1173 of file landscape.h.
|
inline |
Definition at line 1167 of file landscape.h.
References m_polymapping.
|
inline |
Get the hour of the day.
Definition at line 1512 of file landscape.h.
References g_date, and Calendar::GetHour().
|
inline |
|
inline |
Definition at line 1009 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1014 of file landscape.h.
|
inline |
Definition at line 1220 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1230 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1225 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1184 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1179 of file landscape.h.
|
inline |
Definition at line 1196 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1201 of file landscape.h.
|
inline |
Definition at line 1191 of file landscape.h.
|
inline |
Definition at line 962 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 931 of file landscape.h.
polylist * Landscape::SupplyLargeOpenFieldsNearXY | ( | int | x, |
int | y, | ||
int | range, | ||
int | a_openness | ||
) |
Returns a pointer to a list of polygonrefs to large open fields within a range of location x,y.
There is a limit of 1000 polygons to return. There are probably more speed efficient ways to do this, but the simplest is to simply trawl through the list of polygons and pull out each polygon with an openness score > a_openness - then see if the centroid is within range. NB calling method must delete the polylist* passed back!
18/12/2013 this method has been rendered obselete by changes to hunters referring to famers rather than a co-ordinate and range.
Calculates distance from location a_x, a_y. This is done using an approximation to pythagorus to avoid a speed problem.
NB this will crash if either a_dy or a_dx are zero!
Definition at line 645 of file Landscape.cpp.
|
inline |
Definition at line 334 of file landscape.h.
|
inline |
Definition at line 989 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 994 of file landscape.h.
|
inline |
Definition at line 984 of file landscape.h.
|
inline |
Definition at line 1255 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1262 of file landscape.h.
|
inline |
Definition at line 925 of file landscape.h.
int Landscape::SupplyLECount | ( | void | ) |
Definition at line 3326 of file Landscape.cpp.
|
inline |
Tests whether the polygon at a_x,a_y is designated as high.
Definition at line 421 of file landscape.h.
References RasterMap::Get().
int Landscape::SupplyLENext | ( | void | ) |
Definition at line 3319 of file Landscape.cpp.
|
inline |
Definition at line 1020 of file landscape.h.
References m_polymapping.
Referenced by Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), Farm::BurnStrawStubble(), Farm::CattleIsOut(), Farm::CattleIsOutLow(), Farm::CattleOut(), Farm::CattleOutLowGrazing(), Farm::CutOrch(), Farm::CutToHay(), Farm::CutToSilage(), Farm::CutWeeds(), Farm::DeepPlough(), Field::DoDevelopment(), Farm::FA_AmmoniumSulphate(), Farm::FA_GreenManure(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_PK(), Farm::FA_Sludge(), Farm::FA_Slurry(), Farm::FP_GreenManure(), Farm::FP_LiquidNH3(), Farm::FP_ManganeseSulphate(), Farm::FP_Manure(), Farm::FP_NPK(), Farm::FP_NPKS(), Farm::FP_PK(), Farm::FP_Sludge(), Farm::FP_Slurry(), Farm::Harvest(), OptimisingFarm::Harvest(), Farm::HarvestLong(), Farm::HayBailing(), Farm::HayTurning(), Farm::HillingUp(), Rabbit_Warren::InitEvaluation(), Farm::PigsAreOut(), Farm::PigsAreOutForced(), Farm::PigsOut(), Farm::RowCultivation(), Farm::SleepAllDay(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::StrawChopping(), Farm::Strigling(), Farm::StriglingSow(), Farm::StubbleHarrowing(), Farm::Swathing(), UnsprayedMarginScan(), Farm::Water(), and Farm::WinterPlough().
void Landscape::SupplyLEReset | ( | void | ) |
Definition at line 3315 of file Landscape.cpp.
LE_Signal Landscape::SupplyLESignal | ( | int | a_polyref | ) |
Definition at line 3330 of file Landscape.cpp.
|
inline |
Definition at line 1435 of file landscape.h.
|
inline |
Determines if a male is present in a pond.
Definition at line 330 of file landscape.h.
|
inline |
Definition at line 1298 of file landscape.h.
References g_weather, and Weather::GetMeanTemp().
|
inline |
Get the minute of the hour.
Definition at line 1518 of file landscape.h.
References g_date, and Calendar::GetMinute().
|
inline |
|
inline |
Definition at line 775 of file landscape.h.
References g_date, g_map, and Calendar::GetDaylightProportion().
|
inline |
Definition at line 1069 of file landscape.h.
|
inline |
Definition at line 1387 of file landscape.h.
|
inline |
Get openness for a polygon.
Definition at line 417 of file landscape.h.
References m_polymapping.
|
inline |
Get openness for a location.
Definition at line 419 of file landscape.h.
References RasterMap::Get().
|
inline |
Definition at line 1112 of file landscape.h.
bool Landscape::SupplyOverspray | ( | int | a_x, |
int | a_y | ||
) |
Gets the overspray flag.
Definition at line 494 of file Landscape.cpp.
double Landscape::SupplyPesticide | ( | int | a_x, |
int | a_y | ||
) |
Gets total pesticide for a location.
Definition at line 481 of file Landscape.cpp.
References g_pest, and Pesticide::SupplyPesticide().
Referenced by Pond::CalcPondPesticide(), and Rabbit_Warren::UpdatePesticide().
double Landscape::SupplyPesticide | ( | int | a_polyref | ) |
Gets total pesticide for the centroid of a polygon.
Definition at line 522 of file Landscape.cpp.
References g_pest, Pesticide::SupplyPesticide(), and CfgBool::value().
|
inline |
Definition at line 1394 of file landscape.h.
References m_polymapping.
bool Landscape::SupplyPesticideDecay | ( | ) |
Returns true if there is any pesticide in the system at all at this point.
Definition at line 639 of file Landscape.cpp.
References g_pest, and Pesticide::GetAnythingToDecay().
Referenced by Rabbit_Warren::UpdatePesticide().
double Landscape::SupplyPesticideP | ( | int | a_x, |
int | a_y | ||
) |
Gets plant pesticide for a location.
Definition at line 500 of file Landscape.cpp.
References g_pest, and Pesticide::SupplyPesticide().
double Landscape::SupplyPesticideP | ( | int | a_polyref | ) |
Gets plant pesticide for the centroid of a polygon.
Definition at line 547 of file Landscape.cpp.
References g_pest, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticideS | ( | int | a_x, |
int | a_y | ||
) |
Gets soil pesticide for a location.
Definition at line 511 of file Landscape.cpp.
References g_pest, and Pesticide::SupplyPesticide().
double Landscape::SupplyPesticideS | ( | int | a_polyref | ) |
Gets soil pesticide for the centroid of a polygon.
Definition at line 535 of file Landscape.cpp.
References g_pest, Pesticide::SupplyPesticide(), and CfgBool::value().
|
inline |
Definition at line 401 of file landscape.h.
Referenced by Rabbit_Juvenile::InternalPesticideHandlingAndResponse(), Rabbit_Male::InternalPesticideHandlingAndResponse(), and Rabbit_Female::InternalPesticideHandlingAndResponse().
|
inline |
Definition at line 487 of file landscape.h.
References m_polymapping.
|
inline |
Returns the area of a polygon using the vector index as a reference.
Definition at line 1121 of file landscape.h.
|
inline |
Definition at line 1414 of file landscape.h.
Referenced by Pond::CalcPondPesticide(), Rabbit_Warren::InitEvaluation(), and Rabbit_Warren::UpdatePesticide().
|
inline |
Definition at line 1426 of file landscape.h.
|
inline |
Definition at line 1419 of file landscape.h.
|
inline |
Definition at line 1377 of file landscape.h.
|
inline |
Returns the index of a pond based on pondref or -1 if not found.
Definition at line 321 of file landscape.h.
|
inline |
Get the pesticide concentration per liter from a pond (must be a pond index on calling)
Definition at line 710 of file landscape.h.
References SupplyPondPesticide().
Referenced by SupplyPondPesticide().
|
inline |
Definition at line 1291 of file landscape.h.
References g_weather, and Weather::GetRain().
Referenced by Rabbit_Population_Manager::DoFirst(), and Pesticide::Tick().
|
inline |
|
inline |
Definition at line 1277 of file landscape.h.
References g_weather, and Weather::GetRainPeriod().
int Landscape::SupplyRandomPondIndex | ( | ) |
Returns random pond index.
Definition at line 2387 of file Landscape.cpp.
References g_rand_uni().
int Landscape::SupplyRandomPondRef | ( | ) |
Returns random pond polyref.
Definition at line 2391 of file Landscape.cpp.
References g_rand_uni().
|
inline |
Definition at line 760 of file landscape.h.
double Landscape::SupplyRodenticide | ( | int | a_x, |
int | a_y | ||
) |
Gets total rodenticide for a location.
Definition at line 470 of file Landscape.cpp.
References cfg_rodenticide_enable, and CfgBool::value().
|
inline |
Definition at line 400 of file landscape.h.
|
inline |
Definition at line 336 of file landscape.h.
Referenced by Orchard::DoDevelopment(), and OrchardBand::DoDevelopment().
|
inline |
Definition at line 1563 of file landscape.h.
Referenced by TAnimal::CorrectWrapRound(), Rabbit_Warren::InitEvaluation(), and Population_Manager::Population_Manager().
|
inline |
Definition at line 1568 of file landscape.h.
int Landscape::SupplySimAreaMinExtent | ( | void | ) |
|
inline |
Definition at line 1558 of file landscape.h.
Referenced by TAnimal::CorrectWrapRound(), Rabbit_Warren::InitEvaluation(), and Rabbit_Population_Manager::Rabbit_Population_Manager().
|
inline |
Definition at line 902 of file landscape.h.
References m_polymapping.
|
inline |
|
inline |
|
inline |
|
inline |
Returns the soil type in ALMaSS types reference numbers.
Definition at line 426 of file landscape.h.
References RasterMap::Get().
|
inline |
Returns the soil type in rabbit warren reference numbers.
Definition at line 430 of file landscape.h.
References RasterMap::Get().
Referenced by Rabbit_Population_Manager::PreProcessWarrenLocations().
|
inline |
Definition at line 1312 of file landscape.h.
References g_weather, and Weather::GetTemp().
Referenced by Rabbit_Population_Manager::DoFirst(), and VegElement::RecalculateBugsNStuff().
|
inline |
Definition at line 1305 of file landscape.h.
References g_weather, and Weather::GetTemp().
|
inline |
Definition at line 1336 of file landscape.h.
References g_weather, and Weather::GetTempPeriod().
|
inline |
Get the pointer to the current main population manager.
Definition at line 159 of file landscape.h.
|
inline |
Definition at line 1214 of file landscape.h.
|
inline |
Definition at line 1208 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1237 of file landscape.h.
|
inline |
Definition at line 473 of file landscape.h.
|
inline |
Definition at line 763 of file landscape.h.
|
inline |
Definition at line 765 of file landscape.h.
|
inline |
Definition at line 764 of file landscape.h.
|
inline |
Definition at line 766 of file landscape.h.
|
inline |
Definition at line 1400 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1407 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 999 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1004 of file landscape.h.
|
inline |
Definition at line 874 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 879 of file landscape.h.
|
inline |
Definition at line 869 of file landscape.h.
|
inline |
Definition at line 969 of file landscape.h.
References m_polymapping.
Referenced by Pesticide::MainMapDecay().
|
inline |
Definition at line 979 of file landscape.h.
|
inline |
Definition at line 974 of file landscape.h.
|
inline |
Definition at line 896 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 919 of file landscape.h.
|
inline |
Definition at line 840 of file landscape.h.
References m_polymapping.
Referenced by Rabbit_Warren::UpdateForageInformation().
|
inline |
Definition at line 846 of file landscape.h.
|
inline |
Definition at line 835 of file landscape.h.
|
inline |
Definition at line 857 of file landscape.h.
References m_polymapping.
Referenced by Rabbit_Warren::UpdateForageInformation().
|
inline |
Definition at line 862 of file landscape.h.
|
inline |
Definition at line 852 of file landscape.h.
|
inline |
Definition at line 907 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 913 of file landscape.h.
|
inline |
Definition at line 164 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1243 of file landscape.h.
|
inline |
Definition at line 1135 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 1141 of file landscape.h.
|
inline |
Definition at line 727 of file landscape.h.
|
inline |
Definition at line 885 of file landscape.h.
References m_polymapping.
|
inline |
Definition at line 891 of file landscape.h.
|
inline |
|
inline |
|
inline |
Definition at line 1349 of file landscape.h.
References g_weather, and Weather::GetWindDirection().
Referenced by Pesticide::DailyQueueProcess().
|
inline |
Definition at line 1331 of file landscape.h.
References g_weather, and Weather::GetWindPeriod().
|
inline |
|
inline |
Definition at line 1542 of file landscape.h.
References g_date, and Calendar::GetYearNumber().
Referenced by Rabbit_Population_Manager::DoFirst(), FarmManager::FarmManagement(), and Farm::Trial_PesticideTreat_DateLimited().
|
protected |
void Landscape::Tick | ( | void | ) |
If the farmer decision making model is on, the function:
Definition at line 1294 of file Landscape.cpp.
References cfg_productapplicendyear, cfg_productapplicstartyear, cfg_rodenticide_enable, Calendar::DayInYear(), g_date, g_pest, g_rand_uni(), g_weather, Calendar::GetYearNumber(), janfirst, Calendar::JanFirst(), l_map_dump_event_enable, l_map_dump_event_x1, l_map_dump_event_y1, l_map_dump_veg_enable, l_map_dump_veg_x, l_map_dump_veg_y, marchfirst, Calendar::MarchFirst(), Calendar::Tick(), Pesticide::Tick(), Weather::Tick(), toof_Foobar, tos_Foobar, tov_Maize, tov_Undefined, CfgInt::value(), and CfgBool::value().
|
inline |
Definition at line 1574 of file landscape.h.
References g_letype, and LE_TypeClass::TranslateEleTypes().
|
inline |
Definition at line 1581 of file landscape.h.
References g_letype, and LE_TypeClass::TranslateVegTypes().
|
inline |
Definition at line 826 of file landscape.h.
|
protected |
Definition at line 2450 of file Landscape.cpp.
|
protected |
Definition at line 2398 of file Landscape.cpp.
References g_msg, LE::GetValidX(), LE::GetValidY(), l_map_umargin_width, LE::SetArea(), LE::SetPoly(), LE::SetUnsprayedMarginPolyRef(), tole_UnsprayedFieldMargin, CfgInt::value(), MapErrorMsg::Warn(), and WARN_BUG.
|
protected |
Definition at line 2419 of file Landscape.cpp.
References LE::AddArea(), LE::GetPoly(), LE::GetUnsprayedMarginPolyRef(), LE::GetValidX(), LE::GetValidY(), and SupplyLEPointer().
|
protected |
Definition at line 1456 of file Landscape.cpp.
References g_msg, MapErrorMsg::Warn(), and WARN_FILE.
std::string Landscape::VegtypeToString | ( | TTypesOfVegetation | a_veg | ) |
Definition at line 3943 of file Landscape.cpp.
References g_msg, tov_AgroChemIndustryCereal, tov_BroadBeans, tov_Carrots, tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_FieldPeas, tov_FieldPeasSilage, tov_FieldPeasStrigling, tov_FodderBeet, tov_FodderGrass, tov_Heath, tov_Lawn, tov_Maize, tov_MaizeSilage, tov_MaizeStrigling, tov_NaturalGrass, 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_PlantNursery, 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_Undefined, tov_Wasteland, 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, MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
Definition at line 1505 of file landscape.h.
References g_msg, MapErrorMsg::Warn(), and WARN_MSG.
Referenced by Rabbit_Population_Manager::ClassifyHabitat(), Rabbit_Warren::DEBUG_InternalTest(), Rabbit_Warren::DEBUG_InternalTest2(), Rabbit_Warren::JoinNOccupy(), Rabbit_Warren::Leave(), Rabbit_Adult::OnMateDead(), Rabbit_Adult::OnMateFinishedDigging(), Rabbit_Female::OnYoungDeath(), Rabbit_Female::Rabbit_Female(), Rabbit_Adult::SetMate(), Rabbit_Female::st_EvaluateTerritory(), Rabbit_Young::Step(), Rabbit_Juvenile::Step(), Rabbit_Male::Step(), Rabbit_Female::Step(), Rabbit_Warren::Step(), and Rabbit_Female::Weaned().
void Landscape::WriteOpenness | ( | void | ) |
Stores openness for all polygons to a standard file.
|
protected |
Definition at line 254 of file landscape.h.
Referenced by hb_Add(), and hb_PaintBorder().
|
protected |
Definition at line 253 of file landscape.h.
Referenced by hb_Add(), and hb_PaintBorder().
|
protected |
Definition at line 252 of file landscape.h.
Referenced by hb_GenerateHBPolys().
|
protected |
Definition at line 241 of file landscape.h.
Referenced by hb_Add(), and hb_FindHedges().
|
protected |
Definition at line 248 of file landscape.h.
Referenced by hb_Add(), hb_FindBoundingBox(), hb_HasNeighbourColor(), hb_MapBorder(), and hb_MaxUnpaintedNegNeighbour().
|
protected |
Definition at line 246 of file landscape.h.
Referenced by hb_Add(), hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_DownPolyNumbers(), hb_FindBoundingBox(), hb_HasNeighbourColor(), hb_HasOtherNeighbour(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_MaxUnpaintedNegNeighbour(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), hb_RestoreHedgeCore(), and hb_UpPolyNumbers().
|
protected |
Definition at line 250 of file landscape.h.
Referenced by hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
protected |
Definition at line 251 of file landscape.h.
Referenced by hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
protected |
Definition at line 250 of file landscape.h.
Referenced by hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
protected |
Definition at line 251 of file landscape.h.
Referenced by hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
protected |
Definition at line 242 of file landscape.h.
Referenced by hb_GenerateHBPolys(), and hb_StripingDist().
|
protected |
Definition at line 249 of file landscape.h.
Referenced by hb_Add(), hb_DownPolyNumbers(), and hb_UpPolyNumbers().
|
protected |
Definition at line 247 of file landscape.h.
Referenced by hb_Add(), hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_DownPolyNumbers(), hb_FindBoundingBox(), hb_HasNeighbourColor(), hb_HasOtherNeighbour(), hb_MapBorder(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_MaxUnpaintedNegNeighbour(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
private |
Definition at line 141 of file landscape.h.
|
protected |
Definition at line 297 of file landscape.h.
|
private |
Flag to signal that missing polygons exist
Definition at line 138 of file landscape.h.
|
private |
List of all landscape elements. The index is a sequential number, to get the polynum look this number up in m_polymapping.
Definition at line 119 of file landscape.h.
Referenced by hb_Add(), hb_DownPolyNumbers(), hb_FindHedges(), and hb_GenerateHBPolys().
|
private |
List of all the farms.
Definition at line 116 of file landscape.h.
|
private |
Definition at line 149 of file landscape.h.
|
private |
Definition at line 150 of file landscape.h.
|
private |
Curve relatning goose intake rates in KJ/min to vegetation height.
Definition at line 148 of file landscape.h.
|
private |
Definition at line 128 of file landscape.h.
|
private |
Definition at line 130 of file landscape.h.
|
private |
|
protected |
Definition at line 172 of file landscape.h.
|
private |
Definition at line 131 of file landscape.h.
|
private |
a flag to ensure centroid calculation on object construction
Definition at line 134 of file landscape.h.
|
private |
a flag to ensure openness calculation on object construction
Definition at line 136 of file landscape.h.
|
protected |
An attribute to hold the pesticide type being tested, if there is one, if not default is -1.
Definition at line 256 of file landscape.h.
|
protected |
List of pond indexes.
Definition at line 175 of file landscape.h.
|
protected |
List of pond polyrefs.
Definition at line 177 of file landscape.h.
|
private |
Definition at line 145 of file landscape.h.
|
private |
Definition at line 146 of file landscape.h.
|
private |
a pointer to the current main population manager
Definition at line 143 of file landscape.h.
|
protected |
Definition at line 295 of file landscape.h.
|
protected |
Definition at line 171 of file landscape.h.
|
private |
Definition at line 112 of file landscape.h.
|
private |
Definition at line 127 of file landscape.h.
|
private |
Definition at line 129 of file landscape.h.
|
protected |
Definition at line 244 of file landscape.h.
|
protected |
Definition at line 245 of file landscape.h.