Skip to content

feat: Delaunay/Gabriel candidate topology for H2 and CO2 pipelines - #2351

Open
fneum wants to merge 36 commits into
masterfrom
pipeline-topology-delaunay
Open

fneum wants to merge 36 commits into
masterfrom
pipeline-topology-delaunay

Conversation

@fneum

@fneum fneum commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Supersedes #2153 by @bobbyxng (original commits retained). Closes #2151.

Candidate corridors for new H2 and CO2 pipelines now come from a Delaunay triangulation of the regions, reduced by default to the Gabriel graph with at least one candidate per region, instead of the electricity grid topology.

Compared to #2153:

  • The restructure of the configuration into a transmission section is dropped to avoid breaking changes. All existing keys are unchanged. The only new option is sector: pipeline_topology (min_degree, max_offshore_distance). Pipeline lengths use lines: length_factor.
  • One rule (build_transmission_topology) instead of two. The Gabriel test uses a k-d tree query of the edge midpoints instead of a dense distance matrix (about 500 to 180 lines).

Equivalence with the #2153 implementation: identical Delaunay graphs (edges, lengths, Gabriel flags, offshore shares, geometries) and identical candidate sets for min_degree 0 to 3 and max_offshore_distance unlimited and 300 km, on networks with 5, 52, 100, 128 and 4125 buses.

This changes default results (see release note). For example, long direct offshore corridors such as Norway to Germany are not in the Delaunay graph; Norway stays connected across the North Sea via Scotland and Denmark.

pipeline_topology_before_after

bobbyxng and others added 30 commits April 17, 2026 15:17
…itial build_transmission script using Delaunay and Gabriel filtering.
…rojects_and_dlr and build_transmission projects for clarity.
…the gas distribution grid, only capital costs. Clean-up.
Keep the Delaunay/Gabriel candidate topology for new H2 and CO2 pipelines,
configured by the additive key sector: pipeline_topology. Revert the
restructure of lines, links, transformers, transmission_projects and the
sector network keys into a new transmission section.
fneum added 3 commits October 6, 2026 11:42
Add the two rules to the rules overview, update the hydrogen and carbon
management design pages and add a release note. Rewrite the module
docstrings to the template of the rules pages.
Test Gabriel edges with a k-d tree query of the edge midpoints instead of a
dense distance matrix, extract Delaunay edges with numpy, simplify the
min-degree backfill and merge the Delaunay and filter rules. Results are
identical for 5 to 4125 buses. Add references for the Gabriel graph and
k-d tree.

@bobbyxng bobbyxng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @fneum for porting over the code and improving the speed!
I tested the workflow on a few networks, and the results seem identical to the old PR, only that its much faster :)

Apart from the comments in the code, I have a few comments, tbd.:

  • Before, we allowed carrier-individual settings for min_degree, max_offshore_distance, it's fine by me to simplify, but I also think it wouldn't hurt to allow the differentiation
  • Gas routes are no longer explicit candidates for H2 (retrofit is not affected), but should we allow the option for H2 pipelines to superposition the gas grid?
  • Biomass transport still uses electricity grid topology, should we harmonise it here as well and treat it the same way as CO2 and H2?
  • What about AC/DC? Do we want to explicitly allow new corridors there or only allow increase in capacities (master)?
  • Consider a small unit tests using square, triangle, two points, colinear points so we cover these strange/failing degenerate cases (which are currently fine in the master)

Comment thread config/config.default.yaml Resolved
Comment thread scripts/build_transmission_topology.py Resolved
Comment thread scripts/build_transmission_topology.py Resolved
Comment thread scripts/build_transmission_topology.py Resolved
Comment thread scripts/build_transmission_topology.py Resolved
Comment thread scripts/lib/validation/config/sector.py Resolved
Comment thread scripts/prepare_sector_network.py Resolved
Comment thread doc/release_notes.md Resolved
Comment thread scripts/build_transmission_topology.py Resolved
Comment thread scripts/build_transmission_topology.py Resolved
fneum and others added 2 commits November 3, 2026 15:00
- sector: transport_corridors sets min_degree and max_offshore_distance
  separately for H2, CO2 and biomass; one rule, one file, one boolean
  column per carrier
- biomass transport uses the Delaunay corridors in both directions
- new H2 pipelines can also follow existing gas pipelines
- triangulate with Qhull QJ so collinear and coincident buses keep their
  corridors; up to three buses are connected pairwise
- consider AC buses only and list buses below the minimum degree
- unit tests for degenerate layouts and carrier-specific settings
- shorter release note, method described in the design docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@fneum fneum left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Alright, thanks for the feedback! I implemented most of your suggestions. Ready to go?

Comment thread scripts/build_transmission_topology.py Resolved
Comment thread doc/release_notes.md Resolved
Comment thread scripts/lib/validation/config/sector.py Resolved
Comment thread scripts/build_transmission_topology.py Resolved
Comment thread scripts/build_transmission_topology.py Resolved
Comment thread config/config.default.yaml Resolved
Comment thread rules/build_sector.smk
scripts("cluster_gas_network.py")


rule build_transmission_topology:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

should work, they just need to put it under run: shared_resources: exclude

Comment thread scripts/build_transmission_topology.py Resolved
Comment thread scripts/build_transmission_topology.py Resolved
Comment thread scripts/prepare_sector_network.py Resolved
@bobbyxng

bobbyxng commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Alright, thanks for the feedback! I implemented most of your suggestions. Ready to go?

Thanks @fneum, looks good to me! One last thing before merging:
In my tests, a one-bus network still fails. I think it would be best that independent of whether the networks are on or off, the one bus run would still work (although they would mean the same) Could we return empty dataframes (or do sth else) so that it does not fail?

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.

Restructure and improve pipeline candidate topology (config + methodology)

2 participants