Skip to content

Commit

Permalink
Merge pull request #32 from UU-ER/master
Browse files Browse the repository at this point in the history
update from master
  • Loading branch information
JeanWi authored Jun 26, 2024
2 parents 46ddab9 + 1153690 commit 365dba8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions utilities/read_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ def process_k_means(d: dict, column_names, k_means_specs):
res["technology_design"] = read_technology_design(path_h5)
loading_data_bar.progress(80, text="Loading network operation and design")
res["network_design"], network_operation = read_networks(path_h5)
res["network_operation"] = process_k_means(
network_operation,
["Period", "Network", "Arc_ID", "Variable", "FromNode", "ToNode"],
res["k_means_specs"],
)
if network_operation:
res["network_operation"] = process_k_means(
network_operation,
["Period", "Network", "Arc_ID", "Variable", "FromNode", "ToNode"],
res["k_means_specs"],
)
loading_data_bar.progress(100, text="Done")

return res
Expand Down Expand Up @@ -236,6 +237,8 @@ def read_networks(path_h5):
ope = {}
for key in network_operation:
ope[key] = np.array(network_operation[key])
else:
ope = {}

return network_design, ope

Expand Down

0 comments on commit 365dba8

Please sign in to comment.