![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
PopulationManager.cpp This is the code file for the population manager and associated classes
More...
#include <vector>
#include <algorithm>
#include <fstream>
#include <string>
#include <numeric>
#include <random>
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../People/Hunters/Hunters_all.h"
#include "../GooseManagement/Goose_Population_Manager.h"
#include "AOR_Probe.h"
Classes | |
class | CompareX |
Function to compare to TAnimal's m_Location_x. More... | |
class | CompareY |
class | CompareStateAlive |
Function to compare to TAnimal's m_CurrentStateNo to anything but -1. More... | |
class | CompareState |
Function to compare to TAnimal's Current behavioural state. More... | |
class | CompareStateR |
Function to compare to TAnimal's m_CurrentStateNo. More... | |
class | CompareStateDead |
Function to compare to TAnimal's m_CurrentStateNo to -1. More... | |
Variables | |
CfgInt | cfg_ProbeMaxAreas ("PROBE_MAX_AREAS", CFG_CUSTOM, 10, 1, 16) |
CfgInt | cfg_ProbeTargetTypesNo ("PROBE_TARGET_TYPES_NO", CFG_CUSTOM, 10, 1, 16) |
static CfgStr | cfg_RipleysOutput_filename ("G_RIPLEYSOUTPUT_FILENAME", CFG_CUSTOM, "RipleysOutput.txt") |
static CfgStr | cfg_ReallyBigOutput_filename ("G_REALLYBIGOUTPUT_FILENAME", CFG_CUSTOM, "ReallyBigOutput.txt") |
CfgBool | cfg_RipleysOutputMonthly_used ("G_RIPLEYSOUTPUTMONTHLY_USED", CFG_CUSTOM, false) |
CfgBool | cfg_CfgRipleysOutputUsed ("G_RIPLEYSOUTPUT_USED", CFG_CUSTOM, false) |
CfgBool | cfg_AorOutput_used ("G_AOROUTPUT_USED", CFG_CUSTOM, false) |
CfgBool | cfg_ReallyBigOutputUsed ("G_REALLYBIGOUTPUT_USED", CFG_CUSTOM, false) |
CfgBool | cfg_Fixed_random_sequence ("G_FIXEDRANDOMSEQUENCE", CFG_CUSTOM, false) |
CfgInt | cfg_AorOutput_interval ("G_AORSOUTPUT_INTERVAL", CFG_CUSTOM, 1) |
CfgInt | cfg_AorOutput_day ("G_AOROUTPUT_DAY", CFG_CUSTOM, 60) |
CfgInt | cfg_AorOutputFirstYear ("G_AOROUTPUT_FIRSTYEAR", CFG_CUSTOM, 1) |
CfgInt | cfg_RipleysOutput_interval ("G_RIPLEYSOUTPUT_INTERVAL", CFG_CUSTOM, 1) |
CfgInt | cfg_RipleysOutput_day ("G_RIPLEYSOUTPUT_DAY", CFG_CUSTOM, 60) |
CfgInt | cfg_RipleysOutputFirstYear ("G_RIPLEYSOUTPUT_FIRSTYEAR", CFG_CUSTOM, 1) |
CfgInt | cfg_ReallyBigOutput_interval ("G_REALLYBIGOUTPUT_INTERVAL", CFG_CUSTOM, 1) |
CfgInt | cfg_ReallyBigOutput_day1 ("G_REALLYBIGOUTPUT_DAY_ONE", CFG_CUSTOM, 1) |
CfgInt | cfg_ReallyBigOutput_day2 ("G_REALLYBIGOUTPUT_DAY_TWO", CFG_CUSTOM, 91) |
CfgInt | cfg_ReallyBigOutput_day3 ("G_REALLYBIGOUTPUT_DAY_THREE", CFG_CUSTOM, 182) |
CfgInt | cfg_ReallyBigOutput_day4 ("G_REALLYBIGOUTPUT_DAY_FOUR", CFG_CUSTOM, 274) |
CfgInt | cfg_ReallyBigOutputFirstYear ("G_REALLYBIGOUTPUT_FIRSTYEAR", CFG_CUSTOM, 1) |
CfgInt | cfg_FixedRandomSeed ("G_FIXEDRANDOMSEED", CFG_CUSTOM, 0) |
CfgInt | cfg_CatastropheEventStartYear ("PM_CATASTROPHEEVENTSTARTYEAR", CFG_CUSTOM, 999999) |
CfgInt | cfg_PmEventfrequency ("PM_EVENTFREQUENCY", CFG_CUSTOM, 999999) |
CfgInt | cfg_PmEventday ("PM_EVENTDAY", CFG_CUSTOM, March) |
CfgInt | cfg_PmEventsize ("PM_EVENTSIZE", CFG_CUSTOM, 100) |
static CfgInt | cfg_DayInMonth ("PRB_DAYINMONTH", CFG_CUSTOM, 1) |
CfgInt | cfg_MapGuardCellSize ("MAP_GUARD_CELL_SIZE", CFG_CUSTOM, 20) |
The size to create the map guard. More... | |
std::mt19937 | g_generator |
char | g_Str [255] |
TTypesOfPopulation | g_Species |
int | g_thread_count = 1 |
PopulationManager.cpp This is the code file for the population manager and associated classes
by Chris J. Topping and Xiaodong Duan
Version of Feb. 2024
All rights reserved.
CfgInt cfg_AorOutput_day("G_AOROUTPUT_DAY", CFG_CUSTOM, 60) |
Referenced by Population_Manager::Run().
CfgInt cfg_AorOutput_interval("G_AORSOUTPUT_INTERVAL", CFG_CUSTOM, 1) |
Referenced by Population_Manager::Run().
CfgBool cfg_AorOutput_used("G_AOROUTPUT_USED", CFG_CUSTOM, false) |
Referenced by Population_Manager::Run(), SetOutputFiles(), and Population_Manager::~Population_Manager().
CfgInt cfg_AorOutputFirstYear("G_AOROUTPUT_FIRSTYEAR", CFG_CUSTOM, 1) |
Referenced by Population_Manager::Run().
CfgInt cfg_CatastropheEventStartYear("PM_CATASTROPHEEVENTSTARTYEAR", CFG_CUSTOM, 999999) |
The first year for catastrophes
Referenced by Vole_Population_Manager::Catastrophe(), Skylark_Population_Manager::Catastrophe(), THare_Population_Manager::Catastrophe(), Beetle_Population_Manager::Catastrophe(), and Beetle_Population_Manager::Catastrophe2().
CfgBool cfg_CfgRipleysOutputUsed("G_RIPLEYSOUTPUT_USED", CFG_CUSTOM, false) |
|
static |
Referenced by Population_Manager::BeginningOfMonth().
CfgBool cfg_Fixed_random_sequence("G_FIXEDRANDOMSEQUENCE", CFG_CUSTOM, false) |
Referenced by g_init_random_seed_fnc().
CfgInt cfg_FixedRandomSeed("G_FIXEDRANDOMSEED", CFG_CUSTOM, 0) |
Referenced by g_init_random_seed_fnc().
CfgInt cfg_MapGuardCellSize("MAP_GUARD_CELL_SIZE", CFG_CUSTOM, 20) |
The size to create the map guard.
Referenced by Beetle_Egg_List::DailyMortality(), Beetle_Egg_List::ExtremeTempMortality(), Population_Manager::Population_Manager(), Beetle_Egg_List::St_Hatch(), and TAnimal::TAnimal().
Referenced by Beetle_Population_Manager::Catastrophe2().
CfgInt cfg_PmEventfrequency("PM_EVENTFREQUENCY", CFG_CUSTOM, 999999) |
The frequency of catastrophes
Referenced by Erigone_Population_Manager::Catastrophe(), Oedothorax_Population_Manager::Catastrophe(), Vole_Population_Manager::Catastrophe(), Skylark_Population_Manager::Catastrophe(), THare_Population_Manager::Catastrophe(), Beetle_Population_Manager::Catastrophe(), and Beetle_Population_Manager::Catastrophe2().
CfgInt cfg_PmEventsize("PM_EVENTSIZE", CFG_CUSTOM, 100) |
The size of catastrophes
Referenced by Erigone_Population_Manager::Catastrophe(), Oedothorax_Population_Manager::Catastrophe(), Vole_Population_Manager::Catastrophe(), Skylark_Population_Manager::Catastrophe(), THare_Population_Manager::Catastrophe(), Beetle_Population_Manager::Catastrophe(), and Beetle_Population_Manager::Catastrophe2().
CfgInt cfg_ProbeMaxAreas("PROBE_MAX_AREAS", CFG_CUSTOM, 10, 1, 16) |
Referenced by Population_Manager_Base::ProbeFileInput().
CfgInt cfg_ProbeTargetTypesNo("PROBE_TARGET_TYPES_NO", CFG_CUSTOM, 10, 1, 16) |
Referenced by Population_Manager_Base::ProbeFileInput().
CfgInt cfg_ReallyBigOutput_day1("G_REALLYBIGOUTPUT_DAY_ONE", CFG_CUSTOM, 1) |
Referenced by Population_Manager::Run().
CfgInt cfg_ReallyBigOutput_day2("G_REALLYBIGOUTPUT_DAY_TWO", CFG_CUSTOM, 91) |
Referenced by Population_Manager::Run().
CfgInt cfg_ReallyBigOutput_day3("G_REALLYBIGOUTPUT_DAY_THREE", CFG_CUSTOM, 182) |
Referenced by Population_Manager::Run().
CfgInt cfg_ReallyBigOutput_day4("G_REALLYBIGOUTPUT_DAY_FOUR", CFG_CUSTOM, 274) |
Referenced by Population_Manager::Run().
|
static |
Referenced by Population_Manager::OpenTheReallyBigProbe().
CfgInt cfg_ReallyBigOutput_interval("G_REALLYBIGOUTPUT_INTERVAL", CFG_CUSTOM, 1) |
Referenced by Population_Manager::Run().
CfgInt cfg_ReallyBigOutputFirstYear("G_REALLYBIGOUTPUT_FIRSTYEAR", CFG_CUSTOM, 1) |
Referenced by Population_Manager::Run().
CfgBool cfg_ReallyBigOutputUsed("G_REALLYBIGOUTPUT_USED", CFG_CUSTOM, false) |
Raw data for spatial output for calculating Ripley's spatial statistics with additional information about habitat and physiology
Referenced by Beetle_Population_Manager::Beetle_Population_Manager(), Erigone_Population_Manager::Init(), Oedothorax_Population_Manager::Init(), Vole_Population_Manager::Init(), Skylark_Population_Manager::Init(), THare_Population_Manager::Init(), Population_Manager::Run(), and Population_Manager::~Population_Manager().
CfgInt cfg_RipleysOutput_day("G_RIPLEYSOUTPUT_DAY", CFG_CUSTOM, 60) |
Referenced by Population_Manager::Run().
|
static |
CfgInt cfg_RipleysOutput_interval("G_RIPLEYSOUTPUT_INTERVAL", CFG_CUSTOM, 1) |
Referenced by Population_Manager::Run().
CfgInt cfg_RipleysOutputFirstYear("G_RIPLEYSOUTPUT_FIRSTYEAR", CFG_CUSTOM, 1) |
Referenced by Population_Manager::Run().
CfgBool cfg_RipleysOutputMonthly_used("G_RIPLEYSOUTPUTMONTHLY_USED", CFG_CUSTOM, false) |
std::mt19937 g_generator |
TTypesOfPopulation g_Species |
Referenced by Crop::AphidDamage(), CreatePopulationManager(), main(), PollenNectarDevelopmentData::PollenNectarDevelopmentData(), ReadBatchINI(), RunTheSim(), SubPopulation_Population_Manager::SetNoProbesAndSpeciesSpecificFunctions(), and Population_Manager::SetNoProbesAndSpeciesSpecificFunctions().
char g_Str[255] |
int g_thread_count = 1 |
\This is the global variable to store the number of threads
Referenced by Population_Manager::Population_Manager().