Skip to content

Commit

Permalink
Fix multi substation sld svg (#797)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Biasuzzi <[email protected]>
Co-authored-by: Sophie Frasnedo <[email protected]>
Co-authored-by: HugoKulesza <[email protected]>
  • Loading branch information
3 people committed Jul 16, 2024
1 parent 0df7ed7 commit bbf865c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static String toStringOrNull(CCharPointer charPtr) {

public static String[][] toString2DArray(CCharPointerPointer charPtrPtr, int length, int rows) {
int cols = length / rows;
String[][] string2DArray = new String[rows][length / cols];
String[][] string2DArray = new String[rows][cols];
int index = 0;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
Expand Down
8 changes: 8 additions & 0 deletions tests/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,14 @@ def test_sld_svg():
assert re.search('.*<svg.*', sld_multi_substation2.svg)
assert len(sld_multi_substation2.metadata) > 0

sld_multi_substation3 = n.get_matrix_multi_substation_single_line_diagram([['S1'],['S2']])
assert re.search('.*<svg.*', sld_multi_substation3.svg)
assert len(sld_multi_substation3.metadata) > 0

sld_multi_substation4 = n.get_matrix_multi_substation_single_line_diagram([['S1', 'S2']])
assert re.search('.*<svg.*', sld_multi_substation4.svg)
assert len(sld_multi_substation4.metadata) > 0

def test_sld_svg_backward_compatibility():
n = pp.network.create_four_substations_node_breaker_network()
sld = n.get_single_line_diagram('S1VL1', LayoutParameters(use_name=True, center_name=True, diagonal_label=True,
Expand Down

0 comments on commit bbf865c

Please sign in to comment.