solved_bugs_ep #27
@ -446,10 +446,6 @@ class Idf:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def _add_infiltration(self, thermal_zone, zone_name):
|
def _add_infiltration(self, thermal_zone, zone_name):
|
||||||
|
|
||||||
for zone in self._idf.idfobjects["ZONE"]:
|
|
||||||
if zone.Name == f'{zone_name}_infiltration':
|
|
||||||
return
|
|
||||||
schedule = f'Infiltration schedules {thermal_zone.usage_name}'
|
schedule = f'Infiltration schedules {thermal_zone.usage_name}'
|
||||||
self._idf.newidfobject(self._INFILTRATION,
|
self._idf.newidfobject(self._INFILTRATION,
|
||||||
Name=f'{zone_name}_infiltration',
|
Name=f'{zone_name}_infiltration',
|
||||||
@ -460,9 +456,6 @@ class Idf:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def _add_ventilation(self, thermal_zone, zone_name):
|
def _add_ventilation(self, thermal_zone, zone_name):
|
||||||
for zone in self._idf.idfobjects["ZONE"]:
|
|
||||||
if zone.Name == f'{zone_name}_ventilation':
|
|
||||||
return
|
|
||||||
schedule = f'Ventilation schedules {thermal_zone.usage_name}'
|
schedule = f'Ventilation schedules {thermal_zone.usage_name}'
|
||||||
self._idf.newidfobject(self._VENTILATION,
|
self._idf.newidfobject(self._VENTILATION,
|
||||||
Name=f'{zone_name}_ventilation',
|
Name=f'{zone_name}_ventilation',
|
||||||
@ -514,6 +507,7 @@ class Idf:
|
|||||||
self._rename_building(self._city.name)
|
self._rename_building(self._city.name)
|
||||||
self._lod = self._city.level_of_detail.geometry
|
self._lod = self._city.level_of_detail.geometry
|
||||||
for building in self._city.buildings:
|
for building in self._city.buildings:
|
||||||
|
print('building name', building.name)
|
||||||
for internal_zone in building.internal_zones:
|
for internal_zone in building.internal_zones:
|
||||||
if internal_zone.thermal_zones is None:
|
if internal_zone.thermal_zones is None:
|
||||||
continue
|
continue
|
||||||
|
@ -5,6 +5,7 @@ Copyright © 2022 Concordia CERC group
|
|||||||
Project Coder Guillermo Gutierrez Guillermo.GutierrezMorote@concordia.ca
|
Project Coder Guillermo Gutierrez Guillermo.GutierrezMorote@concordia.ca
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import uuid
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -120,16 +121,17 @@ class Geojson:
|
|||||||
year_of_construction = int(feature['properties'][self._year_of_construction_field])
|
year_of_construction = int(feature['properties'][self._year_of_construction_field])
|
||||||
function = None
|
function = None
|
||||||
if self._function_field is not None:
|
if self._function_field is not None:
|
||||||
function = feature['properties'][self._function_field]
|
function = str(feature['properties'][self._function_field])
|
||||||
if self._function_to_hub is not None:
|
if self._function_to_hub is not None:
|
||||||
# use the transformation dictionary to retrieve the proper function
|
# use the transformation dictionary to retrieve the proper function
|
||||||
if function in self._function_to_hub:
|
if function in self._function_to_hub:
|
||||||
function = self._function_to_hub[function]
|
function = self._function_to_hub[function]
|
||||||
geometry = feature['geometry']
|
geometry = feature['geometry']
|
||||||
building_name = ''
|
|
||||||
building_aliases = []
|
building_aliases = []
|
||||||
if 'id' in feature:
|
if 'id' in feature:
|
||||||
building_name = feature['id']
|
building_name = feature['id']
|
||||||
|
else:
|
||||||
|
building_name = uuid.uuid4()
|
||||||
if self._aliases_field is not None:
|
if self._aliases_field is not None:
|
||||||
|
|
||||||
for alias_field in self._aliases_field:
|
for alias_field in self._aliases_field:
|
||||||
|
Loading…
Reference in New Issue
Block a user