From 400db93ac5af3ee84eaa022ec0b158672e7cc975 Mon Sep 17 00:00:00 2001 From: "massimo.ferraro" Date: Fri, 13 Dec 2024 16:54:13 +0100 Subject: [PATCH 1/3] Add fictitious flag to node metadata in network area diagram Signed-off-by: massimo.ferraro --- .../nad/svg/metadata/DiagramMetadata.java | 4 +- .../nad/svg/metadata/NodeMetadata.java | 9 +- .../powsybl/nad/svg/DiagramMetadataTest.java | 26 +- .../src/test/resources/3wt_metadata.json | 12 +- .../IEEE_14_bus_fictitious_metadata.json | 502 ++++++++++++++++++ .../IEEE_14_bus_voltage_filter2_metadata.json | 42 +- .../IEEE_14_bus_voltage_filter5_metadata.json | 27 +- ...IEEE_14_bus_voltage_nofilter_metadata.json | 42 +- .../src/test/resources/hvdc_metadata.json | 15 +- 9 files changed, 624 insertions(+), 55 deletions(-) create mode 100644 network-area-diagram/src/test/resources/IEEE_14_bus_fictitious_metadata.json diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java index 2f68946c3..0ed74df24 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java @@ -24,6 +24,7 @@ import com.powsybl.diagram.metadata.AbstractMetadata; import com.powsybl.nad.layout.LayoutParameters; import com.powsybl.nad.model.Graph; +import com.powsybl.nad.model.VoltageLevelNode; import com.powsybl.nad.svg.SvgParameters; /** @@ -107,7 +108,8 @@ public DiagramMetadata addMetadata(Graph graph) { getPrefixedId(node.getDiagramId()), node.getEquipmentId(), round(node.getX()), - round(node.getY())))); + round(node.getY()), + node instanceof VoltageLevelNode ? ((VoltageLevelNode) node).isFictitious() : false))); graph.getBranchEdgeStream().forEach(edge -> edgesMetadata.add(new EdgeMetadata( getPrefixedId(edge.getDiagramId()), edge.getEquipmentId(), diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/NodeMetadata.java b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/NodeMetadata.java index 6060cbec9..aa9f21faa 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/NodeMetadata.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/NodeMetadata.java @@ -18,14 +18,17 @@ public class NodeMetadata extends AbstractMetadataItem { private final double x; private final double y; + private final boolean fictitious; public NodeMetadata(@JsonProperty("svgId") String svgId, @JsonProperty("equipmentId") String equipmentId, @JsonProperty("x") double x, - @JsonProperty("y") double y) { + @JsonProperty("y") double y, + @JsonProperty("fictitious") boolean fictitious) { super(svgId, equipmentId); this.x = x; this.y = y; + this.fictitious = fictitious; } public double getX() { @@ -35,4 +38,8 @@ public double getX() { public double getY() { return y; } + + public boolean isFictitious() { + return fictitious; + } } diff --git a/network-area-diagram/src/test/java/com/powsybl/nad/svg/DiagramMetadataTest.java b/network-area-diagram/src/test/java/com/powsybl/nad/svg/DiagramMetadataTest.java index 198daa635..71777a984 100644 --- a/network-area-diagram/src/test/java/com/powsybl/nad/svg/DiagramMetadataTest.java +++ b/network-area-diagram/src/test/java/com/powsybl/nad/svg/DiagramMetadataTest.java @@ -9,6 +9,7 @@ import com.google.common.jimfs.Configuration; import com.google.common.jimfs.Jimfs; +import com.powsybl.ieeecdf.converter.IeeeCdfNetworkFactory; import com.powsybl.iidm.network.Network; import com.powsybl.iidm.network.test.ThreeWindingsTransformerNetworkFactory; import com.powsybl.nad.AbstractTest; @@ -86,12 +87,22 @@ void test() { @Test void test3wt() { - // Referenced json file - String referenceMetadata = "/3wt_metadata.json"; - // Write Metadata as temporary json file Network network = ThreeWindingsTransformerNetworkFactory.create(); + testMetadata(network, "/3wt_metadata.json", 3, 4, 3, 3); + } + + @Test + void testFictitious() { + Network network = IeeeCdfNetworkFactory.create14(); + network.getVoltageLevel("VL12").setFictitious(true); + network.getVoltageLevel("VL14").setFictitious(true); + testMetadata(network, "/IEEE_14_bus_fictitious_metadata.json", 14, 14, 20, 14); + } + + private void testMetadata(Network network, String referenceMetadata, int busNodesNumber, int nodesNumber, int edgesNumber, int textNodesNumber) { Graph graph = new NetworkGraphBuilder(network, VoltageLevelFilter.NO_FILTER).buildGraph(); new BasicForceLayout().run(graph, getLayoutParameters()); + // Write Metadata as temporary json file Path outMetadataPath = tmpDir.resolve("metadata.json"); new DiagramMetadata(getLayoutParameters(), getSvgParameters()).addMetadata(graph).writeJson(outMetadataPath); // Read generated json file @@ -102,10 +113,11 @@ void test3wt() { assertEquals(expected, actual); // Read metadata from file DiagramMetadata diagramMetadata = DiagramMetadata.parseJson(outMetadataPath); - assertEquals(3, diagramMetadata.getBusNodesMetadata().size()); - assertEquals(4, diagramMetadata.getNodesMetadata().size()); - assertEquals(3, diagramMetadata.getEdgesMetadata().size()); - assertEquals(3, diagramMetadata.getTextNodesMetadata().size()); + // Check read metadata + assertEquals(busNodesNumber, diagramMetadata.getBusNodesMetadata().size()); + assertEquals(nodesNumber, diagramMetadata.getNodesMetadata().size()); + assertEquals(edgesNumber, diagramMetadata.getEdgesMetadata().size()); + assertEquals(textNodesNumber, diagramMetadata.getTextNodesMetadata().size()); } private void writeMetadata(DiagramMetadata metadata, Path outPath) { diff --git a/network-area-diagram/src/test/resources/3wt_metadata.json b/network-area-diagram/src/test/resources/3wt_metadata.json index 2265c7af7..9a23e3a9c 100644 --- a/network-area-diagram/src/test/resources/3wt_metadata.json +++ b/network-area-diagram/src/test/resources/3wt_metadata.json @@ -78,22 +78,26 @@ "svgId" : "0", "equipmentId" : "VL_11", "x" : 75.04, - "y" : -513.76 + "y" : -513.76, + "fictitious" : false }, { "svgId" : "2", "equipmentId" : "VL_132", "x" : -371.52, - "y" : 47.69 + "y" : 47.69, + "fictitious" : false }, { "svgId" : "4", "equipmentId" : "VL_33", "x" : 180.23, - "y" : 204.68 + "y" : 204.68, + "fictitious" : false }, { "svgId" : "6", "equipmentId" : "3WT", "x" : -22.79, - "y" : -128.62 + "y" : -128.62, + "fictitious" : false } ], "edges" : [ { "svgId" : "7", diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious_metadata.json b/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious_metadata.json new file mode 100644 index 000000000..f3723c762 --- /dev/null +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious_metadata.json @@ -0,0 +1,502 @@ +{ + "layoutParameters" : { + "textNodesForceLayout" : false, + "springRepulsionFactorForceLayout" : 0.0, + "textNodeFixedShift" : { + "x" : 100.0, + "y" : -40.0 + }, + "maxSteps" : 1000, + "textNodeEdgeConnectionYShift" : 25.0 + }, + "svgParameters" : { + "diagramPadding" : { + "left" : 200.0, + "top" : 200.0, + "right" : 200.0, + "bottom" : 200.0 + }, + "insertNameDesc" : true, + "svgWidthAndHeightAdded" : true, + "cssLocation" : "INSERTED_IN_SVG", + "sizeConstraint" : "FIXED_WIDTH", + "fixedWidth" : 800, + "fixedHeight" : -1, + "fixedScale" : 0.2, + "arrowShift" : 30.0, + "arrowLabelShift" : 19.0, + "converterStationWidth" : 70.0, + "voltageLevelCircleRadius" : 30.0, + "fictitiousVoltageLevelCircleRadius" : 15.0, + "transformerCircleRadius" : 20.0, + "nodeHollowWidth" : 15.0, + "edgesForkLength" : 80.0, + "edgesForkAperture" : 60.0, + "edgeStartShift" : 0.0, + "unknownBusNodeExtraRadius" : 10.0, + "loopDistance" : 120.0, + "loopEdgesAperture" : 60.0, + "loopControlDistance" : 40.0, + "edgeInfoAlongEdge" : true, + "edgeNameDisplayed" : false, + "interAnnulusSpace" : 5.0, + "svgPrefix" : "", + "idDisplayed" : false, + "substationDescriptionDisplayed" : false, + "arrowHeight" : 10.0, + "busLegend" : true, + "voltageLevelDetails" : false, + "languageTag" : "en", + "voltageValuePrecision" : 1, + "powerValuePrecision" : 0, + "angleValuePrecision" : 1, + "currentValuePrecision" : 0, + "edgeInfoDisplayed" : "ACTIVE_POWER", + "pstArrowHeadSize" : 8.0, + "undefinedValueSymbol" : "" + }, + "busNodes" : [ { + "svgId" : "1", + "equipmentId" : "VL1_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "0" + }, { + "svgId" : "3", + "equipmentId" : "VL10_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "2" + }, { + "svgId" : "5", + "equipmentId" : "VL11_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "4" + }, { + "svgId" : "7", + "equipmentId" : "VL12_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "6" + }, { + "svgId" : "9", + "equipmentId" : "VL13_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "8" + }, { + "svgId" : "11", + "equipmentId" : "VL14_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "10" + }, { + "svgId" : "13", + "equipmentId" : "VL2_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "12" + }, { + "svgId" : "15", + "equipmentId" : "VL3_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "14" + }, { + "svgId" : "17", + "equipmentId" : "VL4_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "16" + }, { + "svgId" : "19", + "equipmentId" : "VL5_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "18" + }, { + "svgId" : "21", + "equipmentId" : "VL6_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "20" + }, { + "svgId" : "23", + "equipmentId" : "VL7_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "22" + }, { + "svgId" : "25", + "equipmentId" : "VL8_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "24" + }, { + "svgId" : "27", + "equipmentId" : "VL9_0", + "nbNeighbours" : 0, + "index" : 0, + "vlNode" : "26" + } ], + "nodes" : [ { + "svgId" : "0", + "equipmentId" : "VL1", + "x" : 379.5, + "y" : -897.76, + "fictitious" : false + }, { + "svgId" : "2", + "equipmentId" : "VL10", + "x" : -586.21, + "y" : 325.09, + "fictitious" : false + }, { + "svgId" : "4", + "equipmentId" : "VL11", + "x" : -781.48, + "y" : -92.63, + "fictitious" : false + }, { + "svgId" : "6", + "equipmentId" : "VL12", + "x" : -156.95, + "y" : -227.74, + "fictitious" : true + }, { + "svgId" : "8", + "equipmentId" : "VL13", + "x" : -299.94, + "y" : 73.32, + "fictitious" : false + }, { + "svgId" : "10", + "equipmentId" : "VL14", + "x" : -202.47, + "y" : 556.41, + "fictitious" : true + }, { + "svgId" : "12", + "equipmentId" : "VL2", + "x" : 556.21, + "y" : -541.57, + "fictitious" : false + }, { + "svgId" : "14", + "equipmentId" : "VL3", + "x" : 844.8, + "y" : -305.76, + "fictitious" : false + }, { + "svgId" : "16", + "equipmentId" : "VL4", + "x" : 459.93, + "y" : -101.51, + "fictitious" : false + }, { + "svgId" : "18", + "equipmentId" : "VL5", + "x" : 175.68, + "y" : -542.18, + "fictitious" : false + }, { + "svgId" : "20", + "equipmentId" : "VL6", + "x" : -404.28, + "y" : -368.04, + "fictitious" : false + }, { + "svgId" : "22", + "equipmentId" : "VL7", + "x" : 526.92, + "y" : 376.56, + "fictitious" : false + }, { + "svgId" : "24", + "equipmentId" : "VL8", + "x" : 807.02, + "y" : 692.3, + "fictitious" : false + }, { + "svgId" : "26", + "equipmentId" : "VL9", + "x" : 88.08, + "y" : 340.05, + "fictitious" : false + } ], + "edges" : [ { + "svgId" : "28", + "equipmentId" : "L1-2-1", + "node1" : "0", + "node2" : "12", + "busNode1" : "1", + "busNode2" : "13", + "type" : "LineEdge" + }, { + "svgId" : "29", + "equipmentId" : "L1-5-1", + "node1" : "0", + "node2" : "18", + "busNode1" : "1", + "busNode2" : "19", + "type" : "LineEdge" + }, { + "svgId" : "30", + "equipmentId" : "L9-10-1", + "node1" : "26", + "node2" : "2", + "busNode1" : "27", + "busNode2" : "3", + "type" : "LineEdge" + }, { + "svgId" : "31", + "equipmentId" : "L10-11-1", + "node1" : "2", + "node2" : "4", + "busNode1" : "3", + "busNode2" : "5", + "type" : "LineEdge" + }, { + "svgId" : "32", + "equipmentId" : "L6-11-1", + "node1" : "20", + "node2" : "4", + "busNode1" : "21", + "busNode2" : "5", + "type" : "LineEdge" + }, { + "svgId" : "33", + "equipmentId" : "L6-12-1", + "node1" : "20", + "node2" : "6", + "busNode1" : "21", + "busNode2" : "7", + "type" : "LineEdge" + }, { + "svgId" : "34", + "equipmentId" : "L12-13-1", + "node1" : "6", + "node2" : "8", + "busNode1" : "7", + "busNode2" : "9", + "type" : "LineEdge" + }, { + "svgId" : "35", + "equipmentId" : "L6-13-1", + "node1" : "20", + "node2" : "8", + "busNode1" : "21", + "busNode2" : "9", + "type" : "LineEdge" + }, { + "svgId" : "36", + "equipmentId" : "L13-14-1", + "node1" : "8", + "node2" : "10", + "busNode1" : "9", + "busNode2" : "11", + "type" : "LineEdge" + }, { + "svgId" : "37", + "equipmentId" : "L9-14-1", + "node1" : "26", + "node2" : "10", + "busNode1" : "27", + "busNode2" : "11", + "type" : "LineEdge" + }, { + "svgId" : "38", + "equipmentId" : "L2-3-1", + "node1" : "12", + "node2" : "14", + "busNode1" : "13", + "busNode2" : "15", + "type" : "LineEdge" + }, { + "svgId" : "39", + "equipmentId" : "L2-4-1", + "node1" : "12", + "node2" : "16", + "busNode1" : "13", + "busNode2" : "17", + "type" : "LineEdge" + }, { + "svgId" : "40", + "equipmentId" : "L2-5-1", + "node1" : "12", + "node2" : "18", + "busNode1" : "13", + "busNode2" : "19", + "type" : "LineEdge" + }, { + "svgId" : "41", + "equipmentId" : "L3-4-1", + "node1" : "14", + "node2" : "16", + "busNode1" : "15", + "busNode2" : "17", + "type" : "LineEdge" + }, { + "svgId" : "42", + "equipmentId" : "L4-5-1", + "node1" : "16", + "node2" : "18", + "busNode1" : "17", + "busNode2" : "19", + "type" : "LineEdge" + }, { + "svgId" : "43", + "equipmentId" : "T4-7-1", + "node1" : "16", + "node2" : "22", + "busNode1" : "17", + "busNode2" : "23", + "type" : "TwoWtEdge" + }, { + "svgId" : "44", + "equipmentId" : "T4-9-1", + "node1" : "16", + "node2" : "26", + "busNode1" : "17", + "busNode2" : "27", + "type" : "TwoWtEdge" + }, { + "svgId" : "45", + "equipmentId" : "T5-6-1", + "node1" : "18", + "node2" : "20", + "busNode1" : "19", + "busNode2" : "21", + "type" : "TwoWtEdge" + }, { + "svgId" : "46", + "equipmentId" : "L7-8-1", + "node1" : "22", + "node2" : "24", + "busNode1" : "23", + "busNode2" : "25", + "type" : "LineEdge" + }, { + "svgId" : "47", + "equipmentId" : "L7-9-1", + "node1" : "22", + "node2" : "26", + "busNode1" : "23", + "busNode2" : "27", + "type" : "LineEdge" + } ], + "textNodes" : [ { + "svgId" : "0-textnode", + "equipmentId" : "VL1", + "vlNode" : "0", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "2-textnode", + "equipmentId" : "VL10", + "vlNode" : "2", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "4-textnode", + "equipmentId" : "VL11", + "vlNode" : "4", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "6-textnode", + "equipmentId" : "VL12", + "vlNode" : "6", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "8-textnode", + "equipmentId" : "VL13", + "vlNode" : "8", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "10-textnode", + "equipmentId" : "VL14", + "vlNode" : "10", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "12-textnode", + "equipmentId" : "VL2", + "vlNode" : "12", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "14-textnode", + "equipmentId" : "VL3", + "vlNode" : "14", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "16-textnode", + "equipmentId" : "VL4", + "vlNode" : "16", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "18-textnode", + "equipmentId" : "VL5", + "vlNode" : "18", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "20-textnode", + "equipmentId" : "VL6", + "vlNode" : "20", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "22-textnode", + "equipmentId" : "VL7", + "vlNode" : "22", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "24-textnode", + "equipmentId" : "VL8", + "vlNode" : "24", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + }, { + "svgId" : "26-textnode", + "equipmentId" : "VL9", + "vlNode" : "26", + "shiftX" : 100.0, + "shiftY" : -40.0, + "connectionShiftX" : 100.0, + "connectionShiftY" : -15.0 + } ] +} diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter2_metadata.json b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter2_metadata.json index deee2ad53..becb1bd0c 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter2_metadata.json +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter2_metadata.json @@ -144,72 +144,86 @@ "svgId" : "0", "equipmentId" : "VL1", "x" : 948.69, - "y" : -322.21 + "y" : -322.21, + "fictitious" : false }, { "svgId" : "2", "equipmentId" : "VL10", "x" : -358.9, - "y" : 525.37 + "y" : 525.37, + "fictitious" : false }, { "svgId" : "4", "equipmentId" : "VL14", "x" : -359.39, - "y" : -476.71 + "y" : -476.71, + "fictitious" : false }, { "svgId" : "6", "equipmentId" : "VL2", "x" : 590.54, - "y" : -374.08 + "y" : -374.08, + "fictitious" : false }, { "svgId" : "8", "equipmentId" : "VL3", "x" : 314.39, - "y" : -324.77 + "y" : -324.77, + "fictitious" : false }, { "svgId" : "10", "equipmentId" : "VL4", "x" : 56.2, - "y" : -94.68 + "y" : -94.68, + "fictitious" : false }, { "svgId" : "12", "equipmentId" : "VL5", "x" : 608.23, - "y" : -31.45 + "y" : -31.45, + "fictitious" : false }, { "svgId" : "14", "equipmentId" : "VL6", "x" : 351.34, - "y" : 284.99 + "y" : 284.99, + "fictitious" : false }, { "svgId" : "16", "equipmentId" : "VL7", "x" : -630.2, - "y" : -157.55 + "y" : -157.55, + "fictitious" : false }, { "svgId" : "18", "equipmentId" : "VL8", "x" : -1033.21, - "y" : -350.22 + "y" : -350.22, + "fictitious" : false }, { "svgId" : "20", "equipmentId" : "VL9", "x" : -365.55, - "y" : 38.7 + "y" : 38.7, + "fictitious" : false }, { "svgId" : "22", "equipmentId" : "VL11", "x" : 32.17, - "y" : 653.29 + "y" : 653.29, + "fictitious" : false }, { "svgId" : "24", "equipmentId" : "VL12", "x" : 692.44, - "y" : 630.83 + "y" : 630.83, + "fictitious" : false }, { "svgId" : "26", "equipmentId" : "VL13", "x" : -5.18, - "y" : -428.32 + "y" : -428.32, + "fictitious" : false } ], "edges" : [ { "svgId" : "28", diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter5_metadata.json b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter5_metadata.json index 490524560..16bc62f45 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter5_metadata.json +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter5_metadata.json @@ -114,47 +114,56 @@ "svgId" : "0", "equipmentId" : "VL1", "x" : -249.02, - "y" : 337.72 + "y" : 337.72, + "fictitious" : false }, { "svgId" : "2", "equipmentId" : "VL2", "x" : -241.09, - "y" : -38.49 + "y" : -38.49, + "fictitious" : false }, { "svgId" : "4", "equipmentId" : "VL3", "x" : -379.91, - "y" : -377.15 + "y" : -377.15, + "fictitious" : false }, { "svgId" : "6", "equipmentId" : "VL4", "x" : 43.65, - "y" : -307.91 + "y" : -307.91, + "fictitious" : false }, { "svgId" : "8", "equipmentId" : "VL5", "x" : 103.37, - "y" : 126.77 + "y" : 126.77, + "fictitious" : false }, { "svgId" : "10", "equipmentId" : "VL8", "x" : 409.59, - "y" : 481.85 + "y" : 481.85, + "fictitious" : false }, { "svgId" : "12", "equipmentId" : "VL6", "x" : 683.08, - "y" : 250.21 + "y" : 250.21, + "fictitious" : false }, { "svgId" : "14", "equipmentId" : "VL7", "x" : 443.55, - "y" : -67.88 + "y" : -67.88, + "fictitious" : false }, { "svgId" : "16", "equipmentId" : "VL9", "x" : 95.54, - "y" : -762.33 + "y" : -762.33, + "fictitious" : false } ], "edges" : [ { "svgId" : "18", diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_nofilter_metadata.json b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_nofilter_metadata.json index 56386ae3f..9ae4ec14e 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_nofilter_metadata.json +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_nofilter_metadata.json @@ -144,72 +144,86 @@ "svgId" : "0", "equipmentId" : "VL1", "x" : 379.5, - "y" : -897.76 + "y" : -897.76, + "fictitious" : false }, { "svgId" : "2", "equipmentId" : "VL10", "x" : -586.21, - "y" : 325.09 + "y" : 325.09, + "fictitious" : false }, { "svgId" : "4", "equipmentId" : "VL11", "x" : -781.48, - "y" : -92.63 + "y" : -92.63, + "fictitious" : false }, { "svgId" : "6", "equipmentId" : "VL12", "x" : -156.95, - "y" : -227.74 + "y" : -227.74, + "fictitious" : false }, { "svgId" : "8", "equipmentId" : "VL13", "x" : -299.94, - "y" : 73.32 + "y" : 73.32, + "fictitious" : false }, { "svgId" : "10", "equipmentId" : "VL14", "x" : -202.47, - "y" : 556.41 + "y" : 556.41, + "fictitious" : false }, { "svgId" : "12", "equipmentId" : "VL2", "x" : 556.21, - "y" : -541.57 + "y" : -541.57, + "fictitious" : false }, { "svgId" : "14", "equipmentId" : "VL3", "x" : 844.8, - "y" : -305.76 + "y" : -305.76, + "fictitious" : false }, { "svgId" : "16", "equipmentId" : "VL4", "x" : 459.93, - "y" : -101.51 + "y" : -101.51, + "fictitious" : false }, { "svgId" : "18", "equipmentId" : "VL5", "x" : 175.68, - "y" : -542.18 + "y" : -542.18, + "fictitious" : false }, { "svgId" : "20", "equipmentId" : "VL6", "x" : -404.28, - "y" : -368.04 + "y" : -368.04, + "fictitious" : false }, { "svgId" : "22", "equipmentId" : "VL7", "x" : 526.92, - "y" : 376.56 + "y" : 376.56, + "fictitious" : false }, { "svgId" : "24", "equipmentId" : "VL8", "x" : 807.02, - "y" : 692.3 + "y" : 692.3, + "fictitious" : false }, { "svgId" : "26", "equipmentId" : "VL9", "x" : 88.08, - "y" : 340.05 + "y" : 340.05, + "fictitious" : false } ], "edges" : [ { "svgId" : "28", diff --git a/network-area-diagram/src/test/resources/hvdc_metadata.json b/network-area-diagram/src/test/resources/hvdc_metadata.json index f49c239a1..d851cd03d 100644 --- a/network-area-diagram/src/test/resources/hvdc_metadata.json +++ b/network-area-diagram/src/test/resources/hvdc_metadata.json @@ -90,27 +90,32 @@ "svgId" : "0", "equipmentId" : "S1VL1", "x" : -220.4, - "y" : -515.14 + "y" : -515.14, + "fictitious" : false }, { "svgId" : "2", "equipmentId" : "S1VL2", "x" : -152.34, - "y" : -133.8 + "y" : -133.8, + "fictitious" : false }, { "svgId" : "4", "equipmentId" : "S2VL1", "x" : -162.93, - "y" : 231.51 + "y" : 231.51, + "fictitious" : false }, { "svgId" : "6", "equipmentId" : "S3VL1", "x" : 171.13, - "y" : 91.69 + "y" : 91.69, + "fictitious" : false }, { "svgId" : "8", "equipmentId" : "S4VL1", "x" : 497.34, - "y" : 302.31 + "y" : 302.31, + "fictitious" : false } ], "edges" : [ { "svgId" : "10", From 150e1c64aaf5af45be7f81ed6a0f1ffa692c9bae Mon Sep 17 00:00:00 2001 From: "massimo.ferraro" Date: Fri, 13 Dec 2024 19:08:49 +0100 Subject: [PATCH 2/3] Fix sonar issues Signed-off-by: massimo.ferraro --- .../main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java index 0ed74df24..da03ffdce 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java @@ -109,7 +109,7 @@ public DiagramMetadata addMetadata(Graph graph) { node.getEquipmentId(), round(node.getX()), round(node.getY()), - node instanceof VoltageLevelNode ? ((VoltageLevelNode) node).isFictitious() : false))); + node instanceof VoltageLevelNode vlNode && vlNode.isFictitious()))); graph.getBranchEdgeStream().forEach(edge -> edgesMetadata.add(new EdgeMetadata( getPrefixedId(edge.getDiagramId()), edge.getEquipmentId(), From a59d6b01c7286173eae05e0db9c74e5818a7df37 Mon Sep 17 00:00:00 2001 From: "massimo.ferraro" Date: Mon, 16 Dec 2024 11:18:43 +0100 Subject: [PATCH 3/3] Moved isFictitious method to Node interface Signed-off-by: massimo.ferraro --- .../com/powsybl/nad/model/AbstractNode.java | 9 +++- .../java/com/powsybl/nad/model/BusNode.java | 2 +- .../main/java/com/powsybl/nad/model/Node.java | 2 + .../java/com/powsybl/nad/model/TextNode.java | 2 +- .../com/powsybl/nad/model/ThreeWtNode.java | 2 +- .../powsybl/nad/model/VoltageLevelNode.java | 8 +--- .../nad/svg/metadata/DiagramMetadata.java | 3 +- .../nad/svg/metadata/NodeMetadata.java | 1 + .../src/test/resources/3wt_metadata.json | 12 ++---- .../IEEE_14_bus_fictitious_metadata.json | 36 ++++++---------- .../IEEE_14_bus_voltage_filter2_metadata.json | 42 +++++++------------ .../IEEE_14_bus_voltage_filter5_metadata.json | 27 ++++-------- ...IEEE_14_bus_voltage_nofilter_metadata.json | 42 +++++++------------ .../src/test/resources/hvdc_metadata.json | 15 +++---- 14 files changed, 74 insertions(+), 129 deletions(-) diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/model/AbstractNode.java b/network-area-diagram/src/main/java/com/powsybl/nad/model/AbstractNode.java index 8da5bec13..9d694b7ac 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/model/AbstractNode.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/model/AbstractNode.java @@ -14,12 +14,14 @@ public abstract class AbstractNode extends AbstractIdentifiable implements Node private int width; private int height; private Point position; + private final boolean fictitious; - protected AbstractNode(String diagramId, String equipmentId, String name) { + protected AbstractNode(String diagramId, String equipmentId, String name, boolean fictitious) { super(diagramId, equipmentId, name); position = new Point(); width = 0; height = 0; + this.fictitious = fictitious; } @Override @@ -47,6 +49,11 @@ public double getY() { return position.getY(); } + @Override + public boolean isFictitious() { + return fictitious; + } + public int getWidth() { return width; } diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/model/BusNode.java b/network-area-diagram/src/main/java/com/powsybl/nad/model/BusNode.java index 599654c38..28e789ea9 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/model/BusNode.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/model/BusNode.java @@ -18,7 +18,7 @@ public class BusNode extends AbstractNode { private int nbNeighbouringBusNodes; public BusNode(String diagramId, String id) { - super(diagramId, id, null); + super(diagramId, id, null, false); } public void setRingIndex(int ringIndex) { diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/model/Node.java b/network-area-diagram/src/main/java/com/powsybl/nad/model/Node.java index 5c004bc6e..5fb41afae 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/model/Node.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/model/Node.java @@ -20,4 +20,6 @@ public interface Node extends Identifiable { double getX(); double getY(); + + boolean isFictitious(); } diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/model/TextNode.java b/network-area-diagram/src/main/java/com/powsybl/nad/model/TextNode.java index ca6a48438..71c42fe5d 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/model/TextNode.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/model/TextNode.java @@ -14,7 +14,7 @@ public class TextNode extends AbstractNode { private Point edgeConnection; public TextNode(String diagramId) { - super(diagramId, null, null); + super(diagramId, null, null, false); edgeConnection = new Point(); } diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/model/ThreeWtNode.java b/network-area-diagram/src/main/java/com/powsybl/nad/model/ThreeWtNode.java index 94455f337..f2d6f050d 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/model/ThreeWtNode.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/model/ThreeWtNode.java @@ -12,7 +12,7 @@ public class ThreeWtNode extends AbstractNode { public ThreeWtNode(String diagramId, String equipmentId, String nameOrId) { - super(diagramId, equipmentId, nameOrId); + super(diagramId, equipmentId, nameOrId, false); } } diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/model/VoltageLevelNode.java b/network-area-diagram/src/main/java/com/powsybl/nad/model/VoltageLevelNode.java index 7036cd86b..27535f3e9 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/model/VoltageLevelNode.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/model/VoltageLevelNode.java @@ -15,7 +15,6 @@ public class VoltageLevelNode extends AbstractNode { private final List busNodes = new ArrayList<>(); - private final boolean fictitious; private final boolean visible; private boolean hasUnknownBusNode = false; @@ -24,8 +23,7 @@ public VoltageLevelNode(String diagramId, String equipmentId, String nameOrId, b } public VoltageLevelNode(String diagramId, String equipmentId, String nameOrId, boolean fictitious, boolean visible) { - super(diagramId, equipmentId, nameOrId); - this.fictitious = fictitious; + super(diagramId, equipmentId, nameOrId, fictitious); this.visible = visible; } @@ -57,8 +55,4 @@ public void setHasUnknownBusNode(boolean hasUnknownBusNode) { public boolean hasUnknownBusNode() { return hasUnknownBusNode; } - - public boolean isFictitious() { - return fictitious; - } } diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java index da03ffdce..7d8bb51ff 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/DiagramMetadata.java @@ -24,7 +24,6 @@ import com.powsybl.diagram.metadata.AbstractMetadata; import com.powsybl.nad.layout.LayoutParameters; import com.powsybl.nad.model.Graph; -import com.powsybl.nad.model.VoltageLevelNode; import com.powsybl.nad.svg.SvgParameters; /** @@ -109,7 +108,7 @@ public DiagramMetadata addMetadata(Graph graph) { node.getEquipmentId(), round(node.getX()), round(node.getY()), - node instanceof VoltageLevelNode vlNode && vlNode.isFictitious()))); + node.isFictitious()))); graph.getBranchEdgeStream().forEach(edge -> edgesMetadata.add(new EdgeMetadata( getPrefixedId(edge.getDiagramId()), edge.getEquipmentId(), diff --git a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/NodeMetadata.java b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/NodeMetadata.java index aa9f21faa..ccdea86b9 100644 --- a/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/NodeMetadata.java +++ b/network-area-diagram/src/main/java/com/powsybl/nad/svg/metadata/NodeMetadata.java @@ -39,6 +39,7 @@ public double getY() { return y; } + @JsonInclude(JsonInclude.Include.NON_DEFAULT) public boolean isFictitious() { return fictitious; } diff --git a/network-area-diagram/src/test/resources/3wt_metadata.json b/network-area-diagram/src/test/resources/3wt_metadata.json index 9a23e3a9c..2265c7af7 100644 --- a/network-area-diagram/src/test/resources/3wt_metadata.json +++ b/network-area-diagram/src/test/resources/3wt_metadata.json @@ -78,26 +78,22 @@ "svgId" : "0", "equipmentId" : "VL_11", "x" : 75.04, - "y" : -513.76, - "fictitious" : false + "y" : -513.76 }, { "svgId" : "2", "equipmentId" : "VL_132", "x" : -371.52, - "y" : 47.69, - "fictitious" : false + "y" : 47.69 }, { "svgId" : "4", "equipmentId" : "VL_33", "x" : 180.23, - "y" : 204.68, - "fictitious" : false + "y" : 204.68 }, { "svgId" : "6", "equipmentId" : "3WT", "x" : -22.79, - "y" : -128.62, - "fictitious" : false + "y" : -128.62 } ], "edges" : [ { "svgId" : "7", diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious_metadata.json b/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious_metadata.json index f3723c762..d1066833d 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious_metadata.json +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_fictitious_metadata.json @@ -144,20 +144,17 @@ "svgId" : "0", "equipmentId" : "VL1", "x" : 379.5, - "y" : -897.76, - "fictitious" : false + "y" : -897.76 }, { "svgId" : "2", "equipmentId" : "VL10", "x" : -586.21, - "y" : 325.09, - "fictitious" : false + "y" : 325.09 }, { "svgId" : "4", "equipmentId" : "VL11", "x" : -781.48, - "y" : -92.63, - "fictitious" : false + "y" : -92.63 }, { "svgId" : "6", "equipmentId" : "VL12", @@ -168,8 +165,7 @@ "svgId" : "8", "equipmentId" : "VL13", "x" : -299.94, - "y" : 73.32, - "fictitious" : false + "y" : 73.32 }, { "svgId" : "10", "equipmentId" : "VL14", @@ -180,50 +176,42 @@ "svgId" : "12", "equipmentId" : "VL2", "x" : 556.21, - "y" : -541.57, - "fictitious" : false + "y" : -541.57 }, { "svgId" : "14", "equipmentId" : "VL3", "x" : 844.8, - "y" : -305.76, - "fictitious" : false + "y" : -305.76 }, { "svgId" : "16", "equipmentId" : "VL4", "x" : 459.93, - "y" : -101.51, - "fictitious" : false + "y" : -101.51 }, { "svgId" : "18", "equipmentId" : "VL5", "x" : 175.68, - "y" : -542.18, - "fictitious" : false + "y" : -542.18 }, { "svgId" : "20", "equipmentId" : "VL6", "x" : -404.28, - "y" : -368.04, - "fictitious" : false + "y" : -368.04 }, { "svgId" : "22", "equipmentId" : "VL7", "x" : 526.92, - "y" : 376.56, - "fictitious" : false + "y" : 376.56 }, { "svgId" : "24", "equipmentId" : "VL8", "x" : 807.02, - "y" : 692.3, - "fictitious" : false + "y" : 692.3 }, { "svgId" : "26", "equipmentId" : "VL9", "x" : 88.08, - "y" : 340.05, - "fictitious" : false + "y" : 340.05 } ], "edges" : [ { "svgId" : "28", diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter2_metadata.json b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter2_metadata.json index becb1bd0c..deee2ad53 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter2_metadata.json +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter2_metadata.json @@ -144,86 +144,72 @@ "svgId" : "0", "equipmentId" : "VL1", "x" : 948.69, - "y" : -322.21, - "fictitious" : false + "y" : -322.21 }, { "svgId" : "2", "equipmentId" : "VL10", "x" : -358.9, - "y" : 525.37, - "fictitious" : false + "y" : 525.37 }, { "svgId" : "4", "equipmentId" : "VL14", "x" : -359.39, - "y" : -476.71, - "fictitious" : false + "y" : -476.71 }, { "svgId" : "6", "equipmentId" : "VL2", "x" : 590.54, - "y" : -374.08, - "fictitious" : false + "y" : -374.08 }, { "svgId" : "8", "equipmentId" : "VL3", "x" : 314.39, - "y" : -324.77, - "fictitious" : false + "y" : -324.77 }, { "svgId" : "10", "equipmentId" : "VL4", "x" : 56.2, - "y" : -94.68, - "fictitious" : false + "y" : -94.68 }, { "svgId" : "12", "equipmentId" : "VL5", "x" : 608.23, - "y" : -31.45, - "fictitious" : false + "y" : -31.45 }, { "svgId" : "14", "equipmentId" : "VL6", "x" : 351.34, - "y" : 284.99, - "fictitious" : false + "y" : 284.99 }, { "svgId" : "16", "equipmentId" : "VL7", "x" : -630.2, - "y" : -157.55, - "fictitious" : false + "y" : -157.55 }, { "svgId" : "18", "equipmentId" : "VL8", "x" : -1033.21, - "y" : -350.22, - "fictitious" : false + "y" : -350.22 }, { "svgId" : "20", "equipmentId" : "VL9", "x" : -365.55, - "y" : 38.7, - "fictitious" : false + "y" : 38.7 }, { "svgId" : "22", "equipmentId" : "VL11", "x" : 32.17, - "y" : 653.29, - "fictitious" : false + "y" : 653.29 }, { "svgId" : "24", "equipmentId" : "VL12", "x" : 692.44, - "y" : 630.83, - "fictitious" : false + "y" : 630.83 }, { "svgId" : "26", "equipmentId" : "VL13", "x" : -5.18, - "y" : -428.32, - "fictitious" : false + "y" : -428.32 } ], "edges" : [ { "svgId" : "28", diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter5_metadata.json b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter5_metadata.json index 16bc62f45..490524560 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter5_metadata.json +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_filter5_metadata.json @@ -114,56 +114,47 @@ "svgId" : "0", "equipmentId" : "VL1", "x" : -249.02, - "y" : 337.72, - "fictitious" : false + "y" : 337.72 }, { "svgId" : "2", "equipmentId" : "VL2", "x" : -241.09, - "y" : -38.49, - "fictitious" : false + "y" : -38.49 }, { "svgId" : "4", "equipmentId" : "VL3", "x" : -379.91, - "y" : -377.15, - "fictitious" : false + "y" : -377.15 }, { "svgId" : "6", "equipmentId" : "VL4", "x" : 43.65, - "y" : -307.91, - "fictitious" : false + "y" : -307.91 }, { "svgId" : "8", "equipmentId" : "VL5", "x" : 103.37, - "y" : 126.77, - "fictitious" : false + "y" : 126.77 }, { "svgId" : "10", "equipmentId" : "VL8", "x" : 409.59, - "y" : 481.85, - "fictitious" : false + "y" : 481.85 }, { "svgId" : "12", "equipmentId" : "VL6", "x" : 683.08, - "y" : 250.21, - "fictitious" : false + "y" : 250.21 }, { "svgId" : "14", "equipmentId" : "VL7", "x" : 443.55, - "y" : -67.88, - "fictitious" : false + "y" : -67.88 }, { "svgId" : "16", "equipmentId" : "VL9", "x" : 95.54, - "y" : -762.33, - "fictitious" : false + "y" : -762.33 } ], "edges" : [ { "svgId" : "18", diff --git a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_nofilter_metadata.json b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_nofilter_metadata.json index 9ae4ec14e..56386ae3f 100644 --- a/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_nofilter_metadata.json +++ b/network-area-diagram/src/test/resources/IEEE_14_bus_voltage_nofilter_metadata.json @@ -144,86 +144,72 @@ "svgId" : "0", "equipmentId" : "VL1", "x" : 379.5, - "y" : -897.76, - "fictitious" : false + "y" : -897.76 }, { "svgId" : "2", "equipmentId" : "VL10", "x" : -586.21, - "y" : 325.09, - "fictitious" : false + "y" : 325.09 }, { "svgId" : "4", "equipmentId" : "VL11", "x" : -781.48, - "y" : -92.63, - "fictitious" : false + "y" : -92.63 }, { "svgId" : "6", "equipmentId" : "VL12", "x" : -156.95, - "y" : -227.74, - "fictitious" : false + "y" : -227.74 }, { "svgId" : "8", "equipmentId" : "VL13", "x" : -299.94, - "y" : 73.32, - "fictitious" : false + "y" : 73.32 }, { "svgId" : "10", "equipmentId" : "VL14", "x" : -202.47, - "y" : 556.41, - "fictitious" : false + "y" : 556.41 }, { "svgId" : "12", "equipmentId" : "VL2", "x" : 556.21, - "y" : -541.57, - "fictitious" : false + "y" : -541.57 }, { "svgId" : "14", "equipmentId" : "VL3", "x" : 844.8, - "y" : -305.76, - "fictitious" : false + "y" : -305.76 }, { "svgId" : "16", "equipmentId" : "VL4", "x" : 459.93, - "y" : -101.51, - "fictitious" : false + "y" : -101.51 }, { "svgId" : "18", "equipmentId" : "VL5", "x" : 175.68, - "y" : -542.18, - "fictitious" : false + "y" : -542.18 }, { "svgId" : "20", "equipmentId" : "VL6", "x" : -404.28, - "y" : -368.04, - "fictitious" : false + "y" : -368.04 }, { "svgId" : "22", "equipmentId" : "VL7", "x" : 526.92, - "y" : 376.56, - "fictitious" : false + "y" : 376.56 }, { "svgId" : "24", "equipmentId" : "VL8", "x" : 807.02, - "y" : 692.3, - "fictitious" : false + "y" : 692.3 }, { "svgId" : "26", "equipmentId" : "VL9", "x" : 88.08, - "y" : 340.05, - "fictitious" : false + "y" : 340.05 } ], "edges" : [ { "svgId" : "28", diff --git a/network-area-diagram/src/test/resources/hvdc_metadata.json b/network-area-diagram/src/test/resources/hvdc_metadata.json index d851cd03d..f49c239a1 100644 --- a/network-area-diagram/src/test/resources/hvdc_metadata.json +++ b/network-area-diagram/src/test/resources/hvdc_metadata.json @@ -90,32 +90,27 @@ "svgId" : "0", "equipmentId" : "S1VL1", "x" : -220.4, - "y" : -515.14, - "fictitious" : false + "y" : -515.14 }, { "svgId" : "2", "equipmentId" : "S1VL2", "x" : -152.34, - "y" : -133.8, - "fictitious" : false + "y" : -133.8 }, { "svgId" : "4", "equipmentId" : "S2VL1", "x" : -162.93, - "y" : 231.51, - "fictitious" : false + "y" : 231.51 }, { "svgId" : "6", "equipmentId" : "S3VL1", "x" : 171.13, - "y" : 91.69, - "fictitious" : false + "y" : 91.69 }, { "svgId" : "8", "equipmentId" : "S4VL1", "x" : 497.34, - "y" : 302.31, - "fictitious" : false + "y" : 302.31 } ], "edges" : [ { "svgId" : "10",