Cbc icon indicating copy to clipboard operation
Cbc copied to clipboard

Problem reading certain .mps models with CBC

Open KristijanFaust-OET opened this issue 7 months ago • 1 comments

CBC has problems reading certain .mps models, that are successfully read and solved by other solvers,

Logs:

Welcome to the CBC MILP Solver 
Version: 2.10.12 
Build Date: Mar  5 2025 

command line - cbc -printingOptions all -import .../times-etimeseu-elec+heat-single_stage-29-64.mps -randomCbcSeed 1 -solve -solu .../solutions/times-etimeseu-elec+heat-single_stage-29-64-cbc-test.sol (default strategy 1)
Option for printingOptions changed from normal to all
At line 16
Unknown image  at line 1 of file .../times-etimeseu-elec+heat-single_stage-29-64.mps
Coin0008I  read with -2 errors
There were -2 errors on input
randomCbcSeed was changed from -1 to 1
** Current model not valid
** Current model not valid
No match for .../times-etimeseu-elec+heat-single_stage-29-64-cbc-test.sol - ? for list of commands
Total time (CPU seconds):       0.00   (Wallclock seconds):       0.00

This was noticed on CBC versions 2.10.12 and 2.10.11.

List of .mps models causing the problem: https://storage.googleapis.com/solver-benchmarks/times-etimeseu-elec%2Bheat-single_stage-29-64.mps https://storage.googleapis.com/solver-benchmarks/times-etimeseu-elec%2Bheat-multi_stage-1-64.mps https://storage.googleapis.com/solver-benchmarks/times-etimeseu-elec%2Bheat-multi_stage-29-64.mps https://storage.googleapis.com/solver-benchmarks/tui.mps https://storage.googleapis.com/solver-benchmarks/times-nom-ts1-p39-counties.mps https://storage.googleapis.com/solver-benchmarks/times-nom-ts1-p39.mps

The command used to read the models is: cbc [filename].mps

KristijanFaust-OET avatar May 19 '25 11:05 KristijanFaust-OET

mps format has evolved since the launch of Coin. Initial error caused by a blank line. It would also have failed as OBJNAME not recognized.

I have modified CoinMpsIO.cpp in master. I have the changes for stable - but there the maximize flag is not used. Not too important as user can set. Will probably put changes in stable in a day or two.

jjhforrest avatar May 19 '25 14:05 jjhforrest