load data from mps file for octave

Przemek Klosowski przemek at jazz.ncnr.nist.gov
Tue Dec 2 09:20:47 CST 2008


   I need to read mps file and then call glpk(c, a, b, lb, ub, ctype, vartype,
   sense, param) in octave.

   How to load the data of these input arguments for glpk from mps file ?

Seeing that we weren't flooded with answers by a crowd of linear
programming experts I decided to pipe in even though my knowledge of
LP consists of using it for a couple of basic problems related to beer
chemistry; I never used MPS files.

In any case, Octave provides a simple interface to GNU Linear
Programming (GLPK) optimization routines, leaving the preparation of
input parameters to you. The full GLPK distribution, on the other
hand, is shipped with a front end that apparently reads AMPL and MPS files:

http://www.mail-archive.com/help-glpk@gnu.org/msg02255.html
http://www-unix.mcs.anl.gov/otc/Guide/faq/linear-programming-faq.html

If you have a large investment in MPS files you may be better off
using GLPK directly (or use some other LP systems mentioned in the
Argonne FAQ). If you prefer using GLPK through Octave, however, I
think that you will have to write MPS parser yourself.



More information about the Help-octave mailing list