-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
-
2021 Week 19-21 (from May 10), 2021 Week 22-24 (from May 31)
-
5
-
Undefined
-
NEW
-
NEW
We should have a constraint collector that allows users to collect consecutive intervals
Ex:
Constraint atMostThreeConsecutiveShifts(ConstraintFactory constraintFactory) {
return constraintFactory.from(Employee.class)
.join(Shift.class, Joiners.equal(Function.identity(), Shift::getEmployee)
.collect((employee, shift) -> employee, consecutiveIntervals((employee,shift) -> shift, Shift::getStartDateTime, Shift::getEndDateTime))
.flattenLast(IntervalCluster::getSequences)
.filter((employee,sequence) -> sequence.size() > 3)
.penalize("At most 3 consecutive shifts", HardSoftScore.ONE_HARD);
}
- blocks
-
PLANNER-1826 Add ConstraintProvider for Nurse Rostering example
-
- Resolved
-
- is related to
-
PLANNER-2450 Improve performance of consecutive constraint collector
-
- Resolved
-