![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <string.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <chrono>
#include "../BatchALMaSS/ALMaSS_Setup.h"
#include "../ALMaSSDefines.h"
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../BatchALMaSS/AOR_Probe.h"
#include "../Osmia/Osmia.h"
#include "../Osmia/Osmia_Population_Manager.h"
Variables | |
static CfgArray_Double | cfg_OsmiaPollenThresholds ("OSMIA_POLLEN_THRESHOLDS", CFG_CUSTOM, 24, vector< double > { 1.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, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }) |
Monthly pollen thresholds, 12 quantity then 12 quality. Units mg/m2 and unitless. More... | |
static CfgArray_Double | cfg_OsmiaNectarThresholds ("OSMIA_NECTAR_THRESHOLDS", CFG_CUSTOM, 24, vector< double > { 1.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, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }) |
Monthly nectar thresholds, 12 quantity then 12 quality. Units mj/m2 and mg/l. More... | |
static CfgArray_Double | cfg_OsmiaParasDailyMort ("OSMIA_PARAS_DAILYMORT", CFG_CUSTOM, 24, vector< double > { 1.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, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }) |
Montly mortalities for TTypeOfOsmiaParasitoids parasitoids. Each set of 12 are the mortalities matching the order in the enum class TTypeOfOsmiaParasitoids. More... | |
static CfgArray_Double | cfg_OsmiaPrepupalDevelRates ("OSMIA_PREPUPALDEVELRATES", CFG_CUSTOM, 42, vector< double > { 0.118180491, 0.128062924, 0.139167698, 0.151690375, 0.165863251, 0.181962547, 0.200316654, 0.221315209, 0.245418359, 0.273164807, 0.305175879, 0.342150483, 0.384842052, 0.434002716, 0.490272059, 0.553979475, 0.62482638, 0.701432201, 0.780791977, 0.857828943, 0.925409524, 0.97526899, 1, 0.995492173, 0.96251684, 0.90641791, 0.835121012, 0.756712977, 0.677752358, 0.602659522, 0.53389011, 0.472441557, 0.418380352, 0.371255655, 0.330377543, 0.294984821, 0.264336547, 0.237755941, 0.214646732, 0.194494708, 0.176862031, 0.161378614 }) |
This array is the daily rate of development of prepupa with temperature rounded to the nearest degree (0-41 degrees. More... | |
static CfgInt | cfg_OsmiaStartNo ("OSMIA_STARTNOS", CFG_CUSTOM, 50000) |
The starting number of Osmia InCocoons. More... | |
static CfgArray_Double | cfg_OsmiaParasDispersal ("OSMIA_PARAS_DISPERSAL", CFG_CUSTOM, static_cast< unsigned >(TTypeOfOsmiaParasitoids::topara_foobar) - 1, vector< double > { 0.001, 0.0001 }) |
Dispersal rates for TTypeOfOsmiaParasitoids parasitoids. Each entry is the dispersal rate for the parasitoid type matching the order in the enum class TTypeOfOsmiaParasitoids. More... | |
static CfgArray_Double | cfg_OsmiaParasStartHighLow ("OSMIA_PARAS_STARTHIGHLOW", CFG_CUSTOM, 2 *(static_cast< unsigned >(TTypeOfOsmiaParasitoids::topara_foobar) - 1), vector< double > { 2.0, 1.0, 2.0, 1.0}) |
Starting numbers for TTypeOfOsmiaParasitoids parasitoids. Each entry is the max and min starting numbers per sub-population for the parasitoid type matching the order in the enum class TTypeOfOsmiaParasitoids. More... | |
CfgFloat | cfg_OsmiaAdultMassCategoryStep ("OSMIA_ADULTMASSCLASSSTEP", CFG_CUSTOM, 10.0) |
The size class step for Osmia female mass. More... | |
static CfgStr | cfg_OsmiaNestByLE_Datafile ("OSMIA_NESTBYLEDATAFILE", CFG_CUSTOM, "OsmiaNestsByHabitat.txt") |
Input file for Osmia nest density per LE. More... | |
static CfgFloat | cfg_OsmiaFemaleBckMort ("OSMIA_FEMALEBACKMORT", CFG_CUSTOM, 0.02) |
The daily background mortality rate for females. More... | |
static CfgInt | cfg_OsmiaMinNoEggsInNest ("OSMIA_MINNOEGGSINNEST", CFG_CUSTOM, 3) |
The mimimum number of eggs planned for a nest. More... | |
static CfgInt | cfg_OsmiaMaxNoEggsInNest ("OSMIA_MAXNOEGGSINNEST", CFG_CUSTOM, 30) |
The maximum number of eggs planned for a nest More... | |
static CfgArray_Double | cfg_OsmiaSexRatioVsMotherAgeLogistic ("OSMIA_SEXRATIOVSMOTHERSAGELOGISTIC", CFG_CUSTOM, 4, vector< double > { 14.90257909, 0.09141286, 0.6031729, -0.39213001 }) |
Array of parameters for the Osmia sex ratio vs mothers age logistic equation More... | |
static CfgArray_Double | Cfg_OsmiaFemaleCocoonMassVsMotherAgeLogistic ("OSMIA_FEMALECOCOONMASSVSMOTHERSAGELOGISTIC", CFG_CUSTOM, 4, vector< double > { 18.04087868, 104.19820591, 133.74150303, -0.17686981}) |
Array of parameters for the Osmia female cocoon mass vs mothers age logistic equation More... | |
static CfgArray_Double | cfg_OsmiaSexRatioVsMotherMassLinear ("OSMIA_SEXRATIOVSMOTHERSMASSLINEAR", CFG_CUSTOM, 2, vector< double > { 0.0055, -0.1025 }) |
Array of parameters for the Osmia sex ratio vs mothers mass linear equation More... | |
static CfgArray_Double | Cfg_OsmiaFemaleCocoonMassVsMotherMassLinear ("OSMIA_FEMALECOCOONMASSVSMOTHERSMASSLINEAR", CFG_CUSTOM, 2, vector< double > { 0.3, 65.1 }) |
Array of parameters for the Osmia female first cocoon mass vs mothers mass linear equation More... | |
static CfgFloat | cfg_Osmia_LifetimeCocoonMassLoss ("OSMIA_LIFETIMECOCOONMASSLOSS", CFG_CUSTOM, 30.0) |
Assumed (fitted) value for the total difference in cocoon mass from first to last cocoon More... | |
CfgFloat | cfg_OsmiaCocoonMassFromProvMass ("OSMIAS_COCOONTOPROVISIONING", CFG_CUSTOM, 1.0/3.247) |
The relationhip between cocoon massand provisioning mass is linear. More... | |
CfgFloat | cfg_OsmiaProvMassFromCocoonMass ("OSMIAS_PROVISIONINGTOCOCOON", CFG_CUSTOM, 3.247) |
The relationhip between cocoon mass and provisioning mass is linear. More... | |
static CfgFloat | cfg_MaleMinTargetProvisionMass ("OSMIA_MALEMINTARGETPROVISIONMASS", CFG_CUSTOM, 10.0) |
The minimum amount of pollen needed to provision a male cell. More... | |
static CfgInt | cfg_MinimumCellConstructionTime ("OSMIA_MINCELLCONSTRUCTTIME", CFG_CUSTOM, 1) |
The minimum time to construct a cell in days. More... | |
static CfgInt | cfg_MaximumCellConstructionTime ("OSMIA_MAXCELLCONSTRUCTTIME", CFG_CUSTOM, 4) |
The maximum time allowed to construct a cell in days. More... | |
static CfgInt | cfg_TotalNestsPossible ("OSMIA_TOTALNESTSPOSSIBLE", CFG_CUSTOM, 5) |
The maximum number of nests possible for a bee. More... | |
static CfgBool | cfg_UsingMechanisticParasitoids ("OSMIA_USEMECHANISTICPARASITOIDS", CFG_CUSTOM, false) |
The flag for using mechanistic (true) or statistical (false) parasitoid assumptions. More... | |
static CfgFloat | cfg_OsmiaBombylidProb ("OSMIA_BOMBYLIDPROB", CFG_CUSTOM, 0.5) |
The probability that a parasitoid is Bombylid - statistical parasitoids only. More... | |
static CfgFloat | cfg_OsmiaParasitismProbToTimeCellOpen ("OSMIA_PARASITISMPROBTOTIMECELLOPEN", CFG_CUSTOM, 0.0075) |
The conversion rate from timethe cell is open to open cell parasitism. More... | |
static CfgArray_Double | cfg_OsmiaPerCapitaParasationChance ("OSMIA_PERCAPITAPARASITATIONCHANCE", CFG_CUSTOM, static_cast< int >(TTypeOfOsmiaParasitoids::topara_foobar) - 1, vector< double > { 0.00001, 0.00002 }) |
Array of parameters for per capita parasitoid probability for each type of parasitoid in the order based on TTypeOfOsmiaParasitoids. More... | |
static CfgInt | cfg_OsmiaFemaleFindNestAttemptNo ("OSMIA_FEMALEFINDNESTATTEMPTNO", CFG_CUSTOM, 20) |
Parameter to set the numbe of nest finding attempts. More... | |
static CfgFloat | cfg_OsmiaPollenGiveUpThreshold ("OSMIA_POLLENGIVEUPTHRESHOLD", CFG_CUSTOM, 0.75, 0, 1.0) |
The change in proportion pollen before a new patch is selected. More... | |
static CfgFloat | cfg_OsmiaPollenGiveUpReturn ("OSMIA_POLLENGIVEUPRETURN", CFG_CUSTOM, 0.75, 0, 50.0) |
The change in proportion pollen before a new patch is selected. More... | |
static CfgFloat | cfg_OsmiaDensityDependentPollenRemovalConst ("OSMIADENSITYDENPENDENTPOLLENREMOVALCONST", CFG_CUSTOM, 0.5) |
Parameter to set the proportion of pollen removed by other bees. More... | |
static CfgFloat | cfg_PollenScoreToMg ("OSMIA_POLLENSCORETOMG", CFG_CUSTOM, 0.8) |
The conversion rate from pollen availability score to mg pollen provisioned per day per bee - a fitting parameter. More... | |
static CfgFloat | cfg_OsmiaPesticideProbability ("OSMIA_PPP_PROB", CFG_CUSTOM, 0.0) |
The probability of death per day if the pesticide body burden threshold is exceeded. More... | |
static CfgFloat | cfg_OsmiaPesticideThreshold ("OSMIA_PPP_THRESHOLD", CFG_CUSTOM, 10000.0) |
The pesticide body burden threshold for ppp effects. More... | |
static CfgFloat | cfg_OsmiaMinTempForFlying ("OSMIA_MIN_TEMP_FOR_FLYING", CFG_CUSTOM, 6) |
The minimum temperature in degree for osmia to fly out. More... | |
static CfgFloat | cfg_OsmiaMaxWindSpeedForFlying ("OSMIA_MAX_WIND_SPEED_FOR_FLYING", CFG_CUSTOM, 8) |
The maximum wind speed in meter per second for osmia to fly out. More... | |
static CfgFloat | cfg_OsmiaMaxPrecipForFlying ("OSMIA_MAX_PRECIP_FOR_FLYING", CFG_CUSTOM, 0.1) |
The maximum precipitation for osmia to fly out. More... | |
static CfgFloat | cfg_OsmiaOverwinterDegreeDaysInitialSimu ("OSMIA_OVERWINTER_DEGREE_DAYS_INITIAL_SIMU", CFG_CUSTOM, 320) |
The accumulated overwinter degree days for cocoon when initialising the simulations. More... | |
CfgFloat | cfg_OsmiaInCocoonOverwinteringTempThreshold |
Is the temperature developmental threshold for overwintering development (a temperature below which day degrees are not summed) More... | |
CfgFloat | cfg_OsmiaInCocoonEmergenceTempThreshold |
Is the temperature threshold for calculating days left to emergence (a temperature below which days are not counted) More... | |
CfgFloat | cfg_OsmiaFemaleMassMin |
min possible female mass in mg More... | |
CfgFloat | cfg_OsmiaFemaleMassMax |
max possible female mass in mg More... | |
CfgInt | cfg_OsmiaTypicalHomingDistance |
CfgInt | cfg_OsmiaMaxHomingDistance |
Landscape * | g_landscape_ptr |
CfgInt | cfg_OsmiaForageSteps |
CfgInt | cfg_OsmiaDetailedMaskStep |
Step size for the detailed forage mask. Step is each step out from the centre (min 1) More... | |
Version of September 2019
By Chris J. Topping
|
static |
The minimum amount of pollen needed to provision a male cell.
|
static |
The maximum time allowed to construct a cell in days.
Referenced by Osmia_Population_Manager::Init().
|
static |
The minimum time to construct a cell in days.
Referenced by Osmia_Population_Manager::Init().
|
static |
Assumed (fitted) value for the total difference in cocoon mass from first to last cocoon
Referenced by Osmia_Population_Manager::Init().
CfgFloat cfg_OsmiaAdultMassCategoryStep("OSMIA_ADULTMASSCLASSSTEP", CFG_CUSTOM, 10.0) |
The size class step for Osmia female mass.
Referenced by Osmia_Population_Manager::Init(), and Osmia_Female::Init().
|
static |
The probability that a parasitoid is Bombylid - statistical parasitoids only.
Referenced by Osmia_Population_Manager::Init().
CfgFloat cfg_OsmiaCocoonMassFromProvMass("OSMIAS_COCOONTOPROVISIONING", CFG_CUSTOM, 1.0/3.247) |
The relationhip between cocoon massand provisioning mass is linear.
Referenced by Osmia_Population_Manager::Init().
|
static |
Parameter to set the proportion of pollen removed by other bees.
Referenced by Osmia_Population_Manager::Osmia_Population_Manager().
CfgInt cfg_OsmiaDetailedMaskStep |
Step size for the detailed forage mask. Step is each step out from the centre (min 1)
Referenced by Osmia_Population_Manager::Init().
|
static |
The daily background mortality rate for females.
Referenced by Osmia_Population_Manager::Init().
|
static |
Array of parameters for the Osmia female cocoon mass vs mothers age logistic equation
Referenced by Osmia_Population_Manager::Init().
|
static |
Array of parameters for the Osmia female first cocoon mass vs mothers mass linear equation
Referenced by Osmia_Population_Manager::Init().
|
static |
Parameter to set the numbe of nest finding attempts.
Referenced by Osmia_Population_Manager::Init().
CfgFloat cfg_OsmiaFemaleMassMax |
max possible female mass in mg
Referenced by Osmia_Population_Manager::Init(), Osmia_Population_Manager::Osmia_Population_Manager(), and Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaFemaleMassMin |
min possible female mass in mg
Referenced by Osmia_Population_Manager::Init(), Osmia_Population_Manager::Osmia_Population_Manager(), and Osmia_Base::SetParameterValues().
CfgInt cfg_OsmiaForageSteps |
Referenced by Osmia_Population_Manager::Init(), and OsmiaForageMask::OsmiaForageMask().
CfgFloat cfg_OsmiaInCocoonEmergenceTempThreshold |
Is the temperature threshold for calculating days left to emergence (a temperature below which days are not counted)
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaInCocoonOverwinteringTempThreshold |
Is the temperature developmental threshold for overwintering development (a temperature below which day degrees are not summed)
Referenced by Osmia_Base::SetParameterValues().
CfgInt cfg_OsmiaMaxHomingDistance |
Referenced by Osmia_Base::SetParameterValues().
|
static |
The maximum number of eggs planned for a nest
Referenced by Osmia_Population_Manager::Init().
|
static |
The maximum precipitation for osmia to fly out.
Referenced by Osmia_Population_Manager::CalForageHours().
|
static |
The maximum wind speed in meter per second for osmia to fly out.
Referenced by Osmia_Population_Manager::CalForageHours().
|
static |
The mimimum number of eggs planned for a nest.
Referenced by Osmia_Population_Manager::Init().
|
static |
The minimum temperature in degree for osmia to fly out.
Referenced by Osmia_Population_Manager::CalForageHours().
|
static |
Monthly nectar thresholds, 12 quantity then 12 quality. Units mj/m2 and mg/l.
Referenced by Osmia_Population_Manager::Init().
|
static |
Input file for Osmia nest density per LE.
Referenced by Osmia_Nest_Manager::InitOsmiaBeeNesting().
|
static |
The accumulated overwinter degree days for cocoon when initialising the simulations.
Referenced by Osmia_Population_Manager::Osmia_Population_Manager().
|
static |
Montly mortalities for TTypeOfOsmiaParasitoids parasitoids. Each set of 12 are the mortalities matching the order in the enum class TTypeOfOsmiaParasitoids.
Referenced by OsmiaParasitoid_Population_Manager::OsmiaParasitoid_Population_Manager().
|
static |
Dispersal rates for TTypeOfOsmiaParasitoids parasitoids. Each entry is the dispersal rate for the parasitoid type matching the order in the enum class TTypeOfOsmiaParasitoids.
Referenced by OsmiaParasitoid_Population_Manager::OsmiaParasitoid_Population_Manager().
|
static |
The conversion rate from timethe cell is open to open cell parasitism.
Referenced by Osmia_Population_Manager::Init().
|
static |
Starting numbers for TTypeOfOsmiaParasitoids parasitoids. Each entry is the max and min starting numbers per sub-population for the parasitoid type matching the order in the enum class TTypeOfOsmiaParasitoids.
Referenced by OsmiaParasitoid_Population_Manager::OsmiaParasitoid_Population_Manager().
|
static |
Array of parameters for per capita parasitoid probability for each type of parasitoid in the order based on TTypeOfOsmiaParasitoids.
Referenced by Osmia_Population_Manager::Init().
|
static |
The probability of death per day if the pesticide body burden threshold is exceeded.
Referenced by Osmia_Population_Manager::Init().
|
static |
The pesticide body burden threshold for ppp effects.
Referenced by Osmia_Population_Manager::Init().
|
static |
The change in proportion pollen before a new patch is selected.
Referenced by Osmia_Population_Manager::Init().
|
static |
The change in proportion pollen before a new patch is selected.
Referenced by Osmia_Population_Manager::Init().
|
static |
Monthly pollen thresholds, 12 quantity then 12 quality. Units mg/m2 and unitless.
Referenced by Osmia_Population_Manager::Init().
|
static |
This array is the daily rate of development of prepupa with temperature rounded to the nearest degree (0-41 degrees.
Referenced by Osmia_Population_Manager::Osmia_Population_Manager().
CfgFloat cfg_OsmiaProvMassFromCocoonMass("OSMIAS_PROVISIONINGTOCOCOON", CFG_CUSTOM, 3.247) |
The relationhip between cocoon mass and provisioning mass is linear.
Referenced by Osmia_Population_Manager::Init().
|
static |
Array of parameters for the Osmia sex ratio vs mothers age logistic equation
Referenced by Osmia_Population_Manager::Init().
|
static |
Array of parameters for the Osmia sex ratio vs mothers mass linear equation
Referenced by Osmia_Population_Manager::Init().
|
static |
The starting number of Osmia InCocoons.
Referenced by Osmia_Population_Manager::Osmia_Population_Manager().
CfgInt cfg_OsmiaTypicalHomingDistance |
Referenced by Osmia_Population_Manager::Init(), and Osmia_Base::SetParameterValues().
|
static |
The conversion rate from pollen availability score to mg pollen provisioned per day per bee - a fitting parameter.
Referenced by Osmia_Population_Manager::Init().
|
static |
The maximum number of nests possible for a bee.
Referenced by Osmia_Population_Manager::Init().
|
static |
The flag for using mechanistic (true) or statistical (false) parasitoid assumptions.
Referenced by Osmia_Population_Manager::Init().
Landscape* g_landscape_ptr |
Referenced by Osmia_Nest_Manager::InitOsmiaBeeNesting().