I recently found that it was possible to use the Gusek IDE to write a linear program that can then be solved with Gurobi. Gusek is an IDE for the MathProg language, and is shipped with GLPK binaries. The idea is to model the problem using Gusek, possibly using external data files, to then export the problem as a MPS file, which will be read and solved with Gurobi (or any other solver supporting the MPS format).
To make it work, you will need to do the following:
- Download and install Gurobi and iPython, as described in this post
- Download and install Gusek (unzip it to any folder)
- Open Gusek and edit a new model (you can find the partition example here, and the data file here). Note that if you are using an external data file you will have to check the “Use External .dat” option in the Tools menu
- In the “Tools” menu select “Build MPS”, and a new tab should open with the build mps file
- Now open a Gurobi (or an iPython) console and type
m = read("path/model.mps")
m = gurobipy.read("path/model.mps")
- Next type
m.optimize()to solve your problem.