-
Bug
-
Resolution: Done
-
Minor
-
None
-
None
If my initial solution guess is perfect and the solver exits before taking any steps, then solver.getBestSolution().getScore() is null. If I change my initializer so the first guess is intentionally wrong, then getScore() returns non-null.
I would prefer that getScore() would be guaranteed to always return non-null after a successful solver.solve() invocation. Clearly the score is being computed because the log messages show it (see below). But the returned solution instance does not reflect that. By debugging, I can see that the returned solution is in fact the same instance that I passed in via setPlanningProblem() and not a clone.
2012-03-30 15:42:53,283 INFO [DefaultSolver.java:172] Solving started: time spend (145), score (0hard/0soft), new best score (0hard/0soft), random seed (0). - o.d.p.c.s.DefaultSolver 2012-03-30 15:42:53,289 INFO [DefaultSolver.java:197] Solving ended: time spend (156), best score (0hard/0soft), average calculate count per second (6). - o.d.p.c.s.DefaultSolver