-
Notifications
You must be signed in to change notification settings - Fork 5
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
RS/YJ/Rule 12-4 #1420
RS/YJ/Rule 12-4 #1420
Conversation
… library to include a fractional monthly schedule. Includes a handful of daily schedules that are unused so far, but were developed.
… into RS/YJ/Rule_12-4
…-checking-tool into RS/YJ/Rule_12-4
… into RS/YJ/Rule_12-4
The rule was tested with Juan's PR and all the cases passed. |
… into RS/YJ/Rule_12-4
): | ||
return False | ||
else: | ||
return True |
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.
This is confusing in RDS and implementation.
- I do not thing the RDS means if a computer room does not have
INFORMATION_TECHNOLOGY_EQUIPMENT
is not applicable, rather I think this rule checks whether there is a computer room that has misc_equip that is INFORMATION_TECHNOLOGY_EQUIPMENT. With the new development of Update is_space_a_computer_room.md #1397 , this logic can further simplified to just checking if a space is computer room. - Ultimately, I believe the intention here is to
return any([is_space_a_computer_room(rmd_b, space_b["id"] for space_b in find_all( "$.buildings[*].building_segments[*].zones[*].spaces[*]", rmd_b)])
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.
Good point. Addressed.
is_leap_year, | ||
)["total_hours_matched"] | ||
|
||
return {"comparison_data": comparison_data} |
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.
Rename this parameter to total_hours_matched.
Also, let's add another parameter hours_in_a_year = LeapYear.LEAP_YEAR_HOURs if is_leap_year else LeapYear.REGULAR_YEAR_HOURS
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.
Good point! I keep forgetting we have the LeapYear
class. Addressed.
[MONTH_FRACTIONS[month]] * DAYS_IN_MONTH[month] * 24 | ||
) | ||
|
||
mask_schedule = [1] * 8784 if is_leap_year else [1] * 8760 |
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.
We should have the enum in the ruleset called LeapYear.LEAP_YEAR_HOUR and LeapYear.REGULAR_YEAR_HOURS
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.
Addressed.
comparison_data = calc_vals["comparison_data"] | ||
is_leap_year = data["is_leap_year"] | ||
|
||
return comparison_data == (8784 if is_leap_year else 8760) |
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.
in here, you just need to match the total_hours_matched == hours_in_a_year
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.
Addressed.
This rule hasn't been tested. I'll revisit it once the testing file and
is_space_a_computer_room
function are developed. Thanks!