[rules-users] Knowing which constraints are broken for final best solution in drools-planner

Manuel Aráoz manuelaraoz at gmail.com
Tue Mar 20 17:12:05 EDT 2012


Hi! I'm new to this forum so... my name is Manuel and I'm using drools
planner to solve an exam scheduling problem :)

I need to analyze which constraints are broken while the algorithm is
running and when the solver finishes also. Geoffrey pointed me to the
examples, where that is done.

I copied the getScoreDetailList() idea from that example, and it works
perfectly fine for when the algorithm is running (constraints are found and
I can inspect them). The basic idea is that this method obtains the working
memory and obtains from it the objects of type ConstraintOccurrence.

The thing is, when the solver finishes and I call this method, it returns
no constraints, even though I know by the score that some constraints are
still broken. Am I doing something wrong? Or is this the expected
behaviour? It seems as if working memory erases the ConstraintOccurrences
when the solver finishes, but I don't really know. In that case, how can I
obtain the constraints broken for the final solution?

Hope I made myself clear! Thanks!
Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120320/c762a130/attachment.html 


More information about the rules-users mailing list