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

Add is_tolerance_fail method for Section 5 to 6 #1267

Merged
merged 31 commits into from
Sep 30, 2024

Conversation

Jiarongx-Xie
Copy link
Collaborator

This PR includes the is_tolerance_fail method addition from section 5 to 6. Thanks!

@Jiarongx-Xie Jiarongx-Xie changed the base branch from master to develop_rct_tolerance January 22, 2024 18:53
@Jiarongx-Xie Jiarongx-Xie self-assigned this Jan 22, 2024
@Jiarongx-Xie Jiarongx-Xie added the enhancement New feature or request label Jan 22, 2024
Copy link
Collaborator

@yunjoonjung-PNNL yunjoonjung-PNNL left a comment

Choose a reason for hiding this comment

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

Looks great to me. Thank you Jiarong!

rct229/rulesets/ashrae9012019/section5/section5rule10.py Outdated Show resolved Hide resolved
rct229/rulesets/ashrae9012019/section5/section5rule12.py Outdated Show resolved Hide resolved
rct229/rulesets/ashrae9012019/section5/section5rule15.py Outdated Show resolved Hide resolved
rct229/rulesets/ashrae9012019/section5/section5rule19.py Outdated Show resolved Hide resolved
rct229/rulesets/ashrae9012019/section5/section5rule6.py Outdated Show resolved Hide resolved
rct229/rulesets/ashrae9012019/section5/section5rule8.py Outdated Show resolved Hide resolved
rct229/rulesets/ashrae9012019/section6/section6rule5.py Outdated Show resolved Hide resolved
rct229/rulesets/ashrae9012019/section6/section6rule8.py Outdated Show resolved Hide resolved
def is_tolerance_fail(self, context, calc_vals=None, data=None):
total_hours_compared = calc_vals["total_hours_compared"]
total_hours_matched = calc_vals["total_hours_matched"]
return std_equal(total_hours_matched, total_hours_compared)
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. put the is_tolerance_fail after get_fail_msg because the function is called after get_fail_msg.
  2. We do not need tolerance check for integers.

@Jiarongx-Xie
Copy link
Collaborator Author

Thanks Weili for these valuable comments to help me learn. I have addressed all of them. @weilixu

@weilixu
Copy link
Collaborator

weilixu commented Jan 29, 2024

I am seeing many failures this time, and most of them are due to the precision issue - we may need to hold this update in the tolerance branch a little while until the decimal points are implemented.

)
return calc_vals["wwr_b"] == min(calc_vals["wwr_p"], WWR_THRESHOLD)

def is_tolerance_fail(self, context, calc_vals=None, data=None):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@weilixu Hi Weili, is this an exception where both values are user inputs?

skylight_roof_ratio_p = calc_vals["skylight_total_roof_ratio_p"]
return skylight_roof_ratio_b == skylight_roof_ratio_p

def is_tolerance_fail(self, context, calc_vals=None, data=None):
skylight_roof_ratio_b = calc_vals["skylight_roof_ratio_b"]
skylight_roof_ratio_p = calc_vals["skylight_total_roof_ratio_p"]
return std_equal(skylight_roof_ratio_b, skylight_roof_ratio_p)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@weilixu is this an exception where both values are user inputs?

weilixu and others added 11 commits March 6, 2024 21:48
…et-checking-tool into is_tolerance_fail_section_5_to_6

# Conflicts:
#	rct229/rulesets/ashrae9012019/section5/section5rule10.py
#	rct229/rulesets/ashrae9012019/section5/section5rule12.py
#	rct229/rulesets/ashrae9012019/section5/section5rule19.py
#	rct229/rulesets/ashrae9012019/section5/section5rule20.py
#	rct229/rulesets/ashrae9012019/section5/section5rule27.py
#	rct229/rulesets/ashrae9012019/section5/section5rule4.py
#	rct229/rulesets/ashrae9012019/section5/section5rule6.py
#	rct229/rulesets/ashrae9012019/section5/section5rule8.py
@weilixu weilixu merged commit 53483c3 into develop_rct_tolerance Sep 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants