Skip to content

PyPSA-SPICE: PyPSA-based Scenario Planning and Integrated Capacity Expansion

License PyPSA version Snakemake Code style

Info

If you are considering using this model builder, please reach out to us at modelling@agora-thinktanks.org. We would be happy to help you get started. If you encounter a bug, please create a new issue. For new ideas or feature requests, you can start a conversation in the discussions section of the repository.

PyPSA-SPICE is an open-source model builder for assessing national mid-/long-term energy scenarios using a least-cost, multi-sectoral optimisation approach based on the PyPSA framework. It can be used to build models that represent one or more countries across multiple interconnected nodes linked by electricity transmission. Within each region, it models the integration of the power, heat, and transport sectors.

The model workflow has been designed to be more accessible compared to other PyPSA-based models, though basic Python coding knowledge is required.

PyPSA-SPICE_single_node_energy_flow

Key Features of PyPSA-SPICE

  • Assessment of national or regional mid-/long-term energy scenarios using a least-cost optimisation approach based on the PyPSA framework.
  • Co-optimisation of generation, capacity, and interconnector expansion at hourly resolution.
  • Power plants are represented at technology resolution, with user-defined clustering within technologies as needed.
  • Straightforward model creation for new countries and/or regions defined by the user.
  • Easy integration of custom data into the model.
  • Several pre-defined custom constraints including energy independence, reserve margin, and must-run constraints on thermal generators.
  • Flexible sectoral coverage: base power sector model can be complemented with industry and transport sectors for full energy system investigation.
  • PyPSA-SPICE-Vis as a visual tool for easy visualisation of model outputs.
  • Extensive documentation to facilitate working with the model.

Types of models outside the scope of PyPSA-SPICE

PyPSA-SPICE is not designed for modelling power or energy systems with very high geographic resolution, such as load flow modelling. Instead, it prioritizes ease of building country- or region-level models using manually provided custom data. For this reason, it is best suited for models with a maximum of 10–15 regional nodes.

  • For higher geographic detail other open-source PyPSA-based frameworks can be used:
  • PyPSA-Eur
  • PyPSA-meets-Earth

  • PyPSA-SPICE requires total energy demand as an input and does not optimize total demand, modal shifts, or other demand-side dynamics.

Studies conducted using PyPSA-SPICE

Please refer to publication to see the publications or studies using the PyPSA-SPICE model builder.

Visualisation of PyPSA-SPICE Results

To make it easy to visualise and compare scenario outputs, we provide an open-source library PyPSA-SPICE-Vis within the model builder.

Citing PyPSA-SPICE

Please use the citation below:

  • Agora Think Tanks (2025): PyPSA-SPICE: PyPSA-based Scenario Planning and Integrated Capacity Expansion

Contributing

We welcome contributions from anyone interested in improving this project. Please take a moment to review our contributing guide and code of conduct. If you have ideas, suggestions, or encounter any issues, feel free to open an issue or submit a pull request on GitHub.

Maintained by

AgoraEW

Supported by

CASE INETTT

License

Copyright © PyPSA-SPICE developers

PyPSA-SPICE is licensed under the open source GNU General Public License v2.0 or later with the following information:

The documentation is licensed under CC-BY-4.0.

The repository uses REUSE to expose the licenses of its files.