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.cpp File Reference

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
 

Detailed Description

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.

Variable Documentation

◆ cfg_AorOutput_day

CfgInt cfg_AorOutput_day("G_AOROUTPUT_DAY", CFG_CUSTOM, 60)

Referenced by Population_Manager::Run().

◆ cfg_AorOutput_interval

CfgInt cfg_AorOutput_interval("G_AORSOUTPUT_INTERVAL", CFG_CUSTOM, 1)

Referenced by Population_Manager::Run().

◆ cfg_AorOutput_used

CfgBool cfg_AorOutput_used("G_AOROUTPUT_USED", CFG_CUSTOM, false)

◆ cfg_AorOutputFirstYear

CfgInt cfg_AorOutputFirstYear("G_AOROUTPUT_FIRSTYEAR", CFG_CUSTOM, 1)

Referenced by Population_Manager::Run().

◆ cfg_CatastropheEventStartYear

CfgInt cfg_CatastropheEventStartYear("PM_CATASTROPHEEVENTSTARTYEAR", CFG_CUSTOM, 999999)

◆ cfg_CfgRipleysOutputUsed

◆ cfg_DayInMonth

CfgInt cfg_DayInMonth("PRB_DAYINMONTH", CFG_CUSTOM, 1)
static

◆ cfg_Fixed_random_sequence

CfgBool cfg_Fixed_random_sequence("G_FIXEDRANDOMSEQUENCE", CFG_CUSTOM, false)

Referenced by g_init_random_seed_fnc().

◆ cfg_FixedRandomSeed

CfgInt cfg_FixedRandomSeed("G_FIXEDRANDOMSEED", CFG_CUSTOM, 0)

Referenced by g_init_random_seed_fnc().

◆ cfg_MapGuardCellSize

CfgInt cfg_MapGuardCellSize("MAP_GUARD_CELL_SIZE", CFG_CUSTOM, 20)

◆ cfg_PmEventday

CfgInt cfg_PmEventday("PM_EVENTDAY", CFG_CUSTOM, March)

◆ cfg_PmEventfrequency

◆ cfg_PmEventsize

◆ cfg_ProbeMaxAreas

CfgInt cfg_ProbeMaxAreas("PROBE_MAX_AREAS", CFG_CUSTOM, 10, 1, 16)

◆ cfg_ProbeTargetTypesNo

CfgInt cfg_ProbeTargetTypesNo("PROBE_TARGET_TYPES_NO", CFG_CUSTOM, 10, 1, 16)

◆ cfg_ReallyBigOutput_day1

CfgInt cfg_ReallyBigOutput_day1("G_REALLYBIGOUTPUT_DAY_ONE", CFG_CUSTOM, 1)

Referenced by Population_Manager::Run().

◆ cfg_ReallyBigOutput_day2

CfgInt cfg_ReallyBigOutput_day2("G_REALLYBIGOUTPUT_DAY_TWO", CFG_CUSTOM, 91)

Referenced by Population_Manager::Run().

◆ cfg_ReallyBigOutput_day3

CfgInt cfg_ReallyBigOutput_day3("G_REALLYBIGOUTPUT_DAY_THREE", CFG_CUSTOM, 182)

Referenced by Population_Manager::Run().

◆ cfg_ReallyBigOutput_day4

CfgInt cfg_ReallyBigOutput_day4("G_REALLYBIGOUTPUT_DAY_FOUR", CFG_CUSTOM, 274)

Referenced by Population_Manager::Run().

◆ cfg_ReallyBigOutput_filename

CfgStr cfg_ReallyBigOutput_filename("G_REALLYBIGOUTPUT_FILENAME", CFG_CUSTOM, "ReallyBigOutput.txt")
static

◆ cfg_ReallyBigOutput_interval

CfgInt cfg_ReallyBigOutput_interval("G_REALLYBIGOUTPUT_INTERVAL", CFG_CUSTOM, 1)

Referenced by Population_Manager::Run().

◆ cfg_ReallyBigOutputFirstYear

CfgInt cfg_ReallyBigOutputFirstYear("G_REALLYBIGOUTPUT_FIRSTYEAR", CFG_CUSTOM, 1)

Referenced by Population_Manager::Run().

◆ cfg_ReallyBigOutputUsed

CfgBool cfg_ReallyBigOutputUsed("G_REALLYBIGOUTPUT_USED", CFG_CUSTOM, false)

◆ cfg_RipleysOutput_day

CfgInt cfg_RipleysOutput_day("G_RIPLEYSOUTPUT_DAY", CFG_CUSTOM, 60)

Referenced by Population_Manager::Run().

◆ cfg_RipleysOutput_filename

CfgStr cfg_RipleysOutput_filename("G_RIPLEYSOUTPUT_FILENAME", CFG_CUSTOM, "RipleysOutput.txt")
static

◆ cfg_RipleysOutput_interval

CfgInt cfg_RipleysOutput_interval("G_RIPLEYSOUTPUT_INTERVAL", CFG_CUSTOM, 1)

Referenced by Population_Manager::Run().

◆ cfg_RipleysOutputFirstYear

CfgInt cfg_RipleysOutputFirstYear("G_RIPLEYSOUTPUT_FIRSTYEAR", CFG_CUSTOM, 1)

Referenced by Population_Manager::Run().

◆ cfg_RipleysOutputMonthly_used

CfgBool cfg_RipleysOutputMonthly_used("G_RIPLEYSOUTPUTMONTHLY_USED", CFG_CUSTOM, false)

◆ g_generator

std::mt19937 g_generator

◆ g_Species

◆ g_Str

◆ g_thread_count

int g_thread_count = 1

\This is the global variable to store the number of threads

Referenced by Population_Manager::Population_Manager().