Tuesday, November 17, 2009

Using GLPK/GMPL with GUSEK ...

In class I demonstrated a minimalistic, bare-bones installation of GLPK. The tools I used were a text editor (such as notepad on Windows machine, or textedit on a Mac) and the GLPK command glpsol.  These simple (and free) tools can handle a wide variety of optimization problems, but are definitely 'old school'. The good news is that integrated user interfaces are available which you may find more convenient for general development work in GMPL.

For Windows you have several choices, including the recently developed GUSEK.  My first reaction is that GUSEK appears to be a very useful tool for the development of GMPL models as used in this course. It's easy to download and install.  Go to http://sourceforge.net/projects/gusek/ and push the download button. Unzip the download file to any folder.  In that folder open the gusek.exe file and you should be good to go. Type your GMPL model in the first tab, save the file, then run the file using the 'Tools>Go' menu item.  If you select the 'Tools>Generate Output File on Go' option, then the optimization results are shown in a separate tab which can also be saved and printed.

For the Mac  I was able to get GUSEK working under the WINE system that allows one to use Windows software in a Mac OS X or Linux environment.  Here's a two step process that should you get you up and running (i.e., it worked for me):
  1. Download and install WINE.  The easiest way is to get a precompiled version from the web site http://winebottler.kronenberg.org/ (The download button is the little text item with the downward pointing arrow labeled 'download').  The file should download and unzip automatically then open a window for installation.  Drag the 'Wine' icon to the application folder (you may need to provide your Mac password). 
  2. Next download GUSEK from  http://sourceforge.net/projects/gusek/.  It should download and unzip automatically.  Put the gusek folder somewhere convenient (on your desktop, for example).  Go to that folder and double-click gusek.exe.  It's a little slow the first time as WINE configures itself to run the file. There may also be several windows that open up as WINE goes through the startup - this is part of it's configuration process for the first time you use GUSEK. A little wine glass icon will appear in the upper left status bar of your Mac - that's your interface to the WINE software.
  3. At this point you're in business.  You can either open an existing GMPL model or create one from scratch.  Use the Tools menu to run and display the results of the optimization.
Hopefully these instructions are enough to get both PC and Mac users going with GMPL and GUSEK. Let me know if there are problems.  Feel free to add comments to this post if you have any advice or experiences to share regarding the installation of GUSEK.

1 comment:

  1. I am absolutely new with Gusek!

    Where shall I start?

    Thanks!!!

    Sam

    ReplyDelete