All,
//tasks need to be in the same timeSlot
rule "taskInTimeSlot"
when
$ra1 : ResourceAssignment ( task != null, time != null, $id : id, $task : task, $time : time)
$ra2 : ResourceAssignment ( task != null, timeSlot != null, id != $id, task == $task, time != $time )
then
insertLogical(new IntConstraintOccurrence("taskInTimeSlot", ConstraintType.NEGATIVE_HARD,
1,$ra1, $ra2));
end
*PROBLEM*
This results in: Cancelled step index (7), time spend (2848): there is no doable move. Terminating phase early.
If I change the constraint to a NEGATIVE_SOFT the problem is solved, but it doesn't scale. Any more that a few tasks and it doesn't seem to be able to find solutions.
What I need is for swaps and moves to change the time on multiple ResourceAssignments together.
Am I going about the problem the right way? Do I need something other than the generic move/swap factories?
Thanks in advance,
Jason