Skip to content

fix: MPS reader integer default bounds - #102

Open
ZedongPeng wants to merge 1 commit into
MIT-Lu-Lab:mainfrom
ZedongPeng:fix/mps-integer-default-bounds
Open

fix: MPS reader integer default bounds#102
ZedongPeng wants to merge 1 commit into
MIT-Lu-Lab:mainfrom
ZedongPeng:fix/mps-integer-default-bounds

Conversation

@ZedongPeng

Copy link
Copy Markdown
Collaborator

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.

  1. MARKER 'INTORG'/'INTEND' was ignored. By the classic MPS convention (CPLEX, Gurobi, SCIP, HiGHS), an integer column with no BOUNDS entry is [0, 1]; we gave it [0, +inf). Such columns are now tracked and defaulted after parsing, and any BOUNDS entry cancels the default. LI/UI, which were silently skipped, are now accepted.
  2. A negative UP bound did not release the lower bound, giving the empty interval [0, -3] for UP x -3. It now implies lb = -inf, but only when no explicit lower bound was given.
  3. 1e20/1e30 "infinity" was taken literally, polluting rescaling and the termination criteria. Bounds at or beyond +/-1e20 are now normalised to infinity for variables and constraints alike (the same threshold as HiGHS options.infinite_bound), and lb >= 1e20 / ub <= -1e20 are rejected.
  4. A file with no N row 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 missing N row now gives a zero objective, those sections are rejected, and SOS/SETS are 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-sub

Everything 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-4 and 1e-8; they still terminate OPTIMAL with essentially unchanged objectives, since these are set-covering-style models whose linear constraints already imply x <= 1, making the restored upper bound redundant. No other benchmark needs rerunning.

Files with an INDICATORS section 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant