-
Bug
-
Resolution: Obsolete
-
Critical
-
None
-
7.5.0.Final
-
None
-
-
NEW
-
NEW
Running the solver, I got this error
The constraintMatchTotal (...) could not remove constraintMatch (..) from its constraintMatchSet
Exception in thread "main" java.lang.IllegalStateException: The constraintMatchTotal (solver/Same employee - Keep parts together=[0]hard/[-12/0/0]soft) could not remove constraintMatch (solver/Same employee - Keep parts together/[[TaskPart [id=02-1,
...
[0]hard/[-1/0/0]soft]).
at org.optaplanner.core.api.score.constraint.ConstraintMatchTotal.removeConstraintMatch(ConstraintMatchTotal.java:107)
at org.optaplanner.core.api.score.holder.AbstractScoreHolder$ConstraintActivationUnMatchListener.run(AbstractScoreHolder.java:137)
at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector$OptaplannerRuleEventListener.undoPreviousMatch(DroolsScoreDirector.java:103)
at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector$OptaplannerRuleEventListener.onDeleteMatch(DroolsScoreDirector.java:96)
at org.drools.core.event.RuleEventListenerSupport.lambda$onDeleteMatch$2(RuleEventListenerSupport.java:33)
It seems related with the following rule:
rule "Same employee - Keep parts together"
when
$tp : TaskPart (task.maxParts > 1, $e : employee, $t : task)
$parts : List( size > 1 ) from collect ( TaskPart ( task == $t, employee == $e ) )
exists TaskPart ( employee == $e,
task == $t,
previousTaskPartOrEmployee not memberOf $parts,
nextTaskPart not memberOf $parts )
then
scoreHolder.addSoftConstraintMatch(kcontext, 0, -1 );
end
Basically this rules try to check if there is an isolated task part.
- relates to
-
PLANNER-1433 ConstraintMatchTotal does not handle 'or' rule situations properly
- Closed