Generate Shifts

Viewed 54

I have a planning problem which looks like this:
I have defined a requirement for each hour of specific days.
It looks something like this: 8:00 = 4 required employees, 9:00 = 5 required employees and so on..
By using these requirements I would like to generate employee timeslots to satisfy these requirements.
For example, if there is a requirement of 4 employees at 8:00 I need to make sure 4 shifts are created which spans that hour.
The problem is that I do not know how many shifts needs to be created before I start the solving, which means the problemfactcollection needs to adapt as the planning goes on (or does it?).

Another thing that complicates the problem even more is that depending on the length of the shift, a break may or may not be included which then affect if the shift should be taking into account during the specific hour.

The timegrain-pattern seems to fit this solution best, but is this even possible to achieve with optaplanner?
Perhaps I have gotten stuck in this thought pattern and you have a better potential solution to this?

0 Answers
Related