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

Fix Hybrid Unitary Operating Settings Initialization #8422

Merged
merged 5 commits into from
Feb 1, 2021

Conversation

matthew-larson
Copy link
Contributor

Pull request overview

  • Fixes Zone Hybrid Unitary HVAC Runtime Fraction doesn't initialize to 0 for operating settings when switching to standby mode  #8420
  • This pull request addresses the issue when the runtime fractions added up for each operating setting is greater than 1 during some timesteps when in full standby mode (Mode 0). It was determined that the operating settings were not being initialized before going into standby mode, so when utilizing 2 operating modes within the previous timestep, the second operating mode retained it's previous operating settings after going into full standby mode. To fix this, I moved the section of code that initializes the operating settings to empty values from inside the SetOperatingSettings function to before the if statement that determines whether to go into full standby mode or step into the SetOperatingSettings function. The before and after screenshots of the runtime fractions for the 2 operating settings during this condition are shown below.

Before:
image

After:
image

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts

@matthew-larson matthew-larson added Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze) labels Dec 14, 2020
@matthew-larson matthew-larson self-assigned this Dec 14, 2020
@matthew-larson matthew-larson marked this pull request as ready for review December 14, 2020 20:00
@nrel-bot-2c
Copy link

@matthew-larson @lgentile it has been 28 days since this pull request was last updated.

Copy link
Member

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good from a code standpoint and thanks for the unit test. The one nitpick I would say is that if you are moving that loop around, it might've been good to go ahead and make it a range based loop. That change reduces the possibility of bugs from indexing. I'll pull develop in and test it out with the defect file and this should be able to go in.

@Myoldmopar
Copy link
Member

I did not see a defect file on the issue or in the dev support repo, so I didn't run that. But I did pull develop in and ran unit tests, including the new one here. I am going to merge this. Thanks @matthew-larson

@Myoldmopar Myoldmopar merged commit e4523cb into NREL:develop Feb 1, 2021
@matthew-larson
Copy link
Contributor Author

Thanks @Myoldmopar for the feedback, that makes sense.

@matthew-larson matthew-larson deleted the hybridunitary-rtf branch February 1, 2021 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze)
Projects
None yet
7 participants