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

RS/JX/Rule16-6 #1344

Merged
merged 25 commits into from
Jun 18, 2024
Merged

RS/JX/Rule16-6 #1344

merged 25 commits into from
Jun 18, 2024

Conversation

Jiarongx-Xie
Copy link
Collaborator

@Jiarongx-Xie Jiarongx-Xie commented May 3, 2024

This rule has been tested.

@Jiarongx-Xie Jiarongx-Xie marked this pull request as ready for review May 14, 2024 18:55

def is_applicable(self, context, data=None):
rmd_p = context.PROPOSED
return find_all("$.ruleset_model_descriptions[0].buildings[*].elevators", rmd_p)
Copy link
Collaborator

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?

Copy link
Collaborator

@weilixu weilixu left a 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
Copy link
Collaborator

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
Copy link
Collaborator

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(
Copy link
Collaborator

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(
Copy link
Collaborator

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?

… into RS/JX/Rule16-6

# Conflicts:
#	docs/section16/Rule16-6.md
#	rct229/rulesets/ashrae9012019/section16/__init__.py
@weilixu
Copy link
Collaborator

weilixu commented Jun 18, 2024

@Jiarongx-Xie I added assert_ to make sure both power and flow are non zero.
The logic here is if power or flow are 0, then it must be data error.

@weilixu weilixu merged commit 7ade6df into develop Jun 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants