I made a helper function for constraints
""" If x is Bin & y is Int, it simply means x = y % 2. """ function addParityConstraint(model::JuMP.Model, x, y) @variable(model, odd_dummy, Int) @constraint(model, x + y == 2 * odd_dummy) end
But keeps getting
WARNING: A variable named odd_dummy is already attached to this model. If creating variables programmatically, consider using the anonymous variable syntax x = @variable(m, [1:N], ...).
How to avoid the warnings? I cannot get anonymous variable with types working, e.g.