Friday, April 3, 2009

glpk/ampl to GAMS conversion

> I don’t have glpk2gams, how do I convert an ampl or glpk model to gams?

  1. Generate an MPS file from AMPL or GLPSOL:
    1. Use the command line flag –wmps in glpsol
    2. In AMPL you can use
    3. ampl: option auxfiles rc;
      ampl: write mxxx;

      Here xxx can be replaced by a better name

       

  2. Use mps2gms to translate this MPS file into a GAMS file. Note: mps2gms is part of the GAMS distribution so you already have it.

1 comment:

  1. Hi,

    Thanks for the info. I am not really familiar with GAMS. I have an AMPL .mod file that I need to convert to a .gms file. Could you go into a little more details how I can do this using what you mentioned in the post above. Thanks!!

    ReplyDelete