|
int | HowManyTerritoriesHere (int a_x, int a_y) |
|
void | PreCachePoly (int a_poly) |
|
| RodenticidePredators_Population_Manager (Landscape *L) |
|
vector< RP_Territory > * | SupplyTerritories () |
|
void | Tick () |
| Updates the rodenticide exposure for all predator territories. More...
|
|
virtual | ~RodenticidePredators_Population_Manager () |
|
bool | BeginningOfMonth () |
|
virtual void | BreedingPairsOutput (int) |
|
virtual void | BreedingSuccessProbeOutput (double, int, int, int, int, int, int, int) |
|
virtual void | Catastrophe (int) |
|
bool | CheckXY (int l, int i) |
| Debug method to test for out of bounds coordinates. More...
|
|
void | CloseTheCIPEGridOutputProbe () |
|
void | CloseTheMonthlyRipleysOutputProbe () |
|
void | CloseTheReallyBigOutputProbe () |
|
void | CloseTheRipleysOutputProbe () |
|
virtual void | DisplayLocations () |
|
unsigned int | FarmAnimalCensus (unsigned int a_farm, unsigned int a_typeofanimal) |
|
TAnimal * | FindClosest (int x, int y, unsigned Type) |
|
virtual void | FledgelingProbeOutput (int, int) |
|
virtual void | GeneticsResultsOutput (FILE *, unsigned) |
|
unsigned | GetLiveArraySize (int a_listindex) |
| Gets the number of 'live' objects for a list index in the TheArray. More...
|
|
TTypesOfPopulation | GetPopulationType () |
|
int | GetSeasonNumber () |
| Get the season number. More...
|
|
virtual void | ImpactedProbe () |
|
void | ImpactProbeReport (int a_Time) |
|
void | IncLiveArraySize (int a_listindex) |
| Increments the number of 'live' objects for a list index in the TheArray. More...
|
|
bool | IsLast (unsigned listindex) |
|
void | LamdaBirth (int x, int y) |
|
void | LamdaBirth (int x, int y, int z) |
|
void | LamdaClear () |
|
void | LamdaDeath (int x, int y) |
|
void | LamdaDumpOutput () |
|
void | LOG (const char *fname) |
|
virtual bool | OpenTheBreedingPairsProbe () |
|
virtual bool | OpenTheBreedingSuccessProbe () |
|
bool | OpenTheCIPEGridOutputProbe () |
|
virtual bool | OpenTheFledgelingProbe () |
|
bool | OpenTheMonthlyRipleysOutputProbe () |
|
bool | OpenTheReallyBigProbe () |
|
bool | OpenTheRipleysOutputProbe () |
|
| Population_Manager (Landscape *L) |
|
virtual float | Probe (int ListIndex, probe_data *p_TheProbe) |
|
int | ProbeFileInput (char *p_Filename, int p_ProbeNo) |
|
char * | ProbeReport (int a_time) |
|
char * | ProbeReportTimed (int a_time) |
|
virtual void | Run (int NoTSteps) |
|
void | SetNoProbes (int a_pn) |
|
char * | SpeciesSpecificReporting (int a_species, int a_time) |
|
virtual int | SupplyCovPosx (int) |
|
virtual int | SupplyCovPosy (int) |
|
unsigned | SupplyListIndexSize () |
|
const char * | SupplyListName (int i) |
|
int | SupplyListNameLength () |
|
unsigned | SupplyListSize (unsigned listindex) |
|
virtual void | SupplyLocXY (unsigned listindex, unsigned j, int &x, int &y) |
|
virtual int | SupplyPegPosx (int) |
|
virtual int | SupplyPegPosy (int) |
|
int | SupplySimH () |
|
int | SupplySimW () |
|
int | SupplyState (unsigned listindex, unsigned j) |
|
const char * | SupplyStateNames (int i) |
|
unsigned | SupplyStateNamesLength () |
|
int | SupplyStepSize () |
|
virtual int | TheBreedingFemalesProbe (int) |
|
virtual int | TheBreedingSuccessProbe (int &, int &, int &, int &, int &, int &) |
|
virtual void | TheCIPEGridOutputProbe () |
|
virtual int | TheFledgelingProbe () |
|
virtual void | TheGeneticProbe (unsigned, int, unsigned &) |
|
virtual void | TheNWordOutputProbe () |
|
virtual void | TheReallyBigOutputProbe () |
|
virtual void | TheRipleysOutputProbe (FILE *a_prb) |
|
virtual | ~Population_Manager (void) |
|
RodenticidePredators_Population_Manager::RodenticidePredators_Population_Manager |
( |
Landscape * |
L | ) |
|
On construction the first thing to do is to read the quality scores in from the correct predator input file. This depends on a config variable being correctly set: cfg_RodenticidePredatoryType
Create the habitat quality grid ready for predatory habitat assessment
Now populate the landscape with predatory territories
References cfg_rodenticide_read_predators(), cfg_RodenticidePredatoryMaxTerr(), cfg_RodenticidePredatoryMinTerr(), cfg_RodenticidePredatoryTargetQual(), cfg_RodenticidePredatoryType(), CreateTerritories(), CreatHabitatQualGrid(), m_predator_maxHR, m_predator_minHR, m_predator_targetQual, m_summeddays, PredatorTerritoryInput(), PredatorTerritoryOutput(), and ReadHabitatValues().
CfgInt cfg_RodenticidePredatoryType("RODPREDATOR_TYPE", CFG_CUSTOM,-1)
Used to set the predator information to read in.
int m_predator_minHR
Definition: RodenticidePredators.h:75
CfgBool cfg_rodenticide_read_predators("RODENTICIDE_READ_PREDATORS", CFG_CUSTOM, false)
Used to flag whether we calculate or read in territory values.
void PredatorTerritoryOutput(bool a_initial)
Output functions for predator territories.
Definition: RodenticidePredators.cpp:395
CfgInt cfg_RodenticidePredatoryTargetQual("RODPREDATOR_TARGETQUAL", CFG_CUSTOM, 100)
Territory minimum quality.
void ReadHabitatValues(int a_type)
Read in specific predator type habitat scores.
Definition: RodenticidePredators.cpp:151
void PredatorTerritoryInput()
Output functions for predator territories.
Definition: RodenticidePredators.cpp:420
void CreateTerritories()
Populates the landscape with predatory territories.
Definition: RodenticidePredators.cpp:255
void CreatHabitatQualGrid(void)
Evaluate the landscape and create the habitat quality grid.
Definition: RodenticidePredators.cpp:99
double m_summeddays
Keeps track of the number of days we have rodenticide exposure summation for.
Definition: RodenticidePredators.h:83
CfgInt cfg_RodenticidePredatoryMinTerr("RODPREDATOR_MINTERR", CFG_CUSTOM, 100)
Minimum territory width.
double m_predator_targetQual
Definition: RodenticidePredators.h:77
int m_predator_maxHR
Definition: RodenticidePredators.h:76
Population_Manager(Landscape *L)
Definition: PopulationManager.cpp:222
CfgInt cfg_RodenticidePredatoryMaxTerr("RODPREDATOR_MAXTERR", CFG_CUSTOM, 500)
Maximum territory width.
void RodenticidePredators_Population_Manager::CreatHabitatQualGrid |
( |
void |
| ) |
|
|
protected |
Evaluate the landscape and create the habitat quality grid.
Need to do the basic read and quality assessment for the landscape, before creating and allocating the predatory territories. The first step is to get the map dimensions saved to local attributes.
Following that all the polygons in the landscape are pre-cached for their quality score - this is important for speed because it only needs to be done once per polygon.
Finally go through the whole landscape in 10x10m blocks and fill in the quality grid scoresas a the mean of 100m2 i.e. 10 x 10 m squares
References m_hash_size, m_occupancy_grid, m_qual_cache, m_qual_grid, m_sim_h, m_sim_h_div_10, m_sim_w, m_sim_w_div_10, Population_Manager::m_TheLandscape, Landscape::RodenticidePredatorsEvaluation(), Landscape::SupplyLargestPolyNumUsed(), Landscape::SupplyPolyRef(), Landscape::SupplySimAreaHeight(), and Landscape::SupplySimAreaWidth().
Referenced by RodenticidePredators_Population_Manager().
123 for (
int i=0; i<totalgrids; i++)
137 for (
int xx = cx; xx < cx+10; xx++)
139 for (
int yy = cy; yy < cy+10; yy++)
int SupplyPolyRef(int a_x, int a_y)
Definition: landscape.h:1412
int SupplyLargestPolyNumUsed()
Definition: landscape.h:334
int m_hash_size
Definition: RodenticidePredators.h:70
int m_sim_w_div_10
Definition: RodenticidePredators.h:68
int SupplySimAreaWidth(void)
Definition: landscape.h:1556
int m_sim_h_div_10
Definition: RodenticidePredators.h:69
void RodenticidePredatorsEvaluation(RodenticidePredators_Population_Manager *a_rppm)
Definition: Landscape.cpp:2807
bool * m_occupancy_grid
Definition: RodenticidePredators.h:73
int SupplySimAreaHeight(void)
Definition: landscape.h:1561
double * m_qual_grid
Definition: RodenticidePredators.h:72
int m_sim_w
Definition: RodenticidePredators.h:66
int m_sim_h
Definition: RodenticidePredators.h:67
Landscape * m_TheLandscape
Definition: PopulationManager.h:486
double * m_qual_cache
Definition: RodenticidePredators.h:71
void RodenticidePredators_Population_Manager::PredatorTerritoryInput |
( |
| ) |
|
|
protected |
Output functions for predator territories.
Opens a standard output tab-delimited text file and reads all predatory territory information in the format:
Number of entries
Entry 1 x, Entry 1 y, Entry 1 size, Entry 1 exposure
Entry 2 x, Entry 2 y, Entry 2 size, Entry 2 exposure
Entry 3 x etc....
Referenced by RodenticidePredators_Population_Manager().
428 ifstream ifile(
"PredatorTerritoryOutputInfo.txt",ios::in);
434 for (
int i=0; i< sz; i++)
436 ifile >> x >> y >> range >> skip;
A data struct to hold RodenticidePredatory territory details.
Definition: RodenticidePredators.h:40
int m_range
Definition: RodenticidePredators.h:44
int m_x
Definition: RodenticidePredators.h:42
int m_y
Definition: RodenticidePredators.h:43
double m_exposure
Definition: RodenticidePredators.h:45
vector< RP_Territory > m_Territories
Definition: RodenticidePredators.h:78
void RodenticidePredators_Population_Manager::PredatorTerritoryOutput |
( |
bool |
a_initial | ) |
|
|
protected |
Output functions for predator territories.
Opens a standard output tab-delimited text file and dumps all predatory territory information in the format:
Number of entries
Entry 1 x, Entry 1 y, Entry 1 size, Entry 1 exposure
Entry 2 x, Entry 2 y, Entry 2 size, Entry 2 exposure
Entry 3 x etc....
Referenced by RodenticidePredators_Population_Manager(), and ~RodenticidePredators_Population_Manager().
403 ofstream ofile(
"PredatorTerritoryOutputInfo.txt",ios::out);
409 for (
int i=0; i< sz; i++)
double m_summeddays
Keeps track of the number of days we have rodenticide exposure summation for.
Definition: RodenticidePredators.h:83
vector< RP_Territory > m_Territories
Definition: RodenticidePredators.h:78