Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi substation sld svg #797

Merged
merged 5 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -848,6 +848,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
Loading