-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add is_tolerance_fail method for Section 5 to 6 #1267
Conversation
There was a problem hiding this 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!
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- put the
is_tolerance_fail
afterget_fail_msg
because the function is called afterget_fail_msg
. - We do not need tolerance check for integers.
Thanks Weili for these valuable comments to help me learn. I have addressed all of them. @weilixu |
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): |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
f883b71
to
88299e8
Compare
…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
…et-checking-tool into is_tolerance_fail_section_5_to_6
…et-checking-tool into is_tolerance_fail_section_5_to_6
…et-checking-tool into is_tolerance_fail_section_5_to_6
This PR includes the is_tolerance_fail method addition from section 5 to 6. Thanks!