Skip to content

Commit

Permalink
Update unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
  • Loading branch information
flo-dup committed May 5, 2021
1 parent 9f4c4cc commit 35e2073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<SensitivityValue> 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());
}
}

0 comments on commit 35e2073

Please sign in to comment.