Loading [MathJax]/extensions/ams.js
 |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
The class to handle all predator population related matters.
More...
#include <Predators.h>
|
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) |
|
| Population_Manager (Landscape *a_l_ptr, int a_numberLifeStages=12) |
|
virtual | ~Population_Manager (void) |
|
void | SetNoProbesAndSpeciesSpecificFunctions (int a_pn) override |
| Sets up probe and species specifics. More...
|
|
void | OpenTheAOROutputProbe (const string &a_AORFilename) override |
| Opens the AOR output file. More...
|
|
unsigned | GetLiveArraySize (int a_listindex) override |
| Gets the number of 'live' objects for a list index in the TheArray. More...
|
|
unsigned | GetPopulationSize (int a_listindex) override |
| Gets the number of species objects by default it is the same as LiveArray, however it could be different. This function should be used/overriden when we are interested in the number of the objects for presentation and not in inner maintenance of the PopulationManager and or TheArray. More...
|
|
void | IncLiveArraySize (int a_listindex) |
| Increments the number of 'live' objects for a list index in the TheArray. More...
|
|
unsigned int | FarmAnimalCensus (unsigned int a_farm, unsigned int a_typeofanimal) |
|
char * | SpeciesSpecificReporting (int a_species, int a_time) override |
|
char * | ProbeReport (int a_time) |
|
char * | ProbeReportTimed (int a_time) |
|
void | ImpactProbeReport (int a_Time) |
|
bool | BeginningOfMonth () |
|
void | LOG (const char *fname) |
|
int | SupplyStepSize () const |
|
virtual unsigned | Probe (int ListIndex, Probe_Data *p_TheProbe) |
|
virtual void | ImpactedProbe () |
|
virtual TAnimal * | SupplyAnimalPtr (unsigned int a_index, unsigned int a_animal) |
| Returns the pointer indexed by a_index and a_animal. Note NO RANGE CHECK. More...
|
|
virtual unsigned | SupplyListIndexSize () |
|
unsigned | SupplyListSize (unsigned listindex) const |
|
void | PushIndividual (const unsigned a_listindex, TAnimal *a_individual_ptr) |
|
const char * | SupplyStateNames (int i) const |
|
unsigned | SupplyStateNamesLength () const |
|
virtual void | DisplayLocations () |
|
TAnimal * | FindIndividual (unsigned Type, TAnimal *a_me) |
|
virtual TAnimal * | FindClosest (int x, int y, unsigned Type, TAnimal *a_me) |
|
omp_nest_lock_t * | GetGuardMapElement (unsigned a_x_index, unsigned a_y_index) |
| Return the guard map cell. More...
|
|
void | SetGuardMapElement (unsigned a_x_index, unsigned a_y_index) |
| Set the given guard map cell. More...
|
|
void | UnsetGuardMapElement (unsigned a_x_index, unsigned a_y_index) |
| Unset the given guard map cell. More...
|
|
void | UpdateGuardMap (int a_x, int a_y, int &a_index_x, int &a_index_y) |
| Get the index of the guard map for the given location. More...
|
|
bool | OpenTheRipleysOutputProbe () |
|
bool | OpenTheMonthlyRipleysOutputProbe () |
|
bool | OpenTheReallyBigProbe () |
|
virtual void | TheAOROutputProbe () |
|
virtual void | TheRipleysOutputProbe (ofstream *a_prb) |
| Special output functionality. More...
|
|
virtual void | TheReallyBigOutputProbe () |
|
void | CloseTheMonthlyRipleysOutputProbe () const |
|
virtual void | CloseTheRipleysOutputProbe () |
|
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) |
|
void | Debug_Shuffle (unsigned int Type) |
|
virtual void | RunStepMethods () |
|
| Population_Manager_Base (Landscape *L) |
| The Population_Manager_Base constructor. More...
|
|
virtual void | Catastrophe (int) |
| Must be re-implemented in descendent classes. More...
|
|
int | SupplySimW () const |
| Returns landscape width in m. More...
|
|
int | SupplySimH () const |
| Returns landscape height in m. More...
|
|
int | SupplySimWH () const |
| Returns half the landscape width in m. More...
|
|
int | SupplySimHH () const |
| Returns half the landscape height in m. More...
|
|
virtual int | ProbeFileInput (char *p_Filename, int p_ProbeNo) |
| A stub to build specfic probes and functions. More...
|
|
int | SupplyListNameLength () const |
|
const char * | SupplyListName (int a_i) const |
| Get a list name from the list. More...
|
|
virtual void | SupplyLocXY (unsigned, unsigned, int &, int &) |
| A stub for identifying an individual at a location. More...
|
|
virtual TAnimal * | FindClosest (int, int, unsigned) |
| A stub for identifying an individual at a location. More...
|
|
std::string | SupplySimulationName () |
|
void | SetStepCounterInADay (int a_counter) |
| Set step counter in a day. More...
|
|
int | GetStepCounterInADay (void) |
| Return the sep counter in a day. More...
|
|
virtual double | GetAphidDensity (int, int) |
| Return the aphid density, it is only used when aphid simulations are running. More...
|
|
The class to handle all predator population related matters.
◆ TPredator_Population_Manager()
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(), g_random_fnc(), struct_Predator::L, Population_Manager_Base::m_ListNameLength, Population_Manager_Base::m_ListNames, m_no_individuals, Population_Manager::m_population_type, m_Prey, Population_Manager_Base::m_SimulationName, Population_Manager_Base::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_Base::SimH, Population_Manager_Base::SimW, TOP_Predators, CfgInt::value(), WEASEL, weasel_breed_day, weasel_breed_threshold, weasel_death_threshold, weasel_StartingNo, struct_Predator::x, and struct_Predator::y.
◆ ~TPredator_Population_Manager()
TPredator_Population_Manager::~TPredator_Population_Manager |
( |
void |
| ) |
|
|
virtual |
◆ CloseTheReallyBigOutputProbe()
void TPredator_Population_Manager::CloseTheReallyBigOutputProbe |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ CreateObjects()
void TPredator_Population_Manager::CreateObjects |
( |
int |
ob_type, |
|
|
TAnimal * |
pvo, |
|
|
struct_Predator * |
data, |
|
|
int |
number |
|
) |
| |
141 for (
int i=0; i<number; i++)
References inc_inds(), struct_Predator::L, m_Prey, OWL, struct_Predator::PM, Population_Manager::PushIndividual(), WEASEL, struct_Predator::x, and struct_Predator::y.
Referenced by Weasel::BeginStep(), Owl::BeginStep(), and TPredator_Population_Manager().
◆ dec_inds()
void TPredator_Population_Manager::dec_inds |
( |
unsigned |
list | ) |
|
|
inline |
◆ DoAfter()
virtual void TPredator_Population_Manager::DoAfter |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ DoBefore()
virtual void TPredator_Population_Manager::DoBefore |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ DoFirst()
virtual void TPredator_Population_Manager::DoFirst |
( |
void |
| ) |
|
|
inlineprotectedvirtual |
◆ DoLast()
virtual void TPredator_Population_Manager::DoLast |
( |
| ) |
|
|
inlineprotectedvirtual |
Collects some data to describe the number of animals in each state at the end of the day
Reimplemented from Population_Manager.
Referenced by Run().
◆ inc_inds()
void TPredator_Population_Manager::inc_inds |
( |
unsigned |
list | ) |
|
|
inline |
◆ InOtherTerritory()
bool TPredator_Population_Manager::InOtherTerritory |
( |
unsigned |
sp, |
|
|
int |
p_x, |
|
|
int |
p_y, |
|
|
TPredator * |
p_Pred |
|
) |
| |
◆ PredAutumnSample()
void TPredator_Population_Manager::PredAutumnSample |
( |
| ) |
|
|
protected |
366 FILE* pref=fopen(
"PredAutumnOutput.txt",
"a");
368 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredAutumnSample",
"Could Not Open PredAutumnOutput.txt File");
374 unsigned int TotalSize = SizeWeasel+SizeOwl;
376 fprintf(pref,
"%d\t", year);
377 fprintf(pref,
"%d\t", today);
378 fprintf(pref,
"%d\t", SizeWeasel);
379 fprintf(pref,
"%d\t", SizeOwl);
380 fprintf(pref,
"%d\t", TotalSize);
389 FILE* pref = fopen(
"PredAutumnOutput.txt",
"a");
391 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredAutumnSample",
"Could Not Open PredAutumnOutput.txt File");
394 fprintf(pref,
"%d\t", year);
395 fprintf(pref,
"%d\t", today);
396 fprintf(pref,
"%d\t", SizeWeasel);
397 fprintf(pref,
"%d\t", 0);
398 fprintf(pref,
"%d\t", SizeWeasel);
407 FILE* pref = fopen(
"PredAutumnOutput.txt",
"a");
409 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredAutumnSample",
"Could Not Open PredAutumnOutput.txt File");
412 fprintf(pref,
"%d\t", year);
413 fprintf(pref,
"%d\t", today);
414 fprintf(pref,
"%d\t", 0);
415 fprintf(pref,
"%d\t", SizeOwl);
416 fprintf(pref,
"%d\t", SizeOwl);
References cfg_owl_StartingNo, cfg_weasel_StartingNo, Population_Manager_Base::m_TheLandscape, Landscape::SupplyDayInYear(), Population_Manager::SupplyListSize(), Landscape::SupplyYearNumber(), CfgInt::value(), and Landscape::Warn().
Referenced by Run().
◆ PredSampleFile()
void TPredator_Population_Manager::PredSampleFile |
( |
| ) |
|
|
protected |
169 FILE* pref=fopen(
"PredSampleData.txt",
"a");
171 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredSampleFile",
"Could Not Open PredSampleData.txt File");
179 unsigned int TotalSize = SizeWeasel+SizeOwl;
183 fprintf(pref,
"%d\t %d\t %d\t %d\t %u\t %u\n", 0,w ,0, h, SizeWeasel, TotalSize);
185 for (
unsigned i=0; i<SizeWeasel; i++){
201 fprintf(pref,
"%d\t",year);
202 fprintf(pref,
"%d\t",month);
203 fprintf(pref,
"%d\t",dayinMo);
204 fprintf(pref,
"%d\t",today);
206 fprintf(pref,
"%d\t",Wspecies);
207 fprintf(pref,
"%d\t",kill);
208 fprintf(pref,
"%d\t",KillEff);
209 fprintf(pref,
"%d\t",Terr);
210 fprintf(pref,
"%d\t",HomeR);
212 fprintf(pref,
"%d\t",Wx);
213 fprintf(pref,
"%d\t",Wy);
214 fprintf(pref,
"%d\t",Wpoly);
215 fprintf(pref,
"%d\t",Wele);
216 fprintf(pref,
"%d\t",Wveg);
220 fprintf(pref,
"%d\t %d\t %d\t %d\t %u\t %u\n", 0,w ,0, h, SizeOwl, TotalSize);
222 for (
unsigned i = 0; i < SizeOwl; i++){
236 fprintf(pref,
"%d\t",year);
237 fprintf(pref,
"%d\t",month);
238 fprintf(pref,
"%d\t",dayinMo);
239 fprintf(pref,
"%d\t",today);
241 fprintf(pref,
"%d\t",species);
242 fprintf(pref,
"%d\t",kill);
243 fprintf(pref,
"%d\t",KillEff);
244 fprintf(pref,
"%d\t",Terr);
245 fprintf(pref,
"%d\t",HomeR);
247 fprintf(pref,
"%d\t",Ox);
248 fprintf(pref,
"%d\t",Oy);
249 fprintf(pref,
"%d\t",Opoly);
250 fprintf(pref,
"%d\t",Oele);
251 fprintf(pref,
"%d\t",Oveg);
259 FILE* pref=fopen(
"PredSampleData.txt",
"a");
261 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredSampleFile",
"Could Not Open PredSampleData.txt File");
267 unsigned int TotalSize = (
unsigned int) SizeWeasel;
271 fprintf(pref,
"%d\t %d\t %d\t %d\t %u\t %u\n", 0,w ,0, h, SizeWeasel, TotalSize);
273 for (
unsigned i = 0; i < SizeWeasel; i++){
287 fprintf(pref,
"%d\t",year);
288 fprintf(pref,
"%d\t",month);
289 fprintf(pref,
"%d\t",dayinMo);
290 fprintf(pref,
"%d\t",today);
292 fprintf(pref,
"%d\t",species);
293 fprintf(pref,
"%d\t",kill);
294 fprintf(pref,
"%d\t",KillEff);
295 fprintf(pref,
"%d\t",Terr);
296 fprintf(pref,
"%d\t",HomeR);
298 fprintf(pref,
"%d\t",Wx);
299 fprintf(pref,
"%d\t",Wy);
300 fprintf(pref,
"%d\t",Wpoly);
301 fprintf(pref,
"%d\t",Wele);
302 fprintf(pref,
"%d\t",Wveg);
310 FILE* pref=fopen(
"PredSampleData.txt",
"a");
312 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredSampleFile",
"Could Not Open PredSampleData.txt File");
318 unsigned int TotalSize = SizeOwl;
321 fprintf(pref,
"%d\t %d\t %d\t %d\t %u\t %u\n", 0,w ,0, h, SizeOwl, TotalSize);
323 for (
unsigned i = 0; i < SizeOwl; i++){
338 fprintf(pref,
"%d\t",year);
339 fprintf(pref,
"%d\t",month);
340 fprintf(pref,
"%d\t",dayinMo);
341 fprintf(pref,
"%d\t",today);
343 fprintf(pref,
"%d\t",Wspecies);
344 fprintf(pref,
"%d\t",Wkill);
345 fprintf(pref,
"%d\t",WKillEff);
346 fprintf(pref,
"%d\t",Terr);
347 fprintf(pref,
"%d\t",HomeR);
349 fprintf(pref,
"%d\t",Wx);
350 fprintf(pref,
"%d\t",Wy);
351 fprintf(pref,
"%d\t",Wpoly);
352 fprintf(pref,
"%d\t",Wele);
353 fprintf(pref,
"%d\t",Wveg);
References cfg_owl_StartingNo, cfg_weasel_StartingNo, Population_Manager_Base::m_TheLandscape, Population_Manager::SupplyAnimalPtr(), Landscape::SupplyDayInMonth(), Landscape::SupplyDayInYear(), Landscape::SupplyElementType(), TPredator::SupplyHomeRange(), TPredator::SupplyKill(), TPredator::SupplyKillEff(), Population_Manager::SupplyListSize(), Population_Manager_Base::SupplyLocXY(), Landscape::SupplyMonth(), Landscape::SupplyPolyRef(), Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), TPredator::SupplySpeciesID(), TPredator::SupplyTerr(), Landscape::SupplyVegType(), Landscape::SupplyYearNumber(), CfgInt::value(), and Landscape::Warn().
Referenced by Run().
◆ PredSpringAutumnSample()
void TPredator_Population_Manager::PredSpringAutumnSample |
( |
| ) |
|
|
protected |
494 unsigned int TotalSize = SizeWeasel+SizeOwl;
496 FILE* pref=fopen(
"PredSpringAutumnOutput.txt",
"a");
498 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredSpringAutumnSample",
"Could Not Open PredSpringAutumnOutput.txt File");
502 fprintf(pref,
"%d\t", year);
503 fprintf(pref,
"%d\t", today);
504 fprintf(pref,
"%d\t", SizeWeasel);
505 fprintf(pref,
"%d\t", SizeOwl);
506 fprintf(pref,
"%d\t", TotalSize);
515 FILE* pref=fopen(
"PredSpringAutumnOutput.txt",
"a");
517 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredSpringAutumnSample",
"Could Not Open PredSpringAutumnOutput.txt File");
520 fprintf(pref,
"%d\t", year);
521 fprintf(pref,
"%d\t", today);
522 fprintf(pref,
"%d\t", SizeWeasel);
523 fprintf(pref,
"%d\t", 0);
524 fprintf(pref,
"%d\t", SizeWeasel);
532 FILE* pref=fopen(
"PredSpringAutumnOutput.txt",
"a");
534 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredSpringAutumnSample",
"Could Not Open PredSpringAutumnOutput.txt File");
537 fprintf(pref,
"%d\t", year);
538 fprintf(pref,
"%d\t", today);
539 fprintf(pref,
"%d\t", 0);
540 fprintf(pref,
"%d\t", SizeOwl);
541 fprintf(pref,
"%d\t", SizeOwl);
References cfg_owl_StartingNo, cfg_weasel_StartingNo, Population_Manager_Base::m_TheLandscape, Landscape::SupplyDayInYear(), Population_Manager::SupplyListSize(), Landscape::SupplyYearNumber(), CfgInt::value(), and Landscape::Warn().
Referenced by Run().
◆ PredSpringSample()
void TPredator_Population_Manager::PredSpringSample |
( |
| ) |
|
|
protected |
431 unsigned int TotalSize = SizeWeasel+SizeOwl;
433 FILE* pref=fopen(
"PredSpringOutput.txt",
"a");
435 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredSpringSample",
"Could Not Open PredSpringOutput.txt File");
438 fprintf(pref,
"%d\t", year);
439 fprintf(pref,
"%d\t", today);
440 fprintf(pref,
"%d\t", SizeWeasel);
441 fprintf(pref,
"%d\t", SizeOwl);
442 fprintf(pref,
"%d\t", TotalSize);
451 FILE* pref=fopen(
"PredSpringOutput.txt",
"a");
453 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredSpringSample",
"Could Not Open PredSpringOutput.txt File");
456 fprintf(pref,
"%d\t", year);
457 fprintf(pref,
"%d\t", today);
458 fprintf(pref,
"%d\t", SizeWeasel);
459 fprintf(pref,
"%d\t", 0);
460 fprintf(pref,
"%d\t", SizeWeasel);
469 FILE* pref=fopen(
"PredSpringOutput.txt",
"a");
471 m_TheLandscape->
Warn(
"TPredator_Population_Manager::PredSpringSample",
"Could Not Open PredSpringOutput.txt File");
474 fprintf(pref,
"%d\t", year);
475 fprintf(pref,
"%d\t", today);
476 fprintf(pref,
"%d\t", 0);
477 fprintf(pref,
"%d\t", SizeOwl);
478 fprintf(pref,
"%d\t", SizeOwl);
References cfg_owl_StartingNo, cfg_weasel_StartingNo, Population_Manager_Base::m_TheLandscape, Landscape::SupplyDayInYear(), Population_Manager::SupplyListSize(), Landscape::SupplyYearNumber(), CfgInt::value(), and Landscape::Warn().
Referenced by Run().
◆ Run()
void TPredator_Population_Manager::Run |
( |
int |
NoTSteps | ) |
|
|
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(), 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.
578 FILE* pref = fopen(
"PredProbe.txt",
"a");
580 m_TheLandscape->
Warn(
"Predator_Population_Manager Destructor",
"Could Not Open PredProbe.txt File");
586 fprintf(pref,
"%d\t%u\t%u\t%u\t%u\n", Y, 0, PredNo0, 1, PredNo1);
590 fprintf(pref,
"%d\t%u\t%u\n", Y, 0, PredNo0);
594 fprintf(pref,
"%d\t%u\t%u\n", Y, 1, PredNo1);
641 for (
int j=TAend; j>=0; j--)
References TALMaSSObject::BeginStep(), cfg_pred_first_sample_day, cfg_pred_second_sample_day, cfg_PredSampleDataUsed, DoAfter(), DoBefore(), DoFirst(), DoLast(), TALMaSSObject::EndStep(), TALMaSSObject::GetCurrentStateNo(), Population_Manager_Base::m_TheLandscape, PredAutumnSample(), PredSampleFile(), PredSpringAutumnSample(), PredSpringSample(), TALMaSSObject::SetStepDone(), TALMaSSObject::Step(), StepFinished(), Population_Manager::SupplyAnimalPtr(), Landscape::SupplyDayInYear(), Population_Manager::SupplyListIndexSize(), Population_Manager::SupplyListSize(), Landscape::SupplyYearNumber(), CfgInt::value(), CfgBool::value(), and Landscape::Warn().
◆ StepFinished()
bool TPredator_Population_Manager::StepFinished |
( |
void |
| ) |
|
|
protectedvirtual |
◆ supply_no_inds()
unsigned TPredator_Population_Manager::supply_no_inds |
( |
unsigned |
list | ) |
|
|
inline |
◆ m_no_individuals
unsigned TPredator_Population_Manager::m_no_individuals[2] |
|
protected |
◆ m_Prey
◆ NoPredatorTypes
unsigned TPredator_Population_Manager::NoPredatorTypes |
|
protected |
The documentation for this class was generated from the following files:
The base class for predators encompsassing all their general behaviours.
Definition: Predators.h:87
int owl_breed_threshold
Definition: Predators.cpp:73
void SetStepDone(bool a_bool)
Sets the step done indicator flag.
Definition: PopulationManager.h:143
virtual void Step()
Step behaviour - must be implemented in descendent classes.
Definition: PopulationManager.h:148
int weasel_StartingNo
Definition: Predators.cpp:79
virtual TAnimal * SupplyAnimalPtr(unsigned int a_index, unsigned int a_animal)
Returns the pointer indexed by a_index and a_animal. Note NO RANGE CHECK.
Definition: PopulationManager.h:678
#define OWL
Definition: Predators.cpp:49
TTypesOfVegetation SupplyVegType(int a_x, int a_y)
Returns the vegetation type of the polygon using the polygon reference number a_polyref or coordinate...
Definition: Landscape.h:1925
static CfgInt cfg_owl_death_threshold("OWL_DT", CFG_CUSTOM,-1)
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
Returns the landscape type of the polygon using the polygon reference number a_polyref or coordinates...
Definition: Landscape.h:1732
virtual void EndStep()
EndStep behaviour - must be implemented in descendent classes.
Definition: PopulationManager.h:151
TTypesOfPopulation m_population_type
Definition: PopulationManager.h:858
static CfgInt cfg_pred_second_sample_day("PRED_SAMPLE_FILE_DAY_TWO", CFG_CUSTOM, 287)
bool OverlapMyTerritory(unsigned x, unsigned y)
Definition: Predators.cpp:770
virtual void DoFirst()
Definition: Predators.h:167
virtual void SupplyLocXY(unsigned, unsigned, int &, int &)
A stub for identifying an individual at a location.
Definition: PopulationManager.h:593
const char * m_ListNames[32]
A list of life-stage names.
Definition: PopulationManager.h:628
virtual void BeginStep()
BeingStep behaviour - must be implemented in descendent classes.
Definition: PopulationManager.h:145
static CfgInt cfg_owl_breed_threshold("OWL_BT", CFG_CUSTOM, 5000000)
int y
Definition: Predators.h:69
int SupplyKill()
Definition: Predators.h:135
void PredSpringSample()
Definition: Predators.cpp:423
virtual void DoAfter()
Definition: Predators.h:169
static CfgInt cfg_owl_StartingNo("OWL_START_NO", CFG_CUSTOM, 0)
TPredator_Population_Manager * PM
Definition: Predators.h:72
int owl_death_threshold
Definition: Predators.cpp:75
int owl_breed_day
Definition: Predators.cpp:77
void inc_inds(unsigned list)
Definition: Predators.h:155
int SupplyMonth(void)
Passes a request on to the associated Calendar class function, returns m_month + 1 (the calendar mont...
Definition: Landscape.h:2272
void PredAutumnSample()
Definition: Predators.cpp:360
ofstream * RipleysOutputPrb
Definition: PopulationManager.h:860
static CfgInt cfg_weasel_StartingNo("WEASEL_START_NO", CFG_CUSTOM, 0)
int m_ListNameLength
the number of life-stages simulated in the population manager
Definition: PopulationManager.h:626
unsigned m_no_individuals[2]
Definition: Predators.h:163
Landscape * L
Definition: Predators.h:71
Used for creation of a new predator object.
Definition: Predators.h:65
static CfgInt cfg_weasel_breed_threshold("WEASEL_BT", CFG_CUSTOM, 5)
unsigned SupplySpeciesID()
Definition: Predators.h:134
int weasel_breed_day
Definition: Predators.cpp:76
bool value() const
Definition: Configurator.h:164
The Owl class is one of two current implementations of TPredator.
Definition: Predators.h:207
The Weasel class is one of two current implementations of TPredator.
Definition: Predators.h:186
Landscape * m_TheLandscape
holds an internal pointer to the landscape
Definition: PopulationManager.h:624
void PredSpringAutumnSample()
Definition: Predators.cpp:486
int SupplyKillEff()
Definition: Predators.h:137
int SimH
stores the simulation height
Definition: PopulationManager.h:614
virtual void DoLast()
Definition: Predators.h:170
int SupplyDayInMonth(void)
Passes a request on to the associated Calendar class function, returns m_day_in_month
Definition: Landscape.h:2277
int SupplySimAreaHeight(void)
Gets the simulation landscape height.
Definition: Landscape.h:2302
int SupplySimAreaWidth(void)
Gets the simulation landscape width.
Definition: Landscape.h:2297
static CfgInt cfg_owl_breed_day("OWL_BD", CFG_CUSTOM, 120)
int SupplyDayInYear(void)
Passes a request on to the associated Calendar class function, the day in the year.
Definition: Landscape.h:2267
int weasel_death_threshold
Definition: Predators.cpp:74
bool SupplyTerr()
Definition: Predators.h:136
Definition: PopulationManager.h:80
int SupplyYearNumber(void)
Passes a request on to the associated Calendar class function, returns m_simulationyear
Definition: Landscape.h:2287
int value() const
Definition: Configurator.h:116
int SimW
stores the simulation width
Definition: PopulationManager.h:616
int GetCurrentStateNo() const
Returns the current state number.
Definition: PopulationManager.h:137
void CreateObjects(int ob_type, TAnimal *pvo, struct_Predator *data, int number)
Definition: Predators.cpp:136
static CfgInt cfg_weasel_breed_day("WEASEL_BD", CFG_CUSTOM, 115)
static CfgBool cfg_PredSampleDataUsed("PRED_SAMPLE_DATA_USED", CFG_CUSTOM, false)
bool GetStepDone() const
Returns the step done indicator flag.
Definition: PopulationManager.h:141
static CfgInt cfg_weasel_death_threshold("WEASEL_DT", CFG_CUSTOM, 10)
string m_SimulationName
stores the simulation name
Definition: PopulationManager.h:622
virtual unsigned SupplyListIndexSize()
Definition: PopulationManager.h:725
int SupplyHomeRange()
Definition: Predators.h:138
virtual bool StepFinished()
Methods to run the simulations.
Definition: Predators.cpp:654
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
virtual void DoBefore()
Definition: Predators.h:168
void PushIndividual(const unsigned a_listindex, TAnimal *a_individual_ptr)
Definition: PopulationManager.cpp:1682
void PredSampleFile()
Definition: Predators.cpp:160
int weasel_breed_threshold
Definition: Predators.cpp:72
unsigned SupplyListSize(unsigned listindex) const
Definition: PopulationManager.h:726
#define WEASEL
Definition: Predators.cpp:48
Population_Manager(Landscape *a_l_ptr, int a_numberLifeStages=12)
Definition: PopulationManager.cpp:200
ofstream * ReallyBigOutputPrb
Definition: PopulationManager.h:873
int x
Definition: Predators.h:68
Vole_Population_Manager * m_Prey
Definition: Predators.h:161
void Warn(std::string a_msg1, std::string a_msg2)
Wrapper for the g_msg Warn function.
Definition: Landscape.h:2250
int SupplyPolyRef(int a_x, int a_y)
Get the in map polygon reference number from the x, y location.
Definition: Landscape.h:2157
static CfgInt cfg_pred_first_sample_day("PRED_SAMPLE_FILE_DAY_ONE", CFG_CUSTOM, 109)
int owl_StartingNo
Definition: Predators.cpp:78