Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major improvement to OSM-based electricity grid (e.g. using relations, preserving substation locations) #1384

Merged
merged 29 commits into from
Nov 10, 2024

Conversation

bobbyxng
Copy link
Contributor

@bobbyxng bobbyxng commented Oct 22, 2024

Changes proposed in this Pull Request

  • Major improvement to the OSM-based electricity grid
  • build_osm_network completely rewritten:
    • Use of OSM relations, where available and where a single linestring could be extracted to replace member ways
    • substantial speed improvements
    • Exact locations of original substations are preserved
    • Lines with identical geometries and voltages are aggregated (num_parallel is increased)
    • Lines overpassing "virtual nodes" (not actual substations as per OSM raw data) are merged, if their electric properties allow it (same voltage levels, same number of circuits)
    • Geometries are preserved. Method to extend line/link to the substation has been improved significantly. No "mess" inside of a substation cluster anymore.
    • Method to determine substation point improved, based on "Pole of Inaccessibility" (PoI) method developed by Garcia-Castellanos & Lombardo 2007, doi.org/10.1080/14702540801897809 which ensures that an interior point in non-convex shapes is always found.
    • Clustering resolution has been sharpened from 5000 meter radius to only 500 meters, while still ensuring topological connectivity.
    • Single bus for each voltage level in each substation. Buses of different voltages are arranged in geometric shape (three buses form a triangle, see screenshot)
    • Transformers now have a capacity s_nom based on the maximum of connected capacity connected to each bus
    • Resolves many issues related around cross-border capacity, especially if the substation was located close to a border. @lindnemi @toniseibold @JulianGeis @nworbmot

image

image

image

Checklist

  • I tested my contribution locally and it works as intended.
  • Done here: Updated to osm-network version 0.5 #1387
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

Copy link
Contributor

github-actions bot commented Oct 22, 2024

Validator Report

I am the Validator. Download all artifacts here.
I'll be back and edit this comment for each new commit.

❗ Run failed!

Download 'logs' artifact to see more details.

  • master failed in: prepare_sector_network, prepare_sector_network, prepare_sector_network
  • osm-relations failed in: prepare_sector_network, prepare_sector_network, prepare_sector_network

Model Metrics

Benchmarks Image not available Image not available Image not available

Comparing osm-relations (74b8eb3) with master (54e39df).
Branch is 29 commits ahead and 1 commits behind.
Last updated on 2024-11-10 13:32:57 CET.

Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't check every line in detail, but the structure looks good and comparable to the previous version. I have a series of small comments that are easy to address:

scripts/base_network.py Show resolved Hide resolved
scripts/build_gdp_pop_non_nuts3.py Show resolved Hide resolved
config/config.default.yaml Outdated Show resolved Hide resolved
scripts/build_osm_network.py Outdated Show resolved Hide resolved
scripts/build_osm_network.py Show resolved Hide resolved
@bobbyxng bobbyxng self-assigned this Nov 6, 2024
@bobbyxng
Copy link
Contributor Author

bobbyxng commented Nov 6, 2024

Docstrings added

@fneum fneum merged commit 54e39df into master Nov 10, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants