Managing Priority Shifts Sequencing in OptaPlanner Rostering #203
Closed
govindsuresh1996
started this conversation in
General
Replies: 1 comment 14 replies
-
A very similar question was asked and answered on StackOverflow. |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on implementing an employee rostering system using OptaPlanner, and I've run into a scenario that I'd appreciate some guidance on.
In my system, I have two types of shifts: priority 1 shifts and priority 2 shifts. These shifts are identified using a priority field in the Shift class, which is also the planning entity.
My goal is to ensure that OptaPlanner considers filling priority 2 shifts only after all priority 1 shifts are filled. Essentially, I want to enforce a sequencing constraint where priority 1 shifts should be assigned first, and only then should the solver move on to priority 2 shifts.
Could anyone provide guidance on how I can configure OptaPlanner to respect this priority order and ensure that priority 2 shifts are only assigned after all priority 1 shifts are filled? Any suggestions, code examples, or insights into how to structure the constraint configuration would be highly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions