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: penalizing or rewarding constraints with overlapping time for Employee Scheduling #484

Merged
merged 7 commits into from
Jun 24, 2024

Conversation

zepfred
Copy link
Contributor

@zepfred zepfred commented Jun 20, 2024

Description of the change

This pull request updates the employee-scheduling module constraints to penalize or reward constraints with overlapping time.

Java

Screenshot from 2024-06-20 16-42-35

Python

Screenshot from 2024-06-20 19-40-22

Checklist

Development

  • The changes have been covered with tests, if necessary.
  • You have a green build, with the exception of the flaky tests.
  • UI and JS files are fully tested, the user interface works for all modules affected by your changes (e.g., solve and analyze buttons).
  • The network calls work for all modules affected by your changes (e.g., solving a problem).
  • The console messages are validated for all modules affected by your changes.

Code Review

  • This pull request includes an explanatory title and description.
  • The GitHub issue is linked.
  • At least one other engineer has approved the changes.
  • After PR is merged, inform the reporter.

Copy link
Contributor

@triceo triceo left a comment

Choose a reason for hiding this comment

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

Please figure out an incremental approach to the requirement.

@zepfred zepfred requested a review from triceo June 21, 2024 14:21
@Christopher-Chianelli
Copy link
Contributor

Note: the part before penalize does not need to change; shifts are less than 24 hours long, and availabilities are based on dates, so shiftStart.date() == availability.date() || shiftEnd.date() == availability.date() is true if and only if there any overlap.

@zepfred
Copy link
Contributor Author

zepfred commented Jun 24, 2024

Since both of you think getOverlappingDurationInMinutes should be calculated once, I'll accept Chris's suggestion about the filter operation.

@zepfred zepfred requested a review from triceo June 24, 2024 11:01
@zepfred zepfred requested a review from triceo June 24, 2024 11:31
Copy link
Contributor

@triceo triceo left a comment

Choose a reason for hiding this comment

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

I think I found a bug in the constraints.

@zepfred zepfred requested a review from triceo June 24, 2024 12:36
Copy link
Contributor

@triceo triceo left a comment

Choose a reason for hiding this comment

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

LGTM after the last comment is resolved.

@triceo triceo merged commit c9401c7 into TimefoldAI:development Jun 24, 2024
38 checks passed
@zepfred zepfred deleted the employee-improvement branch June 24, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants