SolverStudio supports the GNU optimisation package GLPK and associated GMPL modelling language which is (roughly) a subset of AMPL. Please see the “AMPL(NEOS)+GMPL Examples.xlsx” spreadsheet in the SolverStudio download for example code.
Please note that GMPL lacks AMPL’s nice output, and so the following more complicated code is needed to output results from GMPL:
# Write the solution to the sheet (copying AMPL's display format) # Each item is quoted to ensure spaces in items work correctly printf "" > "Sheet"; # Open output file printf "flow :=\n" >> "Sheet"; printf {i in Warehouses, j in Bars}: "'%s' '%s' '%s'\n", i, j, flow[i,j] >> "Sheet"; printf ";\n" >> "Sheet"; # A single value can be written as follows (again mimicing AMPL) printf "Total_Cost = " >> "Sheet"; printf Total_Cost >> "Sheet"; printf "\n" >> "Sheet";
Useful GMPL links include:
GLPK/MathProg for Natural Resources (Forestry, Agriculture,…)
GMPL Wiki Pages and GLPK Wiki Pages
GLPK for Windows including 32 and 64 bit executables and GLPK for Java
20 thoughts on “SolverStudio & GMPL”