a short tutorial pdf

advertisement
Sepa tutorial
Hassan Hijazi
LIX, École Polytechnique
–
Canberra Research Laboratory, National ICT Australia
hijazi@lix.polytechnique.fr
Below is a guide for downloading, installing and using the new Outer-Inner algorithm for solving
separable convex MINLPs on a linux machine.
•
Download:
Open a terminal and enter:
svn co https://projects.coin-or.org/svn/Bonmin/stable/1.6 Bonmin-stable
This will download the last stable version of Bonmin in the directory Bonmin-stable.
If you need to set a proxy, enter the following command:
export http proxy=’http://your.proxy.com/’
•
Install Bonmin:
Your first need to enter the Bonmin-stable ThirdParty directory by typing: cd Bonminstable/ThirdParty
Then follow the instructions below: cd ./Blas
./get.Blas
cd ../Lapack
./get.Lapack
cd ../ASL
./get.ASL
cd ../HSL
Follow the instructions found in INTALL.HSL in order to download files ma27ad.f and
mc19ad.f
Now, you are ready to run the configure script.
enter: cd ../../ to return to the Bonmin-stable root directory.
Create a build directory by typing: mkdir build
Enter this directory in order to perform the compilation: cd build
If you need to use cplex as a MIP solver run the following:
../configure –with-cplex-lib=“-L/usr/your ilog directory/cplex version/lib
/your machine description/static pic -lcplex -lpthread -lm”
–with-cplex-incdir=“/usr/your ilog directory/cplex version/include/ilcplex”
For example, you can enter:
../configure –with-cplex-lib=“-L/usr/ilog/cplex121/lib/x86 debian4.0 4.1/static pic
-lcplex -lpthread -lm” –with-cplex-incdir=“/usr/ilog/cplex121/include/ilcplex”
If cplex is not needed just enter: ../configure
The second step is to launch the make script as following: make -j5 (the j5 forces ’make’ to
use 5 processors on a multi-core machine).
Finally, enter make install to finish the installation.
1
•
Install Sepa:
Sepa is the Outer-Inner approximation algorithm implemented in Bonmin. It is found in
Bonmin-stable/build/Bonmin/experimental/Separable/
You need to enter cd Bonmin-stable/build/Bonmin/experimental/Separable/ and
compile the sepa executable by entering : make
•
Bonmin Usage:
Bonmin contains many options allowing to parametrize your resolution scheme. A “bonmin.opt” file placed in your current directory is sufficient to fix your options. For examples
of bonmin.opt files refer to the project website.
To run bonmin with a “test.nl” file enter: Bonmin-stable/build/bin/bonmin test.nl
•
Sepa Usage:
The user can fix four new options in the Sepa algorithm:
number approximations initial outer 0-300 this option sets the number of linearization
points for the initial approximation set.
heuristic inner approximation yes/no if set to “yes” this option activates the Inner approximation algorithm in order to find a first feasible solution.
number inner approximation points this option sets the number of linearization points
for the inner approximation.
inner time limit this option sets the time limit for the inner approximation.
•
Bonmin useful options:
oa decomposition.allowable fraction gap 0-1 Allows to fix the optimality relative gap
for stopping the MIP solver at each iteration.
An important option in Bonmin is the overall optimality gap guarantee:
allowable fraction gap Specify the value of relative gap under which the algorithm stops.
Stop the search when the gap between the objective value of the best known solution and the
best bound on the objective of any solution is less than this fraction of the absolute value
of the best known solution value. The valid range for this real option is −1020 ≤ allowable fraction gap ≤ 1020 and its default value is 0.
To run Sepa with a “test.nl” file enter:
Bonmin-stable/build/Bonmin/experimental/Separable/sepa test.nl
•
AMPL and perspective cuts generation:
If you have an AMPL licence (http://www.ampl.com) you can use Sepa as your main solver
by setting the following option in AMPL:
option solver ’#BonminP ath#/Bonmin-stable/build/Bonmin/experimental/Separable/sepa’;
2
Where #BonminP ath# must be replaced by the absolute path containing your Bonmin installation.
Perspective cuts Sepa can also handle perspective cut generation in an automatic manner. Indeed, when using AMPL, you may strengthen your models if they contain on/off
constraints by using Sepa and the ”suffix” feature implemented in AMPL. For a detailed
description about on/off constraints and perspective formulations refer to [1, 2, 3]. Sepa can
easily handle perspective cuts generation if you add the following information in your .mod
file:
suffix onoff c IN, integer;
suffix onoff v IN, integer;
let{i in 1..m, j in 1..n} yourConst[i, j].onoff c := i;
let{i in 1..m} yourVar[i].onoff v := i;
Where ”yourConst” must be replaced by the name of your on/off constraints and ”yourVar”
by the name of the corresponding on/off indicator variable.
References
[1] O. Günlük and J. Linderoth. Perspective relaxation of mixed integer nonlinear programs with
indicator variables. Lecture Notes in Computer Science, 5035:1–16, 2008.
[2] O. Günlük and J. Linderoth. Perspective relaxation of mixed-integer nonlinear programs with
indicator variables. 124:183–205, 2010.
[3] H. Hijazi, P. Bonami, G. Cornuejols, and A. Ouorou.
Mixed-integer nonlinear
programs featuring on/off constraints.
Computational Optimization and Applications,
http://dx.doi.org/10.1007/s10589-011-9424-0:1–22, 2011.
3
Download