]
Geoffrey De Smet resolved JBRULES-3413.
---------------------------------------
Fix Version/s: 5.5.0.Beta1
Resolution: Done
Fixed. Instead of an NPE, it does generate a report now, for example:
{code}
Solver medium01 long02 medium_hint01 medium_hint02 Average Ranking
tabuSearch-moveTabu 0hard/-373soft failed 0hard/-171soft 0hard/-542soft 0hard/-362soft 0
{code}
Notice the "failed" benchmark.
In the log, you see this until JBRULES-3462 is fixed:
{code}
2012-05-04 15:47:53,981 [main] INFO Benchmarking failed: failureCount (1), statistic html
overview
(/home/gdesmet/projects/jboss/droolsjbpm/drools-planner/drools-planner-examples/local/data/nurserostering/medium/2012-05-04_154739/statistic/index.html).
Exception in thread "main" java.lang.IllegalStateException: Benchmarking failed:
failureCount (1). The first exception is chained.
at
org.drools.planner.benchmark.core.DefaultPlannerBenchmark.benchmarkingEnded(DefaultPlannerBenchmark.java:289)
at
org.drools.planner.benchmark.core.DefaultPlannerBenchmark.benchmark(DefaultPlannerBenchmark.java:161)
at
org.drools.planner.examples.common.app.CommonBenchmarkApp.process(CommonBenchmarkApp.java:32)
at
org.drools.planner.examples.nurserostering.app.NurseRosteringBenchmarkApp.main(NurseRosteringBenchmarkApp.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.IllegalStateException: Score is null. TODO fix JBRULES-3462.
at
org.drools.planner.benchmark.core.DefaultPlannerBenchmark.runSingleBenchmarks(DefaultPlannerBenchmark.java:245)
at
org.drools.planner.benchmark.core.DefaultPlannerBenchmark.benchmark(DefaultPlannerBenchmark.java:160)
... 7 more
{code}
NPE during benchmark when no solution found so far
--------------------------------------------------
Key: JBRULES-3413
URL:
https://issues.jboss.org/browse/JBRULES-3413
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-planner
Affects Versions: 5.4.0.Beta2
Reporter: Martin Vecera
Assignee: Geoffrey De Smet
Fix For: 5.5.0.Beta1
Running a benchamrk on a slow machine throws a NPE because there is no best solution
found yet.
Benchmark log:
{code}
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).
{code}
Exception:
{code}
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
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: