Merge branch 'units_in_comnet_catalog' into 'master'

Solved bug in comnet catalog when changing from feet to meter and from fahrenheit to celsius

See merge request Guille/hub!25
This commit is contained in:
Guillermo Gutierrez Morote 2022-06-08 19:06:30 +00:00
commit bf932e5d52
2 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ class ComnetCatalog(Catalog):
self._schedules[schedule_name]['Occupancy']) self._schedules[schedule_name]['Occupancy'])
# get lighting # get lighting
density = lighting_archetype[4] / pow(cte.METERS_TO_FEET,2) density = lighting_archetype[4] * pow(cte.METERS_TO_FEET, 2)
lighting = Lighting(density, lighting = Lighting(density,
lighting_convective, lighting_convective,
lighting_radiative, lighting_radiative,
@ -78,7 +78,7 @@ class ComnetCatalog(Catalog):
if density == 'n.a.': if density == 'n.a.':
density = 0 density = 0
# convert W/ft2 to W/m2 # convert W/ft2 to W/m2
density = float(density) / pow(cte.METERS_TO_FEET,2) density = float(density) * pow(cte.METERS_TO_FEET, 2)
appliances = Appliances(density, appliances = Appliances(density,
appliances_convective, appliances_convective,
appliances_radiative, appliances_radiative,
@ -154,7 +154,7 @@ class ComnetCatalog(Catalog):
_schedule_values[day] = _extracted_data.iloc[start:end, 3:27].to_numpy().tolist()[0] _schedule_values[day] = _extracted_data.iloc[start:end, 3:27].to_numpy().tolist()[0]
_schedule = [] _schedule = []
for day in _schedule_values: for day in _schedule_values:
if schedule_data_type == 'temperature': if schedule_name == 'ClgSetPt' or schedule_name == 'HtgSetPt':
# to celsius # to celsius
if 'n.a.' in _schedule_values[day]: if 'n.a.' in _schedule_values[day]:
_schedule_values[day] = None _schedule_values[day] = None

View File

@ -244,7 +244,7 @@ class ThermalZone:
return None return None
self._usage = '' self._usage = ''
for usage_zone in self._parent_internal_zone.usage_zones: for usage_zone in self._parent_internal_zone.usage_zones:
self._usage += str(round(usage_zone.percentage*100)) + '-' + usage_zone.usage + '_' self._usage += str(round(usage_zone.percentage * 100)) + '-' + usage_zone.usage + '_'
self._usage = self._usage[:-1] self._usage = self._usage[:-1]
return self._usage return self._usage