changed return to continue to process the rest of the buildings

This commit is contained in:
Pilar 2023-03-16 15:56:24 -04:00
parent ae6655fe3d
commit 508513f702
4 changed files with 9 additions and 9 deletions

View File

@ -45,7 +45,7 @@ class NrcanPhysicsParameters:
sys.stderr.write(f'Building {building.name} has unknown construction archetype for building function: '
f'{building.function}, building year of construction: {building.year_of_construction} '
f'and climate zone {self._climate_zone}\n')
return
continue
# if building has no thermal zones defined from geometry, and the building will be divided in storeys,
# one thermal zone per storey is assigned
if len(building.internal_zones) == 1:

View File

@ -39,14 +39,14 @@ class NrelPhysicsParameters:
archetype = self._search_archetype(nrel_catalog, function, building.year_of_construction,
self._climate_zone)
except KeyError:
logger.error(f'Building {building.name} has unknown archetype for building function: {building.function} '
f'and building year of construction: {building.year_of_construction} '
logger.error(f'Building {building.name} has unknown construction archetype for building function: '
f'{building.function} and building year of construction: {building.year_of_construction} '
f'and climate zone reference norm {self._climate_zone}\n')
sys.stderr.write(f'Building {building.name} has unknown archetype for building function: {building.function} '
f'and building year of construction: {building.year_of_construction} '
sys.stderr.write(f'Building {building.name} has unknown construction archetype for building function: '
f'{building.function} and building year of construction: {building.year_of_construction} '
f'and climate zone reference norm {self._climate_zone}\n')
return
continue
# if building has no thermal zones defined from geometry, and the building will be divided in storeys,
# one thermal zone per storey is assigned

View File

@ -42,7 +42,7 @@ class ComnetUsageParameters:
except KeyError:
sys.stderr.write(f'Building {building.name} has unknown usage archetype for building function:'
f' {building.function}')
return
continue
for internal_zone in building.internal_zones:
if internal_zone.area is None:

View File

@ -41,7 +41,7 @@ class NrcanUsageParameters:
except KeyError:
sys.stderr.write(f'Building {building.name} has unknown usage archetype for building function:'
f' {building.function}')
return
continue
usage_name = Dictionaries().hub_usage_to_comnet_usage[building.function]
try:
@ -49,7 +49,7 @@ class NrcanUsageParameters:
except KeyError:
sys.stderr.write(f'Building {building.name} has unknown usage archetype for building function:'
f' {building.function}')
return
continue
for internal_zone in building.internal_zones:
if internal_zone.area is None: