-
Notifications
You must be signed in to change notification settings - Fork 9
Add switch actions in Fast DC Security Analysis #1153
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
Merged
Merged
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
72b5783
Add TUs to be verified by future developments
p-arvy ff34773
Add ComputedSwitchBranchElement and relative calculation in WoodburyE…
p-arvy 534b2d3
Refactor calculation of rhs/matrix values in WoodburyEngine
p-arvy 99ae55f
Add case with transformer lost as an action, and non null alpha on cu…
p-arvy e36189f
Merge branch 'refs/heads/main' into switching-actions-in-fast-dc-sa
p-arvy 8f52842
Merge branch 'refs/heads/main' into switching-actions-in-fast-dc-sa
p-arvy 096a892
wip
p-arvy 567fd60
Add cases with connectivity break
p-arvy bf95a91
clean
p-arvy c04a621
Clean
p-arvy fc82b3d
Clean
p-arvy bc9123d
Clean
p-arvy 18ecb1f
Refactor connectivity break analysis to add connectivity loss impact
p-arvy 6ed4611
Clean
p-arvy 07046ea
Add TU
p-arvy c61317f
Clean
p-arvy 8f3207d
Clean
p-arvy 627b986
Merge branch 'refs/heads/main' into switching-actions-in-fast-dc-sa
p-arvy b71ba78
Update
p-arvy a9a5c1f
Clean
p-arvy 15b5bd9
Update TU
p-arvy a9328cc
Merge branch 'refs/heads/main' into connectivity-loss-in-connectivity…
p-arvy ac766a8
Merge branch 'refs/heads/main' into connectivity-loss-in-connectivity…
p-arvy 994f6a2
Small clean
p-arvy 6cfcf3f
Update TU
p-arvy 87938b6
Clean
Hadrien-Godard a5a862a
Refacto
Hadrien-Godard e4dc7c4
Add NO_DISABLED_ELEMENTS
p-arvy cad785b
Merge remote-tracking branch 'origin/main' into connectivity-loss-in-…
Hadrien-Godard 31ac8e3
Remove ok field in ContingencyConnectivityLossImpact
Hadrien-Godard 76de054
Proposal to reduce arguments in addPostContingencyAndOperatorStrategy…
Hadrien-Godard eb720dc
Add test to ensure proper behavior when HVDC (not in AC emulation) ha…
vidaldid-rte 582a4f3
Sonar believes public test is bad. And some people pay attention to t…
vidaldid-rte 32e2b81
fix comment
vidaldid-rte f87c848
Merge branch 'refs/heads/main' into connectivity-loss-in-connectivity…
p-arvy bbdf051
Merge remote-tracking branch 'origin/connectivity-loss-in-connectivit…
p-arvy 711c4cf
Refactor records in WoodburyDcSecurityAnalysis
p-arvy eef4e96
Very small clean
p-arvy 4f92d7c
Merge branch 'refs/heads/main' into connectivity-loss-in-connectivity…
p-arvy 7014908
Merge branch 'main' into connectivity-loss-in-connectivity-break-anal…
Hadrien-Godard c50c5fb
Merge branch 'refs/heads/main' into connectivity-loss-in-connectivity…
p-arvy 80e18b5
Update TUs to include slow mode
p-arvy 62700ce
Merge branch 'refs/heads/main' into switching-actions-in-fast-dc-sa
p-arvy 7c46bb3
Merge branch 'refs/heads/connectivity-loss-in-connectivity-break-anal…
p-arvy 8542936
wip
p-arvy 5c45b84
wip
p-arvy 9808667
Clean
p-arvy d9ba68d
Merge branch 'refs/heads/main' into connectivity-loss-in-connectivity…
p-arvy 2d234d5
Merge branch 'refs/heads/main' into connectivity-loss-in-connectivity…
p-arvy 6857279
clean
p-arvy 6ce81ca
clean
p-arvy 2d2a7f0
Merge branch 'refs/heads/connectivity-loss-in-connectivity-break-anal…
p-arvy f583d0e
Use post contingency and operator strategy connectivity analysis resu…
p-arvy 57a1cd7
wip
p-arvy f17dd20
wip
p-arvy bdfbee8
clean
p-arvy 7080594
wip
p-arvy 75a0e25
Update TUs
p-arvy 52b9722
Refactor Woodbury Engine
p-arvy 63c7846
Merge branch 'refs/heads/main' into switching-actions-in-fast-dc-sa
p-arvy b4a1665
wip
p-arvy 2598ed2
Add comments
p-arvy 2ed6e48
Merge branch 'main' into switching-actions-in-fast-dc-sa
Hadrien-Godard 8caa93f
Minor typos
Hadrien-Godard 04b1f1b
Add comments
p-arvy 1091790
Merge branch 'main' into switching-actions-in-fast-dc-sa
Hadrien-Godard e5bc7c5
Merge branch 'refs/heads/main' into switching-actions-in-fast-dc-sa
p-arvy f733a43
Index columns of action states by branches
p-arvy c2ba64f
Adjust some comments
Hadrien-Godard cf3f846
Merge branch 'main' into switching-actions-in-fast-dc-sa
Hadrien-Godard 7c8d3cb
Merge remote-tracking branch 'origin/main' into switching-actions-in-…
Hadrien-Godard 2df9e51
Some improvments thanks to review
Hadrien-Godard e9defae
Use computeIfAbsent in setComputedElementIndexes
Hadrien-Godard 061f9bf
Merge remote-tracking branch 'origin/main' into switching-actions-in-…
Hadrien-Godard 9e8be38
Merge remote-tracking branch 'origin/main' into switching-actions-in-…
Hadrien-Godard c16048e
Refacto
Hadrien-Godard 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
There are no files selected for viewing
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
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
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
46 changes: 46 additions & 0 deletions
46
src/main/java/com/powsybl/openloadflow/dc/fastdc/ComputedSwitchBranchElement.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* Copyright (c) 2025, Coreso SA (https://www.coreso.eu/) and TSCNET Services GmbH (https://www.tscnet.eu/) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.openloadflow.dc.fastdc; | ||
|
||
import com.powsybl.openloadflow.dc.equations.ClosedBranchSide1DcFlowEquationTerm; | ||
import com.powsybl.openloadflow.dc.equations.DcEquationType; | ||
import com.powsybl.openloadflow.dc.equations.DcVariableType; | ||
import com.powsybl.openloadflow.equations.EquationSystem; | ||
import com.powsybl.openloadflow.graph.GraphConnectivity; | ||
import com.powsybl.openloadflow.network.ElementType; | ||
import com.powsybl.openloadflow.network.LfBranch; | ||
import com.powsybl.openloadflow.network.LfBus; | ||
|
||
/** | ||
* @author Pierre Arvy {@literal <pierre.arvy@artelys.com>} | ||
*/ | ||
public final class ComputedSwitchBranchElement extends AbstractComputedElement { | ||
|
||
private final boolean enabled; // indicates whether the action opens or closes the branch | ||
|
||
public ComputedSwitchBranchElement(LfBranch lfBranch, boolean enabled, EquationSystem<DcVariableType, DcEquationType> equationSystem) { | ||
super(lfBranch, equationSystem.getEquationTerm(ElementType.BRANCH, lfBranch.getNum(), ClosedBranchSide1DcFlowEquationTerm.class)); | ||
this.enabled = enabled; | ||
} | ||
|
||
public boolean isEnabled() { | ||
return enabled; | ||
} | ||
|
||
@Override | ||
public void applyToConnectivity(GraphConnectivity<LfBus, LfBranch> connectivity) { | ||
LfBranch lfBranch = getLfBranch(); | ||
if (lfBranch.getBus1() != null && lfBranch.getBus2() != null) { | ||
if (isEnabled()) { | ||
connectivity.addEdge(lfBranch.getBus1(), lfBranch.getBus2(), lfBranch); | ||
} else { | ||
connectivity.removeEdge(lfBranch); | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.