ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
Base class for all population managers. More...
#include <PopulationManager.h>
Public Member Functions | |
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 void | Run (int NoTSteps) |
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 () |
virtual void | CloseTheRipleysOutputProbe () |
virtual void | CloseTheReallyBigOutputProbe () |
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) |
Public Attributes | |
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 |
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 | DoAlmostLast () |
virtual void | DoLast () |
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 () |
Protected Attributes | |
vector< unsigned > | m_LiveArraySize |
int | m_NoProbes |
AOR_Probe * | m_AOR_Probe |
FILE * | m_GeneticsFile |
FILE * | m_AlleleFreqsFile |
FILE * | m_EasyPopRes |
const char * | StateNames [100] |
int | m_catastrophestartyear |
int | m_StepSize |
vector< TListOfAnimals > | TheArray |
unsigned | StateNamesLength |
const char * | m_ListNames [32] |
unsigned | m_ListNameLength |
FILE * | TestFile |
FILE * | TestFile2 |
unsigned | BeforeStepActions [12] |
int | m_SeasonNumber |
Holds the season number. Used when running goose and hunter sims. More... | |
TTypesOfPopulation | m_population_type |
ofstream * | AOROutputPrb |
FILE * | RipleysOutputPrb |
FILE * | RipleysOutputPrb1 |
FILE * | RipleysOutputPrb2 |
FILE * | RipleysOutputPrb3 |
FILE * | RipleysOutputPrb4 |
FILE * | RipleysOutputPrb5 |
FILE * | RipleysOutputPrb6 |
FILE * | RipleysOutputPrb7 |
FILE * | RipleysOutputPrb8 |
FILE * | RipleysOutputPrb9 |
FILE * | RipleysOutputPrb10 |
FILE * | RipleysOutputPrb11 |
FILE * | RipleysOutputPrb12 |
FILE * | ReallyBigOutputPrb |
long int | lamdagrid [2][257][257] |
Base class for all population managers.
The core of the handling of animal populations. All time-step code and most input/output is handled by this class and its descendents. This class effectively implements a state machine to facilitate simulation of animal behaviours and handle potential issues with concurrency. The PopulationManager class is never instantiated but must be used by deriving a descendent class.
Population_Manager::Population_Manager | ( | Landscape * | L | ) |
|
virtual |
bool Population_Manager::BeginningOfMonth | ( | ) |
|
inlinevirtual |
Reimplemented in Skylark_Population_Manager.
|
inlinevirtual |
Reimplemented in Skylark_Population_Manager.
|
protectedvirtual |
Reimplemented in Skylark_Population_Manager.
bool Population_Manager::CheckXY | ( | int | l, |
int | i | ||
) |
Debug method to test for out of bounds coordinates.
void Population_Manager::CloseTheMonthlyRipleysOutputProbe | ( | ) |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in Skylark_Population_Manager.
|
protectedvirtual |
|
protected |
Removes all objects from the TheArray by deleting them and clearing TheArray.
unsigned int Population_Manager::FarmAnimalCensus | ( | unsigned int | a_farm, |
unsigned int | a_typeofanimal | ||
) |
TAnimal* Population_Manager::FindClosest | ( | int | x, |
int | y, | ||
unsigned | Type | ||
) |
|
inlinevirtual |
Reimplemented in Skylark_Population_Manager.
|
inlinevirtual |
|
inline |
Gets the number of 'live' objects for a list index in the TheArray.
References m_LiveArraySize.
Referenced by Skylark_Population_Manager::BreedingPairsOutput(), Skylark_Population_Manager::Catastrophe(), Skylark_Population_Manager::CreateObjects(), Skylark_Population_Manager::ProbePOM(), Skylark_Population_Manager::ReHouse(), Skylark_Population_Manager::TheBreedingFemalesProbe(), Skylark_Population_Manager::TheBreedingSuccessProbe(), Skylark_Population_Manager::TheFledgelingProbe(), and Skylark_Population_Manager::TheRipleysOutputProbe().
|
inline |
References m_population_type.
|
inline |
|
virtual |
void Population_Manager::ImpactProbeReport | ( | int | a_Time | ) |
|
inline |
Increments the number of 'live' objects for a list index in the TheArray.
References m_LiveArraySize.
Referenced by Skylark_Population_Manager::CreateObjects().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Population_Manager::LamdaDumpOutput | ( | ) |
void Population_Manager::LOG | ( | const char * | fname | ) |
void Population_Manager::OpenTheAOROutputProbe | ( | string | a_AORFilename | ) |
|
inlinevirtual |
Reimplemented in Skylark_Population_Manager.
|
inlinevirtual |
Reimplemented in Skylark_Population_Manager.
|
inlinevirtual |
Reimplemented in Skylark_Population_Manager.
bool Population_Manager::OpenTheMonthlyRipleysOutputProbe | ( | ) |
bool Population_Manager::OpenTheReallyBigProbe | ( | ) |
Referenced by Skylark_Population_Manager::Init().
bool Population_Manager::OpenTheRipleysOutputProbe | ( | string | a_NWordFilename | ) |
Referenced by Skylark_Population_Manager::Init().
|
protected |
|
virtual |
int Population_Manager::ProbeFileInput | ( | char * | p_Filename, |
int | p_ProbeNo | ||
) |
char* Population_Manager::ProbeReport | ( | int | a_time | ) |
char* Population_Manager::ProbeReportTimed | ( | int | a_time | ) |
|
virtual |
|
inline |
References m_NoProbes.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
char* Population_Manager::SpeciesSpecificReporting | ( | int | a_species, |
int | a_time | ||
) |
|
protectedvirtual |
Overrides the population manager StepFinished - there is no chance that hunters do not finish a step behaviour.
|
inline |
|
inline |
References TheArray.
Referenced by Skylark_Population_Manager::ProbeReportPOM().
|
inline |
References m_ListNames.
|
inline |
References m_ListNameLength.
|
inline |
|
inlinevirtual |
|
inline |
References SimH.
Referenced by Skylark_Female::st_Floating(), Skylark_Male::st_Floating(), and Skylark_Female::st_Laying().
|
inline |
References SimW.
Referenced by Skylark_Female::st_Floating(), Skylark_Male::st_Floating(), and Skylark_Female::st_Laying().
|
inline |
IntArray100 * SupplyStateList() { return & StateList; }
References TheArray.
|
inline |
References StateNames.
Referenced by Skylark_Female::Step(), and Skylark_Male::Step().
|
inline |
References StateNamesLength.
|
inline |
References m_StepSize.
|
virtual |
Reimplemented in Skylark_Population_Manager.
|
inlinevirtual |
Reimplemented in Skylark_Population_Manager.
|
inlinevirtual |
Reimplemented in Skylark_Population_Manager.
|
inlinevirtual |
Reimplemented in Skylark_Population_Manager.
|
inlinevirtual |
|
virtual |
|
virtual |
Reimplemented in Skylark_Population_Manager.
|
protected |
|
protected |
Referenced by Skylark_Population_Manager::Init().
int Population_Manager::IndexArrayX[5][10000] |
|
protected |
Referenced by LamdaBirth(), LamdaClear(), and LamdaDeath().
|
protected |
|
protected |
Referenced by Skylark_Population_Manager::TheAOROutputProbe().
|
protected |
Referenced by Skylark_Population_Manager::Catastrophe().
|
protected |
|
protected |
|
protected |
Referenced by Skylark_Population_Manager::Init(), and SupplyListNameLength().
|
protected |
Referenced by Skylark_Population_Manager::Init(), and SupplyListName().
|
protected |
Referenced by GetLiveArraySize(), and IncLiveArraySize().
|
protected |
Referenced by Skylark_Population_Manager::ProbeReportPOM(), and SetNoProbes().
|
protected |
Referenced by GetPopulationType(), and Skylark_Population_Manager::Init().
|
protected |
Holds the season number. Used when running goose and hunter sims.
Referenced by GetSeasonNumber().
char Population_Manager::m_SimulationName[255] |
Referenced by Skylark_Population_Manager::Init().
|
protected |
Referenced by SupplyStepSize().
Landscape* Population_Manager::m_TheLandscape |
bool Population_Manager::ProbesSet |
|
protected |
Referenced by Skylark_Population_Manager::Init().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
int Population_Manager::SimH |
Referenced by Skylark_Male::EstablishingATerritory(), Skylark_Female::EstablishTerritory(), and SupplySimH().
unsigned Population_Manager::SimHH |
int Population_Manager::SimW |
Referenced by Skylark_Male::EstablishingATerritory(), Skylark_Female::EstablishTerritory(), and SupplySimW().
unsigned Population_Manager::SimWH |
|
protected |
Referenced by Skylark_Population_Manager::Init(), and SupplyStateNames().
|
protected |
Referenced by SupplyStateNamesLength().
|
protected |
|
protected |
|
protected |
Referenced by Skylark_Population_Manager::BreedingPairsOutput(), Skylark_Population_Manager::Catastrophe(), Skylark_Population_Manager::CreateObjects(), IsLast(), Skylark_Population_Manager::ProbePOM(), Skylark_Population_Manager::ReHouse(), Skylark_Population_Manager::Skylark_Population_Manager(), SupplyAnimalPtr(), SupplyListIndexSize(), SupplyListSize(), SupplyLocXY(), SupplyState(), Skylark_Population_Manager::TheBreedingFemalesProbe(), Skylark_Population_Manager::TheBreedingSuccessProbe(), Skylark_Population_Manager::TheFledgelingProbe(), and Skylark_Population_Manager::TheRipleysOutputProbe().
probe_data* Population_Manager::TheProbe[100] |
Referenced by Skylark_Population_Manager::ProbeReportPOM().