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:
- GIS shape files for supply regions
- GIS data for existing Eskom transmission lines
- GIS data for population and GVA
Custom data generated for this model will need to be downloaded from Google Drive
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:
1-supply
: A single node for the entire South Africa.10-supply
: 10 nodes based on the GCCA 2025 Eskom Transmission Supply Regions.27-supply
: 27 nodes based on the Eskom 27 supply regions as per the original PyPSA-ZA model.34-supply
: 34 nodes based on the CLNs level in the GCCA 2025 Eskom Local Supply Regions.159-supply
: 159 nodes based on the GCCA 2025 Eskom Transmission MTS Regions.
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).
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.
-
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
-
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
-
For running the optimization one has to install the solver. We can recommend the open source HiGHs solver which installation manual is given here.
The documentation is available here: documentation.
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.