Back to Tools
🌱

Generation

What do we need to build? PyPSA-based optimization to plan renewable capacity (solar, wind, storage) with weather-informed modeling.

Framework

A reusable framework for the Generation tool is on the roadmap but not yet funded. PyPSA-VGR currently exists as a full implementation. The code is open source and can be cloned directly.

energy-toolkit-generation

Planned

A reusable framework for the Generation tool is not yet funded. PyPSA-VGR currently exists as a standalone implementation. Contact us if you are interested in funding a framework extraction.

No public framework repository yet. If you are interested in funding a reusable framework extraction, get in touch.

How it works

config (JSON)                ← Scenarios, financial assumptions, geography
    β”‚
    β–Ό
Generator (PyPSA)            ← Weather data + demand + optimization model
    β”‚
    β–Ό
Output (CSV/NetCDF)          ← Capacity plans, costs, generation profiles
    β”‚
    β–Ό
API (file-based)             ← Local filesystem or HTTP server
    β”‚
    β–Ό
Dashboard (Streamlit)        ← Scenario exploration, capacity mix, LCOE analysis

Generator

The generator uses PyPSA (Python for Power System Analysis) to find the optimal renewable capacity mix. Given a demand profile, weather data, and technology cost assumptions, it determines how much solar, wind, battery storage, and hydrogen capacity is needed to meet demand under different self-sufficiency targets.

PyPSA optimization

Builds a power system network with buses for load, renewables, battery, hydrogen, and turbines. Links model charge/discharge, electrolysis, and gas turbines. Optimizes for minimum cost subject to self-sufficiency and biogas constraints.

Weather-informed capacity factors

Uses ERA5 reanalysis data at 3-hour resolution to compute solar and wind capacity factors. Atlite handles land-cover exclusions using CORINE classification for realistic available area estimates.

Multi-scenario exploration

Configuration defines a scenario space across self-sufficiency targets (50–100%), energy demand variations (-20% to +20%), hydrogen options, offshore wind toggles, and biogas limits. The generator validates and runs all combinations.

Technology cost modeling

Comprehensive cost assumptions from 2020–2050 with multi-currency support (EUR, USD, SEK), present value calculations, and technology learning curves. Covers solar, onshore/offshore wind, battery, hydrogen electrolysis, nuclear, and biogas.

API

The API layer abstracts over the storage backend through a unified interface. The same dashboard code reads scenario data from the local filesystem during development or from any HTTP-accessible store in production.

Frontend (Dashboard)

A Streamlit application with interactive scenario controls and energy system visualizations. Designed for three audience levels.

Scenario explorer

Slider controls for self-sufficiency targets and energy scenarios. Toggle hydrogen, offshore wind, and biogas limits. Bookmarkable URLs preserve parameter state.

Capacity & cost analysis

Energy metric cards showing capacity per technology. Stacked bar charts for generation mix at weekly resolution. LCOE breakdown by energy source. Performance metrics showing met/unmet demand.

Geographic context

Interactive map with Folium for regional selection. Land use comparison showing physical footprint of renewable installations relative to municipal areas.

Technology stack

Generator

  • Python 3.8+, PyPSA β‰₯0.28
  • Atlite (renewable resources)
  • Pandas, NumPy, GeoPandas
  • CBC/GLPK/HiGHS solvers

API

  • File-based (local filesystem)
  • Optional HTTP server backend
  • CSV + JSON output formats

Frontend

  • Streamlit 1.38
  • Plotly, Altair
  • Folium (maps)
  • Bilingual (Swedish/English)

Reference

Technical reference for implementers. Expand the section below for model internals, scenario configuration, input data structure, and deployment details.

β–Ά Technical reference

Implementations

Live applications built with the Generation tool.

PyPSA-VGR

PyPSA-VGR

VGR

Live

Renewable capacity planner for VΓ€stra GΓΆtaland. Uses PyPSA optimization to determine the solar, wind, and storage mix needed to meet future demand.

PyPSAStreamlitVΓ€stra GΓΆtaland

Deploy and extend

The Generation tool deploys as a Docker container running the Streamlit dashboard. Run it on any container platform; scenario data can be served from the local filesystem or any HTTP-accessible store.

# Build and run locally
docker build -t pypsa-vgr .
docker run -p 8501:8501 pypsa-vgr

# Or run directly
streamlit run dashboard/app.py