Forum Discussion

FICO's avatar
FICO
Community Manager
2 years ago

Optimizer not loading the entire MPS file

Hi all,

I'm playing around with a large MIP problem, and trying to compare Xpress and Cplex (2018 versions) in terms of performance for future work.

MIP problem is formulated in GAMS, and solved directly without any issue using Cplex. As the Xpress licence is on another computer, I export a MPS file with GAMS and I'm trying to read and solve it with Xpress Optimizer.

For small version of the MIP problem, everything went well. For the full problem, when trying to load the MPS with Optimizer, I get unusual warnings and errors:

Warning: Ignoring repeated specification for col : "x1000000" in line ... while reading in free format the file 'MIP.mps'

many times, and then,

Problem Statisticts

  • 4793730 (0 spare) rows
  • 9999999 (994529 spare) structural columns
  • 38151669 (58691964) non-zero elements

Error: Bound conflict for colum xXXXXX : 69.5 > 42

Error : Input aborted

I'm suprised the problem raises an error. It has been solved to optimality on Cplex, and smaller versions of it did not cause any trouble. I would expect Cplex to also raise an error if the problem was wrongly formulated.

I'm also surprised that by chance, it is variable "x1000000" causing a problem and that only 9999999 structural columns where found. I don't believe in coincidence! The beginning of the MPS file reads:

* MIP written by GAMS Convert at 06/01/24 10:57:30

* 

* Equation counts

*     Total       E       G       L       N       X       C       B

*   4793729  962465 3064671  766593       0       0       0       0

* 

* Variable counts

*                  x       b       i     s1s     s2s      sc      si

*     Total    cont  binary integer    sos1    sos2   scont    sint

*  19945289 19944947     342       0       0       0       0       0

* FX1977036 1976998      38       0       0       0       0       0

* 

* Nonzero counts

*     Total   const      NL     DLL

*  96843632 96843632       0       0

*

NAME         Convert

*

* original model was minimizing

So, I should have more columns, right? What is happening here? Could it be that Optimizer has a limit on the number of columns/variables it can read? Is it related to a control parameter, to the MPS file or to a limited licence maybe?

Any help or suggestion would be greatly appreciated!

Milien

4 Replies

  • FICO's avatar
    FICO
    Community Manager

    Did you try reading this MPS file CPLEX as well? It would be interesting to see whether CPLEX gives the same result when solving directly and/or when reading from the MPS file.

    The problem you see with Xpress could be a problem with the MPS file or with Xpress itself. Could you share the (compressed) MPS file?

  • FICO's avatar
    FICO
    Community Manager

    Hello Daniel,

    Thank you for your help. I'll see if I can solve the MPS file with CPLEX.

    In the meantime, here is the compressed MPS file generated by GAMS.

  • FICO's avatar
    FICO
    Community Manager

    At first glance the file looks at least strange. For example you have these lines (line numbers to the left of the colon):

    42945485:    x1000000  e192274        -0.3953
    42945486:    x1000000  e63       -77.16725385
    42945487:    x1000000  e104258              1
    42945488:    x1000000  e192274        -0.3953
    42945489:    x1000000  e63       -77.16725385
    42945490:    x1000000  e104259              1
    42945491:    x1000000  e192274        -0.3953
    110922508: UP bnd       x1000000           182
    110922509: UP bnd       x1000000           182
    110922510: UP bnd       x1000000           182
    110922511: UP bnd       x1000000           182
    110922512: UP bnd       x1000000           182
    110922513: UP bnd       x1000000           182

    So either this is highly repetitive or the column names got truncated to 8 characters.

    Moreover, Xpress issues this warning

    ?18 Error: Bound conflict for column x1573539 : 69.5917 > 42

    And indeed the file says

    102781311: FX bnd       x1573539  69.591674194
    116580618: UP bnd       x1573539  268.02631579
    116580619: UP bnd       x1573539  268.02631579
    116580620: UP bnd       x1573539  268.02631579
    116580621: UP bnd       x1573539  268.02631579
    116580622: UP bnd       x1573539  268.02631579
    116580623: UP bnd       x1573539  268.02631579
    116580624: UP bnd       x1573539  268.02631579
    116580625: UP bnd       x1573539            42
    116580626: UP bnd       x1573539            42
    116580627: UP bnd       x1573539            42

    In other words, many different bounds are specified for x1573539 in the MPS file. The first line fixes the variable to 69.591674194. Then a bunch of lines sets upper bound to 268.02631579 and then another bunch of lines sets the upper bound to 42.

    This smells a lot like a problem with the MPS export of GAMS. Is there maybe an option you have to give when you have a lot of variables so that names do not get truncated to 8 characters? Could you check with GAMS support people? The MPS file definitely looks unexpected.

  • FICO's avatar
    FICO
    Community Manager

    Thank you very much, Daniel, for taking the time to delve into the MPS file. I admit I only took a brief look at the bound conflict, and since MPS is a scalar format, it certainly doesn't help in understanding why two bounds were applied to the same variable.

    You identified the exact problem. I used a FixedMPS format in GAMS, which I believe is quite old and does not allow more than 8 characters for variables, with fields starting in fixed columns (2, 5, 15, 25, 40, and 50). Therefore, the variable x10000000 became x1000000, leading to conflicts and an incorrect formulation. This was not an issue for smaller versions of my problem since they did not reach 10,000,000 variables. The correct parameter to use is CplexMPS in GAMS, to generate a free (and not fixed) MPS file.

    It is working perfectly now, and it also generates files that are 40% smaller. Again, thank you very much, Daniel. Your help was invaluable!