<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Look at MoveIteratorFactory, that allows you to select those moves
    JIT (so without creating all of them like in MoveListFactory).<br>
    Also see JUST_IN_TIME vs caching explanation in docs.<br>
    <br>
    Let's continue further questions/discussions on the new mailing list<br>
    &nbsp;&nbsp; <a class="moz-txt-link-freetext" href="http://www.optaplanner.org/community/forum.html">http://www.optaplanner.org/community/forum.html</a><br>
    <br>
    <br>
    hth<br>
    <br>
    <div class="moz-cite-prefix">On 27-06-14 14:05, DwProd . wrote:<br>
    </div>
    <blockquote
cite="mid:CANgjoJPt=juX0eZ53AD=wOhJ1kQ3autQe_q=r_h0Nf1DSwhMmg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Thanks a lot, yeah nearBySelection is probably what
        I would need, too bad it's not out yet :(
        <div><br>
        </div>
        <div>As for the custom MoveListFactory, I found out what I'm
          trying to do has an off the charts complexity. It basically
          has to find all subsets of planning variables of a given size
          (combinations with repetition) which is the number of entities
          I want to move at once... Worst case has a complexity of
          something like O(4^n/sqrt(pi n))... It gets unmanagable pretty
          soon unfortunately.</div>
        <div><br>
        </div>
        <div>I'm not sure what I'll be doing but it seems like I'll have
          to do without those constraints at first... Thanks again for
          your help however !</div>
        <div><br>
        </div>
        <div>Best regards,</div>
        <div>
          <br>
        </div>
        <div>Woody</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">2014-06-25 13:18 GMT+02:00 Geoffrey De
          Smet <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:ge0ffrey.spam@gmail.com" target="_blank">ge0ffrey.spam@gmail.com</a>&gt;</span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div class=""> <br>
                <div>On 25-06-14 12:58, DwProd . wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">Thanks a lot for your answer !
                    <div><br>
                    </div>
                    <div>1) I don't think pillar based moves are what
                      I'm looking for, except if I can select a pillar
                      based on a Problem Fact (its service in my case)
                      and then spread the different entities of the
                      pillar on the available hosts (basically setting
                      possibly different planning variables for the
                      entities of the pillar).</div>
                    <div><br>
                    </div>
                    <div>2) cartesianProductMoveSelector seem more like
                      it, but the number of moves to combine is somewhat
                      static is it not ? I can't for instance specify in
                      a Planning Entity (using a property) that its move
                      should be combined with n other moves of processes
                      of the same type ? <br>
                    </div>
                  </div>
                </blockquote>
              </div>
              That would be nearBySelection... (note: the name might
              change before I implement).<br>
              You need to be able to tell optaplanner that processes of
              the same type are "near" (~related) to each other and
              should be moved together.<br>
              As stated before, I am working on this for 6.2.
              <div class=""><br>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div><br>
                    </div>
                    <div>3) I feel like my usecase is complicated enough
                      to have to resort to that if there is no built in
                      way to handle it... Does this work by implementing
                      a MoveListFactory, or a CompositeMove ? I don't
                      think I quite get the difference to be honest...</div>
                  </div>
                </blockquote>
              </div>
              If you write a custom MoveListFactory (or
              MoveIteratorFactory), you could still opt to go with the
              build-in moves (such as ChangeMove) or combinations of
              those with CompositeMove. However, because those build-in
              moves require reflection stuff (VariableDescriptor etc),
              it's probably easier to just to write a domain-specific
              Move.<br>
              See the examples that have custom moves.
              <div>
                <div class="h5"><br>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div><br>
                      </div>
                      <div>Thanks again for your time,</div>
                      <div><br>
                      </div>
                      <div>Cheers,</div>
                      <div><br>
                      </div>
                      <div>Woody</div>
                    </div>
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote">2014-06-25 9:37 GMT+02:00
                        Geoffrey De Smet <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:ge0ffrey.spam@gmail.com"
                            target="_blank">ge0ffrey.spam@gmail.com</a>&gt;</span>:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000"> 1)
                            There's 2 course grained moves out of the
                            box in 6.1.0.CR1: pillarChangeMove and
                            pillarSwapMove.<br>
                            And in 6.1.0.CR1 they also include
                            subpillars (which is important).<br>
                            &nbsp; <a moz-do-not-send="true"
href="http://docs.jboss.org/drools/release/latest/optaplanner-docs/html_single/index.html#pillarChangeMoveSelector"
                              target="_blank">http://docs.jboss.org/drools/release/latest/optaplanner-docs/html_single/index.html#pillarChangeMoveSelector</a><br>
                            Start with trying those.<br>
                            <br>
                            2) Then look into cartesianProduct selection
                            and mimic selection (see docs).<br>
                            The &lt;cartesianProductMoveSelector&gt;
                            allows you to combine to existing moves into
                            a new one.<br>
                            The mimic selection allows you to make sure
                            that those 2 moves change the same entity
                            (if needed), but a different variable of
                            course.<br>
                            I am working on nearBySelection for 6.2 to
                            allow it to select 2 entities that are
                            somehow "nearBy" to each other (for example
                            in the same service etc).<br>
                            <br>
                            3) If the above don't help enough, there's
                            always custom moves (see docs): total
                            freedom, but the devil is in the details :)
                            <div>
                              <div><br>
                                <br>
                                <div>On 24-06-14 01:58, DwProd . wrote:<br>
                                </div>
                              </div>
                            </div>
                            <blockquote type="cite">
                              <div>
                                <div>
                                  <div dir="ltr"><span
                                      style="font-family:arial,sans-serif;font-size:13px">Hello


                                      there,</span>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">I'm


                                      pretty new to OptaPlanner, and I
                                      must say I'm really impressed with
                                      the maturity of it all. Great
                                      software with a great
                                      documentation !</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">I've


                                      been working on a variation of the
                                      Cloud Balancing example, with a
                                      few differences, which make it
                                      look like the Machine Reassignment
                                      problem as well :</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">-
                                      Some processes are already placed
                                      and are immovable (using a
                                      Selection Filter checking a
                                      boolean property of the planning
                                      entity)</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">-
                                      The Computer (the planning
                                      variable) is nullable (basically
                                      this is Multiple Muti-Dimensional
                                      Knapsack problem) which means I
                                      added a soft constraint penalty
                                      for processes with a null host.</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">-
                                      Processes can only be of a few
                                      classes (which I called services,
                                      a Problem Fact). Processes of a
                                      given service type have a certain
                                      amount of required cpu and ram.</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">Taking


                                      these elements into account, I do
                                      get very good results with
                                      OptaPlanner. However, the
                                      following constraints always put
                                      me into a score trap :</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">-
                                      For some services, processes work
                                      in groups. For instance, if groups
                                      are of size 3, having 7 processes
                                      is not any better than having 6
                                      processes. If there were already 2
                                      processes (immovable and placed),
                                      I should only add 4 processes and
                                      not 5, even if there are enough
                                      resources. For this constraint, I
                                      have tried using a rule (medium
                                      constraint) accumulating processes
                                      of that service and using the
                                      modulo operator with the group
                                      size.</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">-
                                      Some services are dependant on one
                                      another. For instance, I know that
                                      if I have n1 groups of processes
                                      of the service 1, I require
                                      Math.ceil(2.5*n1) groups of
                                      processes of the service 2. I have
                                      implemented this similarly with a
                                      medium constraint...</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">With


                                      any (or both) of these
                                      constraints, little to no
                                      processes of the concerned
                                      services are added and I fail to
                                      reach a good solution. I have
                                      tried benchmarking with several
                                      local search methods and various
                                      parameters, but all give the same
                                      results...&nbsp;</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">I
                                      feel like the next logical step
                                      would be to used the often
                                      mentioned in the documentation
                                      "Coarse Grained Moves" but I fail
                                      to locate any simple example. The
                                      Nurse Rostering example seems to
                                      use that technique to some extent
                                      but it seems like an overly
                                      complicated example, is it not.</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">Thank


                                      you very much for reading this
                                      far, if you have any question,
                                      guideline, or just a trick, I'd be
                                      absolutely delighted to hear from
                                      you !</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">Cheers,</div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px"><br>
                                    </div>
                                    <div
                                      style="font-family:arial,sans-serif;font-size:13px">
                                      Woody</div>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                </div>
                              </div>
                              <pre>_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<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></pre>
                            </blockquote>
                            <br>
                          </div>
                          <br>
_______________________________________________<br>
                          rules-users mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:rules-users@lists.jboss.org"
                            target="_blank">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>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<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></pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            rules-users mailing list<br>
            <a moz-do-not-send="true"
              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>
          </blockquote>
        </div>
        <br>
      </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>