Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-12

NPE during benchmark when no solution found so far

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.5.0.Final
    • None
    • optaplanner-core
    • None

      Running a benchamrk on a slow machine throws a NPE because there is no best solution found yet.

      Benchmark log:

      19:19:09.454 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.b.core.DefaultPlannerBenchmark - Benchmarking started: solverBenchmarkList size (2).
      19:19:09.465 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.b.core.DefaultPlannerBenchmark - ================================================================================
      19:19:09.465 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.b.core.DefaultPlannerBenchmark - Warming up
      19:19:09.465 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.b.core.DefaultPlannerBenchmark - ================================================================================
      19:19:14.598 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving started: time spend (0), score (null), new best score (null), random seed (0).
      19:19:16.809 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.c.g.DefaultGreedyFitSolverPhase - Phase construction heuristic ended: step total (24), time spend (2211), best score (0hard/-42soft).
      19:20:22.537 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.l.DefaultLocalSearchSolverPhase - Phase local search ended: step total (30), time spend (67939), best score (0hard/-33soft).
      19:20:22.538 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving ended: time spend (67940), best score (0hard/-33soft), average calculate count per second (17).
      19:20:22.538 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.b.core.DefaultPlannerBenchmark - ================================================================================
      19:20:22.538 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.b.core.DefaultPlannerBenchmark - Finished warmUp
      19:20:22.538 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.b.core.DefaultPlannerBenchmark - ================================================================================
      19:21:04.936 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving started: time spend (0), score (null), new best score (null), random seed (0).
      19:21:23.205 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.c.g.DefaultGreedyFitSolverPhase - Phase construction heuristic ended: step total (24), time spend (18269), best score (0hard/-42soft).
      19:21:25.876 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.l.DefaultLocalSearchSolverPhase - Phase local search ended: step total (83), time spend (20940), best score (0hard/-16soft).
      19:21:28.444 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.l.DefaultLocalSearchSolverPhase - Phase local search ended: step total (36), time spend (23508), best score (0hard/0soft).
      19:21:28.445 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving ended: time spend (23509), best score (0hard/0soft), average calculate count per second (286).
      19:21:28.988 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving started: time spend (0), score (null), new best score (null), random seed (0).
      19:21:29.759 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.c.g.DefaultGreedyFitSolverPhase - Phase construction heuristic ended: step total (24), time spend (771), best score (0hard/-42soft).
      19:21:31.522 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.l.DefaultLocalSearchSolverPhase - Phase local search ended: step total (93), time spend (2534), best score (0hard/-21soft).
      19:21:31.881 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.l.DefaultLocalSearchSolverPhase - Phase local search ended: step total (10), time spend (2893), best score (0hard/0soft).
      19:21:31.882 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving ended: time spend (2894), best score (0hard/0soft), average calculate count per second (1005).
      19:21:32.121 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving started: time spend (0), score (null), new best score (null), random seed (0).
      19:21:35.250 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.c.g.DefaultGreedyFitSolverPhase - Phase construction heuristic ended: step total (93), time spend (3129), best score (-6hard/-214soft).
      19:22:05.244 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.l.DefaultLocalSearchSolverPhase - Phase local search ended: step total (166), time spend (33123), best score (0hard/-249soft).
      19:22:39.981 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.l.DefaultLocalSearchSolverPhase - Phase local search ended: step total (2), time spend (67860), best score (0hard/-239soft).
      19:22:39.981 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving ended: time spend (67860), best score (0hard/-239soft), average calculate count per second (166).
      19:22:54.490 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving started: time spend (0), score (null), new best score (null), random seed (0).
      19:23:54.743 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.c.c.g.DefaultGreedyFitSolverPhase - Phase construction heuristic ended: step total (53), time spend (60253), best score (null).
      19:23:54.748 [org.drools.planner.examples.tournaments.Benchmark.main()] INFO  o.d.p.core.solver.DefaultSolver - Solving ended: time spend (60258), best score (null), average calculate count per second (54).
      

      Exception:

      Caused by: java.lang.NullPointerException
      	at org.drools.planner.benchmark.core.ProblemBenchmark.benchmark(ProblemBenchmark.java:127)
      	at org.drools.planner.benchmark.core.DefaultPlannerBenchmark.benchmark(DefaultPlannerBenchmark.java:133)
      	at org.drools.planner.examples.tournaments.Benchmark.main(Benchmark.java:25)
      	... 6 more
      

              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              mvecera Martin Vecera (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: