ALMaSS Vole ODDox
1.1
The vole model description following ODdox protocol
|
Go to the documentation of this file.
41 #ifndef VolePopulationManagerH
42 #define VolePopulationManagerH
98 TrapLineMap(
unsigned int a_width,
unsigned int a_height,
unsigned int a_resolution,
const char* a_file );
102 bool IsTrap(
unsigned a_x,
unsigned a_y) {
103 if (GetValue( a_x, a_y ) == 1)
return true;
106 void Output(
InTrapPosition a_tp,
int a_day,
int a_sex,
bool a_terr,
int a_age,
int a_bx,
int a_by,
int a_ID );
109 void Init(
const char* a_inifile );
128 virtual void OPrint(
int a_value);
129 virtual void OPrint(
double a_value);
130 virtual void OPrint(
const char* a_value);
178 #ifdef __VOLEPESTICIDEON
180 void AddToImpacted() {m_impacted++;}
181 void AddToNotImpacted() {m_notimpacted++;}
182 void AddToGeneticImpacted() {m_geneticimpacted++;}
183 void incLittersLost() { m_LittersLost++; }
184 void incLittersProduced() { m_LittersProduced++; }
188 int m_geneticimpacted;
189 double m_geneticsterilitychance;
190 double m_f1sterilitychance;
192 int m_LittersProduced;
203 new_VB = dynamic_cast<Vole_Base *>(
TheArray[a_list][a_vole]);
231 virtual void Init (
void);
239 unsigned p_Age,
unsigned p_Range);
242 unsigned p_range,
bool p_sex,
double p_Weight );
243 vector<Vole_Base*>*
SupplyVoleList(
unsigned x,
unsigned y,
unsigned range);
244 bool InSquare(
int p_x,
int p_y,
int p_sqx,
int p_sqy,
int p_range);
261 else if (m_YoungAge<9){
uint32 GetVoleAllele(int a_list, int a_vole, int a_locus, int a_chromosome)
used to get a specific vole allele from outside the population manager
void TheAgeSexLocationProbe()
bool IsTrap(int p_x, int p_y)
vector< APoint > m_TrapCoords
List of trap co-ordinates.
int SupplyCountFemales(unsigned p_x, unsigned p_y, unsigned p_TerrRange)
double AssessHabitat(int p_Polyref)
Assess the quality of habitat at p_Polyref.
void OpenOutput(const char *a_filename)
Vole_Female * FindClosestFemale(int p_x, int p_y, int p_steps)
vector< TListOfAnimals > TheArray
Vole_Male * FindOutsideRadiusMale(int p_x, int p_y)
Base class for voles - all vole objects are descended from this class.
void CloseSexRatiosProbe()
void OpenResistanceOutput()
Opens the output file ready for resistance results.
int SupplyGrowthStartDate()
bool OpenSexRatiosProbe()
void CorrectCoords(int &x, int &y)
Function to prevent wrap around errors with co-ordinates using x/y pair.
virtual void Catastrophe()
int m_geneticproductfertilityeffect
int SupplyInOlderTerr(unsigned p_x, unsigned p_y, unsigned p_Age, unsigned p_Range)
virtual void LandscapeQuadrantOutputProbe(int a_day)
void ChangeData(int a_data, int a_value)
double GetHabitatQuality(int a_index)
bool BarrierSearch(int F_x, int F_y, int M_x, int M_y)
int ListClosestMales(int p_x, int p_y, int p_steps)
void Init(const char *a_inifile)
Reads in the trap coords, creates the map and sets up the output files.
void AddToNoYoungInfanticideCount(int m_NoOfYoung, int m_YoungAge)
A struct for passing data to create a new vole.
A class for simulation virtual traplines.
void SendMessage(TTypeOfVoleMessage p_message, unsigned p_x, unsigned p_y, unsigned p_range, bool p_sex, double p_Weight)
virtual void GeneticsResultsOutput(FILE *ofile, unsigned listindex)
void GeneticsOutputFile(unsigned listindex)
vector< double > VoleHabitatBaseQualities
void AddToYoung(int young)
void CreateObjects(VoleObject ob_type, TAnimal *pvo, struct_Vole_Adult *as, int number)
ofstream * m_VoleResistanceOutputFile
unsigned m_noTraps
The total number of traps.
The class for female voles.
void CreateObjects_Init(VoleObject ob_type, TAnimal *pvo, struct_Vole_Adult *as, int number)
~TrapLineMap()
TrapLineMap destructor.
The landscape class containing all environmental and topographical data.
virtual void TheSexRatiosProbe()
uint32 SupplyMyAllele(int i, int j)
vector< Vole_Female * > Vole_FemaleList
vector< Vole_Base * > * SupplyVoleList(unsigned x, unsigned y, unsigned range)
Vole_Male * FindWithinRadiusMale(int p_x, int p_y)
virtual void TheAOROutputProbe()
bool InSquare(int p_x, int p_y, int p_sqx, int p_sqy, int p_range)
Class to handle statistics and constructs based on allele frequencies.
The base class for all ALMaSS animal classes.
virtual void ImpactedProbe()
vector< Vole_Male * > Vole_MaleList
bool SupplyOlderFemales(unsigned p_x, unsigned p_y, unsigned p_Age, unsigned p_range)
Base class for all population managers.
TTypeOfVoleMortality
Types of vole mortality.
bool SuitableStartingLocation(int a_x, int a_y)
Vole_Male * FindClosestMale(int p_x, int p_y, int p_steps)
TrapLineMap(unsigned int a_width, unsigned int a_height, unsigned int a_resolution, const char *a_file)
TrapLineMap constructor.
bool RecordGeneticsToday(int p_today, int p_year, int p_start_year, int p_interval)
The class to handle all vole population related matters.
bool IsTrap(unsigned a_x, unsigned a_y)
Is there a trap at this x,y?
Vole_Male * FindRandomMale()
Landscape * m_TheLandscape
void AddToYoungYr(int young)
A class for storing the position of the trap the vole is in.
TrapLineMap * m_Traplines
ofstream * m_VoleAgeSexLocationFile
void CloseResistanceOutput()
Closes the output file ready for resistance results.
VoleSummaryOutput(const char *a_filename, Landscape *a_land, int a_numdataINT, int a_numdataDOUBLE)
The class for male voles.
TTypeOfVoleMessage
Types of vole message.
VoleSummaryOutput * m_VoleRecordMort
A base class for summary outputs.
Vole_Population_Manager(Landscape *p_L)
virtual void TheRipleysOutputProbe(FILE *a_prb)
int ListClosestFemales(int p_x, int p_y, int p_steps)
int SupplyHowManyVoles(unsigned p_x, unsigned p_y, unsigned p_size)
virtual void OPrintEndl()
virtual ~Vole_Population_Manager()
virtual ~VoleSummaryOutput()
void ResistanceOutput()
Resistance results file output
virtual void TheReallyBigOutputProbe()
IDMap< TAnimal * > * m_VoleMap
void Output(InTrapPosition a_tp, int a_day, int a_sex, bool a_terr, int a_age, int a_bx, int a_by, int a_ID)