diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9f093ccb..7a9b89ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,7 +56,8 @@ Include a small header with contact information and the code license at the top """ Name module SPDX - License - Identifier: LGPL - 3.0 - or -later - Copyright © 2020 Project Author name mail@concordia.ca + Copyright © 2022 Concordia CERC group + Project Coder name mail@concordia.ca """ diff --git a/PYGUIDE.md b/PYGUIDE.md index 41f70c81..eb0e7f8a 100644 --- a/PYGUIDE.md +++ b/PYGUIDE.md @@ -31,7 +31,8 @@ comment. """ MyClass module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author name name@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder name name@concordia.ca """ import sys diff --git a/catalogs/catalog.py b/catalogs/catalog.py index 67de9fda..2525177b 100644 --- a/catalogs/catalog.py +++ b/catalogs/catalog.py @@ -1,7 +1,8 @@ """ Catalog base class SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ class Catalog: diff --git a/catalogs/construction/nrcan_catalog.py b/catalogs/construction/nrcan_catalog.py new file mode 100644 index 00000000..e69de29b diff --git a/catalogs/construction/nrel_catalog.py b/catalogs/construction/nrel_catalog.py new file mode 100644 index 00000000..ac346c68 --- /dev/null +++ b/catalogs/construction/nrel_catalog.py @@ -0,0 +1,34 @@ +""" +Greenery catalog +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" +import xmltodict +from pathlib import Path +from catalogs.catalog import Catalog + + +class NrelCatalog(Catalog): + def __init__(self, path): + archetypes = str(Path(path / 'us_archetypes.xml').resolve()) + constructions = str(Path(path / 'us_constructions.xml').resolve()) + with open(constructions) as xml: + self._constructions = xmltodict.parse(xml.read()) + with open(archetypes) as xml: + self._archetypes = xmltodict.parse(xml.read()) + self._windows = [] + self._materials = [] + self._constructions = [] + self._archetypes = [] + + @property + def names(self, category=None): + nam + + def entries(self, category=None): + pass + + def get_entry(self, name): + pass + diff --git a/catalogs/construction_catalog_factory.py b/catalogs/construction_catalog_factory.py new file mode 100644 index 00000000..96d20858 --- /dev/null +++ b/catalogs/construction_catalog_factory.py @@ -0,0 +1,39 @@ +""" +Construction catalog factory, publish the construction information +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + +from pathlib import Path +from typing import TypeVar +from catalogs.construction.nrel_catalog import NrelCatalog +from catalogs.construction.nrcan_catalog import NrcanCatalog +Catalog = TypeVar('Catalog') + +class ConstructionCatalogFactory: + def __init__(self, file_type, base_path=None): + if base_path is None: + base_path = Path(Path(__file__).parent.parent / 'data/construction') + self._catalog_type = '_' + file_type.lower() + self._path = base_path + + def _nrel(self): + """ + Retrieve NREL catalog + """ + return NrelCatalog(self._path) + + def _nrcan(self): + """ + Retrieve NRCAN catalog + """ + return NrcanCatalog(self._city, self._base_path) + + @property + def catalog(self) -> Catalog: + """ + Enrich the city given to the class using the class given handler + :return: Catalog + """ + return getattr(self, self._catalog_type, lambda: None) \ No newline at end of file diff --git a/catalogs/data_models/construction/archetype.py b/catalogs/data_models/construction/archetype.py new file mode 100644 index 00000000..bd5db1e8 --- /dev/null +++ b/catalogs/data_models/construction/archetype.py @@ -0,0 +1,110 @@ +""" +Construction catalog Archetype +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + +class Archetype: + def __init__(self, archetype_id, + function, + construction_period, + constructions, + average_storey_height, + number_of_storeys, + thermal_capacity, + extra_loses_due_to_thermal_bridges, + indirect_heated_ratio, + infiltration_rate_for_ventilation_system_off, + infiltration_rate_for_ventilation_system_on): + + self._id = archetype_id + self._function = function + self._construction_period = construction_period + self._constructions = constructions + self._average_storey_height = average_storey_height + self._number_of_storeys = number_of_storeys + self._thermal_capacity = thermal_capacity + self._extra_loses_due_to_thermal_bridges = extra_loses_due_to_thermal_bridges + self._indirect_heated_ratio = indirect_heated_ratio + self._infiltration_rate_for_ventilation_system_off = infiltration_rate_for_ventilation_system_off + self._infiltration_rate_for_ventilation_system_on = infiltration_rate_for_ventilation_system_on + + @property + def id(self): + """ + Get archetype id + :return: int + """ + return self._id + + def function(self): + """ + Get archetype function + :return: str + """ + return self._function + + @property + def construction_period(self): + """ + Get archetype construction period + :return: str + """ + return self._construction_period + + @property + def average_storey_height(self): + """ + Get archetype average storey height + :return: float + """ + return self._average_storey_height + + @property + def number_of_storeys(self): + """ + Get archetype number of storeys + :return: int + """ + return self._number_of_storeys + + @property + def thermal_capacity(self): + """ + Get archetype thermal capacity + :return: int + """ + return self._thermal_capacity + + @property + def extra_loses_due_to_thermal_bridges(self): + """ + Get archetype extra loses due to thermal bridges + :return: int + """ + return self._extra_loses_due_to_thermal_bridges + + @property + def indirect_heated_ratio(self): + """ + Get archetype indirect heat ratio + :return: float + """ + return self._indirect_heated_ratio + + @property + def infiltration_rate_for_ventilation_system_off(self): + """ + Get archetype infiltration rate for ventilation system off + :return: float + """ + return self._infiltration_rate_for_ventilation_system_off + + @property + def infiltration_rate_for_ventilation_system_on(self): + """ + Get archetype infiltration rate for ventilation system on + :return: float + """ + return self._infiltration_rate_for_ventilation_system_on diff --git a/catalogs/data_models/construction/construction.py b/catalogs/data_models/construction/construction.py new file mode 100644 index 00000000..fc76371b --- /dev/null +++ b/catalogs/data_models/construction/construction.py @@ -0,0 +1,63 @@ +""" +Construction catalog construction +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + +class Construction: + def __init__(self, construction_id, construction_type, name, layers, window_ratio=None, window=None): + self._id = construction_id + self._type = construction_type + self._name = name + self._layers = layers + self._window_ratio = window_ratio + self._window = window + + @property + def id(self): + """ + Get construction id + :return: int + """ + return self._id + + @property + def type(self): + """ + Get construction type + :return: str + """ + return self._type + + @property + def name(self): + """ + Get construction name + :return: str + """ + return self._name + + @property + def layers(self): + """ + Get construction layers + :return: [layer] + """ + return self._layers + + @property + def window_ratio(self): + """ + Get construction window ratio (only when used as archetype construction) + :return: (0..1) or None + """ + return self._window_ratio + + @property + def window(self): + """ + Get construction window (only when used as archetype construction) + :return: window or None + """ + return self._window diff --git a/catalogs/data_models/construction/content.py b/catalogs/data_models/construction/content.py new file mode 100644 index 00000000..c7d5f7a2 --- /dev/null +++ b/catalogs/data_models/construction/content.py @@ -0,0 +1,41 @@ +""" +Construction catalog content +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + +class Content: + def __init__(self, archetypes, constructions, materials, windows): + self._archetypes = archetypes + self._constructions = constructions + self._materials = materials + self._windows = windows + + @property + def archetypes(self): + """ + All archetypes in the catalog + """ + return self._archetypes + + @property + def constructions(self): + """ + All constructions in the catalog + """ + return self._constructions + + @property + def materials(self): + """ + All materials in the catalog + """ + return self._materials + + @property + def windows(self): + """ + All windows in the catalog + """ + return self._windows diff --git a/catalogs/data_models/construction/layer.py b/catalogs/data_models/construction/layer.py new file mode 100644 index 00000000..4bdd1bf6 --- /dev/null +++ b/catalogs/data_models/construction/layer.py @@ -0,0 +1,45 @@ +""" +Construction catalog layer +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + +class Layer: + def __init__(self, layer_id, name, material, thickness): + self._id = layer_id + self._name = name + self._material = material + self._thickness = thickness + + @property + def id(self): + """ + Get layer id + :return: int + """ + return self._id + + @property + def name(self): + """ + Get layer name + :return: str + """ + return self._name + + @property + def material(self): + """ + Get layer material + :return: Material + """ + return self._material + + @property + def thickness(self): + """ + Get layer thickness in meters + :return: None or float + """ + return self._thickness diff --git a/catalogs/data_models/construction/material.py b/catalogs/data_models/construction/material.py new file mode 100644 index 00000000..3df24df8 --- /dev/null +++ b/catalogs/data_models/construction/material.py @@ -0,0 +1,108 @@ +""" +Construction catalog material +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + +class Material: + def __init__(self, material_id, + name, + solar_absorptance, + thermal_absorptance, + visible_absorptance, + no_mass=False, + thermal_resistance=None, + conductivity=None, + density=None, + specific_heat=None): + self._id = material_id + self._name = name + self._solar_absorptance = solar_absorptance + self._thermal_absorptance = thermal_absorptance + self._visible_absorptance = visible_absorptance + self._no_mass = no_mass + self._thermal_resistance = thermal_resistance + self._conductivity = conductivity + self._density = density + self._specific_heat = specific_heat + + @property + def id(self): + """ + Get material id + :return: int + """ + return self._id + + @property + def name(self): + """ + Get material name + :return: str + """ + return self._name + + @property + def conductivity(self): + """ + Get material conductivity in W/mK + :return: None or float + """ + return self._conductivity + + @property + def specific_heat(self): + """ + Get material conductivity in J/kgK + :return: None or float + """ + return self._specific_heat + + @property + def density(self): + """ + Get material density in kg/m3 + :return: None or float + """ + return self._density + + @property + def solar_absorptance(self): + """ + Get material solar absorptance + :return: None or float + """ + return self._solar_absorptance + + @property + def thermal_absorptance(self): + """ + Get material thermal absorptance + :return: None or float + """ + return self._thermal_absorptance + + @property + def visible_absorptance(self): + """ + Get material visible absorptance + :return: None or float + """ + return self._visible_absorptance + + @property + def no_mass(self): + """ + Get material no mass flag + :return: None or Boolean + """ + return self._no_mass + + @property + def thermal_resistance(self): + """ + Get material thermal resistance in m2K/W + :return: None or float + """ + return self._thermal_resistance diff --git a/catalogs/data_models/construction/window.py b/catalogs/data_models/construction/window.py new file mode 100644 index 00000000..ba702152 --- /dev/null +++ b/catalogs/data_models/construction/window.py @@ -0,0 +1,78 @@ +""" +Construction catalog window +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + +class Window: + def __init__(self): + self._frame_ratio = None + self._g_value = None + self._overall_u_value = None + self._construction_name = None + + @property + def frame_ratio(self): + """ + Get window frame ratio + :return: None or float + """ + return self._frame_ratio + + @frame_ratio.setter + def frame_ratio(self, value): + """ + Set window frame ratio + :param value: float + """ + if value is not None: + self._frame_ratio = float(value) + + @property + def g_value(self): + """ + Get thermal opening g-value + :return: None or float + """ + return self._g_value + + @g_value.setter + def g_value(self, value): + """ + Set thermal opening g-value + :param value: float + """ + if value is not None: + self._g_value = float(value) + + @property + def overall_u_value(self): + """ + Get thermal opening overall U-value in W/m2K + :return: None or float + """ + return self._overall_u_value + + @overall_u_value.setter + def overall_u_value(self, value): + """ + Set thermal opening overall U-value in W/m2K + :param value: float + """ + if value is not None: + self._overall_u_value = float(value) + + @property + def construction_name(self): + """ + Get thermal opening construction name + """ + return self._construction_name + + @construction_name.setter + def construction_name(self, value): + """ + Set thermal opening construction name + """ + self._construction_name = value diff --git a/catalogs/data_model/greenery/greenery_content.py b/catalogs/data_models/greenery/content.py similarity index 81% rename from catalogs/data_model/greenery/greenery_content.py rename to catalogs/data_models/greenery/content.py index 04018d5b..b9849d5d 100644 --- a/catalogs/data_model/greenery/greenery_content.py +++ b/catalogs/data_models/greenery/content.py @@ -1,10 +1,11 @@ """ Greenery catalog content SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ -class GreeneryContent: +class Content: def __init__(self, vegetations, plants, soils): self._vegetations = vegetations self._plants = plants diff --git a/catalogs/data_model/greenery/plant.py b/catalogs/data_models/greenery/plant.py similarity index 90% rename from catalogs/data_model/greenery/plant.py rename to catalogs/data_models/greenery/plant.py index 6ef0c447..a9763392 100644 --- a/catalogs/data_model/greenery/plant.py +++ b/catalogs/data_models/greenery/plant.py @@ -1,10 +1,11 @@ """ Greenery catalog data model Plant class SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ -from catalogs.data_model.greenery.soil import Soil as libs_soil +from catalogs.data_models.greenery.soil import Soil as libs_soil class Plant: diff --git a/catalogs/data_model/greenery/plant_percentage.py b/catalogs/data_models/greenery/plant_percentage.py similarity index 66% rename from catalogs/data_model/greenery/plant_percentage.py rename to catalogs/data_models/greenery/plant_percentage.py index 828e8871..a26817c7 100644 --- a/catalogs/data_model/greenery/plant_percentage.py +++ b/catalogs/data_models/greenery/plant_percentage.py @@ -1,10 +1,11 @@ """ Greenery catalog data model Plant percentage class SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ -from catalogs.data_model.greenery.plant import Plant as libs_plant +from catalogs.data_models.greenery.plant import Plant as libs_plant class PlantPercentage(libs_plant): diff --git a/catalogs/data_model/greenery/soil.py b/catalogs/data_models/greenery/soil.py similarity index 95% rename from catalogs/data_model/greenery/soil.py rename to catalogs/data_models/greenery/soil.py index 177c3662..d63d11e5 100644 --- a/catalogs/data_model/greenery/soil.py +++ b/catalogs/data_models/greenery/soil.py @@ -1,7 +1,8 @@ """ Greenery catalog data model Soil class SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ class Soil: diff --git a/catalogs/data_model/greenery/vegetation.py b/catalogs/data_models/greenery/vegetation.py similarity index 95% rename from catalogs/data_model/greenery/vegetation.py rename to catalogs/data_models/greenery/vegetation.py index 3bc8da2c..ae47ddf6 100644 --- a/catalogs/data_model/greenery/vegetation.py +++ b/catalogs/data_models/greenery/vegetation.py @@ -1,10 +1,11 @@ """ Greenery catalog data model Vegetation class SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ -from catalogs.data_model.greenery.plant_percentage import PlantPercentage +from catalogs.data_models.greenery.plant_percentage import PlantPercentage class Vegetation: def __init__(self, category, vegetation, plant_percentages): diff --git a/catalogs/greenery/greenery_catalog.py b/catalogs/greenery/greenery_catalog.py index 243bc47b..434a4fb5 100644 --- a/catalogs/greenery/greenery_catalog.py +++ b/catalogs/greenery/greenery_catalog.py @@ -1,18 +1,19 @@ """ Greenery catalog SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from pyecore.resources import ResourceSet, URI from catalogs.greenery.ecore_greenery.greenerycatalog import GreeneryCatalog as gc from catalogs.catalog import Catalog from pathlib import Path -from catalogs.data_model.greenery.vegetation import Vegetation as libs_vegetation -from catalogs.data_model.greenery.plant import Plant as libs_plant -from catalogs.data_model.greenery.soil import Soil as libs_soil -from catalogs.data_model.greenery.plant_percentage import PlantPercentage as libs_pp -from catalogs.data_model.greenery.greenery_content import GreeneryContent +from catalogs.data_models.greenery.vegetation import Vegetation as libs_vegetation +from catalogs.data_models.greenery.plant import Plant as libs_plant +from catalogs.data_models.greenery.soil import Soil as libs_soil +from catalogs.data_models.greenery.plant_percentage import PlantPercentage as libs_pp +from catalogs.data_models.greenery.content import Content as GreeneryContent class GreeneryCatalog(Catalog): @@ -56,7 +57,7 @@ class GreeneryCatalog(Catalog): for soil in catalog_data.soils: soils.append(libs_soil(soil)) - self._data = GreeneryContent(vegetations, plants, soils) + self._content = GreeneryContent(vegetations, plants, soils) def names(self, category=None): """ @@ -65,22 +66,22 @@ class GreeneryCatalog(Catalog): """ if category is None: _names = {'vegetations': [], 'plants': [], 'soils': []} - for vegetation in self._data.vegetations: + for vegetation in self._content.vegetations: _names['vegetations'].append(vegetation.name) - for plant in self._data.plants: + for plant in self._content.plants: _names['plants'].append(plant.name) - for soil in self._data.soils: + for soil in self._content.soils: _names['soils'].append(soil.name) else: _names = {category: []} if category.lower() == 'vegetations': - for vegetation in self._data.vegetations: + for vegetation in self._content.vegetations: _names[category].append(vegetation.name) elif category.lower() == 'plants': - for plant in self._data.plants: + for plant in self._content.plants: _names[category].append(plant.name) elif category.lower() == 'soils': - for soil in self._data.soils: + for soil in self._content.soils: _names[category].append(soil.name) else: raise ValueError(f'Unknown category [{category}]') @@ -90,26 +91,26 @@ class GreeneryCatalog(Catalog): """ Get one complete entry from the greenery catalog """ - for entry in self._data.vegetations: + for entry in self._content.vegetations: if entry.name.lower() == name.lower(): return entry - for entry in self._data.plants: + for entry in self._content.plants: if entry.name.lower() == name.lower(): return entry - for entry in self._data.soils: + for entry in self._content.soils: if entry.name.lower() == name.lower(): return entry raise IndexError(f"{name} doesn't exists in the catalog") def entries(self, category=None): if category is None: - return self._data + return self._content else: if category.lower() == 'vegetations': - return self._data.vegetations + return self._content.vegetations elif category.lower() == 'plants': - return self._data.plants + return self._content.plants elif category.lower() == 'soils': - return self._data.soils + return self._content.soils else: raise ValueError(f'Unknown category [{category}]') diff --git a/catalogs/greenery_catalog_factory.py b/catalogs/greenery_catalog_factory.py index 905f1602..31c2a271 100644 --- a/catalogs/greenery_catalog_factory.py +++ b/catalogs/greenery_catalog_factory.py @@ -1,7 +1,8 @@ """ Greenery catalog publish the greenery information SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from pathlib import Path @@ -16,7 +17,7 @@ class GreeneryCatalogFactory: def __init__(self, file_type, base_path=None): if base_path is None: base_path = Path(Path(__file__).parent.parent / 'data/greenery') - self._file_type = '_' + file_type.lower() + self._catalog_type = '_' + file_type.lower() self._path = base_path @property @@ -33,4 +34,4 @@ class GreeneryCatalogFactory: Enrich the city given to the class using the class given handler :return: Catalog """ - return getattr(self, self._file_type, lambda: None) + return getattr(self, self._catalog_type, lambda: None) diff --git a/city_model_structure/attributes/edge.py b/city_model_structure/attributes/edge.py index 3a156ed8..9fd6d75b 100644 --- a/city_model_structure/attributes/edge.py +++ b/city_model_structure/attributes/edge.py @@ -1,8 +1,8 @@ """ Node module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import uuid from typing import List, TypeVar diff --git a/city_model_structure/attributes/node.py b/city_model_structure/attributes/node.py index 86e6b514..32b82466 100644 --- a/city_model_structure/attributes/node.py +++ b/city_model_structure/attributes/node.py @@ -1,8 +1,8 @@ """ Node module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import uuid diff --git a/city_model_structure/attributes/plane.py b/city_model_structure/attributes/plane.py index 71e0f6d9..87edb2d5 100644 --- a/city_model_structure/attributes/plane.py +++ b/city_model_structure/attributes/plane.py @@ -1,7 +1,8 @@ """ Plane module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import TypeVar diff --git a/city_model_structure/attributes/point.py b/city_model_structure/attributes/point.py index 76a55e57..3aeb423c 100644 --- a/city_model_structure/attributes/point.py +++ b/city_model_structure/attributes/point.py @@ -1,7 +1,8 @@ """ Point module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import math diff --git a/city_model_structure/attributes/polygon.py b/city_model_structure/attributes/polygon.py index 4064ad81..b16a9f8a 100644 --- a/city_model_structure/attributes/polygon.py +++ b/city_model_structure/attributes/polygon.py @@ -1,7 +1,8 @@ """ Polygon module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from __future__ import annotations diff --git a/city_model_structure/attributes/polyhedron.py b/city_model_structure/attributes/polyhedron.py index 3f292f79..baa09fda 100644 --- a/city_model_structure/attributes/polyhedron.py +++ b/city_model_structure/attributes/polyhedron.py @@ -1,8 +1,9 @@ """ Polyhedron module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, Union diff --git a/city_model_structure/attributes/record.py b/city_model_structure/attributes/record.py index e7261ddb..a425d48d 100644 --- a/city_model_structure/attributes/record.py +++ b/city_model_structure/attributes/record.py @@ -1,7 +1,8 @@ """ Record module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ diff --git a/city_model_structure/attributes/schedule.py b/city_model_structure/attributes/schedule.py index 2d009f7f..4881fce8 100644 --- a/city_model_structure/attributes/schedule.py +++ b/city_model_structure/attributes/schedule.py @@ -1,7 +1,8 @@ """ Schedule module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import uuid diff --git a/city_model_structure/attributes/time_series.py b/city_model_structure/attributes/time_series.py index 20c4d5dd..81627305 100644 --- a/city_model_structure/attributes/time_series.py +++ b/city_model_structure/attributes/time_series.py @@ -1,7 +1,8 @@ """ Time series module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List diff --git a/city_model_structure/building.py b/city_model_structure/building.py index bab214a1..f2ac273b 100644 --- a/city_model_structure/building.py +++ b/city_model_structure/building.py @@ -1,8 +1,9 @@ """ Building module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, Union @@ -30,7 +31,6 @@ class Building(CityObject): self._storeys_above_ground = None self._floor_area = None self._roof_type = None - self._storeys = None self._internal_zones = None self._shell = None self._type = 'building' diff --git a/city_model_structure/building_demand/appliances.py b/city_model_structure/building_demand/appliances.py index 8fd4f0f6..9e0464b3 100644 --- a/city_model_structure/building_demand/appliances.py +++ b/city_model_structure/building_demand/appliances.py @@ -1,7 +1,8 @@ """ Appliances module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import Union, List from city_model_structure.attributes.schedule import Schedule @@ -12,28 +13,28 @@ class Appliances: Appliances class """ def __init__(self): - self._appliances_density = None + self._density = None self._convective_fraction = None self._radiative_fraction = None self._latent_fraction = None self._schedules = None @property - def appliances_density(self) -> Union[None, float]: + def density(self) -> Union[None, float]: """ Get appliances density in Watts per m2 :return: None or float """ - return self._appliances_density + return self._density - @appliances_density.setter - def appliances_density(self, value): + @density.setter + def density(self, value): """ Set appliances density in Watts per m2 :param value: float """ if value is not None: - self._appliances_density = float(value) + self._density = float(value) @property def convective_fraction(self) -> Union[None, float]: @@ -90,6 +91,7 @@ class Appliances: def schedules(self) -> Union[None, List[Schedule]]: """ Get schedules + dataType = fraction :return: None or [Schedule] """ return self._schedules @@ -98,6 +100,7 @@ class Appliances: def schedules(self, value): """ Set schedules + dataType = fraction :param value: [Schedule] """ self._schedules = value diff --git a/city_model_structure/building_demand/household.py b/city_model_structure/building_demand/household.py index 251c8dbd..c740f9c3 100644 --- a/city_model_structure/building_demand/household.py +++ b/city_model_structure/building_demand/household.py @@ -1,7 +1,8 @@ """ Household module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ diff --git a/city_model_structure/building_demand/internal_gains.py b/city_model_structure/building_demand/internal_gains.py index 9384cf21..dfec83c4 100644 --- a/city_model_structure/building_demand/internal_gains.py +++ b/city_model_structure/building_demand/internal_gains.py @@ -1,7 +1,8 @@ """ InternalGains module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from typing import Union, List @@ -110,6 +111,7 @@ class InternalGains: def schedules(self) -> Union[None, List[Schedule]]: """ Get internal gain schedule + dataType = fraction :return: [Schedule] """ return self._schedules @@ -118,6 +120,7 @@ class InternalGains: def schedules(self, value): """ Set internal gain schedule + dataType = fraction :param value: [Schedule] """ self._schedules = value diff --git a/city_model_structure/building_demand/internal_zone.py b/city_model_structure/building_demand/internal_zone.py index 74678473..a4def3d0 100644 --- a/city_model_structure/building_demand/internal_zone.py +++ b/city_model_structure/building_demand/internal_zone.py @@ -1,7 +1,8 @@ """ InternalZone module. It saves the original geometrical information from interiors together with some attributes of those SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import uuid @@ -120,4 +121,3 @@ class InternalZone: :param value: [ThermalZone] """ self._thermal_zones = value - diff --git a/city_model_structure/building_demand/layer.py b/city_model_structure/building_demand/layer.py index 608ebeb8..04dd7596 100644 --- a/city_model_structure/building_demand/layer.py +++ b/city_model_structure/building_demand/layer.py @@ -1,7 +1,8 @@ """ Layers module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import uuid from typing import Union diff --git a/city_model_structure/building_demand/lighting.py b/city_model_structure/building_demand/lighting.py index 0e72249f..d2ba27e6 100644 --- a/city_model_structure/building_demand/lighting.py +++ b/city_model_structure/building_demand/lighting.py @@ -1,7 +1,8 @@ """ Lighting module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import Union, List from city_model_structure.attributes.schedule import Schedule @@ -12,28 +13,28 @@ class Lighting: Lighting class """ def __init__(self): - self._lighting_density = None + self._density = None self._convective_fraction = None self._radiative_fraction = None self._latent_fraction = None self._schedules = None @property - def lighting_density(self) -> Union[None, float]: + def density(self) -> Union[None, float]: """ Get lighting density in Watts per m2 :return: None or float """ - return self._lighting_density + return self._density - @lighting_density.setter - def lighting_density(self, value): + @density.setter + def density(self, value): """ Set lighting density in Watts per m2 :param value: float """ if value is not None: - self._lighting_density = float(value) + self._density = float(value) @property def convective_fraction(self) -> Union[None, float]: @@ -90,6 +91,7 @@ class Lighting: def schedules(self) -> Union[None, List[Schedule]]: """ Get schedules + dataType = fraction :return: None or [Schedule] """ return self._schedules @@ -98,6 +100,7 @@ class Lighting: def schedules(self, value): """ Set schedules + dataType = fraction :param value: [Schedule] """ self._schedules = value diff --git a/city_model_structure/building_demand/material.py b/city_model_structure/building_demand/material.py index 5762550d..fe54d19e 100644 --- a/city_model_structure/building_demand/material.py +++ b/city_model_structure/building_demand/material.py @@ -1,9 +1,8 @@ """ Material module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributor Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import ast @@ -15,42 +14,16 @@ class Material: Material class """ def __init__(self): - self._type = type self._id = None self._name = None self._conductivity = None self._specific_heat = None self._density = None - self._density_unit = None self._solar_absorptance = None self._thermal_absorptance = None self._visible_absorptance = None self._no_mass = False self._thermal_resistance = None - self._embodied_carbon = None - self._embodied_carbon_unit = None - self._recycling_ratio = None - self._onsite_recycling_ratio = None - self._company_recycling_ratio = None - self._landfilling_ratio = None - self._cost = None - self._cost_unit = None - - @property - def type(self): - """ - Get material type - :return: str - """ - return self._type - - @type.setter - def type(self, value): - """ - Set material type - :param value: string - """ - self._type = str(value) @property def id(self): @@ -135,23 +108,6 @@ class Material: if value is not None: self._density = float(value) - @property - def density_unit(self) -> Union[None, str]: - """ - Get material density unit - :return: None or string - """ - return self._density_unit - - @density_unit.setter - def density_unit(self, value): - """ - Set material density unit - :param value: string - """ - if value is not None: - self._density_unit = str(value) - @property def solar_absorptance(self) -> Union[None, float]: """ @@ -236,139 +192,3 @@ class Material: """ if value is not None: self._thermal_resistance = float(value) - - @property - def embodied_carbon(self) -> Union[None, float]: - """ - Get material embodied carbon - :return: None or float - """ - return self._embodied_carbon - - @embodied_carbon.setter - def embodied_carbon(self, value): - """ - Set material embodied carbon - :param value: float - """ - if value is not None: - self._embodied_carbon = float(value) - - @property - def embodied_carbon_unit(self) -> Union[None, str]: - """ - Get material embodied carbon unit - :return: None or string - """ - return self._embodied_carbon - - @embodied_carbon_unit.setter - def embodied_carbon_unit(self, value): - """ - Set material embodied carbon unit - :param value: string - """ - if value is not None: - self._embodied_carbon_unit = str(value) - - @property - def recycling_ratio(self) -> Union[None, float]: - """ - Get material recycling ratio - :return: None or float - """ - return self._recycling_ratio - - @recycling_ratio.setter - def recycling_ratio(self, value): - """ - Set material recycling ratio - :param value: float - """ - if value is not None: - self._recycling_ratio = float(value) - - @property - def onsite_recycling_ratio(self) -> Union[None, float]: - """ - Get material onsite recycling ratio - :return: None or float - """ - return self._onsite_recycling_ratio - - @onsite_recycling_ratio.setter - def onsite_recycling_ratio(self, value): - """ - Set material onsite recycling ratio - :param value: float - """ - if value is not None: - self._onsite_recycling_ratio = float(value) - - @property - def company_recycling_ratio(self) -> Union[None, float]: - """ - Get material company recycling ratio - :return: None or float - """ - return self._company_recycling_ratio - - @company_recycling_ratio.setter - def company_recycling_ratio(self, value): - """ - Set material company recycling ratio - :param value: float - """ - if value is not None: - self._company_recycling_ratio = float(value) - - @property - def landfilling_ratio(self) -> Union[None, float]: - """ - Get material landfilling ratio - :return: None or float - """ - return self._landfilling_ratio - - @landfilling_ratio.setter - def landfilling_ratio(self, value): - """ - Set material landfilling ratio - :param value: float - """ - if value is not None: - self._landfilling_ratio = float(value) - - @property - def cost(self) -> Union[None, float]: - """ - Get material cost - :return: None or float - """ - return self._cost - - @cost.setter - def cost(self, value): - """ - Set material cost - :param value: float - """ - if value is not None: - self._cost = float(value) - - @property - def cost_unit(self) -> Union[None, str]: - """ - Get material cost unit - :return: None or string - """ - return self._cost_unit - - @cost_unit.setter - def cost_unit(self, value): - """ - Set material cost unit - :param value: string - """ - if value is not None: - self._cost_unit = float(value) diff --git a/city_model_structure/building_demand/occupancy.py b/city_model_structure/building_demand/occupancy.py index ec9ebf1e..27376a03 100644 --- a/city_model_structure/building_demand/occupancy.py +++ b/city_model_structure/building_demand/occupancy.py @@ -1,7 +1,8 @@ """ Occupancy module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import Union, List from city_model_structure.attributes.schedule import Schedule @@ -23,7 +24,7 @@ class Occupancy: @property def occupancy_density(self) -> Union[None, float]: """ - Get density in m2 per person + Get density in persons per m2 :return: None or float """ return self._occupancy_density @@ -31,7 +32,7 @@ class Occupancy: @occupancy_density.setter def occupancy_density(self, value): """ - Set density in m2 per persons + Set density in persons per m2 :param value: float """ if value is not None: @@ -92,6 +93,7 @@ class Occupancy: def occupancy_schedules(self) -> Union[None, List[Schedule]]: """ Get occupancy schedules + dataType = fraction :return: None or [Schedule] """ return self._occupancy_schedules @@ -100,6 +102,7 @@ class Occupancy: def occupancy_schedules(self, value): """ Set occupancy schedules + dataType = fraction :param value: [Schedule] """ self._occupancy_schedules = value diff --git a/city_model_structure/building_demand/occupant.py b/city_model_structure/building_demand/occupant.py index 878d278c..9ee6f9bd 100644 --- a/city_model_structure/building_demand/occupant.py +++ b/city_model_structure/building_demand/occupant.py @@ -1,8 +1,9 @@ """ Occupant module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Sanam Dabirian sanam.dabirian@mail.concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import calendar as cal diff --git a/city_model_structure/building_demand/storey.py b/city_model_structure/building_demand/storey.py index 143eec29..42264eda 100644 --- a/city_model_structure/building_demand/storey.py +++ b/city_model_structure/building_demand/storey.py @@ -1,7 +1,8 @@ """ Storey module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from __future__ import annotations @@ -15,7 +16,7 @@ class Storey: """ Storey class """ - def __init__(self, name, storey_surfaces, neighbours, volume, floor_area): + def __init__(self, name, storey_surfaces, neighbours, volume, internal_zone, floor_area): self._name = name self._storey_surfaces = storey_surfaces self._thermal_boundaries = None @@ -23,6 +24,7 @@ class Storey: self._thermal_zone = None self._neighbours = neighbours self._volume = volume + self._internal_zone = internal_zone self._floor_area = floor_area @property @@ -86,7 +88,7 @@ class Storey: :return: ThermalZone """ if self._thermal_zone is None: - self._thermal_zone = ThermalZone(self.thermal_boundaries, self.volume, self.floor_area) + self._thermal_zone = ThermalZone(self.thermal_boundaries, self._internal_zone, self.volume, self.floor_area) return self._thermal_zone @property diff --git a/city_model_structure/building_demand/surface.py b/city_model_structure/building_demand/surface.py index 6c73d268..1778354d 100644 --- a/city_model_structure/building_demand/surface.py +++ b/city_model_structure/building_demand/surface.py @@ -1,8 +1,9 @@ """ Surface module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from __future__ import annotations diff --git a/city_model_structure/building_demand/thermal_boundary.py b/city_model_structure/building_demand/thermal_boundary.py index 946e7642..836795c6 100644 --- a/city_model_structure/building_demand/thermal_boundary.py +++ b/city_model_structure/building_demand/thermal_boundary.py @@ -1,8 +1,9 @@ """ ThermalBoundary module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import uuid from typing import List, Union diff --git a/city_model_structure/building_demand/thermal_control.py b/city_model_structure/building_demand/thermal_control.py index 0c4c8a62..466f5cf1 100644 --- a/city_model_structure/building_demand/thermal_control.py +++ b/city_model_structure/building_demand/thermal_control.py @@ -1,7 +1,8 @@ """ ThermalControl module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import Union, List from city_model_structure.attributes.schedule import Schedule @@ -54,7 +55,7 @@ class ThermalControl: Set heating set point defined for a thermal zone in Celsius :param value: float """ - self._mean_heating_set_point = value + self._mean_heating_set_point = float(value) @property def heating_set_back(self) -> Union[None, float]: @@ -93,12 +94,13 @@ class ThermalControl: Set cooling set point defined for a thermal zone in Celsius :param value: float """ - self._mean_cooling_set_point = value + self._mean_cooling_set_point = float(value) @property def hvac_availability_schedules(self) -> Union[None, List[Schedule]]: """ Get the availability of the conditioning system defined for a thermal zone + dataType = on/off :return: None or [Schedule] """ return self._hvac_availability_schedules @@ -107,6 +109,7 @@ class ThermalControl: def hvac_availability_schedules(self, value): """ Set the availability of the conditioning system defined for a thermal zone + dataType = on/off :param value: [Schedule] """ self._hvac_availability_schedules = value @@ -115,6 +118,7 @@ class ThermalControl: def heating_set_point_schedules(self) -> Union[None, List[Schedule]]: """ Get heating set point schedule defined for a thermal zone in Celsius + dataType = temperature :return: None or [Schedule] """ return self._heating_set_point_schedules @@ -123,6 +127,7 @@ class ThermalControl: def heating_set_point_schedules(self, value): """ Set heating set point schedule defined for a thermal zone in Celsius + dataType = temperature :param value: [Schedule] """ self._heating_set_point_schedules = value @@ -131,6 +136,7 @@ class ThermalControl: def cooling_set_point_schedules(self) -> Union[None, List[Schedule]]: """ Get cooling set point schedule defined for a thermal zone in Celsius + dataType = temperature :return: None or [Schedule] """ return self._cooling_set_point_schedules @@ -139,6 +145,7 @@ class ThermalControl: def cooling_set_point_schedules(self, value): """ Set cooling set point schedule defined for a thermal zone in Celsius + dataType = temperature :param value: [Schedule] """ self._cooling_set_point_schedules = value diff --git a/city_model_structure/building_demand/thermal_opening.py b/city_model_structure/building_demand/thermal_opening.py index ae695187..ad3cfd01 100644 --- a/city_model_structure/building_demand/thermal_opening.py +++ b/city_model_structure/building_demand/thermal_opening.py @@ -1,8 +1,9 @@ """ ThermalOpening module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import uuid from typing import TypeVar, Union diff --git a/city_model_structure/building_demand/thermal_zone.py b/city_model_structure/building_demand/thermal_zone.py index 10f8ac0b..267c27a9 100644 --- a/city_model_structure/building_demand/thermal_zone.py +++ b/city_model_structure/building_demand/thermal_zone.py @@ -1,25 +1,33 @@ """ ThermalZone module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ -import uuid +import uuid, sys +import copy from typing import List, Union, TypeVar -from city_model_structure.building_demand.usage_zone import UsageZone +from city_model_structure.building_demand.occupancy import Occupancy +from city_model_structure.building_demand.appliances import Appliances +from city_model_structure.building_demand.lighting import Lighting +from city_model_structure.building_demand.internal_gains import InternalGains from city_model_structure.attributes.schedule import Schedule from city_model_structure.building_demand.thermal_control import ThermalControl from city_model_structure.energy_systems.hvac_system import HvacSystem +import helpers.constants as cte ThermalBoundary = TypeVar('ThermalBoundary') +InternalZone = TypeVar('InternalZone') class ThermalZone: """ ThermalZone class """ - def __init__(self, thermal_boundaries, volume, floor_area): + def __init__(self, thermal_boundaries, parent_internal_zone, volume, floor_area): self._id = None + self._parent_internal_zone = parent_internal_zone self._floor_area = floor_area self._thermal_boundaries = thermal_boundaries self._additional_thermal_bridge_u_value = None @@ -29,11 +37,19 @@ class ThermalZone: self._infiltration_rate_system_off = None self._volume = volume self._ordinate_number = None - self._usage_zones = None - self._thermal_control = None - self._hvac_system = None self._view_factors_matrix = None + self._usage = None + self._not_detailed_source_mean_annual_internal_gains = None + self._hours_day = None + self._days_year = None + self._mechanical_air_change = None + self._occupancy = None + self._lighting = None + self._appliances = None + self._internal_gains = None + self._thermal_control = None + @property def id(self): """ @@ -168,42 +184,6 @@ class ThermalZone: if value is not None: self._ordinate_number = int(value) - @property - def usage_zones(self) -> [UsageZone]: - """ - Get list of usage zones and the percentage of thermal zone's volume affected by that usage - From internal_zone - :return: [UsageZone] - """ - return self._usage_zones - - @usage_zones.setter - def usage_zones(self, values): - """ - Set list of usage zones and the percentage of thermal zone's volume affected by that usage - From internal_zone - :param values: [UsageZone] - """ - self._usage_zones = values - - @property - def thermal_control(self) -> Union[None, ThermalControl]: - """ - Get thermal control of this thermal zone - From internal_zone - :return: None or ThermalControl - """ - return self._thermal_control - - @thermal_control.setter - def thermal_control(self, value): - """ - Set thermal control for this thermal zone - From internal_zone - :param value: ThermalControl - """ - self._thermal_control = value - @property def hvac_system(self) -> Union[None, HvacSystem]: """ @@ -211,16 +191,7 @@ class ThermalZone: From internal_zone :return: None or HvacSystem """ - return self._hvac_system - - @hvac_system.setter - def hvac_system(self, value): - """ - Set HVAC system installed for this thermal zone - From internal_zone - :param value: HvacSystem - """ - self._hvac_system = value + return self._parent_internal_zone.hvac_system @property def view_factors_matrix(self): @@ -237,3 +208,477 @@ class ThermalZone: :param value: [[float]] """ self._view_factors_matrix = value + + @property + def usage(self) -> Union[None, str]: + """ + Get thermal zone usage + :return: None or str + """ + if self._parent_internal_zone.usage_zones is None: + return None + if self._usage is None: + self._usage = '' + for usage_zone in self._parent_internal_zone.usage_zones: + self._usage += str(round(usage_zone.percentage) * 100) + '_' + usage_zone.usage + '_' + self._usage = self._usage[:-1] + return self._usage + + @usage.setter + def usage(self, value): + """ + Set thermal zone usage + :param value: str + """ + if value is not None: + self._usage = str(value) + + @staticmethod + def _get_schedule_of_day(requested_day_type, schedules): + for schedule in schedules: + for day_type in schedule.day_types: + if day_type == requested_day_type: + return schedule + return None + + @property + def not_detailed_source_mean_annual_internal_gains(self) -> Union[None, List[InternalGains]]: + """ + Get thermal zone internal gains with unknown energy source + :return: [InternalGains] + """ + if self._parent_internal_zone.usage_zones is None: + return None + if self._not_detailed_source_mean_annual_internal_gains is None: + _grouped_internal_gain = InternalGains() + _grouped_internal_gain.type = 'grouped internal gains for thermal zone' + _average_internal_gain = 0 + _convective_part = 0 + _radiative_part = 0 + _latent_part = 0 + for _usage_zone in self._parent_internal_zone.usage_zones: + if _usage_zone.not_detailed_source_mean_annual_internal_gains is None: + return None + for _internal_gain in _usage_zone.not_detailed_source_mean_annual_internal_gains: + _average_internal_gain += _internal_gain.average_internal_gain + _convective_part += _internal_gain.average_internal_gain * _internal_gain.convective_fraction + _radiative_part += _internal_gain.average_internal_gain * _internal_gain.radiative_fraction + _latent_part += _internal_gain.average_internal_gain * _internal_gain.latent_fraction + + _grouped_internal_gain.average_internal_gain = _average_internal_gain + if _average_internal_gain > 0: + _grouped_internal_gain.convective_fraction = _convective_part / _average_internal_gain + _grouped_internal_gain.radiative_fraction = _radiative_part / _average_internal_gain + _grouped_internal_gain.latent_fraction = _latent_part / _average_internal_gain + + _internal_gains_reference = \ + self._parent_internal_zone.usage_zones[0].not_detailed_source_mean_annual_internal_gains[0] + if _internal_gains_reference.schedules is not None: + day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY, cte.SATURDAY, cte.SUNDAY] + schedule_of_days = [] + for i_day in range(0, 7): + schedule_of_day = \ + copy.deepcopy(self._get_schedule_of_day(day_types[i_day], _internal_gains_reference.schedules)) + if schedule_of_day is None: + sys.stderr.write(f'Error. Not found requested day type when generating internal gains schedules ' + f'in thermal_zone.\n') + schedule_of_day.day_types = [day_types[i_day]] + new_values = [] + for i_value in range(0, len(_internal_gains_reference.schedules[0].values)): + _new_value = 0 + for _usage_zone in self._parent_internal_zone.usage_zones: + for _internal_gain in _usage_zone.not_detailed_source_mean_annual_internal_gains: + _value = self._get_schedule_of_day(day_types[i_day], _internal_gain.schedules) + if _value is None: + sys.stderr.write(f'Error. Not found requested day type when generating internal gains schedules ' + f'in thermal_zone.\n') + _value = _value.values[i_value] + _new_value += _usage_zone.percentage * _value \ + / len(_usage_zone.not_detailed_source_mean_annual_internal_gains) + new_values.append(_new_value) + schedule_of_day.values = new_values + schedule_of_days.append(schedule_of_day) + _grouped_internal_gain.schedules = schedule_of_days + else: + _grouped_internal_gain.convective_fraction = 0 + _grouped_internal_gain.radiative_fraction = 0 + _grouped_internal_gain.latent_fraction = 0 + + self._not_detailed_source_mean_annual_internal_gains = [_grouped_internal_gain] + return self._not_detailed_source_mean_annual_internal_gains + + @not_detailed_source_mean_annual_internal_gains.setter + def not_detailed_source_mean_annual_internal_gains(self, value): + """ + Set thermal zone internal gains with unknown energy source + :param value: [InternalGains] + """ + self._not_detailed_source_mean_annual_internal_gains = value + + @property + def hours_day(self) -> Union[None, float]: + """ + Get thermal zone usage hours per day + :return: None or float + """ + if self._parent_internal_zone.usage_zones is None: + return None + if self._hours_day is None: + self._hours_day = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + self._hours_day += usage_zone.percentage * usage_zone.hours_day + return self._hours_day + + @hours_day.setter + def hours_day(self, value): + """ + Set thermal zone usage hours per day + :param value: float + """ + if value is not None: + self._hours_day = float(value) + + @property + def days_year(self) -> Union[None, float]: + """ + Get thermal zone usage days per year + :return: None or float + """ + if self._parent_internal_zone.usage_zones is None: + return None + if self._days_year is None: + self._days_year = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + self._days_year += usage_zone.percentage * usage_zone.days_year + return self._days_year + + @days_year.setter + def days_year(self, value): + """ + Set thermal zone usage days per year + :param value: float + """ + if value is not None: + self._days_year = float(value) + + @property + def mechanical_air_change(self) -> Union[None, float]: + """ + Get thermal zone mechanical air change in air change per hour (ACH) + :return: None or float + """ + if self._parent_internal_zone.usage_zones is None: + return None + if self._mechanical_air_change is None: + self._mechanical_air_change = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + if usage_zone.mechanical_air_change is None: + return None + self._mechanical_air_change += usage_zone.percentage * usage_zone.mechanical_air_change + return self._mechanical_air_change + + @mechanical_air_change.setter + def mechanical_air_change(self, value): + """ + Set thermal zone mechanical air change in air change per hour (ACH) + :param value: float + """ + if value is not None: + self._mechanical_air_change = float(value) + + @property + def occupancy(self) -> Union[None, Occupancy]: + """ + Get occupancy in the thermal zone + :return: None or Occupancy + """ + if self._parent_internal_zone.usage_zones is None: + return None + if self._occupancy is None: + self._occupancy = Occupancy() + _occupancy_density = 0 + _convective_part = 0 + _radiative_part = 0 + _latent_part = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + if usage_zone.occupancy is None: + return None + _occupancy_density += usage_zone.percentage * usage_zone.occupancy.occupancy_density + if usage_zone.occupancy.sensible_convective_internal_gain is not None: + _convective_part += usage_zone.percentage * usage_zone.occupancy.sensible_convective_internal_gain + _radiative_part += usage_zone.percentage * usage_zone.occupancy.sensible_radiative_internal_gain + _latent_part += usage_zone.percentage * usage_zone.occupancy.latent_internal_gain + self._occupancy.occupancy_density = _occupancy_density + self._occupancy.sensible_convective_internal_gain = _convective_part + self._occupancy.sensible_radiative_internal_gain = _radiative_part + self._occupancy.latent_internal_gain = _latent_part + + _occupancy_reference = self._parent_internal_zone.usage_zones[0].occupancy + if _occupancy_reference.occupancy_schedules is not None: + _schedules = [] + for i_schedule in range(0, len(_occupancy_reference.occupancy_schedules)): + schedule = copy.deepcopy(_occupancy_reference.occupancy_schedules[i_schedule]) + new_values = [] + for i_value in range(0, len(_occupancy_reference.occupancy_schedules[i_schedule].values)): + _new_value = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + _new_value += usage_zone.percentage * usage_zone.occupancy.occupancy_schedules[i_schedule].values[i_value] + new_values.append(_new_value) + schedule.values = new_values + _schedules.append(schedule) + self._occupancy.occupancy_schedules = _schedules + return self._occupancy + + @occupancy.setter + def occupancy(self, value): + """ + Set occupancy in the thermal zone + :param value: Occupancy + """ + self._occupancy = value + + @property + def lighting(self) -> Union[None, Lighting]: + """ + Get lighting information + :return: None or Lighting + """ + if self._parent_internal_zone.usage_zones is None: + return None + if self._lighting is None: + self._lighting = Lighting() + _lighting_density = 0 + _convective_part = 0 + _radiative_part = 0 + _latent_part = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + if usage_zone.lighting is None: + return None + _lighting_density += usage_zone.percentage * usage_zone.lighting.density + if usage_zone.lighting.convective_fraction is not None: + _convective_part += usage_zone.percentage * usage_zone.lighting.density \ + * usage_zone.lighting.convective_fraction + _radiative_part += usage_zone.percentage * usage_zone.lighting.density \ + * usage_zone.lighting.radiative_fraction + _latent_part += usage_zone.percentage * usage_zone.lighting.density \ + * usage_zone.lighting.latent_fraction + self._lighting.density = _lighting_density + if _lighting_density > 0: + self._lighting.convective_fraction = _convective_part / _lighting_density + self._lighting.radiative_fraction = _radiative_part / _lighting_density + self._lighting.latent_fraction = _latent_part / _lighting_density + else: + self._lighting.convective_fraction = 0 + self._lighting.radiative_fraction = 0 + self._lighting.latent_fraction = 0 + + _lighting_reference = self._parent_internal_zone.usage_zones[0].lighting + if _lighting_reference.schedules is not None: + _schedules = [] + for i_schedule in range(0, len(_lighting_reference.schedules)): + schedule = copy.deepcopy(_lighting_reference.schedules[i_schedule]) + new_values = [] + for i_value in range(0, len(_lighting_reference.schedules[i_schedule].values)): + _new_value = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + _new_value += usage_zone.percentage * usage_zone.lighting.schedules[i_schedule].values[i_value] + new_values.append(_new_value) + schedule.values = new_values + _schedules.append(schedule) + self._lighting.schedules = _schedules + return self._lighting + + @lighting.setter + def lighting(self, value): + """ + Set lighting information + :param value: Lighting + """ + self._lighting = value + + @property + def appliances(self) -> Union[None, Appliances]: + """ + Get appliances information + :return: None or Appliances + """ + if self._parent_internal_zone.usage_zones is None: + return None + if self._appliances is None: + self._appliances = Appliances() + _appliances_density = 0 + _convective_part = 0 + _radiative_part = 0 + _latent_part = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + if usage_zone.appliances is None: + return None + _appliances_density += usage_zone.percentage * usage_zone.appliances.density + if usage_zone.appliances.convective_fraction is not None: + _convective_part += usage_zone.percentage * usage_zone.appliances.density \ + * usage_zone.appliances.convective_fraction + _radiative_part += usage_zone.percentage * usage_zone.appliances.density \ + * usage_zone.appliances.radiative_fraction + _latent_part += usage_zone.percentage * usage_zone.appliances.density \ + * usage_zone.appliances.latent_fraction + self._appliances.density = _appliances_density + if _appliances_density > 0: + self._appliances.convective_fraction = _convective_part / _appliances_density + self._appliances.radiative_fraction = _radiative_part / _appliances_density + self._appliances.latent_fraction = _latent_part / _appliances_density + else: + self._appliances.convective_fraction = 0 + self._appliances.radiative_fraction = 0 + self._appliances.latent_fraction = 0 + + _appliances_reference = self._parent_internal_zone.usage_zones[0].appliances + if _appliances_reference.schedules is not None: + _schedules = [] + for i_schedule in range(0, len(_appliances_reference.schedules)): + schedule = copy.deepcopy(_appliances_reference.schedules[i_schedule]) + new_values = [] + for i_value in range(0, len(_appliances_reference.schedules[i_schedule].values)): + _new_value = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + _new_value += usage_zone.percentage * usage_zone.appliances.schedules[i_schedule].values[i_value] + new_values.append(_new_value) + schedule.values = new_values + _schedules.append(schedule) + self._appliances.schedules = _schedules + return self._appliances + + @appliances.setter + def appliances(self, value): + """ + Set appliances information + :param value: Appliances + """ + self._appliances = value + + @staticmethod + def _add_internal_gain(internal_gain_type, _internal_gain): + _internal_gain.average_internal_gain = internal_gain_type.density + _internal_gain.latent_fraction = internal_gain_type.latent_fraction + _internal_gain.radiative_fraction = internal_gain_type.radiative_fraction + _internal_gain.convective_fraction = internal_gain_type.convective_fraction + _internal_gain.schedules = internal_gain_type.schedules + + def get_internal_gains(self) -> [InternalGains]: + """ + Calculates and returns the list of all internal gains defined + :return: InternalGains + """ + if self.not_detailed_source_mean_annual_internal_gains is not None: + self._internal_gains = [] + for _internal_gain in self.not_detailed_source_mean_annual_internal_gains: + self._internal_gains.append(_internal_gain) + + if self.occupancy is not None: + if self.occupancy.latent_internal_gain is not None: + _internal_gain = InternalGains() + _internal_gain.type = cte.OCCUPANCY + _total_heat_gain = (self.occupancy.sensible_convective_internal_gain + + self.occupancy.sensible_radiative_internal_gain + + self.occupancy.latent_internal_gain) + _internal_gain.average_internal_gain = _total_heat_gain + if _total_heat_gain > 0: + _internal_gain.latent_fraction = self.occupancy.latent_internal_gain / _total_heat_gain + _internal_gain.radiative_fraction = self.occupancy.sensible_radiative_internal_gain / _total_heat_gain + _internal_gain.convective_fraction = self.occupancy.sensible_convective_internal_gain / _total_heat_gain + else: + _internal_gain.latent_fraction = 0 + _internal_gain.radiative_fraction = 0 + _internal_gain.convective_fraction = 0 + _internal_gain.schedules = self.occupancy.occupancy_schedules + if self._internal_gains is not None: + self._internal_gains.append(_internal_gain) + else: + self._internal_gains = [_internal_gain] + + if self.lighting is not None: + _internal_gain = InternalGains() + _internal_gain.type = cte.LIGHTING + self._add_internal_gain(self.lighting, _internal_gain) + if self._internal_gains is not None: + self._internal_gains.append(_internal_gain) + else: + self._internal_gains = [_internal_gain] + + if self.appliances is not None: + _internal_gain = InternalGains() + _internal_gain.type = cte.APPLIANCES + self._add_internal_gain(self.appliances, _internal_gain) + if self._internal_gains is not None: + self._internal_gains.append(_internal_gain) + else: + self._internal_gains = [_internal_gain] + + return self._internal_gains + + @property + def thermal_control(self) -> Union[None, ThermalControl]: + """ + Get thermal control of this thermal zone + :return: None or ThermalControl + """ + if self._parent_internal_zone.usage_zones is None: + return None + if self._thermal_control is None: + self._thermal_control = ThermalControl() + _mean_heating_set_point = 0 + _heating_set_back = 0 + _mean_cooling_set_point = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + _mean_heating_set_point += usage_zone.percentage * usage_zone.thermal_control.mean_heating_set_point + _heating_set_back += usage_zone.percentage * usage_zone.thermal_control.heating_set_back + _mean_cooling_set_point += usage_zone.percentage * usage_zone.thermal_control.mean_cooling_set_point + self._thermal_control.mean_heating_set_point = _mean_heating_set_point + self._thermal_control.heating_set_back = _heating_set_back + self._thermal_control.mean_cooling_set_point = _mean_cooling_set_point + + _thermal_control_reference = self._parent_internal_zone.usage_zones[0].thermal_control + _types_reference = [] + if _thermal_control_reference.hvac_availability_schedules is not None: + _types_reference.append([cte.HVAC_AVAILABILITY, _thermal_control_reference.hvac_availability_schedules]) + if _thermal_control_reference.heating_set_point_schedules is not None: + _types_reference.append([cte.HEATING_SET_POINT, _thermal_control_reference.heating_set_point_schedules]) + if _thermal_control_reference.cooling_set_point_schedules is not None: + _types_reference.append([cte.COOLING_SET_POINT, _thermal_control_reference.cooling_set_point_schedules]) + + for i_type in range(0, len(_types_reference)): + _schedules = [] + _schedule_type = _types_reference[i_type][1] + for i_schedule in range(0, len(_schedule_type)): + schedule = copy.deepcopy(_schedule_type[i_schedule]) + new_values = [] + for i_value in range(0, len(_schedule_type[i_schedule].values)): + _new_value = 0 + for usage_zone in self._parent_internal_zone.usage_zones: + if _types_reference[i_type][0] == cte.HVAC_AVAILABILITY: + _new_value += usage_zone.percentage * \ + usage_zone.thermal_control.hvac_availability_schedules[i_schedule].values[i_value] + elif _types_reference[i_type][0] == cte.HEATING_SET_POINT: + _new_value += usage_zone.percentage * \ + usage_zone.thermal_control.heating_set_point_schedules[i_schedule].values[i_value] + elif _types_reference[i_type][0] == cte.COOLING_SET_POINT: + _new_value += usage_zone.percentage * \ + usage_zone.thermal_control.cooling_set_point_schedules[i_schedule].values[i_value] + new_values.append(_new_value) + schedule.values = new_values + _schedules.append(schedule) + if i_type == 0: + self._thermal_control.hvac_availability_schedules = _schedules + elif i_type == 1: + self._thermal_control.heating_set_point_schedules = _schedules + elif i_type == 2: + self._thermal_control.cooling_set_point_schedules = _schedules + + return self._thermal_control + + @thermal_control.setter + def thermal_control(self, value): + """ + Set thermal control for this thermal zone + :param value: ThermalControl + """ + self._thermal_control = value diff --git a/city_model_structure/building_demand/usage_zone.py b/city_model_structure/building_demand/usage_zone.py index c2f8e9da..279589c1 100644 --- a/city_model_structure/building_demand/usage_zone.py +++ b/city_model_structure/building_demand/usage_zone.py @@ -1,12 +1,12 @@ """ UsageZone module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributors Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import uuid from typing import List, Union -import helpers.constants as cte from city_model_structure.building_demand.internal_gains import InternalGains from city_model_structure.building_demand.occupancy import Occupancy from city_model_structure.building_demand.lighting import Lighting @@ -30,7 +30,6 @@ class UsageZone: self._occupancy = None self._lighting = None self._appliances = None - self._internal_gains = None self._thermal_control = None @property @@ -209,51 +208,6 @@ class UsageZone: """ self._appliances = value - @property - def internal_gains(self) -> [InternalGains]: - """ - Calculates and returns the list of all internal gains defined - :return: InternalGains - """ - if self.occupancy is not None: - if self.occupancy.latent_internal_gain is not None: - _internal_gain = InternalGains() - _internal_gain.type = cte.OCCUPANCY - _total_heat_gain = (self.occupancy.sensible_convective_internal_gain - + self.occupancy.sensible_radiative_internal_gain - + self.occupancy.latent_internal_gain) - _internal_gain.average_internal_gain = _total_heat_gain - _internal_gain.latent_fraction = self.occupancy.latent_internal_gain / _total_heat_gain - _internal_gain.radiative_fraction = self.occupancy.sensible_radiative_internal_gain / _total_heat_gain - _internal_gain.convective_fraction = self.occupancy.sensible_convective_internal_gain / _total_heat_gain - _internal_gain.schedules = self.occupancy.occupancy_schedules - self._internal_gains = [_internal_gain] - if self.lighting is not None: - _internal_gain = InternalGains() - _internal_gain.type = cte.LIGHTING - _internal_gain.average_internal_gain = self.lighting.lighting_density - _internal_gain.latent_fraction = self.lighting.latent_fraction - _internal_gain.radiative_fraction = self.lighting.radiative_fraction - _internal_gain.convective_fraction = self.lighting.convective_fraction - _internal_gain.schedules = self.lighting.schedules - if self._internal_gains is not None: - self._internal_gains.append(_internal_gain) - else: - self._internal_gains = [_internal_gain] - if self.appliances is not None: - _internal_gain = InternalGains() - _internal_gain.type = cte.APPLIANCES - _internal_gain.average_internal_gain = self.appliances.appliances_density - _internal_gain.latent_fraction = self.appliances.latent_fraction - _internal_gain.radiative_fraction = self.appliances.radiative_fraction - _internal_gain.convective_fraction = self.appliances.convective_fraction - _internal_gain.schedules = self.appliances.schedules - if self._internal_gains is not None: - self._internal_gains.append(_internal_gain) - else: - self._internal_gains = [_internal_gain] - return self._internal_gains - @property def thermal_control(self) -> Union[None, ThermalControl]: """ diff --git a/city_model_structure/buildings_cluster.py b/city_model_structure/buildings_cluster.py index f36f649b..c30b485c 100644 --- a/city_model_structure/buildings_cluster.py +++ b/city_model_structure/buildings_cluster.py @@ -1,7 +1,8 @@ """ BuildingsCluster module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, TypeVar diff --git a/city_model_structure/bus_system.py b/city_model_structure/bus_system.py index c254a55e..2ad29ca3 100644 --- a/city_model_structure/bus_system.py +++ b/city_model_structure/bus_system.py @@ -1,7 +1,8 @@ """ Bus system module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List diff --git a/city_model_structure/city.py b/city_model_structure/city.py index b0e19e81..d50f53ac 100644 --- a/city_model_structure/city.py +++ b/city_model_structure/city.py @@ -1,8 +1,9 @@ """ City module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributor Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Peter Yefi peteryefi@gmail.com """ from __future__ import annotations import sys diff --git a/city_model_structure/city_object.py b/city_model_structure/city_object.py index 5604f6e0..bea861da 100644 --- a/city_model_structure/city_object.py +++ b/city_model_structure/city_object.py @@ -1,7 +1,8 @@ """ CityObject module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import math @@ -39,7 +40,7 @@ class CityObject: @property def name(self): """ - Get building name + Get city object name :return: str """ return self._name @@ -47,7 +48,7 @@ class CityObject: @name.setter def name(self, value): """ - Set building name + Set city object name :return: str """ self._name = value diff --git a/city_model_structure/city_objects_cluster.py b/city_model_structure/city_objects_cluster.py index 35f02251..06182338 100644 --- a/city_model_structure/city_objects_cluster.py +++ b/city_model_structure/city_objects_cluster.py @@ -1,7 +1,8 @@ """ CityObjectsCluster module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from abc import ABC diff --git a/city_model_structure/energy_system.py b/city_model_structure/energy_system.py index 7fb7d2d1..3c7f5002 100644 --- a/city_model_structure/energy_system.py +++ b/city_model_structure/energy_system.py @@ -1,8 +1,9 @@ """ EnergySystem module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Peter Yefi peteryefi@gmail.com """ from city_model_structure.city_object import CityObject diff --git a/city_model_structure/energy_systems/air_source_hp.py b/city_model_structure/energy_systems/air_source_hp.py index 4f9695c7..b5c2e233 100644 --- a/city_model_structure/energy_systems/air_source_hp.py +++ b/city_model_structure/energy_systems/air_source_hp.py @@ -1,8 +1,9 @@ """ air_source_hp module defines an air source heat pump SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Peter Yefi peteryefi@gmail.com """ from typing import List diff --git a/city_model_structure/energy_systems/heat_pump.py b/city_model_structure/energy_systems/heat_pump.py index a0af2442..bb78dc72 100644 --- a/city_model_structure/energy_systems/heat_pump.py +++ b/city_model_structure/energy_systems/heat_pump.py @@ -1,7 +1,8 @@ """ heat_pump module defines a heat pump SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.com """ diff --git a/city_model_structure/energy_systems/hvac_system.py b/city_model_structure/energy_systems/hvac_system.py index 4bc6edf3..3e390cfe 100644 --- a/city_model_structure/energy_systems/hvac_system.py +++ b/city_model_structure/energy_systems/hvac_system.py @@ -1,7 +1,8 @@ """ HvacSystem module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import Union diff --git a/city_model_structure/energy_systems/pv_system.py b/city_model_structure/energy_systems/pv_system.py index 7e6b3870..ead8e1d4 100644 --- a/city_model_structure/energy_systems/pv_system.py +++ b/city_model_structure/energy_systems/pv_system.py @@ -1,7 +1,8 @@ """ pv_system defines a pv system including all components: PV panels, transformer... SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import Union diff --git a/city_model_structure/energy_systems/water_to_water_hp.py b/city_model_structure/energy_systems/water_to_water_hp.py index e65d2247..12c80343 100644 --- a/city_model_structure/energy_systems/water_to_water_hp.py +++ b/city_model_structure/energy_systems/water_to_water_hp.py @@ -1,7 +1,8 @@ """ water_to_water_hp module defines a water to water heat pump heat pump SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.com """ from typing import List diff --git a/city_model_structure/fuel.py b/city_model_structure/fuel.py index 3e92ce8b..db2925f8 100644 --- a/city_model_structure/fuel.py +++ b/city_model_structure/fuel.py @@ -1,8 +1,8 @@ """ ConstructionFactory (before PhysicsFactory) retrieve the specific construction module for the given region SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ class Fuel: diff --git a/city_model_structure/iot/sensor.py b/city_model_structure/iot/sensor.py index 5855d85b..48e0eb12 100644 --- a/city_model_structure/iot/sensor.py +++ b/city_model_structure/iot/sensor.py @@ -1,7 +1,8 @@ """ Sensor module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from helpers.location import Location diff --git a/city_model_structure/iot/sensor_measure.py b/city_model_structure/iot/sensor_measure.py index 608d97f4..7c2d2223 100644 --- a/city_model_structure/iot/sensor_measure.py +++ b/city_model_structure/iot/sensor_measure.py @@ -1,7 +1,8 @@ """ Sensor measure module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ class SensorMeasure: diff --git a/city_model_structure/iot/sensor_type.py b/city_model_structure/iot/sensor_type.py index 414b6f60..49596c50 100644 --- a/city_model_structure/iot/sensor_type.py +++ b/city_model_structure/iot/sensor_type.py @@ -1,7 +1,8 @@ """ Sensor type module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from enum import Enum diff --git a/city_model_structure/iot/station.py b/city_model_structure/iot/station.py index 8a15e62d..19a05775 100644 --- a/city_model_structure/iot/station.py +++ b/city_model_structure/iot/station.py @@ -1,7 +1,8 @@ """ Station SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import uuid diff --git a/city_model_structure/lca_calculations.py b/city_model_structure/lca_calculations.py index fd8b30be..c0ea24e1 100644 --- a/city_model_structure/lca_calculations.py +++ b/city_model_structure/lca_calculations.py @@ -1,7 +1,8 @@ """ LifeCycleAssessment retrieve the specific Life Cycle Assessment module for the given region SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ from city_model_structure.machine import Machine diff --git a/city_model_structure/lca_material.py b/city_model_structure/lca_material.py index f9c620a7..935bc528 100644 --- a/city_model_structure/lca_material.py +++ b/city_model_structure/lca_material.py @@ -1,8 +1,8 @@ """ -Material module +LCA Material module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder atiya.atiya@mail.concordia.ca """ from typing import Union diff --git a/city_model_structure/machine.py b/city_model_structure/machine.py index 249fe3d0..491a8e72 100644 --- a/city_model_structure/machine.py +++ b/city_model_structure/machine.py @@ -1,8 +1,8 @@ """ LifeCycleAssessment retrieve the specific Life Cycle Assessment module for the given region SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ class Machine: diff --git a/city_model_structure/network.py b/city_model_structure/network.py index ae3d0186..77efc492 100644 --- a/city_model_structure/network.py +++ b/city_model_structure/network.py @@ -1,8 +1,8 @@ """ Network module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import uuid diff --git a/city_model_structure/parts_consisting_building.py b/city_model_structure/parts_consisting_building.py index e49ff9aa..17aedb26 100644 --- a/city_model_structure/parts_consisting_building.py +++ b/city_model_structure/parts_consisting_building.py @@ -1,7 +1,8 @@ """ PartsConsistingBuilding module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, TypeVar diff --git a/city_model_structure/subway_entrance.py b/city_model_structure/subway_entrance.py index 51f049d6..736ce6af 100644 --- a/city_model_structure/subway_entrance.py +++ b/city_model_structure/subway_entrance.py @@ -1,7 +1,8 @@ """ Subway entrance module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from city_model_structure.city_object import CityObject diff --git a/city_model_structure/transport/bus.py b/city_model_structure/transport/bus.py index ea7acb47..ef62b91d 100644 --- a/city_model_structure/transport/bus.py +++ b/city_model_structure/transport/bus.py @@ -1,7 +1,8 @@ """ Bus module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from city_model_structure.attributes.schedule import Schedule diff --git a/city_model_structure/transport/bus_depot.py b/city_model_structure/transport/bus_depot.py index 0b617275..8dde8571 100644 --- a/city_model_structure/transport/bus_depot.py +++ b/city_model_structure/transport/bus_depot.py @@ -1,7 +1,8 @@ """ Bus depot module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from city_model_structure.transport.bus_node import BusNode diff --git a/city_model_structure/transport/bus_edge.py b/city_model_structure/transport/bus_edge.py index 98c31dc0..cc08be7c 100644 --- a/city_model_structure/transport/bus_edge.py +++ b/city_model_structure/transport/bus_edge.py @@ -1,7 +1,8 @@ """ Bus edge module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, TypeVar diff --git a/city_model_structure/transport/bus_network.py b/city_model_structure/transport/bus_network.py index 6f3dfbd8..fd134dee 100644 --- a/city_model_structure/transport/bus_network.py +++ b/city_model_structure/transport/bus_network.py @@ -1,7 +1,8 @@ """ Bus network module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List diff --git a/city_model_structure/transport/bus_node.py b/city_model_structure/transport/bus_node.py index 17274a4f..71a99301 100644 --- a/city_model_structure/transport/bus_node.py +++ b/city_model_structure/transport/bus_node.py @@ -1,7 +1,8 @@ """ Bus node module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, TypeVar diff --git a/city_model_structure/transport/bus_stop.py b/city_model_structure/transport/bus_stop.py index b4fccd62..b68b7750 100644 --- a/city_model_structure/transport/bus_stop.py +++ b/city_model_structure/transport/bus_stop.py @@ -1,7 +1,8 @@ """ Bus stop module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import Union diff --git a/city_model_structure/transport/connection.py b/city_model_structure/transport/connection.py index 0f023cd4..4ebbc467 100644 --- a/city_model_structure/transport/connection.py +++ b/city_model_structure/transport/connection.py @@ -1,9 +1,9 @@ """ Connection module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca -Contributor Guille guille.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Guille guille.gutierrezmorote@concordia.ca """ import ast diff --git a/city_model_structure/transport/crossing.py b/city_model_structure/transport/crossing.py index 0b740355..d9e83142 100644 --- a/city_model_structure/transport/crossing.py +++ b/city_model_structure/transport/crossing.py @@ -1,9 +1,9 @@ """ Crossing module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca -Contributor Guille guille.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Guille guille.gutierrezmorote@concordia.ca """ import ast diff --git a/city_model_structure/transport/fast_charging_infrastructure.py b/city_model_structure/transport/fast_charging_infrastructure.py index a3369a91..c772cee5 100644 --- a/city_model_structure/transport/fast_charging_infrastructure.py +++ b/city_model_structure/transport/fast_charging_infrastructure.py @@ -1,7 +1,8 @@ """ Fast charging infrastructure module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ diff --git a/city_model_structure/transport/join.py b/city_model_structure/transport/join.py index 3e1cd143..3b7ae328 100644 --- a/city_model_structure/transport/join.py +++ b/city_model_structure/transport/join.py @@ -1,9 +1,9 @@ """ Join module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca -Contributor Guille guille.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Guille guille.gutierrezmorote@concordia.ca """ from city_model_structure.transport.traffic_node import TrafficNode diff --git a/city_model_structure/transport/lane.py b/city_model_structure/transport/lane.py index 417f986a..1ac6e32f 100644 --- a/city_model_structure/transport/lane.py +++ b/city_model_structure/transport/lane.py @@ -1,8 +1,8 @@ """ Lane module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, Union diff --git a/city_model_structure/transport/origin_destination_edge.py b/city_model_structure/transport/origin_destination_edge.py index 32fa7cbb..9bada29d 100644 --- a/city_model_structure/transport/origin_destination_edge.py +++ b/city_model_structure/transport/origin_destination_edge.py @@ -1,8 +1,8 @@ """ Origin-Destination edge module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca - +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, TypeVar diff --git a/city_model_structure/transport/origin_destination_network.py b/city_model_structure/transport/origin_destination_network.py index 9090f983..905ef058 100644 --- a/city_model_structure/transport/origin_destination_network.py +++ b/city_model_structure/transport/origin_destination_network.py @@ -1,7 +1,8 @@ """ Origin-Destination network module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List diff --git a/city_model_structure/transport/origin_destination_node.py b/city_model_structure/transport/origin_destination_node.py index ea84bd5c..c24886ad 100644 --- a/city_model_structure/transport/origin_destination_node.py +++ b/city_model_structure/transport/origin_destination_node.py @@ -1,7 +1,8 @@ """ Origin-Destination node module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, TypeVar diff --git a/city_model_structure/transport/phase.py b/city_model_structure/transport/phase.py index 66d2d59b..a6669fa4 100644 --- a/city_model_structure/transport/phase.py +++ b/city_model_structure/transport/phase.py @@ -1,8 +1,8 @@ """ Phase module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List, Union diff --git a/city_model_structure/transport/traffic_edge.py b/city_model_structure/transport/traffic_edge.py index e507e0ba..a608c812 100644 --- a/city_model_structure/transport/traffic_edge.py +++ b/city_model_structure/transport/traffic_edge.py @@ -1,9 +1,9 @@ """ Traffic edge module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca -Contributor Guille guille.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Guille guille.gutierrezmorote@concordia.ca """ from typing import List, Union diff --git a/city_model_structure/transport/traffic_light.py b/city_model_structure/transport/traffic_light.py index 89827a62..ffc94c75 100644 --- a/city_model_structure/transport/traffic_light.py +++ b/city_model_structure/transport/traffic_light.py @@ -1,9 +1,9 @@ """ Traffic light module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca -Contributor Guille guille.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Guille guille.gutierrezmorote@concordia.ca """ import ast diff --git a/city_model_structure/transport/traffic_network.py b/city_model_structure/transport/traffic_network.py index eef5a4e9..1db151b7 100644 --- a/city_model_structure/transport/traffic_network.py +++ b/city_model_structure/transport/traffic_network.py @@ -1,9 +1,9 @@ """ Traffic network module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca -Contributor Guille guille.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Guille guille.gutierrezmorote@concordia.ca """ from typing import List diff --git a/city_model_structure/transport/traffic_node.py b/city_model_structure/transport/traffic_node.py index 6188e6e5..02ebb1be 100644 --- a/city_model_structure/transport/traffic_node.py +++ b/city_model_structure/transport/traffic_node.py @@ -1,9 +1,9 @@ """ TrafficNode module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca -Contributor Guille guille.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Guille guille.gutierrezmorote@concordia.ca """ from typing import List, TypeVar diff --git a/city_model_structure/transport/walkway_node.py b/city_model_structure/transport/walkway_node.py index e884f976..54d2dec5 100644 --- a/city_model_structure/transport/walkway_node.py +++ b/city_model_structure/transport/walkway_node.py @@ -1,9 +1,9 @@ """ Walkway node module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca -Contributor Milad milad.aghamohamadnia@concordia.ca -Contributor Guille guille.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Code contributors: Guille guille.gutierrezmorote@concordia.ca """ from typing import List, Union diff --git a/city_model_structure/vehicle.py b/city_model_structure/vehicle.py index e9ed8131..ddbdf631 100644 --- a/city_model_structure/vehicle.py +++ b/city_model_structure/vehicle.py @@ -1,8 +1,8 @@ """ LifeCycleAssessment retrieve the specific Life Cycle Assessment module for the given region SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ class Vehicle: diff --git a/exports/energy_systems/air_source_hp_export.py b/exports/energy_systems/air_source_hp_export.py index 9ea7f7d7..29daa827 100644 --- a/exports/energy_systems/air_source_hp_export.py +++ b/exports/energy_systems/air_source_hp_export.py @@ -2,7 +2,8 @@ AirSourceHPExport exports air source values after executing insel. Multiple files are generated for the export SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.com """ from exports.energy_systems.heat_pump_export import HeatPumpExport from typing import List, Tuple, Union diff --git a/exports/energy_systems/heat_pump_export.py b/exports/energy_systems/heat_pump_export.py index b6731579..7c007b82 100644 --- a/exports/energy_systems/heat_pump_export.py +++ b/exports/energy_systems/heat_pump_export.py @@ -1,7 +1,8 @@ """ HeatPumpExport exports heatpump outputs into several files after insel execution SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.com """ import os from typing import List, Tuple, Union, Dict diff --git a/exports/energy_systems/water_to_water_hp_export.py b/exports/energy_systems/water_to_water_hp_export.py index 07787218..a0be32d3 100644 --- a/exports/energy_systems/water_to_water_hp_export.py +++ b/exports/energy_systems/water_to_water_hp_export.py @@ -2,7 +2,8 @@ WaterToWaterHPExport exports water to water values after executing insel. Multiple files are generated for the export SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.com """ from exports.energy_systems.heat_pump_export import HeatPumpExport from typing import List, Tuple, Union diff --git a/exports/energy_systems_factory.py b/exports/energy_systems_factory.py index 8f4daa93..27442e1b 100644 --- a/exports/energy_systems_factory.py +++ b/exports/energy_systems_factory.py @@ -1,7 +1,8 @@ """ EnergySystemsFactory exports energy systems into several formats SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.com """ from pathlib import Path diff --git a/exports/exports_factory.py b/exports/exports_factory.py index 6ea6b18b..501136a4 100644 --- a/exports/exports_factory.py +++ b/exports/exports_factory.py @@ -1,7 +1,8 @@ """ ExportsFactory export a city into several formats SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from pathlib import Path @@ -19,6 +20,8 @@ class ExportsFactory: def __init__(self, export_type, city, path, target_buildings=None): self._city = city self._export_type = '_' + export_type.lower() + if isinstance(path, str): + path = Path(path) self._path = path self._target_buildings = target_buildings @@ -92,3 +95,10 @@ class ExportsFactory: :return: None """ return getattr(self, self._export_type, lambda: None) + + def export_debug(self): + """ + Export the city given to the class using the given export type handler + :return: None + """ + return getattr(self, self._export_type) diff --git a/exports/formats/energy_ade.py b/exports/formats/energy_ade.py index cf335397..315bc131 100644 --- a/exports/formats/energy_ade.py +++ b/exports/formats/energy_ade.py @@ -1,7 +1,8 @@ """ ExportsFactory export a city into several formats SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import uuid diff --git a/exports/formats/idf.py b/exports/formats/idf.py index 54e899d3..c51b648e 100644 --- a/exports/formats/idf.py +++ b/exports/formats/idf.py @@ -1,10 +1,14 @@ """ TestOccupancyFactory test and validate the city model structure schedules parameters SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Soroush Samareh Abolhassani - soroush.samarehabolhassani@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Guillermo.GutierrezMorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca + Soroush Samareh Abolhassani soroush.samarehabolhassani@mail.concordia.ca """ from geomeppy import IDF +import helpers.constants as cte class Idf: @@ -35,19 +39,19 @@ class Idf: idf_surfaces = { # todo: make an enum for all the surface types - 'Wall': 'wall', - 'Ground': 'floor', - 'Roof': 'roof' + cte.WALL: 'wall', + cte.GROUND: 'floor', + cte.ROOF: 'roof' } idf_usage = { # todo: make an enum for all the usage types - 'residential': 'residential_building' + cte.RESIDENTIAL: 'residential_building' } idf_type_limits = { - 'on_off': 'on/off', - 'fraction': 'Fraction', - 'any_number': 'Any Number', + cte.ON_OFF: 'on/off', + cte.FRACTION: 'Fraction', + cte.ANY_NUMBER: 'Any Number', 'continuous': 'Continuous', 'discrete': 'Discrete' } @@ -117,8 +121,8 @@ class Idf: Visible_Absorptance=layer.material.visible_absorptance ) - def _add_daily_schedule(self, usage_zone, schedule): - _schedule = self._idf.newidfobject(self._COMPACT_SCHEDULE, Name=f'{schedule.type} schedules {usage_zone.usage}') + def _add_daily_schedule(self, usage, schedule): + _schedule = self._idf.newidfobject(self._COMPACT_SCHEDULE, Name=f'{schedule.type} schedules {usage}') _val = schedule.values _schedule.Schedule_Type_Limits_Name = self.idf_type_limits[schedule.data_type.lower()] _schedule.Field_1 = "Through: 12/31" @@ -172,14 +176,12 @@ class Idf: _schedule.Field_49 = "Until: 24:00" _schedule.Field_50 = _val[23] - def _add_schedule(self, usage_zone, schedule_type): + def _add_schedule(self, usage, new_schedule): for schedule in self._idf.idfobjects[self._HOURLY_SCHEDULE]: - if schedule.Name == f'{schedule_type} schedules {usage_zone.usage}': + if schedule.Name == f'{new_schedule.type} schedules {usage}': return - for schedule in usage_zone.schedules: - if schedule.type == schedule_type: - if schedule.time_range == "day": - return self._add_daily_schedule(usage_zone, schedule) + if new_schedule.time_range == "day": + return self._add_daily_schedule(usage, new_schedule) return def _add_construction(self, thermal_boundary): @@ -202,12 +204,12 @@ class Idf: _kwargs[f'Layer_{i + 1}'] = layers[1].material.name self._idf.newidfobject(self._CONSTRUCTION, **_kwargs) - def _add_zone(self, usage_zone): + def _add_zone(self, usage_zone, thermal_zone_volume): for zone in self._idf.idfobjects['ZONE']: if zone.Name == usage_zone.id: return - # todo: what does we need to define a zone in energy plus? - self._idf.newidfobject(self._ZONE, Name=usage_zone.id, Volume=usage_zone.volume) + # todo: what do we need to define a zone in energy plus? + self._idf.newidfobject(self._ZONE, Name=usage_zone.id, Volume=thermal_zone_volume * usage_zone.percentage) self._add_heating_system(usage_zone) def _add_thermostat(self, usage_zone): @@ -217,8 +219,8 @@ class Idf: return thermostat return self._idf.newidfobject(self._THERMOSTAT, Name=thermostat_name, - Constant_Heating_Setpoint=usage_zone.heating_setpoint, - Constant_Cooling_Setpoint=usage_zone.cooling_setpoint) + Constant_Heating_Setpoint=usage_zone.thermal_control.mean_heating_set_point, + Constant_Cooling_Setpoint=usage_zone.thermal_control.mean_cooling_set_point) def _add_heating_system(self, usage_zone): for air_system in self._idf.idfobjects[self._IDEAL_LOAD_AIR_SYSTEM]: @@ -232,14 +234,19 @@ class Idf: Cooling_Availability_Schedule_Name=f'HVAC AVAIL SCHEDULES {usage_zone.usage}', Template_Thermostat_Name=thermostat.Name) - def _add_occupancy(self, usage_zone): + def _add_occupancy(self, usage_zone, area): + number_of_people = area * usage_zone.occupancy.occupancy_density + fraction_radiant = usage_zone.occupancy.sensible_radiative_internal_gain / \ + (usage_zone.occupancy.sensible_radiative_internal_gain + + usage_zone.occupancy.sensible_convective_internal_gain + + usage_zone.occupancy.latent_internal_gain) self._idf.newidfobject(self._PEOPLE, Name=f'{usage_zone.id}_occupancy', Zone_or_ZoneList_Name=usage_zone.id, Number_of_People_Schedule_Name=f'Occupancy schedules {usage_zone.usage}', Number_of_People_Calculation_Method="People", - Number_of_People=500, # todo: get people from where? - Fraction_Radiant=0.3, # todo: howto get this from InternalGains + Number_of_People=number_of_people, + Fraction_Radiant=fraction_radiant, Activity_Level_Schedule_Name=f'Occupancy schedules {usage_zone.usage}' ) @@ -261,7 +268,7 @@ class Idf: Zone_or_ZoneList_Name=usage_zone.id, Schedule_Name=f'Infiltration schedules {usage_zone.usage}', Design_Flow_Rate_Calculation_Method='AirChanges/Hour', - Air_Changes_per_Hour=0.35, # todo: change it from usage catalog + Air_Changes_per_Hour=usage_zone.mechanical_air_change, Constant_Term_Coefficient=0.606, # todo: change it from usage catalog Temperature_Term_Coefficient=3.6359996E-02, # todo: change it from usage catalog Velocity_Term_Coefficient=0.1177165, # todo: change it from usage catalog @@ -275,20 +282,33 @@ class Idf: """ for building in self._city.buildings: - for usage_zone in building.usage_zones: - self._add_schedule(usage_zone, "Infiltration") - self._add_schedule(usage_zone, "Lights") - self._add_schedule(usage_zone, "Occupancy") - self._add_schedule(usage_zone, "Refrigeration") - self._add_schedule(usage_zone, "HVAC Avail") + for internal_zone in building.internal_zones: + for thermal_zone in internal_zone.thermal_zones: + for thermal_boundary in thermal_zone.thermal_boundaries: + self._add_construction(thermal_boundary) + for usage_zone in thermal_zone.usage_zones: + usage = usage_zone.usage + usage_zone_area = thermal_zone.floor_area * usage_zone.percentage - self._add_zone(usage_zone) - self._add_heating_system(usage_zone) - self._add_infiltration(usage_zone) - self._add_occupancy(usage_zone) - for thermal_zone in building.thermal_zones: - for thermal_boundary in thermal_zone.thermal_boundaries: - self._add_construction(thermal_boundary) + # todo: infiltration can be written with two values (system on and system off) in E+? Or just as schedule? + # self._add_schedule(usage, "Infiltration") + for schedule in usage_zone.lighting.schedules: + for day_type in schedule.day_types: + if day_type == cte.MONDAY: + self._add_schedule(usage, schedule) + for schedule in usage_zone.occupancy.occupancy_schedules: + for day_type in schedule.day_types: + if day_type == cte.MONDAY: + self._add_schedule(usage, usage_zone.occupancy.occupancy_schedules) + for schedule in usage_zone.thermal_control.hvac_availability_schedules: + for day_type in schedule.day_types: + if day_type == cte.MONDAY: + self._add_schedule(usage, schedule) + + self._add_zone(usage_zone, thermal_zone.volume) + self._add_heating_system(usage_zone) +# self._add_infiltration(usage_zone) + self._add_occupancy(usage_zone, usage_zone_area) if self._export_type == "Surfaces": self._add_surfaces(building) @@ -335,12 +355,14 @@ class Idf: def _add_surfaces(self, building): - for thermal_zone in building.thermal_zones: - for boundary in thermal_zone.thermal_boundaries: - idf_surface_type = self.idf_surfaces[boundary.surface.type] - for usage_zone in thermal_zone.usage_zones: - surface = self._idf.newidfobject(self._SURFACE, Name=f'{boundary.surface.name}', - Surface_Type=idf_surface_type, Zone_Name=usage_zone.id, - Construction_Name=boundary.construction_name) - coordinates = self._matrix_to_list(boundary.surface.solid_polygon.coordinates, self._city.lower_corner) - surface.setcoords(coordinates) + for internal_zone in building.internal_zones: + for thermal_zone in internal_zone.thermal_zones: + for boundary in thermal_zone.thermal_boundaries: + idf_surface_type = self.idf_surfaces[boundary.parent_surface.type] + for usage_zone in thermal_zone.usage_zones: + surface = self._idf.newidfobject(self._SURFACE, Name=f'{boundary.parent_surface.name}', + Surface_Type=idf_surface_type, Zone_Name=usage_zone.id, + Construction_Name=boundary.construction_name) + coordinates = self._matrix_to_list(boundary.parent_surface.solid_polygon.coordinates, + self._city.lower_corner) + surface.setcoords(coordinates) diff --git a/exports/formats/obj.py b/exports/formats/obj.py index 00e84e1f..bf1bee2b 100644 --- a/exports/formats/obj.py +++ b/exports/formats/obj.py @@ -1,7 +1,8 @@ """ export a city into Obj format SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from pathlib import Path diff --git a/exports/formats/simplified_radiosity_algorithm.py b/exports/formats/simplified_radiosity_algorithm.py index 9f5d6104..d40a4908 100644 --- a/exports/formats/simplified_radiosity_algorithm.py +++ b/exports/formats/simplified_radiosity_algorithm.py @@ -1,7 +1,8 @@ """ Simplified Radiosity Algorithm SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guillermo.GutierrezMorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guillermo.GutierrezMorote@concordia.ca """ import xmltodict diff --git a/exports/formats/stl.py b/exports/formats/stl.py index ac1d2aed..30479a95 100644 --- a/exports/formats/stl.py +++ b/exports/formats/stl.py @@ -1,7 +1,8 @@ """ export a city into Stl format SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from exports.formats.triangular import Triangular diff --git a/exports/formats/triangular.py b/exports/formats/triangular.py index 60292a76..25715d5b 100644 --- a/exports/formats/triangular.py +++ b/exports/formats/triangular.py @@ -1,7 +1,8 @@ """ export a city from trimesh into Triangular format (obj or stl) SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from pathlib import Path from trimesh import Trimesh diff --git a/helpers/configuration_helper.py b/helpers/configuration_helper.py index 51d9a3d8..d6aca652 100644 --- a/helpers/configuration_helper.py +++ b/helpers/configuration_helper.py @@ -1,7 +1,8 @@ """ Configuration helper SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import configparser from pathlib import Path diff --git a/helpers/constants.py b/helpers/constants.py index b4291102..9707ffd9 100644 --- a/helpers/constants.py +++ b/helpers/constants.py @@ -1,7 +1,8 @@ """ Constant module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ # universal constants diff --git a/helpers/enrich_city.py b/helpers/enrich_city.py index cc5067a1..7e0f47cf 100644 --- a/helpers/enrich_city.py +++ b/helpers/enrich_city.py @@ -1,7 +1,8 @@ """ Enrich city SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from imports.construction_factory import ConstructionFactory diff --git a/helpers/geometry_helper.py b/helpers/geometry_helper.py index 3b7977aa..d6b0979f 100644 --- a/helpers/geometry_helper.py +++ b/helpers/geometry_helper.py @@ -1,8 +1,9 @@ """ Geometry helper SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import math import numpy as np diff --git a/helpers/location.py b/helpers/location.py index f25d24e4..087256bf 100644 --- a/helpers/location.py +++ b/helpers/location.py @@ -1,8 +1,9 @@ """ Location module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ diff --git a/helpers/monthly_to_hourly_demand.py b/helpers/monthly_to_hourly_demand.py index 029a42dd..bc7d11d4 100644 --- a/helpers/monthly_to_hourly_demand.py +++ b/helpers/monthly_to_hourly_demand.py @@ -1,7 +1,8 @@ """ monthly_to_hourly_demand module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import calendar as cal import pandas as pd diff --git a/helpers/yearly_from_daily_schedules.py b/helpers/yearly_from_daily_schedules.py index 2c4cd21a..d5ab535f 100644 --- a/helpers/yearly_from_daily_schedules.py +++ b/helpers/yearly_from_daily_schedules.py @@ -1,7 +1,8 @@ """ Yearly from daily schedules module SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import calendar as cal import helpers.constants as cte diff --git a/imports/construction/ca_physics_parameters.py b/imports/construction/ca_physics_parameters.py index 6f4120fc..445bb378 100644 --- a/imports/construction/ca_physics_parameters.py +++ b/imports/construction/ca_physics_parameters.py @@ -1,7 +1,8 @@ """ CaPhysicsParameters import the construction and material information for Canada SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys from imports.construction.helpers.construction_helper import ConstructionHelper diff --git a/imports/construction/data_classes/building_achetype.py b/imports/construction/data_classes/building_achetype.py index fb35bad6..199cc5a4 100644 --- a/imports/construction/data_classes/building_achetype.py +++ b/imports/construction/data_classes/building_achetype.py @@ -1,7 +1,8 @@ """ BuildingArchetype stores construction information by building archetypes SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List from imports.construction.data_classes.thermal_boundary_archetype import ThermalBoundaryArchetype diff --git a/imports/construction/data_classes/layer_archetype.py b/imports/construction/data_classes/layer_archetype.py index adad7439..ece0efc5 100644 --- a/imports/construction/data_classes/layer_archetype.py +++ b/imports/construction/data_classes/layer_archetype.py @@ -1,7 +1,8 @@ """ LayerArchetype stores layer and materials information, complementing the BuildingArchetype class SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ diff --git a/imports/construction/data_classes/thermal_boundary_archetype.py b/imports/construction/data_classes/thermal_boundary_archetype.py index 11aecf44..36ed66bd 100644 --- a/imports/construction/data_classes/thermal_boundary_archetype.py +++ b/imports/construction/data_classes/thermal_boundary_archetype.py @@ -1,7 +1,8 @@ """ ThermalBoundaryArchetype stores thermal boundaries information, complementing the BuildingArchetype class SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List diff --git a/imports/construction/data_classes/thermal_opening_archetype.py b/imports/construction/data_classes/thermal_opening_archetype.py index fc729769..bfa7a026 100644 --- a/imports/construction/data_classes/thermal_opening_archetype.py +++ b/imports/construction/data_classes/thermal_opening_archetype.py @@ -1,7 +1,8 @@ """ ThermalOpeningArchetype stores thermal openings information, complementing the BuildingArchetype class SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ diff --git a/imports/construction/helpers/construction_helper.py b/imports/construction/helpers/construction_helper.py index ba93d614..c81180ed 100644 --- a/imports/construction/helpers/construction_helper.py +++ b/imports/construction/helpers/construction_helper.py @@ -1,7 +1,8 @@ """ Construction helper SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys from helpers import constants as cte diff --git a/imports/construction/helpers/storeys_generation.py b/imports/construction/helpers/storeys_generation.py index da0b4dcc..51d6e416 100644 --- a/imports/construction/helpers/storeys_generation.py +++ b/imports/construction/helpers/storeys_generation.py @@ -1,7 +1,8 @@ """ Storeys generation helper SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys import math @@ -20,8 +21,9 @@ class StoreysGeneration: """ StoreysGeneration """ - def __init__(self, building, divide_in_storeys=False): + def __init__(self, building, internal_zone, divide_in_storeys=False): self._building = building + self._internal_zone = internal_zone self._thermal_zones = [] self._divide_in_storeys = divide_in_storeys self._floor_area = 0 @@ -39,7 +41,8 @@ class StoreysGeneration: self._building.storeys_above_ground) number_of_storeys = 1 if not self._divide_in_storeys or number_of_storeys == 1: - storey = Storey('storey_0', self._building.surfaces, [None, None], self._building.volume, self._floor_area) + storey = Storey('storey_0', self._building.surfaces, [None, None], self._internal_zone.volume, + self._internal_zone, self._floor_area) for thermal_boundary in storey.thermal_boundaries: if thermal_boundary.type != cte.INTERIOR_WALL or thermal_boundary.type != cte.INTERIOR_SLAB: # external thermal boundary -> only one thermal zone @@ -98,13 +101,13 @@ class StoreysGeneration: surfaces_child.append(ceiling) volume = ceiling.area_above_ground * height total_volume += volume - storeys.append(Storey(name, surfaces_child, neighbours, volume, self._floor_area)) + storeys.append(Storey(name, surfaces_child, neighbours, volume, self._internal_zone, self._floor_area)) name = 'storey_' + str(number_of_storeys - 1) neighbours = ['storey_' + str(number_of_storeys - 2), None] volume = self._building.volume - total_volume if volume < 0: raise Exception('Error in storeys creation, volume of last storey cannot be lower that 0') - storeys.append(Storey(name, surfaces_child_last_storey, neighbours, volume, self._floor_area)) + storeys.append(Storey(name, surfaces_child_last_storey, neighbours, volume, self._internal_zone, self._floor_area)) for storey in storeys: for thermal_boundary in storey.thermal_boundaries: diff --git a/imports/construction/nrel_physics_interface.py b/imports/construction/nrel_physics_interface.py index 1c23b106..4a0f9c8c 100644 --- a/imports/construction/nrel_physics_interface.py +++ b/imports/construction/nrel_physics_interface.py @@ -2,7 +2,8 @@ Nrel-based interface, it reads format defined within the CERC team based on NREL structure and enriches the city with archetypes and materials SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import xmltodict @@ -137,7 +138,8 @@ class NrelPhysicsInterface: if units != 'W/m2 K': raise Exception(f'overall U-value units = {units}, expected W/m2 K') g_value = w_lib['g_value'] - thermal_opening = ntoa(frame_ratio=frame_ratio, g_value=g_value, overall_u_value=overall_u_value) + thermal_opening = ntoa(frame_ratio=frame_ratio, g_value=g_value, overall_u_value=overall_u_value, + construction_name=window_construction_name) if 'outside_thermal_absorptance' in c_lib: outside_solar_absorptance = c_lib['outside_solar_absorptance']['#text'] @@ -236,5 +238,5 @@ class NrelPhysicsInterface: def _create_storeys(building, archetype): building.average_storey_height = archetype.average_storey_height building.storeys_above_ground = archetype.storeys_above_ground - thermal_zones = StoreysGeneration(building).thermal_zones + thermal_zones = StoreysGeneration(building, building.internal_zones[0]).thermal_zones building.internal_zones[0].thermal_zones = thermal_zones diff --git a/imports/construction/us_physics_parameters.py b/imports/construction/us_physics_parameters.py index 9673d921..0828e41b 100644 --- a/imports/construction/us_physics_parameters.py +++ b/imports/construction/us_physics_parameters.py @@ -1,8 +1,9 @@ """ UsPhysicsParameters import the construction and material information for US SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys diff --git a/imports/construction_factory.py b/imports/construction_factory.py index e65d5552..3298bf51 100644 --- a/imports/construction_factory.py +++ b/imports/construction_factory.py @@ -1,7 +1,8 @@ """ ConstructionFactory (before PhysicsFactory) retrieve the specific construction module for the given region SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from pathlib import Path from imports.construction.us_physics_parameters import UsPhysicsParameters diff --git a/imports/customized_imports/helpers/sanam_customized_usage_helper.py b/imports/customized_imports/helpers/sanam_customized_usage_helper.py index 7bf73f65..a2de6577 100644 --- a/imports/customized_imports/helpers/sanam_customized_usage_helper.py +++ b/imports/customized_imports/helpers/sanam_customized_usage_helper.py @@ -1,7 +1,8 @@ """ Sanam's customized importer Usage helper SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys import helpers.constants as cte diff --git a/imports/customized_imports/sanam_customized_usage_parameters.py b/imports/customized_imports/sanam_customized_usage_parameters.py index ea3cac62..ffe401b6 100644 --- a/imports/customized_imports/sanam_customized_usage_parameters.py +++ b/imports/customized_imports/sanam_customized_usage_parameters.py @@ -1,7 +1,8 @@ """ SanamCustomizedUsageParameters add two parameters to usage properties from ASHRAE SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys @@ -72,8 +73,8 @@ class SanamCustomizedUsageParameters: _occupancy = Occupancy() usage_zone.occupancy = _occupancy usage_zone.occupancy.occupancy_density = archetype.occupancy.occupancy_density - archetype_mechanical_air_change = float(archetype.mechanical_air_change) * \ - float(usage_zone.occupancy.occupancy_density) * cte.METERS_TO_FEET ** 2 \ + archetype_mechanical_air_change = float(archetype.mechanical_air_change) \ + * float(archetype.occupancy.occupancy_density) \ * cte.HOUR_TO_MINUTES / cte.METERS_TO_FEET ** 3 / volume_per_area usage_zone.mechanical_air_change = archetype_mechanical_air_change diff --git a/imports/customized_imports_factory.py b/imports/customized_imports_factory.py index 0a072f89..24b55ec3 100644 --- a/imports/customized_imports_factory.py +++ b/imports/customized_imports_factory.py @@ -2,7 +2,8 @@ CustomizedImportsFactory is used to import any information using user customized formats This factory can only be called after calling the construction factory. SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path diff --git a/imports/energy_systems/air_source_hp_parameters.py b/imports/energy_systems/air_source_hp_parameters.py index 664207c2..decb6617 100644 --- a/imports/energy_systems/air_source_hp_parameters.py +++ b/imports/energy_systems/air_source_hp_parameters.py @@ -1,8 +1,8 @@ """ AirSourceHeatPumpParameters import the heat pump information SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Peter Yefi peteryefi@gmail.com -Contributor Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.comCode contributor Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import pandas as pd diff --git a/imports/energy_systems/water_to_water_hp_parameters.py b/imports/energy_systems/water_to_water_hp_parameters.py index 346c5e3f..8df8563f 100644 --- a/imports/energy_systems/water_to_water_hp_parameters.py +++ b/imports/energy_systems/water_to_water_hp_parameters.py @@ -1,7 +1,8 @@ """ WaterToWaterHPParameters import the heat pump information SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.com """ import pandas as pd diff --git a/imports/energy_systems_factory.py b/imports/energy_systems_factory.py index 466ff936..98cb000d 100644 --- a/imports/energy_systems_factory.py +++ b/imports/energy_systems_factory.py @@ -1,8 +1,9 @@ """ EnergySystemsFactory retrieve the energy system module for the given region SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete pilar.monsalvete@concordi.ca -Contributor Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete pilar.monsalvete@concordi. +Code contributors: Peter Yefi peteryefi@gmail.com """ from pathlib import Path from imports.energy_systems.air_source_hp_parameters import AirSourceHeatPumpParameters diff --git a/imports/geometry/citygml.py b/imports/geometry/citygml.py index 09803d55..403f7db5 100644 --- a/imports/geometry/citygml.py +++ b/imports/geometry/citygml.py @@ -1,7 +1,8 @@ """ CityGml module parses citygml_classes files and import the geometry into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import numpy as np import xmltodict diff --git a/imports/geometry/citygml_classes/citygml_base.py b/imports/geometry/citygml_classes/citygml_base.py index 18bc6214..38fe3f36 100644 --- a/imports/geometry/citygml_classes/citygml_base.py +++ b/imports/geometry/citygml_classes/citygml_base.py @@ -1,7 +1,8 @@ """ CityGmlBase module abstract class to template the different level of details SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from abc import ABC diff --git a/imports/geometry/citygml_classes/citygml_lod1.py b/imports/geometry/citygml_classes/citygml_lod1.py index 7c7e93ce..5c16e444 100644 --- a/imports/geometry/citygml_classes/citygml_lod1.py +++ b/imports/geometry/citygml_classes/citygml_lod1.py @@ -2,7 +2,8 @@ CityGmlLod1 module parses citygml_classes files with level of detail 1 and import the geometry into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from imports.geometry.citygml_classes.citygml_base import CityGmlBase diff --git a/imports/geometry/citygml_classes/citygml_lod2.py b/imports/geometry/citygml_classes/citygml_lod2.py index 40181e8a..f2281568 100644 --- a/imports/geometry/citygml_classes/citygml_lod2.py +++ b/imports/geometry/citygml_classes/citygml_lod2.py @@ -2,7 +2,8 @@ CityGmlLod1 module parses citygml_classes files with level of detail 1 and import the geometry into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from imports.geometry.citygml_classes.citygml_base import CityGmlBase diff --git a/imports/geometry/helpers/geometry_helper.py b/imports/geometry/helpers/geometry_helper.py index 7307673a..17504da5 100644 --- a/imports/geometry/helpers/geometry_helper.py +++ b/imports/geometry/helpers/geometry_helper.py @@ -1,7 +1,8 @@ """ Geometry helper SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import helpers.constants as cte diff --git a/imports/geometry/obj.py b/imports/geometry/obj.py index 3ce1fae3..68460d4c 100644 --- a/imports/geometry/obj.py +++ b/imports/geometry/obj.py @@ -1,7 +1,8 @@ """ Obj module parses obj files and import the geometry into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import trimesh.exchange.load from trimesh import Scene diff --git a/imports/geometry/osm_subway.py b/imports/geometry/osm_subway.py index dc85facf..c007839a 100644 --- a/imports/geometry/osm_subway.py +++ b/imports/geometry/osm_subway.py @@ -1,7 +1,8 @@ """ OsmSubway module parses osm files and import the metro location into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import sys diff --git a/imports/geometry/rhino.py b/imports/geometry/rhino.py index 1d0b63c0..bdee4a41 100644 --- a/imports/geometry/rhino.py +++ b/imports/geometry/rhino.py @@ -1,7 +1,8 @@ """ Rhino module parses rhino files and import the geometry into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from numpy import inf from rhino3dm import * diff --git a/imports/geometry_factory.py b/imports/geometry_factory.py index b594da08..7254e8af 100644 --- a/imports/geometry_factory.py +++ b/imports/geometry_factory.py @@ -1,7 +1,8 @@ """ GeometryFactory retrieve the specific geometric module to load the given format SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from city_model_structure.city import City diff --git a/imports/life_cycle_assessment/lca_fuel.py b/imports/life_cycle_assessment/lca_fuel.py index bc515a91..7089918a 100644 --- a/imports/life_cycle_assessment/lca_fuel.py +++ b/imports/life_cycle_assessment/lca_fuel.py @@ -1,8 +1,8 @@ """ CityGml module parses citygml_classes files and import the geometry into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ import xmltodict from pathlib import Path diff --git a/imports/life_cycle_assessment/lca_machine.py b/imports/life_cycle_assessment/lca_machine.py index 87c35c5c..01eed943 100644 --- a/imports/life_cycle_assessment/lca_machine.py +++ b/imports/life_cycle_assessment/lca_machine.py @@ -1,8 +1,8 @@ """ CityGml module parses citygml_classes files and import the geometry into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ import xmltodict from pathlib import Path diff --git a/imports/life_cycle_assessment/lca_material.py b/imports/life_cycle_assessment/lca_material.py index 88253871..7ac4b4ee 100644 --- a/imports/life_cycle_assessment/lca_material.py +++ b/imports/life_cycle_assessment/lca_material.py @@ -1,8 +1,8 @@ """ CityGml module parses citygml_classes files and import the geometry into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ import xmltodict from pathlib import Path diff --git a/imports/life_cycle_assessment/lca_vehicle.py b/imports/life_cycle_assessment/lca_vehicle.py index 2125be95..60778ff2 100644 --- a/imports/life_cycle_assessment/lca_vehicle.py +++ b/imports/life_cycle_assessment/lca_vehicle.py @@ -1,8 +1,8 @@ """ CityGml module parses citygml_classes files and import the geometry into the city model structure SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ import xmltodict from pathlib import Path diff --git a/imports/life_cycle_assessment_factory.py b/imports/life_cycle_assessment_factory.py index f779bee5..b2cd172c 100644 --- a/imports/life_cycle_assessment_factory.py +++ b/imports/life_cycle_assessment_factory.py @@ -1,8 +1,8 @@ """ ConstructionFactory (before PhysicsFactory) retrieve the specific construction module for the given region SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ from pathlib import Path diff --git a/imports/schedules/comnet_schedules_parameters.py b/imports/schedules/comnet_schedules_parameters.py index 2eaac773..7897d274 100644 --- a/imports/schedules/comnet_schedules_parameters.py +++ b/imports/schedules/comnet_schedules_parameters.py @@ -1,8 +1,9 @@ """ Schedules retrieve the specific usage schedules module for the given standard SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import pandas as pd from imports.schedules.helpers.schedules_helper import SchedulesHelper diff --git a/imports/schedules/doe_idf.py b/imports/schedules/doe_idf.py index 61390199..eeb72168 100644 --- a/imports/schedules/doe_idf.py +++ b/imports/schedules/doe_idf.py @@ -1,8 +1,9 @@ """ Building test SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Guille Gutierrez Morote Guillermo.GutierrezMorote@concordia.ca -Contributor Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez Morote Guillermo.GutierrezMorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import pandas as pd @@ -12,6 +13,7 @@ from imports.schedules.helpers.schedules_helper import SchedulesHelper from city_model_structure.attributes.schedule import Schedule from city_model_structure.building_demand.occupancy import Occupancy from city_model_structure.building_demand.lighting import Lighting +from city_model_structure.building_demand.thermal_control import ThermalControl import helpers.constants as cte @@ -141,3 +143,7 @@ class DoeIdf: if usage_zone.lighting is None: usage_zone.lighting = Lighting() usage_zone.lighting.schedules = [schedule] + elif schedule.type == cte.HVAC_AVAILABILITY: + if usage_zone.thermal_control is None: + usage_zone.thermal_control = ThermalControl() + usage_zone.thermal_control.hvac_availability_schedules = [schedule] diff --git a/imports/schedules/helpers/schedules_helper.py b/imports/schedules/helpers/schedules_helper.py index 4d4881a5..0cdc3d3a 100644 --- a/imports/schedules/helpers/schedules_helper.py +++ b/imports/schedules/helpers/schedules_helper.py @@ -1,8 +1,9 @@ """ Schedules helper SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys import helpers.constants as cte diff --git a/imports/schedules_factory.py b/imports/schedules_factory.py index 3842889a..5ce61681 100644 --- a/imports/schedules_factory.py +++ b/imports/schedules_factory.py @@ -2,7 +2,8 @@ SchedulesFactory retrieve the specific schedules module for the given standard This factory can only be called after calling the usage factory so the usage zones are created. SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from pathlib import Path diff --git a/imports/sensors/concordia_energy_consumption.py b/imports/sensors/concordia_energy_consumption.py index 4f3c7d63..2f8b5d2f 100644 --- a/imports/sensors/concordia_energy_consumption.py +++ b/imports/sensors/concordia_energy_consumption.py @@ -1,7 +1,8 @@ """ Concordia energy consumption SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import pandas as pd from imports.sensors.concordia_file_report import ConcordiaFileReport diff --git a/imports/sensors/concordia_file_report.py b/imports/sensors/concordia_file_report.py index 6f360f86..eae5554a 100644 --- a/imports/sensors/concordia_file_report.py +++ b/imports/sensors/concordia_file_report.py @@ -1,7 +1,8 @@ """ Concordia file report SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import io diff --git a/imports/sensors/concordia_gas_flow.py b/imports/sensors/concordia_gas_flow.py index e9176fc7..fcf6fc3a 100644 --- a/imports/sensors/concordia_gas_flow.py +++ b/imports/sensors/concordia_gas_flow.py @@ -1,7 +1,8 @@ """ Concordia gas flow SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import pandas as pd from imports.sensors.concordia_file_report import ConcordiaFileReport diff --git a/imports/sensors/concordia_temperature.py b/imports/sensors/concordia_temperature.py index f4b937a8..d2a3b7f4 100644 --- a/imports/sensors/concordia_temperature.py +++ b/imports/sensors/concordia_temperature.py @@ -1,7 +1,8 @@ """ Concordia temperature SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import pandas as pd from imports.sensors.concordia_file_report import ConcordiaFileReport diff --git a/imports/sensors_factory.py b/imports/sensors_factory.py index 98fbb809..f161b8fc 100644 --- a/imports/sensors_factory.py +++ b/imports/sensors_factory.py @@ -1,8 +1,9 @@ """ SensorsFactory retrieve sensors information SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path diff --git a/imports/usage/ca_usage_parameters.py b/imports/usage/ca_usage_parameters.py index b2320fa6..0866284e 100644 --- a/imports/usage/ca_usage_parameters.py +++ b/imports/usage/ca_usage_parameters.py @@ -1,7 +1,8 @@ """ CaUsageParameters model the usage properties SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys @@ -64,7 +65,7 @@ class CaUsageParameters(HftUsageInterface): usage_zone.hours_day = archetype.hours_day usage_zone.days_year = archetype.days_year _appliances = Appliances() - _appliances.appliances_density = archetype.appliances.appliances_density + _appliances.density = archetype.appliances.density usage_zone.appliances = _appliances _control = ThermalControl() _control.mean_heating_set_point = archetype.thermal_control.mean_heating_set_point diff --git a/imports/usage/comnet_usage_parameters.py b/imports/usage/comnet_usage_parameters.py index 5d159af7..e2663479 100644 --- a/imports/usage/comnet_usage_parameters.py +++ b/imports/usage/comnet_usage_parameters.py @@ -1,7 +1,8 @@ """ ComnetUsageParameters model the usage properties SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys @@ -78,7 +79,7 @@ class ComnetUsageParameters: _lighting.latent_fraction = ch().comnet_lighting_latent _lighting.convective_fraction = ch().comnet_lighting_convective _lighting.radiative_fraction = ch().comnet_lighting_radiant - _lighting.lighting_density = data['lighting'][comnet_usage][4] + _lighting.density = data['lighting'][comnet_usage][4] # plug loads _appliances = None @@ -87,21 +88,22 @@ class ComnetUsageParameters: _appliances.latent_fraction = ch().comnet_plugs_latent _appliances.convective_fraction = ch().comnet_plugs_convective _appliances.radiative_fraction = ch().comnet_plugs_radiant - _appliances.appliances_density = data['plug loads'][comnet_usage][0] + _appliances.density = data['plug loads'][comnet_usage][0] # occupancy _occupancy = Occupancy() - _occupancy.occupancy_density = data['occupancy'][comnet_usage][0] + value = data['occupancy'][comnet_usage][0] + if value != 0: + _occupancy.occupancy_density = value + else: + _occupancy.occupancy_density = 0 _occupancy.sensible_convective_internal_gain = data['occupancy'][comnet_usage][1] \ * ch().comnet_occupancy_sensible_convective _occupancy.sensible_radiative_internal_gain = data['occupancy'][comnet_usage][1] \ * ch().comnet_occupancy_sensible_radiant _occupancy.latent_internal_gain = data['occupancy'][comnet_usage][2] - if _occupancy.occupancy_density <= 0: - _usage_zone.mechanical_air_change = 0 - else: - _usage_zone.mechanical_air_change = data['ventilation rate'][comnet_usage][0] / _occupancy.occupancy_density + _usage_zone.mechanical_air_change = data['ventilation rate'][comnet_usage][0] schedules_usage = UsageHelper.schedules_key(data['schedules_key'][comnet_usage][0]) @@ -225,21 +227,27 @@ class ComnetUsageParameters: usage_zone.mechanical_air_change = archetype.mechanical_air_change * cte.METERS_TO_FEET ** 2 \ * cte.HOUR_TO_MINUTES / cte.METERS_TO_FEET ** 3 / volume_per_area _occupancy = Occupancy() - _occupancy.occupancy_density = archetype.occupancy.occupancy_density * cte.METERS_TO_FEET**2 - _occupancy.sensible_radiative_internal_gain = archetype.occupancy.sensible_radiative_internal_gain - _occupancy.latent_internal_gain = archetype.occupancy.latent_internal_gain - _occupancy.sensible_convective_internal_gain = archetype.occupancy.sensible_convective_internal_gain + _occupancy.occupancy_density = archetype.occupancy.occupancy_density / cte.METERS_TO_FEET**2 + _occupancy.sensible_radiative_internal_gain = archetype.occupancy.sensible_radiative_internal_gain \ + * archetype.occupancy.occupancy_density / cte.METERS_TO_FEET**2 \ + * cte.BTU_H_TO_WATTS + _occupancy.latent_internal_gain = archetype.occupancy.latent_internal_gain \ + * archetype.occupancy.occupancy_density / cte.METERS_TO_FEET**2 \ + * cte.BTU_H_TO_WATTS + _occupancy.sensible_convective_internal_gain = archetype.occupancy.sensible_convective_internal_gain \ + * archetype.occupancy.occupancy_density / cte.METERS_TO_FEET**2 \ + * cte.BTU_H_TO_WATTS _occupancy.occupancy_schedules = archetype.occupancy.occupancy_schedules usage_zone.occupancy = _occupancy _lighting = Lighting() - _lighting.lighting_density = archetype.lighting.lighting_density / cte.METERS_TO_FEET**2 + _lighting.density = archetype.lighting.density / cte.METERS_TO_FEET ** 2 _lighting.convective_fraction = archetype.lighting.convective_fraction _lighting.radiative_fraction = archetype.lighting.radiative_fraction _lighting.latent_fraction = archetype.lighting.latent_fraction _lighting.schedules = archetype.lighting.schedules usage_zone.lighting = _lighting _appliances = Appliances() - _appliances.appliances_density = archetype.appliances.appliances_density / cte.METERS_TO_FEET**2 + _appliances.density = archetype.appliances.density / cte.METERS_TO_FEET ** 2 _appliances.convective_fraction = archetype.appliances.convective_fraction _appliances.radiative_fraction = archetype.appliances.radiative_fraction _appliances.latent_fraction = archetype.appliances.latent_fraction diff --git a/imports/usage/data_classes/hft_internal_gains_archetype.py b/imports/usage/data_classes/hft_internal_gains_archetype.py index cc21a77a..9a39d3f9 100644 --- a/imports/usage/data_classes/hft_internal_gains_archetype.py +++ b/imports/usage/data_classes/hft_internal_gains_archetype.py @@ -1,7 +1,8 @@ """ HftInternalGainsArchetype stores internal gains information, complementing the HftUsageZoneArchetype class SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ diff --git a/imports/usage/data_classes/usage_zone_archetype.py b/imports/usage/data_classes/usage_zone_archetype.py index 67d1f964..8ea43367 100644 --- a/imports/usage/data_classes/usage_zone_archetype.py +++ b/imports/usage/data_classes/usage_zone_archetype.py @@ -1,7 +1,8 @@ """ UsageZoneArchetype stores usage information by usage type SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from typing import List diff --git a/imports/usage/helpers/usage_helper.py b/imports/usage/helpers/usage_helper.py index 98f873da..db3b45df 100644 --- a/imports/usage/helpers/usage_helper.py +++ b/imports/usage/helpers/usage_helper.py @@ -1,7 +1,8 @@ """ Usage helper SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys import helpers.constants as cte diff --git a/imports/usage/hft_usage_interface.py b/imports/usage/hft_usage_interface.py index 959afbef..ffd4d1d7 100644 --- a/imports/usage/hft_usage_interface.py +++ b/imports/usage/hft_usage_interface.py @@ -2,7 +2,8 @@ Hft-based interface, it reads format defined within the CERC team (based on that one used in SimStadt and developed by the IAF team at hft-Stuttgart) SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import xmltodict import copy @@ -59,11 +60,16 @@ class HftUsageInterface: _schedule.time_range = cte.DAY _schedule.time_step = cte.HOUR _schedule.data_type = cte.ANY_NUMBER - _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY] + _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY, cte.SATURDAY, + cte.SUNDAY] _values = zone_usage_type['occupancy']['internGains']['load']['weekDayProfile']['values'] while ' ' in _values: _values = _values.replace(' ', ' ') - _schedule.values = _values.split() + _values = _values.split() + _values_float = [] + for _value in _values: + _values_float.append(float(_value)) + _schedule.values = _values_float _internal_gain.schedules = [_schedule] usage_zone_archetype.not_detailed_source_mean_annual_internal_gains = [_internal_gain] @@ -80,11 +86,16 @@ class HftUsageInterface: _schedule.time_range = cte.DAY _schedule.time_step = cte.HOUR _schedule.data_type = cte.TEMPERATURE - _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY] + _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY, cte.SATURDAY, + cte.SUNDAY] _values = zone_usage_type['endUses']['space_heating']['schedule']['weekDayProfile']['values'] while ' ' in _values: _values = _values.replace(' ', ' ') - _schedule.values = _values.split() + _values = _values.split() + _values_float = [] + for _value in _values: + _values_float.append(float(_value)) + _schedule.values = _values_float _thermal_control.heating_set_point_schedules = [_schedule] if 'space_cooling' in zone_usage_type['endUses']: @@ -96,11 +107,16 @@ class HftUsageInterface: _schedule.time_range = cte.DAY _schedule.time_step = cte.HOUR _schedule.data_type = cte.TEMPERATURE - _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY] + _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY, cte.SATURDAY, + cte.SUNDAY] _values = zone_usage_type['endUses']['space_cooling']['schedule']['weekDayProfile']['values'] while ' ' in _values: _values = _values.replace(' ', ' ') - _schedule.values = _values.split() + _values = _values.split() + _values_float = [] + for _value in _values: + _values_float.append(float(_value)) + _schedule.values = _values_float _thermal_control.cooling_set_point_schedules = [_schedule] usage_zone_archetype.thermal_control = _thermal_control @@ -125,7 +141,7 @@ class HftUsageInterface: if 'appliance' in zone_usage_type: _appliances = Appliances() - _appliances.appliances_density = zone_usage_type['appliance']['#text'] #todo: check units + _appliances.density = zone_usage_type['appliance']['#text'] #todo: check units usage_zone_archetype.appliances = _appliances @@ -164,11 +180,16 @@ class HftUsageInterface: _schedule.time_range = cte.DAY _schedule.time_step = cte.HOUR _schedule.data_type = cte.ANY_NUMBER - _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY] + _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY, cte.SATURDAY, + cte.SUNDAY] _values = usage_zone_variant['occupancy']['internGains']['load']['weekDayProfile']['values'] while ' ' in _values: _values = _values.replace(' ', ' ') - _schedule.values = _values.split() + _values = _values.split() + _values_float = [] + for _value in _values: + _values_float.append(float(_value)) + _schedule.values = _values_float _internal_gain.schedules = [_schedule] usage_zone_archetype.not_detailed_source_mean_annual_internal_gains = [_internal_gain] @@ -187,11 +208,16 @@ class HftUsageInterface: _schedule.time_range = cte.DAY _schedule.time_step = cte.HOUR _schedule.data_type = cte.TEMPERATURE - _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY] + _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY, cte.SATURDAY, + cte.SUNDAY] _values = usage_zone_variant['endUses']['space_heating']['schedule']['weekDayProfile']['values'] while ' ' in _values: _values = _values.replace(' ', ' ') - _schedule.values = _values.split() + _values = _values.split() + _values_float = [] + for _value in _values: + _values_float.append(float(_value)) + _schedule.values = _values_float _thermal_control.heating_set_point_schedules = [_schedule] if 'space_cooling' in usage_zone_variant['endUses'] and \ @@ -205,11 +231,16 @@ class HftUsageInterface: _schedule.time_range = cte.DAY _schedule.time_step = cte.HOUR _schedule.data_type = cte.TEMPERATURE - _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY] + _schedule.day_types = [cte.MONDAY, cte.TUESDAY, cte.WEDNESDAY, cte.THURSDAY, cte.FRIDAY, cte.SATURDAY, + cte.SUNDAY] _values = usage_zone_variant['endUses']['space_cooling']['schedule']['weekDayProfile']['values'] while ' ' in _values: _values = _values.replace(' ', ' ') - _schedule.values = _values.split() + _values = _values.split() + _values_float = [] + for _value in _values: + _values_float.append(float(_value)) + _schedule.values = _values_float _thermal_control.cooling_set_point_schedules = [_schedule] usage_zone_archetype.thermal_control = _thermal_control @@ -220,7 +251,7 @@ class HftUsageInterface: if 'appliance' in usage_zone_variant: _appliances = Appliances() - _appliances.appliances_density = usage_zone_variant['appliance']['#text'] # todo: check units + _appliances.density = usage_zone_variant['appliance']['#text'] # todo: check units usage_zone_archetype.appliances = _appliances diff --git a/imports/usage/hft_usage_parameters.py b/imports/usage/hft_usage_parameters.py index 48a7b267..c05e5658 100644 --- a/imports/usage/hft_usage_parameters.py +++ b/imports/usage/hft_usage_parameters.py @@ -1,7 +1,8 @@ """ HftUsageParameters model the usage properties SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys import copy diff --git a/imports/usage_factory.py b/imports/usage_factory.py index 165e7f45..ad446857 100644 --- a/imports/usage_factory.py +++ b/imports/usage_factory.py @@ -2,8 +2,9 @@ UsageFactory retrieve the specific usage module for the given region This factory can only be called after calling the construction factory so the thermal zones are created. SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path from imports.usage.hft_usage_parameters import HftUsageParameters diff --git a/imports/weather/dat_weather_parameters.py b/imports/weather/dat_weather_parameters.py index 3554090a..c9414d6f 100644 --- a/imports/weather/dat_weather_parameters.py +++ b/imports/weather/dat_weather_parameters.py @@ -1,7 +1,8 @@ """ DatWeatherParameters class to extract weather parameters from a defined region in .dat format SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys diff --git a/imports/weather/epw_weather_parameters.py b/imports/weather/epw_weather_parameters.py index 89d7dab0..c0db288a 100644 --- a/imports/weather/epw_weather_parameters.py +++ b/imports/weather/epw_weather_parameters.py @@ -1,7 +1,8 @@ """ EpwWeatherParameters class to extract weather parameters from a defined region in .epw format (EnergyPlus Weather) SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys diff --git a/imports/weather/helpers/weather.py b/imports/weather/helpers/weather.py index 9e6fc181..1e8799e6 100644 --- a/imports/weather/helpers/weather.py +++ b/imports/weather/helpers/weather.py @@ -1,7 +1,8 @@ """ weather helper SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import math import helpers.constants as cte diff --git a/imports/weather/xls_weather_parameters.py b/imports/weather/xls_weather_parameters.py index 93e92385..33aef0b6 100644 --- a/imports/weather/xls_weather_parameters.py +++ b/imports/weather/xls_weather_parameters.py @@ -2,7 +2,8 @@ XlsWeatherParameters class to extract weather parameters from a defined region in .xls format defined and used by the norm iso 52016-1:2017 SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ import sys diff --git a/imports/weather_factory.py b/imports/weather_factory.py index 4a650f8e..83c15cf9 100644 --- a/imports/weather_factory.py +++ b/imports/weather_factory.py @@ -1,7 +1,8 @@ """ WeatherFactory retrieve the specific weather module for the given source format SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path from imports.weather.xls_weather_parameters import XlsWeatherParameters diff --git a/requirements.txt b/requirements.txt index cce571d9..ea2ac892 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,6 @@ pandas~=1.2.3 requests~=2.25.1 esoreader~=1.2.3 geomeppy~=0.11.8 -pathlib~=1.0.1 PyWavefront~=1.3.3 xlrd~=2.0.1 openpyxl~=3.0.7 @@ -16,5 +15,4 @@ ply~=3.11 rhino3dm~=7.7.0 scipy==1.7.1 PyYAML==6.0 -yaml~=0.2.5 pyecore~=0.12.2 \ No newline at end of file diff --git a/unittests/test_construction_factory.py b/unittests/test_construction_factory.py index 9348e8d3..8eeb16ab 100644 --- a/unittests/test_construction_factory.py +++ b/unittests/test_construction_factory.py @@ -1,7 +1,8 @@ """ TestConstructionFactory test and validate the city model structure construction parameters SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path from unittest import TestCase @@ -84,9 +85,18 @@ class TestConstructionFactory(TestCase): self.assertIsNotNone(thermal_zone.volume, 'thermal_zone volume is none') self.assertIsNone(thermal_zone.ordinate_number, 'thermal_zone ordinate number is not none') self.assertIsNotNone(thermal_zone.view_factors_matrix, 'thermal_zone view factors matrix is none') - self.assertIsNone(thermal_zone.usage_zones, 'thermal_zone usage_zones is not none') - self.assertIsNone(thermal_zone.thermal_control, 'thermal_zone thermal_control is not none') self.assertIsNone(thermal_zone.hvac_system, 'thermal_zone hvac_system is not none') + self.assertIsNone(thermal_zone.usage, 'thermal_zone usage is not none') + self.assertIsNone(thermal_zone.not_detailed_source_mean_annual_internal_gains, + 'thermal_zone not detailed source internal gains is not none') + self.assertIsNone(thermal_zone.hours_day, 'thermal_zone hours a day is not none') + self.assertIsNone(thermal_zone.days_year, 'thermal_zone days a year is not none') + self.assertIsNone(thermal_zone.mechanical_air_change, 'thermal_zone mechanical air change is not none') + self.assertIsNone(thermal_zone.occupancy, 'thermal_zone occupancy is not none') + self.assertIsNone(thermal_zone.lighting, 'thermal_zone lighting is not none') + self.assertIsNone(thermal_zone.appliances, 'thermal_zone appliances is not none') + self.assertIsNone(thermal_zone.thermal_control, 'thermal_zone thermal control is not none') + self.assertIsNone(thermal_zone.get_internal_gains(), 'thermal_zone internal gains not returns none') def _check_thermal_boundaries(self, thermal_zone): for thermal_boundary in thermal_zone.thermal_boundaries: diff --git a/unittests/test_customized_imports_factory.py b/unittests/test_customized_imports_factory.py index 245a8821..127666a3 100644 --- a/unittests/test_customized_imports_factory.py +++ b/unittests/test_customized_imports_factory.py @@ -1,7 +1,8 @@ """ TestCustomizedImportsFactory tests and validates the factory to import customized data SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path from unittest import TestCase diff --git a/unittests/test_doe_idf.py b/unittests/test_doe_idf.py index c75e6372..5eeaeb41 100644 --- a/unittests/test_doe_idf.py +++ b/unittests/test_doe_idf.py @@ -1,7 +1,8 @@ """ Building test SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez Morote Guillermo.GutierrezMorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez Morote Guillermo.GutierrezMorote@concordia.ca """ from pathlib import Path from unittest import TestCase @@ -29,9 +30,11 @@ class TestBuildings(TestCase): output_path = Path('../unittests/tests_outputs/').resolve() city = GeometryFactory('citygml', city_file).city ConstructionFactory('nrel', city).enrich() - UsageFactory('ca', city).enrich() - SchedulesFactory('doe_idf', city).enrich() + UsageFactory('comnet', city).enrich() +# UsageFactory('ca', city).enrich() +# SchedulesFactory('doe_idf', city).enrich() ExportsFactory('idf', city, output_path).export() + self.assertEqual(10, len(city.buildings)) for building in city.buildings: for internal_zone in building.internal_zones: diff --git a/unittests/test_energy_systems_air_source_hp.py b/unittests/test_energy_systems_air_source_hp.py index ca9ab04e..6f4edad8 100644 --- a/unittests/test_energy_systems_air_source_hp.py +++ b/unittests/test_energy_systems_air_source_hp.py @@ -1,7 +1,8 @@ """ Test EnergySystemsFactory and various heatpump models SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.com """ import pandas as pd from unittest import TestCase diff --git a/unittests/test_energy_systems_water_to_water_hp.py b/unittests/test_energy_systems_water_to_water_hp.py index 9517476b..889f9127 100644 --- a/unittests/test_energy_systems_water_to_water_hp.py +++ b/unittests/test_energy_systems_water_to_water_hp.py @@ -1,7 +1,8 @@ """ Test EnergySystemsFactory and various heatpump models SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2021 Project Author Peter Yefi peteryefi@gmail.com +Copyright © 2022 Concordia CERC group +Project Coder Peter Yefi peteryefi@gmail.com """ from unittest import TestCase from imports.geometry_factory import GeometryFactory diff --git a/unittests/test_enrichement.py b/unittests/test_enrichement.py index 95861429..bf0af703 100644 --- a/unittests/test_enrichement.py +++ b/unittests/test_enrichement.py @@ -1,7 +1,8 @@ """ TestGeometryFactory test and validate the city model structure geometric parameters SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path from unittest import TestCase @@ -30,6 +31,16 @@ class TestGeometryFactory(TestCase): self.assertIsNotNone(self._city, 'city is none') return self._city + def _check_result(self, city): + self._check_buildings(city) + for building in city.buildings: + for internal_zone in building.internal_zones: + self.assertIsNot(len(internal_zone.usage_zones), 0, 'no building usage_zones defined') + for usage_zone in internal_zone.usage_zones: + self.assertIsNotNone(usage_zone.id, 'usage id is none') + for thermal_zone in internal_zone.thermal_zones: + self._check_thermal_zone(thermal_zone) + def _check_buildings(self, city): for building in city.buildings: self.assertIsNotNone(building.internal_zones, 'no internal zones created') @@ -42,13 +53,19 @@ class TestGeometryFactory(TestCase): self.assertIsNotNone(building.storeys_above_ground, 'building storeys_above_ground is none') self.assertTrue(building.is_conditioned, 'building is_conditioned is not conditioned') - def _check_usage_zone(self, usage_zone): - self.assertIsNotNone(usage_zone.id, 'usage id is none') - - def _check_thermal_zones(self, thermal_zone): + def _check_thermal_zone(self, thermal_zone): self.assertIsNotNone(thermal_zone.id, 'thermal_zone id is none') - self.assertIsNone(thermal_zone.usage_zones, 'thermal_zone usage_zones is not none') - self.assertIsNone(thermal_zone.thermal_control, 'thermal_zone thermal_control is not none') + self.assertIsNotNone(thermal_zone.usage, 'thermal_zone usage is not none') + self.assertIsNotNone(thermal_zone.hours_day, 'thermal_zone hours a day is none') + self.assertIsNotNone(thermal_zone.days_year, 'thermal_zone days a year is none') + self.assertIsNotNone(thermal_zone.occupancy, 'thermal_zone occupancy is none') + self.assertIsNotNone(thermal_zone.thermal_control, 'thermal_zone thermal control is none') + self.assertIsNotNone(thermal_zone.get_internal_gains(), 'thermal_zone internal gains returns none') + + def _check_extra_thermal_zone(self, thermal_zone): + self.assertIsNotNone(thermal_zone.lighting, 'thermal_zone lighting is none') + self.assertIsNotNone(thermal_zone.appliances, 'thermal_zone appliances is none') + self.assertIsNotNone(thermal_zone.mechanical_air_change, 'thermal_zone mechanical air change is none') @staticmethod def _prepare_case_usage_first(city, input_key, construction_key, usage_key): @@ -72,92 +89,69 @@ class TestGeometryFactory(TestCase): ConstructionFactory(construction_key, city).enrich() UsageFactory(usage_key, city).enrich() + def _test_hft(self, file): + _construction_keys = ['nrel', 'nrcan'] + _usage_keys = ['ca', 'comnet', 'hft'] + for construction_key in _construction_keys: + for usage_key in _usage_keys: + # construction factory called first + city = self._get_citygml(file) + self.assertTrue(len(city.buildings) > 0) + self._prepare_case_construction_first(city, 'hft', construction_key, usage_key) + self._check_result(city) + if usage_key == 'comnet': + for building in city.buildings: + for internal_zone in building.internal_zones: + for thermal_zone in internal_zone.thermal_zones: + self._check_extra_thermal_zone(thermal_zone) + # usage factory called first + city = self._get_citygml(file) + self.assertTrue(len(city.buildings) > 0) + self._prepare_case_usage_first(city, 'hft', construction_key, usage_key) + self._check_result(city) + if usage_key == 'comnet': + for building in city.buildings: + for internal_zone in building.internal_zones: + for thermal_zone in internal_zone.thermal_zones: + self._check_extra_thermal_zone(thermal_zone) + + def _test_pluto(self, file): + _construction_keys = ['nrel'] + _usage_keys = ['comnet', 'hft'] + for construction_key in _construction_keys: + for usage_key in _usage_keys: + # construction factory called first + city = self._get_citygml(file) + self.assertTrue(len(city.buildings) > 0) + self._prepare_case_construction_first(city, 'pluto', construction_key, usage_key) + self._check_result(city) + if usage_key == 'comnet': + for building in city.buildings: + for internal_zone in building.internal_zones: + for thermal_zone in internal_zone.thermal_zones: + self._check_extra_thermal_zone(thermal_zone) + # usage factory called first + city = self._get_citygml(file) + self.assertTrue(len(city.buildings) > 0) + self._prepare_case_usage_first(city, 'pluto', construction_key, usage_key) + self._check_result(city) + if usage_key == 'comnet': + for building in city.buildings: + for internal_zone in building.internal_zones: + for thermal_zone in internal_zone.thermal_zones: + self._check_extra_thermal_zone(thermal_zone) + def test_enrichment(self): """ Test enrichment of the city with different order and all possible combinations :return: None """ file_1 = 'one_building_in_kelowna.gml' + print('file 1') + self._test_hft(file_1) file_2 = 'pluto_building.gml' + print('file 2') + self._test_pluto(file_2) file_3 = 'C40_Final.gml' - _construction_keys = ['nrel', 'nrcan'] - _usage_keys = ['ca', 'comnet'] # todo: add 'hft' - - for construction_key in _construction_keys: - for usage_key in _usage_keys: - city = self._get_citygml(file_1) - self.assertTrue(len(city.buildings) == 1) - self._prepare_case_construction_first(city, 'hft', construction_key, usage_key) - self._check_buildings(city) - for building in city.buildings: - for internal_zone in building.internal_zones: - self.assertIsNot(len(internal_zone.usage_zones), 0, 'no building usage_zones defined') - for usage_zone in internal_zone.usage_zones: - self._check_usage_zone(usage_zone) - for thermal_zone in internal_zone.thermal_zones: - self._check_thermal_zones(thermal_zone) - - for construction_key in _construction_keys: - for usage_key in _usage_keys: - city = self._get_citygml(file_1) - self.assertTrue(len(city.buildings) == 1) - self._prepare_case_usage_first(city, 'hft', construction_key, usage_key) - self._check_buildings(city) - for building in city.buildings: - for internal_zone in building.internal_zones: - self.assertIsNot(len(internal_zone.usage_zones), 0, 'no building usage_zones defined') - for usage_zone in internal_zone.usage_zones: - self._check_usage_zone(usage_zone) - for thermal_zone in internal_zone.thermal_zones: - self._check_thermal_zones(thermal_zone) - - for construction_key in _construction_keys: - if construction_key != 'nrcan': - for usage_key in _usage_keys: - if usage_key != 'ca': - city = self._get_citygml(file_2) - self.assertTrue(len(city.buildings) == 1) - self._prepare_case_construction_first(city, 'pluto', construction_key, usage_key) - self._check_buildings(city) - for building in city.buildings: - for internal_zone in building.internal_zones: - self.assertIsNot(len(internal_zone.usage_zones), 0, 'no building usage_zones defined') - for usage_zone in internal_zone.usage_zones: - self._check_usage_zone(usage_zone) - for thermal_zone in internal_zone.thermal_zones: - self._check_thermal_zones(thermal_zone) - - for construction_key in _construction_keys: - if construction_key != 'nrcan': - for usage_key in _usage_keys: - if usage_key != 'ca': - city = self._get_citygml(file_2) - self.assertTrue(len(city.buildings) == 1) - self._prepare_case_usage_first(city, 'pluto', construction_key, usage_key) - self._check_buildings(city) - for building in city.buildings: - for internal_zone in building.internal_zones: - self.assertIsNot(len(internal_zone.usage_zones), 0, 'no building usage_zones defined') - for usage_zone in internal_zone.usage_zones: - self._check_usage_zone(usage_zone) - for thermal_zone in internal_zone.thermal_zones: - self._check_thermal_zones(thermal_zone) - - city = self._get_citygml(file_3) - self.assertTrue(len(city.buildings) == 10) - - for construction_key in _construction_keys: - if construction_key != 'nrcan': - for usage_key in _usage_keys: - if usage_key != 'ca': - city = self._get_citygml(file_2) - self.assertTrue(len(city.buildings) == 1) - self._prepare_case_construction_first(city, 'pluto', construction_key, usage_key) - self._check_buildings(city) - for building in city.buildings: - for internal_zone in building.internal_zones: - self.assertIsNot(len(internal_zone.usage_zones), 0, 'no building usage_zones defined') - for usage_zone in internal_zone.usage_zones: - self._check_usage_zone(usage_zone) - for thermal_zone in internal_zone.thermal_zones: - self._check_thermal_zones(thermal_zone) + print('file 3') + self._test_hft(file_3) diff --git a/unittests/test_exports.py b/unittests/test_exports.py index 20900b6f..25bbf6fe 100644 --- a/unittests/test_exports.py +++ b/unittests/test_exports.py @@ -1,8 +1,9 @@ """ TestExports test and validate the city export formats SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca -Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path diff --git a/unittests/test_geometry_factory.py b/unittests/test_geometry_factory.py index d3fc1473..7686f185 100644 --- a/unittests/test_geometry_factory.py +++ b/unittests/test_geometry_factory.py @@ -1,7 +1,8 @@ """ TestGeometryFactory test and validate the city model structure geometric parameters SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path from unittest import TestCase diff --git a/unittests/test_greenery_catalog.py b/unittests/test_greenery_catalog.py index 74869808..9cf75a3d 100644 --- a/unittests/test_greenery_catalog.py +++ b/unittests/test_greenery_catalog.py @@ -1,7 +1,8 @@ """ TestGeometryFactory test and validate the city model structure geometric parameters SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from unittest import TestCase diff --git a/unittests/test_life_cycle_assessment_factory.py b/unittests/test_life_cycle_assessment_factory.py index f7134f20..2c5de645 100644 --- a/unittests/test_life_cycle_assessment_factory.py +++ b/unittests/test_life_cycle_assessment_factory.py @@ -1,8 +1,8 @@ """ Building test SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Atiya atiya.atiya@mail.concordia.ca -Contributor Mohammad Reza mohammad.seyedabadi@mail.concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Atiya atiya.atiya@mail.concordia.ca """ from pathlib import Path from unittest import TestCase diff --git a/unittests/test_schedules_factory.py b/unittests/test_schedules_factory.py index f59f3cf6..1f9dbc02 100644 --- a/unittests/test_schedules_factory.py +++ b/unittests/test_schedules_factory.py @@ -1,7 +1,8 @@ """ TestSchedulesFactory test and validate the city model structure schedules SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path from unittest import TestCase diff --git a/unittests/test_usage_factory.py b/unittests/test_usage_factory.py index 2bcb6ceb..93408819 100644 --- a/unittests/test_usage_factory.py +++ b/unittests/test_usage_factory.py @@ -1,7 +1,8 @@ """ TestUsageFactory test and validate the city model structure usage parameters SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Copyright © 2022 Concordia CERC group +Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from pathlib import Path from unittest import TestCase @@ -9,7 +10,6 @@ from unittest import TestCase from imports.geometry_factory import GeometryFactory from imports.usage_factory import UsageFactory from imports.geometry.helpers.geometry_helper import GeometryHelper -from imports.construction_factory import ConstructionFactory class TestUsageFactory(TestCase): @@ -72,7 +72,6 @@ class TestUsageFactory(TestCase): def _check_usage_zone(self, usage_zone): self.assertIsNotNone(usage_zone.usage, 'usage is none') self.assertIsNotNone(usage_zone.percentage, 'usage percentage is none') - self.assertIsNotNone(usage_zone.internal_gains, 'internal gains is none') self.assertIsNotNone(usage_zone.hours_day, 'hours per day is none') self.assertIsNotNone(usage_zone.days_year, 'days per year is none') self.assertIsNotNone(usage_zone.thermal_control, 'thermal control is none') @@ -113,14 +112,14 @@ class TestUsageFactory(TestCase): self.assertIsNone(occupancy.occupants, 'occupancy density is not none') self.assertIsNotNone(usage_zone.lighting, 'lighting is none') lighting = usage_zone.lighting - self.assertIsNotNone(lighting.lighting_density, 'lighting density is none') + self.assertIsNotNone(lighting.density, 'lighting density is none') self.assertIsNotNone(lighting.latent_fraction, 'lighting latent fraction is none') self.assertIsNotNone(lighting.convective_fraction, 'lighting convective fraction is none') self.assertIsNotNone(lighting.radiative_fraction, 'lighting radiant fraction is none') self.assertIsNotNone(lighting.schedules, 'lighting schedule is none') self.assertIsNotNone(usage_zone.appliances, 'appliances is none') appliances = usage_zone.appliances - self.assertIsNotNone(appliances.appliances_density, 'appliances density is none') + self.assertIsNotNone(appliances.density, 'appliances density is none') self.assertIsNotNone(appliances.latent_fraction, 'appliances latent fraction is none') self.assertIsNotNone(appliances.convective_fraction, 'appliances convective fraction is none') self.assertIsNotNone(appliances.radiative_fraction, 'appliances radiant fraction is none') @@ -178,4 +177,3 @@ class TestUsageFactory(TestCase): self.assertIsNone(occupancy.occupants, 'occupancy density is not none') self.assertIsNone(usage_zone.lighting, 'lighting is not none') self.assertIsNone(usage_zone.appliances, 'appliances is not none') -