Skip to content

Commit

Permalink
refactor: connect transformers in 'cascade' rather than 'tree'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielolsen committed Feb 25, 2022
1 parent 5159e25 commit b7d62bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prereise/gather/griddata/hifld/data_process/transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,9 @@ def create_transformers(bus):
["from_bus_id", "to_bus_id"].
"""
bus_pairs = [
(b, volt_series.idxmax())
(b, volt_series.sort_values().index[i + 1])
for sub, volt_series in bus.groupby("sub_id")["baseKV"]
for b in volt_series.sort_values().index[:-1]
for i, b in enumerate(volt_series.sort_values().index[:-1])
if len(volt_series) > 1
]

Expand Down

0 comments on commit b7d62bb

Please sign in to comment.