From 98769670d9c2f4660676a7e605496374ebc23e2e Mon Sep 17 00:00:00 2001 From: guille Date: Thu, 9 Jun 2022 11:02:45 -0400 Subject: [PATCH] Correct schedules duplication bug --- exports/formats/idf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exports/formats/idf.py b/exports/formats/idf.py index 685de9cd..8aa46a03 100644 --- a/exports/formats/idf.py +++ b/exports/formats/idf.py @@ -157,6 +157,9 @@ class Idf: ) def _add_standard_compact_hourly_schedule(self, usage, schedule_type, schedules): + for schedule in self._idf.idfobjects[self._COMPACT_SCHEDULE]: + if schedule.Name == f'{schedule_type} schedules {usage}': + return _kwargs = {'Name': f'{schedule_type} schedules {usage}', 'Schedule_Type_Limits_Name': self.idf_type_limits[schedules[0].data_type], 'Field_1': 'Through: 12/31'} @@ -222,7 +225,7 @@ class Idf: else: _total_heat = (_occ.sensible_convective_internal_gain + _occ.sensible_radiative_internal_gain + _occ.latent_internal_gain) / _occ.occupancy_density - for schedule in self._idf.idfobjects[self._HOURLY_SCHEDULE]: + for schedule in self._idf.idfobjects[self._COMPACT_SCHEDULE]: if schedule.Name == f'Activity Level schedules {thermal_zone.usage}': return _kwargs = {'Name': f'Activity Level schedules {thermal_zone.usage}',