diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/LayoutParameters.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/LayoutParameters.java index 7640f25db..a922fc445 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/LayoutParameters.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/LayoutParameters.java @@ -48,7 +48,7 @@ public class LayoutParameters { private double cgmesScaleFactor = 1; private String cgmesDiagramName = null; private boolean cgmesUseNames = true; - private double zoneLayoutSnakeLinePadding = 90; + private int zoneLayoutSnakeLinePadding = 90; private PathFinderType zoneLayoutPathFinder = PathFinderType.DIJKSTRA; @JsonIgnore @@ -338,11 +338,11 @@ public LayoutParameters setCgmesUseNames(boolean cgmesUseNames) { return this; } - public double getZoneLayoutSnakeLinePadding() { + public int getZoneLayoutSnakeLinePadding() { return zoneLayoutSnakeLinePadding; } - public LayoutParameters setZoneLayoutSnakeLinePadding(double zoneLayoutSnakeLinePadding) { + public LayoutParameters setZoneLayoutSnakeLinePadding(int zoneLayoutSnakeLinePadding) { this.zoneLayoutSnakeLinePadding = zoneLayoutSnakeLinePadding; return this; } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/MatrixZoneLayout.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/MatrixZoneLayout.java index 61f711215..558ee024b 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/MatrixZoneLayout.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/MatrixZoneLayout.java @@ -22,22 +22,14 @@ * @author Thomas Adam {@literal } */ public class MatrixZoneLayout extends AbstractZoneLayout { - private final MatrixZoneLayoutModel model; + private MatrixZoneLayoutModel model; - protected MatrixZoneLayout(ZoneGraph graph, String[][] matrix, ZoneLayoutPathFinderFactory pathFinderFactory, SubstationLayoutFactory sLayoutFactory, VoltageLevelLayoutFactory vLayoutFactory) { + private final String[][] matrixUserDefinition; + + protected MatrixZoneLayout(ZoneGraph graph, String[][] matrixUserDefinition, ZoneLayoutPathFinderFactory pathFinderFactory, SubstationLayoutFactory sLayoutFactory, VoltageLevelLayoutFactory vLayoutFactory) { super(graph, sLayoutFactory, vLayoutFactory); - this.pathFinder = pathFinderFactory.create(); - this.model = new MatrixZoneLayoutModel(Objects.requireNonNull(matrix)); - for (int row = 0; row < matrix.length; row++) { - for (int col = 0; col < matrix[row].length; col++) { - String id = matrix[row][col]; - SubstationGraph sGraph = graph.getSubstationGraph(id); - if (sGraph == null && !id.isEmpty()) { - throw new PowsyblException("Substation '" + id + "' was not found in zone graph '" + getGraph().getId() + "'"); - } - model.addSubstationGraph(sGraph, row, col); - } - } + this.pathFinder = Objects.requireNonNull(pathFinderFactory).create(); + this.matrixUserDefinition = Objects.requireNonNull(matrixUserDefinition); } /** @@ -45,6 +37,19 @@ protected MatrixZoneLayout(ZoneGraph graph, String[][] matrix, ZoneLayoutPathFin */ @Override protected void calculateCoordSubstations(LayoutParameters layoutParameters) { + // Update model information + this.model = new MatrixZoneLayoutModel(matrixUserDefinition, layoutParameters); + for (int row = 0; row < matrixUserDefinition.length; row++) { + for (int col = 0; col < matrixUserDefinition[row].length; col++) { + String id = matrixUserDefinition[row][col]; + SubstationGraph sGraph = getGraph().getSubstationGraph(id); + if (sGraph == null && !id.isEmpty()) { + throw new PowsyblException("Substation '" + id + "' was not found in zone graph '" + getGraph().getId() + "'"); + } + model.addSubstationGraph(sGraph, row, col); + } + } + Matrix matrix = model.getMatrix(); // Display substations on not empty Matrix cell matrix.stream().filter(c -> !c.isEmpty()).map(MatrixCell::graph).forEach(graph -> layoutBySubstation.get(graph).run(layoutParameters)); @@ -53,13 +58,11 @@ protected void calculateCoordSubstations(LayoutParameters layoutParameters) { // Width by col int maxWidthCol = 0; // Snakeline hallway (horizontal & vertical) - int snakelineMargin = (int) layoutParameters.getZoneLayoutSnakeLinePadding(); + int snakelineMargin = layoutParameters.getZoneLayoutSnakeLinePadding(); // Zone size int nbRows = matrix.rowCount(); int nbCols = matrix.columnCount(); - // FIXME : padding diagram is canceled here ! - double leftPadding = layoutParameters.getDiagramPadding().getLeft(); - double topPadding = layoutParameters.getDiagramPadding().getTop(); + LayoutParameters.Padding diagramPadding = layoutParameters.getDiagramPadding(); // Move each substation into its matrix position for (int row = 0; row < nbRows; row++) { maxWidthCol = 0; @@ -72,7 +75,7 @@ protected void calculateCoordSubstations(LayoutParameters layoutParameters) { int deltaY = (int) (matrix.getMatrixCellHeight(row) % graph.getHeight()) / 2; double dx = maxWidthCol + (col + 1.0) * snakelineMargin; double dy = maxHeightRow + (row + 1.0) * snakelineMargin; - move(graph, dx - leftPadding + deltaX, dy - topPadding + deltaY); + move(graph, dx + deltaX, dy + deltaY); } maxWidthCol += matrix.getMatrixCellWidth(col); } @@ -80,7 +83,8 @@ protected void calculateCoordSubstations(LayoutParameters layoutParameters) { } double zoneWidth = maxWidthCol + (nbCols + 1.0) * snakelineMargin; double zoneHeight = maxHeightRow + (nbRows + 1.0) * snakelineMargin; - getGraph().setSize(zoneWidth, zoneHeight); + getGraph().setSize(diagramPadding.getLeft() + zoneWidth + diagramPadding.getRight(), + diagramPadding.getTop() + zoneHeight + diagramPadding.getBottom()); } @Override @@ -103,7 +107,7 @@ protected List calculatePolylineSnakeLine(LayoutParameters layoutParamete // Add starting point polyline.add(p1); // Find snakeline path - polyline.addAll(model.buildSnakeline(pathFinder, ss1Graph.getId(), p1, dNode1, ss2Graph.getId(), p2, dNode2, layoutParameters.getZoneLayoutSnakeLinePadding())); + polyline.addAll(model.buildSnakeline(pathFinder, ss1Graph.getId(), p1, dNode1, ss2Graph.getId(), p2, dNode2)); // Add ending point polyline.add(p2); } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/zonebygrid/Matrix.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/zonebygrid/Matrix.java index 13771d08f..05deff92d 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/zonebygrid/Matrix.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/zonebygrid/Matrix.java @@ -7,6 +7,7 @@ */ package com.powsybl.sld.layout.zonebygrid; +import com.powsybl.sld.layout.*; import com.powsybl.sld.model.graphs.*; import java.util.*; @@ -19,8 +20,14 @@ public class Matrix { // [row] [col] private final MatrixCell[][] cells; - public Matrix(int rows, int cols) { - cells = new MatrixCell[rows][cols]; + private final int snakelinePadding; + + private final LayoutParameters.Padding diagramPadding; + + public Matrix(int rows, int cols, LayoutParameters layoutParameters) { + this.cells = new MatrixCell[rows][cols]; + this.snakelinePadding = layoutParameters.getZoneLayoutSnakeLinePadding(); + this.diagramPadding = layoutParameters.getDiagramPadding(); } public Matrix set(int row, int col, MatrixCell cell) { @@ -62,4 +69,20 @@ public int rowCount() { public int columnCount() { return cells[0].length; } + + protected int getX(int col) { + int matrixCellWidth = 0; + for (int c = 0; c < col; c++) { + matrixCellWidth += getMatrixCellWidth(c); + } + return (int) diagramPadding.getLeft() + ((col + 1) * snakelinePadding) + matrixCellWidth; + } + + protected int getY(int row) { + int matrixCellHeight = 0; + for (int r = 0; r < row; r++) { + matrixCellHeight += getMatrixCellHeight(r); + } + return (int) diagramPadding.getTop() + (row + 1) * snakelinePadding + matrixCellHeight; + } } diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/zonebygrid/MatrixZoneLayoutModel.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/zonebygrid/MatrixZoneLayoutModel.java index 2a46ae38a..574a1f374 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/zonebygrid/MatrixZoneLayoutModel.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/layout/zonebygrid/MatrixZoneLayoutModel.java @@ -25,50 +25,36 @@ public class MatrixZoneLayoutModel { private Grid pathFinderGrid; - public MatrixZoneLayoutModel(String[][] ids) { - this.matrix = new Matrix(ids.length, ids[0].length); + private final int snakelinePadding; + + public MatrixZoneLayoutModel(String[][] ids, LayoutParameters layoutParameters) { + this.matrix = new Matrix(ids.length, ids[0].length, layoutParameters); + this.snakelinePadding = layoutParameters.getZoneLayoutSnakeLinePadding(); } public void addSubstationGraph(SubstationGraph graph, int row, int col) { this.matrix.set(row, col, new MatrixCell(graph, row, col)); } - private int getX(int col, double snakelineMargin) { - int matrixCellWidth = 0; - for (int c = 0; c < col; c++) { - matrixCellWidth += matrix.getMatrixCellWidth(c); - } - return ((col + 1) * (int) snakelineMargin) + matrixCellWidth; - } - - private int getY(int row, double snakelineMargin) { - int matrixCellHeight = 0; - for (int r = 0; r < row; r++) { - matrixCellHeight += matrix.getMatrixCellHeight(r); - } - return (row + 1) * (int) snakelineMargin + matrixCellHeight; - } - public List buildSnakeline(PathFinder pathfinder, String ss1Id, Point p1, Direction d1, - String ss2Id, Point p2, Direction d2, - double snakelineMargin) { - matrix.get(ss1Id).ifPresent(matrixCell -> insertFreePathInSubstation(matrixCell.row(), p1, d1, snakelineMargin)); - matrix.get(ss2Id).ifPresent(matrixCell -> insertFreePathInSubstation(matrixCell.row(), p2, d2, snakelineMargin)); + String ss2Id, Point p2, Direction d2) { + matrix.get(ss1Id).ifPresent(matrixCell -> insertFreePathInSubstation(matrixCell.row(), p1, d1)); + matrix.get(ss2Id).ifPresent(matrixCell -> insertFreePathInSubstation(matrixCell.row(), p2, d2)); // Use path finding algo return pathfinder.findShortestPath(pathFinderGrid, p1, p2); } - private void insertFreePathInSubstation(int row, Point p, Direction d, double snakelineMargin) { + private void insertFreePathInSubstation(int row, Point p, Direction d) { int x1 = (int) p.getX(); int y1 = (int) p.getY(); - int ssY = getY(row, snakelineMargin); - int min1Y = ssY - (int) snakelineMargin; + int ssY = matrix.getY(row); + int min1Y = ssY - snakelinePadding; int max1Y = y1; if (d == Direction.BOTTOM) { min1Y = y1; - max1Y = ssY + (int) matrix.getMatrixCellHeight(row) + (int) snakelineMargin; + max1Y = ssY + (int) matrix.getMatrixCellHeight(row) + snakelinePadding; } for (int y = min1Y; y <= max1Y; y++) { pathFinderGrid.setAvailability(x1, y, true); @@ -128,14 +114,13 @@ private void computeSubstationsAvailability(LayoutParameters layoutParameters) { } private void computeMatrixCellsAvailability(LayoutParameters layoutParameters) { - int snakelineMargin = (int) layoutParameters.getZoneLayoutSnakeLinePadding(); // Make empty cells available for snakeline computation List allCells = matrix.stream().toList(); allCells.forEach(cell -> { int matrixCellWidth = (int) matrix.getMatrixCellWidth(cell.col()); int matrixCellHeight = (int) matrix.getMatrixCellHeight(cell.row()); - int ssX = getX(cell.col(), snakelineMargin); - int ssY = getY(cell.row(), snakelineMargin); + int ssX = matrix.getX(cell.col()); + int ssY = matrix.getY(cell.row()); // Horizontal lines int stepH = (int) layoutParameters.getHorizontalSnakeLinePadding(); int deltaH = (matrixCellHeight % stepH) / 2; @@ -157,38 +142,40 @@ private void computeMatrixCellsAvailability(LayoutParameters layoutParameters) { } private void computeHorizontalHallwaysAvailability(int width, LayoutParameters layoutParameters) { - int snakelineMargin = (int) layoutParameters.getZoneLayoutSnakeLinePadding(); + int startX = (int) layoutParameters.getDiagramPadding().getLeft(); + int endX = width - startX - (int) layoutParameters.getDiagramPadding().getRight(); int nextY = 0; for (int r = 0; r < matrix.rowCount(); r++) { - for (int x = 0; x < width; x++) { - for (int y = getY(r, snakelineMargin); y >= getY(r, snakelineMargin) - snakelineMargin; y -= layoutParameters.getHorizontalSnakeLinePadding()) { + for (int x = startX; x < endX; x++) { + for (int y = matrix.getY(r); y >= matrix.getY(r) - snakelinePadding; y -= layoutParameters.getHorizontalSnakeLinePadding()) { pathFinderGrid.setAvailability(x, y, true); } } - nextY += snakelineMargin + matrix.getMatrixCellHeight(r); + nextY += snakelinePadding + matrix.getMatrixCellHeight(r); } // Last snakelineMargin - for (int x = 0; x < width; x++) { - for (int y = nextY; y < nextY + snakelineMargin; y += layoutParameters.getHorizontalSnakeLinePadding()) { + for (int x = startX; x < endX; x++) { + for (int y = nextY; y <= nextY + snakelinePadding; y += layoutParameters.getHorizontalSnakeLinePadding()) { pathFinderGrid.setAvailability(x, y, true); } } } private void computeVerticalHallwaysAvailability(int height, LayoutParameters layoutParameters) { - int snakelineMargin = (int) layoutParameters.getZoneLayoutSnakeLinePadding(); + int startY = (int) layoutParameters.getDiagramPadding().getTop(); + int endY = height - startY - (int) layoutParameters.getDiagramPadding().getBottom(); int nextX = 0; for (int c = 0; c < matrix.columnCount(); c++) { - for (int y = 0; y < height; y++) { - for (int x = getX(c, snakelineMargin); x >= getX(c, snakelineMargin) - snakelineMargin; x -= layoutParameters.getVerticalSnakeLinePadding()) { + for (int y = startY; y < endY; y++) { + for (int x = matrix.getX(c); x >= matrix.getX(c) - snakelinePadding; x -= layoutParameters.getVerticalSnakeLinePadding()) { pathFinderGrid.setAvailability(x, y, true); } } - nextX += snakelineMargin + matrix.getMatrixCellWidth(c); + nextX += snakelinePadding + matrix.getMatrixCellWidth(c); } // Last snakelineMargin - for (int y = 0; y < height; y++) { - for (int x = nextX; x < nextX + snakelineMargin; x += layoutParameters.getVerticalSnakeLinePadding()) { + for (int y = startY; y < endY; y++) { + for (int x = nextX; x <= nextX + snakelinePadding; x += layoutParameters.getVerticalSnakeLinePadding()) { pathFinderGrid.setAvailability(x, y, true); } } diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestCase13ZoneGraph.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestCase13ZoneGraph.java index 2071bb634..2f64dd6db 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestCase13ZoneGraph.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestCase13ZoneGraph.java @@ -182,8 +182,8 @@ void testInvalidZoneGraphMatrix() { SubstationLayoutFactory sFactory = new HorizontalSubstationLayoutFactory(); VoltageLevelLayoutFactory vFactory = new PositionVoltageLevelLayoutFactory(); MatrixZoneLayoutFactory mFactory = new MatrixZoneLayoutFactory(substationsIds); - - PowsyblException e = assertThrows(PowsyblException.class, () -> mFactory.create(g, pFinderFactory, sFactory, vFactory)); + Layout layout = mFactory.create(g, pFinderFactory, sFactory, vFactory); + PowsyblException e = assertThrows(PowsyblException.class, () -> layout.run(layoutParameters)); assertEquals("Substation 'A' was not found in zone graph 'B_C'", e.getMessage()); } } diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphHHRaw.json b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphHHRaw.json index 10571dfa1..3982e1f52 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphHHRaw.json +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphHHRaw.json @@ -7,8 +7,8 @@ "name" : "vl1", "nominalVoltage" : 380.0 }, - "x" : 110.0, - "y" : 330.0, + "x" : 111.0, + "y" : 331.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl1_dgen1-bgen1", @@ -2812,8 +2812,8 @@ "name" : "vl2", "nominalVoltage" : 225.0 }, - "x" : 1040.0, - "y" : 330.0, + "x" : 1041.0, + "y" : 331.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl2_dgen4-bgen4", @@ -4464,8 +4464,8 @@ "name" : "vl3", "nominalVoltage" : 225.0 }, - "x" : 1690.0, - "y" : 330.0, + "x" : 1691.0, + "y" : 331.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl3_dload4-bload4", @@ -5300,8 +5300,8 @@ "id" : "trf1", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 750.0, - "y" : 270.0, + "x" : 751.0, + "y" : 271.0, "orientation" : "RIGHT", "name" : "trf1", "equipmentId" : "trf1", @@ -5320,8 +5320,8 @@ "id" : "trf2", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1020.0, - "y" : 499.5, + "x" : 1021.0, + "y" : 500.5, "orientation" : "DOWN", "name" : "trf2", "equipmentId" : "trf2", @@ -5340,8 +5340,8 @@ "id" : "trf3", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 975.0, - "y" : 789.0, + "x" : 976.0, + "y" : 790.0, "orientation" : "RIGHT", "name" : "trf3", "equipmentId" : "trf3", @@ -5360,8 +5360,8 @@ "id" : "trf4", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 990.0, - "y" : 514.5, + "x" : 991.0, + "y" : 515.5, "name" : "trf4", "equipmentId" : "trf4", "voltageLevelInfosLeg1" : { @@ -5379,8 +5379,8 @@ "id" : "trf5", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1670.0, - "y" : 514.5, + "x" : 1671.0, + "y" : 515.5, "orientation" : "DOWN", "name" : "trf5", "equipmentId" : "trf5", @@ -5399,8 +5399,8 @@ "id" : "trf6", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1415.0, - "y" : 150.0, + "x" : 1416.0, + "y" : 151.0, "name" : "trf6", "equipmentId" : "trf6", "voltageLevelInfosLeg1" : { @@ -5423,8 +5423,8 @@ "id" : "trf7", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1365.0, - "y" : 120.0, + "x" : 1366.0, + "y" : 121.0, "name" : "trf7", "equipmentId" : "trf7", "voltageLevelInfosLeg1" : { @@ -5447,8 +5447,8 @@ "id" : "trf8", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1465.0, - "y" : 909.0, + "x" : 1466.0, + "y" : 910.0, "orientation" : "DOWN", "name" : "trf8", "equipmentId" : "trf8", @@ -5474,133 +5474,133 @@ "node1" : "trf1_ONE", "node2" : "trf1" } ], - "snakeLine" : [ 285.0, 330.0, 285.0, 270.0, 750.0, 270.0 ] + "snakeLine" : [ 286.0, 331.0, 286.0, 271.0, 751.0, 271.0 ] }, { "id" : "EDGE_trf1_TWO", "nodes" : [ { "node1" : "trf1_TWO", "node2" : "trf1" } ], - "snakeLine" : [ 1215.0, 330.0, 1215.0, 270.0, 750.0, 270.0 ] + "snakeLine" : [ 1216.0, 331.0, 1216.0, 271.0, 751.0, 271.0 ] }, { "id" : "EDGE_trf2_ONE", "nodes" : [ { "node1" : "trf2_ONE", "node2" : "trf2" } ], - "snakeLine" : [ 835.0, 330.0, 835.0, 240.0, 1020.0, 240.0, 1020.0, 499.5 ] + "snakeLine" : [ 836.0, 331.0, 836.0, 241.0, 1021.0, 241.0, 1021.0, 500.5 ] }, { "id" : "EDGE_trf2_TWO", "nodes" : [ { "node1" : "trf2_TWO", "node2" : "trf2" } ], - "snakeLine" : [ 1515.0, 699.0, 1515.0, 759.0, 1020.0, 759.0, 1020.0, 499.5 ] + "snakeLine" : [ 1516.0, 700.0, 1516.0, 760.0, 1021.0, 760.0, 1021.0, 500.5 ] }, { "id" : "EDGE_trf3_ONE", "nodes" : [ { "node1" : "trf3_ONE", "node2" : "trf3" } ], - "snakeLine" : [ 385.0, 699.0, 385.0, 789.0, 975.0, 789.0 ] + "snakeLine" : [ 386.0, 700.0, 386.0, 790.0, 976.0, 790.0 ] }, { "id" : "EDGE_trf3_TWO", "nodes" : [ { "node1" : "trf3_TWO", "node2" : "trf3" } ], - "snakeLine" : [ 1565.0, 699.0, 1565.0, 789.0, 975.0, 789.0 ] + "snakeLine" : [ 1566.0, 700.0, 1566.0, 790.0, 976.0, 790.0 ] }, { "id" : "EDGE_trf4_ONE", "nodes" : [ { "node1" : "trf4_ONE", "node2" : "trf4" } ], - "snakeLine" : [ 785.0, 699.0, 785.0, 819.0, 990.0, 819.0, 990.0, 514.5 ] + "snakeLine" : [ 786.0, 700.0, 786.0, 820.0, 991.0, 820.0, 991.0, 515.5 ] }, { "id" : "EDGE_trf4_TWO", "nodes" : [ { "node1" : "trf4_TWO", "node2" : "trf4" } ], - "snakeLine" : [ 1315.0, 330.0, 1315.0, 210.0, 990.0, 210.0, 990.0, 514.5 ] + "snakeLine" : [ 1316.0, 331.0, 1316.0, 211.0, 991.0, 211.0, 991.0, 515.5 ] }, { "id" : "EDGE_trf5_ONE", "nodes" : [ { "node1" : "trf5_ONE", "node2" : "trf5" } ], - "snakeLine" : [ 435.0, 330.0, 435.0, 180.0, 1670.0, 180.0, 1670.0, 514.5 ] + "snakeLine" : [ 436.0, 331.0, 436.0, 181.0, 1671.0, 181.0, 1671.0, 515.5 ] }, { "id" : "EDGE_trf5_TWO", "nodes" : [ { "node1" : "trf5_TWO", "node2" : "trf5" } ], - "snakeLine" : [ 1765.0, 674.0, 1765.0, 849.0, 1670.0, 849.0, 1670.0, 514.5 ] + "snakeLine" : [ 1766.0, 675.0, 1766.0, 850.0, 1671.0, 850.0, 1671.0, 515.5 ] }, { "id" : "EDGE_trf6_ONE", "nodes" : [ { "node1" : "trf6_ONE", "node2" : "trf6" } ], - "snakeLine" : [ 485.0, 330.0, 485.0, 150.0, 1415.0, 150.0 ] + "snakeLine" : [ 486.0, 331.0, 486.0, 151.0, 1416.0, 151.0 ] }, { "id" : "EDGE_trf6_TWO", "nodes" : [ { "node1" : "trf6_TWO", "node2" : "trf6" } ], - "snakeLine" : [ 1415.0, 330.0, 1415.0, 150.0 ] + "snakeLine" : [ 1416.0, 331.0, 1416.0, 151.0 ] }, { "id" : "EDGE_trf6_THREE", "nodes" : [ { "node1" : "trf6_THREE", "node2" : "trf6" } ], - "snakeLine" : [ 1815.0, 330.0, 1815.0, 150.0, 1415.0, 150.0 ] + "snakeLine" : [ 1816.0, 331.0, 1816.0, 151.0, 1416.0, 151.0 ] }, { "id" : "EDGE_trf7_ONE", "nodes" : [ { "node1" : "trf7_ONE", "node2" : "trf7" } ], - "snakeLine" : [ 535.0, 699.0, 535.0, 879.0, 960.0, 879.0, 960.0, 120.0, 1365.0, 120.0 ] + "snakeLine" : [ 536.0, 700.0, 536.0, 880.0, 961.0, 880.0, 961.0, 121.0, 1366.0, 121.0 ] }, { "id" : "EDGE_trf7_TWO", "nodes" : [ { "node1" : "trf7_TWO", "node2" : "trf7" } ], - "snakeLine" : [ 1365.0, 330.0, 1365.0, 120.0 ] + "snakeLine" : [ 1366.0, 331.0, 1366.0, 121.0 ] }, { "id" : "EDGE_trf7_THREE", "nodes" : [ { "node1" : "trf7_THREE", "node2" : "trf7" } ], - "snakeLine" : [ 1865.0, 674.0, 1865.0, 879.0, 1640.0, 879.0, 1640.0, 120.0, 1365.0, 120.0 ] + "snakeLine" : [ 1866.0, 675.0, 1866.0, 880.0, 1641.0, 880.0, 1641.0, 121.0, 1366.0, 121.0 ] }, { "id" : "EDGE_trf8_ONE", "nodes" : [ { "node1" : "trf8_ONE", "node2" : "trf8" } ], - "snakeLine" : [ 735.0, 330.0, 735.0, 90.0, 930.0, 90.0, 930.0, 909.0, 1465.0, 909.0 ] + "snakeLine" : [ 736.0, 331.0, 736.0, 91.0, 931.0, 91.0, 931.0, 910.0, 1466.0, 910.0 ] }, { "id" : "EDGE_trf8_TWO", "nodes" : [ { "node1" : "trf8_TWO", "node2" : "trf8" } ], - "snakeLine" : [ 1465.0, 699.0, 1465.0, 909.0 ] + "snakeLine" : [ 1466.0, 700.0, 1466.0, 910.0 ] }, { "id" : "EDGE_trf8_THREE", "nodes" : [ { "node1" : "trf8_THREE", "node2" : "trf8" } ], - "snakeLine" : [ 1915.0, 330.0, 1915.0, 90.0, 1610.0, 90.0, 1610.0, 909.0, 1465.0, 909.0 ] + "snakeLine" : [ 1916.0, 331.0, 1916.0, 91.0, 1611.0, 91.0, 1611.0, 910.0, 1466.0, 910.0 ] } ], "lineEdges" : [ ] }, { @@ -5611,8 +5611,8 @@ "name" : "vlSubst2", "nominalVoltage" : 380.0 }, - "x" : 2070.0, - "y" : 267.0, + "x" : 2071.0, + "y" : 268.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vlSubst2_dhvdc_lcc21_2-bhvdc_lcc21_2", @@ -6128,20 +6128,20 @@ "node1" : "line1_ONE", "node2" : "line1_TWO" } ], - "snakeLine" : [ 585.0, 330.0, 585.0, 330.0, 585.0, 60.0, 2195.0, 60.0, 2195.0, 267.0, 2195.0, 267.0 ] + "snakeLine" : [ 586.0, 331.0, 586.0, 331.0, 586.0, 61.0, 2196.0, 61.0, 2196.0, 268.0, 2196.0, 268.0 ] }, { "id" : "hvdc_lcc", "nodes" : [ { "node1" : "hvdc_lcc_ONE", "node2" : "hvdc_lcc_TWO" } ], - "snakeLine" : [ 135.0, 330.0, 135.0, 330.0, 135.0, 30.0, 2095.0, 30.0, 2095.0, 267.0, 2095.0, 267.0 ] + "snakeLine" : [ 136.0, 331.0, 136.0, 331.0, 136.0, 31.0, 2096.0, 31.0, 2096.0, 268.0, 2096.0, 268.0 ] }, { "id" : "hvdc_vsc", "nodes" : [ { "node1" : "hvdc_vsc_ONE", "node2" : "hvdc_vsc_TWO" } ], - "snakeLine" : [ 185.0, 330.0, 185.0, 330.0, 185.0, 30.0, 2050.0, 30.0, 2050.0, 244.0, 2145.0, 244.0, 2145.0, 267.0, 2145.0, 267.0 ] + "snakeLine" : [ 186.0, 331.0, 186.0, 331.0, 186.0, 31.0, 2051.0, 31.0, 2051.0, 245.0, 2146.0, 245.0, 2146.0, 268.0, 2146.0, 268.0 ] } ] } \ No newline at end of file diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphHVRaw.json b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphHVRaw.json index 67bf73e35..4e868c853 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphHVRaw.json +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphHVRaw.json @@ -7,8 +7,8 @@ "name" : "vl1", "nominalVoltage" : 380.0 }, - "x" : 260.0, - "y" : 270.0, + "x" : 261.0, + "y" : 271.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl1_dgen1-bgen1", @@ -2812,8 +2812,8 @@ "name" : "vl2", "nominalVoltage" : 225.0 }, - "x" : 260.0, - "y" : 879.0, + "x" : 261.0, + "y" : 880.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl2_dgen4-bgen4", @@ -4464,8 +4464,8 @@ "name" : "vl3", "nominalVoltage" : 225.0 }, - "x" : 260.0, - "y" : 1458.0, + "x" : 261.0, + "y" : 1459.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl3_dload4-bload4", @@ -5300,8 +5300,8 @@ "id" : "trf1", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 240.0, - "y" : 454.5, + "x" : 241.0, + "y" : 455.5, "orientation" : "DOWN", "name" : "trf1", "equipmentId" : "trf1", @@ -5320,8 +5320,8 @@ "id" : "trf2", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 210.0, - "y" : 744.0, + "x" : 211.0, + "y" : 745.0, "orientation" : "DOWN", "name" : "trf2", "equipmentId" : "trf2", @@ -5340,8 +5340,8 @@ "id" : "trf3", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 180.0, - "y" : 1033.5, + "x" : 181.0, + "y" : 1034.5, "orientation" : "DOWN", "name" : "trf3", "equipmentId" : "trf3", @@ -5360,8 +5360,8 @@ "id" : "trf4", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 735.0, - "y" : 759.0, + "x" : 736.0, + "y" : 760.0, "orientation" : "LEFT", "name" : "trf4", "equipmentId" : "trf4", @@ -5380,8 +5380,8 @@ "id" : "trf5", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 150.0, - "y" : 1006.0, + "x" : 151.0, + "y" : 1007.0, "orientation" : "DOWN", "name" : "trf5", "equipmentId" : "trf5", @@ -5400,8 +5400,8 @@ "id" : "trf6", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 635.0, - "y" : 789.0, + "x" : 636.0, + "y" : 790.0, "name" : "trf6", "equipmentId" : "trf6", "voltageLevelInfosLeg1" : { @@ -5424,8 +5424,8 @@ "id" : "trf7", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 585.0, - "y" : 819.0, + "x" : 586.0, + "y" : 820.0, "name" : "trf7", "equipmentId" : "trf7", "voltageLevelInfosLeg1" : { @@ -5448,8 +5448,8 @@ "id" : "trf8", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 685.0, - "y" : 1398.0, + "x" : 686.0, + "y" : 1399.0, "orientation" : "DOWN", "name" : "trf8", "equipmentId" : "trf8", @@ -5475,133 +5475,133 @@ "node1" : "trf1_ONE", "node2" : "trf1" } ], - "snakeLine" : [ 435.0, 270.0, 435.0, 210.0, 240.0, 210.0, 240.0, 454.5 ] + "snakeLine" : [ 436.0, 271.0, 436.0, 211.0, 241.0, 211.0, 241.0, 455.5 ] }, { "id" : "EDGE_trf1_TWO", "nodes" : [ { "node1" : "trf1_TWO", "node2" : "trf1" } ], - "snakeLine" : [ 435.0, 879.0, 435.0, 699.0, 240.0, 699.0, 240.0, 454.5 ] + "snakeLine" : [ 436.0, 880.0, 436.0, 700.0, 241.0, 700.0, 241.0, 455.5 ] }, { "id" : "EDGE_trf2_ONE", "nodes" : [ { "node1" : "trf2_ONE", "node2" : "trf2" } ], - "snakeLine" : [ 985.0, 270.0, 985.0, 180.0, 210.0, 180.0, 210.0, 744.0 ] + "snakeLine" : [ 986.0, 271.0, 986.0, 181.0, 211.0, 181.0, 211.0, 745.0 ] }, { "id" : "EDGE_trf2_TWO", "nodes" : [ { "node1" : "trf2_TWO", "node2" : "trf2" } ], - "snakeLine" : [ 735.0, 1248.0, 735.0, 1308.0, 210.0, 1308.0, 210.0, 744.0 ] + "snakeLine" : [ 736.0, 1249.0, 736.0, 1309.0, 211.0, 1309.0, 211.0, 745.0 ] }, { "id" : "EDGE_trf3_ONE", "nodes" : [ { "node1" : "trf3_ONE", "node2" : "trf3" } ], - "snakeLine" : [ 535.0, 639.0, 535.0, 729.0, 180.0, 729.0, 180.0, 1033.5 ] + "snakeLine" : [ 536.0, 640.0, 536.0, 730.0, 181.0, 730.0, 181.0, 1034.5 ] }, { "id" : "EDGE_trf3_TWO", "nodes" : [ { "node1" : "trf3_TWO", "node2" : "trf3" } ], - "snakeLine" : [ 785.0, 1248.0, 785.0, 1338.0, 180.0, 1338.0, 180.0, 1033.5 ] + "snakeLine" : [ 786.0, 1249.0, 786.0, 1339.0, 181.0, 1339.0, 181.0, 1034.5 ] }, { "id" : "EDGE_trf4_ONE", "nodes" : [ { "node1" : "trf4_ONE", "node2" : "trf4" } ], - "snakeLine" : [ 935.0, 639.0, 935.0, 759.0, 735.0, 759.0 ] + "snakeLine" : [ 936.0, 640.0, 936.0, 760.0, 736.0, 760.0 ] }, { "id" : "EDGE_trf4_TWO", "nodes" : [ { "node1" : "trf4_TWO", "node2" : "trf4" } ], - "snakeLine" : [ 535.0, 879.0, 535.0, 759.0, 735.0, 759.0 ] + "snakeLine" : [ 536.0, 880.0, 536.0, 760.0, 736.0, 760.0 ] }, { "id" : "EDGE_trf5_ONE", "nodes" : [ { "node1" : "trf5_ONE", "node2" : "trf5" } ], - "snakeLine" : [ 585.0, 270.0, 585.0, 150.0, 150.0, 150.0, 150.0, 1006.0 ] + "snakeLine" : [ 586.0, 271.0, 586.0, 151.0, 151.0, 151.0, 151.0, 1007.0 ] }, { "id" : "EDGE_trf5_TWO", "nodes" : [ { "node1" : "trf5_TWO", "node2" : "trf5" } ], - "snakeLine" : [ 335.0, 1802.0, 335.0, 1862.0, 150.0, 1862.0, 150.0, 1006.0 ] + "snakeLine" : [ 336.0, 1803.0, 336.0, 1863.0, 151.0, 1863.0, 151.0, 1007.0 ] }, { "id" : "EDGE_trf6_ONE", "nodes" : [ { "node1" : "trf6_ONE", "node2" : "trf6" } ], - "snakeLine" : [ 635.0, 270.0, 635.0, 120.0, 120.0, 120.0, 120.0, 789.0, 635.0, 789.0 ] + "snakeLine" : [ 636.0, 271.0, 636.0, 121.0, 121.0, 121.0, 121.0, 790.0, 636.0, 790.0 ] }, { "id" : "EDGE_trf6_TWO", "nodes" : [ { "node1" : "trf6_TWO", "node2" : "trf6" } ], - "snakeLine" : [ 635.0, 879.0, 635.0, 789.0 ] + "snakeLine" : [ 636.0, 880.0, 636.0, 790.0 ] }, { "id" : "EDGE_trf6_THREE", "nodes" : [ { "node1" : "trf6_THREE", "node2" : "trf6" } ], - "snakeLine" : [ 385.0, 1458.0, 385.0, 1368.0, 1080.0, 1368.0, 1080.0, 789.0, 635.0, 789.0 ] + "snakeLine" : [ 386.0, 1459.0, 386.0, 1369.0, 1081.0, 1369.0, 1081.0, 790.0, 636.0, 790.0 ] }, { "id" : "EDGE_trf7_ONE", "nodes" : [ { "node1" : "trf7_ONE", "node2" : "trf7" } ], - "snakeLine" : [ 685.0, 639.0, 685.0, 819.0, 585.0, 819.0 ] + "snakeLine" : [ 686.0, 640.0, 686.0, 820.0, 586.0, 820.0 ] }, { "id" : "EDGE_trf7_TWO", "nodes" : [ { "node1" : "trf7_TWO", "node2" : "trf7" } ], - "snakeLine" : [ 585.0, 879.0, 585.0, 819.0 ] + "snakeLine" : [ 586.0, 880.0, 586.0, 820.0 ] }, { "id" : "EDGE_trf7_THREE", "nodes" : [ { "node1" : "trf7_THREE", "node2" : "trf7" } ], - "snakeLine" : [ 435.0, 1802.0, 435.0, 1892.0, 1110.0, 1892.0, 1110.0, 819.0, 585.0, 819.0 ] + "snakeLine" : [ 436.0, 1803.0, 436.0, 1893.0, 1111.0, 1893.0, 1111.0, 820.0, 586.0, 820.0 ] }, { "id" : "EDGE_trf8_ONE", "nodes" : [ { "node1" : "trf8_ONE", "node2" : "trf8" } ], - "snakeLine" : [ 885.0, 270.0, 885.0, 90.0, 90.0, 90.0, 90.0, 1398.0, 685.0, 1398.0 ] + "snakeLine" : [ 886.0, 271.0, 886.0, 91.0, 91.0, 91.0, 91.0, 1399.0, 686.0, 1399.0 ] }, { "id" : "EDGE_trf8_TWO", "nodes" : [ { "node1" : "trf8_TWO", "node2" : "trf8" } ], - "snakeLine" : [ 685.0, 1248.0, 685.0, 1398.0 ] + "snakeLine" : [ 686.0, 1249.0, 686.0, 1399.0 ] }, { "id" : "EDGE_trf8_THREE", "nodes" : [ { "node1" : "trf8_THREE", "node2" : "trf8" } ], - "snakeLine" : [ 485.0, 1458.0, 485.0, 1398.0, 685.0, 1398.0 ] + "snakeLine" : [ 486.0, 1459.0, 486.0, 1399.0, 686.0, 1399.0 ] } ], "lineEdges" : [ ] }, { @@ -5612,8 +5612,8 @@ "name" : "vlSubst2", "nominalVoltage" : 380.0 }, - "x" : 1220.0, - "y" : 175.0, + "x" : 1221.0, + "y" : 176.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vlSubst2_dhvdc_lcc21_2-bhvdc_lcc21_2", @@ -6129,20 +6129,20 @@ "node1" : "line1_ONE", "node2" : "line1_TWO" } ], - "snakeLine" : [ 735.0, 270.0, 735.0, 270.0, 735.0, 60.0, 1345.0, 60.0, 1345.0, 175.0, 1345.0, 175.0 ] + "snakeLine" : [ 736.0, 271.0, 736.0, 271.0, 736.0, 61.0, 1346.0, 61.0, 1346.0, 176.0, 1346.0, 176.0 ] }, { "id" : "hvdc_lcc", "nodes" : [ { "node1" : "hvdc_lcc_ONE", "node2" : "hvdc_lcc_TWO" } ], - "snakeLine" : [ 285.0, 270.0, 285.0, 270.0, 285.0, 30.0, 1245.0, 30.0, 1245.0, 175.0, 1245.0, 175.0 ] + "snakeLine" : [ 286.0, 271.0, 286.0, 271.0, 286.0, 31.0, 1246.0, 31.0, 1246.0, 176.0, 1246.0, 176.0 ] }, { "id" : "hvdc_vsc", "nodes" : [ { "node1" : "hvdc_vsc_ONE", "node2" : "hvdc_vsc_TWO" } ], - "snakeLine" : [ 335.0, 270.0, 335.0, 270.0, 335.0, 30.0, 1200.0, 30.0, 1200.0, 151.0, 1295.0, 151.0, 1295.0, 175.0, 1295.0, 175.0 ] + "snakeLine" : [ 336.0, 271.0, 336.0, 271.0, 336.0, 31.0, 1201.0, 31.0, 1201.0, 152.0, 1296.0, 152.0, 1296.0, 176.0, 1296.0, 176.0 ] } ] } \ No newline at end of file diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphVHRaw.json b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphVHRaw.json index 685515cde..5e7624af0 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphVHRaw.json +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphVHRaw.json @@ -7,8 +7,8 @@ "name" : "vl1", "nominalVoltage" : 380.0 }, - "x" : 110.0, - "y" : 330.0, + "x" : 111.0, + "y" : 331.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl1_dgen1-bgen1", @@ -2812,8 +2812,8 @@ "name" : "vl2", "nominalVoltage" : 225.0 }, - "x" : 1040.0, - "y" : 330.0, + "x" : 1041.0, + "y" : 331.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl2_dgen4-bgen4", @@ -4464,8 +4464,8 @@ "name" : "vl3", "nominalVoltage" : 225.0 }, - "x" : 1690.0, - "y" : 330.0, + "x" : 1691.0, + "y" : 331.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl3_dload4-bload4", @@ -5300,8 +5300,8 @@ "id" : "trf1", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 750.0, - "y" : 270.0, + "x" : 751.0, + "y" : 271.0, "orientation" : "RIGHT", "name" : "trf1", "equipmentId" : "trf1", @@ -5320,8 +5320,8 @@ "id" : "trf2", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1020.0, - "y" : 499.5, + "x" : 1021.0, + "y" : 500.5, "orientation" : "DOWN", "name" : "trf2", "equipmentId" : "trf2", @@ -5340,8 +5340,8 @@ "id" : "trf3", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 975.0, - "y" : 789.0, + "x" : 976.0, + "y" : 790.0, "orientation" : "RIGHT", "name" : "trf3", "equipmentId" : "trf3", @@ -5360,8 +5360,8 @@ "id" : "trf4", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 990.0, - "y" : 514.5, + "x" : 991.0, + "y" : 515.5, "name" : "trf4", "equipmentId" : "trf4", "voltageLevelInfosLeg1" : { @@ -5379,8 +5379,8 @@ "id" : "trf5", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1670.0, - "y" : 514.5, + "x" : 1671.0, + "y" : 515.5, "orientation" : "DOWN", "name" : "trf5", "equipmentId" : "trf5", @@ -5399,8 +5399,8 @@ "id" : "trf6", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1415.0, - "y" : 150.0, + "x" : 1416.0, + "y" : 151.0, "name" : "trf6", "equipmentId" : "trf6", "voltageLevelInfosLeg1" : { @@ -5423,8 +5423,8 @@ "id" : "trf7", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1365.0, - "y" : 120.0, + "x" : 1366.0, + "y" : 121.0, "name" : "trf7", "equipmentId" : "trf7", "voltageLevelInfosLeg1" : { @@ -5447,8 +5447,8 @@ "id" : "trf8", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 1465.0, - "y" : 909.0, + "x" : 1466.0, + "y" : 910.0, "orientation" : "DOWN", "name" : "trf8", "equipmentId" : "trf8", @@ -5474,133 +5474,133 @@ "node1" : "trf1_ONE", "node2" : "trf1" } ], - "snakeLine" : [ 285.0, 330.0, 285.0, 270.0, 750.0, 270.0 ] + "snakeLine" : [ 286.0, 331.0, 286.0, 271.0, 751.0, 271.0 ] }, { "id" : "EDGE_trf1_TWO", "nodes" : [ { "node1" : "trf1_TWO", "node2" : "trf1" } ], - "snakeLine" : [ 1215.0, 330.0, 1215.0, 270.0, 750.0, 270.0 ] + "snakeLine" : [ 1216.0, 331.0, 1216.0, 271.0, 751.0, 271.0 ] }, { "id" : "EDGE_trf2_ONE", "nodes" : [ { "node1" : "trf2_ONE", "node2" : "trf2" } ], - "snakeLine" : [ 835.0, 330.0, 835.0, 240.0, 1020.0, 240.0, 1020.0, 499.5 ] + "snakeLine" : [ 836.0, 331.0, 836.0, 241.0, 1021.0, 241.0, 1021.0, 500.5 ] }, { "id" : "EDGE_trf2_TWO", "nodes" : [ { "node1" : "trf2_TWO", "node2" : "trf2" } ], - "snakeLine" : [ 1515.0, 699.0, 1515.0, 759.0, 1020.0, 759.0, 1020.0, 499.5 ] + "snakeLine" : [ 1516.0, 700.0, 1516.0, 760.0, 1021.0, 760.0, 1021.0, 500.5 ] }, { "id" : "EDGE_trf3_ONE", "nodes" : [ { "node1" : "trf3_ONE", "node2" : "trf3" } ], - "snakeLine" : [ 385.0, 699.0, 385.0, 789.0, 975.0, 789.0 ] + "snakeLine" : [ 386.0, 700.0, 386.0, 790.0, 976.0, 790.0 ] }, { "id" : "EDGE_trf3_TWO", "nodes" : [ { "node1" : "trf3_TWO", "node2" : "trf3" } ], - "snakeLine" : [ 1565.0, 699.0, 1565.0, 789.0, 975.0, 789.0 ] + "snakeLine" : [ 1566.0, 700.0, 1566.0, 790.0, 976.0, 790.0 ] }, { "id" : "EDGE_trf4_ONE", "nodes" : [ { "node1" : "trf4_ONE", "node2" : "trf4" } ], - "snakeLine" : [ 785.0, 699.0, 785.0, 819.0, 990.0, 819.0, 990.0, 514.5 ] + "snakeLine" : [ 786.0, 700.0, 786.0, 820.0, 991.0, 820.0, 991.0, 515.5 ] }, { "id" : "EDGE_trf4_TWO", "nodes" : [ { "node1" : "trf4_TWO", "node2" : "trf4" } ], - "snakeLine" : [ 1315.0, 330.0, 1315.0, 210.0, 990.0, 210.0, 990.0, 514.5 ] + "snakeLine" : [ 1316.0, 331.0, 1316.0, 211.0, 991.0, 211.0, 991.0, 515.5 ] }, { "id" : "EDGE_trf5_ONE", "nodes" : [ { "node1" : "trf5_ONE", "node2" : "trf5" } ], - "snakeLine" : [ 435.0, 330.0, 435.0, 180.0, 1670.0, 180.0, 1670.0, 514.5 ] + "snakeLine" : [ 436.0, 331.0, 436.0, 181.0, 1671.0, 181.0, 1671.0, 515.5 ] }, { "id" : "EDGE_trf5_TWO", "nodes" : [ { "node1" : "trf5_TWO", "node2" : "trf5" } ], - "snakeLine" : [ 1765.0, 674.0, 1765.0, 849.0, 1670.0, 849.0, 1670.0, 514.5 ] + "snakeLine" : [ 1766.0, 675.0, 1766.0, 850.0, 1671.0, 850.0, 1671.0, 515.5 ] }, { "id" : "EDGE_trf6_ONE", "nodes" : [ { "node1" : "trf6_ONE", "node2" : "trf6" } ], - "snakeLine" : [ 485.0, 330.0, 485.0, 150.0, 1415.0, 150.0 ] + "snakeLine" : [ 486.0, 331.0, 486.0, 151.0, 1416.0, 151.0 ] }, { "id" : "EDGE_trf6_TWO", "nodes" : [ { "node1" : "trf6_TWO", "node2" : "trf6" } ], - "snakeLine" : [ 1415.0, 330.0, 1415.0, 150.0 ] + "snakeLine" : [ 1416.0, 331.0, 1416.0, 151.0 ] }, { "id" : "EDGE_trf6_THREE", "nodes" : [ { "node1" : "trf6_THREE", "node2" : "trf6" } ], - "snakeLine" : [ 1815.0, 330.0, 1815.0, 150.0, 1415.0, 150.0 ] + "snakeLine" : [ 1816.0, 331.0, 1816.0, 151.0, 1416.0, 151.0 ] }, { "id" : "EDGE_trf7_ONE", "nodes" : [ { "node1" : "trf7_ONE", "node2" : "trf7" } ], - "snakeLine" : [ 535.0, 699.0, 535.0, 879.0, 960.0, 879.0, 960.0, 120.0, 1365.0, 120.0 ] + "snakeLine" : [ 536.0, 700.0, 536.0, 880.0, 961.0, 880.0, 961.0, 121.0, 1366.0, 121.0 ] }, { "id" : "EDGE_trf7_TWO", "nodes" : [ { "node1" : "trf7_TWO", "node2" : "trf7" } ], - "snakeLine" : [ 1365.0, 330.0, 1365.0, 120.0 ] + "snakeLine" : [ 1366.0, 331.0, 1366.0, 121.0 ] }, { "id" : "EDGE_trf7_THREE", "nodes" : [ { "node1" : "trf7_THREE", "node2" : "trf7" } ], - "snakeLine" : [ 1865.0, 674.0, 1865.0, 879.0, 1640.0, 879.0, 1640.0, 120.0, 1365.0, 120.0 ] + "snakeLine" : [ 1866.0, 675.0, 1866.0, 880.0, 1641.0, 880.0, 1641.0, 121.0, 1366.0, 121.0 ] }, { "id" : "EDGE_trf8_ONE", "nodes" : [ { "node1" : "trf8_ONE", "node2" : "trf8" } ], - "snakeLine" : [ 735.0, 330.0, 735.0, 90.0, 930.0, 90.0, 930.0, 909.0, 1465.0, 909.0 ] + "snakeLine" : [ 736.0, 331.0, 736.0, 91.0, 931.0, 91.0, 931.0, 910.0, 1466.0, 910.0 ] }, { "id" : "EDGE_trf8_TWO", "nodes" : [ { "node1" : "trf8_TWO", "node2" : "trf8" } ], - "snakeLine" : [ 1465.0, 699.0, 1465.0, 909.0 ] + "snakeLine" : [ 1466.0, 700.0, 1466.0, 910.0 ] }, { "id" : "EDGE_trf8_THREE", "nodes" : [ { "node1" : "trf8_THREE", "node2" : "trf8" } ], - "snakeLine" : [ 1915.0, 330.0, 1915.0, 90.0, 1610.0, 90.0, 1610.0, 909.0, 1465.0, 909.0 ] + "snakeLine" : [ 1916.0, 331.0, 1916.0, 91.0, 1611.0, 91.0, 1611.0, 910.0, 1466.0, 910.0 ] } ], "lineEdges" : [ ] }, { @@ -5611,8 +5611,8 @@ "name" : "vlSubst2", "nominalVoltage" : 380.0 }, - "x" : 190.0, - "y" : 1059.0, + "x" : 191.0, + "y" : 1060.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vlSubst2_dhvdc_lcc21_2-bhvdc_lcc21_2", @@ -6128,20 +6128,20 @@ "node1" : "line1_ONE", "node2" : "line1_TWO" } ], - "snakeLine" : [ 585.0, 330.0, 585.0, 330.0, 585.0, 124.0, 90.0, 124.0, 90.0, 1040.0, 315.0, 1040.0, 315.0, 1059.0, 315.0, 1059.0 ] + "snakeLine" : [ 586.0, 331.0, 586.0, 331.0, 586.0, 125.0, 91.0, 125.0, 91.0, 1041.0, 316.0, 1041.0, 316.0, 1060.0, 316.0, 1060.0 ] }, { "id" : "hvdc_lcc", "nodes" : [ { "node1" : "hvdc_lcc_ONE", "node2" : "hvdc_lcc_TWO" } ], - "snakeLine" : [ 135.0, 330.0, 135.0, 330.0, 135.0, 304.0, 90.0, 304.0, 90.0, 999.0, 215.0, 999.0, 215.0, 1059.0, 215.0, 1059.0 ] + "snakeLine" : [ 136.0, 331.0, 136.0, 331.0, 136.0, 305.0, 91.0, 305.0, 91.0, 1000.0, 216.0, 1000.0, 216.0, 1060.0, 216.0, 1060.0 ] }, { "id" : "hvdc_vsc", "nodes" : [ { "node1" : "hvdc_vsc_ONE", "node2" : "hvdc_vsc_TWO" } ], - "snakeLine" : [ 185.0, 330.0, 185.0, 330.0, 185.0, 304.0, 155.0, 304.0, 155.0, 274.0, 135.0, 274.0, 135.0, 244.0, 125.0, 244.0, 125.0, 90.0, 60.0, 90.0, 60.0, 969.0, 265.0, 969.0, 265.0, 1059.0, 265.0, 1059.0 ] + "snakeLine" : [ 186.0, 331.0, 186.0, 331.0, 186.0, 305.0, 156.0, 305.0, 156.0, 275.0, 136.0, 275.0, 136.0, 245.0, 126.0, 245.0, 126.0, 91.0, 61.0, 91.0, 61.0, 970.0, 266.0, 970.0, 266.0, 1060.0, 266.0, 1060.0 ] } ] } \ No newline at end of file diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphVVRaw.json b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphVVRaw.json index 7546f76d5..a2e1713c7 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphVVRaw.json +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase12ZoneGraphVVRaw.json @@ -7,8 +7,8 @@ "name" : "vl1", "nominalVoltage" : 380.0 }, - "x" : 260.0, - "y" : 270.0, + "x" : 261.0, + "y" : 271.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl1_dgen1-bgen1", @@ -2812,8 +2812,8 @@ "name" : "vl2", "nominalVoltage" : 225.0 }, - "x" : 260.0, - "y" : 879.0, + "x" : 261.0, + "y" : 880.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl2_dgen4-bgen4", @@ -4464,8 +4464,8 @@ "name" : "vl3", "nominalVoltage" : 225.0 }, - "x" : 260.0, - "y" : 1458.0, + "x" : 261.0, + "y" : 1459.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vl3_dload4-bload4", @@ -5300,8 +5300,8 @@ "id" : "trf1", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 240.0, - "y" : 454.5, + "x" : 241.0, + "y" : 455.5, "orientation" : "DOWN", "name" : "trf1", "equipmentId" : "trf1", @@ -5320,8 +5320,8 @@ "id" : "trf2", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 210.0, - "y" : 744.0, + "x" : 211.0, + "y" : 745.0, "orientation" : "DOWN", "name" : "trf2", "equipmentId" : "trf2", @@ -5340,8 +5340,8 @@ "id" : "trf3", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 180.0, - "y" : 1033.5, + "x" : 181.0, + "y" : 1034.5, "orientation" : "DOWN", "name" : "trf3", "equipmentId" : "trf3", @@ -5360,8 +5360,8 @@ "id" : "trf4", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 735.0, - "y" : 759.0, + "x" : 736.0, + "y" : 760.0, "orientation" : "LEFT", "name" : "trf4", "equipmentId" : "trf4", @@ -5380,8 +5380,8 @@ "id" : "trf5", "componentType" : "TWO_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 150.0, - "y" : 1006.0, + "x" : 151.0, + "y" : 1007.0, "orientation" : "DOWN", "name" : "trf5", "equipmentId" : "trf5", @@ -5400,8 +5400,8 @@ "id" : "trf6", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 635.0, - "y" : 789.0, + "x" : 636.0, + "y" : 790.0, "name" : "trf6", "equipmentId" : "trf6", "voltageLevelInfosLeg1" : { @@ -5424,8 +5424,8 @@ "id" : "trf7", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 585.0, - "y" : 819.0, + "x" : 586.0, + "y" : 820.0, "name" : "trf7", "equipmentId" : "trf7", "voltageLevelInfosLeg1" : { @@ -5448,8 +5448,8 @@ "id" : "trf8", "componentType" : "THREE_WINDINGS_TRANSFORMER", "fictitious" : true, - "x" : 685.0, - "y" : 1398.0, + "x" : 686.0, + "y" : 1399.0, "orientation" : "DOWN", "name" : "trf8", "equipmentId" : "trf8", @@ -5475,133 +5475,133 @@ "node1" : "trf1_ONE", "node2" : "trf1" } ], - "snakeLine" : [ 435.0, 270.0, 435.0, 210.0, 240.0, 210.0, 240.0, 454.5 ] + "snakeLine" : [ 436.0, 271.0, 436.0, 211.0, 241.0, 211.0, 241.0, 455.5 ] }, { "id" : "EDGE_trf1_TWO", "nodes" : [ { "node1" : "trf1_TWO", "node2" : "trf1" } ], - "snakeLine" : [ 435.0, 879.0, 435.0, 699.0, 240.0, 699.0, 240.0, 454.5 ] + "snakeLine" : [ 436.0, 880.0, 436.0, 700.0, 241.0, 700.0, 241.0, 455.5 ] }, { "id" : "EDGE_trf2_ONE", "nodes" : [ { "node1" : "trf2_ONE", "node2" : "trf2" } ], - "snakeLine" : [ 985.0, 270.0, 985.0, 180.0, 210.0, 180.0, 210.0, 744.0 ] + "snakeLine" : [ 986.0, 271.0, 986.0, 181.0, 211.0, 181.0, 211.0, 745.0 ] }, { "id" : "EDGE_trf2_TWO", "nodes" : [ { "node1" : "trf2_TWO", "node2" : "trf2" } ], - "snakeLine" : [ 735.0, 1248.0, 735.0, 1308.0, 210.0, 1308.0, 210.0, 744.0 ] + "snakeLine" : [ 736.0, 1249.0, 736.0, 1309.0, 211.0, 1309.0, 211.0, 745.0 ] }, { "id" : "EDGE_trf3_ONE", "nodes" : [ { "node1" : "trf3_ONE", "node2" : "trf3" } ], - "snakeLine" : [ 535.0, 639.0, 535.0, 729.0, 180.0, 729.0, 180.0, 1033.5 ] + "snakeLine" : [ 536.0, 640.0, 536.0, 730.0, 181.0, 730.0, 181.0, 1034.5 ] }, { "id" : "EDGE_trf3_TWO", "nodes" : [ { "node1" : "trf3_TWO", "node2" : "trf3" } ], - "snakeLine" : [ 785.0, 1248.0, 785.0, 1338.0, 180.0, 1338.0, 180.0, 1033.5 ] + "snakeLine" : [ 786.0, 1249.0, 786.0, 1339.0, 181.0, 1339.0, 181.0, 1034.5 ] }, { "id" : "EDGE_trf4_ONE", "nodes" : [ { "node1" : "trf4_ONE", "node2" : "trf4" } ], - "snakeLine" : [ 935.0, 639.0, 935.0, 759.0, 735.0, 759.0 ] + "snakeLine" : [ 936.0, 640.0, 936.0, 760.0, 736.0, 760.0 ] }, { "id" : "EDGE_trf4_TWO", "nodes" : [ { "node1" : "trf4_TWO", "node2" : "trf4" } ], - "snakeLine" : [ 535.0, 879.0, 535.0, 759.0, 735.0, 759.0 ] + "snakeLine" : [ 536.0, 880.0, 536.0, 760.0, 736.0, 760.0 ] }, { "id" : "EDGE_trf5_ONE", "nodes" : [ { "node1" : "trf5_ONE", "node2" : "trf5" } ], - "snakeLine" : [ 585.0, 270.0, 585.0, 150.0, 150.0, 150.0, 150.0, 1006.0 ] + "snakeLine" : [ 586.0, 271.0, 586.0, 151.0, 151.0, 151.0, 151.0, 1007.0 ] }, { "id" : "EDGE_trf5_TWO", "nodes" : [ { "node1" : "trf5_TWO", "node2" : "trf5" } ], - "snakeLine" : [ 335.0, 1802.0, 335.0, 1862.0, 150.0, 1862.0, 150.0, 1006.0 ] + "snakeLine" : [ 336.0, 1803.0, 336.0, 1863.0, 151.0, 1863.0, 151.0, 1007.0 ] }, { "id" : "EDGE_trf6_ONE", "nodes" : [ { "node1" : "trf6_ONE", "node2" : "trf6" } ], - "snakeLine" : [ 635.0, 270.0, 635.0, 120.0, 120.0, 120.0, 120.0, 789.0, 635.0, 789.0 ] + "snakeLine" : [ 636.0, 271.0, 636.0, 121.0, 121.0, 121.0, 121.0, 790.0, 636.0, 790.0 ] }, { "id" : "EDGE_trf6_TWO", "nodes" : [ { "node1" : "trf6_TWO", "node2" : "trf6" } ], - "snakeLine" : [ 635.0, 879.0, 635.0, 789.0 ] + "snakeLine" : [ 636.0, 880.0, 636.0, 790.0 ] }, { "id" : "EDGE_trf6_THREE", "nodes" : [ { "node1" : "trf6_THREE", "node2" : "trf6" } ], - "snakeLine" : [ 385.0, 1458.0, 385.0, 1368.0, 1080.0, 1368.0, 1080.0, 789.0, 635.0, 789.0 ] + "snakeLine" : [ 386.0, 1459.0, 386.0, 1369.0, 1081.0, 1369.0, 1081.0, 790.0, 636.0, 790.0 ] }, { "id" : "EDGE_trf7_ONE", "nodes" : [ { "node1" : "trf7_ONE", "node2" : "trf7" } ], - "snakeLine" : [ 685.0, 639.0, 685.0, 819.0, 585.0, 819.0 ] + "snakeLine" : [ 686.0, 640.0, 686.0, 820.0, 586.0, 820.0 ] }, { "id" : "EDGE_trf7_TWO", "nodes" : [ { "node1" : "trf7_TWO", "node2" : "trf7" } ], - "snakeLine" : [ 585.0, 879.0, 585.0, 819.0 ] + "snakeLine" : [ 586.0, 880.0, 586.0, 820.0 ] }, { "id" : "EDGE_trf7_THREE", "nodes" : [ { "node1" : "trf7_THREE", "node2" : "trf7" } ], - "snakeLine" : [ 435.0, 1802.0, 435.0, 1892.0, 1110.0, 1892.0, 1110.0, 819.0, 585.0, 819.0 ] + "snakeLine" : [ 436.0, 1803.0, 436.0, 1893.0, 1111.0, 1893.0, 1111.0, 820.0, 586.0, 820.0 ] }, { "id" : "EDGE_trf8_ONE", "nodes" : [ { "node1" : "trf8_ONE", "node2" : "trf8" } ], - "snakeLine" : [ 885.0, 270.0, 885.0, 90.0, 90.0, 90.0, 90.0, 1398.0, 685.0, 1398.0 ] + "snakeLine" : [ 886.0, 271.0, 886.0, 91.0, 91.0, 91.0, 91.0, 1399.0, 686.0, 1399.0 ] }, { "id" : "EDGE_trf8_TWO", "nodes" : [ { "node1" : "trf8_TWO", "node2" : "trf8" } ], - "snakeLine" : [ 685.0, 1248.0, 685.0, 1398.0 ] + "snakeLine" : [ 686.0, 1249.0, 686.0, 1399.0 ] }, { "id" : "EDGE_trf8_THREE", "nodes" : [ { "node1" : "trf8_THREE", "node2" : "trf8" } ], - "snakeLine" : [ 485.0, 1458.0, 485.0, 1398.0, 685.0, 1398.0 ] + "snakeLine" : [ 486.0, 1459.0, 486.0, 1399.0, 686.0, 1399.0 ] } ], "lineEdges" : [ ] }, { @@ -5612,8 +5612,8 @@ "name" : "vlSubst2", "nominalVoltage" : 380.0 }, - "x" : 145.0, - "y" : 2042.0, + "x" : 146.0, + "y" : 2043.0, "nodes" : [ { "type" : "INTERNAL", "id" : "INTERNAL_vlSubst2_dhvdc_lcc21_2-bhvdc_lcc21_2", @@ -6129,20 +6129,20 @@ "node1" : "line1_ONE", "node2" : "line1_TWO" } ], - "snakeLine" : [ 735.0, 270.0, 735.0, 270.0, 735.0, 60.0, 60.0, 60.0, 60.0, 1982.0, 270.0, 1982.0, 270.0, 2042.0, 270.0, 2042.0 ] + "snakeLine" : [ 736.0, 271.0, 736.0, 271.0, 736.0, 61.0, 61.0, 61.0, 61.0, 1983.0, 271.0, 1983.0, 271.0, 2043.0, 271.0, 2043.0 ] }, { "id" : "hvdc_lcc", "nodes" : [ { "node1" : "hvdc_lcc_ONE", "node2" : "hvdc_lcc_TWO" } ], - "snakeLine" : [ 285.0, 270.0, 285.0, 270.0, 285.0, 60.0, 90.0, 60.0, 90.0, 30.0, 30.0, 30.0, 30.0, 1952.0, 170.0, 1952.0, 170.0, 2042.0, 170.0, 2042.0 ] + "snakeLine" : [ 286.0, 271.0, 286.0, 271.0, 286.0, 61.0, 91.0, 61.0, 91.0, 31.0, 31.0, 31.0, 31.0, 1953.0, 171.0, 1953.0, 171.0, 2043.0, 171.0, 2043.0 ] }, { "id" : "hvdc_vsc", "nodes" : [ { "node1" : "hvdc_vsc_ONE", "node2" : "hvdc_vsc_TWO" } ], - "snakeLine" : [ 335.0, 270.0, 335.0, 270.0, 335.0, 0.0, 0.0, 0.0, 0.0, 1922.0, 220.0, 1922.0, 220.0, 2042.0, 220.0, 2042.0 ] + "snakeLine" : [ 336.0, 271.0, 336.0, 271.0, 336.0, 1.0, 1.0, 1.0, 1.0, 1923.0, 221.0, 1923.0, 221.0, 2043.0, 221.0, 2043.0 ] } ] } \ No newline at end of file diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase13ZoneGraphHH.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase13ZoneGraphHH.svg index 5586c8888..7c5f89a12 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase13ZoneGraphHH.svg +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestCase13ZoneGraphHH.svg @@ -1,5 +1,5 @@ - +