Thanks very much for this detailled anbwser.
this helps me much.
I am currently playing with Drools, and trying to build rules in Java from my own Rule objects, with the help of the lang.api.
to me you mean "generating an allocation plan".
> The optimizer takes as input (among others) a list of forbiden allocations
> that should be generated based on some user-provided rules.
drools-planner is for you, especially if your users want to define more complex rules.
and here it sounds like a service that has a stream to consume ?
then just write rules, put a session in a separate thread, and send him your stream as input.
You can even use drools-fusion time operators.
> Performance constraintsis it the due time for you plan ?
> Here are some rough hints about the volumetry of the problem :
> * 1000 activities
> * 200 resources
> * 50 rules
>
> I need the forbidden allocations to be generated in under a minute.
> Instead, I would try to match the resources and the activities separatelyRETE will do that for you
> on each rule (each side of the rule), and then assemble the couples that
> match at least one common rule.
> Also, I would add some counter on each rule that would auto increment upon
> each match, in order to apply first the rules that match often.
If there is a session in a thread, ie maintaining its kownledge over time,
RETE will do that for you, by propagating only the updates to the matching rules (forward chaining).
If you speak about optimisation using local search, drools-planner will do that for you (by using the previous, may be with adding so custom moves generators).
If the point is to process forbidden associations, yes, drools can be smarter than that.
> QuestionsIs the engine of Drools smart enought for that ? Or is he even
> smarter ?
I whould even say that drools shoud be used only if you want to do to more than that.
> Do you have an example of Drools being used in a similar problem withoptim : drools-planner and its cloud balancing sample
> success ?
real-time stream : look at drools-fusion samples and also drools-expert doc (to get the basis of what rules can do)