From 508513f70237d28e54c77b9d38be5cb6dd9d3344 Mon Sep 17 00:00:00 2001 From: Pilar Date: Thu, 16 Mar 2023 15:56:24 -0400 Subject: [PATCH] changed return to continue to process the rest of the buildings --- hub/imports/construction/nrcan_physics_parameters.py | 2 +- hub/imports/construction/nrel_physics_parameters.py | 10 +++++----- hub/imports/usage/comnet_usage_parameters.py | 2 +- hub/imports/usage/nrcan_usage_parameters.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hub/imports/construction/nrcan_physics_parameters.py b/hub/imports/construction/nrcan_physics_parameters.py index 3ad1d1e0..294f89cd 100644 --- a/hub/imports/construction/nrcan_physics_parameters.py +++ b/hub/imports/construction/nrcan_physics_parameters.py @@ -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: diff --git a/hub/imports/construction/nrel_physics_parameters.py b/hub/imports/construction/nrel_physics_parameters.py index 78f08d30..a7f11cdf 100644 --- a/hub/imports/construction/nrel_physics_parameters.py +++ b/hub/imports/construction/nrel_physics_parameters.py @@ -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 diff --git a/hub/imports/usage/comnet_usage_parameters.py b/hub/imports/usage/comnet_usage_parameters.py index 6dcab450..c4f99640 100644 --- a/hub/imports/usage/comnet_usage_parameters.py +++ b/hub/imports/usage/comnet_usage_parameters.py @@ -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: diff --git a/hub/imports/usage/nrcan_usage_parameters.py b/hub/imports/usage/nrcan_usage_parameters.py index 68d8a2bf..816cce38 100644 --- a/hub/imports/usage/nrcan_usage_parameters.py +++ b/hub/imports/usage/nrcan_usage_parameters.py @@ -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: