Open-source IDE for Gurobi

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:

  1. Download and install Gurobi and iPython, as described in this post
  2. Download and install Gusek (unzip it to any folder)
  3. 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
  4. In the “Tools” menu select “Build MPS”, and a new tab should open with the build mps file
  5. Now open a Gurobi (or an iPython) console and type
    m = read("path/model.mps")
    m ="path/model.mps")
    in iPython
  6. Next type m.optimize() to solve your problem.

2 thoughts on “Open-source IDE for Gurobi

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s