I have based my code on the nurse rostering example. But I have completely
stripped out the GUI part.
But I have found the error. My rule was wrong. A rule that works for me is:
rule "alternativeSkill"
when
ShiftAssignment($employee : employee, $shiftType : shiftType)
not SkillProficiency(employee == $employee, shiftType == $shiftType)
then
scoreHolder.addHardConstraintMatch(kcontext, -1);
end
--
View this message in context:
http://drools.46999.n3.nabble.com/Optaplanner-rule-to-assign-employee-onl...
Sent from the Drools: User forum mailing list archive at
Nabble.com.