<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Currently, Planner only supports a single value for a
    @PlanningVariable property.<br>
    Here's the issue for that:<br>
    <br>
    But in your case, I 'd just do it like this:<br>
    <br>
    class Recipe extends Solution { <br>
    &nbsp; List&lt;Inredient&gt; ...;<br>
    &nbsp; List&lt;Assignment&gt; ...; // of size 5<br>
    &nbsp; ...<br>
    }<br>
    <br>
    class Ingredient {...}<br>
    <br>
    class Assignment {<br>
    &nbsp;&nbsp; private int index; // Ingredient 1, 2, 3, 4 or 5?<br>
    &nbsp;&nbsp; private Ingredient ingredient;<br>
    <br>
    &nbsp;&nbsp; @PlanningVariable()<br>
    &nbsp;&nbsp; @ValueRange(...)<br>
    &nbsp;&nbsp; public Ingredient getIngredient() {...}<br>
    &nbsp;&nbsp; ...<br>
    }<br>
    <br>
    <div class="moz-cite-prefix">On 03-06-13 14:21, Justin Case wrote:<br>
    </div>
    <blockquote
      cite="mid:1370262087.11213.YahooMailNeo@web162403.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:times
        new roman, new york, times, serif;font-size:12pt">Hello all,<br>
        can I use as planning variable a list of values? <br>
        Here's a test use case: planning a food recipe, where the recipe
        can have say maximally 5 ingredients (taken from the solution
        property, I guess). So far I could find in the examples and
        documentation, it's all about ONE planning variable in the
        solution, but here I'd need a LIST of such... is it actually
        doable this way? <br>
        I cannot do it the other way around, as an ingredient may be
        found in more recipes...<br>
        <div>Many thanks,</div>
        <div>JC<br>
        </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>