-
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/JX/Rule16-6 #1344
RS/JX/Rule16-6 #1344
Conversation
…-checking-tool into RS/JX/Rule16-6
|
||
def is_applicable(self, context, data=None): | ||
rmd_p = context.PROPOSED | ||
return find_all("$.ruleset_model_descriptions[0].buildings[*].elevators", rmd_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.
Can you add [*] at the end of the json path?
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 PR has the same issue as the other section 16 rules - if the baseline has no elevator, this rule evaluation will not return any outcome, thus result in pass.
from rct229.schema.config import ureg | ||
from rct229.rule_engine.rule_base import RuleDefinitionBase | ||
from rct229.rule_engine.rule_list_indexed_base import RuleDefinitionListIndexedBase | ||
from rct229.rule_engine.ruleset_model_factory import produce_ruleset_model_instance |
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.
import error.
produce_ruleset_model_description
from rct229.rule_engine.rule_base import RuleDefinitionBase | ||
from rct229.rule_engine.rule_list_indexed_base import RuleDefinitionListIndexedBase | ||
from rct229.rule_engine.ruleset_model_factory import produce_ruleset_model_instance | ||
from rct229.rulesets.ashrae9012019 import BASELINE_0, PROPOSED |
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.
No need to import PROPOSED
class ElevatorRule(RuleDefinitionBase): | ||
def __init__(self): | ||
super(Section16Rule6.ElevatorRule, self).__init__( | ||
rmds_used=produce_ruleset_model_instance( |
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.
update the function name
|
||
def is_applicable(self, context, data=None): | ||
rmd_p = context.PROPOSED | ||
return find_all( |
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.
Could you follow this comment and fix this is applicable logic?
…-checking-tool into RS/JX/Rule16-6
# Conflicts: # rct229/rulesets/ashrae9012019/section16/__init__.py
… into RS/JX/Rule16-6 # Conflicts: # docs/section16/Rule16-6.md # rct229/rulesets/ashrae9012019/section16/__init__.py
@Jiarongx-Xie I added |
This rule has been tested.