-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
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])
endor 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]])
endThat 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).
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested