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

Parallel plotting #221

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Fixed bug for saving .h5 file with old input data. process_commodity …
…is still split up into r_in, r_out, r_in_min_fraction and r_out_min_fraction, as used in the model.
  • Loading branch information
Balz committed Dec 5, 2018
commit 518333bd157dd74000f4f89f0c1f87bdae2ce197
8 changes: 6 additions & 2 deletions urbs/saveload.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ def save(prob, filename):
prob._result = create_result_cache(prob)

with pd.HDFStore(filename, mode='w') as store:
for name in prob._data.keys():
store['data/'+name] = prob._data[name]
# Search all attributes of prob for those containing the input data
for name in prob.__dict__:
if str(name).find("_dict") > 0:
name_no_dict = name.split("_dict")[0] # remove _dict
store['data/'+name_no_dict] = (pd.DataFrame(getattr(prob,
name), index=[0]))
for name in prob._result.keys():
store['result/'+name] = prob._result[name]

Expand Down