diff --git a/src/main/java/org/gridsuite/network/map/dto/definition/voltagelevel/FeederBayInfos.java b/src/main/java/org/gridsuite/network/map/dto/definition/voltagelevel/FeederBayInfos.java new file mode 100644 index 00000000..0a22a6ca --- /dev/null +++ b/src/main/java/org/gridsuite/network/map/dto/definition/voltagelevel/FeederBayInfos.java @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2025, RTE (http://www.rte-france.com) + * 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/. + */ +package org.gridsuite.network.map.dto.definition.voltagelevel; + +import com.powsybl.iidm.network.TwoSides; +import org.gridsuite.network.map.dto.definition.extension.ConnectablePositionInfos; + +/** + * @author Etienne Lesot + */ +public record FeederBayInfos(String busbarSectionId, ConnectablePositionInfos connectablePositionInfos, TwoSides connectionSide) { } diff --git a/src/main/java/org/gridsuite/network/map/dto/definition/voltagelevel/VoltageLevelFormInfos.java b/src/main/java/org/gridsuite/network/map/dto/definition/voltagelevel/VoltageLevelFormInfos.java index ac1ce76b..9ede0d8b 100644 --- a/src/main/java/org/gridsuite/network/map/dto/definition/voltagelevel/VoltageLevelFormInfos.java +++ b/src/main/java/org/gridsuite/network/map/dto/definition/voltagelevel/VoltageLevelFormInfos.java @@ -59,4 +59,7 @@ public class VoltageLevelFormInfos extends ElementInfosWithProperties { @JsonInclude(JsonInclude.Include.NON_NULL) private Map> busBarSectionInfos; + + @JsonInclude(JsonInclude.Include.NON_NULL) + private Map> feederBaysInfos; } diff --git a/src/main/java/org/gridsuite/network/map/dto/mapper/VoltageLevelInfosMapper.java b/src/main/java/org/gridsuite/network/map/dto/mapper/VoltageLevelInfosMapper.java index ac038533..3ef42b09 100644 --- a/src/main/java/org/gridsuite/network/map/dto/mapper/VoltageLevelInfosMapper.java +++ b/src/main/java/org/gridsuite/network/map/dto/mapper/VoltageLevelInfosMapper.java @@ -14,6 +14,7 @@ import org.gridsuite.network.map.dto.ElementInfos; import org.gridsuite.network.map.dto.InfoTypeParameters; import org.gridsuite.network.map.dto.definition.busbarsection.BusBarSectionFormInfos; +import org.gridsuite.network.map.dto.definition.voltagelevel.FeederBayInfos; import org.gridsuite.network.map.dto.definition.voltagelevel.VoltageLevelFormInfos; import org.gridsuite.network.map.dto.definition.voltagelevel.VoltageLevelMapInfos; import org.gridsuite.network.map.dto.definition.voltagelevel.VoltageLevelTabInfos; @@ -23,6 +24,7 @@ import java.util.*; import java.util.stream.Collectors; +import static com.powsybl.iidm.network.Terminal.getConnectableSide; import static org.gridsuite.network.map.dto.utils.ElementUtils.*; /** @@ -106,6 +108,7 @@ static VoltageLevelFormInfos toFormInfos(Identifiable identifiable) { builder.isRetrievedBusbarSections(vlTopologyInfos.isRetrievedBusbarSections()); builder.isBusbarSectionPositionFound(vlTopologyInfos.isBusbarSectionPositionFound()); builder.busBarSectionInfos(vlTopologyInfos.getBusBarSectionInfosGrouped()); + builder.feederBaysInfos(getFeederBaysInfos(voltageLevel)); } builder.identifiableShortCircuit(ExtensionUtils.toIdentifiableShortCircuit(voltageLevel)); @@ -113,6 +116,28 @@ static VoltageLevelFormInfos toFormInfos(Identifiable identifiable) { return builder.build(); } + private static Map> getFeederBaysInfos(VoltageLevel voltageLevel) { + Map> feederBayInfos = new HashMap<>(); + String currentVoltageLevelId = voltageLevel.getId(); + voltageLevel.getConnectableStream() + .filter(connectable -> !(connectable instanceof BusbarSection)) + .forEach(connectable -> { + List connections = new ArrayList<>(); + for (Object obj : connectable.getTerminals()) { + Terminal terminal = (Terminal) obj; + if (terminal.getVoltageLevel().getId().equals(currentVoltageLevelId)) { + connections.add(new FeederBayInfos( + getBusOrBusbarSection(terminal), + getConnectablePosition(connectable, FeederSide.from(getConnectableSide(terminal))), + getConnectableSide(terminal).map(ThreeSides::toTwoSides).orElse(null) + )); + } + } + feederBayInfos.put(connectable.getId(), connections); + }); + return feederBayInfos; + } + static VoltageLevelMapInfos toMapInfos(Identifiable identifiable) { VoltageLevel voltageLevel = (VoltageLevel) identifiable; return VoltageLevelMapInfos.builder() diff --git a/src/main/java/org/gridsuite/network/map/dto/utils/ElementUtils.java b/src/main/java/org/gridsuite/network/map/dto/utils/ElementUtils.java index acb483b2..31232bf7 100644 --- a/src/main/java/org/gridsuite/network/map/dto/utils/ElementUtils.java +++ b/src/main/java/org/gridsuite/network/map/dto/utils/ElementUtils.java @@ -7,11 +7,13 @@ package org.gridsuite.network.map.dto.utils; import com.powsybl.iidm.network.*; +import com.powsybl.iidm.network.extensions.ConnectablePosition; import com.powsybl.math.graph.TraversalType; import org.gridsuite.network.map.dto.common.ReactiveCapabilityCurveMapData; import org.gridsuite.network.map.dto.common.TapChangerData; import org.gridsuite.network.map.dto.common.TapChangerStepData; import org.gridsuite.network.map.dto.definition.extension.BusbarSectionFinderTraverser; +import org.gridsuite.network.map.dto.definition.extension.ConnectablePositionInfos; import org.springframework.lang.NonNull; import java.util.Collection; @@ -39,6 +41,49 @@ public static void setIfNotNan(@NonNull final DoubleConsumer setter, final doubl } } + public enum FeederSide { + INJECTION_SINGLE_SIDE, + BRANCH_SIDE_ONE, + BRANCH_SIDE_TWO; + + public static FeederSide from(Optional connectableSide) { + return connectableSide.map(threeSides -> threeSides == ThreeSides.ONE ? BRANCH_SIDE_ONE : BRANCH_SIDE_TWO).orElse(INJECTION_SINGLE_SIDE); + } + } + + private static ConnectablePosition.Feeder getFeederInfos(Identifiable identifiable, FeederSide side) { + ConnectablePosition connectablePosition = (ConnectablePosition) identifiable.getExtension(ConnectablePosition.class); + if (connectablePosition == null) { + return null; + } + + switch (side) { + case INJECTION_SINGLE_SIDE: + return connectablePosition.getFeeder(); + case BRANCH_SIDE_ONE: + return connectablePosition.getFeeder1(); + case BRANCH_SIDE_TWO: + return connectablePosition.getFeeder2(); + default: + throw new IllegalArgumentException("Invalid feeder side: " + side); + } + } + + public static ConnectablePositionInfos getConnectablePosition(Identifiable identifiable, FeederSide side) { + ConnectablePosition.Feeder feeder = getFeederInfos(identifiable, side); + return buildConnectablePositionInfos(feeder); + } + + public static ConnectablePositionInfos buildConnectablePositionInfos(ConnectablePosition.Feeder feeder) { + ConnectablePositionInfos.ConnectablePositionInfosBuilder builder = ConnectablePositionInfos.builder(); + if (feeder != null) { + builder.connectionDirection(feeder.getDirection() == null ? null : feeder.getDirection()) + .connectionPosition(feeder.getOrder().orElse(null)) + .connectionName(feeder.getName().orElse(null)); + } + return builder.build(); + } + public static String getBusOrBusbarSection(Terminal terminal) { if (terminal.getVoltageLevel().getTopologyKind().equals(TopologyKind.BUS_BREAKER)) { if (terminal.isConnected()) { diff --git a/src/test/java/org/gridsuite/network/map/NetworkMapControllerTest.java b/src/test/java/org/gridsuite/network/map/NetworkMapControllerTest.java index fead089f..734fdb7a 100644 --- a/src/test/java/org/gridsuite/network/map/NetworkMapControllerTest.java +++ b/src/test/java/org/gridsuite/network/map/NetworkMapControllerTest.java @@ -1158,6 +1158,47 @@ void setUp() { .withDirection(ConnectablePosition.Direction.TOP).add() .add(); + VoltageLevel vlgen7 = p5.newVoltageLevel() + .setId("VLGEN7") + .setNominalV(24.0) + .setHighVoltageLimit(30) + .setLowVoltageLimit(20) + .setTopologyKind(TopologyKind.NODE_BREAKER) + .add(); + vlgen7.getNodeBreakerView().newBusbarSection() + .setId("NGEN7") + .setName("NGEN7") + .setNode(0) + .add(); + createSwitch(vlgen4, "b4", SwitchKind.DISCONNECTOR, false, 0, 10); + createSwitch(vlgen4, "br11", SwitchKind.BREAKER, false, 10, 11); + createSwitch(vlgen7, "b5", SwitchKind.DISCONNECTOR, false, 0, 1); + createSwitch(vlgen7, "br21", SwitchKind.BREAKER, false, 1, 2); + network.newLine() + .setId("LINE7") + .setVoltageLevel1("VLGEN4") + .setNode1(11) + .setVoltageLevel2("VLGEN7") + .setNode2(2) + .setR(3.0) + .setX(33.0) + .setG1(0.0) + .setB1(386E-6 / 2) + .setG2(0.0) + .setB2(386E-6 / 2) + .add(); + Line line7 = network.getLine("LINE7"); + line7.newExtension(ConnectablePositionAdder.class) + .newFeeder1() + .withName("LINE7_Side_VLGEN4") + .withOrder(5) + .withDirection(ConnectablePosition.Direction.BOTTOM).add() + .newFeeder2() + .withName("LINE7_Side_VLGEN8") + .withOrder(3) + .withDirection(ConnectablePosition.Direction.TOP).add() + .add(); + // Add new variant network.getVariantManager().cloneVariant(VariantManagerConstants.INITIAL_VARIANT_ID, VARIANT_ID); network.getVariantManager().setWorkingVariant(VARIANT_ID); @@ -1725,10 +1766,10 @@ void shouldReturnLinesOperatingStatusData() throws Exception { @Test void shouldReturnLinesIds() throws Exception { - succeedingTestForElementsIds(NETWORK_UUID, null, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3", "LINE4").toString(), ElementType.LINE, null, null); - succeedingTestForElementsIds(NETWORK_UUID, null, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3", "LINE4").toString(), ElementType.LINE, null, List.of(24.0, 380.0)); - succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3", "LINE4").toString(), ElementType.LINE, null, null); - succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3", "LINE4").toString(), ElementType.LINE, null, List.of(24.0, 380.0)); + succeedingTestForElementsIds(NETWORK_UUID, null, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3", "LINE4", "LINE7").toString(), ElementType.LINE, null, null); + succeedingTestForElementsIds(NETWORK_UUID, null, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3", "LINE4", "LINE7").toString(), ElementType.LINE, null, List.of(24.0, 380.0)); + succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3", "LINE4", "LINE7").toString(), ElementType.LINE, null, null); + succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3", "LINE4", "LINE7").toString(), ElementType.LINE, null, List.of(24.0, 380.0)); succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3").toString(), ElementType.LINE, List.of("P1"), null); succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("NHV1_NHV2_1", "NHV1_NHV2_2", "LINE3").toString(), ElementType.LINE, List.of("P1"), List.of(24.0, 380.0)); succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of().toString(), ElementType.LINE, List.of("P1"), List.of(225.0)); @@ -2247,12 +2288,12 @@ void shouldReturnVotlageLevelsMapData() throws Exception { @Test void shouldReturnVoltageLevelsIds() throws Exception { - succeedingTestForElementsIds(NETWORK_UUID, null, List.of("VL", "VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6").toString(), ElementType.VOLTAGE_LEVEL, null, null); - succeedingTestForElementsIds(NETWORK_UUID, null, List.of("VL", "VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6").toString(), ElementType.VOLTAGE_LEVEL, null, List.of(24.0, 150.0, 225.0, 380.0)); - succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("VL", "VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6").toString(), ElementType.VOLTAGE_LEVEL, null, null); - succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("VL", "VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6").toString(), ElementType.VOLTAGE_LEVEL, null, List.of(24.0, 150.0, 225.0, 380.0)); - succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6").toString(), ElementType.VOLTAGE_LEVEL, List.of("P1", "P2", "P3", "P4", "P5", "P6"), null); - succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6").toString(), ElementType.VOLTAGE_LEVEL, List.of("P1", "P2", "P3", "P4", "P5", "P6"), List.of(24.0, 150.0, 225.0, 380.0)); + succeedingTestForElementsIds(NETWORK_UUID, null, List.of("VL", "VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6", "VLGEN7").toString(), ElementType.VOLTAGE_LEVEL, null, null); + succeedingTestForElementsIds(NETWORK_UUID, null, List.of("VL", "VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6", "VLGEN7").toString(), ElementType.VOLTAGE_LEVEL, null, List.of(24.0, 150.0, 225.0, 380.0)); + succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("VL", "VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6", "VLGEN7").toString(), ElementType.VOLTAGE_LEVEL, null, null); + succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("VL", "VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6", "VLGEN7").toString(), ElementType.VOLTAGE_LEVEL, null, List.of(24.0, 150.0, 225.0, 380.0)); + succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6", "VLGEN7").toString(), ElementType.VOLTAGE_LEVEL, List.of("P1", "P2", "P3", "P4", "P5", "P6"), null); + succeedingTestForElementsIds(NETWORK_UUID, VARIANT_ID, List.of("VLGEN", "VLHV1", "VLHV2", "VLLOAD", "VLNEW2", "VLGEN3", "VLGEN4", "VLGEN5", "VLGEN6", "VLGEN7").toString(), ElementType.VOLTAGE_LEVEL, List.of("P1", "P2", "P3", "P4", "P5", "P6"), List.of(24.0, 150.0, 225.0, 380.0)); } @Test @@ -2270,11 +2311,16 @@ void shouldReturnNotFoundInsteadOfVoltageLevelsMapData() throws Exception { } @Test - void shouldReturnVotlageLevelFormData() throws Exception { + void shouldReturnVoltageLevelFormData() throws Exception { succeedingTestForElementInfosWithElementId(NETWORK_UUID, null, ElementType.VOLTAGE_LEVEL, InfoType.FORM, "VLGEN4", resourceToString("/voltage-level-form-data.json")); succeedingTestForElementInfosWithElementId(NETWORK_UUID, VARIANT_ID, ElementType.VOLTAGE_LEVEL, InfoType.FORM, "VLGEN4", resourceToString("/voltage-level-form-data.json")); } + @Test + void shouldReturnVoltageLevelFormDataWithFeederBaysInfos() throws Exception { + succeedingTestForElementInfosWithElementId(NETWORK_UUID, null, ElementType.VOLTAGE_LEVEL, InfoType.FORM, "VLGEN5", resourceToString("/voltage-level-form-data-feederbays.json")); + } + @Test void shouldReturnVotlageLevelNonSymmetricalBusbarsFormData() throws Exception { succeedingTestForElementInfosWithElementId(NETWORK_UUID, null, ElementType.VOLTAGE_LEVEL, InfoType.FORM, "VLGEN5", resourceToString("/voltage-level-non-symmetrical-busbars-form-data.json")); diff --git a/src/test/resources/all-data-in-variant.json b/src/test/resources/all-data-in-variant.json index e732bc20..a9667c38 100644 --- a/src/test/resources/all-data-in-variant.json +++ b/src/test/resources/all-data-in-variant.json @@ -126,6 +126,14 @@ "ipMin": 0.0, "ipMax": 100.0 } + }, + { + "id": "VLGEN7", + "substationId": "P5", + "nominalV": 24.0, + "country": "FR", + "lowVoltageLimit": 20.0, + "highVoltageLimit": 30.0 } ], "country": "FR" @@ -219,6 +227,14 @@ "ipMin": 0.0, "ipMax": 100.0 } + }, + { + "id": "VLGEN7", + "substationId": "P5", + "nominalV": 24.0, + "country": "FR", + "lowVoltageLimit": 20.0, + "highVoltageLimit": 30.0 } ], "lines": [ @@ -588,6 +604,26 @@ "b1": 1.93E-4, "g2": 0.0, "b2": 1.93E-4 + }, + { + "id": "LINE7", + "type": "LINE", + "voltageLevelId1": "VLGEN4", + "voltageLevelId2": "VLGEN7", + "nominalVoltage1": 24.0, + "nominalVoltage2": 24.0, + "substationId1": "P4", + "substationId2": "P5", + "country1": "FR", + "country2": "FR", + "terminal1Connected": true, + "terminal2Connected": true, + "r": 3.0, + "x": 33.0, + "g1": 0.0, + "b1": 1.93E-4, + "g2": 0.0, + "b2": 1.93E-4 } ], "hvdcLines": [ @@ -2480,6 +2516,26 @@ "voltageLevelId": "VLGEN6", "nominalVoltage": 24.0, "country": "FR" + }, + { + "id": "VLGEN4_0", + "v": "NaN", + "angle": "NaN", + "synchronousComponentNum": 1, + "connectedComponentNum": 1, + "voltageLevelId": "VLGEN4", + "nominalVoltage": 24.0, + "country": "FR" + }, + { + "id": "VLGEN7_0", + "v": "NaN", + "angle": "NaN", + "synchronousComponentNum": 1, + "connectedComponentNum": 1, + "voltageLevelId": "VLGEN7", + "nominalVoltage": 24.0, + "country": "FR" } ], "busbarSections": [ @@ -2510,6 +2566,11 @@ "id": "NGEN5_2_2", "name": "NGEN5_2_2", "voltageLevelId": "VLGEN5" + }, + { + "id": "NGEN7", + "name": "NGEN7", + "voltageLevelId": "VLGEN7" } ], "branches": [ @@ -3096,6 +3157,22 @@ "value": 53.0, "validity": false } + }, + { + "id": "LINE7", + "type": "LINE", + "voltageLevelId1": "VLGEN4", + "voltageLevelId2": "VLGEN7", + "nominalVoltage1": 24.0, + "nominalVoltage2": 24.0, + "substationId1": "P4", + "substationId2": "P5", + "country1": "FR", + "country2": "FR", + "terminal1Connected": true, + "terminal2Connected": true, + "r": 3.0, + "x": 33.0 } ] } \ No newline at end of file diff --git a/src/test/resources/all-data-without-optionals.json b/src/test/resources/all-data-without-optionals.json index c72fb7b0..c9f80c6d 100644 --- a/src/test/resources/all-data-without-optionals.json +++ b/src/test/resources/all-data-without-optionals.json @@ -126,6 +126,14 @@ "ipMin": 0.0, "ipMax": 100.0 } + }, + { + "id" : "VLGEN7", + "substationId" : "P5", + "nominalV" : 24.0, + "country" : "FR", + "lowVoltageLimit" : 20.0, + "highVoltageLimit" : 30.0 } ], "country": "FR" @@ -219,6 +227,14 @@ "ipMin": 0.0, "ipMax": 100.0 } + }, + { + "id" : "VLGEN7", + "substationId" : "P5", + "nominalV" : 24.0, + "country" : "FR", + "lowVoltageLimit" : 20.0, + "highVoltageLimit" : 30.0 } ], "lines": [ @@ -448,6 +464,26 @@ "b1": 1.93E-4, "g2": 0.0, "b2": 1.93E-4 + }, + { + "id" : "LINE7", + "type" : "LINE", + "voltageLevelId1" : "VLGEN4", + "voltageLevelId2" : "VLGEN7", + "nominalVoltage1" : 24.0, + "nominalVoltage2" : 24.0, + "substationId1" : "P4", + "substationId2" : "P5", + "country1" : "FR", + "country2" : "FR", + "terminal1Connected" : true, + "terminal2Connected" : true, + "r" : 3.0, + "x" : 33.0, + "g1" : 0.0, + "b1" : 1.93E-4, + "g2" : 0.0, + "b2" : 1.93E-4 } ], "hvdcLines": [ @@ -2240,6 +2276,14 @@ "voltageLevelId": "VLGEN4", "nominalVoltage": 24.0, "country": "FR" + }, + { + "id" : "VLGEN7_0", + "v" : "NaN", + "angle" : "NaN", + "voltageLevelId" : "VLGEN7", + "nominalVoltage" : 24.0, + "country" : "FR" } ], "busbarSections": [ @@ -2270,6 +2314,11 @@ "id": "NGEN5_2_2", "name": "NGEN5_2_2", "voltageLevelId": "VLGEN5" + }, + { + "id" : "NGEN7", + "name" : "NGEN7", + "voltageLevelId" : "VLGEN7" } ], "branches": [ @@ -2647,6 +2696,22 @@ "value": 53.0, "validity": false } + }, + { + "id" : "LINE7", + "type" : "LINE", + "voltageLevelId1" : "VLGEN4", + "voltageLevelId2" : "VLGEN7", + "nominalVoltage1" : 24.0, + "nominalVoltage2" : 24.0, + "substationId1" : "P4", + "substationId2" : "P5", + "country1" : "FR", + "country2" : "FR", + "terminal1Connected" : true, + "terminal2Connected" : true, + "r" : 3.0, + "x" : 33.0 } ] } \ No newline at end of file diff --git a/src/test/resources/all-data.json b/src/test/resources/all-data.json index 194766cc..8f1c512d 100644 --- a/src/test/resources/all-data.json +++ b/src/test/resources/all-data.json @@ -126,6 +126,14 @@ "ipMin": 0.0, "ipMax": 100.0 } + }, + { + "id": "VLGEN7", + "substationId": "P5", + "nominalV": 24.0, + "country": "FR", + "lowVoltageLimit": 20.0, + "highVoltageLimit": 30.0 } ], "country": "FR" @@ -219,6 +227,14 @@ "ipMin": 0.0, "ipMax": 100.0 } + }, + { + "id": "VLGEN7", + "substationId": "P5", + "nominalV": 24.0, + "country": "FR", + "lowVoltageLimit": 20.0, + "highVoltageLimit": 30.0 } ], "lines": [ @@ -588,6 +604,26 @@ "b1": 1.93E-4, "g2": 0.0, "b2": 1.93E-4 + }, + { + "id": "LINE7", + "type": "LINE", + "voltageLevelId1": "VLGEN4", + "voltageLevelId2": "VLGEN7", + "nominalVoltage1": 24.0, + "nominalVoltage2": 24.0, + "substationId1": "P4", + "substationId2": "P5", + "country1": "FR", + "country2": "FR", + "terminal1Connected": true, + "terminal2Connected": true, + "r": 3.0, + "x": 33.0, + "g1": 0.0, + "b1": 1.93E-4, + "g2": 0.0, + "b2": 1.93E-4 } ], "hvdcLines": [ @@ -2468,6 +2504,16 @@ "voltageLevelId": "VLGEN4", "nominalVoltage": 24.0, "country": "FR" + }, + { + "id": "VLGEN7_0", + "v": "NaN", + "angle": "NaN", + "synchronousComponentNum": 1, + "connectedComponentNum": 1, + "voltageLevelId": "VLGEN7", + "nominalVoltage": 24.0, + "country": "FR" } ], "busbarSections": [ @@ -2498,6 +2544,11 @@ "id": "NGEN5_2_2", "name": "NGEN5_2_2", "voltageLevelId": "VLGEN5" + }, + { + "id": "NGEN7", + "name": "NGEN7", + "voltageLevelId": "VLGEN7" } ], "branches": [ @@ -3084,6 +3135,22 @@ "value": 53.0, "validity": false } + }, + { + "id": "LINE7", + "type": "LINE", + "voltageLevelId1": "VLGEN4", + "voltageLevelId2": "VLGEN7", + "nominalVoltage1": 24.0, + "nominalVoltage2": 24.0, + "substationId1": "P4", + "substationId2": "P5", + "country1": "FR", + "country2": "FR", + "terminal1Connected": true, + "terminal2Connected": true, + "r": 3.0, + "x": 33.0 } ] } \ No newline at end of file diff --git a/src/test/resources/bus-bar-section-form-data.json b/src/test/resources/bus-bar-section-form-data.json index 5a9a8efa..66240fc4 100644 --- a/src/test/resources/bus-bar-section-form-data.json +++ b/src/test/resources/bus-bar-section-form-data.json @@ -22,5 +22,9 @@ "name": "NGEN5_2_2", "vertPos": 2, "horizPos": 2 + }, + { + "id": "NGEN7", + "name": "NGEN7" } ] \ No newline at end of file diff --git a/src/test/resources/bus-bar-section-list-data.json b/src/test/resources/bus-bar-section-list-data.json index ce64cf17..d75cc789 100644 --- a/src/test/resources/bus-bar-section-list-data.json +++ b/src/test/resources/bus-bar-section-list-data.json @@ -14,5 +14,9 @@ { "id": "NGEN5_2_2", "name": "NGEN5_2_2" + }, + { + "id": "NGEN7", + "name": "NGEN7" } ] \ No newline at end of file diff --git a/src/test/resources/bus-bar-section-operating-status-data.json b/src/test/resources/bus-bar-section-operating-status-data.json index 77ffd3f6..69651bfe 100644 --- a/src/test/resources/bus-bar-section-operating-status-data.json +++ b/src/test/resources/bus-bar-section-operating-status-data.json @@ -15,5 +15,9 @@ { "id": "NGEN5_2_2", "name": "NGEN5_2_2" + }, + { + "id": "NGEN7", + "name": "NGEN7" } ] \ No newline at end of file diff --git a/src/test/resources/lines-form-data.json b/src/test/resources/lines-form-data.json index 8f43e350..0e7c6ddf 100644 --- a/src/test/resources/lines-form-data.json +++ b/src/test/resources/lines-form-data.json @@ -240,5 +240,30 @@ }, "busOrBusbarSectionId1": "NGEN6", "busOrBusbarSectionId2": "NGEN3" + }, + { + "id": "LINE7", + "voltageLevelId1": "VLGEN4", + "voltageLevelId2": "VLGEN7", + "terminal1Connected": true, + "terminal2Connected": true, + "r": 3.0, + "x": 33.0, + "g1": 0.0, + "b1": 1.93E-4, + "g2": 0.0, + "b2": 1.93E-4, + "connectablePosition1": { + "connectionDirection": "BOTTOM", + "connectionPosition": 5, + "connectionName": "LINE7_Side_VLGEN4" + }, + "connectablePosition2": { + "connectionDirection": "TOP", + "connectionPosition": 3, + "connectionName": "LINE7_Side_VLGEN8" + }, + "busOrBusbarSectionId1": "NGEN4", + "busOrBusbarSectionId2": "NGEN7" } ] \ No newline at end of file diff --git a/src/test/resources/lines-list-data.json b/src/test/resources/lines-list-data.json index 22dbe3b8..feac7341 100644 --- a/src/test/resources/lines-list-data.json +++ b/src/test/resources/lines-list-data.json @@ -10,5 +10,8 @@ }, { "id": "LINE4" + }, + { + "id": "LINE7" } ] diff --git a/src/test/resources/lines-map-data.json b/src/test/resources/lines-map-data.json index 350a1fc2..20657230 100644 --- a/src/test/resources/lines-map-data.json +++ b/src/test/resources/lines-map-data.json @@ -31,5 +31,12 @@ "voltageLevelId2": "VLGEN3", "terminal1Connected": true, "terminal2Connected": true + }, + { + "id": "LINE7", + "voltageLevelId1": "VLGEN4", + "voltageLevelId2": "VLGEN7", + "terminal1Connected": true, + "terminal2Connected": true } ] \ No newline at end of file diff --git a/src/test/resources/lines-operating-status-data.json b/src/test/resources/lines-operating-status-data.json index 0d655cd7..5328d223 100644 --- a/src/test/resources/lines-operating-status-data.json +++ b/src/test/resources/lines-operating-status-data.json @@ -28,5 +28,12 @@ "voltageLevelId2": "VLGEN3", "terminal1Connected": true, "terminal2Connected": true + }, + { + "id": "LINE7", + "voltageLevelId1": "VLGEN4", + "voltageLevelId2": "VLGEN7", + "terminal1Connected": true, + "terminal2Connected": true } ] diff --git a/src/test/resources/substations-form-data.json b/src/test/resources/substations-form-data.json index 5b243e3e..8aae64fe 100644 --- a/src/test/resources/substations-form-data.json +++ b/src/test/resources/substations-form-data.json @@ -105,6 +105,37 @@ "isBusbarSectionPositionFound": true, "busBarSectionInfos" : { "1" : ["NGEN4"] + }, + "feederBaysInfos": { + "SHUNT_VLNB": [ + { + "busbarSectionId": "NGEN4", + "connectablePositionInfos": { + "connectionDirection": null + }, + "connectionSide": null + } + ], + "LINE7": [ + { + "busbarSectionId": "NGEN4", + "connectablePositionInfos": { + "connectionDirection": "BOTTOM", + "connectionPosition": 5, + "connectionName": "LINE7_Side_VLGEN4" + }, + "connectionSide": "ONE" + } + ], + "SHUNT_NON_LINEAR": [ + { + "busbarSectionId": null, + "connectablePositionInfos": { + "connectionDirection": null + }, + "connectionSide": null + } + ] } } ] @@ -132,6 +163,43 @@ "busBarSectionInfos" : { "1" : [ "NGEN5"], "2" : [ "NGEN5_2_1", "NGEN5_2_2"] + }, + "busBarSectionInfos": { + "1": [ + "NGEN5" + ], + "2": [ + "NGEN5_2_1", + "NGEN5_2_2" + ] + }, + "feederBaysInfos": {} + }, + { + "id": "VLGEN7", + "topologyKind": "NODE_BREAKER", + "substationId": "P5", + "nominalV": 24.0, + "lowVoltageLimit": 20.0, + "highVoltageLimit": 30.0, + "busbarCount": 1, + "sectionCount": 1, + "switchKinds": [], + "isRetrievedBusbarSections": false, + "isBusbarSectionPositionFound": false, + "busBarSectionInfos": {}, + "feederBaysInfos": { + "LINE7": [ + { + "busbarSectionId": "NGEN7", + "connectablePositionInfos": { + "connectionDirection": "TOP", + "connectionPosition": 3, + "connectionName": "LINE7_Side_VLGEN8" + }, + "connectionSide": "TWO" + } + ] } } ] diff --git a/src/test/resources/substations-map-data.json b/src/test/resources/substations-map-data.json index 59c61307..80120ad7 100644 --- a/src/test/resources/substations-map-data.json +++ b/src/test/resources/substations-map-data.json @@ -63,6 +63,11 @@ "id": "VLGEN5", "substationId": "P5", "nominalV": 24.0 + }, + { + "id": "VLGEN7", + "substationId": "P5", + "nominalV": 24.0 } ] }, diff --git a/src/test/resources/substations-map-data_without_vl.json b/src/test/resources/substations-map-data_without_vl.json index 9502c827..fa3dc658 100644 --- a/src/test/resources/substations-map-data_without_vl.json +++ b/src/test/resources/substations-map-data_without_vl.json @@ -67,6 +67,11 @@ "id": "VLGEN5", "substationId": "P5", "nominalV": 24.0 + }, + { + "id": "VLGEN7", + "substationId": "P5", + "nominalV": 24.0 } ] }, diff --git a/src/test/resources/substations-tab-data.json b/src/test/resources/substations-tab-data.json index f3b52a69..6b946381 100644 --- a/src/test/resources/substations-tab-data.json +++ b/src/test/resources/substations-tab-data.json @@ -125,6 +125,14 @@ "ipMin": 0.0, "ipMax": 100.0 } + }, + { + "id": "VLGEN7", + "substationId": "P5", + "nominalV": 24.0, + "country": "FR", + "lowVoltageLimit": 20.0, + "highVoltageLimit": 30.0 } ], "country": "FR" diff --git a/src/test/resources/switches-data-in-variant.json b/src/test/resources/switches-data-in-variant.json index e6a9eb9a..1f8363ee 100644 --- a/src/test/resources/switches-data-in-variant.json +++ b/src/test/resources/switches-data-in-variant.json @@ -6,5 +6,13 @@ { "id": "VL4_SHUNT_BREAKER", "open": true + }, + { + "id": "b4", + "open": false + }, + { + "id": "br11", + "open": false } ] \ No newline at end of file diff --git a/src/test/resources/switches-data.json b/src/test/resources/switches-data.json index 2848d225..af40ffad 100644 --- a/src/test/resources/switches-data.json +++ b/src/test/resources/switches-data.json @@ -6,5 +6,13 @@ { "id": "VL4_SHUNT_BREAKER", "open": false + }, + { + "id": "b4", + "open": false + }, + { + "id": "br11", + "open": false } ] \ No newline at end of file diff --git a/src/test/resources/voltage-level-form-data-feederbays.json b/src/test/resources/voltage-level-form-data-feederbays.json new file mode 100644 index 00000000..5c2833b7 --- /dev/null +++ b/src/test/resources/voltage-level-form-data-feederbays.json @@ -0,0 +1,27 @@ +{ + "id": "VLGEN5", + "topologyKind": "NODE_BREAKER", + "substationId": "P5", + "nominalV": 24.0, + "lowVoltageLimit": 20.0, + "highVoltageLimit": 30.0, + "identifiableShortCircuit": { + "ipMin": 0.0, + "ipMax": 100.0 + }, + "busbarCount": 1, + "sectionCount": 1, + "switchKinds": [], + "isRetrievedBusbarSections": false, + "isBusbarSectionPositionFound": true, + "busBarSectionInfos": { + "1": [ + "NGEN5" + ], + "2": [ + "NGEN5_2_1", + "NGEN5_2_2" + ] + }, + "feederBaysInfos": {} +} \ No newline at end of file diff --git a/src/test/resources/voltage-level-form-data.json b/src/test/resources/voltage-level-form-data.json index f41d6921..6f4837ff 100644 --- a/src/test/resources/voltage-level-form-data.json +++ b/src/test/resources/voltage-level-form-data.json @@ -10,5 +10,36 @@ "isBusbarSectionPositionFound": true, "busBarSectionInfos" : { "1" : [ "NGEN4"] + }, + "feederBaysInfos": { + "SHUNT_VLNB": [ + { + "busbarSectionId": "NGEN4", + "connectablePositionInfos": { + "connectionDirection": null + }, + "connectionSide": null + } + ], + "LINE7": [ + { + "busbarSectionId": "NGEN4", + "connectablePositionInfos": { + "connectionDirection": "BOTTOM", + "connectionPosition": 5, + "connectionName": "LINE7_Side_VLGEN4" + }, + "connectionSide": "ONE" + } + ], + "SHUNT_NON_LINEAR": [ + { + "busbarSectionId": null, + "connectablePositionInfos": { + "connectionDirection": null + }, + "connectionSide": null + } + ] } } diff --git a/src/test/resources/voltage-level-non-symmetrical-busbars-form-data.json b/src/test/resources/voltage-level-non-symmetrical-busbars-form-data.json index b17ebcad..655749e4 100644 --- a/src/test/resources/voltage-level-non-symmetrical-busbars-form-data.json +++ b/src/test/resources/voltage-level-non-symmetrical-busbars-form-data.json @@ -17,5 +17,6 @@ "busBarSectionInfos" : { "1" : [ "NGEN5"], "2" : [ "NGEN5_2_1","NGEN5_2_2"] - } + }, + "feederBaysInfos": {} } diff --git a/src/test/resources/voltage-levels-form-data.json b/src/test/resources/voltage-levels-form-data.json index f9b3b33b..c65df911 100644 --- a/src/test/resources/voltage-levels-form-data.json +++ b/src/test/resources/voltage-levels-form-data.json @@ -66,6 +66,42 @@ "isBusbarSectionPositionFound": true, "busBarSectionInfos" : { "1" : [ "NGEN4" ] + }, + "busBarSectionInfos": { + "1": [ + "NGEN4" + ] + }, + "feederBaysInfos": { + "SHUNT_VLNB": [ + { + "busbarSectionId": "NGEN4", + "connectablePositionInfos": { + "connectionDirection": null + }, + "connectionSide": null + } + ], + "LINE7": [ + { + "busbarSectionId": "NGEN4", + "connectablePositionInfos": { + "connectionDirection": "BOTTOM", + "connectionPosition": 5, + "connectionName": "LINE7_Side_VLGEN4" + }, + "connectionSide": "ONE" + } + ], + "SHUNT_NON_LINEAR": [ + { + "busbarSectionId": null, + "connectablePositionInfos": { + "connectionDirection": null + }, + "connectionSide": null + } + ] } }, { @@ -87,12 +123,40 @@ "busBarSectionInfos" : { "1" : [ "NGEN5"], "2" : [ "NGEN5_2_1", "NGEN5_2_2" ] - } + }, + "feederBaysInfos": {} }, { "id": "VLGEN6", "topologyKind": "BUS_BREAKER", "substationId": "P6", "nominalV": 24.0 + }, + { + "id": "VLGEN7", + "topologyKind": "NODE_BREAKER", + "substationId": "P5", + "nominalV": 24.0, + "lowVoltageLimit": 20.0, + "highVoltageLimit": 30.0, + "busbarCount": 1, + "sectionCount": 1, + "switchKinds": [], + "isRetrievedBusbarSections": false, + "isBusbarSectionPositionFound": false, + "busBarSectionInfos": {}, + "feederBaysInfos": { + "LINE7": [ + { + "busbarSectionId": "NGEN7", + "connectablePositionInfos": { + "connectionDirection": "TOP", + "connectionPosition": 3, + "connectionName": "LINE7_Side_VLGEN8" + }, + "connectionSide": "TWO" + } + ] + } } ] \ No newline at end of file diff --git a/src/test/resources/voltage-levels-list-data.json b/src/test/resources/voltage-levels-list-data.json index 6705164a..574cd402 100644 --- a/src/test/resources/voltage-levels-list-data.json +++ b/src/test/resources/voltage-levels-list-data.json @@ -30,5 +30,8 @@ }, { "id": "VLGEN6" + }, + { + "id": "VLGEN7" } ] diff --git a/src/test/resources/voltage-levels-map-data.json b/src/test/resources/voltage-levels-map-data.json index 8f77d945..15ab281d 100644 --- a/src/test/resources/voltage-levels-map-data.json +++ b/src/test/resources/voltage-levels-map-data.json @@ -49,5 +49,10 @@ "id": "VLGEN5", "substationId": "P5", "nominalV": 24.0 + }, + { + "id": "VLGEN7", + "substationId": "P5", + "nominalV": 24.0 } ]