-
Notifications
You must be signed in to change notification settings - Fork 266
Add recipe for getting infeasible constraints #857
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
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 == 7
as the constraint yielding the infeasibility.Fix #855