<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">Op 07-12-12 10:35, Michiel Vermandel
schreef:<br>
</div>
<blockquote
cite="mid:1354872950.35726.YahooMailNeo@web161301.mail.bf1.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:tahoma,
new york, times, serif;font-size:10pt">
<div><span>Thanks for the explanation, Geoffrey.</span></div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;"><span><br>
</span></div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;"><span>I voted for </span><span><a
moz-do-not-send="true" rel="nofollow"
class="yiv1246985838moz-txt-link-freetext" target="_blank"
href="https://issues.jboss.org/browse/JBRULES-3702">https://issues.jboss.org/browse/JBRULES-3702</a>
and I hope other users do so too.</span></div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;"><span>I think it can be very
handy for less experienced users (like myself) to get to
understand how things work.</span></div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;"><br>
<span></span></div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;"><span>Concerning the "</span>You
can put System.out.println() in the RHS.", that only shows
when the "then" part is invoked.</div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;">Sometimes I add a dummy
method "invoked" to my planning entity which always returns
true and prints all data I want.</div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;">I put this method as a
condition in the LHS.<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;">Though that is no permanent
solution as I do not want to clutter my rules with such dummy
conditions.</div>
</div>
</blockquote>
That doesn't make much sense to try understand in which order the
patterns match:<br>
Drools expert will try to optimize matching the patterns with as
little as calls as possible.<br>
It's similar to trying to understand how many times HashSet calls
equals() on the objects you add to it:<br>
quite a lot: it depends on load, bucket size, ...<br>
<blockquote
cite="mid:1354872950.35726.YahooMailNeo@web161301.mail.bf1.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:tahoma,
new york, times, serif;font-size:10pt">
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;">Regards,</div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 13.3333px;
font-family: tahoma,new york,times,serif; background-color:
transparent; font-style: normal;">Michiel<br>
</div>
<div> </div>
<div>-----------------<br>
<a class="moz-txt-link-freetext" href="http://www.codessentials.com">http://www.codessentials.com</a> - Your essential software, for
free!<br>
Follow us at <a class="moz-txt-link-freetext" href="http://twitter.com/#!/Codessentials">http://twitter.com/#!/Codessentials</a><br>
</div>
<div style="font-family: tahoma, new york, times, serif;
font-size: 10pt;">
<div style="font-family: times new roman, new york, times,
serif; font-size: 12pt;">
<div dir="ltr"> <font face="Arial" size="2">
<hr size="1"> <b><span style="font-weight:bold;">From:</span></b>
Geoffrey De Smet <a class="moz-txt-link-rfc2396E" href="mailto:ge0ffrey.spam@gmail.com"><ge0ffrey.spam@gmail.com></a><br>
<b><span style="font-weight: bold;">To:</span></b>
Michiel Vermandel <a class="moz-txt-link-rfc2396E" href="mailto:mvermand@yahoo.com"><mvermand@yahoo.com></a>; Rules
Users List <a class="moz-txt-link-rfc2396E" href="mailto:rules-users@lists.jboss.org"><rules-users@lists.jboss.org></a> <br>
<b><span style="font-weight: bold;">Sent:</span></b>
Friday, December 7, 2012 9:35 AM<br>
<b><span style="font-weight: bold;">Subject:</span></b>
Re: documentation on rules engine and planner<br>
</font> </div>
<br>
<div id="yiv1246985838">
<div> <br>
<div class="yiv1246985838moz-cite-prefix">Op 07-12-12
08:29, Michiel Vermandel schreef:<br>
</div>
<blockquote type="cite">
<div
style="color:#000;background-color:#fff;font-family:tahoma,
new york, times, serif;font-size:10pt;">Hi,<br>
<br>
I would like to read some documentation on how the
rules engine (specifically for planner) works.<br>
I have a number of unanswered questions.<br>
<br>
Some type of questions:<br>
<br>
- 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<br>
and then the second rule with all possible
combinations of the planning entities matching the
conditions of the rule<br>
</div>
</blockquote>
the order depends on the rule agenda, see drools expert
manual<br>
<a moz-do-not-send="true" rel="nofollow"
class="yiv1246985838moz-txt-link-freetext"
target="_blank"
href="http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html_single/index.html">http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html_single/index.html</a><br>
<blockquote type="cite">
<div
style="color:#000;background-color:#fff;font-family:tahoma,
new york, times, serif;font-size:10pt;"><span>- Can
I trace which rules are executed with what
planning-variables and in which order</span><br>
</div>
</blockquote>
You can put System.out.println() in the RHS.<br>
Drools expert does not support TRACE logging to support
this for you currently.<br>
If you would like this, vote for this issue:<br>
<a moz-do-not-send="true" rel="nofollow"
class="yiv1246985838moz-txt-link-freetext"
target="_blank"
href="https://issues.jboss.org/browse/JBRULES-3702">https://issues.jboss.org/browse/JBRULES-3702</a><br>
<br>
<blockquote type="cite">
<div
style="color:#000;background-color:#fff;font-family:tahoma,
new york, times, serif;font-size:10pt;">
<div><span>- What is the purpose of the last
variable amount of parameters ($x, $y, $z) in
the RHS logic insertLogical(new
IntConstraintOccurrence( ... , $x, $y ,$z))</span></div>
</div>
</blockquote>
Those "causes" is to keep Drools Expert's
insertLogical's behaviour happy because an <span>IntConstraintOccurrence's
equals/hashcode is called so only 1 can be in the
working memory.<br>
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.<br>
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.<br>
<br>
In any case, it's a valid issue that the docs don't
explain this causes thing.<br>
</span>
<blockquote type="cite">
<div
style="color:#000;background-color:#fff;font-family:tahoma,
new york, times, serif;font-size:10pt;">
<div style="color:rgb(0, 0,
0);font-size:13.3333px;font-family:tahoma, new
york, times, serif;
background-color:transparent;font-style:normal;"><br>
<span></span></div>
<div style="color:rgb(0, 0,
0);font-size:13.3333px;font-family:tahoma, new
york, times, serif;
background-color:transparent;font-style:normal;"><span>I
know there is <a moz-do-not-send="true"
rel="nofollow"
class="yiv1246985838moz-txt-link-freetext"
target="_blank"
href="http://docs.jboss.org/drools/release/5.5.0.Final/drools-planner-docs/html_single/index.html">http://docs.jboss.org/drools/release/5.5.0.Final/drools-planner-docs/html_single/index.html</a>
but it does not really answer the above
questions.<br>
</span></div>
<div style="color:rgb(0, 0,
0);font-size:13.3333px;font-family:tahoma, new
york, times, serif;
background-color:transparent;font-style:normal;"><br>
<span></span></div>
<div style="color:rgb(0, 0,
0);font-size:13.3333px;font-family:tahoma, new
york, times, serif;
background-color:transparent;font-style:normal;"><span>Thanks,</span></div>
<div style="color:rgb(0, 0,
0);font-size:13.3333px;font-family:tahoma, new
york, times, serif;
background-color:transparent;font-style:normal;"><br>
<span></span></div>
<div style="color:rgb(0, 0,
0);font-size:13.3333px;font-family:tahoma, new
york, times, serif;
background-color:transparent;font-style:normal;"><span>Michiel<br>
</span></div>
<div> </div>
<div>-----------------<br>
<a moz-do-not-send="true" rel="nofollow"
class="yiv1246985838moz-txt-link-freetext"
target="_blank"
href="http://www.codessentials.com/">http://www.codessentials.com</a>
- Your essential software, for free!<br>
Follow us at <a moz-do-not-send="true"
rel="nofollow"
class="yiv1246985838moz-txt-link-freetext"
target="_blank"
href="http://twitter.com/#%21/Codessentials">http://twitter.com/#!/Codessentials</a></div>
</div>
<br>
<fieldset class="yiv1246985838mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" rel="nofollow" class="yiv1246985838moz-txt-link-abbreviated" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" rel="nofollow" class="yiv1246985838moz-txt-link-freetext" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</div>
</div>
<br>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>