Skip to content

Fix BUS_BRANCH export failure with keepOriginalTopology#3905

Open
cphili wants to merge 3 commits into
mainfrom
avoid_error_using_keeporiginaltopology
Open

Fix BUS_BRANCH export failure with keepOriginalTopology#3905
cphili wants to merge 3 commits into
mainfrom
avoid_error_using_keeporiginaltopology

Conversation

@cphili
Copy link
Copy Markdown
Member

@cphili cphili commented May 6, 2026

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?
#3851

What kind of change does this PR introduce?
Bug fix

What is the current behavior?
When exporting a network in IIDM format with BUS_BRANCH topology level and BUS_BRANCH_VOLTAGE_LEVEL_INCOMPATIBILITY_BEHAVIOR = KEEP_ORIGINAL_TOPOLOGY, the export may fail if a voltage level originally in NODE_BREAKER topology contains busbar sections. In such cases, terminal references may end up pointing to busbar sections while the voltage level is exported in BUS_BRANCH, resulting in a runtime exception during serialization.

What is the new behavior (if this is a feature change)?
When keepOriginalTopology is enabled, voltage levels whose native topology is NODE_BREAKER and which contain busbar sections are now automatically exported in NODE_BREAKER topology, even if the configured export topology level is BUS_BRANCH.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

What changes might users need to make in their application due to this PR? (migration steps)
None

Other information:

…sent and keepOriginalTopology is enabled

Signed-off-by: Clement Philipot <clement.philipot@rte-france.com>
@cphili cphili changed the title Export the voltage level in node-breaker when busbar sections are present and keepOriginalTopology is enabled Automatically export voltage levels in NODE_BREAKER when keepOriginalTopology is enabled May 6, 2026
@cphili cphili changed the title Automatically export voltage levels in NODE_BREAKER when keepOriginalTopology is enabled Fix BUS_BRANCH export failure with keepOriginalTopology May 6, 2026
Signed-off-by: Clement Philipot <clement.philipot@rte-france.com>
@cphili cphili force-pushed the avoid_error_using_keeporiginaltopology branch from 07e9b8c to 68ffe1f Compare May 6, 2026 15:01
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Waiting for review

Development

Successfully merging this pull request may close these issues.

Avoid error related to a know unsupported topology in bus branch export when using "keep original topology" incompatibility behavior

2 participants