Search code examples
optaplanneroptaweb-employee-rostering

A couple of Optaplanner customizacion doubts


I've been evaluating Optaplanner vs. optashift, and finally (due to deployment errors and Openshift dependencies) I decided to go with Optaplanner even though I might have to deal with Drool which I'm not familiar with.

I've been toying around the Optaplanner project, and I need to implement/parameter two functionalities that haven't found how to deal with.

1.- I have a complex working shift (6 working days, 2 rest days, 6 work, 2 rest, 6 work and 3 rest). Can this be parametrized in the Pattern/PatternEntry part of the import.xml? If I could state somewhere that the total working shift is 25 days long, maybe I could assume 6+2 periods (so it woudl be 6+2+6+2+6+2 and then 1 free day for the 25th day).

2.- I also have to take into consideration what have they done the 27 days before to 'continue' the 6,2,6,2,6,3 pattern, but I don't know how to do this. I thought I should assign a variable to each worker so that is specifies which day of the 27 cycle should start with. For example, iDayOfShift = 0 the worker starts fresh on the first day of the 27 cycle, but if iDayOfShift = 8 it means he is starting the second 6 working day cycle. Can this also be configured as part of the Employee info in the import.xml?


Solution

  • optashift-employee-rostering is in very active development and master for now tends to be unstable (MAR-2018). This will get better - Rome wasn't build in a day.

    Sounds like 1) is more like "a rotation matching" than "a pattern matching", in optashift look at how Employee.rotationEmployee is used.

    2) I don't understand. But this is what optashift-employee-rostering is building towards over the next few months:

    enter image description here