Skip to content

Commit

Permalink
Merge pull request e2nIEE#488 from FlorianShepherd/develop
Browse files Browse the repository at this point in the history
🐑 fixed pm test and added line collection bus geodata query
  • Loading branch information
Florian Schaefer authored Aug 30, 2019
2 parents 960070f + a77ad44 commit 23a1430
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pandapower/plotting/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ def create_line_collection(net, lines=None, line_geodata=None, bus_geodata=None,
OUTPUT:
**lc** - line collection
"""
if use_bus_geodata is False and net.line_geodata.empty:
# if bus geodata is available, but no line geodata
logger.warning("use_bus_geodata is automatically set to True, since net.line_geodata is empty.")
use_bus_geodata = True

if use_bus_geodata:
linetab = net.line if lines is None else net.line.loc[lines]
lines = net.line.index.tolist() if lines is None else list(lines)
Expand Down
1 change: 1 addition & 0 deletions pandapower/test/opf/test_powermodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import pytest

import pandapower as pp
import pandapower.networks as nw
from pandapower.test.consistency_checks import consistency_checks
from pandapower.test.toolbox import add_grid_connection, create_test_line

Expand Down

0 comments on commit 23a1430

Please sign in to comment.