I've inherited a Optaplanner based employee roster system. It is largely based on the Optaweb example.
I've updated it to use Optaplanner 9.41.0.Final and will soon try to upgrade to Timefold, although I'm suspecting that this will not solve the issue.
The issue I'm experiencing is the solver is stuck. The resourcing is very simple:
When I begin the solver Wendy is assigned to (a) her preferred weekend shift and many week shifts. The other shifts are allocated to one of the others, and the third, who would be better to do the week day shifts, doesnt get any assigned shifts.
This poor assignment would make sense if it was updated and improved. But the solver seems to be stuck.
The debugging output is repeating the following:
2023-07-10 14:58:57,452 DEBUG [org.opt.cor.imp.loc.DefaultLocalSearchPhase] (pool-5-thread-1) LS step (4213), time spent (15807), score (0hard/-18medium/-67200soft), best score (0hard/-18medium/-67200soft), accepted/selected move count (1/8), picked move (Cafe 2023-07-15T00:00+12:00-2023-07-16T00:00+12:00 {null} <-> Cafe 2023-07-15T00:00+12:00-2023-07-16T00:00+12:00 {Andy}).
2023-07-10 14:58:57,458 DEBUG [org.opt.cor.imp.loc.DefaultLocalSearchPhase] (pool-5-thread-1) LS step (4214), time spent (15813), score (0hard/-18medium/-67200soft), best score (0hard/-18medium/-67200soft), accepted/selected move count (1/164), picked move (Cafe 2023-07-14T00:00+12:00-2023-07-15T00:00+12:00 {Andy} <-> Cafe 2023-07-14T00:00+12:00-2023-07-15T00:00+12:00 {null}).
Employee Andy
is the one who does not get any assignments. He has no specified Availability (desired / undesired) and has the same contract as the other 2 employees.
How can I better understand why it is stuck? And are there any obvious suggestions on how to un-stuck it?
When I being the
I'm not sure what the problem was. However, upgrading / migrating to Timefold resolved the issue.
Instructions on upgrading / migrating to Timefold are viewable at https://stackoverflow.com/a/76260016/265119