I have a rule like this:

rule teacherCanOnlyTeachOneGroupAtATime
  when
    $lesson : Lesson($id : id, $teacher : teacher, $timeslot : timeslot);
    exists Lesson(id > $id, teacher == $teacher, timeslot == $timeslot);
  then
    assertLogical(new HardConstraint(new Object[]{$lesson}, 1));
    // new HardConstraint(causesToUseInEqualsMethod, weight)
end


This leads to a false HardConstraint (after a while of using the same workingMemory). I suspect this is because the HardConstraint's equals() method only verifies versus the $lesson, while it should also verify versus the list of existing lessons?
But it can't do "$lessonList : exists Lesson(...)".

--
With kind regards,
Geoffrey De Smet


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to