<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 08-02-13 09:20, Michiel Vermandel
      schreef:<br>
    </div>
    <blockquote
      cite="mid:1360311628.96068.YahooMailNeo@web161305.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:arial,
        helvetica, sans-serif;font-size:10pt">Hi,<br>
        <br>
        Any one got an idea?<br>
        <br>
        Thanks<br>
        <div><span></span></div>
        <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: 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 <a class="moz-txt-link-rfc2396E" href="mailto:mvermand@yahoo.com">&lt;mvermand@yahoo.com&gt;</a><br>
                <b><span style="font-weight: bold;">To:</span></b> Rules
                lists.jboss.org <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>
                Wednesday, February 6, 2013 8:44 AM<br>
                <b><span style="font-weight: bold;">Subject:</span></b>
                [rules-users] Planner: What is a good example/algo to
                chain entities?<br>
              </font> </div>
            <br>
            <div id="yiv1704888858">
              <div>
                <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 need
                      to keep some Planning entities (Tasks) together
                      and I am looking for some insights/ideas/examples
                      in how to tackle this.</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>Tasks
                      are grouped by a groupId (Groups are problem
                      facts).<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>The
                      Tasks do not have to be grouped like a pillar but
                      more like an accordion.</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;">One of the
                    planning variables is "Period", a Period typically
                    is 3 weeks and we have 12 Periods to plan the tasks
                    into.<br>
                  </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>The
                      requirement is that all tasks within&nbsp; a group need
                      to be kept together in such a way that:</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>- the
                      spread (nr of periods) of the tasks is minimal</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>- the
                      spread is never more than the sum of the duration
                      of the separate tasks in the group.</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>So
                      given a group of 3 tasks:</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>1)This
                      is good:</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>
                  </div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;">Period 12345789ABC<br>
                      <span></span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;"><span>T1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xxx</span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;"><span>T2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xx</span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;"><span>T3:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x</span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;"><br>
                      <span></span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;"><span>2)This is better:</span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="
                      font-family:Courier New, courier, monaco,
                      monospace, sans-serif;"><br>
                      <span></span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;">Period 12345789ABC<br>
                      <span></span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;"><span>T1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xxx</span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;"><span>T2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xx</span></span></div>
                  <div style="color:rgb(0, 0,
                    0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                      style="font-family:Courier New, courier, monaco,
                      monospace, sans-serif;"><span>T3:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x</span></span></div>
                  <span style="font-family:Courier New, courier, monaco,
                    monospace, sans-serif;"><br>
                  </span>
                  <div><span style="font-family:Courier New, courier,
                      monaco, monospace, sans-serif;"><span>3)This is
                        (one of) the best:</span></span>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;"><br>
                        <span></span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;">Period 12345789ABC<br>
                        <span></span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;"><span>T1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xxx</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;"><span>T2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xx</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;"><span>T3:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;font-family:Courier
                      New, courier, monaco, monospace, sans-serif;"><br>
                      <span style="font-family:Courier New, courier,
                        monaco, monospace, sans-serif;"><span></span></span></div>
                    <div style="color:rgb(0, 0, 0);font-size:13.3333px;
                      background-color:transparent;font-style:normal;font-family:Courier
                      New, courier, monaco, monospace, sans-serif;">4<span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;"><span>)This is bad:</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;"><br>
                        <span></span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;">Period 12345789ABC<br>
                        <span></span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;"><span>T1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xxx</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;"><span>T2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xx</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span
                        style="font-family:Courier New, courier, monaco,
                        monospace, sans-serif;"><span>T3:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x</span></span></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Is 4) worse than 1)?<br>
    <blockquote
      cite="mid:1360311628.96068.YahooMailNeo@web161305.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:arial,
        helvetica, sans-serif;font-size:10pt">
        <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 id="yiv1704888858">
              <div>
                <div
                  style="color:#000;background-color:#fff;font-family:arial,
                  helvetica, sans-serif;font-size:10pt;">
                  <div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;font-family:Courier
                      New, courier, monaco, monospace, sans-serif;"><br>
                      <span style="font-family:Courier New, courier,
                        monaco, monospace, sans-serif;"><span></span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span><span><span>Of
                            course 3 is favorite, but maybe not possible
                            due to other planning variables (-&gt;
                            availability of people to execute the tasks)</span>.</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span><span>I
                          need to plan a few hundred of such groups of
                          tasks which all share the same Period space
                          and list of available people.</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;font-family:arial,
                      helvetica, sans-serif;"><span><span>(A person can
                          only do one task per period)<br>
                        </span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><br>
                      <span><span></span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span><span>I
                          have got the DRL rule that keeps the tasks
                          together (rule counts the gaps) , but giving
                          penalty for making gaps (by shifting a single
                          task) makes it hard to find a good solution.</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span><span>What
                          would be the best approach to solve this
                          problem?</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><br>
                      <span><span></span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span><span>-
                          A combination of custom mover and swapper
                          which moves/swaps groups instead of single
                          tasks?</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;font-family:arial,
                      helvetica, sans-serif;"><span><span>- The above in
                          combination with a group shuffle factory
                          (swapping tasks in a single group)?<br>
                        </span></span></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Not sure what you mean with these last 2 questions,<br>
    but course grained moves are probably a good way to get out this
    situations.<br>
    For example: move all T's in the same period (or that share a
    period).<br>
    &lt;pillarSwapMoveSelector&gt; does this if the value is exactly the
    same (you'll need variableNameInclude since 6.0.0.Alpha7 if you have
    multiple vars...)<br>
    Otherwise, take a look at BedDesignationPillarPartSwapMoveFactory
    for inspiration (it's pretty different, but interesting to learn).<br>
    <blockquote
      cite="mid:1360311628.96068.YahooMailNeo@web161305.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:arial,
        helvetica, sans-serif;font-size:10pt">
        <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 id="yiv1704888858">
              <div>
                <div
                  style="color:#000;background-color:#fff;font-family:arial,
                  helvetica, sans-serif;font-size:10pt;">
                  <div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><br>
                      <span><span></span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><span><span>Other
                          ideas?</span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><br>
                      <span><span></span></span></div>
                    <div style="color:rgb(0, 0,
                      0);font-size:13.3333px;background-color:transparent;font-style:normal;"><br>
                      <span><span></span></span></div>
                    <span>Thanks a lot!</span><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>
              </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>