Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rds/kjw/rule 11 1 #843

Open
wants to merge 51 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
1d33e99
Create Rule_11-1.md
KarenWGard Dec 6, 2022
d42ed42
Update Rule_11-1.md
KarenWGard Dec 7, 2022
a6c3a74
Update Rule_11-1.md
KarenWGard Dec 11, 2022
991dabe
Update Rule_11-1.md
KarenWGard Dec 11, 2022
5d7e86e
Update Rule_11-1.md
KarenWGard Mar 21, 2024
1ec33b2
Update Rule_11-1.md
KarenWGard Apr 17, 2024
c4276b4
Create extra_schema_for_SHW_comparison.json
KarenWGard Apr 17, 2024
b16ec21
Update Rule_11-1.md
KarenWGard Apr 17, 2024
e841bf9
Update Rule_11-1.md
KarenWGard Apr 17, 2024
a5c34eb
Update extra_schema_for_SHW_comparison.json
KarenWGard Apr 17, 2024
4955d48
Update Rule_11-1.md
KarenWGard Apr 17, 2024
f0d5670
Update extra_schema_for_SHW_comparison.json
KarenWGard Apr 17, 2024
00d9cc6
Update Rule_11-1.md
KarenWGard Apr 17, 2024
ad3e941
Rule_11-1 make the context SHW space type
KarenWGard Apr 23, 2024
5903df0
Rule_11-1 evaluate all equipment for the SHW equipment space type
KarenWGard Apr 23, 2024
7892339
create 11-8
KarenWGard Apr 29, 2024
f4eac85
yaml for comparison fields
KarenWGard Apr 29, 2024
5572102
Update Rule_11-1.md
KarenWGard May 1, 2024
2ac6e3a
Update Rule_11-1.md
KarenWGard May 2, 2024
f18fe6a
update yaml file
KarenWGard May 2, 2024
ecbfe6b
Update Rule_11-1.md
KarenWGard May 15, 2024
69c592f
Update Rule_11-1.md
KarenWGard May 15, 2024
965ad5b
Update Rule_11-1.md
KarenWGard May 15, 2024
f5a8994
Update Rule_11-1.md
KarenWGard May 22, 2024
bbafbe6
Update SHW comparison fields.yaml
KarenWGard May 22, 2024
1d212cd
Delete .idea/inspectionProfiles/profiles_settings.xml
KarenWGard May 29, 2024
d11a85a
Delete .idea/misc.xml
KarenWGard May 29, 2024
cb001fb
Delete .idea/ruleset-checking-tool.iml
KarenWGard May 29, 2024
f753757
Delete .idea/shelf/Uncommitted_changes_before_Checkout_at_12_21_2023_…
KarenWGard May 29, 2024
30348b6
Delete .idea/shelf/Uncommitted_changes_before_Checkout_at_12_21_2023_…
KarenWGard May 29, 2024
3a8dd3f
Delete .idea/shelf/Uncommitted_changes_before_Update_at_4_23_2024_3_5…
KarenWGard May 29, 2024
5af6aa6
Delete .idea/shelf/Uncommitted_changes_before_Update_at_4_23_2024_3_5…
KarenWGard May 29, 2024
8cfe51c
Delete .idea/vcs.xml
KarenWGard May 29, 2024
9968979
Delete .idea/workspace.xml
KarenWGard May 29, 2024
0cd8477
Update Rule_11-1.md
KarenWGard Jun 3, 2024
14abc99
Update Rule_11-1.md
KarenWGard Jun 19, 2024
b6a0887
Update SHW comparison fields.yaml
KarenWGard Jun 26, 2024
4fd734a
Update Rule_11-1.md
KarenWGard Jul 10, 2024
7ab4e05
Update Rule_11-1.md
KarenWGard Jul 10, 2024
fcb2aa8
Update Rule_11-1.md
KarenWGard Jul 10, 2024
e53728b
Update SHW comparison fields.yaml
KarenWGard Aug 28, 2024
86d72e4
Update Rule_11-1.md
KarenWGard Sep 16, 2024
7cfb277
Update Rule_11-1.md
KarenWGard Oct 9, 2024
1c8dec7
Update Rule_11-1.md
KarenWGard Oct 16, 2024
8e60e3f
Update Rule_11-1.md
KarenWGard Nov 12, 2024
de30f51
Update Rule_11-1.md
KarenWGard Nov 19, 2024
b8103ca
Update Rule_11-1.md
KarenWGard Nov 20, 2024
633b400
Update Rule_11-1.md
KarenWGard Nov 20, 2024
5c37117
Update Rule_11-1.md
KarenWGard Nov 20, 2024
d6198a2
Update Rule_11-1.md
KarenWGard Nov 20, 2024
07a78d9
Update Rule_11-1.md
KarenWGard Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
59 changes: 59 additions & 0 deletions docs/section11/Rule_11-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Service_Water_Heating - Rule 11-1
**Schema Version:** 0.0.37

**Mandatory Rule:** TRUE

**Rule ID:** 11-1

**Rule Description:** "Where a complete service water-heating system exists, the proposed design shall reflect the actual system type. Where a service water-heating system has been designed the service waterheating type shall be consistent with design documents. Where no service water-heating system exists or has been designed and submitted with design documents but the building will have service water-heating loads, a service water-heating system shall be modeled that matches the system type in the baseline building design"

**Rule Assertion:** Options are PASS/FAIL

**Appendix G Section Reference:** Table G3.1 #11, proposed column, a & b

**Evaluation Context:** custom evaluation context created for this rule of all SWH Distribution system ids located in the proposed, baseline and user RMDs. This rule will be evaluated for **each** SWH Distribution id found accross the three RMDs.
**Data Lookup:**
**Function Call:**
- **get_component_by_id**
- **compare_swh_dist_systems_and_components**
- **compare_context_pair** - there is no RDS for this function, but it is a function developed for Rule 1-6 that compares two elements
- **get_swh_components_associated_with_each_swh_distribution_system**

## Applicability Checks:
- in this case, all of the SWH Distribution IDs identified when the custom context was created are applicable to this rule.
- Look at each swh distribution system id: `for swh_dist_system_id in context: CONTINUE TO RULE LOGIC`
JacksonJ-KC marked this conversation as resolved.
Show resolved Hide resolved

## Rule Logic #
- there are a couple cases here:
`1.` If the swh distribution exists in the user model, AND has swh use, then expect user and proposed systems to be match
`2.` Otherwise, expect the distribution system to match between proposed and baseline
`3.` Systems that don't do 1 or 2 fail

- create a variable user_proposed_str, which is the string lookup used by compare_context_pair for comparing elements between the user and proposed RMDS: `user_proposed_str = "AppG 11-1 P_RMD Equals U_RMD"`
- create a variable base_proposed_str, which is the string lookup used by compare_context_pair for comparing elements between the user and proposed RMDS: `base_proposed_str = "AppG 11-1 P_RMD Equals B_RMD"`
- set a list user_proposed_comparison to []. If the end of the rule is reached and this list (and the corresponding baseline list) still have zero length, then the rule passes. Otherwise the list will include a series of messages for the user about why it didn't pass: `user_proposed_comparison = []`
- set a list user_baseline_comparison to []. If the end of the rule is reached and this list (and the corresponding proposed list) still have zero length, then the rule passes. Otherwise the list will include a series of messages for the user about why it didn't pass: `user_baseline_comparison = []`

- Check whether the system exists in the user model: `if u_swh_system_and_equip_dict[swh_dist_system_id]:`
- check whether the system has SWH uses in the user model: `if u_swh_system_and_equip_dict[swh_dist_system_id]["USES"]:`
- get the user swh_use: `u_swh_use = get_component_by_id(U_RMD, swh_use_id)`
- if the u_swh_use exists, and is greater than zero: `if u_swh_use != NULL and u_swh_use.use > 0:`
- compare the proposed and user models using the function compare_swh_dist_systems_and_components. This function returns a list of errors. If the list of errors has a length of 0, then the comparison encountered no issues: `user_proposed_comparison = compare_swh_dist_systems_and_components(P_RMD,U_RMD,user_proposed_str,swh_dist_system_id)`
- from here, go directly to the rule assertion: `GO TO RULE ASSERTION`
JacksonJ-KC marked this conversation as resolved.
Show resolved Hide resolved

- If the system doesn't exist in the proposed model, we need to return an error: `if swh_dist_system_id not in p_swh_system_and_equip_dict: errors.append(swh_dist_system_id + " was not found in the Proposed model.
Because there are no SWH loads in the User model, we are expecting the Proposed and Baseline systems to match.")`
- If the system doesn't exist in the baseline model, we need to return an error: `if swh_dist_system_id not in b_swh_system_and_equip_dict: errors.append(swh_dist_system_id + " was not found in the Baseline model.
Because there are no SWH loads in the User model, we are expecting the Proposed and Baseline systems to match.")`
- if we got to this line without going to the rule assertion, it means that there is no equivalent system in the user model, or that the user model does not have SWH use. Compare the proposed and baseline models using the function compare_swh_dist_systems_and_components. This function returns a list of errors. If the list of errors has a length of 0, then the comparison encountered no issues: `user_baseline_comparison = compare_swh_dist_systems_and_components(P_RMD,B_RMD,user_proposed_str,swh_dist_system_id)`

- now go to rule assertion: `GO TO RULE ASSERTION`

Copy link
Collaborator

Choose a reason for hiding this comment

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

I defer to Weili on this one since it uses a complex, novel approach.


## Rule Assertion:
- Case1: if the length of either user_proposed_comparison or user_baseline comparison is 0, then the rule passes: `if (len(user_proposed_comparison) == 0) and (len(user_baseline_comparison) == 0): PASS`
- Case2: all other cases, FAIL: `else: FAIL`



**[Back](../_toc.md)**
Loading
Loading