Ella
Ella

Reputation: 101

Optaplanner + Drools - How to create "Minimum number of shifts" rule?

I'm working on this Optaplanner example (optashift-employee-rostering).

and It's all working now, except for I have few Days with no shifts assigned to any employee in any time slots, So I need to add a rule for "Minimum One shift per day per employee (for a specific spot)" and I can't work out the rule as I'm very new to Java and Drools.

And also how should I force a rule like "4 consecutive Night Shifts followed by 1 Rest day followed by 3 consecutive Day Shifts" per employee? I had a look at the original Optaplanner nursing rostering rules and that one was even more complicated.

Where can I learn how to write these rules for Optaplanner in Drools? Their documentation doesn't explain much the code in rules, or maybe I haven't found that? as soon as my rules is a bit different then I get stuck. Where can I find more examples of theses rules that could cover more constraints?

Upvotes: 1

Views: 317

Answers (0)

Related Questions