Skip to contents

A European energy system optimization model with an R interface.

Note: the repository is under an update — the new version is expected October 2-5.

r·en·euro provides a European energy system model built on energyRt. It was developed as teaching material for a modelling course, to replicate PyPSA-Eur, an established open model of the European power system, at several spatial resolutions.

Eleven models ship with the package, ready to solve — all built on 2025 weather and load (the europe-2025-sarah3-era5 cutout; measured ENTSO-E demand). They need neither Python nor a PyPSA-Eur clone, and are lazy-loaded, so they cost nothing until touched.

model nodes planning horizon
pypsa_eur_5, _5cp 5 single year, one week (Belgium; _5cp copperplated)
pypsa_eur_41 41 single year, full hourly year
pypsa_eur_41_2025 … _2050 41 one year per horizon, fleet aged by retirement
pypsa_eur_41v 41 2025–2050 in five-year milestones, vintaged fleet
pypsa_eur_nuts3 1,035 single year, full hourly year

pypsa_eur_nuts3 follows Eurostat’s NUTS3 regions rather than an algorithmic clustering, so it joins to published statistics; it is a source model — carve a study area from it or aggregate it to NUTS0/1/2 with energyRt::aggregate_model_regions(). Its hourly weather ships as separate objects that attach_weather() puts back; the horizon series and pypsa_eur_41v reuse pypsa_eur_41’s weather the same way. The About article covers how each model was built and what is planned next.

Installation

# install.packages("pak")
pak::pak("optimal2050/reneuro")

energyRt is not on CRAN; pak installs it from GitHub alongside reneuro. A solver is also required — see the installation guide and en_setup(). GLPK solves the five-node models; HiGHS (via Julia or Python) handles sampled larger models on a standard laptop, while full-resolution models call for commercial or GPU solvers.

Quick start

library(reneuro)
library(energyRt)

report(pypsa_eur_5)

scen <- interpolate_model(pypsa_eur_5, name = "be")
scen <- write_script(scen, solver = solver_options$glpk)
scen <- read_solution(solve_scenario(scen, wait = TRUE))

getData(scen, "vObjective", merge = TRUE)$value
report(scen)

The solved scenario also ships as be_solved, so the results can be explored without a solver installed.

Documentation

  • Getting started — a model end to end, and carving a local model out of NUTS3
  • The data — what ships, and what changing spatial resolution does to it
  • Data sources — the upstream inputs as maps and figures, with the source and licence table
  • Wind energy — a quality-aware wind resource layer built beside the replica, with the Global Wind Atlas setting the long-term level and ERA5 the hourly variability
  • Solar energy — the solar half of that layer, checked against the Global Solar Atlas
  • About — how the models were built, solver benchmarks, references and licences

Contributing

Issues and pull requests are welcome at github.com/optimal2050/reneuro; the package follows the optimal2050 conventions.

Licence

reneuro’s sources are Apache-2.0. It imports energyRt, which is AGPL-3, so a distribution of the two together is conveyed under AGPL-3. The shipped models inherit the licences of their inputs, chiefly ODbL-1.0 for OpenStreetMap transmission topology. Full detail, including data provenance, is in the About article and in NOTICE.

If you use reneuro in research, please cite it with citation("reneuro") and also cite PyPSA-Eur — see References.