CoinUtils icon indicating copy to clipboard operation
CoinUtils copied to clipboard

Errors in reading mps file

Open natebragg opened this issue 2 years ago • 5 comments

When trying to upload this mps file to neos, I get the following error:

No MAX/MIN found after OBJSENSE
Coin3005W No match for row OBJROW at line 10 <     C0000000  OBJROW    1.             R0000000  1. >

natebragg avatar Sep 22 '22 15:09 natebragg

I transferred this issue to coin-or/CoinUtils because that is where the MPS reader lives. I suspect that this is a case of an MPS problem that is actually in free format, but the reader is treating it as being in the standard fixed format. There have been some improvements in the MPS reader in the master branch that my address this. I'll let @jjhforrest weigh in.

tkralphs avatar Apr 12 '23 18:04 tkralphs

The file is not in the correct format, but the error message is wrong. The correct format for the Cplex extension to MPS format has MIN or MAX on the next card - not on the same card.

The simplest thing to do is allow that on the same card (at present it is ignored anyway). Done in stable and master.

jjhforrest avatar Apr 13 '23 10:04 jjhforrest

Modified master so Clp or OsiClp sets optimization direction to maximize if MAX found

jjhforrest avatar Apr 13 '23 15:04 jjhforrest

If the file is in the incorrect format, that is an independent issue, as I exclusively generate MPS files using CBC's writeMps API call. My actual problems are constructed using the API, and this file was generated from one of my constructed problems.

natebragg avatar Jun 13 '23 14:06 natebragg

I do not understand how that file was generated using Cbc's writeMps. There is no statement that writes an image with OBJSENSE but the file infeasible.mps has OBJSENSE.

jjhforrest avatar Jun 13 '23 15:06 jjhforrest