Skip to content
Snippets Groups Projects
Daniel Vedder's avatar
xo30xoqa authored
Not yet functional - the necessary functions still need to be implemented.
f61ba894
History

Persephone

An agent-based, socio-economic-ecological model of agricultural landscapes in Europe under the CAP.

Description

Persephone models farmers' decision making and its impact on species in agricultural landscapes. The aim is to investigate how policies such as the CAP influence farms and biodiversity.

The model is based on the Agents.jl framework. It is currently in the very early stages of development.

Usage

Installation

Install the latest version of the Julia programming language (1.9+). The recommended editors are VSCode or Emacs (see docs/editors.md). To install package dependencies, open a Julia REPL in this folder and run using Pkg; Pkg.activate("."); Pkg.instantiate().

Running from the commandline

This is the normal mode of operation. Simply execute run.jl, typically like so (in Linux):

> ./run.jl -c <config>

where <config> specifies the configuration file to use. The recommended workflow is to copy scr/parameters.toml to a location of your choice and edit the copy to suit your requirements. The adapted config file can then be passed to run.jl. (If no configuration file is specified, Persephone will run with its default settings.)

The full list of commandline arguments is:

usage: run.jl [-c CONFIGFILE] [-s SEED] [-o OUTDIR] [-l LOGLEVEL] 
              [--version] [-h]

optional arguments:
  -c, --configfile CONFIGFILE
                        name of the configuration file
  -s, --seed SEED       inital random seed (type: Int64)
  -o, --outdir OUTDIR   location of the output directory
  -l, --loglevel LOGLEVEL
                        verbosity: "debug", "info", or "quiet"
  --version             show version information and exit
  -h, --help            show this help message and exit

To run the test suite, do the following:

> cd test
> julia runtests.jl

Running from within Julia

To use the model from within Julia (either inside an interactive REPL or if you want to import it from your own software), do the following:

using Pkg
Pkg.activate(".") # assuming you're in the Persephone root folder
using Persephone

You can then access all Persephone functions, such as simulate(). (See src/Persephone.jl for a list of exported functions.)


© 2022-2023 Daniel Vedder, Lea Kolb (MIT license)