Thanks for the explanation, Geoffrey.

I voted for https://issues.jboss.org/browse/JBRULES-3702 and I hope other users 
do so too.
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.

Regards,

Michiel

 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials


________________________________
 From: Geoffrey De Smet <[email protected]>
To: Michiel Vermandel <[email protected]>; Rules Users List 
<[email protected]> 
Sent: Friday, December 7, 2012 9:35 AM
Subject: Re: documentation on rules engine and planner
 



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.
 

>
>I know there is 
>http://docs.jboss.org/drools/release/5.5.0.Final/drools-planner-docs/html_single/index.html 
> but it does not really answer the above questions.
>
>
>
>Thanks,
>
>
>Michiel
>
> 
>-----------------
>http://www.codessentials.com - Your essential software, for free!
>Follow us at http://twitter.com/#!/Codessentials
>
>
>_______________________________________________
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

Reply via email to