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

Issue21 remove unconnected #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import setuptools

setuptools.setup(name='uesgraphs',
version='0.6.4',
version='0.6.5',
description='Graphs to describe Urban Energy Systems',
url='https://github.com/RWTH-EBC/uesgraphs',
author='Marcus Fuchs',
Expand Down
8 changes: 7 additions & 1 deletion uesgraphs/uesgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ def group_nodes(node, group):
nodelists = self.nodelists_electricity
elif network_type == 'gas':
nodelists = self.nodelists_gas
elif network_type == 'other':
elif network_type == 'others':
nodelists = self.nodelists_others

assert network_id in nodelists.keys(), 'Unknown network_id'
Expand Down Expand Up @@ -1652,6 +1652,12 @@ def remove_unconnected_nodes(self, network_type,
elif network_type == 'cooling':
is_supply = 'is_supply_cooling'
nodelist = self.nodelists_cooling[network_id]
elif network_type == 'others':
is_supply = 'is_supply_other'
nodelist = self.nodelists_others[network_id]
else:
warnings.warn('Removal of unconnected nodes is not supported for network type {}.'.format(network_type))
return removed

supplies = []
for node in self.nodelist_building:
Expand Down