![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <iostream>
#include <fstream>
#include <vector>
#include <random>
#include "../BatchALMaSS/ALMaSS_Setup.h"
#include "../ALMaSSDefines.h"
#include "../Landscape/ls.h"
#include "../BatchALMaSS/ALMaSS_Random.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../Osmia/Osmia.h"
#include "../Osmia/Osmia_Population_Manager.h"
Functions | |
static std::uniform_int_distribution< int > | g_uni_0to15 (0, 35) |
Variables | |
MapErrorMsg * | g_msg |
CfgFloat | cfg_OsmiaAdultMassCategoryStep |
The size class step for Osmia female mass. More... | |
CfgFloat | cfg_OsmiaCocoonMassFromProvMass |
The relationhip between cocoon massand provisioning mass is linear. More... | |
CfgFloat | cfg_OsmiaProvMassFromCocoonMass |
The relationhip between cocoon mass and provisioning mass is linear. More... | |
CfgInt | l_pest_NoPPPs |
The number of active Plant Protection Products to be tracked - a performance penalty if enabled with more than necessary (memory heavy) More... | |
static CfgFloat | cfg_OsmiaEggDevelTotalDD ("OSMIA_EGGDEVELDD", CFG_CUSTOM, 86.0) |
Is the number of day degrees needed for egg hatch above the developmental threshold for eggs. More... | |
static CfgFloat | cfg_OsmiaEggDevelThreshold ("OSMIA_EGGDEVELTHRESHOLD", CFG_CUSTOM, 0.0) |
Is temperature developmental threshold for egg development. More... | |
static CfgFloat | cfg_OsmiaLarvaDevelTotalDD ("OSMIA_LARVADEVELDD", CFG_CUSTOM, 422) |
Is the number of day degrees needed for larval hatch above the developmental threshold for larvae. More... | |
static CfgFloat | cfg_OsmiaLarvaDevelThreshold ("OSMIA_LARVADEVELTHRESHOLD", CFG_CUSTOM, 4.5) |
Is temperature developmental threshold for larval development. More... | |
static CfgFloat | cfg_OsmiaPupaDevelTotalDD ("OSMIA_PUPADEVELDD", CFG_CUSTOM, 570) |
Is the number of day degrees needed for pupal hatch above the developmental threshold for pupae. More... | |
static CfgFloat | cfg_OsmiaPupaDevelThreshold ("OSMIA_PUPADEVELTHRESHOLD", CFG_CUSTOM, 1.1) |
Is temperature developmental threshold for pupal development. More... | |
CfgFloat | cfg_OsmiaInCocoonOverwinteringTempThreshold ("OSMIA_INCOCOONOVERWINTERINGTEMPTHRESHOLD", CFG_CUSTOM, 0.0) |
Is the temperature developmental threshold for overwintering development (a temperature below which day degrees are not summed) More... | |
CfgFloat | cfg_OsmiaInCocoonEmergenceTempThreshold ("OSMIA_INCOCOONEMERGENCETEMPTHRESHOLD", CFG_CUSTOM, 5.0) |
Is the temperature threshold for calculating days left to emergence (a temperature below which days are not counted) More... | |
CfgFloat | cfg_OsmiaInCocoonPrewinteringTempThreshold ("OSMIA_INCOCOONPREWINTERINGTEMPTHRESHOLD", CFG_CUSTOM, 15.0) |
Is the temperature developmental threshold for prewintering development (a temperature below which day degrees are not summed) More... | |
static CfgFloat | cfg_OsmiaPrepupaDevelTotalDays ("OSMIA_PREPUPADEVELDAYS", CFG_CUSTOM, 45) |
This is maximal (reached at optimal temperature) developmental speed (in days) for prepupal stages. More... | |
CfgFloat | cfg_OsmiaInCocoonEmergCountConst ("OSMIA_INCOCOONEMERGENCECOUNTERCONST", CFG_CUSTOM, 35.4819) |
Constant term in emergence counter equation for Osmia in cocoon. More... | |
CfgFloat | cfg_OsmiaInCocoonEmergCountSlope ("OSMIA_INCOCOONEMERGENCECOUNTERSLOPE", CFG_CUSTOM, -0.0147) |
Coefficient in emergence counter equation for Osmia in cocoon. More... | |
static CfgFloat | cfg_OsmiaEggDailyMORT ("OSMIA_EGGDAILYMORT", CFG_CUSTOM, 0.0014) |
Daily unspecified mortality for Osmia eggs. More... | |
static CfgFloat | cfg_OsmiaLarvaDailyMORT ("OSMIA_LARVADAILYMORT", CFG_CUSTOM, 0.0014) |
Daily unspecified mortality for Osmia larvae. More... | |
static CfgFloat | cfg_OsmiaPrepupaDailyMORT ("OSMIA_PREPUPADAILYMORT", CFG_CUSTOM, 0.003) |
Daily unspecified mortality for Osmia prepupae. More... | |
static CfgFloat | cfg_OsmiaPupaDailyMORT ("OSMIA_PUPADAILYMORT", CFG_CUSTOM, 0.003) |
Daily unspecified mortality for Osmia pupae. More... | |
CfgFloat | cfg_OsmiaInCocoonWinterMortConst ("OSMIA_INCOCOONWINTERMORTCONST", CFG_CUSTOM, -4.63) |
Constant term in winter mortality equation for Osmia in cocoon. More... | |
CfgFloat | cfg_OsmiaInCocoonWinterMortSlope ("OSMIA_INCOCOONWINTERMORTSLOPE", CFG_CUSTOM, 0.05) |
Coefficient in winter mortality equation for Osmia in cocoon. More... | |
CfgFloat | cfg_OsmiaEggPesticideDeathAmount ("OSMIA_EGG_PESTICIDE_DEATH_AMOUNT", CFG_CUSTOM, 0.03) |
The threshold of pesticide amount kills an egg. This is the value of pesticide in the pollen when the egg is laid. More... | |
CfgFloat | cfg_OsmiaMaleMassMin ("OSMIA_MINMALEMASS", CFG_CUSTOM, 88) |
min possible male mass in mg More... | |
CfgFloat | cfg_OsmiaMaleMassMax ("OSMIA_MAXMALEMASS", CFG_CUSTOM, 105.0) |
min possible male mass in mg More... | |
CfgFloat | cfg_OsmiaFemaleMassMin ("OSMIA_MINFEMALEMASS", CFG_CUSTOM, 25.0) |
min possible female mass in mg More... | |
CfgFloat | cfg_OsmiaFemaleMassMax ("OSMIA_MAXFEMALEMASS", CFG_CUSTOM, 200.0) |
max possible female mass in mg More... | |
CfgInt | cfg_OsmiaFemalePrenestingDuration ("OSMIA_PRENESTINGDURATION", CFG_CUSTOM, 2) |
duration of prenesting in days More... | |
CfgInt | cfg_OsmiaFemaleLifespan ("OSMIA_LIFESPAN", CFG_CUSTOM, 60) |
max lifespan in days More... | |
CfgFloat | cfg_OsmiaFemaleMassFromProvMassConst ("OSMIA_FEMALEMASSFROMPROVMASSCONST", CFG_CUSTOM, 4.00) |
Constant term in osmia female mass from provision mass calculation. More... | |
CfgFloat | cfg_OsmiaFemaleMassFromProvMassSlope ("OSMIA_FEMALEMASSFROMPROVMASSSLOPE", CFG_CUSTOM, 0.25) |
Coefficient in osmia female mass from provision mass calculation. More... | |
CfgFloat | cfg_OsmiaInsecticideApplication ("BEETLE_OSMIA_INSECTICIDE_APPLICATION", CFG_CUSTOM, 0.8) |
The Osmial simple insecticide mortality parameter. More... | |
CfgFloat | cfg_biocide_reduction_val |
CfgInt | cfg_OsmiaTypicalHomingDistance ("OSMIA_TYPICALHOMINGDISTANCE", CFG_CUSTOM, 660) |
CfgInt | cfg_OsmiaMaxHomingDistance ("OSMIA_MAXHOMINGDISTANCE", CFG_CUSTOM, 1430) |
CfgInt | cfg_OsmiaDetailedMaskStep ("OSMIA_DETAILEDMASKSTEP", CFG_CUSTOM, 1, 1, 100) |
Step size for the detailed forage mask. Step is each step out from the centre (min 1) More... | |
static CfgStr | cfg_OsmiaDispersalMovementProbType ("OSMIA_DISPMOVPROBTYPE", CFG_CUSTOM, "BETA") |
static CfgStr | cfg_OsmiaDispersalMovementProbArgs ("OSMIA_DISPMOVPROBARGS", CFG_CUSTOM, "10 5") |
static CfgStr | cfg_OsmiaGeneralMovementProbType ("OSMIA_GENMOVPROBTYPE", CFG_CUSTOM, "BETA") |
static CfgStr | cfg_OsmiaGenerallMovementProbArgs ("OSMIA_GENMOVPROBARGS", CFG_CUSTOM, "10 5") |
static CfgStr | cfg_OsmiaEggsPerNestProbType ("OSMIA_EGGSPERNESTPROBYPE", CFG_CUSTOM, "BETA") |
Distribution type for the planned eggs per nest probability distribution. More... | |
static CfgStr | cfg_OsmiaEggsPerNestProbArgs ("OSMIA_EGGSPERNESTPROBARGS", CFG_CUSTOM, "1.0 4.00") |
Arguments for the planned eggs per nest probability distribution. More... | |
static CfgStr | cfg_OsmiaEmergenceProbType ("OSMIA_EMERGENCEPROBTYPE", CFG_CUSTOM, "DISCRETE") |
static CfgStr | cfg_OsmiaEmergenceProbArgs ("OSMIA_EMERGENCEPROBARGS", CFG_CUSTOM, "8 7 9 24 20 8 6 5 5 4 4") |
CfgInt | cfg_OsmiaForageSteps ("OSMIA_FORAGESTEPS", CFG_CUSTOM, 20) |
static CfgInt | cfg_OsmiaForageMaskStepSZ ("OSMIA_FORAGEMASKSTEPSZ", CFG_CUSTOM, cfg_OsmiaTypicalHomingDistance.value()/(cfg_OsmiaForageSteps.value() - 1)) |
static CfgFloat | cfg_OsmiaMaxPollen ("OSMIA_MAXPOLLEN", CFG_CUSTOM, 2.5) |
A cap (mg) on the amount of pollen possible to bring back - this is because pollen densities in the landscape can be very high. More... | |
static CfgFloat | cfg_OsmiaSugarPerDay ("OSMIA_NECTAR_PER_DAY", CFG_CUSTOM, 20) |
The amount of sugar in mg that a female osmia needs per day. More... | |
CfgInt | cfg_OsmiaMaxHalfWidthForageMask ("OSMIA_MAX_HALF_WIDTH_FORAGE_MASK", CFG_CUSTOM, 600) |
Half width of the maximum square that a female can search for pollen. More... | |
CfgInt | cfg_OsmiaForageMaskStep ("OSMIA_FORAGE_MASK_STEP", CFG_CUSTOM, 50) |
The incremental for searching resource mask. More... | |
CfgBool | cfg_OsmiaFemaleThresholdBasedPesticideResponse ("OSMIA_FEMALE_THRESHOLD_BASED_PESTICIDE_RESPONSE", CFG_CUSTOM, true) |
The flag to use threshold based pesticide response for females. More... | |
CfgBool | cfg_OsmiaFemaleDamageBasedPesticideResponse ("OSMIA_FEMALE_DAMAGE_BASED_PESTICIDE_RESPONSE", CFG_CUSTOM, false) |
The flag to use damage based pesticide response for females. More... | |
CfgBool | cfg_OsmiaEggThresholdBasedPesticideResponse ("OSMIA_EGG_THRESHOLD_BASED_PESTICIDE_RESPONSE", CFG_CUSTOM, true) |
The flag to use threshold based pesticide response for eggs. More... | |
std::mt19937 | g_generator |
Version of August 2019
By Chris J. Topping
|
static |
Referenced by Osmia_Nest::Osmia_Nest().
CfgFloat cfg_biocide_reduction_val |
Referenced by Osmia_Female::OnFarmEvent().
CfgFloat cfg_OsmiaAdultMassCategoryStep |
The size class step for Osmia female mass.
Referenced by Osmia_Population_Manager::Init(), and Osmia_Female::Init().
CfgFloat cfg_OsmiaCocoonMassFromProvMass |
The relationhip between cocoon massand provisioning mass is linear.
Referenced by Osmia_Population_Manager::Init().
CfgInt cfg_OsmiaDetailedMaskStep("OSMIA_DETAILEDMASKSTEP", CFG_CUSTOM, 1, 1, 100) |
Step size for the detailed forage mask. Step is each step out from the centre (min 1)
Referenced by Osmia_Population_Manager::Init().
|
static |
|
static |
|
static |
Daily unspecified mortality for Osmia eggs.
Referenced by Osmia_Base::SetParameterValues().
|
static |
Is temperature developmental threshold for egg development.
Referenced by Osmia_Base::SetParameterValues().
|
static |
Is the number of day degrees needed for egg hatch above the developmental threshold for eggs.
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaEggPesticideDeathAmount("OSMIA_EGG_PESTICIDE_DEATH_AMOUNT", CFG_CUSTOM, 0.03) |
The threshold of pesticide amount kills an egg. This is the value of pesticide in the pollen when the egg is laid.
Referenced by Osmia_Female::LayEgg().
|
static |
Arguments for the planned eggs per nest probability distribution.
|
static |
Distribution type for the planned eggs per nest probability distribution.
CfgBool cfg_OsmiaEggThresholdBasedPesticideResponse("OSMIA_EGG_THRESHOLD_BASED_PESTICIDE_RESPONSE", CFG_CUSTOM, true) |
The flag to use threshold based pesticide response for eggs.
Referenced by Osmia_Egg::st_Develop().
|
static |
|
static |
CfgBool cfg_OsmiaFemaleDamageBasedPesticideResponse("OSMIA_FEMALE_DAMAGE_BASED_PESTICIDE_RESPONSE", CFG_CUSTOM, false) |
The flag to use damage based pesticide response for females.
Referenced by Osmia_Female::BeginStep().
CfgInt cfg_OsmiaFemaleLifespan("OSMIA_LIFESPAN", CFG_CUSTOM, 60) |
max lifespan in days
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaFemaleMassFromProvMassConst("OSMIA_FEMALEMASSFROMPROVMASSCONST", CFG_CUSTOM, 4.00) |
Constant term in osmia female mass from provision mass calculation.
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaFemaleMassFromProvMassSlope("OSMIA_FEMALEMASSFROMPROVMASSSLOPE", CFG_CUSTOM, 0.25) |
Coefficient in osmia female mass from provision mass calculation.
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaFemaleMassMax("OSMIA_MAXFEMALEMASS", CFG_CUSTOM, 200.0) |
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("OSMIA_MINFEMALEMASS", CFG_CUSTOM, 25.0) |
min possible female mass in mg
Referenced by Osmia_Population_Manager::Init(), Osmia_Population_Manager::Osmia_Population_Manager(), and Osmia_Base::SetParameterValues().
CfgInt cfg_OsmiaFemalePrenestingDuration("OSMIA_PRENESTINGDURATION", CFG_CUSTOM, 2) |
duration of prenesting in days
Referenced by Osmia_Base::SetParameterValues().
CfgBool cfg_OsmiaFemaleThresholdBasedPesticideResponse("OSMIA_FEMALE_THRESHOLD_BASED_PESTICIDE_RESPONSE", CFG_CUSTOM, true) |
The flag to use threshold based pesticide response for females.
Referenced by Osmia_Female::BeginStep().
CfgInt cfg_OsmiaForageMaskStep("OSMIA_FORAGE_MASK_STEP", CFG_CUSTOM, 50) |
The incremental for searching resource mask.
Referenced by Osmia_Female::Forage().
|
static |
Referenced by OsmiaForageMask::OsmiaForageMask().
CfgInt cfg_OsmiaForageSteps("OSMIA_FORAGESTEPS", CFG_CUSTOM, 20) |
Referenced by Osmia_Population_Manager::Init(), and OsmiaForageMask::OsmiaForageMask().
|
static |
|
static |
CfgFloat cfg_OsmiaInCocoonEmergCountConst("OSMIA_INCOCOONEMERGENCECOUNTERCONST", CFG_CUSTOM, 35.4819) |
Constant term in emergence counter equation for Osmia in cocoon.
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaInCocoonEmergCountSlope("OSMIA_INCOCOONEMERGENCECOUNTERSLOPE", CFG_CUSTOM, -0.0147) |
Coefficient in emergence counter equation for Osmia in cocoon.
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaInCocoonEmergenceTempThreshold("OSMIA_INCOCOONEMERGENCETEMPTHRESHOLD", CFG_CUSTOM, 5.0) |
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("OSMIA_INCOCOONOVERWINTERINGTEMPTHRESHOLD", CFG_CUSTOM, 0.0) |
Is the temperature developmental threshold for overwintering development (a temperature below which day degrees are not summed)
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaInCocoonPrewinteringTempThreshold("OSMIA_INCOCOONPREWINTERINGTEMPTHRESHOLD", CFG_CUSTOM, 15.0) |
Is the temperature developmental threshold for prewintering development (a temperature below which day degrees are not summed)
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaInCocoonWinterMortConst("OSMIA_INCOCOONWINTERMORTCONST", CFG_CUSTOM, -4.63) |
Constant term in winter mortality equation for Osmia in cocoon.
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaInCocoonWinterMortSlope("OSMIA_INCOCOONWINTERMORTSLOPE", CFG_CUSTOM, 0.05) |
Coefficient in winter mortality equation for Osmia in cocoon.
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaInsecticideApplication("BEETLE_OSMIA_INSECTICIDE_APPLICATION", CFG_CUSTOM, 0.8) |
The Osmial simple insecticide mortality parameter.
Referenced by Osmia_Female::OnFarmEvent().
|
static |
Daily unspecified mortality for Osmia larvae.
Referenced by Osmia_Base::SetParameterValues().
|
static |
Is temperature developmental threshold for larval development.
Referenced by Osmia_Base::SetParameterValues().
|
static |
Is the number of day degrees needed for larval hatch above the developmental threshold for larvae.
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaMaleMassMax("OSMIA_MAXMALEMASS", CFG_CUSTOM, 105.0) |
min possible male mass in mg
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaMaleMassMin("OSMIA_MINMALEMASS", CFG_CUSTOM, 88) |
min possible male mass in mg
CfgInt cfg_OsmiaMaxHalfWidthForageMask("OSMIA_MAX_HALF_WIDTH_FORAGE_MASK", CFG_CUSTOM, 600) |
Half width of the maximum square that a female can search for pollen.
Referenced by Osmia_Female::Forage().
CfgInt cfg_OsmiaMaxHomingDistance("OSMIA_MAXHOMINGDISTANCE", CFG_CUSTOM, 1430) |
Referenced by Osmia_Base::SetParameterValues().
|
static |
A cap (mg) on the amount of pollen possible to bring back - this is because pollen densities in the landscape can be very high.
Referenced by Osmia_Female::Forage().
|
static |
Daily unspecified mortality for Osmia prepupae.
Referenced by Osmia_Base::SetParameterValues().
|
static |
This is maximal (reached at optimal temperature) developmental speed (in days) for prepupal stages.
Referenced by Osmia_Base::SetParameterValues().
CfgFloat cfg_OsmiaProvMassFromCocoonMass |
The relationhip between cocoon mass and provisioning mass is linear.
Referenced by Osmia_Population_Manager::Init().
|
static |
Daily unspecified mortality for Osmia pupae.
Referenced by Osmia_Base::SetParameterValues().
|
static |
Is temperature developmental threshold for pupal development.
Referenced by Osmia_Base::SetParameterValues().
|
static |
Is the number of day degrees needed for pupal hatch above the developmental threshold for pupae.
Referenced by Osmia_Base::SetParameterValues().
|
static |
The amount of sugar in mg that a female osmia needs per day.
Referenced by Osmia_Female::st_ReproductiveBehaviour().
CfgInt cfg_OsmiaTypicalHomingDistance("OSMIA_TYPICALHOMINGDISTANCE", CFG_CUSTOM, 660) |
Referenced by Osmia_Population_Manager::Init(), and Osmia_Base::SetParameterValues().
std::mt19937 g_generator |
Referenced by Osmia_Nest::Osmia_Nest().
MapErrorMsg* g_msg |
Referenced by Osmia_Female::Init().
CfgInt l_pest_NoPPPs |
The number of active Plant Protection Products to be tracked - a performance penalty if enabled with more than necessary (memory heavy)
Referenced by Osmia_Female::LayEgg(), Pesticide::Pesticide(), and Osmia_Female::st_ReproductiveBehaviour().