Reification involves separate constraints (#<==>/2
, #==>/2
etc.), you can use them for example like:
example(Ls) :-
Ls = [X,Y],
Ls ins 1..2,
X #= 1 #<==> B1,
Y #= 1 #<==> B2,
X #= 2 #<==> B3,
Y #= 2 #<==> B4,
Cost #= max(B1*3 + B2*5, B3*3 + B4*5),
labeling([min(Cost)], Ls).
Sample query and its result:
?- example(Ls).
Ls = [1, 2] ;
Ls = [2, 1] ;
Ls = [1, 1] ;
Ls = [2, 2] ;
false.