fix removing voltageLevel when equipments are still present#3860
Open
fix removing voltageLevel when equipments are still present#3860
Conversation
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Comment on lines
+1
to
+7
| + Testing reportNode for reverting create line on line and not removing the voltage level | ||
| Line CJ_1 removed | ||
| Line CJ_2 removed | ||
| Line testLine removed | ||
| Line CJ_NEW created | ||
| Voltage level CJ_VL still contains equipments including quadripoles, it is not removed | ||
| Voltage level VLTEST removed |
Contributor
There was a problem hiding this comment.
So you are expecting everything to be deleted even if the voltage level cannot be deleted ? Wouldn't it be better to check before deleting instead of starting and noticing that one of the element cannot be deleted ?
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
olperr1
requested changes
Apr 1, 2026
Comment on lines
+138
to
+139
| core.iidm.modification.voltageLevelRemovingEquipmentsLeftWithQuadripoles = Le poste ${vlId} contient toujours des équipements dont des quadripoles, il n'est pas supprimé. | ||
| core.iidm.modification.voltageLevelRemovingEquipmentsLeftWithoutQuadripoles = Le poste ${vlId} contient toujours des équipements mais aucun quadripoles, il n'est pas supprimé. |
Member
There was a problem hiding this comment.
There's a typo in quadripôles: it takes a ^.
Comment on lines
+138
to
+139
| core.iidm.modification.voltageLevelRemovingEquipmentsLeftWithQuadripoles = Voltage level ${vlId} still contains equipments including quadripoles, it is not removed | ||
| core.iidm.modification.voltageLevelRemovingEquipmentsLeftWithoutQuadripoles = Voltage level ${vlId} still contains equipments but no quadripoles, it is not removed |
Member
There was a problem hiding this comment.
quadripoles -> branches
Can you fix the keys and the messages?
| core.iidm.modification.voltageLevelRemovingEquipmentsLeft = Le poste ${vlId} contient toujours des équipements. | ||
| core.iidm.modification.voltageLevelRemovingEquipmentsLeft = Le poste ${vlId} contient toujours des �quipements. | ||
| core.iidm.modification.voltageLevelRemovingEquipmentsLeftWithQuadripoles = Le poste ${vlId} contient toujours des équipements dont des quadripoles, il n'est pas supprimé. | ||
| core.iidm.modification.voltageLevelRemovingEquipmentsLeftWithoutQuadripoles = Le poste ${vlId} contient toujours des équipements mais aucun quadripoles, il n'est pas supprimé. |
Member
There was a problem hiding this comment.
Beware, this file should be edited in UTF-8.
Comment on lines
+203
to
+205
| boolean noMoreBranches = voltageLevel.getConnectableStream().noneMatch(c -> c.getType() != IdentifiableType.LINE | ||
| || c.getType() != IdentifiableType.TWO_WINDINGS_TRANSFORMER || c.getType() != IdentifiableType.THREE_WINDINGS_TRANSFORMER || | ||
| c.getType() != IdentifiableType.HVDC_CONVERTER_STATION); |
Member
There was a problem hiding this comment.
This check can be done in the if (!noMoreEquipments) {.
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


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
What is the current behavior?
when reverting a modification with a created voltage level if there are still equipments present on it it will fail
What is the new behavior (if this is a feature change)?
fix it and add a new warning when there is still quadripole or not
Does this PR introduce a breaking change or deprecate an API?
Other information: