![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
The landscape class containing all environmental and topographical data. More...
#include <Landscape.h>
Public Member Functions | |
vector< vector< int > > | CalculateMaskCorners (int a_centroid_x, int a_centroid_y, int a_half_width) |
The function to calculate the corners of mask(s) for the given centroid and half-width with wrapping around. More... | |
void | GenerateCellLocDict () |
The function to create the dictionary of cell locations for every polygon. More... | |
void | GeneratePolyIDMapWithinDist () |
The function to find all the polygons within the a certain distance to each location. More... | |
std::vector< APoint > | SupplyLocsVectorPoly (int a_poly_id) |
The function to get the vector of all the locations for the given poly ID. More... | |
APoint | SupplyARandomLocPoly (int a_poly_id) |
The function to get a random location for the given poly ID. More... | |
APoint | SupplyARandomLocPollenPoly (int a_poly_id) |
The function to get a random location with pollen available for the given polygon. More... | |
APoint | SupplyARandomLocNectarPoly (int a_poly_id) |
The function to get a random location with nectar available for the given polygon. More... | |
APoint | SupplyARandomLocResourcePoly (int a_poly_id, std::map< int, int > &a_index_locs, std::map< int, vector< APoint >> &a_poly_cell_locs, Eigen::MatrixXf &a_prop_map) |
The function to get a random location for the given resource and the given poly ID. More... | |
double | SupplyPollenAtLocInPoly (int a_poly_id, APoint a_start_loc, double a_required_amount, vector< APoint > *a_locs, vector< double > *a_pest_vec) |
The function to get the given pollen in the give location in the polygon ID, the locations for the required amount of pollen are stored in a_locs, the pesticide residue are stored in a_pest_vet, the foraged amount of pollen are returned. More... | |
double | SupplyNectarAtLocInPoly (int a_poly_id, APoint a_start_loc, double a_required_amount, vector< APoint > *a_locs, vector< double > *a_pest_vec) |
The function to get the given nectar in the given location in the polygon ID, the locations for the required amount of nectar are stored in a_locs, the pesticide residue are stored in a_pest_vet, the foraged amount of nectar are returned. More... | |
double | SupplyResourceAtLocInPoly (int a_poly_id, APoint a_start_loc, double a_required_amount, vector< APoint > *a_locs, vector< double > *a_pest_vec, Eigen::MatrixXf &a_resource_map, int a_num_avail_cell, PollenNectarData a_resource_data, bool a_is_pollen) |
The function to get the given amount of the required resource for the given location, the function returns the foraged amount. More... | |
void | ResetFlowerLocIndex (void) |
The function to reset the index for the indices of the locations with flower resource. More... | |
PollenNectarData | SupplyPollenHabitatType (int a_habitat_type) |
Supply the pollen of the current day for the given habitat type. More... | |
PollenNectarData | SupplyNectarHabitatType (int a_habitat_type) |
Supply the nectar of the current day for the given habitat type. More... | |
void | SetPollenMap (int a_poly_id, double a_pollen_quantity, int a_min_x, int a_min_y, int a_max_x, int a_max_y) |
The function to set the pollen quantity for all the cells that belong to the given polygon ID. More... | |
void | SetNectarMap (int a_poly_id, double a_nectar_quantity, int a_min_x, int a_min_y, int a_max_x, int a_max_y) |
The function to set the nectar quantity for all the cells that belong to the given polygon ID. More... | |
void | SetGreenBiomassMap (int a_poly_id, double a_green_biomass, int a_min_x, int a_min_y, int a_max_x, int a_max_y) |
The function to set the green biomass (in kg) for all the cells that belong to the given polygon ID. Used to scale the transfer of pesticide into the plant. More... | |
double | SupplyLocMaxPollen (int &a_peak_loc_x, int &a_peak_loc_y, int a_min_x, int a_min_y, int a_max_x, int a_max_y, int a_incr=1) |
Supply the location with the maximum pollen amount location for the given area. More... | |
double | SupplyLocMaxNectar (int &a_peak_loc_x, int &a_peak_loc_y, int a_min_x, int a_min_y, int a_max_x, int a_max_y, int a_incr=1) |
Supply the location with the maximum nectar amount location for the given area. More... | |
void | RunHiddenYear () |
The function to generate the vector list of pixies for polygons with flower resource. More... | |
void | FillVegAreaData () |
Runs through all polygons and records the area of each vegetation type. More... | |
double | SupplyVegArea (int v) |
Records all area vegetation types and transform it into a table. More... | |
void | DumpVegAreaData (int a_day) |
Saves the information on vegetation types and areas. More... | |
void | SkylarkEvaluation (SkTerritories *a_skt) |
Evaluation to find Skylark territory. More... | |
void | RodenticidePredatorsEvaluation (RodenticidePredators_Population_Manager *a_rppm) |
Evaluation to find Rodenticide Predator territory. More... | |
PopulationManagerList * | SupplyThePopManagerList () |
Set the pointer to the list of active population managers. More... | |
int | DistanceToP (APoint a_Here, APoint a_There) |
Distance to the current main population manager, calculates distance from 2 coordinates to other 2 coordinates. More... | |
int | DistanceToPSquared (APoint a_Here, APoint a_There) |
Distance to the current main population manager, calculates distance from 2 coordinates to other 2 coordinates but do not square root (for efficiency) More... | |
void | SetThePopManagerList (PopulationManagerList *a_ptr) |
Set the pointer to the list of active population managers. More... | |
int | SupplyVegPhase (int a_poly) |
Returns the current vegetation growth phase for a polygon. More... | |
double | SupplyPestIncidenceFactor () |
Returns Landscape::m_pestincidencefactor. More... | |
void | SetPolymapping (int a_index, int a_val) |
Sets an entry in the polymapping to a specific value. More... | |
int | SupplyPolymapping (int a_index) |
Returns the value of the m_polymapping array indexed by a_index. More... | |
int | SupplyMaxPoly () |
Returns the size of the Landscape::m_elems vector. More... | |
Eigen::ArrayXXi * | SupplyPolyIdMapPtr () |
Returns pointer to the Eigen Array for poly id map. More... | |
Eigen::ArrayXXf * | SupplyGreenBiomassMapPtr () |
Returns pointer to the Eigen array for green biomass. More... | |
Eigen::MatrixXf * | SupplyPollenMapPtr () |
Returns pointer to the Eigen matrix for pollen. More... | |
Eigen::MatrixXf * | SupplyNectarMapPtr () |
Returns pointer to the Eigen matrix for nectar. More... | |
list< LE * > | SupplyAllVegPolys () |
Creates a vector containing a list of all the polygons that do not have tov_None as the vegetation type. More... | |
~Landscape (void) | |
Landscape (bool dump_exit=true) | |
bool | IsHiddenYear (void) |
The function to return whether it is in the hidden year. More... | |
void | SimulationClosingActions () |
void | Tick (void) |
void | TurnTheWorld (void) |
int | HowManyPonds () const |
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) const |
Returns the index of a pond based on pondref or -1 if not found. More... | |
void | SetMaleNewtPresent (const 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) |
Returns a pointer to a farm owned by a farmer with a specific farm reference number. More... | |
FarmManager * | SupplyFarmManagerPtr () |
Returns m_FarmManager, the pointer to the farm manager instance. More... | |
RasterMap * | SupplyRasterMap () |
Returns m_land, the pointer to the raster map instance. More... | |
int | SupplyLargestPolyNumUsed () |
Returns m_LargestPolyNumUsed. More... | |
bool | SupplyShouldSpray () |
Returns m_toxShouldSpray, a flag indicating whether pesticide should be sprayed. More... | |
std::string | SupplyCountryCode () |
Returns m_countryCode, e.g. "DK" for Denmark. More... | |
int | SupplyTimezone () |
void | SetCountryCode (std::string country_code) |
Sets m_countryCode, e.g. "DK" for Denmark. More... | |
string | SupplyLandscapeName () |
Returns the current landscape name. More... | |
void | SetSpeciesFunctions (TTypesOfPopulation a_species) |
This is the jumping off point for any landscape related species setup, it creates function pointers to these special functions. More... | |
void | SetPolygonLock (int a_polyref) |
Function to set the given polygon lock. More... | |
void | ReleasePolygonLock (int a_polyref) |
Function to release the given polygon locks. More... | |
double | SupplyLatitude () |
Returns m_latitude of the landscape location. More... | |
double | SupplyLongitude () |
Returns m_longitude of the landscape location. More... | |
void | SetLatitude (double latitude) |
Sets the latitude of the landscape location. More... | |
void | SetLongitude (double longitude) |
Sets the longitude of the landscape location. More... | |
double | SupplyVegDigestibilityVector (unsigned int a_index) |
Gets the digestibility of the vegetation based on an index to the Landscape::m_elems array. More... | |
double | SupplyVegDigestibility (int a_polyref) |
Gets the digestibility of the vegetation for a polygon given by a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
double | SupplyVegDigestibility (int a_x, int a_y) |
Gets the digestibility of the vegetation for a polygon given by a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
double | SupplyVegHeightVector (unsigned int a_index) |
Returns the height of the vegetation using the index to Landscape::m_elems. More... | |
double | SupplyVegHeight (int a_polyref) |
Returns the height of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
double | SupplyVegHeight (int a_x, int a_y) |
Returns the height of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
double | SupplyVegBiomassVector (unsigned int a_index) |
Returns the biomass of the vegetation using the index a_index to Landscape::m_elems. More... | |
double | SupplyVegBiomass (int a_polyref) |
Returns the biomass of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
double | SupplyVegBiomass (int a_x, int a_y) |
Returns the biomass of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
int | SupplyVegDensity (int a_polyref) |
Returns the density of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
int | SupplyVegDensity (int a_x, int a_y) |
Returns the density of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
double | SupplyWeedBiomass (int a_polyref) |
Returns the weed biomass of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
double | SupplyWeedBiomass (int a_x, int a_y) |
Returns the weed biomass of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
void | CalHaibitatFlowerResource () |
Calculate the flower resouce for all the habitat types with flower resource. More... | |
PollenNectarData | SupplyPollen (int a_polyref) |
Returns information on the pollen produced by the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
PollenNectarData | SupplyPollen (int a_x, int a_y) |
Returns information on the pollen produced by the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
void | RemovePollenInLoc (int a_x, int a_y, double a_mount) |
Remove the foraged ammount of pollen quantity from the cell indexed by a_x, a_y. More... | |
PollenNectarData | SupplyNectar (int a_polyref) |
Returns information on the nectar produced by the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
PollenNectarData | SupplyNectar (int a_x, int a_y) |
Returns information on the nectar produced by the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y. More... | |
void | RemoveNectarInLoc (int a_x, int a_y, double a_mount) |
Remove the foraged ammount of pollen quantity from the cell indexed by a_x, a_y. More... | |
double | SupplySugar (int a_polyref) |
Returns information on the sugar produced by the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplySugar (int a_x, int a_y) |
Returns information on the sugar produced by the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyPollenQuantity (int a_polyref) |
Returns the pollen quantity produced by the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyPollenQuantity (int a_x, int a_y) |
Returns the pollen quantity produced by the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyNectarQuantity (int a_polyref) |
Returns the XXX of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyNectarQuantity (int a_x, int a_y) |
Returns the XXX of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyTotalNectar (int a_polyref) |
Returns the nectar quantity produced by the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyTotalNectar (int a_x, int a_y) |
Returns the nectar quantity produced by the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
void | RemoveNectarFromTotal (int a_polyref, double a_removed_amount) |
Remove the given amount of nectar from the total amount in the given polygon. More... | |
double | SupplyTotalPollen (int a_polyref) |
Returns the sugar quantity produced by of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyTotalPollen (int a_x, int a_y) |
Returns the sugar quantity produced by of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
void | RemovePollenFromTotal (int a_polyref, double a_removed_amount) |
Remove the given amount of pollen from the total amount in the given polygon. More... | |
double | SupplyNecDD (int a_polyref) |
Returns the current day degree sum for nectar production of the vegetation using the polygon reference number a_polyref. More... | |
double | SupplySugDD (int a_polyref) |
Returns the current day degree sum for sugar production of the vegetation using the polygon reference number a_polyref. More... | |
double | SupplyPolDD (int a_polyref) |
Returns the current day degree sum for pollen production of the vegetation using the polygon reference number a_polyref. More... | |
bool | SupplySkScrapes (int a_polyref) |
Returns the presence of skylark scrapes in the vegetation using the polygon reference number a_polyref. More... | |
double | SupplyInterestedGreenBiomass (int a_polyref) |
Returns the insterested green biomass of the vegetation using the polygon reference number a_polyref. More... | |
double | SupplyInterestedGreenBiomass (int a_x, int a_y) |
Returns the interested green biomass of the vegetation using the polygon reference number a_polyref. More... | |
double | SupplyInterestedGreenBiomassTotal (int a_polyref) |
Returns the interested green biomass of the vegetation+weeds using the polygon reference number a_polyref. More... | |
double | SupplyInterestedGreenBiomassTotal (int a_x, int a_y) |
Returns the interested green biomass of the vegetation+weeds using the x,y coordinate. More... | |
double | SupplyGreenBiomass (int a_polyref) |
Returns the green biomass of the vegetation using the polygon reference number a_polyref. More... | |
double | SupplyGreenBiomass (int a_x, int a_y) |
Returns the green biomass of the vegetation using the polygon reference number a_polyref. More... | |
double | SupplyGreenBiomassTotal (int a_polyref) |
Returns the green biomass of the vegetation+weeds using the polygon reference number a_polyref. More... | |
double | SupplyGreenBiomassTotal (int a_x, int a_y) |
Returns the green biomass of the vegetation+weeds using the x,y coordinate. More... | |
double | SupplyGreenBiomassProp (int a_polyref) |
Returns the green biomass as a proportion of biomass of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyGreenBiomassProp (int a_x, int a_y) |
Returns the green biomass as a proportion of biomass of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyVegGrowthStage (int a_polyref) |
Returns the vegetation growth stage of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyVegGrowthStage (int a_x, int a_y) |
Returns the vegetation growth stage of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyDeadBiomass (int a_polyref) |
Returns the dead biomass of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyDeadBiomass (int a_x, int a_y) |
Returns the dead biomass of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyLAGreen (int a_polyref) |
Returns the green leaf area of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyLAGreen (int a_x, int a_y) |
Returns the green leaf area of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyLATotal (int a_polyref) |
Returns leaf area in total of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyLATotal (int a_x, int a_y) |
Returns leaf area in total of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyVegCover (int a_polyref) |
Returns the vegetation cover proportion of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
bool | SupplyIsVeg (int a_x, int a_y) |
Indicated if this polygon type is descended from VegElement. More... | |
double | SupplyVegCoverVector (unsigned int a_index) |
Returns the vegetation cover proportion of the vegetation using the polygon index to Landscape::m_elems. More... | |
double | SupplyVegCover (int a_x, int a_y) |
Returns the vegetation cover proportion of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
TTypesOfVegetation | SupplyLastSownVeg (int a_polyref) |
Returns the last type of vegetation sown on a field using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
TTypesOfVegetation | SupplyLastSownVeg (int a_x, int a_y) |
Returns the last type of vegetation sown on a field using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
TTypesOfVegetation | SupplyLastSownVegVector (unsigned int a_index) |
Returns the last type of vegetation sown on a field using the polygon index to Landscape::m_elems. More... | |
double | SupplyInsects (int a_polyref) |
Returns the insect biomass on a polygon using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyInsects (int a_x, int a_y) |
Returns the insect biomass on a polygon using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
bool | SubtractPondLarvalFood (double a_food, int a_polyrefindex) |
Removes larval food from a pond and returns true if it was possible, otherwise false. More... | |
void | CheckForPesticideRecord (LE *a_field, TTypesOfPesticideCategory a_pcide) |
Check if needed and record pesticide application. More... | |
double | SupplyRodenticide (int a_x, int a_y) |
Gets total rodenticide for a location. More... | |
double | SupplySeedCoating (int a_polyref, PlantProtectionProducts a_ppp) |
Gets total seed coating for the centorid of a polygen. More... | |
bool | SupplyPesticideDecay (PlantProtectionProducts a_ppp) |
Returns true if there is any pesticide in the system at all at this point. More... | |
double | SupplyPesticide (int a_x, int a_y, PlantProtectionProducts a_ppp) |
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, PlantProtectionProducts a_ppp) |
Gets plant pesticide for a location. More... | |
double | SupplyPesticideS (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets soil pesticide for a location. More... | |
double | SupplyPesticidePlantSurface (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets plant surface pesticide for a location. More... | |
double | SupplyPesticideInPlant (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets pesticide within plant for a location. More... | |
double | SupplyPesticideNectar (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets nectar pesticide for a location. More... | |
double | SupplyPesticidePollen (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets pollen pesticide for a location. More... | |
PlantProtectionProducts | SupplySprayPesticideType (int a_x, int a_y) |
Gets the sprayed pesticide type in the given location. More... | |
double | SupplySprayPesticideRate (int a_x, int a_y) |
Gets the sprayed pesticide rate in the given location. More... | |
double | SupplyPesticide (int a_polyref, PlantProtectionProducts a_ppp) |
Gets total pesticide for the centroid of a polygon. More... | |
double | SupplyPesticideP (int a_polyref, PlantProtectionProducts a_ppp) |
Gets plant pesticide for the centroid of a polygon. More... | |
double | SupplyPesticideS (int a_polyref, PlantProtectionProducts a_ppp) |
Gets soil pesticide for the centroid of a polygon. More... | |
double | SupplyPesticidePlantSurface (int a_polyref, PlantProtectionProducts a_ppp) |
Gets plant surface pesticide for the centroid of a polygon. More... | |
double | SupplyPesticideInPlant (int a_polyref, PlantProtectionProducts a_ppp) |
Gets pesticide within plant for the centroid of a polygon. More... | |
double | SupplyPesticideNectar (int a_polyref, PlantProtectionProducts a_ppp) |
Gets nectar pesticide for the centroid of a polygon. More... | |
double | SupplyPesticidePollen (int a_polyref, PlantProtectionProducts a_ppp) |
Gets pollen pesticide for the centroid of a polygon. More... | |
PlantProtectionProducts | SupplySprayPesticideType (int a_polyref) |
Gets the sprayed pesticide type in the given field. More... | |
double | SupplySprayPesticideRate (int a_polyref) |
Gets the sprayed pesticide rate in the given field. More... | |
RodenticidePredators_Population_Manager * | SupplyRodenticidePredatoryManager () |
TTypesOfPesticide | SupplyPesticideType (void) |
Gets type of pesticide effect from a reference. More... | |
GooseFieldList * | GetGooseFields (double) |
Gets the list of suitable goose foraging fields today. More... | |
void | ResetGrainAndMaize () |
Resets all grain. 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 LKM - used?? More... | |
void | ReadOpenness (void) |
Reads openness values from a standard input file for all polygons LKM - used?? More... | |
int | CalculateFieldOpennessCentroid (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 | CalculateFieldOpennessAllCells (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... | |
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... | |
bool | SupplyIsHumanDominated (TTypesOfLandscapeElement a_tole_type) |
For the roe deer, determines the extent of human activity and returns bool. 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) |
Returns the centroid of a polygon using the polygon reference number a_polyref. More... | |
APoint | SupplyCentroidIndex (int a_polyrefindex) |
Returns the centroid of a polygon using the polygon index in m_elems. More... | |
int | SupplyCentroidX (int a_polyref) |
Returns the centroid x-coordinate of a polygon using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
int | SupplyCentroidY (int a_polyref) |
Returns the centroid y-coordinate of a polygon using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
int | SupplyCentroidX (int a_x, int a_y) |
Returns the centroid x-coordinate of a polygon using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
int | SupplyCentroidY (int a_x, int a_y) |
Returns the centroid y-coordinate of a polygon using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y. More... | |
double | SupplyFarmIntensity (int a_x, int a_y) |
Returns the farm intensity classification of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. More... | |
double | SupplyFarmIntensity (int a_polyref) |
Returns the farm intensity classification of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. More... | |
double | SupplyFarmIntensityI (int a_polyindex) |
Returns the farm intensity classification of the polygon using the polygon index in m_elems. More... | |
TTypesOfLandscapeElement | SupplyElementType (int a_polyref) |
Returns the landscape type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a TTypesOfLandscapeElement. More... | |
TTypesOfLandscapeElement | SupplyElementType (int a_x, int a_y) |
Returns the landscape type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a TTypesOfLandscapeElement. More... | |
TTypesOfLandscapeElement | SupplyElementTypeCC (int a_x, int a_y) |
Returns the landscape type of the polygon using coordinates a_x, a_y, but allowing correction of coordinates for out of scope values. Returns the value as a TTypesOfLandscapeElement. More... | |
TTypesOfLandscapeElement | GetOwner_tole (int a_x, int a_y) |
Returns the landscape type of the polygon owner (used in cases relating to e.g. unsprayed field margins) using coordinates a_x, a_y. Returns the value as a TTypesOfLandscapeElement. More... | |
int | SupplyCountryDesig (int a_x, int a_y) |
Returns the designation of country or urban of the polygon using coordinates a_x, a_y. More... | |
int | SupplyElementSubType (int a_polyref) |
Returns the landscape element sub-type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. More... | |
int | SupplyElementSubType (int a_x, int a_y) |
Returns the landscape element sub-type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. More... | |
TTypesOfVegetation | SupplyVegType (int a_x, int a_y) |
Returns the vegetation type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a # TTypesOfVegetation. More... | |
TTypesOfVegetation | SupplyVegType (int polyref) |
Returns the vegetation type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a # TTypesOfVegetation. More... | |
TTypesOfCrops | SupplyCropType (int a_x, int a_y) |
Returns the crop type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a # TTypesOfCrops. More... | |
TTypesOfCrops | SupplyCropType (int polyref) |
Returns the crop type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a # TTypesOfCrops. More... | |
TTypesOfVegetation | SupplyVegTypeVector (unsigned int a_index) |
Returns the vegetation type of the polygon using the polygon index to m_elems. Returns the value as a # TTypesOfVegetation. More... | |
int | SupplyGrazingPressureVector (unsigned int a_index) |
Returns the grazing pressure of the polygon using the polygon index to m_elems. More... | |
int | SupplyGrazingPressure (int a_polyref) |
Returns the grazing pressure of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. More... | |
int | SupplyGrazingPressure (int a_x, int a_y) |
Returns the grazing pressure of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. More... | |
vector< int > | SupplyPolyWithFlowers (void) |
Returns m_poly_with_flowers, a list of polygons with flowering modelled. More... | |
bool | SupplyAttIsHigh (int a_x, int a_y) |
Tests whether the polygon at a_x,a_y is designated as xxx. More... | |
bool | SupplyAttIsWater (int a_x, int a_y) |
Returns whether a polygon at coordinates a_x, a_y has the attribute Water set. More... | |
bool | SupplyAttIsForest (int a_x, int a_y) |
Returns whether a polygon at coordinates a_x, a_y has the attribute Forest set. More... | |
bool | SupplyAttIsForest (int a_polyref) |
Returns whether a polygon at coordinates a_x, a_y has the attribute Forest set. More... | |
bool | SupplyAttIsWoody (int a_x, int a_y) |
Returns whether a polygon at coordinates a_x, a_y has the attribute Woody. More... | |
bool | SupplyAttIsUrbanNoVeg (int a_x, int a_y) |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute High set. More... | |
bool | SupplyAttIsUrbanNoVeg (int a_polyref) |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute High set. More... | |
bool | SupplyAttIsVegPatchy (int a_polyref) |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute Is Patchy set. More... | |
bool | SupplyAttIsVegPatchy (int a_x, int a_y) |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute Is Patchy set. More... | |
bool | SupplyAttIsVegCereal (int a_polyref) |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute Is Cereal set. More... | |
bool | SupplyAttIsVegMatureCereal (int a_polyref) |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute Is Mature Cereal set. More... | |
bool | SupplyAttIsVegGrass (int a_polyref) |
Returns whether a polygon a_polyref has the attribute Is Grass set. More... | |
bool | SupplyAttIsVegGrass (int a_x, int a_y) |
Returns whether a polygon a_polyref has the attribute Is Grass set. More... | |
bool | SupplyAttIsVegGooseGrass (int a_polyref) |
Returns whether a polygon a_polyref has the attribute Is Goose Grass set. More... | |
bool | SupplyAttIsVegMaize (int a_polyref) |
Returns whether a polygon a_polyref has the attribute Is Maize set. More... | |
bool | SupplyAttUserDefinedBool (int a_polyref) |
Returns the user defined boolean attribute of a polygon using the polygon reference number a_polyref, or coordinates a_x, a_y. More... | |
bool | SupplyAttUserDefinedBool (int a_x, int a_y) |
Returns the user defined boolean attribute of a polygon using the polygon reference number a_polyref, or coordinates a_x, a_y. More... | |
int | SupplyAttUserDefinedInt (int a_polyref) |
Returns the user defined integer attribute of a polygon using the polygon reference number a_polyref. More... | |
void | SetAttUserDefinedBool (int a_polyref, bool a_value) |
Sets the user defined boolean attribute of a polygon using the polygon reference number a_polyref. More... | |
void | SetAttUserDefinedInt (int a_polyref, int a_value) |
ets the user defined integer attribute of a polygon using the polygon reference number a_polyref More... | |
bool | ClassificationHigh (TTypesOfLandscapeElement tole) |
Returns whether the polygon is classfied as high. More... | |
bool | ClassificationWater (TTypesOfLandscapeElement tole) |
Returns whether the polygon is classfied as water. More... | |
bool | ClassificationFieldType (TTypesOfLandscapeElement a_tole) |
Returns whether the polygon is classfied as a field. More... | |
bool | ClassificationUrbanNoVeg (TTypesOfLandscapeElement a_tole) |
Returns whether the polygon is classfied as urban with no vegetation. More... | |
bool | ClassificationForest (TTypesOfLandscapeElement a_tole) |
Returns whether the polygon is classfied as woodland. More... | |
bool | ClassificationWoody (TTypesOfLandscapeElement a_tole) |
Returns whether the polygon is classfied as woody. More... | |
void | Set_all_Att_UserDefinedBool (bool(*udf_fnc)(TTypesOfLandscapeElement)) |
used to classify the userdefinedbool attribute and set it - this requires supplying the correct classification function More... | |
void | Set_all_Att_UserDefinedInt (int(*udf_fnc)(TTypesOfLandscapeElement)) |
used to classify the userdefinedint attribute and set it - this requires supplying the correct classification function More... | |
bool | ClassificationVegGrass (TTypesOfVegetation a_vege_type) |
Returns whether a vegetation type is classified as Grass. More... | |
bool | ClassificationVegCereal (TTypesOfVegetation a_vege_type) |
Returns whether a vegetation type is classified as cereal. More... | |
bool | ClassificationVegMatureCereal (TTypesOfVegetation a_vege_type) |
Returns whether a vegetation type is classified as cereal grown to maturity. More... | |
bool | ClassificationVegGooseGrass (TTypesOfVegetation a_vege_type) |
Returns whether a vegetation type is classified as Goose Grass. More... | |
bool | ClassificationVegMaize (TTypesOfVegetation a_vege_type) |
Returns whether a vegetation type is classified as maize. More... | |
bool | ClassificationPermCrop (TTypesOfVegetation a_vege_type) |
Returns whether a vegetation type is classified as a permanent crop. More... | |
void | Set_TOLE_Att (LE *elem) |
Uses a point to an LE instance and sets all the attributes based on its tole type. More... | |
void | Set_TOV_Att (LE *elem) |
Uses a point to an LE instance and sets all the attributes based on its tov type. More... | |
bool | SupplyLEHigh (int a_x, int a_y) |
Function for backwards code compatibility when Set_Att_High would now be used. More... | |
bool | IsFieldType (TTypesOfLandscapeElement a_tole) |
Function for backwards code compatibility when TOV attributes would now be used. More... | |
bool | SupplyIsCereal2 (TTypesOfVegetation a_vege_type) |
Function for backwards code compatibility when cereal attributes would now be used. More... | |
bool | SupplyIsGrass2 (TTypesOfVegetation a_vege_type) |
Function for backwards code compatibility when grass attributes would now be used. More... | |
bool | SupplyVegPatchy (int a_polyref) |
Returns whether the polygon referenced by a_polyref or a_x, a_y has a vegetation type designated as patchy. More... | |
bool | SupplyVegPatchy (int a_x, int a_y) |
Returns whether the polygon referenced by a_polyref or a_x, a_y has a vegetation type designated as patchy. More... | |
bool | SupplyHasTramlines (int a_x, int a_y) |
Returns whether the polygon referenced by a_polyref or a_x, a_y has a vegetation type with tramlines. More... | |
bool | SupplyHasTramlines (int a_polyref) |
Returns whether the polygon referenced by a_polyref or a_x, a_y has a vegetation type with tramlines. More... | |
bool | SupplyJustMownVector (unsigned int a_index) |
Returns the whether the vegetation was mown for the polygon referenced the index to Landscape::m_elems. More... | |
bool | SupplyJustMown (int a_polyref) |
Returns the whether the vegetation was mown for the polygon referenced by a_polyref or a_x, a_y. More... | |
int | SupplyJustSprayedVector (unsigned int a_index) |
Returns whether the polygon referenced by an index to Landscape::m_elems has been sprayed in the last timestep. More... | |
int | SupplyJustSprayed (int a_polyref) |
Returns whether the polygon referenced by a_polyref or a_x, a_y has been sprayed in the last timestep. More... | |
int | SupplyJustSprayed (int a_x, int a_y) |
Returns whether the polygon referenced by a_polyref or a_x, a_y has been sprayed in the last timestep. More... | |
int | SupplyTreeAge (int a_Polyref) |
Returns the tree age for the polygon referenced by a_polyref or a_x, a_y. More... | |
int | SupplyTreeAge (int, int) |
Returns the tree age for the polygon referenced by a_polyref or a_x, a_y. More... | |
int | SupplyVegAge (int a_Polyref) |
Returns the vegetation age for the polygon referenced by a_polyref or a_x, a_y. More... | |
int | SupplyVegAge (int a_x, int a_y) |
Returns the vegetation age for the polygon referenced by a_polyref or a_x, a_y. More... | |
int | SupplyNumberOfFarms () |
Returns the number of farms in the current landscape. More... | |
int | SupplyFarmOwner (int a_x, int a_y) |
Returns the farm owner pointer for the polygon referenced by a_polyref or a_x, a_y. More... | |
int | SupplyFarmOwner (int a_polyref) |
Returns the farm owner pointer for the polygon referenced by a_polyref or a_x, a_y. More... | |
int | SupplyFarmOwnerIndex (int a_x, int a_y) |
Returns the farm owner reference number for the polygon referenced by a_polyref or a_x, a_y. More... | |
int | SupplyFarmOwnerIndex (int a_polyref) |
Returns the farm owner reference number for the polygon referenced by a_polyref or a_x, a_y. More... | |
TTypesOfFarm | SupplyFarmType (int a_polyref) |
Returns the farm type for the polygon referenced by a_polyref or a_x, a_y. More... | |
TTypesOfFarm | SupplyFarmType (int a_x, int a_y) |
Returns the farm type for the polygon referenced by a_polyref or a_x, a_y. More... | |
string | SupplyFarmRotFilename (int a_polyref) |
Returns filename for the rotation file (if any) for the polygon referenced by a_polyref or a_x, a_y. More... | |
string | SupplyFarmRotFilename (int a_x, int a_y) |
Returns filename for the rotation file (if any) for the polygon referenced by a_polyref or a_x, a_y. More... | |
int | SupplyFarmArea (int a_polyref) |
Returns the farm area of a farm that owns a particular polygon. More... | |
double | SupplyPolygonAreaVector (int a_polyref) |
Returns the polygon area of a particular polygon using an index to m_elems. More... | |
double | SupplyPolygonArea (int a_polyref) |
Returns the polygon area of a particular polygon referenced by polygon. More... | |
int | SupplyGrainDist () |
Returns m_grain_dist, a binary condition for good or bad years of spilled grain. More... | |
void | SetGrainDist (int a_dist) |
Sets m_grain_dist, a binary condition for good or bad years of spilled grain. More... | |
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... | |
bool | SupplyInStubble (int a_polyref) |
Returns whether its cereal in stubble. 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 | RecordGooseRoostDist (int a_polyref, int a_dist, GooseSpecies a_goose) |
Records the distance to the closest roost of goose species. 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 | GetQuarryNumbers (int a_poly) |
This returns the number of geese which are legal quarry 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) |
Returns the last treatment recorded for the polygon. More... | |
int | SupplyLastTreatment (int a_x, int a_y, int *a_index) |
Returns the last treatment recorded for the polygon. More... | |
double | GetHareFoodQuality (int a_polygon) |
Returns the hare food quality of polygons LKM. More... | |
double | SupplyGlobalRadiation () |
Passes a request on to the associated Weather class function, the global amount of sunshine for the current day. More... | |
double | SupplyGlobalRadiation (long a_date) |
Passes a request on to the associated Weather class function, the global mean amount of sunshine for the current day. More... | |
double | SupplyRain (void) |
Passes a request on to the associated Weather class function, the amount of rain for the current day. More... | |
double | SupplyTemp (void) |
Passes a request on to the associated Weather class function, the temperature for the current day. More... | |
double | SupplyMinTemp (void) |
Passes a request on to the associated Weather class function, the minimum temperature for the current day. More... | |
double | SupplyMaxTemp (void) |
Passes a request on to the associated Weather class function, the maximum temperature for the current day. More... | |
double | SupplyMinTempYesterday (void) |
Passes a request on to the associated Weather class function, the minimum temperature for yesterday. More... | |
double | SupplyMaxTempYesterday (void) |
Passes a request on to the associated Weather class function, the maximum temperature for yesterday. More... | |
double | SupplyMinTempTomorrow (void) |
Passes a request on to the associated Weather class function, the minimum temperature for tomorrow. More... | |
double | SupplyMaxTempTomorrow (void) |
Passes a request on to the associated Weather class function, the maximum temperature for tomorrow. More... | |
double | SupplySoilTemp (void) |
Passes a request on to the associated Weather class function, the soil temperature for the current day. More... | |
double | SupplyHumidity (void) |
Passes a request on to the associated Weather class function, the mean humidity for the current day. More... | |
double | SupplyMeanTemp (long a_date, unsigned int a_period) |
Passes a request on to the associated Weather class function, the mean temperature for the current day. More... | |
double | SupplyWind (void) |
Passes a request on to the associated Weather class function, the wind speed for the current day. More... | |
int | SupplyWindDirection (void) |
Passes a request on to the associated Weather class function, the wind direction in 4 directions for the current day. More... | |
int | SupplyWindDirection8 (void) |
Passes a request on to the associated Weather class function, the wind direction in 8 directions for the current day. More... | |
double | SupplyWindDirectionRadians (void) |
Passes a request on to the associated Weather class function, the wind direction in radians for the current day. More... | |
double | SupplySnowDepth (void) |
Passes a request on to the associated Weather class function, the snow depth for the current day. More... | |
bool | SupplySnowcover (void) |
Passes a request on to the associated Weather class function, the snow cover for the current day. More... | |
int | SupplyDaylength (void) |
Passes a request on to the associated Weather class function, the day length for the current day. More... | |
double | SupplyTempHour (int hour) |
Returns the temperature in a given hour (0 to 23) More... | |
double | SupplySoilTempHour (int hour) |
Returns the soil temperature in a given hour (0 to 23) More... | |
double | SupplyWindHour (int hour) |
Returns the wind speed in a given hour (0 to 23) More... | |
double | SupplyRainHour (int hour) |
Returns the amount of rain in a given hour (0 to 23) More... | |
double | SupplyRadiationHour (int hour) |
Returns the amount of sunshine in a given hour (0 to 23) More... | |
double | SupplyRain (long a_date) |
Passes a request on to the associated Weather class function, the amount of rain for all dates. More... | |
double | SupplyTemp (long a_date) |
Passes a request on to the associated Weather class function, the temperature for all dates. More... | |
double | SupplySoilTemp (long a_date) |
Passes a request on to the associated Weather class function, the soil temperature for all dates. More... | |
double | SupplyWind (long a_date) |
Passes a request on to the associated Weather class function, the wind speed for all dates. More... | |
double | SupplyDayDegrees (int a_polyref) |
Passes a request on to the associated Weather class function, the day degrees for all dates. More... | |
double | SupplyRainPeriod (long a_date, int a_period) |
Passes a request on to the associated Weather class function, the total amount of rain from a_date and a_period of days. More... | |
double | SupplyWindPeriod (long a_date, int a_period) |
Passes a request on to the associated Weather class function, the total wind speed from a_date and a_period of days. More... | |
double | SupplyTempPeriod (long a_date, int a_period) |
Passes a request on to the associated Weather class function, the total temperature from a_date and a_period of days. More... | |
bool | SupplySnowcover (long a_date) |
Passes a request on to the associated Weather class function, the snow cover for the current day. More... | |
int | SupplyPolyRef (int a_x, int a_y) |
Get the in map polygon reference number from the x, y location. More... | |
int | SupplyUMRef (int a_x, int a_y) |
Get the unsprayed margin reference number from the polygon at x,y. More... | |
LE * | SupplyPolyLEptr (int a_x, int a_y) |
Get the pointer to the LE object associated with the polygon at x,y location or by using the polygon reference. More... | |
LE * | SupplyPolyLEptr (int a_polyref) |
Get the pointer to the LE object associated with the polygon at x,y location or by using the polygon reference. More... | |
int | SupplyPolyRefIndex (int a_x, int a_y) |
Get the index to the m_elems array for a polygon at location x,y. More... | |
int | SupplyPolyRefCC (int a_x, int a_y) |
Get the in map polygon reference number from the x,y location, and correcting for possible wrap around coordinates. More... | |
vector< LE * > * | SupplyPolyListPtr () |
Returns the pointer to m_elemns. More... | |
int | SupplySimAreaWidth (void) |
Gets the simulation landscape width. More... | |
int | SupplySimAreaHeight (void) |
Gets the simulation landscape height. More... | |
int | SupplySimAreaMaxExtent (void) |
Returns which ever is larger, height or width of simulation landscape. More... | |
int | SupplySimAreaMinExtent (void) |
Returns which ever is smaller, height or width of simulation landscape LKM - used?? More... | |
int | SupplyDaylength (long a_date) |
Passes a request on to the associated Calendar class function, the day length. More... | |
int | SupplyDayInYear (void) |
Passes a request on to the associated Calendar class function, the day in the year. More... | |
int | SupplyHour (void) |
Passes a request on to the associated Calendar class function, the hour of the day. More... | |
int | SupplyMinute (void) |
Passes a request on to the associated Calendar class function, the minute of the hour. More... | |
unsigned int | SupplyNumberOfPolygons (void) |
Returns the number of polygons in the landscape. More... | |
TTypesOfLandscapeElement | SupplyElementTypeFromVector (unsigned int a_index) |
Gets the TTypesOfVegetation type of a polygon using the m_elems. More... | |
TTypesOfLandscapeElement | SupplyOwner_tole (int a_x, int a_y) |
Gets the farm owner reference of a polygon, or -1 if not owned by a farmer. More... | |
int | SupplyPolyRefVector (unsigned int a_index) |
Gets the polygon reference number from the index to m_elems. More... | |
int | SupplyPesticideCell (int a_polyref) |
Gets the index to the cell used to store pesticide information from the coordinates x, y. More... | |
int | SupplyValidX (int a_polyref) |
Returns an x-coordinate guaranteed to be within the polygon referenced. More... | |
int | SupplyValidY (int a_polyref) |
Returns an y-coordinate guaranteed to be within the polygon referenced. More... | |
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) |
Function to prevent wrap around errors with width LKM. More... | |
int | CorrectHeight (int y) |
Function to prevent wrap around errors with height LKM. More... | |
void | SetPolyMaxMinExtents (void) |
Sets MapValid as true for each polygon found. More... | |
void | CalculateCentroids (void) |
Calculate centroid for each polygon found. More... | |
void | DumpCentroids (void) |
Saves centroid information for each polygon found. More... | |
void | BuildingDesignationCalc () |
used to calculate whether a building as rural or town - for rodenticide use More... | |
void | CentroidSpiralOut (int a_polyref, int &a_x, int &a_y) |
Function to move from midx & midy and outwards in concentric circles until a location that matches the polyref is found LKM. More... | |
const char * | SupplyVersion (void) |
Returns version info LKM. More... | |
void | DumpPublicSymbols (const char *a_dumpfile, CfgSecureLevel a_level) |
Dumps all configuration values with a security level at or below a_level to a_dumpfile in alphabetical order. More... | |
void | DumpAllSymbolsAndExit (const char *a_dumpfile) |
Dumps all configuration values, including private ones, to a_dumpfile and then calls exit() More... | |
bool | ReadSymbols (const char *a_cfgfile) |
Reads and parses a_cfgfile for configuration values. More... | |
void | DumpMapInfoByArea (const char *a_filename, bool a_append, bool a_dump_zero_areas, bool a_write_veg_names) |
Dumps landscape information by area LKM. More... | |
void | Warn (std::string a_msg1, std::string a_msg2) |
Wrapper for the g_msg Warn function. More... | |
int * | SupplyMagicMapP (int a_x, int a_y) |
Returns a pointer to the map at position x, y. The value found through it is an internal number from the landscape simulator, that uniquely identifies a polygon, it is not the polygon number - to find this apply MagicMap2PolyRef. More... | |
int | MagicMapP2PolyRef (int a_magic) |
Converts the internal number generated from SupplyMagicMapP to the polygon number. More... | |
int | SupplyRoadWidth (int, int) |
Returns the width of roads. More... | |
double | SupplyTrafficLoad (int a_x, int a_y) |
Returns the traffic load. More... | |
double | SupplyTrafficLoad (int a_polyref) |
Returns the traffic load. More... | |
int | SupplyTreeHeight (int, int) |
Returns the height of trees. More... | |
int | SupplyUnderGrowthWidth (int, int) |
Returns the width of undergrowth. More... | |
int | SupplyTreeHeight (int) |
Returns the height of trees. More... | |
int | SupplyUnderGrowthWidth (int) |
Returns the width of undergrowth. More... | |
long | SupplyGlobalDate (void) |
Passes a request on to the associated Calendar class function, returns the simulation global date for the day, month and year supplied. More... | |
int | SupplyYear (void) |
Passes a request on to the associated Calendar class function, returns m_year. More... | |
int | SupplyYearNumber (void) |
Passes a request on to the associated Calendar class function, returns m_simulationyear More... | |
int | SupplyMonth (void) |
Passes a request on to the associated Calendar class function, returns m_month + 1 (the calendar month) More... | |
std::string | SupplyMonthName (void) |
Passes a request on to the associated Calendar class function, returns the month name (e.g., January) More... | |
int | SupplyDayInMonth (void) |
Passes a request on to the associated Calendar class function, returns m_day_in_month More... | |
double | SupplyDaylightProp () |
Passes a request on to the associated Calendar class function, returns m_daylightproportion More... | |
double | SupplyNightProp () |
Passes a request on to the associated Calendar class function, returns 1.0 - m_daylightproportion More... | |
void | SupplyLEReset (void) |
Resets internal state for the LE loop generator. More... | |
int | SupplyLENext (void) |
Returns -1 at if the end of the list of m_elems is reached, polyref otherwise. More... | |
int | SupplyLECount (void) |
Returns number of all landscape elements. More... | |
LE_Signal | SupplyLESignal (int a_polyref) |
Returns current signal mask for polygon. More... | |
void | SetLESignal (int a_polyref, LE_Signal a_signal) |
Writes the mask back out to the polygon. More... | |
void | IncTreatCounter (int a_treat) |
Records that a farm treatment of the type specified has occurred. More... | |
TTypesOfLandscapeElement | TranslateEleTypes (int EleReference) |
Returns element type translated from the ALMaSS reference number. More... | |
TTypesOfVegetation | TranslateVegTypes (int VegReference) |
Returns vegetation type translated from the ALMaSS reference number. More... | |
TTypesOfLandscapeElement | TranslateEleTypesFromString (string EleReference) |
Returns element type translated from the ALMaSS reference string. More... | |
LE * | SupplyLEPointer (int a_polyref) |
Returns a pointer to the object referred to by the polygon number. More... | |
int | BackTranslateEleTypes (TTypesOfLandscapeElement EleReference) |
Returns the ALMaSS reference number translated from the TTypesOfLandscapeElement type. More... | |
int | BackTranslateVegTypes (TTypesOfVegetation VegReference) |
Returns the ALMaSS reference number translated from the TTypesOfVegetation type. More... | |
std::string | EventtypeToString (int a_event) |
Returns the text representation of a treatment type. More... | |
std::string | PolytypeToString (TTypesOfLandscapeElement a_le_type) |
Returns the text representation of a TTypesOfLandscapeElement type. More... | |
std::string | VegtypeToString (TTypesOfVegetation a_veg) |
Returns the text representation of a TTypesOfVegetation type. More... | |
std::string | CropTypeToString (TTypesOfCrops a_crop) |
Returns the text representation of a TTypesOfCrops type. More... | |
std::string | FarmtypeToString (TTypesOfFarm a_farmtype) |
Returns the text name of a TTypesOfFarm type. More... | |
Public Attributes | |
int | m_grain_dist |
Declaration of attribute, m_grain_dist, a binary condition for good or bad years of spilled grain. More... | |
Protected Member Functions | |
void | GISASCII_Output (string outpfile, int UTMX, int UTMY) |
Write ASCII file of the ALMaSS map. More... | |
int | ReadPolys1 (const char *a_polyfile) |
Is used to take a look in the input file for polygons to figure out what the format is (since multiple formats are allowed) More... | |
void | ReadFlowerSpeciesComp (const char *a_flower_file) |
This function is to read the habitat species composition for flower resource. More... | |
void | ReadPolys2 (const char *a_polyfile, int a_format) |
Based on the format of the file (since multiple formats are allowed), this reads the polygon information from an input file. This method sets up the Landscape::m_polymapping lookup table, checks validity of polygon and associated farm information and creates the LE instances to populate the Landscape::m_elems array, and if needed creates the links between unsprayed margins and the owner tole type. More... | |
void | PolysValidate (bool a_exit_on_invalid) |
Checks for internal consistency in the polygon information, e.g. being sure that all polygons mentioned are actually in the map. More... | |
bool | PolysRemoveInvalid (void) |
Checks whether all polygons are in the map, removing those that are not. More... | |
void | PolysDump (const char *a_filename) |
Called if the landscape is manipulated to save the new version of the polyref input file. More... | |
void | DumpMap (const char *a_filename) |
Called if the landscape is manipulated to save the new version of the.lsb input file(i.e.the topographical map) More... | |
void | ConsolidatePolys (void) |
Used to replace polygons or combine them when there is no special management associated with them.This just reduces the number of polygon entries and saves time and space. More... | |
void | CountMapSquares (void) |
Calculates the area for each polygon in the mapand stores it in LE::m_squares_in_map. More... | |
void | PolysRenumber (void) |
Renumbers the polygons from 0 to the number of LE instances - 1. This saves space, and also means that the polygon number becomes the same as the index in Landscape::m_elems, allowing quicker lookup(reduces indirection by 1) More... | |
void | RebuildPolyMapping () |
Called if there is any change in the polygons and loops through all polygons resetting the Landscape::m_polymapping value. More... | |
void | ForceArea (void) |
Check of polygon areas. Each polygon should be present in the map with the correct area recorded, otherwise this method raises an error. More... | |
void | ChangeMapMapping (void) |
Maps the polygon numbers directly to the indices in m_elems. More... | |
LE * | NewElement (TTypesOfLandscapeElement a_type) |
NewElement Creates a new LE instance and where possible it will create the highest level in the class hierarchy e.g. tole_Portarea has no behaviour so can be created as a NonVegElement (LE->NonVegElement), removing the need to have a Portarea class. More... | |
void | RemoveMissingValues () |
A method for replacing missing values in the map with corrected ones. More... | |
void | VegDump (int x, int y) |
Records vegetation charateristics for the x, y location. More... | |
void | EventDump (int x, int y, int x2, int y2) |
Records farm events carried out on the x, y locations. More... | |
void | EventDumpPesticides (int x1, int y1) |
Records pesticided application farm events carried out on the x,y location. More... | |
void | DegreesDump () |
Prints the sum of day degrees. See FarmManager::daydegrees. More... | |
bool | BorderNeed (TTypesOfLandscapeElement a_letype) |
Currently unused test for adding borders. More... | |
int | BorderAdd (LE *a_field, TTypesOfLandscapeElement a_type, int a_allAround=1) |
Adds a border of the specified type (could be an unsprayed margin) around a field More... | |
bool | BorderTest (int a_fieldindex, int a_borderindex, int a_x, int a_y) |
Used to decide if a coordinate location should become a border/unsprayed margin. More... | |
void | BorderRemoval (void) |
Removes field boundaries, hedgebanks and hedges if they are adjacent to a field. More... | |
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 | AddBeetleBanks (TTypesOfLandscapeElement a_tole) |
The starting point for adding beetlebanks to a field (can be used to add ‘banks’ of any tole_type. More... | |
int | AddBeetleBankIfPossible (LE *a_field, TTypesOfLandscapeElement a_tole) |
Determines whether a beetlebank can be added to the field depending on physical characteristics and adds it. More... | |
bool | FindFieldCenter (LE *a_field, int *x, int *y) |
Finds a location in the middle of a field to ‘seed a beetlebank’ More... | |
int | FindLongestAxis (int *x, int *y) |
From a central location finds the longest axis of a field. More... | |
int | FindBestRectangle (int a_polyindex, int *a_x, int *a_y, int *a_width, int *a_x_start, int *a_y_start) |
From a central location finds the biggest rectangle that fits inside the field. More... | |
void | AxisLoop (int a_poly, int *a_x, int *a_y, int a_axis) |
Tests the length of a vector to find when we step outside a given polygon. More... | |
void | AddPatches (TTypesOfLandscapeElement a_tole) |
The starting point for adding patches to a field (can be used to add patches of any tole_type) More... | |
int | AddPatchIfPossible (LE *a_field, TTypesOfLandscapeElement a_tole) |
Determines whether a patch can be added to the field depending on physical characteristics and adds it. More... | |
void | hb_Add (void) |
The entry point for adding hedgebanks. Hedgebanks are created by replacing part of hedge polygons with the tole_HedgeBank If the hedge is wide this will be with a border on each side, if narrow then by inserting hedgebank between trees. More... | |
void | hb_AddNewHedgebanks (int a_orig_poly_num) |
Adds new hedgebanks. More... | |
int | hb_StripingDist (void) |
Striping distribution function for the new hedgebanks LKM. More... | |
void | hb_GenerateHBPolys (void) |
Creates the necessary new hedgebank polygons in Landscape::m_elems. More... | |
void | hb_FindHedges (void) |
Generate a list of polygon numbers for new hedgebank addition. More... | |
bool | hb_FindBoundingBox (int a_poly_num) |
Finds a rectangle that encloses the hedge to be manipulated. More... | |
void | hb_UpPolyNumbers (void) |
Adds a big number to all polygon refs in the map to create space to safely manipulate the hedge pixels. More... | |
void | hb_ClearPolygon (int a_poly_num) |
Replaces all values in the map for a polygon with a temporary value ready for manipulation. More... | |
void | hb_PaintBorder (int a_color) |
Identifies all border hedge pixels. More... | |
bool | hb_MapBorder (int a_x, int a_y) |
Checks for out of bounds hedgebank coordinates. More... | |
bool | hb_HasOtherNeighbour (int a_x, int a_y) |
Checks if a pixel has any non hedge neighbour cell. More... | |
bool | hb_PaintWhoHasNeighbourColor (int a_neighbour_color, int a_new_color) |
Pushes a value to a pixel cell that denotes that is has a neighbour that is not hedge. More... | |
bool | hb_HasNeighbourColor (int a_x, int a_y, int a_neighbour_color) |
Tests for an already process neighbour cell. More... | |
void | hb_MarkTopFromLocalMax (int a_color) |
Used to identify the distance a cell is from the centre of a hedge. More... | |
void | hb_MarkTheBresenhamWay (void) |
‘Paints’ the core of a hedge with a negative number for use in deciding what becomes hedgebank later More... | |
int | hb_MaxUnpaintedNegNeighbour (int a_x, int a_y) |
Determines the width from centre to edge of hedge. More... | |
void | hb_ResetColorBits (void) |
Remove high number colour bits from the map. More... | |
void | hb_RestoreHedgeCore (int a_orig_poly_number) |
LKM. More... | |
void | hb_DownPolyNumbers (void) |
Reverses the process carried out by Landscape::hb_UpPolyNumbers. More... | |
void | DumpMapGraphics (const char *a_filename) |
Saves the graphics for the landscape LKM. More... | |
void | DumpTreatCounters (const char *a_filename) |
When the simulation is closed this method saves the number of each farm management that has been carried out. More... | |
Protected Attributes | |
int | m_treatment_counts [last_treatment] |
Array for containing the treatment counts. More... | |
int | m_LargestPolyNumUsed |
The largest polygon number used. More... | |
vector< int > | m_PondIndexList |
List of pond indexes. More... | |
vector< int > | m_PondRefsList |
List of pond polyrefs. More... | |
vector< int > | hb_hedges |
Declaration of attributes for hedgebanks. More... | |
vector< LE * > | hb_new_hbs |
int | m_x_add [16] |
int | m_y_add [16] |
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 |
A flag indicating whether pesticide should be sprayed. More... | |
int | le_signal_index |
Index for the LE signal loop. More... | |
std::string | m_countryCode = "None" |
Declaration of attributes for country and coordinates. More... | |
double | m_latitude = -1 |
double | m_longitude = -1 |
bool | m_firstyear |
Flag to indicate the that the first year is run (i.e. before simulation starts) More... | |
string | LandscapeName |
A holder for the landscape name for output if needed. More... | |
Private Member Functions | |
void | GrainDump () |
Records total amount of grain / seed / maize available as forage for each polygon. More... | |
Private Attributes | |
std::vector< omp_nest_lock_t * > | m_poly_omp_locks |
The locks for all the polygon. More... | |
char | m_versioninfo [30] |
Version info. Initialized by the constructor. More... | |
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... | |
vector< int > | m_polymapping |
vector< int > | m_poly_with_flowers |
PesticideMap * | m_PesticideMap = nullptr |
For specialised pesticide recording. More... | |
PesticideTable * | m_PesticideTable = nullptr |
For specialised pesticide recording. More... | |
PestIncidenceManager * | m_PestIncidenceManager |
A pest incidence manager. More... | |
double | m_pestincidencefactor |
int | m_width |
Declaration of attributes for correcting coordinates before modulus operations, saves an indirection when doing inline function calls. More... | |
int | m_height |
Area length. More... | |
int | m_width10 |
Area width times 10. More... | |
int | m_height10 |
Area length times 10. More... | |
int | m_minmaxextent |
Area minimum extent, the smallest value of m_width or m_height More... | |
int | m_maxextent |
Area maximum extent, the largest value of m_width or m_height More... | |
int | m_area |
Area of the whole landscape. More... | |
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 |
A flag to signal that missing polygons exist. More... | |
double * | l_vegtype_areas |
For veg area dumps. More... | |
PopulationManagerList * | m_ThePopManagerList |
A pointer to the current main population manager. More... | |
RodenticideManager * | m_RodenticideManager |
A pointer to the rodenticide manager. More... | |
RodenticidePredators_Population_Manager * | m_RodenticidePreds |
A pointer to the Rodenticide predators population´manager. More... | |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_PF |
A curve relating goose intake rates in KJ/min to vegetation height for Pink-footed Goose (PF) More... | |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_BG |
A curve relating goose intake rates in KJ/min to vegetation height for Barnacle Goose (BG) More... | |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_GL |
A curve relating goose intake rates in KJ/min to vegetation height for Greylag Goose (GL) More... | |
std::map< int, vector< int > > | m_habitat_species |
This the dictionary to store the composition of species for every habitat type. More... | |
std::map< int, vector< double > > | m_habitat_flower_num |
This is the dictionary to store the proportion of each composition for every habitat. More... | |
std::map< int, PollenNectarData > | m_habitat_pollen |
This is the dictionary to store the pollen data of each habitat type for the given day. More... | |
std::map< int, PollenNectarData > | m_habitat_nectar |
This is the dictionary to store the nectar data of each habitat type fo the given day. More... | |
std::map< int, vector< APoint > > | m_poly_cell_locs |
This is the dictionary to store all the locations for each polygon. More... | |
std::map< int, vector< APoint > > | m_poly_cell_locs_pollen |
This is the dictionary to store all the locations used for quick access to pollen. More... | |
std::map< int, int > | m_index_locs_pollen |
This is the dictionary to store all the index in m_poly_cell_locs_pollen start from which there is no pollen available. More... | |
std::map< int, vector< APoint > > | m_poly_cell_locs_nectar |
This is the dictionary to store all the locations used for quick access to nectar. More... | |
std::map< int, int > | m_index_locs_nectar |
This is the dictionary to store all the index in m_poly_cell_locs_nectar start from which there is no nectar available. More... | |
Eigen::MatrixXf | m_pollen_map |
This is the matrix to store the pollen proportion (0-1) left for each cell. More... | |
Eigen::MatrixXf | m_nectar_map |
This is the matrix to store the nectar proportion (0-1) left for each cell. More... | |
Eigen::ArrayXXf | m_biomass_map |
This is the array to store the green biomass for each cell. More... | |
Eigen::ArrayXXi | m_polyid_map |
This is the array to store the polygon ID for each cell. More... | |
std::vector< std::vector< std::vector< int > > > | m_map_polyid_within_dist |
This is the vector to store all the polygon IDs within a certain distance to each location in a landscape. More... | |
The landscape class containing all environmental and topographical data.
Landscape::~Landscape | ( | void | ) |
Landscape::Landscape | ( | bool | dump_exit = true | ) |
The landscape constructor sets up all the mapping, environment and management for the landscape simulation.
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.
After the main structure is created the constructor can carry out optional more complex manipulations. These are adding hedgebanks, field boundaries, softening orchard boundaries, adding unsprayed margins, and adding beetlebanks.
After special manipulations the graphics for the landscape can be saved.
If there were any structural changes to the map by the time the execution reaches towards the end of the constructor, then a series of checks are run, before the map is saved as a new map with a _dump added to the end of the current map name. This ensures that the saved map is internally consistent.
Counts up the ponds and store them, at this point the constructor is finished with structural polygon handling.
The Farm managment is then initiated, which means that from this point all polygons will have a type of vegetation allocated. Once all polygons have their tov types, the attributes based on tov type are set.
There are a number of options to dump vegetation, event etc. information if selected, this depends on different configureation variables as needed.
If rodenticide handling is enabled then rodenticide mapping provides access to predicted relative density of poisoned rodents per unit area. To do this the constructor creates a RodenticideManager and a RodenticidePredators_Population_Manager
Optional output files are created here as needed depending on defines or config variables
There is a also some special set up required for some species models which is done at the end of the constructor
References LE_TypeClass::BackTranslateEleTypes(), cfg_AddBeetleBanks, cfg_AddPatches, cfg_B6A, cfg_B6B, cfg_B6C, cfg_B6D, cfg_B6E, cfg_B6F, cfg_B6G, cfg_B6H, cfg_BeetleBankType, cfg_DumpFarmAreas, cfg_dumpvegjan, cfg_dumpvegjanfile, cfg_dumpvegjune, cfg_dumpvegjunefile, cfg_FarmAreaPercentage, cfg_farmeventfile, cfg_G6A, cfg_G6B, cfg_G6C, cfg_G6D, cfg_G6E, cfg_G6F, cfg_G6G, cfg_G6H, cfg_habitat_polnek_file, cfg_HedgeSubtypeMaximum, cfg_HedgeSubtypeMinimum, cfg_MaxPondSize, cfg_P1A, cfg_P1B, cfg_P1C, cfg_P1D, cfg_P1E, cfg_P1F, cfg_P1G, cfg_P1H, cfg_PatchesType, cfg_pesticidemapcellsize, cfg_pesticidemapnoyears, cfg_pesticidemapon, cfg_pesticidemapstartyear, cfg_pesticidemaptype, cfg_pesticidetableon, cfg_pesticidetesttype, cfg_PestIncidenceMax, cfg_PestIncidenceMin, cfg_pollen_nectar_on, cfg_rodenticide_enable, cfg_total_polnek_file, cfg_tov_polnek_file, cfg_WriteCurve, LE::DoCopy(), g_date, g_landscape_ptr, g_letype, g_map_le_border_chance, g_map_le_border_limited, 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_umargin_min_field_size, g_map_le_unsprayedmargins, g_map_olivetree_borders, g_map_orchards_borders, g_msg, g_random_fnc(), g_speedy_Divides, l_map_art_hedgebanks, l_map_ascii_utm_x, l_map_ascii_utm_y, l_map_calc_openness, l_map_consolidatepolys, l_map_dump_enable, l_map_dump_event_enable, l_map_dump_gfx_enable, l_map_dump_gfx_file, l_map_dump_grain_enable, l_map_dump_veg_enable, l_map_map_file, l_map_nectarpollencomposition, l_map_no_pesticide_fields, l_map_poly_file, l_map_print_git_version_info, l_map_print_version_info, l_map_removesmallpolygons, l_map_write_ascii, last_treatment, RasterMap::MapWidth(), Calendar::Reset(), LE::SetArea(), VegElement::SetBiomassScalers(), LE::SetCentroid(), LE::SetOpenness(), LE::SetPoly(), LE::SetSoilType(), LE::SetUnsprayedMarginPolyRef(), tole_Field, tole_Freshwater, tole_HedgeBank, tole_Hedges, tole_Missing, tole_OliveGrove, tole_Orchard, tole_Pond, tole_UnsprayedFieldMargin, tole_Wasteland, tov_Undefined, LE_TypeClass::TranslateEleTypes(), CfgInt::value(), CfgFloat::value(), CfgBool::value(), CfgStr::value(), version_date, version_major, version_minor, version_revision, MapErrorMsg::Warn(), WARN_BUG, WARN_FILE, WARN_MSG, MapErrorMsg::WarnAddInfo(), and CurveClass::WriteDataFile().
|
protected |
Determines whether a beetlebank can be added to the field depending on physical characteristics and adds it.
Beetle bank placement rules are:
Field is above cfg_BeetleBankMaxDistance (default = 150m) long and wide Beetle banks are place along the long direction of the field
References LE::AddArea(), LE_TypeClass::BackTranslateEleTypes(), cfg_BeetleBankMaxDistance, cfg_BeetleBankWidth, cfg_FlowerStripPollenNectarCurveNum, g_letype, LE::GetAspect(), LE::GetCentroidX(), LE::GetCentroidY(), LE::GetElevation(), Farm::GetFarmNumber(), LE::GetOwner(), LE::GetOwnerIndex(), LE::GetPoly(), LE::GetSlope(), m_polymapping, LE::SetArea(), LE::SetAspect(), LE::SetElevation(), LE::SetMapIndex(), LE::SetMapValid(), LE::SetOwner(), LE::SetPollenNectarCurveRef(), LE::SetPoly(), LE::SetSlope(), LE::SetValidXY(), VegElement::SetVegPatchy(), and CfgInt::value().
|
protected |
The starting point for adding beetlebanks to a field (can be used to add ‘banks’ of any tole_type.
Beetle-bank addition - tests whether we can add a bank (or more) 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
References cfg_BeetleBankChance, cfg_BeetleBankInvert, cfg_BeetleBankMaxX, cfg_BeetleBankMaxY, cfg_BeetleBankMinX, cfg_BeetleBankMinY, cfg_FarmAreaPercentage, g_msg, g_random_fnc(), tole_Field, CfgInt::value(), CfgBool::value(), MapErrorMsg::Warn(), and WARN_MSG.
|
protected |
The starting point for adding patches to a field (can be used to add patches of any tole_type)
Patches addition - tests whether we can add a patch 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 patch. This will depend on the probabilities and the size of the field. To provide for more flexibilty, a tole_type is passed, and patches may be created of any tole_type.
References cfg_FarmAreaPercentage, g_msg, tole_Field, CfgInt::value(), MapErrorMsg::Warn(), and WARN_MSG.
|
protected |
Determines whether a patch can be added to the field depending on physical characteristics and adds it.
Patch placement rules are:
The field is above 1 / (cfg_PatchesFieldAreaMaxPercentage * 0.01) * cfg_PatchesMinWidth ** 2 m2 (default is 1/0.15 * 10**2 = 666 m2. The patch can not be bigger than cfg_PatchesMaxWidth ** 2 m2 (default is 100**2 = 10.000 m2) Patches are place in the middle of the field
References LE::AddArea(), LE_TypeClass::BackTranslateEleTypes(), cfg_FlowerStripPollenNectarCurveNum, cfg_PatchesFieldAreaMaxPercentage, cfg_PatchesFreeMargin, cfg_PatchesMaxWidth, cfg_PatchesMinWidth, g_letype, LE::GetArea(), LE::GetAspect(), LE::GetCentroidX(), LE::GetCentroidY(), LE::GetElevation(), LE::GetPoly(), LE::GetSlope(), m_polymapping, LE::SetArea(), LE::SetAspect(), LE::SetElevation(), LE::SetMapIndex(), LE::SetMapValid(), LE::SetPollenNectarCurveRef(), LE::SetPoly(), LE::SetSlope(), LE::SetValidXY(), LE::SetVegPatchy(), and CfgInt::value().
|
protected |
Tests the length of a vector to find when we step outside a given polygon.
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.
|
inline |
Returns the ALMaSS reference number translated from the TTypesOfLandscapeElement type.
References LE_TypeClass::BackTranslateEleTypes(), and g_letype.
Referenced by Vole_Base::Set_ElemBorn().
|
inline |
Returns the ALMaSS reference number translated from the TTypesOfVegetation type.
References LE_TypeClass::BackTranslateVegTypes(), and g_letype.
Referenced by Vole_Base::Set_VegBorn().
|
protected |
Adds a border of the specified type (could be an unsprayed margin) around a field
References LE::AddArea(), cfg_FlowerStripPollenNectarCurveNum, g_map_le_borderwidth, g_map_le_minfieldwidth, LE::GetAspect(), LE::GetBorder(), LE::GetCentroidX(), LE::GetCentroidY(), LE::GetElevation(), Farm::GetFarmNumber(), LE::GetMaxX(), LE::GetMaxY(), LE::GetMinX(), LE::GetMinY(), LE::GetOwner(), LE::GetOwnerIndex(), LE::GetPoly(), LE::GetSlope(), l_map_umargin_width, m_polymapping, LE::SetAspect(), LE::SetBorder(), LE::SetElevation(), LE::SetMapIndex(), LE::SetMapValid(), LE::SetOwner(), LE::SetPollenNectarCurveRef(), LE::SetPoly(), LE::SetSlope(), LE::SetUnsprayedMarginPolyRef(), tole_UnsprayedFieldMargin, and CfgInt::value().
|
protected |
Currently unused test for adding borders.
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_Fence, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_FlowerStrip, tole_FlowerStripWithRotation, tole_Freshwater, tole_Garden, tole_Heath, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_MixedForest, tole_MownGrassStrip, 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_RiversideTrees, tole_RoadsideSlope, tole_Saltmarsh, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_UrbanVeg, tole_Vildtager, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_BUG.
|
protected |
Removes field boundaries, hedgebanks and hedges if they are adjacent to a field.
Removes field boundaries, hedgebanks and hedges if they are adjacent to a field . This can be used for example if we want to be sure of the amount of added elements or their width.
References tole_Field, tole_FieldBoundary, tole_FlowerStrip, tole_HedgeBank, and tole_Hedges.
|
protected |
Used to decide if a coordinate location should become a border/unsprayed margin.
References cfg_BordersBetweenFields, cfg_BordersNextToFieldBoundary, g_landscape_ptr, SupplyElementTypeFromVector(), tole_Field, tole_FieldBoundary, tole_IndividualTree, tole_Pylon, tole_WindTurbine, and CfgBool::value().
void Landscape::BuildingDesignationCalc | ( | ) |
used to calculate whether a building as 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.
References cfg_mintownbuildingdistance, cfg_mintownbuildingnumber, tole_Building, tole_ConiferousForest, tole_DeciduousForest, tole_MixedForest, tole_YoungForest, and CfgInt::value().
void Landscape::CalculateCentroids | ( | void | ) |
Calculate centroid for each polygon found.
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.
int Landscape::CalculateFieldOpennessAllCells | ( | 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.
int Landscape::CalculateFieldOpennessCentroid | ( | 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.
vector< vector< int > > Landscape::CalculateMaskCorners | ( | int | a_centroid_x, |
int | a_centroid_y, | ||
int | a_half_width | ||
) |
The function to calculate the corners of mask(s) for the given centroid and half-width with wrapping around.
Referenced by Osmia_Female::Forage().
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
References tole_Field, tole_Marsh, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, and tole_Scrub.
void Landscape::CalHaibitatFlowerResource | ( | ) |
Calculate the flower resouce for all the habitat types with flower resource.
References cfg_FlowerStripStartFloweringTimePush, g_nectarpollen, PollenNectarData::m_quality, PollenNectarData::m_quantity, PollenNectarDevelopmentData::supplyNectarHabitatSpeciesCurrentDay(), PollenNectarDevelopmentData::supplyNectarHabitatSpeciesGivenDay(), PollenNectarDevelopmentData::supplyPollenHabitatSpeciesCurrentDay(), PollenNectarDevelopmentData::supplyPollenHabitatSpeciesGivenDay(), and CfgInt::value().
void Landscape::CentroidSpiralOut | ( | int | a_polyref, |
int & | a_x, | ||
int & | a_y | ||
) |
Function to move from midx & midy and outwards in concentric circles until a location that matches the polyref is found LKM.
References g_msg, and MapErrorMsg::Warn().
|
protected |
Maps the polygon numbers directly to the indices in m_elems.
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.
References m_polymapping, PEST_GRIDSIZE, and PEST_GRIDSIZE_POW2.
void Landscape::CheckForPesticideRecord | ( | LE * | a_field, |
TTypesOfPesticideCategory | a_pcide | ||
) |
Check if needed and record pesticide application.
a_pcide can be insecticides, herbicides or fungicides, or it can be a 'test' pesticide
References cfg_pesticidemapon, cfg_pesticidemaptype, cfg_pesticidetableon, insecticide, testpesticide, and CfgBool::value().
Referenced by Farm::FungicideTreat(), Farm::HerbicideTreat(), Farm::InsecticideTreat(), Farm::Molluscicide(), and Farm::ProductApplication().
bool Landscape::ClassificationFieldType | ( | TTypesOfLandscapeElement | a_tole | ) |
Returns whether the polygon is classfied as a field.
References tole_AgroForestrySystem, tole_AlmondPlantation, tole_AsparagusPerm, tole_BushFruit, tole_ChestnutForest, tole_ChristmasTrees, tole_CorkOakForest, tole_EnergyCrop, tole_EucalyptusForest, tole_FarmBufferZone, tole_FarmFeedingGround, tole_FarmForest, tole_FarmYoungForest, tole_Field, tole_FlowersPerm, tole_GreenFallow, tole_HolmOakForest, tole_MaritimePineForest, tole_MontadoCorkOak, tole_MontadoHolmOak, tole_MontadoMixed, tole_MushroomPerm, tole_NaturalFarmGrass, tole_OAsparagusPerm, tole_OBushFruit, tole_OChristmasTrees, tole_OEnergyCrop, tole_OFarmForest, tole_OFarmYoungForest, tole_OliveGrove, tole_OOrchard, tole_OPermPasture, tole_OPermPastureLowYield, tole_OPermPasturePigs, tole_Orchard, tole_OtherOakForest, tole_OtherPermCrop, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPasturePigs, tole_PermPastureTussocky, tole_PermPastureTussockyWet, tole_PlantNursery, tole_RiceField, tole_StonePineForest, tole_Vineyard, tole_WalnutPlantation, tole_WoodyEnergyCrop, and tole_YoungForest.
Referenced by IsFieldType().
bool Landscape::ClassificationForest | ( | TTypesOfLandscapeElement | a_tole | ) |
Returns whether the polygon is classfied as woodland.
References tole_AgroForestrySystem, tole_ChestnutForest, tole_ConiferousForest, tole_Copse, tole_CorkOakForest, tole_DeciduousForest, tole_EucalyptusForest, tole_FarmForest, tole_HolmOakForest, tole_IndividualTree, tole_InvasiveForest, tole_MaritimePineForest, tole_MixedForest, tole_MontadoCorkOak, tole_MontadoHolmOak, tole_MontadoMixed, tole_OFarmForest, tole_OtherOakForest, tole_RiversideTrees, tole_Scrub, tole_StonePineForest, tole_SwampForest, tole_WoodlandMargin, tole_WoodyEnergyCrop, and tole_YoungForest.
Referenced by Set_TOLE_Att().
bool Landscape::ClassificationHigh | ( | TTypesOfLandscapeElement | tole | ) |
Returns whether the polygon is classfied as high.
References tole_ActivePit, tole_Building, tole_BuiltUpWithParkland, tole_Garden, tole_Hedges, tole_Orchard, tole_OrchardBand, tole_PitDisused, tole_PlantNursery, tole_Pylon, tole_RiversideTrees, tole_StoneWall, tole_UrbanNoVeg, tole_UrbanVeg, tole_WindTurbine, and tole_WoodyEnergyCrop.
Referenced by Set_TOLE_Att().
bool Landscape::ClassificationPermCrop | ( | TTypesOfVegetation | a_vege_type | ) |
Returns whether a vegetation type is classified as a permanent crop.
Currently (18/03/2015) only used for goose foraging, so silage maize does not produce grain
References tov_DEAsparagusEstablishedPlantation, tov_DEBushFruitPerm, tov_DEOAsparagusEstablishedPlantation, tov_DEOBushFruitPerm, tov_DEOOrchard, tov_DEOPermanentGrassGrazed, tov_DEOPermanentGrassLowYield, tov_DEOrchard, tov_DEPermanentGrassGrazed, tov_DEPermanentGrassLowYield, tov_DKBushFruit_Perm1, tov_DKBushFruit_Perm2, tov_DKChristmasTrees_Perm, tov_DKGrassTussocky_Perm, tov_DKOChristmasTrees_Perm, tov_DKOOrchApple, tov_DKOOrchCherry, tov_DKOOrchOther, tov_DKOOrchPear, tov_DKOrchApple, tov_DKOrchardCrop_Perm, tov_DKOrchCherry, tov_DKOrchOther, tov_DKOrchPear, tov_DKPlantNursery_Perm, tov_FINaturalGrassland_Perm, tov_NLOrchardCrop, tov_NLPermanentGrassGrazed, tov_NLPermanentGrassGrazedExtensive, tov_OrchardCrop, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetAside, tov_PTCorkOak, tov_PTOliveGroveIntensive, tov_PTOliveGroveSuperIntensive, tov_PTOliveGroveTraditional, tov_PTOliveGroveTradOrganic, tov_PTPermanentGrassGrazed, tov_PTShrubPastures, tov_PTVineyards, and tov_YoungForest.
bool Landscape::ClassificationUrbanNoVeg | ( | TTypesOfLandscapeElement | a_tole | ) |
Returns whether the polygon is classfied as urban with no vegetation.
References tole_ActivePit, tole_Airport, tole_AmenityGrass, tole_Building, tole_Carpark, tole_LargeRoad, tole_MetalledPath, tole_MownGrassStrip, tole_Portarea, tole_RefuseSite, tole_SmallRoad, and tole_UrbanNoVeg.
Referenced by Set_TOLE_Att().
bool Landscape::ClassificationVegCereal | ( | TTypesOfVegetation | a_vege_type | ) |
Returns whether a vegetation type is classified as cereal.
References tov_AgroChemIndustryCereal, tov_DEMaize, tov_DEMaizeSilage, tov_DEOats, tov_DEOMaize, tov_DEOMaizeSilage, tov_DEOOats, tov_DEOTriticale, tov_DEOWinterBarley, tov_DEOWinterRye, tov_DEOWinterWheat, tov_DESpringBarley, tov_DESpringRye, tov_DETriticale, tov_DEWinterBarley, tov_DEWinterRye, tov_DEWinterWheat, tov_DEWinterWheatLate, tov_DKCerealLegume, tov_DKCerealLegume_Whole, tov_DKOCerealLegume, tov_DKOCerealLegume_Whole, tov_DKOSpringBarley, tov_DKOSpringBarley_CC, tov_DKOSpringBarleyCloverGrass, tov_DKOSpringBarleySilage, tov_DKOSpringOats, tov_DKOSpringOats_CC, tov_DKOSpringWheat, tov_DKOWinterBarley, tov_DKOWinterRape, tov_DKOWinterRye, tov_DKOWinterRye_CC, tov_DKOWinterWheat, tov_DKOWinterWheat_CC, tov_DKSpringBarley, tov_DKSpringBarley_CC, tov_DKSpringBarley_Green, tov_DKSpringBarleyCloverGrass, tov_DKSpringBarleySilage, tov_DKSpringOats, tov_DKSpringOats_CC, tov_DKSpringWheat, tov_DKWinterBarley, tov_DKWinterRape, tov_DKWinterRye, tov_DKWinterRye_CC, tov_DKWinterWheat, tov_DKWinterWheat_CC, tov_FIOSpringBarley_Fodder, tov_FIOSpringBarley_Malt, tov_FIOSpringOats, tov_FIOSpringWheat, tov_FIOWinterRye, tov_FIOWinterWheat, tov_FISpringBarley_Fodder, tov_FISpringBarley_Malt, tov_FISpringOats, tov_FISpringWheat, tov_FISprSpringBarley_Fodder, tov_FIWinterRye, tov_FIWinterWheat, tov_FRWinterBarley, tov_FRWinterTriticale, tov_FRWinterWheat, tov_IRSpringBarley, tov_IRSpringOats, tov_IRSpringWheat, tov_IRWinterBarley, tov_IRWinterOats, tov_IRWinterWheat, tov_Maize, tov_MaizeSilage, tov_MaizeStrigling, tov_NLMaize, tov_NLMaizeSpring, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLWinterWheat, tov_Oats, tov_OBarleyPeaCloverGrass, tov_OOats, tov_OSBarleySilage, tov_OSpringBarley, tov_OSpringBarleyClover, tov_OSpringBarleyExt, tov_OSpringBarleyGrass, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_PLMaize, tov_PLMaizeSilage, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_PTMaize, tov_PTMaize_Hort, tov_PTOats, tov_PTSorghum, tov_PTTriticale, tov_PTWinterBarley, tov_PTWinterRye, tov_PTWinterWheat, tov_SESpringBarley, tov_SEWinterWheat, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyGrass, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringWheat, tov_Triticale, tov_UKMaize, tov_UKSpringBarley, tov_UKWinterBarley, tov_UKWinterWheat, tov_WinterBarley, tov_WinterRye, tov_WinterWheat, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, and tov_WWheatPTreatment.
Referenced by Set_TOV_Att(), and SupplyIsCereal2().
bool Landscape::ClassificationVegGooseGrass | ( | TTypesOfVegetation | a_vege_type | ) |
Returns whether a vegetation type is classified as Goose Grass.
References tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_DEOPermanentGrassGrazed, tov_DEOPermanentGrassLowYield, tov_DEPermanentGrassGrazed, tov_DEPermanentGrassLowYield, tov_DKGrassGrazed_Perm, tov_DKGrassLowYield_Perm, tov_DKGrassTussocky_Perm, tov_DKOGrassLowYield_Perm, tov_FIBufferZone, tov_FIBufferZone_Perm, tov_FIFeedingGround, tov_FIGrasslandPasturePerennial1, tov_FIGrasslandPasturePerennial2, tov_FIGrasslandSilageAnnual, tov_FIGrasslandSilagePerennial1, tov_FIGrasslandSilagePerennial2, tov_FIGreenFallow_1year, tov_FIGreenFallow_Perm, tov_FINaturalGrassland, tov_FINaturalGrassland_Perm, tov_FodderGrass, tov_FRGrassland_Perm, tov_IRGrassland_no_reseed, tov_IRGrassland_reseed, tov_NaturalGrass, tov_NLGrassGrazed1, tov_NLGrassGrazed1Spring, tov_NLGrassGrazed2, tov_NLGrassGrazedExtensive1, tov_NLGrassGrazedExtensive1Spring, tov_NLGrassGrazedExtensive2, tov_NLGrassGrazedExtensiveLast, tov_NLGrassGrazedLast, tov_NLPermanentGrassGrazed, tov_NLPermanentGrassGrazedExtensive, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OSeedGrass1, tov_OSeedGrass2, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PLFodderLucerne1, tov_PLFodderLucerne2, tov_PTCloverGrassGrazed1, tov_PTCloverGrassGrazed2, tov_PTGrassGrazed, tov_PTPermanentGrassGrazed, tov_PTRyegrass, tov_PTYellowLupin, tov_SeedGrass1, tov_SeedGrass2, tov_UKPermanentGrass, and tov_UKTempGrass.
Referenced by Set_TOV_Att().
bool Landscape::ClassificationVegGrass | ( | TTypesOfVegetation | a_vege_type | ) |
Returns whether a vegetation type is classified as Grass.
References tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_DEGrasslandSilageAnnual, tov_DEGreenFallow_1year, tov_DEOGrasslandSilageAnnual, tov_DEOGreenFallow_1year, tov_DEOOrchard, tov_DEOPermanentGrassGrazed, tov_DEOPermanentGrassLowYield, tov_DEOrchard, tov_DEPermanentGrassGrazed, tov_DEPermanentGrassLowYield, tov_DKCloverGrassGrazed1, tov_DKCloverGrassGrazed2, tov_DKCloverGrassGrazed3, tov_DKGrassGrazed_Perm, tov_DKGrassLowYield_Perm, tov_DKGrassTussocky_Perm, tov_DKGrazingPigs, tov_DKGrazingPigs_Perm, tov_DKOCloverGrassGrazed1, tov_DKOCloverGrassGrazed2, tov_DKOCloverGrassGrazed3, tov_DKOGrassGrazed_Perm, tov_DKOGrassLowYield_Perm, tov_DKOGrazingPigs, tov_DKOGrazingPigs_Perm, tov_DKOOrchApple, tov_DKOOrchCherry, tov_DKOOrchOther, tov_DKOOrchPear, tov_DKOptimalFlowerMix1, tov_DKOptimalFlowerMix2, tov_DKOptimalFlowerMix3, tov_DKOrchApple, tov_DKOrchardCrop_Perm, tov_DKOrchCherry, tov_DKOrchOther, tov_DKOrchPear, tov_DKOSeedGrassRye_Spring, tov_DKOSetAside, tov_DKOSetAside_SummerMow, tov_DKOSpringFodderGrass, tov_DKOVegSeeds, tov_DKOWinterCloverGrassGrazedSown, tov_DKOWinterFodderGrass, tov_DKPlantNursery_Perm, tov_DKSeedGrassFescue_Spring, tov_DKSeedGrassRye_Spring, tov_DKSetAside, tov_DKSetAside_SummerMow, tov_DKSpringFodderGrass, tov_DKWinterCloverGrassGrazedSown, tov_DKWinterFodderGrass, tov_FIBufferZone, tov_FIBufferZone_Perm, tov_FIFeedingGround, tov_FIGrasslandPasturePerennial1, tov_FIGrasslandPasturePerennial2, tov_FIGrasslandSilageAnnual, tov_FIGrasslandSilagePerennial1, tov_FIGrasslandSilagePerennial2, tov_FIGreenFallow_1year, tov_FIGreenFallow_Perm, tov_FINaturalGrassland, tov_FINaturalGrassland_Perm, tov_FodderGrass, tov_FRGrassland, tov_FRGrassland_Perm, tov_Heath, tov_NaturalGrass, tov_NLOrchardCrop, tov_NLPermanentGrassGrazed, tov_NLPermanentGrassGrazedExtensive, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OrchardCrop, tov_OSeedGrass1, tov_OSeedGrass2, tov_OSetAside, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetAside, tov_PTCloverGrassGrazed1, tov_PTCloverGrassGrazed2, tov_PTCorkOak, tov_PTPermanentGrassGrazed, tov_PTRyegrass, tov_PTSetAside, tov_PTVineyards, tov_PTYellowLupin, tov_SeedGrass1, tov_SeedGrass2, tov_SetAside, tov_UKPermanentGrass, tov_Wasteland, tov_WaterBufferZone, and tov_YoungForest.
Referenced by Beetle_Adult::IsSuitableForHibernation(), Set_TOV_Att(), and SupplyIsGrass2().
bool Landscape::ClassificationVegMaize | ( | TTypesOfVegetation | a_vege_type | ) |
Returns whether a vegetation type is classified as maize.
Currently (18/03/2015) only used for goose foraging, so silage maize does not produce grain
References tov_DEMaize, tov_DEMaizeSilage, tov_DEOMaize, tov_DEOMaizeSilage, tov_DKMaize, tov_DKMaizeSilage, tov_DKOMaize, tov_DKOMaizeSilage, tov_Maize, tov_MaizeSilage, tov_NLMaize, tov_NLMaizeSpring, tov_OMaizeSilage, tov_PLMaize, tov_PLMaizeSilage, tov_PTMaize, tov_PTMaize_Hort, and tov_UKMaize.
Referenced by Set_TOV_Att().
bool Landscape::ClassificationVegMatureCereal | ( | TTypesOfVegetation | a_vege_type | ) |
Returns whether a vegetation type is classified as cereal grown to maturity.
References tov_AgroChemIndustryCereal, tov_DEOats, tov_DEOOats, tov_DEOSpringRye, tov_DEOTriticale, tov_DEOWinterBarley, tov_DEOWinterRye, tov_DEOWinterWheat, tov_DESpringBarley, tov_DESpringRye, tov_DETriticale, tov_DEWinterBarley, tov_DEWinterRye, tov_DEWinterWheat, tov_DEWinterWheatLate, tov_DKCerealLegume, tov_DKCerealLegume_Whole, tov_DKOCerealLegume, tov_DKOCerealLegume_Whole, tov_DKOSpringBarley, tov_DKOSpringBarley_CC, tov_DKOSpringBarleyCloverGrass, tov_DKOSpringBarleySilage, tov_DKOSpringOats, tov_DKOSpringOats_CC, tov_DKOSpringWheat, tov_DKOWinterBarley, tov_DKOWinterRape, tov_DKOWinterRye, tov_DKOWinterRye_CC, tov_DKOWinterWheat, tov_DKOWinterWheat_CC, tov_DKSpringBarley, tov_DKSpringBarley_CC, tov_DKSpringBarley_Green, tov_DKSpringBarleyCloverGrass, tov_DKSpringBarleySilage, tov_DKSpringOats, tov_DKSpringOats_CC, tov_DKSpringWheat, tov_DKWinterBarley, tov_DKWinterRape, tov_DKWinterRye, tov_DKWinterRye_CC, tov_DKWinterWheat, tov_DKWinterWheat_CC, tov_FIOSpringBarley_Fodder, tov_FIOSpringBarley_Malt, tov_FIOSpringOats, tov_FIOSpringWheat, tov_FIOWinterRye, tov_FIOWinterWheat, tov_FISpringBarley_Fodder, tov_FISpringBarley_Malt, tov_FISpringOats, tov_FISpringWheat, tov_FISprSpringBarley_Fodder, tov_FIWinterRye, tov_FIWinterWheat, tov_FRWinterBarley, tov_FRWinterTriticale, tov_FRWinterWheat, tov_IRSpringBarley, tov_IRSpringOats, tov_IRSpringWheat, tov_IRWinterBarley, tov_IRWinterOats, tov_IRWinterWheat, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLWinterWheat, tov_Oats, tov_OOats, tov_OSpringBarley, tov_OSpringBarleyClover, tov_OSpringBarleyExt, tov_OSpringBarleyGrass, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_PTOats, tov_PTSorghum, tov_PTTriticale, tov_PTWinterBarley, tov_PTWinterRye, tov_PTWinterWheat, tov_SESpringBarley, tov_SEWinterWheat, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyGrass, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringWheat, tov_Triticale, tov_UKSpringBarley, tov_UKWinterBarley, tov_UKWinterWheat, tov_WinterBarley, tov_WinterRye, tov_WinterWheat, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, and tov_WWheatPTreatment.
Referenced by Set_TOV_Att().
bool Landscape::ClassificationWater | ( | TTypesOfLandscapeElement | tole | ) |
Returns whether the polygon is classfied as water.
References tole_Canal, tole_DrainageDitch, tole_Freshwater, tole_Pond, tole_River, tole_RiverBed, tole_Saltwater, and tole_Stream.
Referenced by Set_TOLE_Att().
bool Landscape::ClassificationWoody | ( | TTypesOfLandscapeElement | a_tole | ) |
Returns whether the polygon is classfied as woody.
References tole_AlmondPlantation, tole_ChristmasTrees, tole_FarmYoungForest, tole_ForestAisle, tole_HedgeBank, tole_Hedges, tole_OChristmasTrees, tole_OFarmYoungForest, tole_OliveGrove, tole_OOrchard, tole_Orchard, tole_OrchardBand, tole_Vineyard, tole_WalnutPlantation, and tole_WoodyEnergyCrop.
Referenced by Set_TOLE_Att().
|
protected |
Used to replace polygons or combine them when there is no special management associated with them.This just reduces the number of polygon entries and saves time and space.
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.
References g_msg, m_polymapping, 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.
References m_height, m_height10, m_width, and m_width10.
Referenced by Skylark_Female::CheckForFields(), Osmia_Female::FindNestLocation(), Vole_Population_Manager::IsTrap(), and Osmia_Female::st_Dispersal().
|
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
References m_height, m_width, APoint::m_x, and APoint::m_y.
|
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.
References m_height, m_height10, m_width, m_width10, APoint::m_x, and APoint::m_y.
Referenced by Hare_Female::PlaceYoung().
|
inline |
Function to prevent wrap around errors with height LKM.
References m_height, and m_height10.
|
inline |
|
protected |
Calculates the area for each polygon in the mapand stores it in LE::m_squares_in_map.
Runs through the list of polygons in Landscape::m_elems and zeros the areas. Then traverses the entire landscape and counts the number of map squares associated with each polygon, storing this as the polygon area ( LE:m_squares_in_map ).
|
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
References tole_Pond.
std::string Landscape::CropTypeToString | ( | TTypesOfCrops | a_crop | ) |
Returns the text representation of a TTypesOfCrops type.
References toc_AsparagusEstablishedPlantation, toc_Beans, toc_Beans_Whole, toc_Beet, toc_BushFruit, toc_Cabbage, toc_CabbageSpring, toc_Carrots, toc_CarrotsSpring, toc_CatchCropPea, toc_CloverGrassGrazed1, toc_CloverGrassGrazed2, toc_CloverGrassGrazed3, toc_CorkOak, toc_DummyCropPestTesting, toc_Fallow, toc_FarmForest, toc_FieldPeas, toc_FieldPeasSilage, toc_FieldPeasStrigling, toc_FodderBeet, toc_FodderGrass, toc_FodderLucerne1, toc_FodderLucerne2, toc_GenericCatchCrop, toc_GrassGrazed1, toc_GrassGrazed2, toc_GrassGrazedExtensive, toc_GrassGrazedLast, toc_GrazingPigs, toc_Horticulture, toc_Maize, toc_MaizeSilage, toc_MaizeSpring, toc_MaizeStrigling, toc_MixedVeg, toc_None, toc_OAsparagusEstablishedPlantation, toc_Oats, toc_OBarleyPeaCloverGrass, toc_OBeans, toc_OBeans_Whole, toc_OBushFruit, toc_OCabbage, toc_OCarrots, toc_OCloverGrassGrazed1, toc_OCloverGrassGrazed2, toc_OCloverGrassGrazed3, toc_OCloverGrassSilage1, toc_OFarmForest, toc_OFieldPeas, toc_OFieldPeasSilage, toc_OFirstYearDanger, toc_OFodderBeet, toc_OFodderGrass, toc_OGrazingPigs, toc_OLentils, toc_OliveGrove, toc_OLupines, toc_OMaize, toc_OMaizeSilage, toc_OMixedVeg, toc_OOats, toc_OOrchApple, toc_OOrchardCrop, toc_OOrchCherry, toc_OOrchOther, toc_OOrchPear, toc_OPermanentGrassGrazed, toc_OPermanentGrassLowYield, toc_OPotatoes, toc_OPotatoesIndustry, toc_OPotatoesSeed, toc_OrchApple, toc_OrchardCrop, toc_OrchCherry, toc_OrchOther, toc_OrchPear, toc_ORyeGrass, toc_ORyegrass, toc_OSBarleySilage, toc_OSeedGrass1, toc_OSeedGrass2, toc_OSetAside, toc_OSetAside_Flower, toc_OSpringBarley, toc_OSpringBarleyCloverGrass, toc_OSpringBarleyExtensive, toc_OSpringBarleyPeaCloverGrass, toc_OSpringBarleyPigs, toc_OSpringBarleySilage, toc_OSpringRape, toc_OSpringRye, toc_OSpringWheat, toc_OStarchPotato, toc_OSugarBeet, toc_OTriticale, toc_OVegSeeds, toc_OWinterBarley, toc_OWinterBarleyExtensive, toc_OWinterRape, toc_OWinterRye, toc_OWinterWheat, toc_OWinterWheatUndersown, toc_OWinterWheatUndersownExtensive, toc_OYoungForestCrop, toc_PermanentGrassGrazed, toc_PermanentGrassLowYield, toc_PermanentGrassTussocky, toc_PermanentSetAside, toc_PlantNursery, toc_Potatoes, toc_PotatoesIndustry, toc_PotatoesSeed, toc_PotatoesSpring, toc_Ryegrass, toc_SeedGrass1, toc_SeedGrass2, toc_SetAside, toc_Sorghum, toc_SpringBarley, toc_SpringBarleyCloverGrass, toc_SpringBarleyPeaCloverGrass, toc_SpringBarleySeed, toc_SpringBarleySilage, toc_SpringRape, toc_SpringRye, toc_SpringWheat, toc_StarchPotato, toc_SugarBeet, toc_Sunflower, toc_Triticale, toc_Tulips, toc_Turnip, toc_Unmanaged, toc_VegSeeds, toc_Vineyards, toc_WinterBarley, toc_WinterRape, toc_WinterRye, toc_WinterTriticale, toc_WinterWheat, toc_YellowLupin, and toc_YoungForestCrop.
|
protected |
Prints the sum of day degrees. See FarmManager::daydegrees.
Distance to the current main population manager, calculates distance from 2 coordinates to other 2 coordinates.
Landscape::DistanceToP - calculates distance from 2 coordinates to other 2 coordinates.
References APoint::m_x, and APoint::m_y.
Distance to the current main population manager, calculates distance from 2 coordinates to other 2 coordinates but do not square root (for efficiency)
Landscape::DistanceToPSquared - calculates distance from 2 coordinates to other 2 coordinates but do not square root (for efficiency).
References APoint::m_x, and APoint::m_y.
|
inline |
void Landscape::DumpCentroids | ( | void | ) |
Saves centroid information for each polygon found.
|
protected |
|
protected |
Saves the graphics for the landscape LKM.
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 | ||
) |
Dumps landscape information by area LKM.
References Calendar::DayInYear(), g_date, g_msg, Calendar::OldDays(), tov_OFirstYearDanger, tov_Undefined, MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
|
protected |
When the simulation is closed this method saves the number of each farm management that has been carried out.
References g_msg, last_treatment, start, MapErrorMsg::Warn(), and WARN_FILE.
void Landscape::DumpVegAreaData | ( | int | a_day | ) |
Saves the information on vegetation types and areas.
References cfg_dumpvegjan, cfg_dumpvegjanfile, cfg_dumpvegjune, cfg_dumpvegjunefile, CfgBool::value(), and CfgStr::value().
Referenced by RunTheSim().
|
protected |
Records farm events carried out on the x, y locations.
References g_msg, sleep_all_day, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Records pesticided application farm events carried out on the x,y location.
References fungicide_treat, g_msg, herbicide_treat, insecticide_treat, sleep_all_day, MapErrorMsg::Warn(), and WARN_FILE.
std::string Landscape::EventtypeToString | ( | int | a_event | ) |
Returns the text representation of a treatment type.
References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, autumn_sow_with_ferti, bed_forming, biocide, bulb_harvest, burn_straw_stubble, burn_top, cattle_out, cattle_out_low, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, fa_ammoniumsulphate, fa_boron, fa_calcium, fa_cu, fa_greenmanure, fa_k, fa_manganesesulphate, fa_manure, fa_n, fa_nk, fa_npk, fa_npks, fa_p, fa_pk, fa_pks, fa_rsm, fa_sk, fa_sludge, fa_slurry, fiber_covering, fiber_removal, flammebehandling, flower_cutting, fp_ammoniumsulphate, fp_boron, fp_calcium, fp_cu, fp_greenmanure, fp_k, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_n, fp_nc, fp_nk, fp_npk, fp_npks, fp_ns, fp_p, fp_pk, fp_pks, fp_rsm, fp_sk, fp_sludge, fp_slurry, fungicide_treat, g_msg, glyphosate, green_harvest, growth_regulator, harvest, harvest_bushfruit, harvestshoots, hay_bailing, hay_turning, heavy_cultivator_aggregate, herbicide_treat, hilling_up, insecticide_treat, manual_weeding, molluscicide, mow, org_fungicide, org_herbicide, org_insecticide, pheromone, pigs_out, preseeding_cultivator, preseeding_cultivator_sow, product_treat, pruning, row_cultivation, shallow_harrow, shredding, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, spring_sow_with_ferti, start, straw_chopping, straw_covering, straw_removal, strigling, strigling_hill, strigling_sow, stubble_cultivator_heavy, stubble_harrowing, stubble_plough, summer_harrow, summer_plough, summer_sow, swathing, syninsecticide_treat, trial_control, trial_insecticidetreat, trial_toxiccontrol, MapErrorMsg::Warn(), WARN_FILE, water, winter_harrow, and winter_plough.
Referenced by Vole_JuvenileMale::OnFarmEvent(), Vole_JuvenileFemale::OnFarmEvent(), Skylark_Clutch::OnFarmEvent(), Skylark_Nestling::OnFarmEvent(), Skylark_PreFledgeling::OnFarmEvent(), Skylark_Female::OnFarmEvent(), Skylark_Male::OnFarmEvent(), Hare_Infant::OnFarmEvent(), and Hare_Young::OnFarmEvent().
std::string Landscape::FarmtypeToString | ( | TTypesOfFarm | a_farmtype | ) |
Returns the text name of a TTypesOfFarm type.
References g_msg, tof_AgroChemIndustryCerealFarm1, tof_AgroChemIndustryCerealFarm2, tof_AgroChemIndustryCerealFarm3, tof_ConventionalCattle, tof_ConventionalPig, tof_ConventionalPlant, tof_ConvMarginalJord, tof_NoPesticideBase, tof_NoPesticideNoP, tof_OptimisingFarm, tof_OrganicCattle, tof_OrganicPig, tof_OrganicPlant, tof_PTrialControl, tof_PTrialToxicControl, tof_PTrialTreatment, tof_UserDefinedFarm1, tof_UserDefinedFarm10, tof_UserDefinedFarm11, tof_UserDefinedFarm12, tof_UserDefinedFarm13, tof_UserDefinedFarm14, tof_UserDefinedFarm15, tof_UserDefinedFarm16, tof_UserDefinedFarm17, tof_UserDefinedFarm18, tof_UserDefinedFarm19, tof_UserDefinedFarm2, tof_UserDefinedFarm20, tof_UserDefinedFarm21, tof_UserDefinedFarm22, tof_UserDefinedFarm23, tof_UserDefinedFarm24, tof_UserDefinedFarm25, tof_UserDefinedFarm26, tof_UserDefinedFarm27, tof_UserDefinedFarm28, tof_UserDefinedFarm29, tof_UserDefinedFarm3, tof_UserDefinedFarm30, tof_UserDefinedFarm31, tof_UserDefinedFarm32, tof_UserDefinedFarm33, tof_UserDefinedFarm34, tof_UserDefinedFarm35, tof_UserDefinedFarm36, tof_UserDefinedFarm4, tof_UserDefinedFarm5, tof_UserDefinedFarm6, tof_UserDefinedFarm7, tof_UserDefinedFarm8, tof_UserDefinedFarm9, MapErrorMsg::Warn(), and WARN_FILE.
void Landscape::FillVegAreaData | ( | ) |
Runs through all polygons and records the area of each vegetation type.
References tov_Undefined.
Referenced by Population_Manager::SpeciesSpecificReporting().
|
protected |
From a central location finds the biggest rectangle that fits inside the field.
This method finds the rectangle that describes the field the best, which means the orientation of the rectangle that gives the biggest in-field area to the total area of the rectangle. The orientation of the longest axis of the rectangle is returned. The width (lenght of shortest axis) as well as starting point (x and y) on the short side of the rectangle is also saved.
|
protected |
Finds a location in the middle of a field to ‘seed a beetlebank’
References LE::GetPoly().
|
protected |
From a central location finds the longest axis of a field.
|
protected |
void Landscape::GenerateCellLocDict | ( | ) |
The function to create the dictionary of cell locations for every polygon.
References APoint::m_x, and APoint::m_y.
void Landscape::GeneratePolyIDMapWithinDist | ( | ) |
The function to find all the polygons within the a certain distance to each location.
References cfg_distance_to_select_nearby_polygons, and CfgFloat::value().
|
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) |
References m_elems, and m_polymapping.
|
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) |
References RasterMap::Get(), m_elems, and m_land.
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.
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::roostdists, 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.
References m_polymapping.
int Landscape::GetGooseNumbers | ( | int | a_x, |
int | a_y | ||
) |
double Landscape::GetHareFoodQuality | ( | int | a_polygon | ) |
Returns the hare food quality of polygons LKM.
References g_FarmIntensivenessH, g_VegHeightForageReduction, tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_Fence, 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.
Referenced by THare::ForageSquare(), THare::ForageSquareP(), and Hare_Juvenile::st_Dispersal().
|
inline |
Returns the landscape type of the polygon owner (used in cases relating to e.g. unsprayed field margins) using coordinates a_x, a_y. Returns the value as a TTypesOfLandscapeElement.
References RasterMap::Get(), m_elems, and m_land.
Referenced by beetle_tole_movemap_init(), Beetle_Population_Manager::IsStartHabitat(), Beetle_Population_Manager::Probe(), TAnimal::SupplyPolygonType(), and Beetle_Adult::TryToReproduce().
int Landscape::GetQuarryNumbers | ( | int | a_poly | ) |
This returns the number of geese which are legal quarry on the polygon the day before.
This returns the number of geese on the polygon the day before.
References m_polymapping.
|
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 |
References g_msg, l_map_ascii_map_entity, CfgInt::value(), MapErrorMsg::Warn(), and WARN_FILE.
|
private |
Records total amount of grain / seed / maize available as forage for each polygon.
Records total amount of grain/seed/maize available as forage for each polygon with forage available. Information is dumped to GrainDump.txt
References Calendar::Date(), g_date, g_msg, Calendar::GetYear(), MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
Removes grazing forage from a poly per m2.
References m_elems, and m_polymapping.
|
inline |
Removes grazing forage from a poly and divides this out per m2.
References m_elems, and m_polymapping.
|
protected |
The entry point for adding hedgebanks. Hedgebanks are created by replacing part of hedge polygons with the tole_HedgeBank If the hedge is wide this will be with a border on each side, if narrow then by inserting hedgebank between trees.
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 |
Adds new hedgebanks.
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 |
|
protected |
|
protected |
Generate a list of polygon numbers for new hedgebank addition.
References hb_hedges, m_elems, and tole_Hedges.
Referenced by hb_Add().
|
protected |
Creates the necessary new hedgebank polygons in Landscape::m_elems.
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 |
Tests for an already process neighbour cell.
References hb_height, hb_map, and hb_width.
Referenced by hb_PaintWhoHasNeighbourColor().
|
inlineprotected |
Checks if a pixel has any non hedge neighbour cell.
References HB_MAGIC, hb_map, hb_MapBorder(), and hb_width.
Referenced by hb_PaintBorder().
|
inlineprotected |
Checks for out of bounds hedgebank coordinates.
References hb_height, and hb_width.
Referenced by hb_HasOtherNeighbour().
|
protected |
‘Paints’ the core of a hedge with a negative number for use in deciding what becomes hedgebank later
References g_random_fnc(), 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 |
Used to identify the distance a cell is from the centre of a hedge.
Sweeps through the map.If we find a pixel, which has a value equal to a_color and not a negative neighbour, then mark it as negative with an absolute value equal to the number of steps from here and out to the center/perimeter polygons border, calculated as the given percentage.
If one or more negative numbers are found among the neighbours, some that were not marked during this round, then assign a negative value equal to the minimum found plus one.
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 |
Determines the width from centre to edge of hedge.
References hb_height, HB_MAGIC_PAINTER_BIT, hb_map, and hb_width.
Referenced by hb_MarkTopFromLocalMax().
|
protected |
Identifies all border hedge pixels.
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 |
Pushes a value to a pixel cell that denotes that is has a neighbour that is not hedge.
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 |
|
protected |
|
protected |
Striping distribution function for the new hedgebanks LKM.
References g_random_fnc(), 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 |
void Landscape::IncTreatCounter | ( | int | a_treat | ) |
Records that a farm treatment of the type specified has occurred.
References g_msg, last_treatment, MapErrorMsg::Warn(), and WARN_BUG.
|
inline |
Function for backwards code compatibility when TOV attributes would now be used.
References ClassificationFieldType().
|
inline |
|
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
References tole_HedgeBank, tole_LargeRoad, and tole_SmallRoad.
|
inline |
|
protected |
NewElement Creates a new LE instance and where possible it will create the highest level in the class hierarchy e.g. tole_Portarea has no behaviour so can be created as a NonVegElement (LE->NonVegElement), removing the need to have a Portarea class.
Here we reduce the amount of classes that need to be created by lumping those with no special, or the same behaviour into the base class, and then differentiating with an attribute specifying the tole type.
References LE_TypeClass::BackTranslateEleTypes(), cfg_farm_cattle_grazing_lvl_lowyield, cfg_farm_cattle_grazing_lvl_pasture, cfg_farm_cattle_grazing_lvl_tussocky, g_letype, g_msg, g_rand_uni_fnc(), LE::Set_Att_VegGrass(), LE::SetCountryDesignation(), LE::SetDigestibility(), LE::SetGrazingLevel(), LE::SetVegGrowthScalerRand(), LE::SetVegPatchy(), LE::SetVegType(), tole_ActivePit, tole_AgroForestrySystem, tole_Airport, tole_AlmondPlantation, tole_AmenityGrass, tole_AsparagusPerm, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_BushFruit, tole_Canal, tole_Carpark, tole_Chameleon, tole_ChestnutForest, tole_ChristmasTrees, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_CorkOakForest, tole_DeciduousForest, tole_DrainageDitch, tole_EnergyCrop, tole_EucalyptusForest, tole_FarmBufferZone, tole_FarmFeedingGround, tole_FarmForest, tole_FarmYoungForest, tole_Fence, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_FlowersPerm, tole_FlowerStrip, tole_FlowerStripWithRotation, tole_ForestAisle, tole_Freshwater, tole_Garden, tole_GreenFallow, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_HolmOakForest, tole_IndividualTree, tole_InvasiveForest, tole_LargeRoad, tole_MaritimePineForest, tole_Marsh, tole_MetalledPath, tole_Missing, tole_MixedForest, tole_MontadoCorkOak, tole_MontadoHolmOak, tole_MontadoMixed, tole_MownGrassStrip, tole_MushroomPerm, tole_NaturalFarmGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_OAsparagusPerm, tole_OBushFruit, tole_OChristmasTrees, tole_OEnergyCrop, tole_OFarmForest, tole_OFarmYoungForest, tole_OliveGrove, tole_OOrchard, tole_OPermPasture, tole_OPermPastureLowYield, tole_OPermPasturePigs, tole_Orchard, tole_OrchardBand, tole_OtherOakForest, tole_OtherPermCrop, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPasturePigs, tole_PermPastureTussocky, tole_Pipeline, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Portarea, tole_Pylon, tole_Railway, tole_RefuseSite, tole_RiceField, tole_River, tole_RiverBed, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltpans, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_SolarPanel, tole_StonePineForest, tole_StoneWall, tole_Stream, tole_SwampForest, tole_Track, tole_UnknownGrass, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_UrbanVeg, tole_Vildtager, tole_Vineyard, tole_WalnutPlantation, tole_Wasteland, tole_WaterBufferZone, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, tov_Heath, tov_NaturalGrass, tov_Wasteland, CfgInt::value(), MapErrorMsg::Warn(), and WARN_FILE.
Referenced by hb_GenerateHBPolys().
|
protected |
Called if the landscape is manipulated to save the new version of the polyref input file.
References g_msg, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Checks whether all polygons are in the map, removing those that are not.
PolysValidate or ChangeMapMapping must be called after this method
References m_polymapping.
|
protected |
Renumbers the polygons from 0 to the number of LE instances - 1. This saves space, and also means that the polygon number becomes the same as the index in Landscape::m_elems, allowing quicker lookup(reduces indirection by 1)
This saves space in arrays by removing unused polygon numbers and renumbering, then triggering a dump of the landscape files. It uses a shortcut in that the polygons are already mapped to an array without space, so we use the index of this array to define the new polygon number. There is one problem however, that is if the polygon is a field then it might have a an unsprayed field margin reference, and that reference cannot be renumbered in this way. This requires a two step pass, first to find the unsprayed margin polygons, then to map the new and old numbers, then pass through again and reset all fields to point to the correct new polygon number.
References g_msg, m_polymapping, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Checks for internal consistency in the polygon information, e.g. being sure that all polygons mentioned are actually in the map.
References g_msg, m_polymapping, MapErrorMsg::Warn(), and WARN_FILE.
std::string Landscape::PolytypeToString | ( | TTypesOfLandscapeElement | a_le_type | ) |
Returns the text representation of a TTypesOfLandscapeElement type.
References g_msg, tole_ActivePit, tole_AgroForestrySystem, tole_Airport, tole_AlmondPlantation, tole_AmenityGrass, tole_AsparagusPerm, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_BushFruit, tole_Carpark, tole_ChestnutForest, tole_ChristmasTrees, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_CorkOakForest, tole_DeciduousForest, tole_DrainageDitch, tole_EnergyCrop, tole_EucalyptusForest, tole_FarmBufferZone, tole_FarmFeedingGround, tole_FarmForest, tole_FarmYoungForest, tole_Fence, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_FlowersPerm, tole_FlowerStrip, tole_FlowerStripWithRotation, tole_Foobar, tole_ForestAisle, tole_Freshwater, tole_Garden, tole_GreenFallow, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_HolmOakForest, tole_IndividualTree, tole_InvasiveForest, tole_LargeRoad, tole_MaritimePineForest, tole_Marsh, tole_MetalledPath, tole_MixedForest, tole_MontadoCorkOak, tole_MontadoHolmOak, tole_MontadoMixed, tole_MownGrassStrip, tole_MushroomPerm, tole_NaturalFarmGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_OAsparagusPerm, tole_OBushFruit, tole_OChristmasTrees, tole_OEnergyCrop, tole_OFarmForest, tole_OFarmYoungForest, tole_OliveGrove, tole_OOrchard, tole_OPermPasture, tole_OPermPastureLowYield, tole_OPermPasturePigs, tole_Orchard, tole_OrchardBand, tole_OtherOakForest, tole_OtherPermCrop, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPasturePigs, tole_PermPastureTussocky, tole_Pipeline, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Portarea, tole_Pylon, tole_Railway, tole_RefuseSite, tole_RiceField, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltpans, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_SolarPanel, tole_StonePineForest, tole_StoneWall, tole_Stream, tole_SwampForest, tole_Track, tole_UnknownGrass, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_UrbanVeg, tole_Vildtager, tole_Vineyard, tole_WalnutPlantation, tole_Wasteland, tole_WaterBufferZone, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.
Referenced by hb_Add().
|
protected |
This function is to read the habitat species composition for flower resource.
References g_msg, and MapErrorMsg::Warn().
void Landscape::ReadOpenness | ( | void | ) |
Reads openness values from a standard input file for all polygons LKM - used??
|
protected |
Is used to take a look in the input file for polygons to figure out what the format is (since multiple formats are allowed)
This is a new file format 2020/2021 to include country code, latitude, longitude, aspect, slope, elevation, and the pollen/nectar curve number
References g_msg, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Based on the format of the file (since multiple formats are allowed), this reads the polygon information from an input file. This method sets up the Landscape::m_polymapping lookup table, checks validity of polygon and associated farm information and creates the LE instances to populate the Landscape::m_elems array, and if needed creates the links between unsprayed margins and the owner tole type.
The polygon file consists of 9 or 13 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
Here we need to set the pollen curve - there are a few possible options The PollenNectarCurve variable holds either:
-3 (relies on tov type), we set to zero for now but later the program will alter it when the veg is changed. This should only be for fields.
-2 (not needed for this poly - default curve 0,
-1 column not filled in, default to zero curve,
or a curve reference from the habitat set
With the polygons renumbered, we can safely set the hb_first_free_poly_num to the number of polygons we have.
References g_letype, g_map_le_borders, g_map_le_unsprayedmargins, g_map_le_unsprayedmargins_chance, g_msg, g_random_fnc(), LE::GetPoly(), l_map_chameleon_replace_num, m_polymapping, LE::PollenNectarReset(), LE::SetArea(), LE::SetAspect(), LE::SetCentroid(), LE::SetElevation(), LE::SetMapIndex(), LE::SetOpenness(), LE::SetPollenNectarCurveRef(), LE::SetPoly(), LE::SetSlope(), LE::SetSoilType(), LE::SetUnsprayedMarginPolyRef(), tole_ChristmasTrees, tole_Field, tole_FlowersPerm, tole_ForestAisle, tole_Heath, tole_Marsh, tole_Missing, tole_OChristmasTrees, tole_PlantNursery, tole_RoadsideSlope, tole_Saltmarsh, tole_Vildtager, tole_WoodyEnergyCrop, LE_TypeClass::TranslateEleTypes(), CfgInt::value(), CfgBool::value(), MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
|
inlineprotected |
Called if there is any change in the polygons and loops through all polygons resetting the Landscape::m_polymapping value.
References m_elems, and 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
References m_polymapping.
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()
References m_polymapping.
void Landscape::RecordGooseRoostDist | ( | int | a_polyref, |
int | a_dist, | ||
GooseSpecies | a_goose | ||
) |
Records the distance to the closest roost of goose species.
This records the distance to the closest roost for a goose species.
References m_polymapping.
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
References m_polymapping.
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()
References m_polymapping.
|
inline |
Function to release the given polygon locks.
References m_poly_omp_locks.
Referenced by Osmia_Population_Manager::CreateNest(), Osmia_Population_Manager::ReleaseOsmiaNest(), and Osmia_Female::st_ReproductiveBehaviour().
|
protected |
A method for replacing missing values in the map with corrected ones.
References m_polymapping, and tole_Missing.
|
inline |
Remove the given amount of nectar from the total amount in the given polygon.
References m_elems.
Referenced by SupplyNectarAtLocInPoly().
void Landscape::RemoveNectarInLoc | ( | int | a_x, |
int | a_y, | ||
double | a_mount | ||
) |
Remove the foraged ammount of pollen quantity from the cell indexed by a_x, a_y.
|
inline |
Remove the given amount of pollen from the total amount in the given polygon.
References m_elems.
Referenced by SupplyPollenAtLocInPoly().
void Landscape::RemovePollenInLoc | ( | int | a_x, |
int | a_y, | ||
double | a_mount | ||
) |
Remove the foraged ammount of pollen quantity from the cell indexed by a_x, a_y.
|
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:
References LE_TypeClass::BackTranslateEleTypes(), LE::DoCopy(), g_letype, g_msg, APoint::m_x, APoint::m_y, LE::SetOwner(), tole_Fence, tole_Field, tole_FieldBoundary, tole_FlowerStrip, tole_FlowerStripWithRotation, tole_HedgeBank, tole_Hedges, tole_IndividualTree, tole_MetalledPath, tole_NaturalGrassDry, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnsprayedFieldMargin, tole_WaterBufferZone, MapErrorMsg::Warn(), and WARN_FILE.
void Landscape::ResetFlowerLocIndex | ( | void | ) |
The function to reset the index for the indices of the locations with flower resource.
References PollenNectarData::m_quantity.
void Landscape::ResetGrainAndMaize | ( | ) |
Resets all grain.
To avoid grain from previous years sticking onto fields and confusing the goose foraging model, we make a hard reset of everything.
void Landscape::RodenticidePredatorsEvaluation | ( | RodenticidePredators_Population_Manager * | a_rppm | ) |
void Landscape::RunHiddenYear | ( | ) |
The function to generate the vector list of pixies for polygons with flower resource.
References cfg_pesticidetableon, g_date, Calendar::Reset2(), and CfgBool::value().
Referenced by main().
|
inline |
used to classify the userdefinedbool attribute and set it - this requires supplying the correct classification function
References m_elems.
Referenced by THare_Population_Manager::Init().
|
inline |
|
inline |
Uses a point to an LE instance and sets all the attributes based on its tole type.
Sets attribute to high
Sets attribute to water
Sets attribute to urban areas without vegetation
Sets attribute to woodland
Sets attribute to woody
References ClassificationForest(), ClassificationHigh(), ClassificationUrbanNoVeg(), ClassificationWater(), ClassificationWoody(), LE::Set_Att_Forest(), LE::Set_Att_High(), LE::Set_Att_UrbanNoVeg(), LE::Set_Att_Water(), and LE::Set_Att_Woody().
|
inline |
Uses a point to an LE instance and sets all the attributes based on its tov type.
Sets attribute to grass vegetation
Sets attribute to grass vegetation for geese
Sets attribute to cereal
Sets attribute to mature cereal
Sets attribute to maize
References ClassificationVegCereal(), ClassificationVegGooseGrass(), ClassificationVegGrass(), ClassificationVegMaize(), ClassificationVegMatureCereal(), LE::Set_Att_VegCereal(), LE::Set_Att_VegGooseGrass(), LE::Set_Att_VegGrass(), LE::Set_Att_VegMaize(), and LE::Set_Att_VegMatureCereal().
|
inline |
Sets the user defined boolean attribute of a polygon using the polygon reference number a_polyref.
References m_elems, and m_polymapping.
|
inline |
ets the user defined integer attribute of a polygon using the polygon reference number a_polyref
References m_elems, and m_polymapping.
|
inline |
Sets the maize forage resource as seen from a goose standpoint at a polygon.
References m_elems, and m_polymapping.
|
inline |
Sets the grain forage resource as seen from a goose standpoint at a polygon.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Sets m_grain_dist, a binary condition for good or bad years of spilled grain.
References m_grain_dist.
void Landscape::SetGreenBiomassMap | ( | int | a_poly_id, |
double | a_green_biomass, | ||
int | a_min_x, | ||
int | a_min_y, | ||
int | a_max_x, | ||
int | a_max_y | ||
) |
The function to set the green biomass (in kg) for all the cells that belong to the given polygon ID. Used to scale the transfer of pesticide into the plant.
Referenced by VegElement::RecalculateBugsNStuff().
|
inline |
void Landscape::SetLESignal | ( | int | a_polyref, |
LE_Signal | a_signal | ||
) |
Writes the mask back out to the polygon.
References m_polymapping.
|
inline |
|
inline |
void Landscape::SetNectarMap | ( | int | a_poly_id, |
double | a_nectar_quantity, | ||
int | a_min_x, | ||
int | a_min_y, | ||
int | a_max_x, | ||
int | a_max_y | ||
) |
The function to set the nectar quantity for all the cells that belong to the given polygon ID.
Referenced by VegElement::RecalculateBugsNStuff().
void Landscape::SetPollenMap | ( | int | a_poly_id, |
double | a_pollen_quantity, | ||
int | a_min_x, | ||
int | a_min_y, | ||
int | a_max_x, | ||
int | a_max_y | ||
) |
The function to set the pollen quantity for all the cells that belong to the given polygon ID.
Referenced by VegElement::RecalculateBugsNStuff().
|
inline |
Function to set the given polygon lock.
References m_poly_omp_locks.
Referenced by Osmia_Population_Manager::CreateNest(), Osmia_Population_Manager::ReleaseOsmiaNest(), and Osmia_Female::st_ReproductiveBehaviour().
|
inline |
void Landscape::SetPolyMaxMinExtents | ( | void | ) |
Sets MapValid as true for each polygon found.
References m_polymapping.
void Landscape::SetSpeciesFunctions | ( | TTypesOfPopulation | a_species | ) |
This is the jumping off point for any landscape related species setup, it creates function pointers to these special functions.
Referenced by CreatePopulationManager(), SubPopulation_Population_Manager::SetNoProbesAndSpeciesSpecificFunctions(), and Population_Manager::SetNoProbesAndSpeciesSpecificFunctions().
|
inline |
Set the pointer to the list of active population managers.
References m_ThePopManagerList.
Referenced by main().
void Landscape::SimulationClosingActions | ( | ) |
These are the things that are needed to be done after the simulation ends, but before landscape objects are deleted.
Referenced by CloseDownSim().
void Landscape::SkylarkEvaluation | ( | SkTerritories * | a_skt | ) |
Evaluation to find Skylark territory.
References SkTerritories::PreCachePoly().
Referenced by SkTerritories::PreFillQualGrid().
bool Landscape::SubtractPondLarvalFood | ( | double | a_food, |
int | a_polyrefindex | ||
) |
Removes larval food from a pond and returns true if it was possible, otherwise false.
|
inline |
Creates a vector containing a list of all the polygons that do not have tov_None as the vegetation type.
|
inline |
The function to get a random location with nectar available for the given polygon.
References m_index_locs_nectar, m_nectar_map, m_poly_cell_locs_nectar, and SupplyARandomLocResourcePoly().
|
inline |
The function to get a random location with pollen available for the given polygon.
References m_index_locs_pollen, m_pollen_map, m_poly_cell_locs_pollen, and SupplyARandomLocResourcePoly().
Referenced by Osmia_Female::st_ReproductiveBehaviour().
|
inline |
The function to get a random location for the given poly ID.
References g_random_fnc(), and m_poly_cell_locs.
Referenced by Osmia_Population_Manager::Osmia_Population_Manager().
APoint Landscape::SupplyARandomLocResourcePoly | ( | int | a_poly_id, |
std::map< int, int > & | a_index_locs, | ||
std::map< int, vector< APoint >> & | a_poly_cell_locs, | ||
Eigen::MatrixXf & | a_prop_map | ||
) |
The function to get a random location for the given resource and the given poly ID.
References g_random_fnc(), and APoint::m_x.
Referenced by SupplyARandomLocNectarPoly(), and SupplyARandomLocPollenPoly().
|
inline |
Returns whether a polygon at coordinates a_x, a_y has the attribute Forest set.
References m_elems, and m_polymapping.
|
inline |
Returns whether a polygon at coordinates a_x, a_y has the attribute Forest set.
References RasterMap::Get(), m_elems, and m_land.
Referenced by not_nest_friendly(), SkTerritories::PrePoly2Qual(), and SkTerritories::PrePolyNQual().
|
inline |
Tests whether the polygon at a_x,a_y is designated as xxx.
Returns whether a polygon at coordinates a_x, a_y has the attribute High set
References RasterMap::Get(), m_elems, and m_land.
Referenced by SupplyLEHigh().
|
inline |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute High set.
References m_elems, and m_polymapping.
|
inline |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute High set.
References RasterMap::Get(), m_elems, and m_land.
Referenced by SkTerritories::PrePoly2Qual(), and SkTerritories::PrePolyNQual().
|
inline |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute Is Cereal set.
References m_elems, and m_polymapping.
|
inline |
Returns whether a polygon a_polyref has the attribute Is Goose Grass set.
References m_elems, and m_polymapping.
|
inline |
Returns whether a polygon a_polyref has the attribute Is Grass set.
References m_elems, and m_polymapping.
Referenced by Oedothorax_Juvenile::CheckToleTovIndex().
|
inline |
|
inline |
Returns whether a polygon a_polyref has the attribute Is Maize set.
References m_elems, and m_polymapping.
|
inline |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute Is Mature Cereal set.
References m_elems, and m_polymapping.
|
inline |
Returns whether a polygon at coordinates a_x, a_y, or by a_polyref has the attribute Is Patchy set.
References m_elems, and m_polymapping.
Referenced by SupplyVegPatchy().
|
inline |
|
inline |
Returns whether a polygon at coordinates a_x, a_y has the attribute Water set.
References RasterMap::Get(), m_elems, and m_land.
Referenced by hare_tole_can_walkacross(), hare_tole_init_friendly(), spider_tole_egss_position_valid(), spider_tole_juvenile_maturation_valid(), and spider_tole_lethal().
|
inline |
|
inline |
Returns the user defined boolean attribute of a polygon using the polygon reference number a_polyref, or coordinates a_x, a_y.
References m_elems, and m_polymapping.
Referenced by THare_Population_Manager::Init().
|
inline |
|
inline |
Returns the user defined integer attribute of a polygon using the polygon reference number a_polyref.
References m_elems, and m_polymapping.
|
inline |
Returns the maize forage resource.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Returns the grain forage resource.
References m_elems, and m_polymapping.
|
inline |
Returns the grain forage resource as seen from a goose standpoint at an x,y location.
References RasterMap::Get(), m_elems, m_land, and m_polymapping.
APoint Landscape::SupplyCentroid | ( | int | a_polyref | ) |
Returns the centroid of a polygon using the polygon reference number a_polyref.
References m_polymapping.
APoint Landscape::SupplyCentroidIndex | ( | int | a_polyrefindex | ) |
Returns the centroid of a polygon using the polygon index in m_elems.
|
inline |
Returns the centroid x-coordinate of a polygon using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Returns the centroid y-coordinate of a polygon using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
|
inline |
|
inline |
Returns the crop type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a # TTypesOfCrops.
References RasterMap::Get(), m_elems, and m_land.
Referenced by Aphid::calSuitabilityShared(), THare::ForageSquare(), THare::ForageSquareP(), spider_toc_index(), Hare_Juvenile::st_Dispersal(), vole_tole_move_quality(), and vole_toletoc_asses_habitat_score().
|
inline |
Returns the crop type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a # TTypesOfCrops.
References m_elems, and m_polymapping.
|
inline |
Passes a request on to the associated Weather class function, the day degrees for all dates.
References m_elems, and m_polymapping.
|
inline |
Passes a request on to the associated Calendar class function, returns m_day_in_month
References g_date, and Calendar::GetDayInMonth().
Referenced by Population_Manager::BeginningOfMonth(), TPredator_Population_Manager::PredSampleFile(), Population_Manager::Run(), and RunTheSim().
|
inline |
Passes a request on to the associated Calendar class function, the day in the year.
References Calendar::DayInYear(), and g_date.
Referenced by Weasel::BeginStep(), Owl::BeginStep(), Beetle_Larvae::BeginStep(), Beetle_Pupae::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), Erigone_Population_Manager::Catastrophe(), Oedothorax_Population_Manager::Catastrophe(), Vole_Population_Manager::Catastrophe(), Skylark_Population_Manager::Catastrophe(), THare_Population_Manager::Catastrophe(), Beetle_Population_Manager::Catastrophe(), Beetle_Population_Manager::Catastrophe2(), Bembidion_Population_Manager::CreateObjects(), PoecilusCupreus_Population_Manager::CreateObjects(), Ladybird_Population_Manager::CreateObjects(), Beetle_Population_Manager::DoBeetleActiveProbe(), Osmia_Population_Manager::DoBefore(), Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), Vole_Population_Manager::DoFirst(), Bembidion_Population_Manager::DoFirst(), Skylark_Population_Manager::DoFirst(), THare_Population_Manager::DoFirst(), Beetle_Population_Manager::DoFirst(), Osmia_Population_Manager::DoLast(), THare_Population_Manager::DoLast(), Hare_Female::dumpEnergy(), Vole_JuvenileMale::EndStep(), Vole_Male::EndStep(), Vole_JuvenileFemale::EndStep(), THare_Population_Manager::ExtraPopMort(), Vole_Population_Manager::GeneticsOutputFile(), Hare_Male::InternalPesticideHandlingAndResponse(), Hare_Female::InternalPesticideHandlingAndResponse(), THare_Population_Manager::MRROutputs(), Skylark_Nestling::OnDeserted(), Skylark_Female::OnMateDying(), Skylark_Male::OnMateDying(), Skylark_Female::OnMateHomeless(), Skylark_Male::OnMateLeaving(), Skylark_Nestling::OnYouHaveBeenEaten(), VoleSummaryOutput::OPrint(), THare_Population_Manager::POMOutputs(), TPredator_Population_Manager::PredAutumnSample(), TPredator_Population_Manager::PredSampleFile(), TPredator_Population_Manager::PredSpringAutumnSample(), TPredator_Population_Manager::PredSpringSample(), Spider_Egg::ReInit(), Vole_Population_Manager::ResistanceOutput(), TPredator_Population_Manager::Run(), SubPopulation_Population_Manager::Run(), Population_Manager::Run(), Hare_Juvenile::ShouldMature(), Spider_Egg::Spider_Egg(), Skylark_Male::st_AttractingAMate(), Skylark_Female::st_BuildingUpResources(), Skylark_Clutch::st_Developing(), Skylark_Nestling::st_Developing(), Skylark_Female::st_Dying(), Skylark_Female::st_Emigrating(), Skylark_Male::st_Emigrating(), Skylark_Female::st_Floating(), Skylark_Male::st_Floating(), Skylark_Female::st_Flocking(), Skylark_Male::st_Flocking(), Vole_Female::st_GiveBirth(), Skylark_Female::st_GivingUpTerritory(), Skylark_Female::st_Laying(), Skylark_Female::st_MakingNest(), Vole_Male::st_Maturation(), Skylark_Female::st_PreparingForBreeding(), Skylark_Female::st_StartingNewBrood(), Skylark_Female::st_StoppingBreeding(), Skylark_Female::Step(), Vole_Population_Manager::TheAgeSexLocationProbe(), Vole_Population_Manager::TheReallyBigOutputProbe(), Vole_Population_Manager::TheSexRatiosProbe(), Aphid_Population_Manager::updateDevelopmentSeason(), and Hare_Female::UpdateOestrous().
|
inline |
Passes a request on to the associated Calendar class function, the day length.
References Calendar::DayLength(), and g_date.
|
inline |
Passes a request on to the associated Weather class function, the day length for the current day.
References Calendar::DayLength(), and g_date.
Referenced by Aphid_Population_Manager::calOffspringStageEGandPEA(), Ladybird_Population_Manager::DayDegreeCalculations(), Skylark_Female::FeedYoung(), Ladybird_Adult::ShouldStartAggregating(), Skylark_Male::st_CaringForYoung(), Ladybird_Adult::St_Hibernate(), Skylark_Female::st_Incubating(), Skylark_Female::st_PreparingForBreeding(), SubPopulation_Population_Manager::subpopuBaseOutputProbe(), and Aphid_Population_Manager::updateDevelopmentSeason().
|
inline |
Passes a request on to the associated Calendar class function, returns m_daylightproportion
References g_date, and Calendar::GetDaylightProportion().
|
inline |
Returns the dead biomass of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
Referenced by Aphid::doReproduction(), and Pesticide::RecordAllPesticideCompartments().
|
inline |
|
inline |
Returns the landscape element sub-type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Returns the landscape type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a TTypesOfLandscapeElement.
References m_elems, and m_polymapping.
Referenced by SubPopulation::calSuitability(), Skylark_Female::CheckForFields(), Vole_Base::CheckTraps(), Vole_Base::CopyMyself(), SkTerritories::DumpMapGraphics(), Pesticide::ElementIsWater(), Vole_Population_Manager::GeneticsOutputFile(), hare_tole_can_walkacross(), hare_tole_init_friendly(), SubPopulation_Population_Manager::initialisePopulation(), Aphid_Population_Manager::initialiseSimWithEggs(), Ladybird_Adult::IsAggregationSite(), Ladybird_Adult::IsProbhibited(), not_nest_friendly(), poecilusCupreus_tole_movemap_init(), TPredator_Population_Manager::PredSampleFile(), SkTerritories::PrePoly2Qual(), SkTerritories::PrePolyNQual(), SubPopulation_Population_Manager::Run(), Vole_Base::Set_ElemBorn(), spider_tole_egss_position_valid(), spider_tole_movemap_init_Erigone(), spider_tole_movemap_init_Oedothorax(), Vole_JuvenileMale::st_BecomeSubAdult(), Vole_JuvenileFemale::st_BecomeSubAdult(), Vole_Female::st_Lactating(), Vole_Base::SupplyElemType(), TAnimal::SupplyPosition(), Vole_Population_Manager::TheReallyBigOutputProbe(), Ladybird_Adult::TryToReproduce(), vole_tole_assess_barrier(), vole_tole_init_friendly(), vole_tole_init_optimal(), and Spider_Juvenile::WalkTo().
|
inline |
Returns the landscape type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a TTypesOfLandscapeElement.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Returns the landscape type of the polygon using coordinates a_x, a_y, but allowing correction of coordinates for out of scope values. Returns the value as a TTypesOfLandscapeElement.
References RasterMap::Get(), m_elems, m_height, m_height10, m_land, m_width, and m_width10.
|
inline |
Gets the TTypesOfVegetation type of a polygon using the m_elems.
References m_elems.
Referenced by BorderTest(), Pesticide::DiffusionMatrixInit(), Osmia_Nest_Manager::InitOsmiaBeeNesting(), vole_tole_move_quality(), and vole_toletoc_asses_habitat_score().
|
inline |
Returns the farm area of a farm that owns a particular polygon.
References m_elems, and m_polymapping.
double Landscape::SupplyFarmIntensity | ( | int | a_polyref | ) |
Returns the farm intensity classification of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y.
References Farm::GetIntensity(), and m_polymapping.
double Landscape::SupplyFarmIntensity | ( | int | a_x, |
int | a_y | ||
) |
Returns the farm intensity classification of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y.
Referenced by VegElement::DoDevelopment(), and VegElement::RecalculateBugsNStuff().
double Landscape::SupplyFarmIntensityI | ( | int | a_polyindex | ) |
Returns the farm intensity classification of the polygon using the polygon index in m_elems.
|
inline |
|
inline |
Returns the farm owner pointer for the polygon referenced by a_polyref or a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
Returns the farm owner pointer for the polygon referenced by a_polyref or a_x, a_y.
References RasterMap::Get(), m_elems, and m_land.
Referenced by Skylark_Population_Manager::BreedingPairsOutput(), Beetle_Population_Manager::Probe(), and TAnimal::SupplyFarmOwnerRef().
|
inline |
Returns the farm owner reference number for the polygon referenced by a_polyref or a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Returns a pointer to a farm owned by a farmer with a specific farm reference number.
References FarmManager::GetFarmPtr(), and m_FarmManager.
|
inline |
Returns filename for the rotation file (if any) for the polygon referenced by a_polyref or a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Returns the farm type for the polygon referenced by a_polyref or a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Passes a request on to the associated Calendar class function, returns the simulation global date for the day, month and year supplied.
References Calendar::Date(), and g_date.
Referenced by Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), Vole_Population_Manager::DoFirst(), and Skylark_Female::st_PreparingForBreeding().
|
inline |
Passes a request on to the associated Weather class function, the global amount of sunshine for the current day.
References g_weather, and Weather::GetGlobalRadiation().
Referenced by VegElement::RecalculateBugsNStuff().
|
inline |
Passes a request on to the associated Weather class function, the global mean amount of sunshine for the current day.
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) |
References CurveClass::GetY(), m_GooseIntakeRateVSVegetationHeight_BG, m_GooseIntakeRateVSVegetationHeight_GL, m_GooseIntakeRateVSVegetationHeight_PF, and Warn().
Referenced by VegElement::CalcGooseForageResources().
|
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) |
References CurveClass::GetY(), m_elems, m_GooseIntakeRateVSVegetationHeight_BG, m_GooseIntakeRateVSVegetationHeight_GL, m_GooseIntakeRateVSVegetationHeight_PF, m_polymapping, and Warn().
|
inline |
Returns m_grain_dist, a binary condition for good or bad years of spilled grain.
References m_grain_dist.
|
inline |
Returns the grazing pressure of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y.
References m_elems, and m_polymapping.
Referenced by Skylark_Clutch::OnFarmEvent(), and Skylark_Nestling::OnFarmEvent().
|
inline |
|
inline |
Returns the grazing pressure of the polygon using the polygon index to m_elems.
References m_elems.
Referenced by vole_tole_move_quality(), and vole_toletoc_asses_habitat_score().
|
inline |
Returns the green biomass of the vegetation using the polygon reference number a_polyref.
References m_elems, and m_polymapping.
Referenced by SubPopulation::calPopuDensity(), Aphid::doReproduction(), Pesticide::RecordAllPesticideCompartments(), and SubPopulation_Population_Manager::Run().
|
inline |
|
inline |
|
inline |
Returns the green biomass as a proportion of biomass of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
Referenced by Aphid::calSuitabilityShared(), and Aphid::doReproduction().
|
inline |
Returns the green biomass as a proportion of biomass of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Returns the green biomass of the vegetation+weeds using the polygon reference number a_polyref.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Returns whether the polygon referenced by a_polyref or a_x, a_y has a vegetation type with tramlines.
References m_elems, and m_polymapping.
|
inline |
Returns whether the polygon referenced by a_polyref or a_x, a_y has a vegetation type with tramlines.
References RasterMap::Get(), m_elems, and m_land.
Referenced by Skylark_Adult::GetVegHindrance(), and SkTerritories::PrePolyNQual().
|
inline |
Passes a request on to the associated Calendar class function, the hour of the day.
Get the hour of the day.
References g_date, and Calendar::GetHour().
|
inline |
Passes a request on to the associated Weather class function, the mean humidity for the current day.
References g_weather, and Weather::GetHumidity().
|
inline |
Returns the insect biomass on a polygon using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
Referenced by Spider_Juvenile::AssessFood(), and Skylark_Male::GetFood().
|
inline |
|
inline |
Returns whether its cereal in stubble.
References m_elems, and m_polymapping.
|
inline |
Returns the insterested green biomass of the vegetation using the polygon reference number a_polyref.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Returns the interested green biomass of the vegetation+weeds using the polygon reference number a_polyref.
References m_elems, and m_polymapping.
Referenced by Aphid::calPopuDensity(), Aphid::doReproduction(), and Aphid_Population_Manager::initialiseSimWithEggs().
|
inline |
|
inline |
Function for backwards code compatibility when cereal attributes would now be used.
References ClassificationVegCereal().
|
inline |
Function for backwards code compatibility when grass attributes would now be used.
References ClassificationVegGrass().
bool Landscape::SupplyIsHumanDominated | ( | TTypesOfLandscapeElement | a_tole_type | ) |
For the roe deer, determines the extent of human activity and returns bool.
References tole_ActivePit, tole_AmenityGrass, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_FishFarm, tole_Garden, tole_HeritageSite, tole_LargeRoad, tole_MetalledPath, tole_Parkland, tole_PlantNursery, tole_Pylon, tole_Railway, tole_RefuseSite, tole_RoadsideSlope, tole_SmallRoad, tole_Track, tole_UrbanNoVeg, tole_UrbanPark, tole_UrbanVeg, tole_Wasteland, and tole_WindTurbine.
|
inline |
Indicated if this polygon type is descended from VegElement.
References RasterMap::Get(), m_elems, and m_land.
Referenced by Oedothorax_Juvenile::CheckToleTovIndex().
|
inline |
Returns the whether the vegetation was mown for the polygon referenced by a_polyref or a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
Returns the whether the vegetation was mown for the polygon referenced the index to Landscape::m_elems.
References m_elems.
Referenced by vole_tole_move_quality(), and vole_toletoc_asses_habitat_score().
|
inline |
Returns whether the polygon referenced by a_polyref or a_x, a_y has been sprayed in the last timestep.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Returns whether the polygon referenced by an index to Landscape::m_elems has been sprayed in the last timestep.
References m_elems.
Referenced by vole_tole_move_quality().
|
inline |
Returns the green leaf area of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
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!
References APoint::m_x, and APoint::m_y.
|
inline |
Returns m_LargestPolyNumUsed.
References m_LargestPolyNumUsed.
Referenced by THare_Population_Manager::DoFirst(), THare_Population_Manager::Init(), PesticideTable::PesticideTable(), and SkTerritories::PreFillQualGrid().
|
inline |
Returns the last type of vegetation sown on a field using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Returns the last type of vegetation sown on a field using the polygon index to Landscape::m_elems.
References m_elems.
|
inline |
Returns the last treatment recorded for the polygon.
References m_elems, and m_polymapping.
Referenced by TAnimal::CheckManagement(), PoecilusCupreus_Pupae::CheckManagementBeetle(), Beetle_Base::CheckManagementBeetle(), and TAnimal::CheckManagementXY().
|
inline |
|
inline |
|
inline |
Returns leaf area in total of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
int Landscape::SupplyLECount | ( | void | ) |
Returns number of all landscape elements.
|
inline |
Function for backwards code compatibility when Set_Att_High would now be used.
References SupplyAttIsHigh().
int Landscape::SupplyLENext | ( | void | ) |
Returns -1 at if the end of the list of m_elems is reached, polyref otherwise.
|
inline |
Returns a pointer to the object referred to by the polygon number.
References m_elems, and m_polymapping.
Referenced by Farm::CattleIsOut(), Farm::CattleIsOutLow(), Farm::CattleIsOutLow2(), Farm::CattleOut(), Farm::CattleOutLowGrazing(), BroadBeans::Do(), DK_OLegume_Peas_CC::Do(), DK_OLegume_Beans_CC::Do(), DK_SpringOats_CC::Do(), DK_OWinterRye_CC::Do(), DK_OLegume_Whole_CC::Do(), DK_OSpringBarley_CC::Do(), NLMaize::Do(), DK_OSpringOats_CC::Do(), DK_SpringBarley_CC::Do(), BEWinterBarleyCC::Do(), BEWinterWheatCC::Do(), DK_WinterRye_CC::Do(), NLWinterWheat::Do(), PTCabbage_Hort::Do(), DK_WinterWheat_CC::Do(), PTMaize_Hort::Do(), DK_OWinterWheat_CC::Do(), VegElement::DoDevelopment(), Farm::HandleEvents(), Farm::InitiateManagement(), Farm::Irrigation(), Farm::Mowing(), Farm::PigsAreOut(), Farm::PigsAreOutForced(), Farm::PigsOut(), Farm::SetFunctionData(), VegElement::SetVegType(), Farm::Suckering(), and Farm::WinterHarrow().
void Landscape::SupplyLEReset | ( | void | ) |
Resets internal state for the LE loop generator.
LE_Signal Landscape::SupplyLESignal | ( | int | a_polyref | ) |
Returns current signal mask for polygon.
References m_polymapping.
double Landscape::SupplyLocMaxNectar | ( | int & | a_peak_loc_x, |
int & | a_peak_loc_y, | ||
int | a_min_x, | ||
int | a_min_y, | ||
int | a_max_x, | ||
int | a_max_y, | ||
int | a_incr = 1 |
||
) |
Supply the location with the maximum nectar amount location for the given area.
double Landscape::SupplyLocMaxPollen | ( | int & | a_peak_loc_x, |
int & | a_peak_loc_y, | ||
int | a_min_x, | ||
int | a_min_y, | ||
int | a_max_x, | ||
int | a_max_y, | ||
int | a_incr = 1 |
||
) |
Supply the location with the maximum pollen amount location for the given area.
Referenced by Osmia_Female::Forage().
|
inline |
The function to get the vector of all the locations for the given poly ID.
References m_poly_cell_locs.
|
inline |
|
inline |
Returns a pointer to the map at position x, y. The value found through it is an internal number from the landscape simulator, that uniquely identifies a polygon, it is not the polygon number - to find this apply MagicMap2PolyRef.
References RasterMap::GetMagicP(), and m_land.
|
inline |
|
inline |
Returns the size of the Landscape::m_elems vector.
References m_elems.
Referenced by Pesticide::DiffusionMatrixInit(), Pesticide::MainMapDecay(), and Pesticide::Pesticide().
|
inline |
Passes a request on to the associated Weather class function, the maximum temperature for the current day.
References g_weather, and Weather::GetMaxTemp().
Referenced by PoecilusCupreus_Population_Manager::DayDegreeCalculations().
|
inline |
Passes a request on to the associated Weather class function, the maximum temperature for tomorrow.
References g_weather, and Weather::GetMaxTempTomorrow().
|
inline |
Passes a request on to the associated Weather class function, the maximum temperature for yesterday.
References g_weather, and Weather::GetMaxTempYesterday().
|
inline |
Passes a request on to the associated Weather class function, the mean temperature for the current day.
References g_weather, and Weather::GetMeanTemp().
Referenced by Vole_Population_Manager::DoFirst().
|
inline |
Passes a request on to the associated Weather class function, the minimum temperature for the current day.
References g_weather, and Weather::GetMinTemp().
Referenced by PoecilusCupreus_Population_Manager::DayDegreeCalculations().
|
inline |
Passes a request on to the associated Weather class function, the minimum temperature for tomorrow.
References g_weather, and Weather::GetMinTempTomorrow().
|
inline |
Passes a request on to the associated Weather class function, the minimum temperature for yesterday.
References g_weather, and Weather::GetMinTempYesterday().
|
inline |
Passes a request on to the associated Calendar class function, the minute of the hour.
Get the minute of the hour.
References g_date, and Calendar::GetMinute().
|
inline |
Passes a request on to the associated Calendar class function, returns m_month + 1 (the calendar month)
References g_date, and Calendar::GetMonth().
Referenced by Aphid_Population_Manager::calOffspringStageBBandPP(), SubPopulation_Population_Manager::doDevelopment(), Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), Aphid::doReproduction(), Vole_Population_Manager::GeneticsOutputFile(), Vole_Population_Manager::GeneticsResultsOutput(), Ladybird_Adult::GetExtremeTempMin(), Hare_Female::GiveBirth(), TPredator_Population_Manager::PredSampleFile(), Population_Manager::Run(), and RunTheSim().
std::string Landscape::SupplyMonthName | ( | void | ) |
Passes a request on to the associated Calendar class function, returns the month name (e.g., January)
References g_date, g_msg, Calendar::GetMonth(), MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
|
inline |
Returns information on the nectar produced by the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y.
References m_elems.
Referenced by Osmia_Female::st_ReproductiveBehaviour(), and SupplyNectarAtLocInPoly().
|
inline |
|
inline |
The function to get the given nectar in the given location in the polygon ID, the locations for the required amount of nectar are stored in a_locs, the pesticide residue are stored in a_pest_vet, the foraged amount of nectar are returned.
References m_index_locs_nectar, m_nectar_map, RemoveNectarFromTotal(), SupplyNectar(), and SupplyResourceAtLocInPoly().
|
inline |
Supply the nectar of the current day for the given habitat type.
References m_habitat_nectar.
Referenced by VegElement::PollenNectarPhenologyCalculation().
|
inline |
Returns pointer to the Eigen matrix for nectar.
References m_nectar_map.
Referenced by Pesticide::TwinMapDiffusionMatrix().
|
inline |
Returns the XXX of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems.
Referenced by Pesticide::MainMapDecay(), and Pesticide::RecordAllPesticideCompartments().
|
inline |
Returns the XXX of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_nectar_map.
|
inline |
Passes a request on to the associated Calendar class function, returns 1.0 - m_daylightproportion
References g_date, and Calendar::GetDaylightProportion().
|
inline |
Returns the number of farms in the current landscape.
References FarmManager::GetNoFarms(), and m_FarmManager.
|
inline |
Returns the number of polygons in the landscape.
References m_elems.
Referenced by Vole_Population_Manager::DoFirst(), Vole_Population_Manager::Init(), Osmia_Nest_Manager::InitOsmiaBeeNesting(), Osmia_Population_Manager::Osmia_Population_Manager(), and SubPopulation_Population_Manager::SubPopulation_Population_Manager().
|
inline |
|
inline |
bool Landscape::SupplyOverspray | ( | int | a_x, |
int | a_y | ||
) |
|
inline |
double Landscape::SupplyPesticide | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets total pesticide for the centroid of a polygon.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticide | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets total pesticide for a location.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
Referenced by Pond::CalcPondPesticide(), Spider_Egg::EndStep(), Spider_Juvenile::EndStep(), Spider_Female::EndStep(), Beetle_Larvae::EndStep(), Beetle_Pupae::EndStep(), Beetle_Adult::EndStep(), Skylark_Male::GetFood(), and Pesticide::MainMapDecay().
|
inline |
Gets the index to the cell used to store pesticide information from the coordinates x, y.
References m_elems, and m_polymapping.
Referenced by Pesticide::SupplyPesticide().
bool Landscape::SupplyPesticideDecay | ( | PlantProtectionProducts | a_ppp | ) |
Returns true if there is any pesticide in the system at all at this point.
References g_pest, and Pesticide::GetAnythingToDecay().
double Landscape::SupplyPesticideInPlant | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets pesticide within plant for the centroid of a polygon.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticideInPlant | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets pesticide within plant for a location.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticideNectar | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets nectar pesticide for the centroid of a polygon.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticideNectar | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets nectar pesticide for a location.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
Referenced by Osmia_Female::st_ReproductiveBehaviour().
double Landscape::SupplyPesticideP | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets plant pesticide for the centroid of a polygon.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticideP | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets plant pesticide for a location.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
Referenced by THare::ForageSquareP().
double Landscape::SupplyPesticidePlantSurface | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets plant surface pesticide for the centroid of a polygon.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticidePlantSurface | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets plant surface pesticide for a location.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
Referenced by PesticideToxicity::doContact(), and Osmia_Female::st_ReproductiveBehaviour().
double Landscape::SupplyPesticidePollen | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets pollen pesticide for the centroid of a polygon.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticidePollen | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets pollen pesticide for a location.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticideS | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets soil pesticide for the centroid of a polygon.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticideS | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets soil pesticide for a location.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
|
inline |
Gets type of pesticide effect from a reference.
References m_PesticideType.
Referenced by Vole_Population_Manager::Init(), Beetle_Egg_List::InternalPesticideHandlingAndResponse(), Beetle_Larvae::InternalPesticideHandlingAndResponse(), Beetle_Pupae::InternalPesticideHandlingAndResponse(), Beetle_Adult::InternalPesticideHandlingAndResponse(), Hare_Male::InternalPesticideHandlingAndResponse(), Hare_Female::InternalPesticideHandlingAndResponse(), Vole_Female::st_GiveBirth(), Vole_Female::st_Lactating(), and Skylark_Female::st_Laying().
|
inline |
Returns Landscape::m_pestincidencefactor.
References m_pestincidencefactor.
Referenced by DE_BushFruitPerm::Do(), DE_Maize::Do(), DE_MaizeSilage::Do(), DE_AsparagusEstablishedPlantation::Do(), DE_Legumes::Do(), DE_Peas::Do(), DE_WinterRye::Do(), DE_WinterBarley::Do(), DE_Cabbage::Do(), DE_Oats::Do(), DE_SpringRye::Do(), DE_WinterWheat::Do(), DE_Triticale::Do(), DE_WinterWheatLate::Do(), DE_Orchard::Do(), DE_SugarBeet::Do(), DE_Potatoes::Do(), and DE_PotatoesIndustry::Do().
|
inline |
|
inline |
Returns information on the pollen produced by the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y.
References m_elems.
Referenced by SupplyPollenAtLocInPoly().
|
inline |
|
inline |
The function to get the given pollen in the give location in the polygon ID, the locations for the required amount of pollen are stored in a_locs, the pesticide residue are stored in a_pest_vet, the foraged amount of pollen are returned.
References m_index_locs_pollen, m_pollen_map, RemovePollenFromTotal(), SupplyPollen(), and SupplyResourceAtLocInPoly().
Referenced by Osmia_Female::st_ReproductiveBehaviour().
|
inline |
Supply the pollen of the current day for the given habitat type.
References m_habitat_pollen.
Referenced by VegElement::PollenNectarPhenologyCalculation().
|
inline |
Returns pointer to the Eigen matrix for pollen.
References m_pollen_map.
Referenced by Pesticide::TwinMapDiffusionMatrix().
|
inline |
Returns the pollen quantity produced by the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems.
Referenced by Osmia_Female::Forage(), Osmia_Female::GetPollenInPolygon(), Pesticide::MainMapDecay(), and Pesticide::RecordAllPesticideCompartments().
|
inline |
Returns the pollen quantity produced by the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_pollen_map.
|
inline |
Returns the polygon area of a particular polygon referenced by polygon.
References m_elems, and m_polymapping.
|
inline |
Returns the polygon area of a particular polygon using an index to m_elems.
Returns the area of a polygon using the vector index as a reference.
References m_elems.
Referenced by Osmia_Nest_Manager::InitOsmiaBeeNesting().
|
inline |
Returns pointer to the Eigen Array for poly id map.
References m_polyid_map.
Referenced by Pesticide::MainMapDecay(), Pesticide::ReducePlantPesticide(), and Pesticide::RemovePlantPesticide().
|
inline |
Get the pointer to the LE object associated with the polygon at x,y location or by using the polygon reference.
References m_elems, and m_polymapping.
|
inline |
Get the pointer to the LE object associated with the polygon at x,y location or by using the polygon reference.
References RasterMap::Get(), m_elems, and m_land.
Referenced by Pesticide::DiffusionMatrixInit(), Pesticide::MainMapDecay(), and Pesticide::RecordAllPesticideCompartments().
|
inline |
|
inline |
|
inline |
Get the in map polygon reference number from the x, y location.
References RasterMap::Get(), m_elems, and m_land.
Referenced by Vole_Population_Manager::BarrierSearch(), Pond::CalcPondPesticide(), Skylark_Female::CheckForFields(), Vole_Base::CopyMyself(), Aphid::doReproduction(), Osmia_Female::Forage(), THare::ForageSquare(), THare::ForageSquareP(), Vole_Population_Manager::GeneticsOutputFile(), TPredator_Population_Manager::PredSampleFile(), SkTerritories::PreEvaluateQualGrid(), Vole_Base::Set_PolyRefBorn(), Vole_JuvenileMale::st_BecomeSubAdult(), Vole_JuvenileFemale::st_BecomeSubAdult(), Hare_Juvenile::st_Dispersal(), Vole_Female::st_Lactating(), TAnimal::SupplyPolygonRef(), Vole_Population_Manager::TheReallyBigOutputProbe(), and Beetle_Population_Manager::TheReallyBigOutputProbe().
|
inline |
Get the in map polygon reference number from the x,y location, and correcting for possible wrap around coordinates.
References RasterMap::Get(), m_elems, m_height, m_height10, m_land, m_width, and m_width10.
|
inline |
Get the index to the m_elems array for a polygon at location x,y.
References RasterMap::Get(), and m_land.
Referenced by Vole_Base::CalculateCarryingCapacity(), Osmia_Female::FindNestLocation(), SubPopulation_Population_Manager::initialisePopulation(), Aphid_Population_Manager::initialiseSimWithEggs(), and vole_tole_move_quality().
|
inline |
|
inline |
Returns m_poly_with_flowers, a list of polygons with flowering modelled.
References m_poly_with_flowers.
|
inline |
Returns the index of a pond based on pondref or -1 if not found.
References m_PondIndexList, and m_PondRefsList.
|
inline |
|
inline |
Returns the amount of sunshine in a given hour (0 to 23)
References g_weather, and Weather::GetRadiationHour().
|
inline |
Passes a request on to the associated Weather class function, the amount of rain for all dates.
References g_weather, and Weather::GetRain().
|
inline |
Passes a request on to the associated Weather class function, the amount of rain for the current day.
References g_weather, and Weather::GetRain().
Referenced by Skylark_Female::FeedYoung(), THare_Population_Manager::GetRMR(), Skylark_Adult::GetWeatherHindrance(), Skylark_Male::st_CaringForYoung(), Skylark_Female::st_Incubating(), and Pesticide::Tick().
|
inline |
Returns the amount of rain in a given hour (0 to 23)
References g_weather, and Weather::GetRainHour().
|
inline |
Passes a request on to the associated Weather class function, the total amount of rain from a_date and a_period of days.
References g_weather, and Weather::GetRainPeriod().
int Landscape::SupplyRandomPondIndex | ( | ) |
Returns random pond index.
References g_rand_uni_fnc().
int Landscape::SupplyRandomPondRef | ( | ) |
Returns random pond polyref.
References g_rand_uni_fnc().
|
inline |
Returns m_land, the pointer to the raster map instance.
References m_land.
Referenced by Pesticide::Pesticide().
double Landscape::SupplyResourceAtLocInPoly | ( | int | a_poly_id, |
APoint | a_start_loc, | ||
double | a_required_amount, | ||
vector< APoint > * | a_locs, | ||
vector< double > * | a_pest_vec, | ||
Eigen::MatrixXf & | a_resource_map, | ||
int | a_num_avail_cell, | ||
PollenNectarData | a_resource_data, | ||
bool | a_is_pollen | ||
) |
The function to get the given amount of the required resource for the given location, the function returns the foraged amount.
References PollenNectarData::m_quantity, APoint::m_x, and APoint::m_y.
Referenced by SupplyNectarAtLocInPoly(), and SupplyPollenAtLocInPoly().
|
inline |
Returns the width of roads.
References RasterMap::Get(), m_elems, m_land, tole_LargeRoad, and tole_SmallRoad.
double Landscape::SupplyRodenticide | ( | int | a_x, |
int | a_y | ||
) |
Gets total rodenticide for a location.
References cfg_rodenticide_enable, and CfgBool::value().
Referenced by Vole_Base::RodenticideIngestion().
|
inline |
References m_RodenticidePreds.
double Landscape::SupplySeedCoating | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets total seed coating for the centorid of a polygen.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticideSeed(), and CfgBool::value().
|
inline |
Returns m_toxShouldSpray, a flag indicating whether pesticide should be sprayed.
References m_toxShouldSpray.
Referenced by Orchard::DoDevelopment(), and OrchardBand::DoDevelopment().
|
inline |
Gets the simulation landscape height.
References m_height.
Referenced by Beetle_Base::Beetle_1M_Move(), Bembidion_Population_Manager::Bembidion_Population_Manager(), TAnimal::CorrectWrapRound(), SkTerritories::DumpMapGraphics(), THare::ForageSquare(), THare::ForageSquareP(), IDMap< TAnimal * >::IDMap(), IDMapScaled::IDMapScaled(), Erigone_Population_Manager::Init(), Oedothorax_Population_Manager::Init(), MovementMapUnsigned::Init(), MovementMap::Init(), MovementMap16::Init(), Skylark_Population_Manager::Init(), Ladybird_Population_Manager::Ladybird_Population_Manager(), MovementMap::MovementMap(), MovementMap16::MovementMap16(), MovementMapUnsigned::MovementMapUnsigned(), OsmiaParasitoid_Population_Manager::OsmiaParasitoid_Population_Manager(), PesticideOutput::PesticideOutput(), PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager(), Population_Manager_Base::Population_Manager_Base(), PositionMap::PositionMap(), TPredator_Population_Manager::PredSampleFile(), ScalablePositionMap::ScalablePositionMap(), SimplePositionMap::SimplePositionMap(), SimplePositionMapInt::SimplePositionMapInt(), SimplePositionMapPointers< AnimalTypes >::SimplePositionMapPointers(), SkTerritories::SkTerritories(), Skylark_Female::st_Arriving(), skTTerritory::TestNestPossibility(), Skylark_Population_Manager::TheRipleysOutputProbe(), THare_Population_Manager::TheRipleysOutputProbe(), and TPredator::TPredator().
|
inline |
Returns which ever is larger, height or width of simulation landscape.
References m_maxextent.
int Landscape::SupplySimAreaMinExtent | ( | void | ) |
Returns which ever is smaller, height or width of simulation landscape LKM - used??
|
inline |
Gets the simulation landscape width.
References m_width.
Referenced by Beetle_Base::Beetle_1M_Move(), Bembidion_Population_Manager::Bembidion_Population_Manager(), TAnimal::CorrectWrapRound(), SkTerritories::DumpMapGraphics(), THare::ForageSquare(), THare::ForageSquareP(), Vole_Population_Manager::GeneticsOutputFile(), IDMap< TAnimal * >::IDMap(), IDMapScaled::IDMapScaled(), Erigone_Population_Manager::Init(), Oedothorax_Population_Manager::Init(), MovementMapUnsigned::Init(), MovementMap::Init(), MovementMap16::Init(), Skylark_Population_Manager::Init(), Ladybird_Population_Manager::Ladybird_Population_Manager(), Vole_Population_Manager::LandscapeQuadrantOutputProbe(), MovementMap::MovementMap(), MovementMap16::MovementMap16(), MovementMapUnsigned::MovementMapUnsigned(), OsmiaParasitoid_Population_Manager::OsmiaParasitoid_Population_Manager(), PesticideOutput::PesticideOutput(), PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager(), PositionMap::PositionMap(), TPredator_Population_Manager::PredSampleFile(), ScalablePositionMap::ScalablePositionMap(), SimplePositionMap::SimplePositionMap(), SimplePositionMapInt::SimplePositionMapInt(), SimplePositionMapPointers< AnimalTypes >::SimplePositionMapPointers(), SkTerritories::SkTerritories(), Skylark_Female::st_Arriving(), skTTerritory::TestNestPossibility(), Beetle_Population_Manager::TheReallyBigOutputProbe(), Erigone_Population_Manager::TheRipleysOutputProbe(), Oedothorax_Population_Manager::TheRipleysOutputProbe(), Vole_Population_Manager::TheRipleysOutputProbe(), Skylark_Population_Manager::TheRipleysOutputProbe(), THare_Population_Manager::TheRipleysOutputProbe(), Beetle_Population_Manager::TheRipleysOutputProbe(), and TPredator::TPredator().
|
inline |
Returns the presence of skylark scrapes in the vegetation using the polygon reference number a_polyref.
References m_elems, and m_polymapping.
Referenced by Skylark_Adult::GetVegHindrance(), and SkTerritories::PrePolyNQual().
|
inline |
Passes a request on to the associated Weather class function, the snow cover for the current day.
References g_weather, and Weather::GetSnow().
|
inline |
Passes a request on to the associated Weather class function, the snow cover for the current day.
References g_weather, and Weather::GetSnow().
Referenced by Skylark_Female::st_PreparingForBreeding().
|
inline |
Passes a request on to the associated Weather class function, the snow depth for the current day.
References g_weather, and Weather::GetSnowDepth().
|
inline |
Passes a request on to the associated Weather class function, the soil temperature for all dates.
References g_weather, and Weather::GetSoilTemp().
|
inline |
Passes a request on to the associated Weather class function, the soil temperature for the current day.
References g_weather, and Weather::GetSoilTemp().
Referenced by Beetle_Population_Manager::DayDegreeCalculations(), and Beetle_Adult::IncNegDegrees().
|
inline |
Returns the soil temperature in a given hour (0 to 23)
References g_weather, and Weather::GetSoilTempHour().
Referenced by Beetle_Population_Manager::DayDegreeCalculations().
|
inline |
|
inline |
double Landscape::SupplySprayPesticideRate | ( | int | a_polyref | ) |
Gets the sprayed pesticide rate in the given field.
References m_polymapping.
double Landscape::SupplySprayPesticideRate | ( | int | a_x, |
int | a_y | ||
) |
Gets the sprayed pesticide rate in the given location.
Referenced by PesticideToxicity::doOverspray().
PlantProtectionProducts Landscape::SupplySprayPesticideType | ( | int | a_polyref | ) |
Gets the sprayed pesticide type in the given field.
References m_polymapping.
PlantProtectionProducts Landscape::SupplySprayPesticideType | ( | int | a_x, |
int | a_y | ||
) |
Gets the sprayed pesticide type in the given location.
Referenced by PesticideToxicity::doOverspray().
|
inline |
|
inline |
|
inline |
|
inline |
Passes a request on to the associated Weather class function, the temperature for all dates.
References g_weather, and Weather::GetTemp().
|
inline |
Passes a request on to the associated Weather class function, the temperature for the current day.
References g_weather, and Weather::GetTemp().
Referenced by PoecilusCupreus_Population_Manager::DayDegreeCalculations(), Ladybird_Population_Manager::DayDegreeCalculations(), Beetle_Population_Manager::DayDegreeCalculations(), SubPopulation_Population_Manager::doDevelopment(), Erigone_Population_Manager::DoFirst(), Oedothorax_Population_Manager::DoFirst(), Skylark_Population_Manager::DoFirst(), Osmia_Population_Manager::DoFirst(), Skylark_Female::FeedYoung(), Ladybird_Population_Manager::GetFlyingWeather(), THare_Population_Manager::GetRMR(), Skylark_Adult::GetWeatherHindrance(), VegElement::RecalculateBugsNStuff(), Population_Manager::Run(), Beetle_Adult::St_Aggregate(), Skylark_Female::st_BuildingUpResources(), Ladybird_Pupae::St_Develop(), Osmia_Larva::st_Develop(), Osmia_Pupa::st_Develop(), Beetle_Larvae::St_Develop(), Beetle_Pupae::St_Develop(), Skylark_Clutch::st_Developing(), Skylark_Nestling::st_Developing(), Skylark_Female::st_Emigrating(), Skylark_Male::st_Emigrating(), Beetle_Adult::St_Forage(), Skylark_Female::st_PreparingForBreeding(), SubPopulation_Population_Manager::subpopuBaseOutputProbe(), SubPopulation_Population_Manager::updateMortalityArray(), and Aphid_Population_Manager::updateMortalityArrayShared().
|
inline |
Returns the temperature in a given hour (0 to 23)
References g_weather, and Weather::GetTempHour().
Referenced by Ladybird_Population_Manager::DayDegreeCalculations(), and Aphid_Population_Manager::updateMortalityArrayShared().
|
inline |
Passes a request on to the associated Weather class function, the total temperature from a_date and a_period of days.
References g_weather, and Weather::GetTempPeriod().
Referenced by Osmia_Population_Manager::DoLast().
|
inline |
Set the pointer to the list of active population managers.
References m_ThePopManagerList.
Referenced by Osmia_Population_Manager::Init().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the traffic load.
References m_elems, and m_polymapping.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns an x-coordinate guaranteed to be within the polygon referenced.
References m_elems, and m_polymapping.
|
inline |
Returns an y-coordinate guaranteed to be within the polygon referenced.
References m_elems, and m_polymapping.
|
inline |
Returns the vegetation age for the polygon referenced by a_polyref or a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Records all area vegetation types and transform it into a table.
References l_vegtype_areas.
Referenced by Skylark_Population_Manager::FledgelingProbeOutput().
|
inline |
Returns the biomass of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
Referenced by Erigone_Juvenile::CalcDrought(), Oedothorax_Juvenile::CalcDrought(), Oedothorax_Female::CalcDrought(), Erigone_Female::CalcDrought(), SubPopulation_Population_Manager::initialisePopulation(), Pesticide::RecordAllPesticideCompartments(), and SubPopulation_Population_Manager::Run().
|
inline |
|
inline |
Returns the biomass of the vegetation using the index a_index to Landscape::m_elems.
References m_elems.
|
inline |
Returns the vegetation cover proportion of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
Referenced by Pesticide::MainMapDecay(), and PoecilusCupreus_Adult::MoveTo_Quality_Assess().
|
inline |
|
inline |
Returns the vegetation cover proportion of the vegetation using the polygon index to Landscape::m_elems.
References m_elems.
Referenced by vole_tole_move_quality(), and vole_toletoc_asses_habitat_score().
|
inline |
Returns the density of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
Referenced by Skylark_Adult::GetVegHindrance(), and SkTerritories::PrePolyNQual().
|
inline |
|
inline |
Gets the digestibility of the vegetation for a polygon given by a_polyref or based on the x, y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Gets the digestibility of the vegetation based on an index to the Landscape::m_elems array.
References m_elems.
|
inline |
Returns the vegetation growth stage of the vegetation using the polygon reference number a_polyref or based on the x,y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
Referenced by Aphid::doReproduction().
|
inline |
|
inline |
Returns the height of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
Referenced by Skylark_Female::CheckForFields(), Aphid::doReproduction(), SkTerritories::DumpMapGraphics(), Skylark_Adult::GetVegHindrance(), Hare_Female::PlaceYoung(), SkTerritories::PrePoly2Qual(), SkTerritories::PrePolyNQual(), and Pesticide::RecordAllPesticideCompartments().
|
inline |
|
inline |
Returns the height of the vegetation using the index to Landscape::m_elems.
References m_elems.
Referenced by vole_tole_move_quality(), and vole_toletoc_asses_habitat_score().
|
inline |
Returns whether the polygon referenced by a_polyref or a_x, a_y has a vegetation type designated as patchy.
References SupplyAttIsVegPatchy().
Referenced by Skylark_Adult::GetVegHindrance(), SkTerritories::PrePoly2Qual(), and SkTerritories::PrePolyNQual().
|
inline |
Returns whether the polygon referenced by a_polyref or a_x, a_y has a vegetation type designated as patchy.
References SupplyAttIsVegPatchy().
|
inline |
Returns the current vegetation growth phase for a polygon.
References m_elems, and m_polymapping.
|
inline |
Returns the vegetation type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a # TTypesOfVegetation.
References RasterMap::Get(), m_elems, and m_land.
Referenced by Aphid::calPopuDensity(), SubPopulation::calSuitability(), Vole_Base::CheckTraps(), Vole_Base::CopyMyself(), Aphid::doReproduction(), Vole_Population_Manager::GeneticsOutputFile(), Ladybird_Larvae1::IsLocationAllowed(), TPredator_Population_Manager::PredSampleFile(), Beetle_Population_Manager::Probe(), SubPopulation_Population_Manager::Run(), Vole_Base::Set_VegBorn(), Beetle_Adult::St_Aggregate(), Vole_JuvenileMale::st_BecomeSubAdult(), Vole_JuvenileFemale::st_BecomeSubAdult(), Vole_Female::st_Lactating(), Skylark_Female::st_Laying(), TAnimal::SupplyPosition(), and Vole_Population_Manager::TheReallyBigOutputProbe().
|
inline |
Returns the vegetation type of the polygon using the polygon reference number a_polyref or coordinates a_x, a_y. Returns the value as a # TTypesOfVegetation.
References m_elems, and m_polymapping.
|
inline |
|
inline |
|
inline |
Returns the weed biomass of the vegetation using the polygon reference number a_polyref or based on the x, y coordinates given by a_x, a_y.
References m_elems, and m_polymapping.
|
inline |
|
inline |
Passes a request on to the associated Weather class function, the wind speed for all dates.
References g_weather, and Weather::GetWind().
|
inline |
Passes a request on to the associated Weather class function, the wind speed for the current day.
References g_weather, and Weather::GetWind().
Referenced by Oedothorax_Population_Manager::DoFirst(), SubPopulation_Population_Manager::DoFirst(), SubPopulation_Population_Manager::doFlying(), and Ladybird_Population_Manager::GetFlyingWeather().
|
inline |
Passes a request on to the associated Weather class function, the wind direction in 4 directions for the current day.
References g_weather, and Weather::GetWindDirection().
Referenced by SubPopulation_Population_Manager::doFlying(), and Pesticide::Tick().
|
inline |
Passes a request on to the associated Weather class function, the wind direction in 8 directions for the current day.
References g_weather, and Weather::GetWindDirection8().
Referenced by Erigone_Population_Manager::DoFirst(), and Oedothorax_Population_Manager::DoFirst().
|
inline |
Passes a request on to the associated Weather class function, the wind direction in radians for the current day.
References g_weather, and Weather::GetWindDirectionRadians().
|
inline |
Returns the wind speed in a given hour (0 to 23)
References g_weather, and Weather::GetWindHour().
|
inline |
Passes a request on to the associated Weather class function, the total wind speed from a_date and a_period of days.
References g_weather, and Weather::GetWindPeriod().
|
inline |
Passes a request on to the associated Calendar class function, returns m_year.
References g_date, and Calendar::GetYear().
Referenced by Vole_Population_Manager::GeneticsResultsOutput().
|
inline |
Passes a request on to the associated Calendar class function, returns m_simulationyear
References g_date, and Calendar::GetYearNumber().
Referenced by Erigone_Population_Manager::Catastrophe(), Oedothorax_Population_Manager::Catastrophe(), Vole_Population_Manager::Catastrophe(), Skylark_Population_Manager::Catastrophe(), THare_Population_Manager::Catastrophe(), Beetle_Population_Manager::Catastrophe(), Beetle_Population_Manager::Catastrophe2(), Vole_Base::CheckTraps(), Vole_Population_Manager::CreateObjectsInit(), Beetle_Population_Manager::DoBeetleActiveProbe(), Vole_Population_Manager::DoFirst(), THare_Population_Manager::ExtraPopMort(), Vole_Population_Manager::GeneticsOutputFile(), Hare_Male::InternalPesticideHandlingAndResponse(), Hare_Female::InternalPesticideHandlingAndResponse(), THare_Population_Manager::MRROutputs(), VoleSummaryOutput::OPrint(), TPredator_Population_Manager::PredAutumnSample(), TPredator_Population_Manager::PredSampleFile(), TPredator_Population_Manager::PredSpringAutumnSample(), TPredator_Population_Manager::PredSpringSample(), Farm::ProductApplication_DateLimited(), Vole_Population_Manager::ResistanceOutput(), TPredator_Population_Manager::Run(), Population_Manager::Run(), Skylark_Female::st_Laying(), Vole_Population_Manager::TheAgeSexLocationProbe(), Vole_Population_Manager::TheReallyBigOutputProbe(), and Vole_Population_Manager::TheSexRatiosProbe().
void Landscape::Tick | ( | void | ) |
If the farmer decision making model is on, the function:
To get some habitat specific data
References cfg_habitat_polnek_file, cfg_pesticidemapnoyears, cfg_pesticidemapon, cfg_pesticidemapstartyear, cfg_pesticidemaptype, cfg_pesticidetableon, cfg_pollen_nectar_on, cfg_productapplicendyear, cfg_productapplicstartyear, cfg_rodenticide_enable, cfg_total_polnek_file, cfg_tov_polnek_file, Calendar::Date(), Calendar::DayInYear(), g_date, g_nectarpollen, g_pest, g_rand_uni_fnc(), g_weather, Calendar::GetDayInMonth(), Calendar::GetYearNumber(), janfirst, Calendar::JanFirst(), l_map_dump_event_enable, l_map_dump_event_x1, l_map_dump_event_x2, l_map_dump_event_y1, l_map_dump_event_y2, l_map_dump_grain_each_x_days, l_map_dump_grain_enable, l_map_dump_veg_enable, l_map_dump_veg_x, l_map_dump_veg_y, l_pest_enable_pesticide_engine, marchfirst, Calendar::MarchFirst(), PollenNectarDevelopmentData::RecalculatePollenNectarCurvesForYear(), Calendar::Tick(), Pesticide::Tick(), Weather::Tick(), CfgInt::value(), CfgBool::value(), and CfgStr::value().
Referenced by TurnTheWorld().
|
inline |
Returns element type translated from the ALMaSS reference number.
References g_letype, and LE_TypeClass::TranslateEleTypes().
Referenced by Osmia_Nest_Manager::InitOsmiaBeeNesting(), and Population_Manager_Base::ProbeFileInput().
|
inline |
Returns element type translated from the ALMaSS reference string.
References g_letype, and LE_TypeClass::TranslateEleTypesFromString().
|
inline |
Returns vegetation type translated from the ALMaSS reference number.
References g_letype, and LE_TypeClass::TranslateVegTypes().
Referenced by Beetle_Population_Manager::Beetle_Population_Manager(), Bembidion_Population_Manager::Bembidion_Population_Manager(), PoecilusCupreus_Population_Manager::PoecilusCupreus_Population_Manager(), and Population_Manager_Base::ProbeFileInput().
|
inline |
|
protected |
Records vegetation charateristics for the x, y location.
Records vegetation charateristics for the x,y location. Information is dumped to VegDump.txt
References cfg_pollen_nectar_on, g_date, g_msg, Calendar::GetYear(), CfgBool::value(), MapErrorMsg::Warn(), and WARN_FILE.
std::string Landscape::VegtypeToString | ( | TTypesOfVegetation | a_veg | ) |
Returns the text representation of a TTypesOfVegetation type.
References g_msg, tov_AgroChemIndustryCereal, tov_BEBeet, tov_BEBeetSpring, tov_BECatchPeaCrop, tov_BEGrassGrazed1, tov_BEGrassGrazed1Spring, tov_BEGrassGrazed2, tov_BEGrassGrazedLast, tov_BEMaize, tov_BEMaizeCC, tov_BEMaizeSpring, tov_BEOrchardCrop, tov_BEPotatoes, tov_BEPotatoesSpring, tov_BEWinterBarley, tov_BEWinterBarleyCC, tov_BEWinterWheat, tov_BEWinterWheatCC, tov_BroadBeans, tov_Carrots, tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_DEAsparagusEstablishedPlantation, tov_DEBushFruitPerm, tov_DECabbage, tov_DECarrots, tov_DEGrasslandSilageAnnual, tov_DEGreenFallow_1year, tov_DEHerbsPerennial_1year, tov_DEHerbsPerennial_after1year, tov_DELegumes, tov_DEMaize, tov_DEMaizeSilage, tov_DEOAsparagusEstablishedPlantation, tov_DEOats, tov_DEOBushFruitPerm, tov_DEOCabbages, tov_DEOCarrots, tov_DEOGrasslandSilageAnnual, tov_DEOGreenFallow_1year, tov_DEOHerbsPerennial_1year, tov_DEOHerbsPerennial_after1year, tov_DEOLegume, tov_DEOMaize, tov_DEOMaizeSilage, tov_DEOOats, tov_DEOOrchard, tov_DEOPeas, tov_DEOPermanentGrassGrazed, tov_DEOPermanentGrassLowYield, tov_DEOPotatoes, tov_DEOrchard, tov_DEOSpringRye, tov_DEOSugarBeet, tov_DEOTriticale, tov_DEOWinterBarley, tov_DEOWinterRape, tov_DEOWinterRye, tov_DEOWinterWheat, tov_DEPeas, tov_DEPermanentGrassGrazed, tov_DEPermanentGrassLowYield, tov_DEPotatoes, tov_DEPotatoesIndustry, tov_DESpringBarley, tov_DESpringRye, tov_DESugarBeet, tov_DETriticale, tov_DEWinterBarley, tov_DEWinterRape, tov_DEWinterRye, tov_DEWinterWheat, tov_DEWinterWheatLate, tov_DKBushFruit_Perm1, tov_DKBushFruit_Perm2, tov_DKCabbages, tov_DKCarrots, tov_DKCatchCrop, tov_DKCerealLegume, tov_DKCerealLegume_Whole, tov_DKChristmasTrees_Perm, tov_DKCloverGrassGrazed1, tov_DKCloverGrassGrazed2, tov_DKCloverGrassGrazed3, tov_DKEnergyCrop_Perm, tov_DKFarmForest_Perm, tov_DKFarmYoungForest_Perm, tov_DKFodderBeets, tov_DKGrassGrazed_Perm, tov_DKGrassLowYield_Perm, tov_DKGrassTussocky_Perm, tov_DKGrazingPigs, tov_DKGrazingPigs_Perm, tov_DKLegume_Beans, tov_DKLegume_Peas, tov_DKLegume_Whole, tov_DKMaize, tov_DKMaizeSilage, tov_DKMixedVeg, tov_DKOBushFruit_Perm1, tov_DKOBushFruit_Perm2, tov_DKOCabbages, tov_DKOCarrots, tov_DKOCatchCrop, tov_DKOCerealLegume, tov_DKOCerealLegume_Whole, tov_DKOChristmasTrees_Perm, tov_DKOCloverGrassGrazed1, tov_DKOCloverGrassGrazed2, tov_DKOCloverGrassGrazed3, tov_DKOEnergyCrop_Perm, tov_DKOFarmForest_Perm, tov_DKOFarmYoungForest_Perm, tov_DKOFodderBeets, tov_DKOGrassGrazed_Perm, tov_DKOGrassLowYield_Perm, tov_DKOGrazingPigs, tov_DKOGrazingPigs_Perm, tov_DKOLegume_Beans, tov_DKOLegume_Beans_CC, tov_DKOLegume_Peas, tov_DKOLegume_Peas_CC, tov_DKOLegume_Whole, tov_DKOLegume_Whole_CC, tov_DKOLegumeCloverGrass_Whole, tov_DKOLentils, tov_DKOLupines, tov_DKOMaize, tov_DKOMaizeSilage, tov_DKOMixedVeg, tov_DKOOrchApple, tov_DKOOrchardCrop_Perm, tov_DKOOrchCherry, tov_DKOOrchOther, tov_DKOOrchPear, tov_DKOPotato, tov_DKOPotatoIndustry, tov_DKOPotatoSeed, tov_DKOptimalFlowerMix1, tov_DKOptimalFlowerMix2, tov_DKOptimalFlowerMix3, tov_DKOrchApple, tov_DKOrchardCrop_Perm, tov_DKOrchCherry, tov_DKOrchOther, tov_DKOrchPear, tov_DKOSeedGrassRye_Spring, tov_DKOSetAside, tov_DKOSetAside_AnnualFlower, tov_DKOSetAside_PerennialFlower, tov_DKOSetAside_SummerMow, tov_DKOSpringBarley, tov_DKOSpringBarley_CC, tov_DKOSpringBarleyCloverGrass, tov_DKOSpringBarleySilage, tov_DKOSpringFodderGrass, tov_DKOSpringOats, tov_DKOSpringOats_CC, tov_DKOSpringWheat, tov_DKOSugarBeets, tov_DKOVegSeeds, tov_DKOWinterBarley, tov_DKOWinterCloverGrassGrazedSown, tov_DKOWinterFodderGrass, tov_DKOWinterRape, tov_DKOWinterRye, tov_DKOWinterRye_CC, tov_DKOWinterWheat, tov_DKOWinterWheat_CC, tov_DKPlantNursery_Perm, tov_DKPotato, tov_DKPotatoIndustry, tov_DKPotatoSeed, tov_DKSeedGrassFescue_Spring, tov_DKSeedGrassRye_Spring, tov_DKSetAside, tov_DKSetAside_SummerMow, tov_DKSpringBarley, tov_DKSpringBarley_CC, tov_DKSpringBarley_Green, tov_DKSpringBarleyCloverGrass, tov_DKSpringBarleySilage, tov_DKSpringFodderGrass, tov_DKSpringOats, tov_DKSpringOats_CC, tov_DKSpringWheat, tov_DKSugarBeets, tov_DKUndefined, tov_DKVegSeeds, tov_DKWinterBarley, tov_DKWinterCloverGrassGrazedSown, tov_DKWinterFodderGrass, tov_DKWinterRape, tov_DKWinterRye, tov_DKWinterRye_CC, tov_DKWinterWheat, tov_DKWinterWheat_CC, tov_DummyCropPestTesting, tov_FIBufferZone, tov_FIBufferZone_Perm, tov_FICaraway1, tov_FICaraway2, tov_FieldPeas, tov_FieldPeasSilage, tov_FieldPeasStrigling, tov_FIFabaBean, tov_FIFeedingGround, tov_FIGrasslandPasturePerennial1, tov_FIGrasslandPasturePerennial2, tov_FIGrasslandSilageAnnual, tov_FIGrasslandSilagePerennial1, tov_FIGrasslandSilagePerennial2, tov_FIGreenFallow_1year, tov_FIGreenFallow_Perm, tov_FINaturalGrassland, tov_FINaturalGrassland_Perm, tov_FIOCaraway1, tov_FIOCaraway2, tov_FIOFabaBean, tov_FIOPotato_North, tov_FIOPotato_South, tov_FIOPotatoIndustry_North, tov_FIOPotatoIndustry_South, tov_FIOSpringBarley_Fodder, tov_FIOSpringBarley_Malt, tov_FIOSpringOats, tov_FIOSpringRape, tov_FIOSpringWheat, tov_FIOStarchPotato_North, tov_FIOStarchPotato_South, tov_FIOTurnipRape, tov_FIOWinterRye, tov_FIOWinterWheat, tov_FIPotato_North, tov_FIPotato_South, tov_FIPotatoIndustry_North, tov_FIPotatoIndustry_South, tov_FISpringBarley_Fodder, tov_FISpringBarley_Malt, tov_FISpringOats, tov_FISpringRape, tov_FISpringWheat, tov_FISprSpringBarley_Fodder, tov_FIStarchPotato_North, tov_FIStarchPotato_South, tov_FISugarBeet, tov_FITurnipRape, tov_FIWinterRye, tov_FIWinterWheat, tov_FlowerStrip1, tov_FlowerStrip2, tov_FlowerStrip3, tov_FodderBeet, tov_FodderGrass, tov_FRGrassland, tov_FRGrassland_Perm, tov_FRMaize, tov_FRMaize_Silage, tov_FRPotatoes, tov_FRSorghum, tov_FRSpringBarley, tov_FRSpringOats, tov_FRSpringWheat, tov_FRSunflower, tov_FRWinterBarley, tov_FRWinterRape, tov_FRWinterTriticale, tov_FRWinterWheat, tov_GenericCatchCrop, tov_Heath, tov_IRGrassland_no_reseed, tov_IRGrassland_reseed, tov_IRSpringBarley, tov_IRSpringOats, tov_IRSpringWheat, tov_IRWinterBarley, tov_IRWinterOats, tov_IRWinterWheat, tov_ITGrassland, tov_ITOOrchard, tov_ITOrchard, tov_Lawn, tov_Maize, tov_MaizeSilage, tov_MaizeStrigling, tov_NaturalGrass, tov_NLBeet, tov_NLBeetSpring, tov_NLCabbage, tov_NLCabbageSpring, tov_NLCarrots, tov_NLCarrotsSpring, tov_NLCatchCropPea, tov_NLGrassGrazed1, tov_NLGrassGrazed1Spring, tov_NLGrassGrazed2, tov_NLGrassGrazedExtensive1, tov_NLGrassGrazedExtensive1Spring, tov_NLGrassGrazedExtensive2, tov_NLGrassGrazedExtensiveLast, tov_NLGrassGrazedLast, tov_NLMaize, tov_NLMaizeSpring, tov_NLOrchardCrop, tov_NLPermanentGrassGrazed, tov_NLPermanentGrassGrazedExtensive, tov_NLPotatoes, tov_NLPotatoesSpring, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLTulips, tov_NLWinterWheat, tov_NoGrowth, tov_None, tov_NorwegianOats, tov_NorwegianPotatoes, tov_NorwegianSpringBarley, 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_PLBeans, tov_PLBeet, tov_PLBeetSpr, tov_PLCarrots, tov_PLFodderLucerne1, tov_PLFodderLucerne2, tov_PLMaize, tov_PLMaizeSilage, tov_PLPotatoes, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRape, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_Potatoes, tov_PotatoesIndustry, tov_PTBeans, tov_PTCabbage, tov_PTCabbage_Hort, tov_PTCloverGrassGrazed1, tov_PTCloverGrassGrazed2, tov_PTCorkOak, tov_PTFodderMix, tov_PTGrassGrazed, tov_PTHorticulture, tov_PTMaize, tov_PTMaize_Hort, tov_PTOats, tov_PTOliveGroveIntensive, tov_PTOliveGroveSuperIntensive, tov_PTOliveGroveTraditional, tov_PTOliveGroveTradOrganic, tov_PTOtherDryBeans, tov_PTPermanentGrassGrazed, tov_PTPotatoes, tov_PTRyegrass, tov_PTSetAside, tov_PTShrubPastures, tov_PTSorghum, tov_PTTriticale, tov_PTTurnipGrazed, tov_PTVineyards, tov_PTWinterBarley, tov_PTWinterRye, tov_PTWinterWheat, tov_PTYellowLupin, tov_SeedGrass1, tov_SeedGrass2, tov_SESpringBarley, tov_SetAside, tov_SEWinterRape_Seed, tov_SEWinterWheat, 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_UKBeans, tov_UKBeet, tov_UKMaize, tov_UKPermanentGrass, tov_UKPotatoes, tov_UKSpringBarley, tov_UKTempGrass, tov_UKWinterBarley, tov_UKWinterRape, tov_UKWinterWheat, tov_Undefined, tov_Wasteland, tov_WaterBufferZone, 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.
Referenced by Skylark_Population_Manager::OpenTheFledgelingProbe(), and Crop::StartUpCrop().
|
inline |
Wrapper for the g_msg Warn function.
References g_msg, MapErrorMsg::Warn(), and WARN_MSG.
Referenced by Hare_Female::AllYoungKilled(), Hare_Female::AllYoungMatured(), Spider_Juvenile::AssessHabitat(), Vole_Population_Manager::DoFirst(), Skylark_Nestling::EndStep(), Skylark_PreFledgeling::EndStep(), THare::EnergyBalance(), SkTerritories::EvaluateHabitatN(), Vole_Population_Manager::GeneticsOutputFile(), THare_Population_Manager::GetGrowthEfficiency(), THare_Population_Manager::GetGrowthEfficiencyF(), THare_Population_Manager::GetGrowthEfficiencyP(), THare_Population_Manager::GetKJperM(), THare_Population_Manager::GetLitterSize(), THare_Population_Manager::GetMaxDailyGrowthEnergy(), THare_Population_Manager::GetMaxDailyGrowthEnergyF(), THare_Population_Manager::GetMaxDailyGrowthEnergyP(), GetProbeInput_ini(), THare_Population_Manager::GetRMR(), Vole_Population_Manager::ImpactedProbe(), Vole_Population_Manager::Init(), THare_Population_Manager::Init(), Population_Manager::LOG(), THare::ON_MumDead(), Hare_Female::ON_RemoveYoung(), Hare_Female::ON_YoungKilled(), Skylark_Male::OnAddPreFledgeling(), Skylark_Female::OnClutchDeath(), Skylark_Male::OnEggHatch(), Skylark_Female::OnEggsHatch(), Bembidion_Population_Manager::OnFarmEvent(), Ladybird_Population_Manager::OnFarmEvent(), Skylark_Clutch::OnFarmEvent(), Skylark_Nestling::OnFarmEvent(), Skylark_PreFledgeling::OnFarmEvent(), Skylark_Female::OnFarmEvent(), Skylark_Male::OnFarmEvent(), Hare_Infant::OnFarmEvent(), Hare_Young::OnFarmEvent(), Skylark_Male::OnNestlingDeath(), Skylark_Male::OnPreFledgelingDeath(), Vole_Population_Manager::OpenResistanceOutput(), MRR_Data::OutputToFile(), THare_Population_Manager::POMOutputs(), TPredator_Population_Manager::PredAutumnSample(), TPredator_Population_Manager::PredSampleFile(), TPredator_Population_Manager::PredSpringAutumnSample(), TPredator_Population_Manager::PredSpringSample(), SkTerritories::PrePoly2Qual(), SkTerritories::PrePolyNQual(), SkTerritories::PreProcessLandscape2(), Population_Manager_Base::ProbeFileInput(), TPredator_Population_Manager::Run(), Vole_Population_Manager::SendMessage(), Population_Manager::Shuffle_or_Sort(), Skylark_Female::st_Dying(), Skylark_Male::st_Dying(), Skylark_Clutch::st_Hatching(), Hare_Female::st_ReproBehaviour(), Weasel::Step(), Owl::Step(), Spider_Egg::Step(), Beetle_Egg_List::Step(), Osmia_Egg::Step(), Spider_Juvenile::Step(), Osmia_Larva::Step(), Osmia_Prepupa::Step(), Vole_JuvenileMale::Step(), Osmia_Pupa::Step(), Spider_Female::Step(), Osmia_InCocoon::Step(), Vole_Male::Step(), Vole_JuvenileFemale::Step(), Beetle_Larvae::Step(), Skylark_Clutch::Step(), Vole_Female::Step(), Skylark_Nestling::Step(), Skylark_PreFledgeling::Step(), Osmia_Female::Step(), Beetle_Pupae::Step(), Skylark_Female::Step(), Beetle_Adult::Step(), Skylark_Male::Step(), Hare_Infant::Step(), Hare_Young::Step(), Hare_Juvenile::Step(), Hare_Male::Step(), Hare_Female::Step(), SupplyGooseGrazingForageH(), THare::TimeBudget(), vole_tole_move_quality(), and vole_toletoc_asses_habitat_score().
void Landscape::WriteOpenness | ( | void | ) |
Stores openness for all polygons to a standard file LKM - used??
|
protected |
Referenced by hb_Add(), and hb_PaintBorder().
|
protected |
Referenced by hb_Add(), and hb_PaintBorder().
|
protected |
Referenced by hb_GenerateHBPolys().
|
protected |
Declaration of attributes for hedgebanks.
Referenced by hb_Add(), and hb_FindHedges().
|
protected |
Referenced by hb_Add(), hb_FindBoundingBox(), hb_HasNeighbourColor(), hb_MapBorder(), and hb_MaxUnpaintedNegNeighbour().
|
protected |
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 |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by hb_GenerateHBPolys(), and hb_StripingDist().
|
protected |
Referenced by hb_Add(), hb_DownPolyNumbers(), and hb_UpPolyNumbers().
|
protected |
Referenced by hb_Add(), hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_HasNeighbourColor(), hb_HasOtherNeighbour(), hb_MapBorder(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_MaxUnpaintedNegNeighbour(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
private |
For veg area dumps.
Referenced by SupplyVegArea().
|
protected |
A holder for the landscape name for output if needed.
Referenced by SupplyLandscapeName().
|
protected |
Index for the LE signal loop.
|
private |
Area of the whole landscape.
|
private |
This is the array to store the green biomass for each cell.
Referenced by SupplyGreenBiomassMapPtr().
|
protected |
Declaration of attributes for country and coordinates.
Referenced by SetCountryCode(), SupplyCountryCode(), and SupplyTimezone().
|
private |
A flag to signal that missing polygons exist.
|
private |
List of all landscape elements. The index is a sequential number, to get the polynum look this number up in m_polymapping.
Referenced by GetActualGooseGrazingForage(), GetOwner_tole(), GrazeVegetation(), GrazeVegetationTotal(), hb_Add(), hb_FindHedges(), hb_GenerateHBPolys(), MagicMapP2PolyRef(), RebuildPolyMapping(), RemoveNectarFromTotal(), RemovePollenFromTotal(), Set_all_Att_UserDefinedBool(), Set_all_Att_UserDefinedInt(), SetAttUserDefinedBool(), SetAttUserDefinedInt(), SetBirdMaizeForage(), SetBirdSeedForage(), SetMaleNewtPresent(), SupplyAllVegPolys(), SupplyAttIsForest(), SupplyAttIsHigh(), SupplyAttIsUrbanNoVeg(), SupplyAttIsVegCereal(), SupplyAttIsVegGooseGrass(), SupplyAttIsVegGrass(), SupplyAttIsVegMaize(), SupplyAttIsVegMatureCereal(), SupplyAttIsVegPatchy(), SupplyAttIsWater(), SupplyAttIsWoody(), SupplyAttUserDefinedBool(), SupplyAttUserDefinedInt(), SupplyBirdMaizeForage(), SupplyBirdSeedForage(), SupplyCentroidX(), SupplyCentroidY(), SupplyCountryDesig(), SupplyCropType(), SupplyDayDegrees(), SupplyDeadBiomass(), SupplyElementSubType(), SupplyElementType(), SupplyElementTypeCC(), SupplyElementTypeFromVector(), SupplyFarmArea(), SupplyFarmOwner(), SupplyFarmOwnerIndex(), SupplyFarmRotFilename(), SupplyFarmType(), SupplyGooseGrazingForageH(), SupplyGrazingPressure(), SupplyGrazingPressureVector(), SupplyGreenBiomass(), SupplyGreenBiomassProp(), SupplyGreenBiomassTotal(), SupplyHasTramlines(), SupplyInsects(), SupplyInStubble(), SupplyInterestedGreenBiomass(), SupplyInterestedGreenBiomassTotal(), SupplyIsVeg(), SupplyJustMown(), SupplyJustMownVector(), SupplyJustSprayed(), SupplyJustSprayedVector(), SupplyLAGreen(), SupplyLastSownVeg(), SupplyLastSownVegVector(), SupplyLastTreatment(), SupplyLATotal(), SupplyLEPointer(), SupplyMaleNewtPresent(), SupplyMaxPoly(), SupplyNecDD(), SupplyNectar(), SupplyNectarQuantity(), SupplyNumberOfPolygons(), SupplyOpenness(), SupplyOwner_tole(), SupplyPesticideCell(), SupplyPolDD(), SupplyPollen(), SupplyPollenQuantity(), SupplyPolygonArea(), SupplyPolygonAreaVector(), SupplyPolyLEptr(), SupplyPolyListPtr(), SupplyPolyRef(), SupplyPolyRefCC(), SupplyPolyRefVector(), SupplyPondPesticide(), SupplyRoadWidth(), SupplySkScrapes(), SupplySoilType(), SupplySoilTypeR(), SupplySugar(), SupplySugDD(), SupplyTotalNectar(), SupplyTotalPollen(), SupplyTrafficLoad(), SupplyUMRef(), SupplyValidX(), SupplyValidY(), SupplyVegAge(), SupplyVegBiomass(), SupplyVegBiomassVector(), SupplyVegCover(), SupplyVegCoverVector(), SupplyVegDensity(), SupplyVegDigestibility(), SupplyVegDigestibilityVector(), SupplyVegGrowthStage(), SupplyVegHeight(), SupplyVegHeightVector(), SupplyVegPhase(), SupplyVegType(), SupplyVegTypeVector(), and SupplyWeedBiomass().
|
private |
List of all the farms.
Referenced by SupplyFarmManagerPtr(), SupplyFarmPtr(), and SupplyNumberOfFarms().
|
protected |
Flag to indicate the that the first year is run (i.e. before simulation starts)
Referenced by IsHiddenYear().
|
private |
A curve relating goose intake rates in KJ/min to vegetation height for Barnacle Goose (BG)
Referenced by SupplyGooseGrazingForageH().
|
private |
A curve relating goose intake rates in KJ/min to vegetation height for Greylag Goose (GL)
Referenced by SupplyGooseGrazingForageH().
|
private |
A curve relating goose intake rates in KJ/min to vegetation height for Pink-footed Goose (PF)
Referenced by SupplyGooseGrazingForageH().
int Landscape::m_grain_dist |
Declaration of attribute, m_grain_dist, a binary condition for good or bad years of spilled grain.
Referenced by SetGrainDist(), and SupplyGrainDist().
|
private |
This is the dictionary to store the proportion of each composition for every habitat.
|
private |
This is the dictionary to store the nectar data of each habitat type fo the given day.
Referenced by SupplyNectarHabitatType().
|
private |
This is the dictionary to store the pollen data of each habitat type for the given day.
Referenced by SupplyPollenHabitatType().
|
private |
This the dictionary to store the composition of species for every habitat type.
|
private |
Area length.
Referenced by CorrectCoords(), CorrectCoordsPointNoWrap(), CorrectCoordsPt(), CorrectHeight(), SupplyElementTypeCC(), SupplyPolyRefCC(), and SupplySimAreaHeight().
|
private |
Area length times 10.
Referenced by CorrectCoords(), CorrectCoordsPt(), CorrectHeight(), SupplyElementTypeCC(), and SupplyPolyRefCC().
|
private |
This is the dictionary to store all the index in m_poly_cell_locs_nectar start from which there is no nectar available.
Referenced by SupplyARandomLocNectarPoly(), and SupplyNectarAtLocInPoly().
|
private |
This is the dictionary to store all the index in m_poly_cell_locs_pollen start from which there is no pollen available.
Referenced by SupplyARandomLocPollenPoly(), and SupplyPollenAtLocInPoly().
|
private |
The big map.
Referenced by GetActualGooseGrazingForage(), GetOwner_tole(), hb_Add(), SupplyAttIsForest(), SupplyAttIsHigh(), SupplyAttIsUrbanNoVeg(), SupplyAttIsVegGrass(), SupplyAttIsVegPatchy(), SupplyAttIsWater(), SupplyAttIsWoody(), SupplyAttUserDefinedBool(), SupplyBirdMaizeForage(), SupplyBirdSeedForage(), SupplyCentroidX(), SupplyCentroidY(), SupplyCountryDesig(), SupplyCropType(), SupplyDeadBiomass(), SupplyElementSubType(), SupplyElementType(), SupplyElementTypeCC(), SupplyFarmOwner(), SupplyFarmOwnerIndex(), SupplyFarmRotFilename(), SupplyFarmType(), SupplyGrazingPressure(), SupplyGreenBiomass(), SupplyGreenBiomassProp(), SupplyGreenBiomassTotal(), SupplyHasTramlines(), SupplyInsects(), SupplyInterestedGreenBiomass(), SupplyInterestedGreenBiomassTotal(), SupplyIsVeg(), SupplyJustSprayed(), SupplyLAGreen(), SupplyLastSownVeg(), SupplyLastTreatment(), SupplyLATotal(), SupplyMagicMapP(), SupplyNectar(), SupplyOpenness(), SupplyOwner_tole(), SupplyPollen(), SupplyPolyLEptr(), SupplyPolyRef(), SupplyPolyRefCC(), SupplyPolyRefIndex(), SupplyRasterMap(), SupplyRoadWidth(), SupplySoilType(), SupplySoilTypeR(), SupplySugar(), SupplyTotalNectar(), SupplyTotalPollen(), SupplyTrafficLoad(), SupplyUMRef(), SupplyVegAge(), SupplyVegBiomass(), SupplyVegCover(), SupplyVegDensity(), SupplyVegDigestibility(), SupplyVegGrowthStage(), SupplyVegHeight(), SupplyVegType(), and SupplyWeedBiomass().
|
protected |
The largest polygon number used.
Referenced by SupplyLargestPolyNumUsed().
|
protected |
Referenced by SetLatitude(), and SupplyLatitude().
|
protected |
Referenced by SetLongitude(), and SupplyLongitude().
|
private |
This is the vector to store all the polygon IDs within a certain distance to each location in a landscape.
|
private |
Area maximum extent, the largest value of m_width or m_height
Referenced by SupplySimAreaMaxExtent().
|
private |
Area minimum extent, the smallest value of m_width or m_height
|
private |
This is the matrix to store the nectar proportion (0-1) left for each cell.
Referenced by SupplyARandomLocNectarPoly(), SupplyNectarAtLocInPoly(), SupplyNectarMapPtr(), and SupplyNectarQuantity().
|
private |
A flag to ensure centroid calculation on object construction.
|
private |
A flag to ensure openness calculation on object construction.
|
private |
For specialised pesticide recording.
|
private |
For specialised pesticide recording.
|
protected |
An attribute to hold the pesticide type being tested, if there is one, if not default is -1.
Referenced by SupplyPesticideType().
|
private |
Referenced by SupplyPestIncidenceFactor().
|
private |
A pest incidence manager.
|
private |
This is the matrix to store the pollen proportion (0-1) left for each cell.
Referenced by SupplyARandomLocPollenPoly(), SupplyPollenAtLocInPoly(), SupplyPollenMapPtr(), and SupplyPollenQuantity().
|
private |
This is the dictionary to store all the locations for each polygon.
Referenced by SupplyARandomLocPoly(), and SupplyLocsVectorPoly().
|
private |
This is the dictionary to store all the locations used for quick access to nectar.
Referenced by SupplyARandomLocNectarPoly().
|
private |
This is the dictionary to store all the locations used for quick access to pollen.
Referenced by SupplyARandomLocPollenPoly().
|
private |
The locks for all the polygon.
Referenced by ReleasePolygonLock(), and SetPolygonLock().
|
private |
Vector to store the poly IDs with flower resource.
Referenced by SupplyPolyWithFlowers().
|
private |
This is the array to store the polygon ID for each cell.
Referenced by SupplyPolyIdMapPtr().
|
private |
m_polymapping is a mapping from polygon numbers into the list of landscape elements, m_elems. When using this it is important that it is the poly num and not the map index that is used.
Referenced by GetActualGooseGrazingForage(), GrazeVegetation(), GrazeVegetationTotal(), hb_Add(), hb_GenerateHBPolys(), RebuildPolyMapping(), SetAttUserDefinedBool(), SetAttUserDefinedInt(), SetBirdMaizeForage(), SetBirdSeedForage(), SetPolymapping(), SupplyAttIsForest(), SupplyAttIsUrbanNoVeg(), SupplyAttIsVegCereal(), SupplyAttIsVegGooseGrass(), SupplyAttIsVegGrass(), SupplyAttIsVegMaize(), SupplyAttIsVegMatureCereal(), SupplyAttIsVegPatchy(), SupplyAttUserDefinedBool(), SupplyAttUserDefinedInt(), SupplyBirdMaizeForage(), SupplyBirdSeedForage(), SupplyCentroidX(), SupplyCentroidY(), SupplyCropType(), SupplyDayDegrees(), SupplyDeadBiomass(), SupplyElementSubType(), SupplyElementType(), SupplyFarmArea(), SupplyFarmOwner(), SupplyFarmOwnerIndex(), SupplyFarmRotFilename(), SupplyFarmType(), SupplyGooseGrazingForageH(), SupplyGrazingPressure(), SupplyGreenBiomass(), SupplyGreenBiomassProp(), SupplyGreenBiomassTotal(), SupplyHasTramlines(), SupplyInsects(), SupplyInStubble(), SupplyInterestedGreenBiomass(), SupplyInterestedGreenBiomassTotal(), SupplyJustMown(), SupplyJustSprayed(), SupplyLAGreen(), SupplyLastSownVeg(), SupplyLastTreatment(), SupplyLATotal(), SupplyLEPointer(), SupplyOpenness(), SupplyPesticideCell(), SupplyPolygonArea(), SupplyPolyLEptr(), SupplyPolymapping(), SupplySkScrapes(), SupplyTrafficLoad(), SupplyValidX(), SupplyValidY(), SupplyVegAge(), SupplyVegBiomass(), SupplyVegCover(), SupplyVegDensity(), SupplyVegDigestibility(), SupplyVegGrowthStage(), SupplyVegHeight(), SupplyVegPhase(), SupplyVegType(), and SupplyWeedBiomass().
|
protected |
List of pond indexes.
Referenced by HowManyPonds(), and SupplyPondIndex().
|
protected |
List of pond polyrefs.
Referenced by SupplyPondIndex().
|
private |
A pointer to the rodenticide manager.
|
private |
A pointer to the Rodenticide predators population´manager.
Referenced by SupplyRodenticidePredatoryManager().
|
private |
A pointer to the current main population manager.
Referenced by SetThePopManagerList(), and SupplyThePopManagerList().
|
protected |
A flag indicating whether pesticide should be sprayed.
Referenced by SupplyShouldSpray().
|
protected |
Array for containing the treatment counts.
|
private |
Version info. Initialized by the constructor.
Referenced by SupplyVersion().
|
private |
Declaration of attributes for correcting coordinates before modulus operations, saves an indirection when doing inline function calls.
Area width
Referenced by CorrectCoords(), CorrectCoordsPointNoWrap(), CorrectCoordsPt(), CorrectWidth(), SupplyElementTypeCC(), SupplyPolyRefCC(), and SupplySimAreaWidth().
|
private |
Area width times 10.
Referenced by CorrectCoords(), CorrectCoordsPt(), CorrectWidth(), SupplyElementTypeCC(), and SupplyPolyRefCC().
|
protected |
|
protected |