Merge remote-tracking branch 'origin/master'

This commit is contained in:
pilar 2020-10-29 07:40:57 -04:00
commit 094e95f221
12 changed files with 10 additions and 30 deletions

View File

@ -11,10 +11,6 @@ class DomesticHotWaterFacility:
""" """
def __init__(self, number_of_baths, number_of_showers, number_of_basin, water_storage_volume): def __init__(self, number_of_baths, number_of_showers, number_of_basin, water_storage_volume):
"""
Constructor
"""
self._number_of_baths = number_of_baths self._number_of_baths = number_of_baths
self._number_of_showers = number_of_showers self._number_of_showers = number_of_showers
self._number_of_basin = number_of_basin self._number_of_basin = number_of_basin

View File

@ -5,16 +5,12 @@ Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca
""" """
class appliances_facilities: class ElectricAppliancesFacility:
""" """
Electric appliance facilities class Electric appliance facilities class
""" """
def __init__(self, appliance_electric_power): def __init__(self, appliance_electric_power):
"""
Constructor
"""
self._appliance_electric_power = appliance_electric_power self._appliance_electric_power = appliance_electric_power
@property @property

View File

@ -5,20 +5,15 @@ Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca
""" """
class household: class Household:
""" """
Household class Household class
""" """
def __init__(self, resident_type, household_type): def __init__(self, resident_type, household_type):
"""
Constructor
"""
self._resident_type = resident_type self._resident_type = resident_type
self._household_type = household_type self._household_type = household_type
@property @property
def resident_type(self): def resident_type(self):
""" """

View File

@ -11,10 +11,6 @@ class HvacFacility:
""" """
def __init__(self, temperature_setpoints, hvac_schedules): def __init__(self, temperature_setpoints, hvac_schedules):
"""
Constructor
"""
self._temperature_setpoints = temperature_setpoints self._temperature_setpoints = temperature_setpoints
self._hvac_schedules = hvac_schedules self._hvac_schedules = hvac_schedules

View File

@ -5,7 +5,7 @@ Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca
""" """
class lighting_facilities: class LightingFacility:
""" """
Lighting facilities class Lighting facilities class
""" """

View File

@ -11,9 +11,6 @@ class ScheduleValue:
""" """
def __init__(self, hour, probability): def __init__(self, hour, probability):
"""
Constructor
"""
self._hour = hour self._hour = hour
self._probability = probability self._probability = probability

View File

@ -12,7 +12,7 @@ class OccupancyFactory:
""" """
PhysicsFactor class PhysicsFactor class
""" """
def __init__(self, handler, city, base_path=Path(Path(__file__).parent.parent / 'data/occupancy')): def __init__(self, handler, city, base_path=Path(Path(__file__).parent.parent.parent / 'data/occupancy')):
self._handler = '_' + handler.lower().replace(' ', '_') self._handler = '_' + handler.lower().replace(' ', '_')
self._city = city self._city = city
self._base_path = base_path self._base_path = base_path

View File

@ -19,7 +19,7 @@ class UsBaseUsageParameters:
self._city = city self._city = city
# todo: control not archetype found # todo: control not archetype found
# ToDo: this is using the german library as a temporary approach, need to use/define a library for US # ToDo: this is using the german library as a temporary approach, need to use/define a library for US
path = str(Path(__file__).parent.parent.parent / 'data/usage/de_library.xml') path = str(Path(__file__).parent.parent.parent.parent / 'data/usage/de_library.xml')
print('usage:', path) print('usage:', path)
with open(path) as xml: with open(path) as xml:
self._library = xmltodict.parse(xml.read(), force_list='zoneUsageVariant') self._library = xmltodict.parse(xml.read(), force_list='zoneUsageVariant')

View File

@ -104,4 +104,4 @@ class ConfigurationHelper:
attributes to consider that they may share walls in meters attributes to consider that they may share walls in meters
:return: float :return: float
""" """
return self._config.getfloat('attributes', 'max_location_distance_for_shared_walls') return self._config.getfloat('buildings', 'max_location_distance_for_shared_walls')

View File

@ -24,7 +24,7 @@ class TestGeometryFactory(TestCase):
def _get_citygml(self): def _get_citygml(self):
if self._city_gml is None: if self._city_gml is None:
file_path = (self._example_path / 'attributes.gml').resolve() file_path = (self._example_path / 'buildings.gml').resolve()
self._city_gml = GeometryFactory('citygml', file_path).city self._city_gml = GeometryFactory('citygml', file_path).city
self.assertIsNotNone(self._city_gml, 'city is none') self.assertIsNotNone(self._city_gml, 'city is none')
return self._city_gml return self._city_gml

View File

@ -33,7 +33,7 @@ class TestOccupancyFactory(TestCase):
def _get_citygml_with_usage(self): def _get_citygml_with_usage(self):
if self._city_gml_with_usage is None: if self._city_gml_with_usage is None:
file_path = (self._example_path / 'attributes.gml').resolve() file_path = (self._example_path / 'buildings.gml').resolve()
self._city_gml_with_usage = GeometryFactory('citygml', file_path).city self._city_gml_with_usage = GeometryFactory('citygml', file_path).city
self.assertIsNotNone(self._city_gml_with_usage, 'city is none') self.assertIsNotNone(self._city_gml_with_usage, 'city is none')
UsageFactory(self._handler, self._city_gml_with_usage) UsageFactory(self._handler, self._city_gml_with_usage)

View File

@ -25,7 +25,7 @@ class TestPhysicsFactory(TestCase):
def _get_citygml(self): def _get_citygml(self):
if self._city_gml is None: if self._city_gml is None:
file_path = (self._example_path / 'attributes.gml').resolve() file_path = (self._example_path / 'buildings.gml').resolve()
self._city_gml = GeometryFactory('citygml', file_path).city self._city_gml = GeometryFactory('citygml', file_path).city
self.assertIsNotNone(self._city_gml, 'city is none') self.assertIsNotNone(self._city_gml, 'city is none')
return self._city_gml return self._city_gml