hub/usage/usage_feeders/de_usage_parameters.py

21 lines
698 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
"""
import xmltodict
from pathlib import Path
from usage.usage_feeders.helpers.us_function_to_usage import UsFunctionToUsage
class 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.function_to_usage(city_object.function)