diff --git a/diagram-test/src/main/java/com/powsybl/diagram/test/Networks.java b/diagram-test/src/main/java/com/powsybl/diagram/test/Networks.java index ce9222e6b..ca53aba61 100644 --- a/diagram-test/src/main/java/com/powsybl/diagram/test/Networks.java +++ b/diagram-test/src/main/java/com/powsybl/diagram/test/Networks.java @@ -1942,4 +1942,35 @@ private static void addThreeFeedersPosition(Extendable extendable, feederAdder3.withName(feederName3).withDirection(direction3).add(); extensionAdder.add(); } + + public static Network createNetworkWithTieLineInVoltageLevel() { + Network network = createBusBreakerNetworkWithInternalBranches("tieLineWithinVoltageLevel", "test"); + network.getLine("L11").remove(); + String tieLineId = "B11_B12_1"; + String xnodeId = "XNODE1"; + DanglingLine b11xnode1 = network.getVoltageLevel("VL1").newDanglingLine().setId("B11_XNODE1").setR(1.5).setX(20.0).setG(0.0).setB(1.93E-4).setBus("B11").setUcteXnodeCode(xnodeId).add(); + DanglingLine xnode1b12 = network.getVoltageLevel("VL1").newDanglingLine().setId("XNODE1_B12").setR(1.5).setX(13.0).setG(0.0).setB(1.93E-4).setBus("B12").setUcteXnodeCode(xnodeId).add(); + network.newTieLine().setId(tieLineId).setDanglingLine1(b11xnode1.getId()).setDanglingLine2(xnode1b12.getId()).add(); + network.getTieLine(tieLineId).getDanglingLine1().getTerminal().setP(302.4440612792969).setQ(98.74027252197266); + network.getTieLine(tieLineId).getDanglingLine2().getTerminal().setP(-300.43389892578125).setQ(-137.18849182128906); + + return network; + + } + + public static Network createNetworkWithTieLineInSubstation() { + Network network = createBusBreakerNetworkWithInternalBranches("tieLineWithinSubstation", "test"); + network.getLine("L12").remove(); + String tieLineId = "B11_B21_1"; + String xnodeId = "XNODE1"; + DanglingLine b11xnode1 = network.getVoltageLevel("VL1").newDanglingLine().setId("B11_XNODE1").setR(1.5).setX(20.0).setG(0.0).setB(1.93E-4).setBus("B11").setUcteXnodeCode(xnodeId).add(); + DanglingLine xnode1b21 = network.getVoltageLevel("VL2").newDanglingLine().setId("XNODE1_B21").setR(1.5).setX(13.0).setG(0.0).setB(1.93E-4).setBus("B21").setUcteXnodeCode(xnodeId).add(); + network.newTieLine().setId(tieLineId).setDanglingLine1(b11xnode1.getId()).setDanglingLine2(xnode1b21.getId()).add(); + network.getTieLine(tieLineId).getDanglingLine1().getTerminal().setP(302.4440612792969).setQ(98.74027252197266); + network.getTieLine(tieLineId).getDanglingLine2().getTerminal().setP(-300.43389892578125).setQ(-137.18849182128906); + + return network; + + } + } diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/build/iidm/NetworkGraphBuilder.java b/network-area-diagram/src/main/java/com/powsybl/nad/build/iidm/NetworkGraphBuilder.java index 4764514c2..7241ef27d 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/build/iidm/NetworkGraphBuilder.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/build/iidm/NetworkGraphBuilder.java @@ -111,11 +111,19 @@ private void visitThreeWindingsTransformer(VoltageLevel vl, ThreeWindingsTransfo } private void visitDanglingLine(DanglingLine dl, Graph graph) { - BoundaryNode boundaryNode = new BoundaryNode(idProvider.createId(dl), dl.getId(), dl.getNameOrId()); - BusNode boundaryBusNode = new BoundaryBusNode(idProvider.createId(dl), dl.getId()); - boundaryNode.addBusNode(boundaryBusNode); - graph.addNode(boundaryNode); - addEdge(graph, dl, boundaryNode, boundaryBusNode); + if (!dl.isPaired()) { + BoundaryNode boundaryNode = new BoundaryNode(idProvider.createId(dl), dl.getId(), dl.getNameOrId()); + BusNode boundaryBusNode = new BoundaryBusNode(idProvider.createId(dl), dl.getId()); + boundaryNode.addBusNode(boundaryBusNode); + graph.addNode(boundaryNode); + addEdge(graph, dl, boundaryNode, boundaryBusNode); + } else { + dl.getTieLine().ifPresent(tieLine -> visitTieLine(tieLine, dl, graph)); + } + } + + private void visitTieLine(TieLine tieLine, DanglingLine dl, Graph graph) { + addEdge(graph, tieLine, dl.getTerminal().getVoltageLevel(), BranchEdge.TIE_LINE_EDGE); } private void visitHvdcConverterStation(HvdcConverterStation converterStation, Graph graph) { diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/model/BranchEdge.java b/network-area-diagram/src/main/java/com/powsybl/nad/model/BranchEdge.java index 53e55cac0..0669c6911 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/model/BranchEdge.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/model/BranchEdge.java @@ -33,6 +33,7 @@ public int getNum() { public static final String LINE_EDGE = "LineEdge"; public static final String HVDC_LINE_EDGE = "HvdcLineEdge"; public static final String DANGLING_LINE_EDGE = "DanglingLineEdge"; + public static final String TIE_LINE_EDGE = "TieLineEdge"; private List points1 = Collections.emptyList(); private List points2 = Collections.emptyList(); diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/svg/StyleProvider.java b/network-area-diagram/src/main/java/com/powsybl/nad/svg/StyleProvider.java index 66281c1ee..7e46e871e 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/svg/StyleProvider.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/svg/StyleProvider.java @@ -25,6 +25,7 @@ public interface StyleProvider { String HVDC_EDGE_CLASS = CLASSES_PREFIX + "hvdc-edge"; String THREE_WT_EDGES_CLASS = CLASSES_PREFIX + "3wt-edges"; String DANGLING_LINE_EDGE_CLASS = CLASSES_PREFIX + "dangling-line-edge"; + String TIE_LINE_EDGE_CLASS = CLASSES_PREFIX + "tie-line-edge"; String TEXT_EDGES_CLASS = CLASSES_PREFIX + "text-edges"; String EDGE_INFOS_CLASS = CLASSES_PREFIX + "edge-infos"; String EDGE_LABEL_CLASS = CLASSES_PREFIX + "edge-label"; diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/svg/iidm/AbstractVoltageStyleProvider.java b/network-area-diagram/src/main/java/com/powsybl/nad/svg/iidm/AbstractVoltageStyleProvider.java index 3e1f86db3..bf29d607f 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/svg/iidm/AbstractVoltageStyleProvider.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/svg/iidm/AbstractVoltageStyleProvider.java @@ -104,6 +104,8 @@ protected Optional getBaseVoltageStyle(Edge edge) { return Optional.of(HVDC_EDGE_CLASS); } else if (branchType.equals(BranchEdge.DANGLING_LINE_EDGE)) { return Optional.of(DANGLING_LINE_EDGE_CLASS); + } else if (branchType.equals(BranchEdge.TIE_LINE_EDGE)) { + return Optional.of(TIE_LINE_EDGE_CLASS); } } else if (edge instanceof ThreeWtEdge) { Terminal terminal = network.getThreeWindingsTransformer(edge.getEquipmentId()) diff --git a/network-area-diagram/src/main/resources/nominalStyle.css b/network-area-diagram/src/main/resources/nominalStyle.css index 96132b326..2379642e1 100644 --- a/network-area-diagram/src/main/resources/nominalStyle.css +++ b/network-area-diagram/src/main/resources/nominalStyle.css @@ -5,7 +5,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/main/resources/topologicalStyle.css b/network-area-diagram/src/main/resources/topologicalStyle.css index 5f16c695b..2d1406e4f 100644 --- a/network-area-diagram/src/main/resources/topologicalStyle.css +++ b/network-area-diagram/src/main/resources/topologicalStyle.css @@ -5,7 +5,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/java/com/powsybl/nad/svg/TieLineTest.java b/network-area-diagram/src/test/java/com/powsybl/nad/svg/TieLineTest.java new file mode 100644 index 000000000..d404c6042 --- /dev/null +++ b/network-area-diagram/src/test/java/com/powsybl/nad/svg/TieLineTest.java @@ -0,0 +1,51 @@ +/** + * 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/. + * SPDX-License-Identifier: MPL-2.0 + */ +package com.powsybl.nad.svg; + +import com.powsybl.iidm.network.Network; +import com.powsybl.iidm.network.test.EurostagTutorialExample1Factory; +import com.powsybl.nad.AbstractTest; +import com.powsybl.nad.layout.LayoutParameters; +import com.powsybl.nad.svg.iidm.DefaultLabelProvider; +import com.powsybl.nad.svg.iidm.NominalVoltageStyleProvider; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * @author Sophie Frasnedo + */ +class TieLineTest extends AbstractTest { + + @BeforeEach + void setup() { + setLayoutParameters(new LayoutParameters()); + setSvgParameters(new SvgParameters() + .setSvgWidthAndHeightAdded(true) + .setFixedWidth(800)); + } + + @Override + protected StyleProvider getStyleProvider(Network network) { + return new NominalVoltageStyleProvider(network); + } + + @Override + protected LabelProvider getLabelProvider(Network network) { + return new DefaultLabelProvider(network, getSvgParameters()) { + }; + } + + @Test + void testTieLine() { + Network network = EurostagTutorialExample1Factory.createWithTieLine(); + assertEquals(toString("/tie_line.svg"), generateSvgString(network, "/tie_line.svg")); + } + +} diff --git a/network-area-diagram/src/test/resources/3wt.svg b/network-area-diagram/src/test/resources/3wt.svg index 07d134530..0b06af3ac 100644 --- a/network-area-diagram/src/test/resources/3wt.svg +++ b/network-area-diagram/src/test/resources/3wt.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/3wt_disconnected.svg b/network-area-diagram/src/test/resources/3wt_disconnected.svg index f8c928428..17a2bc01e 100644 --- a/network-area-diagram/src/test/resources/3wt_disconnected.svg +++ b/network-area-diagram/src/test/resources/3wt_disconnected.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/3wt_disconnected_topological.svg b/network-area-diagram/src/test/resources/3wt_disconnected_topological.svg index a72e1b3a0..f544dea4b 100644 --- a/network-area-diagram/src/test/resources/3wt_disconnected_topological.svg +++ b/network-area-diagram/src/test/resources/3wt_disconnected_topological.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/3wt_partial.svg b/network-area-diagram/src/test/resources/3wt_partial.svg index 6b08a116d..257595028 100644 --- a/network-area-diagram/src/test/resources/3wt_partial.svg +++ b/network-area-diagram/src/test/resources/3wt_partial.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_118_bus.svg b/network-area-diagram/src/test/resources/IEEE_118_bus.svg index e2d7b0960..29a15ba24 100644 --- a/network-area-diagram/src/test/resources/IEEE_118_bus.svg +++ b/network-area-diagram/src/test/resources/IEEE_118_bus.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_118_bus_partial.svg b/network-area-diagram/src/test/resources/IEEE_118_bus_partial.svg index cc77faa24..f73a4d74b 100644 --- a/network-area-diagram/src/test/resources/IEEE_118_bus_partial.svg +++ b/network-area-diagram/src/test/resources/IEEE_118_bus_partial.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_118_bus_partial_non_connected.svg b/network-area-diagram/src/test/resources/IEEE_118_bus_partial_non_connected.svg index eec1fb3c8..ca7ae5b5c 100644 --- a/network-area-diagram/src/test/resources/IEEE_118_bus_partial_non_connected.svg +++ b/network-area-diagram/src/test/resources/IEEE_118_bus_partial_non_connected.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus.svg b/network-area-diagram/src/test/resources/IEEE_14_bus.svg index b45fe965a..8d7b0fd40 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus.svg +++ b/network-area-diagram/src/test/resources/IEEE_14_bus.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_disconnection.svg b/network-area-diagram/src/test/resources/IEEE_14_bus_disconnection.svg index 511b73421..d83165aa3 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_disconnection.svg +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_disconnection.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious.svg b/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious.svg index d14949a2c..8ec8eade1 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious.svg +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_text_nodes.svg b/network-area-diagram/src/test/resources/IEEE_14_bus_text_nodes.svg index 551b2da9b..5dfc59336 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_text_nodes.svg +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_text_nodes.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_14_id_prefixed.svg b/network-area-diagram/src/test/resources/IEEE_14_id_prefixed.svg index f10b9c7da..64adb9bc8 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_id_prefixed.svg +++ b/network-area-diagram/src/test/resources/IEEE_14_id_prefixed.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_24_bus.svg b/network-area-diagram/src/test/resources/IEEE_24_bus.svg index 1d71e79e1..878d85baa 100644 --- a/network-area-diagram/src/test/resources/IEEE_24_bus.svg +++ b/network-area-diagram/src/test/resources/IEEE_24_bus.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_30_bus.svg b/network-area-diagram/src/test/resources/IEEE_30_bus.svg index ab390b3fc..bdc95bc02 100644 --- a/network-area-diagram/src/test/resources/IEEE_30_bus.svg +++ b/network-area-diagram/src/test/resources/IEEE_30_bus.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/IEEE_57_bus.svg b/network-area-diagram/src/test/resources/IEEE_57_bus.svg index 09d0923bd..ac5091f59 100644 --- a/network-area-diagram/src/test/resources/IEEE_57_bus.svg +++ b/network-area-diagram/src/test/resources/IEEE_57_bus.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/current_limits.svg b/network-area-diagram/src/test/resources/current_limits.svg index 0241847f7..452ec050d 100644 --- a/network-area-diagram/src/test/resources/current_limits.svg +++ b/network-area-diagram/src/test/resources/current_limits.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/dangling_line_connected.svg b/network-area-diagram/src/test/resources/dangling_line_connected.svg index de9ca7d2a..2fbe540e3 100644 --- a/network-area-diagram/src/test/resources/dangling_line_connected.svg +++ b/network-area-diagram/src/test/resources/dangling_line_connected.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/dangling_line_disconnected.svg b/network-area-diagram/src/test/resources/dangling_line_disconnected.svg index 7f7fb9931..f5d7a6a4a 100644 --- a/network-area-diagram/src/test/resources/dangling_line_disconnected.svg +++ b/network-area-diagram/src/test/resources/dangling_line_disconnected.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/detailed_text_node.svg b/network-area-diagram/src/test/resources/detailed_text_node.svg index 7d18b2123..aab44cf84 100644 --- a/network-area-diagram/src/test/resources/detailed_text_node.svg +++ b/network-area-diagram/src/test/resources/detailed_text_node.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/detailed_text_node_no_legend.svg b/network-area-diagram/src/test/resources/detailed_text_node_no_legend.svg index 6d39e0b18..ed2c0ea10 100644 --- a/network-area-diagram/src/test/resources/detailed_text_node_no_legend.svg +++ b/network-area-diagram/src/test/resources/detailed_text_node_no_legend.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/diamond-spring-repulsion-factor-0.0.svg b/network-area-diagram/src/test/resources/diamond-spring-repulsion-factor-0.0.svg index 6f7bda9fa..76a871cd4 100644 --- a/network-area-diagram/src/test/resources/diamond-spring-repulsion-factor-0.0.svg +++ b/network-area-diagram/src/test/resources/diamond-spring-repulsion-factor-0.0.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/diamond-spring-repulsion-factor-0.2.svg b/network-area-diagram/src/test/resources/diamond-spring-repulsion-factor-0.2.svg index 4000cd23e..833ffccd0 100644 --- a/network-area-diagram/src/test/resources/diamond-spring-repulsion-factor-0.2.svg +++ b/network-area-diagram/src/test/resources/diamond-spring-repulsion-factor-0.2.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/edge_info_current.svg b/network-area-diagram/src/test/resources/edge_info_current.svg index 4f4e0b128..eb70831f2 100644 --- a/network-area-diagram/src/test/resources/edge_info_current.svg +++ b/network-area-diagram/src/test/resources/edge_info_current.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/edge_info_double_labels.svg b/network-area-diagram/src/test/resources/edge_info_double_labels.svg index 32ba2cb88..57abbdcf4 100644 --- a/network-area-diagram/src/test/resources/edge_info_double_labels.svg +++ b/network-area-diagram/src/test/resources/edge_info_double_labels.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/edge_info_missing_label.svg b/network-area-diagram/src/test/resources/edge_info_missing_label.svg index e12016138..9234b3b07 100644 --- a/network-area-diagram/src/test/resources/edge_info_missing_label.svg +++ b/network-area-diagram/src/test/resources/edge_info_missing_label.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/edge_info_perpendicular_label.svg b/network-area-diagram/src/test/resources/edge_info_perpendicular_label.svg index 76072dbac..7b696a091 100644 --- a/network-area-diagram/src/test/resources/edge_info_perpendicular_label.svg +++ b/network-area-diagram/src/test/resources/edge_info_perpendicular_label.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/edge_info_reactive_power.svg b/network-area-diagram/src/test/resources/edge_info_reactive_power.svg index 01f979db9..5760c47c2 100644 --- a/network-area-diagram/src/test/resources/edge_info_reactive_power.svg +++ b/network-area-diagram/src/test/resources/edge_info_reactive_power.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/edge_info_shift.svg b/network-area-diagram/src/test/resources/edge_info_shift.svg index 4f81e1047..305612add 100644 --- a/network-area-diagram/src/test/resources/edge_info_shift.svg +++ b/network-area-diagram/src/test/resources/edge_info_shift.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/edge_with_id.svg b/network-area-diagram/src/test/resources/edge_with_id.svg index 4640ca815..a8a0e3705 100644 --- a/network-area-diagram/src/test/resources/edge_with_id.svg +++ b/network-area-diagram/src/test/resources/edge_with_id.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/edge_without_id.svg b/network-area-diagram/src/test/resources/edge_without_id.svg index de9ca7d2a..2fbe540e3 100644 --- a/network-area-diagram/src/test/resources/edge_without_id.svg +++ b/network-area-diagram/src/test/resources/edge_without_id.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/hvdc-vl-depth-1.svg b/network-area-diagram/src/test/resources/hvdc-vl-depth-1.svg index b0025be1e..8271577cb 100644 --- a/network-area-diagram/src/test/resources/hvdc-vl-depth-1.svg +++ b/network-area-diagram/src/test/resources/hvdc-vl-depth-1.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/hvdc.svg b/network-area-diagram/src/test/resources/hvdc.svg index 2734ca61b..aff832889 100644 --- a/network-area-diagram/src/test/resources/hvdc.svg +++ b/network-area-diagram/src/test/resources/hvdc.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/parallel_transformers.svg b/network-area-diagram/src/test/resources/parallel_transformers.svg index 5676eb35d..68f9b4a3d 100644 --- a/network-area-diagram/src/test/resources/parallel_transformers.svg +++ b/network-area-diagram/src/test/resources/parallel_transformers.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/simple-eu-loop100.svg b/network-area-diagram/src/test/resources/simple-eu-loop100.svg index 0e42dd7ea..7906af00e 100644 --- a/network-area-diagram/src/test/resources/simple-eu-loop100.svg +++ b/network-area-diagram/src/test/resources/simple-eu-loop100.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/simple-eu-loop80.svg b/network-area-diagram/src/test/resources/simple-eu-loop80.svg index 76f654178..0f6618c6e 100644 --- a/network-area-diagram/src/test/resources/simple-eu-loop80.svg +++ b/network-area-diagram/src/test/resources/simple-eu-loop80.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/simple-eu.svg b/network-area-diagram/src/test/resources/simple-eu.svg index 0cd8ff7e2..c6a913f1f 100644 --- a/network-area-diagram/src/test/resources/simple-eu.svg +++ b/network-area-diagram/src/test/resources/simple-eu.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/tie_line.svg b/network-area-diagram/src/test/resources/tie_line.svg new file mode 100644 index 000000000..bb1751345 --- /dev/null +++ b/network-area-diagram/src/test/resources/tie_line.svg @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 606 + + + + + + + + + + + + -605 + + + + + + + + + + + + + + + + + + 302 + + + + + + + + + + + + -300 + + + + + + + + + + + + + + + 302 + + + + + + + + + + + + -300 + + + + + + + + + + + + + + + 601 + + + + + + + + + + + + -600 + + + + + + + + + + + + + + + + + +
+
VLGEN
+ + + + + +
+
+
24.5 kV / 2.3°
+
+
+ +
+
VLHV1
+ + + + + +
+
+
402.1 kV / 0.0°
+
+
+ +
+
VLHV2
+ + + + + +
+
+
390.0 kV / -3.5°
+
+
+ +
+
VLLOAD
+ + + + + +
+
+
147.6 kV / -9.6°
+
+
+
+
diff --git a/network-area-diagram/src/test/resources/vl_description_id.svg b/network-area-diagram/src/test/resources/vl_description_id.svg index 583868282..1cfe45468 100644 --- a/network-area-diagram/src/test/resources/vl_description_id.svg +++ b/network-area-diagram/src/test/resources/vl_description_id.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/vl_description_substation.svg b/network-area-diagram/src/test/resources/vl_description_substation.svg index 879ea2591..030005fed 100644 --- a/network-area-diagram/src/test/resources/vl_description_substation.svg +++ b/network-area-diagram/src/test/resources/vl_description_substation.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/vl_description_substation_id.svg b/network-area-diagram/src/test/resources/vl_description_substation_id.svg index 04e8df6b5..133300841 100644 --- a/network-area-diagram/src/test/resources/vl_description_substation_id.svg +++ b/network-area-diagram/src/test/resources/vl_description_substation_id.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {stroke: var(--nad-vl-color, lightgrey); stroke-width: 1; fill: none} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/network-area-diagram/src/test/resources/voltage_limits.svg b/network-area-diagram/src/test/resources/voltage_limits.svg index 8134669bb..6fa33b987 100644 --- a/network-area-diagram/src/test/resources/voltage_limits.svg +++ b/network-area-diagram/src/test/resources/voltage_limits.svg @@ -8,7 +8,7 @@ .nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightblue)} .nad-vl-nodes circle.nad-unknown-busnode {stroke: lightgrey; stroke-width: 5; stroke-dasharray: 5,5; fill: none} .nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40} -.nad-dangling-line-edge {fill: var(--nad-vl-color, lighgrey)} +.nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7} .nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none} .nad-state-out .nad-arrow-in {visibility: hidden} .nad-state-in .nad-arrow-out {visibility: hidden} diff --git a/pom.xml b/pom.xml index 038d1db3c..78b17161d 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,7 @@ **/generated/**/* - 5.2.0 + 5.3.0 diff --git a/single-line-diagram/single-line-diagram-cgmes/single-line-diagram-cgmes-layout/pom.xml b/single-line-diagram/single-line-diagram-cgmes/single-line-diagram-cgmes-layout/pom.xml index 35d05f720..c65168d85 100644 --- a/single-line-diagram/single-line-diagram-cgmes/single-line-diagram-cgmes-layout/pom.xml +++ b/single-line-diagram/single-line-diagram-cgmes/single-line-diagram-cgmes-layout/pom.xml @@ -47,6 +47,11 @@ powsybl-diagram-test test + + com.powsybl + powsybl-iidm-test + test + com.powsybl powsybl-iidm-impl 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 f9d1f8922..74e0d0a76 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 @@ -114,7 +114,7 @@ private void buildGraph(VoltageLevelGraph graph, VoltageLevel vl) { } private void addBranchEdges(VoltageLevelGraph graph, VoltageLevel vl) { - addLineEdges(graph, vl.getConnectableStream(Line.class) + addBranchEdges(graph, vl.getConnectableStream(Line.class) .filter(NetworkGraphBuilder::isInternalToVoltageLevel) .collect(Collectors.toList())); @@ -127,6 +127,12 @@ private void addBranchEdges(VoltageLevelGraph graph, VoltageLevel vl) { && t.getLeg2().getTerminal().getVoltageLevel().getId().equals(t.getLeg3().getTerminal().getVoltageLevel().getId())) .collect(Collectors.toList())); + addBranchEdges(graph, vl.getConnectableStream(DanglingLine.class) + .map(DanglingLine::getTieLine) + .flatMap(Optional::stream) + .filter(NetworkGraphBuilder::isInternalToVoltageLevel) + .collect(Collectors.toList())); + } @Override @@ -167,7 +173,7 @@ private void buildSubstationGraph(SubstationGraph graph, Substation substation) } private void addSnakeEdges(SubstationGraph graph, Substation substation) { - addLineEdges(graph, substation.getVoltageLevelStream() + addBranchEdges(graph, substation.getVoltageLevelStream() .flatMap(voltageLevel -> voltageLevel.getConnectableStream(Line.class)) .filter(NetworkGraphBuilder::isInternalToSubstation) .filter(NetworkGraphBuilder::isNotInternalToVoltageLevel) @@ -180,6 +186,14 @@ private void addSnakeEdges(SubstationGraph graph, Substation substation) { add3wtEdges(graph, substation.getThreeWindingsTransformerStream() .filter(NetworkGraphBuilder::isNotInternalToVoltageLevel) .collect(Collectors.toList())); + + addBranchEdges(graph, substation.getVoltageLevelStream() + .flatMap(voltageLevel -> voltageLevel.getConnectableStream(DanglingLine.class)) + .map(DanglingLine::getTieLine) + .flatMap(Optional::stream) + .filter(NetworkGraphBuilder::isInternalToSubstation) + .filter(NetworkGraphBuilder::isNotInternalToVoltageLevel) + .collect(Collectors.toList())); } static boolean isCapacitor(ShuntCompensator sc) { @@ -209,13 +223,22 @@ protected abstract void add3wtFeeder(Middle3WTNode middleNode, FeederNode firstO FeederNode secondOtherLegNode, Terminal terminal); private FeederNode createFeederLineNode(VoltageLevelGraph graph, Line line, Branch.Side side) { - String nodeId = line.getId() + "_" + side.name(); - String equipmentNameOrId = line.getNameOrId(); - String equipmentId = line.getId(); + return createFeederBranchNode(graph, line, side, LINE); + } + + private FeederNode createFeederTieLineNode(VoltageLevelGraph graph, TieLine tieLine, Branch.Side side) { + return createFeederBranchNode(graph, tieLine, side, TIE_LINE); + } + + private FeederNode createFeederBranchNode(VoltageLevelGraph graph, Branch branch, Branch.Side side, String componentTypeName) { + String nodeId = branch.getId() + "_" + side.name(); + String equipmentNameOrId = branch.getNameOrId(); + String equipmentId; + equipmentId = branch.getId(); NodeSide s = NodeSide.valueOf(side.name()); Branch.Side otherSide = side == Branch.Side.ONE ? Branch.Side.TWO : Branch.Side.ONE; - VoltageLevel vlOtherSide = line.getTerminal(otherSide).getVoltageLevel(); - return NodeFactory.createFeederLineNode(graph, nodeId, equipmentNameOrId, equipmentId, s, + VoltageLevel vlOtherSide = branch.getTerminal(otherSide).getVoltageLevel(); + return NodeFactory.createFeederBranchNode(graph, nodeId, equipmentNameOrId, equipmentId, componentTypeName, s, new VoltageLevelInfos(vlOtherSide.getId(), vlOtherSide.getNameOrId(), vlOtherSide.getNominalV())); } @@ -346,7 +369,17 @@ public void visitShuntCompensator(ShuntCompensator sc) { @Override public void visitDanglingLine(DanglingLine dl) { - addTerminalNode(NodeFactory.createDanglingLine(graph, dl.getId(), dl.getNameOrId()), dl.getTerminal()); + if (!dl.isPaired()) { + addTerminalNode(NodeFactory.createDanglingLine(graph, dl.getId(), dl.getNameOrId()), dl.getTerminal()); + } else { + dl.getTieLine().ifPresent(tieLine -> visitTieLine(tieLine, dl, graph)); + } + } + + private void visitTieLine(TieLine tieLine, DanglingLine dl, Graph graph) { + Branch.Side side = tieLine.getSide(dl.getTerminal()); + Terminal terminal = dl.getTerminal(); + addTerminalNode(createFeederTieLineNode((VoltageLevelGraph) graph, tieLine, side), terminal); } @Override @@ -611,12 +644,12 @@ private void handleGraphPostProcessors(VoltageLevelGraph graph) { } } - private void addLineEdges(Graph graph, List lines) { + private void addBranchEdges(Graph graph, List> branches) { Set linesIds = new HashSet<>(); - lines.forEach(line -> { - if (!linesIds.contains(line.getId())) { - Terminal t1 = line.getTerminal1(); - Terminal t2 = line.getTerminal2(); + branches.forEach(branch -> { + if (!linesIds.contains(branch.getId())) { + Terminal t1 = branch.getTerminal1(); + Terminal t2 = branch.getTerminal2(); VoltageLevel vl1 = t1.getVoltageLevel(); VoltageLevel vl2 = t2.getVoltageLevel(); @@ -624,10 +657,10 @@ private void addLineEdges(Graph graph, List lines) { VoltageLevelGraph g1 = graph.getVoltageLevel(vl1.getId()); VoltageLevelGraph g2 = graph.getVoltageLevel(vl2.getId()); - Node n1 = g1.getNode(line.getId() + "_" + line.getSide(t1).name()); - Node n2 = g2.getNode(line.getId() + "_" + line.getSide(t2).name()); - graph.addLineEdge(line.getId(), n1, n2); - linesIds.add(line.getId()); + Node n1 = g1.getNode(branch.getId() + "_" + branch.getSide(t1).name()); + Node n2 = g2.getNode(branch.getId() + "_" + branch.getSide(t2).name()); + graph.addLineEdge(branch.getId(), n1, n2); + linesIds.add(branch.getId()); } }); } @@ -677,7 +710,7 @@ private void add3wtEdges(BaseGraph graph, List threeWi }).collect(Collectors.toList()); NodeFactory.createMiddle3WTNode(graph, transfo.getId(), transfo.getNameOrId(), - feederNodes.get(0), feederNodes.get(1), feederNodes.get(2)); + feederNodes.get(0), feederNodes.get(1), feederNodes.get(2)); }); } @@ -733,7 +766,7 @@ private void buildZoneGraph(ZoneGraph zoneGraph, List zone) { zoneGraph.addSubstation(sGraph); }); // Add snake edges between different substations in the same zone - addLineEdges(zoneGraph, zone.stream().flatMap(Substation::getVoltageLevelStream) + addBranchEdges(zoneGraph, zone.stream().flatMap(Substation::getVoltageLevelStream) .flatMap(voltageLevel -> voltageLevel.getConnectableStream(Line.class)) .filter(NetworkGraphBuilder::isNotInternalToSubstation) .collect(Collectors.toList())); diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/library/ComponentTypeName.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/library/ComponentTypeName.java index 1ce98b408..50f1c2be7 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/library/ComponentTypeName.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/library/ComponentTypeName.java @@ -32,6 +32,7 @@ public final class ComponentTypeName { public static final String THREE_WINDINGS_TRANSFORMER_LEG = "THREE_WINDINGS_TRANSFORMER_LEG"; public static final String VSC_CONVERTER_STATION = "VSC_CONVERTER_STATION"; public static final String DANGLING_LINE = "DANGLING_LINE"; + public static final String TIE_LINE = "TIE_LINE"; public static final String PHASE_SHIFT_TRANSFORMER = "PHASE_SHIFT_TRANSFORMER"; public static final String PHASE_SHIFT_TRANSFORMER_LEG = "PHASE_SHIFT_TRANSFORMER_LEG"; public static final String UNKNOWN_COMPONENT = "UNKNOWN_COMPONENT"; diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/library/ResourcesComponentLibrary.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/library/ResourcesComponentLibrary.java index ec8d14843..65b26e122 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/library/ResourcesComponentLibrary.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/library/ResourcesComponentLibrary.java @@ -192,6 +192,7 @@ protected boolean isDisplayed(String componentType) { componentType.equals(ComponentTypeName.TWO_WINDINGS_TRANSFORMER_LEG) || componentType.equals(ComponentTypeName.THREE_WINDINGS_TRANSFORMER_LEG) || componentType.equals(ComponentTypeName.LINE) || + componentType.equals(ComponentTypeName.TIE_LINE) || componentType.equals(ComponentTypeName.DANGLING_LINE) || componentType.equals(ComponentTypeName.BUSBAR_SECTION)); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultDiagramLabelProvider.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultDiagramLabelProvider.java index 9f824e2a2..e40786c00 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultDiagramLabelProvider.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultDiagramLabelProvider.java @@ -134,7 +134,10 @@ public List getNodeDecorators(Node node, Direction direction) { switch (feederNode.getFeeder().getFeederType()) { case BRANCH: case TWO_WINDINGS_TRANSFORMER_LEG: - addBranchStatusDecorator(nodeDecorators, node, direction, network.getBranch(feederNode.getEquipmentId())); + Connectable connectable = network.getConnectable(feederNode.getEquipmentId()); + if (connectable != null) { + addBranchStatusDecorator(nodeDecorators, node, direction, connectable); + } break; case THREE_WINDINGS_TRANSFORMER_LEG: // if this is an outer leg (leg corresponding to another voltage level), we display the decorator on the inner 3wt @@ -209,7 +212,7 @@ private List buildFeederInfos(Branch branch, Branch.Side side) { private List buildFeederInfos(HvdcLine hvdcLine, NodeSide side) { HvdcConverterStation hvdcConverterStation = side == NodeSide.ONE ? hvdcLine.getConverterStation1() - : hvdcLine.getConverterStation2(); + : hvdcLine.getConverterStation2(); return this.buildFeederInfos(hvdcConverterStation.getTerminal()); } diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestTieLine.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestTieLine.java new file mode 100644 index 000000000..d4964f4ae --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestTieLine.java @@ -0,0 +1,61 @@ +/** + * 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.diagram.test.Networks; +import com.powsybl.iidm.network.Network; +import com.powsybl.sld.builders.NetworkGraphBuilder; +import com.powsybl.sld.layout.SmartVoltageLevelLayoutFactory; +import com.powsybl.sld.layout.VerticalSubstationLayoutFactory; +import com.powsybl.sld.model.graphs.SubstationGraph; +import com.powsybl.sld.model.graphs.VoltageLevelGraph; +import com.powsybl.sld.svg.DefaultDiagramLabelProvider; +import com.powsybl.sld.svg.styles.iidm.TopologicalStyleProvider; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * @author Sophie Frasnedo + */ +class TestTieLine extends AbstractTestCaseIidm { + + @Override + public void setUp() throws IOException { + } + + @Test + void testTieLineInVoltageLevel() { + Network network = Networks.createNetworkWithTieLineInVoltageLevel(); + graphBuilder = new NetworkGraphBuilder(network); + // build graph + VoltageLevelGraph g = graphBuilder.buildVoltageLevelGraph("VL1"); + + // Run layout + new SmartVoltageLevelLayoutFactory(network).create(g).run(layoutParameters); + + // write SVG and compare to reference + assertEquals(toString("/TestTieLineVoltageLevel.svg"), toSVG(g, "/TestTieLineVoltageLevel.svg", new DefaultDiagramLabelProvider(network, componentLibrary, layoutParameters), new TopologicalStyleProvider(network))); + } + + @Test + void testTieLineInSubstation() { + Network network = Networks.createNetworkWithTieLineInSubstation(); + graphBuilder = new NetworkGraphBuilder(network); + // build graph + SubstationGraph g = graphBuilder.buildSubstationGraph("S1"); + + // Run layout + new VerticalSubstationLayoutFactory().create(g, new SmartVoltageLevelLayoutFactory(network)).run(layoutParameters); + + // write SVG and compare to reference + assertEquals(toString("/TestTieLineSubstation.svg"), toSVG(g, "/TestTieLineSubstation.svg", new DefaultDiagramLabelProvider(network, componentLibrary, layoutParameters), new TopologicalStyleProvider(network))); + } + +} 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 new file mode 100644 index 000000000..0f7d3ba83 --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineSubstation.svg @@ -0,0 +1,656 @@ + + + + + + + VL1 + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + + + + + + + + + + + + + + 302 + + + + + 99 + + + + + + + + + + + + B11_B21_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + + + + + VL2 + + + + B21 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + + + + + + + + + + + + + + -137 + + + + + -300 + + + + + + + + + + + + B11_B21_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..798a8fc7c --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestTieLineVoltageLevel.svg @@ -0,0 +1,522 @@ + + + + + + + + B11 + + + + B12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LD1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + 99 + + + + + 302 + + + + + + + + + + + + B11_B12_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T3_12 + + + T3_12 + + + + + + + + + + + + + + + + -137 + + + + + -300 + + + + + + + + + + + + B11_B12_1 + + + + + + +