tum-ens / urbs

A linear optimisation model for distributed energy systems
GNU General Public License v3.0
184 stars 131 forks source link

Better integration of excel files #267

Closed maxhock closed 4 years ago

maxhock commented 4 years ago

GUI:

Added "Import Excel" button next to load config. It is integrated like Load_Config and calls'ConvertToJSON' (historically savetojson.py). Afterwards a Load_Config event is sent with the saved JSON-file.

ConvertToJSON:

Added test for "Source" in convert_to_json(). This prevents Source information from breaking the script. In the future this could be extended with other breaking keywords. Added detection for "maxperhour" in process-commodity function, this was also breaking the script when not present. Modified non-critical error behaviour to not print every time but append to a list and print only once in the end.