I might be missing something, but why is the interface for disjunctions so complicated? Ideally, the user just enters the disjunction and DisjunctiveProgramming.jl does the reformulation in terms of binary or logical variables.
What the user (ok, I :-)) actually wants is to just enter something like
for i in 1:P, j in 1:i-1
@constraint(model, x[i] + width[i] <= x[j] || x[j] + width[j] <= x[i] || y[i] + height[i] <= y[j] || y[j] + height[j] <= y[i])
end
or maybe something like
for i in 1:P, j in 1:i-1
@disjunction(model, [
x[i] + width[i] <= x[j],
x[j] + width[j] <= x[i],
y[i] + height[i] <= y[j],
y[j] + height[j] <= y[i]])
end
That some Y is used intermediately for the solver is a detail which is not necessary to formulate the problem as I see it. Such a syntax seems far more readable than what is currently supported (I think. Maybe I am learning something here).
I might be missing something, but why is the interface for disjunctions so complicated? Ideally, the user just enters the disjunction and
DisjunctiveProgramming.jldoes the reformulation in terms of binary or logical variables.What the user (ok, I :-)) actually wants is to just enter something like
or maybe something like
That some
Yis used intermediately for the solver is a detail which is not necessary to formulate the problem as I see it. Such a syntax seems far more readable than what is currently supported (I think. Maybe I am learning something here).