Simulation

The core directory holds source files that are important for all submodels, including scheduling, landscape, and input/output functions.

simulation.jl

This file includes the basal functions for initialising and running simulations.

Persephone.finaliseMethod
finalise(model)

Wrap up the simulation. Output all remaining data and exit.

Persephone.initialiseFunction
initialise(config, seed)

Initialise the model: read in parameters, create the output data directory, and instantiate the AgentBasedModel object.

landscape.jl

This file manages the landscape maps that underlie the model.

Persephone.FarmEventType
FarmEvent

A data structure to define a landscape event, giving its type, spatial extent, and duration.

Persephone.PixelType
Pixel

A pixel is a simple data structure to combine land use and ownership information in a single object. The model landscape consists of a matrix of pixels. (Note: further landscape information may be added here in future.)

Persephone.createevent!Function
createevent(model, pos, name, duration=1)

Add a farm event to the specified pixels for a given duration.

Persephone.farmplotMethod
farmplot(model, position)

Return the farm plot at this position (utility wrapper).

Persephone.initlandscapeMethod
initlandscape()

Initialise the model landscape based on the map files specified in the configuration. Returns a matrix of pixels.

Persephone.landcoverMethod
landcover(model, position)

Return the land cover class at this position (utility wrapper).

Persephone.updateevents!Method
updateevents!(model)

Cycle through the list of events, removing those that have expired.