This repository provides the open-access code and result datasets for a methodology that identifies no-regret transmission and generation investments — investments that remain near-optimal across a set of future scenarios to which probabilities cannot be assigned. The method was developed at RISE within the Nordic Energy Systems Programme (NESP) and demonstrated on the Swedish power system. Funded by the Swedish Energy Agency (Energimyndigheten), project P2025-01807.
Regret of applying one scenario's optimal portfolio in another scenario, relative to that scenario's own optimum. The definition and values match the regret figure in the project's final report.
The regret of a portfolio is the additional system cost incurred when it is committed and a different scenario is realised. A portfolio with low regret across all scenarios is robust. In the Swedish study, the EP and EF portfolios remain low-regret across scenarios (at most a few hundred MEUR/yr), whereas the SF and FM portfolios can incur regret of tens of thousands of MEUR/yr under an adverse realisation. The investments common to all scenario-optimal portfolios define a no-regret core.
The result datasets are small and included in the repository, so the results can be inspected without installing the model:
pip install pandas matplotlib jupyterlab
jupyter lab notebooks/explore_results.ipynbThis notebook covers the regret matrix, the minimax-regret ranking, the no-regret core, the
multi-criteria ranking, and the portfolios, using the shipped data. The figure above is regenerated
with python scripts/plot_regret_matrices.py. A step-by-step treatment of the method is provided by
the tutorial series in notebooks/ (see notebooks/README.md): five notebooks, each runnable on the
shipped datasets.
| Task | Location |
|---|---|
| Inspect the results | notebooks/explore_results.ipynb |
| Follow the method step by step | notebooks/ (tutorial series; notebooks/README.md) |
| Understand each dataset | data/README.md, config/data_provenance.yaml (data dictionary) |
| Locate a script | scripts/README.md |
| See what is and is not included | CURATION.md |
| Re-run the full study | "Reproduce the full study" below |
notebooks/— results walkthrough and the tutorial series (notebooks/README.md)scripts/— the methodology pipeline (case building → conflict/regret → no-regret core → MCDA → clustering → stability); seescripts/README.mdsrc/— openTEPES input/output wrappers and per-work-package notes (AP1/AP2/AP3)config/— scenario registries anddata_provenance.yaml(each input with its source)data/network_xeval/— the curated result datasetsfigures/— generated figurestests/— unit tests
The capacity-expansion solves use openTEPES, an open-source stochastic MILP model (https://github.com/IIT-EnergySystemModels/openTEPES, GNU AGPL-3.0). Enhancements developed for this project — a Big-M Kirchhoff formulation for AC line expansion, per-technology real WACC, binary investment handling, and adequacy reporting (LOLE, ENS) — were contributed upstream and are available there. This repository depends on openTEPES as a package and does not bundle its source.
Public national sources: Svenska kraftnät Long-term Market Analysis (LMA 2024; four scenarios; 2035
demand 176–270 TWh), the Nätutvecklingsplan 2024–2033 grid plan, ENTSO-E TYNDP 2024 candidate
projects, and VRE profiles from the Bio-FlexGen project / ERA5. The adequacy standard follows EU
Regulation 2019/943. Full provenance is in config/data_provenance.yaml.
The shipped datasets are the outputs of the method. Re-solving the twelve cases requires openTEPES and the LMA/grid input data (not shipped; ~105 GB of raw solves):
pip install -r requirements.txt # openTEPES + the analysis stack
python scripts/create_scenario_cases.py # build the 12 cases (requires the input data)
python scripts/run_experiment.py list # list the pipeline stagesSee CURATION.md for caveats and scripts/README.md for the stage order.
Akshaya Tammanur Ravi (formerly RISE Research Institutes of Sweden) contributed to the early stages of this project.
- Code: GNU AGPL-3.0 (
LICENSE). Data: CC-BY-4.0 (data/LICENSE). - Cite via
CITATION.cff(and its DOI once released) and the openTEPES SoftwareX paper (Ramos, Alvarez & Lumbreras, 2022).
