Cool, that should work as well :) thanks a lot for the prompt reply!
JC
________________________________
From: Geoffrey De Smet <ge0ffrey.spam(a)gmail.com>
To: Rules Users List <rules-users(a)lists.jboss.org>
Sent: Monday, June 3, 2013 3:05 PM
Subject: Re: [rules-users] Planner with a list of planning variables
Currently, Planner only supports a single value for a @PlanningVariable property.
Here's the issue for that:
But in your case, I 'd just do it like this:
class Recipe extends Solution {
List<Inredient> ...;
List<Assignment> ...; // of size 5
...
}
class Ingredient {...}
class Assignment {
private int index; // Ingredient 1, 2, 3, 4 or 5?
private Ingredient ingredient;
@PlanningVariable()
@ValueRange(...)
public Ingredient getIngredient() {...}
...
}