-
Notifications
You must be signed in to change notification settings - Fork 6
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
corrects Move connectable implementation in order to execute tcks on the network store server #447
Merged
+14
−5
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cbe7007
draft moveConnectable updateResource
Mathieu-Deharbe 6938228
corrects TU move, reaffect null
Mathieu-Deharbe 42930a0
use of attributesGetter
Mathieu-Deharbe d40ef06
introduce variable
Mathieu-Deharbe 2d78ea5
Merge branch 'main' into move-connectable-tck
Mathieu-Deharbe 2691c8d
Merge branch 'main' into move-connectable-tck
EtienneLt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
introduce variable
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
commit d40ef06b2b72d106e641276fdb94846d33b27119
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,10 +71,11 @@ public void moveConnectable(int node, String voltageLevelId) { | |
+ ") is already connected to node " + node + " of voltage level " + voltageLevelId); | ||
} | ||
getAbstractIdentifiable().updateResource(res -> { | ||
attributesGetter.apply(res).setConnectableBus(null); | ||
attributesGetter.apply(res).setBus(null); | ||
attributesGetter.apply(res).setNode(node); | ||
attributesGetter.apply(res).setVoltageLevelId(voltageLevelId); | ||
InjectionAttributes attr = attributesGetter.apply(res); | ||
attr.setConnectableBus(null); | ||
attr.setBus(null); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the same remarks for Bus and connectableBus There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and same answer as well. |
||
attr.setNode(node); | ||
attr.setVoltageLevelId(voltageLevelId); | ||
}); | ||
voltageLevel.invalidateCalculatedBuses(); | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
could you explain the reason to set null value for node in this case ?
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.
Because an equipment may be connected by Node (in node breaker view) of by bus (in bus breaker view). When you affect one of those values the other makes no sense anymore (and this may cause problems of you reaffect to the previous value, like in the unit tests).
However this brings a good question : may an equipment be connected to a bus and a node simultaneously in the same voltage level ? In the unit test the bus breaker view and the node breaker view were in different voltage levels so the previous value had to be nulled.
I don't really know the answer, what do you say @geofjamg ?
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.
Geoffroy told me that a voltage level can only be in node breaker OR bus breaker. Therefore it is impossible to be connected at the same to a node and to a bus in the same voltage level. And therefore setting the other to null should be fine.