Relative Content

Tag Archive for linear-programmingor-toolsmixed-integer-programming

how to implement alldifferent constraint except 0 in ortools

I am using ortools, CP-SAT solver, and I am struggling to write a constraint that will allow for a solution which can have multiple zero’s but the remaining decision variable values have to be unique. So alldifferent but I can have multiple zeros.
Below is the started code: