diff --git a/core/simulation.jl b/core/simulation.jl new file mode 100644 index 0000000000000000000000000000000000000000..3849144f3da1e30be53bdc726a8079526dcb44c9 --- /dev/null +++ b/core/simulation.jl @@ -0,0 +1,19 @@ +### Persephone - a socio-economic-ecological model of European agricultural landscapes. +### +### This file includes the core functions for initialising and running simulations. +### + +function initsim() + #TODO +end + +function runsim() + #TODO +end + +function simulate() + initsim() + runsim() + print("Simulation ran. Nothing happened.") + #TODO +end diff --git a/persephone.jl b/persephone.jl index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1483715bdf8fe8caccae85a3e49753ad1e2c3e99 100644 --- a/persephone.jl +++ b/persephone.jl @@ -0,0 +1,36 @@ +### Persephone - a socio-economic-ecological model of European agricultural landscapes. +### +### Daniel Vedder <daniel.vedder@idiv.de> +### Lea Kolb <lea-deborah.kolb@idiv.de> +### (c) 2022, licensed under the terms of the MIT license +### +### This file defines the module (= "library") for the Persephone model. +### To run the model, either execute `run.jl` from the commandline, +### or import the module using your own wrapper script or software. +### + +module Persephone + +## define dependencies +using + Agents, + ArgParse + +## define exported functions and variables +export + simulate + +## include all module files +include("core/input.jl") + +include("core/output.jl") + +include("crop/crops.jl") + +include("ecology/ecology.jl") + +include("farm/farm.jl") + +include("core/simulation.jl") + +end diff --git a/run.jl b/run.jl new file mode 100755 index 0000000000000000000000000000000000000000..d1deb6bf51b1cdc89bf6dc36215f8eba0bc85c92 --- /dev/null +++ b/run.jl @@ -0,0 +1,9 @@ +#!/usr/bin/env julia +# A very thin wrapper to start a Persephone simulation. +# (This is not included in persephone.jl in order to enable the latter to +# be used as a library, without automatically launching a simulation.) + +include("persephone.jl") +using .Persephone + +simulate()