-
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
Network modification connect and disconnect #2831
Conversation
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/Connectable.java
Outdated
Show resolved
Hide resolved
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/AbstractConnectable.java
Show resolved
Hide resolved
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/AbstractConnectable.java
Show resolved
Hide resolved
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/AbstractConnectable.java
Outdated
Show resolved
Hide resolved
// Exit if the connectable is already fully disconnected | ||
if (isAlreadyDisconnected) { | ||
return false; | ||
} |
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.
true
? I would expect the connectable to be non-disconnectable if disconnect returns false. Oh but it's the same for the Terminal... and we didn't put any javadoc to tell what it should return 🙁
If we return true, can't we avoid this? I think the code after should be proof against that 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.
After some discussion, this breaking change should not be done here.
But could we put in the javadoc that returning false means no changes?
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/NodeBreakerVoltageLevel.java
Outdated
Show resolved
Hide resolved
iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/ConnectableConnection.java
Outdated
Show resolved
Hide resolved
iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/AbstractDisconnection.java
Outdated
Show resolved
Hide resolved
iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/UnplannedDisconnection.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/AbstractConnectable.java
Show resolved
Hide resolved
iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/AbstractDisconnection.java
Outdated
Show resolved
Hide resolved
iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/ConnectableConnection.java
Outdated
Show resolved
Hide resolved
iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/AbstractDisconnection.java
Outdated
Show resolved
Hide resolved
.../iidm-modification/src/main/java/com/powsybl/iidm/modification/util/ModificationReports.java
Show resolved
Hide resolved
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
.../iidm-modification/src/main/java/com/powsybl/iidm/modification/util/ModificationReports.java
Show resolved
Hide resolved
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
Fixes #2805
What kind of change does this PR introduce?
feature
What is the current behavior?
When connecting/disconnecting a terminal, you get a confirmation boolean after the modification is done, which means that if you try to disconnect a connectable with 2 terminals, you will disconnect the first then the second. The problem is that if the 2nd disconnection fails, the first is still done so you have a connectable half-way disconnected
What is the new behavior (if this is a feature change)?
By using the connect/disconnect methods from the connectable class, you will connect/disconnect the different terminals if and only if all the terminals can be connected/disconnected.
If some terminals were already connected/disconnected, it will still work and the other terminals will be connected/disconnected.
If all the terminals were already connected/disconnected, it will fail and return false
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)
Other information: