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

Add schedule type limit to simple schedule adjustment #1686

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

weilixu
Copy link
Collaborator

@weilixu weilixu commented Feb 13, 2024

Add schedule limit type to ruleset schedule simple value adjustment to prevent simulation errors that the schedule value over the lower or upper boundary.

Pull request overview

We are refactoring some PRM functions using the new schedule modules while reducing the size the test cases as discussed in the last call.
The issue this PR is addressing is when using the schedule_ruleset_simple_value_adjust, it does not set a limit following the scheduleTypeLimits, which could cause severe simulation errors when the adjusted schedule value goes beyond the limit. The suggested change is to add this limitations to the function.

Pull Request Author

  • Method changes or additions
  • Data changes or additions
  • Added tests for added methods
  • If methods have been deprecated, update rest of code to use the new methods
  • Documented new methods using yard syntax
  • Resolved yard documentation errors for new code (ran bundle exec rake doc)
  • Resolved rubocop syntax errors for new code (ran bundle exec rake rubocop)
  • All new and existing tests passes
  • If the code adds new require statements, ensure these are in core ruby or add to the gemspec

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a code review on GitHub
  • All related changes have been implemented: method additions, changes, tests
  • Check rubocop errors
  • Check yard doc errors
  • If fixing a defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If a new feature, test the new feature and try creative ways to break it
  • CI status: all green or justified

…o prevent simulation errors that the schedule value over the lower or upper boundary.
@weilixu weilixu self-assigned this Feb 13, 2024
Copy link
Collaborator

@mdahlhausen mdahlhausen left a comment

Choose a reason for hiding this comment

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

Nice catch, thanks for adding this.

@mdahlhausen mdahlhausen merged commit 02096c7 into master Feb 14, 2024
@mdahlhausen mdahlhausen deleted the add_value_limit_to_ruleset_simple_adj branch February 14, 2024 22:44
@mdahlhausen mdahlhausen changed the title Add schedule limit type to ruleset schedule simple value adjustment t… Add schedule type limit to simple schedule adjustment Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants