Ecnoding of "alldifferent" in FlatZinc -- differerent approaches

13 views
Skip to first unread message

Armin Wolf

unread,
Dec 1, 2025, 2:28:15 AMDec 1
to MiniZinc
Dear all,

when compiling a MiniZinc program (2.9.4)  using the global "alldifferent" constraint with
the opiton -Glinear then the variables in this constraint will be "one-hot" encoded with
binary variables and the values of each variable will be "at-most-one-hot" encoded
keeping the global structure of the "alldifferent" constraint. However, when using the
option -Gstd then the gobal "alldifferent" constraint will be broken into binary inequalities
of type $A \ne B$ such that the global structure of the "alldifferent" constraint will be
unfortunately lost ... 

Thus, I am asking me (and the developers of MiniZinc :-)) why not using the -Glinear
encoding in the -Gstd compiling process in one of the next versions of MiniZinc? 
Are there any objections against this?

Best regards

Armin

  


Reply all
Reply to author
Forward
0 new messages