Automated Configuration
of MIP solvers
(auto-tuning CPLEX et al.)
This
website explains
how to use ParamILS to tune the performance of CPLEX, Gurobi, or
lpsolve for the type of instances you are interested in.
All
you need is a set of benchmark instances and some CPU time.
Our approach and empirical results for speeding up MIP solvers (e.g.
CPLEX by up to a
factor
of 50) are discussed in the following papers.
-
Frank
Hutter, Holger Hoos, and Kevin Leyton-Brown
Automated
Configuration of Mixed
Integer Programming Solvers
To appear at CP-AI-OR
2010. [pdf] [bib] [slides to come]
The original publication
is available at www.springerlink.com.
- Frank
Hutter, Holger H. Hoos, Kevin
Leyton-Brown, and Thomas Stützle.
ParamILS:
An Automatic Algorithm
Configuration Framework [pdf]
[bib]
In Journal
of Artificial
Intelligence Research (JAIR),
volume 36, pp. 267-306,
October 2009.
To tune (configure) CPLEX
with ParamILS, simply follow these
steps:
- You will need a way to run
CPLEX from the command line with different parameter settings.
For this, you can use the Ruby script run_cplex12.rb (here is an older version we used in our CP-AI-OR paper: run_cplex.rb)
you call this script from the command line, specifying a problem
instance, cutoff time, and the desired parameter settings. You will
have to modify variable cplex_executable_absolute_filename at the top
of the file, to point to your CPLEX installation.
It then starts an interactive CPLEX shell, sets the parameters
and the cutoff time, and runs CPLEX on the problem instance.
If the scripting language Ruby is not installed on your system, you can
install it by typing the following commands on your UNIX prompt.
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p248.tar.bz2
tar xjf ruby-1.8.7-p248.tar.bz2
cd ruby-1.8.7-p248
./configure --prefix=$HOME
make
make install
- Download ParamILS from http://www.cs.ubc.ca/labs/beta/Projects/ParamILS/
A quickstart guide for ParamILS is also available on
that website. You can get started with ParamILS right away (using some
old parameter file and parameter files) by typing the following example
command:
ruby param_ils_2_3_run.rb -numRun 0 -scenariofile example_cplex/scenario-Cplex-CATS-smalltrain-smalltest.txt -validN 100
To make this work, you should only have to replace the CPLEX binary location in file cplex_wrapper.rb, in the following line:
cmd = "ruby -e 'File.popen(\"use cplex; /cs/local/lib/pkg/cplex-10.1.1/bin/cplex\",\"w\"){|file| "
- We recommend you use one of these parameter files: parameter file to configure CPLEX 12 for MILP and parameter file to configure CPLEX 12 for MIQCP.
For reference, here are some old parameter files: old parameter file we used in our CP-AI-OR paper to configure CPLEX 12 for mixed integer
linear programs (MILP), old parameter
file for CPLEX 11 for MILP
and old parameter
file for CPLEX 11 for MIQCP.
(You can configure which parameter file to use in ParamILS' scenario
file, in the example call above located at:
example_cplex/scenario-Cplex-CATS-smalltrain-smalltest.txt)
- We also recommend you use the following wrapper (which runs CPLEX and outputs the result in a predefined
format): cplex12_wrapper.rb
This wrapper uses
the above script run_cplex12.rb at its core, parses its output and
outputs the result in ParamILS's format. You will have to change
variable $path_to_runcplex_script at the top of the file to
point the absolute path of the directory in to which you
put file run_cplex12.rb.
For reference, here is an old version of this wrapper: cplex_wrapper.rb
(You can also configure which wrapper to use in ParamILS' scenario
file)
That is it. Just specify your own benchmark instances etc in ParamILS' scenario file as discussed
in the
ParamILS Quickstart manual and start the algorithm configuration
process.
We hope that in the future ParamILS will be integrated into CPLEX, such
that using it becomes a matter of typing "tune" in the
interactive
optimizer.
Note: in order to get robust results,
we recommend doing multiple runs of ParamILS (e.g., 10) with different
values for numRun, and using the result of the one with the best
training performance. That is the same methodology we used in
the papers cited above.
To make life easier, Andrew
Coles has written a small perl script that takes a result.txt file
from a ParamILS run using the CPLEX wrapper, and turns it into a
chunk of C or C++ code that make the CPLEX callable library calls to
set the equivalent parameters. Simply call the script, translateResultToCpp.pl, without
arguments to find out how to use it.
Configuration of Gurobi
and
lpsolve with ParamILS
ParamILS does not only apply to
optimizing CPLEX. It can also be applied to other MIP solvers, such as
Gurobi and lpsolve. In fact, the wrappers for those solvers are
somewhat simpler because
they are meant to be called from the command line.
Everything is the same as for optimizing CPLEX, except the wrappers and
parameter files.
Here are the wrapper and
parameter files for Gurobi: gurobi_wrapper.rb,
gurobi_params.txt.
Here are the wrapper and
parameter files for lpsolve:
lpsolve_wrapper.rb,
lpsolve_params.txt.
Please send any questions,
concerns or comments to Frank
Hutter