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.