From 849f459cee147409dbaaf86e2514463e74a98beb Mon Sep 17 00:00:00 2001 From: SanamDabirian Date: Sat, 17 Oct 2020 01:21:57 -0400 Subject: [PATCH 1/5] Add HVAC facilities class for occupancy --- city_model_structure/facilities.py | 41 ++++++++++++++++++------- city_model_structure/hvac_facilities.py | 36 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 city_model_structure/hvac_facilities.py diff --git a/city_model_structure/facilities.py b/city_model_structure/facilities.py index 629a2dc1..aff575c6 100644 --- a/city_model_structure/facilities.py +++ b/city_model_structure/facilities.py @@ -10,14 +10,18 @@ class facilities: facilities class """ - def __init__(self, operation_schedules, heat_dissipation, lighting_facilities_electric_power): + def __init__(self, operation_schedules, convective_fraction, latent_fraction, + radiant_fraction, total_value_of_heat_dissipation): """ Constructor """ self._operation_schedules = operation_schedules - self._heat_dissipation = heat_dissipation - self._lighting_facilities_electric_power = lighting_facilities_electric_power + self._convective_fraction = convective_fraction + self._latent_fraction = latent_fraction + self._radiant_fraction = radiant_fraction + self._total_value_of_heat_dissipation = total_value_of_heat_dissipation + @property @@ -29,18 +33,33 @@ class facilities: return self._operation_schedules @property - def heat_dissipation(self): + def convective_fraction(self): """ - Get heat dissipation - :return: heat dissipation + Get convective fraction value + :return: convective fraction """ - return self._heat_dissipation + return self._convective_fraction @property - def lighting_facilities_electric_power(self): + def latent_fraction(self): """ - Get electric power of the lightings - :return: lighting electric power + Get latent fraction value + :return: latent fraction """ - return self._lighting_facilities_electric_power + return self._latent_fraction + @property + def radiant_fraction(self): + """ + Get radiant fraction value + :return: radiant fraction + """ + return self._radiant_fraction + + @property + def total_value_of_heat_dissipation(self): + """ + Get heat dissipation value + :return: heat dissipation + """ + return self._total_value_of_heat_dissipation \ No newline at end of file diff --git a/city_model_structure/hvac_facilities.py b/city_model_structure/hvac_facilities.py new file mode 100644 index 00000000..f4631daf --- /dev/null +++ b/city_model_structure/hvac_facilities.py @@ -0,0 +1,36 @@ +""" +Building module +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca +""" + + +class hvac_facilities: + """ + HVAC facilities class + """ + + def __init__(self, temperature_setpoints, hvac_schedules): + """ + Constructor + """ + + self._temperature_setpoints = temperature_setpoints + self._hvac_schedules = hvac_schedules + + @property + def temperature_setpoints(self): + """ + Get temperature setpoints + :return: temperature setpoints + """ + return self._temperature_setpoints + + @property + def hvac_schedules(self): + """ + Get HVAC schedules + :return: HVAC schedules + """ + return self._hvac_schedules + From 5e4859723590941c2dfc45372df68639c0d7fb73 Mon Sep 17 00:00:00 2001 From: SanamDabirian Date: Sat, 17 Oct 2020 01:33:29 -0400 Subject: [PATCH 2/5] Add lighting facilities class for occupancy --- city_model_structure/lighting_facilities.py | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 city_model_structure/lighting_facilities.py diff --git a/city_model_structure/lighting_facilities.py b/city_model_structure/lighting_facilities.py new file mode 100644 index 00000000..62a84a04 --- /dev/null +++ b/city_model_structure/lighting_facilities.py @@ -0,0 +1,26 @@ +""" +Building module +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca +""" + + +class lighting_facilities: + """ + Lighting facilities class + """ + + def __init__(self, electric_power): + """ + Constructor + """ + + self._electric_power = electric_power + + @property + def electric_power(self): + """ + Get lighting electric power + :return: lighting electric power + """ + return self._electric_power From f22183331b4fb9967a92da23623fce9abe348d2d Mon Sep 17 00:00:00 2001 From: SanamDabirian Date: Sat, 17 Oct 2020 01:40:19 -0400 Subject: [PATCH 3/5] Add electrical appliances facilities class for occupancy --- .../electric_appliances_facilities.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 city_model_structure/electric_appliances_facilities.py diff --git a/city_model_structure/electric_appliances_facilities.py b/city_model_structure/electric_appliances_facilities.py new file mode 100644 index 00000000..357968bd --- /dev/null +++ b/city_model_structure/electric_appliances_facilities.py @@ -0,0 +1,26 @@ +""" +Building module +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca +""" + + +class appliances_facilities: + """ + Electric appliance facilities class + """ + + def __init__(self, appliance_electric_power): + """ + Constructor + """ + + self._appliance_electric_power = appliance_electric_power + + @property + def appliance_electric_power(self): + """ + Get appliances electric power + :return: appliances electric power + """ + return self._appliance_electric_power From 1b2513692ff1bc6ee2c391e7cf7b771063fd945e Mon Sep 17 00:00:00 2001 From: SanamDabirian Date: Sat, 17 Oct 2020 01:49:33 -0400 Subject: [PATCH 4/5] Add household class for occupancy --- city_model_structure/household.py | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 city_model_structure/household.py diff --git a/city_model_structure/household.py b/city_model_structure/household.py new file mode 100644 index 00000000..81f9a19b --- /dev/null +++ b/city_model_structure/household.py @@ -0,0 +1,36 @@ +""" +Building module +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca +""" + + +class household: + """ + Household class + """ + + def __init__(self, resident_type, household_type): + """ + Constructor + """ + + self._resident_type = resident_type + self._household_type = household_type + + + @property + def resident_type(self): + """ + Get resident type + :return: resident type + """ + return self._resident_type + + @property + def household_type(self): + """ + Get household type + :return: household type + """ + return self._household_type \ No newline at end of file From 9cbcea5fd5b384f7f9a834d6c543ce51fc893792 Mon Sep 17 00:00:00 2001 From: Guille Date: Mon, 19 Oct 2020 11:48:34 -0400 Subject: [PATCH 5/5] Remove deprecated assert call and unused variable --- tests/test_geometry_factory.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_geometry_factory.py b/tests/test_geometry_factory.py index bcac1604..75186dcd 100644 --- a/tests/test_geometry_factory.py +++ b/tests/test_geometry_factory.py @@ -34,11 +34,10 @@ class TestGeometryFactory(TestCase): Test subway parsing :return: """ - city = self._get_citygml() file_path = (self._example_path / 'subway.osm').resolve() subway_entrances = self._features = GeometryFactory('osm_subway', file_path).features self.assertIsNotNone(subway_entrances, 'subway entrances is none') - self.assertEquals(len(subway_entrances), 20, 'Wrong number of subway entrances') + self.assertEqual(len(subway_entrances), 20, 'Wrong number of subway entrances') def test_citygml_city(self): """