[
https://issues.jboss.org/browse/JBRULES-3440?page=com.atlassian.jira.plug...
]
Geoffrey De Smet commented on JBRULES-3440:
-------------------------------------------
Regarding the separate discussion: Doh, I don't agree, but I already feared that most
users will think that way. See JBRULES-3462, let's continue the discussion there.
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/ba38344b7563830eb2a72...
Reporter: Chris Dolan
Assignee: Geoffrey De Smet
Priority: Minor
Fix For: 5.4.0.Final
Attachments: NonNullScoreTest.java
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