-
Notifications
You must be signed in to change notification settings - Fork 43
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
Conversation
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]>
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]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
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: clementleclerc <[email protected]>
Signed-off-by: clementleclerc <[email protected]>
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/DefaultNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/test/java/com/powsybl/ucte/converter/CounterNamingStrategyTest.java
Show resolved
Hide resolved
ucte/ucte-converter/src/test/java/com/powsybl/ucte/converter/CounterNamingStrategyTest.java
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/UcteExporter.java
Outdated
Show resolved
Hide resolved
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]>
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]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
…into 3191-conversion-to-ucte-format
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
ucte/ucte-network/src/main/java/com/powsybl/ucte/network/UcteElementId.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/util/UcteConstants.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/NamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Show resolved
Hide resolved
} | ||
|
||
private UcteNodeCode createNewUcteNodeId(String busId, VoltageLevel voltageLevel, char orderCode) { | ||
String newNodeId = String.format("%05d", voltageLevelCounter); |
There was a problem hiding this comment.
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...)
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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.
ucte/ucte-network/src/main/java/com/powsybl/ucte/network/UcteCountryCode.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
Signed-off-by: Leclerc Clement <[email protected]>
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/AbstractNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/AbstractNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/AbstractNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/AbstractNamingStrategy.java
Outdated
Show resolved
Hide resolved
ucte/ucte-network/src/test/java/com/powsybl/ucte/network/util/UcteNetworkUtilTest.java
Outdated
Show resolved
Hide resolved
ucte/ucte-network/src/main/java/com/powsybl/ucte/network/UcteCountryCode.java
Outdated
Show resolved
Hide resolved
ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/CounterNamingStrategy.java
Show resolved
Hide resolved
Signed-off-by: Leclerc Clement <[email protected]>
Quality Gate passedIssues Measures |
Please check if the PR fulfills these requirements
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?
If yes, please check if the following requirements are fulfilled
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