ConstraintSolver.jl icon indicating copy to clipboard operation
ConstraintSolver.jl copied to clipboard

Wish list for indicators/reification

Open hakank opened this issue 5 years ago • 1 comments

Issue 202 (https://github.com/Wikunia/ConstraintSolver.jl/issues/202 ) got a little sidetracked so here is a cleaner wish list.

  1. The constraints using indicator/reification should not require that the user must create binary variables. Here is an example that would be really great if supported.
function all_different_except_0(m, a)
    len = length(a)
    for i in 2:len, j in 1:i-1
        @constraint(m, (a[i] != 0 && a[j] != 0) => {a[i] != a[j]} ) 
    end
end
  1. Support for && and || (or & and |) as well as != in both LHS and RHS of an indicator/reification constraint. See the example above.

hakank avatar Dec 08 '20 17:12 hakank

Similar to #248

Wikunia avatar Jul 19 '21 21:07 Wikunia