Skip to content

Commit

Permalink
CGMES: fictitious voltage levels marked as fictitious (#3249)
Browse files Browse the repository at this point in the history
* CGMES: fictitious voltage levels are marked as fictitious
* Enrich existing unit test

Signed-off-by: Florian Dupuy <[email protected]>
  • Loading branch information
flo-dup authored Dec 11, 2024
1 parent 6357a5b commit 77a758d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ private void createFictitiousVoltageLevelsForLineContainer(Context context, Stri
.setLowVoltageLimit(vlref.getLowVoltageLimit())
.setHighVoltageLimit(vlref.getHighVoltageLimit())
.setId(fictitiousVoltageLevelId)
.setFictitious(true)
.setName(containerName)
.setEnsureIdUnicity(context.config().isEnsureIdAliasUnicity())
.add();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ void chainedLineSegmentsTest() {
assertNotNull(network);
assertEquals(Set.of("VL_1", "VL_2", "LN_12_VL"),
network.getVoltageLevelStream().map(Identifiable::getId).collect(Collectors.toSet()));
assertTrue(network.getVoltageLevel("LN_12_VL").isFictitious());

importParams.put(CgmesImport.CREATE_FICTITIOUS_VOLTAGE_LEVEL_FOR_EVERY_NODE, "true");
network = readCgmesResources(importParams, DIR, "chained_line_segments.xml");
assertNotNull(network);
assertEquals(Set.of("VL_1", "VL_2", "CN_A_VL", "CN_B_VL"),
network.getVoltageLevelStream().map(Identifiable::getId).collect(Collectors.toSet()));
assertTrue(network.getVoltageLevel("CN_A_VL").isFictitious());
assertTrue(network.getVoltageLevel("CN_B_VL").isFictitious());
}

@Test
Expand Down

0 comments on commit 77a758d

Please sign in to comment.