Skip to content

Commit

Permalink
Last_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Margherita-Capitani committed Jan 21, 2025
1 parent 26e790d commit 56091e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/create_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def calculate_power_node_position(load_file, cluster_bus):
load_sums.index = cluster_bus["cluster"]
gdf = cluster_bus.set_index("cluster")
gdf["cluster_load"] = load_sums.values.T
x_wgt_avg = (gdf.geometry.x * load_sums / load_sums).sum()
y_wgt_avg = (gdf.geometry.y * load_sums / load_sums).sum()
x_wgt_avg = (gdf.geometry.x * load_sums).sum() / load_sums.sum()
y_wgt_avg = (gdf.geometry.y * load_sums).sum() / load_sums.sum()

return x_wgt_avg, y_wgt_avg

Expand Down

0 comments on commit 56091e0

Please sign in to comment.