ALMaSS Rabbit ODdox  1.1
The rabbit model description following ODdox protocol
Rabbit.cpp File Reference

The main source code for all rabbit lifestages and associated classes More...

#include <iostream>
#include <fstream>
#include <vector>
#include "../BatchALMaSS/ALMaSS_Setup.h"
#include "../ALMaSSDefines.h"
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../Rabbit/Rabbit.h"
#include "../Rabbit/Rabbit_Population_Manager.h"
#include "../BatchALMaSS/BoostRandomGenerators.h"

Go to the source code of this file.

Variables

boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
 
MapErrorMsgg_msg
 
int g_rabbitexploredistance
 
int g_land_width
 
CfgBool cfg_RabbitUseReproOutput
 Flag to denote using lifetime repro output file or not. More...
 
CfgBool cfg_RabbitUseNatalDispersalRecord
 Flag to denote using lifetime repro output file or not. More...
 
CfgInt cfg_RabbitUseNatalDispersalRecordAge
 Flag to denote using lifetime repro output file or not. More...
 
CfgBool l_pest_enable_pesticide_engine
 Used to turn on or off the PPP functionality of ALMaSS. More...
 
CfgInt cfg_rabbitdensitydependencedelay
 Input variable. The period between recalculation of rabbit disease probability. More...
 
int g_counter = 0
 
static CfgFloat cfg_young_base_mort ("RABBIT_YOUNGBASEMORT", CFG_CUSTOM, 0.038)
 Input variable. The daily base level for young mortality before any modifiers are applied. More...
 
static CfgFloat cfg_juvenile_base_mort ("RABBIT_JUVENILEBASEMORT", CFG_CUSTOM, 0.004)
 Input variable. The daily base level for juvenile mortality before any modifiers are applied. More...
 
static CfgFloat cfg_adult_base_mort ("RABBIT_ADULTBASEMORT", CFG_CUSTOM, 0.00013)
 Input variable. The daily base level for adult mortality before any modifiers are applied. More...
 
CfgFloat cfg_maxForageHeight ("RABBIT_MAXFORAGEHEIGHT", CFG_CUSTOM, 30.0)
 Input variable. The maximum height desirable for forage vegetation. More...
 
CfgFloat cfg_minForageDigestability ("RABBIT_MINFORAGEDIGESTABILITY", CFG_CUSTOM, 0.50)
 Input variable. Input variable. The minimum digestability desirable for forage vegetation. More...
 
CfgFloat cfg_dispersalmortperm ("RABBIT_DISPERSALMORTPERM", CFG_CUSTOM, 0.0002)
 Input variable. The additional mortality rate with distance for between warren dispersal. More...
 
CfgFloat cfg_RabbitPesticideResponse ("RABBIT_PESTICDERESPONSETHRESHOLD", CFG_CUSTOM, 0.00001)
 Input variable. The threshold above which a rabbit will be killed if it ingests pesticide. More...
 
CfgFloat cfg_globaldisease_probability ("RABBIT_GLOBALDISEASEPROBCONSTANT", CFG_CUSTOM, 0.05)
 Input variable. A constant use to calculate the probability of density related disease. More...
 
CfgInt cfg_rabbitdiggingtime ("RABBIT_DIGGINGTIME", CFG_CUSTOM, 10)
 Input variable. Minimum burrow construction time in days. More...
 
CfgFloat cfg_rabbitdendepscaler ("RABBIT_DENSITYDEPSCALER", CFG_CUSTOM, 4.5)
 Input variable. Average family size for calculating carrying capacity. More...
 
static CfgFloat cfg_forageareamortscaler ("RABBIT_FORAGEAREAMORTSCALER", CFG_CUSTOM, 60.0)
 Input variable. A constant used to increase bad weather mortality as a function of the proportion of forage available. More...
 
CfgFloat cfg_rabbitminkits ("RABBIT_MINKITS", CFG_CUSTOM, 1.0)
 The minimum number of kits in a litter. More...
 
CfgFloat cfg_rabbitmaxkits ("RABBIT_MAXKITS", CFG_CUSTOM, 9.6)
 The maximum number of kits in a litter. More...
 
static CfgFloat cfg_rabbitsocialreproductionthreshold ("RABBIT_SOCIALREPROTHRESHOLD", CFG_CUSTOM, 2.3)
 The threshold at which social reproduction reduction is tested. 1.0 means 50% chance of reproduction for subordinates. More...
 
static CfgFloat cfg_rabbitminwarrensize ("RABBIT_MINWARRENSIZE", CFG_CUSTOM, 2)
 The minimum size of a warren. More...
 
static CfgFloat cfg_rabbitmaxwarrensize ("RABBIT_MAXWARRENSIZE", CFG_CUSTOM, 10)
 Use to calculate the maximum size of a warren. Add min to get the real maximum warren size. More...
 
static CfgFloat cfg_litterabsorptionconstant ("RABBIT_LITTERABSOPRTIONCONST", CFG_CUSTOM, 1.8)
 Used to calculate the chance of litter reabsorption depending on forage conditions. More...
 
CfgFloat cfg_rabbit_pesticidedegradationrate ("RABBIT_PESTICIDEDEGRADATIONRATE", CFG_CUSTOM, 0.0)
 Holds 1-proportion of decay of body burden of pesticide per day. Default of 0.0 will remove all body burden pesticide at the end of each day. More...
 

Detailed Description

The main source code for all rabbit lifestages and associated classes

Version of November 2015
By Chris J. Topping

Definition in file Rabbit.cpp.

Variable Documentation

◆ cfg_adult_base_mort

CfgFloat cfg_adult_base_mort("RABBIT_ADULTBASEMORT", CFG_CUSTOM, 0.00013)
static

Input variable. The daily base level for adult mortality before any modifiers are applied.

Referenced by Rabbit_Adult::Rabbit_Adult().

◆ cfg_dispersalmortperm

CfgFloat cfg_dispersalmortperm("RABBIT_DISPERSALMORTPERM", CFG_CUSTOM, 0.0002)

Input variable. The additional mortality rate with distance for between warren dispersal.

Referenced by Rabbit_Population_Manager::AssignStaticVariables(), and Rabbit_Population_Manager::Rabbit_Population_Manager().

◆ cfg_forageareamortscaler

CfgFloat cfg_forageareamortscaler("RABBIT_FORAGEAREAMORTSCALER", CFG_CUSTOM, 60.0)
static

Input variable. A constant used to increase bad weather mortality as a function of the proportion of forage available.

Referenced by Rabbit_Warren::st_WarrenBeing().

◆ cfg_globaldisease_probability

CfgFloat cfg_globaldisease_probability("RABBIT_GLOBALDISEASEPROBCONSTANT", CFG_CUSTOM, 0.05)

Input variable. A constant use to calculate the probability of density related disease.

Referenced by Rabbit_Warren::CalcDisease().

◆ cfg_juvenile_base_mort

CfgFloat cfg_juvenile_base_mort("RABBIT_JUVENILEBASEMORT", CFG_CUSTOM, 0.004)
static

Input variable. The daily base level for juvenile mortality before any modifiers are applied.

Referenced by Rabbit_Juvenile::Rabbit_Juvenile().

◆ cfg_litterabsorptionconstant

CfgFloat cfg_litterabsorptionconstant("RABBIT_LITTERABSOPRTIONCONST", CFG_CUSTOM, 1.8)
static

Used to calculate the chance of litter reabsorption depending on forage conditions.

Referenced by Rabbit_Warren::UpdateForageInformation().

◆ cfg_maxForageHeight

CfgFloat cfg_maxForageHeight("RABBIT_MAXFORAGEHEIGHT", CFG_CUSTOM, 30.0)

Input variable. The maximum height desirable for forage vegetation.

Referenced by Rabbit_Population_Manager::AssignStaticVariables(), and Rabbit_Population_Manager::Rabbit_Population_Manager().

◆ cfg_minForageDigestability

CfgFloat cfg_minForageDigestability("RABBIT_MINFORAGEDIGESTABILITY", CFG_CUSTOM, 0.50)

Input variable. Input variable. The minimum digestability desirable for forage vegetation.

Referenced by Rabbit_Population_Manager::AssignStaticVariables().

◆ cfg_rabbit_pesticidedegradationrate

CfgFloat cfg_rabbit_pesticidedegradationrate("RABBIT_PESTICIDEDEGRADATIONRATE", CFG_CUSTOM, 0.0)

Holds 1-proportion of decay of body burden of pesticide per day. Default of 0.0 will remove all body burden pesticide at the end of each day.

Referenced by Rabbit_Population_Manager::AssignStaticVariables().

◆ cfg_rabbitdendepscaler

CfgFloat cfg_rabbitdendepscaler("RABBIT_DENSITYDEPSCALER", CFG_CUSTOM, 4.5)

Input variable. Average family size for calculating carrying capacity.

Referenced by Rabbit_Warren::InitEvaluation().

◆ cfg_rabbitdensitydependencedelay

CfgInt cfg_rabbitdensitydependencedelay

Input variable. The period between recalculation of rabbit disease probability.

Referenced by Rabbit_Warren::UpdateForageInformation().

◆ cfg_rabbitdiggingtime

CfgInt cfg_rabbitdiggingtime("RABBIT_DIGGINGTIME", CFG_CUSTOM, 10)

Input variable. Minimum burrow construction time in days.

Referenced by Rabbit_Warren::Rabbit_Warren().

◆ cfg_rabbitmaxkits

CfgFloat cfg_rabbitmaxkits("RABBIT_MAXKITS", CFG_CUSTOM, 9.6)

The maximum number of kits in a litter.

Referenced by Rabbit_Population_Manager::AssignStaticVariables().

◆ cfg_rabbitmaxwarrensize

CfgFloat cfg_rabbitmaxwarrensize("RABBIT_MAXWARRENSIZE", CFG_CUSTOM, 10)
static

Use to calculate the maximum size of a warren. Add min to get the real maximum warren size.

Referenced by Rabbit_Warren::InitEvaluation().

◆ cfg_rabbitminkits

CfgFloat cfg_rabbitminkits("RABBIT_MINKITS", CFG_CUSTOM, 1.0)

The minimum number of kits in a litter.

Referenced by Rabbit_Population_Manager::AssignStaticVariables().

◆ cfg_rabbitminwarrensize

CfgFloat cfg_rabbitminwarrensize("RABBIT_MINWARRENSIZE", CFG_CUSTOM, 2)
static

The minimum size of a warren.

Referenced by Rabbit_Warren::InitEvaluation().

◆ cfg_RabbitPesticideResponse

CfgFloat cfg_RabbitPesticideResponse("RABBIT_PESTICDERESPONSETHRESHOLD", CFG_CUSTOM, 0.00001)

Input variable. The threshold above which a rabbit will be killed if it ingests pesticide.

Referenced by Rabbit_Juvenile::InternalPesticideHandlingAndResponse(), Rabbit_Male::InternalPesticideHandlingAndResponse(), and Rabbit_Female::InternalPesticideHandlingAndResponse().

◆ cfg_rabbitsocialreproductionthreshold

CfgFloat cfg_rabbitsocialreproductionthreshold("RABBIT_SOCIALREPROTHRESHOLD", CFG_CUSTOM, 2.3)
static

The threshold at which social reproduction reduction is tested. 1.0 means 50% chance of reproduction for subordinates.

Referenced by Rabbit_Female::st_GiveBirth().

◆ cfg_RabbitUseNatalDispersalRecord

CfgBool cfg_RabbitUseNatalDispersalRecord

◆ cfg_RabbitUseNatalDispersalRecordAge

CfgInt cfg_RabbitUseNatalDispersalRecordAge

Flag to denote using lifetime repro output file or not.

Referenced by Rabbit_Base::BeginStep().

◆ cfg_RabbitUseReproOutput

CfgBool cfg_RabbitUseReproOutput

◆ cfg_young_base_mort

CfgFloat cfg_young_base_mort("RABBIT_YOUNGBASEMORT", CFG_CUSTOM, 0.038)
static

Input variable. The daily base level for young mortality before any modifiers are applied.

Referenced by Rabbit_Young::Rabbit_Young().

◆ g_counter

int g_counter = 0

Definition at line 76 of file Rabbit.cpp.

Referenced by Rabbit_Base::WalkTo().

◆ g_land_width

int g_land_width

◆ g_msg

MapErrorMsg* g_msg

Definition at line 41 of file maperrormsg.cpp.

Referenced by OptimisingFarm::ActualProfit(), Landscape::AddBeetleBanks(), LE_TypeClass::BackTranslateEleTypes(), LE_TypeClass::BackTranslateVegTypes(), Landscape::BorderAdd(), Landscape::BorderNeed(), Landscape::BorderScan(), RasterMap::CellReplacementNeighbour(), Landscape::CentroidSpiralOut(), Farm::CheckRotationManagementLoop(), Crop::ChooseNextCrop(), FarmManager::ConnectFarm(), Landscape::ConsolidatePolys(), FarmManager::CreateFarms(), CropRotation::CropRotation(), Calendar::DayLength(), AnimalFarm::determineMinFodder(), FarmManager::DumpFarmrefs(), Landscape::DumpMapGraphics(), Landscape::DumpMapInfoByArea(), PesticideMap::DumpPMap(), Configurator::DumpSymbols(), Landscape::DumpTreatCounters(), Landscape::EventDump(), Landscape::EventDumpPesticides(), Landscape::EventtypeToString(), Configurator::ExtractString(), probe_data::FileAppendOutput(), OptimisingFarm::Find_neighbour_to_imitate(), FarmManager::FindClosestFarm(), FarmManager::FindClosestFarmOpenness(), FarmManager::FindClosestFarmOpennessProb(), FarmManager::FindClosestFarmOpennessProbNearRoostIsBest(), FarmManager::FindClosestFarmOpennessProbSmallIsBest(), OptimisingFarm::findCropByName(), OptimisingFarm::findCropByName_almass(), FarmManager::FindFarmWithOpenness(), FarmManager::FindFarmWithRandom(), Landscape::ForceArea(), RasterMap::Get(), DataForOptimisation::Get_farmType(), FarmManager::GetFarmCentroid(), FarmManager::GetFarmPtr(), CropRotation::GetFirstCrop(), CropRotation::GetNextCrop(), FarmManager::GetRenumberedFarmRef(), Landscape::GISASCII_Output(), OptimisingFarm::HandleEvents(), Landscape::IncTreatCounter(), RasterMap::Init1(), RasterMap::Init2(), OptimisingFarm::Initialize(), Farm::InitiateManagement(), Landscape::InitOsmiaBeeNesting(), Rabbit_Juvenile::InternalPesticideHandlingAndResponse(), Rabbit_Male::InternalPesticideHandlingAndResponse(), Rabbit_Female::InternalPesticideHandlingAndResponse(), Farm::InvIntPartition(), Landscape::Landscape(), Farm::LeSwitch(), Rabbit_Population_Manager::LoadWarrenLocations(), OptimisingFarm::Make_rotations(), Farm::Management(), OptimisingFarm::Match_crop_to_field(), Landscape::NewElement(), probe_data::OpenFile(), probe_data::OpenForAppendToFile(), Population_Manager::OpenTheMonthlyRipleysOutputProbe(), Population_Manager::OpenTheReallyBigProbe(), Population_Manager::OpenTheRipleysOutputProbe(), Configurator::ParseCfgLine(), PollenNectarDevelopmentData::PollenNectarDevelopmentData(), Landscape::PolysDump(), Landscape::PolysRenumber(), Landscape::PolysValidate(), Landscape::PolytypeToString(), FarmManager::PrintOutput(), OptimisingFarm::randomizeCropList(), RasterMap::RasterMap(), VegElement::ReadBugPercentageFile(), FarmManager::ReadCropsData_perFarm_and_Soil_and_Size_almass(), FarmManager::ReadCropsData_perFarmType_almass(), FarmManager::ReadCropsData_perSoilType_almass(), Landscape::ReadPolys2(), Farm::ReadRotation(), Configurator::ReadSymbols(), Farm::RemoveField(), Landscape::RemoveSmallPolygons(), Pesticide::SavePPM(), Rabbit_Population_Manager::SaveWarrenLocations(), CfgInt::set(), CfgFloat::set(), Configurator::SetCfgBool(), Configurator::SetCfgFloat(), Configurator::SetCfgGatekeeper(), Configurator::SetCfgInt(), Configurator::SetCfgStr(), PlantGrowthData::SetVegNum(), Configurator::ShowIdType(), OptimisingFarm::total(), OptimisingFarm::Translate_crops_to_almass(), FarmManager::TranslateAnimalsCodes(), FarmManager::TranslateCropCodes(), FarmManager::TranslateCropsCodes(), FarmManager::TranslateCropVariablesCodes(), LE_TypeClass::TranslateEleTypes(), FarmManager::TranslateFarmCodes(), FarmManager::TranslateFarmSizeCodes(), FarmManager::TranslateLivestockParametersCodes(), FarmManager::TranslateParametersCodes(), FarmManager::TranslateSoilCodes(), LE_TypeClass::TranslateVegTypes(), Landscape::UnsprayedMarginAdd(), UserDefinedFarm::UserDefinedFarm(), Landscape::VegDump(), PlantGrowthData::VegTypeToCurveNum(), Landscape::VegtypeToString(), Landscape::Warn(), Weather::Weather(), and Landscape::~Landscape().

◆ g_rabbitexploredistance

int g_rabbitexploredistance

◆ g_rand_uni

◆ l_pest_enable_pesticide_engine

CfgBool l_pest_enable_pesticide_engine

Used to turn on or off the PPP functionality of ALMaSS.

Referenced by Pesticide::Pesticide(), Pesticide::Tick(), Rabbit_Warren::UpdateForageInformation(), and Pesticide::~Pesticide().