<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt">Wel... I still get <font face="Arial" size="2">The workingMemory has 1 ConstraintOccurrence(s) in excess, even with that Sequence.ne<font size="2">xt().<br></font></font><font face="Arial" size="2"><font size="2"><font face="Arial" size="2">Sequence.ne<font size="2">xt()<font size="2"> generates on every invokation a new Long<font size="2"> object </font></font></font></font>with a value one higher tha<font size="2">n the <font size="2">one of the previous <font size="2">invokation.</font></font></font><br><font size="2">This leaves me completely clueless on how/when drools expert throws </font></font></font><font face="Arial" size="2"><font size="2"><font size="2"><font face="Arial" size="2">"The workingMemory has 1 ConstraintOccurrence(s) in
excess".</font></font></font></font><div><span><br></span></div><div> </div><div>-----------------<br>http://www.codessentials.com - Your essential software, for free!<br>Follow us at http://twitter.com/#!/Codessentials<br></div> <div style="font-family: arial, helvetica, sans-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> Michiel Vermandel <mvermand@yahoo.com><br> <b><span style="font-weight: bold;">To:</span></b> Geoffrey De Smet <ge0ffrey.spam@gmail.com>; Rules Users List <rules-users@lists.jboss.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, February 5, 2013 12:49 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [rules-users] Drools planner: The workingMemory has 1 ConstraintOccurrence(s) in excess<br> </font>
</div> <br>
<div id="yiv690726764"><div><div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;">Hi,<br><br>In order to save time and focus on the bigger (?) problems:<br><br>how bad is it to use a sequence number as extra parameter like<br>insertLogical(new IntConstraintOccurrence("noConsecutiveIV", ConstraintType.NEGATIVE_HARD, .... <span style="font-weight:bold;">Sequence.next()</span> );<br><div><span>to avoid the ConstraintOccurrence(s) in excess (for now) ?</span></div><div style="color:rgb(0, 0, 0);font-size:13.3333px;font-family:arial, helvetica, sans-serif;background-color:transparent;font-style:normal;"><br><span></span></div><div style="color:rgb(0, 0, 0);font-size:13.3333px;font-family:arial, helvetica, sans-serif;background-color:transparent;font-style:normal;"><span>Thanks</span></div><div> </div><div>-----------------<br>http://www.codessentials.com - Your essential software, for free!<br>Follow
us at http://twitter.com/#!/Codessentials<br></div> <div style="font-family:arial, helvetica, sans-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 <ge0ffrey.spam@gmail.com><br> <b><span style="font-weight:bold;">To:</span></b> Michiel Vermandel <mvermand@yahoo.com>; Rules Users List <rules-users@lists.jboss.org> <br> <b><span style="font-weight:bold;">Sent:</span></b> Tuesday, February 5, 2013 12:19 PM<br> <b><span style="font-weight:bold;">Subject:</span></b> Re: Drools planner: The workingMemory has 1 ConstraintOccurrence(s) in excess<br> </font> </div> <br>
<div id="yiv690726764">
<div>
<br>
<div class="yiv690726764moz-cite-prefix">Op 05-02-13 11:22, Michiel Vermandel
schreef:<br>
</div>
<blockquote type="cite">
<div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;">Hi,<br>
<br>
Thanks for the advice.<br>
<br>
1) About drools 5.5.1-SNAPSHOT: It doens't seem to be in the
list of available distros:<br>
Eclipse > pom > Dependencies > Add > Search
results.<br>
After 5.5.0-Final I get the Alphas of 6.0.0.<br>
I'm not such a wiz in Maven.<br>
How do I get the 5.5.1-SNAPSHOT into my m2/Nexus repo?<br>
</div>
</blockquote>
Look for "the jboss snapshop repo" on google. See the URL I pasted.
Or look in the droolsjbpm-parent pom's <repository> section.<br>
<blockquote type="cite">
<div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;"><br>
<div><span>2) I'll do as you advised but here are already the
stats:</span></div>
<div style="color:rgb(0, 0, 0);font-size:13.3333px;font-family:arial, helvetica, sans-serif;background-color:transparent;font-style:normal;"><span>I've got 260 planning
entities in my test</span></div>
About the planning variables: I have 3 different types of
planning variables but I do not use any default selector. Thus I
do not have Entities * Values of possible moves.<br>
</div>
</blockquote>
Normally, one should always also add a changeMoveSelector for every
variable (on top of the course grained moves), possibly with a
filter to avoid breaking build-in constraints. Try it with the
benchmarker.<br>
<blockquote type="cite">
<div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;">I reduce quite some moves
(I think/hope I do not eliminate the moves that could lead to
the optimal solution).<br>
For the 3 different variable types I have 5 MoveListFactories
and they produce for the 260 entities all together 8550 possible
moves.<br>
</div>
</blockquote>
<blockquote type="cite">
<div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;">
<div> </div>
<div>-----------------<br>
http://www.codessentials.com - Your essential software, for
free!<br>
Follow us at http://twitter.com/#!/Codessentials<br>
</div>
<div style="font-family:arial, helvetica, sans-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 rel="nofollow" class="yiv690726764moz-txt-link-rfc2396E" ymailto="mailto:ge0ffrey.spam@gmail.com" target="_blank" href="mailto:ge0ffrey.spam@gmail.com"><ge0ffrey.spam@gmail.com></a><br>
<b><span style="font-weight:bold;">To:</span></b>
<a rel="nofollow" class="yiv690726764moz-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> <br>
<b><span style="font-weight:bold;">Sent:</span></b>
Tuesday, February 5, 2013 9:35 AM<br>
<b><span style="font-weight:bold;">Subject:</span></b>
Re: [rules-users] Drools planner: The workingMemory has
1 ConstraintOccurrence(s) in excess<br>
</font> </div>
<br>
<div id="yiv690726764">
<div> <br>
<div class="yiv690726764moz-cite-prefix">Op 05-02-13
09:16, Michiel Vermandel schreef:<br>
</div>
<blockquote type="cite">
<div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;">
<div><span>Hi,</span></div>
<div style="color:rgb(0, 0,
0);font-size:13.3333px;font-family:arial, helvetica, sans-serif;background-color:transparent;font-style:normal;"><br>
<span></span></div>
<div style="color:rgb(0, 0,
0);font-size:13.3333px;font-family:arial, helvetica, sans-serif;background-color:transparent;font-style:normal;"><span>I
am using Drools planner 5.5.0.Final.<br>
</span></div>
<div style="color:rgb(0, 0,
0);font-size:13.3333px;font-family:arial, helvetica, sans-serif;background-color:transparent;font-style:normal;"><span>Once
again I have the exception "The workingMemory
has 1 ConstraintOccurrence(s) in excess".</span></div>
<div>I have added all relevant planning variables as
parameters of the ConstraintOccurrence.<br>
<br>
Could the following theory be an explanation for
this issue? <br>
<br>
My dataset is not that big (not small either).<br>
Could it be that a certain move is taken twice
within the same step (as part of score trap?)
which results in the same constraint occurrence?<br>
</div>
</div>
</blockquote>
No, the same move twice in the same step should not
cause any trouble.<br>
If you can prove this causes the score corruption, it's
a bug in Drools Expert.<br>
There have been a bunch of bugfixes in drools, so try
drools (-core, -compiler, knowledge-api, mvel, ...)
5.5.0-SNAPSHOT:<br>
<a rel="nofollow" class="yiv690726764moz-txt-link-freetext" target="_blank" href="https://repository.jboss.org/nexus/content/groups/public/org/drools/drools-core/5.5.1-SNAPSHOT/drools-core-5.5.1-20130205.051201-93.pom">https://repository.jboss.org/nexus/content/groups/public/org/drools/drools-core/5.5.1-SNAPSHOT/drools-core-5.5.1-20130205.051201-93.pom</a><br>
If that doesn't help, paste the rule.<br>
<blockquote type="cite">
<div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;">
<div><br>
I have one other question - maybe related:<br>
In my configuration I have this:<br>
<br>
<acceptor><br>
<planningEntityTabuSize>7</planningEntityTabuSize>
<!-- I tested with lower values (5, 3) too
--><br>
</acceptor><br>
<forager><br>
<pickEarlyType>FIRST_BEST_SCORE_IMPROVING</pickEarlyType><br>
<minimalAcceptedSelection>1000</minimalAcceptedSelection><br>
</forager><br>
<br>
Because of the forager configuration a step is
sometimes taken after as little as 40 moves, but
sometimes the number of moves grows to enormous
amounts.<br>
I think if that happens that the score is no
longer improving.<br>
Is it "normal" that a certain step can make +50k
moves and counting?<br>
</div>
</div>
</blockquote>
you're set at 1k minimalAcceptedSelection, so 50k is a
lot indeed.<br>
This is probably because the planningEntityTabuSize is
to high compared to the number of entity's in your
dataset.<br>
There's a jira for making planningEntityTabuSize
automatically adjust itself based on the entity size
(which would solve this).<br>
Or it could also be because the number of possible moves
(entity size * value size) is near 1k.<br>
<br>
<blockquote type="cite">
<div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;">
<div>Or does indicate once more to a score trap?<br>
</div>
</div>
</blockquote>
No. It indicates that planner's config should scale down
automatically.<br>
How many entity's and values do you have?<br>
<blockquote type="cite">
<div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;">
<div><br>
Thanks<br>
<br>
Michiel<br>
<br>
</div>
<div>-----------------<br>
<a rel="nofollow" class="yiv690726764moz-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 rel="nofollow" class="yiv690726764moz-txt-link-freetext" target="_blank" href="http://twitter.com/#!/Codessentials">http://twitter.com/#!/Codessentials</a></div>
</div>
<br>
<fieldset class="yiv690726764mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
rules-users mailing list
<a rel="nofollow" class="yiv690726764moz-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 rel="nofollow" class="yiv690726764moz-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>
rules-users mailing list<br>
<a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
</div>
</div>
</div>
<br>
<fieldset class="yiv690726764mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
rules-users mailing list
<a rel="nofollow" class="yiv690726764moz-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 rel="nofollow" class="yiv690726764moz-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></div></div><br>_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br> </div> </div> </div></body></html>