Skip to content

PyPSA Model of the South African Energy System

Notifications You must be signed in to change notification settings

MeridianEconomics/pypsa-rsa

 
 

Repository files navigation

Development Status: Under development

Documentation Status License: AGPL v3 Discord Google Drive

PyPSA-RSA: An open Optimisation Model of the South African Power System

The accelerating development of open-source energy system modelling tools in recent years has now reached the point where it opens up a credible alternative approach to closed source exclusivity. An ever increasing number of studies are demonstrating that it is possible to produce analysis of a high quality using open-source energy system models, whilst building a wider participating modelling community. This builds confidence in results by enabling more effective peer review of work and therefore more effective feedback loops. It also builds a consistent stream of new talent entering the space to ensure that energy sector analytical capacity can be retained and steadily expanded.

This model makes use of freely available and open data which encourages the open exchange of model data developments and eases the comparison of model results. It provides a full, automated software pipeline to assemble the optimisation model from the original datasets, which enables easy replacement and improvement of the individual parts. Running the model requires a wide range on input datasets. Users are required to access the following datasets from the original sources:

Custom data generated for this model will need to be downloaded from Google Drive

Spatial resolution

PyPSA-RSA has been designed to conduct capacity expansion planning and resource adequacy studies at differing spatial and temporal resolutions. Five different spatial resolutions are available in the model, and custom GIS shpae files can also be utilsied:

Spatial resolutions

PyPSA-RSA can be solved for a single year, or for multiple years, with perfect foresight. Multi-horizon capacity expansion planning is compuationally intensive, and therefore the spatial resolution will typically need to be reduced to 1-supply or 10-supply depending on the number of years modelled. By defualt PyPSA-RSA uses full chronology (8760h per year), but the number of snapshots can be reduced through the use of time-series segmentation through the open-source Time Series Aggregation Module (TSAM).

Resources to get started

PyPSA-RSA is built upon the fundamental components in the PyPSA library. Before starting to use this model it is highly recommended to explore the PyPSA documentation. More detailed documentation can be found under our readthedocs. A two-part video series on using PyPSA and PyPSA-RSA can be found under link. Please feel free to join our Discord channel to ask questions.

PyPSA-RSA assembles the mathematical equations that need to be solved to generate a result. Whilst open-source solvers such as HiGHS and CBC can be used to solve smaller problems, a commercial solver is likely to be required for multi-horizon capacity expansion models. Suitable options include:

RAM requirements will vary based on the complexity of the model. Multi-horizon capacity expansion planning models with full time chronology will likely require between 65-128GB of RAM.

Installation

  1. Open your terminal at a location where you want to install pypsa-rsa. Type the following in your terminal to download the package from GitHub:

        .../some/path/without/spaces % git clone https://github.com/MeridianEconomics/pypsa-rsa.git
  2. The python package requirements are curated in the envs/environment.yaml file. The environment can be installed using:

        .../pypsa-rsa % conda env create -f envs/environment.yaml

    If the above takes longer than 30min, you might want to try mamba for faster installation:

        (base) conda install -c conda-forge mamba
    
        .../pypsa-rsa % mamba env create -f envs/environment.yaml
  3. For running the optimization one has to install the solver. We can recommend the open source HiGHs solver which installation manual is given here.

Documentation

The documentation is available here: documentation.

Developers

New collaborators are welcome! This project is currently maintained by Meridian Economics. Previous versions were developed within the Energy Centre at the Council for Scientific and Industrial Research (CSIR) as part of the CoNDyNet project, which is supported by the German Federal Ministry of Education and Research under grant no. 03SF0472C. Credits to Jonas Hörsch and Joanne Calitz who developed the original PyPSA-ZA model, Meridian Economics who extended the PyPSA-ZA model.PyPSA-RSA is relies on a number of functions from the PyPSA-Eur and PyPSA-Meets-Earth.

About

PyPSA Model of the South African Energy System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 86.8%
  • Python 13.1%
  • CSS 0.1%