[jboss-jira] [JBoss JIRA] (JBRULES-3440) No score reported in best solution if no steps taken
Chris Dolan (JIRA)
jira-events at lists.jboss.org
Fri Mar 30 16:52:47 EDT 2012
Chris Dolan created JBRULES-3440:
------------------------------------
Summary: No score reported in best solution if no steps taken
Key: JBRULES-3440
URL: https://issues.jboss.org/browse/JBRULES-3440
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-planner
Affects Versions: 5.4.0.Beta2
Environment: drools-planner-example 5.4.0-SNAPSHOT pulled via Maven on March 29. This is commit https://github.com/droolsjbpm/drools-planner/commit/ba38344b7563830eb2a725f78c03be043b1c1f65
Reporter: Chris Dolan
Assignee: Geoffrey De Smet
Priority: Minor
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.
{noformat}
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
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list