Skip to content
Snippets Groups Projects
Commit d2a260f8 authored by Daniel Vedder's avatar Daniel Vedder
Browse files

Added SimulationModel struct

parent f1b459ca
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,7 @@ growth submodel, and individual-based models of multiple indicator species. Its
investigate how changes in farm operations (e.g. through policy changes in the CAP)
influence biodiversity.
The model is based on the [Agents.jl](https://juliadynamics.github.io/Agents.jl/stable/)
framework. It is currently in the early stages of development.
**The model is still in development. A first version will be available in spring 2024.**
## Usage
......
......@@ -5,6 +5,31 @@
#XXX How can I make the model output during a parallel run clearer?
"""
SimulationModel
This is the heart of the model - a struct that holds all data and state
for one simulation run. It is created by [`initialise`](@ref) and passed
as input to most model functions.
"""
mutable struct SimulationModel
settings::Dict{String,Any}
rng::AbstractRNG
logger::AbstractLogger
dataoutputs::Vector{DataOutput}
datatables::Dict{String,DataFrame}
date::Date
landscape::Matrix{Pixel}
weather::Dict{Date,Weather}
crops::Dict{String,CropType}
farmers::Vector{Farmer}
farmplots::Vector{FarmPlot}
animals::Vector{Animal}
migrants::Vector{Pair{Animal,Date}}
events::Vector{FarmEvent}
end
"""
simulate(config=PARAMFILE, seed=nothing)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment