-
Notifications
You must be signed in to change notification settings - Fork 8
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
Slack bus relocation #923
Slack bus relocation #923
Conversation
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>
# Conflicts: # src/main/java/com/powsybl/openloadflow/network/impl/HvdcConverterStations.java # src/main/java/com/powsybl/openloadflow/network/impl/LfLoadImpl.java # src/main/java/com/powsybl/openloadflow/network/impl/LfVscConverterStationImpl.java # src/main/java/com/powsybl/openloadflow/network/impl/PropagatedContingency.java # src/main/java/com/powsybl/openloadflow/sa/AcSecurityAnalysis.java # src/main/java/com/powsybl/openloadflow/sa/DcSecurityAnalysis.java # src/main/java/com/powsybl/openloadflow/sensi/OpenSensitivityAnalysisProvider.java # src/test/java/com/powsybl/openloadflow/sa/LfActionTest.java # src/test/java/com/powsybl/openloadflow/sa/LfContingencyTest.java # src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisGraphTest.java # src/test/java/com/powsybl/openloadflow/sensi/DcSensitivityAnalysisTest.java
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@@ -390,7 +397,8 @@ private Map<LfBranch, DisabledBranchStatus> findBranchToOpenDirectlyImpactedByCo | |||
record ContingencyConnectivityLossImpact(boolean ok, int createdSynchronousComponents, Set<LfBus> busesToLost, Set<LfHvdc> hvdcsWithoutPower) { | |||
} | |||
|
|||
private ContingencyConnectivityLossImpact findBusesAndBranchesImpactedBecauseOfConnectivityLoss(LfNetwork network, Map<LfBranch, DisabledBranchStatus> branchesToOpen) { | |||
private ContingencyConnectivityLossImpact findBusesAndBranchesImpactedBecauseOfConnectivityLoss(LfNetwork network, Map<LfBranch, DisabledBranchStatus> branchesToOpen, | |||
Set<LfBus> initialBusIdsToLose) { |
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.
You can remove initialBusIdsToLose from attributes
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
// In that case, we have an issue with a different number of variables and equations. | ||
LOGGER.error("Contingency '{}' leads to an isolated slack bus: not supported", contingency.getId()); | ||
return new ContingencyConnectivityLossImpact(false, 0, Collections.emptySet(), Collections.emptySet()); | ||
if (isSlackBusIsolated(connectivity, network.getSlackBus())) { |
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.
if (isSlackBusIsolated(connectivity, network.getSlackBus())) { | |
if (network.getSlackBuses().stream().anyMatch(slackBus -> isSlackBusIsolated(connectivity, slackBus))) { |
fixes a modified version of testBusBarSectionContingencyWithSlackBusRelocation()
with following parameters:
lfParameters.getExtension(OpenLoadFlowParameters.class).setSlackBusesIds(List.of("VL1_1", "VL1_0")).setMaxSlackBusCount(2);
but remains an issue to solve, i am getting Expected to have same number of equations (9) and variables (10)
with
lfParameters.getExtension(OpenLoadFlowParameters.class).setSlackBusesIds(List.of("VL1_0")).setMaxSlackBusCount(2);
for N situ:
INFO 14:26:59.050 c.p.o.n.LfNetwork | Network {CC0 SC0}, slack buses are [VL1_0] (method='Parameter bus')
INFO 14:26:59.051 c.p.o.n.LfNetwork | Network {CC0 SC0}, reference bus is VL1_0 (method='First slack')
and CTG situation:
INFO 14:26:59.216 c.p.o.n.LfNetwork | Network {CC0 SC0}, slack buses are [VL1_1, VL2_0] (method='Most meshed bus')
TRACE 14:26:59.217 c.p.o.n.LfNetworkListenerTracer | onSlackBusChange(bus=VL1_1, slack=true)
TRACE 14:26:59.217 c.p.o.n.LfNetworkListenerTracer | onSlackBusChange(bus=VL2_0, slack=true)
INFO 14:26:59.217 c.p.o.n.LfNetwork | Network {CC0 SC0}, reference bus is VL1_1 (method='First slack')
TRACE 14:26:59.217 c.p.o.n.LfNetworkListenerTracer | onReferenceBusChange(bus=VL1_1, reference=true)
...
java.util.concurrent.CompletionException: com.powsybl.commons.PowsyblException: Expected to have same number of equations (9) and variables (10)
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.
probably a weird edge case where with provided settings we get more slack buses in N-1 situation compared to N situation
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.
support of multiple slack buses will be revisited in other PRs
And the possibility to have for a security analysis a slack bus different that the reference bus. And of course the support of the lose of the reference bus or the slack bus. |
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
@jeandemanged we decided to just no support AS with multiple slack buses and write a log to warm that we have forced the slack bus count to 1. It would need a lot a dev to support it as it would require to correctly update the active power distribution equation between slack each time a slack bus is disabled or enabled. It probably does not worth to do it as mutliple slacks is very rarely useful. |
|
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 a contingency lost the slack bus we skip the contingency.
What is the new behavior (if this is a feature change)?
We now relocate the slack bus to another valid bus for the contingency and then restore the original slack bus for the next contingency.
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: