CAAM 471/571 · Introduction to Linear and Integer Programming
Spring 2014 · Rice University
We will use Matlab and
AMPL for programming assignments.
Matlab
We will use Matlab,
especially programs from the Matlab
Optimization Toolbox.
Both are available on machines in computer labs and both are included in the
Matab student version.
AMPL
AMPL is a modeling language for expressing mathematical optimization problems.
A student version of AMPL as well as some associated optization solvers can be downloaded from http://ampl.com/DOWNLOADS/index.html
and choose the appropriate operating system / architecture for your system.
-
ampl: This is the engine that interprets LP and NLP models and
mediates between you and the solvers.
-
cplex: This is the AMPL/CPLEX solver for mixed integer/linear
programs and quadratic programs.
-
gurobi: This is the AMPL/Gurobi solver for mixed integer/linear
programs.
-
minos: This is the AMPL/MINOS solver for linear/nonlinear
programs.
-
lpsolve: This is the AMPL/lpsolve solver for linear programs.
-
sw.exe: This is a Windows-only front-end that makes it
easier to provoke AMPL and solvers.
Student version AMPL and some solvers (of windows and Mac versions) are
made available here locally for your convenience,
though their versions may not be up to date.
The installation instructions differ depending on your operating system.
See below.
-
Installation instructions for Windows
You should download and unpack the files
The directory where you unpack the file is where you will need to run them,
unless you understand how to set the PATH environment variables in Windows.
In the directory where you have unpacked the files, click on sw.exe. This
should cause a window to appear. At the prompt, type "ampl":
sw: ampl
This should start AMPL and prompt ampl: should now appear.
You can exit AMPL by typing quit.
-
Installation instructions for Mac
These instructions assume you have a Mac with an Intel chip.
You should download and unpack the files
If your browswer doesn't automagically offer to unpack the
ampl_bin.zip files, you can manually unzip the file
You should then move all the files to a directory that is on your
search path for executables or just put the ampl_bin
directory on your search path.
Then you need to change the script gurobi to
something like this, where () indicates text you should replace:
#!/bin/sh
DYLD_LIBRARY_PATH=(directory containing libgurobi51.so)
export DYLD_LIBRARY_PATH
exec (complete path name for gurobix) "$@"
(where 51 is the current version number which may be updated in time.)
-
Installation instructions for other systems
The AMPL student version for many other operatong systems is available
at http://www.netlib.org/ampl/student.
The installation on Linux systems is essentially the same as that for
MacOSX, except that DYLD_LIBRARY_PATH in the script gurobi is called
LD_LIBRARY_PATH.
|