With JuMP, I can create constraints with && and ||. I am trying to use xor and not. Is there a way to do this?
I can do the following:
using JuMP
using MiniZinc
model = Model(() -> MiniZinc.Optimizer{Float64}("chuffed"))
@variable(model, x, Bin)
@variable(model, y, Bin)
@constraint(model, x && y := true)
My issue is that I want to have constraints a bit more complicated, like
(x && y && not(z)) || (x && not(y) && z) := true
and even if we can detect that it simplifies a bit with x := true for example, I don’t want to detect that as the solver can do it.
The other issue is that I actually don’t know that xor(x, y) := true but it would be something more like xor(x, y) == z := true and then I have constraints on z.
Still, I can simplify the xor (and I am currently using a workaround), but this does not apply for the not