I am using an incremental calculator for my model. After several hours / days of optimization in "full assert" mode, an exception error exception is thrown:
java.lang.IllegalStateException: Score corruption: the workingScore (-86591/-2765/-422/-591) is not the uncorruptedScore (-86591/-2873/-422/-591) after completedAction [...]: Uncorrupted: Score calculator 3718238 [schedule=Schedule6422-2015-04-16T09:47:36.932[-86591/-2873/-422/-591], prioritiesScore=-422, timelineGapsScore=-2873, requirementGapsScore=-86591, timelineVersionsScore=-591] Corrupted: Score calculator 3717237 [schedule=Schedule6422-2015-04-16T09:47:36.932[-86591/-2873/-422/-591], prioritiesScore=-422, timelineGapsScore=-2873, requirementGapsScore=-86591, timelineVersionsScore=-591]
This metric differs in the timelineGapsScore parameter. An instance of the instance is created from the object fields of the scores calculator prioritiesScore , timelineGapsScore , requirementGapsScore and timelineVersionsScore . In this case, the instances of both estimates are equivalent, but the optaplanner mechanism detects differences (-86591 / -2765 / - 422 / -591) vs (-86591 / -2873 / - 422 / -591). How is this possible?
I suspect that cloning solutions leak (this is a concrete implementation and deep copying), but a thorough code check does not show such errors.
UPD: I forgot to mention: optaplanner works in daemon mode, the model is able to change facts in real time. Therefore, I have a suspicion of the race conditions in the model. But I do not know how injection changes are implemented under the hood of an optaplanner (not enough information in the documents ).
source share