Loading [MathJax]/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PopulationManager.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************************************
3 Copyright (c) 2011, Christopher John Topping, Aarhus University
4 All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without modification, are permitted provided
7 that the following conditions are met:
8 
9 Redistributions of source code must retain the above copyright notice, this list of conditions and the
10 following disclaimer.
11 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
12 the following disclaimer in the documentation and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
15 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
17 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
19 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 ********************************************************************************************************
23 */
34 //---------------------------------------------------------------------------
35 
36 #ifndef PopulationManagerH
37 #define PopulationManagerH
38 
40 
41 #include <omp.h>
42 #include <forward_list>
43 // Forwards
44 class TAnimal;
45 class AlleleFreq;
46 class AOR_Probe;
47 
48 // Start defines
49 using AnsiString = char*;
50 using TListOfAnimals = vector<TAnimal*>;
51 // END defines
52 
53 //------------------------------------------------------------------------------
57 enum TTypesOfPopulation :int {
77  //17
79  // Above this line are used for menu items and have to be in this order and present
86 };
87 
88 //------------------------------------------------------------------------------
89 
90 enum to_BeforeStepActions :unsigned {
97 };
98 
103 struct IntArray100 {
104 public:
105  int n[100];
106 };
107 
108 //------------------------------------------------------------------------------
109 
114 struct rectangle {
115 public:
116  unsigned m_x1;
117  unsigned m_y1;
118  unsigned m_x2;
119  unsigned m_y2;
120 };
121 
122 //------------------------------------------------------------------------------
123 
129 protected:
134 
135 public:
137  int GetCurrentStateNo() const { return m_CurrentStateNo; }
139  void SetCurrentStateNo(int a_num) { m_CurrentStateNo = a_num; }
141  bool GetStepDone() const { return m_StepDone; }
143  void SetStepDone(bool a_bool) { m_StepDone = a_bool; }
145  virtual void BeginStep() {
146  }
148  virtual void Step() {
149  }
151  virtual void EndStep() {
152  }
155  m_StepDone = false;
156  m_CurrentStateNo = 0;
157  }
159  TALMaSSObject();
161  virtual ~TALMaSSObject() = default;
163  static void OnArrayBoundsError();
164 };
165 
166 //------------------------------------------------------------------------------
167 
170  // used to communicate the position of an animal to inquiring objects
171 {
172 public:
173  unsigned m_x{0};
174  unsigned m_y{0};
177 };
178 
179 //------------------------------------------------------------------------------
180 
185 class RoeDeerInfo : public AnimalPosition {
186 public:
187  double m_Size{0};
188  int m_Age{0};
191 };
192 
193 //------------------------------------------------------------------------------
194 
200 class TAnimal : public TALMaSSObject {
201 public:
203  TAnimal(int x, int y, Landscape* L);
205  TAnimal(int x, int y);
207  void SetGuardMapIndex(int a_index_x, int a_index_y) {
208  m_guard_cell_x = a_index_x;
209  m_guard_cell_y = a_index_y;
210  }
214  unsigned SupplyFarmOwnerRef() const;
222  APoint SupplyPoint() const {
224  return p;
225  }
235  }
239  int Supply_m_Location_x() const { return m_Location_x; }
243  int Supply_m_Location_y() const { return m_Location_y; }
247  int SupplyGuardCellX() const { return m_guard_cell_x; }
251  int SupplyGuardCellY() const { return m_guard_cell_y; }
255  int SupplyAge() const { return m_AgeDays; }
259  void SetAge(int a_age) { m_AgeDays = a_age; }
263  virtual void KillThis() {
264  m_CurrentStateNo = -1;
265  m_StepDone = true;
266  //reset the toxicity object
269  }
273  virtual void CopyMyself() { }
277  void SetX(const int a_x) { m_Location_x = a_x; }
281  void SetY(const int a_y) { m_Location_y = a_y; }
282  virtual void ReinitialiseObject(int a_x, int a_y, Landscape* a_l_ptr) {
283  m_OurLandscape = a_l_ptr;
284  m_Location_x = a_x;
285  m_Location_y = a_y;
286  m_AgeDays = 0;
288  }
292  virtual void ReinitialiseObject(int a_x, int a_y) {
293  m_Location_x = a_x;
294  m_Location_y = a_y;
295  m_AgeDays = 0;
297  }
301  virtual int WhatState() { return 0; }
305  virtual void Dying() { KillThis(); }
309  void CheckManagement();
313  void CheckManagementXY(int a_x, int a_y);
317  virtual bool OnFarmEvent(FarmToDo /* event */) { return false; }
321  static void SetSimulationWidth(int a_value) { m_SimulationWidth = a_value; }
325  static void SetSimulationHeight(int a_value) { m_SimulationHeight = a_value; }
329  static void SetDayInYear(int a_value) { m_DayInYear = a_value; }
333  static void SetOurLandscape(Landscape* a_value) { m_OurLandscape = a_value; }
337  static void SetTempToday(double a_value) { m_TemperatureToday = a_value; }
338 protected:
346  static int m_SimulationWidth;
350  static int m_SimulationHeight;
354  static double m_TemperatureToday;
358  static int m_DayInYear;
378  int m_AgeDays {0};
391  }
392 };
393 
394 //------------------------------------------------------------------------------
395 
401 public:
402  bool operator()(TAnimal* a_a1, int a_x) const { return a_a1->Supply_m_Location_x() < a_x; }
403 };
404 
405 //---------------------------------------------------------------------------
406 
412 public:
413  bool operator()(TAnimal* a_a1, int a_x) const { return a_a1->Supply_m_Location_x() > a_x; }
414 };
415 //---------------------------------------------------------------------------
416 
421 class Probe_Data {
422 protected:
423  ofstream* m_MyFile;
424  int m_Time;
425  char m_MyFileName[255];
426 
427 public:
430  // true if the probe is a full landscape probe, then no need to check the position and we can just ask PM for numbers: most of the time is like that
431  unsigned m_ReportInterval; // from 1-10
432  unsigned m_NoAreas; // from 1-10
433  rectangle m_Rect[16]; // can have up to thirty two areas
434  unsigned m_NoEleTypes;
435  unsigned m_NoVegTypes;
436  unsigned m_NoFarms;
437  TTypesOfVegetation m_RefVeg[25]; // up to 25 reference types
438  TTypesOfLandscapeElement m_RefEle[25]; // up to 25 reference types
439  unsigned m_RefFarms[25]; // up to 25 reference types
440  // Species Specific Code below:
441  bool m_TargetTypes[16]; // eggs,nestlings,fledgelings,males,females etc.
442  void FileOutput(int No, int time, int ProbeNo) const;
443  void FileAppendOutput(int No, int time) const;
444  Probe_Data();
445  void SetFile(ofstream* F);
446  ofstream* OpenFile(const string& Nme);
447 
449  m_MyFile = new ofstream(m_MyFileName, ios::app);
450  if (!(*m_MyFile).is_open())
451  {
452  g_msg->Warn(WARN_FILE, "PopulationManager::AppendToFile() Unable to open file for append: ", m_MyFileName);
453  exit(1);
454  }
455  return true;
456  }
457  void CloseFile() const;
458  ~Probe_Data() = default;
459 };
460 
461 //------------------------------------------------------------------------------
462 //------------------------------------------------------------------------------
463 
469 protected:
470  double m_K{0};
471  double m_n{0};
472  double m_Sum{0};
473  double m_SumX{0};
474  double m_SumX2{0};
475 
476 public:
478  SimpleStatistics() = default;
480  void add_variable(double x) {
481  // This uses the computing shifted data equation.
482  if (m_n < 1) m_K = x;
483  m_n++;
484  m_Sum += x;
485  m_SumX += x - m_K;
486  m_SumX2 += (x - m_K) * (x - m_K);
487  }
489  void remove_variable(double x) {
490  m_n--;
491  m_Sum -= x;
492  m_SumX -= x - m_K;
493  m_SumX2 -= (x - m_K) * (x - m_K);
494  }
496  double get_N() const { return m_n; }
498  double get_Total() const { return m_Sum; }
500  double get_meanvalue() const {
501  if (m_n < 1) return -1;
502  return m_K + m_SumX / m_n;
503  }
505  double get_varianceP() {
506  if (m_n < 2)
507  {
508  return -1; // Ilegal n value, but don't want to exit
509  }
510  return (m_SumX2 - m_SumX * m_SumX / m_n) / m_n;
511  }
513  double get_varianceS() {
514  if (m_n < 2)
515  {
516  return -1; // Ilegal n value, but don't want to exit
517  }
518  return (m_SumX2 - m_SumX * m_SumX / m_n) / (m_n - 1);
519  }
521  double get_SD() {
522  if (m_n < 2)
523  {
524  return -1; // Ilegal n value, but don't want to exit
525  }
526  return sqrt(get_varianceS());
527  }
529  double get_SE() {
530  if (m_n < 2)
531  {
532  return -1; // Ilegal n value, but don't want to exit
533  }
534  return sqrt(get_varianceS() / get_N());
535  }
537  void ClearData() {
538  m_K = 0;
539  m_n = 0;
540  m_Sum = 0;
541  m_SumX = 0;
542  m_SumX2 = 0;
543  }
544 };
545 
546 //------------------------------------------------------------------------------
555 public:
556  // Methods
560  virtual unsigned GetLiveArraySize(int a_listindex) { return 0; }
562  virtual unsigned GetPopulationSize(int a_listindex) { return 0; }
564  virtual void Catastrophe(int /* a_mort */) {
565  }
567  int SupplySimW() const { return SimW; }
569  int SupplySimH() const { return SimH; }
571  int SupplySimWH() const { return SimWH; }
573  int SupplySimHH() const { return SimHH; }
575  virtual void Run(int a_NoTSteps) {
576  for (int i = 0; i < a_NoTSteps; i++)
577  {
578  }
579  }
581  virtual void SetNoProbesAndSpeciesSpecificFunctions(int /*a_pn*/) {
582  }
584  virtual int ProbeFileInput(char* p_Filename, int p_ProbeNo);
586  virtual char* SpeciesSpecificReporting(int /*a_species*/, int /*a_time*/) { return nullptr; }
588  Probe_Data* TheProbe[100] = {nullptr}; // lct: Array of pointers
589  int SupplyListNameLength() const { return m_ListNameLength; }
591  const char* SupplyListName(int a_i) const { return m_ListNames[a_i]; }
593  virtual void SupplyLocXY(unsigned /*listindex */, unsigned /*j*/, int& /*x*/, int& /*y*/) {
594  }
596  virtual TAnimal* FindClosest(int /*x*/, int /*y*/, unsigned /*Type*/) { return nullptr; }
597  std::string SupplySimulationName() { return m_SimulationName; }
599  virtual void OpenTheAOROutputProbe(const string& a_string) {
600  }
601 
603  void SetStepCounterInADay(int a_counter) {m_step_counter_in_a_day = a_counter;}
607  virtual double GetAphidDensity(int /*a_x*/, int /*a_y*/) { return 0; }
609  virtual TAnimal* SupplyAnimalPtr(unsigned int a_index, unsigned int a_animal) { return nullptr; }
610 
611 protected:
612  ~Population_Manager_Base() = default;
614  int SimH;
616  int SimW;
618  int SimHH;
620  int SimWH;
628  const char* m_ListNames[32]{};
630  std::string m_AORProbeFileName{"AOR_Probe.txt"};
632  std::string m_ProbeFileName{"Probe.res"};
635 };
636 //------------------------------------------------------------------------------
637 
646 public:
647  // Methods
648  Population_Manager(Landscape* a_l_ptr, int a_numberLifeStages = 12);
649  virtual ~Population_Manager(void);
650 
652  void SetNoProbesAndSpeciesSpecificFunctions(int a_pn) override;
654  void OpenTheAOROutputProbe(const string& a_AORFilename) override;
655 
657  unsigned GetLiveArraySize(int a_listindex) override { return m_LiveArraySize[a_listindex]; }
663  unsigned GetPopulationSize(int a_listindex) override { return GetLiveArraySize(a_listindex); }
665  void IncLiveArraySize(int a_listindex) { m_LiveArraySize[a_listindex]++; }
666  unsigned int FarmAnimalCensus(unsigned int a_farm, unsigned int a_typeofanimal);
667  char* SpeciesSpecificReporting(int a_species, int a_time) override;
668  char* ProbeReport(int a_time);
669  char* ProbeReportTimed(int a_time);
670  void ImpactProbeReport(int a_Time);
671  bool BeginningOfMonth();
672  void LOG(const char* fname);
673  int SupplyStepSize() const { return m_StepSize; }
674  void Run(int NoTSteps) override;
675  virtual unsigned Probe(int ListIndex, Probe_Data* p_TheProbe);
676  virtual void ImpactedProbe();
678  virtual TAnimal* SupplyAnimalPtr(unsigned int a_index, unsigned int a_animal) {
679  //reset
680  if(a_animal == 0 || a_animal < TheSubArrayPreviousIndex[a_index]){
681  //let's find the first non-empty subarray
682  TheSubArrayPreviousIndex[a_index] = 0;
683  TheSubArrayThreadIndex[a_index] = 0;
684  TheSubArraysIterators[a_index] = TheSubArrays[a_index][0]->begin();
685  for (int j = 0; j < TheSubArraysSizes[a_index].size(); j++){
686  if(TheSubArraysSizes[a_index][j] > 0){
687  TheSubArrayThreadIndex[a_index] = j;
688  TheSubArraysIterators[a_index] = TheSubArrays[a_index][j]->begin();
689  break;
690  }
691  }
692  if(a_animal == 0)
693  return *(TheSubArraysIterators[a_index]);
694  }
695 
696  if(a_animal == TheSubArrayPreviousIndex[a_index]){
697  return *(TheSubArraysIterators[a_index]);
698  }
699 
700  //start the search from right after the previous position
701  int temp_animal_num = TheSubArrayPreviousIndex[a_index];
702  int temp_thread_num = TheSubArrayThreadIndex[a_index];
703 
704  TheSubArraysIterators[a_index]++;
705  while(temp_animal_num < a_animal){
706  for (auto it = TheSubArraysIterators[a_index]; it != TheSubArrays[a_index][temp_thread_num]->end(); ++it)
707  {
708  temp_animal_num++;
709  if(temp_animal_num == a_animal){
710  TheSubArrayPreviousIndex[a_index] = temp_animal_num;
711  TheSubArrayThreadIndex[a_index] = temp_thread_num;
712  TheSubArraysIterators[a_index] = it;
713  return *it;
714  }
715  }
716  //we need to move to the next thread subarray and search from the beginning
717  temp_thread_num++;
718  TheSubArraysIterators[a_index] = TheSubArrays[a_index][temp_thread_num]->begin();
719  }
720 
721  //if reach here means error happens,quite
722  exit(1);
723  }
724 
725  virtual unsigned SupplyListIndexSize() { return static_cast<unsigned>(TheSubArrays.size()); }
726  unsigned SupplyListSize(unsigned listindex) const {
727  int return_value = 0;
728  for (unsigned i = 0; i < TheSubArraysSizes[listindex].size(); i++)
729  {
730  return_value += TheSubArraysSizes[listindex][i];
731  }
732  return return_value;
733  }
734 
735 
736  void PushIndividual(const unsigned a_listindex, TAnimal* a_individual_ptr);
737 
738  const char* SupplyStateNames(int i) const { return StateNames[i]; }
739  unsigned SupplyStateNamesLength() const { return StateNamesLength; }
740  virtual void DisplayLocations();
741 
742 
743  bool ProbesSet{};
745  TAnimal* FindIndividual(unsigned Type, TAnimal* a_me);
746  // used to show when probes are needed to be set
747  virtual TAnimal* FindClosest(int x, int y, unsigned Type, TAnimal* a_me);
748 
750  omp_nest_lock_t* GetGuardMapElement(unsigned a_x_index, unsigned a_y_index)
751  {
752  return m_MapGuard[a_y_index][a_x_index];
753  }
754 
756  void SetGuardMapElement(unsigned a_x_index, unsigned a_y_index)
757  {
758  omp_set_nest_lock(m_MapGuard[a_y_index][a_x_index]);
759  }
760 
762  void UnsetGuardMapElement(unsigned a_x_index, unsigned a_y_index)
763  {
764  omp_unset_nest_lock(m_MapGuard[a_y_index][a_x_index]);
765  }
766 
768  void UpdateGuardMap(int a_x, int a_y, int& a_index_x, int& a_index_y)
769  {
770  int temp_index_x = a_x / m_guard_cell_size;
771  int temp_index_y = a_y / m_guard_cell_size;
772 
773  //a new cell, we need to reset the guard
774  if(a_index_x != temp_index_x || a_index_y != temp_index_y){
775  omp_unset_nest_lock(m_MapGuard[a_index_y][a_index_x]);
776  omp_set_nest_lock(m_MapGuard[temp_index_y][temp_index_x]);
777  a_index_x = temp_index_x;
778  a_index_y = temp_index_y;
779  }
780 
781  }
782 
783 protected:
784  // Attributes
785  // Holds the number of live animals represented in each element of vector of vectors TheArray
786  vector<unsigned> m_LiveArraySize;
787  int m_NoProbes = 0;
788 
790  std::vector<std::vector<omp_nest_lock_t*>> m_MapGuard;
794 
797 
798  //FILE* m_AlleleFreqsFile;
799  //FILE* m_EasyPopRes;
800  //FILE* m_FledgelingFile;
801  const char* StateNames[100]{};
802  int m_StepSize{};
804  vector<vector<forward_list<TAnimal*>*>> TheSubArrays;
806  vector<vector<int>> TheSubArraysSizes;
808  vector<int> m_LifeStageOrderVec;
810  vector<forward_list<TAnimal*>::iterator> TheSubArraysIterators;
816  FILE* TestFile{};
817  FILE* TestFile2{};
819  vector<unsigned> BeforeStepActions;
822 
824  virtual bool StepFinished();
825  virtual void DoFirst();
826  virtual void DoBefore();
827  virtual void DoAfter();
828  virtual void DoLast();
829  virtual void DoSpecialBetweenLifeStages(int a_life_stage) {;}
830  virtual void SortX(unsigned Type);
831  void SortXIndex(unsigned Type);
832  virtual void SortY(unsigned Type);
833  void SortState(unsigned Type);
834  void SortStateR(unsigned Type);
835  virtual unsigned PartitionLiveDead(unsigned Type);
836  virtual void Shuffle_or_Sort(unsigned Type);
837  virtual void Shuffle(unsigned Type);
838  virtual void Catastrophe();
839 
840 public:
841  // Grid related functions
843  //virtual void OpenTheAOROutputProbe(string a_AORFilename);
845  bool OpenTheReallyBigProbe();
846  virtual void TheAOROutputProbe();
848  virtual void TheRipleysOutputProbe(ofstream* a_prb);
849  virtual void TheReallyBigOutputProbe();
851  virtual void CloseTheRipleysOutputProbe();
852  virtual void CloseTheReallyBigOutputProbe();
855  int GetSeasonNumber() { return m_SeasonNumber; }
856 
857 protected:
859  ofstream* AOROutputPrb{};
860  ofstream* RipleysOutputPrb{};
861  ofstream* RipleysOutputPrb1{};
862  ofstream* RipleysOutputPrb2{};
863  ofstream* RipleysOutputPrb3{};
864  ofstream* RipleysOutputPrb4{};
865  ofstream* RipleysOutputPrb5{};
866  ofstream* RipleysOutputPrb6{};
867  ofstream* RipleysOutputPrb7{};
868  ofstream* RipleysOutputPrb8{};
869  ofstream* RipleysOutputPrb9{};
870  ofstream* RipleysOutputPrb10{};
871  ofstream* RipleysOutputPrb11{};
872  ofstream* RipleysOutputPrb12{};
873  ofstream* ReallyBigOutputPrb{};
876 
877  long int lamdagrid[2][257][257]{}; // THIS ONLY WORKS UP TO 10x10 KM !!!!
878 public:
879  void LamdaDeath(int x, int y) {
880  // inlined for speed
881  lamdagrid[1][x / __lgridsize][y / __lgridsize]++;
882  }
883  void LamdaBirth(int x, int y) { lamdagrid[0][x / __lgridsize][y / __lgridsize]++; }
884  void LamdaBirth(int x, int y, int z) { lamdagrid[0][x / __lgridsize][y / __lgridsize] += z; }
885  void LamdaClear() {
886  for (int i = 0; i < 257; i++)
887  {
888  for (int j = 0; j < 257; j++)
889  {
890  lamdagrid[0][i][j] = 0;
891  lamdagrid[1][i][j] = 0;
892  }
893  }
894  }
895  void LamdaDumpOutput();
896  // end grid stuff
897 public: // Special ones for compatability to descended managers
898  virtual int SupplyPegPosx(int /*unused*/) { return 0; }
899  virtual int SupplyPegPosy(int /*unused*/) { return 0; }
900  virtual int SupplyCovPosx(int /*unused*/) { return 0; }
901  virtual int SupplyCovPosy(int /*unused*/) { return 0; }
902  virtual bool OpenTheFledgelingProbe() { return false; }
903  virtual bool OpenTheBreedingPairsProbe() { return false; }
904  virtual bool OpenTheBreedingSuccessProbe() { return false; }
905  virtual void BreedingPairsOutput(int /*unused*/) {
906  }
907  virtual int TheBreedingFemalesProbe(int /*unused*/) { return 0; }
908  virtual int TheFledgelingProbe() { return 0; }
909  virtual void BreedingSuccessProbeOutput(double /*unused*/, int /*unused*/, int /*unused*/, int /*unused*/, int
910  /*unused*/, int /*unused*/, int /*unused*/, int /*unused*/) {
911  }
912  virtual int TheBreedingSuccessProbe(int& /*unused*/, int& /*unused*/, int& /*unused*/, int& /*unused*/, int&
913  /*unused*/, int& /*unused*/) { return 0; }
914  virtual void FledgelingProbeOutput(int /*unused*/, int /*unused*/) {
915  }
916  virtual void TheGeneticProbe(unsigned /*unused*/, int /*unused*/, unsigned& /*unused*/) {
917  }
918  virtual void GeneticsResultsOutput(FILE* /*unused*/, unsigned /*unused*/) {
919  }
920 
921  void Debug_Shuffle(unsigned int Type);
922 
923  virtual void RunStepMethods();
924 };
925 
926 //------------------------------------------------------------------------------
927 //------------------------------------------------------------------------------
928 
933 public:
935  m_ListNameLength = 0; // This is for life stages
936  TheProbe[0] = nullptr;
937  }
938 };
939 
940 //------------------------------------------------------------------------------
941 
947 public:
949  void SetPopulation(std::shared_ptr<Population_Manager_Base> p_pm, int a_pt) {
950  m_populationlist[a_pt].push_back(p_pm);
951  if (p_pm != nullptr) m_populationarray.at(a_pt) = true;
952  else m_populationarray.at(a_pt) = false;
953  }
954 
955 
957  int GetPopulationManagerNum(int a_pt) { return static_cast<int>(m_populationlist[a_pt].size()); }
958 
959  /*
960  * The following function returns raw pointer-- it should never be used
961  * */
962  Population_Manager_Base* GetPopulation(int a_pt, int a_index=0) { if( m_populationlist[a_pt].size()<1) return nullptr; return m_populationlist[a_pt][a_index].get(); }
963  /*
964  * In the bright future only the next function will be used (or the prototype of the former one will be changed)
965  * */
966  std::shared_ptr<Population_Manager_Base> GetPopulation_smart(int a_pt, int a_index=0) { if( m_populationlist[a_pt].size()<1) return nullptr; return m_populationlist[a_pt][a_index]; }
969 
970 protected:
971  std::vector<std::shared_ptr<Population_Manager_Base>> m_populationlist[static_cast<int>(TOP_foobar)];
972  std::array<bool, TOP_foobar> m_populationarray{false};
973 };
974 
975 //------------------------------------------------------------------------------
976 
977 #endif
PopulationManagerList::m_populationlist
std::vector< std::shared_ptr< Population_Manager_Base > > m_populationlist[static_cast< int >(TOP_foobar)]
Definition: PopulationManager.h:971
Population_Manager_Base::SupplySimHH
int SupplySimHH() const
Returns half the landscape height in m.
Definition: PopulationManager.h:573
Population_Manager_Base
Base class for all population managers.
Definition: PopulationManager.h:554
Population_Manager::TestFile2
FILE * TestFile2
Definition: PopulationManager.h:817
TOP_Skylark
Definition: PopulationManager.h:59
TAnimal::Supply_m_Location_x
int Supply_m_Location_x() const
Returns the ALMaSS x-coordinate.
Definition: PopulationManager.h:239
Probe_Data::Probe_Data
Probe_Data()
Definition: PopulationManager.cpp:1656
TOP_Newt
Definition: PopulationManager.h:68
Probe_Data::m_Time
int m_Time
Definition: PopulationManager.h:424
cfg_RipleysOutput_interval
CfgInt cfg_RipleysOutput_interval("G_RIPLEYSOUTPUT_INTERVAL", CFG_CUSTOM, 1)
TOP_Hunters
Definition: PopulationManager.h:81
WARN_FILE
Definition: MapErrorMsg.h:37
Probe_Data::OpenFile
ofstream * OpenFile(const string &Nme)
Definition: PopulationManager.cpp:1666
TAnimal::m_my_pesticide
PesticideToxicity m_my_pesticide
Definition: PopulationManager.h:379
g_rand_uni_fnc
double g_rand_uni_fnc()
Definition: ALMaSS_Random.cpp:56
TAnimal::SupplyPoint
APoint SupplyPoint() const
Returns the objects location in ALMaSS coordinates.
Definition: PopulationManager.h:222
TAnimal::KillThis
virtual void KillThis()
Sets all parameters ready for object destruction.
Definition: PopulationManager.h:263
Population_Manager::UnsetGuardMapElement
void UnsetGuardMapElement(unsigned a_x_index, unsigned a_y_index)
Unset the given guard map cell.
Definition: PopulationManager.h:762
TALMaSSObject::SetStepDone
void SetStepDone(bool a_bool)
Sets the step done indicator flag.
Definition: PopulationManager.h:143
ReturnMoreThanX
Test the given animal's y-coordinate against the given y-coordinate.
Definition: PopulationManager.h:411
TAnimal::SetSimulationWidth
static void SetSimulationWidth(int a_value)
Sets the simulation width.
Definition: PopulationManager.h:321
TALMaSSObject::Step
virtual void Step()
Step behaviour - must be implemented in descendent classes.
Definition: PopulationManager.h:148
Landscape::TranslateVegTypes
TTypesOfVegetation TranslateVegTypes(int VegReference)
Returns vegetation type translated from the ALMaSS reference number.
Definition: Landscape.h:2326
ReturnMoreThanX::operator()
bool operator()(TAnimal *a_a1, int a_x) const
Definition: PopulationManager.h:413
toBSA_Nothing
Definition: PopulationManager.h:94
TAnimal::SupplyPosition
AnimalPosition SupplyPosition() const
Returns the objects location and habitat type and veg type.
Definition: PopulationManager.cpp:1533
Population_Manager::SupplyAnimalPtr
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
Landscape::SupplyTemp
double SupplyTemp(void)
Passes a request on to the associated Weather class function, the temperature for the current day.
Definition: Landscape.h:1993
Population_Manager::DoLast
virtual void DoLast()
Definition: PopulationManager.cpp:656
SimpleStatistics::get_SD
double get_SD()
Returns the sample standard deviation.
Definition: PopulationManager.h:521
Population_Manager::m_MapGuard
std::vector< std::vector< omp_nest_lock_t * > > m_MapGuard
This is used to make sure animals will not behaviour at the same area - multi threads.
Definition: PopulationManager.h:790
TAnimal::SupplyPolygonRef
int SupplyPolygonRef() const
Returns the polygon reference where the object is located.
Definition: PopulationManager.h:229
Probe_Data::m_TargetTypes
bool m_TargetTypes[16]
Definition: PopulationManager.h:441
TAnimal::SetTempToday
static void SetTempToday(double a_value)
Sets the temperature today attribute.
Definition: PopulationManager.h:337
Landscape::SupplyVegType
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
ReturnLessThanX
Test the given animal's x-coordinate against the given x-coordinate.
Definition: PopulationManager.h:400
Population_Manager_Base::SupplyListNameLength
int SupplyListNameLength() const
Definition: PopulationManager.h:589
SimpleStatistics
Definition: PopulationManager.h:464
Population_Manager::TheSubArraysSizes
vector< vector< int > > TheSubArraysSizes
Hold all the animal sizes in each thread.
Definition: PopulationManager.h:806
Landscape::SupplyElementType
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
Population_Manager::m_guard_cell_width_num
int m_guard_cell_width_num
Definition: PopulationManager.h:792
cfg_ProbeTargetTypesNo
CfgInt cfg_ProbeTargetTypesNo("PROBE_TARGET_TYPES_NO", CFG_CUSTOM, 10, 1, 16)
Population_Manager::Shuffle_or_Sort
virtual void Shuffle_or_Sort(unsigned Type)
Definition: PopulationManager.cpp:1255
TALMaSSObject::EndStep
virtual void EndStep()
EndStep behaviour - must be implemented in descendent classes.
Definition: PopulationManager.h:151
Probe_Data::m_FullLandscapeProbe
bool m_FullLandscapeProbe
Definition: PopulationManager.h:429
Population_Manager_Base::SupplySimH
int SupplySimH() const
Returns landscape height in m.
Definition: PopulationManager.h:569
SimpleStatistics::m_Sum
double m_Sum
Definition: PopulationManager.h:472
Population_Manager_Base::GetStepCounterInADay
int GetStepCounterInADay(void)
Return the sep counter in a day.
Definition: PopulationManager.h:605
Population_Manager::StateNamesLength
unsigned StateNamesLength
Definition: PopulationManager.h:815
Population_Manager::m_population_type
TTypesOfPopulation m_population_type
Definition: PopulationManager.h:858
PopulationManagerList::SetPopulation
void SetPopulation(std::shared_ptr< Population_Manager_Base > p_pm, int a_pt)
Definition: PopulationManager.h:949
PesticideToxicity
Definition: PesticideToxicity.h:63
tole_Foobar
Definition: LandscapeFarmingEnums.h:183
TOP_Bombus
Definition: PopulationManager.h:73
CfgStr::value
char * value() const
Definition: Configurator.h:182
PesticideStore::setLandscapePointer
static void setLandscapePointer(Landscape *a_landscape)
The function to set the static landscape pointer.
Definition: PesticideToxicity.h:60
IntArray100
A struct of 100 ints.
Definition: PopulationManager.h:103
Population_Manager::BeforeStepActions
vector< unsigned > BeforeStepActions
Holds the season list of possible before step actions.
Definition: PopulationManager.h:819
Population_Manager::TheBreedingFemalesProbe
virtual int TheBreedingFemalesProbe(int)
Definition: PopulationManager.h:907
AnsiString
char * AnsiString
Definition: PopulationManager.h:49
TOP_Osmia
Definition: PopulationManager.h:69
PopulationManagerList
A small class to hold the pointers to active population managers.
Definition: PopulationManager.h:946
Probe_Data::FileAppendOutput
void FileAppendOutput(int No, int time) const
Definition: PopulationManager.cpp:1641
TALMaSSObject
The base class of all ALMaSS objects requiring Step code.
Definition: PopulationManager.h:128
cfg_ReallyBigOutput_day1
CfgInt cfg_ReallyBigOutput_day1("G_REALLYBIGOUTPUT_DAY_ONE", CFG_CUSTOM, 1)
cfg_MapGuardCellSize
CfgInt cfg_MapGuardCellSize("MAP_GUARD_CELL_SIZE", CFG_CUSTOM, 20)
The size to create the map guard.
None_Population_Manager::None_Population_Manager
None_Population_Manager(Landscape *L)
Definition: PopulationManager.h:934
Population_Manager_Base::Population_Manager_Base
Population_Manager_Base(Landscape *L)
The Population_Manager_Base constructor.
Definition: PopulationManager.cpp:182
TAnimal::m_guard_cell_y
int m_guard_cell_y
The index y to the guard cell.
Definition: PopulationManager.h:374
Population_Manager::SpeciesSpecificReporting
char * SpeciesSpecificReporting(int a_species, int a_time) override
Definition: PopulationManager.cpp:1300
CfgStr
String configurator entry class.
Definition: Configurator.h:173
TOP_ApisRAM
Definition: PopulationManager.h:70
Probe_Data::CloseFile
void CloseFile() const
Definition: PopulationManager.cpp:115
TOP_OsmiaParasitoids
Definition: PopulationManager.h:82
Population_Manager_Base::SupplyLocXY
virtual void SupplyLocXY(unsigned, unsigned, int &, int &)
A stub for identifying an individual at a location.
Definition: PopulationManager.h:593
Population_Manager_Base::m_ListNames
const char * m_ListNames[32]
A list of life-stage names.
Definition: PopulationManager.h:628
Population_Manager::AOROutputPrb
ofstream * AOROutputPrb
Definition: PopulationManager.h:859
Population_Manager::Run
void Run(int NoTSteps) override
Definition: PopulationManager.cpp:350
TALMaSSObject::BeginStep
virtual void BeginStep()
BeingStep behaviour - must be implemented in descendent classes.
Definition: PopulationManager.h:145
Population_Manager_Base::ProbeFileInput
virtual int ProbeFileInput(char *p_Filename, int p_ProbeNo)
A stub to build specfic probes and functions.
Definition: PopulationManager.cpp:672
Population_Manager::RipleysOutputPrb4
ofstream * RipleysOutputPrb4
Definition: PopulationManager.h:864
cfg_Fixed_random_sequence
CfgBool cfg_Fixed_random_sequence("G_FIXEDRANDOMSEQUENCE", CFG_CUSTOM, false)
Probe_Data::OpenForAppendToFile
bool OpenForAppendToFile()
Definition: PopulationManager.h:448
TOP_PoecilusCupreus
Definition: PopulationManager.h:78
Population_Manager::SupplyCovPosy
virtual int SupplyCovPosy(int)
Definition: PopulationManager.h:901
CompareStateAlive
Function to compare to TAnimal's m_CurrentStateNo to anything but -1.
Definition: PopulationManager.cpp:143
Population_Manager::GetGuardMapElement
omp_nest_lock_t * GetGuardMapElement(unsigned a_x_index, unsigned a_y_index)
Return the guard map cell.
Definition: PopulationManager.h:750
cfg_RipleysOutputFirstYear
CfgInt cfg_RipleysOutputFirstYear("G_RIPLEYSOUTPUT_FIRSTYEAR", CFG_CUSTOM, 1)
Population_Manager::SupplyCovPosx
virtual int SupplyCovPosx(int)
Definition: PopulationManager.h:900
Population_Manager_Base::SimHH
int SimHH
stores the simulation height halved
Definition: PopulationManager.h:618
TAnimal::SupplyGuardCellX
int SupplyGuardCellX() const
Returns the x-index to the guard cell.
Definition: PopulationManager.h:247
Population_Manager::BreedingSuccessProbeOutput
virtual void BreedingSuccessProbeOutput(double, int, int, int, int, int, int, int)
Definition: PopulationManager.h:909
Population_Manager::RipleysOutputPrb6
ofstream * RipleysOutputPrb6
Definition: PopulationManager.h:866
Population_Manager::TestFile
FILE * TestFile
Definition: PopulationManager.h:816
Population_Manager::CloseTheRipleysOutputProbe
virtual void CloseTheRipleysOutputProbe()
Definition: PopulationManager.cpp:1020
FarmToDo
FarmToDo
Definition: Treatment.h:31
Landscape::SupplyMonth
int SupplyMonth(void)
Passes a request on to the associated Calendar class function, returns m_month + 1 (the calendar mont...
Definition: Landscape.h:2272
AOR_Probe.h
SimpleStatistics::m_K
double m_K
Definition: PopulationManager.h:470
Population_Manager::m_StepSize
int m_StepSize
Definition: PopulationManager.h:802
TAnimal::m_DayInYear
static int m_DayInYear
A holder for the day in year shared with all TAnimal objects.
Definition: PopulationManager.h:358
AnimalPosition::m_x
unsigned m_x
Definition: PopulationManager.h:173
Population_Manager::RipleysOutputPrb
ofstream * RipleysOutputPrb
Definition: PopulationManager.h:860
rectangle::m_y1
unsigned m_y1
Definition: PopulationManager.h:117
TOP_Goose
Definition: PopulationManager.h:65
TAnimal::SetX
void SetX(const int a_x)
Sets the x-coordinate.
Definition: PopulationManager.h:277
CompareY
Definition: PopulationManager.cpp:134
toBSA_SortX
Definition: PopulationManager.h:92
Landscape::FillVegAreaData
void FillVegAreaData()
Runs through all polygons and records the area of each vegetation type.
Definition: Landscape.cpp:5712
Population_Manager::SetGuardMapElement
void SetGuardMapElement(unsigned a_x_index, unsigned a_y_index)
Set the given guard map cell.
Definition: PopulationManager.h:756
Population_Manager::m_LifeStageOrderVec
vector< int > m_LifeStageOrderVec
The vector to store the life stage order for looping specie life stages.
Definition: PopulationManager.h:808
Population_Manager_Base::m_ListNameLength
int m_ListNameLength
the number of life-stages simulated in the population manager
Definition: PopulationManager.h:626
TOP_Bembidion
Definition: PopulationManager.h:62
TAnimal::Dying
virtual void Dying()
A wrapped for KillThis - ideally should not be used.
Definition: PopulationManager.h:305
Population_Manager::TheSubArraysIterators
vector< forward_list< TAnimal * >::iterator > TheSubArraysIterators
the iterator from last time called for SupplyAnimalPtr(), this for fast loop all the animals in the d...
Definition: PopulationManager.h:810
Population_Manager::RipleysOutputPrb3
ofstream * RipleysOutputPrb3
Definition: PopulationManager.h:863
Population_Manager::SortXIndex
void SortXIndex(unsigned Type)
Population_Manager::RunStepMethods
virtual void RunStepMethods()
Definition: PopulationManager.cpp:521
TAnimal::SupplyFarmOwnerRef
unsigned SupplyFarmOwnerRef() const
Get the current location farm ref if any.
Definition: PopulationManager.cpp:1547
Population_Manager_Base::SupplySimWH
int SupplySimWH() const
Returns half the landscape width in m.
Definition: PopulationManager.h:571
Population_Manager::ImpactProbeReport
void ImpactProbeReport(int a_Time)
Definition: PopulationManager.cpp:1513
rectangle::m_x2
unsigned m_x2
Definition: PopulationManager.h:118
Population_Manager::OpenTheFledgelingProbe
virtual bool OpenTheFledgelingProbe()
Definition: PopulationManager.h:902
SimpleStatistics::m_SumX2
double m_SumX2
Definition: PopulationManager.h:474
Population_Manager::CloseTheMonthlyRipleysOutputProbe
void CloseTheMonthlyRipleysOutputProbe() const
Definition: PopulationManager.cpp:1029
CfgBool::value
bool value() const
Definition: Configurator.h:164
Population_Manager::SortState
void SortState(unsigned Type)
Definition: PopulationManager.cpp:1159
Population_Manager_Base::m_TheLandscape
Landscape * m_TheLandscape
holds an internal pointer to the landscape
Definition: PopulationManager.h:624
Population_Manager::TheRipleysOutputProbe
virtual void TheRipleysOutputProbe(ofstream *a_prb)
Special output functionality.
Definition: PopulationManager.cpp:1061
Population_Manager_Base::SimWH
int SimWH
stores the simulation width halved
Definition: PopulationManager.h:620
Population_Manager_Base::SpeciesSpecificReporting
virtual char * SpeciesSpecificReporting(int, int)
A stub to build specfic reporting.
Definition: PopulationManager.h:586
TAnimal::TAnimal
TAnimal(int x, int y, Landscape *L)
The TAnimal constructor saving the x,y, location and the landscape pointer.
Definition: PopulationManager.cpp:1553
Probe_Data
Data structure to hold & output probe data probe data is designed to be used to return the number of ...
Definition: PopulationManager.h:421
Population_Manager::GetSeasonNumber
int GetSeasonNumber()
Get the season number.
Definition: PopulationManager.h:855
TAnimal::CheckManagementXY
void CheckManagementXY(int a_x, int a_y)
Used to start a check for any management related effects at x,y.
Definition: PopulationManager.cpp:1603
cfg_DayInMonth
static CfgInt cfg_DayInMonth("PRB_DAYINMONTH", CFG_CUSTOM, 1)
Population_Manager_Base::m_step_counter_in_a_day
int m_step_counter_in_a_day
Step counter in a day, this is used for the animals with finer step size other than one day.
Definition: PopulationManager.h:634
Probe_Data::m_RefVeg
TTypesOfVegetation m_RefVeg[25]
Definition: PopulationManager.h:437
Population_Manager::Probe
virtual unsigned Probe(int ListIndex, Probe_Data *p_TheProbe)
Definition: PopulationManager.cpp:792
Population_Manager::m_AOR_Probe
AOR_Probe * m_AOR_Probe
A pointer to the AOR probe.
Definition: PopulationManager.h:875
TOP_Rabbit
Definition: PopulationManager.h:67
TTypesOfLandscapeElement
TTypesOfLandscapeElement
Values that represent the types of landscape polygon that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:57
TOP_Aphid
Definition: PopulationManager.h:75
Landscape
The landscape class containing all environmental and topographical data.
Definition: Landscape.h:142
Population_Manager::LamdaClear
void LamdaClear()
Definition: PopulationManager.h:885
Population_Manager_Base::GetPopulationSize
virtual unsigned GetPopulationSize(int a_listindex)
Must be re-implemented in descendent classes.
Definition: PopulationManager.h:562
TOP_Partridge
Definition: PopulationManager.h:64
Population_Manager::TheSubArrayThreadIndex
vector< int > TheSubArrayThreadIndex
the thread index number from last time called for SupplyAnimalPtr(), this for fast loop all the anima...
Definition: PopulationManager.h:814
Population_Manager::LamdaBirth
void LamdaBirth(int x, int y)
Definition: PopulationManager.h:883
SimpleStatistics::get_SE
double get_SE()
Returns the sample standard error.
Definition: PopulationManager.h:529
Population_Manager_Base::SimH
int SimH
stores the simulation height
Definition: PopulationManager.h:614
cfg_ReallyBigOutput_interval
CfgInt cfg_ReallyBigOutput_interval("G_REALLYBIGOUTPUT_INTERVAL", CFG_CUSTOM, 1)
Population_Manager::RipleysOutputPrb11
ofstream * RipleysOutputPrb11
Definition: PopulationManager.h:871
ReturnLessThanX::operator()
bool operator()(TAnimal *a_a1, int a_x) const
Definition: PopulationManager.h:402
Population_Manager::RipleysOutputPrb1
ofstream * RipleysOutputPrb1
Definition: PopulationManager.h:861
g_Species
TTypesOfPopulation g_Species
Definition: PopulationManager.cpp:101
RoeDeerInfo
Part of the basic ALMaSS system (obselete) Communicates the range centre, age and size of animals to ...
Definition: PopulationManager.h:185
Population_Manager_Base::Catastrophe
virtual void Catastrophe(int)
Must be re-implemented in descendent classes.
Definition: PopulationManager.h:564
Population_Manager::SupplyStepSize
int SupplyStepSize() const
Definition: PopulationManager.h:673
Landscape::SupplyDayInMonth
int SupplyDayInMonth(void)
Passes a request on to the associated Calendar class function, returns m_day_in_month
Definition: Landscape.h:2277
cfg_ReallyBigOutput_day2
CfgInt cfg_ReallyBigOutput_day2("G_REALLYBIGOUTPUT_DAY_TWO", CFG_CUSTOM, 91)
rectangle
A struct defining two x,y coordinate sets of positive co-ords only.
Definition: PopulationManager.h:114
Population_Manager_Base::FindClosest
virtual TAnimal * FindClosest(int, int, unsigned)
A stub for identifying an individual at a location.
Definition: PopulationManager.h:596
TOP_Disturbers
Definition: PopulationManager.h:84
Landscape::SupplySimAreaHeight
int SupplySimAreaHeight(void)
Gets the simulation landscape height.
Definition: Landscape.h:2302
Landscape::SetSpeciesFunctions
void SetSpeciesFunctions(TTypesOfPopulation a_species)
This is the jumping off point for any landscape related species setup, it creates function pointers t...
Definition: Landscape.cpp:7821
Landscape::SupplyFarmOwner
int SupplyFarmOwner(int a_x, int a_y)
Returns the farm owner pointer for the polygon referenced by a_polyref or a_x, a_y.
Definition: Landscape.h:1774
TAnimal::SetDayInYear
static void SetDayInYear(int a_value)
Sets the day in year attribute.
Definition: PopulationManager.h:329
Landscape::SupplySimAreaWidth
int SupplySimAreaWidth(void)
Gets the simulation landscape width.
Definition: Landscape.h:2297
TAnimal::m_Location_y
int m_Location_y
The objects ALMaSS y coordinate.
Definition: PopulationManager.h:366
Landscape::TranslateEleTypes
TTypesOfLandscapeElement TranslateEleTypes(int EleReference)
Returns element type translated from the ALMaSS reference number.
Definition: Landscape.h:2313
Population_Manager::TheReallyBigOutputProbe
virtual void TheReallyBigOutputProbe()
Definition: PopulationManager.cpp:1056
SimpleStatistics::get_meanvalue
double get_meanvalue() const
Returns the mean.
Definition: PopulationManager.h:500
APoint
A simple class defining an x,y coordinate set.
Definition: ALMaSS_Setup.h:52
Probe_Data::~Probe_Data
~Probe_Data()=default
Population_Manager_Base::~Population_Manager_Base
~Population_Manager_Base()=default
Population_Manager::DoBefore
virtual void DoBefore()
Definition: PopulationManager.cpp:341
Population_Manager::RipleysOutputPrb9
ofstream * RipleysOutputPrb9
Definition: PopulationManager.h:869
Population_Manager::LamdaBirth
void LamdaBirth(int x, int y, int z)
Definition: PopulationManager.h:884
TOP_Hare
Definition: PopulationManager.h:63
TAnimal::m_OurLandscape
static Landscape * m_OurLandscape
A pointer to the landscape object shared with all TAnimal objects.
Definition: PopulationManager.h:342
CfgBool
Bool configurator entry class.
Definition: Configurator.h:155
TAnimal::CheckManagement
void CheckManagement()
Used to start a check for any management related effects at the objects current location.
Definition: PopulationManager.cpp:1591
Population_Manager_Base::m_ProbeFileName
std::string m_ProbeFileName
name of the Probe file
Definition: PopulationManager.h:632
TAnimal::OnFarmEvent
virtual bool OnFarmEvent(FarmToDo)
Must be reimplemented if used in descendent classes. Sets the action on a management event.
Definition: PopulationManager.h:317
cfg_ReallyBigOutput_day3
CfgInt cfg_ReallyBigOutput_day3("G_REALLYBIGOUTPUT_DAY_THREE", CFG_CUSTOM, 182)
AlleleFreq
Class to handle statistics and constructs based on allele frequencies.
Definition: GeneticMaterial.h:61
CompareStateR::operator()
bool operator()(TAnimal *&A1, TAnimal *&A2) const
Definition: PopulationManager.cpp:166
TAnimal::Supply_m_Location_y
int Supply_m_Location_y() const
Returns the ALMaSS y-coordinate.
Definition: PopulationManager.h:243
Population_Manager::LamdaDumpOutput
void LamdaDumpOutput()
Definition: PopulationManager.cpp:771
TAnimal
The base class for all ALMaSS animal classes. Includes all the functionality required to be handled b...
Definition: PopulationManager.h:200
Population_Manager::m_SeasonNumber
int m_SeasonNumber
Holds the season number. Used when running goose and hunter sims.
Definition: PopulationManager.h:821
CompareX
Function to compare to TAnimal's m_Location_x.
Definition: PopulationManager.cpp:127
TAnimal::m_SimulationWidth
static int m_SimulationWidth
A static member for the simulation width because it is often used by descendent classes.
Definition: PopulationManager.h:346
Population_Manager::SupplyStateNamesLength
unsigned SupplyStateNamesLength() const
Definition: PopulationManager.h:739
TAnimal::SetY
void SetY(const int a_y)
Sets the y-coordinate.
Definition: PopulationManager.h:281
Probe_Data::m_NoEleTypes
unsigned m_NoEleTypes
Definition: PopulationManager.h:434
PesticideToxicity::setHostAnimalPointer
void setHostAnimalPointer(TAnimal *animal)
The function to set the host animal pointer.
Definition: PesticideToxicity.h:106
TAnimal::SetSimulationHeight
static void SetSimulationHeight(int a_value)
Sets the simulation height.
Definition: PopulationManager.h:325
cfg_PmEventsize
CfgInt cfg_PmEventsize("PM_EVENTSIZE", CFG_CUSTOM, 100)
Population_Manager::OpenTheAOROutputProbe
void OpenTheAOROutputProbe(const string &a_AORFilename) override
Opens the AOR output file.
Definition: PopulationManager.cpp:295
AnimalPosition
A class defining an animals position.
Definition: PopulationManager.h:169
RoeDeerInfo::m_Size
double m_Size
Definition: PopulationManager.h:187
AOR_Probe
Definition: AOR_Probe.h:4
to_BeforeStepActions
to_BeforeStepActions
Definition: PopulationManager.h:90
Probe_Data::m_MyFileName
char m_MyFileName[255]
Definition: PopulationManager.h:425
RoeDeerInfo::m_OldRange
APoint m_OldRange
Definition: PopulationManager.h:190
PopulationManagerList::PopulationManagerList
PopulationManagerList()
Definition: PopulationManager.h:948
TOP_NoSpecies
Definition: PopulationManager.h:58
Population_Manager_Base::m_AORProbeFileName
std::string m_AORProbeFileName
name of the AOR Probe file
Definition: PopulationManager.h:630
Population_Manager::ImpactedProbe
virtual void ImpactedProbe()
Definition: PopulationManager.cpp:785
Population_Manager::SupplyStateNames
const char * SupplyStateNames(int i) const
Definition: PopulationManager.h:738
CompareStateAlive::operator()
bool operator()(TAnimal *&A1) const
Definition: PopulationManager.cpp:145
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
TALMaSSObject::SetCurrentStateNo
void SetCurrentStateNo(int a_num)
Sets the current state number.
Definition: PopulationManager.h:139
cfg_RipleysOutputMonthly_used
CfgBool cfg_RipleysOutputMonthly_used("G_RIPLEYSOUTPUTMONTHLY_USED", CFG_CUSTOM, false)
Population_Manager
Base class for all population managers for agent based models.
Definition: PopulationManager.h:645
CompareStateDead::operator()
bool operator()(TAnimal *A1) const
Definition: PopulationManager.cpp:175
Probe_Data::m_Rect
rectangle m_Rect[16]
Definition: PopulationManager.h:433
Population_Manager::RipleysOutputPrb5
ofstream * RipleysOutputPrb5
Definition: PopulationManager.h:865
TOP_RoeDeer
Definition: PopulationManager.h:66
Population_Manager_Base::OpenTheAOROutputProbe
virtual void OpenTheAOROutputProbe(const string &a_string)
An empty method that needs to be here because the population manager lists might contain sub-populati...
Definition: PopulationManager.h:599
Landscape::SupplyDayInYear
int SupplyDayInYear(void)
Passes a request on to the associated Calendar class function, the day in the year.
Definition: Landscape.h:2267
TAnimal::m_AgeDays
int m_AgeDays
To hold the age in days.
Definition: PopulationManager.h:378
TOP_Beetle
Definition: PopulationManager.h:83
TAnimal::ReinitialiseObject
virtual void ReinitialiseObject(int a_x, int a_y)
Used to re-use an object - must be implemented in descendent classes.
Definition: PopulationManager.h:292
Population_Manager::lamdagrid
long int lamdagrid[2][257][257]
Definition: PopulationManager.h:877
TALMaSSObject::m_StepDone
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:133
Population_Manager::m_is_paralleled
bool m_is_paralleled
This is used to indicate whether the species is paralleled.
Definition: PopulationManager.h:796
Population_Manager::SupplyPegPosx
virtual int SupplyPegPosx(int)
Definition: PopulationManager.h:898
TOP_foobar
Definition: PopulationManager.h:85
SimpleStatistics::get_varianceS
double get_varianceS()
Returns the sample variance.
Definition: PopulationManager.h:513
rectangle::m_y2
unsigned m_y2
Definition: PopulationManager.h:119
TOP_Predators
Definition: PopulationManager.h:80
Population_Manager::RipleysOutputPrb2
ofstream * RipleysOutputPrb2
Definition: PopulationManager.h:862
Landscape::SupplyYearNumber
int SupplyYearNumber(void)
Passes a request on to the associated Calendar class function, returns m_simulationyear
Definition: Landscape.h:2287
PopulationManagerList::m_populationarray
std::array< bool, TOP_foobar > m_populationarray
Definition: PopulationManager.h:972
Population_Manager::FindClosest
virtual TAnimal * FindClosest(int x, int y, unsigned Type, TAnimal *a_me)
Definition: PopulationManager.cpp:1102
cfg_ReallyBigOutput_filename
static CfgStr cfg_ReallyBigOutput_filename("G_REALLYBIGOUTPUT_FILENAME", CFG_CUSTOM, "ReallyBigOutput.txt")
g_Str
char g_Str[255]
Definition: PopulationManager.cpp:99
toBSA_ShuffleEvery500
Definition: PopulationManager.h:95
SimpleStatistics::get_varianceP
double get_varianceP()
Returns the population variance.
Definition: PopulationManager.h:505
Probe_Data::m_ReportInterval
unsigned m_ReportInterval
Definition: PopulationManager.h:431
Population_Manager::TheFledgelingProbe
virtual int TheFledgelingProbe()
Definition: PopulationManager.h:908
TTypesOfPopulation
TTypesOfPopulation
An enum to hold all the possible types of population handled by a Population_Manager class.
Definition: PopulationManager.h:57
CfgInt::value
int value() const
Definition: Configurator.h:116
cfg_ReallyBigOutput_day4
CfgInt cfg_ReallyBigOutput_day4("G_REALLYBIGOUTPUT_DAY_FOUR", CFG_CUSTOM, 274)
cfg_AorOutput_used
CfgBool cfg_AorOutput_used("G_AOROUTPUT_USED", CFG_CUSTOM, false)
Probe_Data::m_NoVegTypes
unsigned m_NoVegTypes
Definition: PopulationManager.h:435
AnimalPosition::m_EleType
TTypesOfLandscapeElement m_EleType
Definition: PopulationManager.h:175
Population_Manager_Base::TheProbe
Probe_Data * TheProbe[100]
Holds a list of pointers to standard output probes.
Definition: PopulationManager.h:588
SimpleStatistics::m_n
double m_n
Definition: PopulationManager.h:471
SimpleStatistics::SimpleStatistics
SimpleStatistics()=default
SimpleStatistics constructor.
Population_Manager_Base::GetLiveArraySize
virtual unsigned GetLiveArraySize(int a_listindex)
Must be re-implemented in descendent classes. Gets the number of 'live' objects.
Definition: PopulationManager.h:560
Population_Manager::ProbeReportTimed
char * ProbeReportTimed(int a_time)
Definition: PopulationManager.cpp:1490
Population_Manager::RipleysOutputPrb12
ofstream * RipleysOutputPrb12
Definition: PopulationManager.h:872
SimpleStatistics::get_N
double get_N() const
Returns the number of values.
Definition: PopulationManager.h:496
AnimalPosition::m_y
unsigned m_y
Definition: PopulationManager.h:174
Population_Manager::SupplyPegPosy
virtual int SupplyPegPosy(int)
Definition: PopulationManager.h:899
Population_Manager::DoFirst
virtual void DoFirst()
Definition: PopulationManager.cpp:333
Population_Manager_Base::SimW
int SimW
stores the simulation width
Definition: PopulationManager.h:616
SimpleStatistics::m_SumX
double m_SumX
Definition: PopulationManager.h:473
TALMaSSObject::GetCurrentStateNo
int GetCurrentStateNo() const
Returns the current state number.
Definition: PopulationManager.h:137
toBSA_Shuffle
Definition: PopulationManager.h:91
tov_Undefined
Definition: LandscapeFarmingEnums.h:610
TAnimal::SetAge
void SetAge(int a_age)
Sets the animals age in days.
Definition: PopulationManager.h:259
Population_Manager_Base::SetStepCounterInADay
void SetStepCounterInADay(int a_counter)
Set step counter in a day.
Definition: PopulationManager.h:603
Probe_Data::m_NoAreas
unsigned m_NoAreas
Definition: PopulationManager.h:432
Population_Manager::OpenTheRipleysOutputProbe
bool OpenTheRipleysOutputProbe()
Definition: PopulationManager.cpp:897
Probe_Data::m_FileRecord
bool m_FileRecord
Definition: PopulationManager.h:428
Population_Manager::UpdateGuardMap
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.
Definition: PopulationManager.h:768
SimpleStatistics::remove_variable
void remove_variable(double x)
Remove a value.
Definition: PopulationManager.h:489
TAnimal::CopyMyself
virtual void CopyMyself()
Used to copy the object details to another in descendent classes.
Definition: PopulationManager.h:273
Population_Manager::StateNames
const char * StateNames[100]
Definition: PopulationManager.h:801
Population_Manager::FarmAnimalCensus
unsigned int FarmAnimalCensus(unsigned int a_farm, unsigned int a_typeofanimal)
Definition: PopulationManager.cpp:1448
Population_Manager::TheBreedingSuccessProbe
virtual int TheBreedingSuccessProbe(int &, int &, int &, int &, int &, int &)
Definition: PopulationManager.h:912
Probe_Data::m_RefFarms
unsigned m_RefFarms[25]
Definition: PopulationManager.h:439
Population_Manager::FindIndividual
TAnimal * FindIndividual(unsigned Type, TAnimal *a_me)
Definition: PopulationManager.cpp:1078
TOP_Ladybird
Definition: PopulationManager.h:76
CompareState::operator()
bool operator()(TAnimal *&A1, TAnimal *&A2) const
Definition: PopulationManager.cpp:157
Population_Manager::GetPopulationType
TTypesOfPopulation GetPopulationType()
Definition: PopulationManager.h:853
cfg_RipleysOutput_filename
static CfgStr cfg_RipleysOutput_filename("G_RIPLEYSOUTPUT_FILENAME", CFG_CUSTOM, "RipleysOutput.txt")
Population_Manager::FledgelingProbeOutput
virtual void FledgelingProbeOutput(int, int)
Definition: PopulationManager.h:914
Population_Manager::ProbeReport
char * ProbeReport(int a_time)
Definition: PopulationManager.cpp:1463
Population_Manager::OpenTheReallyBigProbe
bool OpenTheReallyBigProbe()
Definition: PopulationManager.cpp:1005
cfg_RipleysOutput_day
CfgInt cfg_RipleysOutput_day("G_RIPLEYSOUTPUT_DAY", CFG_CUSTOM, 60)
CompareStateDead
Function to compare to TAnimal's m_CurrentStateNo to -1.
Definition: PopulationManager.cpp:173
Population_Manager::DisplayLocations
virtual void DisplayLocations()
Definition: PopulationManager.cpp:661
Landscape::GetOwner_tole
TTypesOfLandscapeElement GetOwner_tole(int a_x, int a_y)
Returns the landscape type of the polygon owner (used in cases relating to e.g. unsprayed field margi...
Definition: Landscape.h:1742
Population_Manager::OpenTheMonthlyRipleysOutputProbe
bool OpenTheMonthlyRipleysOutputProbe()
Definition: PopulationManager.cpp:912
TALMaSSObject::~TALMaSSObject
virtual ~TALMaSSObject()=default
The destructor for TALMaSSObject.
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Population_Manager::GetLiveArraySize
unsigned GetLiveArraySize(int a_listindex) override
Gets the number of 'live' objects for a list index in the TheArray.
Definition: PopulationManager.h:657
PopulationManagerList::SupplyActivePopulationsCount
int SupplyActivePopulationsCount()
returns the number of active populations O(1)
Definition: PopulationManager.cpp:1689
Population_Manager::RipleysOutputPrb7
ofstream * RipleysOutputPrb7
Definition: PopulationManager.h:867
cfg_ReallyBigOutputFirstYear
CfgInt cfg_ReallyBigOutputFirstYear("G_REALLYBIGOUTPUT_FIRSTYEAR", CFG_CUSTOM, 1)
Population_Manager::SetNoProbesAndSpeciesSpecificFunctions
void SetNoProbesAndSpeciesSpecificFunctions(int a_pn) override
Sets up probe and species specifics.
Definition: PopulationManager.cpp:289
TAnimal::m_SimulationHeight
static int m_SimulationHeight
A static member for the simulation height because it is often used by descendent classes.
Definition: PopulationManager.h:350
TAnimal::ReinitialiseObject
virtual void ReinitialiseObject(int a_x, int a_y, Landscape *a_l_ptr)
Definition: PopulationManager.h:282
TOP_Lacewing
Definition: PopulationManager.h:74
TALMaSSObject::GetStepDone
bool GetStepDone() const
Returns the step done indicator flag.
Definition: PopulationManager.h:141
Population_Manager::GeneticsResultsOutput
virtual void GeneticsResultsOutput(FILE *, unsigned)
Definition: PopulationManager.h:918
TALMaSSObject::OnArrayBoundsError
static void OnArrayBoundsError()
Used for debugging only, tests basic object properties.
Definition: PopulationManager.cpp:1614
PesticideToxicity::reset
virtual void reset(void)
Reset PesticideToxicity class, this should be called when the host animal is dead.
Definition: PesticideToxicity.cpp:195
Population_Manager::TheGeneticProbe
virtual void TheGeneticProbe(unsigned, int, unsigned &)
Definition: PopulationManager.h:916
Population_Manager::BreedingPairsOutput
virtual void BreedingPairsOutput(int)
Definition: PopulationManager.h:905
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
rectangle::m_x1
unsigned m_x1
Definition: PopulationManager.h:116
CfgInt
Integer configurator entry class.
Definition: Configurator.h:102
cfg_AorOutput_interval
CfgInt cfg_AorOutput_interval("G_AORSOUTPUT_INTERVAL", CFG_CUSTOM, 1)
l_pest_enable_pesticide_engine
CfgBool l_pest_enable_pesticide_engine
Used to turn on or off the PPP functionality of ALMaSS.
cfg_FixedRandomSeed
CfgInt cfg_FixedRandomSeed("G_FIXEDRANDOMSEED", CFG_CUSTOM, 0)
TAnimal::m_TemperatureToday
static double m_TemperatureToday
A holder for the temperature today shared with all TAnimal objects.
Definition: PopulationManager.h:354
RoeDeerInfo::m_Age
int m_Age
Definition: PopulationManager.h:188
Population_Manager::SortStateR
void SortStateR(unsigned Type)
Definition: PopulationManager.cpp:1171
Population_Manager::BeginningOfMonth
bool BeginningOfMonth()
Definition: PopulationManager.cpp:1282
Population_Manager_Base::SupplyListName
const char * SupplyListName(int a_i) const
Get a list name from the list.
Definition: PopulationManager.h:591
Farm
The base class for all farm types.
Definition: Farm.h:755
TAnimal::m_guard_cell_x
int m_guard_cell_x
The index x to the guard cell.
Definition: PopulationManager.h:370
toBSA_foobar
Definition: PopulationManager.h:96
TOP_Vole
Definition: PopulationManager.h:60
PopulationManagerList::GetPopulation_smart
std::shared_ptr< Population_Manager_Base > GetPopulation_smart(int a_pt, int a_index=0)
Definition: PopulationManager.h:966
Probe_Data::FileOutput
void FileOutput(int No, int time, int ProbeNo) const
Definition: PopulationManager.cpp:1626
Population_Manager::SortX
virtual void SortX(unsigned Type)
Definition: PopulationManager.cpp:1135
CompareY::operator()
bool operator()(TAnimal *&A1, TAnimal *&A2) const
Definition: PopulationManager.cpp:136
TAnimal::SupplyPolygonType
TTypesOfLandscapeElement SupplyPolygonType() const
Returns the polygon type where the object is located.
Definition: PopulationManager.h:233
CompareState
Function to compare to TAnimal's Current behavioural state.
Definition: PopulationManager.cpp:155
TAnimal::SupplyAge
int SupplyAge() const
Returns the animals age in days.
Definition: PopulationManager.h:255
CompareX::operator()
bool operator()(TAnimal *&A1, TAnimal *&A2) const
Definition: PopulationManager.cpp:129
g_thread_count
int g_thread_count
Definition: PopulationManager.cpp:107
Population_Manager::PartitionLiveDead
virtual unsigned PartitionLiveDead(unsigned Type)
Definition: PopulationManager.cpp:1181
Population_Manager_Base::m_SimulationName
string m_SimulationName
stores the simulation name
Definition: PopulationManager.h:622
Population_Manager_Base::SupplySimW
int SupplySimW() const
Returns landscape width in m.
Definition: PopulationManager.h:567
March
const int March
Julian start dates of the month of March.
Definition: Landscape.h:42
Population_Manager::SupplyListIndexSize
virtual unsigned SupplyListIndexSize()
Definition: PopulationManager.h:725
Population_Manager::m_NoProbes
int m_NoProbes
Definition: PopulationManager.h:787
Population_Manager::DoSpecialBetweenLifeStages
virtual void DoSpecialBetweenLifeStages(int a_life_stage)
Definition: PopulationManager.h:829
Population_Manager::TheSubArrayPreviousIndex
vector< int > TheSubArrayPreviousIndex
the animal index number from last time called for SupplyAnimalPtr(), this for fast loop all the anima...
Definition: PopulationManager.h:812
Population_Manager::Debug_Shuffle
void Debug_Shuffle(unsigned int Type)
Probe_Data::m_NoFarms
unsigned m_NoFarms
Definition: PopulationManager.h:436
cfg_PmEventday
CfgInt cfg_PmEventday("PM_EVENTDAY", CFG_CUSTOM, March)
SimpleStatistics::add_variable
void add_variable(double x)
Add a value.
Definition: PopulationManager.h:480
Population_Manager::~Population_Manager
virtual ~Population_Manager(void)
Definition: PopulationManager.cpp:262
Population_Manager::m_guard_cell_size
int m_guard_cell_size
Definition: PopulationManager.h:793
Population_Manager::RipleysOutputPrb8
ofstream * RipleysOutputPrb8
Definition: PopulationManager.h:868
cfg_CfgRipleysOutputUsed
CfgBool cfg_CfgRipleysOutputUsed("G_RIPLEYSOUTPUT_USED", CFG_CUSTOM, false)
TAnimal::SupplyGuardCellY
int SupplyGuardCellY() const
Returns the y-index to the guard cell.
Definition: PopulationManager.h:251
CFG_CUSTOM
Definition: Configurator.h:70
Population_Manager::StepFinished
virtual bool StepFinished()
Methods to run the simulations.
Definition: PopulationManager.cpp:632
TAnimal::CorrectWrapRound
void CorrectWrapRound()
Corrects wrap around co-ordinate problems.
Definition: PopulationManager.h:383
Population_Manager::ProbesSet
bool ProbesSet
Definition: PopulationManager.h:743
Population_Manager_Base::GetAphidDensity
virtual double GetAphidDensity(int, int)
Return the aphid density, it is only used when aphid simulations are running.
Definition: PopulationManager.h:607
Population_Manager::CloseTheReallyBigOutputProbe
virtual void CloseTheReallyBigOutputProbe()
Definition: PopulationManager.cpp:1048
Population_Manager::Shuffle
virtual void Shuffle(unsigned Type)
Definition: PopulationManager.cpp:1229
cfg_PmEventfrequency
CfgInt cfg_PmEventfrequency("PM_EVENTFREQUENCY", CFG_CUSTOM, 999999)
TOP_Oedothorax
Definition: PopulationManager.h:71
IntArray100::n
int n[100]
Definition: PopulationManager.h:105
Population_Manager::PushIndividual
void PushIndividual(const unsigned a_listindex, TAnimal *a_individual_ptr)
Definition: PopulationManager.cpp:1682
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:131
cfg_ReallyBigOutputUsed
CfgBool cfg_ReallyBigOutputUsed("G_REALLYBIGOUTPUT_USED", CFG_CUSTOM, false)
Population_Manager::SupplyListSize
unsigned SupplyListSize(unsigned listindex) const
Definition: PopulationManager.h:726
Population_Manager::Population_Manager
Population_Manager(Landscape *a_l_ptr, int a_numberLifeStages=12)
Definition: PopulationManager.cpp:200
Population_Manager_Base::Run
virtual void Run(int a_NoTSteps)
A place holder for the run function for all population managers, this must be reimplemented in descen...
Definition: PopulationManager.h:575
Landscape::SupplyLastTreatment
int SupplyLastTreatment(int a_polyref, int *a_index)
Returns the last treatment recorded for the polygon.
Definition: Landscape.h:1941
RoeDeerInfo::m_Range
APoint m_Range
Definition: PopulationManager.h:189
Population_Manager::ReallyBigOutputPrb
ofstream * ReallyBigOutputPrb
Definition: PopulationManager.h:873
PopulationManagerList::GetPopulation
Population_Manager_Base * GetPopulation(int a_pt, int a_index=0)
Definition: PopulationManager.h:962
CompareStateR
Function to compare to TAnimal's m_CurrentStateNo.
Definition: PopulationManager.cpp:164
Population_Manager::OpenTheBreedingSuccessProbe
virtual bool OpenTheBreedingSuccessProbe()
Definition: PopulationManager.h:904
TOP_OliveMoth
Definition: PopulationManager.h:72
Population_Manager::TheSubArrays
vector< vector< forward_list< TAnimal * > * > > TheSubArrays
Hold all the animal pointers.
Definition: PopulationManager.h:804
Population_Manager_Base::SupplySimulationName
std::string SupplySimulationName()
Definition: PopulationManager.h:597
Probe_Data::m_RefEle
TTypesOfLandscapeElement m_RefEle[25]
Definition: PopulationManager.h:438
Landscape::Warn
void Warn(std::string a_msg1, std::string a_msg2)
Wrapper for the g_msg Warn function.
Definition: Landscape.h:2250
PopulationManagerList::GetPopulationManagerNum
int GetPopulationManagerNum(int a_pt)
Returns the number of population manager,.
Definition: PopulationManager.h:957
Probe_Data::m_MyFile
ofstream * m_MyFile
Definition: PopulationManager.h:423
SimpleStatistics::get_Total
double get_Total() const
Returns the mean.
Definition: PopulationManager.h:498
TListOfAnimals
vector< TAnimal * > TListOfAnimals
Definition: PopulationManager.h:50
Population_Manager::OpenTheBreedingPairsProbe
virtual bool OpenTheBreedingPairsProbe()
Definition: PopulationManager.h:903
TAnimal::m_Location_x
int m_Location_x
The objects ALMaSS x coordinate.
Definition: PopulationManager.h:362
Population_Manager::GetPopulationSize
unsigned GetPopulationSize(int a_listindex) override
Gets the number of species objects by default it is the same as LiveArray, however it could be differ...
Definition: PopulationManager.h:663
cfg_ProbeMaxAreas
CfgInt cfg_ProbeMaxAreas("PROBE_MAX_AREAS", CFG_CUSTOM, 10, 1, 16)
Population_Manager::LOG
void LOG(const char *fname)
Definition: PopulationManager.cpp:304
Population_Manager::m_guard_cell_height_num
int m_guard_cell_height_num
Definition: PopulationManager.h:791
Population_Manager::TheAOROutputProbe
virtual void TheAOROutputProbe()
Definition: PopulationManager.cpp:1067
Landscape::SupplyPolyRef
int SupplyPolyRef(int a_x, int a_y)
Get the in map polygon reference number from the x, y location.
Definition: Landscape.h:2157
l_pest_enable_pesticide_engine
CfgBool l_pest_enable_pesticide_engine
Used to turn on or off the PPP functionality of ALMaSS.
TAnimal::WhatState
virtual int WhatState()
Returns the objects current state number.
Definition: PopulationManager.h:301
cfg_CatastropheEventStartYear
CfgInt cfg_CatastropheEventStartYear("PM_CATASTROPHEEVENTSTARTYEAR", CFG_CUSTOM, 999999)
Population_Manager::SortY
virtual void SortY(unsigned Type)
Definition: PopulationManager.cpp:1147
TOP_Erigone
Definition: PopulationManager.h:61
SimpleStatistics::ClearData
void ClearData()
Clears the data.
Definition: PopulationManager.h:537
cfg_AorOutput_day
CfgInt cfg_AorOutput_day("G_AOROUTPUT_DAY", CFG_CUSTOM, 60)
cfg_AorOutputFirstYear
CfgInt cfg_AorOutputFirstYear("G_AOROUTPUT_FIRSTYEAR", CFG_CUSTOM, 1)
toBSA_SortY
Definition: PopulationManager.h:93
Probe_Data::SetFile
void SetFile(ofstream *F)
Definition: PopulationManager.cpp:1680
Population_Manager_Base::SupplyAnimalPtr
virtual TAnimal * SupplyAnimalPtr(unsigned int a_index, unsigned int a_animal)
Return the animal pointer for the give life stage and number.
Definition: PopulationManager.h:609
TALMaSSObject::TALMaSSObject
TALMaSSObject()
The constructor for TALMaSSObject.
Definition: PopulationManager.cpp:1578
TALMaSSObject::ReinitialiseObjectBase
void ReinitialiseObjectBase()
Used to initialise an object.
Definition: PopulationManager.h:154
Population_Manager::m_LiveArraySize
vector< unsigned > m_LiveArraySize
Definition: PopulationManager.h:786
Population_Manager::RipleysOutputPrb10
ofstream * RipleysOutputPrb10
Definition: PopulationManager.h:870
Population_Manager::LamdaDeath
void LamdaDeath(int x, int y)
Definition: PopulationManager.h:879
TAnimal::SetGuardMapIndex
void SetGuardMapIndex(int a_index_x, int a_index_y)
Set the guard map index, this is used to avoid two animals operating in the same location when using ...
Definition: PopulationManager.h:207
None_Population_Manager
A class for running simulations without animals.
Definition: PopulationManager.h:932
Population_Manager::Catastrophe
virtual void Catastrophe()
Definition: PopulationManager.cpp:1289
sleep_all_day
Definition: Treatment.h:33
TAnimal::SetOurLandscape
static void SetOurLandscape(Landscape *a_value)
Sets the landscape pointer.
Definition: PopulationManager.h:333
g_generator
std::mt19937 g_generator
Population_Manager_Base::SetNoProbesAndSpeciesSpecificFunctions
virtual void SetNoProbesAndSpeciesSpecificFunctions(int)
A stub to build specfic probes and functions.
Definition: PopulationManager.h:581
Population_Manager::DoAfter
virtual void DoAfter()
Definition: PopulationManager.cpp:648
AnimalPosition::m_VegType
TTypesOfVegetation m_VegType
Definition: PopulationManager.h:176
Population_Manager::IncLiveArraySize
void IncLiveArraySize(int a_listindex)
Increments the number of 'live' objects for a list index in the TheArray.
Definition: PopulationManager.h:665