Let's say I pass the following list of domain variables to the labeling predicate:
Z=[X1,Y1,X2,X3,Y2,X4,Y3.......Xn,Ym],
labeling(...., Z).
For variable(Sel): Further more I want the labeling to maybe choose all the Y's first before continuing on the X's. Or even more complicated: Start on a X or on a Y and the continue to label a X if there are more unlabeled compared to Y and vise versa.
For value(Enum): To even complicate it I maybe want to have different strategy to use depending on if it is a X of if it is a Y.
My first attempt has been to use attributed variable and add further information to each variable:
put_atts( X1, type_var(is_xvar)),
put_atts( X2, type_var(is_xvar)),
put_atts( Y1, type_var(is_yvar)),
.
.
And the inside variable(Sel) and value(Enum) I can search and select by use of this attribute.
But since a fd_var is already an attributed variable, this attempt does not work very well.
So my question is: Is use of attributed variables the right strategy to solve such a task? Is there an alternative way to do this?
This is only a simplified example. I would need about 10 different variable types, not just two as shown here.