Hi,
I've implemented a very simple application using drools planner consisting of a bunch of activities. My rule file is very simple too and just counts the number of activities not assigned. When I run Solver.solve(), I get the following error message:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: The presumedScore (-10hard/0soft) is corrupted because it is not the realScore (0hard/0soft).
Presumed workingMemory:
Score rule (remainingActivitiesCount) has count (1) and weight total (11).
Real workingMemory:
Score rule (remainingActivitiesCount) has count (1) and weight total (0).
I've tracked down this message and found this piece of code @DefaultLocalSearchSolver.solveImplementation():
// there is no need to recalculate the score, but we still need to set it
localSearchSolverScope.getWorkingSolution().setScore(localSearchStepScope.getScore());
if (assertStepScoreIsUncorrupted) {
localSearchSolverScope.assertWorkingScore(localSearchStepScope.getScore());
}
It seems that the working score is never updated along the algorithm, but the score in the working memory changes. Thus, when we use the DEBUG environment, assertStepScoreIsUncorrupted is turned on and the assertion fails.
Should the score be updated or am I using the library incorrectly?
Thanks,