[Coin-discuss] modeling with GNU MathProg

Brady Hunsaker hunsaker at isye.gatech.edu
Sat May 17 20:21:15 EDT 2003


The most recent release of GLPK (4.0) includes a parser for the
modeling language GNU MathProg.  It's not exactly a new language,
since it's a subset of AMPL.  It contains all of the basic
functionality of AMPL as far as I can tell, excluding things like
loops, for example.  So now there is an open-source way to process
many AMPL models.

Better yet, the parser provides its own API, although you have to look
into the source code for documentation (the documentation there is
reasonably good).

The attached tarball contains a function that uses this API to read a
model instance into an OsiSolverInterface object.  It needs to link
against the GLPK 4.0 library as well as whatever OSI libraries are
being used.  I included an example which reads in a model and solves
it using CLP.

I thought this was important enough to get such a function out there
quickly.  However, I'm writing my dissertation right now, so I won't
have time to do much more in the near future.

I'm hoping that someone else will be interested enough to take on the
task of better integrating this into OSI.  As I see it there are two
main issues:

1. Currently OSI does not provide an easy way to identify rows or
   columns other than by index.  This is an issue since it's not
   obvious which model constraints or variables will get which
   number.  My current implementation isn't really that useful because
   of this.

2. What is the best way to include the parser?  That is, where can we
   include this or a similar function in COIN-OR?  Right now I'm
   linking against the GLPK library, which requires that the user
   install GLPK.  It would be possible to create a stand-alone parser
   for COIN-OR by extracting the necessary parts of GLPK, but this
   would have to be licensed under the GPL (I don't think that's a bad
   thing, but we probably can't do it until we're incorporated, if
   then).  Maybe there are other possibilities.

I'm happy to talk about this, though I can't justify much more coding
right now. 

Brady

----------------
Brady Hunsaker
Georgia Institute of Technology
Program in Algorithms, Combinatorics, and Optimization
School of Industrial and Systems Engineering

E-mail address:   hunsaker at isye.gatech.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReadGNUMathProg.tar.gz
Type: application/x-tar-gz
Size: 3901 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20030517/6ab97970/attachment.bin>


More information about the Coin-discuss mailing list