-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
None
-
None
Whenever I configure tabu search (be it solution, move or planning entity) in my acceptor, I get the following NPE:
Exception in thread "main" java.lang.NullPointerException
at org.drools.planner.core.localsearch.decider.acceptor.tabu.AbstractTabuAcceptor.stepTaken(AbstractTabuAcceptor.java:163)
at org.drools.planner.core.localsearch.decider.acceptor.CompositeAcceptor.stepTaken(CompositeAcceptor.java:69)
at org.drools.planner.core.localsearch.decider.DefaultDecider.stepTaken(DefaultDecider.java:166)
at org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.stepTaken(DefaultLocalSearchSolverPhase.java:107)
at org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:71)
at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:183)
at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:151)
at org.drools.planner.examples.ras2012.App.main(App.java:25)
Looking at the relevant place in code, we find:
Integer oldTabuStepIndexInteger = tabuToStepIndexMap.get(oldTabu);
int oldTabuStepCount = tabuStepIndex - oldTabuStepIndexInteger; // at least 1
It appears that the code doesn't cover the case where tabuToStepIndexMap doesn't contain oldTabu.
Should a reproducer be needed, please look at the following Github repo, configure the solver to use tabus, and launch the application via App.java:
https://github.com/triceo/ras12
- duplicates
-
PLANNER-9 NPE in AbstractTabuAcceptor.stepTaken
- Resolved