API
EcoSISTEM.AbstractAbiotic
EcoSISTEM.AbstractBudget
EcoSISTEM.AbstractCache
EcoSISTEM.AbstractControl
EcoSISTEM.AbstractEcosystem
EcoSISTEM.AbstractEpiEnv
EcoSISTEM.AbstractHabitat
EcoSISTEM.AbstractLandscape
EcoSISTEM.AbstractLookup
EcoSISTEM.AbstractMovement
EcoSISTEM.AbstractParams
EcoSISTEM.AbstractPathogenTypes
EcoSISTEM.AbstractPlaceTransition
EcoSISTEM.AbstractRequirement
EcoSISTEM.AbstractScenario
EcoSISTEM.AbstractSetUp
EcoSISTEM.AbstractSpeciesList
EcoSISTEM.AbstractSpeciesTypes
EcoSISTEM.AbstractStateTransition
EcoSISTEM.AbstractTraitRelationship
EcoSISTEM.AbstractTraits
EcoSISTEM.AbstractTransition
EcoSISTEM.AbstractWindDown
EcoSISTEM.AllDisperse
EcoSISTEM.AlwaysMovement
EcoSISTEM.BirthOnlyMovement
EcoSISTEM.BirthProcess
EcoSISTEM.BoundaryCondition
EcoSISTEM.Cache
EcoSISTEM.CachedEcosystem
EcoSISTEM.CachedEcosystem
EcoSISTEM.CachedGridLandscape
EcoSISTEM.ClimatePref.AbstractClimate
EcoSISTEM.ClimatePref.CERA
EcoSISTEM.ClimatePref.CHELSA_bioclim
EcoSISTEM.ClimatePref.CHELSA_monthly
EcoSISTEM.ClimatePref.CRUTS
EcoSISTEM.ClimatePref.ERA
EcoSISTEM.ClimatePref.Landcover
EcoSISTEM.ClimatePref.Reference
EcoSISTEM.ClimatePref.Worldclim_bioclim
EcoSISTEM.ClimatePref.Worldclim_monthly
EcoSISTEM.ContinuousHab
EcoSISTEM.ContinuousTimeHab
EcoSISTEM.ContinuousTrait
EcoSISTEM.Cylinder
EcoSISTEM.DeathFromInfection
EcoSISTEM.DeathProcess
EcoSISTEM.DevelopSymptoms
EcoSISTEM.DiscreteHab
EcoSISTEM.DiscreteTrait
EcoSISTEM.DiseaseState
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.EnvExposure
EcoSISTEM.EpiCache
EcoSISTEM.EpiLandscape
EcoSISTEM.EpiLookup
EcoSISTEM.EpiMovement
EcoSISTEM.EpiParams
EcoSISTEM.EqualPop
EcoSISTEM.Exposure
EcoSISTEM.FluctScenario
EcoSISTEM.ForceDisperse
EcoSISTEM.ForceProduce
EcoSISTEM.Gauss
EcoSISTEM.GaussTrait
EcoSISTEM.GaussianKernel
EcoSISTEM.GenerateSeed
EcoSISTEM.GridAbioticEnv
EcoSISTEM.GridEpiEnv
EcoSISTEM.GridLandscape
EcoSISTEM.HostTypes
EcoSISTEM.Infection
EcoSISTEM.Lockdown
EcoSISTEM.LongTailKernel
EcoSISTEM.Lookup
EcoSISTEM.MPIEcosystem
EcoSISTEM.MPIGridLandscape
EcoSISTEM.Match
EcoSISTEM.MultiScenario
EcoSISTEM.NoBoundary
EcoSISTEM.NoControl
EcoSISTEM.NoMovement
EcoSISTEM.NoRelContinuous
EcoSISTEM.NoRelDiscrete
EcoSISTEM.PlantCache
EcoSISTEM.PopGrowth
EcoSISTEM.RainBin
EcoSISTEM.Recovery
EcoSISTEM.SeedDisperse
EcoSISTEM.SeedInfection
EcoSISTEM.SimpleBudget
EcoSISTEM.SimpleRequirement
EcoSISTEM.SimpleScenario
EcoSISTEM.SizeRequirement
EcoSISTEM.SolarBudget
EcoSISTEM.SolarRequirement
EcoSISTEM.SolarTimeBudget
EcoSISTEM.SpeciesList
EcoSISTEM.SpeciesList
EcoSISTEM.SpeciesList
EcoSISTEM.SpeciesList
EcoSISTEM.SpeciesLookup
EcoSISTEM.SpeciesTypes
EcoSISTEM.TempBin
EcoSISTEM.Torus
EcoSISTEM.TraitCollection2
EcoSISTEM.TraitCollection3
EcoSISTEM.TransitionList
EcoSISTEM.Trapeze
EcoSISTEM.Trapezoid
EcoSISTEM.Unif
EcoSISTEM.UpdateEnergy
EcoSISTEM.UpdateEnvironment
EcoSISTEM.UpdateEpiEnvironment
EcoSISTEM.ViralLoad
EcoSISTEM.VirusTypes
EcoSISTEM.VolWaterBudget
EcoSISTEM.VolWaterRequirement
EcoSISTEM.VolWaterTimeBudget
EcoSISTEM.WaterBudget
EcoSISTEM.WaterRequirement
EcoSISTEM.WaterTimeBudget
EcoSISTEM.additiveTR2
EcoSISTEM.additiveTR3
EcoSISTEM.multiplicativeTR2
EcoSISTEM.multiplicativeTR3
Base.isapprox
Base.read
EcoSISTEM.BM
EcoSISTEM.ClimatePref.convert_coords
EcoSISTEM.ClimatePref.create_reference
EcoSISTEM.ClimatePref.downresolution
EcoSISTEM.ClimatePref.downresolution!
EcoSISTEM.ClimatePref.env_bool
EcoSISTEM.ClimatePref.extractvalues
EcoSISTEM.ClimatePref.extractvalues
EcoSISTEM.ClimatePref.extractvalues
EcoSISTEM.ClimatePref.extractvalues
EcoSISTEM.ClimatePref.readCERA
EcoSISTEM.ClimatePref.readCHELSA_monthly
EcoSISTEM.ClimatePref.readCRUTS
EcoSISTEM.ClimatePref.readERA
EcoSISTEM.ClimatePref.readERA
EcoSISTEM.ClimatePref.readMet
EcoSISTEM.ClimatePref.readMet_raw
EcoSISTEM.ClimatePref.readMet_raw
EcoSISTEM.ClimatePref.readbioclim
EcoSISTEM.ClimatePref.readfile
EcoSISTEM.ClimatePref.readlc
EcoSISTEM.ClimatePref.readworldclim
EcoSISTEM.ClimatePref.searchdir
EcoSISTEM.ClimatePref.upresolution
EcoSISTEM.ContinuousEvolve
EcoSISTEM.DiscreteEvolve
EcoSISTEM.HabitatLoss
EcoSISTEM.NoChange
EcoSISTEM.RainfallChange
EcoSISTEM.SEI3HRD_wrapper
EcoSISTEM.SEI3HRD_wrapper!
EcoSISTEM.SIR_wrapper
EcoSISTEM.SIR_wrapper!
EcoSISTEM.TempChange
EcoSISTEM.TempFluct
EcoSISTEM._construct_shrunk_matrix
EcoSISTEM._convert_population
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM.abundances
EcoSISTEM.addspecies!
EcoSISTEM.addtransition!
EcoSISTEM.addtransition!
EcoSISTEM.addtransition!
EcoSISTEM.addtransition!
EcoSISTEM.applycontrols!
EcoSISTEM.assign_traits!
EcoSISTEM.assign_traits!
EcoSISTEM.bioclimAE
EcoSISTEM.biodiversity_update!
EcoSISTEM.budgetupdate!
EcoSISTEM.calc_lookup_moves!
EcoSISTEM.classupdate!
EcoSISTEM.combineTR
EcoSISTEM.convert_coords
EcoSISTEM.convert_population
EcoSISTEM.create_cache
EcoSISTEM.create_cache
EcoSISTEM.create_cache
EcoSISTEM.emptyepilandscape
EcoSISTEM.emptygridlandscape
EcoSISTEM.emptypopulate!
EcoSISTEM.energy_adjustment
EcoSISTEM.epi_update!
EcoSISTEM.equalpop
EcoSISTEM.eraAE
EcoSISTEM.eraChange
EcoSISTEM.genlookups
EcoSISTEM.geom_mean_abun
EcoSISTEM.get_env
EcoSISTEM.get_neighbours
EcoSISTEM.get_traits
EcoSISTEM.getbudget
EcoSISTEM.getdestination
EcoSISTEM.getdimension
EcoSISTEM.getdispersaldist
EcoSISTEM.getdispersalvar
EcoSISTEM.getgridsize
EcoSISTEM.gethabitat
EcoSISTEM.getlocation
EcoSISTEM.getlocation
EcoSISTEM.getlookup
EcoSISTEM.getpathogentraits
EcoSISTEM.getpref
EcoSISTEM.getprob
EcoSISTEM.getrelationship
EcoSISTEM.getsize
EcoSISTEM.getspecies
EcoSISTEM.getspecies
EcoSISTEM.getspeciestraits
EcoSISTEM.gettraitrel
EcoSISTEM.gettransitions
EcoSISTEM.habitatupdate!
EcoSISTEM.initialise_output
EcoSISTEM.invalidatecaches!
EcoSISTEM.makeunique
EcoSISTEM.mean_abun
EcoSISTEM.meta_shannon
EcoSISTEM.meta_simpson
EcoSISTEM.meta_speciesrichness
EcoSISTEM.move!
EcoSISTEM.pd
EcoSISTEM.peakedgradAE
EcoSISTEM.plot_epidynamics
EcoSISTEM.plot_epiheatmaps
EcoSISTEM.populate!
EcoSISTEM.raingrad
EcoSISTEM.raingradAE
EcoSISTEM.randomniches
EcoSISTEM.reenergise!
EcoSISTEM.repopulate!
EcoSISTEM.resetrate!
EcoSISTEM.resettime!
EcoSISTEM.run_rule!
EcoSISTEM.runscenario!
EcoSISTEM.shrink_to_active
EcoSISTEM.simplehabitat
EcoSISTEM.simplehabitatAE
EcoSISTEM.simplehabitatAE
EcoSISTEM.simplenicheAE
EcoSISTEM.simulate!
EcoSISTEM.simulate_record!
EcoSISTEM.sorenson
EcoSISTEM.sum_pop
EcoSISTEM.tematch
EcoSISTEM.tempgrad
EcoSISTEM.tempgradAE
EcoSISTEM.traitfun
EcoSISTEM.traitfun
EcoSISTEM.traitpopulate!
EcoSISTEM.traitrepopulate!
EcoSISTEM.transition
EcoSISTEM.trmatch
EcoSISTEM.ukChange
EcoSISTEM.update!
EcoSISTEM.update!
EcoSISTEM.update!
EcoSISTEM.update_energy_usage!
EcoSISTEM.update_environment!
EcoSISTEM.update_epi_environment!
EcoSISTEM.update_output
EcoSISTEM.update_virus_cache!
EcoSISTEM.virusmove!
EcoSISTEM.virusupdate!
EcoSISTEM.worldclimAE
EcoSISTEM.worldclimChange
EcoSISTEM.AbstractAbiotic
— TypeAbstractAbiotic{H <: AbstractHabitat, B <: AbstractBudget} <: AbstractPartition
Abstract supertype for all abiotic environment types and a subtype of AbstractPartition
EcoSISTEM.AbstractBudget
— TypeAbstractBudget
Abstract supertype for all budget types
EcoSISTEM.AbstractCache
— TypeAbstractCache
Abstract type for Ecosystem
caches.
EcoSISTEM.AbstractControl
— TypeAbstractControl
Abstract type for all control strategies.
EcoSISTEM.AbstractEcosystem
— TypeAbstractEcosystem{L <: AbstractLandscape, Part <: AbstractPartition, SL <: AbstractSpeciesList,
TR <: AbstractTraitRelationship, LU <: AbstractLookup, C <: AbstractCache} <:
AbstractMetacommunity{Float64, Matrix{Int64}, Matrix{Float64}, SL, Part}
Abstract type for Ecosystem
s which is a subtype of AbstractMetacommunity
.
EcoSISTEM.AbstractEpiEnv
— TypeAbstractEpiEnv{H <: AbstractHabitat, C <: AbstractControl} <:
AbstractPartition{H}
Abstract supertype for all epi environment types and a subtype of AbstractPartition.
EcoSISTEM.AbstractHabitat
— TypeAbstractHabitat
Abstract supertype for all habitat types
EcoSISTEM.AbstractLandscape
— TypeAbstractLandscape
Abstract type for landscapes.
EcoSISTEM.AbstractLookup
— TypeAbstractLookup
Abstract type for lookups.
EcoSISTEM.AbstractMovement
— TypeAbstractMovement
Abstract supertype of movements
EcoSISTEM.AbstractParams
— TypeAbstractParams
Abstract supertype for all simulation parameter types
EcoSISTEM.AbstractPathogenTypes
— TypeAbstractPathogenTypes <: AbstractTypes
Abstract type for pathogen types, which is a subtype of AbstractTypes
.
EcoSISTEM.AbstractPlaceTransition
— TypeAbstractPlaceTransition <: AbstractTransition
Abstract type for place transitions. Place transitions occur across multiple grid squares for a single type, e.g. dispersal of seeds across the landscape.
EcoSISTEM.AbstractRequirement
— TypeAbstract1Requirement{Energy}
Abstract supertype for all species energy requirement types, parameterised by the type(s) of energy required Energy
.
EcoSISTEM.AbstractScenario
— TypeAbstractScenario
Abstract supertype for all whole ecosystem change scenarios
EcoSISTEM.AbstractSetUp
— TypeAbstractSetUp <: AbstractTransition
Abstract type for transitions that set up the Ecosystem
at the start of the timestep.
EcoSISTEM.AbstractSpeciesList
— TypeAbstractSpeciesList <: AbstractTypes
Abstract type for species lists, which is a subtype of AbstractTypes
.
EcoSISTEM.AbstractSpeciesTypes
— TypeAbstractSpeciesTypes <: AbstractTypes
Abstract type for species types, which is a subtype of AbstractTypes
.
EcoSISTEM.AbstractStateTransition
— TypeAbstractStateTransition <: AbstractTransition
Abstract type for state transitions. State transitions occur between types within a single grid square, e.g. growth between age categories, or transitions between disease categories.
EcoSISTEM.AbstractTraitRelationship
— TypeAbstractTraitRelationship{TR}
The abstract supertype of relationships between a trait and its environment, parameterised on any TR.
EcoSISTEM.AbstractTraits
— TypeAbstractTraits{T}
Abstract supertype for all trait types, parameterised by traits of any type T
.
EcoSISTEM.AbstractTransition
— TypeAbstractTransition
Abstract type for all transitions.
EcoSISTEM.AbstractWindDown
— TypeAbstractWindDown <: AbstractTransition
Abstract type for transitions that wind down the Ecosystem
at the end of the timestep.
EcoSISTEM.AllDisperse
— TypeAllDisperse <: AbstractPlaceTransition
Stochastic dispersal for a species at a location.
EcoSISTEM.AlwaysMovement
— TypeAlwaysMovement{K <: AbstractKernel, B <: BoundaryCondition} <: AbstractMovement
Movement can happen to any individual ("animal-like").
EcoSISTEM.BirthOnlyMovement
— TypeBirthOnlyMovement{K <: AbstractKernel, B <: BoundaryCondition} <: AbstractMovement
Movement can only happen to individuals that have just been born ("plant-like").
EcoSISTEM.BirthProcess
— TypeBirthProcess <: AbstractStateTransition
Stochastic birth process for a location and species, with an associated probability. An optional destination argument can be added if the birth should be added to a different category (i.e. age structured).
EcoSISTEM.BoundaryCondition
— TypeBoundaryCondition
An abstract type for what should happen at the boundaries of an ecosystem.
EcoSISTEM.Cache
— TypeCache
Cache houses an integer array of moves made by all species in a timestep for the update! function, netmigration
, a matrix of current resource used in the Ecosystem, totalE
, and a Bool to say if these caches are valid
.
EcoSISTEM.CachedEcosystem
— TypeCachedEcosystem{Part <: AbstractAbiotic, SL <: SpeciesList,
TR <: AbstractTraitRelationship} <: AbstractEcosystem{Part, SL, TR}
CachedEcosystem houses the same information as Ecosystem (see ?Ecosystem), but holds the time period abundances as a CachedGridLandscape, so that they may be present or missing.
EcoSISTEM.CachedEcosystem
— MethodCachedEcosystem(eco::Ecosystem, outputfile::String, rng::StepRangeLen)
Function to create a CachedEcosystem given an existing ecosystem, eco
, output folder to which the simulations are saved, outputfile
, and a range of times over which to simulate, rng
.
EcoSISTEM.CachedGridLandscape
— TypeCachedGridLandscape
Ecosystem abundances housed in the cached landscape. These are either stored in the matrix or output to a cache.
EcoSISTEM.ContinuousHab
— TypeContinuousHab{C <: Number} <: AbstractHabitat{C}
This habitat subtype houses a habitat matrix matrix
of any units, a grid square size size
and HabitatUpdate type change
.
EcoSISTEM.ContinuousTimeHab
— TypeContinuousTimeHab{C <: Number, M <: AbstractArray{C, 3}} <: AbstractHabitat{C}
This habitat subtype houses a habitat matrix matrix
of any units, the time slice of the habitat matrix currently being operated on time
, a grid square size size
and HabitatUpdate type change
.
EcoSISTEM.ContinuousTrait
— TypeContinuousTrait{C <: Number} <: AbstractTraits{T}
Abstract trait type that holds information on a single continuous trait for each species, of any Number type C
.
EcoSISTEM.Cylinder
— TypeCylinder <: BoundaryCondition
A cylindrical boundary where species can cross the x boundary but not the y.
EcoSISTEM.DeathFromInfection
— TypeDeathFromInfection <: AbstractStateTransition
Transition from infected to dead category at a set probability, prob
.
EcoSISTEM.DeathProcess
— TypeDeathProcess <: AbstractStateTransition
Stochastic death process for a location and species, with an associated probability.
EcoSISTEM.DevelopSymptoms
— TypeDevelopSymptoms <: AbstractStateTransition
Transition from pre-infectious to infectious categories at a set probability, prob
. Any infectious category can be designated through destination
.
EcoSISTEM.DiscreteHab
— TypeDiscreteHab <: AbstractHabitat{String}
This habitat subtype has a matrix of strings and a float grid square size
EcoSISTEM.DiscreteTrait
— TypeBasicTrait{T} <: AbstractTraits{T}
Basic trait type that holds information on a single trait for each species, of any type T
.
EcoSISTEM.DiseaseState
— Typeenum: DiseaseState
Disease state of a group, from: Susceptible Infectious Removed OtherDiseaseState
EcoSISTEM.Ecosystem
— TypeEcosystem{L <: AbstractLandscape, Part <: AbstractPartition, SL <: AbstractSpeciesList,
TR <: AbstractTraitRelationship, LU <: AbstractLookup, C <: AbstractCache} <:
AbstractEcosystem{L, Part, SL, TR, LU, C}
Ecosystem
type which is a subtype of AbstractEcosystem
. It houses information on the abundances of species in the landscape, abundances
, information about those species, spplist
, information about the abiotic environment, abenv
, the ordinariness
(for Diversity.jl calculations), the relationship
between the species and their environment, a pre-calculated lookup
of all possible moves that could be made by each species, a cache
, and a list of transitions
.
EcoSISTEM.Ecosystem
— MethodEcosystem(spplist::SpeciesList, abenv::GridAbioticEnv, rel::AbstractTraitRelationship; transitions::Union{Nothing, TransitionList} = nothing)
Function to create an Ecosystem
with species from a SpeciesList
, environment from a GridAbioticEnvironment
, an AbstractTraitRelationship
between the two, and a list of transitions
. The Ecosystem
is automatically and randomly populated from the start abundances in spplist
.
EcoSISTEM.Ecosystem
— MethodEcosystem(abundances::EpiLandscape{U, VecRNGType}, epilist::EL, epienv::EE, ordinariness::Union{Matrix{Float64}, Missing}, relationship::ER, lookup::EpiLookup, vm::Array{Float64, 2}, initial_infected::Int64, valid::Bool, transitions::Union{Nothing, TransitionList} ) where {U <: Integer, VecRNGType <: AbstractVector{<:Random.AbstractRNG}, EE <: AbstractEpiEnv, EL <: SpeciesList, ER <: AbstractTraitRelationship}
Function to create an Ecosystem
with epi categories from a SpeciesList
, environment from a AbstractEpiEnvironment
, an AbstractTraitRelationship
between the two, an EpiLookup
of pre-determined moves, information for the EpiCache
(initial_infected
, valid
and vm
) and a list of transitions
. An EpiCache
is automatically generated.
EcoSISTEM.Ecosystem
— MethodEcosystem(popfun::F, spplist::SpeciesList{T, Req}, abenv::GridAbioticEnv, rel::AbstractTraitRelationship; transitions::Union{Nothing, TransitionList} = nothing) where {F<:Function, T, Req}
Function to create an Ecosystem
with species from a SpeciesList
, environment from a GridAbioticEnvironment
, an AbstractTraitRelationship
between the two, and a list of transitions
. The Ecosystem
can be populated with a popfun.
EcoSISTEM.Ecosystem
— MethodEcosystem(popfun::F, epilist::SpeciesList, epienv::GridEpiEnv, rel::AbstractTraitRelationship, intnum::U; initial_infected = 0, rngtype::Type{R} = Random.MersenneTwister, transitions = nothing) where {F<:Function, U <: Integer, R <: Random.AbstractRNG}
Function to create an Ecosystem
with epi categories from a SpeciesList
, environment from a GridEpiEnv
, an AbstractTraitRelationship
between the two, an indication of what integer type the abundances should be stored in intnum
, an optional number of initial_infected
to be seeded, and optional type for rand calls, rngtype
, and an optional list of transitions
. The Ecosystem
can be populated with a popfun.
EcoSISTEM.Ecosystem
— MethodEcosystem(epilist::SpeciesList, epienv::GridEpiEnv, rel::AbstractTraitRelationship, intnum::U = Int64(1); initial_infected = 0, rngtype::Type{R} = Random.MersenneTwister, transitions = nothing ) where {U <: Integer, R <: Random.AbstractRNG}
Function to create an Ecosystem
with epi categories from a SpeciesList
, environment from a GridEpiEnv
, an AbstractTraitRelationship
between the two, an indication of what integer type the abundances should be stored in intnum
, an optional number of initial_infected
to be seeded, and optional type for rand calls, rngtype
, and an optional list of transitions
. The Ecosystem
is automatically and randomly populated from the start abundances in spplist
.
EcoSISTEM.EnvExposure
— TypeEnvExposure <: AbstractStateTransition
Transition for exposure of susceptibles to force of infection and environmental reservoir at set probabilities, force_prob
and virus_prob
respectively. This exposure mechanism is influenced by the local environment (fetched through the get_env
function), controlled by the strength of env_param
.
EcoSISTEM.EpiCache
— TypeEpiCache
EpiCache houses a float array of moves made by all force of infection categories in a timestep for the update! function, virusmigration
, an integer of how many initially infected individuals are introduced to the system, an array of locations that are active in the system, ordered_active
, and a Bool to say if these caches are valid
.
EcoSISTEM.EpiLandscape
— TypeEpiLandscape
Disease class abundances housed in the landscape. These are represented in both 2 dimensions (for computational efficiency in simulations) and 3 dimensions (to represent disease classes, their abundances and position in the grid).
EcoSISTEM.EpiLookup
— TypeEpiLookup <: AbstractLookup
EpiLookup holds sparse matrices of local (locallookup
) and commuting (regionlookup
) moves for epi simulations.
EcoSISTEM.EpiMovement
— TypeEpiMovement{MO <: AbstractMovement} <: AbstractMovement
Movement can happen at several different levels, local gaussian processes, localmoves
, and longer distance moves, regionmoves
.
EcoSISTEM.EpiParams
— TypeEpiParams{U <: Unitful.Units} <: AbstractParams
Parameter set for any epi model type, which stores information on birth, virus generation and decay probabilities, as well as matrices for transitions between different states. transition
houses straightforward transition probabilities between classes, whereas transition_virus
houses probabilities that should be multiplied by the amount of virus in the system, such as infection transitions.
EcoSISTEM.EqualPop
— TypeEqualPop <: AbstractParams
Parameter type that holds information on a population's birth and death rates, birth
and death
, specifically populations where all species have the same information. l
represents the longevity of species based on their energy requirements and s
is the survival of species dependent on how well their traits reflect the environment. Finally boost
is used to manipulate how much of a boost the species get from being in an environment with lots of available energy.
EcoSISTEM.Exposure
— TypeExposure <: AbstractStateTransition
Transition for exposure of susceptibles to force of infection and environmental reservoir at set probabilities, force_prob
and virus_prob
respectively.
EcoSISTEM.FluctScenario
— TypeFluctScenario <: AbstractScenario
This scenario type holds a function that acts to fluctuate the environment.
EcoSISTEM.ForceDisperse
— TypeForceDisperse <: AbstractStateTransition
Transition to disperse force of infection from a location
.
EcoSISTEM.ForceProduce
— TypeForceProduce <: AbstractStateTransition
Transition to produce force of infection from an infectious category at a set probability, prob
.
EcoSISTEM.Gauss
— TypeGauss{TR} <: AbstractTraitRelationship{TR}
The Gaussian relationship between a continuous trait and its environment, paramaterised on any TR.
EcoSISTEM.GaussTrait
— TypeGaussTrait{C <: Number} <: ContinuousTrait{C}
Trait type that holds Gaussian mean and variance trait information for each species, of any number type C
.
EcoSISTEM.GaussianKernel
— TypeGaussianKernel <: AbstractKernel
GaussianMovement holds parameters for a gaussian movement kernel; a dispersal variance for a species, var
, and a threshold, thresh
, beyond which dispersal cannot take place.
EcoSISTEM.GenerateSeed
— TypeGenerateSeed <: AbstractStateTransition
Stochastic seed generation process for a location and species, with an associated probability. An optional destination argument can be added if the seed produced should be added to a different category (i.e. age structured).
EcoSISTEM.GridAbioticEnv
— TypeGridAbioticEnv{H, B} <: AbstractAbiotic{H, B}
This abiotic environment type holds a habitat and budget, as well as a string of subcommunity names.
EcoSISTEM.GridEpiEnv
— TypeGridEpiEnv{H, C} <: AbstractAbiotic{H, C}
This epi environment type holds a habitat and control strategy, as well as a string of subcommunity names, and initial susceptible population.
EcoSISTEM.GridLandscape
— TypeGridLandscape
Ecosystem abundances housed in the landscape. These are represented in both 2 dimensions (for computational efficiency in simulations) and 3 dimensions (to represent species, their abundances and position in the grid).
EcoSISTEM.HostTypes
— TypeHostTypes{MO <: AbstractMovement,
T <: AbstractTypes} <: AbstractTypes
HostTypes holds information on the host disease classes, such as the name of each class, their initial abundances and types, as well as how they disperse virus across the landscape.
EcoSISTEM.Infection
— TypeInfection <: AbstractStateTransition
Transition from exposed to infectious categories at a set probability, prob
. Any infectious category can be designated through destination
.
EcoSISTEM.Lockdown
— TypeLockdown <: AbstractControl
EcoSISTEM.LongTailKernel
— TypeLongTailKernel <: AbstractKernel
LongTailKernel holds parameters for a movement kernel; a dispersal variance for a species, var
, and a threshold, thresh
, beyond which dispersal cannot take place.
EcoSISTEM.Lookup
— TypeLookup
Lookup houses information on x
, y
grid locations and the probability of occurrence at the location for the species in question p
. pnew
and moves
are initially empty storage and written over by the movement step in update!(). pnew
is the recalculated probability based on which directions are available and moves
is the number of moves to that grid location in that step.
EcoSISTEM.MPIEcosystem
— TypeMPIEcosystem{MPIGL <: MPIGridLandscape, Part <: AbstractAbiotic,
SL <: SpeciesList, TR <: AbstractTraitRelationship} <: AbstractEcosystem{Part, SL, TR}
MPIEcosystem houses information on species and their interaction with their environment. It houses all information of a normal Ecosystem
(see documentation for more details), with additional fields to describe which species are calculated on which machine. This includes: sppcounts
- a vector of number of species per node, firstsp
- the identity of the first species held by that particular node.
EcoSISTEM.MPIGridLandscape
— TypeMPIGridLandscape{RA <: Base.ReshapedArray, NT <: NamedTuple}
MPIEcosystem abundances housed in the landscape, shared across multiple nodes.
EcoSISTEM.Match
— TypeMatch{TR} <: AbstractTraitRelationship{TR}
The relationship between a discrete trait and its environment, paramaterised on any TR. Current conditions are matched to a trait preference and checked for a match.
EcoSISTEM.MultiScenario
— TypeMultiScenario{S1 <: AbstractScenario, S2 <: AbstractScenario} <: AbstractScenario
This scenario type holds multiple different scenario types.
EcoSISTEM.NoBoundary
— TypeNoBoundary <: BoundaryCondition
A hard boundary where no species can cross.
EcoSISTEM.NoControl
— TypeNoControl <: AbstractControl
Default strategy, which implements no control measures.
EcoSISTEM.NoMovement
— TypeNoMovement{K <: AbstractKernel, B <: BoundaryCondition} <: AbstractMovement
No movement can take place.
EcoSISTEM.NoRelContinuous
— TypeNoRelContinuous{TR} <: AbstractTraitRelationship{TR}
The absense of a relationship between a continuous trait and its environment, paramaterised on any TR. Returns the value 1.
EcoSISTEM.NoRelDiscrete
— TypeNoRelDiscrete{TR} <: AbstractTraitRelationship{TR}
The absense of a relationship between a discrete trait and its environment, paramaterised on any TR. Returns the value 1.
EcoSISTEM.PlantCache
— TypePlantCache
Cache houses an integer array of seed production made by all species in the Ecosystem, seedbank
, moves made by all dispersing seeds in a timestep, netmigration
, a matrix of current resource used in the Ecosystem, totalE
, and a Bool to say if these caches are valid
.
EcoSISTEM.PopGrowth
— TypePopGrowth <: AbstractParams
Basic parameter type that holds information on a population's birth and death rates, birth
and death
, as well as how these are altered by energy availability. l
represents the longevity of species based on their energy requirements and s
is the survival of species dependent on how well their traits reflect the environment.
EcoSISTEM.RainBin
— TypeRainBin{C <: Int} <: ContinuousTrait{C}
Trait type that holds binned rainfall preference information created through ClimatePref. Holds an array of counts per rainfall band (mm).
EcoSISTEM.Recovery
— TypeRecovery <: AbstractStateTransition
Transition from infected to recovered category at a set probability, prob
.
EcoSISTEM.SeedDisperse
— TypeSeedDisperse <: AbstractPlaceTransition
Stochastic seed dispersal for a species at a location.
EcoSISTEM.SeedInfection
— TypeSeedInfection <: AbstractWindDown
Transition to update caches at end of update timestep, described in update_fun
.
EcoSISTEM.SimpleBudget
— TypeSimpleBudget <: AbstractBudget{Float64}
This budget type has a matrix of floats, representing the energy budget of each subcommunity in the abiotic environment.
EcoSISTEM.SimpleRequirement
— TypeSimpleRequirement <: Abstract1Requirement{Float64}
A simple energy requirement is a single float for each species.
EcoSISTEM.SimpleScenario
— TypeSimpleScenario <: AbstractScenario
This scenario type holds a function that acts to change the entire ecosystem.
EcoSISTEM.SizeRequirement
— TypeSizeRequirement <: Abstract1Requirement{Float64}
A simple energy requirement is a single float for each species.
EcoSISTEM.SolarBudget
— TypeSolarBudget <: AbstractBudget{typeof(1.0*kJ)}
This budget type has a matrix of solar energy units, representing the energy budget of each subcommunity in the abiotic environment at a fixed point in time.
EcoSISTEM.SolarRequirement
— TypeSolarRequirement <: Abstract1Requirement{typeof(1.0*kJ)}
A vector of solar energy requirements (kJ) for each species.
EcoSISTEM.SolarTimeBudget
— TypeSolarTimeBudget <: AbstractBudget{typeof(1.0*kJ)}
This budget type has a matrix of solar energy units, representing the energy budget of each subcommunity in the abiotic environment along with which time dimension we are interested in.
EcoSISTEM.SpeciesList
— TypeSpeciesList{S <: AbstractSpeciesTypes, P <: AbstractPathogenTypes, PA <: AbstractParams} <: AbstractSpeciesList
SpeciesList
holds information on any species
types, pathogens
types and associated parameters, params
.
EcoSISTEM.SpeciesList
— MethodSpeciesList(traits::TR, virus_abun::DataFrame, host_abun::DataFrame,
movement::MO, transitions::DataFrame, params::NamedTuple,
age_categories::Int64 = 1, movement_balance::NamedTuple = (local_balance = fill(1.0, nrow(host_abun) * age_categories), region_balance = fill(0.0, nrow(host_abun) * age_categories))) where {TR <: AbstractTraits, MO <: AbstractMovement}
Function to create an SpeciesList
for any type of epidemiological model - creating the correct number of classes and checking dimensions.
EcoSISTEM.SpeciesList
— MethodSpeciesList{R <: AbstractRequirement,
MO <: AbstractMovement, P <: AbstractParams}(numspecies::Int64,
numtraits::Int64, abun_dist::Distribution, req::R,
movement::MO, params::P)
Function to create a SpeciesList given a number of species, the number of traits they possess, their abundances, requirement from the environment and their movement kernel.
EcoSISTEM.SpeciesList
— MethodSpeciesList{R <: AbstractRequirement, MO <: AbstractMovement,
T <: AbstractTypes, P <: AbstractParams}(numspecies::Int64,
numtraits::Int64, abun_dist::Distribution, req::R,
movement::MO, phy::T, params::P)
Function to create a SpeciesList given a number of species, the number of traits they possess, their abundances, requirement from the environment and their movement kernel and any type of AbstractTypes.
EcoSISTEM.SpeciesLookup
— TypeSpeciesLookup <: AbstractLookup
SpeciesLookup holds Lookup
information for each species in a vector, species
.
EcoSISTEM.SpeciesTypes
— TypeSpeciesTypes{TR <: AbstractTraits, R <: AbstractRequirement,
MO <: AbstractMovement, T <: AbstractTypes,
P <: AbstractParams} <: AbstractTypes
Species list houses all species-specific information including trait information, phylogenetic relationships, requirement for energy and movement types.
EcoSISTEM.TempBin
— TypeTempBin{C <: Int} <: ContinuousTrait{C}
Trait type that holds binned temperature preference information created through ClimatePref. Holds an array of counts per temperature band (°C).
EcoSISTEM.Torus
— TypeTorus <: BoundaryCondition
A toroidal boundary where species can cross both boundaries.
EcoSISTEM.TraitCollection2
— TypeTraitCollection2{T1, T2} <: AbstractTraits{Tuple{T1, T2}}
Trait collection that holds two trait types, TR1
and TR2
.
EcoSISTEM.TraitCollection3
— TypeTraitCollection3{T1, T2, T3} <: AbstractTraits{Tuple{T1, T2, T3}}
Trait collection that holds three trait types, TR1
, TR2
and TR3
.
EcoSISTEM.TransitionList
— TypeTransitionList{T1 <: AbstractSetUp, T2 <: AbstractStateTransition,
T3 <: AbstractPlaceTransition, T4 <: AbstractWindDown}
TransitionList
type which houses information on setup
, state
, place
and winddown
transitions.
EcoSISTEM.Trapeze
— TypeTrapeze{TR} <: AbstractTraitRelationship{TR}
The relationship between a continuous trait and its environment, paramaterised on any TR.
EcoSISTEM.Trapezoid
— TypeTrapezoid{T<:Real} <: ContinuousUnivariateDistribution
Trapezoidal distribution as described at https://en.wikipedia.org/wiki/Trapezoidal_distribution.
EcoSISTEM.Unif
— TypeTrapeze{TR} <: AbstractTraitRelationship{TR}
The relationship between a continuous trait and its environment, paramaterised on any TR.
EcoSISTEM.UpdateEnergy
— TypeUpdateEnergy <: AbstractSetUp
Houses a function to update energy usage across the Ecosystem.
EcoSISTEM.UpdateEnvironment
— TypeUpdateEnvironment <: AbstractWindDown
Houses a function to update the habitat and resources across the Ecosystem.
EcoSISTEM.UpdateEpiEnvironment
— TypeUpdateEpiEnvironment <: AbstractWindDown
Transition to update caches at end of update timestep, described in update_fun
.
EcoSISTEM.ViralLoad
— TypeViralLoad <: AbstractStateTransition
Transition for force of infection to settle into environmental reservoir.
EcoSISTEM.VirusTypes
— TypeVirusTypes{TR <: AbstractTraits,
T <: AbstractTypes} <: AbstractTypes
VirusTypes holds information on the virus classes, such as the name of each class, their trait match to the environment, initial abundances and types.
EcoSISTEM.VolWaterBudget
— TypeVolWaterBudget <: AbstractBudget{typeof(1.0*mm)}
This budget type has a matrix of water volumes, representing the energy budget of each subcommunity in the abiotic environment at a fixed point in time.
EcoSISTEM.VolWaterRequirement
— TypeVolWaterRequirement <: Abstract1Requirement{typeof(1.0*mm)}
A vector of soil water volume requirements (m^3) for each species.
EcoSISTEM.VolWaterTimeBudget
— TypeVolWaterTimeBudget <: AbstractBudget{typeof(1.0*mm)}
This budget type has a matrix of volumetric soil water units, representing the water budget of each subcommunity in the abiotic environment along with which time dimension we are interested in.
EcoSISTEM.WaterBudget
— TypeWaterBudget <: AbstractBudget{typeof(1.0*mm)}
This budget type has a matrix of rainfall energy units, representing the energy budget of each subcommunity in the abiotic environment at a fixed point in time.
EcoSISTEM.WaterRequirement
— TypeWaterRequirement <: Abstract1Requirement{typeof(1.0*mm)}
A vector of water requirements (mm) for each species.
EcoSISTEM.WaterTimeBudget
— TypeWaterTimeBudget <: AbstractBudget{typeof(1.0*mm)}
This budget type has a matrix of rainfall units, representing the water budget of each subcommunity in the abiotic environment along with which time dimension we are interested in.
EcoSISTEM.additiveTR2
— TypeadditiveTR2{TR1, TR2} <: AbstractTraitRelationship{Tuple{TR1, TR2}}
Type that houses multiple AbstractTraitRelationships for two trait and habitat levels.
EcoSISTEM.additiveTR3
— TypemultiplicativeTR3{TR1, TR2, TR3} <: AbstractTraitRelationship{Tuple{TR1, TR2, TR3}}
Type that houses multiple AbstractTraitRelationships for three trait and habitat levels.
EcoSISTEM.multiplicativeTR2
— TypemultiplicativeTR2{TR1, TR2} <: AbstractTraitRelationship{Tuple{TR1, TR2}}
Type that houses multiple AbstractTraitRelationships for two trait and habitat levels.
EcoSISTEM.multiplicativeTR3
— TypemultiplicativeTR3{TR1, TR2, TR3} <: AbstractTraitRelationship{Tuple{TR1, TR2, TR3}}
Type that houses multiple AbstractTraitRelationships for three trait and habitat levels.
Base.isapprox
— Methodisapprox(epi_1::AbstractEpiSystem, epi_2::AbstractEpiSystem; kwargs...)
Compare two Ecosystem
s for approximate equality. Specifically, compares the Landscape
s of the two systems.
Keyword arguments
- Anything to pass to
Base.isapprox
.
You may want to pass in atol
or rtol
to loosen the equality tolerance.
EcoSISTEM.BM
— FunctionBM(T::Real, σ²::Float64, start::Float64, lab::String="")
Function to evolve a Real value through Brownian motion, with a starting value, start
, and rate, σ²
.
EcoSISTEM.ContinuousEvolve
— MethodContinuousEvolve(val::Union{Float64, Unitful.Quantity{Float64}}, var::Union{Float64, Unitful.Quantity{Float64}}, tree::BinaryTree)
Function to evolve a continuous trait along a BinaryTree, tree
via Brownian motion. Takes in a starting value, val
and a variance, var
.
EcoSISTEM.DiscreteEvolve
— FunctionDiscreteEvolve(numTraits::Int64, tree::BinaryTree)
Function to evolve a discrete switching trait along a BinaryTree, tree
. Takes in a number of traits, numTraits
to be switched between and rate to switch between traits, switch_rate
with default value of 0.5.
EcoSISTEM.HabitatLoss
— MethodHabitatLoss(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)
Function to destroy habitat for one timestep of the ecosystem using HabitatUpdate information.
EcoSISTEM.NoChange
— MethodNoChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)
Function to keep the habitat the same for one timestep of the model.
EcoSISTEM.RainfallChange
— MethodRainfallChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)
Function to change the rainfall for one timestep of the ecosystem using HabitatUpdate information.
EcoSISTEM.SEI3HRD_wrapper
— FunctionSEI3HRD_wrapper(grid_size::Tuple{Int64, Int64}, area::Unitful.Area{Float64}, params::NamedTuple, runtimes::NamedTuple)
Function to simulate SEI3HRD stochastic realisations, given a grid dimension, grid_size
, area size, a set of model parameters, params
, and running parameters, runtimes
.
Outputs an abundance matrice of compartment by grid cell over time. Compartments for the SEI3HRD model are: Susceptible, Exposed, Asymptomatic Infected, Pre-symptomatic Infected, Symptomatic Infected, Hospitalised, Recovered, Dead.
EcoSISTEM.SEI3HRD_wrapper!
— FunctionSEI3HRD_wrapper!(grid_size::Tuple{Int64, Int64}, area::Unitful.Area{Float64}, params::NamedTuple, runtimes::NamedTuple, abuns::Array{Int64, 3})
Function to simulate SEI3HRD stochastic realisations, given a grid dimension, grid_size
, area size, a set of model parameters, params
, and running parameters, runtimes
.
Fills an abundance matrice of compartment by grid cell over time. Compartments for the SIR model are: Susceptible, Exposed, Asymptomatic Infected, Pre-symptomatic Infected, Symptomatic Infected, Hospitalised, Recovered, Dead.
EcoSISTEM.SIR_wrapper!
— MethodSIR_wrapper!(grid_size::Tuple{Int64, Int64}, area::Unitful.Area{Float64}, params::NamedTuple, runtimes::NamedTuple, abuns::Array{Int64, 3})
Function to simulate simple SIR stochastic realisations, given a grid dimension, grid_size
, area size, a set of model parameters, params
, and running parameters, runtimes
.
Fills an abundance matrice of compartment by grid cell over time. Compartments for the SIR model are: Susceptible, Infected, Recovered, Dead.
EcoSISTEM.SIR_wrapper
— MethodSIR_wrapper(grid_size::Tuple{Int64, Int64}, area::Unitful.Area{Float64}, params::NamedTuple, runtimes::NamedTuple)
Function to simulate simple SIR stochastic realisations, given a grid dimension, grid_size
, area size, a set of model parameters, params
, and running parameters, runtimes
.
Outputs an abundance matrice of compartment by grid cell over time. Compartments for the SIR model are: Susceptible, Infected, Recovered, Dead.
EcoSISTEM.TempChange
— MethodTempChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)
Function to increase the temperature for one timestep of the ecosystem using HabitatUpdate information.
EcoSISTEM.TempFluct
— MethodTempFluct(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)
Function to fluctuate the temperature for one timestep of the ecosystem using HabitatUpdate information.
EcoSISTEM._construct_shrunk_matrix
— Method_construct_shrunk_matrix
Construct a shrunk matrix by selecting certain rows and columns specified by row_idxs
and col_idxs
from AbstractMatrix M
.
Return an AxisArray{T, 2}. The axes will be the selected subset of the original axes if M
is an AxisArray. If M
is a normal matrix, the axes of the returned AxisArray are the selected coordinates.
EcoSISTEM._convert_population
— Method_convert_population
Convert populatioin matrix to Int matrix by filling in the inactive area with 0 population and rounding the active area.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::AllDisperse, timestep::Unitful.Time)
Stochastic dispersal process across the ecosystem for a species from a location, house inside rule
, for one timestep.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::BirthProcess, timestep::Unitful.Time)
Stochastic birth process for a location and species, house inside rule
, for one timestep.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::DeathProcess, timestep::Unitful.Time)
Stochastic death process for a location and species, house inside rule
, for one timestep.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::EnvExposure, timestep::Unitful.Time)
Stochastic environmentally-driven exposure process for a location, housed inside rule
, for one timestep. Moves from susceptible category, species
to exposed category, destination
.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::Exposure, timestep::Unitful.Time)
Stochastic exposure process for a location, housed inside rule
, for one timestep. Moves from susceptible category, species
to exposed category, destination
.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::ForceDisperse)
Random dispersal of force of infection from a location.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::ForceProduce, timestep::Unitful.Time)
Generation of force of infection for a location.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::GenerateSeed, timestep::Unitful.Time)
Stochastic seeding process for a location and species, house inside rule
, for one timestep.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::SeedDisperse, timestep::Unitful.Time)
Stochastic seed dispersal process across the ecosystem for a species from a location, house inside rule
, for one timestep.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::SeedInfection)
Seed initial infected individuals.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::Union{Infection, DevelopSymptoms, Hospitalise,
DeathFromInfection, Recovery}, timestep::Unitful.Time)
Stochastic epi transition process for a location, housed inside rule
, for one timestep. Moves from source category, species
to destination category, destination
.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::UpdateEnergy, timestep::Unitful.Time)
Calculate energy usage across the Ecosystem for one timestep.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::UpdateEnvironment, timestep::Unitful.Time)
Update habitat and resource budget across the Ecosystem for one timestep.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::UpdateEpiEnvironment)
Update the ecosystem caches.
EcoSISTEM._run_rule!
— Method_run_rule!(eco::Ecosystem, rule::ViralLoad, timestep::Unitful.Time)
Settling of force of infection into environmental reservoir for a location.
EcoSISTEM.abundances
— Methodabundances(cache::CachedEcosystem, tm::Unitful.Time)
Function to extract abundances for an ecosystem, cache
, at a certain point in time, tm
. If the abundances for that time are missing from the ecosystem, then the function checks on disk for the last saved version and simulates forward.
EcoSISTEM.addspecies!
— Methodaddspecies!(eco::Ecosystem, abun::Int64)
Function to add a species to the Ecosystem.
EcoSISTEM.addtransition!
— Methodaddtransition!(tl::TransitionList, rule::AbstractPlaceTransition)
Add a place transition to the TransitionList
.
EcoSISTEM.addtransition!
— Methodaddtransition!(tl::TransitionList, rule::AbstractSetUp)
Add a set up transition to the TransitionList
.
EcoSISTEM.addtransition!
— Methodaddtransition!(tl::TransitionList, rule::AbstractStateTransition)
Add a state transition to the TransitionList
.
EcoSISTEM.addtransition!
— Methodaddtransition!(tl::TransitionList, rule::AbstractWindDown)
Add a wind down transition to the TransitionList
.
EcoSISTEM.applycontrols!
— Methodapplycontrols!(epi::Ecosystem, timestep::Unitful.Time)
Function to apply control strategies to an Ecosystem for one timestep.
EcoSISTEM.assign_traits!
— Methodassign_traits!(tree::AbstractTree, start::Vector{Float64},
σ²::Vector{Float64})
Function to evolve continuous functional traits through a phylogenetic tree through Brownian motion, with a starting value, start
, and rate, σ²
.
EcoSISTEM.assign_traits!
— Methodassign_traits!(tree::AbstractTree, switch_rate::Vector{Float64},
traits::Vector{Vector{String}})
Function to evolve categorical functional traits through a phylogenetic tree with a specific switching rate.
EcoSISTEM.bioclimAE
— MethodbioclimAE(bc::Worldclim_bioclim, maxbud::Unitful.Quantity{Float64}, area::Unitful.Area{Float64})
Function to create a ContinuousHab
, SimpleBudget
type abiotic environment from an Wordclim type climate. It either creates a SimpleBudget
type filled with the maximum budget value maxbud
or uses a provided budget of type SolarBudget
. If a Bool matrix of active grid squares is included, active
, this is used, else one is created with all grid cells active.
EcoSISTEM.biodiversity_update!
— Methodbiodiversity_update!(eco::Ecosystem, time::Unitful.Time)
Function to update a ecosystem abundances and environment for one timestep.
EcoSISTEM.budgetupdate!
— Methodbudgetupdate!(eco::AbstractEcosystem, timestep::Unitful.Time)
Function to update the budget of an ecosystem for one timestep.
EcoSISTEM.calc_lookup_moves!
— Methodcalc_lookup_moves!(bound, x::Int64, y::Int64, sp::Int64, eco::Ecosystem, abun::Int64)
Function to calculate the number of moves taken by a species, sp
, from a specific grid square location (x
, y
). There is a boundary condition, bound
, which determines how the species can move across space (see AbstractBoundary). The total abundance of individuals is given in abun
, which may be the number of births in the timestep, or total indiviuals.
EcoSISTEM.classupdate!
— Methodclassupdate!(epi::Ecosystem, timestep::Unitful.Time)
Function to update disease class abundances for one timestep.
EcoSISTEM.combineTR
— MethodcombineTR
Function that combines the output of multiple trait relationships, which varies depending on whether multiplicative, additive etc.
EcoSISTEM.convert_coords
— Functionconvert_coords(eco, i::Int64, width::Int64)
convert_coords(eco, x::Int64, y::Int64, width::Int64)
Function to convert coordinates from two-dimensional (x
,y
) format to one dimension (i
), or vice versa, using the width
of the grid. This function can also be applied to arrays of coordinates.
EcoSISTEM.convert_population
— Methodfunction convert_population(
initial_population,
intnum::U = Int64(1)
)
Convert population matrix to Int matrix by filling in the inactive area with 0 population and rounding the active area.
EcoSISTEM.create_cache
— Methodcreate_cache(sppl::SpeciesList, ml::EpiLandscape)
Function to create an EpiCache
for a SpeciesList and EpiLandscape.
EcoSISTEM.create_cache
— Methodcreate_cache(sppl::SpeciesList, ml::GridLandscape)
Function to create a Cache
for a SpeciesList and GridLandscape.
EcoSISTEM.create_cache
— Methodcreate_cache(sppl::SpeciesList{SpeciesTypes{TR, R, MO, T}},
ml::GridLandscape) where {TR, R, MO <: BirthOnlyMovement, T}
Function to create a PlantCache
for a SpeciesList with movement only via seed production (BirthOnlyMovement
) and GridLandscape.
EcoSISTEM.emptyepilandscape
— Methodemptyepilandscape(epienv::GridEpiEnv, epilist::SpeciesList)
Function to create an empty EpiLandscape given a GridEpiEnv and a SpeciesList.
EcoSISTEM.emptygridlandscape
— Methodemptygridlandscape(gae::GridAbioticEnv, spplist::SpeciesList)
Function to create an empty GridLandscape given a GridAbioticEnv and a SpeciesList.
EcoSISTEM.emptypopulate!
— Methodemptypopulate!(ml::GridLandscape, spplist::SpeciesList,
abenv::AB, rel::R) where {AB <: EcoSISTEM.AbstractAbiotic, R <: EcoSISTEM.AbstractTraitRelationship}
EcoSISTEM.energy_adjustment
— Methodenergy_adjustment(eco::Ecosystem, bud::AbstractBudget, i::Int64, sp::Int64)
Function to calculate how much birth and death rates should be adjusted by, according to how much energy is available, bud
, in the grid square, i
, and how much energy the species, sp
, requires.
EcoSISTEM.epi_update!
— Methodepi_update!(epi::Ecosystem, time::Unitful.Time)
Function to update disease and virus class abundances and environment for one timestep.
EcoSISTEM.equalpop
— Methodequalpop(params::EqualPop, numspp)
Function that takes demographic parameters from type EqualPop
and converts them into type PopGrowth
based on the number of species (numspp
).
EcoSISTEM.eraAE
— MethoderaAE(era::ERA, maxbud::Unitful.Quantity{Float64})
Function to create a ContinuousHab
, SimpleBudget
type abiotic environment from an ERA type climate. It either creates a SimpleBudget
type filled with the maximum budget value maxbud
or uses a provided budget of type SolarTimeBudget
. If a Bool matrix of active grid squares is included, active
, this is used, else one is created with all grid cells active.
EcoSISTEM.eraChange
— MethoderaChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)
Function to step the ERA climate forward by one timestep.
EcoSISTEM.genlookups
— Methodgenlookups(hab::AbstractHabitat, mov::GaussianMovement)
Function to generate lookup tables, which hold information on the probability of moving to neighbouring squares.
EcoSISTEM.geom_mean_abun
— Methodgeom_mean_abun(eco::Ecosystem, qs::Vector{Float64})
Function to calculate the geometric mean abundance for the entire ecosystem.
EcoSISTEM.get_env
— Methodget_env(habitat::A) where A <: AbstractHabitat
Generic function to extract a habitat matrix from any habitat type.
EcoSISTEM.get_neighbours
— Functionget_neighbours(mat::Matrix, x_coord::Int64, y_coord::Int64, chess::Int64=4)
Function to get the neighbours of a grid square in a matrix in 4 or 8 directions
EcoSISTEM.get_traits
— Functionget_traits(tree::AbstractTree, tips::Bool=true)
Function to retrieve functional traits assigned to a phylogenetic tree, either just tips or all nodes.
EcoSISTEM.getbudget
— Methodgetbudget(eco::Ecosystem)
Function to extract budget from Ecosystem object.
EcoSISTEM.getdestination
— Methodgetdestination(rule::AbstractStateTransition)
Generic function to get a destination to which a state transition happening.
EcoSISTEM.getdimension
— Methodgetdimension(eco::Ecosystem)
Function to extract dimension of habitat from Ecosystem object.
EcoSISTEM.getdispersaldist
— Methodgetdispersaldist(eco::Ecosystem)
Function to extract average dispersal distance of species from Ecosystem object. Returns a vector of distances, unless a specific species is provided as a String or Integer.
EcoSISTEM.getdispersalvar
— Methodgetdispersalvar(eco::Ecosystem)
Function to extract dispersal varaince of species from Ecosystem object. Returns a vector of distances, unless a specific species is provided as a String or Integer.
EcoSISTEM.getgridsize
— Methodgetgridsize(eco::Ecosystem)
Function to extract grid cell size of habitat from Ecosystem object.
EcoSISTEM.gethabitat
— Methodgethabitat(eco::Ecosystem)
Function to extract habitat from Ecosystem object.
EcoSISTEM.getlocation
— Methodgetlocation(rule::AbstractPlaceTransition)
Generic function to get location where a place transition happening.
EcoSISTEM.getlocation
— Methodgetlocation(rule::AbstractStateTransition)
Generic function to get location where a state transition happening.
EcoSISTEM.getlookup
— Methodgetlookup(eco::Ecosystem)
Function to extract movement lookup table of species from Ecosystem object.
EcoSISTEM.getpathogentraits
— Methodgetpathogentraits(eco::Ecosystem)
Function to extract pathogen trait preferences from Ecosystem object.
EcoSISTEM.getpref
— Methodgetpref(traits::T, field::Symbol) where T <: AbstractTraits
Function to extract trait preferences for all species in the ecosystem.
EcoSISTEM.getprob
— Methodgetprob(rule::AbstractStateTransition)
Generic function to get probability of a state transition happening.
EcoSISTEM.getrelationship
— Methodgetpref(traits::T, field::Symbol) where T <: AbstractTraits
Function to extract the trait relationship of all species in the ecosystem.
EcoSISTEM.getsize
— Methodgetsize(eco::Ecosystem)
Function to extract size of habitat from Ecosystem object.
EcoSISTEM.getspecies
— Methodgetspecies(rule::AbstractPlaceTransition)
Generic function to get species to which a place transition happening.
EcoSISTEM.getspecies
— Methodgetspecies(rule::AbstractStateTransition)
Generic function to get species to which a state transition happening.
EcoSISTEM.getspeciestraits
— Methodgetspeciestraits(eco::Ecosystem)
Function to extract species trait preferences from Ecosystem object.
EcoSISTEM.gettraitrel
— Methodgettraitrel(eco::Ecosystem)
Function to extract trait relationships.
EcoSISTEM.gettransitions
— Methodgettransitions(eco::E) where E <: AbstractEcosystem
Function to extract the transition list from an arbitrary ecosystem.
EcoSISTEM.habitatupdate!
— Methodhabitatupdate!(eco::AbstractEcosystem, timestep::Unitful.Time)
Function to update the habitat of an ecosystem for one timestep.
EcoSISTEM.initialise_output
— Methodinitialise_output(
abuns::Array,
axes::NamedTuple;
h5fn=joinpath(pwd(),"abundances.h5")
)
Create an HDF5 file h5fn
to store abundance. Preallocate a fix-sized array to store abundance for each compartment, grid location and timestep. Fill in values for compartments, grid locations and timesteps.
EcoSISTEM.invalidatecaches!
— Methodinvalidatecaches!(eco::E) where E <: AbstractEcosystem
Function to invalidate Ecosystem caches at the end of a timestep.
EcoSISTEM.makeunique
— Methodmakeunique(eco::Ecosystem)
Function to convert type of similarity in SpeciesList to UniqueTypes, i.e. an identity matrix.
EcoSISTEM.mean_abun
— Methodmean_abun(eco::Ecosystem, qs::Vector{Float64})
Function to calculate the mean arithmetic abundance for the entire ecosystem.
EcoSISTEM.meta_shannon
— Methodmeta_shannon(eco::Ecosystem, qs::Vector{Float64})
Function to calculate the Shannon entropy for the entire ecosystem.
EcoSISTEM.meta_simpson
— Methodmeta_simpson(eco::Ecosystem, qs::Vector{Float64})
Function to calculate the Simpson diversity for the entire ecosystem.
EcoSISTEM.meta_speciesrichness
— Methodmeta_speciesrichness(eco::Ecosystem, qs::Vector{Float64})
Function to calculate the species richness for the entire ecosystem.
EcoSISTEM.move!
— Methodmove!(eco::Ecosystem, ::AbstractMovement, i::Int64, sp::Int64, grd::Matrix{Int64}, abun::Int64)
Function to calculate the movement of species sp
from a given position in the landscape i
, using the lookup table found in the Ecosystem and updating the movement patterns on a cached grid, grd
. Optionally, a number of births can be provided, so that movement only takes place as part of the birth process, instead of the entire population
EcoSISTEM.pd
— Methodpd(eco::Ecosystem, qs::Vector{Float64})
Function to calculate Faith's phylogenetic diversity (PD) for the entire ecosystem.
EcoSISTEM.peakedgradAE
— MethodpeakedgradAE(minT::Unitful.Temperature{Float64},
maxT::Unitful.Temperature{Float64},
dimension::Tuple{Int64, Int64}, maxbud::Unitful.Quantity{Float64},
area::Unitful.Area{Float64}, rate::Quantity{Float64, 𝚯*𝐓^-1},
active::Matrix{Bool})
Function to create a temperature gradient ContinuousHab
, SimpleBudget
type abiotic environment. Given a min
and max
temperature, it generates a gradient from minima at the top and bottom peaking to maximum in the middle. It creates a ContinuousHab
environment with dimensions dimension
and a specified area area
. It also creates a SimpleBudget
type filled with the maximum budget value maxbud
. The rate of temperature change is specified using the parameter rate
. If a Bool matrix of active grid squares is included, active
, this is used, else one is created with all grid cells active.
EcoSISTEM.plot_epidynamics
— Functionplot_epidynamics(
epi::AbstractEpiSystem,
abuns::AbstractArray{<:Integer, 3};
category_map=nothing,
)
Plot the dynamics of abuns
summed over space, as a function of time.
Arguments
epi
: TheAbstractEpiSystem
to plot.abuns
: The array of abundances to plot, of size Ncompartments x Ncells x Nsteps
Keyword arguments
category_map
: An iterable of key-value pairs where the keys are category names, and the values are a list of compartment indices associated with that category. These compartments will be summed in the plot. For example, the following will plot the sum of compartments 1 and 2 as theSusceptible
category, and the sum of compartments 3 and 4 as theInfected
category.category_map = ("Susceptible" => [1, 2], "Infected" => [3, 4])
If
category_map
isnothing
, all compartments inepi
will be plotted separately with their corresponding names.
EcoSISTEM.plot_epiheatmaps
— Functionplot_epiheatmaps(
epi::AbstractEpiSystem,
abuns::AbstractArray{<:Integer, 3};
compartment="Exposed",
steps=[],
)
Plot heatmaps of abuns
for compartment
at steps
.
Arguments
epi
: TheAbstractEpiSystem
to plot.abuns
: The array of abundances to plot, of size Ncompartments x Ncells x Nsteps
Keyword arguments
compartment
: The compartment to plotsteps
: A list of steps to plot (one heatmap for each step). If empty, plots 4 equally-spaced steps.
Heatmaps are transposed by default. Pass in transpose=false
to turn this off.
EcoSISTEM.populate!
— Methodpopulate!(ml::EpiLandscape, spplist::SpeciesList, abenv::EE, rel::R)
Function to populate an EpiLandscape with information on each disease class in the SpeciesList.
EcoSISTEM.raingrad
— Methodraingrad(minT::Unitful.Temperature{Float64}, maxT::Unitful.Temperature{Float64},
size::Unitful.Length{Float64},
dim::Tuple{Int64, Int64}, rate::Quantity{Float64, 𝚯*𝐓^-1})
Function to create a ContinuousHab
habitat with a rainfall gradient.
EcoSISTEM.raingradAE
— MethodraingradAE(min::Unitful.Temperature{Float64},
max::Unitful.Temperature{Float64},
dimension::Tuple{Int64, Int64}, maxbud::Float64,
area::Unitful.Area{Float64}, rate::Quantity{Float64, typeof(𝚯*𝐓^-1)},
active::Matrix{Bool})
Function to create a rain gradient ContinuousHab
, SimpleBudget
type abiotic environment. Given a min
and max
rainfall, it generates a gradient from minimum at the bottom to maximum at the top. It creates a ContinuousHab
environment with dimensions dimension
and a specified area area
. It also creates a SimpleBudget
type filled with the maximum budget value maxbud
. The rate of rainfall change is specified using the parameter rate
. If a Bool matrix of active grid squares is included, active
, this is used, else one is created with all grid cells active.
EcoSISTEM.randomniches
— Methodrandomniches(dimension::Tuple, types::Vector{String}, clumpiness::Float64, weights::Vector)
Function to create a DiscreteHab
habitat of dimension dimension
, made up of sampled string types, types
, that have a weighting, weights
and clumpiness parameter, clumpiness
.
EcoSISTEM.reenergise!
— Methodreenergise!(eco::Ecosystem, budget::Union{Float64, Unitful.Quantity{Float64}}, grid::Tuple{Int64, Int64})
Function to refill an ecosystem eco
, with energy from a budget value, budget
and a grid size.
EcoSISTEM.repopulate!
— Methodrepopulate!(eco::Ecosystem, abun::Int64)
Function to repopulate an ecosystem eco
, with option for including trait preferences. An additional abun
parameter can be included, in order to repopulate the ecosystem with a specified number of individuals.
EcoSISTEM.resetrate!
— Methodresetrate!(eco::Ecosystem, rate::Quantity{Float64, typeof(𝐓^-1)})
Function to reset the rate of habitat change for a species.
EcoSISTEM.resettime!
— Methodresettime!(eco::E) where E <: AbstractEcosystem
Function to reset the time of habitat change for a species.
EcoSISTEM.run_rule!
— Methodrun_rule!(eco::Ecosystem, rule::AbstractTransition, timestep::Unitful.Time)
Implement _run_rule!
function for a particular rule type, R
, for one timestep.
EcoSISTEM.runscenario!
— Methodrunscenario!(eco::Ecosystem, timestep::Unitful.Time, scenario::S, currentstep::Unitful.Time) where S <: AbstractScenario
This function runs any scenario type for one timestep.
EcoSISTEM.shrink_to_active
— Method_shrink_to_active(M::AbstractMatrix, active::AbstractMatrix{<:Bool})
Shrink the matrix M
to the minimum rectangular region which contains all active cells, as defined by active
. Returns the shrunk matrix.
If active is not provided, automatically determines the active region by masking out entries which are
NaNor
missing`.
EcoSISTEM.simplehabitat
— Methodsimplehabitat(val::Unitful.Quantity, size::Unitful.Length,
dim::Tuple{Int64, Int64})
Function to create a ContinuousHab
habitat of dimension dim
, with cell size
and filled value, val
.
EcoSISTEM.simplehabitatAE
— MethodsimplehabitatAE(val::Union{Float64, Unitful.Quantity{Float64}},
dimension::Tuple{Int64, Int64}, maxbud::Float64, area::Unitful.Area{Float64},
active::Matrix{Bool})
Function to create a simple ContinuousHab
, SimpleBudget
type abiotic environment. It creates a ContinuousHab
filled with a given value, val
, dimensions (dimension
) and a specified area (area
). It also creates a SimpleBudget
type filled with the maximum budget value (maxbud
). The rate of temperature change is specified using the parameter rate
. If a Bool matrix of active grid squares is included, active
, this is used, else one is created with all grid cells active.
EcoSISTEM.simplehabitatAE
— Methodfunction simplehabitatAE(
val::Union{Float64, Unitful.Quantity{Float64}},
dimension::Tuple{Int64, Int64},
area::Unitful.Area{Float64},
active::AbstractMatrix{Bool},
control::C,
)
Function to create a simple ContinuousHab
type epi environment. It creates a ContinuousHab
filled with a given value val
, of dimensions dimension
and specified area area
. If a Bool matrix active
of active grid squares is included, this is used, else one is created with all grid cells active.
The simulation grid will be shrunk so that it tightly wraps the active values
EcoSISTEM.simplenicheAE
— MethodsimplenicheAE(numniches::Int64, dimension::Tuple,
maxBud::Float64, area::Unitful.Area{Float64},
active::Matrix{Bool})
Function to create a simple DiscreteHab
, SimpleBudget
type abiotic environment. Given a number of niche types numniches
, it creates a DiscreteHab
environment with dimensions dimension
and a specified area area
. It also creates a SimpleBudget
type filled with the maximum budget value maxbud
. If a Bool matrix of active grid squares is included, active
, this is used, else one is created with all grid cells active.
EcoSISTEM.simulate!
— Methodfunction simulate!(
eco::Ecosystem,
duration::Unitful.Time,
timestep::Unitful.Time;
save=false,
save_path=pwd(),
)
Run an ecosystem, eco
, for specified length of times, duration
, for a particular timestep, timestep
. If save=true
, inputs and outputs are saved as JLSO files at save_path
.
EcoSISTEM.simulate_record!
— Methodsimulate_record!(
storage::AbstractArray,
eco::Ecosystem,
times::Unitful.Time,
interval::Unitful.Time,
timestep::Unitful.Time;
save=false,
save_path=pwd(),
)
Run an ecosystem, ecoepi
, for specified length of times, times
, for a particular timestep, timestep
, and time interval for abundances to be recorded, interval
. Optionally, there may also be a scenario by which the whole ecosystem is updated, such as removal of habitat patches.
EcoSISTEM.sorenson
— Methodsorenson(eco::Ecosystem, qs::Vector{Float64})
Function to calculate the Sorenson similarity for the entire ecosystem.
EcoSISTEM.sum_pop
— Methodsum_pop(m::Matrix{Int64}, i::Int64)
Function to sum a population matrix, m
, without memory allocation, at a grid location i
.
EcoSISTEM.tematch
— Methodtematch(sppl::SpeciesList, abenv::AbstractAbiotic)
Function to check that the types of a trait list and habitat list are the same for a species list (sppl
) and abiotic environment (abenv
).
EcoSISTEM.tempgrad
— Methodtempgrad(minT::Unitful.Temperature{Float64}, maxT::Unitful.Temperature{Float64},
size::Unitful.Length{Float64},
dim::Tuple{Int64, Int64}, rate::Quantity{Float64, 𝚯*𝐓^-1})
Function to create a ContinuousHab
habitat with a temperature gradient.
EcoSISTEM.tempgradAE
— MethodtempgradAE(min::Unitful.Temperature{Float64},
max::Unitful.Temperature{Float64},
dimension::Tuple{Int64, Int64}, maxbud::Float64,
area::Unitful.Area{Float64}, rate::Quantity{Float64, typeof(𝚯*𝐓^-1)},
active::Matrix{Bool})
Function to create a temperature gradient ContinuousHab
, SimpleBudget
type abiotic environment. Given a min
and max
temperature, it generates a gradient from minimum at the bottom to maximum at the top. It creates a ContinuousHab
environment with dimensions dimension
and a specified area area
. It also creates a SimpleBudget
type filled with the maximum budget value maxbud
. The rate of temperature change is specified using the parameter rate
. If a Bool matrix of active grid squares is included, active
, this is used, else one is created with all grid cells active.
EcoSISTEM.traitfun
— Methodtraitfun(eco::AbstractEcosystem, pos::Int64, sp::Int64, ::P) where P <: AbstractPathogenTypes
Function to calculate relationship between the current environment and a pathogen's particular trait.
EcoSISTEM.traitfun
— Methodtraitfun(eco::AbstractEcosystem, pos::Int64, sp::Int64, ::S) where S <: AbstractSpeciesTypes
Function to calculate relationship between the current environment and a species' particular trait.
EcoSISTEM.traitpopulate!
— Methodtraitpopulate!(ml::GridLandscape, spplist::SpeciesList,
abenv::AbstractAbiotic)
Function to populate a grid landscape given the abundances found in species list based upon how well the species traits match their environment.
EcoSISTEM.traitrepopulate!
— Methodrepopulate!(eco::Ecosystem, abun::Int64)
Function to repopulate an ecosystem eco
, with option for including trait preferences. An additional abun
parameter can be included, in order to repopulate the ecosystem with a specified number of individuals.
EcoSISTEM.transition
— Functiontransition(params::NamedTuple, paramDat::DataFrame, nclasses::Int64, inf_cat = [2], age_categories = 1)
Function to create transition matrix from SIS parameters and return an EpiParams
type that can be used by the model update.
EcoSISTEM.trmatch
— Methodtrmatch(sppl::SpeciesList, traitrel::AbstractTraitRelationship)
Function to check that the types of a trait list and trait relationship list are the same for a species list (sppl
) and trait relationship (traitrel
).
EcoSISTEM.ukChange
— MethodukChange(epi::Ecosystem, hab::ContinuousTimeHab, timestep::Unitful.Time)
Function to step the uk climate forward by one timestep. Will repeat if time counter becomes greater than the number of dimensions in the habitat.
EcoSISTEM.update!
— Functionupdate!(eco::Ecosystem, timestep::Unitful.Time)
Update an Ecosystem by one timestep, running through different transitions, including set up, state and place transitions, and winddown.
EcoSISTEM.update!
— Methodupdate!(eco::AbstractEcosystem{L}, timestep::Unitful.Time, ::Nothing) where L <: EpiLandscape
Update an Ecosystem by one timestep, running through the older version of the epidemiology code.
EcoSISTEM.update!
— Methodupdate!(eco::AbstractEcosystem{L}, timestep::Unitful.Time, ::Nothing) where L <: GridLandscape
Update an Ecosystem by one timestep, running through the older version of the biodiversity code.
EcoSISTEM.update_energy_usage!
— Methodupdate_energy_usage!(eco::Ecosystem)
Function to calculate how much energy has been used up by the current species in each grid square in the ecosystem, eco
. This function is parameterised on whether the species have one type of energy requirement or two.
EcoSISTEM.update_environment!
— Methodupdate_environment!(eco::Ecosystem, timestep::Unitful.Time)
Function to update the habitat and resources across the Ecosystem.
EcoSISTEM.update_epi_environment!
— Methodupdate_epi_environment!(epi::Ecosystem, timestep::Unitful.Time)
Function to update the virus abundances with cached migration moves and invalidate all caches.
EcoSISTEM.update_output
— Methodupdate_output(
abuns_t::Matrix,
timestep::Int;
h5fn=joinpath(pwd(),"abundances.h5")
)
Update the existing HDF5 file h5fn
with the abundance matrix at a certain timestep.
EcoSISTEM.update_virus_cache!
— Methodupdate_virus_cache!(epi::Ecosystem)
Function to update the virus abundances with cached migration moves.
EcoSISTEM.virusmove!
— Methodvirusmove!(epi::AbstractEcosystem, id::Int64, pos::Int64, grd::Array{Int64, 2}, newvirus::Int64)
Function to calculate the movement of force of infection id
from a given position in the landscape pos
, using the lookup table found in the Ecosystem and updating the movement patterns on a cached grid, grd
. The number of new virus is provided, so that movement only takes place as part of the generation process.
EcoSISTEM.virusupdate!
— Methodvirusupdate!(epi::Ecosystem, time::Unitful.Time)
Function to update virus abundances and disperse for one timestep.
EcoSISTEM.worldclimAE
— MethodworldclimAE(wc::Worldclim_monthly, maxbud::Unitful.Quantity{Float64})
Function to create a ContinuousTimeHab
, SimpleBudget
type abiotic environment from a Wordclim type climate. It either creates a SimpleBudget
type filled with the maximum budget value maxbud
or uses a provided budget of type SolarTimeBudget
. If a Bool matrix of active grid squares is included, active
, this is used, otherwise one is all grid cells are considered active.
EcoSISTEM.worldclimChange
— MethodworldclimChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)
Function to step the Worldclim climate forward by one timestep.
EcoSISTEM.ClimatePref.AbstractClimate
— TypeAbstractClimate
Abstract supertype of all climate data.
EcoSISTEM.ClimatePref.CERA
— TypeCERA <: AbstractClimate
Type that houses data extracted from CERA-20C raster files.
EcoSISTEM.ClimatePref.CHELSA_bioclim
— TypeCHELSA_bioclim <: AbstractClimate
Type that houses data extracted from CHELSA raster files.
EcoSISTEM.ClimatePref.CHELSA_monthly
— TypeCHELSA_monthly <: AbstractClimate
Type that houses data extracted from CHELSA raster files.
EcoSISTEM.ClimatePref.CRUTS
— TypeCRUTS <: AbstractClimate
Type that houses data extracted from CRUTS raster files.
EcoSISTEM.ClimatePref.ERA
— TypeERA <: AbstractClimate
Type that houses data extracted from ERA raster files.
EcoSISTEM.ClimatePref.Landcover
— TypeLandcover <: AbstractClimate
Type that houses data extracted from EarthEnv Landcover raster files.
EcoSISTEM.ClimatePref.Reference
— TypeReference <: AbstractClimate
Type that houses a reference data array.
EcoSISTEM.ClimatePref.Worldclim_bioclim
— TypeWorldclim_bioclim <: AbstractClimate
Type that houses data extracted from Bioclim raster files.
EcoSISTEM.ClimatePref.Worldclim_monthly
— TypeWorldclim_monthly <: AbstractClimate
Type that houses data extracted from Worldclim raster files.
Base.read
— Methodread(f, filename)
Function to read raster file into julia.
EcoSISTEM.ClimatePref.convert_coords
— Functionconvert_coords(i::Int64, width::Int64)
convert_coords(x::Int64, y::Int64, width::Int64)
Function to convert coordinates from two-dimensional (x
,y
) format to one dimension (i
), or vice versa, using the width
of the grid. This function can also be applied to arrays of coordinates.
EcoSISTEM.ClimatePref.create_reference
— Methodcreate_reference(gridsize::Float64)
Function to create a reference grid array of type Reference
.
EcoSISTEM.ClimatePref.downresolution
— Functiondownresolution(data::Union{ERA, Worldclim_monthly, Worldclim_bioclim}, rescale::Int64; fn)
Function to decrease the resolution of a climate dataset, by a factor, rescale
, and aggregation function, fn
. The aggregation function has a default setting of taking the mean value.
EcoSISTEM.ClimatePref.downresolution!
— Functiondownresolution!(resized_array::Matrix{T}, array::Matrix{T}, rescale::Int64, fn)
downresolution!(resized_array::Array{T, 3}, array::Matrix{T}, dim::Int64, rescale::Int64, fn)
Function to decrease the resolution of a climate dataset in place, by a factor, rescale
, and aggregation function, fn
. The aggregation function has a default setting of taking the mean value.
EcoSISTEM.ClimatePref.env_bool
— Functionenv_bool(key)
Checks for an enviroment variable and fuzzy converts it to a bool
EcoSISTEM.ClimatePref.extractvalues
— Methodextractvalues(x::Vector{typeof(1.0°)},y::Vector{typeof(1.0°)},
bc::Worldclim_bioclim, dim::Unitful.Time)
Function to extract values from a bioclim object, at specified x, y locations and time, dim
.
EcoSISTEM.ClimatePref.extractvalues
— Methodextractvalues(x::Vector{typeof(1.0°)},y::Vector{typeof(1.0°)},
bc::Worldclim_bioclim, dim::Unitful.Time)
Function to extract values from a bioclim object, at specified x, y locations and over a time period, dim
.
EcoSISTEM.ClimatePref.extractvalues
— Methodextractvalues(x::Vector{typeof(1.0°)},y::Vector{typeof(1.0°)},
wc::Worldclim_monthly, dim::Unitful.Time)
Function to extract values from a worldclim object, at specified x, y locations and over a range of times, dim
.
EcoSISTEM.ClimatePref.extractvalues
— Methodextractvalues(x::Vector{typeof(1.0°)},y::Vector{typeof(1.0°)},
wc::Worldclim_monthly, dim::Unitful.Time)
Function to extract values from a worldclim object, at specified x, y locations and time, dim
.
EcoSISTEM.ClimatePref.readCERA
— MethodreadCERA(dir::String, file::String, params::String)
Function to extract a certain parameter, param
, from an CERA-20C netcdf file, and convert into an axis array.
EcoSISTEM.ClimatePref.readCHELSA_monthly
— FunctionreadCHELSA_monthly(dir::String)
Function to extract all raster files from a specified folder directory, and convert into an axis array.
EcoSISTEM.ClimatePref.readCRUTS
— MethodreadCRUTS(dir::String)
Function to extract all raster files from a specified folder directory, and convert into an axis array.
EcoSISTEM.ClimatePref.readERA
— MethodreadERA(dir::String, file::String, param::String, dim::Vector{Vector{T}})
where T<: Unitful.Time
Function to extract a certain parameter, param
, from a directory, dir
, containing ERA netcdf files, for a certain timerange, dim
, and convert into an axis array.
EcoSISTEM.ClimatePref.readERA
— MethodreadERA(dir::String, param::String, dim::StepRange(typeof(1month)))
Function to extract a certain parameter, param
, from an ERA netcdf file, for a certain timerange, dim
, and convert into an axis array.
EcoSISTEM.ClimatePref.readMet
— MethodreadMet(dir::String, param::String)
Function to extract a certain parameter, param
, from a directory, dir
, containing Met Office processed HDF5 files.
EcoSISTEM.ClimatePref.readMet_raw
— MethodreadMet_raw(dir::String, param::String)
Function to extract a certain parameter, param
, from an Met Office netcdf file, and convert into an axis array. No processing done.
EcoSISTEM.ClimatePref.readMet_raw
— MethodreadMet_raw(dir::String, file::String, param::String, dim::Vector{Vector{T}})
where T<: Unitful.Time
Function to extract a certain parameter, param
, from a directory, dir
, containing Met Office netcdf files, for a certain timerange, dim
, and convert into an axis array. No processing done.
EcoSISTEM.ClimatePref.readbioclim
— Functionreadbioclim(dir::String)
Function to extract all raster files from a specified folder directory, and convert into an axis array.
EcoSISTEM.ClimatePref.readfile
— Functionreadfile(file::String)
Function to import a selected file from a path string.
EcoSISTEM.ClimatePref.readlc
— Functionreadlc(dir::String)
Function to extract all raster files from a specified folder directory, and convert into an axis array.
EcoSISTEM.ClimatePref.readworldclim
— Functionreadworldclim(dir::String)
Function to extract all raster files from a specified folder directory, and convert into an axis array.
EcoSISTEM.ClimatePref.searchdir
— Methodsearchdir(path,key)
Function to search a directory path
using a given key
string.
EcoSISTEM.ClimatePref.upresolution
— Functionupresolution(data::Union{ERA, Worldclim_monthly, Worldclim_bioclim}, rescale::Int64; fn)
Function to increase the resolution of a climate dataset, by a factor, rescale
.
EcoSISTEM.AbstractAbiotic
EcoSISTEM.AbstractBudget
EcoSISTEM.AbstractCache
EcoSISTEM.AbstractControl
EcoSISTEM.AbstractEcosystem
EcoSISTEM.AbstractEpiEnv
EcoSISTEM.AbstractHabitat
EcoSISTEM.AbstractLandscape
EcoSISTEM.AbstractLookup
EcoSISTEM.AbstractMovement
EcoSISTEM.AbstractParams
EcoSISTEM.AbstractPathogenTypes
EcoSISTEM.AbstractPlaceTransition
EcoSISTEM.AbstractRequirement
EcoSISTEM.AbstractScenario
EcoSISTEM.AbstractSetUp
EcoSISTEM.AbstractSpeciesList
EcoSISTEM.AbstractSpeciesTypes
EcoSISTEM.AbstractStateTransition
EcoSISTEM.AbstractTraitRelationship
EcoSISTEM.AbstractTraits
EcoSISTEM.AbstractTransition
EcoSISTEM.AbstractWindDown
EcoSISTEM.AllDisperse
EcoSISTEM.AlwaysMovement
EcoSISTEM.BirthOnlyMovement
EcoSISTEM.BirthProcess
EcoSISTEM.BoundaryCondition
EcoSISTEM.Cache
EcoSISTEM.CachedEcosystem
EcoSISTEM.CachedEcosystem
EcoSISTEM.CachedGridLandscape
EcoSISTEM.ClimatePref.AbstractClimate
EcoSISTEM.ClimatePref.CERA
EcoSISTEM.ClimatePref.CHELSA_bioclim
EcoSISTEM.ClimatePref.CHELSA_monthly
EcoSISTEM.ClimatePref.CRUTS
EcoSISTEM.ClimatePref.ERA
EcoSISTEM.ClimatePref.Landcover
EcoSISTEM.ClimatePref.Reference
EcoSISTEM.ClimatePref.Worldclim_bioclim
EcoSISTEM.ClimatePref.Worldclim_monthly
EcoSISTEM.ContinuousHab
EcoSISTEM.ContinuousTimeHab
EcoSISTEM.ContinuousTrait
EcoSISTEM.Cylinder
EcoSISTEM.DeathFromInfection
EcoSISTEM.DeathProcess
EcoSISTEM.DevelopSymptoms
EcoSISTEM.DiscreteHab
EcoSISTEM.DiscreteTrait
EcoSISTEM.DiseaseState
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.Ecosystem
EcoSISTEM.EnvExposure
EcoSISTEM.EpiCache
EcoSISTEM.EpiLandscape
EcoSISTEM.EpiLookup
EcoSISTEM.EpiMovement
EcoSISTEM.EpiParams
EcoSISTEM.EqualPop
EcoSISTEM.Exposure
EcoSISTEM.FluctScenario
EcoSISTEM.ForceDisperse
EcoSISTEM.ForceProduce
EcoSISTEM.Gauss
EcoSISTEM.GaussTrait
EcoSISTEM.GaussianKernel
EcoSISTEM.GenerateSeed
EcoSISTEM.GridAbioticEnv
EcoSISTEM.GridEpiEnv
EcoSISTEM.GridLandscape
EcoSISTEM.HostTypes
EcoSISTEM.Infection
EcoSISTEM.Lockdown
EcoSISTEM.LongTailKernel
EcoSISTEM.Lookup
EcoSISTEM.MPIEcosystem
EcoSISTEM.MPIGridLandscape
EcoSISTEM.Match
EcoSISTEM.MultiScenario
EcoSISTEM.NoBoundary
EcoSISTEM.NoControl
EcoSISTEM.NoMovement
EcoSISTEM.NoRelContinuous
EcoSISTEM.NoRelDiscrete
EcoSISTEM.PlantCache
EcoSISTEM.PopGrowth
EcoSISTEM.RainBin
EcoSISTEM.Recovery
EcoSISTEM.SeedDisperse
EcoSISTEM.SeedInfection
EcoSISTEM.SimpleBudget
EcoSISTEM.SimpleRequirement
EcoSISTEM.SimpleScenario
EcoSISTEM.SizeRequirement
EcoSISTEM.SolarBudget
EcoSISTEM.SolarRequirement
EcoSISTEM.SolarTimeBudget
EcoSISTEM.SpeciesList
EcoSISTEM.SpeciesList
EcoSISTEM.SpeciesList
EcoSISTEM.SpeciesList
EcoSISTEM.SpeciesLookup
EcoSISTEM.SpeciesTypes
EcoSISTEM.TempBin
EcoSISTEM.Torus
EcoSISTEM.TraitCollection2
EcoSISTEM.TraitCollection3
EcoSISTEM.TransitionList
EcoSISTEM.Trapeze
EcoSISTEM.Trapezoid
EcoSISTEM.Unif
EcoSISTEM.UpdateEnergy
EcoSISTEM.UpdateEnvironment
EcoSISTEM.UpdateEpiEnvironment
EcoSISTEM.ViralLoad
EcoSISTEM.VirusTypes
EcoSISTEM.VolWaterBudget
EcoSISTEM.VolWaterRequirement
EcoSISTEM.VolWaterTimeBudget
EcoSISTEM.WaterBudget
EcoSISTEM.WaterRequirement
EcoSISTEM.WaterTimeBudget
EcoSISTEM.additiveTR2
EcoSISTEM.additiveTR3
EcoSISTEM.multiplicativeTR2
EcoSISTEM.multiplicativeTR3
Base.isapprox
Base.read
EcoSISTEM.BM
EcoSISTEM.ClimatePref.convert_coords
EcoSISTEM.ClimatePref.create_reference
EcoSISTEM.ClimatePref.downresolution
EcoSISTEM.ClimatePref.downresolution!
EcoSISTEM.ClimatePref.env_bool
EcoSISTEM.ClimatePref.extractvalues
EcoSISTEM.ClimatePref.extractvalues
EcoSISTEM.ClimatePref.extractvalues
EcoSISTEM.ClimatePref.extractvalues
EcoSISTEM.ClimatePref.readCERA
EcoSISTEM.ClimatePref.readCHELSA_monthly
EcoSISTEM.ClimatePref.readCRUTS
EcoSISTEM.ClimatePref.readERA
EcoSISTEM.ClimatePref.readERA
EcoSISTEM.ClimatePref.readMet
EcoSISTEM.ClimatePref.readMet_raw
EcoSISTEM.ClimatePref.readMet_raw
EcoSISTEM.ClimatePref.readbioclim
EcoSISTEM.ClimatePref.readfile
EcoSISTEM.ClimatePref.readlc
EcoSISTEM.ClimatePref.readworldclim
EcoSISTEM.ClimatePref.searchdir
EcoSISTEM.ClimatePref.upresolution
EcoSISTEM.ContinuousEvolve
EcoSISTEM.DiscreteEvolve
EcoSISTEM.HabitatLoss
EcoSISTEM.NoChange
EcoSISTEM.RainfallChange
EcoSISTEM.SEI3HRD_wrapper
EcoSISTEM.SEI3HRD_wrapper!
EcoSISTEM.SIR_wrapper
EcoSISTEM.SIR_wrapper!
EcoSISTEM.TempChange
EcoSISTEM.TempFluct
EcoSISTEM._construct_shrunk_matrix
EcoSISTEM._convert_population
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM._run_rule!
EcoSISTEM.abundances
EcoSISTEM.addspecies!
EcoSISTEM.addtransition!
EcoSISTEM.addtransition!
EcoSISTEM.addtransition!
EcoSISTEM.addtransition!
EcoSISTEM.applycontrols!
EcoSISTEM.assign_traits!
EcoSISTEM.assign_traits!
EcoSISTEM.bioclimAE
EcoSISTEM.biodiversity_update!
EcoSISTEM.budgetupdate!
EcoSISTEM.calc_lookup_moves!
EcoSISTEM.classupdate!
EcoSISTEM.combineTR
EcoSISTEM.convert_coords
EcoSISTEM.convert_population
EcoSISTEM.create_cache
EcoSISTEM.create_cache
EcoSISTEM.create_cache
EcoSISTEM.emptyepilandscape
EcoSISTEM.emptygridlandscape
EcoSISTEM.emptypopulate!
EcoSISTEM.energy_adjustment
EcoSISTEM.epi_update!
EcoSISTEM.equalpop
EcoSISTEM.eraAE
EcoSISTEM.eraChange
EcoSISTEM.genlookups
EcoSISTEM.geom_mean_abun
EcoSISTEM.get_env
EcoSISTEM.get_neighbours
EcoSISTEM.get_traits
EcoSISTEM.getbudget
EcoSISTEM.getdestination
EcoSISTEM.getdimension
EcoSISTEM.getdispersaldist
EcoSISTEM.getdispersalvar
EcoSISTEM.getgridsize
EcoSISTEM.gethabitat
EcoSISTEM.getlocation
EcoSISTEM.getlocation
EcoSISTEM.getlookup
EcoSISTEM.getpathogentraits
EcoSISTEM.getpref
EcoSISTEM.getprob
EcoSISTEM.getrelationship
EcoSISTEM.getsize
EcoSISTEM.getspecies
EcoSISTEM.getspecies
EcoSISTEM.getspeciestraits
EcoSISTEM.gettraitrel
EcoSISTEM.gettransitions
EcoSISTEM.habitatupdate!
EcoSISTEM.initialise_output
EcoSISTEM.invalidatecaches!
EcoSISTEM.makeunique
EcoSISTEM.mean_abun
EcoSISTEM.meta_shannon
EcoSISTEM.meta_simpson
EcoSISTEM.meta_speciesrichness
EcoSISTEM.move!
EcoSISTEM.pd
EcoSISTEM.peakedgradAE
EcoSISTEM.plot_epidynamics
EcoSISTEM.plot_epiheatmaps
EcoSISTEM.populate!
EcoSISTEM.raingrad
EcoSISTEM.raingradAE
EcoSISTEM.randomniches
EcoSISTEM.reenergise!
EcoSISTEM.repopulate!
EcoSISTEM.resetrate!
EcoSISTEM.resettime!
EcoSISTEM.run_rule!
EcoSISTEM.runscenario!
EcoSISTEM.shrink_to_active
EcoSISTEM.simplehabitat
EcoSISTEM.simplehabitatAE
EcoSISTEM.simplehabitatAE
EcoSISTEM.simplenicheAE
EcoSISTEM.simulate!
EcoSISTEM.simulate_record!
EcoSISTEM.sorenson
EcoSISTEM.sum_pop
EcoSISTEM.tematch
EcoSISTEM.tempgrad
EcoSISTEM.tempgradAE
EcoSISTEM.traitfun
EcoSISTEM.traitfun
EcoSISTEM.traitpopulate!
EcoSISTEM.traitrepopulate!
EcoSISTEM.transition
EcoSISTEM.trmatch
EcoSISTEM.ukChange
EcoSISTEM.update!
EcoSISTEM.update!
EcoSISTEM.update!
EcoSISTEM.update_energy_usage!
EcoSISTEM.update_environment!
EcoSISTEM.update_epi_environment!
EcoSISTEM.update_output
EcoSISTEM.update_virus_cache!
EcoSISTEM.virusmove!
EcoSISTEM.virusupdate!
EcoSISTEM.worldclimAE
EcoSISTEM.worldclimChange