From 055d1cbf095e689e8ff236d473347435852b74b4 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 23 May 2023 20:35:31 +0200 Subject: [PATCH 01/19] modification on .css to increase precedence of a style Signed-off-by: Sophie Frasnedo --- .../src/main/resources/highlightLineStates.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/main/resources/highlightLineStates.css b/single-line-diagram/single-line-diagram-core/src/main/resources/highlightLineStates.css index caa12fc58..3a519375c 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/resources/highlightLineStates.css +++ b/single-line-diagram/single-line-diagram-core/src/main/resources/highlightLineStates.css @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} From 93846ffa8e431b6ba198c4402e751a8d761f43da Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Thu, 25 May 2023 21:17:24 +0200 Subject: [PATCH 02/19] add connected status to BusConnection Signed-off-by: Sophie Frasnedo --- .../sld/builders/NetworkGraphBuilder.java | 1 + .../powsybl/sld/model/graphs/NodeFactory.java | 8 +++++--- .../sld/model/graphs/VoltageLevelGraph.java | 2 +- .../powsybl/sld/model/nodes/AbstractNode.java | 12 ++++++++++++ .../sld/model/nodes/BusConnection.java | 19 +++++++++++++++++++ .../com/powsybl/sld/model/nodes/Node.java | 4 ++++ .../sld/svg/styles/AbstractStyleProvider.java | 9 +++++---- .../sld/svg/styles/StyleClassConstants.java | 2 ++ 8 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java index 74e0d0a76..0df8e7d14 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java @@ -518,6 +518,7 @@ private void connectToBus(Node node, Terminal terminal) { protected void addTerminalNode(Node node, Terminal terminal) { node.setOrder(order++); node.setDirection(order % 2 == 0 ? Direction.TOP : Direction.BOTTOM); + node.setConnected(terminal.isConnected()); connectToBus(node, terminal); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java index 26ae38bb4..60ce6a623 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java @@ -45,9 +45,11 @@ public static ConnectivityNode createConnectivityNode(VoltageLevelGraph graph, S return node; } - public static Node createBusConnection(VoltageLevelGraph graph, String idNodeConnectedToBusNode) { - String idBusConnection = BUS_CONNECTION_ID_PREFIX + Objects.requireNonNull(idNodeConnectedToBusNode); - return createConnectivityNode(graph, idBusConnection, BUS_CONNECTION); + public static BusConnection createBusConnection(VoltageLevelGraph graph, String idBusConnection, String nodeConnectedToBusNodeId) { + String idBusConnectionWithPrefix = BUS_CONNECTION_ID_PREFIX + Objects.requireNonNull(idBusConnection); + BusConnection node = new BusConnection(idBusConnectionWithPrefix, BUS_CONNECTION, graph.getNode(nodeConnectedToBusNodeId).isConnected()); + graph.addNode(node); + return node; } public static BusNode createBusNode(VoltageLevelGraph graph, String id, String name) { diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java index f1284a4c3..011f523df 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java @@ -316,7 +316,7 @@ private void insertBusConnections(BusNode busNode, Predicate nodesOnBus) { } private void insertBusConnection(BusNode busNode, Node nodeConnectedToBusNode) { - Node fNodeToBus = NodeFactory.createBusConnection(this, busNode.getId() + "_" + nodeConnectedToBusNode.getId()); + Node fNodeToBus = NodeFactory.createBusConnection(this, busNode.getId() + "_" + nodeConnectedToBusNode.getId(), nodeConnectedToBusNode.getId()); insertNode(busNode, fNodeToBus, nodeConnectedToBusNode); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java index 6d76295ea..5a81f5c0d 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java @@ -47,6 +47,8 @@ public abstract class AbstractNode implements Node { private Orientation orientation; + protected boolean connectedNode; + /** * Constructor */ @@ -227,6 +229,16 @@ public int getCardinality(VoltageLevelGraph vlGraph) { return getAdjacentNodes().size(); } + @Override + public boolean isConnected() { + return connectedNode; + } + + @Override + public void setConnected(boolean connectedNode) { + this.connectedNode = connectedNode; + } + protected void writeJsonContent(JsonGenerator generator, boolean includeCoordinates) throws IOException { generator.writeStringField("type", type.name()); generator.writeStringField("id", id); diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java new file mode 100644 index 000000000..b1fc3d713 --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2023, 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 com.powsybl.sld.model.nodes; + +/** + * @author Sophie Frasnedo + */ +public class BusConnection extends ConnectivityNode { + + public BusConnection(String id, String componentType, boolean connectedToBus) { + super(id, componentType); + this.connectedNode = connectedToBus; + } + +} diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java index 34e9df53f..888795575 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java @@ -77,5 +77,9 @@ enum NodeType { int getCardinality(VoltageLevelGraph vlGraph); + boolean isConnected(); + + void setConnected(boolean connectedNode); + void writeJson(JsonGenerator generator, boolean includeCoordinates) throws IOException; } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java index 175e0e34b..cc8bcf0b2 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java @@ -15,10 +15,7 @@ import com.powsybl.sld.model.cells.ShuntCell; import com.powsybl.sld.model.coordinate.Direction; import com.powsybl.sld.model.graphs.VoltageLevelGraph; -import com.powsybl.sld.model.nodes.BranchEdge; -import com.powsybl.sld.model.nodes.FeederNode; -import com.powsybl.sld.model.nodes.Node; -import com.powsybl.sld.model.nodes.SwitchNode; +import com.powsybl.sld.model.nodes.*; import com.powsybl.sld.svg.DiagramLabelProvider; import com.powsybl.sld.svg.DirectionalFeederInfo; import com.powsybl.sld.svg.FeederInfo; @@ -54,6 +51,10 @@ public List getNodeStyles(VoltageLevelGraph graph, Node node, ComponentL styles.add(StyleClassConstants.FICTITIOUS_NODE_STYLE_CLASS); } + if (node instanceof BusConnection) { + styles.add(node.isConnected() ? StyleClassConstants.CONNECTED_BUS_CONNECTION_STYLE_CLASS : StyleClassConstants.DISCONNECTED_BUS_CONNECTION_STYLE_CLASS); + } + return styles; } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/StyleClassConstants.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/StyleClassConstants.java index 42e45b530..e2738977f 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/StyleClassConstants.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/StyleClassConstants.java @@ -42,6 +42,8 @@ public final class StyleClassConstants { public static final String LABEL_STYLE_CLASS = STYLE_PREFIX + "label"; public static final String GRID_STYLE_CLASS = STYLE_PREFIX + "grid"; public static final String WIRE_STYLE_CLASS = STYLE_PREFIX + "wire"; + public static final String CONNECTED_BUS_CONNECTION_STYLE_CLASS = STYLE_PREFIX + "connected-bus-connection"; + public static final String DISCONNECTED_BUS_CONNECTION_STYLE_CLASS = STYLE_PREFIX + "disconnected-bus-connection"; private StyleClassConstants() { } From 056e1666f78f4cc1ebfc024d16e229982327491d Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Thu, 25 May 2023 21:31:55 +0200 Subject: [PATCH 03/19] modify .css style Signed-off-by: Sophie Frasnedo --- .../single-line-diagram-core/src/main/resources/tautologies.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/single-line-diagram/single-line-diagram-core/src/main/resources/tautologies.css b/single-line-diagram/single-line-diagram-core/src/main/resources/tautologies.css index eb5a18060..432067fd5 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/resources/tautologies.css +++ b/single-line-diagram/single-line-diagram-core/src/main/resources/tautologies.css @@ -10,3 +10,5 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} From 57e752cf39ca8b1c27c882b1bcff2ad15550ff1e Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Fri, 26 May 2023 10:20:56 +0200 Subject: [PATCH 04/19] update test references to take into account css modifications Signed-off-by: Sophie Frasnedo --- .../src/test/resources/InternalBranchesNodeBreaker.svg | 8 +++++--- .../resources/NodeDecoratorsBranchStatusNodeBreaker.svg | 8 +++++--- .../src/test/resources/NodeDecoratorsSwitches.svg | 8 +++++--- .../src/test/resources/TestAllPossibleInfoItems.svg | 2 ++ .../src/test/resources/TestAnimatedFeederInfos.svg | 2 ++ .../src/test/resources/TestCase1.svg | 2 ++ .../src/test/resources/TestCase11FlatDesign.svg | 2 ++ .../test/resources/TestCase11SubstationGraphHFirst.svg | 8 +++++--- .../src/test/resources/TestCase11SubstationGraphHLast.svg | 8 +++++--- .../test/resources/TestCase11SubstationGraphHMiddle.svg | 8 +++++--- .../src/test/resources/TestCase11SubstationGraphHNone.svg | 8 +++++--- .../TestCase12GraphWithNodesInfosNominalVoltage.svg | 2 ++ .../TestCase12GraphWithNodesInfosTopological.svg | 2 ++ .../src/test/resources/TestCaseComplexCoupling.svg | 2 ++ .../test/resources/TestCaseKeepFictitiousSwitchNode.svg | 8 +++++--- .../test/resources/TestCaseRemoveFictitiousSwitchNode.svg | 8 +++++--- .../src/test/resources/TestCheese.svg | 2 ++ .../test/resources/TestComplexParallelLegsInternalPst.svg | 8 +++++--- .../src/test/resources/TestFeederInfos.svg | 2 ++ .../src/test/resources/TestFeederOnBusDisconnector.svg | 2 ++ .../src/test/resources/TestFormattingFeederInfos.svg | 8 +++++--- .../src/test/resources/TestSldClassSubstation.svg | 8 +++++--- .../src/test/resources/TestSldClassVl.svg | 8 +++++--- .../src/test/resources/TestUnknownLibrary.svg | 8 +++++--- .../src/test/resources/label_on_all_nodes.svg | 2 ++ .../test/resources/nominal_voltage_style_substation.svg | 8 +++++--- .../src/test/resources/nominal_voltage_style_vl2.svg | 8 +++++--- .../src/test/resources/nominal_voltage_style_vl3.svg | 8 +++++--- .../src/test/resources/substation.svg | 2 ++ .../test/resources/substation_feeder_arrow_symmetry.svg | 2 ++ .../src/test/resources/substation_no_feeder_values.svg | 2 ++ .../src/test/resources/substation_optimized.svg | 2 ++ .../src/test/resources/topological_style_substation.svg | 8 +++++--- .../single-line-diagram-core/src/test/resources/vl1.svg | 2 ++ .../src/test/resources/vl1_multiline_tooltip.svg | 2 ++ .../src/test/resources/vl1_optimized.svg | 2 ++ .../src/test/resources/vl1_straightWires.svg | 2 ++ .../src/test/resources/vl1_tooltip.svg | 2 ++ .../single-line-diagram-core/src/test/resources/vl2.svg | 2 ++ .../src/test/resources/vl2_optimized.svg | 2 ++ .../single-line-diagram-core/src/test/resources/vl3.svg | 2 ++ .../src/test/resources/vl3_optimized.svg | 2 ++ .../src/test/resources/with_frame_background.svg | 8 +++++--- .../single-line-diagram-core/src/test/resources/zone.svg | 2 ++ 44 files changed, 145 insertions(+), 57 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesNodeBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesNodeBreaker.svg index a33ff3d55..d069f1d14 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesNodeBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesNodeBreaker.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusNodeBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusNodeBreaker.svg index 93daef275..d55b79f53 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusNodeBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusNodeBreaker.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsSwitches.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsSwitches.svg index 4f5782add..c1ce155a2 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsSwitches.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsSwitches.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestAllPossibleInfoItems.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestAllPossibleInfoItems.svg index 234a95779..5fc1cfb3d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestAllPossibleInfoItems.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestAllPossibleInfoItems.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestAnimatedFeederInfos.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestAnimatedFeederInfos.svg index a4fadca02..7e0ca40fc 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestAnimatedFeederInfos.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestAnimatedFeederInfos.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase1.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase1.svg index 2c9791773..77dfa03de 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase1.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase1.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11FlatDesign.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11FlatDesign.svg index fc63a5394..f5e34c106 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11FlatDesign.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11FlatDesign.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHFirst.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHFirst.svg index f1cf189f4..0b8ddea7b 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHFirst.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHFirst.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHLast.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHLast.svg index da7099a8f..7409fd953 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHLast.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHLast.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHMiddle.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHMiddle.svg index aac66d706..f4e97f5e7 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHMiddle.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHMiddle.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHNone.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHNone.svg index f1cf189f4..0b8ddea7b 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHNone.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHNone.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosNominalVoltage.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosNominalVoltage.svg index 3a5b5971e..2dc156dee 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosNominalVoltage.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosNominalVoltage.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosTopological.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosTopological.svg index 0e0a6ecfc..b8f926088 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosTopological.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosTopological.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseComplexCoupling.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseComplexCoupling.svg index 94309453e..0cdacd878 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseComplexCoupling.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseComplexCoupling.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseKeepFictitiousSwitchNode.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseKeepFictitiousSwitchNode.svg index 6823b7cc6..b4bd901e3 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseKeepFictitiousSwitchNode.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseKeepFictitiousSwitchNode.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseRemoveFictitiousSwitchNode.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseRemoveFictitiousSwitchNode.svg index ff666b6d3..9a33115aa 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseRemoveFictitiousSwitchNode.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseRemoveFictitiousSwitchNode.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCheese.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCheese.svg index ee0eb018b..59f2626c7 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCheese.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCheese.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestComplexParallelLegsInternalPst.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestComplexParallelLegsInternalPst.svg index de1800a98..c93299b96 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestComplexParallelLegsInternalPst.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestComplexParallelLegsInternalPst.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* File : components.css ------------------------------------------------- */ .sld-disconnector.sld-open {stroke-width: 1.5; stroke: var(--sld-vl-color, black); fill: none} .sld-disconnector.sld-closed {fill: var(--sld-vl-color, black)} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederInfos.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederInfos.svg index 880dc4ab3..29a047dbb 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederInfos.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederInfos.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBusDisconnector.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBusDisconnector.svg index cb7a46e15..f17e05422 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBusDisconnector.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBusDisconnector.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg index 9525577e4..81f67f356 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassSubstation.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassSubstation.svg index 23f772739..c1fc8dc71 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassSubstation.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassSubstation.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassVl.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassVl.svg index 31b0d5e2d..f843f77ab 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassVl.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassVl.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestUnknownLibrary.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestUnknownLibrary.svg index c04ce6c66..aad2a6469 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestUnknownLibrary.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestUnknownLibrary.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/label_on_all_nodes.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/label_on_all_nodes.svg index 7a39e9ce3..9483a59c7 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/label_on_all_nodes.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/label_on_all_nodes.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_substation.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_substation.svg index e4be13006..fe790617a 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_substation.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_substation.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} @@ -24,9 +26,9 @@ .sld-vl0to30 {--sld-vl-color: #abae28} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl2.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl2.svg index 082c45114..93fe146da 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl2.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl2.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} @@ -24,9 +26,9 @@ .sld-vl0to30 {--sld-vl-color: #abae28} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl3.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl3.svg index 20a135a2f..8ce2d0d7c 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl3.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl3.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} @@ -24,9 +26,9 @@ .sld-vl0to30 {--sld-vl-color: #abae28} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/substation.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/substation.svg index 08afccb62..03e20bca7 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/substation.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/substation.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_feeder_arrow_symmetry.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_feeder_arrow_symmetry.svg index c77e7c0d8..db10c5ddb 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_feeder_arrow_symmetry.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_feeder_arrow_symmetry.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_no_feeder_values.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_no_feeder_values.svg index d71915d34..82ffade9d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_no_feeder_values.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_no_feeder_values.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_optimized.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_optimized.svg index 0cafe6d5a..658305cd8 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_optimized.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_optimized.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/topological_style_substation.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/topological_style_substation.svg index dbb9252b9..7be9c79de 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/topological_style_substation.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/topological_style_substation.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +90,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1.svg index 045becbb6..c6a5da771 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_multiline_tooltip.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_multiline_tooltip.svg index 0e2e4fb64..116b52efc 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_multiline_tooltip.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_multiline_tooltip.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_optimized.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_optimized.svg index cc2047689..4a5187a86 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_optimized.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_optimized.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_straightWires.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_straightWires.svg index d27ca4255..e8b261532 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_straightWires.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_straightWires.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_tooltip.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_tooltip.svg index 9da0fe65d..01e33a981 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_tooltip.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_tooltip.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl2.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl2.svg index 9db0aaef6..280fc51a6 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl2.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl2.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl2_optimized.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl2_optimized.svg index 350195c1c..ca6ec4fca 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl2_optimized.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl2_optimized.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl3.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl3.svg index 3665f7629..0e8d11c41 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl3.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl3.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl3_optimized.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl3_optimized.svg index 855642405..51e22f51d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl3_optimized.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl3_optimized.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/with_frame_background.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/with_frame_background.svg index 7039a6471..652f40e99 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/with_frame_background.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/with_frame_background.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} @@ -24,9 +26,9 @@ .sld-vl0to30 {--sld-vl-color: #abae28} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : TestWithGreyFrameBackground.css ---------------------------------------- */ .sld-frame {--sld-background-color: lightgrey} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/zone.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/zone.svg index 137b30525..c395e7fc1 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/zone.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/zone.svg @@ -13,6 +13,8 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ From 35c1e07055a341eb13d0c5e0f53c1166c6158099 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 30 May 2023 11:50:30 +0200 Subject: [PATCH 05/19] use disconnected status instead of connected status Signed-off-by: Sophie Frasnedo --- .../com/powsybl/sld/builders/NetworkGraphBuilder.java | 3 ++- .../java/com/powsybl/sld/model/graphs/NodeFactory.java | 2 +- .../java/com/powsybl/sld/model/nodes/AbstractNode.java | 10 +++++----- .../com/powsybl/sld/model/nodes/BusConnection.java | 2 +- .../main/java/com/powsybl/sld/model/nodes/Node.java | 4 ++-- .../powsybl/sld/svg/styles/AbstractStyleProvider.java | 4 +++- .../powsybl/sld/svg/styles/StyleClassConstants.java | 1 - .../src/main/resources/tautologies.css | 3 +-- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java index 0df8e7d14..310c7df48 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java @@ -518,7 +518,7 @@ private void connectToBus(Node node, Terminal terminal) { protected void addTerminalNode(Node node, Terminal terminal) { node.setOrder(order++); node.setDirection(order % 2 == 0 ? Direction.TOP : Direction.BOTTOM); - node.setConnected(terminal.isConnected()); + node.setDisconnected(!terminal.isConnected()); connectToBus(node, terminal); } @@ -531,6 +531,7 @@ protected void add3wtFeeder(Middle3WTNode middleNode, FeederNode firstOtherLegNo secondOtherLegNode.setOrder(order++); secondOtherLegNode.setDirection(direction); + middleNode.setDisconnected(!terminal.isConnected()); connectToBus(middleNode, terminal); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java index 60ce6a623..9945af501 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java @@ -47,7 +47,7 @@ public static ConnectivityNode createConnectivityNode(VoltageLevelGraph graph, S public static BusConnection createBusConnection(VoltageLevelGraph graph, String idBusConnection, String nodeConnectedToBusNodeId) { String idBusConnectionWithPrefix = BUS_CONNECTION_ID_PREFIX + Objects.requireNonNull(idBusConnection); - BusConnection node = new BusConnection(idBusConnectionWithPrefix, BUS_CONNECTION, graph.getNode(nodeConnectedToBusNodeId).isConnected()); + BusConnection node = new BusConnection(idBusConnectionWithPrefix, BUS_CONNECTION, graph.getNode(nodeConnectedToBusNodeId).isDisconnected()); graph.addNode(node); return node; } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java index 5a81f5c0d..8a58a409c 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java @@ -47,7 +47,7 @@ public abstract class AbstractNode implements Node { private Orientation orientation; - protected boolean connectedNode; + protected boolean disconnectedNode; /** * Constructor @@ -230,13 +230,13 @@ public int getCardinality(VoltageLevelGraph vlGraph) { } @Override - public boolean isConnected() { - return connectedNode; + public boolean isDisconnected() { + return disconnectedNode; } @Override - public void setConnected(boolean connectedNode) { - this.connectedNode = connectedNode; + public void setDisconnected(boolean disconnectedNode) { + this.disconnectedNode = disconnectedNode; } protected void writeJsonContent(JsonGenerator generator, boolean includeCoordinates) throws IOException { diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java index b1fc3d713..77a8fe8c8 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java @@ -13,7 +13,7 @@ public class BusConnection extends ConnectivityNode { public BusConnection(String id, String componentType, boolean connectedToBus) { super(id, componentType); - this.connectedNode = connectedToBus; + this.disconnectedNode = connectedToBus; } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java index 888795575..c4f283bc1 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java @@ -77,9 +77,9 @@ enum NodeType { int getCardinality(VoltageLevelGraph vlGraph); - boolean isConnected(); + boolean isDisconnected(); - void setConnected(boolean connectedNode); + void setDisconnected(boolean disconnectedNode); void writeJson(JsonGenerator generator, boolean includeCoordinates) throws IOException; } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java index cc8bcf0b2..4e7d9fcc8 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java @@ -52,7 +52,9 @@ public List getNodeStyles(VoltageLevelGraph graph, Node node, ComponentL } if (node instanceof BusConnection) { - styles.add(node.isConnected() ? StyleClassConstants.CONNECTED_BUS_CONNECTION_STYLE_CLASS : StyleClassConstants.DISCONNECTED_BUS_CONNECTION_STYLE_CLASS); + if (node.isDisconnected()) { + styles.add(StyleClassConstants.DISCONNECTED_BUS_CONNECTION_STYLE_CLASS); + } } return styles; diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/StyleClassConstants.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/StyleClassConstants.java index e2738977f..97f3e3b71 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/StyleClassConstants.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/StyleClassConstants.java @@ -42,7 +42,6 @@ public final class StyleClassConstants { public static final String LABEL_STYLE_CLASS = STYLE_PREFIX + "label"; public static final String GRID_STYLE_CLASS = STYLE_PREFIX + "grid"; public static final String WIRE_STYLE_CLASS = STYLE_PREFIX + "wire"; - public static final String CONNECTED_BUS_CONNECTION_STYLE_CLASS = STYLE_PREFIX + "connected-bus-connection"; public static final String DISCONNECTED_BUS_CONNECTION_STYLE_CLASS = STYLE_PREFIX + "disconnected-bus-connection"; private StyleClassConstants() { diff --git a/single-line-diagram/single-line-diagram-core/src/main/resources/tautologies.css b/single-line-diagram/single-line-diagram-core/src/main/resources/tautologies.css index 432067fd5..53520047f 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/resources/tautologies.css +++ b/single-line-diagram/single-line-diagram-core/src/main/resources/tautologies.css @@ -10,5 +10,4 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} From 328fac94b67940fdb520f424bfa8b877c1569a32 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 30 May 2023 14:57:46 +0200 Subject: [PATCH 06/19] distinguish node name from equipment id for trafo middle node to allow 2 3WT nodes to be connected to the same voltage level Signed-off-by: Sophie Frasnedo --- .../com/powsybl/sld/builders/NetworkGraphBuilder.java | 11 +++++------ .../powsybl/sld/builders/SubstationRawBuilder.java | 2 +- .../com/powsybl/sld/model/graphs/NodeFactory.java | 11 +++++------ .../com/powsybl/sld/model/nodes/Middle2WTNode.java | 5 ++--- .../com/powsybl/sld/model/nodes/Middle3WTNode.java | 7 +++---- .../com/powsybl/sld/model/nodes/MiddleTwtNode.java | 4 ++-- .../test/java/com/powsybl/sld/iidm/TestSVGWriter.java | 8 ++++---- .../com/powsybl/sld/util/NominalVoltageStyleTest.java | 2 +- .../com/powsybl/sld/util/TopologicalStyleTest.java | 2 +- 9 files changed, 24 insertions(+), 28 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java index 310c7df48..f3c35a8d8 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java @@ -327,11 +327,11 @@ NodeSide.TWO, createVoltageLevelInfos(transformer.getLeg2().getTerminal()), transformer.getId(), secondOtherLegSide, voltageLevelInfosBySide.get(secondOtherLegSide)); // create middle node - Middle3WTNode middleNode = NodeFactory.createMiddle3WTNode(graph, transformer.getId(), transformer.getNameOrId(), - vlLegSide, firstOtherLegNode, secondOtherLegNode, + Middle3WTNode middleNode = NodeFactory.createMiddle3WTNode(graph, "MIDDLE_" + transformer.getId() + "_" + side.name(), transformer.getNameOrId(), transformer.getId(), + vlLegSide, firstOtherLegNode, + secondOtherLegNode, voltageLevelInfosBySide.get(NodeSide.ONE), - voltageLevelInfosBySide.get(NodeSide.TWO), - voltageLevelInfosBySide.get(NodeSide.THREE)); + voltageLevelInfosBySide.get(NodeSide.TWO), voltageLevelInfosBySide.get(NodeSide.THREE)); add3wtFeeder(middleNode, firstOtherLegNode, secondOtherLegNode, transformer.getTerminal(side)); } else { @@ -711,8 +711,7 @@ private void add3wtEdges(BaseGraph graph, List threeWi return (FeederNode) graph.getVoltageLevel(vlId).getNode(idLeg); }).collect(Collectors.toList()); - NodeFactory.createMiddle3WTNode(graph, transfo.getId(), transfo.getNameOrId(), - feederNodes.get(0), feederNodes.get(1), feederNodes.get(2)); + NodeFactory.createMiddle3WTNode(graph, transfo.getId(), transfo.getNameOrId(), transfo.getId(), feederNodes.get(0), feederNodes.get(1), feederNodes.get(2)); }); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java index 6d70a0477..4f1a4edf7 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java @@ -72,7 +72,7 @@ public Map createFeeder3WT(String id, Voltag f3WTNodes.put(vl3, feeder3WTNode3); // creation of the middle node and the edges linking the transformer leg nodes to this middle node - NodeFactory.createMiddle3WTNode(substationGraph, id, id, feeder3WTNode1, feeder3WTNode2, feeder3WTNode3); + NodeFactory.createMiddle3WTNode(substationGraph, id, id, id, feeder3WTNode1, feeder3WTNode2, feeder3WTNode3); return f3WTNodes; } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java index 9945af501..77b3fe51b 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java @@ -196,14 +196,14 @@ public static Middle2WTNode createMiddle2WTNode(BaseGraph baseGraph, String id, return m2wn; } - public static Middle3WTNode createMiddle3WTNode(VoltageLevelGraph baseGraph, String id, String name, NodeSide vlSide, + public static Middle3WTNode createMiddle3WTNode(VoltageLevelGraph baseGraph, String id, String name, String equipmentId, NodeSide vlSide, FeederNode firstOtherLegNode, FeederNode secondOtherLegNode, VoltageLevelInfos vlLeg1, VoltageLevelInfos vlLeg2, VoltageLevelInfos vlLeg3) { if (firstOtherLegNode.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG || secondOtherLegNode.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG) { throw new PowsyblException("Middle3WTNode must be created with FeederNode with ComponentTypeName THREE_WINDINGS_TRANSFORMER_LEG"); } - Middle3WTNode m3wn = new Middle3WTNode(id, name, vlLeg1, vlLeg2, vlLeg3, true); + Middle3WTNode m3wn = new Middle3WTNode(id, name, equipmentId, vlLeg1, vlLeg2, vlLeg3, true); m3wn.setWindingOrder(Middle3WTNode.Winding.DOWN, vlSide); m3wn.setWindingOrder(Middle3WTNode.Winding.UPPER_LEFT, ((FeederTwLeg) firstOtherLegNode.getFeeder()).getSide()); m3wn.setWindingOrder(Middle3WTNode.Winding.UPPER_RIGHT, ((FeederTwLeg) secondOtherLegNode.getFeeder()).getSide()); @@ -213,17 +213,16 @@ public static Middle3WTNode createMiddle3WTNode(VoltageLevelGraph baseGraph, Str return m3wn; } - public static Middle3WTNode createMiddle3WTNode(BaseGraph baseGraph, String id, String name, FeederNode legNode1, FeederNode legNode2, FeederNode legNode3) { + public static Middle3WTNode createMiddle3WTNode(BaseGraph baseGraph, String id, String name, String equipmentId, FeederNode legNode1, FeederNode legNode2, FeederNode legNode3) { if (legNode1.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG || legNode2.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG || legNode3.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG) { throw new PowsyblException("Middle3WTNode must be created with FeederNode with ComponentTypeName THREE_WINDINGS_TRANSFORMER_LEG"); } - Middle3WTNode m3wn = new Middle3WTNode(id, name, + Middle3WTNode m3wn = new Middle3WTNode(id, name, equipmentId, ((FeederTwLeg) legNode1.getFeeder()).getVoltageLevelInfos(), ((FeederTwLeg) legNode2.getFeeder()).getVoltageLevelInfos(), - ((FeederTwLeg) legNode3.getFeeder()).getVoltageLevelInfos(), - false); + ((FeederTwLeg) legNode3.getFeeder()).getVoltageLevelInfos(), false); baseGraph.addTwtEdge(legNode1, m3wn); baseGraph.addTwtEdge(legNode2, m3wn); baseGraph.addTwtEdge(legNode3, m3wn); diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle2WTNode.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle2WTNode.java index 212738321..7abbc71ba 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle2WTNode.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle2WTNode.java @@ -16,8 +16,7 @@ public class Middle2WTNode extends MiddleTwtNode { public Middle2WTNode(String id, String name, VoltageLevelInfos voltageLevelInfosLeg1, VoltageLevelInfos voltageLevelInfosLeg2, String componentType) { - super(id, name, - new VoltageLevelInfos[]{Objects.requireNonNull(voltageLevelInfosLeg1), Objects.requireNonNull(voltageLevelInfosLeg2) }, - componentType); + super(id, name, id, + new VoltageLevelInfos[]{Objects.requireNonNull(voltageLevelInfosLeg1), Objects.requireNonNull(voltageLevelInfosLeg2) }, componentType); } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle3WTNode.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle3WTNode.java index f70e4b712..97ab12445 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle3WTNode.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle3WTNode.java @@ -21,10 +21,9 @@ public class Middle3WTNode extends MiddleTwtNode { private final Map windingMap = new EnumMap<>(Winding.class); private final boolean embeddedInVlGraph; - public Middle3WTNode(String id, String name, VoltageLevelInfos voltageLevelInfosLeg1, VoltageLevelInfos voltageLevelInfosLeg2, VoltageLevelInfos voltageLevelInfosLeg3, boolean embeddedInVLGraph) { - super(id, name, - new VoltageLevelInfos[]{Objects.requireNonNull(voltageLevelInfosLeg1), Objects.requireNonNull(voltageLevelInfosLeg2), Objects.requireNonNull(voltageLevelInfosLeg3)}, - THREE_WINDINGS_TRANSFORMER); + public Middle3WTNode(String id, String name, String equipmentId, VoltageLevelInfos voltageLevelInfosLeg1, VoltageLevelInfos voltageLevelInfosLeg2, VoltageLevelInfos voltageLevelInfosLeg3, boolean embeddedInVLGraph) { + super(id, name, equipmentId, + new VoltageLevelInfos[]{Objects.requireNonNull(voltageLevelInfosLeg1), Objects.requireNonNull(voltageLevelInfosLeg2), Objects.requireNonNull(voltageLevelInfosLeg3)}, THREE_WINDINGS_TRANSFORMER); this.embeddedInVlGraph = embeddedInVLGraph; } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/MiddleTwtNode.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/MiddleTwtNode.java index d1d27f618..e28bc5a11 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/MiddleTwtNode.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/MiddleTwtNode.java @@ -17,8 +17,8 @@ public class MiddleTwtNode extends EquipmentNode { protected final VoltageLevelInfos[] voltageLevelInfosLeg; - protected MiddleTwtNode(String id, String name, VoltageLevelInfos[] voltageLevelInfosLeg, String componentType) { - super(NodeType.INTERNAL, id, name, id, componentType, true); + protected MiddleTwtNode(String id, String name, String equipmentId, VoltageLevelInfos[] voltageLevelInfosLeg, String componentType) { + super(NodeType.INTERNAL, id, name, equipmentId, componentType, true); this.voltageLevelInfosLeg = voltageLevelInfosLeg; } diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java index 4a6fa4598..12dceeb95 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java @@ -145,7 +145,7 @@ protected static VoltageLevelGraph createVoltageLevelGraph1() { vl1Trf2Two.setDirection(TOP); vl1Trf2Two.setX(440); vl1Trf2Two.setY(80); - Middle3WTNode vl1Trf2Fict = new Middle3WTNode("vl1_trf2", "vl1_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); + Middle3WTNode vl1Trf2Fict = new Middle3WTNode("vl1_trf2", "vl1_trf2","vl1_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); vl1Trf2Fict.setX(400); vl1Trf2Fict.setY(140); g1.addNode(vl1Trf2Fict); @@ -220,7 +220,7 @@ private static VoltageLevelGraph createVoltageLevelGraph2() { vl2Trf2Two.setDirection(TOP); vl2Trf2Two.setX(190); vl2Trf2Two.setY(80); - Middle3WTNode vl2Trf2Fict = new Middle3WTNode("vl2_trf2", "vl2_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); + Middle3WTNode vl2Trf2Fict = new Middle3WTNode("vl2_trf2", "vl2_trf2", "vl2_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); vl2Trf2Fict.setX(160); vl2Trf2Fict.setY(140); g2.addNode(vl2Trf2Fict); @@ -279,7 +279,7 @@ private static VoltageLevelGraph createVoltageLevelGraph3() { vl3Trf2Two.setDirection(TOP); vl3Trf2Two.setX(190); vl3Trf2Two.setY(80); - Middle3WTNode vl3Trf2Fict = new Middle3WTNode("vl3_trf2", "vl3_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); + Middle3WTNode vl3Trf2Fict = new Middle3WTNode("vl3_trf2", "vl3_trf2", "vl3_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); vl3Trf2Fict.setX(150); vl3Trf2Fict.setY(140); g3.addNode(vl3Trf2Fict); @@ -495,7 +495,7 @@ private void createSubstationGraph() { edge2.setSnakeLine(Point.createPointsList(690., 540., 690., 590., 405., 590.)); substG.addMultiTermNode(nMulti1); - Middle3WTNode nMulti3 = new Middle3WTNode(vl1Trf2.getEquipmentId(), vl1Trf2.getEquipmentId(), vl1Infos, vl2Infos, vl3Infos, false); + Middle3WTNode nMulti3 = new Middle3WTNode(vl1Trf2.getEquipmentId(), vl1Trf2.getEquipmentId(), vl1Trf2.getEquipmentId(), vl1Infos, vl2Infos, vl3Infos, false); nMulti3.setCoordinates(750., 90.); nMulti3.setWindingOrder(Middle3WTNode.Winding.UPPER_LEFT, Middle3WTNode.Winding.DOWN, Middle3WTNode.Winding.UPPER_RIGHT); BranchEdge edge21 = substG.addTwtEdge(vl1Trf2, nMulti3); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/util/NominalVoltageStyleTest.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/util/NominalVoltageStyleTest.java index 4bb82b0e4..e613b1767 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/util/NominalVoltageStyleTest.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/util/NominalVoltageStyleTest.java @@ -137,7 +137,7 @@ void testAttributes() { assertTrue(wireStyles.contains(StyleClassConstants.WIRE_STYLE_CLASS)); assertTrue(wireStyles.contains("sld-vl300to500")); - Node fict3WTNode = graph1.getNode("3WT"); + Node fict3WTNode = graph1.getNode("MIDDLE_3WT_ONE"); List node3WTStyle = styleProvider.getNodeStyles(graph1, fict3WTNode, componentLibrary, false); assertEquals(2, node3WTStyle.size()); assertTrue(node3WTStyle.contains("sld-three-wt")); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/util/TopologicalStyleTest.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/util/TopologicalStyleTest.java index 141935a62..2ed5a63a6 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/util/TopologicalStyleTest.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/util/TopologicalStyleTest.java @@ -116,7 +116,7 @@ void test() throws IOException { assertTrue(wireStyles.contains(StyleClassConstants.WIRE_STYLE_CLASS)); assertTrue(wireStyles.contains("sld-vl300to500-0")); - Node fict3WTNode = graph1.getNode("3WT"); + Node fict3WTNode = graph1.getNode("MIDDLE_3WT_ONE"); List node3WTStyle = styleProvider.getNodeStyles(graph1, fict3WTNode, componentLibrary, true); assertEquals(2, node3WTStyle.size()); assertTrue(node3WTStyle.contains("sld-three-wt")); From d3ca92cded2dbf0d70901ab787bd5bbf7cd37322 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 30 May 2023 17:24:02 +0200 Subject: [PATCH 07/19] make bus connection information available for internal 2wt Signed-off-by: Sophie Frasnedo --- .../powsybl/sld/builders/NetworkGraphBuilder.java | 7 ++++++- .../com/powsybl/sld/model/graphs/NodeFactory.java | 14 ++++++++++++-- .../sld/model/graphs/VoltageLevelGraph.java | 7 ++++++- .../com/powsybl/sld/model/nodes/BusConnection.java | 4 ++-- .../powsybl/sld/model/nodes/Internal2WTNode.java | 12 +++++++++++- .../java/com/powsybl/sld/iidm/TestSVGWriter.java | 2 +- 6 files changed, 38 insertions(+), 8 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java index f3c35a8d8..ae94142b5 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java @@ -671,8 +671,13 @@ private void add2wtEdges(VoltageLevelGraph graph, List t for (TwoWindingsTransformer transfo : twoWindingsTransformers) { Node n1 = graph.getNode(transfo.getId() + "_" + Branch.Side.ONE); Node n2 = graph.getNode(transfo.getId() + "_" + Branch.Side.TWO); + Map connectionToBus = new HashMap<>(); + Terminal terminal1 = transfo.getTerminal1(); + Terminal terminal2 = transfo.getTerminal2(); + connectionToBus.put(terminal1.getBusBreakerView().getConnectableBus().getId(), terminal1.isConnected()); + connectionToBus.put(terminal2.getBusBreakerView().getConnectableBus().getId(), terminal2.isConnected()); NodeFactory.createInternal2WTNode(graph, transfo.getId(), transfo.getNameOrId(), - n1, n2, transfo.hasPhaseTapChanger()); + n1, n2, transfo.hasPhaseTapChanger(), connectionToBus); } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java index 77b3fe51b..1ab10e2e6 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java @@ -16,6 +16,7 @@ import com.powsybl.sld.model.nodes.feeders.FeederTwLeg; import com.powsybl.sld.model.nodes.feeders.FeederWithSides; +import java.util.Map; import java.util.Objects; import static com.powsybl.sld.library.ComponentTypeName.*; @@ -52,6 +53,15 @@ public static BusConnection createBusConnection(VoltageLevelGraph graph, String return node; } + public static Node createBusConnectionForInternal2WTNode(VoltageLevelGraph graph, String busNodeId, Internal2WTNode nodeConnectedToBusNode) { + boolean isDisconnected = !nodeConnectedToBusNode.connectedToBus(busNodeId); + String idBusConnectionWithPrefix = BUS_CONNECTION_ID_PREFIX + Objects.requireNonNull(busNodeId + "_" + nodeConnectedToBusNode.getId()); + BusConnection node = new BusConnection(idBusConnectionWithPrefix, BUS_CONNECTION, isDisconnected); + graph.addNode(node); + return node; + + } + public static BusNode createBusNode(VoltageLevelGraph graph, String id, String name) { BusNode bn = new BusNode(id, name, false); graph.addNode(bn); @@ -178,9 +188,9 @@ public static SwitchNode createSwitchNode(VoltageLevelGraph graph, String id, St return sn; } - public static EquipmentNode createInternal2WTNode(VoltageLevelGraph graph, String id, String nameOrId, Node n1, Node n2, boolean hasPhaseTapChanger) { + public static EquipmentNode createInternal2WTNode(VoltageLevelGraph graph, String id, String nameOrId, Node n1, Node n2, boolean hasPhaseTapChanger, Map connectionToBus) { String component = hasPhaseTapChanger ? PHASE_SHIFT_TRANSFORMER : TWO_WINDINGS_TRANSFORMER; - EquipmentNode i2wt = new Internal2WTNode(id, nameOrId, component); + EquipmentNode i2wt = new Internal2WTNode(id, nameOrId, component, connectionToBus); graph.addNode(i2wt); graph.addEdge(n1, i2wt); graph.addEdge(n2, i2wt); diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java index 011f523df..12b9fab95 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java @@ -316,7 +316,12 @@ private void insertBusConnections(BusNode busNode, Predicate nodesOnBus) { } private void insertBusConnection(BusNode busNode, Node nodeConnectedToBusNode) { - Node fNodeToBus = NodeFactory.createBusConnection(this, busNode.getId() + "_" + nodeConnectedToBusNode.getId(), nodeConnectedToBusNode.getId()); + Node fNodeToBus; + if (nodeConnectedToBusNode instanceof Internal2WTNode) { + fNodeToBus = NodeFactory.createBusConnectionForInternal2WTNode(this, busNode.getId(), (Internal2WTNode) nodeConnectedToBusNode); + } else { + fNodeToBus = NodeFactory.createBusConnection(this, busNode.getId() + "_" + nodeConnectedToBusNode.getId(), nodeConnectedToBusNode.getId()); + } insertNode(busNode, fNodeToBus, nodeConnectedToBusNode); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java index 77a8fe8c8..d7d868f0e 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java @@ -11,9 +11,9 @@ */ public class BusConnection extends ConnectivityNode { - public BusConnection(String id, String componentType, boolean connectedToBus) { + public BusConnection(String id, String componentType, boolean isDisconnected) { super(id, componentType); - this.disconnectedNode = connectedToBus; + this.disconnectedNode = isDisconnected; } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Internal2WTNode.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Internal2WTNode.java index 1c034a0f3..58d59a2c8 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Internal2WTNode.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Internal2WTNode.java @@ -9,14 +9,20 @@ import com.powsybl.sld.model.coordinate.Orientation; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * @author Florian Dupuy */ public class Internal2WTNode extends EquipmentNode { - public Internal2WTNode(String id, String nameOrId, String componentType) { + + Map connectionToBus; + + public Internal2WTNode(String id, String nameOrId, String componentType, Map connectionToBus) { super(NodeType.INTERNAL, id, nameOrId, id, componentType, false); + this.connectionToBus = new HashMap<>(connectionToBus); } @Override @@ -30,4 +36,8 @@ public void setOrientationFromBlock(Orientation blockOrientation, List blo } } } + + public boolean connectedToBus(String busId) { + return connectionToBus.get(busId); + } } diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java index 12dceeb95..9651f08c4 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java @@ -145,7 +145,7 @@ protected static VoltageLevelGraph createVoltageLevelGraph1() { vl1Trf2Two.setDirection(TOP); vl1Trf2Two.setX(440); vl1Trf2Two.setY(80); - Middle3WTNode vl1Trf2Fict = new Middle3WTNode("vl1_trf2", "vl1_trf2","vl1_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); + Middle3WTNode vl1Trf2Fict = new Middle3WTNode("vl1_trf2", "vl1_trf2", "vl1_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); vl1Trf2Fict.setX(400); vl1Trf2Fict.setY(140); g1.addNode(vl1Trf2Fict); From 27fe3223748177e4a7ee1e8cc9965d9a4f3a4b6e Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 30 May 2023 21:23:12 +0200 Subject: [PATCH 08/19] update existing test references Signed-off-by: Sophie Frasnedo --- .../resources/InternalBranchesBusBreaker.svg | 29 +-- .../resources/InternalBranchesNodeBreaker.svg | 19 +- .../NodeDecoratorsBranchStatusBusBreaker.svg | 35 ++-- .../NodeDecoratorsBranchStatusNodeBreaker.svg | 3 +- .../test/resources/NodeDecoratorsSwitches.svg | 19 +- .../resources/TestAllPossibleInfoItems.svg | 3 +- .../resources/TestAnimatedFeederInfos.svg | 3 +- .../src/test/resources/TestBatteries.svg | 7 +- .../src/test/resources/TestBatteriesRaw.svg | 1 + .../src/test/resources/TestCase1.svg | 3 +- .../test/resources/TestCase11FlatDesign.svg | 3 +- .../TestCase11SubstationGraphHFirst.svg | 3 +- .../TestCase11SubstationGraphHLast.svg | 3 +- .../TestCase11SubstationGraphHMiddle.svg | 3 +- .../TestCase11SubstationGraphHNone.svg | 3 +- .../test/resources/TestCase12GraphVL1.json | 182 +++++++++--------- .../test/resources/TestCase12GraphVL2.json | 182 +++++++++--------- .../test/resources/TestCase12GraphVL3.json | 182 +++++++++--------- ...ase12GraphWithNodesInfosNominalVoltage.svg | 27 ++- ...stCase12GraphWithNodesInfosTopological.svg | 27 ++- .../TestCase15GraphWithVoltageIndicator.svg | 1 + ...15GraphWithVoltageIndicatorTopological.svg | 1 + ...TestCase15GraphWithoutVoltageIndicator.svg | 1 + .../resources/TestCaseComplexCoupling.svg | 3 +- .../test/resources/TestCaseFictitiousBus.svg | 7 +- .../TestCaseFictitiousBusTopological.svg | 1 + .../TestCaseKeepFictitiousSwitchNode.svg | 3 +- .../resources/TestCaseLoadBreakSwitch.svg | 1 + .../TestCaseRemoveFictitiousSwitchNode.svg | 3 +- .../src/test/resources/TestCheese.svg | 3 +- .../TestComplexParallelLegsInternalPst.svg | 3 +- .../src/test/resources/TestFeederInfos.svg | 3 +- .../src/test/resources/TestFeederOnBus.svg | 1 + .../resources/TestFeederOnBusDisconnector.svg | 3 +- .../resources/TestFormattingFeederInfos.svg | 3 +- .../test/resources/TestSldClassSubstation.svg | 3 +- .../src/test/resources/TestSldClassVl.svg | 3 +- .../src/test/resources/TestUnknownLibrary.svg | 27 ++- .../src/test/resources/consecutive_shunts.svg | 7 +- .../src/test/resources/feederInfoTest.svg | 7 +- .../src/test/resources/label_on_all_nodes.svg | 3 +- .../src/test/resources/noComponentsOnBus.svg | 7 +- .../nominal_voltage_style_substation.svg | 3 +- .../resources/nominal_voltage_style_vl2.svg | 11 +- .../resources/nominal_voltage_style_vl3.svg | 11 +- .../src/test/resources/substation.svg | 3 +- .../substation_feeder_arrow_symmetry.svg | 3 +- .../resources/substation_no_feeder_values.svg | 3 +- .../test/resources/substation_optimized.svg | 3 +- .../src/test/resources/switchesOnBus.svg | 7 +- .../topological_style_substation.svg | 3 +- .../src/test/resources/vl1.svg | 3 +- .../test/resources/vl1_multiline_tooltip.svg | 3 +- .../src/test/resources/vl1_optimized.svg | 3 +- .../src/test/resources/vl1_straightWires.svg | 3 +- .../src/test/resources/vl1_tooltip.svg | 3 +- .../src/test/resources/vl2.svg | 3 +- .../src/test/resources/vl2_optimized.svg | 3 +- .../src/test/resources/vl3.svg | 3 +- .../src/test/resources/vl3_optimized.svg | 3 +- .../src/test/resources/vlDiag_metadata.json | 138 ++++++------- .../test/resources/with_frame_background.svg | 3 +- .../src/test/resources/zone.svg | 3 +- 63 files changed, 510 insertions(+), 539 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg index add7b25b3..694628b4d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} @@ -246,13 +247,13 @@ - + - + - + @@ -265,7 +266,7 @@ - + @@ -278,13 +279,13 @@ - + - + - + @@ -401,13 +402,13 @@ - + - + - + @@ -420,7 +421,7 @@ - + @@ -433,13 +434,13 @@ - + - + - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesNodeBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesNodeBreaker.svg index d069f1d14..d4aa4da9f 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesNodeBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesNodeBreaker.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -364,10 +363,10 @@ - + - + @@ -380,7 +379,7 @@ - + @@ -404,7 +403,7 @@ - + @@ -551,10 +550,10 @@ - + - + @@ -567,7 +566,7 @@ - + @@ -591,7 +590,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg index e6efe51b7..52de44be5 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +89,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ @@ -324,13 +325,13 @@ - + - + - + @@ -343,7 +344,7 @@ - + @@ -356,13 +357,13 @@ - + - + - + @@ -488,13 +489,13 @@ - + - + - + @@ -507,7 +508,7 @@ - + @@ -520,13 +521,13 @@ - + - + - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusNodeBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusNodeBreaker.svg index d55b79f53..54cbb782e 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusNodeBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusNodeBreaker.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsSwitches.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsSwitches.svg index c1ce155a2..1592c841c 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsSwitches.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsSwitches.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -403,10 +402,10 @@ - + - + @@ -419,7 +418,7 @@ - + @@ -449,7 +448,7 @@ - + @@ -614,10 +613,10 @@ - + - + @@ -630,7 +629,7 @@ - + @@ -660,7 +659,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestAllPossibleInfoItems.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestAllPossibleInfoItems.svg index 5fc1cfb3d..6bdeefa90 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestAllPossibleInfoItems.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestAllPossibleInfoItems.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestAnimatedFeederInfos.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestAnimatedFeederInfos.svg index 7e0ca40fc..771bf23da 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestAnimatedFeederInfos.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestAnimatedFeederInfos.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg index 96e124017..7fbb2791e 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +89,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteriesRaw.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteriesRaw.svg index 235d47822..7dcf0364d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteriesRaw.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteriesRaw.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* File : components.css ------------------------------------------------- */ .sld-disconnector.sld-open {stroke-width: 1.5; stroke: var(--sld-vl-color, black); fill: none} .sld-disconnector.sld-closed {fill: var(--sld-vl-color, black)} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase1.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase1.svg index 77dfa03de..8a09c5e2d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase1.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase1.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11FlatDesign.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11FlatDesign.svg index f5e34c106..119ae5881 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11FlatDesign.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11FlatDesign.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHFirst.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHFirst.svg index 0b8ddea7b..9da2a5714 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHFirst.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHFirst.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHLast.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHLast.svg index 7409fd953..67830b399 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHLast.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHLast.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHMiddle.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHMiddle.svg index f4e97f5e7..e8353290e 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHMiddle.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHMiddle.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHNone.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHNone.svg index 0b8ddea7b..9da2a5714 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHNone.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase11SubstationGraphHNone.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL1.json b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL1.json index a5e4c86d4..920531cfa 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL1.json +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL1.json @@ -194,6 +194,79 @@ "fictitious" : true, "x" : 360.0, "y" : 62.0 + }, { + "type" : "INTERNAL", + "id" : "MIDDLE_trf6_ONE", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "fictitious" : true, + "x" : 480.0, + "y" : 62.0, + "name" : "trf6", + "equipmentId" : "trf6", + "voltageLevelInfosLeg1" : { + "id" : "vl1", + "name" : "vl1", + "nominalVoltage" : 380.0 + }, + "voltageLevelInfosLeg2" : { + "id" : "vl2", + "name" : "vl2", + "nominalVoltage" : 225.0 + }, + "voltageLevelInfosLeg3" : { + "id" : "vl3", + "name" : "vl3", + "nominalVoltage" : 63.0 + } + }, { + "type" : "INTERNAL", + "id" : "MIDDLE_trf7_ONE", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "fictitious" : true, + "x" : 640.0, + "y" : 307.0, + "orientation" : "DOWN", + "name" : "trf7", + "equipmentId" : "trf7", + "voltageLevelInfosLeg1" : { + "id" : "vl1", + "name" : "vl1", + "nominalVoltage" : 380.0 + }, + "voltageLevelInfosLeg2" : { + "id" : "vl2", + "name" : "vl2", + "nominalVoltage" : 225.0 + }, + "voltageLevelInfosLeg3" : { + "id" : "vl3", + "name" : "vl3", + "nominalVoltage" : 63.0 + } + }, { + "type" : "INTERNAL", + "id" : "MIDDLE_trf8_ONE", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "fictitious" : true, + "x" : 960.0, + "y" : 62.0, + "name" : "trf8", + "equipmentId" : "trf8", + "voltageLevelInfosLeg1" : { + "id" : "vl1", + "name" : "vl1", + "nominalVoltage" : 380.0 + }, + "voltageLevelInfosLeg2" : { + "id" : "vl2", + "name" : "vl2", + "nominalVoltage" : 225.0 + }, + "voltageLevelInfosLeg3" : { + "id" : "vl3", + "name" : "vl3", + "nominalVoltage" : 63.0 + } }, { "type" : "BUS", "id" : "bbs1", @@ -763,30 +836,6 @@ "name" : "vl3", "nominalVoltage" : 63.0 } - }, { - "type" : "INTERNAL", - "id" : "trf6", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "fictitious" : true, - "x" : 480.0, - "y" : 62.0, - "name" : "trf6", - "equipmentId" : "trf6", - "voltageLevelInfosLeg1" : { - "id" : "vl1", - "name" : "vl1", - "nominalVoltage" : 380.0 - }, - "voltageLevelInfosLeg2" : { - "id" : "vl2", - "name" : "vl2", - "nominalVoltage" : 225.0 - }, - "voltageLevelInfosLeg3" : { - "id" : "vl3", - "name" : "vl3", - "nominalVoltage" : 63.0 - } }, { "type" : "FEEDER", "id" : "trf6_THREE", @@ -825,31 +874,6 @@ "name" : "vl2", "nominalVoltage" : 225.0 } - }, { - "type" : "INTERNAL", - "id" : "trf7", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "fictitious" : true, - "x" : 640.0, - "y" : 307.0, - "orientation" : "DOWN", - "name" : "trf7", - "equipmentId" : "trf7", - "voltageLevelInfosLeg1" : { - "id" : "vl1", - "name" : "vl1", - "nominalVoltage" : 380.0 - }, - "voltageLevelInfosLeg2" : { - "id" : "vl2", - "name" : "vl2", - "nominalVoltage" : 225.0 - }, - "voltageLevelInfosLeg3" : { - "id" : "vl3", - "name" : "vl3", - "nominalVoltage" : 63.0 - } }, { "type" : "FEEDER", "id" : "trf7_THREE", @@ -890,30 +914,6 @@ "name" : "vl2", "nominalVoltage" : 225.0 } - }, { - "type" : "INTERNAL", - "id" : "trf8", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "fictitious" : true, - "x" : 960.0, - "y" : 62.0, - "name" : "trf8", - "equipmentId" : "trf8", - "voltageLevelInfosLeg1" : { - "id" : "vl1", - "name" : "vl1", - "nominalVoltage" : 380.0 - }, - "voltageLevelInfosLeg2" : { - "id" : "vl2", - "name" : "vl2", - "nominalVoltage" : 225.0 - }, - "voltageLevelInfosLeg3" : { - "id" : "vl3", - "name" : "vl3", - "nominalVoltage" : 63.0 - } }, { "type" : "FEEDER", "id" : "trf8_THREE", @@ -1467,7 +1467,7 @@ "xSpan" : 160.0, "ySpan" : 80.0 }, - "nodes" : [ "INTERNAL_vl1_dtrf16-btrf16", "btrf16", "trf6" ] + "nodes" : [ "INTERNAL_vl1_dtrf16-btrf16", "btrf16", "MIDDLE_trf6_ONE" ] }, { "type" : "BODYPARALLEL", "cardinalities" : [ { @@ -1508,7 +1508,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf6", "trf6_TWO" ] + "nodes" : [ "MIDDLE_trf6_ONE", "trf6_TWO" ] }, { "type" : "FEEDERPRIMARY", "cardinalities" : [ { @@ -1529,7 +1529,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf6", "trf6_THREE" ] + "nodes" : [ "MIDDLE_trf6_ONE", "trf6_THREE" ] } ] } ] } @@ -1779,7 +1779,7 @@ "xSpan" : 160.0, "ySpan" : 80.0 }, - "nodes" : [ "INTERNAL_vl1_dtrf18-btrf18", "btrf18", "trf8" ] + "nodes" : [ "INTERNAL_vl1_dtrf18-btrf18", "btrf18", "MIDDLE_trf8_ONE" ] }, { "type" : "BODYPARALLEL", "cardinalities" : [ { @@ -1820,7 +1820,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf8", "trf8_TWO" ] + "nodes" : [ "MIDDLE_trf8_ONE", "trf8_TWO" ] }, { "type" : "FEEDERPRIMARY", "cardinalities" : [ { @@ -1841,7 +1841,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf8", "trf8_THREE" ] + "nodes" : [ "MIDDLE_trf8_ONE", "trf8_THREE" ] } ] } ] } @@ -2091,7 +2091,7 @@ "xSpan" : 160.0, "ySpan" : 80.0 }, - "nodes" : [ "INTERNAL_vl1_dtrf17-btrf17", "btrf17", "trf7" ] + "nodes" : [ "INTERNAL_vl1_dtrf17-btrf17", "btrf17", "MIDDLE_trf7_ONE" ] }, { "type" : "BODYPARALLEL", "cardinalities" : [ { @@ -2132,7 +2132,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf7", "trf7_TWO" ] + "nodes" : [ "MIDDLE_trf7_ONE", "trf7_TWO" ] }, { "type" : "FEEDERPRIMARY", "cardinalities" : [ { @@ -2153,7 +2153,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf7", "trf7_THREE" ] + "nodes" : [ "MIDDLE_trf7_ONE", "trf7_THREE" ] } ] } ] } @@ -2340,22 +2340,22 @@ } ], "edges" : [ { "node1" : "trf6_TWO", - "node2" : "trf6" + "node2" : "MIDDLE_trf6_ONE" }, { "node1" : "trf6_THREE", - "node2" : "trf6" + "node2" : "MIDDLE_trf6_ONE" }, { "node1" : "trf7_TWO", - "node2" : "trf7" + "node2" : "MIDDLE_trf7_ONE" }, { "node1" : "trf7_THREE", - "node2" : "trf7" + "node2" : "MIDDLE_trf7_ONE" }, { "node1" : "trf8_TWO", - "node2" : "trf8" + "node2" : "MIDDLE_trf8_ONE" }, { "node1" : "trf8_THREE", - "node2" : "trf8" + "node2" : "MIDDLE_trf8_ONE" }, { "node1" : "bbs1", "node2" : "dsect11" @@ -2400,19 +2400,19 @@ "node2" : "dtrf16" }, { "node1" : "btrf16", - "node2" : "trf6" + "node2" : "MIDDLE_trf6_ONE" }, { "node1" : "bbs3", "node2" : "dtrf17" }, { "node1" : "btrf17", - "node2" : "trf7" + "node2" : "MIDDLE_trf7_ONE" }, { "node1" : "bbs2", "node2" : "dtrf18" }, { "node1" : "btrf18", - "node2" : "trf8" + "node2" : "MIDDLE_trf8_ONE" }, { "node1" : "dsect11", "node2" : "INTERNAL_vl1_dsect11-dtrct11" diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL2.json b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL2.json index fe0794f9f..7687143a6 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL2.json +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL2.json @@ -132,6 +132,79 @@ "fictitious" : true, "x" : 440.0, "y" : 62.0 + }, { + "type" : "INTERNAL", + "id" : "MIDDLE_trf6_TWO", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "fictitious" : true, + "x" : 720.0, + "y" : 62.0, + "name" : "trf6", + "equipmentId" : "trf6", + "voltageLevelInfosLeg1" : { + "id" : "vl1", + "name" : "vl1", + "nominalVoltage" : 380.0 + }, + "voltageLevelInfosLeg2" : { + "id" : "vl2", + "name" : "vl2", + "nominalVoltage" : 225.0 + }, + "voltageLevelInfosLeg3" : { + "id" : "vl3", + "name" : "vl3", + "nominalVoltage" : 63.0 + } + }, { + "type" : "INTERNAL", + "id" : "MIDDLE_trf7_TWO", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "fictitious" : true, + "x" : 560.0, + "y" : 62.0, + "name" : "trf7", + "equipmentId" : "trf7", + "voltageLevelInfosLeg1" : { + "id" : "vl1", + "name" : "vl1", + "nominalVoltage" : 380.0 + }, + "voltageLevelInfosLeg2" : { + "id" : "vl2", + "name" : "vl2", + "nominalVoltage" : 225.0 + }, + "voltageLevelInfosLeg3" : { + "id" : "vl3", + "name" : "vl3", + "nominalVoltage" : 63.0 + } + }, { + "type" : "INTERNAL", + "id" : "MIDDLE_trf8_TWO", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "fictitious" : true, + "x" : 880.0, + "y" : 307.0, + "orientation" : "DOWN", + "name" : "trf8", + "equipmentId" : "trf8", + "voltageLevelInfosLeg1" : { + "id" : "vl1", + "name" : "vl1", + "nominalVoltage" : 380.0 + }, + "voltageLevelInfosLeg2" : { + "id" : "vl2", + "name" : "vl2", + "nominalVoltage" : 225.0 + }, + "voltageLevelInfosLeg3" : { + "id" : "vl3", + "name" : "vl3", + "nominalVoltage" : 63.0 + } }, { "type" : "BUS", "id" : "bbs5", @@ -513,30 +586,6 @@ "name" : "vl1", "nominalVoltage" : 380.0 } - }, { - "type" : "INTERNAL", - "id" : "trf6", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "fictitious" : true, - "x" : 720.0, - "y" : 62.0, - "name" : "trf6", - "equipmentId" : "trf6", - "voltageLevelInfosLeg1" : { - "id" : "vl1", - "name" : "vl1", - "nominalVoltage" : 380.0 - }, - "voltageLevelInfosLeg2" : { - "id" : "vl2", - "name" : "vl2", - "nominalVoltage" : 225.0 - }, - "voltageLevelInfosLeg3" : { - "id" : "vl3", - "name" : "vl3", - "nominalVoltage" : 63.0 - } }, { "type" : "FEEDER", "id" : "trf6_ONE", @@ -575,30 +624,6 @@ "name" : "vl3", "nominalVoltage" : 63.0 } - }, { - "type" : "INTERNAL", - "id" : "trf7", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "fictitious" : true, - "x" : 560.0, - "y" : 62.0, - "name" : "trf7", - "equipmentId" : "trf7", - "voltageLevelInfosLeg1" : { - "id" : "vl1", - "name" : "vl1", - "nominalVoltage" : 380.0 - }, - "voltageLevelInfosLeg2" : { - "id" : "vl2", - "name" : "vl2", - "nominalVoltage" : 225.0 - }, - "voltageLevelInfosLeg3" : { - "id" : "vl3", - "name" : "vl3", - "nominalVoltage" : 63.0 - } }, { "type" : "FEEDER", "id" : "trf7_ONE", @@ -637,31 +662,6 @@ "name" : "vl3", "nominalVoltage" : 63.0 } - }, { - "type" : "INTERNAL", - "id" : "trf8", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "fictitious" : true, - "x" : 880.0, - "y" : 307.0, - "orientation" : "DOWN", - "name" : "trf8", - "equipmentId" : "trf8", - "voltageLevelInfosLeg1" : { - "id" : "vl1", - "name" : "vl1", - "nominalVoltage" : 380.0 - }, - "voltageLevelInfosLeg2" : { - "id" : "vl2", - "name" : "vl2", - "nominalVoltage" : 225.0 - }, - "voltageLevelInfosLeg3" : { - "id" : "vl3", - "name" : "vl3", - "nominalVoltage" : 63.0 - } }, { "type" : "FEEDER", "id" : "trf8_ONE", @@ -1127,7 +1127,7 @@ "xSpan" : 160.0, "ySpan" : 80.0 }, - "nodes" : [ "INTERNAL_vl2_dtrf27-btrf27", "btrf27", "trf7" ] + "nodes" : [ "INTERNAL_vl2_dtrf27-btrf27", "btrf27", "MIDDLE_trf7_TWO" ] }, { "type" : "BODYPARALLEL", "cardinalities" : [ { @@ -1168,7 +1168,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf7", "trf7_ONE" ] + "nodes" : [ "MIDDLE_trf7_TWO", "trf7_ONE" ] }, { "type" : "FEEDERPRIMARY", "cardinalities" : [ { @@ -1189,7 +1189,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf7", "trf7_THREE" ] + "nodes" : [ "MIDDLE_trf7_TWO", "trf7_THREE" ] } ] } ] } @@ -1529,7 +1529,7 @@ "xSpan" : 160.0, "ySpan" : 80.0 }, - "nodes" : [ "INTERNAL_vl2_dtrf26-btrf26", "btrf26", "trf6" ] + "nodes" : [ "INTERNAL_vl2_dtrf26-btrf26", "btrf26", "MIDDLE_trf6_TWO" ] }, { "type" : "BODYPARALLEL", "cardinalities" : [ { @@ -1570,7 +1570,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf6", "trf6_ONE" ] + "nodes" : [ "MIDDLE_trf6_TWO", "trf6_ONE" ] }, { "type" : "FEEDERPRIMARY", "cardinalities" : [ { @@ -1591,7 +1591,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf6", "trf6_THREE" ] + "nodes" : [ "MIDDLE_trf6_TWO", "trf6_THREE" ] } ] } ] } @@ -1661,7 +1661,7 @@ "xSpan" : 160.0, "ySpan" : 80.0 }, - "nodes" : [ "INTERNAL_vl2_dtrf28-btrf28", "btrf28", "trf8" ] + "nodes" : [ "INTERNAL_vl2_dtrf28-btrf28", "btrf28", "MIDDLE_trf8_TWO" ] }, { "type" : "BODYPARALLEL", "cardinalities" : [ { @@ -1702,7 +1702,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf8", "trf8_ONE" ] + "nodes" : [ "MIDDLE_trf8_TWO", "trf8_ONE" ] }, { "type" : "FEEDERPRIMARY", "cardinalities" : [ { @@ -1723,29 +1723,29 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf8", "trf8_THREE" ] + "nodes" : [ "MIDDLE_trf8_TWO", "trf8_THREE" ] } ] } ] } } ], "edges" : [ { "node1" : "trf6_ONE", - "node2" : "trf6" + "node2" : "MIDDLE_trf6_TWO" }, { "node1" : "trf6_THREE", - "node2" : "trf6" + "node2" : "MIDDLE_trf6_TWO" }, { "node1" : "trf7_ONE", - "node2" : "trf7" + "node2" : "MIDDLE_trf7_TWO" }, { "node1" : "trf7_THREE", - "node2" : "trf7" + "node2" : "MIDDLE_trf7_TWO" }, { "node1" : "trf8_ONE", - "node2" : "trf8" + "node2" : "MIDDLE_trf8_TWO" }, { "node1" : "trf8_THREE", - "node2" : "trf8" + "node2" : "MIDDLE_trf8_TWO" }, { "node1" : "bbs5", "node2" : "dscpl1" @@ -1775,19 +1775,19 @@ "node2" : "dtrf26" }, { "node1" : "btrf26", - "node2" : "trf6" + "node2" : "MIDDLE_trf6_TWO" }, { "node1" : "bbs5", "node2" : "dtrf27" }, { "node1" : "btrf27", - "node2" : "trf7" + "node2" : "MIDDLE_trf7_TWO" }, { "node1" : "bbs6", "node2" : "dtrf28" }, { "node1" : "btrf28", - "node2" : "trf8" + "node2" : "MIDDLE_trf8_TWO" }, { "node1" : "dscpl1", "node2" : "INTERNAL_vl2_dscpl1-ddcpl1" diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL3.json b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL3.json index c73c783ba..2a8b5d559 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL3.json +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphVL3.json @@ -106,6 +106,79 @@ "x" : 200.0, "y" : 282.0, "orientation" : "DOWN" + }, { + "type" : "INTERNAL", + "id" : "MIDDLE_trf6_THREE", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "fictitious" : true, + "x" : 320.0, + "y" : 62.0, + "name" : "trf6", + "equipmentId" : "trf6", + "voltageLevelInfosLeg1" : { + "id" : "vl1", + "name" : "vl1", + "nominalVoltage" : 380.0 + }, + "voltageLevelInfosLeg2" : { + "id" : "vl2", + "name" : "vl2", + "nominalVoltage" : 225.0 + }, + "voltageLevelInfosLeg3" : { + "id" : "vl3", + "name" : "vl3", + "nominalVoltage" : 63.0 + } + }, { + "type" : "INTERNAL", + "id" : "MIDDLE_trf7_THREE", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "fictitious" : true, + "x" : 480.0, + "y" : 282.0, + "orientation" : "DOWN", + "name" : "trf7", + "equipmentId" : "trf7", + "voltageLevelInfosLeg1" : { + "id" : "vl1", + "name" : "vl1", + "nominalVoltage" : 380.0 + }, + "voltageLevelInfosLeg2" : { + "id" : "vl2", + "name" : "vl2", + "nominalVoltage" : 225.0 + }, + "voltageLevelInfosLeg3" : { + "id" : "vl3", + "name" : "vl3", + "nominalVoltage" : 63.0 + } + }, { + "type" : "INTERNAL", + "id" : "MIDDLE_trf8_THREE", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "fictitious" : true, + "x" : 640.0, + "y" : 62.0, + "name" : "trf8", + "equipmentId" : "trf8", + "voltageLevelInfosLeg1" : { + "id" : "vl1", + "name" : "vl1", + "nominalVoltage" : 380.0 + }, + "voltageLevelInfosLeg2" : { + "id" : "vl2", + "name" : "vl2", + "nominalVoltage" : 225.0 + }, + "voltageLevelInfosLeg3" : { + "id" : "vl3", + "name" : "vl3", + "nominalVoltage" : 63.0 + } }, { "type" : "BUS", "id" : "bbs7", @@ -403,30 +476,6 @@ "name" : "vl1", "nominalVoltage" : 380.0 } - }, { - "type" : "INTERNAL", - "id" : "trf6", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "fictitious" : true, - "x" : 320.0, - "y" : 62.0, - "name" : "trf6", - "equipmentId" : "trf6", - "voltageLevelInfosLeg1" : { - "id" : "vl1", - "name" : "vl1", - "nominalVoltage" : 380.0 - }, - "voltageLevelInfosLeg2" : { - "id" : "vl2", - "name" : "vl2", - "nominalVoltage" : 225.0 - }, - "voltageLevelInfosLeg3" : { - "id" : "vl3", - "name" : "vl3", - "nominalVoltage" : 63.0 - } }, { "type" : "FEEDER", "id" : "trf6_ONE", @@ -465,31 +514,6 @@ "name" : "vl2", "nominalVoltage" : 225.0 } - }, { - "type" : "INTERNAL", - "id" : "trf7", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "fictitious" : true, - "x" : 480.0, - "y" : 282.0, - "orientation" : "DOWN", - "name" : "trf7", - "equipmentId" : "trf7", - "voltageLevelInfosLeg1" : { - "id" : "vl1", - "name" : "vl1", - "nominalVoltage" : 380.0 - }, - "voltageLevelInfosLeg2" : { - "id" : "vl2", - "name" : "vl2", - "nominalVoltage" : 225.0 - }, - "voltageLevelInfosLeg3" : { - "id" : "vl3", - "name" : "vl3", - "nominalVoltage" : 63.0 - } }, { "type" : "FEEDER", "id" : "trf7_ONE", @@ -530,30 +554,6 @@ "name" : "vl2", "nominalVoltage" : 225.0 } - }, { - "type" : "INTERNAL", - "id" : "trf8", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "fictitious" : true, - "x" : 640.0, - "y" : 62.0, - "name" : "trf8", - "equipmentId" : "trf8", - "voltageLevelInfosLeg1" : { - "id" : "vl1", - "name" : "vl1", - "nominalVoltage" : 380.0 - }, - "voltageLevelInfosLeg2" : { - "id" : "vl2", - "name" : "vl2", - "nominalVoltage" : 225.0 - }, - "voltageLevelInfosLeg3" : { - "id" : "vl3", - "name" : "vl3", - "nominalVoltage" : 63.0 - } }, { "type" : "FEEDER", "id" : "trf8_ONE", @@ -929,7 +929,7 @@ "xSpan" : 160.0, "ySpan" : 80.0 }, - "nodes" : [ "INTERNAL_vl3_dtrf36-btrf36", "btrf36", "trf6" ] + "nodes" : [ "INTERNAL_vl3_dtrf36-btrf36", "btrf36", "MIDDLE_trf6_THREE" ] }, { "type" : "BODYPARALLEL", "cardinalities" : [ { @@ -970,7 +970,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf6", "trf6_ONE" ] + "nodes" : [ "MIDDLE_trf6_THREE", "trf6_ONE" ] }, { "type" : "FEEDERPRIMARY", "cardinalities" : [ { @@ -991,7 +991,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf6", "trf6_TWO" ] + "nodes" : [ "MIDDLE_trf6_THREE", "trf6_TWO" ] } ] } ] } @@ -1061,7 +1061,7 @@ "xSpan" : 160.0, "ySpan" : 80.0 }, - "nodes" : [ "INTERNAL_vl3_dtrf37-btrf37", "btrf37", "trf7" ] + "nodes" : [ "INTERNAL_vl3_dtrf37-btrf37", "btrf37", "MIDDLE_trf7_THREE" ] }, { "type" : "BODYPARALLEL", "cardinalities" : [ { @@ -1102,7 +1102,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf7", "trf7_ONE" ] + "nodes" : [ "MIDDLE_trf7_THREE", "trf7_ONE" ] }, { "type" : "FEEDERPRIMARY", "cardinalities" : [ { @@ -1123,7 +1123,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf7", "trf7_TWO" ] + "nodes" : [ "MIDDLE_trf7_THREE", "trf7_TWO" ] } ] } ] } @@ -1193,7 +1193,7 @@ "xSpan" : 160.0, "ySpan" : 80.0 }, - "nodes" : [ "INTERNAL_vl3_dtrf38-btrf38", "btrf38", "trf8" ] + "nodes" : [ "INTERNAL_vl3_dtrf38-btrf38", "btrf38", "MIDDLE_trf8_THREE" ] }, { "type" : "BODYPARALLEL", "cardinalities" : [ { @@ -1234,7 +1234,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf8", "trf8_ONE" ] + "nodes" : [ "MIDDLE_trf8_THREE", "trf8_ONE" ] }, { "type" : "FEEDERPRIMARY", "cardinalities" : [ { @@ -1255,7 +1255,7 @@ "xSpan" : 80.0, "ySpan" : 0.0 }, - "nodes" : [ "trf8", "trf8_TWO" ] + "nodes" : [ "MIDDLE_trf8_THREE", "trf8_TWO" ] } ] } ] } @@ -1442,22 +1442,22 @@ } ], "edges" : [ { "node1" : "trf6_ONE", - "node2" : "trf6" + "node2" : "MIDDLE_trf6_THREE" }, { "node1" : "trf6_TWO", - "node2" : "trf6" + "node2" : "MIDDLE_trf6_THREE" }, { "node1" : "trf7_ONE", - "node2" : "trf7" + "node2" : "MIDDLE_trf7_THREE" }, { "node1" : "trf7_TWO", - "node2" : "trf7" + "node2" : "MIDDLE_trf7_THREE" }, { "node1" : "trf8_ONE", - "node2" : "trf8" + "node2" : "MIDDLE_trf8_THREE" }, { "node1" : "trf8_TWO", - "node2" : "trf8" + "node2" : "MIDDLE_trf8_THREE" }, { "node1" : "bbs7", "node2" : "dload4" @@ -1472,19 +1472,19 @@ "node2" : "dtrf36" }, { "node1" : "btrf36", - "node2" : "trf6" + "node2" : "MIDDLE_trf6_THREE" }, { "node1" : "bbs7", "node2" : "dtrf37" }, { "node1" : "btrf37", - "node2" : "trf7" + "node2" : "MIDDLE_trf7_THREE" }, { "node1" : "bbs7", "node2" : "dtrf38" }, { "node1" : "btrf38", - "node2" : "trf8" + "node2" : "MIDDLE_trf8_THREE" }, { "node1" : "bbs7", "node2" : "dself5" diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosNominalVoltage.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosNominalVoltage.svg index 2dc156dee..3ec87ee5d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosNominalVoltage.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosNominalVoltage.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} @@ -293,10 +292,10 @@ - + - + @@ -309,7 +308,7 @@ - + @@ -333,7 +332,7 @@ - + @@ -439,10 +438,10 @@ - + - + @@ -455,7 +454,7 @@ - + @@ -479,7 +478,7 @@ - + @@ -585,10 +584,10 @@ - + - + @@ -601,7 +600,7 @@ - + @@ -625,7 +624,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosTopological.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosTopological.svg index b8f926088..919437876 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosTopological.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12GraphWithNodesInfosTopological.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -357,10 +356,10 @@ - + - + @@ -373,7 +372,7 @@ - + @@ -397,7 +396,7 @@ - + @@ -503,10 +502,10 @@ - + - + @@ -519,7 +518,7 @@ - + @@ -543,7 +542,7 @@ - + @@ -649,10 +648,10 @@ - + - + @@ -665,7 +664,7 @@ - + @@ -689,7 +688,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithVoltageIndicator.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithVoltageIndicator.svg index aec3f7ef4..401f71911 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithVoltageIndicator.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithVoltageIndicator.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithVoltageIndicatorTopological.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithVoltageIndicatorTopological.svg index e8c820bd5..770e72585 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithVoltageIndicatorTopological.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithVoltageIndicatorTopological.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithoutVoltageIndicator.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithoutVoltageIndicator.svg index 7bfb64a41..c656f5026 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithoutVoltageIndicator.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase15GraphWithoutVoltageIndicator.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseComplexCoupling.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseComplexCoupling.svg index 0cdacd878..d6854948a 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseComplexCoupling.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseComplexCoupling.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseFictitiousBus.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseFictitiousBus.svg index 4f590f73f..2da74778d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseFictitiousBus.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseFictitiousBus.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +89,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseFictitiousBusTopological.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseFictitiousBusTopological.svg index 684299de4..4ab6017b1 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseFictitiousBusTopological.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseFictitiousBusTopological.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseKeepFictitiousSwitchNode.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseKeepFictitiousSwitchNode.svg index b4bd901e3..1c9e786fa 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseKeepFictitiousSwitchNode.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseKeepFictitiousSwitchNode.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg index fdf7a5c2f..d64cf0b9c 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseRemoveFictitiousSwitchNode.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseRemoveFictitiousSwitchNode.svg index 9a33115aa..1ec9a1065 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseRemoveFictitiousSwitchNode.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseRemoveFictitiousSwitchNode.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCheese.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCheese.svg index 59f2626c7..a5284b5a1 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCheese.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCheese.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestComplexParallelLegsInternalPst.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestComplexParallelLegsInternalPst.svg index c93299b96..bed67f483 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestComplexParallelLegsInternalPst.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestComplexParallelLegsInternalPst.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederInfos.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederInfos.svg index 29a047dbb..91296a888 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederInfos.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederInfos.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBus.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBus.svg index 3fee5b941..1328803df 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBus.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBus.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBusDisconnector.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBusDisconnector.svg index f17e05422..c906b2083 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBusDisconnector.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFeederOnBusDisconnector.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg index 81f67f356..292f5f443 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassSubstation.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassSubstation.svg index c1fc8dc71..407942f83 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassSubstation.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassSubstation.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassVl.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassVl.svg index f843f77ab..48a098593 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassVl.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestSldClassVl.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestUnknownLibrary.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestUnknownLibrary.svg index aad2a6469..6511b6a48 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestUnknownLibrary.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestUnknownLibrary.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -346,10 +345,10 @@ - + - + @@ -362,7 +361,7 @@ - + @@ -386,7 +385,7 @@ - + @@ -530,10 +529,10 @@ - + - + @@ -546,7 +545,7 @@ - + @@ -570,7 +569,7 @@ - + @@ -671,10 +670,10 @@ - + - + @@ -687,7 +686,7 @@ - + @@ -711,7 +710,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/consecutive_shunts.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/consecutive_shunts.svg index 8fa92f26f..70c406a8a 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/consecutive_shunts.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/consecutive_shunts.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +89,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/feederInfoTest.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/feederInfoTest.svg index 258e0fb7f..b8590996b 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/feederInfoTest.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/feederInfoTest.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +89,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/label_on_all_nodes.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/label_on_all_nodes.svg index 9483a59c7..5624ff269 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/label_on_all_nodes.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/label_on_all_nodes.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/noComponentsOnBus.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/noComponentsOnBus.svg index f10ed957d..c82cf8f12 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/noComponentsOnBus.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/noComponentsOnBus.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +89,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_substation.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_substation.svg index fe790617a..8041ac2fa 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_substation.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_substation.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl2.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl2.svg index 93fe146da..e4cc4b4df 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl2.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl2.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} @@ -125,13 +124,13 @@ - + - + - + @@ -145,7 +144,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl3.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl3.svg index 8ce2d0d7c..cb65f1cf1 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl3.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/nominal_voltage_style_vl3.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} @@ -92,13 +91,13 @@ - + - + - + @@ -112,7 +111,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/substation.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/substation.svg index 03e20bca7..a9d9da1f9 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/substation.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/substation.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_feeder_arrow_symmetry.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_feeder_arrow_symmetry.svg index db10c5ddb..15bae761a 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_feeder_arrow_symmetry.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_feeder_arrow_symmetry.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_no_feeder_values.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_no_feeder_values.svg index 82ffade9d..dedb5a907 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_no_feeder_values.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_no_feeder_values.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_optimized.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_optimized.svg index 658305cd8..0bc1f4d2f 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/substation_optimized.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/substation_optimized.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/switchesOnBus.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/switchesOnBus.svg index b763e106c..f062f38d7 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/switchesOnBus.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/switchesOnBus.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -88,9 +89,9 @@ .sld-vl0to30-9 {--sld-vl-color: #869D22} /* ----------------------------------------------------------------------- */ /* File : highlightLineStates.css ---------------------------------------- */ -.sld-feeder-disconnected {stroke: black} -.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} -.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected {stroke: black} +.sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3} +.sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/topological_style_substation.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/topological_style_substation.svg index 7be9c79de..f3da17b94 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/topological_style_substation.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/topological_style_substation.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1.svg index c6a5da771..fa6fca7bd 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_multiline_tooltip.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_multiline_tooltip.svg index 116b52efc..997b923ae 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_multiline_tooltip.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_multiline_tooltip.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_optimized.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_optimized.svg index 4a5187a86..5738f958b 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_optimized.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_optimized.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_straightWires.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_straightWires.svg index e8b261532..538df4e21 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_straightWires.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_straightWires.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_tooltip.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_tooltip.svg index 01e33a981..740e2be41 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_tooltip.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl1_tooltip.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl2.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl2.svg index 280fc51a6..2705058b5 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl2.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl2.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl2_optimized.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl2_optimized.svg index ca6ec4fca..31d2889b8 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl2_optimized.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl2_optimized.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl3.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl3.svg index 0e8d11c41..ba1623a24 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl3.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl3.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vl3_optimized.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/vl3_optimized.svg index 51e22f51d..6af1de70d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vl3_optimized.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vl3_optimized.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/vlDiag_metadata.json b/single-line-diagram/single-line-diagram-core/src/test/resources/vlDiag_metadata.json index 9afb3d18a..359886e64 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/vlDiag_metadata.json +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/vlDiag_metadata.json @@ -464,6 +464,14 @@ "id" : "trf6_THREE_N_LABEL", "positionName" : "N_LABEL" } ] + }, { + "id" : "idMIDDLE_95_trf6_95_ONE", + "vid" : "vl1", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "open" : false, + "vlabel" : false, + "equipmentId" : "trf6", + "labels" : [ ] }, { "id" : "idtrf1_95_ONE", "vid" : "vl1", @@ -511,6 +519,22 @@ "vlabel" : false, "equipmentId" : "dtrf18", "labels" : [ ] + }, { + "id" : "idMIDDLE_95_trf8_95_ONE", + "vid" : "vl1", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "open" : false, + "vlabel" : false, + "equipmentId" : "trf8", + "labels" : [ ] + }, { + "id" : "idMIDDLE_95_trf7_95_ONE", + "vid" : "vl1", + "componentType" : "THREE_WINDINGS_TRANSFORMER", + "open" : false, + "vlabel" : false, + "equipmentId" : "trf7", + "labels" : [ ] }, { "id" : "idINTERNAL_95_vl1_95_load1", "vid" : "vl1", @@ -594,14 +618,6 @@ "open" : false, "vlabel" : false, "labels" : [ ] - }, { - "id" : "idtrf6", - "vid" : "vl1", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "open" : false, - "vlabel" : false, - "equipmentId" : "trf6", - "labels" : [ ] }, { "id" : "iddgen1", "vid" : "vl1", @@ -610,22 +626,6 @@ "vlabel" : false, "equipmentId" : "dgen1", "labels" : [ ] - }, { - "id" : "idtrf7", - "vid" : "vl1", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "open" : false, - "vlabel" : false, - "equipmentId" : "trf7", - "labels" : [ ] - }, { - "id" : "idtrf8", - "vid" : "vl1", - "componentType" : "THREE_WINDINGS_TRANSFORMER", - "open" : false, - "vlabel" : false, - "equipmentId" : "trf8", - "labels" : [ ] }, { "id" : "iddgen2", "vid" : "vl1", @@ -855,18 +855,18 @@ "nodeId2" : "idbtrf15", "straight" : false, "snakeLine" : false - }, { - "id" : "_95_vl1_95_trf6_95_THREE_95_trf6", - "nodeId1" : "idtrf6_95_THREE", - "nodeId2" : "idtrf6", - "straight" : false, - "snakeLine" : false }, { "id" : "_95_vl1_95_btrf13_95_INTERNAL_95_vl1_95_trf3_95_ONE", "nodeId1" : "idbtrf13", "nodeId2" : "idINTERNAL_95_vl1_95_trf3_95_ONE", "straight" : false, "snakeLine" : false + }, { + "id" : "_95_vl1_95_trf8_95_TWO_95_MIDDLE_95_trf8_95_ONE", + "nodeId1" : "idtrf8_95_TWO", + "nodeId2" : "idMIDDLE_95_trf8_95_ONE", + "straight" : false, + "snakeLine" : false }, { "id" : "_95_vl1_95_dtrf12_95_INTERNAL_95_vl1_95_dtrf12_45_btrf12", "nodeId1" : "iddtrf12", @@ -898,9 +898,9 @@ "straight" : false, "snakeLine" : false }, { - "id" : "_95_vl1_95_trf6_95_TWO_95_trf6", - "nodeId1" : "idtrf6_95_TWO", - "nodeId2" : "idtrf6", + "id" : "_95_vl1_95_trf6_95_THREE_95_MIDDLE_95_trf6_95_ONE", + "nodeId1" : "idtrf6_95_THREE", + "nodeId2" : "idMIDDLE_95_trf6_95_ONE", "straight" : false, "snakeLine" : false }, { @@ -939,12 +939,6 @@ "nodeId2" : "idINTERNAL_95_vl1_95_dtrf16_45_btrf16", "straight" : false, "snakeLine" : false - }, { - "id" : "_95_vl1_95_btrf17_95_trf7", - "nodeId1" : "idbtrf17", - "nodeId2" : "idtrf7", - "straight" : false, - "snakeLine" : false }, { "id" : "_95_vl1_95_bbs1_95_dsect11", "nodeId1" : "idbbs1", @@ -957,12 +951,6 @@ "nodeId2" : "idbgen1", "straight" : false, "snakeLine" : false - }, { - "id" : "_95_vl1_95_trf8_95_THREE_95_trf8", - "nodeId1" : "idtrf8_95_THREE", - "nodeId2" : "idtrf8", - "straight" : false, - "snakeLine" : false }, { "id" : "_95_vl1_95_dsect11_95_INTERNAL_95_vl1_95_dsect11_45_dtrct11", "nodeId1" : "iddsect11", @@ -1035,6 +1023,12 @@ "nodeId2" : "iddgen1", "straight" : false, "snakeLine" : false + }, { + "id" : "_95_vl1_95_btrf17_95_MIDDLE_95_trf7_95_ONE", + "nodeId1" : "idbtrf17", + "nodeId2" : "idMIDDLE_95_trf7_95_ONE", + "straight" : false, + "snakeLine" : false }, { "id" : "_95_vl1_95_bbs4_95_dtrf14", "nodeId1" : "idbbs4", @@ -1059,6 +1053,12 @@ "nodeId2" : "idbgen1", "straight" : false, "snakeLine" : false + }, { + "id" : "_95_vl1_95_trf8_95_THREE_95_MIDDLE_95_trf8_95_ONE", + "nodeId1" : "idtrf8_95_THREE", + "nodeId2" : "idMIDDLE_95_trf8_95_ONE", + "straight" : false, + "snakeLine" : false }, { "id" : "_95_vl1_95_INTERNAL_95_vl1_95_trf1_95_ONE_95_trf1_95_ONE", "nodeId1" : "idINTERNAL_95_vl1_95_trf1_95_ONE", @@ -1138,9 +1138,9 @@ "straight" : false, "snakeLine" : false }, { - "id" : "_95_vl1_95_btrf18_95_trf8", - "nodeId1" : "idbtrf18", - "nodeId2" : "idtrf8", + "id" : "_95_vl1_95_trf7_95_TWO_95_MIDDLE_95_trf7_95_ONE", + "nodeId1" : "idtrf7_95_TWO", + "nodeId2" : "idMIDDLE_95_trf7_95_ONE", "straight" : false, "snakeLine" : false }, { @@ -1185,18 +1185,18 @@ "nodeId2" : "idINTERNAL_95_vl1_95_dload2_45_bload2", "straight" : false, "snakeLine" : false - }, { - "id" : "_95_vl1_95_trf7_95_TWO_95_trf7", - "nodeId1" : "idtrf7_95_TWO", - "nodeId2" : "idtrf7", - "straight" : false, - "snakeLine" : false }, { "id" : "_95_vl1_95_INTERNAL_95_vl1_95_load1_95_bload1", "nodeId1" : "idINTERNAL_95_vl1_95_load1", "nodeId2" : "idbload1", "straight" : false, "snakeLine" : false + }, { + "id" : "_95_vl1_95_btrf16_95_MIDDLE_95_trf6_95_ONE", + "nodeId1" : "idbtrf16", + "nodeId2" : "idMIDDLE_95_trf6_95_ONE", + "straight" : false, + "snakeLine" : false }, { "id" : "_95_vl1_95_INTERNAL_95_vl1_95_trf4_95_ONE_95_trf4_95_ONE", "nodeId1" : "idINTERNAL_95_vl1_95_trf4_95_ONE", @@ -1209,6 +1209,12 @@ "nodeId2" : "iddsect21", "straight" : false, "snakeLine" : false + }, { + "id" : "_95_vl1_95_trf7_95_THREE_95_MIDDLE_95_trf7_95_ONE", + "nodeId1" : "idtrf7_95_THREE", + "nodeId2" : "idMIDDLE_95_trf7_95_ONE", + "straight" : false, + "snakeLine" : false }, { "id" : "_95_vl1_95_dsect12_95_bbs2", "nodeId1" : "iddsect12", @@ -1221,12 +1227,6 @@ "nodeId2" : "idINTERNAL_95_vl1_95_dtrf11_45_btrf11", "straight" : false, "snakeLine" : false - }, { - "id" : "_95_vl1_95_btrf16_95_trf6", - "nodeId1" : "idbtrf16", - "nodeId2" : "idtrf6", - "straight" : false, - "snakeLine" : false }, { "id" : "_95_vl1_95_bbs2_95_dtrf12", "nodeId1" : "idbbs2", @@ -1234,9 +1234,9 @@ "straight" : false, "snakeLine" : false }, { - "id" : "_95_vl1_95_trf7_95_THREE_95_trf7", - "nodeId1" : "idtrf7_95_THREE", - "nodeId2" : "idtrf7", + "id" : "_95_vl1_95_trf6_95_TWO_95_MIDDLE_95_trf6_95_ONE", + "nodeId1" : "idtrf6_95_TWO", + "nodeId2" : "idMIDDLE_95_trf6_95_ONE", "straight" : false, "snakeLine" : false }, { @@ -1281,12 +1281,6 @@ "nodeId2" : "iddtrf18", "straight" : false, "snakeLine" : false - }, { - "id" : "_95_vl1_95_trf8_95_TWO_95_trf8", - "nodeId1" : "idtrf8_95_TWO", - "nodeId2" : "idtrf8", - "straight" : false, - "snakeLine" : false }, { "id" : "_95_vl1_95_dtrf15_95_INTERNAL_95_vl1_95_dtrf15_45_btrf15", "nodeId1" : "iddtrf15", @@ -1299,6 +1293,12 @@ "nodeId2" : "idINTERNAL_95_vl1_95_gen2", "straight" : false, "snakeLine" : false + }, { + "id" : "_95_vl1_95_btrf18_95_MIDDLE_95_trf8_95_ONE", + "nodeId1" : "idbtrf18", + "nodeId2" : "idMIDDLE_95_trf8_95_ONE", + "straight" : false, + "snakeLine" : false } ], "lines" : [ ], "feederInfos" : [ { diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/with_frame_background.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/with_frame_background.svg index 652f40e99..9b6b9462e 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/with_frame_background.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/with_frame_background.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: baseVoltages.css ------------------------------------------------ */ .sld-vl300to500 {--sld-vl-color: #ff0000} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/zone.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/zone.svg index c395e7fc1..3b3a85a12 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/zone.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/zone.svg @@ -13,8 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} -.sld-bus-connection.sld-connected-bus-connection {fill: var(--sld-vl-color, black)} -.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black)} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File : components.css ------------------------------------------------- */ /* Stroke black */ From 4fee312182457904f1aa013f0bc15bf9624279ad Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 30 May 2023 21:43:25 +0200 Subject: [PATCH 09/19] add tests for disconnected components Signed-off-by: Sophie Frasnedo --- .../TestDisconnectedComponentsBusBreaker.java | 118 +++++ .../resources/disconnected2wtBusBreaker.svg | 459 ++++++++++++++++++ .../resources/disconnected3wtBusBreaker.svg | 459 ++++++++++++++++++ .../disconnectedInternal2wtBusBreaker.svg | 459 ++++++++++++++++++ .../resources/disconnectedLineBusBreaker.svg | 459 ++++++++++++++++++ .../resources/disconnectedLoadBusBreaker.svg | 459 ++++++++++++++++++ 6 files changed, 2413 insertions(+) create mode 100644 single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java create mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg create mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg create mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg create mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg create mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java new file mode 100644 index 000000000..d706f3aff --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) 2023, 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 com.powsybl.sld.iidm; + +import com.powsybl.commons.config.BaseVoltagesConfig; +import com.powsybl.commons.config.ModuleConfigRepository; +import com.powsybl.commons.config.PlatformConfig; +import com.powsybl.iidm.network.Branch; +import com.powsybl.iidm.network.ThreeWindingsTransformer; +import com.powsybl.sld.builders.NetworkGraphBuilder; +import com.powsybl.sld.model.graphs.VoltageLevelGraph; +import com.powsybl.sld.svg.styles.NominalVoltageStyleProvider; +import com.powsybl.sld.svg.styles.StyleProvider; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.nio.file.Path; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * @author Sophie Frasnedo + */ +class TestDisconnectedComponentsBusBreaker extends AbstractTestCaseIidm { + + @Override + public StyleProvider getDefaultDiagramStyleProvider() { + // bypassing the config-test platform config to test the embedded base-voltages.yml file + BaseVoltagesConfig baseVoltagesConfig = BaseVoltagesConfig.fromPlatformConfig(new PlatformConfig((ModuleConfigRepository) null, Path.of("./"))); + return new NominalVoltageStyleProvider(baseVoltagesConfig); + } + + @BeforeEach + public void setUp() { + network = CreateNetworksUtil.createBusBreakerNetworkWithInternalBranches("TestInternalBranchesBusBreaker", "test"); + substation = network.getSubstation("S1"); + } + + @Test + void testDisconnectedLoad() { + network.getLoad("LD1").getTerminal().disconnect(); + // build graph + graphBuilder = new NetworkGraphBuilder(network); + VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); + + // Run layout + voltageLevelGraphLayout(g); + + // write SVG and compare to reference + assertEquals(toString("/disconnectedLoadBusBreaker.svg"), + toSVG(g, "/disconnectedLoadBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); + } + + @Test + void testDisconnectedLine() { + network.getLine("L12").getTerminal(Branch.Side.ONE).disconnect(); + // build graph + graphBuilder = new NetworkGraphBuilder(network); + VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); + + // Run layout + voltageLevelGraphLayout(g); + + // write SVG and compare to reference + assertEquals(toString("/disconnectedLineBusBreaker.svg"), + toSVG(g, "/disconnectedLineBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); + } + + @Test + void testDisconnected2wt() { + network.getTwoWindingsTransformer("T12").getTerminal(Branch.Side.ONE).disconnect(); + // build graph + graphBuilder = new NetworkGraphBuilder(network); + VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); + + // Run layout + voltageLevelGraphLayout(g); + + // write SVG and compare to reference + assertEquals(toString("/disconnected2wtBusBreaker.svg"), + toSVG(g, "/disconnected2wtBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); + } + + @Test + void testDisconnectedInternal2wt() { + network.getTwoWindingsTransformer("T11").getTerminal(Branch.Side.TWO).disconnect(); + // build graph + graphBuilder = new NetworkGraphBuilder(network); + VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); + + // Run layout + voltageLevelGraphLayout(g); + + // write SVG and compare to reference + assertEquals(toString("/disconnectedInternal2wtBusBreaker.svg"), + toSVG(g, "/disconnectedInternal2wtBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); + } + + @Test + void testDisconnected3wt() { + network.getThreeWindingsTransformer("T3_12").getTerminal(ThreeWindingsTransformer.Side.TWO).disconnect(); + // build graph + graphBuilder = new NetworkGraphBuilder(network); + VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); + + // Run layout + voltageLevelGraphLayout(g); + + // write SVG and compare to reference + assertEquals(toString("/disconnected3wtBusBreaker.svg"), + toSVG(g, "/disconnected3wtBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); + } + +} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg new file mode 100644 index 000000000..41dd5e154 --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg @@ -0,0 +1,459 @@ + + + + + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg new file mode 100644 index 000000000..dcf7b60d4 --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg @@ -0,0 +1,459 @@ + + + + + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg new file mode 100644 index 000000000..6ebbb8c83 --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg @@ -0,0 +1,459 @@ + + + + + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg new file mode 100644 index 000000000..b8edd4455 --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg @@ -0,0 +1,459 @@ + + + + + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg new file mode 100644 index 000000000..07f354a07 --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg @@ -0,0 +1,459 @@ + + + + + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + From 669c21e1e7741e4960265ab63eee969158c53c0e Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 30 May 2023 21:54:47 +0200 Subject: [PATCH 10/19] deal with open switches Signed-off-by: Sophie Frasnedo --- .../powsybl/sld/model/graphs/NodeFactory.java | 1 + .../TestDisconnectedComponentsBusBreaker.java | 14 + .../test/resources/openSwitchBusBreaker.svg | 459 ++++++++++++++++++ 3 files changed, 474 insertions(+) create mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/openSwitchBusBreaker.svg diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java index 1ab10e2e6..390a90b09 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java @@ -184,6 +184,7 @@ public static ConnectivityNode createConnectivityNode(VoltageLevelGraph graph, S public static SwitchNode createSwitchNode(VoltageLevelGraph graph, String id, String name, String componentType, boolean fictitious, SwitchKind kind, boolean open) { SwitchNode sn = new SwitchNode(id, name, componentType, fictitious, kind, open); + sn.setDisconnected(open); graph.addNode(sn); return sn; } diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java index d706f3aff..20a7632fb 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java @@ -115,4 +115,18 @@ void testDisconnected3wt() { toSVG(g, "/disconnected3wtBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); } + @Test + void testOpenSwitch() { + // build graph + graphBuilder = new NetworkGraphBuilder(network); + VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); + + // Run layout + voltageLevelGraphLayout(g); + + // write SVG and compare to reference + assertEquals(toString("/openSwitchBusBreaker.svg"), + toSVG(g, "/openSwitchBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); + } + } diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/openSwitchBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/openSwitchBusBreaker.svg new file mode 100644 index 000000000..588c6073e --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/openSwitchBusBreaker.svg @@ -0,0 +1,459 @@ + + + + + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + From 698f8f9fb2cb4647ed790074600d13c6ff332d9c Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 30 May 2023 21:56:44 +0200 Subject: [PATCH 11/19] update existing test references Signed-off-by: Sophie Frasnedo --- .../src/test/resources/InternalBranchesBusBreaker.svg | 4 ++-- .../resources/NodeDecoratorsBranchStatusBusBreaker.svg | 4 ++-- .../src/test/resources/TestBatteries.svg | 2 +- .../src/test/resources/TestCaseLoadBreakSwitch.svg | 10 +++++----- .../src/test/resources/disconnected2wtBusBreaker.svg | 4 ++-- .../src/test/resources/disconnected3wtBusBreaker.svg | 4 ++-- .../resources/disconnectedInternal2wtBusBreaker.svg | 4 ++-- .../src/test/resources/disconnectedLineBusBreaker.svg | 4 ++-- .../src/test/resources/disconnectedLoadBusBreaker.svg | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg index 694628b4d..588c6073e 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg @@ -96,7 +96,7 @@ - + @@ -109,7 +109,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg index 52de44be5..7aa8478a1 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg @@ -165,7 +165,7 @@ - + @@ -178,7 +178,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg index 7fbb2791e..99cca4a93 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg @@ -222,7 +222,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg index d64cf0b9c..63a2fbeb1 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg @@ -160,7 +160,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -276,7 +276,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -321,7 +321,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg index 41dd5e154..b634a619c 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg @@ -96,7 +96,7 @@ - + @@ -109,7 +109,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg index dcf7b60d4..3665fba1c 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg @@ -96,7 +96,7 @@ - + @@ -109,7 +109,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg index 6ebbb8c83..e792d0ba4 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg @@ -96,7 +96,7 @@ - + @@ -109,7 +109,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg index b8edd4455..708861586 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg @@ -96,7 +96,7 @@ - + @@ -109,7 +109,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg index 07f354a07..1f78701f7 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg @@ -96,7 +96,7 @@ - + @@ -109,7 +109,7 @@ - + From 0d1733329ccab8382ef9713b1b651624f7068820 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 30 May 2023 22:04:57 +0200 Subject: [PATCH 12/19] remove a code smell Signed-off-by: Sophie Frasnedo --- .../com/powsybl/sld/svg/styles/AbstractStyleProvider.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java index 4e7d9fcc8..bb8679d65 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java @@ -51,10 +51,8 @@ public List getNodeStyles(VoltageLevelGraph graph, Node node, ComponentL styles.add(StyleClassConstants.FICTITIOUS_NODE_STYLE_CLASS); } - if (node instanceof BusConnection) { - if (node.isDisconnected()) { - styles.add(StyleClassConstants.DISCONNECTED_BUS_CONNECTION_STYLE_CLASS); - } + if (node instanceof BusConnection && node.isDisconnected()) { + styles.add(StyleClassConstants.DISCONNECTED_BUS_CONNECTION_STYLE_CLASS); } return styles; From abfb5d250dfd31c595fdc331f1a2c7eaf358a48f Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Wed, 7 Jun 2023 11:22:37 +0200 Subject: [PATCH 13/19] fix problem following github automatic merge with main Signed-off-by: Sophie Frasnedo --- .../powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java index 20a7632fb..89cdbb4a9 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java @@ -9,6 +9,7 @@ import com.powsybl.commons.config.BaseVoltagesConfig; import com.powsybl.commons.config.ModuleConfigRepository; import com.powsybl.commons.config.PlatformConfig; +import com.powsybl.diagram.test.Networks; import com.powsybl.iidm.network.Branch; import com.powsybl.iidm.network.ThreeWindingsTransformer; import com.powsybl.sld.builders.NetworkGraphBuilder; @@ -36,7 +37,7 @@ public StyleProvider getDefaultDiagramStyleProvider() { @BeforeEach public void setUp() { - network = CreateNetworksUtil.createBusBreakerNetworkWithInternalBranches("TestInternalBranchesBusBreaker", "test"); + network = Networks.createBusBreakerNetworkWithInternalBranches("TestInternalBranchesBusBreaker", "test"); substation = network.getSubstation("S1"); } From 9a14113c51d0d21ad42db4a628fc0778c6edaf7c Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Mon, 12 Jun 2023 16:29:15 +0200 Subject: [PATCH 14/19] changes following review and merge Signed-off-by: Sophie Frasnedo --- .../sld/builders/NetworkGraphBuilder.java | 56 +++++---- .../sld/builders/SubstationRawBuilder.java | 22 ++-- .../sld/builders/VoltageLevelRawBuilder.java | 34 ++--- .../powsybl/sld/model/graphs/NodeFactory.java | 119 +++++++++--------- .../sld/model/graphs/VoltageLevelGraph.java | 7 +- .../powsybl/sld/model/nodes/AbstractNode.java | 12 -- .../sld/model/nodes/BusConnection.java | 10 +- .../com/powsybl/sld/model/nodes/Feeder.java | 2 + .../sld/model/nodes/Internal2WTNode.java | 2 +- .../sld/model/nodes/Middle3WTNode.java | 9 +- .../com/powsybl/sld/model/nodes/Node.java | 4 - .../sld/model/nodes/feeders/BaseFeeder.java | 9 +- .../sld/model/nodes/feeders/FeederTwLeg.java | 4 +- .../model/nodes/feeders/FeederWithSides.java | 4 +- .../sld/svg/styles/AbstractStyleProvider.java | 6 +- .../com/powsybl/sld/iidm/TestSVGWriter.java | 66 +++++----- .../com/powsybl/sld/raw/TestAddBatteries.java | 2 +- .../sld/raw/TestAddExternalComponent.java | 2 +- .../java/com/powsybl/sld/raw/TestCase1.java | 2 +- .../sld/raw/TestCase11SubstationGraph.java | 23 ++-- .../java/com/powsybl/sld/raw/TestCase2.java | 2 +- .../java/com/powsybl/sld/raw/TestCase4.java | 6 +- .../java/com/powsybl/sld/raw/TestCase5H.java | 4 +- .../java/com/powsybl/sld/raw/TestCase5V.java | 4 +- .../sld/raw/TestCase7CellDetectionIssue.java | 2 +- .../sld/raw/TestCaseShuntArrangement.java | 20 +-- .../TestInsertFictitiousNodesAtFeeder.java | 4 +- .../raw/TestInternCellExplicitPosition.java | 4 +- .../powsybl/sld/raw/TestOrderConsistency.java | 6 +- .../sld/raw/TestParallelFeedersOrders.java | 4 +- .../sld/raw/TestUndefinedBlockExternCell.java | 4 +- .../src/test/resources/TestBatteries.svg | 2 +- .../resources/TestCaseLoadBreakSwitch.svg | 10 +- 33 files changed, 242 insertions(+), 225 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java index ae94142b5..2cd11b7e0 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java @@ -237,9 +237,10 @@ private FeederNode createFeederBranchNode(VoltageLevelGraph graph, Branch bra equipmentId = branch.getId(); NodeSide s = NodeSide.valueOf(side.name()); Branch.Side otherSide = side == Branch.Side.ONE ? Branch.Side.TWO : Branch.Side.ONE; + VoltageLevel vlOtherSide = branch.getTerminal(otherSide).getVoltageLevel(); - return NodeFactory.createFeederBranchNode(graph, nodeId, equipmentNameOrId, equipmentId, componentTypeName, s, - new VoltageLevelInfos(vlOtherSide.getId(), vlOtherSide.getNameOrId(), vlOtherSide.getNominalV())); + return NodeFactory.createFeederLineNode(graph, nodeId, equipmentNameOrId, equipmentId, s, + new VoltageLevelInfos(vlOtherSide.getId(), vlOtherSide.getNameOrId(), vlOtherSide.getNominalV()), !branch.getTerminal(side).isConnected()); } private FeederNode createFeederVscNode(VoltageLevelGraph graph, HvdcConverterStation hvdcStation) { @@ -248,8 +249,8 @@ private FeederNode createFeederVscNode(VoltageLevelGraph graph, HvdcConverterSta .map(otherStation -> otherStation.getTerminal().getVoltageLevel()) .map(otherVl -> new VoltageLevelInfos(otherVl.getId(), otherVl.getNameOrId(), otherVl.getNominalV())) .map(otherVlInfo -> NodeFactory.createVscConverterStation(graph, hvdcStation.getId(), hvdcStation.getNameOrId(), hvdcStation.getHvdcLine().getId(), - hvdcStation.getHvdcLine().getConverterStation1() == hvdcStation ? NodeSide.ONE : NodeSide.TWO, otherVlInfo)) - .orElseGet(() -> NodeFactory.createVscConverterStationInjection(graph, hvdcStation.getId(), hvdcStation.getNameOrId())); + hvdcStation.getHvdcLine().getConverterStation1() == hvdcStation ? NodeSide.ONE : NodeSide.TWO, otherVlInfo, !hvdcStation.getTerminal().isConnected())) + .orElseGet(() -> NodeFactory.createVscConverterStationInjection(graph, hvdcStation.getId(), hvdcStation.getNameOrId(), !hvdcStation.getTerminal().isConnected())); } private Node createInternal2wtSideNode(VoltageLevelGraph graph, TwoWindingsTransformer branch, Branch.Side side) { @@ -264,17 +265,18 @@ private FeederNode createFeeder2wtNode(VoltageLevelGraph graph, TwoWindingsTrans VoltageLevel vlOtherSide = branch.getTerminal(otherSide).getVoltageLevel(); VoltageLevelInfos otherSideVoltageLevelInfos = new VoltageLevelInfos(vlOtherSide.getId(), vlOtherSide.getNameOrId(), vlOtherSide.getNominalV()); + boolean disconnected = !branch.getTerminal(side).isConnected(); if (graph.isForVoltageLevelDiagram() && isNotInternalToVoltageLevel(branch)) { if (!branch.hasPhaseTapChanger()) { - return NodeFactory.createFeeder2WTNode(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), otherSideVoltageLevelInfos); + return NodeFactory.createFeeder2WTNode(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), otherSideVoltageLevelInfos, disconnected); } else { - return NodeFactory.createFeeder2WTNodeWithPhaseShifter(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), otherSideVoltageLevelInfos); + return NodeFactory.createFeeder2WTNodeWithPhaseShifter(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), otherSideVoltageLevelInfos, disconnected); } } else { if (!branch.hasPhaseTapChanger()) { - return NodeFactory.createFeeder2WTLegNode(graph, id, name, equipmentId, NodeSide.valueOf(side.name())); + return NodeFactory.createFeeder2WTLegNode(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), disconnected); } else { - return NodeFactory.createFeeder2WTLegNodeWithPhaseShifter(graph, id, name, equipmentId, NodeSide.valueOf(side.name())); + return NodeFactory.createFeeder2WTLegNodeWithPhaseShifter(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), disconnected); } } } @@ -319,26 +321,30 @@ NodeSide.TWO, createVoltageLevelInfos(transformer.getLeg2().getTerminal()), // create first other leg feeder node String firstOtherLegNodeId = transformer.getId() + "_" + firstOtherLegSide.name(); FeederNode firstOtherLegNode = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(graph, firstOtherLegNodeId, transformer.getNameOrId(), - transformer.getId(), firstOtherLegSide, voltageLevelInfosBySide.get(firstOtherLegSide)); + transformer.getId(), firstOtherLegSide, voltageLevelInfosBySide.get(firstOtherLegSide), false); // create second other leg feeder node String secondOtherLegNodeId = transformer.getId() + "_" + secondOtherLegSide.name(); FeederNode secondOtherLegNode = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(graph, secondOtherLegNodeId, transformer.getNameOrId(), - transformer.getId(), secondOtherLegSide, voltageLevelInfosBySide.get(secondOtherLegSide)); + transformer.getId(), secondOtherLegSide, voltageLevelInfosBySide.get(secondOtherLegSide), false); + + Map connectionToBus = new HashMap<>(); // create middle node Middle3WTNode middleNode = NodeFactory.createMiddle3WTNode(graph, "MIDDLE_" + transformer.getId() + "_" + side.name(), transformer.getNameOrId(), transformer.getId(), vlLegSide, firstOtherLegNode, secondOtherLegNode, voltageLevelInfosBySide.get(NodeSide.ONE), - voltageLevelInfosBySide.get(NodeSide.TWO), voltageLevelInfosBySide.get(NodeSide.THREE)); + voltageLevelInfosBySide.get(NodeSide.TWO), + voltageLevelInfosBySide.get(NodeSide.THREE), + connectionToBus); add3wtFeeder(middleNode, firstOtherLegNode, secondOtherLegNode, transformer.getTerminal(side)); } else { // in substation diagram, we only represent the leg node within the voltage level (3wt node will be on the snake line) String id = transformer.getId() + "_" + side.name(); FeederNode legNode = NodeFactory.createFeeder3WTLegNodeForSubstationDiagram(graph, id, transformer.getNameOrId(), transformer.getId(), - NodeSide.valueOf(side.name())); + NodeSide.valueOf(side.name()), !transformer.getTerminal(side).isConnected()); addTerminalNode(legNode, transformer.getTerminal(side)); } @@ -346,31 +352,31 @@ NodeSide.TWO, createVoltageLevelInfos(transformer.getLeg2().getTerminal()), @Override public void visitLoad(Load load) { - addTerminalNode(NodeFactory.createLoad(graph, load.getId(), load.getNameOrId()), load.getTerminal()); + addTerminalNode(NodeFactory.createLoad(graph, load.getId(), load.getNameOrId(), !load.getTerminal().isConnected()), load.getTerminal()); } @Override public void visitGenerator(Generator generator) { - addTerminalNode(NodeFactory.createGenerator(graph, generator.getId(), generator.getNameOrId()), generator.getTerminal()); + addTerminalNode(NodeFactory.createGenerator(graph, generator.getId(), generator.getNameOrId(), !generator.getTerminal().isConnected()), generator.getTerminal()); } @Override public void visitBattery(Battery battery) { - addTerminalNode(NodeFactory.createBattery(graph, battery.getId(), battery.getNameOrId()), battery.getTerminal()); + addTerminalNode(NodeFactory.createBattery(graph, battery.getId(), battery.getNameOrId(), !battery.getTerminal().isConnected()), battery.getTerminal()); } @Override public void visitShuntCompensator(ShuntCompensator sc) { FeederNode feederNode = isCapacitor(sc) - ? NodeFactory.createCapacitor(graph, sc.getId(), sc.getNameOrId()) - : NodeFactory.createInductor(graph, sc.getId(), sc.getNameOrId()); + ? NodeFactory.createCapacitor(graph, sc.getId(), sc.getNameOrId(), !sc.getTerminal().isConnected()) + : NodeFactory.createInductor(graph, sc.getId(), sc.getNameOrId(), !sc.getTerminal().isConnected()); addTerminalNode(feederNode, sc.getTerminal()); } @Override public void visitDanglingLine(DanglingLine dl) { if (!dl.isPaired()) { - addTerminalNode(NodeFactory.createDanglingLine(graph, dl.getId(), dl.getNameOrId()), dl.getTerminal()); + addTerminalNode(NodeFactory.createDanglingLine(graph, dl.getId(), dl.getNameOrId(), !dl.getTerminal().isConnected()), dl.getTerminal()); } else { dl.getTieLine().ifPresent(tieLine -> visitTieLine(tieLine, dl, graph)); } @@ -389,7 +395,7 @@ public void visitHvdcConverterStation(HvdcConverterStation converterStation) @Override public void visitStaticVarCompensator(StaticVarCompensator svc) { - addTerminalNode(NodeFactory.createStaticVarCompensator(graph, svc.getId(), svc.getNameOrId()), svc.getTerminal()); + addTerminalNode(NodeFactory.createStaticVarCompensator(graph, svc.getId(), svc.getNameOrId(), !svc.getTerminal().isConnected()), svc.getTerminal()); } @Override @@ -518,7 +524,6 @@ private void connectToBus(Node node, Terminal terminal) { protected void addTerminalNode(Node node, Terminal terminal) { node.setOrder(order++); node.setDirection(order % 2 == 0 ? Direction.TOP : Direction.BOTTOM); - node.setDisconnected(!terminal.isConnected()); connectToBus(node, terminal); } @@ -531,7 +536,6 @@ protected void add3wtFeeder(Middle3WTNode middleNode, FeederNode firstOtherLegNo secondOtherLegNode.setOrder(order++); secondOtherLegNode.setDirection(direction); - middleNode.setDisconnected(!terminal.isConnected()); connectToBus(middleNode, terminal); } @@ -716,7 +720,15 @@ private void add3wtEdges(BaseGraph graph, List threeWi return (FeederNode) graph.getVoltageLevel(vlId).getNode(idLeg); }).collect(Collectors.toList()); - NodeFactory.createMiddle3WTNode(graph, transfo.getId(), transfo.getNameOrId(), transfo.getId(), feederNodes.get(0), feederNodes.get(1), feederNodes.get(2)); + Map connectionToBus = new HashMap<>(); + Terminal terminal1 = transfo.getTerminal(ThreeWindingsTransformer.Side.ONE); + Terminal terminal2 = transfo.getTerminal(ThreeWindingsTransformer.Side.TWO); + Terminal terminal3 = transfo.getTerminal(ThreeWindingsTransformer.Side.THREE); + connectionToBus.put(terminal1.getBusBreakerView().getConnectableBus().getId(), terminal1.isConnected()); + connectionToBus.put(terminal2.getBusBreakerView().getConnectableBus().getId(), terminal2.isConnected()); + connectionToBus.put(terminal3.getBusBreakerView().getConnectableBus().getId(), terminal3.isConnected()); + + NodeFactory.createMiddle3WTNode(graph, transfo.getId(), transfo.getNameOrId(), transfo.getId(), feederNodes.get(0), feederNodes.get(1), feederNodes.get(2), connectionToBus); }); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java index 4f1a4edf7..1d372521a 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java @@ -33,8 +33,8 @@ public void addVlBuilder(VoltageLevelRawBuilder vlBuilder) { public Map createLine(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2, int order1, int order2, Direction direction1, Direction direction2) { Map feederLineNodes = new HashMap<>(); - FeederNode feederLineNode1 = vl1.createFeederLineNode(id, vl2.getVoltageLevelInfos().getId(), ONE, order1, direction1); - FeederNode feederLineNode2 = vl2.createFeederLineNode(id, vl1.getVoltageLevelInfos().getId(), TWO, order2, direction2); + FeederNode feederLineNode1 = vl1.createFeederLineNode(id, vl2.getVoltageLevelInfos().getId(), ONE, order1, direction1, false); + FeederNode feederLineNode2 = vl2.createFeederLineNode(id, vl1.getVoltageLevelInfos().getId(), TWO, order2, direction2, false); feederLineNodes.put(vl1, feederLineNode1); feederLineNodes.put(vl2, feederLineNode2); substationGraph.addLineEdge(id, feederLineNode1, feederLineNode2); @@ -48,8 +48,8 @@ public Map createLine(String id, VoltageLeve public Map createFeeder2WT(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2, int order1, int order2, Direction direction1, Direction direction2) { Map f2WTNodes = new HashMap<>(); - FeederNode feeder2WtNode1 = vl1.createFeeder2wtLegNode(id, ONE, order1, direction1); - FeederNode feeder2WTNode2 = vl2.createFeeder2wtLegNode(id, TWO, order2, direction2); + FeederNode feeder2WtNode1 = vl1.createFeeder2wtLegNode(id, ONE, order1, direction1, false); + FeederNode feeder2WTNode2 = vl2.createFeeder2wtLegNode(id, TWO, order2, direction2, false); f2WTNodes.put(vl1, feeder2WtNode1); f2WTNodes.put(vl2, feeder2WTNode2); NodeFactory.createMiddle2WTNode(substationGraph, id, id, feeder2WtNode1, feeder2WTNode2, vl1.getVoltageLevelInfos(), vl2.getVoltageLevelInfos(), false); @@ -62,22 +62,22 @@ public Map createFeeder2WT(String id, Voltag public Map createFeeder3WT(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2, VoltageLevelRawBuilder vl3, int order1, int order2, int order3, - Direction direction1, Direction direction2, Direction direction3) { + Direction direction1, Direction direction2, Direction direction3, Map connectionToBus) { Map f3WTNodes = new HashMap<>(); - FeederNode feeder3WTNode1 = vl1.createFeeder3wtLegNode(id, ONE, order1, direction1); - FeederNode feeder3WTNode2 = vl2.createFeeder3wtLegNode(id, TWO, order2, direction2); - FeederNode feeder3WTNode3 = vl3.createFeeder3wtLegNode(id, THREE, order3, direction3); + FeederNode feeder3WTNode1 = vl1.createFeeder3wtLegNode(id, ONE, order1, direction1, false); + FeederNode feeder3WTNode2 = vl2.createFeeder3wtLegNode(id, TWO, order2, direction2, false); + FeederNode feeder3WTNode3 = vl3.createFeeder3wtLegNode(id, THREE, order3, direction3, false); f3WTNodes.put(vl1, feeder3WTNode1); f3WTNodes.put(vl2, feeder3WTNode2); f3WTNodes.put(vl3, feeder3WTNode3); // creation of the middle node and the edges linking the transformer leg nodes to this middle node - NodeFactory.createMiddle3WTNode(substationGraph, id, id, id, feeder3WTNode1, feeder3WTNode2, feeder3WTNode3); + NodeFactory.createMiddle3WTNode(substationGraph, id, id, id, feeder3WTNode1, feeder3WTNode2, feeder3WTNode3, connectionToBus); return f3WTNodes; } - public Map createFeeder3WT(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2, VoltageLevelRawBuilder vl3) { - return createFeeder3WT(id, vl1, vl2, vl3, 0, 0, 0, null, null, null); + public Map createFeeder3WT(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2, VoltageLevelRawBuilder vl3, Map connectionToBus) { + return createFeeder3WT(id, vl1, vl2, vl3, 0, 0, 0, null, null, null, connectionToBus); } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/VoltageLevelRawBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/VoltageLevelRawBuilder.java index fb755441f..36c0180a8 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/VoltageLevelRawBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/VoltageLevelRawBuilder.java @@ -79,57 +79,57 @@ private void commonFeederSetting(FeederNode node, String id, int order, Directio } public FeederNode createLoad(String id) { - return createLoad(id, 0, null); + return createLoad(id, 0, null, false); } - public FeederNode createLoad(String id, int order, Direction direction) { - FeederNode fn = NodeFactory.createLoad(voltageLevelGraph, id, id); + public FeederNode createLoad(String id, int order, Direction direction, boolean disconnected) { + FeederNode fn = NodeFactory.createLoad(voltageLevelGraph, id, id, disconnected); commonFeederSetting(fn, id, order, direction); return fn; } public FeederNode createGenerator(String id) { - return createGenerator(id, 0, null); + return createGenerator(id, 0, null, false); } - public FeederNode createGenerator(String id, int order, Direction direction) { - FeederNode fn = NodeFactory.createGenerator(voltageLevelGraph, id, id); + public FeederNode createGenerator(String id, int order, Direction direction, boolean disconnected) { + FeederNode fn = NodeFactory.createGenerator(voltageLevelGraph, id, id, disconnected); commonFeederSetting(fn, id, order, direction); return fn; } public FeederNode createBattery(String id) { - return createBattery(id, 0, null); + return createBattery(id, 0, null, false); } - public FeederNode createBattery(String id, int order, Direction direction) { - FeederNode fn = NodeFactory.createBattery(voltageLevelGraph, id, id); + public FeederNode createBattery(String id, int order, Direction direction, boolean disconnected) { + FeederNode fn = NodeFactory.createBattery(voltageLevelGraph, id, id, disconnected); commonFeederSetting(fn, id, order, direction); return fn; } - public FeederNode createFeederLineNode(String id, String otherVlId, NodeSide side, int order, Direction direction) { - FeederNode fln = NodeFactory.createFeederLineNode(voltageLevelGraph, id + "_" + side, id, id, side, getVoltageLevelInfosFromId.apply(otherVlId)); + public FeederNode createFeederLineNode(String id, String otherVlId, NodeSide side, int order, Direction direction, boolean disconnected) { + FeederNode fln = NodeFactory.createFeederLineNode(voltageLevelGraph, id + "_" + side, id, id, side, getVoltageLevelInfosFromId.apply(otherVlId), disconnected); commonFeederSetting(fln, id, order, direction); return fln; } public FeederNode createFeeder2WTNode(String id, String otherVlId, NodeSide side, - int order, Direction direction) { - FeederNode f2WTe = NodeFactory.createFeeder2WTNode(voltageLevelGraph, id + "_" + side, id, id, side, getVoltageLevelInfosFromId.apply(otherVlId)); + int order, Direction direction, boolean disconnected) { + FeederNode f2WTe = NodeFactory.createFeeder2WTNode(voltageLevelGraph, id + "_" + side, id, id, side, getVoltageLevelInfosFromId.apply(otherVlId), disconnected); commonFeederSetting(f2WTe, id, order, direction); return f2WTe; } public FeederNode createFeeder2wtLegNode(String id, NodeSide side, - int order, Direction direction) { - FeederNode f2WTe = NodeFactory.createFeeder2WTLegNode(voltageLevelGraph, id + "_" + side, id, id, side); + int order, Direction direction, boolean disconnected) { + FeederNode f2WTe = NodeFactory.createFeeder2WTLegNode(voltageLevelGraph, id + "_" + side, id, id, side, disconnected); commonFeederSetting(f2WTe, id, order, direction); return f2WTe; } - public FeederNode createFeeder3wtLegNode(String id, NodeSide side, int order, Direction direction) { - FeederNode f3WTe = NodeFactory.createFeeder3WTLegNodeForSubstationDiagram(voltageLevelGraph, id + "_" + side, id, id, side); + public FeederNode createFeeder3wtLegNode(String id, NodeSide side, int order, Direction direction, boolean disconnected) { + FeederNode f3WTe = NodeFactory.createFeeder3WTLegNodeForSubstationDiagram(voltageLevelGraph, id + "_" + side, id, id, side, disconnected); commonFeederSetting(f3WTe, id + side.getIntValue(), order, direction); return f3WTe; } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java index 390a90b09..e7d4bbd43 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/NodeFactory.java @@ -46,20 +46,20 @@ public static ConnectivityNode createConnectivityNode(VoltageLevelGraph graph, S return node; } - public static BusConnection createBusConnection(VoltageLevelGraph graph, String idBusConnection, String nodeConnectedToBusNodeId) { - String idBusConnectionWithPrefix = BUS_CONNECTION_ID_PREFIX + Objects.requireNonNull(idBusConnection); - BusConnection node = new BusConnection(idBusConnectionWithPrefix, BUS_CONNECTION, graph.getNode(nodeConnectedToBusNodeId).isDisconnected()); - graph.addNode(node); - return node; - } - - public static Node createBusConnectionForInternal2WTNode(VoltageLevelGraph graph, String busNodeId, Internal2WTNode nodeConnectedToBusNode) { - boolean isDisconnected = !nodeConnectedToBusNode.connectedToBus(busNodeId); - String idBusConnectionWithPrefix = BUS_CONNECTION_ID_PREFIX + Objects.requireNonNull(busNodeId + "_" + nodeConnectedToBusNode.getId()); - BusConnection node = new BusConnection(idBusConnectionWithPrefix, BUS_CONNECTION, isDisconnected); + public static BusConnection createBusConnection(VoltageLevelGraph graph, String busNodeId, Node nodeConnectedToBus) { + Objects.requireNonNull(busNodeId); + String idBusConnectionWithPrefix = BUS_CONNECTION_ID_PREFIX + busNodeId + "_" + nodeConnectedToBus.getId(); + boolean disconnected = false; + if (nodeConnectedToBus instanceof FeederNode) { + disconnected = ((FeederNode) nodeConnectedToBus).getFeeder().isDisconnected(); + } else if (nodeConnectedToBus instanceof Internal2WTNode) { + disconnected = !((Internal2WTNode) nodeConnectedToBus).connectedToBus(busNodeId); + } else if (nodeConnectedToBus instanceof Middle3WTNode) { + disconnected = !((Middle3WTNode) nodeConnectedToBus).connectedToBus(busNodeId); + } + BusConnection node = new BusConnection(idBusConnectionWithPrefix, BUS_CONNECTION, disconnected); graph.addNode(node); return node; - } public static BusNode createBusNode(VoltageLevelGraph graph, String id, String name) { @@ -86,92 +86,92 @@ public static FeederNode createFeederNode(VoltageLevelGraph graph, String id, St } public static FeederNode createFictitiousFeederNode(VoltageLevelGraph graph, String id, Orientation orientation) { - return createFeederNode(graph, id, id, id, NODE, true, new BaseFeeder(FeederType.FICTITIOUS), orientation); + return createFeederNode(graph, id, id, id, NODE, true, new BaseFeeder(FeederType.FICTITIOUS, false), orientation); } - public static FeederNode createFeederInjectionNode(VoltageLevelGraph graph, String id, String name, String componentType) { - return createFeederNode(graph, id, name, id, componentType, false, new BaseFeeder(FeederType.INJECTION), null); + public static FeederNode createFeederInjectionNode(VoltageLevelGraph graph, String id, String name, String componentType, boolean disconnected) { + return createFeederNode(graph, id, name, id, componentType, false, new BaseFeeder(FeederType.INJECTION, disconnected), null); } - public static FeederNode createGenerator(VoltageLevelGraph graph, String id, String name) { - return createFeederInjectionNode(graph, id, name, ComponentTypeName.GENERATOR); + public static FeederNode createGenerator(VoltageLevelGraph graph, String id, String name, boolean disconnected) { + return createFeederInjectionNode(graph, id, name, ComponentTypeName.GENERATOR, disconnected); } - public static FeederNode createBattery(VoltageLevelGraph graph, String id, String name) { - return createFeederInjectionNode(graph, id, name, ComponentTypeName.BATTERY); + public static FeederNode createBattery(VoltageLevelGraph graph, String id, String name, boolean disconnected) { + return createFeederInjectionNode(graph, id, name, ComponentTypeName.BATTERY, disconnected); } - public static FeederNode createLoad(VoltageLevelGraph graph, String id, String name) { - return createFeederInjectionNode(graph, id, name, ComponentTypeName.LOAD); + public static FeederNode createLoad(VoltageLevelGraph graph, String id, String name, boolean disconnected) { + return createFeederInjectionNode(graph, id, name, ComponentTypeName.LOAD, disconnected); } - public static FeederNode createStaticVarCompensator(VoltageLevelGraph graph, String id, String name) { - return createFeederInjectionNode(graph, id, name, ComponentTypeName.STATIC_VAR_COMPENSATOR); + public static FeederNode createStaticVarCompensator(VoltageLevelGraph graph, String id, String name, boolean disconnected) { + return createFeederInjectionNode(graph, id, name, ComponentTypeName.STATIC_VAR_COMPENSATOR, disconnected); } - public static FeederNode createInductor(VoltageLevelGraph graph, String id, String name) { - return createFeederInjectionNode(graph, id, name, ComponentTypeName.INDUCTOR); + public static FeederNode createInductor(VoltageLevelGraph graph, String id, String name, boolean disconnected) { + return createFeederInjectionNode(graph, id, name, ComponentTypeName.INDUCTOR, disconnected); } - public static FeederNode createCapacitor(VoltageLevelGraph graph, String id, String name) { - return createFeederInjectionNode(graph, id, name, ComponentTypeName.CAPACITOR); + public static FeederNode createCapacitor(VoltageLevelGraph graph, String id, String name, boolean disconnected) { + return createFeederInjectionNode(graph, id, name, ComponentTypeName.CAPACITOR, disconnected); } - public static FeederNode createDanglingLine(VoltageLevelGraph graph, String id, String name) { - return createFeederInjectionNode(graph, id, name, ComponentTypeName.DANGLING_LINE); + public static FeederNode createDanglingLine(VoltageLevelGraph graph, String id, String name, boolean disconnected) { + return createFeederInjectionNode(graph, id, name, ComponentTypeName.DANGLING_LINE, disconnected); } - public static FeederNode createVscConverterStation(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos) { - FeederWithSides feeder = new FeederWithSides(FeederType.HVDC, side, graph.getVoltageLevelInfos(), otherSideVoltageLevelInfos); + public static FeederNode createVscConverterStation(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos, boolean disconnected) { + FeederWithSides feeder = new FeederWithSides(FeederType.HVDC, side, graph.getVoltageLevelInfos(), otherSideVoltageLevelInfos, disconnected); return createFeederNode(graph, id, name, equipmentId, ComponentTypeName.VSC_CONVERTER_STATION, feeder); } - public static FeederNode createVscConverterStationInjection(VoltageLevelGraph graph, String id, String name) { - return createFeederInjectionNode(graph, id, name, VSC_CONVERTER_STATION); + public static FeederNode createVscConverterStationInjection(VoltageLevelGraph graph, String id, String name, boolean disconnected) { + return createFeederInjectionNode(graph, id, name, VSC_CONVERTER_STATION, disconnected); } - public static FeederNode createFeederBranchNode(VoltageLevelGraph graph, String id, String name, String equipmentId, String componentType, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos) { - return createFeederNode(graph, id, name, equipmentId, componentType, new FeederWithSides(FeederType.BRANCH, side, graph.getVoltageLevelInfos(), otherSideVoltageLevelInfos)); + public static FeederNode createFeederBranchNode(VoltageLevelGraph graph, String id, String name, String equipmentId, String componentType, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos, boolean disconnected) { + return createFeederNode(graph, id, name, equipmentId, componentType, new FeederWithSides(FeederType.BRANCH, side, graph.getVoltageLevelInfos(), otherSideVoltageLevelInfos, disconnected)); } - public static FeederNode createFeeder2WTNode(VoltageLevelGraph graph, String id, String name, String equipmentId, String componentType, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos) { - return createFeederBranchNode(graph, id, name, equipmentId, componentType, side, otherSideVoltageLevelInfos); + public static FeederNode createFeeder2WTNode(VoltageLevelGraph graph, String id, String name, String equipmentId, String componentType, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos, boolean disconnected) { + return createFeederBranchNode(graph, id, name, equipmentId, componentType, side, otherSideVoltageLevelInfos, disconnected); } - public static FeederNode createFeeder2WTNode(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos) { - return createFeeder2WTNode(graph, id, name, equipmentId, TWO_WINDINGS_TRANSFORMER, side, otherSideVoltageLevelInfos); + public static FeederNode createFeeder2WTNode(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos, boolean disconnected) { + return createFeeder2WTNode(graph, id, name, equipmentId, TWO_WINDINGS_TRANSFORMER, side, otherSideVoltageLevelInfos, disconnected); } - public static FeederNode createFeeder2WTNode(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side) { - return createFeeder2WTNode(graph, id, name, equipmentId, side, graph.getVoltageLevelInfos()); + public static FeederNode createFeeder2WTNode(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, boolean disconnected) { + return createFeeder2WTNode(graph, id, name, equipmentId, side, graph.getVoltageLevelInfos(), disconnected); } - public static FeederNode createFeeder2WTNodeWithPhaseShifter(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos) { - return createFeeder2WTNode(graph, id, name, equipmentId, PHASE_SHIFT_TRANSFORMER, side, otherSideVoltageLevelInfos); + public static FeederNode createFeeder2WTNodeWithPhaseShifter(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos, boolean disconnected) { + return createFeeder2WTNode(graph, id, name, equipmentId, PHASE_SHIFT_TRANSFORMER, side, otherSideVoltageLevelInfos, disconnected); } - public static FeederNode createFeederLineNode(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos) { - return createFeederBranchNode(graph, id, name, equipmentId, ComponentTypeName.LINE, side, otherSideVoltageLevelInfos); + public static FeederNode createFeederLineNode(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos, boolean disconnected) { + return createFeederBranchNode(graph, id, name, equipmentId, ComponentTypeName.LINE, side, otherSideVoltageLevelInfos, disconnected); } - public static FeederNode createFeederTwtLegNode(VoltageLevelGraph graph, String id, String name, String equipmentId, String componentType, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos, FeederType feederType) { - return createFeederNode(graph, id, name, equipmentId, componentType, new FeederTwLeg(feederType, side, graph.getVoltageLevelInfos(), otherSideVoltageLevelInfos)); + public static FeederNode createFeederTwtLegNode(VoltageLevelGraph graph, String id, String name, String equipmentId, String componentType, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos, FeederType feederType, boolean disconnected) { + return createFeederNode(graph, id, name, equipmentId, componentType, new FeederTwLeg(feederType, side, graph.getVoltageLevelInfos(), otherSideVoltageLevelInfos, disconnected)); } - public static FeederNode createFeeder2WTLegNode(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side) { - return createFeederTwtLegNode(graph, id, name, equipmentId, TWO_WINDINGS_TRANSFORMER_LEG, side, graph.getVoltageLevelInfos(), FeederType.TWO_WINDINGS_TRANSFORMER_LEG); + public static FeederNode createFeeder2WTLegNode(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, boolean disconnected) { + return createFeederTwtLegNode(graph, id, name, equipmentId, TWO_WINDINGS_TRANSFORMER_LEG, side, graph.getVoltageLevelInfos(), FeederType.TWO_WINDINGS_TRANSFORMER_LEG, disconnected); } - public static FeederNode createFeeder2WTLegNodeWithPhaseShifter(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side) { - return createFeederTwtLegNode(graph, id, name, equipmentId, PHASE_SHIFT_TRANSFORMER_LEG, side, graph.getVoltageLevelInfos(), FeederType.TWO_WINDINGS_TRANSFORMER_LEG); + public static FeederNode createFeeder2WTLegNodeWithPhaseShifter(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, boolean disconnected) { + return createFeederTwtLegNode(graph, id, name, equipmentId, PHASE_SHIFT_TRANSFORMER_LEG, side, graph.getVoltageLevelInfos(), FeederType.TWO_WINDINGS_TRANSFORMER_LEG, disconnected); } - public static FeederNode createFeeder3WTLegNodeForVoltageLevelDiagram(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos) { - return createFeederTwtLegNode(graph, id, name, equipmentId, THREE_WINDINGS_TRANSFORMER_LEG, side, otherSideVoltageLevelInfos, FeederType.THREE_WINDINGS_TRANSFORMER_LEG); + public static FeederNode createFeeder3WTLegNodeForVoltageLevelDiagram(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, VoltageLevelInfos otherSideVoltageLevelInfos, boolean disconnected) { + return createFeederTwtLegNode(graph, id, name, equipmentId, THREE_WINDINGS_TRANSFORMER_LEG, side, otherSideVoltageLevelInfos, FeederType.THREE_WINDINGS_TRANSFORMER_LEG, disconnected); } - public static FeederNode createFeeder3WTLegNodeForSubstationDiagram(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side) { - return createFeederTwtLegNode(graph, id, name, equipmentId, THREE_WINDINGS_TRANSFORMER_LEG, side, graph.getVoltageLevelInfos(), FeederType.THREE_WINDINGS_TRANSFORMER_LEG); + public static FeederNode createFeeder3WTLegNodeForSubstationDiagram(VoltageLevelGraph graph, String id, String name, String equipmentId, NodeSide side, boolean disconnected) { + return createFeederTwtLegNode(graph, id, name, equipmentId, THREE_WINDINGS_TRANSFORMER_LEG, side, graph.getVoltageLevelInfos(), FeederType.THREE_WINDINGS_TRANSFORMER_LEG, disconnected); } public static ConnectivityNode createConnectivityNode(VoltageLevelGraph graph, String id) { @@ -184,7 +184,6 @@ public static ConnectivityNode createConnectivityNode(VoltageLevelGraph graph, S public static SwitchNode createSwitchNode(VoltageLevelGraph graph, String id, String name, String componentType, boolean fictitious, SwitchKind kind, boolean open) { SwitchNode sn = new SwitchNode(id, name, componentType, fictitious, kind, open); - sn.setDisconnected(open); graph.addNode(sn); return sn; } @@ -209,12 +208,12 @@ public static Middle2WTNode createMiddle2WTNode(BaseGraph baseGraph, String id, public static Middle3WTNode createMiddle3WTNode(VoltageLevelGraph baseGraph, String id, String name, String equipmentId, NodeSide vlSide, FeederNode firstOtherLegNode, FeederNode secondOtherLegNode, - VoltageLevelInfos vlLeg1, VoltageLevelInfos vlLeg2, VoltageLevelInfos vlLeg3) { + VoltageLevelInfos vlLeg1, VoltageLevelInfos vlLeg2, VoltageLevelInfos vlLeg3, Map connectionToBus) { if (firstOtherLegNode.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG || secondOtherLegNode.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG) { throw new PowsyblException("Middle3WTNode must be created with FeederNode with ComponentTypeName THREE_WINDINGS_TRANSFORMER_LEG"); } - Middle3WTNode m3wn = new Middle3WTNode(id, name, equipmentId, vlLeg1, vlLeg2, vlLeg3, true); + Middle3WTNode m3wn = new Middle3WTNode(id, name, equipmentId, vlLeg1, vlLeg2, vlLeg3, true, connectionToBus); m3wn.setWindingOrder(Middle3WTNode.Winding.DOWN, vlSide); m3wn.setWindingOrder(Middle3WTNode.Winding.UPPER_LEFT, ((FeederTwLeg) firstOtherLegNode.getFeeder()).getSide()); m3wn.setWindingOrder(Middle3WTNode.Winding.UPPER_RIGHT, ((FeederTwLeg) secondOtherLegNode.getFeeder()).getSide()); @@ -224,7 +223,7 @@ public static Middle3WTNode createMiddle3WTNode(VoltageLevelGraph baseGraph, Str return m3wn; } - public static Middle3WTNode createMiddle3WTNode(BaseGraph baseGraph, String id, String name, String equipmentId, FeederNode legNode1, FeederNode legNode2, FeederNode legNode3) { + public static Middle3WTNode createMiddle3WTNode(BaseGraph baseGraph, String id, String name, String equipmentId, FeederNode legNode1, FeederNode legNode2, FeederNode legNode3, Map connectionToBus) { if (legNode1.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG || legNode2.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG || legNode3.getFeeder().getFeederType() != FeederType.THREE_WINDINGS_TRANSFORMER_LEG) { @@ -233,7 +232,7 @@ public static Middle3WTNode createMiddle3WTNode(BaseGraph baseGraph, String id, Middle3WTNode m3wn = new Middle3WTNode(id, name, equipmentId, ((FeederTwLeg) legNode1.getFeeder()).getVoltageLevelInfos(), ((FeederTwLeg) legNode2.getFeeder()).getVoltageLevelInfos(), - ((FeederTwLeg) legNode3.getFeeder()).getVoltageLevelInfos(), false); + ((FeederTwLeg) legNode3.getFeeder()).getVoltageLevelInfos(), false, connectionToBus); baseGraph.addTwtEdge(legNode1, m3wn); baseGraph.addTwtEdge(legNode2, m3wn); baseGraph.addTwtEdge(legNode3, m3wn); diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java index 12b9fab95..d3d1be780 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/graphs/VoltageLevelGraph.java @@ -316,12 +316,7 @@ private void insertBusConnections(BusNode busNode, Predicate nodesOnBus) { } private void insertBusConnection(BusNode busNode, Node nodeConnectedToBusNode) { - Node fNodeToBus; - if (nodeConnectedToBusNode instanceof Internal2WTNode) { - fNodeToBus = NodeFactory.createBusConnectionForInternal2WTNode(this, busNode.getId(), (Internal2WTNode) nodeConnectedToBusNode); - } else { - fNodeToBus = NodeFactory.createBusConnection(this, busNode.getId() + "_" + nodeConnectedToBusNode.getId(), nodeConnectedToBusNode.getId()); - } + Node fNodeToBus = NodeFactory.createBusConnection(this, busNode.getId(), nodeConnectedToBusNode); insertNode(busNode, fNodeToBus, nodeConnectedToBusNode); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java index 8a58a409c..6d76295ea 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/AbstractNode.java @@ -47,8 +47,6 @@ public abstract class AbstractNode implements Node { private Orientation orientation; - protected boolean disconnectedNode; - /** * Constructor */ @@ -229,16 +227,6 @@ public int getCardinality(VoltageLevelGraph vlGraph) { return getAdjacentNodes().size(); } - @Override - public boolean isDisconnected() { - return disconnectedNode; - } - - @Override - public void setDisconnected(boolean disconnectedNode) { - this.disconnectedNode = disconnectedNode; - } - protected void writeJsonContent(JsonGenerator generator, boolean includeCoordinates) throws IOException { generator.writeStringField("type", type.name()); generator.writeStringField("id", id); diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java index d7d868f0e..fa68a15c3 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/BusConnection.java @@ -11,9 +11,15 @@ */ public class BusConnection extends ConnectivityNode { - public BusConnection(String id, String componentType, boolean isDisconnected) { + private final boolean disconnected; + + public BusConnection(String id, String componentType, boolean disconnected) { super(id, componentType); - this.disconnectedNode = isDisconnected; + this.disconnected = disconnected; + } + + public boolean isDisconnected() { + return disconnected; } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Feeder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Feeder.java index 0b34d6b4e..d6bbdf37e 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Feeder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Feeder.java @@ -17,4 +17,6 @@ public interface Feeder { FeederType getFeederType(); void writeJsonContent(JsonGenerator generator) throws IOException; + + boolean isDisconnected(); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Internal2WTNode.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Internal2WTNode.java index 58d59a2c8..eef077d83 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Internal2WTNode.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Internal2WTNode.java @@ -38,6 +38,6 @@ public void setOrientationFromBlock(Orientation blockOrientation, List blo } public boolean connectedToBus(String busId) { - return connectionToBus.get(busId); + return connectionToBus.getOrDefault(busId, false); } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle3WTNode.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle3WTNode.java index 97ab12445..35b666708 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle3WTNode.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Middle3WTNode.java @@ -9,6 +9,7 @@ import com.powsybl.sld.model.graphs.VoltageLevelInfos; import java.util.EnumMap; +import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -20,11 +21,13 @@ public class Middle3WTNode extends MiddleTwtNode { private final Map windingMap = new EnumMap<>(Winding.class); private final boolean embeddedInVlGraph; + Map connectionToBus; - public Middle3WTNode(String id, String name, String equipmentId, VoltageLevelInfos voltageLevelInfosLeg1, VoltageLevelInfos voltageLevelInfosLeg2, VoltageLevelInfos voltageLevelInfosLeg3, boolean embeddedInVLGraph) { + public Middle3WTNode(String id, String name, String equipmentId, VoltageLevelInfos voltageLevelInfosLeg1, VoltageLevelInfos voltageLevelInfosLeg2, VoltageLevelInfos voltageLevelInfosLeg3, boolean embeddedInVLGraph, Map connectionToBus) { super(id, name, equipmentId, new VoltageLevelInfos[]{Objects.requireNonNull(voltageLevelInfosLeg1), Objects.requireNonNull(voltageLevelInfosLeg2), Objects.requireNonNull(voltageLevelInfosLeg3)}, THREE_WINDINGS_TRANSFORMER); this.embeddedInVlGraph = embeddedInVLGraph; + this.connectionToBus = new HashMap<>(connectionToBus); } public boolean isEmbeddedInVlGraph() { @@ -57,4 +60,8 @@ private int windingToLegIndex(Winding winding) { public enum Winding { UPPER_LEFT, UPPER_RIGHT, DOWN } + + public boolean connectedToBus(String busId) { + return connectionToBus.getOrDefault(busId, false); + } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java index c4f283bc1..34e9df53f 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/Node.java @@ -77,9 +77,5 @@ enum NodeType { int getCardinality(VoltageLevelGraph vlGraph); - boolean isDisconnected(); - - void setDisconnected(boolean disconnectedNode); - void writeJson(JsonGenerator generator, boolean includeCoordinates) throws IOException; } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/BaseFeeder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/BaseFeeder.java index ce307384f..54b9b92ac 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/BaseFeeder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/BaseFeeder.java @@ -21,9 +21,11 @@ */ public class BaseFeeder implements Feeder { FeederType feederType; + private final boolean isDisconnected; - public BaseFeeder(FeederType feederType) { + public BaseFeeder(FeederType feederType, boolean isDisconnected) { this.feederType = Objects.requireNonNull(feederType); + this.isDisconnected = isDisconnected; } public FeederType getFeederType() { @@ -33,4 +35,9 @@ public FeederType getFeederType() { public void writeJsonContent(JsonGenerator generator) throws IOException { // nothing to add to json file in general case } + + @Override + public boolean isDisconnected() { + return this.isDisconnected; + } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/FeederTwLeg.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/FeederTwLeg.java index d9976f7c2..2b05ee4df 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/FeederTwLeg.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/FeederTwLeg.java @@ -15,8 +15,8 @@ */ public class FeederTwLeg extends FeederWithSides { - public FeederTwLeg(FeederType feederType, NodeSide side, VoltageLevelInfos myVoltageLevelInfos, VoltageLevelInfos otherSideVoltageLevelInfos) { - super(feederType, side, myVoltageLevelInfos, otherSideVoltageLevelInfos); + public FeederTwLeg(FeederType feederType, NodeSide side, VoltageLevelInfos myVoltageLevelInfos, VoltageLevelInfos otherSideVoltageLevelInfos, boolean disconnected) { + super(feederType, side, myVoltageLevelInfos, otherSideVoltageLevelInfos, disconnected); } @Override diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/FeederWithSides.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/FeederWithSides.java index 3f78e9393..686edf262 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/FeederWithSides.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/model/nodes/feeders/FeederWithSides.java @@ -23,8 +23,8 @@ public class FeederWithSides extends BaseFeeder { protected final VoltageLevelInfos myVoltageLevelInfos; protected final VoltageLevelInfos otherSideVoltageLevelInfos; - public FeederWithSides(FeederType feederType, NodeSide side, VoltageLevelInfos myVoltageLevelInfos, VoltageLevelInfos otherSideVoltageLevelInfos) { - super(feederType); + public FeederWithSides(FeederType feederType, NodeSide side, VoltageLevelInfos myVoltageLevelInfos, VoltageLevelInfos otherSideVoltageLevelInfos, boolean disconnected) { + super(feederType, disconnected); this.side = side; this.myVoltageLevelInfos = myVoltageLevelInfos; this.otherSideVoltageLevelInfos = otherSideVoltageLevelInfos; diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java index bb8679d65..457046739 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/styles/AbstractStyleProvider.java @@ -51,8 +51,10 @@ public List getNodeStyles(VoltageLevelGraph graph, Node node, ComponentL styles.add(StyleClassConstants.FICTITIOUS_NODE_STYLE_CLASS); } - if (node instanceof BusConnection && node.isDisconnected()) { - styles.add(StyleClassConstants.DISCONNECTED_BUS_CONNECTION_STYLE_CLASS); + if (node instanceof BusConnection) { + if (((BusConnection) node).isDisconnected()) { + styles.add(StyleClassConstants.DISCONNECTED_BUS_CONNECTION_STYLE_CLASS); + } } return styles; diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java index 9651f08c4..f8b50fffe 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestSVGWriter.java @@ -23,10 +23,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import java.util.*; import static com.powsybl.sld.library.ComponentTypeName.*; import static com.powsybl.sld.model.coordinate.Direction.BOTTOM; @@ -63,6 +60,8 @@ class TestSVGWriter extends AbstractTestCaseIidm { private DiagramLabelProvider noFeederInfoProvider; private ZoneGraph zGraph; + private static Map connectionToBus = new HashMap<>(); + private void createVoltageLevelGraphs() { // Creation "by hand" (without any network) of 3 voltage level graphs // and then generation of a SVG with DefaultDiagramStyleProvider (no network necessary) @@ -75,6 +74,7 @@ private void createVoltageLevelGraphs() { protected static VoltageLevelGraph createVoltageLevelGraph1() { VoltageLevelGraph g1 = new VoltageLevelGraph(new VoltageLevelInfos("vl1", "vl1", 400), null); g1.setCoord(40, 20); + Map connectionToBus = new HashMap<>(); VoltageLevelInfos voltageLevelInfosLeg1 = new VoltageLevelInfos("vl1", "vl1", 400.); VoltageLevelInfos voltageLevelInfosLeg2 = new VoltageLevelInfos("vl2", "vl2", 225); @@ -105,7 +105,7 @@ protected static VoltageLevelGraph createVoltageLevelGraph1() { g1.addEdge(vl1B1, vl1D2); g1.addEdge(vl1D2, vl1Bbs2); - FeederNode vl1Load1 = NodeFactory.createLoad(g1, "vl1_load1", "vl1_load1"); + FeederNode vl1Load1 = NodeFactory.createLoad(g1, "vl1_load1", "vl1_load1", false); vl1Load1.setOrder(0); vl1Load1.setDirection(TOP); vl1Load1.setX(40); @@ -120,7 +120,7 @@ protected static VoltageLevelGraph createVoltageLevelGraph1() { g1.addEdge(vl1Bload1, vl1Dload1); g1.addEdge(vl1Dload1, vl1Bbs1); - FeederNode vl1Trf1 = NodeFactory.createFeeder2WTNode(g1, "vl1_trf1", "vl1_trf1", "vl1_trf1", ONE, new VoltageLevelInfos("vl2", "vl2", 225)); + FeederNode vl1Trf1 = NodeFactory.createFeeder2WTNode(g1, "vl1_trf1", "vl1_trf1", "vl1_trf1", ONE, new VoltageLevelInfos("vl2", "vl2", 225), false); vl1Trf1.setOrder(1); vl1Trf1.setDirection(BOTTOM); vl1Trf1.setX(80); @@ -135,17 +135,17 @@ protected static VoltageLevelGraph createVoltageLevelGraph1() { g1.addEdge(vl1Btrf1, vl1Dtrf1); g1.addEdge(vl1Dtrf1, vl1Bbs1); - FeederNode vl1Trf2One = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g1, "vl1_trf2_one", "vl1_trf2", "vl1_trf2", ONE, new VoltageLevelInfos("vl2", "vl2", 225)); + FeederNode vl1Trf2One = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g1, "vl1_trf2_one", "vl1_trf2", "vl1_trf2", ONE, new VoltageLevelInfos("vl2", "vl2", 225), false); vl1Trf2One.setOrder(2); vl1Trf2One.setDirection(TOP); vl1Trf2One.setX(360); vl1Trf2One.setY(80); - FeederNode vl1Trf2Two = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g1, "vl1_trf2_two", "vl1_trf2", "vl1_trf2", TWO, new VoltageLevelInfos("vl3", "vl3", 63)); + FeederNode vl1Trf2Two = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g1, "vl1_trf2_two", "vl1_trf2", "vl1_trf2", TWO, new VoltageLevelInfos("vl3", "vl3", 63), false); vl1Trf2Two.setOrder(3); vl1Trf2Two.setDirection(TOP); vl1Trf2Two.setX(440); vl1Trf2Two.setY(80); - Middle3WTNode vl1Trf2Fict = new Middle3WTNode("vl1_trf2", "vl1_trf2", "vl1_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); + Middle3WTNode vl1Trf2Fict = new Middle3WTNode("vl1_trf2", "vl1_trf2", "vl1_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true, connectionToBus); vl1Trf2Fict.setX(400); vl1Trf2Fict.setY(140); g1.addNode(vl1Trf2Fict); @@ -180,7 +180,7 @@ private static VoltageLevelGraph createVoltageLevelGraph2() { vl2Bbs1.setPxWidth(200); vl2Bbs1.setPxWidth(200); vl2Bbs1.setPosition(new Position(0, 1, 6, 0, null)); - FeederNode vl2Gen1 = NodeFactory.createGenerator(g2, "vl2_gen1", "vl2_gen1"); + FeederNode vl2Gen1 = NodeFactory.createGenerator(g2, "vl2_gen1", "vl2_gen1", false); vl2Gen1.setOrder(0); vl2Gen1.setDirection(TOP); vl2Gen1.setX(50); @@ -195,7 +195,7 @@ private static VoltageLevelGraph createVoltageLevelGraph2() { g2.addEdge(vl2Bgen1, vl2Dgen1); g2.addEdge(vl2Dgen1, vl2Bbs1); - FeederNode vl2Trf1 = NodeFactory.createFeeder2WTNode(g2, "vl2_trf1", "vl2_trf1", "vl2_trf1", TWO, new VoltageLevelInfos("vl1", "vl1", 400)); + FeederNode vl2Trf1 = NodeFactory.createFeeder2WTNode(g2, "vl2_trf1", "vl2_trf1", "vl2_trf1", TWO, new VoltageLevelInfos("vl1", "vl1", 400), false); vl2Trf1.setOrder(1); vl2Trf1.setDirection(BOTTOM); vl2Trf1.setX(100); @@ -210,17 +210,17 @@ private static VoltageLevelGraph createVoltageLevelGraph2() { g2.addEdge(vl2Btrf1, vl2Dtrf1); g2.addEdge(vl2Dtrf1, vl2Bbs1); - FeederNode vl2Trf2One = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g2, "vl2_trf2_one", "vl2_trf2", "vl2_trf2", ONE, new VoltageLevelInfos("vl1", "vl1", 400)); + FeederNode vl2Trf2One = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g2, "vl2_trf2_one", "vl2_trf2", "vl2_trf2", ONE, new VoltageLevelInfos("vl1", "vl1", 400), false); vl2Trf2One.setOrder(2); vl2Trf2One.setDirection(TOP); vl2Trf2One.setX(130); vl2Trf2One.setY(80); - FeederNode vl2Trf2Two = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g2, "vl2_trf2_two", "vl2_trf2", "vl2_trf2", TWO, new VoltageLevelInfos("vl3", "vl3", 63)); + FeederNode vl2Trf2Two = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g2, "vl2_trf2_two", "vl2_trf2", "vl2_trf2", TWO, new VoltageLevelInfos("vl3", "vl3", 63), false); vl2Trf2Two.setOrder(3); vl2Trf2Two.setDirection(TOP); vl2Trf2Two.setX(190); vl2Trf2Two.setY(80); - Middle3WTNode vl2Trf2Fict = new Middle3WTNode("vl2_trf2", "vl2_trf2", "vl2_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); + Middle3WTNode vl2Trf2Fict = new Middle3WTNode("vl2_trf2", "vl2_trf2", "vl2_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true, connectionToBus); vl2Trf2Fict.setX(160); vl2Trf2Fict.setY(140); g2.addNode(vl2Trf2Fict); @@ -254,7 +254,7 @@ private static VoltageLevelGraph createVoltageLevelGraph3() { vl3Bbs1.setY(300); vl3Bbs1.setPxWidth(200); vl3Bbs1.setPosition(new Position(0, 1, 6, 0, null)); - FeederNode vl3Capa1 = NodeFactory.createCapacitor(g3, "vl3_capa1", "vl3_capa1"); + FeederNode vl3Capa1 = NodeFactory.createCapacitor(g3, "vl3_capa1", "vl3_capa1", false); vl3Capa1.setOrder(0); vl3Capa1.setDirection(TOP); vl3Capa1.setX(40); @@ -269,17 +269,17 @@ private static VoltageLevelGraph createVoltageLevelGraph3() { g3.addEdge(vl3Bcapa1, vl3Dcapa1); g3.addEdge(vl3Dcapa1, vl3Bbs1); - FeederNode vl3Trf2One = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g3, "vl3_trf2_one", "vl3_trf2", "vl3_trf2", ONE, new VoltageLevelInfos("vl1", "vl1", 400)); + FeederNode vl3Trf2One = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g3, "vl3_trf2_one", "vl3_trf2", "vl3_trf2", ONE, new VoltageLevelInfos("vl1", "vl1", 400), false); vl3Trf2One.setOrder(1); vl3Trf2One.setDirection(TOP); vl3Trf2One.setX(110); vl3Trf2One.setY(80); - FeederNode vl3Trf2Two = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g3, "vl3_trf2_two", "vl3_trf2", "vl3_trf2", TWO, new VoltageLevelInfos("vl2", "vl2", 225)); + FeederNode vl3Trf2Two = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(g3, "vl3_trf2_two", "vl3_trf2", "vl3_trf2", TWO, new VoltageLevelInfos("vl2", "vl2", 225), false); vl3Trf2Two.setOrder(2); vl3Trf2Two.setDirection(TOP); vl3Trf2Two.setX(190); vl3Trf2Two.setY(80); - Middle3WTNode vl3Trf2Fict = new Middle3WTNode("vl3_trf2", "vl3_trf2", "vl3_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true); + Middle3WTNode vl3Trf2Fict = new Middle3WTNode("vl3_trf2", "vl3_trf2", "vl3_trf2", voltageLevelInfosLeg1, voltageLevelInfosLeg2, voltageLevelInfosLeg3, true, connectionToBus); vl3Trf2Fict.setX(150); vl3Trf2Fict.setY(140); g3.addNode(vl3Trf2Fict); @@ -338,7 +338,7 @@ private void createSubstationGraph() { g1ForSubstation.addEdge(vl1B1, vl1D2); g1ForSubstation.addEdge(vl1D2, vl1Bbs2); - FeederNode vl1Load1 = NodeFactory.createLoad(g1ForSubstation, "vl1_load1", "vl1_load1"); + FeederNode vl1Load1 = NodeFactory.createLoad(g1ForSubstation, "vl1_load1", "vl1_load1", false); vl1Load1.setOrder(0); vl1Load1.setDirection(TOP); vl1Load1.setX(40); @@ -353,7 +353,7 @@ private void createSubstationGraph() { g1ForSubstation.addEdge(vl1Bload1, vl1Dload1); g1ForSubstation.addEdge(vl1Dload1, vl1Bbs1); - FeederNode vl1Trf1 = NodeFactory.createFeeder2WTLegNode(g1ForSubstation, "vl1_trf1", "vl1_trf1", "vl1_trf1", ONE); + FeederNode vl1Trf1 = NodeFactory.createFeeder2WTLegNode(g1ForSubstation, "vl1_trf1", "vl1_trf1", "vl1_trf1", ONE, false); vl1Trf1.setOrder(1); vl1Trf1.setDirection(BOTTOM); vl1Trf1.setX(80); @@ -368,7 +368,7 @@ private void createSubstationGraph() { g1ForSubstation.addEdge(vl1Btrf1, vl1Dtrf1); g1ForSubstation.addEdge(vl1Dtrf1, vl1Bbs1); - FeederNode vl1Trf2 = NodeFactory.createFeeder3WTLegNodeForSubstationDiagram(g1ForSubstation, "vl1_trf2_one", "vl1_trf2", "vl1_trf2", ONE); + FeederNode vl1Trf2 = NodeFactory.createFeeder3WTLegNodeForSubstationDiagram(g1ForSubstation, "vl1_trf2_one", "vl1_trf2", "vl1_trf2", ONE, false); vl1Trf2.setOrder(2); vl1Trf2.setDirection(TOP); vl1Trf2.setX(400); @@ -395,7 +395,7 @@ private void createSubstationGraph() { vl2Bbs1.setPxWidth(200); vl2Bbs1.setPxWidth(200); vl2Bbs1.setPosition(new Position(0, 1, 6, 0, null)); - FeederNode vl2Gen1 = NodeFactory.createGenerator(g2ForSubstation, "vl2_gen1", "vl2_gen1"); + FeederNode vl2Gen1 = NodeFactory.createGenerator(g2ForSubstation, "vl2_gen1", "vl2_gen1", false); vl2Gen1.setOrder(0); vl2Gen1.setDirection(TOP); vl2Gen1.setX(50); @@ -410,7 +410,7 @@ private void createSubstationGraph() { g2ForSubstation.addEdge(vl2Bgen1, vl2Dgen1); g2ForSubstation.addEdge(vl2Dgen1, vl2Bbs1); - FeederNode vl2Trf1 = NodeFactory.createFeeder2WTLegNode(g2ForSubstation, "vl2_trf1", "vl2_trf1", "vl2_trf1", ONE); + FeederNode vl2Trf1 = NodeFactory.createFeeder2WTLegNode(g2ForSubstation, "vl2_trf1", "vl2_trf1", "vl2_trf1", ONE, false); vl2Trf1.setOrder(1); vl2Trf1.setDirection(BOTTOM); vl2Trf1.setX(100); @@ -425,7 +425,7 @@ private void createSubstationGraph() { g2ForSubstation.addEdge(vl2Btrf1, vl2Dtrf1); g2ForSubstation.addEdge(vl2Dtrf1, vl2Bbs1); - FeederNode vl2Trf2 = NodeFactory.createFeeder3WTLegNodeForSubstationDiagram(g2ForSubstation, "vl2_trf2_one", "vl2_trf2", "vl2_trf2", TWO); + FeederNode vl2Trf2 = NodeFactory.createFeeder3WTLegNodeForSubstationDiagram(g2ForSubstation, "vl2_trf2_one", "vl2_trf2", "vl2_trf2", TWO, false); vl2Trf2.setOrder(2); vl2Trf2.setDirection(TOP); vl2Trf2.setX(160); @@ -451,7 +451,7 @@ private void createSubstationGraph() { vl3Bbs1.setY(300); vl3Bbs1.setPxWidth(200); vl3Bbs1.setPosition(new Position(0, 1, 6, 0, null)); - FeederNode vl3Capa1 = NodeFactory.createCapacitor(g3ForSubstation, "vl3_capa1", "vl3_capa1"); + FeederNode vl3Capa1 = NodeFactory.createCapacitor(g3ForSubstation, "vl3_capa1", "vl3_capa1", false); vl3Capa1.setOrder(0); vl3Capa1.setDirection(TOP); vl3Capa1.setX(40); @@ -466,7 +466,7 @@ private void createSubstationGraph() { g3ForSubstation.addEdge(vl3Bcapa1, vl3Dcapa1); g3ForSubstation.addEdge(vl3Dcapa1, vl3Bbs1); - FeederNode vl3Trf2 = NodeFactory.createFeeder3WTLegNodeForSubstationDiagram(g3ForSubstation, "vl3_trf2_one", "vl3_trf2", "vl3_trf2", THREE); + FeederNode vl3Trf2 = NodeFactory.createFeeder3WTLegNodeForSubstationDiagram(g3ForSubstation, "vl3_trf2_one", "vl3_trf2", "vl3_trf2", THREE, false); vl3Trf2.setOrder(1); vl3Trf2.setDirection(TOP); vl3Trf2.setX(150); @@ -495,7 +495,7 @@ private void createSubstationGraph() { edge2.setSnakeLine(Point.createPointsList(690., 540., 690., 590., 405., 590.)); substG.addMultiTermNode(nMulti1); - Middle3WTNode nMulti3 = new Middle3WTNode(vl1Trf2.getEquipmentId(), vl1Trf2.getEquipmentId(), vl1Trf2.getEquipmentId(), vl1Infos, vl2Infos, vl3Infos, false); + Middle3WTNode nMulti3 = new Middle3WTNode(vl1Trf2.getEquipmentId(), vl1Trf2.getEquipmentId(), vl1Trf2.getEquipmentId(), vl1Infos, vl2Infos, vl3Infos, false, connectionToBus); nMulti3.setCoordinates(750., 90.); nMulti3.setWindingOrder(Middle3WTNode.Winding.UPPER_LEFT, Middle3WTNode.Winding.DOWN, Middle3WTNode.Winding.UPPER_RIGHT); BranchEdge edge21 = substG.addTwtEdge(vl1Trf2, nMulti3); @@ -525,9 +525,9 @@ private void createZoneGraph() { BusNode bus11Node = NodeFactory.createBusNode(vl11Graph, BUS_11_ID, BUS_11_ID); bus11Node.setCoordinates(30, 160); bus11Node.setPxWidth(40); - FeederNode loadNode = NodeFactory.createLoad(vl11Graph, LOAD_ID, LOAD_ID); + FeederNode loadNode = NodeFactory.createLoad(vl11Graph, LOAD_ID, LOAD_ID, false); loadNode.setCoordinates(50, 10); - FeederNode twtSide1Node = NodeFactory.createFeeder2WTLegNode(vl11Graph, TRANSFORMER_ID + "_" + Side.ONE, TRANSFORMER_ID, TRANSFORMER_ID, ONE); + FeederNode twtSide1Node = NodeFactory.createFeeder2WTLegNode(vl11Graph, TRANSFORMER_ID + "_" + Side.ONE, TRANSFORMER_ID, TRANSFORMER_ID, ONE, false); twtSide1Node.setCoordinates(50, 260); vl11Graph.addEdge(bus11Node, loadNode); vl11Graph.addEdge(bus11Node, twtSide1Node); @@ -538,9 +538,9 @@ private void createZoneGraph() { BusNode bus12Node = NodeFactory.createBusNode(vl12Graph, BUS_12_ID, BUS_12_ID); bus12Node.setCoordinates(30, 110); bus12Node.setPxWidth(40); - FeederNode twtSide2Node = NodeFactory.createFeeder2WTLegNode(vl12Graph, TRANSFORMER_ID + "_" + Side.TWO, TRANSFORMER_ID, TRANSFORMER_ID, TWO); + FeederNode twtSide2Node = NodeFactory.createFeeder2WTLegNode(vl12Graph, TRANSFORMER_ID + "_" + Side.TWO, TRANSFORMER_ID, TRANSFORMER_ID, TWO, false); twtSide2Node.setCoordinates(50, 10); - FeederNode lineSide1Node = NodeFactory.createFeederLineNode(vl12Graph, LINE_ID + "_" + Side.ONE, LINE_ID, LINE_ID, ONE, vl21Infos); + FeederNode lineSide1Node = NodeFactory.createFeederLineNode(vl12Graph, LINE_ID + "_" + Side.ONE, LINE_ID, LINE_ID, ONE, vl21Infos, false); lineSide1Node.setCoordinates(50, 260); vl12Graph.addEdge(bus12Node, twtSide2Node); vl12Graph.addEdge(bus12Node, lineSide1Node); @@ -551,9 +551,9 @@ private void createZoneGraph() { BusNode bus21Node = NodeFactory.createBusNode(vl21Graph, BUS_21_ID, BUS_21_ID); bus21Node.setCoordinates(30, 160); bus21Node.setPxWidth(40); - FeederNode genNode = NodeFactory.createGenerator(vl21Graph, GENERATOR_ID, GENERATOR_ID); + FeederNode genNode = NodeFactory.createGenerator(vl21Graph, GENERATOR_ID, GENERATOR_ID, false); genNode.setCoordinates(50, 310); - FeederNode lineSide2Node = NodeFactory.createFeederLineNode(vl21Graph, LINE_ID + "_" + Side.TWO, LINE_ID, LINE_ID, TWO, vl12Infos); + FeederNode lineSide2Node = NodeFactory.createFeederLineNode(vl21Graph, LINE_ID + "_" + Side.TWO, LINE_ID, LINE_ID, TWO, vl12Infos, false); lineSide2Node.setCoordinates(50, 10); vl21Graph.addEdge(bus21Node, genNode); vl21Graph.addEdge(bus21Node, lineSide2Node); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestAddBatteries.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestAddBatteries.java index 84117b8e1..7839403ff 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestAddBatteries.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestAddBatteries.java @@ -29,7 +29,7 @@ class TestAddBatteries extends AbstractTestCaseRaw { public void setUp() { VoltageLevelRawBuilder vlBuilder = rawGraphBuilder.createVoltageLevelBuilder("vl", 380); BusNode bbs = vlBuilder.createBusBarSection("bbs", 1, 1); - FeederNode battery1 = vlBuilder.createBattery("batt1", 0, TOP); + FeederNode battery1 = vlBuilder.createBattery("batt1", 0, TOP, false); SwitchNode d1 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d1", false, false); SwitchNode b1 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "b1", false, false); FeederNode battery2 = vlBuilder.createBattery("batt2"); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestAddExternalComponent.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestAddExternalComponent.java index 2ae54581e..0880775e3 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestAddExternalComponent.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestAddExternalComponent.java @@ -31,7 +31,7 @@ class TestAddExternalComponent extends AbstractTestCaseRaw { public void setUp() { VoltageLevelRawBuilder vlBuilder = rawGraphBuilder.createVoltageLevelBuilder("vl", 380); BusNode bbs = vlBuilder.createBusBarSection("bbs", 1, 1); - FeederNode load = vlBuilder.createLoad("l", 0, TOP); + FeederNode load = vlBuilder.createLoad("l", 0, TOP, false); SwitchNode d = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d", false, false); Node cheese = NodeFactory.createEquipmentNode(vlBuilder.getGraph(), Node.NodeType.INTERNAL, "cheese", null, null, CHEESE, false); SwitchNode b = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "b", false, false); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase1.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase1.java index 90edc59a5..9aadc22a4 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase1.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase1.java @@ -37,7 +37,7 @@ class TestCase1 extends AbstractTestCaseRaw { public void setUp() { VoltageLevelRawBuilder vlBuilder = rawGraphBuilder.createVoltageLevelBuilder("vl", 380); BusNode bbs = vlBuilder.createBusBarSection("bbs", 1, 1); - FeederNode load = vlBuilder.createLoad("l", 0, TOP); + FeederNode load = vlBuilder.createLoad("l", 0, TOP, false); SwitchNode d = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d", false, false); SwitchNode b = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "b", false, false); vlBuilder.connectNode(bbs, d); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase11SubstationGraph.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase11SubstationGraph.java index c4bc9829a..2e033745c 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase11SubstationGraph.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase11SubstationGraph.java @@ -15,6 +15,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import java.util.HashMap; import java.util.Map; import static com.powsybl.sld.model.coordinate.Direction.*; @@ -51,28 +52,28 @@ public void setUp() { vlb1.connectNode(dtrct21, dsect22); vlb1.connectNode(dsect22, bbs4); - FeederNode load1 = vlb1.createLoad("load1", 0, TOP); + FeederNode load1 = vlb1.createLoad("load1", 0, TOP, false); SwitchNode dload1 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dload1", false, false); SwitchNode bload1 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bload1", false, false); vlb1.connectNode(bbs1, dload1); vlb1.connectNode(dload1, bload1); vlb1.connectNode(load1, bload1); - FeederNode gen1 = vlb1.createGenerator("gen1", 2, BOTTOM); + FeederNode gen1 = vlb1.createGenerator("gen1", 2, BOTTOM, false); SwitchNode dgen1 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dgen1", false, false); SwitchNode bgen1 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bgen1", false, false); vlb1.connectNode(bbs3, dgen1); vlb1.connectNode(dgen1, bgen1); vlb1.connectNode(gen1, bgen1); - FeederNode load2 = vlb1.createLoad("load2", 8, TOP); + FeederNode load2 = vlb1.createLoad("load2", 8, TOP, false); SwitchNode dload2 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dload2", false, false); SwitchNode bload2 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bload2", false, false); vlb1.connectNode(bbs2, dload2); vlb1.connectNode(dload2, bload2); vlb1.connectNode(load2, bload2); - FeederNode gen2 = vlb1.createGenerator("gen2", 12, BOTTOM); + FeederNode gen2 = vlb1.createGenerator("gen2", 12, BOTTOM, false); SwitchNode dgen2 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dgen2", false, false); SwitchNode bgen2 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bgen2", false, false); vlb1.connectNode(bbs4, dgen2); @@ -92,14 +93,14 @@ public void setUp() { vlb2.connectNode(ddcpl1, dscpl2); vlb2.connectNode(dscpl2, bbs6); - FeederNode load3 = vlb2.createLoad("load3", 0, TOP); + FeederNode load3 = vlb2.createLoad("load3", 0, TOP, false); SwitchNode dload3 = vlb2.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dload3", false, false); SwitchNode bload3 = vlb2.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bload3", false, false); vlb2.connectNode(bbs5, dload3); vlb2.connectNode(load3, bload3); vlb2.connectNode(bload3, dload3); - FeederNode gen4 = vlb2.createGenerator("gen4", 2, BOTTOM); + FeederNode gen4 = vlb2.createGenerator("gen4", 2, BOTTOM, false); SwitchNode dgen4 = vlb2.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dgen4", false, false); SwitchNode bgen4 = vlb2.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bgen4", false, false); vlb2.connectNode(bbs6, dgen4); @@ -111,7 +112,7 @@ public void setUp() { BusNode bbs7 = vlb3.createBusBarSection("bbs7", 1, 1); - FeederNode load4 = vlb3.createLoad("load4", 0, TOP); + FeederNode load4 = vlb3.createLoad("load4", 0, TOP, false); SwitchNode dload4 = vlb3.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dload4", false, false); SwitchNode bload4 = vlb3.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bload4", false, false); vlb3.connectNode(bbs7, dload4); @@ -200,8 +201,10 @@ public void setUp() { // */ + Map connectionToBus = new HashMap<>(); + Map feeder3WTs6 = ssb1.createFeeder3WT("trf6", vlb1, vlb2, vlb3, - 5, 5, 2, TOP, TOP, TOP); + 5, 5, 2, TOP, TOP, TOP, connectionToBus); SwitchNode dtrf16 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf16", false, false); SwitchNode btrf16 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf16", false, false); @@ -222,7 +225,7 @@ public void setUp() { vlb3.connectNode(btrf36, feeder3WTs6.get(vlb3)); Map feeder3WTs7 = ssb1.createFeeder3WT("trf7", vlb1, vlb2, vlb3, - 6, 4, 3, BOTTOM, TOP, BOTTOM); + 6, 4, 3, BOTTOM, TOP, BOTTOM, connectionToBus); SwitchNode dtrf17 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf17", false, false); SwitchNode btrf17 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf17", false, false); @@ -243,7 +246,7 @@ public void setUp() { vlb3.connectNode(btrf37, feeder3WTs7.get(vlb3)); Map feeder3WTs8 = ssb1.createFeeder3WT("trf8", vlb1, vlb2, vlb3, - 9, 6, 4, TOP, BOTTOM, TOP); + 9, 6, 4, TOP, BOTTOM, TOP, connectionToBus); SwitchNode dtrf18 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf18", false, false); SwitchNode btrf18 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf18", false, false); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase2.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase2.java index a06978a8c..b3924b8dc 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase2.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase2.java @@ -49,7 +49,7 @@ private void buildVl(String id) { SwitchNode d2 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d2", false, false); Node f = vlBuilder.createConnectivityNode("2"); SwitchNode b = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "b", false, false); - FeederNode load = vlBuilder.createLoad("l", 0, TOP); + FeederNode load = vlBuilder.createLoad("l", 0, TOP, false); vlBuilder.connectNode(bbs1, d1); vlBuilder.connectNode(d1, f); vlBuilder.connectNode(bbs2, d2); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase4.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase4.java index dc0f4b600..107dc4993 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase4.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase4.java @@ -54,7 +54,7 @@ public void setUp() { vlBuilder.connectNode(ss1, bbs11); BusNode bbs21 = vlBuilder.createBusBarSection("bbs2.1", 2, 1); - FeederNode la = vlBuilder.createLoad("la", 10, TOP); + FeederNode la = vlBuilder.createLoad("la", 10, TOP, false); SwitchNode ba = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "ba", false, false); ConnectivityNode fa = vlBuilder.createConnectivityNode("4"); SwitchNode da1 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "da1", false, false); @@ -70,7 +70,7 @@ public void setUp() { SwitchNode db2 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "db2", false, false); ConnectivityNode fb = vlBuilder.createConnectivityNode("6"); SwitchNode bb = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bb", false, false); - FeederNode lb = vlBuilder.createLoad("lb", 20, BOTTOM); + FeederNode lb = vlBuilder.createLoad("lb", 20, BOTTOM, false); vlBuilder.connectNode(lb, bb); vlBuilder.connectNode(bb, fb); vlBuilder.connectNode(fb, db1); @@ -80,7 +80,7 @@ public void setUp() { SwitchNode dc1 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dc1", false, false); SwitchNode bc = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bc", false, false); - FeederNode gc = vlBuilder.createGenerator("gc", 30, TOP); + FeederNode gc = vlBuilder.createGenerator("gc", 30, TOP, false); vlBuilder.connectNode(gc, bc); vlBuilder.connectNode(dc1, bbs12); vlBuilder.connectNode(bc, dc1); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase5H.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase5H.java index 077a65cb8..82dd1be12 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase5H.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase5H.java @@ -39,14 +39,14 @@ class TestCase5H extends AbstractTestCaseRaw { public void setUp() { VoltageLevelRawBuilder vlBuilder = rawGraphBuilder.createVoltageLevelBuilder("vl", 380); BusNode bbs = vlBuilder.createBusBarSection("bbs", 1, 1); - FeederNode la = vlBuilder.createLoad("la", 10, TOP); + FeederNode la = vlBuilder.createLoad("la", 10, TOP, false); SwitchNode ba = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "ba", false, false); SwitchNode da = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "da", false, false); vlBuilder.connectNode(la, ba); vlBuilder.connectNode(ba, da); vlBuilder.connectNode(da, bbs); - FeederNode lb = vlBuilder.createLoad("lb", 20, BOTTOM); + FeederNode lb = vlBuilder.createLoad("lb", 20, BOTTOM, false); SwitchNode bb = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bb", false, false); SwitchNode db = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "db", false, false); vlBuilder.connectNode(lb, bb); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase5V.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase5V.java index f2d6c6311..0dbf5537f 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase5V.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase5V.java @@ -36,14 +36,14 @@ class TestCase5V extends AbstractTestCaseRaw { public void setUp() { VoltageLevelRawBuilder vlBuilder = rawGraphBuilder.createVoltageLevelBuilder("vl", 380); BusNode bbs = vlBuilder.createBusBarSection("bbs", 1, 1); - FeederNode la = vlBuilder.createLoad("la", 20, TOP); + FeederNode la = vlBuilder.createLoad("la", 20, TOP, false); SwitchNode ba = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "ba", false, false); SwitchNode da = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "da", false, false); vlBuilder.connectNode(la, ba); vlBuilder.connectNode(ba, da); vlBuilder.connectNode(da, bbs); - FeederNode lb = vlBuilder.createLoad("lb", 10, TOP); + FeederNode lb = vlBuilder.createLoad("lb", 10, TOP, false); SwitchNode bb = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bb", false, false); SwitchNode db = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "db", false, false); ConnectivityNode fn = vlBuilder.createConnectivityNode("3"); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase7CellDetectionIssue.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase7CellDetectionIssue.java index 432f9ba92..e37f3e708 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase7CellDetectionIssue.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase7CellDetectionIssue.java @@ -32,7 +32,7 @@ class TestCase7CellDetectionIssue extends AbstractTestCaseRaw { public void setUp() { VoltageLevelRawBuilder vlBuilder = rawGraphBuilder.createVoltageLevelBuilder("vl", 380); BusNode bbs = vlBuilder.createBusBarSection("bbs", 1, 1); - FeederNode load = vlBuilder.createLoad("l", 0, TOP); + FeederNode load = vlBuilder.createLoad("l", 0, TOP, false); vlBuilder.connectNode(bbs, load); } diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCaseShuntArrangement.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCaseShuntArrangement.java index f83ccdbb6..cc44ce4e8 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCaseShuntArrangement.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCaseShuntArrangement.java @@ -31,9 +31,9 @@ public void setUp() { BusNode bbs1 = vlBuilder.createBusBarSection("bbs1", 1, 1); BusNode bbs21 = vlBuilder.createBusBarSection("bbs21", 2, 1); BusNode bbs22 = vlBuilder.createBusBarSection("bbs22", 2, 2); - FeederNode loadA = vlBuilder.createLoad("loadA", i++, TOP); - FeederNode load = vlBuilder.createLoad("l", i++, TOP); - FeederNode loadB = vlBuilder.createLoad("loadB", i++, TOP); + FeederNode loadA = vlBuilder.createLoad("loadA", i++, TOP, false); + FeederNode load = vlBuilder.createLoad("l", i++, TOP, false); + FeederNode loadB = vlBuilder.createLoad("loadB", i++, TOP, false); SwitchNode dA = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dA", false, false); SwitchNode dB1 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dB1", false, false); SwitchNode dB2 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dB2", false, false); @@ -71,7 +71,7 @@ public void setUp() { vlBuilder.connectNode(fShuntA, bShunt); vlBuilder.connectNode(fShuntB, bShunt); - FeederNode gen1 = vlBuilder.createGenerator("gen1", i++, TOP); + FeederNode gen1 = vlBuilder.createGenerator("gen1", i++, TOP, false); SwitchNode bg1 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bg1", false, false); vlBuilder.connectNode(gen1, bg1); ConnectivityNode fg1 = vlBuilder.createConnectivityNode("fg1"); @@ -83,7 +83,7 @@ public void setUp() { vlBuilder.connectNode(dg12, fg1); vlBuilder.connectNode(dg12, bbs22); - FeederNode loadC = vlBuilder.createLoad("loadC", i++, TOP); + FeederNode loadC = vlBuilder.createLoad("loadC", i++, TOP, false); SwitchNode bC = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bC", false, false); vlBuilder.connectNode(loadC, bC); ConnectivityNode fC = vlBuilder.createConnectivityNode("fC"); @@ -95,7 +95,7 @@ public void setUp() { vlBuilder.connectNode(dC2, fC); vlBuilder.connectNode(dC2, bbs22); - FeederNode loadD = vlBuilder.createLoad("loadD", i++, TOP); + FeederNode loadD = vlBuilder.createLoad("loadD", i++, TOP, false); SwitchNode bD = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bD", false, false); vlBuilder.connectNode(loadD, bD); ConnectivityNode fD = vlBuilder.createConnectivityNode("fD"); @@ -107,7 +107,7 @@ public void setUp() { vlBuilder.connectNode(dD2, fD); vlBuilder.connectNode(dD2, bbs22); - FeederNode gen2 = vlBuilder.createGenerator("gen2", i++, TOP); + FeederNode gen2 = vlBuilder.createGenerator("gen2", i++, TOP, false); SwitchNode bg2 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bg2", false, false); vlBuilder.connectNode(gen2, bg2); ConnectivityNode fg2 = vlBuilder.createConnectivityNode("fg2"); @@ -126,7 +126,7 @@ public void setUp() { BusNode bbs13 = vlBuilder.createBusBarSection("bbs13", 1, 3); BusNode bbs23 = vlBuilder.createBusBarSection("bbs23", 2, 3); - FeederNode loadE = vlBuilder.createLoad("loadE", i++, TOP); + FeederNode loadE = vlBuilder.createLoad("loadE", i++, TOP, false); SwitchNode bE = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bE", false, false); vlBuilder.connectNode(loadE, bE); ConnectivityNode fE = vlBuilder.createConnectivityNode("fE"); @@ -140,7 +140,7 @@ public void setUp() { ConnectivityNode commonFG = vlBuilder.createConnectivityNode("commonFG"); - FeederNode loadF = vlBuilder.createLoad("loadF", i++, TOP); + FeederNode loadF = vlBuilder.createLoad("loadF", i++, TOP, false); vlBuilder.connectNode(loadF, commonFG); SwitchNode bF = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bF", false, false); vlBuilder.connectNode(commonFG, bF); @@ -153,7 +153,7 @@ public void setUp() { vlBuilder.connectNode(dF2, fF); vlBuilder.connectNode(dF2, bbs23); - FeederNode loadG = vlBuilder.createLoad("loadG", i++, TOP); + FeederNode loadG = vlBuilder.createLoad("loadG", i++, TOP, false); ConnectivityNode fLoadG = vlBuilder.createConnectivityNode("fLoadG"); vlBuilder.connectNode(loadG, fLoadG); SwitchNode bFeederG = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bFeederG", false, false); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestInsertFictitiousNodesAtFeeder.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestInsertFictitiousNodesAtFeeder.java index 88e64af45..afe7d6f23 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestInsertFictitiousNodesAtFeeder.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestInsertFictitiousNodesAtFeeder.java @@ -48,7 +48,7 @@ public void setUp() { void testFeederOnBus() { VoltageLevelRawBuilder vlBuilder = rawGraphBuilder.createVoltageLevelBuilder("vl", 400); BusNode bbs = vlBuilder.createBusBarSection("bbs", 1, 1); - FeederNode feederLineNode = vlBuilder.createFeederLineNode("line", "otherVl", NodeSide.ONE, 0, null); + FeederNode feederLineNode = vlBuilder.createFeederLineNode("line", "otherVl", NodeSide.ONE, 0, null, false); vlBuilder.connectNode(bbs, feederLineNode); VoltageLevelGraph g = rawGraphBuilder.buildVoltageLevelGraph("vl"); voltageLevelGraphLayout(g); @@ -60,7 +60,7 @@ void testFeederOnBusDisconnector() { VoltageLevelRawBuilder vlBuilder = rawGraphBuilder.createVoltageLevelBuilder("vl", 400); BusNode bbs = vlBuilder.createBusBarSection("bbs", 1, 1); SwitchNode busDisconnector = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "busDisconnector", false, false); - FeederNode feederLineNode = vlBuilder.createFeederLineNode("line", "otherVl", NodeSide.ONE, 0, BOTTOM); + FeederNode feederLineNode = vlBuilder.createFeederLineNode("line", "otherVl", NodeSide.ONE, 0, BOTTOM, false); vlBuilder.connectNode(bbs, busDisconnector); vlBuilder.connectNode(busDisconnector, feederLineNode); VoltageLevelGraph g = rawGraphBuilder.buildVoltageLevelGraph("vl"); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestInternCellExplicitPosition.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestInternCellExplicitPosition.java index a1fa14179..af3299bce 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestInternCellExplicitPosition.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestInternCellExplicitPosition.java @@ -27,7 +27,7 @@ class TestInternCellExplicitPosition extends AbstractTestCaseRaw { public void setUp() { VoltageLevelRawBuilder vlBuilder = rawGraphBuilder.createVoltageLevelBuilder("vl", 380); BusNode bbs1 = vlBuilder.createBusBarSection("bbs1", 1, 1); - FeederNode load1 = vlBuilder.createLoad("l1", 3, TOP); + FeederNode load1 = vlBuilder.createLoad("l1", 3, TOP, false); SwitchNode dl1 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dl1", false, false); SwitchNode bl1 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bl1", false, false); vlBuilder.connectNode(bbs1, dl1); @@ -35,7 +35,7 @@ public void setUp() { vlBuilder.connectNode(bl1, load1); BusNode bbs2 = vlBuilder.createBusBarSection("bbs2", 2, 1); - FeederNode load2 = vlBuilder.createLoad("l2", 1, TOP); + FeederNode load2 = vlBuilder.createLoad("l2", 1, TOP, false); SwitchNode dl2 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dl2", false, false); SwitchNode bl2 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "bl2", false, false); vlBuilder.connectNode(bbs2, dl2); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestOrderConsistency.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestOrderConsistency.java index 68ae9c62a..63f339b56 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestOrderConsistency.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestOrderConsistency.java @@ -45,7 +45,7 @@ private void createCommons(String vlId, boolean middleLeft) { vlBuilder.connectNode(bbs21, ss2); vlBuilder.connectNode(bbs22, ss2); - FeederNode load1 = vlBuilder.createLoad("l1", 0, TOP); + FeederNode load1 = vlBuilder.createLoad("l1", 0, TOP, false); SwitchNode d11 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d11", false, false); SwitchNode d12 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d12", false, false); ConnectivityNode f1 = vlBuilder.createConnectivityNode("f1"); @@ -57,7 +57,7 @@ private void createCommons(String vlId, boolean middleLeft) { vlBuilder.connectNode(f1, b1); vlBuilder.connectNode(b1, load1); - FeederNode loadMiddle = vlBuilder.createLoad("l", 1, TOP); + FeederNode loadMiddle = vlBuilder.createLoad("l", 1, TOP, false); SwitchNode dMiddle1 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d1", false, false); SwitchNode dMiddle2 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d2", false, false); ConnectivityNode fMiddle = vlBuilder.createConnectivityNode("f"); @@ -74,7 +74,7 @@ private void createCommons(String vlId, boolean middleLeft) { vlBuilder.connectNode(fMiddle, bMiddle); vlBuilder.connectNode(bMiddle, loadMiddle); - FeederNode load2 = vlBuilder.createLoad("l2", 2, TOP); + FeederNode load2 = vlBuilder.createLoad("l2", 2, TOP, false); SwitchNode d21 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d21", false, false); SwitchNode d22 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d22", false, false); ConnectivityNode f2 = vlBuilder.createConnectivityNode("f2"); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestParallelFeedersOrders.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestParallelFeedersOrders.java index 56f513ccc..ddc49212e 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestParallelFeedersOrders.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestParallelFeedersOrders.java @@ -30,9 +30,9 @@ public void setUp() { SwitchNode b = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "b", false, false); SwitchNode d = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "d", false, false); ConnectivityNode f = vlBuilder.createConnectivityNode("f"); - FeederNode load1 = vlBuilder.createLoad("l1", 0, TOP); + FeederNode load1 = vlBuilder.createLoad("l1", 0, TOP, false); SwitchNode b2 = vlBuilder.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "b2", false, false); - FeederNode load2 = vlBuilder.createLoad("l2", 1, TOP); + FeederNode load2 = vlBuilder.createLoad("l2", 1, TOP, false); vlBuilder.connectNode(bbs, d); vlBuilder.connectNode(d, b); vlBuilder.connectNode(b, f); diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestUndefinedBlockExternCell.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestUndefinedBlockExternCell.java index 159f5b62b..c85b84547 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestUndefinedBlockExternCell.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestUndefinedBlockExternCell.java @@ -43,12 +43,12 @@ public void setUp() { vlBuilder.connectNode(d, f0); ConnectivityNode f1 = vlBuilder.createConnectivityNode("f1"); - FeederNode l1 = vlBuilder.createLoad("l1", 0, TOP); + FeederNode l1 = vlBuilder.createLoad("l1", 0, TOP, false); vlBuilder.connectNode(f0, f1); vlBuilder.connectNode(f1, l1); ConnectivityNode f2 = vlBuilder.createConnectivityNode("f2"); - FeederNode l2 = vlBuilder.createLoad("l2", 1, TOP); + FeederNode l2 = vlBuilder.createLoad("l2", 1, TOP, false); vlBuilder.connectNode(f1, f2); vlBuilder.connectNode(f2, l2); diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg index 99cca4a93..7fbb2791e 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestBatteries.svg @@ -222,7 +222,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg index 63a2fbeb1..d64cf0b9c 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCaseLoadBreakSwitch.svg @@ -160,7 +160,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -276,7 +276,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -321,7 +321,7 @@ - + From 1c1baa2ee608b1ccff28c922c049768b7a942ac8 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 13 Jun 2023 10:13:35 +0200 Subject: [PATCH 15/19] fix connectionToBus problem with 3wt Signed-off-by: Sophie Frasnedo --- .../sld/builders/NetworkGraphBuilder.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java index 2cd11b7e0..83b512b57 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java @@ -239,7 +239,7 @@ private FeederNode createFeederBranchNode(VoltageLevelGraph graph, Branch bra Branch.Side otherSide = side == Branch.Side.ONE ? Branch.Side.TWO : Branch.Side.ONE; VoltageLevel vlOtherSide = branch.getTerminal(otherSide).getVoltageLevel(); - return NodeFactory.createFeederLineNode(graph, nodeId, equipmentNameOrId, equipmentId, s, + return NodeFactory.createFeederBranchNode(graph, nodeId, equipmentNameOrId, equipmentId, componentTypeName, s, new VoltageLevelInfos(vlOtherSide.getId(), vlOtherSide.getNameOrId(), vlOtherSide.getNominalV()), !branch.getTerminal(side).isConnected()); } @@ -328,8 +328,6 @@ NodeSide.TWO, createVoltageLevelInfos(transformer.getLeg2().getTerminal()), FeederNode secondOtherLegNode = NodeFactory.createFeeder3WTLegNodeForVoltageLevelDiagram(graph, secondOtherLegNodeId, transformer.getNameOrId(), transformer.getId(), secondOtherLegSide, voltageLevelInfosBySide.get(secondOtherLegSide), false); - Map connectionToBus = new HashMap<>(); - // create middle node Middle3WTNode middleNode = NodeFactory.createMiddle3WTNode(graph, "MIDDLE_" + transformer.getId() + "_" + side.name(), transformer.getNameOrId(), transformer.getId(), vlLegSide, firstOtherLegNode, @@ -337,7 +335,7 @@ NodeSide.TWO, createVoltageLevelInfos(transformer.getLeg2().getTerminal()), voltageLevelInfosBySide.get(NodeSide.ONE), voltageLevelInfosBySide.get(NodeSide.TWO), voltageLevelInfosBySide.get(NodeSide.THREE), - connectionToBus); + connectedToBus3WT(transformer.getTerminal(ThreeWindingsTransformer.Side.ONE), transformer.getTerminal(ThreeWindingsTransformer.Side.TWO), transformer.getTerminal(ThreeWindingsTransformer.Side.THREE))); add3wtFeeder(middleNode, firstOtherLegNode, secondOtherLegNode, transformer.getTerminal(side)); } else { @@ -720,18 +718,20 @@ private void add3wtEdges(BaseGraph graph, List threeWi return (FeederNode) graph.getVoltageLevel(vlId).getNode(idLeg); }).collect(Collectors.toList()); - Map connectionToBus = new HashMap<>(); - Terminal terminal1 = transfo.getTerminal(ThreeWindingsTransformer.Side.ONE); - Terminal terminal2 = transfo.getTerminal(ThreeWindingsTransformer.Side.TWO); - Terminal terminal3 = transfo.getTerminal(ThreeWindingsTransformer.Side.THREE); - connectionToBus.put(terminal1.getBusBreakerView().getConnectableBus().getId(), terminal1.isConnected()); - connectionToBus.put(terminal2.getBusBreakerView().getConnectableBus().getId(), terminal2.isConnected()); - connectionToBus.put(terminal3.getBusBreakerView().getConnectableBus().getId(), terminal3.isConnected()); - - NodeFactory.createMiddle3WTNode(graph, transfo.getId(), transfo.getNameOrId(), transfo.getId(), feederNodes.get(0), feederNodes.get(1), feederNodes.get(2), connectionToBus); + NodeFactory.createMiddle3WTNode(graph, transfo.getId(), transfo.getNameOrId(), transfo.getId(), feederNodes.get(0), feederNodes.get(1), feederNodes.get(2), + connectedToBus3WT(transfo.getTerminal(ThreeWindingsTransformer.Side.ONE), transfo.getTerminal(ThreeWindingsTransformer.Side.TWO), transfo.getTerminal(ThreeWindingsTransformer.Side.THREE))); }); } + private static Map connectedToBus3WT(Terminal terminal1, Terminal terminal2, Terminal terminal3) { + Map connectionToBus = new HashMap<>(); + connectionToBus.put(terminal1.getBusBreakerView().getConnectableBus().getId(), terminal1.isConnected()); + connectionToBus.put(terminal2.getBusBreakerView().getConnectableBus().getId(), terminal2.isConnected()); + connectionToBus.put(terminal3.getBusBreakerView().getConnectableBus().getId(), terminal3.isConnected()); + return connectionToBus; + + } + private SwitchNode createSwitchNodeFromSwitch(VoltageLevelGraph graph, Switch aSwitch) { Objects.requireNonNull(graph); Objects.requireNonNull(aSwitch); From b198945ef6494f6183b54def946f1e5f984aaf9e Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 13 Jun 2023 10:16:06 +0200 Subject: [PATCH 16/19] reorganize connectionToBus tests Signed-off-by: Sophie Frasnedo --- .../TestDisconnectedComponentsBusBreaker.java | 72 +-- .../connectedComponentsBusBreaker.svg | 459 ++++++++++++++++++ .../disconnectedComponentsBusBreaker.svg | 459 ++++++++++++++++++ 3 files changed, 927 insertions(+), 63 deletions(-) create mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/connectedComponentsBusBreaker.svg create mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedComponentsBusBreaker.svg diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java index 89cdbb4a9..ff74cef48 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestDisconnectedComponentsBusBreaker.java @@ -42,9 +42,7 @@ public void setUp() { } @Test - void testDisconnectedLoad() { - network.getLoad("LD1").getTerminal().disconnect(); - // build graph + void testConnectedComponents() { graphBuilder = new NetworkGraphBuilder(network); VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); @@ -52,72 +50,20 @@ void testDisconnectedLoad() { voltageLevelGraphLayout(g); // write SVG and compare to reference - assertEquals(toString("/disconnectedLoadBusBreaker.svg"), - toSVG(g, "/disconnectedLoadBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); + assertEquals(toString("/connectedComponentsBusBreaker.svg"), + toSVG(g, "/connectedComponentsBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); } @Test - void testDisconnectedLine() { + void testDisconnectedComponents() { + network.getLoad("LD1").getTerminal().disconnect(); + network.getGenerator("G").getTerminal().disconnect(); network.getLine("L12").getTerminal(Branch.Side.ONE).disconnect(); - // build graph - graphBuilder = new NetworkGraphBuilder(network); - VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); - - // Run layout - voltageLevelGraphLayout(g); - - // write SVG and compare to reference - assertEquals(toString("/disconnectedLineBusBreaker.svg"), - toSVG(g, "/disconnectedLineBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); - } - - @Test - void testDisconnected2wt() { + network.getLine("L11").getTerminal(Branch.Side.ONE).disconnect(); network.getTwoWindingsTransformer("T12").getTerminal(Branch.Side.ONE).disconnect(); - // build graph - graphBuilder = new NetworkGraphBuilder(network); - VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); - - // Run layout - voltageLevelGraphLayout(g); - - // write SVG and compare to reference - assertEquals(toString("/disconnected2wtBusBreaker.svg"), - toSVG(g, "/disconnected2wtBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); - } - - @Test - void testDisconnectedInternal2wt() { network.getTwoWindingsTransformer("T11").getTerminal(Branch.Side.TWO).disconnect(); - // build graph - graphBuilder = new NetworkGraphBuilder(network); - VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); - - // Run layout - voltageLevelGraphLayout(g); - - // write SVG and compare to reference - assertEquals(toString("/disconnectedInternal2wtBusBreaker.svg"), - toSVG(g, "/disconnectedInternal2wtBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); - } - - @Test - void testDisconnected3wt() { network.getThreeWindingsTransformer("T3_12").getTerminal(ThreeWindingsTransformer.Side.TWO).disconnect(); - // build graph - graphBuilder = new NetworkGraphBuilder(network); - VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); - // Run layout - voltageLevelGraphLayout(g); - - // write SVG and compare to reference - assertEquals(toString("/disconnected3wtBusBreaker.svg"), - toSVG(g, "/disconnected3wtBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); - } - - @Test - void testOpenSwitch() { // build graph graphBuilder = new NetworkGraphBuilder(network); VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph(network.getVoltageLevel("VL1").getId()); @@ -126,8 +72,8 @@ void testOpenSwitch() { voltageLevelGraphLayout(g); // write SVG and compare to reference - assertEquals(toString("/openSwitchBusBreaker.svg"), - toSVG(g, "/openSwitchBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); + assertEquals(toString("/disconnectedComponentsBusBreaker.svg"), + toSVG(g, "/disconnectedComponentsBusBreaker.svg", getDefaultDiagramLabelProvider(), getDefaultDiagramStyleProvider())); } } diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/connectedComponentsBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/connectedComponentsBusBreaker.svg new file mode 100644 index 000000000..694628b4d --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/connectedComponentsBusBreaker.svg @@ -0,0 +1,459 @@ + + + + + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedComponentsBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedComponentsBusBreaker.svg new file mode 100644 index 000000000..b6d95716b --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedComponentsBusBreaker.svg @@ -0,0 +1,459 @@ + + + + + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + From 8896fe663defcc12595bbe332848f5d8078d029e Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 13 Jun 2023 10:29:15 +0200 Subject: [PATCH 17/19] remove useless test references Signed-off-by: Sophie Frasnedo --- .../resources/disconnected2wtBusBreaker.svg | 459 ------------------ .../resources/disconnected3wtBusBreaker.svg | 459 ------------------ .../disconnectedInternal2wtBusBreaker.svg | 459 ------------------ .../resources/disconnectedLineBusBreaker.svg | 459 ------------------ .../resources/disconnectedLoadBusBreaker.svg | 459 ------------------ .../test/resources/openSwitchBusBreaker.svg | 459 ------------------ 6 files changed, 2754 deletions(-) delete mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg delete mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg delete mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg delete mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg delete mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg delete mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/openSwitchBusBreaker.svg diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg deleted file mode 100644 index b634a619c..000000000 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected2wtBusBreaker.svg +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - B11 - - - - B12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LD1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - G - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg deleted file mode 100644 index 3665fba1c..000000000 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnected3wtBusBreaker.svg +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - B11 - - - - B12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LD1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - G - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg deleted file mode 100644 index e792d0ba4..000000000 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedInternal2wtBusBreaker.svg +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - B11 - - - - B12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LD1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - G - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg deleted file mode 100644 index 708861586..000000000 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLineBusBreaker.svg +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - B11 - - - - B12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LD1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - G - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg deleted file mode 100644 index 1f78701f7..000000000 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/disconnectedLoadBusBreaker.svg +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - B11 - - - - B12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LD1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - G - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/openSwitchBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/openSwitchBusBreaker.svg deleted file mode 100644 index 588c6073e..000000000 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/openSwitchBusBreaker.svg +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - B11 - - - - B12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LD1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - G - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T3_12 - - - T3_12 - - - - - - - From 1dda9b38cfd2875829dc42f02855bd532909e8f4 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 13 Jun 2023 10:29:59 +0200 Subject: [PATCH 18/19] update other test references Signed-off-by: Sophie Frasnedo --- .../resources/InternalBranchesBusBreaker.svg | 4 +-- .../NodeDecoratorsBranchStatusBusBreaker.svg | 4 +-- .../test/resources/TestTieLineSubstation.svg | 1 + .../resources/TestTieLineVoltageLevel.svg | 29 ++++++++++--------- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg index 588c6073e..694628b4d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/InternalBranchesBusBreaker.svg @@ -96,7 +96,7 @@ - + @@ -109,7 +109,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg index 7aa8478a1..52de44be5 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/NodeDecoratorsBranchStatusBusBreaker.svg @@ -165,7 +165,7 @@ - + @@ -178,7 +178,7 @@ - + diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineSubstation.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineSubstation.svg index 0f7d3ba83..244ddb09d 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineSubstation.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineSubstation.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineVoltageLevel.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineVoltageLevel.svg index 798a8fc7c..f9750110b 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineVoltageLevel.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineVoltageLevel.svg @@ -13,6 +13,7 @@ .sld-active-power .sld-label {dominant-baseline: mathematical} .sld-reactive-power .sld-label {dominant-baseline: mathematical} .sld-current .sld-label {dominant-baseline: mathematical} +.sld-bus-connection.sld-disconnected-bus-connection {stroke: var(--sld-vl-color, black); fill: white} /* ----------------------------------------------------------------------- */ /* File: topologicalBaseVoltages.css ------------------------------------- */ .sld-disconnected {--sld-vl-color: #808080} @@ -277,13 +278,13 @@ - + - + - + @@ -296,7 +297,7 @@ - + @@ -309,13 +310,13 @@ - + - + - + @@ -432,13 +433,13 @@ - + - + - + @@ -451,7 +452,7 @@ - + @@ -464,13 +465,13 @@ - + - + - + From 676ff8169ef7df8f58b727cad15e94f3f61afb08 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Mon, 19 Jun 2023 10:59:20 +0200 Subject: [PATCH 19/19] fix omissions for raw graph builders Signed-off-by: Sophie Frasnedo --- .../sld/builders/SubstationRawBuilder.java | 27 +++++++++++-------- .../sld/raw/TestCase11SubstationGraph.java | 26 +++++++++--------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java index 1d372521a..738524b4c 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/SubstationRawBuilder.java @@ -46,10 +46,10 @@ public Map createLine(String id, VoltageLeve } public Map createFeeder2WT(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2, int order1, int order2, - Direction direction1, Direction direction2) { + Direction direction1, Direction direction2, boolean disconnected1, boolean disconnected2) { Map f2WTNodes = new HashMap<>(); - FeederNode feeder2WtNode1 = vl1.createFeeder2wtLegNode(id, ONE, order1, direction1, false); - FeederNode feeder2WTNode2 = vl2.createFeeder2wtLegNode(id, TWO, order2, direction2, false); + FeederNode feeder2WtNode1 = vl1.createFeeder2wtLegNode(id, ONE, order1, direction1, disconnected1); + FeederNode feeder2WTNode2 = vl2.createFeeder2wtLegNode(id, TWO, order2, direction2, disconnected2); f2WTNodes.put(vl1, feeder2WtNode1); f2WTNodes.put(vl2, feeder2WTNode2); NodeFactory.createMiddle2WTNode(substationGraph, id, id, feeder2WtNode1, feeder2WTNode2, vl1.getVoltageLevelInfos(), vl2.getVoltageLevelInfos(), false); @@ -57,27 +57,32 @@ public Map createFeeder2WT(String id, Voltag } public Map createFeeder2WT(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2) { - return createFeeder2WT(id, vl1, vl2, 0, 0, null, null); + return createFeeder2WT(id, vl1, vl2, 0, 0, null, null, false, false); } public Map createFeeder3WT(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2, VoltageLevelRawBuilder vl3, - int order1, int order2, int order3, - Direction direction1, Direction direction2, Direction direction3, Map connectionToBus) { + int order1, int order2, int order3, + Direction direction1, Direction direction2, Direction direction3, boolean disconnected1, boolean disconnected2, boolean disconnected3) { Map f3WTNodes = new HashMap<>(); - FeederNode feeder3WTNode1 = vl1.createFeeder3wtLegNode(id, ONE, order1, direction1, false); - FeederNode feeder3WTNode2 = vl2.createFeeder3wtLegNode(id, TWO, order2, direction2, false); - FeederNode feeder3WTNode3 = vl3.createFeeder3wtLegNode(id, THREE, order3, direction3, false); + FeederNode feeder3WTNode1 = vl1.createFeeder3wtLegNode(id, ONE, order1, direction1, disconnected1); + FeederNode feeder3WTNode2 = vl2.createFeeder3wtLegNode(id, TWO, order2, direction2, disconnected2); + FeederNode feeder3WTNode3 = vl3.createFeeder3wtLegNode(id, THREE, order3, direction3, disconnected3); f3WTNodes.put(vl1, feeder3WTNode1); f3WTNodes.put(vl2, feeder3WTNode2); f3WTNodes.put(vl3, feeder3WTNode3); + Map connectionToBus = new HashMap<>(); + connectionToBus.put("1", !disconnected1); + connectionToBus.put("2", !disconnected2); + connectionToBus.put("3", !disconnected3); + // creation of the middle node and the edges linking the transformer leg nodes to this middle node NodeFactory.createMiddle3WTNode(substationGraph, id, id, id, feeder3WTNode1, feeder3WTNode2, feeder3WTNode3, connectionToBus); return f3WTNodes; } - public Map createFeeder3WT(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2, VoltageLevelRawBuilder vl3, Map connectionToBus) { - return createFeeder3WT(id, vl1, vl2, vl3, 0, 0, 0, null, null, null, connectionToBus); + public Map createFeeder3WT(String id, VoltageLevelRawBuilder vl1, VoltageLevelRawBuilder vl2, VoltageLevelRawBuilder vl3) { + return createFeeder3WT(id, vl1, vl2, vl3, 0, 0, 0, null, null, null, false, false, false); } } diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase11SubstationGraph.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase11SubstationGraph.java index 2e033745c..01de69852 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase11SubstationGraph.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/raw/TestCase11SubstationGraph.java @@ -11,14 +11,16 @@ import com.powsybl.sld.layout.PositionVoltageLevelLayoutFactory; import com.powsybl.sld.layout.VerticalSubstationLayoutFactory; import com.powsybl.sld.model.graphs.SubstationGraph; -import com.powsybl.sld.model.nodes.*; +import com.powsybl.sld.model.nodes.BusNode; +import com.powsybl.sld.model.nodes.FeederNode; +import com.powsybl.sld.model.nodes.SwitchNode; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import java.util.HashMap; import java.util.Map; -import static com.powsybl.sld.model.coordinate.Direction.*; +import static com.powsybl.sld.model.coordinate.Direction.BOTTOM; +import static com.powsybl.sld.model.coordinate.Direction.TOP; import static org.junit.jupiter.api.Assertions.assertEquals; /* @@ -125,7 +127,7 @@ public void setUp() { */ Map feeder2WTs1 = ssb1.createFeeder2WT("trf1", vlb1, vlb2, - 1, 1, TOP, TOP); + 1, 1, TOP, TOP, false, false); SwitchNode dtrf11 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf11", false, false); SwitchNode btrf11 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf11", false, false); vlb1.connectNode(bbs1, dtrf11); @@ -139,7 +141,7 @@ public void setUp() { vlb2.connectNode(btrf21, feeder2WTs1.get(vlb2)); Map feeder2WTs2 = ssb1.createFeeder2WT("trf2", vlb1, vlb2, - 11, 7, TOP, BOTTOM); + 11, 7, TOP, BOTTOM, false, false); SwitchNode dtrf12 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf12", false, false); SwitchNode btrf12 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf12", false, false); vlb1.connectNode(bbs2, dtrf12); @@ -153,7 +155,7 @@ public void setUp() { vlb2.connectNode(btrf22, feeder2WTs2.get(vlb2)); Map feeder2WTs3 = ssb1.createFeeder2WT("trf3", vlb1, vlb2, - 3, 8, BOTTOM, BOTTOM); + 3, 8, BOTTOM, BOTTOM, false, false); SwitchNode dtrf13 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf13", false, false); SwitchNode btrf13 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf13", false, false); @@ -168,7 +170,7 @@ public void setUp() { vlb2.connectNode(btrf23, feeder2WTs3.get(vlb2)); Map feeder2WTs4 = ssb1.createFeeder2WT("trf4", vlb1, vlb2, - 10, 3, BOTTOM, TOP); + 10, 3, BOTTOM, TOP, false, false); SwitchNode dtrf14 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf14", false, false); SwitchNode btrf14 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf14", false, false); @@ -183,7 +185,7 @@ public void setUp() { vlb2.connectNode(btrf24, feeder2WTs4.get(vlb2)); Map feeder2WTs5 = ssb1.createFeeder2WT("trf5", vlb1, vlb3, - 4, 1, TOP, BOTTOM); + 4, 1, TOP, BOTTOM, false, false); SwitchNode dtrf15 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf15", false, false); SwitchNode btrf15 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf15", false, false); @@ -201,10 +203,8 @@ public void setUp() { // */ - Map connectionToBus = new HashMap<>(); - Map feeder3WTs6 = ssb1.createFeeder3WT("trf6", vlb1, vlb2, vlb3, - 5, 5, 2, TOP, TOP, TOP, connectionToBus); + 5, 5, 2, TOP, TOP, TOP, false, false, false); SwitchNode dtrf16 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf16", false, false); SwitchNode btrf16 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf16", false, false); @@ -225,7 +225,7 @@ public void setUp() { vlb3.connectNode(btrf36, feeder3WTs6.get(vlb3)); Map feeder3WTs7 = ssb1.createFeeder3WT("trf7", vlb1, vlb2, vlb3, - 6, 4, 3, BOTTOM, TOP, BOTTOM, connectionToBus); + 6, 4, 3, BOTTOM, TOP, BOTTOM, false, false, false); SwitchNode dtrf17 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf17", false, false); SwitchNode btrf17 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf17", false, false); @@ -246,7 +246,7 @@ public void setUp() { vlb3.connectNode(btrf37, feeder3WTs7.get(vlb3)); Map feeder3WTs8 = ssb1.createFeeder3WT("trf8", vlb1, vlb2, vlb3, - 9, 6, 4, TOP, BOTTOM, TOP, connectionToBus); + 9, 6, 4, TOP, BOTTOM, TOP, false, false, false); SwitchNode dtrf18 = vlb1.createSwitchNode(SwitchNode.SwitchKind.DISCONNECTOR, "dtrf18", false, false); SwitchNode btrf18 = vlb1.createSwitchNode(SwitchNode.SwitchKind.BREAKER, "btrf18", false, false);