Comments (5)
Indeed. Gurobi also follows the same convention: Gurobi MPS format.
Since fixing this requires to not ignore markers anymore, I will add support for integer variables at the same time.
I can't work on this until next week though.
from qpsreader.jl.
So, it seems there are a few additional details, and not all solvers appear to do the same.
- Variable is marked integer, but there is a
BV
/UI
/LI
entry in theBOUNDS
section.
In that case, the default[0, 1]
bounds are discarded in favor of entries in theBOUNDS
section.
Gurobi and Mosek seem to both follow that convention. - Several bounds are specified in the
BOUNDS
section.- CPLEX: error (according to docs)
- Gurobi: record first entry read, discard the subsequent bounds and print a warning
- Mosek: record last entry, no warning
@dpo @mlubin, the convention should look like this:
Marker? | BOUNDS fields |
Type | Bounds reported |
---|---|---|---|
Yes | - | Integer | [0, 1] |
Yes | BV |
Binary | [0, 1] |
Yes | (LI , l ) |
Integer | [l, Inf] |
Yes | (UI , u ) |
Integer | [0, u] |
Yes | (LI , l ) + (UI , u ) |
Integer | [l, u] |
No | BV |
Binary | [0, 1] |
No | (LI , l ) |
Integer | [l, Inf] |
No | (UI , u ) |
Integer | [0, u] |
No | (LI , l ) + (UI , u ) |
Integer | [l, u] |
In particular, using UP
/LO
instead of UI
/LI
does not affect the final bounds. The latter only results in the corresponding variable being integer.
Regarding the multiple entries, doing like Mosek, i.e., having subsequent entries erase previous ones, is the simplest.
from qpsreader.jl.
There's actually another convention, independent of integrality, regarding negative upper bounds.
The following is from CPLEX documentation. Gurobi appears to behave the same way, though no mention is made in the Gurobi documentation. Mosek appears to keep a lower bound of 0.
If no bounds are specified, CPLEX assumes a lower bound of 0 (zero) and an upper bound of +∞.
If only a single bound is specified, the unspecified bound remains at 0 or +∞, whichever applies, with one exception. If an upper bound of less than 0 is specified and no other bound is specified, the lower bound is automatically set to -∞.
CPLEX deviates slightly from a convention used by some MPS readers when it encounters an upper bound of 0 (zero). Rather than automatically set this variable’s lower bound to -∞, CPLEX accepts both a lower and upper bound of 0, effectively fixing that variable at 0. CPLEX resets the lower bound to -∞ only if the upper bound is less than 0.
A warning message is issued when this exception is encountered.
Given that there is no clear consensus on this, I am tempted to keep the current status-quo, i.e., unspecified lower bounds are 0
and unspecified upper bounds are Inf
.
from qpsreader.jl.
If only a single bound is specified, the unspecified bound remains at 0 or +∞, whichever applies, with one exception. If an upper bound of less than 0 is specified and no other bound is specified, the lower bound is automatically set to -∞.
I think this part is relatively standard. The divergence in implementations comes up when there's an upper bound of zero and no lower bound.
It's easy to get lost in the inconsistencies in MPS. I think a good concrete target is to be able to handle the corner cases that are present in a standard benchmark set like MIPLIB 2017. Everyone agrees that these instances should parse correctly, and if they don't, someone is likely to open a bug about it sometime in the future.
from qpsreader.jl.
Closed by #31
from qpsreader.jl.
Related Issues (11)
- Add meaningful tests HOT 1
- Release and register as Julia package? HOT 6
- Drop Julia 1.1, 1.2 from CI HOT 1
- Convention for rim data? HOT 3
- Performance benchmark HOT 2
- Error reading certain Netlib problems HOT 5
- Write docs
- Fails to read neos-5044663-wairoa HOT 2
- TagBot trigger issue HOT 1
- Use CITATION.cff instead of CITATION.bib
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qpsreader.jl.