Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update from master #32

Merged
merged 4 commits into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading