-
Notifications
You must be signed in to change notification settings - Fork 94
Description
An infeasible JuMP model with a vectorized inequality constraint yields an error when trying to copy_conflict
(example at the bottom). The error message points towards creating a MathOptInterface bug report, but since the bug arises when using the JuMP interface, it was not clear to me where to report it.
To be specific, the error message is:
ArgumentError: Bridge of type
ScalarizeBridge
does not support accessing the attributeMathOptInterface.ConstraintConflictStatus(1)
. If you encountered this error unexpectedly, it probably means your model has been reformulated using the bridge, and you are attempting to query an attribute that we haven't implemented yet for this bridge. Please open an issue at https://github.com/jump-dev/MathOptInterface.jl/issues/new and provide a reproducible example explaining what you were trying to do.
The example below was lightly modified from the one given in the documentation of copy_conflict
. Replacing the constraint definition by the commented constraint yields no error.
using JuMP
import Gurobi
model = Model(Gurobi.Optimizer)
@variable(model, x[i=1:1] >= 0)
@constraint(model, c1[i=1:1], x <= [-2])
# @constraint(model, c1[i=1:1], x[i] <= [-2][i])
optimize!(model)
compute_conflict!(model)
if get_attribute(model, MOI.ConflictStatus()) == MOI.CONFLICT_FOUND
iis_model, reference_map = copy_conflict(model)
print(iis_model)
end