ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
Vole_all.cpp File Reference

This file contains the code for all vole lifestage classes
More...

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
 

Detailed Description

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

Macro Definition Documentation

◆ _CRT_SECURE_NO_DEPRECATE

#define _CRT_SECURE_NO_DEPRECATE

Variable Documentation

◆ cfg_AorOutput_used

CfgBool cfg_AorOutput_used

◆ cfg_CfgRipleysOutputUsed

CfgBool cfg_CfgRipleysOutputUsed

◆ cfg_extradispmort

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().

◆ cfg_InfanticideProbability

CfgFloat cfg_InfanticideProbability("INFANTI_PROBA", CFG_CUSTOM, 0.01)
static

◆ cfg_InfanticideRangeRelToTerRange

CfgFloat cfg_InfanticideRangeRelToTerRange("VOLE_IINFANTICIDERANGE_RELTO_TERRANGE", CFG_CUSTOM, 0.5)
static

◆ cfg_MaxFemaleTerrSize

CfgInt cfg_MaxFemaleTerrSize("VOLE_MAXFEMALETERRITORYSIZE", CFG_CUSTOM, 8)
static

Maximum territory size for females

Referenced by Vole_Base::Init().

◆ cfg_MaxMaleTerrSize

CfgInt cfg_MaxMaleTerrSize("VOLE_MAXMALETERRITORYSIZE", CFG_CUSTOM, 23)
static

Maximum territory size for males

Referenced by Vole_Base::Init().

◆ cfg_MaxStarvationDays

CfgInt cfg_MaxStarvationDays("VOLE_MAXSTARVATIONDAYS", CFG_CUSTOM, 29)
static

The max number of starvation days before death

Referenced by Vole_Base::Init().

◆ cfg_MinFemaleTerritorySize

CfgInt cfg_MinFemaleTerritorySize("VOLE_MINFEMALETERRITORYSIZE", CFG_CUSTOM, 8)

Minimum territory size for females

Referenced by Vole_Base::Init().

◆ cfg_MinMaleTerritorySize

CfgInt cfg_MinMaleTerritorySize("VOLE_MINMALETERRITORYSIZE", CFG_CUSTOM, 9)

Minimum territory size for males

Referenced by Vole_Base::Init().

◆ cfg_MinReproAgeF

CfgInt cfg_MinReproAgeF("VOLE_MINREPROAGEF", CFG_CUSTOM, 23)

◆ cfg_MinReproAgeM

CfgInt cfg_MinReproAgeM("VOLE_MINREPROAGEM", CFG_CUSTOM, 30)

◆ cfg_pest_residue_or_rate

CfgBool cfg_pest_residue_or_rate

Use residue or rate. Used in Vole code.

◆ cfg_PesticideAccumulationThreshold

CfgFloat cfg_PesticideAccumulationThreshold("VOLE_PESTICDEACCUMULATIONTHRESHOLD", CFG_CUSTOM, 20.0)
static

Toxicological variable for specific pesticide effects

Referenced by Vole_Female::st_GiveBirth(), and Vole_Female::st_Lactating().

◆ cfg_PesticideAccumulationThreshold2

CfgFloat cfg_PesticideAccumulationThreshold2("VOLE_PESTICDEACCUMULATIONTHRESHOLDTWO", CFG_CUSTOM, 44.1)
static

◆ cfg_PesticideAccumulationThresholdModelink2

CfgFloat cfg_PesticideAccumulationThresholdModelink2("VOLE_PESTICDEACCUMULATIONTHRESHOLD_MODELINKTWO", CFG_CUSTOM, 20.0)
static

◆ cfg_PesticideFemaleMaturityDelay

CfgFloat cfg_PesticideFemaleMaturityDelay("VOLE_PCIDE_FEMALEMATURITYDELAY", CFG_CUSTOM, 0.0192)
static

◆ cfg_PesticideLitterSizeReduction

CfgFloat cfg_PesticideLitterSizeReduction("VOLE_PCIDE_LITTERSIZEREDUCTION", CFG_CUSTOM, 0.0038)
static

◆ cfg_PesticideWeaningReduction

CfgFloat cfg_PesticideWeaningReduction("VOLE_PCIDE_WEANINGREDUCTION", CFG_CUSTOM, 0.0017)
static

◆ cfg_productapplicendyear

CfgInt cfg_productapplicendyear

Referenced by Landscape::Tick().

◆ cfg_productapplicstartyear

CfgInt cfg_productapplicstartyear

Toxicological variable for specific pesticide effects

Referenced by Landscape::Tick().

◆ cfg_ReallyBigOutputMonthly_used

CfgBool cfg_ReallyBigOutputMonthly_used

◆ cfg_RecordVoleMort

◆ cfg_ResistanceDominant

CfgBool cfg_ResistanceDominant("VOLE_RESISTANCEDOMINANT", CFG_CUSTOM, false)

◆ cfg_vole_habqualscaler

CfgFloat cfg_vole_habqualscaler("VOLE_HABQUALSCALER", CFG_CUSTOM, 2.1)
static

Scales to the average minimum territory quality acceptable

Referenced by Vole_Base::Init().

◆ cfg_vole_LifeMonths

CfgInt cfg_vole_LifeMonths("VOLE_LIFEMONTHS", CFG_CUSTOM, 3)
static

Average physiological ifespan in months above 1 yr

Referenced by Vole_Base::Init().

◆ cfg_VoleDDepConst

◆ cfg_VoleEndoCrineDisruptionGestationLength

CfgInt cfg_VoleEndoCrineDisruptionGestationLength("VOLE_ENDOCRINEDISPRUPTORGESTATION", CFG_CUSTOM, 21)
static

◆ cfg_VoleMortalityDataUsed

CfgBool cfg_VoleMortalityDataUsed("VOLE_MORTALITY_DATA_USED", CFG_CUSTOM, false)
static

◆ cfg_volepcidebiodegredrate

CfgFloat cfg_volepcidebiodegredrate("VOLE_PCIDE_BIODEGREDATIONRATE", CFG_CUSTOM, 0.0)
static

Referenced by Vole_Base::Init().

◆ cfg_VoleResourceRegrowth

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.

◆ DaysAtMaxGrowth

const double DaysAtMaxGrowth = 90.0

How long it takes to get to max weight at max rate of growth

◆ FemaleMovement

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().

◆ FemaleResourceReq

const double FemaleResourceReq[13]
Initial value:
=
{
0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
}

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

◆ FemNoMature

const int FemNoMature = September

1st september female voles cannot mature after this

◆ g_DailyMortChance

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().

◆ g_DailyMortChanceMaleTerr

double g_DailyMortChanceMaleTerr = 0.003

◆ g_extradispmort

◆ g_MaleReproductFinish

int g_MaleReproductFinish = 0

1/10 deduced from Erlinge et al, 1983

Referenced by Vole_Population_Manager::DoFirst(), and Vole_Population_Manager::Init().

◆ g_NoFemalesMove

◆ g_sigAgeDiff

int g_sigAgeDiff = 30

Age difference required before eviction by older male

Referenced by Vole_Population_Manager::Init(), and Vole_Population_Manager::SupplyInOlderTerr().

◆ g_speedy_Divides

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().

◆ GrowStopDate

const int GrowStopDate = August

The day it is assumed that grass stops growing

◆ growthperdayF

const double growthperdayF = (MaxWeightF - WeanedWeight) / DaysAtMaxGrowth

g per day during growing for females

Referenced by Vole_JuvenileFemale::EndStep().

◆ growthperdayM

const double growthperdayM = (MaxWeightM - WeanedWeight) / DaysAtMaxGrowth

g per day during growing for males

Referenced by Vole_JuvenileMale::EndStep(), and Vole_Male::EndStep().

◆ InfanticideChanceByAge

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().

◆ l_pest_daily_mort

CfgFloat l_pest_daily_mort

Daily mortality of pesticide with type 1.

◆ l_pest_enable_pesticide_engine

CfgBool l_pest_enable_pesticide_engine

◆ MaleMovement

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().

◆ MaxWeightF

const double MaxWeightF = 55

The maximum weight of adult females

Referenced by Vole_JuvenileFemale::EndStep(), and Vole_Base::Init().

◆ MaxWeightM

const double MaxWeightM = 60

The maximum weight of adult males

Referenced by Vole_Male::EndStep(), and Vole_Base::Init().

◆ MinFemaleMovement

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().

◆ MinMaleMovement

const unsigned MinMaleMovement = 5

arbitrary minimum movement of 5 - because we need one

Referenced by Vole_JuvenileMale::st_JuvenileExplore().

◆ MinReproAgeF

◆ MinReproAgeM

int MinReproAgeM

The youngest a male can be reproductive at.

Referenced by Vole_JuvenileMale::EndStep(), and Vole_Population_Manager::Init().

◆ MinReproWeightF

const int MinReproWeightF = 20

The smallest a female can be reproductive at.

Referenced by Vole_JuvenileFemale::EndStep(), and Vole_Base::Init().

◆ MinReproWeightM

const unsigned MinReproWeightM = 40

The smallest a male can be reproductive at.

Referenced by Vole_Male::DetermineTerritorySize(), and Vole_Base::Init().

◆ MoveToLessFavourable

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().

◆ TheGestationPeriod

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().

◆ VoleHarvestMort

const double VoleHarvestMort = 0.20

◆ VoleHerbicicideMort

const double VoleHerbicicideMort = 0.0

Vole herbicide diect mortality

Referenced by Vole_JuvenileMale::OnFarmEvent(), and Vole_JuvenileFemale::OnFarmEvent().

◆ VoleInsecticideMort

const double VoleInsecticideMort = 0.0

Vole insecticide diect mortality

Referenced by Vole_JuvenileMale::OnFarmEvent(), and Vole_JuvenileFemale::OnFarmEvent().

◆ VoleMoveInterval

const unsigned VoleMoveInterval = 30

◆ VolePigGrazingMort

const double VolePigGrazingMort = 0.25

◆ VoleSoilCultivationMort

const double VoleSoilCultivationMort = 0.75

◆ VoleStriglingMort

const double VoleStriglingMort = 0.50

◆ WeanedAge

const unsigned WeanedAge = 13

Age at weaning

Referenced by Vole_Female::st_Lactating().

◆ WeanedWeight