Skip to content

UCTE-DEF import/export: use IIDM Transformer ratedS - #4093

Draft
armic-artelys wants to merge 6 commits into
mainfrom
feature/4073-ucte-export-rateds
Draft

armic-artelys wants to merge 6 commits into
mainfrom
feature/4073-ucte-export-rateds

Conversation

@armic-artelys

@armic-artelys armic-artelys commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

This PR is stacked on top of #4090.

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)

    I don't think there are repositories impacted other than the official documentation.

Does this PR already have an issue describing the problem?
Fixes #4073.

What kind of change does this PR introduce?
Feature.

What is the current behavior?
UCTE importer and exporter use the deprecated property nomimalPower (with a typo) in the IIDM 2w transformers.

What is the new behavior (if this is a feature change)?
Property nomimalPower has been replaced with the hardcoded field ratedS since v7.5.0. This PR replaces the use of the deprecated property with the new field.

Retrocompatible: In the exporter, if the field ratedS is NaN, we try to source it in the old way with the nomimalPower prop.

Absent nominal power: Nominal power is mandatory for ##T in UCTE-DEF, but it's not used in the PF. When nominal power is NaN in iidm (NaN field and absent, null or NaN prop), we issue a warning and default to 99999.

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)

Other information:
Ultimately, support any IIDM to UCTE-DEF conversion. See umbrella issue: #3989

@armic-artelys
armic-artelys added this pull request to stack #4094 September 10, 2026 10:09
@armic-artelys armic-artelys self-assigned this Sep 10, 2026
@armic-artelys
armic-artelys force-pushed the feature/4073-ucte-export-rateds branch from a8d694d to b01a6cb Compare September 10, 2026 15:04
@armic-artelys
armic-artelys force-pushed the feature/ucte-export-reporter branch from 36f6f4e to 7ee35a6 Compare September 10, 2026 16:04
@armic-artelys
armic-artelys force-pushed the feature/4073-ucte-export-rateds branch from b01a6cb to 3ab8f3b Compare September 10, 2026 16:04
@armic-artelys armic-artelys changed the title Feature/4073 ucte export rateds Feature/4073 ucte export ratedS Sep 10, 2026
@jeandemanged
jeandemanged marked this pull request as draft September 11, 2026 14:58
@jeandemanged
jeandemanged force-pushed the feature/ucte-export-reporter branch from 7ee35a6 to f56444d Compare September 17, 2026 16:47
@jeandemanged
jeandemanged force-pushed the feature/4073-ucte-export-rateds branch from 6c656b4 to 4b8186f Compare September 17, 2026 16:47
@jeandemanged jeandemanged moved this from TODO to In Progress in Release 12/2026 Sep 18, 2026
@armic-artelys
armic-artelys force-pushed the feature/ucte-export-reporter branch 3 times, most recently from c736ec6 to bec6df5 Compare September 18, 2026 09:01
Base automatically changed from feature/ucte-export-reporter to main September 18, 2026 09:19
@armic-artelys
armic-artelys force-pushed the feature/4073-ucte-export-rateds branch 2 times, most recently from 6c656b4 to 3974907 Compare September 21, 2026 08:09
@armic-artelys
armic-artelys force-pushed the feature/4073-ucte-export-rateds branch from 3974907 to e75a0fc Compare September 25, 2026 09:47
@sonarqubecloud

Copy link
Copy Markdown

…power

- Don't crash when nominal value can't be found in  a transformer. Issue a warning in the report and dfault to 99999 (impossible value).

Signed-off-by: Arthur Michaut <arthur.michaut@artelys.com>
…m ratedS

Signed-off-by: Arthur Michaut <arthur.michaut@artelys.com>
@armic-artelys
armic-artelys force-pushed the feature/4073-ucte-export-rateds branch from 9242ffd to 3a4f26f Compare October 1, 2026 14:14
Comment thread docs/grid_exchange_formats/ucte/export.md Outdated
Comment thread docs/grid_exchange_formats/ucte/import.md Outdated
armic-artelys and others added 3 commits October 2, 2026 15:00
…legacy property `nominalPower`

Co-authored-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: armic-artelys <arthur.michaut@artelys.com>
…sformer fields sourcing

Co-authored-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: armic-artelys <arthur.michaut@artelys.com>
Signed-off-by: Arthur Michaut <arthur.michaut@artelys.com>
@jeandemanged
jeandemanged removed this pull request from stack #4094 October 2, 2026 13:17
Signed-off-by: Arthur Michaut <arthur.michaut@artelys.com>
* Formats a double value the same way {@link com.powsybl.ucte.network.io.UcteWriter} exports it: as a decimal
* string truncated to {@code fieldLength} characters.
*/
private static String formatAsExported(double value, int fieldLength) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is dead code, remove.

import com.powsybl.commons.datasource.ResourceSet;
import com.powsybl.commons.test.AbstractSerDeTest;
import com.powsybl.iidm.network.*;
import com.powsybl.ucte.converter.util.UcteConverterConstants;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

checkstyle error

@jeandemanged jeandemanged changed the title Feature/4073 ucte export ratedS UCTE-DEF import/export: use IIDM Transformer ratedS Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Waiting for review

Development

Successfully merging this pull request may close these issues.

UCTE-DEF export: ##T ratedS/nominalPower blank

2 participants