Add recipe for getting infeasible constraints#857
Add recipe for getting infeasible constraints#857Opt-Mucca merged 9 commits intoscipopt:masterfrom Joao-Dionisio:get_infeasibilities
Conversation
|
As I said in the meeting: My suggestion is to add an option to attach a binary variable to each slack variable. If the slack variable is non-zero then force the binary to 1 and minimise the sum of binaries. (This is going to be a behemoth of a model to solve, but would give a minimum amount of constraints that are forced to be invalid). |
…o/PySCIPOpt into get_infeasibilities
|
Thanks for the review @Opt-Mucca, I think it's done now. The logical constraint was a bit more complicated than I realized, so I turned to OR SE (https://or.stackexchange.com/q/12142/5352) and implemented Erwin Kalvelagen's answer (who gracefully allowed me to use it). |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #857 +/- ##
==========================================
- Coverage 52.53% 52.29% -0.25%
==========================================
Files 19 20 +1
Lines 3961 3991 +30
==========================================
+ Hits 2081 2087 +6
- Misses 1880 1904 +24 ☔ View full report in Codecov by Sentry. |
|
Can you answer or resolve the older questions? Two points for the current state:
|
|
@Opt-Mucca the binary variables are used in line 30. The formulation is not trivial, that's why I point to https://or.stackexchange.com/q/12142/5352. I need both binary and aux_binary in order to use SOS1 constraints. Oops! Good catch on the objective function Mark. |
|
I think that's it @Opt-Mucca! |
|
Am happy after our discussion! |
Adds slack variables to the constraints and minimizes their sum. Non-zero slack variables correspond to infeasible constraints.
This is still far from Gurobi's Irreducible Inconsistent Subsystem. Take the following constraints:
This function would return$4$ infeasible constraints, even though it is natural to take
x == 7as the constraint yielding the infeasibility.Fix #855