Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f9dcf43
Copied section 6 2019 to 2022
yunjoonjung-PNNL Dec 22, 2025
caec79a
Copied section 21 2019 to 2022
yunjoonjung-PNNL Dec 22, 2025
780ca34
Copied section 22 2019 to 2022
yunjoonjung-PNNL Dec 22, 2025
101724b
Copied section 12 2019 to 2022
yunjoonjung-PNNL Dec 22, 2025
532c18c
Copied section 18 2019 to 2022
yunjoonjung-PNNL Dec 22, 2025
c720f1f
Copied section 10 2019 to 2022
yunjoonjung-PNNL Dec 22, 2025
d002b44
Copied section 16 2019 to 2022
yunjoonjung-PNNL Dec 22, 2025
1d3a862
Copied section 23 2019 to 2022
yunjoonjung-PNNL Dec 22, 2025
e32fff5
Copied section 11 2019 to 2022
yunjoonjung-PNNL Dec 23, 2025
19b3f7e
Ensure function unit tests pass
yunjoonjung-PNNL Dec 23, 2025
56f71e0
Updated __init__ files
yunjoonjung-PNNL Dec 23, 2025
ab1e50e
Copied section 1 2019 to 2022
yunjoonjung-PNNL Dec 23, 2025
90a75c9
Copied section 19 2019 to 2022
yunjoonjung-PNNL Dec 23, 2025
37f3ef1
Added missing functions/data
yunjoonjung-PNNL Dec 23, 2025
74e71ed
Copied section 4 2019 to 2022
yunjoonjung-PNNL Dec 23, 2025
05bc596
Updated function and init file
yunjoonjung-PNNL Dec 23, 2025
0fb16a9
Corrected 5-42
yunjoonjung-PNNL Dec 23, 2025
4af36c7
black formatting
yunjoonjung-PNNL Dec 23, 2025
6769b08
Added missing funs, sections 4, 6, 11, 16, 18 JSONs
yunjoonjung-PNNL Dec 23, 2025
14c931b
Added sections 21, 22, 23 JSONs
yunjoonjung-PNNL Dec 23, 2025
c3081d7
Added section 19 JSONs
yunjoonjung-PNNL Dec 23, 2025
578c021
Added master JSON files
yunjoonjung-PNNL Dec 23, 2025
7d2da30
Copied section 5 2019 to 2022
yunjoonjung-PNNL Dec 23, 2025
3cc03c5
Added missing JSONs
yunjoonjung-PNNL Dec 23, 2025
696bc7d
Fixed 10-1 JSON message
yunjoonjung-PNNL Dec 23, 2025
a6d0375
Deleted unused JSON file
yunjoonjung-PNNL Dec 23, 2025
de39c69
Modified 2022 rules based on updated 2019
yunjoonjung-PNNL Jan 6, 2026
3fc6a4f
isort/black formatting
yunjoonjung-PNNL Jan 7, 2026
5cdc89b
Added "RCT_DISABLE_CACHE" settting in ruletests file
yunjoonjung-PNNL Jan 7, 2026
61f3ba9
Corrected library import
yunjoonjung-PNNL Jan 7, 2026
4ef5779
Comment out receptacle test
yunjoonjung-PNNL Jan 7, 2026
007c3be
Fixed 5-37
yunjoonjung-PNNL Jan 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion rct229/rulesets/ashrae9012019/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"prm9012019rule66m62": "section6rule7",
"prm9012019rule16x33": "section6rule8",
"prm9012019rule22c86": "section6rule9",
"PRM9012019rule86d29": "section6rule13",
"prm9012019rule86d29": "section6rule13",
"prm9012019rule86j27": "section10rule1",
"prm9012019rule34l50": "section10rule7",
"prm9012019rule73m45": "section10rule10",
Expand Down
4 changes: 1 addition & 3 deletions rct229/rulesets/ashrae9012019/data_fns/table_7_8_fns.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from pint import Quantity

from rct229.schema.config import ureg
from rct229.rulesets.ashrae9012019.data import data
from rct229.rulesets.ashrae9012019.data_fns.table_utils import find_osstd_table_entries
from rct229.utils.assertions import assert_
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I deleted any import, it's because it's not used.

from rct229.schema.config import ureg


def table_7_8_lookup(
Expand Down
4 changes: 2 additions & 2 deletions rct229/rulesets/ashrae9012019/data_fns/table_7_8_fns_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pytest
import re

import pytest
from rct229.rulesets.ashrae9012019.data_fns.table_7_8_fns import table_7_8_lookup
from rct229.schema.config import ureg
from rct229.utils.assertions import RCTFailureException


# Testing table_7_8------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions rct229/rulesets/ashrae9012019/data_fns/table_F_2_fns.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from pint import Quantity

from rct229.schema.config import ureg
from rct229.rulesets.ashrae9012019.data import data
from rct229.rulesets.ashrae9012019.data_fns.table_utils import find_osstd_table_entries
from rct229.schema.config import ureg
from rct229.utils.assertions import assert_


Expand Down
3 changes: 2 additions & 1 deletion rct229/rulesets/ashrae9012019/data_fns/table_F_2_fns_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
import re

import pytest
from rct229.rulesets.ashrae9012019.data_fns.table_F_2_fns import table_f_2_lookup
from rct229.schema.config import ureg
from rct229.utils.assertions import RCTFailureException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, Type
from typing import Optional

from rct229.rulesets.ashrae9012019.ruleset_functions.baseline_systems.baseline_system_util import (
HVAC_SYS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import TypedDict, List
from typing import TypedDict

from rct229.rule_engine.rulesets import LeapYear
from rct229.utils.assertions import assert_


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
ZoneConditioningCategory as ZCC,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
get_zone_conditioning_category_rmd_dict,
)
from rct229.schema.schema_enums import SchemaEnums
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
from typing import Optional

import pandas as pd
from rct229.rule_engine.rulesets import LeapYear
from rct229.rulesets.ashrae9012019.ruleset_functions.get_list_hvac_systems_associated_with_zone import (
get_list_hvac_systems_associated_with_zone,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

from rct229.rulesets.ashrae9012019.ruleset_functions.get_opaque_surface_type import (
OpaqueSurfaceType as OST,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_opaque_surface_type import (
get_opaque_surface_type,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_surface_conditioning_category_dict import (
SurfaceConditioningCategory as SCC,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_surface_conditioning_category_dict import (
get_surface_conditioning_category_dict,
)
from rct229.schema.schema_enums import SchemaEnums
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
CAPACITY_THRESHOLD as CAPACITY_THRESHOLD_QUANTITY,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
CRAWLSPACE_HEIGHT_THRESHOLD as CRAWLSPACE_HEIGHT_THRESHOLD_QUANTITY,
)
from rct229.schema.config import ureg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
from pint import Quantity
from rct229.rulesets.ashrae9012019.ruleset_functions.get_opaque_surface_type import (
OpaqueSurfaceType as OST,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_opaque_surface_type import (
get_opaque_surface_type,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_surface_conditioning_category_dict import (
SurfaceConditioningCategory as SCC,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_surface_conditioning_category_dict import (
ZoneConditioningDataDict,
get_surface_conditioning_category_dict,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
CAPACITY_THRESHOLD as CAPACITY_THRESHOLD_QUANTITY,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
CRAWLSPACE_HEIGHT_THRESHOLD as CRAWLSPACE_HEIGHT_THRESHOLD_QUANTITY,
)
from rct229.schema.config import ureg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,24 @@ def get_building_scc_window_wall_ratios_dict(
assert scc == SCC.UNREGULATED

return {
getattr(SCC, "EXTERIOR_RESIDENTIAL"): total_res_window_area
/ total_res_wall_area
if total_res_wall_area > 0
else 0,
getattr(SCC, "EXTERIOR_NON_RESIDENTIAL"): total_nonres_window_area
/ total_nonres_wall_area
if total_nonres_wall_area > 0
else 0,
getattr(SCC, "EXTERIOR_MIXED"): total_mixed_window_area / total_mixed_wall_area
if total_mixed_wall_area > 0
else 0,
getattr(SCC, "SEMI_EXTERIOR"): total_semi_exterior_window_area
/ total_semi_exterior_wall_area
if total_semi_exterior_wall_area > 0
else 0,
getattr(SCC, "EXTERIOR_RESIDENTIAL"): (
total_res_window_area / total_res_wall_area
if total_res_wall_area > 0
else 0
),
getattr(SCC, "EXTERIOR_NON_RESIDENTIAL"): (
total_nonres_window_area / total_nonres_wall_area
if total_nonres_wall_area > 0
else 0
),
getattr(SCC, "EXTERIOR_MIXED"): (
total_mixed_window_area / total_mixed_wall_area
if total_mixed_wall_area > 0
else 0
),
getattr(SCC, "SEMI_EXTERIOR"): (
total_semi_exterior_window_area / total_semi_exterior_wall_area
if total_semi_exterior_wall_area > 0
else 0
),
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
ZoneConditioningCategory as ZCC,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
get_zone_conditioning_category_dict,
)
from rct229.utils.assertions import getattr_
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import numpy as np
from pint import Quantity

from rct229.rulesets.ashrae9012019.ruleset_functions.get_spaces_served_by_swh_use import (
get_spaces_served_by_swh_use,
)
Expand All @@ -12,8 +11,8 @@
from rct229.utils.utility_functions import (
find_exactly_one_schedule,
find_exactly_one_service_water_heating_distribution_system,
find_exactly_one_space,
find_exactly_one_service_water_heating_use,
find_exactly_one_space,
)

SERVICE_WATER_HEATING_USE_UNIT = SchemaEnums.schema_enums[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
from rct229.schema.config import ureg
from rct229.schema.schema_utils import quantify_rmd
from rct229.schema.validate import schema_validate_rpd
from rct229.utils.jsonpath_utils import (
find_exactly_one_with_field_value,
)
from rct229.utils.jsonpath_utils import find_exactly_one_with_field_value
from rct229.utils.std_comparisons import std_equal

TEST_RMD = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import TypedDict

from pint import Quantity
from pydash import map_
from rct229.rulesets.ashrae9012019.ruleset_functions.get_dict_of_zones_and_terminal_units_served_by_hvac_sys import (
get_dict_of_zones_and_terminal_units_served_by_hvac_sys,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from rct229.schema.config import ureg
from rct229.utils.assertions import assert_, getattr_
from rct229.utils.jsonpath_utils import find_all, find_exactly_one_with_field_value
from rct229.schema.config import ureg

LEAP_YEAR_HRS = 8784
NON_LEAP_YEAR_HRS = 8760
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import os
import pandas as pd
from typing import TypedDict

import pandas as pd
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
ZoneConditioningCategory as ZCC,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
get_zone_conditioning_category_dict,
)
from rct229.schema.schema_enums import SchemaEnums
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
from rct229.rulesets.ashrae9012019.ruleset_functions.get_swh_uses_associated_with_each_building_segment import (
get_swh_uses_associated_with_each_building_segment,
)
from rct229.utils.assertions import getattr_
from rct229.utils.jsonpath_utils import find_all
from rct229.utils.pint_utils import ZERO
from rct229.utils.utility_functions import (
find_exactly_one_service_water_heating_distribution_system,
)
from rct229.utils.assertions import getattr_


@dataclass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from rct229.rulesets.ashrae9012019.ruleset_functions.get_swh_components_associated_with_each_swh_bat import (
get_swh_components_associated_with_each_swh_bat,
)

from rct229.schema.config import ureg
from rct229.schema.schema_utils import quantify_rmd
from rct229.schema.validate import schema_validate_rpd
from rct229.schema.config import ureg
from rct229.utils.std_comparisons import std_equal

TEST_RMD = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from typing import List, Dict
from typing import Dict, List

from rct229.rulesets.ashrae9012019.data_fns.table_3_2_fns import table_3_2_lookup
from rct229.rulesets.ashrae9012019.ruleset_functions.get_hvac_zone_list_w_area_dict import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
CRAWLSPACE_HEIGHT_THRESHOLD as CRAWLSPACE_HEIGHT_THRESHOLD_QUANTITY,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
get_zone_conditioning_category_dict,
)
from rct229.schema.config import ureg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
ZoneConditioningCategory as ZCC,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_zone_conditioning_category_dict import (
get_zone_conditioning_category_rmd_dict,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.is_cz_0_to_3a_bool import (
Expand Down
2 changes: 1 addition & 1 deletion rct229/rulesets/ashrae9012019/section1/section1rule1.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


class PRM9012019Rule73j65(RuleDefinitionListIndexedBase):
"""Rule 73j65 of ASHRAE 90.1-2019 Appendix G Section 1 (Performance Calculations)"""
"""Rule 1 of ASHRAE 90.1-2019 Appendix G Section 1 (Performance Calculations)"""

def __init__(self):
super(PRM9012019Rule73j65, self).__init__(
Expand Down
4 changes: 1 addition & 3 deletions rct229/rulesets/ashrae9012019/section10/section10rule1.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
from rct229.schema.schema_enums import SchemaEnums
from rct229.utils.assertions import assert_
from rct229.utils.jsonpath_utils import find_all
from rct229.utils.utility_functions import (
find_exactly_one_hvac_system,
)
from rct229.utils.utility_functions import find_exactly_one_hvac_system

HUMIDIFICATION = SchemaEnums.schema_enums["HumidificationOptions"]

Expand Down
1 change: 0 additions & 1 deletion rct229/rulesets/ashrae9012019/section10/section10rule15.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
get_list_hvac_systems_associated_with_zone,
)
from rct229.schema.schema_enums import SchemaEnums
from rct229.utils.assertions import assert_
from rct229.utils.jsonpath_utils import find_all
from rct229.utils.utility_functions import find_exactly_one_hvac_system

Expand Down
2 changes: 1 addition & 1 deletion rct229/rulesets/ashrae9012019/section10/section10rule7.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
table_g3_5_2_lookup,
)
from rct229.rulesets.ashrae9012019.data_fns.table_G3_5_4_fns import (
table_g3_5_4_lookup,
EquipmentType,
table_g3_5_4_lookup,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.baseline_systems.baseline_system_util import (
HVAC_SYS,
Expand Down
10 changes: 5 additions & 5 deletions rct229/rulesets/ashrae9012019/section11/section11rule10.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from rct229.schema.schema_enums import SchemaEnums
from rct229.schema.config import ureg
from rct229.rule_engine.rule_base import RuleDefinitionBase
from rct229.rule_engine.rule_list_indexed_base import RuleDefinitionListIndexedBase
from rct229.rule_engine.ruleset_model_factory import produce_ruleset_model_description
from rct229.rulesets.ashrae9012019 import BASELINE_0
from rct229.rulesets.ashrae9012019.data_fns.table_F_2_fns import table_f_2_lookup
from rct229.rulesets.ashrae9012019.data_fns.table_7_8_fns import table_7_8_lookup
from rct229.rulesets.ashrae9012019.data_fns.table_F_2_fns import table_f_2_lookup
from rct229.schema.config import ureg
from rct229.schema.schema_enums import SchemaEnums
from rct229.utils.assertions import assert_
from rct229.utils.compare_standard_val import std_le
from rct229.utils.std_comparisons import std_equal
from rct229.utils.jsonpath_utils import find_all
from rct229.utils.pint_utils import CalcQ
from rct229.utils.assertions import assert_
from rct229.utils.std_comparisons import std_equal

EnergySourceOptions = SchemaEnums.schema_enums["EnergySourceOptions"]
SWHEfficiencyMetricOptions = SchemaEnums.schema_enums[
Expand Down
1 change: 0 additions & 1 deletion rct229/rulesets/ashrae9012019/section11/section11rule12.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from rct229.rule_engine.partial_rule_definition import PartialRuleDefinition
from rct229.rule_engine.rule_list_indexed_base import RuleDefinitionListIndexedBase
from rct229.rule_engine.ruleset_model_factory import produce_ruleset_model_description
from rct229.rule_engine.rulesets import LeapYear
from rct229.rulesets.ashrae9012019 import BASELINE_0
from rct229.rulesets.ashrae9012019.ruleset_functions.get_swh_uses_associated_with_each_building_segment import (
get_swh_uses_associated_with_each_building_segment,
Expand Down
7 changes: 3 additions & 4 deletions rct229/rulesets/ashrae9012019/section11/section11rule13.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
from rct229.rule_engine.rule_list_indexed_base import RuleDefinitionListIndexedBase
from rct229.rule_engine.ruleset_model_factory import produce_ruleset_model_description
from rct229.rulesets.ashrae9012019 import BASELINE_0
from rct229.utils.pint_utils import ZERO
from rct229.schema.config import ureg
from rct229.utils.assertions import assert_
from rct229.rulesets.ashrae9012019.ruleset_functions.get_energy_required_to_heat_swh_use import (
get_energy_required_to_heat_swh_use,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_swh_uses_associated_with_each_building_segment import (
get_swh_uses_associated_with_each_building_segment,
)
from rct229.schema.config import ureg
from rct229.utils.assertions import assert_
from rct229.utils.jsonpath_utils import find_all
from rct229.utils.pint_utils import CalcQ
from rct229.utils.pint_utils import ZERO, CalcQ

APPLICABILITY_MSG = "This building has service water heating loads. Confirm that service water heating energy consumption is calculated explicitly based upon the volume of service water heating required and the entering makeup water and leaving service water heating temperatures. Entering water temperatures shall be estimated based upon the location. Leaving temperatures shall be based upon the end-use requirements."

Expand Down
2 changes: 1 addition & 1 deletion rct229/rulesets/ashrae9012019/section11/section11rule15.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from pydash import curry
from rct229.rule_engine.rule_base import RuleDefinitionBase
from rct229.rule_engine.rule_list_indexed_base import RuleDefinitionListIndexedBase
from rct229.rule_engine.ruleset_model_factory import produce_ruleset_model_description
Expand All @@ -7,7 +8,6 @@
)
from rct229.utils.jsonpath_utils import find_all
from rct229.utils.pint_utils import CalcQ
from pydash import curry

MANUAL_CHECK_REQUIRED_MSG = (
"Proposed Service Water Heating Use is less than the baseline. "
Expand Down
1 change: 0 additions & 1 deletion rct229/rulesets/ashrae9012019/section12/section12rule2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from rct229.rule_engine.rule_base import RuleDefinitionBase
from rct229.rule_engine.rule_list_indexed_base import RuleDefinitionListIndexedBase
from rct229.rule_engine.ruleset_model_factory import produce_ruleset_model_description
from rct229.rule_engine.rulesets import LeapYear
from rct229.rulesets.ashrae9012019 import BASELINE_0
from rct229.rulesets.ashrae9012019.ruleset_functions.compare_schedules import (
compare_schedules,
Expand Down
Loading
Loading