[rules-users] Drools Planner: what if possible values of a PlanningVariable are dependent of another one?

Willem van Asperen willem at van.asperen.org
Tue Dec 11 16:25:39 EST 2012


Hi All,

I have a PlanningEntity that has several planning variables, say A and
B. Now, if A is O then B can be X or Y and when A is P then B can be Y or Z.

I see two routes:

  * create a solution property that generates X, Y and Z as alternatives
    for B and rely on the score rules to dismiss improper values,
    depending on the value of A
  * create an entity property that only generates the possible values
    for B (i.e. X,Y for A=O and Y,Z for A=P)

What is the best route?

(Alternatively I do not use the constructionHeuristic and just start of
my solution with a randomly (but correct) generated solution)

Regards,
Willem

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20121211/e0a3cfbc/attachment.html 


More information about the rules-users mailing list