Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
4a9488f
Bump IIDM version to 1.15 in unit test files
olperr1 Nov 18, 2025
5a8a649
bump powsybl-core to 7.1.0-SNAPSHOT
vidaldid-rte Nov 18, 2025
6777681
Fix public API modfication
vidaldid-rte Nov 26, 2025
4ae5029
update LoadFlowProviderAPI (#1299)
vidaldid-rte Nov 26, 2025
fbf982c
Adapt OpenLoadFlow to enum change in core (connected component mode) …
cphili Nov 26, 2025
d5a2177
Fix packages
geofjamg Nov 27, 2025
65d367b
Merge branch 'main' into sensi_operator_strategy
geofjamg Dec 1, 2025
f228298
Actions refactoring
geofjamg Dec 2, 2025
07e6777
Add sensi action unit test
geofjamg Dec 2, 2025
7d6893f
Wip
geofjamg Dec 2, 2025
ce7c6a9
Wip
geofjamg Dec 2, 2025
b956c6a
Merge branch 'main' into sensi_operator_strategy
geofjamg Dec 3, 2025
6c8d1e3
Merge branch 'main' into sensi_operator_strategy
geofjamg Dec 8, 2025
2cd2f8b
Fix merge
geofjamg Dec 8, 2025
4760907
Refactor ComputedElement to not expose the abstract class
geofjamg Dec 8, 2025
126787f
Merge branch 'refactor_computed_element' into sensi_operator_strategy
geofjamg Dec 8, 2025
b99a064
Wip
geofjamg Dec 9, 2025
00e42fb
Wip
geofjamg Dec 9, 2025
a1f5f37
Merge branch 'main' into sensi_operator_strategy
geofjamg Dec 16, 2025
e034783
Wip
geofjamg Dec 16, 2025
147a8f9
Wip
geofjamg Dec 16, 2025
8e7e58c
Wip
geofjamg Dec 16, 2025
c476302
Merge branch 'main' into sensi_operator_strategy
geofjamg Dec 19, 2025
2e0a131
Wip
geofjamg Dec 19, 2025
be54378
Wip
geofjamg Dec 19, 2025
acd1ba7
Wip
geofjamg Dec 19, 2025
a28a0cd
Wip
geofjamg Dec 19, 2025
a929400
Wip
geofjamg Dec 19, 2025
ab3af0d
Wip
geofjamg Dec 19, 2025
44dc46f
Wip
geofjamg Dec 19, 2025
7ca4bdd
Wip
geofjamg Dec 19, 2025
c7d0191
Wip
geofjamg Dec 19, 2025
df8e53b
Merge branch 'main' into sensi_operator_strategy
geofjamg Jan 5, 2026
3acbc6f
Wip
geofjamg Jan 12, 2026
0f446b4
Wip
geofjamg Jan 12, 2026
d426f99
Wip
geofjamg Jan 13, 2026
a1dafc0
Wip
geofjamg Jan 14, 2026
b9c1921
Wip
geofjamg Jan 14, 2026
b25b132
Wip
geofjamg Jan 14, 2026
f7e9606
Merge branch 'main' into sensi_operator_strategy
geofjamg Jan 14, 2026
5e84bbb
Wip
geofjamg Jan 14, 2026
f40a7e5
Wip
geofjamg Jan 14, 2026
8af2526
Wip
geofjamg Jan 14, 2026
16ceeea
Wip
geofjamg Jan 16, 2026
1f9789b
Wip
geofjamg Jan 16, 2026
ae39abf
Wip
geofjamg Jan 19, 2026
86e3ac8
Wip
geofjamg Jan 19, 2026
768df74
Add AC check
geofjamg Jan 21, 2026
d07e2f3
Wip
geofjamg Jan 22, 2026
15d7d02
Merge branch 'main' into sensi_operator_strategy
geofjamg Jan 23, 2026
da7bbe2
Wip
geofjamg Jan 23, 2026
310f93b
Wip
geofjamg Jan 26, 2026
a5d22c4
Wip
geofjamg Jan 27, 2026
ff11ac9
Wip
geofjamg Jan 27, 2026
7993c4d
Wip
geofjamg Jan 30, 2026
13abe56
Merge branch 'main' into sensi_operator_strategy
geofjamg Feb 2, 2026
0b4f4ba
Fix
geofjamg Feb 3, 2026
a0b232e
Wip
geofjamg Feb 3, 2026
c70a514
Wip
geofjamg Feb 5, 2026
3db07c2
Wip
geofjamg Feb 5, 2026
ebff9f2
Bump powsybl-core version to 7.2.0-SNAPSHOT
SylvestreSakti Feb 5, 2026
e243ab4
Bump IIDM version to 1.16 in unit test files (#1343)
SylvestreSakti Feb 5, 2026
8adf73f
Add HybridGraphConnectivity
geofjamg Feb 6, 2026
d74bbad
Improve naive connectivity calculation
geofjamg Feb 9, 2026
e0b89c0
Wip
geofjamg Feb 10, 2026
34aff4b
Wip
geofjamg Feb 10, 2026
18b9adf
Merge branch 'main' into sensi_operator_strategy
geofjamg Feb 10, 2026
9b26848
Fix
geofjamg Feb 10, 2026
f02b50f
Merge branch 'main' into ci/core-7.2.0-SNAPSHOT
SylvestreSakti Feb 26, 2026
d8eb80e
Merge branch 'main' into ci/core-7.2.0-SNAPSHOT
SylvestreSakti Mar 9, 2026
c0f10a1
Rename DanglingLine to BoundaryLine (#1364)
SylvestreSakti Mar 10, 2026
625d61c
Merge branch 'main' into sensi_operator_strategy
geofjamg Mar 11, 2026
b019ad0
Merge
geofjamg Mar 11, 2026
d311e51
Merge branch 'ci/core-7.2.0-SNAPSHOT' into sensi_operator_strategy
geofjamg Mar 11, 2026
b3d2c3a
Merge
geofjamg Mar 12, 2026
e6dda34
Merge branch 'main' into sensi_operator_strategy
SylvestreSakti Mar 20, 2026
973de5e
Adapt to core 3669 - Properties on MinMaxReactiveLimits (#1376)
olperr1 Mar 20, 2026
21f5fd3
Minimal adaptation for sensitivity analysis with operator strategies …
olperr1 Mar 20, 2026
6240535
Adaptation for new security analysis API (powsybl-core 3789) (#1377)
jeandemanged Mar 20, 2026
236d4fe
Merge branch 'main' into ci/core-7.2.0-SNAPSHOT
SylvestreSakti Mar 20, 2026
9ef955e
Bump to powsybl-core 7.2.0-RC1
SylvestreSakti Mar 20, 2026
237b172
Fix doc issue : Dangling Line to Boundary Line
SylvestreSakti Mar 20, 2026
f96c6f2
Merge branch 'ci/core-7.2.0-SNAPSHOT' into sensi_operator_strategy
SylvestreSakti Mar 20, 2026
e0f2907
Merge branch 'main' into sensi_operator_strategy
SylvestreSakti Mar 23, 2026
94a3334
Merge branch 'main' into sensi_operator_strategy
SylvestreSakti Mar 23, 2026
9241bd8
Merge branch 'main' into sensi_operator_strategy
SylvestreSakti Mar 24, 2026
caa024b
Add test unsupported ac sensi operator strategy
SylvestreSakti Mar 25, 2026
dcdf553
Merge branch 'main' into sensi_operator_strategy
SylvestreSakti Mar 25, 2026
a1fe276
Checkstyle
SylvestreSakti Mar 25, 2026
a11364b
Add unit test for reconnecting small components
SylvestreSakti Mar 26, 2026
bcd1c9b
Fix unit test
geofjamg Mar 26, 2026
f0e69e8
Fix missing nan sensi for invalid curative factors
geofjamg Mar 26, 2026
99019d4
Review fixes
geofjamg Mar 26, 2026
834e661
Merge branch 'main' into sensi_operator_strategy
SylvestreSakti Mar 26, 2026
63555ae
Remove class
SylvestreSakti Mar 26, 2026
efa2a22
fix
SylvestreSakti Mar 26, 2026
5f8f11a
Removed unused method
SylvestreSakti Mar 26, 2026
b77a4d0
Checkstyle
SylvestreSakti Mar 26, 2026
609a953
Add switch action unit test
geofjamg Mar 27, 2026
716a048
Merge remote-tracking branch 'origin/sensi_operator_strategy' into se…
geofjamg Mar 27, 2026
afba587
Fix
geofjamg Mar 27, 2026
29af1f5
Clean merge
geofjamg Mar 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private List<AcLoadFlowContext> initContexts(NetworkCache.Entry entry) {

// Because of caching, we only need to switch back to working variant but not to remove the variant, thus
// WorkingVariantReverter is used instead of DefaultVariantCleaner
try (LfNetworkList lfNetworkList = Networks.load(network, acParameters.getNetworkParameters(), topoConfig,
try (LfNetworkList lfNetworkList = Networks.loadWithReconnectableElements(network, topoConfig, acParameters.getNetworkParameters(),
LfNetworkList.WorkingVariantReverter::new, reportNode)) {
contexts = lfNetworkList.getList()
.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private LoadFlowResult runAc(Network network, LoadFlowParameters parameters, Ope
results = new AcLoadFlowFromCache(network, parameters, parametersExt, acParameters, reportNode)
.run();
} else {
try (LfNetworkList lfNetworkList = Networks.load(network, acParameters.getNetworkParameters(), new LfTopoConfig(), reportNode)) {
try (LfNetworkList lfNetworkList = Networks.loadWithReconnectableElements(network, new LfTopoConfig(), acParameters.getNetworkParameters(), reportNode)) {
results = AcloadFlowEngine.run(lfNetworkList.getList(), acParameters);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public double calculateSensi(DenseMatrix dx, int column) {
double dph1 = dx.get(ph1Var.getRow(), column);
double dph2 = dx.get(ph2Var.getRow(), column);
double da1 = a1Var != null ? dx.get(a1Var.getRow(), column) : 0;
// - eval(0,0,0) to have an exact epression and remove the constant term of the affine function (wich is 0 in practe because A2 = 0)
// - eval(0,0,0) to have an exact expression and remove the constant term of the affine function (which is 0 in practice because A2 = 0)
return eval(dph1, dph2, da1) - eval(0, 0, 0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import com.powsybl.openloadflow.dc.equations.ClosedBranchSide1DcFlowEquationTerm;
import com.powsybl.openloadflow.network.LfBranch;

import java.util.Objects;

/**
* @author Geoffroy Jamgotchian {@literal <geoffroy.jamgotchian at rte-france.com>}
* @author Gaël Macherel {@literal <gael.macherel@artelys.com>}
Expand All @@ -22,8 +24,8 @@ abstract class AbstractComputedElement {
private final ClosedBranchSide1DcFlowEquationTerm branchEquation;

protected AbstractComputedElement(LfBranch lfBranch, ClosedBranchSide1DcFlowEquationTerm branchEquation) {
this.lfBranch = lfBranch;
this.branchEquation = branchEquation;
this.lfBranch = Objects.requireNonNull(lfBranch);
this.branchEquation = Objects.requireNonNull(branchEquation);
}

public int getComputedElementIndex() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
package com.powsybl.openloadflow.dc.fastdc;

import com.powsybl.action.PhaseTapChangerTapPositionAction;
import com.powsybl.action.SwitchAction;
import com.powsybl.action.TerminalsConnectionAction;
import com.powsybl.commons.PowsyblException;
import com.powsybl.math.matrix.DenseMatrix;
import com.powsybl.math.matrix.Matrix;
Expand All @@ -19,19 +22,29 @@
import com.powsybl.openloadflow.graph.GraphConnectivity;
import com.powsybl.openloadflow.network.LfBranch;
import com.powsybl.openloadflow.network.LfBus;
import com.powsybl.openloadflow.network.action.AbstractLfBranchAction;
import com.powsybl.openloadflow.network.action.AbstractLfTapChangerAction;
import com.powsybl.openloadflow.network.action.LfAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
* @author Geoffroy Jamgotchian {@literal <geoffroy.jamgotchian at rte-france.com>}
* @author Gaël Macherel {@literal <gael.macherel@artelys.com>}
*/
public interface ComputedElement {

Logger LOGGER = LoggerFactory.getLogger(ComputedElement.class);

int getComputedElementIndex();

void setComputedElementIndex(final int index);
Expand Down Expand Up @@ -119,4 +132,38 @@ static DenseMatrix calculateElementsStates(DcLoadFlowContext loadFlowContext, Co
loadFlowContext.getJacobianMatrix().solveTransposed(elementsStates);
return elementsStates;
}

static Map<LfAction, ComputedElement> createActionElementsIndexByLfAction(Map<String, LfAction> lfActionById, EquationSystem<DcVariableType, DcEquationType> equationSystem) {
Map<LfAction, ComputedElement> computedElements = lfActionById.values().stream()
.flatMap(lfAction -> {
ComputedElement element = switch (lfAction.getType()) {
case SwitchAction.NAME, TerminalsConnectionAction.NAME -> {
AbstractLfBranchAction<?> lfBranchAction = (AbstractLfBranchAction<?>) lfAction;
if (lfBranchAction.getEnabledBranch() != null) {
yield ComputedSwitchBranchElement.create(lfBranchAction.getEnabledBranch(), true, equationSystem);
} else if (lfBranchAction.getDisabledBranch() != null) {
yield ComputedSwitchBranchElement.create(lfBranchAction.getDisabledBranch(), false, equationSystem);
}
yield null;
}
case PhaseTapChangerTapPositionAction.NAME ->
new ComputedTapPositionChangeElement(((AbstractLfTapChangerAction<?>) lfAction).getChange(), equationSystem);
default -> throw new IllegalStateException("Only tap position change and branch enabling/disabling are supported in WoodburyDcSecurityAnalysis");
};
if (element == null) {
return Stream.empty();
}
return Stream.of(Map.entry(lfAction, element));
})
.filter(e -> e.getValue().getLfBranchEquation() != null)
.collect(Collectors.toMap(
Map.Entry::getKey,
Map.Entry::getValue,
(existing, replacement) -> existing,
LinkedHashMap::new
));
ComputedElement.setComputedElementIndexes(computedElements.values());
return computedElements;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,24 @@
import com.powsybl.openloadflow.network.LfBranch;
import com.powsybl.openloadflow.network.LfBus;

import java.util.Objects;

/**
* @author Pierre Arvy {@literal <pierre.arvy@artelys.com>}
*/
public final class ComputedSwitchBranchElement extends AbstractComputedElement implements ComputedElement {

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));
public static ComputedSwitchBranchElement create(LfBranch lfBranch, boolean enabled, EquationSystem<DcVariableType, DcEquationType> equationSystem) {
Objects.requireNonNull(lfBranch);
Objects.requireNonNull(equationSystem);
ClosedBranchSide1DcFlowEquationTerm branchEquation = equationSystem.getEquationTerm(ElementType.BRANCH, lfBranch.getNum(), ClosedBranchSide1DcFlowEquationTerm.class);
return new ComputedSwitchBranchElement(lfBranch, enabled, branchEquation);
}

private ComputedSwitchBranchElement(LfBranch lfBranch, boolean enabled, ClosedBranchSide1DcFlowEquationTerm branchEquation) {
super(lfBranch, branchEquation);
this.enabled = enabled;
}

Expand Down
Loading
Loading