Giter Club home page Giter Club logo

Comments (5)

mtanneau avatar mtanneau commented on May 25, 2024 1

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.

mtanneau avatar mtanneau commented on May 25, 2024

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 the BOUNDS section.
    In that case, the default [0, 1] bounds are discarded in favor of entries in the BOUNDS 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.

mtanneau avatar mtanneau commented on May 25, 2024

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.

mlubin avatar mlubin commented on May 25, 2024

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.

mtanneau avatar mtanneau commented on May 25, 2024

Closed by #31

from qpsreader.jl.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.