Skip to content

Commit

Permalink
Merge pull request #1424 from pnnl/RS/JX/Rule12-2
Browse files Browse the repository at this point in the history
RS/JX/Rule12-2
  • Loading branch information
weilixu authored Aug 23, 2024
2 parents 1600bb6 + b047fdd commit 06bbe40
Show file tree
Hide file tree
Showing 10 changed files with 123,619 additions and 241 deletions.
8 changes: 4 additions & 4 deletions docs/section12/Rule12-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
**Applicability Checks:** None

**Function Call**
match_data_element, compare_schedules
find_exactly_one_schedule, find_all, compare_schedules


## Rule Logic:
Expand All @@ -29,9 +29,9 @@ match_data_element, compare_schedules
**Rule Assertion:**
Case 1: The baseline and proposed miscelleaneous equipment schedules match for all hours: PASS `if comparison_data['total_hours_matched'] == len(misc_equip_schedule_b == len(misc_equip_schedule_p): PASS`
Case 2: The baseline and proposed miscelleaneous equipment both have automatic controls, but schedules have unequal equivalent full load hours: FAIL and raise message `elif auto_receptacle_control_p and auto_receptacle_control_b and comparison_data["eflh_difference"] != 0: FAIL and raise_message = "The baseline miscellaneous equipment schedule has automatic receptacle controls indicating that there is an applicable requirement for automatic controls for the space in Section 8.4.2. Miscellaneous equipment schedules may only differ when the proposed design has automatic receptacle controls and there are no applicable requirements in Section 8.4.2 for the space."`
Case 3: The proposed miscellaneous equipment schedule has fewer equivalent full load hours than the baseline miscellaneous equipment schedule, the proposed has automatic receptacle control, and the space type is not expected to have receptacle control requirements in Section 8.4.2 : PASS `elif comparison_data["eflh_difference"] > 0 and auto_receptacle_controls_p and space_type_b not in EXPECTED_RECEPTACLE_CONTROL_SPACE_TYPES: PASS`
Case 4: The proposed miscellaneous equipment schedule has fewer equivalent full load hours than the baseline miscellaneous equipment schedule, the proposed has automatic receptacle control, and the space type may have receptacle control requirements in Section 8.4.2, or the lighting space type was not defined : UNDETERMINED and raise message`elif (comparison_data["eflh_difference"] > 0 and auto_receptacle_controls_p and space_type_b in EXPECTED_RECEPTACLE_CONTROL_SPACE_TYPES) or space_type_b is None: UNDETERMINED and raise_message="A reduced schedule and automatic receptacle controls are present in the proposed design. The space type may have receptacle control requirements in Section 8.4.2. If that is the case, there should be no reduced schedule modeled."`
Case 5: The proposed miscellaneous equipment schedule has fewer equivalent full load hours than the baseline miscellaneous equipment schedule, the proposed does not have automatic receptacle control : FAIL `elif comparison_data["eflh_difference"] > 0 and not auto_receptacle_controls_p: FAIL`
Case 3: The proposed miscellaneous equipment schedule has fewer equivalent full load hours than the baseline miscellaneous equipment schedule, the proposed has automatic receptacle control, and the space type is not expected to have receptacle control requirements in Section 8.4.2 : PASS `elif comparison_data["eflh_difference"] > 0 and auto_receptacle_control_p and space_type_b not in EXPECTED_RECEPTACLE_CONTROL_SPACE_TYPES: PASS`
Case 4: The proposed miscellaneous equipment schedule has fewer equivalent full load hours than the baseline miscellaneous equipment schedule, the baseline does not have automatic receptacle control, the proposed has automatic receptacle control, and the space type may have receptacle control requirements in Section 8.4.2, or the lighting space type was not defined : UNDETERMINED and raise message`elif (comparison_data["eflh_difference"] > 0 and not auto_receptacle_control_b and auto_receptacle_control_p and space_type_b in EXPECTED_RECEPTACLE_CONTROL_SPACE_TYPES) or space_type_b is None: UNDETERMINED and raise_message="A reduced schedule and automatic receptacle controls are present in the proposed design. The space type may have receptacle control requirements in Section 8.4.2. If that is the case, there should be no reduced schedule modeled."`
Case 5: The proposed miscellaneous equipment schedule has fewer equivalent full load hours than the baseline miscellaneous equipment schedule, the proposed does not have automatic receptacle control : FAIL `elif comparison_data["eflh_difference"] > 0 and not auto_receptacle_control_p: FAIL`
Case 6: The proposed miscellaneous equipment schedule has more equivalent full load hours than the baseline miscellaneous equipment schedule: FAIL `elif comparison_data["eflh_difference"] < 0: FAIL and raise_msg = "Rule evaluation fails with a conservative outcome. The proposed schedule equivalent full load hours is greater than the baseline."`
Case 7: The proposed automatic receptacle control was not specified: UNDETERMINED and raise message`elif auto_receptacle_control_p == Null: UNDETERMINED and raise_message = "The proposed miscellaneous equipment schedule has reduced equivalent full load hours compared the baseline but it could not be determined if automatic receptacle controls are present in the proposed design to justify the credit."`
Case 8: Else: FAIL `else: FAIL`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,26 @@ def get_surface_conditioning_category_dict(climate_zone, building):
# Loop through all the surfaces in the zone
for surface in find_all("surfaces[*]", zone):
surface_adjacent_to = surface["adjacent_to"]
surface_conditioning_category_dict[surface["id"]] = SCC_DATA_FRAME.at[
# row index
zcc,
# column index
adjacency = (
zcc_dict[getattr_(surface, "surface", "adjacent_zone")]
if surface_adjacent_to == SurfaceAdjacency.INTERIOR
else surface_adjacent_to,
]
else surface_adjacent_to
)

if adjacency in [SurfaceAdjacency.IDENTICAL, SurfaceAdjacency.UNDEFINED]:
surface_conditioning_category_dict[
surface["id"]
] = SurfaceConditioningCategory.UNREGULATED

elif zcc in SCC_DATA_FRAME.index and adjacency in SCC_DATA_FRAME.columns:
surface_conditioning_category_dict[surface["id"]] = SCC_DATA_FRAME.at[
zcc, # row index
adjacency, # column index
]

else:
raise ValueError(
f"Combination of zone conditioning category '{zcc}' and surface adjacency '{adjacency}' has no mapping to a surface conditioning category"
)

return surface_conditioning_category_dict
1 change: 1 addition & 0 deletions rct229/rulesets/ashrae9012019/section12/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

__all__ = [
"section12rule1",
"section12rule2",
"section12rule3",
"section12rule4",
]
Expand Down
45 changes: 0 additions & 45 deletions rct229/rulesets/ashrae9012019/section12/archive/section12rule1.py

This file was deleted.

56 changes: 0 additions & 56 deletions rct229/rulesets/ashrae9012019/section12/archive/section12rule3.py

This file was deleted.

Loading

0 comments on commit 06bbe40

Please sign in to comment.