[rules-users] Optaplanner rule to assign employee only to shift when he/she has the skills
ns
nick.snels at ocmwturnhout.be
Tue Nov 26 08:12:47 EST 2013
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-only-to-shift-when-he-she-has-the-skills-tp4026879p4026943.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list