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

Get original ID #494

Merged
merged 9 commits into from
Apr 8, 2022
Merged

Get original ID #494

merged 9 commits into from
Apr 8, 2022

Conversation

geofjamg
Copy link
Member

@geofjamg geofjamg commented Apr 5, 2022

Signed-off-by: Geoffroy Jamgotchian geoffroy.jamgotchian@rte-france.com

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • 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 ? If so, link to this issue using '#XXX' and skip the rest
No

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
feature

What is the current behavior? (You can also link to an open issue here)
There is no strict equivalence between IIDM elements and Lf Network ones. Some elements like loads and shunts are aggregated and some other one a split (3 windings transformers and dangling lines).

What is the new behavior (if this is a feature change)?
We can get list of original IDs for each of the element and for branches a type to get original part of the IIDM element.

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

geofjamg added 3 commits April 5, 2022 15:35
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
@@ -140,6 +140,11 @@ public String getId() {
return shuntCompensators.stream().map(ShuntCompensator::getId).collect(Collectors.toList());
Copy link
Member

Choose a reason for hiding this comment

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

Can we delete this getIds method then?

@@ -140,6 +140,11 @@ public String getId() {
return shuntCompensators.stream().map(ShuntCompensator::getId).collect(Collectors.toList());
Copy link
Member

Choose a reason for hiding this comment

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

Can we delete this getIds method then?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@annetill
Copy link
Member

annetill commented Apr 6, 2022

And what about loads?

1 similar comment
@annetill
Copy link
Member

annetill commented Apr 6, 2022

And what about loads?

@geofjamg geofjamg changed the title Get original ID [WIP] Get original ID Apr 6, 2022
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
@geofjamg
Copy link
Member Author

geofjamg commented Apr 6, 2022

And what about loads?

Added

@geofjamg
Copy link
Member Author

geofjamg commented Apr 6, 2022

For myself: add unit tests

geofjamg and others added 4 commits April 6, 2022 14:15
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
@geofjamg geofjamg changed the title [WIP] Get original ID Get original ID Apr 6, 2022
@geofjamg geofjamg requested a review from annetill April 6, 2022 14:57
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

94.0% 94.0% Coverage
0.0% 0.0% Duplication

@@ -118,7 +117,7 @@ default double getHighVoltageLimit() {

Optional<LfShunt> getControllerShunt();

LfLoads getLfLoads();
LfLoads getLoads();
Copy link
Member

Choose a reason for hiding this comment

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

You really prefer that name? It is a bit confusing with the Load of IIDM network, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

For any other element accessors we did not use lf

@annetill annetill merged commit 2004b93 into main Apr 8, 2022
@annetill annetill deleted the original_id branch April 8, 2022 15:44
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