Skip to content

Fix DC junctions in simplify_network#2147

Open
bobbyxng wants to merge 6 commits intomasterfrom
fix-simplify-network
Open

Fix DC junctions in simplify_network#2147
bobbyxng wants to merge 6 commits intomasterfrom
fix-simplify-network

Conversation

@bobbyxng
Copy link
Copy Markdown
Collaborator

@bobbyxng bobbyxng commented Apr 13, 2026

Closes open-energy-transition#275
@brynpickering @euronion
Same bug present in PyPSA-Eur upstream

Changes proposed in this Pull Request

  • Fixes overly aggressive DC link simplification in simplify_network (literal edge case example for new UK/Shetland HVDC and multi-terminal setup)
  • Updates supernodes so only true chain nodes (degree 2, also applied to DC) are collapsed. Preserves DC junction buses/multi-terminals (degree 3+) to avoid dropping branches in topologies like Shetland to onshore branching links.

Original base network topology
image

Before fix
remove_stubs: true
image

remove_stubs: false
image

After fix
remove_stubs: true
image

remove_stubs: false
image

Checklist

Required:

  • Changes are tested locally and behave as expected.
  • Code and workflow changes are documented.
  • A release note entry is added to doc/release_notes.rst.

@bobbyxng
Copy link
Copy Markdown
Collaborator Author

Clustered example 50 nodes with fix
image

@bobbyxng
Copy link
Copy Markdown
Collaborator Author

I had to add a new key, named it allow_ac_dc_mix for now to make this decision transparent/user configurable. Specifically, now that more DC buses "survive", it can happen that AC and DC buses in the same region (depending on clustering mode) are to be clustered. The question is, do you keep them separate (maintaining individual bus carriers) or allow DC buses to be clustered with AC buses (in this case all bus carriers become AC).

  • "Visually" this looks the same, however, the underlying subnetworks and topology, number of lines and links change.
  • For example, using config/test/config.clusters.yaml (administrative clustering)
    • allow_ac_dc_mix: false → 54 buses, 10 subnetworks (AC and DC kept separate)
    • allow_ac_dc_mix: true → 52 buses, 8 subnetworks (mixed clusters coerced to AC)

Open question, what to set as default. I believe the closest to replicate old behaviour is to allow mixing of AC and DC, but the technically more correct way would be to set allow_ac_dc_mix: false, as you also could have congestion between the AC and DC buses. Any thoughts? @fneum @brynpickering, maybe @martacki (given your clustering expertise :))

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.

Busmap linking distant substations

1 participant