From 35e20739feddda2072c92b26571e660e9c9e7ad8 Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Wed, 5 May 2021 10:21:38 +0200 Subject: [PATCH] Update unit test Signed-off-by: Florian Dupuy --- .../network/NodeBreakerNetworkFactory.java | 1 - .../ac/AcSensitivityAnalysisContingenciesTest.java | 13 +++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/test/java/com/powsybl/openloadflow/network/NodeBreakerNetworkFactory.java b/src/test/java/com/powsybl/openloadflow/network/NodeBreakerNetworkFactory.java index bd928dd6b0..3f9aaeaa99 100644 --- a/src/test/java/com/powsybl/openloadflow/network/NodeBreakerNetworkFactory.java +++ b/src/test/java/com/powsybl/openloadflow/network/NodeBreakerNetworkFactory.java @@ -253,7 +253,6 @@ public static Network create3Bars() { createGenerator(vl1, "G2", 4, 400, 200, 0); createConnection(vl1, 2, 4); - VoltageLevel vl2 = s.newVoltageLevel() .setId("VL2") .setNominalV(400) diff --git a/src/test/java/com/powsybl/openloadflow/sensi/ac/AcSensitivityAnalysisContingenciesTest.java b/src/test/java/com/powsybl/openloadflow/sensi/ac/AcSensitivityAnalysisContingenciesTest.java index 915119866a..86df36ddbb 100644 --- a/src/test/java/com/powsybl/openloadflow/sensi/ac/AcSensitivityAnalysisContingenciesTest.java +++ b/src/test/java/com/powsybl/openloadflow/sensi/ac/AcSensitivityAnalysisContingenciesTest.java @@ -642,17 +642,10 @@ void testContingencyPropagationLfSwitch() { .join(); //Flow is around 200 on all lines - result.getSensitivityValues().stream() + result.getSensitivityValues() .forEach(v -> assertEquals(200, v.getFunctionReference(), 5)); - //Flow should be around 400 on L1, around 200 on L3 - List postContingencySensitivities = result.getSensitivityValuesContingencies().get("L2"); - //TODO: fails, flows are 300, because the 2 buses are still seen as connected - postContingencySensitivities.stream() - .filter(v -> v.getFactor().getFunction().getId().equals("L1")) - .forEach(v -> assertEquals(400, v.getFunctionReference(), 5)); - postContingencySensitivities.stream() - .filter(v -> v.getFactor().getFunction().getId().equals("L3")) - .forEach(v -> assertEquals(200, v.getFunctionReference(), 5)); + // Propagating contingency on L2 encounters a coupler, which is not (yet) supported in sensitivity analysis + assertTrue(result.getSensitivityValuesContingencies().isEmpty()); } }