<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 12-02-13 20:04, Michiel Vermandel
      schreef:<br>
    </div>
    <blockquote
      cite="mid:1360695864.67258.YahooMailNeo@web161301.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:Courier
        New, courier, monaco, monospace, sans-serif;font-size:10pt">Hi
        Geoffrey,<br>
        <br>
        Thanks for your response.<br>
        Indeed I use Simulated Annealing with maximumSecondsSpend. So
        that explains the randomness of the LocalSearchPhase.<br>
        Sorry for not remembering.<br>
        <br>
        Can you tell me please some more on "Use of HashSet in your
        Solution class"?<br>
        Do you mean a planning fact as a HashSet?<br>
      </div>
    </blockquote>
    no, just entities and values, no worries :)<br>
    <blockquote
      cite="mid:1360695864.67258.YahooMailNeo@web161301.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:Courier
        New, courier, monaco, monospace, sans-serif;font-size:10pt">I
        have some HashMap fields in my Solution (which I also pass in
        the cloneSolution method) but non of these fields are planning
        variables/entity.<br>
      </div>
    </blockquote>
    That's fine.<br>
    <br>
    The entity collection is best not a HashSet/Map, because FIRST_FIT
    (as well as some entity selectors) will take the original order of
    the entities to do things.<br>
    With HashSet/Map, that order changes because Object.hashCode()
    returns different ints, placing elements in different HashSet
    buckets, which results into a different order.<br>
    <blockquote
      cite="mid:1360695864.67258.YahooMailNeo@web161301.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:Courier
        New, courier, monaco, monospace, sans-serif;font-size:10pt"><br>
        Regards,<br>
        Michiel<br>
        <div>&nbsp;</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: Courier New, courier, monaco,
          monospace, 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 class="moz-txt-link-rfc2396E" href="mailto:ge0ffrey.spam@gmail.com">&lt;ge0ffrey.spam@gmail.com&gt;</a><br>
                <b><span style="font-weight: bold;">To:</span></b> Rules
                Users List <a class="moz-txt-link-rfc2396E" href="mailto:rules-users@lists.jboss.org">&lt;rules-users@lists.jboss.org&gt;</a> <br>
                <b><span style="font-weight: bold;">Sent:</span></b>
                Tuesday, February 12, 2013 12:29 PM<br>
                <b><span style="font-weight: bold;">Subject:</span></b>
                Re: [rules-users] planner environmentMode<br>
              </font> </div>
            <br>
            <div id="yiv772796617">
              <div> Common causes:<br>
                - Use of HashSet in your Solution class.<br>
                - Combination of Simulated Annealing with time spend
                termination (clearly documented in manual)<br>
                <br>
                <div class="yiv772796617moz-cite-prefix">Op 12-02-13
                  12:08, Michiel Vermandel schreef:<br>
                </div>
                <blockquote type="cite">
                  <div
                    style="color:#000;background-color:#fff;font-family:Courier
                    New, courier, monaco, monospace,
                    sans-serif;font-size:10pt;">
                    <div><span>Hi,</span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;font-family:Courier New,
                      courier, monaco, monospace,
                      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:Courier New,
                      courier, monaco, monospace,
                      sans-serif;background-color:transparent;font-style:normal;"><span>Using

                        Planner 5.5.0-Final, currently my
                        environmentMode is set to DEBUG.</span></div>
                    <div>As I read here
                      (<a class="moz-txt-link-freetext" href="http://docs.jboss.org/drools/release/5.5.0.Final/drools-planner-docs/html_single/#d0e3120">http://docs.jboss.org/drools/release/5.5.0.Final/drools-planner-docs/html_single/#d0e3120</a>)

                      this mode should produce a reproducible result.<br>
                      Though, even with o nly the construction phase
                      enabled, I get different results from sequential
                      runs on the same machine with the same code.<br>
                      Of course full solution (with LocalSearch) results
                      in different outcome too.<br>
                      <br>
                      How is this possible?<br>
                      <br>
                      Thanks<br>
                      <br>
                      <br>
                    </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></div>
                  </div>
                  <br>
                  <fieldset class="yiv772796617mimeAttachmentHeader"></fieldset>
                  <br>
                  <pre>_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" rel="nofollow" class="yiv772796617moz-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="yiv772796617moz-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 moz-do-not-send="true"
              ymailto="mailto:rules-users@lists.jboss.org"
              href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
            <a moz-do-not-send="true"
              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>
      <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>