fix: MPS reader integer default bounds - #102
Open
ZedongPeng wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The MPS reader deviated from the standard MPS conventions in four ways, each of which silently produced a different LP than other solvers read from the same file.
MARKER 'INTORG'/'INTEND'was ignored. By the classic MPS convention (CPLEX, Gurobi, SCIP, HiGHS), an integer column with noBOUNDSentry is[0, 1]; we gave it[0, +inf). Such columns are now tracked and defaulted after parsing, and anyBOUNDSentry cancels the default.LI/UI, which were silently skipped, are now accepted.UPbound did not release the lower bound, giving the empty interval[0, -3]forUP x -3. It now implieslb = -inf, but only when no explicit lower bound was given.1e20/1e30"infinity" was taken literally, polluting rescaling and the termination criteria. Bounds at or beyond+/-1e20are now normalised to infinity for variables and constraints alike (the same threshold as HiGHSoptions.infinite_bound), andlb >= 1e20/ub <= -1e20are rejected.Nrow stole the first constraint as the objective, and sections that change the model beyond an LP (QUADOBJ,QSECTION,CSECTION,INDICATORS, ...) fell through into whichever section was active. A missingNrow now gives a zero objective, those sections are rejected, andSOS/SETSare skipped since they leave the LP relaxation unchanged.Effect
Only (1) changes any instance we solve. In MIPLIB 2017, 12 instances are read differently:
ds,ds-big,eilA101-2,eilC76-2,ivu06,ivu06-big,ivu52,ivu59,neos-1354092,neos-3352863-ancoa,ns2122698,rvb-subEverything else in our benchmark set parses byte-for-byte identically, verified by hashing the full parsed problem with the old and the new reader. The 12 were re-solved at
1e-4and1e-8; they still terminateOPTIMALwith essentially unchanged objectives, since these are set-covering-style models whose linear constraints already implyx <= 1, making the restored upper bound redundant. No other benchmark needs rerunning.Files with an
INDICATORSsection are now rejected. Previously the section was ignored, leaving its conditional rows in the matrix as unconditional constraints - a strictly tighter problem than the model describes. No such file is part of our benchmark set.