> They also evaluated Drool-planner for the "planning" part but went another direction for several reasons.
This would be interresting to know these reasons.
>I am only working here into transforming the complex user-filled rules into "forbid" pairs as an input
>to the optimizer.
>
>I might use drools-planner for this.
Don't use planner only to generate pairs. You don't need planner there, drools 'basic' will do the job.
If you use planner, use it for you whole optim problem, and feed it with all yours "complex user-filled rules".
Using planner for that will let you write at most any kind of criteria/KPI or contraints.
> NoT a stream, but yes, this is a service that will stay up and act as a method : > Return the list of forbids for a given list of activities and resources.
>
>If I have two rule A and B that may produce the same forbid pairs, I want to produce this pair only once.
>For that, I will use inference and produce a :
>
>insert(new Forbid(ressource, activity))
>
>Then, in each rule, I will check that this forbid is not already present.
If the problem is generating a Set of Forbid pairs, you should conlude your rules by adding in a Set (in a kind of response object), and not inserting at all (and remove you check in each rule, except If you use them for more than that).
>So my question is :
>Will Drools "learn" from preivous processings and "learn" that rule A matches more often than rule B ?
>And so will it promote A to be processed first ?
>Even if I flush the working memory between two calls ?
Calling "fireAllRules" will fire all possible rules, whatever their execution order.
It is not processed "by rules", see RETE algo.