Using MPS file

299 views
Skip to first unread message

Cheng-Lung Chen

unread,
Apr 19, 2016, 9:27:05 PM4/19/16
to AMPL Modeling Language
Hi, 

I have couple of instances that are written in mps format. 

I want to use AMPL with CPLEX solver to run those instances. 

I understand AMPL can generate mps file once the mod and dat files are given, but is there a way to transfer back?

Or should I just use CPLEX to read those mps file?

How to do that in MacOS terminal with AMPL and CPLEX solver?

Thank you so much!.

Robert Fourer

unread,
Apr 20, 2016, 10:29:51 AM4/20/16
to am...@googlegroups.com
There are some utilities, described at https://groups.google.com/d/msg/ampl/R6g4oT6IdyI/JuS1Gv4OU6sJ, for converting an MPS file to AMPL's data format so that it can be used with a special AMPL model. This is convenient if you have CPLEX for AMPL set up and you want to test the CPLEX solver on some test problems in MPS format.

MPS files can also be read directly by the command-line version of CPLEX, which is part of the CPLEX distribution provided by IBM. However you can't read MPS files directly into the "CPLEX for AMPL" version of the CPLEX solver that we distribute.

Bob Fourer
am...@googlegroups.com

=======

Cheng-Lung Chen

unread,
Apr 20, 2016, 11:41:57 AM4/20/16
to AMPL Modeling Language, 4...@ampl.com
Hi Dr. Fourer

Thanks for answering. I do read that article couple of hours ago. Currently I am having trouble execute the awk on my Mac. Still working on it.

I do have CPLEX solver integrated with JAVA, so that's an alternative for met. Thank you!

Leo

Robert Fourer於 2016年4月20日星期三 UTC-4上午10時29分51秒寫道:
Reply all
Reply to author
Forward
0 new messages