<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <blockquote type="cite">
      <div>rule " test rule"</div>
      <div><span class="" style="white-space:pre"> </span>when</div>
      <div><span class="" style="white-space:pre"> </span>$s : Shift($i
        : index)&nbsp;</div>
      <div><span class="" style="white-space:pre"> </span>$d :
        Demand(shift.getIndex() == $i)</div>
      <div><span class="" style="white-space:pre"> </span>then</div>
      <div><span class="" style="white-space:pre"> </span>System.out.println("Test
        rule fired.");</div>
      <div>end</div>
    </blockquote>
    So your Solution.getProblemFacts() method adds all Shifts and all
    Demands?<br>
    Then the rule should fire if there is indeed such a combination.<br>
    <br>
    Write a SimpleScoreCalculator to verify this (see docs).<br>
    Later on, you can reuse that SimpleScoreCalculator in
    &lt;assertionScoreDirectorFactory&gt; to validate your DRL (which is
    much faster).<br>
    <br>
    <div class="moz-cite-prefix">On 04-11-13 16:26, nkgxgongxi wrote:<br>
    </div>
    <blockquote cite="mid:1383578790000-4026626.post@n3.nabble.com"
      type="cite">
      <pre wrap="">Ge0ffery,

Thank you very much for the reply. I have double-checked my code, and I did
use addAll() here.

I also used one of my simplest OptaPlanner projects as a test, and the same
thing occurred. 

Later last Friday I found out a workaround of picking up planning entity
first (in my rule definition). Then I can access to the problem facts via
condition match. But this made the code complex and not elegant. Would you
elaborate more if I misunderstand how OptaPlanner solver behaves? 

Once again, I really appreciate your help and your effort on this powerful
software. 

Cheers,




--
View this message in context: <a class="moz-txt-link-freetext" href="http://drools.46999.n3.nabble.com/rules-users-Ask-for-help-with-OptaPlanner-tp4026583p4026626.html">http://drools.46999.n3.nabble.com/rules-users-Ask-for-help-with-OptaPlanner-tp4026583p4026626.html</a>
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
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>