Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust UCTE naming strategy #3206

Merged
merged 41 commits into from
Dec 16, 2024
Merged

More robust UCTE naming strategy #3206

merged 41 commits into from
Dec 16, 2024

Conversation

clementleclercRTE
Copy link
Contributor

@clementleclercRTE clementleclercRTE commented Nov 12, 2024

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)

Does this PR already have an issue describing the problem?

Fixes #3191

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior (if this is a feature change)?

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

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

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

If you have a custom UCTE naming strategy (i.e. a class implementing com.powsybl.ucte.converter.NamingStrategy), you should implement the following method:

  • void initializeNetwork(Network network);

Other information:

By default, the "Default" naming strategy is used when exporting a network in UCTE.
If you want to use the new naming strategy, you should define the following property in your configuration:

  • ucte.export.naming-strategy: Counter

Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
@clementleclercRTE clementleclercRTE linked an issue Nov 12, 2024 that may be closed by this pull request
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
clementleclercRTE and others added 6 commits November 18, 2024 10:21
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: clementleclerc <[email protected]>
Signed-off-by: clementleclerc <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
clementleclercRTE and others added 6 commits December 2, 2024 09:57
@geofjamg geofjamg changed the title [WIP] 3191 conversion to ucte format [WIP] More robust UCTE naming strategy Dec 3, 2024
@olperr1 olperr1 added the Breaking Change API is broken label Dec 4, 2024
}

private UcteNodeCode createNewUcteNodeId(String busId, VoltageLevel voltageLevel, char orderCode) {
String newNodeId = String.format("%05d", voltageLevelCounter);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can use [A-Z0-9] codes instead?
We could convert the number in base 36, but I think it would be better to have the letters first instead of the digits.
(=> AAAAA to AAAAZ, AAAA0 to AAAA9, then AAAABA...)

Copy link
Member

Choose a reason for hiding this comment

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

(But it is not required.)

Copy link
Member

Choose a reason for hiding this comment

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

With numbers is ok for now. Let's see that later if one day needed.

Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
@clementleclercRTE clementleclercRTE changed the title [WIP] More robust UCTE naming strategy More robust UCTE naming strategy Dec 16, 2024
@olperr1 olperr1 merged commit 9001b57 into main Dec 16, 2024
8 checks passed
@olperr1 olperr1 deleted the 3191-conversion-to-ucte-format branch December 16, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Conversion to UCTE format
5 participants