Commit a88e154
Do not discard a MIP solution when its repair LP fails to solve
When a solution is feasible for the presolved model but violates the original
model by more than mip_feasibility_tolerance, HighsMipSolverData repairs it by
fixing the integer columns and re-solving the LP in the original space. The
repaired solution is accepted only if that LP returns a feasible primal
solution, so a failure of the solver is treated exactly like a solution that is
genuinely bad: the solution is discarded and kHighsInf is returned, so it is not
used for bounding. When the discarded solution is the optimum, the search
reports a worse incumbent as optimal at a zero gap.
The repair LP is solved in the original space with the dual simplex, which on a
badly scaled model can fail the ratio test with "excessive dual values" (or its
primal counterpart) and return kSolveError. On a 12710 x 23091 MIP with an
objective coefficient range of 2.4e13, 17 of 34 repair LPs failed this way and
the optimum was among the solutions discarded, leaving an objective 20.67 worse
reported as optimal.
Retry such a solve once without presolve; the same LP then solves to optimality,
as it also does with the primal simplex or with IPM.
Also recompute the row activities from the repaired column values. The
feasibility test is given solution.row_value and trusts it, but the values
returned by the LP solver need only satisfy the LP to its own tolerance, so they
can differ from the quad-precision recomputation used by the check that is later
applied to the returned solution. Without this a repaired solution can pass here
and then fail that check, turning a reported optimum into a solve error.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent bc30ccf commit a88e154
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
1239 | 1240 | | |
1240 | 1241 | | |
1241 | 1242 | | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
1242 | 1252 | | |
1243 | 1253 | | |
1244 | 1254 | | |
1245 | 1255 | | |
1246 | 1256 | | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
1247 | 1265 | | |
1248 | 1266 | | |
1249 | 1267 | | |
| |||
0 commit comments