Input, Output, and Settings

These functions are responsible for reading in all model configurations (passed by config file or commandline), administrating them during a run, and printing any output.

parameters.toml

This is the default configuration file for Persephone, containing all model parameters. The syntax is described here: https://toml.io/en/

DO NOT MODIFY THIS FILE FOR SIMULATION EXPERIMENTS! Instead, copy it to another directory, modify the copy, and then pass it to the model using the --config parameter.

input.jl

Persephone.getsettingsMethod
getsettings(configfile)

Combines all configuration options to produce a single settings dict. Precedence: commandline parameters - user config file - default values

output.jl

Persephone.DataOutputType
DataOutput

A struct for organising model output. This is designed for text-based data output that is updated more or less regularly (e.g. population data in csv files). Submodels can register their own output functions using newdataoutput().

Struct fields: - filename: the name of the file to be created in the user-specified output directory - header: a string to be written to the start of the file as it is initialised - outputfunction: a function that takes a model object and returns a string to write to file - frequency: how often to call the output function (daily/monthly/yearly/end/never)