hub/usage/usage_feeders/de_usage_parameters.py

24 lines
717 B
Python
Raw Normal View History

2020-06-09 14:07:47 -04:00
"""
DeUsageParameters model the usage properties for a German building
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
from pathlib import Path
import xmltodict
from usage.usage_feeders.helpers.us_function_to_usage import UsFunctionToUsage
class DeUsageParameters:
"""
DeUsageParameters
"""
def __init__(self, city_objects):
self._city_objects = city_objects
2020-06-09 14:07:47 -04:00
# load De Library
path = str(Path.cwd() / 'data/usage/de_library.xml')
with open(path) as xml:
self._library = xmltodict.parse(xml.read())
for city_object in city_objects:
UsFunctionToUsage.usage(city_object.function)