Skip to content

Commit ab460f3

Browse files
authored
Don't load 2twts, they can't connect different substations (#57)
Signed-off-by: HARPER Jon <[email protected]>
1 parent 4dca644 commit ab460f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

geo-data-server/src/main/java/org/gridsuite/geodata/server/GeoDataService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ private static Map<String, Set<String>> getNeighbours(List<Substation> substatio
195195

196196
for (Substation s : substations) {
197197
for (VoltageLevel vl : s.getVoltageLevels()) {
198-
for (Branch<?> branch : vl.getConnectables(Branch.class)) {
199-
Substation s1 = branch.getTerminal1().getVoltageLevel().getSubstation();
200-
Substation s2 = branch.getTerminal2().getVoltageLevel().getSubstation();
198+
for (Line line : vl.getConnectables(Line.class)) {
199+
Substation s1 = line.getTerminal1().getVoltageLevel().getSubstation();
200+
Substation s2 = line.getTerminal2().getVoltageLevel().getSubstation();
201201
if (s1 != s) {
202202
neighbours.get(s.getId()).add(s1.getId());
203203
} else if (s2 != s) {

0 commit comments

Comments
 (0)