Skip to content

CGMES: Deterministic CGM subnetworks import order - #4080

Open
jeandemanged wants to merge 3 commits into
mainfrom
fix-cgmes-subnetworks-deterministic-order
Open

CGMES: Deterministic CGM subnetworks import order#4080
jeandemanged wants to merge 3 commits into
mainfrom
fix-cgmes-subnetworks-deterministic-order

Conversation

@jeandemanged

@jeandemanged jeandemanged commented Aug 28, 2026

Copy link
Copy Markdown
Member

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?

No

What kind of change does this PR introduce?

Feature

What is the current behavior?

When importing a CGM with subnetworks, the subnetworks are in a random order. The same import when repeated leads to different IIDM and reports because of different subnetworks loading order.

What is the new behavior (if this is a feature change)?
Subnetworks are always imported in deterministic order, depending on iidm.import.cgmes.cgm-with-subnetworks-defined-by parameter:

  • FILENAME: IGM name used as sorting key
  • MODELING_AUTHORITY: modeling authority used as sorting key

The PR also fixes a bug with the FILENAME method: an IGM name that's a substring of another (e.g. Galia vs. HVDC-Nordheim-Galia) caused name.contains(igmName) to pull the composite IGM's files into the simple IGM's subnetwork too, producing a merge failure (equipment already exists).

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

  • No

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

Other information:

Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
…e too

Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants