dhw schedule fix attempt

This commit is contained in:
Guille Gutierrez 2023-04-12 09:35:27 -04:00
parent 40fe325a18
commit 89faa92103

View File

@ -249,26 +249,15 @@ class Idf:
return self._add_standard_compact_hourly_schedule(usage, schedule_type, new_schedules)
def _add_servicetemp_schedules(self, thermal_zone):
#todo: clean Domestic Hot Water
_schedule = Schedule()
_schedule.type = cte.DOMESTIC_HOT_WATER
_schedule.data_type = cte.TEMPERATURE
_schedule.time_step = cte.HOUR
_schedule.time_range = cte.DAY
#_schedule.day_types = copy.deepcopy(hvac_availability_schedule.day_types)
_servicetemp_values = []
for schedule_value in thermal_zone._domestic_hot_water.schedules:
if schedule_value == 0:
_servicetemp_values.append(60)
else:
_servicetemp_values.append(60)
_schedule.values = _servicetemp_values
_servicetemp_values.append(_schedule)
for schedule in self._idf.idfobjects[self._HOURLY_SCHEDULE]:
if schedule.Name == f'DHW_temp schedules {thermal_zone.usage_name}':
return
return self._add_standard_compact_hourly_schedule(thermal_zone.usage_name, 'DHW_temp', _servicetemp_values)
_schedule.values = [thermal_zone.domestic_hot_water.service_temperature for _ in range(0, 8760)]
print(_schedule.values)
return self._add_standard_compact_hourly_schedule(thermal_zone.usage, cte.DOMESTIC_HOT_WATER, _schedule)
def _add_construction(self, thermal_boundary):
for construction in self._idf.idfobjects[self._CONSTRUCTION]: