[rules-users] Planner with a list of planning variables

Justin Case send_lotsa_spam_here at yahoo.com
Mon Jun 3 09:22:53 EDT 2013


Cool, that should work as well :) thanks a lot for the prompt reply!
JC





>________________________________
> From: Geoffrey De Smet <ge0ffrey.spam at gmail.com>
>To: Rules Users List <rules-users at 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() {...}
>   ...
>}
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130603/8fa462ed/attachment.html 


More information about the rules-users mailing list