Skip to content

Commit

Permalink
Drop duplicate HV buses for eHv clustering busmap
Browse files Browse the repository at this point in the history
When scn_extension is selected, some HV buses are connected to more than one eHV bus.
This leads to duplicated indices in the path matrix. To avoid this, each HV bus is
only considered once using transformers.bus1.unique().
  • Loading branch information
ClaraBuettner committed Aug 19, 2024
1 parent fef9990 commit e23dcd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etrago/cluster/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def busmap_by_shortest_path(network, fromlvl, tolvl, cpu_cores=4):
lines_plus_dc["carrier"] = "AC"

# temporary end points, later replaced by bus1 pendant
t_buses = transformer[mask].bus0
t_buses = transformer[mask].bus0.unique()

# create all possible pathways
ppaths = list(product(s_buses, t_buses))
Expand Down

0 comments on commit e23dcd7

Please sign in to comment.