Op 07-12-12 10:35, Michiel Vermandel
schreef:
Thanks for the explanation, Geoffrey.
I think it can be very
handy for less experienced users (like myself) to get to
understand how things work.
Concerning the "You
can put System.out.println() in the RHS.", that only shows
when the "then" part is invoked.
Sometimes I add a dummy
method "invoked" to my planning entity which always returns
true and prints all data I want.
I put this method as a
condition in the LHS.
Though that is no permanent
solution as I do not want to clutter my rules with such dummy
conditions.
That doesn't make much sense to try understand in which order the
patterns match:
Drools expert will try to optimize matching the patterns with as
little as calls as possible.
It's similar to trying to understand how many times HashSet calls
equals() on the objects you add to it:
quite a lot: it depends on load, bucket size, ...
Regards,
Michiel
Op 07-12-12
08:29, Michiel Vermandel schreef:
Hi,
I would like to read some documentation on how the
rules engine (specifically for planner) works.
I have a number of unanswered questions.
Some type of questions:
- If I have two rules in my drl file, will the
engine execute first the first rule with all
possible combinations of the planning entities
matching the conditions of the rule
and then the second rule with all possible
combinations of the planning entities matching the
conditions of the rule
the order depends on the rule agenda, see drools expert
manual
http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html_single/index.html
- Can
I trace which rules are executed with what
planning-variables and in which order
You can put System.out.println() in the RHS.
Drools expert does not support TRACE logging to support
this for you currently.
If you would like this, vote for this issue:
https://issues.jboss.org/browse/JBRULES-3702
- What is the purpose of the last
variable amount of parameters ($x, $y, $z) in
the RHS logic insertLogical(new
IntConstraintOccurrence( ... , $x, $y ,$z))
Those "causes" is to keep Drools Expert's
insertLogical's behaviour happy because an IntConstraintOccurrence's
equals/hashcode is called so only 1 can be in the
working memory.
Basically, they explain what caused that part of the
score. It's interesting if you want to use them to
explain why a solution has a certain score.
But, on the other hand, it's a PITA and I am working
on an alternative that's easier to use and faster,
once drools expert supports ChangeMatchListeners.
In any case, it's a valid issue that the docs don't
explain this causes thing.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users
|
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users