[jboss-jira] [JBoss JIRA] (JBRULES-3328) Add an API to allow access to the constraint occurrences of a solution

Geoffrey De Smet (JIRA) jira-events at lists.jboss.org
Fri Feb 10 10:58:48 EST 2012


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

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

Copied from the change:

Hi David,

Thanks for sharing this change. Even though I don't want to change the BestSolutionEvent API like this (as it leaks the solver's "working" WorkingMemory), it does give me a very good insight on what you want to do.

Furthermore, I 've recently specced out that the user provides a bestSolution and the workingMemory is a clone of that. So that means the bestSolution is never in the WorkingMemory. See the changes here:
https://github.com/droolsjbpm/drools-planner/commit/5690541a567e5db36c6f2f5a66fda4f9c99d4086#diff-6

Next improvement in this will be to split up the SolutionDirector into SolutionDirectorFactory (holds RuleBase) and SolutionDirector (holds WorkingMemory) so the user can use the same SolutionDirectorFactory to create it's own, isolated SolutionDirector.
That would mean you'd have to take the bestSolution and set it on your SolutionDirector (instead of sharing a WorkingMemory with the Solver). Can you live with that? It might be a small performance hit (but premature optimization is the root of all evil because not doing it would hinder multi-threaded solving in the future).

                
> Add an API to allow access to the constraint occurrences of a solution
> ----------------------------------------------------------------------
>
>                 Key: JBRULES-3328
>                 URL: https://issues.jboss.org/browse/JBRULES-3328
>             Project: Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: drools-planner
>    Affects Versions: FUTURE
>            Reporter: David Glassborow
>            Assignee: Geoffrey De Smet
>
> For a given solution, I'd like to show what constraint occurrences are in the working memory, and ideally which occurrences for each planning entity.
> This allows end users to understand the schedule, in my experience otherwise they stop trusting the system.
> Currently the demo harness uses an internal API to get this information, and I think it maybe getting the wrong WM, the values looked out of step with the solver last time I looked

--
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