This commit is contained in:
Peter Yefi 2022-04-08 11:51:58 -04:00
commit 6d38d2258f
171 changed files with 1680 additions and 723 deletions

View File

@ -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
"""

View File

@ -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

View File

@ -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:

View File

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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):

View File

@ -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:

View File

@ -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):

View File

@ -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}]')

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
"""

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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
"""

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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]:
"""

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
"""

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
"""

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More