InfraSim: Multi-Infrastructure Simulation Model

Multi-Infrastructure Simulation Model (InfraSim)

This repository contains the InfraSim, a generalised arc-node simulation model for modelling water-wastewater-energy systems. It dynamically analyses flows of water, wastewater, and electricity across the network using the multi-commodity flow formulation.


Project Lead: Aman Majid (
Project Supervisor: Professor Jim Hall
Contributors and Collaborators:
Tony Downward, University of Auckland

What’s Here

The repository contains the InfraSim source code. The model has been applied to a case-study from the Thames basin, England, and will be expanded to other cases in future. These cases serve as a guide for other users to apply the InfraSim model to their areas of interest. An overview of each directory within the repository is shown below.


  • A Jupyter Notebook explaining the model theory, as well as a small demo model of a water-wastewater-energy network in London, UK.
  • Updated December 2020


  • spatial: Shapefiles of node and edge data that can be opened in QGis.
  • csv: Time series demo nodal flow data.


  • InfraSim source code related to the Thames system can be found in
  • There are a series of other Python files that contain code for data pre-processing and post-processing.
  • Model metadata, parameters, and assumptions can also be found here.


  • A QGis project file to explore the network spatial data.


  • All model outputs such as figures, data, and statistics are saved here.


The model requires Gurobi and the associated GurobiPy library for the optimisation. In addition, standard scientific libraries in Python are needed such as pandas, numpy, matplotlib etc. Requirements for spatial network analysis include QGis, geopandas, and snkit.

Note: The Gurobi package requires a license for usage but this can be obtained freely for academic use. An open-source alternative version of the model is currently being developed in the PuLP library and the Julia programming language.

Getting started

Download and clone this repository.

Get a Gurobi license

Create project enviroment using the config file in this directory (only tested on macOS Big Sur):

conda env create --prefix ./env --file config.yml
conda activate ./env

See the demo notebook for a small demonstration.

To Do

  • Implement the InfraSim model using Julia code to allow users to choose their solver

Future extensions

  • InfraSim.JV: a model for the energy-water system in Israel, Palestine, and Jordan
  • InfraSim.Jamaica: a model for the water system in Jamaica

Citing Research

Coming soon…


This work was partially supported by funding from the NERC Doctoral Training Programme at the University of Oxford, as well as internal funding from the Oxford Martin School Programme on Transboundary Resource Management at the University of Oxford.


Copyright (C) 2020 Aman Majid. All versions released under the MIT License.

Aman Majid
Aman Majid
Research Associate

Aman Majid is a Postdoctoral Research Associate in Energy and Water Systems at the Oxford Martin School and the Environmental Change Institute