Compare commits

..

No commits in common. "create_retrofit" and "main" have entirely different histories.

23 changed files with 8 additions and 78061 deletions

5
.gitignore vendored
View File

@ -11,7 +11,4 @@
**/.idea/
cerc_hub.egg-info
/out_files
/CitRetrofitEnv
/cityretrofit_env
/.eggs
/input_files

View File

@ -6,11 +6,9 @@ Output formats accepted:
* Function:
* nrel
* nrcan
* cerc
* eilat
* Usage:
* nrcan
* cerc
* comnet
* eilat

View File

@ -1,238 +0,0 @@
"""
Cerc construction catalog (Copy of Nrcan catalog)
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
import json
from pathlib import Path
from hub.catalog_factories.catalog import Catalog
from hub.catalog_factories.data_models.construction.content import Content
from hub.catalog_factories.construction.construction_helper import ConstructionHelper
from hub.catalog_factories.data_models.construction.construction import Construction
from hub.catalog_factories.data_models.construction.archetype import Archetype
from hub.catalog_factories.data_models.construction.window import Window
from hub.catalog_factories.data_models.construction.material import Material
from hub.catalog_factories.data_models.construction.layer import Layer
import hub.helpers.constants as cte
class CercCatalog(Catalog):
"""
Cerc catalog class copy of Cerc catalog (Copy of Nrcan catalog)
"""
def __init__(self, path):
_path_archetypes = Path(path / 'cerc_archetypes.json').resolve()
_path_constructions = (path / 'cerc_constructions.json').resolve()
with open(_path_archetypes, 'r', encoding='utf-8') as file:
self._archetypes = json.load(file)
with open(_path_constructions, 'r', encoding='utf-8') as file:
self._constructions = json.load(file)
self._catalog_windows = self._load_windows()
self._catalog_materials = self._load_materials()
self._catalog_constructions = self._load_constructions()
self._catalog_archetypes = self._load_archetypes()
# store the full catalog data model in self._content
self._content = Content(self._catalog_archetypes,
self._catalog_constructions,
self._catalog_materials,
self._catalog_windows)
def _load_windows(self):
_catalog_windows = []
windows = self._constructions['transparent_surfaces']
for window in windows:
name = list(window.keys())[0]
window_id = name
g_value = window[name]['shgc']
window_type = window[name]['type']
frame_ratio = window[name]['frame_ratio']
overall_u_value = window[name]['u_value']
_catalog_windows.append(Window(window_id, frame_ratio, g_value, overall_u_value, name, window_type))
return _catalog_windows
def _load_materials(self):
_catalog_materials = []
materials = self._constructions['materials']
for material in materials:
name = list(material.keys())[0]
material_id = name
no_mass = material[name]['no_mass']
thermal_resistance = None
conductivity = None
density = None
specific_heat = None
solar_absorptance = None
thermal_absorptance = None
visible_absorptance = None
if no_mass:
thermal_resistance = material[name]['thermal_resistance']
else:
solar_absorptance = material[name]['solar_absorptance']
thermal_absorptance = str(1 - float(material[name]['thermal_emittance']))
visible_absorptance = material[name]['visible_absorptance']
conductivity = material[name]['conductivity']
density = material[name]['density']
specific_heat = material[name]['specific_heat']
_material = Material(material_id,
name,
solar_absorptance,
thermal_absorptance,
visible_absorptance,
no_mass,
thermal_resistance,
conductivity,
density,
specific_heat)
_catalog_materials.append(_material)
return _catalog_materials
def _load_constructions(self):
_catalog_constructions = []
constructions = self._constructions['opaque_surfaces']
for construction in constructions:
name = list(construction.keys())[0]
construction_id = name
construction_type = ConstructionHelper().nrcan_surfaces_types_to_hub_types[construction[name]['type']]
layers = []
for layer in construction[name]['layers']:
layer_id = layer
layer_name = layer
material_id = layer
thickness = construction[name]['layers'][layer]
for material in self._catalog_materials:
if str(material_id) == str(material.id):
layers.append(Layer(layer_id, layer_name, material, thickness))
break
_catalog_constructions.append(Construction(construction_id, construction_type, name, layers))
return _catalog_constructions
def _load_archetypes(self):
_catalog_archetypes = []
archetypes = self._archetypes['archetypes']
for archetype in archetypes:
archetype_id = f'{archetype["function"]}_{archetype["period_of_construction"]}_{archetype["climate_zone"]}'
function = archetype['function']
name = archetype_id
climate_zone = archetype['climate_zone']
construction_period = archetype['period_of_construction']
average_storey_height = archetype['average_storey_height']
thermal_capacity = float(archetype['thermal_capacity']) * 1000
extra_loses_due_to_thermal_bridges = archetype['extra_loses_due_thermal_bridges']
infiltration_rate_for_ventilation_system_off = (
archetype['infiltration_rate_for_ventilation_system_off'] / cte.HOUR_TO_SECONDS
)
infiltration_rate_for_ventilation_system_on = (
archetype['infiltration_rate_for_ventilation_system_on'] / cte.HOUR_TO_SECONDS
)
archetype_constructions = []
for archetype_construction in archetype['constructions']:
archetype_construction_type = ConstructionHelper().nrcan_surfaces_types_to_hub_types[archetype_construction]
archetype_construction_name = archetype['constructions'][archetype_construction]['opaque_surface_name']
for construction in self._catalog_constructions:
if archetype_construction_type == construction.type and construction.name == archetype_construction_name:
_construction = None
_window = None
_window_ratio = None
if 'transparent_surface_name' in archetype['constructions'][archetype_construction].keys():
_window_ratio = archetype['constructions'][archetype_construction]['transparent_ratio']
_window_id = archetype['constructions'][archetype_construction]['transparent_surface_name']
for window in self._catalog_windows:
if _window_id == window.id:
_window = window
break
_construction = Construction(construction.id,
construction.type,
construction.name,
construction.layers,
_window_ratio,
_window)
archetype_constructions.append(_construction)
break
_catalog_archetypes.append(Archetype(archetype_id,
name,
function,
climate_zone,
construction_period,
archetype_constructions,
average_storey_height,
thermal_capacity,
extra_loses_due_to_thermal_bridges,
None,
infiltration_rate_for_ventilation_system_off,
infiltration_rate_for_ventilation_system_on))
return _catalog_archetypes
def names(self, category=None):
"""
Get the catalog elements names
:parm: optional category filter
"""
if category is None:
_names = {'archetypes': [], 'constructions': [], 'materials': [], 'windows': []}
for archetype in self._content.archetypes:
_names['archetypes'].append(archetype.name)
for construction in self._content.constructions:
_names['constructions'].append(construction.name)
for material in self._content.materials:
_names['materials'].append(material.name)
for window in self._content.windows:
_names['windows'].append(window.name)
else:
_names = {category: []}
if category.lower() == 'archetypes':
for archetype in self._content.archetypes:
_names[category].append(archetype.name)
elif category.lower() == 'constructions':
for construction in self._content.constructions:
_names[category].append(construction.name)
elif category.lower() == 'materials':
for material in self._content.materials:
_names[category].append(material.name)
elif category.lower() == 'windows':
for window in self._content.windows:
_names[category].append(window.name)
else:
raise ValueError(f'Unknown category [{category}]')
return _names
def entries(self, category=None):
"""
Get the catalog elements
:parm: optional category filter
"""
if category is None:
return self._content
if category.lower() == 'archetypes':
return self._content.archetypes
if category.lower() == 'constructions':
return self._content.constructions
if category.lower() == 'materials':
return self._content.materials
if category.lower() == 'windows':
return self._content.windows
raise ValueError(f'Unknown category [{category}]')
def get_entry(self, name):
"""
Get one catalog element by names
:parm: entry name
"""
for entry in self._content.archetypes:
if entry.name.lower() == name.lower():
return entry
for entry in self._content.constructions:
if entry.name.lower() == name.lower():
return entry
for entry in self._content.materials:
if entry.name.lower() == name.lower():
return entry
for entry in self._content.windows:
if entry.name.lower() == name.lower():
return entry
raise IndexError(f"{name} doesn't exists in the catalog")

View File

@ -9,8 +9,6 @@ from pathlib import Path
from typing import TypeVar
from hub.catalog_factories.construction.nrcan_catalog import NrcanCatalog
from hub.catalog_factories.construction.cerc_catalog import CercCatalog
from hub.catalog_factories.construction.nrel_catalog import NrelCatalog
from hub.catalog_factories.construction.eilat_catalog import EilatCatalog
from hub.helpers.utils import validate_import_export_type
@ -42,13 +40,6 @@ class ConstructionCatalogFactory:
Retrieve NRCAN catalog
"""
return NrcanCatalog(self._path)
@property
def _cerc(self):
"""
Retrieve CERC catalog
"""
return CercCatalog(self._path)
@property
def _eilat(self):

View File

@ -1,220 +0,0 @@
"""
NRCAN usage catalog
SPDX - License - Identifier: LGPL - 3.0 - or -later
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 json
import urllib.request
from pathlib import Path
import xmltodict
import hub.helpers.constants as cte
from hub.catalog_factories.catalog import Catalog
from hub.catalog_factories.data_models.usages.appliances import Appliances
from hub.catalog_factories.data_models.usages.content import Content
from hub.catalog_factories.data_models.usages.lighting import Lighting
from hub.catalog_factories.data_models.usages.occupancy import Occupancy
from hub.catalog_factories.data_models.usages.domestic_hot_water import DomesticHotWater
from hub.catalog_factories.data_models.usages.schedule import Schedule
from hub.catalog_factories.data_models.usages.thermal_control import ThermalControl
from hub.catalog_factories.data_models.usages.usage import Usage
from hub.catalog_factories.usage.usage_helper import UsageHelper
class CercCatalog(Catalog):
"""
Cerc catalog class (copy of NrcanCatalog)
"""
def __init__(self, path):
self._schedules_path = Path(path / 'nrcan_schedules.json').resolve()
self._space_types_path = Path(path / 'nrcan_space_types.json').resolve()
self._space_compliance_path = Path(path / 'nrcan_space_compliance_2015.json').resolve()
self._content = None
self._schedules = {}
self._load_schedules()
self._content = Content(self._load_archetypes())
@staticmethod
def _extract_schedule(raw):
nrcan_schedule_type = raw['category']
if 'Heating' in raw['name'] and 'Water' not in raw['name']:
nrcan_schedule_type = f'{nrcan_schedule_type} Heating'
elif 'Cooling' in raw['name']:
nrcan_schedule_type = f'{nrcan_schedule_type} Cooling'
if nrcan_schedule_type not in UsageHelper().nrcan_schedule_type_to_hub_schedule_type:
return None
hub_type = UsageHelper().nrcan_schedule_type_to_hub_schedule_type[nrcan_schedule_type]
data_type = UsageHelper().nrcan_data_type_to_hub_data_type[raw['units']]
time_step = UsageHelper().nrcan_time_to_hub_time[raw['type']]
# nrcan only uses daily range for the schedules
time_range = cte.DAY
day_types = UsageHelper().nrcan_day_type_to_hub_days[raw['day_types']]
return Schedule(hub_type, raw['values'], data_type, time_step, time_range, day_types)
def _load_schedules(self):
_schedule_types = []
with open(self._schedules_path, 'r') as f:
schedules_type = json.load(f)
for schedule_type in schedules_type['tables']['schedules']['table']:
schedule = CercCatalog._extract_schedule(schedule_type)
if schedule_type['name'] not in _schedule_types:
_schedule_types.append(schedule_type['name'])
if schedule is not None:
self._schedules[schedule_type['name']] = [schedule]
else:
if schedule is not None:
_schedules = self._schedules[schedule_type['name']]
_schedules.append(schedule)
self._schedules[schedule_type['name']] = _schedules
def _get_schedules(self, name):
schedule = None
if name in self._schedules:
schedule = self._schedules[name]
return schedule
def _load_archetypes(self):
usages = []
with open(self._space_types_path, 'r') as f:
space_types = json.load(f)['tables']['space_types']['table']
space_types = [st for st in space_types if st['space_type'] == 'WholeBuilding']
with open(self._space_compliance_path, 'r') as f:
space_types_compliance = json.load(f)['tables']['space_compliance']['table']
space_types_compliance = [st for st in space_types_compliance if st['space_type'] == 'WholeBuilding']
space_types_dictionary = {}
for space_type in space_types_compliance:
usage_type = space_type['building_type']
# people/m2
occupancy_density = space_type['occupancy_per_area_people_per_m2']
# W/m2
lighting_density = space_type['lighting_per_area_w_per_m2']
# W/m2
appliances_density = space_type['electric_equipment_per_area_w_per_m2']
# peak flow in gallons/h/m2
domestic_hot_water_peak_flow = (
space_type['service_water_heating_peak_flow_per_area'] *
cte.GALLONS_TO_QUBIC_METERS / cte.HOUR_TO_SECONDS
)
space_types_dictionary[usage_type] = {'occupancy_per_area': occupancy_density,
'lighting_per_area': lighting_density,
'electric_equipment_per_area': appliances_density,
'service_water_heating_peak_flow_per_area': domestic_hot_water_peak_flow
}
for space_type in space_types:
usage_type = space_type['building_type']
space_type_compliance = space_types_dictionary[usage_type]
occupancy_density = space_type_compliance['occupancy_per_area']
lighting_density = space_type_compliance['lighting_per_area']
appliances_density = space_type_compliance['electric_equipment_per_area']
domestic_hot_water_peak_flow = space_type_compliance['service_water_heating_peak_flow_per_area']
occupancy_schedule_name = space_type['occupancy_schedule']
lighting_schedule_name = space_type['lighting_schedule']
appliance_schedule_name = space_type['electric_equipment_schedule']
hvac_schedule_name = space_type['exhaust_schedule']
if 'FAN' in hvac_schedule_name:
hvac_schedule_name = hvac_schedule_name.replace('FAN', 'Fan')
heating_setpoint_schedule_name = space_type['heating_setpoint_schedule']
cooling_setpoint_schedule_name = space_type['cooling_setpoint_schedule']
domestic_hot_water_schedule_name = space_type['service_water_heating_schedule']
occupancy_schedule = self._get_schedules(occupancy_schedule_name)
lighting_schedule = self._get_schedules(lighting_schedule_name)
appliance_schedule = self._get_schedules(appliance_schedule_name)
heating_schedule = self._get_schedules(heating_setpoint_schedule_name)
cooling_schedule = self._get_schedules(cooling_setpoint_schedule_name)
hvac_availability = self._get_schedules(hvac_schedule_name)
domestic_hot_water_load_schedule = self._get_schedules(domestic_hot_water_schedule_name)
# ACH -> 1/s
mechanical_air_change = space_type['ventilation_air_changes'] / cte.HOUR_TO_SECONDS
# cfm/ft2 to m3/m2.s
ventilation_rate = space_type['ventilation_per_area'] / (cte.METERS_TO_FEET * cte.MINUTES_TO_SECONDS)
# cfm/person to m3/m2.s
ventilation_rate += space_type['ventilation_per_person'] / (
pow(cte.METERS_TO_FEET, 3) * cte.MINUTES_TO_SECONDS
) * occupancy_density
lighting_radiative_fraction = space_type['lighting_fraction_radiant']
lighting_convective_fraction = 0
if lighting_radiative_fraction is not None:
lighting_convective_fraction = 1 - lighting_radiative_fraction
lighting_latent_fraction = 0
appliances_radiative_fraction = space_type['electric_equipment_fraction_radiant']
appliances_latent_fraction = space_type['electric_equipment_fraction_latent']
appliances_convective_fraction = 0
if appliances_radiative_fraction is not None and appliances_latent_fraction is not None:
appliances_convective_fraction = 1 - appliances_radiative_fraction - appliances_latent_fraction
domestic_hot_water_service_temperature = space_type['service_water_heating_target_temperature']
occupancy = Occupancy(occupancy_density,
None,
None,
None,
occupancy_schedule)
lighting = Lighting(lighting_density,
lighting_convective_fraction,
lighting_radiative_fraction,
lighting_latent_fraction,
lighting_schedule)
appliances = Appliances(appliances_density,
appliances_convective_fraction,
appliances_radiative_fraction,
appliances_latent_fraction,
appliance_schedule)
thermal_control = ThermalControl(None,
None,
None,
hvac_availability,
heating_schedule,
cooling_schedule)
domestic_hot_water = DomesticHotWater(None,
domestic_hot_water_peak_flow,
domestic_hot_water_service_temperature,
domestic_hot_water_load_schedule)
hours_day = None
days_year = None
usages.append(Usage(usage_type,
hours_day,
days_year,
mechanical_air_change,
ventilation_rate,
occupancy,
lighting,
appliances,
thermal_control,
domestic_hot_water))
return usages
def names(self, category=None):
"""
Get the catalog elements names
:parm: for usage catalog category filter does nothing as there is only one category (usages)
"""
_names = {'usages': []}
for usage in self._content.usages:
_names['usages'].append(usage.name)
return _names
def entries(self, category=None):
"""
Get the catalog elements
:parm: for usage catalog category filter does nothing as there is only one category (usages)
"""
return self._content
def get_entry(self, name):
"""
Get one catalog element by names
:parm: entry name
"""
for usage in self._content.usages:
if usage.name.lower() == name.lower():
return usage
raise IndexError(f"{name} doesn't exists in the catalog")

View File

@ -10,7 +10,6 @@ from typing import TypeVar
from hub.catalog_factories.usage.comnet_catalog import ComnetCatalog
from hub.catalog_factories.usage.nrcan_catalog import NrcanCatalog
from hub.catalog_factories.usage.cerc_catalog import CercCatalog
from hub.catalog_factories.usage.eilat_catalog import EilatCatalog
from hub.helpers.utils import validate_import_export_type
@ -42,15 +41,7 @@ class UsageCatalogFactory:
"""
# nrcan retrieves the data directly from github
return NrcanCatalog(self._path)
@property
def _cerc(self):
"""
Retrieve cerc catalog
"""
# nrcan retrieves the data directly from github
return CercCatalog(self._path)
@property
def _eilat(self):
"""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,86 +0,0 @@
"""
Dictionaries module for hub function to nrcan construction function
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Guille Gutierrez Guillermo.GutierrezMorote@concordia.ca
"""
import hub.helpers.constants as cte
class HubFunctionToCercConstructionFunction:
"""
Hub function to cerc construction function class (copy of HubFunctionToNrcanConstructionFunction)
"""
def __init__(self):
self._dictionary = {
cte.RESIDENTIAL: 'MURB_MidRiseApartment',
cte.SINGLE_FAMILY_HOUSE: 'MidriseApartment',
cte.MULTI_FAMILY_HOUSE: 'HighriseApartment',
cte.ROW_HOUSE: 'MidriseApartment',
cte.MID_RISE_APARTMENT: 'MURB_MidRiseApartment',
cte.HIGH_RISE_APARTMENT: 'MURB_HighRiseApartment',
cte.OFFICE_AND_ADMINISTRATION: 'MediumOffice',
cte.SMALL_OFFICE: 'SmallOffice',
cte.MEDIUM_OFFICE: 'MediumOffice',
cte.LARGE_OFFICE: 'LargeOffice',
cte.COURTHOUSE: 'MediumOffice',
cte.FIRE_STATION: 'n/a',
cte.PENITENTIARY: 'LargeHotel',
cte.POLICE_STATION: 'n/a',
cte.POST_OFFICE: 'MediumOffice',
cte.LIBRARY: 'MediumOffice',
cte.EDUCATION: 'SecondarySchool',
cte.PRIMARY_SCHOOL: 'PrimarySchool',
cte.PRIMARY_SCHOOL_WITH_SHOWER: 'PrimarySchool',
cte.SECONDARY_SCHOOL: 'SecondarySchool',
cte.UNIVERSITY: 'SecondarySchool',
cte.LABORATORY_AND_RESEARCH_CENTER: 'SecondarySchool',
cte.STAND_ALONE_RETAIL: 'RetailStandalone',
cte.HOSPITAL: 'Hospital',
cte.OUT_PATIENT_HEALTH_CARE: 'Outpatient',
cte.HEALTH_CARE: 'Outpatient',
cte.RETIREMENT_HOME_OR_ORPHANAGE: 'SmallHotel',
cte.COMMERCIAL: 'RetailStripmall',
cte.STRIP_MALL: 'RetailStripmall',
cte.SUPERMARKET: 'RetailStripmall',
cte.RETAIL_SHOP_WITHOUT_REFRIGERATED_FOOD: 'RetailStandalone',
cte.RETAIL_SHOP_WITH_REFRIGERATED_FOOD: 'RetailStandalone',
cte.RESTAURANT: 'FullServiceRestaurant',
cte.QUICK_SERVICE_RESTAURANT: 'QuickServiceRestaurant',
cte.FULL_SERVICE_RESTAURANT: 'FullServiceRestaurant',
cte.HOTEL: 'SmallHotel',
cte.HOTEL_MEDIUM_CLASS: 'SmallHotel',
cte.SMALL_HOTEL: 'SmallHotel',
cte.LARGE_HOTEL: 'LargeHotel',
cte.DORMITORY: 'SmallHotel',
cte.EVENT_LOCATION: 'n/a',
cte.CONVENTION_CENTER: 'n/a',
cte.HALL: 'n/a',
cte.GREEN_HOUSE: 'n/a',
cte.INDUSTRY: 'n/a',
cte.WORKSHOP: 'n/a',
cte.WAREHOUSE: 'Warehouse',
cte.WAREHOUSE_REFRIGERATED: 'Warehouse',
cte.SPORTS_LOCATION: 'n/a',
cte.SPORTS_ARENA: 'n/a',
cte.GYMNASIUM: 'n/a',
cte.MOTION_PICTURE_THEATRE: 'n/a',
cte.MUSEUM: 'n/a',
cte.PERFORMING_ARTS_THEATRE: 'n/a',
cte.TRANSPORTATION: 'n/a',
cte.AUTOMOTIVE_FACILITY: 'n/a',
cte.PARKING_GARAGE: 'n/a',
cte.RELIGIOUS: 'n/a',
cte.NON_HEATED: 'n/a',
cte.DATACENTER: 'n/a',
cte.FARM: 'n/a'
}
@property
def dictionary(self) -> dict:
"""
Get the dictionary
:return: {}
"""
return self._dictionary

View File

@ -1,87 +0,0 @@
"""
Dictionaries module for hub usage to NRCAN usage
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Guille Gutierrez Guillermo.GutierrezMorote@concordia.ca
"""
import hub.helpers.constants as cte
class HubUsageToCercUsage:
"""
Hub usage to cerc usage class (copy of HubUsageToNrcanUsage)
"""
def __init__(self):
self._dictionary = {
cte.RESIDENTIAL: 'Multi-unit residential building',
cte.SINGLE_FAMILY_HOUSE: 'Multi-unit residential building',
cte.MULTI_FAMILY_HOUSE: 'Multi-unit residential building',
cte.ROW_HOUSE: 'Multi-unit residential building',
cte.MID_RISE_APARTMENT: 'Multi-unit residential building',
cte.HIGH_RISE_APARTMENT: 'Multi-unit residential building',
cte.OFFICE_AND_ADMINISTRATION: 'Office',
cte.SMALL_OFFICE: 'Office',
cte.MEDIUM_OFFICE: 'Office',
cte.LARGE_OFFICE: 'Office',
cte.COURTHOUSE: 'Courthouse',
cte.FIRE_STATION: 'Fire station',
cte.PENITENTIARY: 'Penitentiary',
cte.POLICE_STATION: 'Police station',
cte.POST_OFFICE: 'Post office',
cte.LIBRARY: 'Library',
cte.EDUCATION: 'School/university',
cte.PRIMARY_SCHOOL: 'School/university',
cte.PRIMARY_SCHOOL_WITH_SHOWER: 'School/university',
cte.SECONDARY_SCHOOL: 'School/university',
cte.UNIVERSITY: 'School/university',
cte.LABORATORY_AND_RESEARCH_CENTER: 'School/university',
cte.STAND_ALONE_RETAIL: 'Retail area',
cte.HOSPITAL: 'Hospital',
cte.OUT_PATIENT_HEALTH_CARE: 'Health care clinic',
cte.HEALTH_CARE: 'Health care clinic',
cte.RETIREMENT_HOME_OR_ORPHANAGE: 'Health care clinic',
cte.COMMERCIAL: 'Retail area',
cte.STRIP_MALL: 'Retail area',
cte.SUPERMARKET: 'Retail area',
cte.RETAIL_SHOP_WITHOUT_REFRIGERATED_FOOD: 'Retail area',
cte.RETAIL_SHOP_WITH_REFRIGERATED_FOOD: 'Retail area',
cte.RESTAURANT: 'Dining - bar lounge/leisure',
cte.QUICK_SERVICE_RESTAURANT: 'Dining - cafeteria/fast food',
cte.FULL_SERVICE_RESTAURANT: 'Dining - bar lounge/leisure',
cte.HOTEL: 'Hotel/Motel',
cte.HOTEL_MEDIUM_CLASS: 'Hotel/Motel',
cte.SMALL_HOTEL: 'Hotel/Motel',
cte.LARGE_HOTEL: 'Hotel/Motel',
cte.DORMITORY: 'Dormitory',
cte.EVENT_LOCATION: 'Convention centre',
cte.CONVENTION_CENTER: 'Convention centre',
cte.HALL: 'Town hall',
cte.GREEN_HOUSE: 'n/a',
cte.INDUSTRY: 'Manufacturing facility',
cte.WORKSHOP: 'Workshop',
cte.WAREHOUSE: 'Warehouse',
cte.WAREHOUSE_REFRIGERATED: 'Warehouse',
cte.SPORTS_LOCATION: 'Exercise centre',
cte.SPORTS_ARENA: 'Sports arena',
cte.GYMNASIUM: 'Gymnasium',
cte.MOTION_PICTURE_THEATRE: 'Motion picture theatre',
cte.MUSEUM: 'Museum',
cte.PERFORMING_ARTS_THEATRE: 'Performing arts theatre',
cte.TRANSPORTATION: 'Transportation facility',
cte.AUTOMOTIVE_FACILITY: 'Automotive facility',
cte.PARKING_GARAGE: 'Storage garage',
cte.RELIGIOUS: 'Religious building',
cte.NON_HEATED: 'n/a',
cte.DATACENTER: 'n/a',
cte.FARM: 'n/a'
}
@property
def dictionary(self) -> dict:
"""
Get the dictionary
:return: {}
"""
return self._dictionary

View File

@ -13,15 +13,11 @@ from hub.helpers.data.alkis_function_to_hub_function import AlkisFunctionToHubFu
from hub.helpers.data.pluto_function_to_hub_function import PlutoFunctionToHubFunction
from hub.helpers.data.hub_function_to_nrel_construction_function import HubFunctionToNrelConstructionFunction
from hub.helpers.data.hub_function_to_nrcan_construction_function import HubFunctionToNrcanConstructionFunction
from hub.helpers.data.hub_function_to_cerc_construction_function import HubFunctionToCercConstructionFunction
from hub.helpers.data.hub_function_to_eilat_construction_function import HubFunctionToEilatConstructionFunction
from hub.helpers.data.hub_usage_to_comnet_usage import HubUsageToComnetUsage
from hub.helpers.data.hub_usage_to_hft_usage import HubUsageToHftUsage
from hub.helpers.data.hub_usage_to_nrcan_usage import HubUsageToNrcanUsage
from hub.helpers.data.hub_usage_to_eilat_usage import HubUsageToEilatUsage
from hub.helpers.data.hub_usage_to_cerc_usage import HubUsageToCercUsage
from hub.helpers.data.montreal_system_to_hub_energy_generation_system import MontrealSystemToHubEnergyGenerationSystem
from hub.helpers.data.montreal_generation_system_to_hub_energy_generation_system import MontrealGenerationSystemToHubEnergyGenerationSystem
from hub.helpers.data.montreal_demand_type_to_hub_energy_demand_type import MontrealDemandTypeToHubEnergyDemandType
@ -60,13 +56,7 @@ class Dictionaries:
:return: dict
"""
return HubUsageToNrcanUsage().dictionary
@property
def hub_usage_to_cerc_usage(self) -> dict:
"""
Get hub usage to CERC usage, transformation dictionary
:return: dict
"""
return HubUsageToCercUsage().dictionary
@property
def hub_usage_to_eilat_usage(self) -> dict:
"""
@ -90,13 +80,7 @@ class Dictionaries:
:return: dict
"""
return HubFunctionToEilatConstructionFunction().dictionary
@property
def hub_function_to_cerc_construction_function(self) -> dict:
"""
Get hub function to Cerc construction function, transformation dictionary (copy of HubFunctionToNrcanConstructionFunction)
:return: dict
"""
return HubFunctionToCercConstructionFunction().dictionary
@property
def hub_function_to_nrel_construction_function(self) -> dict:
"""

View File

@ -1,107 +0,0 @@
"""
CercPhysicsParameters import the construction and material information defined by Cerc
this is a copy of NrcanPhysicsParameters.py with the necessary changes to adapt it to the Cerc catalog
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
import logging
from hub.catalog_factories.construction_catalog_factory import ConstructionCatalogFactory
from hub.city_model_structure.building_demand.thermal_archetype import ThermalArchetype
from hub.city_model_structure.building_demand.construction import Construction
from hub.city_model_structure.building_demand.layer import Layer
from hub.helpers.dictionaries import Dictionaries
from hub.imports.construction.helpers.construction_helper import ConstructionHelper
class CercPhysicsParameters:
"""
CercPhysicsParameters class
"""
def __init__(self, city, divide_in_storeys=False):
self._city = city
self._divide_in_storeys = divide_in_storeys
self._climate_zone = ConstructionHelper.city_to_nrcan_climate_zone(city.climate_reference_city)
def enrich_buildings(self):
"""
Returns the city with the construction parameters assigned to the buildings
"""
city = self._city
cerc_catalog = ConstructionCatalogFactory('cerc').catalog
for building in city.buildings:
if building.function not in Dictionaries().hub_function_to_cerc_construction_function:
logging.error('Building %s has an unknown building function %s', building.name, building.function)
continue
function = Dictionaries().hub_function_to_cerc_construction_function[building.function]
try:
archetype = self._search_archetype(cerc_catalog, function, building.year_of_construction, self._climate_zone)
except KeyError:
logging.error('Building %s has unknown construction archetype for building function: %s '
'[%s], building year of construction: %s and climate zone %s', building.name, function,
building.function, building.year_of_construction, self._climate_zone)
continue
thermal_archetype = ThermalArchetype()
self._assign_values(thermal_archetype, archetype)
for internal_zone in building.internal_zones:
internal_zone.thermal_archetype = thermal_archetype
@staticmethod
def _search_archetype(cerc_catalog, function, year_of_construction, climate_zone):
cerc_archetypes = cerc_catalog.entries('archetypes')
for building_archetype in cerc_archetypes:
construction_period_limits = building_archetype.construction_period.split('_')
if int(construction_period_limits[0]) <= int(year_of_construction) <= int(construction_period_limits[1]):
if str(function) == str(building_archetype.function) and climate_zone == str(building_archetype.climate_zone):
return building_archetype
raise KeyError('archetype not found')
@staticmethod
def _assign_values(thermal_archetype, catalog_archetype):
thermal_archetype.average_storey_height = catalog_archetype.average_storey_height
thermal_archetype.extra_loses_due_to_thermal_bridges = catalog_archetype.extra_loses_due_to_thermal_bridges
thermal_archetype.thermal_capacity = catalog_archetype.thermal_capacity
thermal_archetype.indirect_heated_ratio = 0
thermal_archetype.infiltration_rate_for_ventilation_system_on = catalog_archetype.infiltration_rate_for_ventilation_system_on
thermal_archetype.infiltration_rate_for_ventilation_system_off = catalog_archetype.infiltration_rate_for_ventilation_system_off
_constructions = []
for catalog_construction in catalog_archetype.constructions:
construction = Construction()
construction.type = catalog_construction.type
construction.name = catalog_construction.name
if catalog_construction.window_ratio is not None:
for _orientation in catalog_construction.window_ratio:
if catalog_construction.window_ratio[_orientation] is None:
catalog_construction.window_ratio[_orientation] = 0
construction.window_ratio = catalog_construction.window_ratio
_layers = []
for layer_archetype in catalog_construction.layers:
layer = Layer()
layer.thickness = layer_archetype.thickness
archetype_material = layer_archetype.material
layer.material_name = archetype_material.name
layer.no_mass = archetype_material.no_mass
if archetype_material.no_mass:
layer.thermal_resistance = archetype_material.thermal_resistance
else:
layer.density = archetype_material.density
layer.conductivity = archetype_material.conductivity
layer.specific_heat = archetype_material.specific_heat
layer.solar_absorptance = archetype_material.solar_absorptance
layer.thermal_absorptance = archetype_material.thermal_absorptance
layer.visible_absorptance = archetype_material.visible_absorptance
_layers.append(layer)
construction.layers = _layers
if catalog_construction.window is not None:
window_archetype = catalog_construction.window
construction.window_frame_ratio = window_archetype.frame_ratio
construction.window_g_value = window_archetype.g_value
construction.window_overall_u_value = window_archetype.overall_u_value
_constructions.append(construction)
thermal_archetype.constructions = _constructions

View File

@ -10,8 +10,6 @@ from hub.helpers.utils import validate_import_export_type
from hub.imports.construction.nrcan_physics_parameters import NrcanPhysicsParameters
from hub.imports.construction.nrel_physics_parameters import NrelPhysicsParameters
from hub.imports.construction.eilat_physics_parameters import EilatPhysicsParameters
from hub.imports.construction.cerc_physics_parameters import CercPhysicsParameters
class ConstructionFactory:
@ -40,15 +38,6 @@ class ConstructionFactory:
self._city.level_of_detail.construction = 2
for building in self._city.buildings:
building.level_of_detail.construction = 2
def _cerc(self):
"""
Enrich the city by using CERC information
"""
CercPhysicsParameters(self._city).enrich_buildings()
self._city.level_of_detail.construction = 2
for building in self._city.buildings:
building.level_of_detail.construction = 2
def _eilat(self):
"""

View File

@ -1,103 +0,0 @@
from hub.city_model_structure.building import Building
from hub.city_model_structure.city import City
import hub.helpers.constants as cte
class RetrofitFactory:
def __init__(self, retrofit_data, city):
"""
:param retrofit_data: Dictionary mapping building IDs to their retrofit data.
:param city: The City object containing the buildings to retrofit.
"""
self._retrofit_data = retrofit_data
self._city = city
def enrich(self):
for building in self._city.buildings:
building_id = str(building.name) # Convert ID to string to match JSON keys
if building_id in self._retrofit_data:
print(f"Applying retrofits to building ID {building_id}")
building_retrofit_data = self._retrofit_data[building_id]
retrofit_types = building_retrofit_data.get('retrofit_types', [])
self._apply_retrofits_to_building(building, retrofit_types, building_retrofit_data)
else:
print(f"No retrofit data for building ID {building_id}")
def _apply_retrofits_to_building(self, building, retrofit_types, retrofit_params):
if 'construction' in retrofit_types:
self._apply_construction_retrofit_to_building(building, retrofit_params)
if 'infiltration' in retrofit_types:
self._reduce_infiltration_rate_by_percentage(building, retrofit_params)
if 'windows' in retrofit_types:
self._apply_window_retrofit_to_building(building, retrofit_params)
def _apply_construction_retrofit_to_building(self, building: Building, retrofit_params):
wall_u_value = retrofit_params.get('wall_u_value')
roof_u_value = retrofit_params.get('roof_u_value')
ground_u_value = retrofit_params.get('ground_u_value')
for thermal_zone in building.thermal_zones_from_internal_zones:
for thermal_boundary in thermal_zone.thermal_boundaries:
if wall_u_value is not None and thermal_boundary.type == cte.WALL and thermal_boundary.u_value > wall_u_value:
self._change_thermal_resistance(thermal_boundary, wall_u_value)
thermal_boundary.u_value = wall_u_value
print(f"Updated wall U-value to {wall_u_value} in building {building.name}")
elif roof_u_value is not None and thermal_boundary.type == cte.ROOF and thermal_boundary.u_value > roof_u_value:
self._change_thermal_resistance(thermal_boundary, roof_u_value)
thermal_boundary.u_value = roof_u_value
print(f"Updated roof U-value to {roof_u_value} in building {building.name}")
elif ground_u_value is not None and thermal_boundary.type == cte.GROUND and thermal_boundary.u_value > ground_u_value:
self._change_thermal_resistance(thermal_boundary, ground_u_value)
thermal_boundary.u_value = ground_u_value
print(f"Updated ground U-value to {ground_u_value} in building {building.name}")
def _change_thermal_resistance(self, thermal_boundary, new_u_value):
old_u_value = thermal_boundary.u_value
if new_u_value < old_u_value:
delta_r = (1 / new_u_value) - (1 / old_u_value)
for layer in thermal_boundary.layers:
if "virtual_no_mass" in layer.material_name.lower():
new_thermal_resistance = layer.thermal_resistance + delta_r
layer.thermal_resistance = new_thermal_resistance
print(f"Increased thermal resistance by {delta_r} in layer {layer.material_name}")
else:
print(f"New U-value {new_u_value} is not less than old U-value {old_u_value} for thermal boundary type {thermal_boundary.type}")
def _reduce_infiltration_rate_by_percentage(self, building: Building, retrofit_params):
percentage = retrofit_params.get('infiltration_reduction')
if percentage is None:
return
for thermal_zone in building.thermal_zones_from_internal_zones:
thermal_archetype = thermal_zone.parent_internal_zone.thermal_archetype
old_rate = thermal_archetype.infiltration_rate_for_ventilation_system_off
new_rate = old_rate * (1 - percentage / 100)
thermal_archetype.infiltration_rate_for_ventilation_system_off = new_rate
print(f"Reduced infiltration rate from {old_rate} to {new_rate} in building {building.name}")
def _apply_window_retrofit_to_building(self, building: Building, retrofit_params):
overall_u_value = retrofit_params.get('window_u_value')
g_value = retrofit_params.get('window_g_value')
for thermal_zone in building.thermal_zones_from_internal_zones:
for thermal_boundary in thermal_zone.thermal_boundaries:
if thermal_boundary.type == cte.WALL:
construction_archetype = thermal_boundary._construction_archetype
construction_archetype.window_overall_u_value = overall_u_value
construction_archetype.window_g_value = g_value
if hasattr(thermal_boundary, 'thermal_openings') and thermal_boundary.thermal_openings:
for opening in thermal_boundary.thermal_openings:
if overall_u_value is not None and overall_u_value != 0:
old_u_value = opening.overall_u_value
opening.overall_u_value = overall_u_value
print(f"Changed window U-value from {old_u_value} to {opening.overall_u_value} in building {building.name}")
if g_value is not None and g_value != 0:
old_g_value = opening.g_value
opening.g_value = g_value
print(f"Changed window g-value from {old_g_value} to {opening.g_value} in building {building.name}")
else:
print(f"No thermal openings in thermal boundary {thermal_boundary} of type {thermal_boundary.type} in building {building.name}")
else:
# Skip thermal boundaries that are not walls
continue

View File

@ -1,105 +0,0 @@
from hub.city_model_structure.building import Building
from hub.city_model_structure.city import City
import hub.helpers.constants as cte
class RetrofitFactory:
def __init__(self, retrofit_data, city):
"""
:param retrofit_data: Dictionary mapping building IDs to their retrofit data.
:param city: The City object containing the buildings to retrofit.
"""
self._retrofit_data = retrofit_data
self._city = city
def enrich(self):
for building in self._city.buildings:
building_id = str(building.name) # Convert ID to string to match JSON keys
if building_id in self._retrofit_data:
print(f"Applying retrofits to building ID {building_id}")
building_retrofit_data = self._retrofit_data[building_id]
retrofit_types = building_retrofit_data.get('retrofit_types', [])
self._apply_retrofits_to_building(building, retrofit_types, building_retrofit_data)
else:
print(f"No retrofit data for building ID {building_id}")
def _apply_retrofits_to_building(self, building, retrofit_types, retrofit_params):
if 'construction' in retrofit_types:
self._apply_construction_retrofit_to_building(building, retrofit_params)
if 'infiltration' in retrofit_types:
self._reduce_infiltration_rate_by_percentage(building, retrofit_params)
if 'windows' in retrofit_types:
self._apply_window_retrofit_to_building(building, retrofit_params)
def _apply_construction_retrofit_to_building(self, building: Building, retrofit_params):
wall_u_value = retrofit_params.get('wall_u_value')
roof_u_value = retrofit_params.get('roof_u_value')
ground_u_value = retrofit_params.get('ground_u_value')
for thermal_zone in building.thermal_zones_from_internal_zones:
for thermal_boundary in thermal_zone.thermal_boundaries:
if wall_u_value is not None and thermal_boundary.type == cte.WALL and thermal_boundary.u_value > wall_u_value:
self._change_thermal_resistance(thermal_boundary, wall_u_value)
thermal_boundary.u_value = wall_u_value
print(f"Updated wall U-value to {wall_u_value} in building {building.name}")
elif roof_u_value is not None and thermal_boundary.type == cte.ROOF and thermal_boundary.u_value > roof_u_value:
self._change_thermal_resistance(thermal_boundary, roof_u_value)
thermal_boundary.u_value = roof_u_value
print(f"Updated roof U-value to {roof_u_value} in building {building.name}")
elif ground_u_value is not None and thermal_boundary.type == cte.GROUND and thermal_boundary.u_value > ground_u_value:
self._change_thermal_resistance(thermal_boundary, ground_u_value)
thermal_boundary.u_value = ground_u_value
print(f"Updated ground U-value to {ground_u_value} in building {building.name}")
def _change_thermal_resistance(self, thermal_boundary, new_u_value):
old_u_value = thermal_boundary.u_value
if new_u_value < old_u_value:
delta_r = (1 / new_u_value) - (1 / old_u_value)
for layer in thermal_boundary.layers:
if "virtual_no_mass" in layer.material_name.lower():
new_thermal_resistance = layer.thermal_resistance + delta_r
layer.thermal_resistance = new_thermal_resistance
print(f"Increased thermal resistance by {delta_r} in layer {layer.material_name}")
else:
print(f"New U-value {new_u_value} is not less than old U-value {old_u_value} for thermal boundary type {thermal_boundary.type}")
def _reduce_infiltration_rate_by_percentage(self, building: Building, retrofit_params):
percentage = retrofit_params.get('infiltration_reduction')
if percentage is None:
return
for thermal_zone in building.thermal_zones_from_internal_zones:
#change infiltration rate in thermal_zone.parent_internal_zone.thermal_archetype.
thermal_archetype = thermal_zone.parent_internal_zone.thermal_archetype
old_rate = thermal_archetype.infiltration_rate_for_ventilation_system_off
new_rate = old_rate * (1 - percentage / 100)
thermal_archetype.infiltration_rate_for_ventilation_system_off = new_rate
print(f"Reduced infiltration rate from {old_rate} to {new_rate} in building {building.name}")
def _apply_window_retrofit_to_building(self, building: Building, retrofit_params):
overall_u_value = retrofit_params.get('window_u_value')
g_value = retrofit_params.get('window_g_value')
for thermal_zone in building.thermal_zones_from_internal_zones:
for thermal_boundary in thermal_zone.thermal_boundaries:
if thermal_boundary.type == cte.WALL:
#change window u_value and g_value in _construction_archetype
construction_archetype = thermal_boundary._construction_archetype
construction_archetype.window_overall_u_value = overall_u_value
construction_archetype.window_g_value = g_value
if hasattr(thermal_boundary, 'thermal_openings') and thermal_boundary.thermal_openings:
for opening in thermal_boundary.thermal_openings:
if overall_u_value is not None and overall_u_value != 0:
old_u_value = opening.overall_u_value
opening.overall_u_value = overall_u_value
print(f"Changed window U-value from {old_u_value} to {opening.overall_u_value} in building {building.name}")
if g_value is not None and g_value != 0:
old_g_value = opening.g_value
opening.g_value = g_value
print(f"Changed window g-value from {old_g_value} to {opening.g_value} in building {building.name}")
else:
print(f"No thermal openings in thermal boundary {thermal_boundary} of type {thermal_boundary.type} in building {building.name}")
else:
# Skip thermal boundaries that are not walls
continue

View File

@ -1,199 +0,0 @@
"""
NrcanUsageParameters extracts the usage properties from NRCAN catalog and assigns to each building
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
import logging
import hub.helpers.constants as cte
from hub.helpers.dictionaries import Dictionaries
from hub.city_model_structure.building_demand.usage import Usage
from hub.city_model_structure.building_demand.lighting import Lighting
from hub.city_model_structure.building_demand.occupancy import Occupancy
from hub.city_model_structure.building_demand.appliances import Appliances
from hub.city_model_structure.building_demand.thermal_control import ThermalControl
from hub.city_model_structure.building_demand.domestic_hot_water import DomesticHotWater
from hub.catalog_factories.usage_catalog_factory import UsageCatalogFactory
class CercUsageParameters:
"""
CercUsageParameters class (Copy of NrcanUsageParameters)
"""
def __init__(self, city):
self._city = city
def enrich_buildings(self):
"""
Returns the city with the usage parameters assigned to the buildings
:return:
"""
city = self._city
cerc_catalog = UsageCatalogFactory('cerc').catalog
comnet_catalog = UsageCatalogFactory('comnet').catalog
for building in city.buildings:
usage_name = Dictionaries().hub_usage_to_cerc_usage[building.function]
try:
archetype_usage = self._search_archetypes(cerc_catalog, usage_name)
except KeyError:
logging.error('Building %s has unknown usage archetype for usage %s', building.name, usage_name)
continue
comnet_usage_name = Dictionaries().hub_usage_to_comnet_usage[building.function]
try:
comnet_archetype_usage = self._search_archetypes(comnet_catalog, comnet_usage_name)
except KeyError:
logging.error('Building %s has unknown usage archetype for usage %s', building.name, comnet_usage_name)
continue
for internal_zone in building.internal_zones:
if len(building.internal_zones) > 1:
volume_per_area = 0
if internal_zone.area is None:
logging.error('Building %s has internal zone area not defined, ACH cannot be calculated for usage %s',
building.name, usage_name)
continue
if internal_zone.volume is None:
logging.error('Building %s has internal zone volume not defined, ACH cannot be calculated for usage %s',
building.name, usage_name)
continue
if internal_zone.area <= 0:
logging.error('Building %s has internal zone area equal to 0, ACH cannot be calculated for usage %s',
building.name, usage_name)
continue
volume_per_area += internal_zone.volume / internal_zone.area
else:
if building.storeys_above_ground is None:
logging.error('Building %s no number of storeys assigned, ACH cannot be calculated for usage %s',
building.name, usage_name)
continue
volume_per_area = building.volume / building.floor_area / building.storeys_above_ground
usage = Usage()
usage.name = usage_name
self._assign_values(usage, archetype_usage, volume_per_area, building.cold_water_temperature)
self._assign_comnet_extra_values(usage, comnet_archetype_usage, archetype_usage.occupancy.occupancy_density)
usage.percentage = 1
self._calculate_reduced_values_from_extended_library(usage, archetype_usage)
internal_zone.usages = [usage]
@staticmethod
def _search_archetypes(catalog, usage_name):
archetypes = catalog.entries('archetypes').usages
for building_archetype in archetypes:
if str(usage_name) == str(building_archetype.name):
return building_archetype
raise KeyError('archetype not found')
@staticmethod
def _assign_values(usage, archetype, volume_per_area, cold_water_temperature):
if archetype.mechanical_air_change > 0:
# 1/s
usage.mechanical_air_change = archetype.mechanical_air_change
elif archetype.ventilation_rate > 0:
# m3/m2.s to 1/s
usage.mechanical_air_change = archetype.ventilation_rate / volume_per_area
else:
usage.mechanical_air_change = 0
_occupancy = Occupancy()
_occupancy.occupancy_density = archetype.occupancy.occupancy_density
_occupancy.sensible_radiative_internal_gain = archetype.occupancy.sensible_radiative_internal_gain
_occupancy.latent_internal_gain = archetype.occupancy.latent_internal_gain
_occupancy.sensible_convective_internal_gain = archetype.occupancy.sensible_convective_internal_gain
_occupancy.occupancy_schedules = archetype.occupancy.schedules
usage.occupancy = _occupancy
_lighting = Lighting()
_lighting.density = archetype.lighting.density
_lighting.convective_fraction = archetype.lighting.convective_fraction
_lighting.radiative_fraction = archetype.lighting.radiative_fraction
_lighting.latent_fraction = archetype.lighting.latent_fraction
_lighting.schedules = archetype.lighting.schedules
usage.lighting = _lighting
_appliances = Appliances()
_appliances.density = archetype.appliances.density
_appliances.convective_fraction = archetype.appliances.convective_fraction
_appliances.radiative_fraction = archetype.appliances.radiative_fraction
_appliances.latent_fraction = archetype.appliances.latent_fraction
_appliances.schedules = archetype.appliances.schedules
usage.appliances = _appliances
_control = ThermalControl()
_control.cooling_set_point_schedules = archetype.thermal_control.cooling_set_point_schedules
_control.heating_set_point_schedules = archetype.thermal_control.heating_set_point_schedules
_control.hvac_availability_schedules = archetype.thermal_control.hvac_availability_schedules
usage.thermal_control = _control
_domestic_hot_water = DomesticHotWater()
_domestic_hot_water.peak_flow = archetype.domestic_hot_water.peak_flow
_domestic_hot_water.service_temperature = archetype.domestic_hot_water.service_temperature
density = None
if len(cold_water_temperature) > 0:
cold_temperature = cold_water_temperature[cte.YEAR][0]
density = (
archetype.domestic_hot_water.peak_flow * cte.WATER_DENSITY * cte.WATER_HEAT_CAPACITY *
(archetype.domestic_hot_water.service_temperature - cold_temperature)
)
_domestic_hot_water.density = density
_domestic_hot_water.schedules = archetype.domestic_hot_water.schedules
usage.domestic_hot_water = _domestic_hot_water
@staticmethod
def _assign_comnet_extra_values(usage, archetype, occupancy_density):
_occupancy = usage.occupancy
archetype_density = archetype.occupancy.occupancy_density
if archetype_density == 0:
_occupancy.sensible_radiative_internal_gain = 0
_occupancy.latent_internal_gain = 0
_occupancy.sensible_convective_internal_gain = 0
else:
_occupancy.sensible_radiative_internal_gain = archetype.occupancy.sensible_radiative_internal_gain \
* occupancy_density / archetype_density
_occupancy.latent_internal_gain = archetype.occupancy.latent_internal_gain * occupancy_density / archetype_density
_occupancy.sensible_convective_internal_gain = (
archetype.occupancy.sensible_convective_internal_gain * occupancy_density / archetype_density
)
@staticmethod
def _calculate_reduced_values_from_extended_library(usage, archetype):
number_of_days_per_type = {'WD': 251, 'Sat': 52, 'Sun': 62}
total = 0
for schedule in archetype.thermal_control.hvac_availability_schedules:
if schedule.day_types[0] == cte.SATURDAY:
for value in schedule.values:
total += value * number_of_days_per_type['Sat']
elif schedule.day_types[0] == cte.SUNDAY:
for value in schedule.values:
total += value * number_of_days_per_type['Sun']
else:
for value in schedule.values:
total += value * number_of_days_per_type['WD']
usage.hours_day = total / 365
usage.days_year = 365
max_heating_setpoint = cte.MIN_FLOAT
min_heating_setpoint = cte.MAX_FLOAT
for schedule in archetype.thermal_control.heating_set_point_schedules:
if schedule.values is None:
max_heating_setpoint = None
min_heating_setpoint = None
break
if max(schedule.values) > max_heating_setpoint:
max_heating_setpoint = max(schedule.values)
if min(schedule.values) < min_heating_setpoint:
min_heating_setpoint = min(schedule.values)
min_cooling_setpoint = cte.MAX_FLOAT
for schedule in archetype.thermal_control.cooling_set_point_schedules:
if schedule.values is None:
min_cooling_setpoint = None
break
if min(schedule.values) < min_cooling_setpoint:
min_cooling_setpoint = min(schedule.values)
usage.thermal_control.mean_heating_set_point = max_heating_setpoint
usage.thermal_control.heating_set_back = min_heating_setpoint
usage.thermal_control.mean_cooling_set_point = min_cooling_setpoint

View File

@ -9,8 +9,6 @@ Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concord
from hub.helpers.utils import validate_import_export_type
from hub.imports.usage.comnet_usage_parameters import ComnetUsageParameters
from hub.imports.usage.nrcan_usage_parameters import NrcanUsageParameters
from hub.imports.usage.cerc_usage_parameters import CercUsageParameters
from hub.imports.usage.eilat_usage_parameters import EilatUsageParameters
@ -40,16 +38,7 @@ class UsageFactory:
self._city.level_of_detail.usage = 2
for building in self._city.buildings:
building.level_of_detail.usage = 2
def _cerc(self):
"""
Enrich the city with cerc usage library (copy of NRCAN)
"""
CercUsageParameters(self._city).enrich_buildings()
self._city.level_of_detail.usage = 2
for building in self._city.buildings:
building.level_of_detail.usage = 2
def _eilat(self):
"""
Enrich the city with Eilat usage library

View File

@ -1,46 +0,0 @@
{
"type": "FeatureCollection",
"name": "OMHM_results_modified",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "OBJECTID": "161053", "ID_UEV": "01029234", "CIVIQUE_DE": "6109", "CIVIQUE_FI": "6119", "NOM_RUE": "rue Jeanne-Mance (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "9", "AREA_NEW": "118", "MBG_Width": "8", "MBG_Length": "16", "MBG_Orientation": "32", "Shape_Length": "48", "Shape_Area": "125", "BuildingCategory": "fully-attached", "BuildingVolume": "1062", "AspectRatio": 2.152, "SurfacetoVolumeRatio": 0.111, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "354", "ANNEE_CONS": "1910", "address": "6109 à 6119" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.60889457783199, 45.526279673418671 ], [ -73.608784596113864, 45.526401895432073 ], [ -73.608808785594334, 45.526414045422094 ], [ -73.608811385760049, 45.526411446008474 ], [ -73.60882178517528, 45.526397746843365 ], [ -73.608847485482059, 45.526407346140566 ], [ -73.608832885254159, 45.526426746194332 ], [ -73.608864684978954, 45.526438645964845 ], [ -73.608864884687591, 45.526438645774512 ], [ -73.60887972027291, 45.526424456462976 ], [ -73.608977080705117, 45.52631626050087 ], [ -73.60889457783199, 45.526279673418671 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "162168", "ID_UEV": "01001944", "CIVIQUE_DE": "4820", "CIVIQUE_FI": "4850", "NOM_RUE": "rue de Grand-Pré (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "11", "AREA_NEW": "504", "MBG_Width": "16", "MBG_Length": "42", "MBG_Orientation": "123", "Shape_Length": "116", "Shape_Area": "669", "BuildingCategory": "fully-attached", "BuildingVolume": "5544", "AspectRatio": 2.648, "SurfacetoVolumeRatio": 0.091, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "1512", "ANNEE_CONS": "1980", "address": "4820 à 4850" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.586673951057165, 45.524838247152971 ], [ -73.586568305570552, 45.524952686098082 ], [ -73.58662307714782, 45.524979547084882 ], [ -73.586731877320233, 45.525032846618785 ], [ -73.586815478124791, 45.525073847297307 ], [ -73.586820877038548, 45.525068346972965 ], [ -73.586874077743531, 45.525094146322125 ], [ -73.586895378594193, 45.525104346900406 ], [ -73.586943277305565, 45.525127046703169 ], [ -73.587016976014752, 45.525161993449707 ], [ -73.587125015986871, 45.525044959829344 ], [ -73.587121277851907, 45.525043246686081 ], [ -73.587092777275416, 45.525074446965931 ], [ -73.587032277294412, 45.525047146948445 ], [ -73.587039678023586, 45.525038947369048 ], [ -73.587033777622878, 45.525036346828877 ], [ -73.586929477897286, 45.524990346357107 ], [ -73.58664877714105, 45.524866746179505 ], [ -73.586674177796809, 45.524838346863149 ], [ -73.586673951057165, 45.524838247152971 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "135557", "ID_UEV": "01016997", "CIVIQUE_DE": "4110", "CIVIQUE_FI": "4118", "NOM_RUE": "rue de Mentana (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "35", "AREA_NEW": "368", "MBG_Width": "9", "MBG_Length": "40", "MBG_Orientation": "123", "Shape_Length": "99", "Shape_Area": "373", "BuildingCategory": "semi-attached", "BuildingVolume": "12880", "AspectRatio": 4.269, "SurfacetoVolumeRatio": 0.029, "FloorNu_RawTax": "9", "FloorNu_RawTax.1": "9", "Floor_frmHieght": "9", "TotalFloorArea": "2772", "ANNEE_CONS": "1974", "address": "4110 à 4118" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.574418873676947, 45.524231847193803 ], [ -73.574414973518913, 45.524236046587689 ], [ -73.574353274210182, 45.524302647018288 ], [ -73.574672473801854, 45.524454446940965 ], [ -73.574677173550853, 45.524456647576301 ], [ -73.574697801390826, 45.524465086284231 ], [ -73.574764053316215, 45.524393192531484 ], [ -73.574747073263296, 45.52438524726022 ], [ -73.574418873676947, 45.524231847193803 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "135557", "ID_UEV": "01016997", "CIVIQUE_DE": "4110", "CIVIQUE_FI": "4118", "NOM_RUE": "rue de Mentana (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "35", "AREA_NEW": "368", "MBG_Width": "9", "MBG_Length": "40", "MBG_Orientation": "123", "Shape_Length": "99", "Shape_Area": "373", "BuildingCategory": "semi-attached", "BuildingVolume": "12880", "AspectRatio": 4.269, "SurfacetoVolumeRatio": 0.029, "FloorNu_RawTax": "9", "FloorNu_RawTax.1": "9", "Floor_frmHieght": "9", "TotalFloorArea": "3312", "ANNEE_CONS": "1974", "address": "4110 à 4118" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.574737072648617, 45.523887246433162 ], [ -73.574675173652651, 45.523951346517343 ], [ -73.574680474005618, 45.523953747424365 ], [ -73.575101273632313, 45.524149446764156 ], [ -73.575104673865866, 45.524145747086607 ], [ -73.575166773945583, 45.524079047002189 ], [ -73.574740673605703, 45.523883346870491 ], [ -73.574737072648617, 45.523887246433162 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "135557", "ID_UEV": "01016997", "CIVIQUE_DE": "4110", "CIVIQUE_FI": "4118", "NOM_RUE": "rue de Mentana (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "35", "AREA_NEW": "368", "MBG_Width": "9", "MBG_Length": "40", "MBG_Orientation": "123", "Shape_Length": "99", "Shape_Area": "373", "BuildingCategory": "semi-attached", "BuildingVolume": "12880", "AspectRatio": 4.269, "SurfacetoVolumeRatio": 0.029, "FloorNu_RawTax": "9", "FloorNu_RawTax.1": "9", "Floor_frmHieght": "9", "TotalFloorArea": "3519", "ANNEE_CONS": "1974", "address": "4110 à 4118" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.573938673130883, 45.523514747274078 ], [ -73.573871573257321, 45.523587247599714 ], [ -73.573971273166705, 45.523632346946712 ], [ -73.574299873176656, 45.523781346937724 ], [ -73.574367473166163, 45.523709747676989 ], [ -73.573942173382605, 45.523511147448218 ], [ -73.573938673130883, 45.523514747274078 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "135557", "ID_UEV": "01016997", "CIVIQUE_DE": "4110", "CIVIQUE_FI": "4118", "NOM_RUE": "rue de Mentana (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "35", "AREA_NEW": "368", "MBG_Width": "9", "MBG_Length": "40", "MBG_Orientation": "123", "Shape_Length": "99", "Shape_Area": "373", "BuildingCategory": "semi-attached", "BuildingVolume": "12880", "AspectRatio": 4.269, "SurfacetoVolumeRatio": 0.029, "FloorNu_RawTax": "9", "FloorNu_RawTax.1": "9", "Floor_frmHieght": "9", "TotalFloorArea": "8595", "ANNEE_CONS": "1974", "address": "4110 à 4118" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.574246972941793, 45.524254046524938 ], [ -73.574263673619157, 45.52423654728122 ], [ -73.574264472950247, 45.524236947190275 ], [ -73.574618373497202, 45.523877146844328 ], [ -73.574618574080972, 45.52387684706661 ], [ -73.574597274105017, 45.523866247366996 ], [ -73.574629374517983, 45.523834246988898 ], [ -73.574482473360447, 45.523761346956533 ], [ -73.57447857399373, 45.523765147723324 ], [ -73.574450274413095, 45.523795346802238 ], [ -73.574425873110769, 45.523784046316848 ], [ -73.574425773393941, 45.52378414716388 ], [ -73.574229973500437, 45.523994747121513 ], [ -73.574083373708532, 45.524152346664444 ], [ -73.574083272709117, 45.524152446612156 ], [ -73.574109573296937, 45.524167247214692 ], [ -73.574093573484291, 45.524181347286358 ], [ -73.574093773316264, 45.524181447038956 ], [ -73.574246972941793, 45.524254046524938 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "139141", "ID_UEV": "01093226", "CIVIQUE_DE": "5170", "CIVIQUE_FI": "5174", "NOM_RUE": "rue Drolet (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "13", "AREA_NEW": "257", "MBG_Width": "13", "MBG_Length": "22", "MBG_Orientation": "122", "Shape_Length": "69", "Shape_Area": "280", "BuildingCategory": "semi-attached", "BuildingVolume": "3341", "AspectRatio": 1.702, "SurfacetoVolumeRatio": 0.077, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "4", "TotalFloorArea": "1028", "ANNEE_CONS": "1979", "address": "5170 à 5174" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.591167479030972, 45.526556546423869 ], [ -73.591164679307127, 45.526559746687838 ], [ -73.5910896795654, 45.526649446727895 ], [ -73.591295579388301, 45.526742246566478 ], [ -73.591295779261202, 45.526742347188751 ], [ -73.591314679498396, 45.526721447707658 ], [ -73.591337579606474, 45.526731746958284 ], [ -73.591316078712723, 45.526755447022836 ], [ -73.591316180009443, 45.52675554682402 ], [ -73.591320310492023, 45.526757487175246 ], [ -73.591400782956626, 45.526656800065901 ], [ -73.591377879748123, 45.526646946250843 ], [ -73.591167479030972, 45.526556546423869 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "159710", "ID_UEV": "01031526", "CIVIQUE_DE": "5301", "CIVIQUE_FI": "5321", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "10", "AREA_NEW": "426", "MBG_Width": "15", "MBG_Length": "29", "MBG_Orientation": "123", "Shape_Length": "88", "Shape_Area": "429", "BuildingCategory": "semi-attached", "BuildingVolume": "4260", "AspectRatio": 1.958, "SurfacetoVolumeRatio": 0.1, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "1278", "ANNEE_CONS": "1983", "address": "5301 à 5321" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.595280179779778, 45.525306046544578 ], [ -73.59527857988931, 45.52530774677637 ], [ -73.595176680986739, 45.525416646636465 ], [ -73.595180880565678, 45.525418547198015 ], [ -73.59547958119505, 45.525555646742482 ], [ -73.59548398066913, 45.52555764700795 ], [ -73.595498280971185, 45.525540746863108 ], [ -73.595502899198962, 45.525542656061162 ], [ -73.595583619277193, 45.525455274404962 ], [ -73.595580081047061, 45.525453846620529 ], [ -73.595586980381867, 45.525445846671893 ], [ -73.595586180882805, 45.525445446912236 ], [ -73.595549980649665, 45.525428947143965 ], [ -73.595461581229586, 45.525388646147597 ], [ -73.595333880363981, 45.525330546666602 ], [ -73.595280179779778, 45.525306046544578 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "160314", "ID_UEV": "01027192", "CIVIQUE_DE": "3876", "CIVIQUE_FI": "3880", "NOM_RUE": "rue de Mentana (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "12", "AREA_NEW": "366", "MBG_Width": "16", "MBG_Length": "32", "MBG_Orientation": "110", "Shape_Length": "96", "Shape_Area": "507", "BuildingCategory": "semi-attached", "BuildingVolume": "4392", "AspectRatio": 2.009, "SurfacetoVolumeRatio": 0.083, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "1098", "ANNEE_CONS": "1980", "address": "3876 à 3880" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.570800071665957, 45.522686946460304 ], [ -73.57093107256577, 45.522726047825749 ], [ -73.571028271866595, 45.522613046698432 ], [ -73.570955272361019, 45.522582046683695 ], [ -73.57092677184869, 45.522615346769584 ], [ -73.570836471663341, 45.522577047118958 ], [ -73.570681923964358, 45.522511513915816 ], [ -73.570599160784397, 45.522601741674258 ], [ -73.57068447255547, 45.522631046198299 ], [ -73.570683872035971, 45.52263194640998 ], [ -73.5706905727058, 45.522641647038853 ], [ -73.570695971264669, 45.522651146908998 ], [ -73.570720172024352, 45.522643346512112 ], [ -73.570741072289536, 45.522674046912528 ], [ -73.570768873124834, 45.522664547177342 ], [ -73.570786672496425, 45.522690747590424 ], [ -73.570800772812049, 45.522685647556457 ], [ -73.570800071665957, 45.522686946460304 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "133286", "ID_UEV": "01042232", "CIVIQUE_DE": "3620", "CIVIQUE_FI": "3622", "NOM_RUE": "rue De Bullion (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "12", "AREA_NEW": "109", "MBG_Width": "11", "MBG_Length": "21", "MBG_Orientation": "33", "Shape_Length": "63", "Shape_Area": "227", "BuildingCategory": "fully-attached", "BuildingVolume": "1308", "AspectRatio": 1.922, "SurfacetoVolumeRatio": 0.083, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "4", "Floor_frmHieght": "3", "TotalFloorArea": "327", "ANNEE_CONS": "1973", "address": "3620 à 3622" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.572164341489696, 45.515081822522674 ], [ -73.572094272716726, 45.515157711689952 ], [ -73.572209872164805, 45.515210745503666 ], [ -73.572134672171586, 45.515291745436613 ], [ -73.572135230576137, 45.51529202223508 ], [ -73.572281114453887, 45.515134786235819 ], [ -73.572204771880109, 45.515100845713491 ], [ -73.572178971858364, 45.515089445732698 ], [ -73.572180471934672, 45.515089445684659 ], [ -73.572164341489696, 45.515081822522674 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "133286", "ID_UEV": "01042232", "CIVIQUE_DE": "3620", "CIVIQUE_FI": "3622", "NOM_RUE": "rue De Bullion (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "12", "AREA_NEW": "109", "MBG_Width": "11", "MBG_Length": "21", "MBG_Orientation": "33", "Shape_Length": "63", "Shape_Area": "227", "BuildingCategory": "fully-attached", "BuildingVolume": "1308", "AspectRatio": 1.922, "SurfacetoVolumeRatio": 0.083, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "4", "Floor_frmHieght": "3", "TotalFloorArea": "747", "ANNEE_CONS": "1973", "address": "3620 à 3622" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.571849371673082, 45.515246845899775 ], [ -73.571836472027769, 45.515260545097711 ], [ -73.571831897393437, 45.515258410851573 ], [ -73.571762868307985, 45.51533411649163 ], [ -73.571848271367159, 45.515361846304067 ], [ -73.571844472998734, 45.515366245317459 ], [ -73.571872972464163, 45.51537764637429 ], [ -73.57191147153371, 45.515393645616861 ], [ -73.571937271130409, 45.515404645228365 ], [ -73.571977672212782, 45.515422645397422 ], [ -73.572003423820092, 45.515434132738157 ], [ -73.572084162422797, 45.515347082465453 ], [ -73.571955671586991, 45.515292245266785 ], [ -73.571849772545761, 45.515247045412366 ], [ -73.571849371673082, 45.515246845899775 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "137144", "ID_UEV": "01026386", "CIVIQUE_DE": "3880", "CIVIQUE_FI": "3884", "NOM_RUE": "rue Rivard (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "11", "AREA_NEW": "279", "MBG_Width": "12", "MBG_Length": "24", "MBG_Orientation": "123", "Shape_Length": "73", "Shape_Area": "293", "BuildingCategory": "fully-attached", "BuildingVolume": "3069", "AspectRatio": 2.03, "SurfacetoVolumeRatio": 0.091, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "837", "ANNEE_CONS": "1973", "address": "3880 à 3884" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.573353708862498, 45.520196602777794 ], [ -73.573276577128638, 45.520280345545878 ], [ -73.573329872184814, 45.520304246201597 ], [ -73.57333967282041, 45.52030864642829 ], [ -73.573340873356017, 45.520307546952274 ], [ -73.573381173081884, 45.520327246473251 ], [ -73.573425172976741, 45.520348547117237 ], [ -73.57353603634354, 45.520402360047079 ], [ -73.573619608896152, 45.520311623893825 ], [ -73.573353708862498, 45.520196602777794 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "163186", "ID_UEV": "01119792", "CIVIQUE_DE": "4061", "CIVIQUE_FI": "4077", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "7", "AREA_NEW": "221", "MBG_Width": "18", "MBG_Length": "22", "MBG_Orientation": "33", "Shape_Length": "80", "Shape_Area": "396", "BuildingCategory": "semi-attached", "BuildingVolume": "1547", "AspectRatio": 1.168, "SurfacetoVolumeRatio": 0.143, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "2", "TotalFloorArea": "442", "ANNEE_CONS": "1991", "address": "4061 à 4077" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.579222473921035, 45.517682445429905 ], [ -73.57921957540006, 45.517685645474607 ], [ -73.579140174767261, 45.51777754547107 ], [ -73.579176274152303, 45.517792945526899 ], [ -73.579181774936004, 45.517795246206369 ], [ -73.579333574702929, 45.517858545466083 ], [ -73.579284573890149, 45.517916746099729 ], [ -73.579286272260887, 45.517917529582121 ], [ -73.579436178141819, 45.517755275011176 ], [ -73.579435075326558, 45.517754745771832 ], [ -73.579434874227942, 45.517754646029331 ], [ -73.579417574180937, 45.517773046306672 ], [ -73.579265575000605, 45.517702545869504 ], [ -73.579222473921035, 45.517682445429905 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "154720", "ID_UEV": "05064145", "CIVIQUE_DE": "4420", "CIVIQUE_FI": "4430", "NOM_RUE": "avenue Laval (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "17", "AREA_NEW": "436", "MBG_Width": "18", "MBG_Length": "33", "MBG_Orientation": "123", "Shape_Length": "103", "Shape_Area": "603", "BuildingCategory": "fully-attached", "BuildingVolume": "7412", "AspectRatio": 1.857, "SurfacetoVolumeRatio": 0.059, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "5", "TotalFloorArea": "2180", "ANNEE_CONS": "1976", "address": "4420 à 4430" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.583418376368257, 45.521926846073086 ], [ -73.583410871213744, 45.521934626173078 ], [ -73.583415285356651, 45.521936638591818 ], [ -73.583540763954659, 45.52180061432945 ], [ -73.583534276101659, 45.521797746784124 ], [ -73.583497976598821, 45.521838247237362 ], [ -73.583450676123846, 45.521817347020011 ], [ -73.583459675520473, 45.52180724603739 ], [ -73.583430076048643, 45.521794147089594 ], [ -73.583442975894727, 45.521779746522277 ], [ -73.583418675529643, 45.521768946391582 ], [ -73.583418276143746, 45.521768945783407 ], [ -73.583400876220367, 45.521782946505205 ], [ -73.583380276474088, 45.521770345783594 ], [ -73.583367076878588, 45.521781146301812 ], [ -73.583279576431195, 45.521727846002946 ], [ -73.583230675562717, 45.521697946658719 ], [ -73.583230476163919, 45.521698145668701 ], [ -73.583189275693698, 45.521686946574711 ], [ -73.583146114497453, 45.521675107306947 ], [ -73.583061055890823, 45.521769066618106 ], [ -73.583104776617077, 45.521787046920331 ], [ -73.583103276304072, 45.521788746010351 ], [ -73.583108175851521, 45.521790946154496 ], [ -73.583143075657262, 45.52180724655878 ], [ -73.583311476230662, 45.521885846383761 ], [ -73.583318176092817, 45.521878847039105 ], [ -73.583364176497497, 45.521900946847047 ], [ -73.583418376368257, 45.521926846073086 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "160236", "ID_UEV": "01014249", "CIVIQUE_DE": "4400", "CIVIQUE_FI": "4420", "NOM_RUE": "avenue Coloniale (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "10", "AREA_NEW": "491", "MBG_Width": "18", "MBG_Length": "42", "MBG_Orientation": "123", "Shape_Length": "120", "Shape_Area": "756", "BuildingCategory": "semi-attached", "BuildingVolume": "4910", "AspectRatio": 2.332, "SurfacetoVolumeRatio": 0.1, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "1473", "ANNEE_CONS": "1977", "address": "4400 à 4420" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.584476976684684, 45.52050394605542 ], [ -73.584477076379102, 45.520503846099416 ], [ -73.584518677152431, 45.520459645758464 ], [ -73.584509176430757, 45.520455245369249 ], [ -73.584542276416371, 45.520419645684242 ], [ -73.58410347634215, 45.520218345949942 ], [ -73.584141776596113, 45.520177145542746 ], [ -73.58413976427444, 45.520176224688534 ], [ -73.584018659314424, 45.520309527113092 ], [ -73.584061176623379, 45.520327946161288 ], [ -73.584057576685794, 45.520331945901759 ], [ -73.584063377000206, 45.520333946477898 ], [ -73.584122976229509, 45.520353846665969 ], [ -73.584118576684915, 45.520359846442709 ], [ -73.584153676741153, 45.520374346713979 ], [ -73.584238676293069, 45.520409845756852 ], [ -73.584276976364279, 45.520425946246036 ], [ -73.584327376707691, 45.520447146184345 ], [ -73.584328475587654, 45.520447545802099 ], [ -73.584336176450975, 45.520440746321363 ], [ -73.58443967693627, 45.520499446536846 ], [ -73.584440176454549, 45.520499645932155 ], [ -73.584451776529221, 45.520489545646065 ], [ -73.584476976684684, 45.52050394605542 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "156402", "ID_UEV": "01017181", "CIVIQUE_DE": "4111", "CIVIQUE_FI": "4111", "NOM_RUE": "rue de Mentana (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "14", "AREA_NEW": "178", "MBG_Width": "8", "MBG_Length": "24", "MBG_Orientation": "33", "Shape_Length": "62", "Shape_Area": "180", "BuildingCategory": "fully-attached", "BuildingVolume": "2492", "AspectRatio": 3.1, "SurfacetoVolumeRatio": 0.071, "FloorNu_RawTax": "2", "FloorNu_RawTax.1": "2", "Floor_frmHieght": "4", "TotalFloorArea": "712", "ANNEE_CONS": "1885", "address": "4111" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.574150749847661, 45.524412599616312 ], [ -73.573986662086028, 45.524590780711918 ], [ -73.574071708035248, 45.524624598264325 ], [ -73.57423282482344, 45.524449644004257 ], [ -73.574177972891334, 45.524424946640266 ], [ -73.574171573500891, 45.524422047912516 ], [ -73.574150749847661, 45.524412599616312 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "156386", "ID_UEV": "01017179", "CIVIQUE_DE": "4115", "CIVIQUE_FI": "4115", "NOM_RUE": "rue de Mentana (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "13", "AREA_NEW": "175", "MBG_Width": "8", "MBG_Length": "23", "MBG_Orientation": "33", "Shape_Length": "62", "Shape_Area": "177", "BuildingCategory": "fully-attached", "BuildingVolume": "2275", "AspectRatio": 3.045, "SurfacetoVolumeRatio": 0.077, "FloorNu_RawTax": "2", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "4", "TotalFloorArea": "700", "ANNEE_CONS": "1985", "address": "4115" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.57423282482344, 45.524449644004257 ], [ -73.574071708035248, 45.524624598264325 ], [ -73.574146772698484, 45.524654447640323 ], [ -73.574156760478772, 45.524658409450126 ], [ -73.574314958709209, 45.524486624406023 ], [ -73.57423282482344, 45.524449644004257 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "164746", "ID_UEV": "01016729", "CIVIQUE_DE": "4080", "CIVIQUE_FI": "4080", "NOM_RUE": "rue Saint-André (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "7", "AREA_NEW": "62", "MBG_Width": "7", "MBG_Length": "9", "MBG_Orientation": "33", "Shape_Length": "32", "Shape_Area": "62", "BuildingCategory": "detached", "BuildingVolume": "434", "AspectRatio": 1.233, "SurfacetoVolumeRatio": 0.143, "FloorNu_RawTax": "2", "FloorNu_RawTax.1": "2", "Floor_frmHieght": "2", "TotalFloorArea": "124", "ANNEE_CONS": "1885", "address": "4080" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.574329403251156, 45.523187518837055 ], [ -73.574268326464789, 45.523253620317639 ], [ -73.574345073535241, 45.523287946980233 ], [ -73.574404679473531, 45.523221886909894 ], [ -73.574329403251156, 45.523187518837055 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "147446", "ID_UEV": "01016731", "CIVIQUE_DE": "4082", "CIVIQUE_FI": "4082", "NOM_RUE": "rue Saint-André (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "12", "AREA_NEW": "48", "MBG_Width": "5", "MBG_Length": "14", "MBG_Orientation": "33", "Shape_Length": "38", "Shape_Area": "69", "BuildingCategory": "semi-attached", "BuildingVolume": "576", "AspectRatio": 2.958, "SurfacetoVolumeRatio": 0.083, "FloorNu_RawTax": "2", "FloorNu_RawTax.1": "2", "Floor_frmHieght": "3", "TotalFloorArea": "144", "ANNEE_CONS": "1900", "address": "4082" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.574303534631341, 45.523329405340668 ], [ -73.57427757285474, 45.523359746832789 ], [ -73.574235273212906, 45.52334164705406 ], [ -73.574229072621719, 45.523338947064417 ], [ -73.574163632341296, 45.52341922560192 ], [ -73.574188089582307, 45.523430392031578 ], [ -73.574205073710715, 45.523436847249627 ], [ -73.574205873030081, 45.523437247159158 ], [ -73.574211373945062, 45.523429647136467 ], [ -73.574217234545372, 45.523431762451963 ], [ -73.574309357535597, 45.523332063279497 ], [ -73.574303534631341, 45.523329405340668 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "160240", "ID_UEV": "01016734", "CIVIQUE_DE": "4100", "CIVIQUE_FI": "4100", "NOM_RUE": "rue Saint-André (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "13", "AREA_NEW": "168", "MBG_Width": "12", "MBG_Length": "14", "MBG_Orientation": "122", "Shape_Length": "53", "Shape_Area": "176", "BuildingCategory": "semi-attached", "BuildingVolume": "2184", "AspectRatio": 1.138, "SurfacetoVolumeRatio": 0.077, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "4", "TotalFloorArea": "672", "ANNEE_CONS": "1980", "address": "4100" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.574356272806085, 45.523481946989229 ], [ -73.574403173171007, 45.523498946821199 ], [ -73.574398273101949, 45.523504946546268 ], [ -73.574399974024317, 45.523505647313577 ], [ -73.574456672878796, 45.523526846593043 ], [ -73.574458173233609, 45.523524946952762 ], [ -73.574537773937536, 45.523434046296167 ], [ -73.574494873518475, 45.523415747241344 ], [ -73.574425174074207, 45.523385947682591 ], [ -73.574386445466175, 45.523369468944523 ], [ -73.574300962029042, 45.523461983137004 ], [ -73.574356272806085, 45.523481946989229 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "139578", "ID_UEV": "01104023", "CIVIQUE_DE": "5320", "CIVIQUE_FI": "5320", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Condominium", "Hieght_LiD": "14", "AREA_NEW": "512", "MBG_Width": "17", "MBG_Length": "34", "MBG_Orientation": "123", "Shape_Length": "101", "Shape_Area": "560", "BuildingCategory": "fully-attached", "BuildingVolume": "7168", "AspectRatio": 2.031, "SurfacetoVolumeRatio": 0.071, "FloorNu_RawTax": "1", "FloorNu_RawTax.1": "14", "Floor_frmHieght": "4", "TotalFloorArea": "2048", "ANNEE_CONS": "1988", "address": "5320" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.595845270435873, 45.525129489567512 ], [ -73.595729793915169, 45.525254009935331 ], [ -73.595737081119012, 45.525257345832664 ], [ -73.595938281141557, 45.525348446866509 ], [ -73.596091924064353, 45.525417930219319 ], [ -73.596207672736583, 45.525292624599579 ], [ -73.596138780168857, 45.525275646837358 ], [ -73.596042881484848, 45.525251946544827 ], [ -73.596052580238393, 45.525232546844478 ], [ -73.596052480384614, 45.525232546028597 ], [ -73.595979580480218, 45.525203946510729 ], [ -73.595963780129694, 45.525197546628121 ], [ -73.595865180748319, 45.525156646219315 ], [ -73.5958766816196, 45.525143047187569 ], [ -73.595845270435873, 45.525129489567512 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "132548", "ID_UEV": "01001550", "CIVIQUE_DE": "4575", "CIVIQUE_FI": "4575", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "11", "AREA_NEW": "158", "MBG_Width": "13", "MBG_Length": "13", "MBG_Orientation": "123", "Shape_Length": "52", "Shape_Area": "167", "BuildingCategory": "fully-attached", "BuildingVolume": "1738", "AspectRatio": 1.006, "SurfacetoVolumeRatio": 0.091, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "474", "ANNEE_CONS": "1973", "address": "4575" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.586958475376164, 45.521164531123041 ], [ -73.586889800866061, 45.521239225136924 ], [ -73.586916477872222, 45.521251946580492 ], [ -73.586899376525309, 45.521269645953026 ], [ -73.586895677346433, 45.521273946404456 ], [ -73.587009982857751, 45.521323254327505 ], [ -73.587097731596344, 45.521227812479403 ], [ -73.587083277180113, 45.521221245667 ], [ -73.586960877218203, 45.521165645996419 ], [ -73.586958475376164, 45.521164531123041 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "163117", "ID_UEV": "01096852", "CIVIQUE_DE": "4580", "CIVIQUE_FI": "4580", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "9", "AREA_NEW": "175", "MBG_Width": "11", "MBG_Length": "16", "MBG_Orientation": "33", "Shape_Length": "56", "Shape_Area": "187", "BuildingCategory": "fully-attached", "BuildingVolume": "1575", "AspectRatio": 1.42, "SurfacetoVolumeRatio": 0.111, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "525", "ANNEE_CONS": "1988", "address": "4580" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.587353626853371, 45.521008262997164 ], [ -73.587246055601639, 45.521125108492377 ], [ -73.587251377732215, 45.521127345929564 ], [ -73.587245878376862, 45.521133846077404 ], [ -73.587247177291019, 45.521134446178642 ], [ -73.587295177530677, 45.521152045477081 ], [ -73.587370554753917, 45.521179679534363 ], [ -73.587470291319093, 45.521071571973422 ], [ -73.587457878355508, 45.521064846172926 ], [ -73.587413777696426, 45.521040945975884 ], [ -73.587353626853371, 45.521008262997164 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "131179", "ID_UEV": "01001538", "CIVIQUE_DE": "4588", "CIVIQUE_FI": "4588", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "8", "AREA_NEW": "165", "MBG_Width": "12", "MBG_Length": "14", "MBG_Orientation": "33", "Shape_Length": "53", "Shape_Area": "176", "BuildingCategory": "fully-attached", "BuildingVolume": "1320", "AspectRatio": 1.185, "SurfacetoVolumeRatio": 0.125, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "2", "TotalFloorArea": "330", "ANNEE_CONS": "1987", "address": "4588" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.587470291319093, 45.521071571973422 ], [ -73.587370554753917, 45.521179679534363 ], [ -73.587399377737384, 45.521190246805801 ], [ -73.587467177789705, 45.521215045800488 ], [ -73.58746167744097, 45.521222546581811 ], [ -73.58746267779172, 45.521222945344967 ], [ -73.5875010011558, 45.521239910379478 ], [ -73.587594212536828, 45.521138875055662 ], [ -73.587590177646462, 45.521137145957013 ], [ -73.587590577686598, 45.521136746121172 ], [ -73.587470291319093, 45.521071571973422 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "131178", "ID_UEV": "01001537", "CIVIQUE_DE": "4600", "CIVIQUE_FI": "4600", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "8", "AREA_NEW": "164", "MBG_Width": "12", "MBG_Length": "14", "MBG_Orientation": "33", "Shape_Length": "52", "Shape_Area": "167", "BuildingCategory": "fully-attached", "BuildingVolume": "1312", "AspectRatio": 1.125, "SurfacetoVolumeRatio": 0.125, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "2", "TotalFloorArea": "328", "ANNEE_CONS": "1965", "address": "4600" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.587594212536828, 45.521138875055662 ], [ -73.5875010011558, 45.521239910379478 ], [ -73.587544677625672, 45.521259245977191 ], [ -73.587633128297782, 45.521298318508791 ], [ -73.587727458986549, 45.521196066534301 ], [ -73.587668577536562, 45.521170746140839 ], [ -73.587594212536828, 45.521138875055662 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "153638", "ID_UEV": "05036130", "CIVIQUE_DE": "4605", "CIVIQUE_FI": "4605", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Condominium", "Hieght_LiD": "8", "AREA_NEW": "72", "MBG_Width": "6", "MBG_Length": "13", "MBG_Orientation": "33", "Shape_Length": "40", "Shape_Area": "87", "BuildingCategory": "fully-attached", "BuildingVolume": "576", "AspectRatio": 2.064, "SurfacetoVolumeRatio": 0.125, "FloorNu_RawTax": "1", "FloorNu_RawTax.1": "4", "Floor_frmHieght": "2", "TotalFloorArea": "144", "ANNEE_CONS": "1885", "address": "4605" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.587376211751007, 45.521354413398619 ], [ -73.587283342644369, 45.521455423083637 ], [ -73.587293078217897, 45.521447545641031 ], [ -73.58730407808774, 45.521437746072287 ], [ -73.587366749815743, 45.52147207745368 ], [ -73.587445827511161, 45.521386067799433 ], [ -73.587376211751007, 45.521354413398619 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "131727", "ID_UEV": "01001536", "CIVIQUE_DE": "4610", "CIVIQUE_FI": "4610", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "8", "AREA_NEW": "157", "MBG_Width": "12", "MBG_Length": "14", "MBG_Orientation": "32", "Shape_Length": "50", "Shape_Area": "158", "BuildingCategory": "semi-attached", "BuildingVolume": "1256", "AspectRatio": 1.171, "SurfacetoVolumeRatio": 0.125, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "2", "TotalFloorArea": "314", "ANNEE_CONS": "1965", "address": "4610" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.587727458986549, 45.521196066534301 ], [ -73.587633128297782, 45.521298318508791 ], [ -73.58771717774853, 45.521335446197163 ], [ -73.587759177609982, 45.521354046030808 ], [ -73.587852077664792, 45.521250546075173 ], [ -73.587776678344412, 45.521217146176149 ], [ -73.587776478654106, 45.52121714632959 ], [ -73.587727458986549, 45.521196066534301 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "157628", "ID_UEV": "01001554", "CIVIQUE_DE": "4611", "CIVIQUE_FI": "4611", "NOM_RUE": "rue Saint-Dominique (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "7", "AREA_NEW": "75", "MBG_Width": "6", "MBG_Length": "12", "MBG_Orientation": "33", "Shape_Length": "37", "Shape_Area": "77", "BuildingCategory": "fully-attached", "BuildingVolume": "525", "AspectRatio": 1.845, "SurfacetoVolumeRatio": 0.143, "FloorNu_RawTax": "2", "FloorNu_RawTax.1": "2", "Floor_frmHieght": "2", "TotalFloorArea": "150", "ANNEE_CONS": "1957", "address": "4611" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.587445827511161, 45.521386067799433 ], [ -73.587366749815743, 45.52147207745368 ], [ -73.587432404160182, 45.521508040627523 ], [ -73.587497759527309, 45.521436957192954 ], [ -73.587494878457719, 45.521435546650515 ], [ -73.587513377233805, 45.521416845496361 ], [ -73.58751307738757, 45.521416645961537 ], [ -73.587445827511161, 45.521386067799433 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "139181", "ID_UEV": "01093152", "CIVIQUE_DE": "5155", "CIVIQUE_FI": "5155", "NOM_RUE": "avenue Henri-Julien (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "8", "AREA_NEW": "64", "MBG_Width": "6", "MBG_Length": "11", "MBG_Orientation": "31", "Shape_Length": "35", "Shape_Area": "69", "BuildingCategory": "fully-attached", "BuildingVolume": "512", "AspectRatio": 1.857, "SurfacetoVolumeRatio": 0.125, "FloorNu_RawTax": "2", "FloorNu_RawTax.1": "2", "Floor_frmHieght": "2", "TotalFloorArea": "128", "ANNEE_CONS": "1900", "address": "5155" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.591263464151851, 45.526287638226613 ], [ -73.59119570372313, 45.526365845205341 ], [ -73.591188575795925, 45.526374646826952 ], [ -73.591249879395875, 45.526396446875381 ], [ -73.591270279854825, 45.526372346372639 ], [ -73.591277706501771, 45.526375695939961 ], [ -73.591328157813678, 45.526318265650033 ], [ -73.591271079392968, 45.526291246797555 ], [ -73.591263464151851, 45.526287638226613 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "166967", "ID_UEV": "01093155", "CIVIQUE_DE": "5159", "CIVIQUE_FI": "5159", "NOM_RUE": "avenue Henri-Julien (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "8", "AREA_NEW": "51", "MBG_Width": "7", "MBG_Length": "7", "MBG_Orientation": "34", "Shape_Length": "29", "Shape_Area": "52", "BuildingCategory": "semi-attached", "BuildingVolume": "408", "AspectRatio": 1.071, "SurfacetoVolumeRatio": 0.125, "FloorNu_RawTax": "2", "FloorNu_RawTax.1": "2", "Floor_frmHieght": "2", "TotalFloorArea": "102", "ANNEE_CONS": "1900", "address": "5159" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.591325279587622, 45.526397146983008 ], [ -73.591349479456341, 45.526408547496082 ], [ -73.591402479502975, 45.526353446619567 ], [ -73.591328157813678, 45.526318265650033 ], [ -73.591277706501771, 45.526375695939961 ], [ -73.591325279587622, 45.526397146983008 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "139056", "ID_UEV": "01093163", "CIVIQUE_DE": "5179", "CIVIQUE_FI": "5179", "NOM_RUE": "avenue Henri-Julien (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "11", "AREA_NEW": "114", "MBG_Width": "9", "MBG_Length": "14", "MBG_Orientation": "33", "Shape_Length": "45", "Shape_Area": "119", "BuildingCategory": "semi-attached", "BuildingVolume": "1254", "AspectRatio": 1.565, "SurfacetoVolumeRatio": 0.091, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "342", "ANNEE_CONS": "1959", "address": "5179" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.591514279645494, 45.526551847301953 ], [ -73.591578379026345, 45.526581246777468 ], [ -73.591673979158003, 45.526478447118251 ], [ -73.591580518563475, 45.526435507058615 ], [ -73.591493427647137, 45.526542194330432 ], [ -73.591514279645494, 45.526551847301953 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "161696", "ID_UEV": "01128422", "CIVIQUE_DE": "220", "CIVIQUE_FI": "220", "NOM_RUE": "avenue Laurier Est (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "14", "AREA_NEW": "98", "MBG_Width": "7", "MBG_Length": "14", "MBG_Orientation": "123", "Shape_Length": "42", "Shape_Area": "101", "BuildingCategory": "fully-attached", "BuildingVolume": "1372", "AspectRatio": 1.961, "SurfacetoVolumeRatio": 0.071, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "4", "TotalFloorArea": "392", "ANNEE_CONS": "1995", "address": "220" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.590557624742658, 45.525262900234246 ], [ -73.590504720664725, 45.5253154559067 ], [ -73.590655481713327, 45.525384235282189 ], [ -73.590702512986454, 45.525328897400449 ], [ -73.590557624742658, 45.525262900234246 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "139317", "ID_UEV": "01117392", "CIVIQUE_DE": "3850", "CIVIQUE_FI": "3850", "NOM_RUE": "rue Rivard (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "11", "AREA_NEW": "222", "MBG_Width": "18", "MBG_Length": "19", "MBG_Orientation": "33", "Shape_Length": "75", "Shape_Area": "354", "BuildingCategory": "fully-attached", "BuildingVolume": "2442", "AspectRatio": 1.059, "SurfacetoVolumeRatio": 0.091, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "666", "ANNEE_CONS": "1976", "address": "3850" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.572950668327593, 45.519927696096673 ], [ -73.572816112255566, 45.520073782872913 ], [ -73.572930373562485, 45.52012504677861 ], [ -73.573013449184259, 45.520162315491831 ], [ -73.573092141885695, 45.520076879300881 ], [ -73.573014572629674, 45.520041246634179 ], [ -73.573034772909978, 45.520019445882191 ], [ -73.573027172622233, 45.52001594586261 ], [ -73.573008373584798, 45.520007745934983 ], [ -73.572987472882531, 45.520031345911057 ], [ -73.572906072638432, 45.519995746212771 ], [ -73.572961972343933, 45.519932646098347 ], [ -73.572950668327593, 45.519927696096673 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "162708", "ID_UEV": "01042262", "CIVIQUE_DE": "3800", "CIVIQUE_FI": "3800", "NOM_RUE": "rue De Bullion (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "10", "AREA_NEW": "127", "MBG_Width": "10", "MBG_Length": "18", "MBG_Orientation": "34", "Shape_Length": "57", "Shape_Area": "191", "BuildingCategory": "semi-attached", "BuildingVolume": "1270", "AspectRatio": 1.756, "SurfacetoVolumeRatio": 0.1, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "381", "ANNEE_CONS": "1980", "address": "3800" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.575085773410947, 45.51670754522258 ], [ -73.575005973265348, 45.51679564619446 ], [ -73.575006073102728, 45.516795646128905 ], [ -73.575112351973885, 45.516849027749167 ], [ -73.575241840130744, 45.516711797758802 ], [ -73.575233873745177, 45.51670804526983 ], [ -73.575230873051282, 45.516711545828073 ], [ -73.575191673035178, 45.516754945775844 ], [ -73.575085773410947, 45.51670754522258 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "162718", "ID_UEV": "01042296", "CIVIQUE_DE": "3995", "CIVIQUE_FI": "3995", "NOM_RUE": "rue De Bullion (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "17", "AREA_NEW": "100", "MBG_Width": "9", "MBG_Length": "11", "MBG_Orientation": "34", "Shape_Length": "40", "Shape_Area": "101", "BuildingCategory": "semi-attached", "BuildingVolume": "1700", "AspectRatio": 1.197, "SurfacetoVolumeRatio": 0.059, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "5", "TotalFloorArea": "500", "ANNEE_CONS": "1980", "address": "3995" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.577362113034951, 45.518097894771202 ], [ -73.577285031417759, 45.51818095636402 ], [ -73.577380173814277, 45.518225846199066 ], [ -73.577382873335154, 45.518223045865469 ], [ -73.57745927404018, 45.518144745726659 ], [ -73.577362113034951, 45.518097894771202 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "162726", "ID_UEV": "01001802", "CIVIQUE_DE": "4530", "CIVIQUE_FI": "4530", "NOM_RUE": "avenue Henri-Julien (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "9", "AREA_NEW": "158", "MBG_Width": "12", "MBG_Length": "13", "MBG_Orientation": "122", "Shape_Length": "50", "Shape_Area": "158", "BuildingCategory": "detached", "BuildingVolume": "1422", "AspectRatio": 1.034, "SurfacetoVolumeRatio": 0.111, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "3", "TotalFloorArea": "474", "ANNEE_CONS": "1980", "address": "4530" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.584529976107675, 45.523035946589552 ], [ -73.584668476667062, 45.523096845969846 ], [ -73.584752377018077, 45.523002646985603 ], [ -73.584613876598254, 45.522941746806083 ], [ -73.584529976107675, 45.523035946589552 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "162727", "ID_UEV": "01001804", "CIVIQUE_DE": "4535", "CIVIQUE_FI": "4535", "NOM_RUE": "avenue Henri-Julien (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "11", "AREA_NEW": "161", "MBG_Width": "12", "MBG_Length": "14", "MBG_Orientation": "118", "Shape_Length": "52", "Shape_Area": "169", "BuildingCategory": "semi-attached", "BuildingVolume": "1771", "AspectRatio": 1.118, "SurfacetoVolumeRatio": 0.091, "FloorNu_RawTax": "2", "FloorNu_RawTax.1": "2", "Floor_frmHieght": "3", "TotalFloorArea": "483", "ANNEE_CONS": "1980", "address": "4535" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.584504328100977, 45.523318275073017 ], [ -73.584470063117109, 45.523357528940657 ], [ -73.584430877357136, 45.523409646947947 ], [ -73.584428076873849, 45.52341334646033 ], [ -73.584574755505997, 45.523468170484847 ], [ -73.584656456001568, 45.523374796559551 ], [ -73.584574577402094, 45.523346746210301 ], [ -73.584576876816001, 45.523343546476525 ], [ -73.584505377070585, 45.523318645930914 ], [ -73.584504328100977, 45.523318275073017 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "131611", "ID_UEV": "01042169", "CIVIQUE_DE": "3625", "CIVIQUE_FI": "3625", "NOM_RUE": "avenue Coloniale (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "13", "AREA_NEW": "108", "MBG_Width": "10", "MBG_Length": "11", "MBG_Orientation": "123", "Shape_Length": "42", "Shape_Area": "110", "BuildingCategory": "semi-attached", "BuildingVolume": "1404", "AspectRatio": 1.049, "SurfacetoVolumeRatio": 0.077, "FloorNu_RawTax": "2", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "4", "TotalFloorArea": "432", "ANNEE_CONS": "1973", "address": "3625" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.57205237165654, 45.515028345450077 ], [ -73.572048772358755, 45.515032245832877 ], [ -73.571978971923485, 45.515104845840966 ], [ -73.571984272609697, 45.515107245976758 ], [ -73.572094272716726, 45.515157711689952 ], [ -73.572164341489696, 45.515081822522674 ], [ -73.572142172541405, 45.515071346176207 ], [ -73.57205237165654, 45.515028345450077 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": "134547", "ID_UEV": "01042129", "CIVIQUE_DE": "3875", "CIVIQUE_FI": "3875", "NOM_RUE": "avenue Coloniale (MTL)", "MUNICIPALI": "50", "CODE_UTILI": "1000", "LIBELLE_UT": "Logement", "CATEGORIE_": "Régulier", "Hieght_LiD": "27", "AREA_NEW": "112", "MBG_Width": "11", "MBG_Length": "14", "MBG_Orientation": "33", "Shape_Length": "50", "Shape_Area": "155", "BuildingCategory": "fully-attached", "BuildingVolume": "3024", "AspectRatio": 1.289, "SurfacetoVolumeRatio": 0.037, "FloorNu_RawTax": "3", "FloorNu_RawTax.1": "3", "Floor_frmHieght": "7", "TotalFloorArea": "784", "ANNEE_CONS": "1973", "address": "3875" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.576000098523508, 45.516821494809243 ], [ -73.575908548254077, 45.516921029508254 ], [ -73.575935773506615, 45.516893646348187 ], [ -73.576049597104998, 45.516949519138542 ], [ -73.576124280154033, 45.516868322630735 ], [ -73.576119173713266, 45.516865945954223 ], [ -73.576052272640453, 45.516834845219037 ], [ -73.576044972979702, 45.516842445636847 ], [ -73.576000098523508, 45.516821494809243 ] ] ] } }
]
}

View File

@ -1,135 +0,0 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.5680637695714,
45.49212884162544
],
[
-73.56802228176146,
45.49217205619571
],
[
-73.56815668696326,
45.49223626189717
],
[
-73.56815766959974,
45.49223524178655
],
[
-73.56818746886172,
45.49224944155107
],
[
-73.56822816806918,
45.49220694186927
],
[
-73.5680637695714,
45.49212884162544
]
]
]
},
"id": 175785,
"properties": {
"name": "01044602",
"address": "rue Victor-Hugo (MTL) 1630",
"function": "1000",
"height": 12,
"year_of_construction": 1950
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.56802228176146,
45.49217205619571
],
[
-73.56798225825526,
45.492213743742184
],
[
-73.56811660206223,
45.49227791893211
],
[
-73.56815668696326,
45.49223626189717
],
[
-73.56802228176146,
45.49217205619571
]
]
]
},
"id": 176293,
"properties": {
"name": "01044604",
"address": "rue Victor-Hugo (MTL) 1636",
"function": "1000",
"height": 12,
"year_of_construction": 1986
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.56809506939487,
45.49209624228538
],
[
-73.56809246893268,
45.4920988416879
],
[
-73.56821287000538,
45.49216124158406
],
[
-73.56822186852654,
45.49216584161625
],
[
-73.56826745951075,
45.492118613912375
],
[
-73.56813497596143,
45.49205532773507
],
[
-73.56809506939487,
45.49209624228538
]
]
]
},
"id": 182393,
"properties": {
"name": "01044601",
"address": "rue Victor-Hugo (MTL) 1626",
"function": "1000",
"height": 8,
"year_of_construction": 1901
}
}
]
}

View File

@ -1,52 +0,0 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.5680637695714,
45.49212884162544
],
[
-73.56802228176146,
45.49217205619571
],
[
-73.56815668696326,
45.49223626189717
],
[
-73.56815766959974,
45.49223524178655
],
[
-73.56818746886172,
45.49224944155107
],
[
-73.56822816806918,
45.49220694186927
],
[
-73.5680637695714,
45.49212884162544
]
]
]
},
"id": 175785,
"properties": {
"name": "01044602",
"address": "rue Victor-Hugo (MTL) 1630",
"function": "1000",
"height": 12,
"year_of_construction": 2010
}
}
]
}

View File

@ -1,135 +0,0 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.5680637695714,
45.49212884162544
],
[
-73.56802228176146,
45.49217205619571
],
[
-73.56815668696326,
45.49223626189717
],
[
-73.56815766959974,
45.49223524178655
],
[
-73.56818746886172,
45.49224944155107
],
[
-73.56822816806918,
45.49220694186927
],
[
-73.5680637695714,
45.49212884162544
]
]
]
},
"id": 175785,
"properties": {
"name": "01044602",
"address": "rue Victor-Hugo (MTL) 1630",
"function": "1000",
"height": 12,
"year_of_construction": 1986
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.56802228176146,
45.49217205619571
],
[
-73.56798225825526,
45.492213743742184
],
[
-73.56811660206223,
45.49227791893211
],
[
-73.56815668696326,
45.49223626189717
],
[
-73.56802228176146,
45.49217205619571
]
]
]
},
"id": 176293,
"properties": {
"name": "01044604",
"address": "rue Victor-Hugo (MTL) 1636",
"function": "1000",
"height": 12,
"year_of_construction": 1986
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.56809506939487,
45.49209624228538
],
[
-73.56809246893268,
45.4920988416879
],
[
-73.56821287000538,
45.49216124158406
],
[
-73.56822186852654,
45.49216584161625
],
[
-73.56826745951075,
45.492118613912375
],
[
-73.56813497596143,
45.49205532773507
],
[
-73.56809506939487,
45.49209624228538
]
]
]
},
"id": 182393,
"properties": {
"name": "01044601",
"address": "rue Victor-Hugo (MTL) 1626",
"function": "1000",
"height": 8,
"year_of_construction": 1986
}
}
]
}

View File

@ -1,20 +0,0 @@
{
"175785": {
"retrofit_types": ["construction", "windows", "infiltration"],
"wall_u_value": 0.2,
"roof_u_value": 0.15,
"ground_u_value": 0.18,
"infiltration_reduction": 30,
"window_u_value": 1.1,
"window_g_value": 0.6
},
"176293": {
"retrofit_types": ["windows"],
"window_u_value": 1.3,
"window_g_value": 0.5
},
"182393": {
"retrofit_types": ["infiltration"],
"infiltration_reduction": 25
}
}

15
main.py
View File

@ -6,17 +6,11 @@ from hub.helpers.dictionaries import Dictionaries
from hub.imports.construction_factory import ConstructionFactory
from hub.imports.usage_factory import UsageFactory
from hub.imports.weather_factory import WeatherFactory
from hub.imports.retrofit_factory import RetrofitFactory
import json
# Specify the GeoJSON file path
input_files_path = (Path(__file__).parent / 'input_files')
input_files_path.mkdir(parents=True, exist_ok=True)
geojson_file = process_geojson(x=-73.5681295982132, y=45.49218262677643, diff=0.0001)
geojson_file_path = input_files_path / 'input_buildings.geojson'
retrofit_json_file_path = input_files_path / 'retrofit_scenarios.json'
with open(retrofit_json_file_path, 'r') as f:
retrofit_data = json.load(f)
geojson_file_path = input_files_path / 'output_buildings.geojson'
output_path = (Path(__file__).parent / 'out_files').resolve()
output_path.mkdir(parents=True, exist_ok=True)
# Create city object from GeoJSON file
@ -27,11 +21,8 @@ city = GeometryFactory('geojson',
function_field='function',
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
# Enrich city data
ConstructionFactory('cerc', city).enrich()
UsageFactory('cerc', city).enrich()
RetrofitFactory(retrofit_data, city).enrich()
ConstructionFactory('nrcan', city).enrich()
UsageFactory('nrcan', city).enrich()
WeatherFactory('epw', city).enrich()
energy_plus_workflow(city)