Op 01-12-11 05:23, guyramirez schreef: > Thank you for the pointers. > > My understanding is that since it is failing on the construction heuristic > (move/unmove not used at this point) then the issue would be in the score > rule? yes, good assumption. > Here is my only score rule (ShiftAssignment is the only planning entity with > shiftStartTime/shiftEndTime changing). Maybe something would jump at you: > > rule "intervalRequirementCovered" > when > $intervalReq : IntervalRequirement($interval : interval, > $position : > position, $staffingRequired : staffingRequired) > $matchingShiftAssignmentsCount : Number() from accumulate( > $matchingShiftAssignments : ShiftAssignment(shiftStartTime<= > $interval, shiftEndTime> $interval, position == $position), > count($matchingShiftAssignments) > ) > then > insertLogical(new > IntConstraintOccurrence("intervalRequirementCovered", > ConstraintType.NEGATIVE_HARD, > > Math.min($matchingShiftAssignmentsCount.intValue() - $staffingRequired, > 0), $intervalReq, $position)); Looks good, although I don't think the $position cause is needed as $intervalReq as a cause should be enough.
Also, I 'd change it like this: ... $matchingShiftAssignmentsCount : Number(intvalue< $staffingRequired) ... and leave out the Math.min(..., 0) code. Verify that IntervalRequirement doesn't change during planning. Are you using drools-planner-core 5.3.0.Final with drools-core 5.3.0.Final and drools-compiler 5.3.0.Final? > end > > Thanks, > Guy > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Planner-5-3-Final-presumedScore-is-corrupted-when-using-update-on-the-rules-working-memory-tp3546932p3550542.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- With kind regards, Geoffrey De Smet _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users