MAFIO: Model for the Agent-based simulation of Faecal Indicator Organisms



MAFIO is an agent-based model designed to simulate the small-scale behaviour and transport of agents representing faecal indicator organisms (FIOs) in a spatially-distributed, process-based manner, in order to unravel the spatio-temporal dynamics of sources and transfer mechanisms contributing FIOs to streams in agricultural settings.

This repository contains the source code for the model, which is written in Python 3.6. It is organised as follows:

- script containing the locations of various input and output files
- script containing functions for generating maps required on initialisation of the model
- script for writing and initial visualisation/processing of model outputs
- configuration file for the model detailing run-specific settings (e.g. model domain, parameter values, etc.)
- the main script containing the model functions, called by the configuration file
- script for post-processing of model results to generate summary statistics and plots for publication.

The code presented here is for the model as introduced and used in Neill et al. (in review) An agent-based model that simulates the spatio-temporal dynamics of sources and transfer mechanisms contributing faecal indicator organisms to streams. Parts 1 and 2. Journal of Environmental Management.

Use of this material is granted under conditions defined by the Attribution-NonCommercial-ShareAlike (CC BY-NC-SA) Creative Commons license.

Data type

Model source code

Dataset version


Copyright and Open Data Licencing

Date made available28 Oct 2019
PublisherUniversity of Aberdeen
Date of data production2019

Cite this