Forum Discussion

FICO's avatar
FICO
Community Manager
1 year ago

Is there a way for this MPS file with specific format to be read and solved?

I am trying to use "readprob" with this MPS file. The error 770 appears. After changing the keyword XLINEAR by ROWS, it still cannot solve. 

Is there some way to solve the optimization problem by using this MPS file with that format? Or can it be converted to a readable format?

2 Replies

  • FICO's avatar
    FICO
    Community Manager

    Hi Raul,

    this does not look like anything we ever supported. The main difference to our XMPS format, which hasn't really changed over the years, is that we would always expect to start with a ROWS section which only defines the rows with their inequality type, followed by a COLUMNS section which introduces the columns together with the matrix coefficients. As far as I can see, this file seems to be the other way around, starting with columns (named INITIAL) together with initial values (which we only support for nonlinear problems where they would follow at the end) and then followed by rows together with the nonzero elements. So I think the main effort in converting would be to switch the file from row-major to column-major format. The RHS and BOUNDS sections look like they should be readable at first glance.

  • FICO's avatar
    FICO
    Community Manager

    Expanding a bit on Tristan's answer: your MPS file is nowhere near a file conforming to the MPS standard nor the extended MPS format used by Xpress.

    I suggest to double-check the tool that creates this file and see whether it has an option to create a standard conformant file.

    It is easy enough to shuffle and/or rename the sections in your file, but like Tristan said, the data inside the sections is in a bad format as well. For example, the XLINEAR section cannot be considered as ROWS sections since it not only specifies row sense and right-hand side, but also left-hand side coefficients.