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

Incorrect FT of ScheduleRules at end of year #5114

Merged
merged 5 commits into from
Mar 27, 2024
Merged

Conversation

joseph-robertson
Copy link
Collaborator

Pull request overview

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • 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

@joseph-robertson joseph-robertson added severity - Normal Bug component - IDF Translation Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels Mar 15, 2024
@joseph-robertson joseph-robertson self-assigned this Mar 15, 2024

// set last week schedule before we overwrite week schedule
lastDate = date - Time(1);
while (lastDate.dayOfWeek().value() != DayOfWeek::Saturday) {
Copy link
Collaborator Author

@joseph-robertson joseph-robertson Mar 18, 2024

Choose a reason for hiding this comment

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

I'm fairly certain that this bug is relevant for simulations whose year ends on a Sunday (e.g., 2023). The lastDate = date - Time(1) line here makes lastDate a Saturday, and so we don't enter this while block.

@joseph-robertson joseph-robertson marked this pull request as ready for review March 18, 2024 20:02
Copy link
Collaborator

@jmarrec jmarrec left a comment

Choose a reason for hiding this comment

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

From a cursory look this looks sensible, and there are tests for it too. Looks good to me.

@jmarrec jmarrec merged commit c66049b into develop Mar 27, 2024
4 of 6 checks passed
@jmarrec jmarrec deleted the ruleset-ft-endofyear branch March 27, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - IDF Translation Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. severity - Normal Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect FT of ScheduleRules at end of year
3 participants