-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add connect/disconnect on Tie Lines and HVDC Lines #3072
Conversation
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
This is another possible solution that would close #3069 |
Should the Tie Line and HVDC Line become Connectables ? |
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
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 add a utility method to avoid the code duplication?
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/HvdcLine.java
Outdated
Show resolved
Hide resolved
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/HvdcLine.java
Outdated
Show resolved
Hide resolved
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/TieLine.java
Outdated
Show resolved
Hide resolved
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/HvdcLineImpl.java
Outdated
Show resolved
Hide resolved
# Conflicts: # iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/AbstractDisconnection.java # iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/ConnectableConnection.java # iidm/iidm-modification/src/test/java/com/powsybl/iidm/modification/ConnectionAndDisconnectionsTest.java
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
Outdated
Show resolved
Hide resolved
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/AbstractConnectable.java
Outdated
Show resolved
Hide resolved
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/HvdcLineImpl.java
Show resolved
Hide resolved
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
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.
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/AbstractDisconnection.java
Outdated
Show resolved
Hide resolved
iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/AbstractDisconnection.java
Show resolved
Hide resolved
iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/ConnectableConnection.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>
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/ConnectDisconnectUtil.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Quality Gate passedIssues Measures |
* add connection and disconnection to HVDC lines and Tie Lines * extract connect/disconnect methods to util class * modify javadoc and parameters name Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com> (cherry picked from commit b113fcb)
* add connection and disconnection to HVDC lines and Tie Lines * extract connect/disconnect methods to util class * modify javadoc and parameters name Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Bug fix + new Feature
What is the current behavior?
If you use for example a ConnectableConnection on a non-existing connectable or on a TieLine (which is not a Connectable), the application of the NetworkModification will crash due to a null pointer exception. This is due to the fact that only Connectables are managed since Tie Lines and HVDC Lines do not have connect/disconnect methods.
What is the new behavior (if this is a feature change)?
Tie Lines and HVDC Lines now have connect and disconnect methods implemented.
Network modification for connection and disconnection now also work with Tie Lines and HVDC Lines.
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 had your own implementation for HVDC Lines, you now need to implement the following methods:
If you had your own implementation for Tie Lines, you now need to implement the following methods: