From d2a260f842aec2a04f7df4c86b80ee33ccd71857 Mon Sep 17 00:00:00 2001
From: Daniel Vedder <d.vedder@web.de>
Date: Fri, 17 Nov 2023 15:09:59 +0100
Subject: [PATCH] Added SimulationModel struct

---
 README.md              |  3 +--
 src/core/simulation.jl | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index a43426c..2b394d7 100644
--- a/README.md
+++ b/README.md
@@ -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
 
diff --git a/src/core/simulation.jl b/src/core/simulation.jl
index 1a6f390..e24686d 100644
--- a/src/core/simulation.jl
+++ b/src/core/simulation.jl
@@ -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)
 
-- 
GitLab