Optaplanner "cannot add" constraint, but not clear why

When running an OptaPlanner solver, I'm getting the message:

Exception in thread "main" Exception executing consequence for rule "ProgrammeCompulsoryPracticalWipeout" in defaultpkg: java.lang.IllegalStateException: The constraintMatchTotal (defaultpkg/ProgrammeCompulsoryPracticalWipeout=-2074hard/0soft) could not add constraintMatch (defaultpkg/ProgrammeCompulsoryPracticalWipeout/[I1/P04712, P04705, TE54]=-1hard/0soft) to its constraintMatchSet ([defaultpkg/ProgrammeCompulsoryPracticalWipeout/[D1/U08784, U08606, SH]=-1hard/0soft, defaultpkg/ProgrammeCompulsoryPracticalWipeout/[E3/U08403, U08625, MA]=-1hard/0soft, defaultpkg/ProgrammeCompulsoryPracticalWipeout/[D2/U08627, U08625, MA]=-1hard/0soft, .. (continues for more than 100 entries)

It's not clear what the exception is or why it's being caused. The rule in question is as follows:

rule "ProgrammeCompulsoryPracticalWipeout"


Program( $comp : compulsories, $all : all )

$compmod : Module() from $comp

$otherlec : Session ($all contains module, module != $compmod, mandatory ==...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts