<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Cool, that should work as well :) thanks a lot for the prompt reply!<br>JC<br><div><span><br></span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font face="Arial" size="2"> <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> Rules Users List <rules-users@lists.jboss.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, June 3, 2013 3:05 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [rules-users]
Planner with a list of planning variables<br> </font> </div> <div class="y_msg_container"><br><div id="yiv4643307609">
<div>
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>
List<Inredient> ...;<br>
List<Assignment> ...; // of size 5<br>
...<br>
}<br>
<br>
class Ingredient {...}<br>
<br>
class Assignment {<br>
private int index; // Ingredient 1, 2, 3, 4 or 5?<br>
private Ingredient ingredient;<br>
<br>
@PlanningVariable()<br>
@ValueRange(...)<br>
public Ingredient getIngredient() {...}<br>
...<br>
}<br></div></div><br></div> </div> </div> </blockquote></div> </div></body></html>