ALMaSS Vole ODDox
1.1
The vole model description following ODdox protocol
|
The class to handle all predator population related matters. More...
#include <Predators.h>
Public Member Functions | |
virtual void | Run (int) |
bool | InOtherTerritory (unsigned sp, int p_x, int p_y, TPredator *p_Pred) |
TPredator_Population_Manager (Landscape *L, Vole_Population_Manager *VPM) | |
virtual | ~TPredator_Population_Manager (void) |
void | CreateObjects (int ob_type, TAnimal *pvo, struct_Predator *data, int number) |
void | inc_inds (unsigned list) |
void | dec_inds (unsigned list) |
unsigned | supply_no_inds (unsigned list) |
Public Member Functions inherited from Population_Manager | |
Population_Manager (Landscape *L) | |
virtual | ~Population_Manager (void) |
void | SetNoProbes (int a_pn) |
unsigned | GetLiveArraySize (int a_listindex) |
Gets the number of 'live' objects for a list index in the TheArray. More... | |
void | IncLiveArraySize (int a_listindex) |
Increments the number of 'live' objects for a list index in the TheArray. More... | |
virtual void | Catastrophe (int) |
unsigned int | FarmAnimalCensus (unsigned int a_farm, unsigned int a_typeofanimal) |
char * | SpeciesSpecificReporting (int a_species, int a_time) |
char * | ProbeReport (int a_time) |
char * | ProbeReportTimed (int a_time) |
void | ImpactProbeReport (int a_Time) |
bool | BeginningOfMonth () |
void | LOG (const char *fname) |
int | SupplyStepSize () |
int | SupplySimW () |
int | SupplySimH () |
virtual float | Probe (int ListIndex, probe_data *p_TheProbe) |
virtual void | ImpactedProbe () |
int | SupplyListNameLength () |
TAnimal * | SupplyAnimalPtr (int a_index, int a_animal) |
Returns the pointer indexed by a_index and a_animal. Note NO RANGE CHECK. More... | |
unsigned | SupplyListIndexSize () |
unsigned | SupplyListSize (unsigned listindex) |
bool | CheckXY (int l, int i) |
Debug method to test for out of bounds coordinates. More... | |
const char * | SupplyListName (int i) |
bool | IsLast (unsigned listindex) |
int | SupplyState (unsigned listindex, unsigned j) |
virtual void | SupplyLocXY (unsigned listindex, unsigned j, int &x, int &y) |
const char * | SupplyStateNames (int i) |
unsigned | SupplyStateNamesLength () |
virtual void | DisplayLocations () |
int | ProbeFileInput (char *p_Filename, int p_ProbeNo) |
TAnimal * | FindClosest (int x, int y, unsigned Type) |
bool | OpenTheRipleysOutputProbe (string a_NWordFilename) |
void | OpenTheAOROutputProbe (string a_AORFilename) |
bool | OpenTheMonthlyRipleysOutputProbe () |
bool | OpenTheReallyBigProbe () |
virtual void | TheAOROutputProbe () |
virtual void | TheRipleysOutputProbe (FILE *a_prb) |
virtual void | TheReallyBigOutputProbe () |
void | CloseTheMonthlyRipleysOutputProbe () |
TTypesOfPopulation | GetPopulationType () |
int | GetSeasonNumber () |
Get the season number. More... | |
void | LamdaDeath (int x, int y) |
void | LamdaBirth (int x, int y) |
void | LamdaBirth (int x, int y, int z) |
void | LamdaClear () |
void | LamdaDumpOutput () |
virtual int | SupplyPegPosx (int) |
virtual int | SupplyPegPosy (int) |
virtual int | SupplyCovPosx (int) |
virtual int | SupplyCovPosy (int) |
virtual bool | OpenTheFledgelingProbe () |
virtual bool | OpenTheBreedingPairsProbe () |
virtual bool | OpenTheBreedingSuccessProbe () |
virtual void | BreedingPairsOutput (int) |
virtual int | TheBreedingFemalesProbe (int) |
virtual int | TheFledgelingProbe () |
virtual void | BreedingSuccessProbeOutput (double, int, int, int, int, int, int, int) |
virtual int | TheBreedingSuccessProbe (int &, int &, int &, int &, int &, int &) |
virtual void | FledgelingProbeOutput (int, int) |
virtual void | TheGeneticProbe (unsigned, int, unsigned &) |
virtual void | GeneticsResultsOutput (FILE *, unsigned) |
Protected Member Functions | |
virtual bool | StepFinished () |
Overrides the population manager StepFinished - there is no chance that hunters do not finish a step behaviour. More... | |
virtual void | DoFirst () |
virtual void | DoBefore () |
virtual void | DoAfter () |
virtual void | DoLast () |
void | CloseTheReallyBigOutputProbe () |
virtual void | CloseTheRipleysOutputProbe () |
void | PredSampleFile () |
void | PredAutumnSample () |
void | PredSpringSample () |
void | PredSpringAutumnSample () |
Protected Member Functions inherited from Population_Manager | |
virtual void | DoAlmostLast () |
void | EmptyTheArray () |
Removes all objects from the TheArray by deleting them and clearing TheArray. More... | |
void | SortX (unsigned Type) |
void | SortXIndex (unsigned Type) |
void | SortY (unsigned Type) |
void | SortState (unsigned Type) |
void | SortStateR (unsigned Type) |
unsigned | PartitionLiveDead (unsigned Type) |
void | Shuffle_or_Sort (unsigned Type) |
void | Shuffle (unsigned Type) |
virtual void | Catastrophe () |
Additional Inherited Members | |
Public Attributes inherited from Population_Manager | |
int | IndexArrayX [5][10000] |
probe_data * | TheProbe [100] |
int | SimH |
int | SimW |
unsigned | SimHH |
unsigned | SimWH |
char | m_SimulationName [255] |
bool | ProbesSet |
Landscape * | m_TheLandscape |
The class to handle all predator population related matters.
Definition at line 145 of file Predators.h.
TPredator_Population_Manager::TPredator_Population_Manager | ( | Landscape * | L, |
Vole_Population_Manager * | VPM | ||
) |
Definition at line 89 of file Predators.cpp.
References cfg_owl_breed_day(), cfg_owl_breed_threshold(), cfg_owl_death_threshold(), cfg_owl_StartingNo(), cfg_weasel_breed_day(), cfg_weasel_breed_threshold(), cfg_weasel_death_threshold(), cfg_weasel_StartingNo(), CreateObjects(), struct_Predator::L, m_no_individuals, Population_Manager::m_population_type, m_Prey, Population_Manager::m_TheLandscape, OWL, owl_breed_day, owl_breed_threshold, owl_death_threshold, owl_StartingNo, struct_Predator::PM, Population_Manager::ReallyBigOutputPrb, Population_Manager::RipleysOutputPrb, Population_Manager::SimH, Population_Manager::SimW, Population_Manager::TheArray, TOP_Predators, WEASEL, weasel_breed_day, weasel_breed_threshold, weasel_death_threshold, weasel_StartingNo, struct_Predator::x, and struct_Predator::y.
|
virtual |
Definition at line 83 of file Predators.cpp.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
void TPredator_Population_Manager::CreateObjects | ( | int | ob_type, |
TAnimal * | pvo, | ||
struct_Predator * | data, | ||
int | number | ||
) |
Definition at line 137 of file Predators.cpp.
References inc_inds(), struct_Predator::L, m_Prey, OWL, struct_Predator::PM, Population_Manager::TheArray, WEASEL, struct_Predator::x, and struct_Predator::y.
Referenced by Weasel::BeginStep(), Owl::BeginStep(), and TPredator_Population_Manager().
|
inline |
Definition at line 156 of file Predators.h.
References m_no_individuals.
Referenced by Weasel::BeginStep(), and Owl::BeginStep().
|
inlineprotectedvirtual |
Can be used in descendent classes
Reimplemented from Population_Manager.
Definition at line 169 of file Predators.h.
Referenced by Run().
|
inlineprotectedvirtual |
Can be used in descendent classes
Reimplemented from Population_Manager.
Definition at line 168 of file Predators.h.
Referenced by Run().
|
inlineprotectedvirtual |
Can be used in descendent classes
Reimplemented from Population_Manager.
Definition at line 167 of file Predators.h.
Referenced by Run().
|
inlineprotectedvirtual |
Collects some data to describe the number of animals in each state at the end of the day
Reimplemented from Population_Manager.
Definition at line 170 of file Predators.h.
Referenced by Run().
|
inline |
Definition at line 155 of file Predators.h.
References m_no_individuals.
Referenced by CreateObjects().
bool TPredator_Population_Manager::InOtherTerritory | ( | unsigned | sp, |
int | p_x, | ||
int | p_y, | ||
TPredator * | p_Pred | ||
) |
Definition at line 671 of file Predators.cpp.
References TPredator::OverlapMyTerritory(), and Population_Manager::TheArray.
Referenced by TPredator::st_Dispersal().
|
protected |
Definition at line 360 of file Predators.cpp.
References cfg_owl_StartingNo(), cfg_weasel_StartingNo(), Population_Manager::m_TheLandscape, Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), Population_Manager::TheArray, and Landscape::Warn().
Referenced by Run().
|
protected |
Definition at line 161 of file Predators.cpp.
References cfg_owl_StartingNo(), cfg_weasel_StartingNo(), Population_Manager::m_TheLandscape, TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Landscape::SupplyDayInMonth(), Landscape::SupplyDayInYear(), Landscape::SupplyElementType(), TPredator::SupplyHomeRange(), TPredator::SupplyKill(), TPredator::SupplyKillEff(), Landscape::SupplyMonth(), Landscape::SupplyPolyRef(), Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), TPredator::SupplySpeciesID(), TPredator::SupplyTerr(), Landscape::SupplyVegType(), Landscape::SupplyYearNumber(), Population_Manager::TheArray, and Landscape::Warn().
Referenced by Run().
|
protected |
Definition at line 486 of file Predators.cpp.
References cfg_owl_StartingNo(), cfg_weasel_StartingNo(), Population_Manager::m_TheLandscape, Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), Population_Manager::TheArray, and Landscape::Warn().
Referenced by Run().
|
protected |
Definition at line 423 of file Predators.cpp.
References cfg_owl_StartingNo(), cfg_weasel_StartingNo(), Population_Manager::m_TheLandscape, Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), Population_Manager::TheArray, and Landscape::Warn().
Referenced by Run().
|
virtual |
This is the main scheduling method for the population manager.
Note the structure of Shuffle_or_Sort(), DoFirst(), BeginStep, DoBefore(), Step looping until all are finished, DoAfter(), DoAlmostLast(), EndStep, DoLast().
Can do multiple time-steps here inside one landscape time-step (a day). This is used in the roe deer model to provide 10 minute behavioural time-steps.
It is necessary to remove any dead animals before the timestep starts. It is possible that animals are killed after their population manager Run method has been executed. This is the case with geese and hunters. Checking death first prevents this becomming a problem.
Reimplemented from Population_Manager.
Definition at line 553 of file Predators.cpp.
References cfg_pred_first_sample_day(), cfg_pred_second_sample_day(), cfg_PredSampleDataUsed(), DoAfter(), DoBefore(), DoFirst(), DoLast(), Population_Manager::m_TheLandscape, PredAutumnSample(), PredSampleFile(), PredSpringAutumnSample(), PredSpringSample(), StepFinished(), Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), Population_Manager::TheArray, and Landscape::Warn().
|
protectedvirtual |
Overrides the population manager StepFinished - there is no chance that hunters do not finish a step behaviour.
Returns true if and only if all objects have finished the current step
Reimplemented from Population_Manager.
Definition at line 655 of file Predators.cpp.
References Population_Manager::TheArray.
Referenced by Run().
|
inline |
Definition at line 157 of file Predators.h.
References m_no_individuals.
Referenced by Weasel::BeginStep(), and Owl::BeginStep().
|
protected |
Definition at line 163 of file Predators.h.
Referenced by dec_inds(), inc_inds(), supply_no_inds(), and TPredator_Population_Manager().
|
protected |
Definition at line 161 of file Predators.h.
Referenced by CreateObjects(), and TPredator_Population_Manager().
|
protected |
Definition at line 162 of file Predators.h.