scipopt / SCIP.jl

Julia interface to SCIP solver
MIT License
95 stars 24 forks source link

Conflict report #276

Closed matbesancon closed 1 year ago

matbesancon commented 1 year ago

Adding support for a conflict report based on solving an auxiliary problem with superindicators

matbesancon commented 1 year ago

@odow I didn't see any supports added on Gurobi, this isn't necessary to trigger tests for conflicts?

matbesancon commented 1 year ago

@pfetsch for information. I had to use a bit of a weird hack to get the violations by the names generated for the binary variables, but that should work

odow commented 1 year ago

The conflict tests have a check for if they can get ConflictStatus and skip if not: https://github.com/jump-dev/MathOptInterface.jl/blob/fdf2559261a0697196f7758f78048952c9ffac09/src/Test/test_solve.jl#L902-L908

pfetsch commented 1 year ago

@pfetsch for information. I had to use a bit of a weird hack to get the violations by the names generated for the binary variables, but that should work

Yes, cons_indicator is using such hacks as well. I suppose that they cannot always be avoided.

matbesancon commented 1 year ago

indeed. The last thing holding this back is that the superindicator transformation is not handling bound constraints if I understand the logic correctly. @svigerske suggested adding varbound constraints for these to also be able to analyze which ones contribute to the infeasibility

matbesancon commented 1 year ago

okay thinking about it a bit more, the definition of the SCIP subset of constraints and the minimal subsystem of MOI diverge:

Computes a minimal subset of constraints such that the model with the other constraint removed is still infeasible.

while SCIP provides a set of constraints which had to be relaxed to obtain a feasible solution

matbesancon commented 1 year ago

So if K constraints are in conflict and removing any of them resolves it, only one of them will be reported as infeasible by SCIP

odow commented 1 year ago

MOI's compute_conflict is really a synonym for Irreducible Infeasible Subsystem (IIS). It sounds like SCIP doesn't compute an IIS, so I don't know if it's appropriate to wrap this part of the MOI API.

matbesancon commented 1 year ago

Indeed, the definitions diverge too much. There could be a way to compute an IIS by gradually re-imposing the constraints, but this will be for another time.

svigerske commented 1 year ago

When you look for a point that minimizes a measurement on the infeasibility (max/sum/number), then this is usually called feasibility relaxation (CPLEX feasopt, COPT feasrelax).

matbesancon commented 1 year ago

that's true it might be a better name