Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MOI.ConstraintConflictStatus of SOS constraints #602

Closed
sebastianangerhausen opened this issue Jan 15, 2025 · 1 comment · Fixed by #603
Closed

Add support for MOI.ConstraintConflictStatus of SOS constraints #602

sebastianangerhausen opened this issue Jan 15, 2025 · 1 comment · Fixed by #603
Labels
Wrapper: MathOptInterface Issue is specific to MOI wrapper

Comments

@sebastianangerhausen
Copy link

If a model containing SOS2 constraints is infeasible and the IIS is computed, copying the conflict model leads to the following error:

ERROR: LoadError: MathOptInterface.GetAttributeNotAllowed{MathOptInterface.ConstraintConflictStatus}: Getting attribute MathOptInterface.ConstraintConflictStatus() cannot be performed: Gurobi.Optimizer does not support getting the attribute MathOptInterface.ConstraintConflictStatus(). You may want to use a CachingOptimizer in AUTOMATIC mode or you may need to call reset_optimizer before doing this operation if the CachingOptimizer is in MANUAL mode.

This is a minimal example to reproduce the error:

using JuMP, Gurobi

model = Model(Gurobi.Optimizer)

@variable(model, x[1:3] ≥ 0)

# SOS2 constraint
@constraint(model, x in SOS2())

# additional constraint to create infeasibility
@constraint(model, sum(x) == -1)

@objective(model, Min, sum(x))

optimize!(model)

compute_conflict!(model)

# this line produces the error
iis_model, _ = copy_conflict(model)

I am using Julia v1.10, JuMP v1.23.6, and Gurobi v1.6.1 on Windows.

@odow
Copy link
Member

odow commented Jan 15, 2025

@odow odow changed the title Copying a conflict with SOS2 constraint leads to error Add support for MOI.ConstraintConflictStatus of SOS constraints Jan 15, 2025
@odow odow added the Wrapper: MathOptInterface Issue is specific to MOI wrapper label Jan 15, 2025
@odow odow closed this as completed in #603 Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Wrapper: MathOptInterface Issue is specific to MOI wrapper
Development

Successfully merging a pull request may close this issue.

2 participants