Correct schedules duplication bug

This commit is contained in:
Guille Gutierrez 2022-06-09 11:02:45 -04:00
parent bf932e5d52
commit 98769670d9

View File

@ -157,6 +157,9 @@ class Idf:
) )
def _add_standard_compact_hourly_schedule(self, usage, schedule_type, schedules): 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}', _kwargs = {'Name': f'{schedule_type} schedules {usage}',
'Schedule_Type_Limits_Name': self.idf_type_limits[schedules[0].data_type], 'Schedule_Type_Limits_Name': self.idf_type_limits[schedules[0].data_type],
'Field_1': 'Through: 12/31'} 'Field_1': 'Through: 12/31'}
@ -222,7 +225,7 @@ class Idf:
else: else:
_total_heat = (_occ.sensible_convective_internal_gain + _occ.sensible_radiative_internal_gain _total_heat = (_occ.sensible_convective_internal_gain + _occ.sensible_radiative_internal_gain
+ _occ.latent_internal_gain) / _occ.occupancy_density + _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}': if schedule.Name == f'Activity Level schedules {thermal_zone.usage}':
return return
_kwargs = {'Name': f'Activity Level schedules {thermal_zone.usage}', _kwargs = {'Name': f'Activity Level schedules {thermal_zone.usage}',