forked from s_ranjbar/city_retrofit
thermal zone now uses an internal flag to select where usage_zones need to be taken from parent or from the own usage_zones
This commit is contained in:
parent
920d95eef2
commit
2799de760d
|
@ -41,8 +41,10 @@ class ThermalZone:
|
||||||
self._ordinate_number = None
|
self._ordinate_number = None
|
||||||
self._view_factors_matrix = None
|
self._view_factors_matrix = None
|
||||||
self._total_floor_area = None
|
self._total_floor_area = None
|
||||||
|
|
||||||
self._usage = usage
|
self._usage = usage
|
||||||
|
self._usage_from_parent = False
|
||||||
|
if usage is None:
|
||||||
|
self._usage_from_parent = True
|
||||||
self._hours_day = None
|
self._hours_day = None
|
||||||
self._days_year = None
|
self._days_year = None
|
||||||
self._mechanical_air_change = None
|
self._mechanical_air_change = None
|
||||||
|
@ -56,7 +58,7 @@ class ThermalZone:
|
||||||
@property
|
@property
|
||||||
def usage_zones(self):
|
def usage_zones(self):
|
||||||
# example 70-office_30-residential
|
# example 70-office_30-residential
|
||||||
if self._usage is None:
|
if self._usage_from_parent:
|
||||||
self._usage_zones = copy.deepcopy(self._parent_internal_zone.usage_zones)
|
self._usage_zones = copy.deepcopy(self._parent_internal_zone.usage_zones)
|
||||||
else:
|
else:
|
||||||
values = self._usage.split('_')
|
values = self._usage.split('_')
|
||||||
|
@ -237,7 +239,7 @@ class ThermalZone:
|
||||||
Get thermal zone usage
|
Get thermal zone usage
|
||||||
:return: None or str
|
:return: None or str
|
||||||
"""
|
"""
|
||||||
if self._usage is None:
|
if self._usage_from_parent:
|
||||||
if self._parent_internal_zone.usage_zones is None:
|
if self._parent_internal_zone.usage_zones is None:
|
||||||
return None
|
return None
|
||||||
self._usage = ''
|
self._usage = ''
|
||||||
|
|
Loading…
Reference in New Issue
Block a user