![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
VolePopulationManager.cpp This file contains the source for the vole population manager class
More...
#include <cstring>
#include <vector>
#include <iostream>
#include <fstream>
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../BatchALMaSS/AOR_Probe.h"
#include "../BatchALMaSS/BinaryMapBase.h"
#include "../BatchALMaSS/MovementMap.h"
#include "../Vole/vole_all.h"
#include "../Vole/VolePopulationManager.h"
#include "../Vole/GeneticMaterial.h"
#include "../Vole/Vole_toletoc.h"
Variables | |
double | MutationChance |
CfgInt | cfg_CatastropheEventStartYear |
CfgInt | cfg_PmEventfrequency |
CfgInt | cfg_PmEventsize |
CfgBool | cfg_ReallyBigOutputMonthly_used |
CfgBool | cfg_CfgRipleysOutputUsed |
CfgBool | cfg_ReallyBigOutputUsed |
CfgFloat | cfg_extradispmort |
Input parameter for daily extra mortality chance while dispersing. More... | |
double | g_extradispmort |
double | g_DailyMortChance |
double | g_DailyMortChanceMaleTerr |
double | g_NoFemalesMove |
CfgInt | cfg_VoleDDepConst |
int | g_sigAgeDiff |
int | MinReproAgeM |
int | MinReproAgeF |
CfgInt | cfg_MinReproAgeM |
CfgInt | cfg_MinReproAgeF |
unsigned char | g_MaxAllele |
static CfgInt | cfg_vole_reprofinishdate ("VOLE_REPROFINISHDATE", CFG_CUSTOM, 243) |
static CfgBool | cfg_VoleSampleDataUsed ("VOLE_SAMPLE_FILE_USED", CFG_CUSTOM, false) |
static CfgInt | cfg_VoleSampleFileDayOne ("VOLE_SAMPLE_FILE_DAY_ONE", CFG_CUSTOM, 109) |
static CfgInt | cfg_VoleSampleFileDayTwo ("VOLE_SAMPLE_FILE_DAY_TWO", CFG_CUSTOM, 287) |
static CfgFloat | cfg_VoleFemaleMove ("VOLE_FEMALEMOVE", CFG_CUSTOM, 0.0505) |
static CfgInt | cfg_MateRadius ("FEMALE_MATE_RADIUS", CFG_CUSTOM, 250) |
static CfgFloat | cfg_VoleBackgroundMort ("VOLE_BCKMORT", CFG_CUSTOM, 0.0025) |
static CfgFloat | cfg_MoveToLessFavourable ("VOLEMOVETOLESSFAVOURALBLE", CFG_CUSTOM, 0.005) |
static CfgInt | cfg_sigAgeDiff ("VOLE_SIGAGEDIFF", CFG_CUSTOM, 30) |
static CfgInt | cfg_geneticproductfertilityeffect ("VOLE_GENETICPRODUCTFERTILITYEFFECT", CFG_CUSTOM, 50) |
static CfgFloat | cfg_geneticsterilitychance ("VOLE_GENETICSTERILITYCHANCE", CFG_CUSTOM, 0) |
static CfgFloat | cfg_f1sterilitychance ("VOLE_FONESTERILITYCHANCE", CFG_CUSTOM, 0.0) |
static CfgBool | cfg_genetic_output ("VOLE_GENETIC_OUTPUT", CFG_CUSTOM, true) |
static CfgInt | cfg_genetetic_output_sample_size ("VOLE_GENETIC_SAMPLE_SIZE", CFG_CUSTOM, 500) |
static CfgInt | cfg_GeneticsResultOutputFirstYear ("GENETICS_RESULT_OUTPUT_FIRST_YEAR", CFG_CUSTOM, 100000) |
static CfgInt | cfg_GeneticResultOutputSecondYear ("GENETICS_RESULT_OUTPUT_SECOND_YEAR", CFG_CUSTOM, 100000) |
CfgBool | cfg_GeneticsResultOutputUsed ("GENETICS_RESULT_OUTPUT_USED", CFG_CUSTOM, false) |
static CfgInt | cfg_GeneticsResultOutputInterval_1 ("GENETICS_RESULT_OUTPUT_INTERVAL_ONE", CFG_CUSTOM, 100000) |
static CfgInt | cfg_GeneticsResultOutputDay_1 ("GENETICS_RESULT_OUTPUT_DAY_ONE", CFG_CUSTOM, 3) |
static CfgInt | cfg_GeneticsResultOutputDay_2 ("GENETICS_RESULT_OUTPUT_DAY_TWO", CFG_CUSTOM, 6) |
static CfgBool | cfg_VoleUseResistanceOuput ("VOLE_RESISTANCEOUTPUT_ON_OFF", CFG_CUSTOM, false) |
static CfgInt | cfg_VoleResistanceDay ("VOLE_RESISTANCEOUTPUT_DAY", CFG_CUSTOM, 365) |
static CfgFloat | cfg_ResistanceStartFrequency ("VOLE_RESISTANCESTARTFREQ", CFG_CUSTOM, 0.01) |
static CfgBool | cfg_UseVoleTraplines ("VOLE_TRAPLINES_ON_OFF", CFG_CUSTOM, false) |
static CfgStr | cfg_VoleTraplinesfile ("VOLE_TRAPLINESFILE", CFG_CUSTOM, "VoleTraplines.txt") |
static CfgInt | cfg_VoleTrapResolution ("VOLE_TRAPRESOLUTION", CFG_CUSTOM, 2) |
CfgBool | cfg_RecordVoleMort ("VOLE_RECORDMORT_ON", CFG_CUSTOM, false) |
static CfgStr | cfg_VoleRecordMortFile ("VOLE_RECORDMORTFILE", CFG_CUSTOM, "VoleMortalityCauses.txt") |
CfgBool | cfg_SexRatiosOutput_used ("VOLE_SEXRATIOSOUTPUT_USED", CFG_CUSTOM, false) |
static CfgStr | cfg_SexRatiosOutput_filename ("VOLE_SEXRATIOS_FILENAME", CFG_CUSTOM, "VoleSexRatios.txt") |
static CfgInt | cfg_SexRatiosOutput_interval ("VOLE_SEXRATIOSOUTPUT_INTERVAL", CFG_CUSTOM, 1) |
static CfgInt | cfg_SexRatiosOutput_day ("VOLE_SEXRATIOSOUTPUT_DAY", CFG_CUSTOM, -1) |
static CfgInt | cfg_SexRatiosOutputFirstYear ("VOLE_SEXRATIOSOUTPUT_FIRSTYEAR", CFG_CUSTOM, 1) |
static CfgBool | cfg_voleLandscapeGridOutputUsed ("VOLE_LANDSCAPEGRIDOUTPUTUSED", CFG_CUSTOM, true) |
static CfgInt | cfg_voleLandscapeGridOutputDay ("VOLE_LANDSCAPEGRIDOUTPUTDAY", CFG_CUSTOM, 10000) |
static CfgBool | cfg_volestartinoptimalonly ("VOLE_STARTINOPTIMALONLY", CFG_CUSTOM, false) |
double | MoveToLessFavourable |
static CfgInt | cfg_vole_starting_numberM ("VOLE_START_NO_M", CFG_CUSTOM, 5000) |
static CfgInt | cfg_vole_starting_numberF ("VOLE_START_NO_F", CFG_CUSTOM, 5000) |
static CfgFloat | cfg_GrassStartGrowth ("VOLE_GRASSSTARTGROWTH", CFG_CUSTOM, 3.552) |
static CfgFloat | cfg_GrassStartGrowthDay ("VOLE_GRASSSTARTGROWTHDAY", CFG_CUSTOM, 80) |
static CfgBool | cfg_useagesexlocation ("VOLE_USEAGESEXLOCATION", CFG_CUSTOM, false) |
const float | ReproTable_base [2][12] |
static CfgFloat | cfg_MutationChance ("GENETICS_MUTATION_CHANCE", CFG_CUSTOM, 0.001) |
static CfgInt | cfg_MaxAllele ("GENETICS_MAXALLELE", CFG_CUSTOM, 255) |
int | g_MaleReproductFinish |
CfgInt | cfg_MinFemaleTerritorySize |
CfgInt | cfg_MinMaleTerritorySize |
CfgBool | cfg_ResistanceDominant |
VolePopulationManager.cpp This file contains the source for the vole population manager class
by Chris J. Topping
Version of 28th Jan 2001
With additions as noted in:
April 2006
November 2007
Doxygen formatted comments in May 2008
CfgInt cfg_CatastropheEventStartYear |
The first year for catastrophes
Referenced by Vole_Population_Manager::Catastrophe().
CfgBool cfg_CfgRipleysOutputUsed |
Referenced by Vole_Population_Manager::Init().
CfgFloat cfg_extradispmort |
Input parameter for daily extra mortality chance while dispersing.
Extra mortality for dispersing individuals
Referenced by Vole_Population_Manager::DoFirst(), and Vole_Population_Manager::Init().
|
static |
Toxicological variable for specific pesticide effects
Referenced by Vole_Population_Manager::Init().
|
static |
The number of each sex to sample for genetics
Referenced by Vole_Population_Manager::DoFirst().
|
static |
Record genetic data or not
|
static |
Toxicological variable for specific pesticide effects
Referenced by Vole_Population_Manager::Init().
|
static |
|
static |
|
static |
|
static |
Referenced by Vole_Population_Manager::DoFirst().
|
static |
Referenced by Vole_Population_Manager::DoFirst().
CfgBool cfg_GeneticsResultOutputUsed("GENETICS_RESULT_OUTPUT_USED", CFG_CUSTOM, false) |
|
static |
Toxicological variable for specific pesticide effects
Referenced by Vole_Population_Manager::Init().
|
static |
The mean temperature over 14 days at which the grass is assummed to start to grow
Referenced by Vole_Population_Manager::DoFirst().
|
static |
The date before which repro is impossible
Referenced by Vole_Population_Manager::DoFirst().
|
static |
|
static |
The maximum allele value used
Referenced by Vole_Population_Manager::Init().
CfgInt cfg_MinFemaleTerritorySize |
Minimum territory size for females
Referenced by Vole_Base::Init().
CfgInt cfg_MinMaleTerritorySize |
Minimum territory size for males
Referenced by Vole_Base::Init().
CfgInt cfg_MinReproAgeF |
Referenced by Vole_Population_Manager::Init().
CfgInt cfg_MinReproAgeM |
Referenced by Vole_Population_Manager::Init().
|
static |
The probability of moving to less favourable habitats when walking
Referenced by Vole_Population_Manager::Init().
|
static |
Mutation probability
Referenced by Vole_Population_Manager::Init().
CfgInt cfg_PmEventfrequency |
The frequency of catastrophes
Referenced by Vole_Population_Manager::Catastrophe().
CfgInt cfg_PmEventsize |
The size of catastrophes
Referenced by Vole_Population_Manager::Catastrophe().
CfgBool cfg_ReallyBigOutputMonthly_used |
Raw data for spatial output for calculating Ripley's spatial statistics
CfgBool cfg_ReallyBigOutputUsed |
Raw data for spatial output for calculating Ripley's spatial statistics with additional information about habitat and physiology
Referenced by Vole_Population_Manager::Init().
CfgBool cfg_RecordVoleMort("VOLE_RECORDMORT_ON", CFG_CUSTOM, false) |
Referenced by Vole_JuvenileMale::BeginStep(), Vole_JuvenileFemale::BeginStep(), Vole_JuvenileMale::Dispersal(), Vole_Male::Dispersal(), Vole_JuvenileFemale::Dispersal(), Vole_Population_Manager::DoFirst(), Vole_Male::EndStep(), Vole_JuvenileFemale::EndStep(), Vole_Population_Manager::Init(), Vole_JuvenileMale::OnFarmEvent(), Vole_JuvenileFemale::OnFarmEvent(), Vole_JuvenileMale::OnKilled(), Vole_JuvenileFemale::OnKilled(), Vole_JuvenileFemale::Step(), Vole_Female::Step(), and Vole_Population_Manager::~Vole_Population_Manager().
CfgBool cfg_ResistanceDominant |
Referenced by Vole_Population_Manager::ResistanceOutput().
|
static |
The starting frequency of '1' in chromosome 0 locus no 3
Referenced by Vole_Population_Manager::Init().
|
static |
Referenced by Vole_Population_Manager::DoFirst().
|
static |
Referenced by Vole_Population_Manager::OpenSexRatiosProbe().
|
static |
Referenced by Vole_Population_Manager::DoFirst().
CfgBool cfg_SexRatiosOutput_used("VOLE_SEXRATIOSOUTPUT_USED", CFG_CUSTOM, false) |
|
static |
Referenced by Vole_Population_Manager::DoFirst().
|
static |
The age difference before an old male can oust a younger one
Referenced by Vole_Population_Manager::Init().
|
static |
Special output file toggle
Referenced by Vole_Population_Manager::DoFirst(), Vole_Population_Manager::Init(), and Vole_Population_Manager::~Vole_Population_Manager().
|
static |
|
static |
Referenced by Vole_Population_Manager::Init().
|
static |
How many female voles to start with
Referenced by Vole_Population_Manager::Init().
|
static |
How many male voles to start with
Referenced by Vole_Population_Manager::Init().
|
static |
The unspecified background mortality rate
Referenced by Vole_Population_Manager::DoFirst(), and Vole_Population_Manager::Init().
CfgInt cfg_VoleDDepConst |
Minimum territory size for males from Erlinge et al 1990
Referenced by Vole_Male::CanFeed(), Vole_JuvenileMale::Dispersal(), Vole_Male::Dispersal(), Vole_JuvenileFemale::Dispersal(), Vole_JuvenileMale::st_Eval_n_Explore(), Vole_JuvenileFemale::st_Evaluate_n_Explore(), Vole_Female::st_Evaluate_n_Explore(), and Vole_Female::st_Special_Explore().
|
static |
Referenced by Vole_Population_Manager::Init().
|
static |
Referenced by Vole_Population_Manager::DoFirst().
|
static |
Referenced by Vole_Population_Manager::Init().
|
static |
Referenced by Vole_Population_Manager::Init().
|
static |
The day in the year to output the resitance gene frequency
Referenced by Vole_Population_Manager::DoFirst().
|
static |
|
static |
|
static |
|
static |
Referenced by Vole_Population_Manager::SuitableStartingLocation().
|
static |
Referenced by Vole_Population_Manager::Init().
|
static |
Referenced by Vole_Population_Manager::Init().
|
static |
Flag turning resistance output on or off
Referenced by Vole_Population_Manager::DoFirst(), Vole_Population_Manager::Init(), and Vole_Population_Manager::~Vole_Population_Manager().
double g_DailyMortChance |
risk of daily mortality
Mortality per day as a background mortality encompassing all things not directly modelled. This may include specialist predators if they are not simulated - if they are then reduce this value
Referenced by Vole_Population_Manager::DoFirst(), Vole_Population_Manager::Init(), Vole_Base::MortalityTest(), and Vole_Male::MortalityTest().
double g_DailyMortChanceMaleTerr |
Referenced by Vole_Population_Manager::DoFirst(), and Vole_Male::MortalityTest().
double g_extradispmort |
int g_MaleReproductFinish |
1/10 deduced from Erlinge et al, 1983
Referenced by Vole_Population_Manager::DoFirst(), and Vole_Population_Manager::Init().
unsigned char g_MaxAllele |
Referenced by Vole_Population_Manager::Init(), and GeneticMaterial256_16::Mutation_3().
double g_NoFemalesMove |
int g_sigAgeDiff |
Age difference required before eviction by older male
Referenced by Vole_Population_Manager::Init(), and Vole_Population_Manager::SupplyInOlderTerr().
int MinReproAgeF |
The youngest a female can be reproductive at.
Referenced by Vole_Population_Manager::Init(), Vole_Female::ReInit(), Vole_Female::st_BecomeReproductive(), Vole_JuvenileFemale::Step(), and Vole_Female::Vole_Female().
int MinReproAgeM |
The youngest a male can be reproductive at.
Referenced by Vole_JuvenileMale::EndStep(), and Vole_Population_Manager::Init().
double MoveToLessFavourable |
This is specified as a global because it avoids costing time on look-ups.
This is needed because of the extreme CPU intensive movement functions
Referenced by Vole_Base::DoWalking(), Vole_Base::DoWalkingCorrect(), and Vole_Population_Manager::Init().
double MutationChance |
Referenced by Vole_Population_Manager::Init(), GeneticMaterial::Mutation_1(), GeneticMaterial1616::Mutation_1(), GeneticMaterial::Mutation_1ab(), GeneticMaterial::Mutation_2(), GeneticMaterial1616::Mutation_2(), GeneticMaterial::Mutation_3(), GeneticMaterial1616::Mutation_3(), GeneticMaterial256_16::Mutation_3(), and GeneticMaterial::Mutation_4().
const float ReproTable_base[2][12] |
Litter sizes dependent upon month and year
Referenced by Vole_Population_Manager::Init().