Hi Greg,
Yes, I expected that too, but my experiments proved me wrong (for now).
The current implementation of accumulate backwards chains I believe.
Backward chaining doesn't do score delta calculation, so it's very bad
for scalability.
Try it yourself with the nqueens example.
Uncomment the code in nqueensScoreRules.drl and see what happens if you
go from n=8 to n=16 and more.
With kind regards,
Geoffrey De Smet
Greg Barton schreef:
I answered a performance question a user had about
drools-solver, but I'm afraid I answered with a touch of
ignorance about the way drools-solver is set up. His rules
had a new object being inserted into the working memory each
time a constraint rule was matched. The constraint objects
were then accumulated by a low priority rule at the end.
After looking at the drools-solver examples it looks like
they're all that way. It strikes me that having a
single accumulator object, and not creating and inserting a
new object in each constraint rule, would be more efficient.
Is it possible to set this up in a solver ruleset?
Thanks,
GreG