1

I'm trying to find an open source lp solver that is fast enough to my problem. I'm trying to build a MPS file so I can submit it to NEOS servers and compare the performance of different solvers.

My problem involves, at its most difficult cases, something around 150 integer variables but I'm starting with a simple case to help me figure out how the MPS file format works.

This is the problem:

minimize  : 330.3 * M1 + 1132.88 * M2 + 955.86 * M3
subject to:
         20 <= 60 * M2 <= 20.9
         20 <= 34 * M3 <= 20.9
         M1 + M2 + M3 = 1

and I wrote the following MPS file:

NAME problema1
ROWS
 L  K
 L  N
 E  ONE
 N  CUSTO
COLUMNS
    M1        ONE       1              CUSTO     330.3
    M2        K         60
    M2        ONE       1              CUSTO     1132.88
    M3        N         34
    M3        ONE       1              CUSTO     955.86
RHS
    KLESS     K         20.9
    NLESS     N         20.9
    ONEREST   ONE       1
RANGES
    RANGE1    K         0.9
    RANGE2    N         0.9
ENDATA

Using the linear solvers available at NEOS (https://neos-server.org/neos/solvers/index.html), just Gurobi can solve it. The others find the problem is infeasible (which it's not).

I'm pretty confident that this is a problem with my MPS file, but I just can't figure it out what it is. What am I doing wrong?

  • Maybe add some more background. If you are only looking for some open-source solver for MIP-problems, there are not many candidates: Coin CBC, GLPK and lpsolve (in this order for me) as free software and SCIP (open-source but non-free; may even beat CBC). Remark: there is a large gap between open-source and commercial solvers (like Gurobi, CPLEX and Mosek). Also check out [those benchmarks](http://plato.asu.edu/ftp/milpc.html). If you really want to do all these benchmarks, why not use one of those to generate those standardized MPS-files (GLPK maybe having the best docs)? – sascha Jan 30 '17 at 03:26
  • NEOS for some solvers also accepts .lp format, which is more human readable than .mps. – Rich L Jan 30 '17 at 17:05
  • Thanks for your contribution @sascha I know about the gap between open-source and commercial solvers. However, commercial solvers are very expensive when you need to scale the solution to a great number of users, which is my case. I think that, for the size of my problem, an open-source solver like those you cited can do the trick. – Fausto Richetti Blanco Jan 30 '17 at 22:59
  • Thank @RichL However, I'm interest in the Cbc solver, for which NEOS server doesn't accept the .lp format as input – Fausto Richetti Blanco Jan 30 '17 at 23:01

1 Answers1

3

Indeed your MPS file has a problem. The lines in the RHS section should have one name e.g.

RHS
    RHS1      K         20.9
    RHS1      N         20.9
    RHS1      ONE       1

Basically the solver picks one RHS set. Similar for the RANGES section. I am not sure what you intended using the lines in the RANGES section.

Erwin Kalvelagen
  • 15,677
  • 2
  • 14
  • 39