[jboss-jira] [JBoss JIRA] (JBRULES-3440) No score reported in best solution if no steps taken

Geoffrey De Smet (JIRA) jira-events at lists.jboss.org
Sat Mar 31 05:43:47 EDT 2012


    [ https://issues.jboss.org/browse/JBRULES-3440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680767#comment-12680767 ] 

Geoffrey De Smet commented on JBRULES-3440:
-------------------------------------------

+1 if the starting solution is the best solution, it should return that, not null.
I 've done some improvements a few weeks ago on master for 5.4.0.CR1, that will probably fix this. Can you test with the 5.4.0-SNAPSHOT or CR1 (as soon as it's released) to verify if it is still an issue? If you verify it is, I 'll fix it for 5.4.

Separate discussion: "guaranteed to always return non-null after a successful solver.solve() invocation": If if the best solution is uninitialized (independently whether the best solution is the starting solution or a later found solution), for example when there wasn't enough time for the construction heuristic to finish solution initialization, can it return null then?
                
> 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