-
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 22-12 #1156
RS/YJ/Rule 22-12 #1156
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.
I think we do not need child class here, we will need to rewrite it.
if getattr_(heat_rejection_b, "heat_rejections", "loop") | ||
in heat_rejection_loop_ids_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.
Another way to do it could be:
number_of_baseline_heat_rejections_b = len(
[
heat_rejection_b
for heat_rejection_b in find_all("$.heat_rejections[*]", rmd_b)
if getattr_(heat_rejection_b, "heat_rejections", "loop")
in heat_rejection_loop_ids_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.
"number_of_baseline_heat_rejections_b": number_of_baseline_heat_rejections_b, | ||
} | ||
|
||
class HeatRejectionRule(RuleDefinitionBase): |
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.
I don't think you need this nested class.
This can be done at the rule level.
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.
number_of_baseline_heat_rejections_b == 1 | ||
and len_heat_rejection_loop_ids_b > 1 | ||
): | ||
FAIL_MSG = "There is more than one condenser loop for this building. There should only be one condenser loop attached to all chillers in the baseline chiller plant." |
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 should not be the building, but the project.
Let's update the message to:
"There is more than one condenser loop for this project. There should only be one condenser loop attached to all chillers in the baseline chiller plant."
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 was tested with Juan's TCD from PR #1155. I included the TCD here. Thanks!