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. Currently doesn't do anything except print some information.

source
Persephone.initialiseFunction
initialise(config, seed)

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

source

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.

source
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.)

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

Add a farm event to the specified pixels (a vector of position tuples) for a given duration.

source
Persephone.distancetoMethod
distanceto(pos, model, habitatdescriptor)

Calculate the distance from the given location to the closest location matching the habitat descriptor function. Caution: can be computationally expensive!

source
Persephone.distancetoMethod
distanceto(pos, model, habitattype)

Calculate the distance from the given location to the closest habitat of the specified type. Caution: can be computationally expensive!

source
Persephone.distancetoedgeMethod
distancetoedge(pos, model)

Calculate the distance from the given location to the closest neighbouring habitat. Caution: can be computationally expensive!

source
Persephone.farmplotMethod
farmplot(position, model)

Return the farm plot at this position, or nothing if there is none (utility wrapper).

source
Persephone.initlandscapeMethod
initlandscape()

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

source