Repository navigation
Conversation
…ective bound and MIP rel gap in writeSolution whenever a primal solution is available
checkColBounds and logging objective bound and MIP rel gap in writeSolution whenever a primal solution is available
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## latest #3772 +/- ##
=======================================
Coverage 75.98% 75.98%
=======================================
Files 467 467
Lines 116544 116570 +26
Branches 18165 18166 +1
=======================================
+ Hits 88551 88580 +29
+ Misses 27753 27750 -3
Partials 240 240 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…solve::checkColBounds
…ColBounds so that variables are no longer fixed by rounding
|
@DoumarCharles Having modified |
|
Added
as very simple illustration why fixing by rounding in presolve is wrong |
…ColBounds or passing it into computeSingletonRowBounds
|
Thanks. I tested the models from my open issues on this PR (f592c92) and its base (0eb18f9): 78 runs, using default options and the options specified in each issue. This PR fixes #3618. Both models now return Optimal at the expected objectives (2.00000011 and 1). However, the PR also needs the diff from my follow-up comment on #3618 (#3618 (comment)). When narrow columns are no longer fixed, relaxing a column bound can leave stale implied bounds on the other columns of its rows. On the model in that comment, this PR returns "Primal infeasible or unbounded" with presolve on, with the log error: Latest returns Optimal 0.1. With the follow-up diff applied on top of this PR, the model returns Optimal 0.099999905 (0.1 with presolve off). The 78-run results and unit tests are unchanged from this PR alone. One interaction with #3646: on its first model with default options, the result changes from 3.625 on the base to 3.6264999 on this PR. That is the incorrect result latest gives on that model with presolve off, as described in #3646. I previously observed the same interaction when testing my diff for #3618. Apart from this, I found no changed results on my other open-issue models. With both presolve changes included, #3618 looks ready to close:
#3646 remains a separate issue. |
Description
HPresolve::checkColBounds, (fixing MIP presolve declares a feasible model infeasible #3768)writeSolutionwhenever a primal solution is available (fixing Write the objective bound and MIP gap when a MIP stops at a limit #3742)%12.12grather than%12gto write out double values inwriteModelBoundSolutionto avoid hiding small perturbations of integers.highsFprintfString(file, options_.log_options, "\n# Basis\n");rather thanfprintf(file, "\n# Basis\n");to silence logging of# Basiswhenoutput_flagisfalse. Ditto# Ranging.Change to
HPresolve::checkColBoundsmay be controversial but, for me, what was being done before was akin to rounding optimal values of integer variables that have fractional part within themip_feasibility_tolerance: normally it's OK, but sometimes the corresponding LP (after fixing discrete variables at pure integer values) is infeasible. The change is fail-safe, with the downside that less fixing is performed. NB Observation by @hodangkhoinguyen that "exact SCIP: 158999841/1250000; SCIP 10.0.2, CPLEX 22.2 and Gurobi 14.0.0 agree [on Optimal, objective 127.1998728]".Checklist
latestbranchRelated issue
Closes #3742 and #3768