RWTH-EBC / uesgraphs

Graph framework for urban energy systems
MIT License
23 stars 6 forks source link

Issue10 bidirectional #12

Open TBeckhoelter opened 6 years ago

TBeckhoelter commented 6 years ago

Added new node_type "supply_heating_cooling" in methods "to_json" and "from_json" to describe nodes/buildings serving as both heat and cooling suppliers.

TBeckhoelter commented 6 years ago

@marcusfuchs ok, I thought it would be nice to have the same keyword (supply) in the node_type of all nodes that supply heat or cold. If I change it as you suggested, there would be supply nodes with node_type = "building" but also some with node_type = "supply_heating" or node_type = "supply_cooling". For the postprocessing in uesmodel the node_type doesn't matter, the information is stored in other attributes ("is_supply_..." for supply of heat and cold and "input_heat" and "input_cool" for the demands) so I have no objections. I just see the described classification which, from my point of view, looks a little arbitrary, as we divide three differerent types of substation into two supply types and one building without this "supply-lable". But you are right, buildings which are part of a bidirectional network are allways supplier, there is no other type of building. So I will change this and try to add unit tests (the week after next).

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 113


Totals Coverage Status
Change from base Build 95: 0.0%
Covered Lines:
Relevant Lines: 0

💛 - Coveralls
TBeckhoelter commented 6 years ago

Hi @marcusfuchs, I added an unit test for the export and import methods. As you can see there are some problems with Travis CI. I just added one test function in test_uesgraph.py and an example district in example_uesgraph.py, nothing in test_visuals.py where the failure occures. I'm just comparing the imported example district with the original one. It would be nice if you could help, because I'm not so familiar with these unit tests.