Skip to content

Commit d07b089

Browse files
authored
Merge pull request #1867 from pnnl/RCT/JDJ/19-13-bugfix-filter-NA-systems
RCT/JDJ/19-13 bugfix filter na systems
2 parents a3aaa06 + 593ea72 commit d07b089

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

rct229/rulesets/ashrae9012019/section19/section19rule13.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ def create_data(self, context, data):
9696
rmd_b = context.BASELINE_0
9797
rmd_p = context.PROPOSED
9898

99+
baseline_system_types_dict_b = get_baseline_system_types(rmd_b)
100+
applicable_hvac_sys_ids = [
101+
hvac_id
102+
for sys_type in baseline_system_types_dict_b
103+
for target_sys_type in APPLICABLE_SYS_TYPES
104+
if baseline_system_type_compare(sys_type, target_sys_type, False)
105+
for hvac_id in baseline_system_types_dict_b[sys_type]
106+
]
99107
dict_of_zones_and_terminal_units_served_by_hvac_sys_b = (
100108
get_dict_of_zones_and_terminal_units_served_by_hvac_sys(rmd_b)
101109
)
@@ -104,6 +112,8 @@ def create_data(self, context, data):
104112
design_thermostat_cooling_setpoint = []
105113
design_thermostat_heating_setpoint = []
106114
for hvac_id_b in dict_of_zones_and_terminal_units_served_by_hvac_sys_b:
115+
if hvac_id_b not in applicable_hvac_sys_ids:
116+
continue
107117
zone_info[hvac_id_b] = {
108118
"are_all_hvac_sys_fan_objs_autosized": are_all_hvac_sys_fan_objs_autosized(
109119
rmd_b, hvac_id_b
@@ -217,8 +227,14 @@ def create_data(self, context, data):
217227

218228
return {
219229
"zone_info": zone_info,
230+
"applicable_hvac_sys_ids": applicable_hvac_sys_ids,
220231
}
221232

233+
def list_filter(self, context_item, data):
234+
applicable_hvac_sys_ids = data["applicable_hvac_sys_ids"]
235+
236+
return context_item.BASELINE_0["id"] in applicable_hvac_sys_ids
237+
222238
class HVACRule(RuleDefinitionBase):
223239
def __init__(self):
224240
super(PRM9012019Rule77j17.HVACRule, self).__init__(

0 commit comments

Comments
 (0)