Skip to content

Rule 5-1 Updates#1852

Open
JacksonJ-KC wants to merge 12 commits into
developfrom
RDS/JDJ/5-1-updates
Open

Rule 5-1 Updates#1852
JacksonJ-KC wants to merge 12 commits into
developfrom
RDS/JDJ/5-1-updates

Conversation

@JacksonJ-KC

Copy link
Copy Markdown
Collaborator

These updates incorporate logic to ensure the reported BBP represents the average of baseline rotated RPDs when rotations are expected and otherwise represents the baseline 0 RPD.

- Iterate through the RPDs: `for rpd in (rpd_u, rpd_b0, rpd_b90, rpd_b180, rpd_b270, rpd_p):`
- If the RPD exists, check the output baseline building performance energy cost and add it to the set: `if rpd != Null: bbp_values.add(rpd.output.baseline_building_performance_energy_cost)`
- If the RPD exists, and it is a baseline rotation RPD, add the total annual cost to the list: `if rpd != Null and rpd.type in [BASELINE_90, BASELINE_180, BASELINE_270]: baseline_rotation_total_annual_costs.append(sum(rpd.output.source_results.annual_cost))`
- If the length of the set is greater than one, exit evaluation early and return UNDETERMINED with a message: `if len(bbp_values) > 1: UNDETERMINED raise_message "Ruleset expects exactly one BBP value to be used in the project."`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder if we should add a note to the schema about this. It is not necessarily intuituve that this should be identical for all the RPD files.

@supriyagoel supriyagoel Nov 5, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@claperle and @JacksonJ-KC if I understand correctly, the code in line 59 is checking for the presence of 1 baseline RPD- could it be the case that a RPD GS generates 4 baseline RPDs which are exactly the same?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@supriyagoel, yes this would be allowed. A python "set" only keeps track of unique values so the length would be 1 if the values are all the same.



**Notes/Questions:**
None
1. BBUEC, BBREC should probably also be the averages of all present baseline RMDs sums of regulated and unregulated end use costs, however we cannot determine end use costs from the schema
2. the language in 90.1 only includes the defined term "baseline building performance" in the direction to average results from different orientations, it does not include BBUEC and BBREC so maybe #1 is not an issue

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am okay with how you have done it based on the exact language and limitations.

- **Rule Assertion:**
- Case 1: Baseline rotations are expected based on the fenestration areas by azimuth and the baseline building performance matches the average of the total source results annual cost from the 4 baseline RMDs: PASS: `if rotation_expected_b and bbp == avg_baseline_total_annual_cost and len(baseline_rotation_total_annual_costs) == 3: PASS`
- Case 2: Baseline rotations are not expected based on the fenestration areas by azimuth and the baseline building performance matches the total source results annual cost from the BASELINE_0 RMD: PASS: `elif !rotation_expected_b and bbp == baseline_0_total_annual_cost: PASS`
- Case 3: Baseline rotations are not expected based on the fenestration areas by azimuth and the baseline building performance does not match the total source results annual cost from the BASELINE_0 RMD: FAIL: `elif !rotation_expected_b and bbp != baseline_0_total_annual_cost: FAIL`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same question here, would it be incorrect if a RPD GS is writing 4 baseline RPDs - to be exactly the same?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

same response! if the values are the same it is not a problem

@JacksonJ-KC JacksonJ-KC changed the title RDS/JDJ/Rule5-1 Updates Rule 5-1 Updates Dec 24, 2025
@weilixu weilixu added the rds label Dec 30, 2025
@yunjoonjung-PNNL yunjoonjung-PNNL self-requested a review February 28, 2026 01:32
@yunjoonjung-PNNL

Copy link
Copy Markdown
Collaborator

@weilixu @jugonzal07 - I've merged @jugonzal07 's 5-1 testing JSON PR to this PR. This PR is ready for your review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants