Vous êtes sur la page 1sur 47

Syst`emes daide `a la decision

Integer Programming, Solving techniques

M2 GSI, 2011-2012
Ayse AKBALIK & Christophe RAPINE

1
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Plan

1 Combinatorial explosion

2 Good formulations by the theory

3 Good formulations by the practice

4 Relaxation lineaire

5 Branch & Bound

2
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Combinatorial explosion

Combinatorial optimization problems : the optimal solution is some


subset of a finite set. An exhaustive enumeration can solve those
problems... but...
Assignment problem : ? solutions.
Knapsack and covering problems : ? solutions.
TSP : ? solutions.

3
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Combinatorial explosion

n log (n) n2 2n n!
10 3.32 102 1.02 103 3.6 106
100 6.64 104 1.27 1030 9.33 10157
1000 9.97 106 1.07 10301 4.02 102567

i.e. TSP with n=101 has approximately 9.33 10157 tours to try one
by one...so funny...

4
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

What to do ?

Some problems seem very difficult to solve... in fact they are easy...
such as Assignment.

Some problems seem very difficult to solve... in fact they are


difficult... Theory of NP-completeness.

5
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Integer programming point of view

Formulation
Extended reformulations
Valid and strong valid inequalities to tighten the feasible region
Resolution
B & Bound, B & Cut, B & Price
Relaxations, decomposition techniques, heuristics, etc.
Use of mathematical properties of easy problems

6
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Plan

1 Combinatorial explosion

2 Good formulations by the theory

3 Good formulations by the practice

4 Relaxation lineaire

5 Branch & Bound

7
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Set X

X={(2,2), (2,3), (2,4), (3,1), (3,2), (3,3), (3,4), (4,1), (4,2),


(4,3), (4,4), (5,2), (5,3), (5,4)}

Imagine that X represents all feasible solutions for our problem.

8
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Different formulations for X

For the given set X={(2,2), (2,3), (2,4), (3,1), (3,2), (3,3), (3,4),
(4,1), (4,2), (4,3), (4,4), (5,2), (5,3), (5,4)}, we show 3 different
formulations.

Is there any other formulation for this set ?

9
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Good and bad formulations

Observation, Pochet and Wolsey (2006)


The number of branch-and-bound nodes needed to solve a MIP
depends heavily on the formulation used. It is therefore crucial to
identify a good formulation.

There are an infinity number of formulations for a problem.

10
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Good and bad formulations

Definition
Given a set X Rn and two formulations P1 and P2 for X , P1 is a
better formulation than P2 if P1 P2 .

11
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Polyhedra and formulation

Definition
A subset of Rn described by a finite set of linear constraints
P = {x Rn : Ax b} is a polyhedron.

Definition
A polyhedron P Rn is a formulation for a set X Zn if and only
if X = P (Zn ).

Keep in mind : A formulation is a region in the space which


contains exactly X as integer points. This region is defined by
linear inequalities.

12
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Convex hull

Definition
Minimal convex set containing X.

conv (X ) has the property that X conv (X ) P for all


formulations P.

13
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Some propositions

Proposition 1.
conv (X ) is a polyhedron.

Proposition 2.
The extreme points of conv (X ) all lie in X .

14
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Consequence

max{cx | x X } = max{cy | y conv (X )}

At left hand a combinatorial optimization problem (discrete),


hard to solve.
At right hand a linear, continuous problem, easy to solve.

15
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Consequence

max{cx | x X } = max{cy | y conv (X )}

At left hand a combinatorial optimization problem (discrete),


hard to solve.
At right hand a linear, continuous problem, easy to solve.

The polyhedral description of the convex hull is not so easy to


find... This description may sometimes involve an exponential
number of variables.

16
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Plan

1 Combinatorial explosion

2 Good formulations by the theory

3 Good formulations by the practice

4 Relaxation lineaire

5 Branch & Bound

17
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Uncapacitated lot sizing problem

Demand dt over T period


Setup cost of production ft
Unit production cost pt
Unit inventory holding cost ht at
the beginning of t (per unit per
period)
s0 = 0 and sT +1 = 0 is assumed
What is the best production
planning which minimizes the total
cost ?

18
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Aggregated model (AGG)

variables xt = production quantity in period t


yt = 1 if xt > 0, 0 else
st = storage quantity at the beginning of t

X
min (ft yt + pt xt + ht st )
t

xt + st = dt + st+1 t = 1, . . . , T 1
xT + sT = dT
xt T
P
i=t di yt t = 1, . . . , T
s, x R+T y {0, 1}T

19
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Example

T =8
p = 100
f = 5000
h=5
d = (400, 400, 800, 800, 1200, 1200, 1200, 1200)
s1 = 200
Formulation with O(T ) variables and O(T ) constraints.

20
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Example

Formulation AGG Dimension O(T )O(T )


LP Value 712 193 OPT 736 000
Nmb Variables 24 Time '0
Nmb Constraints 16 Nmb Nodes 35

21
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Multi-Commodity formulation (MC)

x 1t x 2t x 3t x 4t x 5t

s1t s2t s3t s4t


i=1 i=2 i=3 i=4 i=5=t

dt

22
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Multi-Commodity formulation (MC)

T X
X T T
X
min (pi xit + hi sit ) + qi y i
i=1 t=i i=1
st
si1,t + xit = si,t (1 it ) + dt it ; 1 i t T
xit dt yi ; 1 i t T
xit , sit R+ ; 1 i t T , y {0, 1}T

A parameter which can be computed outside the model :

it = 1 if i = t, 0 otherwise.

23
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Example

T =8
p = 100
q = 5000
h=5
d = (400, 400, 800, 800, 1200, 1200, 1200, 1200)
s1 = 200
Formulation with O(T 2 ) variables and O(T 2 ) constraints.

24
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Example

Formulation MC Dimension O(T 2 )O(T 2 )


Valeur LP 736 000 OPT 736 000
Nmb Variables 80 Time '0
Nmb Constraints 71 Nmb Nodes 1

25
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Efficiency of MC for ULS

Theorem
The linear relaxation of MC formulation always has an optimal
solution with y integer and solves uncapacitated lot sizing (ULS).
MC is thus an extended formulation of the convex hull of feasible
solutions to ULS.

26
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Small inconveniences of the formulation MC

MC gives the optimal integer solution at the top node for


ULS, but, has O(T 2 ) variables and O(T 2 ) constraints.
For 30 periods, we have a thousand of variables and a
thousand of constraints...

27
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Plan

1 Combinatorial explosion

2 Good formulations by the theory

3 Good formulations by the practice

4 Relaxation lineaire

5 Branch & Bound

28
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Formulation

Probl`eme combinatoire `a resoudre

max{cx | x X } avec X Zn

Une modelisation du probl`eme en PLNE


definit un poly`edre P = {x Rn | Ax b}

Definition
Un PLNE est une formulation de X ssi X = P Zn

29
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Illustration graphique

30
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Illustration graphique

31
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Relaxation Lineaire

Pour resoudre un PLNE


une idee simple est doublier que les variables sont enti`eres
on recherche alors loptimum du PL sur le poly`edre P
on peut utiliser lalgorithme du simplexe

Definition
La relaxation lineaire dune formulation en PLNE est le PL

max{cx | Ax b x Rn }

Lien entre loptimum du PL et loptimum du PLNE ?

32
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Illustration graphique de la relaxation

33
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Propriete de la relaxation lineaire

Pour une formulation en PLNE



zIP = max{cx | Ax b , x Zn }

La relaxation lineaire

zL = max{cx | Ax b , x Rn }

verifie
1 z . La relaxation est une Borne sup
zIP erieure
L
2 Si la solution optimale de la relaxation lineaire est enti`ere,
alors cest aussi une solution optimale pour le PLNE
Et pour un probl`eme de minimisation ?

34
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Plan

1 Combinatorial explosion

2 Good formulations by the theory

3 Good formulations by the practice

4 Relaxation lineaire

5 Branch & Bound

35
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Principe du Branch & Bound

Si z1 > z2
Alors il est inutile dexplorer le sous-ensemble X2
X2 ne contient pas de solution optimale.

X1 X2

z*1 > z*2

36
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Borne superieure

Comment determiner quil est inutile dexplorer X2 sans


calculer z2 ?
Estimation [par exc`es] de la valeur optimale

Definition
Une fonction des instances dans R est une borne superieure ssi elle
est superieure `a la valeur optimum pour chaque instance.

Pour un PLNE, une borne superieure est donnee par


la relaxation lineaire

37
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Enum
eration arborescente implicite

Pour resoudre z = max{cx | x X }


On decoupe lensemble des solutions X
Sur chaque Y X , on calcule une borne superieure B(Y ) de
loptimum z (Y ).
Si B(Y ) `a la meilleure solution trouvee, alors on elague Y
Sinon on decoupe recursivement Y

38
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Comment decouper lespace des solutions ?

On resoud la relaxation lineaire du probl`eme sur X `a loptimum


Si la solution x est enti`ere, on a trouve loptimum sur X
Sinon pour une variable (au moins) on a a < xi < a + 1


P







Dcoupage x*
du problme
X

39
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Branchement sur une variable fractionnaire

On partitionne X en deux nouveaux sous-probl`emes :


X1 = x X et xi a
X2 = x X et a + 1 xi



P1







x*

P2

40
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Exploration de lensemble X2 de solutions

On recherche la meilleure solution sur X2 :


On resoud la relaxation lineaire sur P2
On partitionne en 2 nouveaux sous-probl`emes


















P1





































P3 P4
X
P2

41
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Exploration de lensemble X1 de solutions

On a trouve la solution optimale sur X2


Existe-t-il une meilleure solution sur X1 ?
La borne superieure ne nous permet pas delaguer X1


P1







P3 P4
X

42
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Exploration de lensemble X2 de solutions

On recherche la meilleure solution sur X2 :


On partitionne en 2 nouveaux sous-probl`emes

P5 P6






















































P3 P4
X

43
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Fin du Branch & Bound

La solution optimale sur X est la meilleure des 2 solutions


optimales trouvees sur X1 et X2 .

P5 P6










P3 P4
X

44
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Branch & Bound


1 resoudre la relaxation lineaire
2 brancher sur une variable non enti`ere (`a choisir)
2 sous probl`emes
3 diviser `a nouveau un nud fils en deux (6= choix possibles)
4 continuer `a separer sur les nuds dont la valeur est > `a la
meilleure solution courante jusqu`a ce quil ny ait plus de
branchement possible
On coupe une branche si
la relaxation lineaire na pas de solution
la relaxation lineaire donne une solution enti`ere
la valeur de la borne superieure est inferieure `a la valeur de la
meilleure solution enti`ere obtenue

45
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Branch & Bound, [N. Brauner]

z = max 2x1 + 3x2


sc.

5x1 + 7x2 35
4x1 + 9x2 36
x1 , x2 0 entiers

46
Combinatorial explosion Good formulations in theory Good formulations in practice Relaxation lin
eaire Branch & Bound

Application on a minimization problem

[O. Briant, 2010].

UB = + infini
LB = 108.5
solution fractionnaire

UB = UB =
LB = 110.3 LB = 115.7
solution fractionnaire solution fractionnaire

UB = UB = UB = UB =
LB = 118.5 LB = 115.7 LB = 122 LB = 118
solution fractionnaire solution fractionnaire solution fractionnaire solution fractionnaire

UB = UB = UB = UB =
LB = LB = 120 LB = 119 LB =
polyedre vide solution entire solution fractionnaire polyedre vide

47

Vous aimerez peut-être aussi