ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
This file contains the code for all vole lifestage classes
More...
#include <iostream>
#include <fstream>
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../BatchALMaSS/BinaryMapBase.h"
#include "../BatchALMaSS/MovementMap.h"
#include "../Vole/vole_all.h"
#include "../Vole/VolePopulationManager.h"
#include "../Vole/GeneticMaterial.h"
#include "../Vole/Predators.h"
#include "../Vole/Vole_toletoc.h"
Macros | |
#define | _CRT_SECURE_NO_DEPRECATE |
Variables | |
CfgBool | cfg_RecordVoleMort |
CfgFloat | l_pest_daily_mort |
Daily mortality of pesticide with type 1. More... | |
CfgFloat | cfg_extradispmort ("VOLEDISPMORT", CFG_CUSTOM, 0.055) |
Input parameter for daily extra mortality chance while dispersing. More... | |
CfgFloat | cfg_VoleResourceRegrowth ("VOLE_RESOURCEREGROWTH", CFG_CUSTOM, 0.5) |
A parameter determining the density dependence effect. Zero will have no density dependence effect, 1.0 will have infinite impact. More... | |
static CfgFloat | cfg_volepcidebiodegredrate ("VOLE_PCIDE_BIODEGREDATIONRATE", CFG_CUSTOM, 0.0) |
static CfgFloat | cfg_InfanticideRangeRelToTerRange ("VOLE_IINFANTICIDERANGE_RELTO_TERRANGE", CFG_CUSTOM, 0.5) |
static CfgBool | cfg_VoleMortalityDataUsed ("VOLE_MORTALITY_DATA_USED", CFG_CUSTOM, false) |
static CfgInt | cfg_VoleEndoCrineDisruptionGestationLength ("VOLE_ENDOCRINEDISPRUPTORGESTATION", CFG_CUSTOM, 21) |
static CfgFloat | cfg_InfanticideProbability ("INFANTI_PROBA", CFG_CUSTOM, 0.01) |
static CfgFloat | cfg_vole_habqualscaler ("VOLE_HABQUALSCALER", CFG_CUSTOM, 2.1) |
CfgInt | cfg_MinFemaleTerritorySize ("VOLE_MINFEMALETERRITORYSIZE", CFG_CUSTOM, 8) |
static CfgInt | cfg_MaxFemaleTerrSize ("VOLE_MAXFEMALETERRITORYSIZE", CFG_CUSTOM, 8) |
CfgInt | cfg_MinMaleTerritorySize ("VOLE_MINMALETERRITORYSIZE", CFG_CUSTOM, 9) |
static CfgInt | cfg_MaxMaleTerrSize ("VOLE_MAXMALETERRITORYSIZE", CFG_CUSTOM, 23) |
static CfgInt | cfg_vole_LifeMonths ("VOLE_LIFEMONTHS", CFG_CUSTOM, 3) |
static CfgInt | cfg_MaxStarvationDays ("VOLE_MAXSTARVATIONDAYS", CFG_CUSTOM, 29) |
double | MoveToLessFavourable |
double | g_speedy_Divides [2001] |
A generally useful array of fast divide calculators by multiplication. More... | |
CfgInt | cfg_productapplicstartyear |
static CfgFloat | cfg_PesticideAccumulationThreshold ("VOLE_PESTICDEACCUMULATIONTHRESHOLD", CFG_CUSTOM, 20.0) |
static CfgFloat | cfg_PesticideAccumulationThresholdModelink2 ("VOLE_PESTICDEACCUMULATIONTHRESHOLD_MODELINKTWO", CFG_CUSTOM, 20.0) |
static CfgFloat | cfg_PesticideAccumulationThreshold2 ("VOLE_PESTICDEACCUMULATIONTHRESHOLDTWO", CFG_CUSTOM, 44.1) |
static CfgFloat | cfg_PesticideFemaleMaturityDelay ("VOLE_PCIDE_FEMALEMATURITYDELAY", CFG_CUSTOM, 0.0192) |
static CfgFloat | cfg_PesticideLitterSizeReduction ("VOLE_PCIDE_LITTERSIZEREDUCTION", CFG_CUSTOM, 0.0038) |
static CfgFloat | cfg_PesticideWeaningReduction ("VOLE_PCIDE_WEANINGREDUCTION", CFG_CUSTOM, 0.0017) |
CfgBool | cfg_ResistanceDominant ("VOLE_RESISTANCEDOMINANT", CFG_CUSTOM, false) |
CfgInt | cfg_productapplicendyear |
CfgBool | cfg_ReallyBigOutputMonthly_used |
CfgBool | cfg_CfgRipleysOutputUsed |
CfgBool | cfg_AorOutput_used |
CfgBool | l_pest_enable_pesticide_engine |
Used to turn on or off the PPP functionality of ALMaSS. More... | |
CfgBool | cfg_pest_residue_or_rate |
Use residue or rate. Used in Vole code. More... | |
CfgInt | cfg_VoleDDepConst ("VOLE_DDEPCONST", CFG_CUSTOM, 4) |
CfgInt | cfg_MinReproAgeM ("VOLE_MINREPROAGEM", CFG_CUSTOM, 30) |
CfgInt | cfg_MinReproAgeF ("VOLE_MINREPROAGEF", CFG_CUSTOM, 23) |
const int | FemNoMature = September |
const unsigned | TheGestationPeriod = 21 |
const unsigned | WeanedAge = 13 |
const int | WeanedWeight = 5 |
const double | MaxWeightM = 60 |
const double | MaxWeightF = 55 |
const double | DaysAtMaxGrowth = 90.0 |
const double | growthperdayM = (MaxWeightM - WeanedWeight) / DaysAtMaxGrowth |
const double | growthperdayF = (MaxWeightF - WeanedWeight) / DaysAtMaxGrowth |
const int | GrowStopDate = August |
int | MinReproAgeM |
int | MinReproAgeF |
const unsigned | MinReproWeightM = 40 |
const int | MinReproWeightF = 20 |
int | g_sigAgeDiff = 30 |
const double | FemaleResourceReq [13] |
const unsigned | FemaleMovement = 50 |
const unsigned | MinFemaleMovement = 5 |
const unsigned | VoleMoveInterval = 30 |
const unsigned | MaleMovement [4] = {10, 40, 70, 110} |
const unsigned | MinMaleMovement = 5 |
int | g_MaleReproductFinish = 0 |
const double | InfanticideChanceByAge [9] = {0.97, 0.86, 0.75, 0.64, 0.54, 0.43, 0.32, 0.21, 0.11} |
double | g_DailyMortChance = 0.003 |
double | g_DailyMortChanceMaleTerr = 0.003 |
const double | VoleHarvestMort = 0.20 |
const double | VoleStriglingMort = 0.50 |
const double | VoleSoilCultivationMort = 0.75 |
const double | VolePigGrazingMort = 0.25 |
const double | VoleHerbicicideMort = 0.0 |
const double | VoleInsecticideMort = 0.0 |
double | g_extradispmort |
double | g_NoFemalesMove = 0.01 |
This file contains the code for all vole lifestage classes
by Chris J. Topping
Version of 28th Jan 2001
With additions as noted in:
April 2006
November 2007
Doxygen formatted comments in May 2008
#define _CRT_SECURE_NO_DEPRECATE |
CfgBool cfg_AorOutput_used |
CfgBool cfg_CfgRipleysOutputUsed |
CfgFloat cfg_extradispmort("VOLEDISPMORT", CFG_CUSTOM, 0.055) |
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 |
Referenced by Vole_Male::st_Infanticide().
|
static |
|
static |
Maximum territory size for females
Referenced by Vole_Base::Init().
|
static |
Maximum territory size for males
Referenced by Vole_Base::Init().
|
static |
The max number of starvation days before death
Referenced by Vole_Base::Init().
CfgInt cfg_MinFemaleTerritorySize("VOLE_MINFEMALETERRITORYSIZE", CFG_CUSTOM, 8) |
Minimum territory size for females
Referenced by Vole_Base::Init().
CfgInt cfg_MinMaleTerritorySize("VOLE_MINMALETERRITORYSIZE", CFG_CUSTOM, 9) |
Minimum territory size for males
Referenced by Vole_Base::Init().
CfgInt cfg_MinReproAgeF("VOLE_MINREPROAGEF", CFG_CUSTOM, 23) |
Referenced by Vole_Population_Manager::Init().
CfgInt cfg_MinReproAgeM("VOLE_MINREPROAGEM", CFG_CUSTOM, 30) |
Referenced by Vole_Population_Manager::Init().
CfgBool cfg_pest_residue_or_rate |
Use residue or rate. Used in Vole code.
|
static |
Toxicological variable for specific pesticide effects
Referenced by Vole_Female::st_GiveBirth(), and Vole_Female::st_Lactating().
|
static |
|
static |
Referenced by Vole_Female::st_GiveBirth(), and Vole_Female::st_Lactating().
|
static |
Referenced by Vole_Female::st_Lactating().
|
static |
Referenced by Vole_Female::st_GiveBirth().
|
static |
Referenced by Vole_Female::st_Lactating().
CfgInt cfg_productapplicendyear |
Referenced by Landscape::Tick().
CfgInt cfg_productapplicstartyear |
Toxicological variable for specific pesticide effects
Referenced by Landscape::Tick().
CfgBool cfg_ReallyBigOutputMonthly_used |
CfgBool cfg_RecordVoleMort |
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("VOLE_RESISTANCEDOMINANT", CFG_CUSTOM, false) |
Referenced by Vole_Population_Manager::ResistanceOutput().
|
static |
Scales to the average minimum territory quality acceptable
Referenced by Vole_Base::Init().
|
static |
Average physiological ifespan in months above 1 yr
Referenced by Vole_Base::Init().
CfgInt cfg_VoleDDepConst("VOLE_DDEPCONST", CFG_CUSTOM, 4) |
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_Female::ReInit(), and Vole_Female::Vole_Female().
|
static |
|
static |
Referenced by Vole_Base::Init().
CfgFloat cfg_VoleResourceRegrowth("VOLE_RESOURCEREGROWTH", CFG_CUSTOM, 0.5) |
A parameter determining the density dependence effect. Zero will have no density dependence effect, 1.0 will have infinite impact.
const double DaysAtMaxGrowth = 90.0 |
How long it takes to get to max weight at max rate of growth
const unsigned FemaleMovement = 50 |
Max distance between fix distance in Mols radiotracking data was 48m
Referenced by Vole_JuvenileFemale::st_Evaluate_n_Explore(), Vole_Female::st_Evaluate_n_Explore(), and Vole_Female::st_Special_Explore().
const double FemaleResourceReq[13] |
This is only here in case the resource requirement ought to change per month - it is not currently used.
Need 13 below because SupplyMonth() returns 1-12
const int FemNoMature = September |
1st september female voles cannot mature after this
double g_DailyMortChance = 0.003 |
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 = 0.003 |
Referenced by Vole_Population_Manager::DoFirst(), and Vole_Male::MortalityTest().
double g_extradispmort |
int g_MaleReproductFinish = 0 |
1/10 deduced from Erlinge et al, 1983
Referenced by Vole_Population_Manager::DoFirst(), and Vole_Population_Manager::Init().
double g_NoFemalesMove = 0.01 |
int g_sigAgeDiff = 30 |
Age difference required before eviction by older male
Referenced by Vole_Population_Manager::Init(), and Vole_Population_Manager::SupplyInOlderTerr().
double g_speedy_Divides[2001] |
A generally useful array of fast divide calculators by multiplication.
array of reciprocals to use instead of divding
Referenced by Landscape::Landscape().
const int GrowStopDate = August |
The day it is assumed that grass stops growing
const double growthperdayF = (MaxWeightF - WeanedWeight) / DaysAtMaxGrowth |
g per day during growing for females
Referenced by Vole_JuvenileFemale::EndStep().
const double growthperdayM = (MaxWeightM - WeanedWeight) / DaysAtMaxGrowth |
g per day during growing for males
Referenced by Vole_JuvenileMale::EndStep(), and Vole_Male::EndStep().
const double InfanticideChanceByAge[9] = {0.97, 0.86, 0.75, 0.64, 0.54, 0.43, 0.32, 0.21, 0.11} |
Data from M.arvalis (Heise & Lippke 1997) on infanticide attempts success rate with age of litter
Referenced by Vole_Female::OnInfanticideAttempt().
CfgFloat l_pest_daily_mort |
Daily mortality of pesticide with type 1.
CfgBool l_pest_enable_pesticide_engine |
Used to turn on or off the PPP functionality of ALMaSS.
Referenced by Pesticide::DecreaseVegetationPesticide(), Pesticide::Pesticide(), Pesticide::ReducePlantPesticide(), Pesticide::RemovePlantPesticide(), and Pesticide::Tick().
const unsigned MaleMovement[4] = {10, 40, 70, 110} |
Max distance between fix distance in Mols radiotracking data was 110m. For the male the distance that he can move increases with size
Referenced by Vole_JuvenileMale::st_Eval_n_Explore(), and Vole_Male::st_Eval_n_Explore().
const double MaxWeightF = 55 |
The maximum weight of adult females
Referenced by Vole_JuvenileFemale::EndStep(), and Vole_Base::Init().
const double MaxWeightM = 60 |
The maximum weight of adult males
Referenced by Vole_Male::EndStep(), and Vole_Base::Init().
const unsigned MinFemaleMovement = 5 |
arbitrary minimum movement of 5 - because we need one
Referenced by Vole_Female::st_Evaluate_n_Explore(), and Vole_Female::st_Special_Explore().
const unsigned MinMaleMovement = 5 |
arbitrary minimum movement of 5 - because we need one
Referenced by Vole_JuvenileMale::st_JuvenileExplore().
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().
const int MinReproWeightF = 20 |
The smallest a female can be reproductive at.
Referenced by Vole_JuvenileFemale::EndStep(), and Vole_Base::Init().
const unsigned MinReproWeightM = 40 |
The smallest a male can be reproductive at.
Referenced by Vole_Male::DetermineTerritorySize(), and Vole_Base::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().
const unsigned TheGestationPeriod = 21 |
Probability of maturing in each month of age - will do this if 5 months old unless it is winter 21 days gestation
Referenced by Vole_Female::st_Mating().
const double VoleHarvestMort = 0.20 |
Farm operation Mortality
Referenced by Vole_JuvenileMale::OnFarmEvent(), and Vole_JuvenileFemale::OnFarmEvent().
const double VoleHerbicicideMort = 0.0 |
Vole herbicide diect mortality
Referenced by Vole_JuvenileMale::OnFarmEvent(), and Vole_JuvenileFemale::OnFarmEvent().
const double VoleInsecticideMort = 0.0 |
Vole insecticide diect mortality
Referenced by Vole_JuvenileMale::OnFarmEvent(), and Vole_JuvenileFemale::OnFarmEvent().
const unsigned VoleMoveInterval = 30 |
const double VolePigGrazingMort = 0.25 |
Farm operation Mortality
Referenced by Vole_JuvenileMale::OnFarmEvent(), and Vole_JuvenileFemale::OnFarmEvent().
const double VoleSoilCultivationMort = 0.75 |
Farm operation Mortality
Referenced by Vole_JuvenileMale::OnFarmEvent(), and Vole_JuvenileFemale::OnFarmEvent().
const double VoleStriglingMort = 0.50 |
Farm operation Mortality
Referenced by Vole_JuvenileMale::OnFarmEvent(), and Vole_JuvenileFemale::OnFarmEvent().
const unsigned WeanedAge = 13 |
Age at weaning
Referenced by Vole_Female::st_Lactating().
const int WeanedWeight = 5 |