Professional Documents
Culture Documents
Simulation, Optimization and Design of Chemical Processes
Simulation, Optimization and Design of Chemical Processes
MILP, MINLP
(Mixed Integer (Non) Linear Programming) .
José A. Caballero
Esta obra está bajo una licencia Reconocimiento-No comercial-Sin obras derivadas 3.0 España de Creative Commons. Para ver una copia de esta licencia, visite
http://creativecommons.org/licenses/by-nc-nd/3.0/es/ o envie una carta a Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
Citar como: J.A. Caballero Suárez, material docente para la asignatura Simulación y Optimización de procesos Químicos, Octubre 2009. Universidad de Alicante.
Discrete optimization
II. Convexification
Cutting Plane (Gomory 1958; Crowder y col, 1983; Balas y col. 1993)
The key idea: iteratively refine a feasible set or objective function by means of
linear inequalities, termed cuts. Then, the current non-integer solution is no longer
feasible to the relaxed LP.
Branch and Bound (B&B) is the most commonly used tool for solving MILP.
Combination of both methods: BRANCH AND CUT, which involves running a branch and
bound algorithm and using cutting planes to tighten the linear programming relaxation.
Simulación y Optimización de Procesos Químicos. José A. Caballero
Esta obra está bajo una licencia Reconocimiento-No comercial-Sin obras derivadas 3.0 España de Creative Commons. Para ver una copia de esta licencia, visite
http://creativecommons.org/licenses/by-nc-nd/3.0/es/ o envie una carta a Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
Citar como: J.A. Caballero Suárez, material docente para la asignatura Simulación y Optimización de procesos Químicos, Octubre 2009. Universidad de Alicante.
What does not usually work for solving a MINLP ?…
Exhaustive search (or brute-force search) works only for small-scale problems
The main disadvantage of the brute-force method is that, for many real-world problems, the
number of natural candidates is prohibitively large:
5 binary variables 25 = 32 candidates
10 binary variables 210 = 1024 candidates
50 binary variables 250 > 1015 candidates
100 binary variables 2100 > 1030 candidates
1000 binary variables 21000 > 103000 candidates
Combinatorial explosion
1040
1030
Time scale 4 ×1023 Microseconds from the Big Bang to present
(Microseconds) 1020 (The age of the universe is 13700 million years)
Optimum
for the
relaxed
problem
0
0 1 y1
Rounded solution
INFEASIBLE
Optimum Optimum
for the for the
relaxed relaxed
problem problem
0
0 1 y1
Rounded solution Rounded solution:
feasible but…
INFEASIBLE ¡SUB-OPTIMAL !
Optimal solution: =
y1 1;=
y2 0;=
Z 1
Example: maximize = z 8x + 5 y
subject to x + y ≤ 6 Original MILP problem
9 x + 5 y ≤ 45
x, y ∈ N maximize = z 8x + 5 y
subject to x + y ≤ 6
9 x + 5 y ≤ 45
x, y ∈ℜ≥ 0
Solution of the relaxed problem
z =41.25, x=3.76, y = 2.25
Example: maximize = z 8x + 5 y
subject to x + y ≤ 6
9 x + 5 y ≤ 45
x ≤ floor (15 / 4) =
3
x, y ∈ℜ≥ 0
Example: maximize = z 8x + 5 y
subject to x + y ≤ 6
9 x + 5 y ≤ 45
x ≥ ceiling (15 / 4) =
4
x, y ∈ℜ≥ 0
Example:
maximize = z 8x + 5 y
subject to x + y ≤ 6
9 x + 5 y ≤ 45
x ≥ 4, y ≥ 2
x, y ∈ℜ≥ 0
INFEASIBLE
Example:
maximize = z 8x + 5 y
subject to x + y ≤ 6
9 x + 5 y ≤ 45
x ≥ 4, y ≤ 1
x, y ∈ℜ≥ 0
Solution of the relaxed problem
z = 40.56, x=4.44, y = 1
Example:
maximize = z 8x + 5 y
subject to x + y ≤ 6
9 x + 5 y ≤ 45
x ≥ 4, y ≤ 1, x ≥ 5
x, y ∈ℜ≥ 0 Solution of the relaxed problem
z = 40, x= 5, y = 0
INTEGER SOLUTION
Example:
maximize =
z 8x + 5 y
subject to x + y ≤ 6
9 x + 5 y ≤ 45
x ≥ 4, y ≤ 1, x ≤ 4
x, y ∈ℜ≥ 0 Solution of the relaxed problem
z = 37, x=4, y = 1
INTEGER SOLUTION
Unfeasible
Best solution
Node l
y3= 1 y 3= 1 y3= 1 y 3= 1
Node l
y3= 0 y3= 0 y3= 0 y3= 0
Node k
min Z cT x aT y
Consider that node k is a child from node l
s.a. Ax By b 0
m
1.- If LPl is INFEASIBLE then LPk is INFEASIBLE x 0, x n , y 0,1
k
Rules to stop The LP solved at node k is infeasible.
branching a node The solution to the LP gives a lower bound
higher than the current upper bound.
2.- Breadth first search (backtracking): Expand the branch with the
best value of the objective function. (all the child nodes are placed in
the queue for later processing if they are promising).
Example 1 MILP
(Depth First search, DFS) z=9 min z = x + y1 + 3 y2 + 2 y3
y2=1 9 s. a. − x + 3 y1 + 2 y2 + y3 ≤ 0
z=6.5 [1,1,0] − 5 y1 − 8 y2 − 3 y3 ≤ − 9
3 x ≥ 0; y1, y2 , y3 = 0,1
y1=1 y2=0
[1, 0.5, 0] no factible
8 z=8
z =5.8 y2=1 7 optimum
z=6.75
1 [0, 1, 1]
y3=1 5
[0.2, 1, 0]
z=6
y1=0 [0, 0.75, 1]
2 y2=0 6 no factible
[0, 1, 0.333]
y3=0 4 no factible
Example 1 MILP
(Breadth First Search, BFS) z=9 min z = x + y1 + 3 y2 + 2 y3
y2=1 7 s. a. − x + 3 y1 + 2 y2 + y3 ≤ 0
z=6.5 [1,1,0] − 5 y1 − 8 y2 − 3 y3 ≤ − 9
3 x ≥ 0; y1, y2 , y3 = 0,1
y1=1 y2=0
[1, 0.5, 0] infeasible
7 z=8
z =5.8 y2=1 9 optimum
z=6.75
1 [0, 1, 1]
y3=1 5
[0.2, 1, 0]
z=6
y1=0 [0, 0.75, 1]
2 y2=0 8 infeasible
[0, 1, 0.333]
y3=0 4 infeasible
6
z =4.08
4 [infeasible]
Algorithms
Branch and Bound
min : f (x , y ) Ravindran y Gupta 1985; Leyffer y Fletcher 2001
x ,y Branch and Cut: Stuubs y Mehrota 1999
s. t h(x , y ) 0 Generalized Benderss Decomposition
g(x , y ) 0 Geofrion, 1972
NLP
k
min : Z LB = f ( x, y )
s.a g j ( x, y ) ≤ 0
Set with the indexes
x∈ X , 0 ≤ y ≤ 1 of the binary variables
NLP NLP that are fixed to 0 at
yi ≤ 0 i ∈ I FL
k
iteration k
yi ≥ 1 i ∈ I FU
k Set with the indexes
NLP NLP of the binary variables
that are fixed to 1 at
iteration k
s. t g j ( x, y ) ≤ 0
min : ZUk = f ( x, y k )
x∈ X , 0 ≤ y ≤ 1 (NLP-R) x (NLP-1)
yi ≤ 0 i ∈ I FL
k s.a g j ( x, y k ) ≤ 0
yi ≥ 1 i ∈ I FU
k x∈ X
M-MILP
min : Z Lk = α
x − x
k
Set of iterations
s.a. α ≥ f ( x k , y k ) + ∇f ( x k , y k )T
y − y
k
k = 1,..., K
k T x−x
k
g j ( x , y ) + ∇g j ( x , y )
k k k
≤ 0 j ∈ J
1st-order approximations of y − y k
the inequality constraints Set of inequality constraints
Notes:
x2
x2
x1 x2 x
No
z Lk > zU*
Yes
End zU* records the best upper bound
zU* := min( zU1 , zU2 , , zUk )
Simulación y Optimización de Procesos Químicos. José A. Caballero
Esta obra está bajo una licencia Reconocimiento-No comercial-Sin obras derivadas 3.0 España de Creative Commons. Para ver una copia de esta licencia, visite
http://creativecommons.org/licenses/by-nc-nd/3.0/es/ o envie una carta a Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
Citar como: J.A. Caballero Suárez, material docente para la asignatura Simulación y Optimización de procesos Químicos, Octubre 2009. Universidad de Alicante.
Mixed Integer Nonlinear Programming (MINLP)
min : Z Lk = α
x − xk
s.t . α ≥ f ( x , y ) + ∇f ( x , y )
k k k
k T
y − y
k
x − x k
g j ( x k , y k ) + ∇g j ( x k , y k )T ≤0 j ∈ J k =1....K
y − y
k
x − x k
sign(λi ) ∇hi ( x k , y k )T ≤ 0 i ∈I
y − y
k
The equality is relaxed to an inequality using the sign of the Lagrange multiplier
B1
A2 B2
Process II
A B C
Process I
A3 B3
Process III
mi n : ∑ Costs - Revenue
= 13C − 1.8 A − 7 B1
Revenue
YI
Cost
= + ¬YI
I 3.5 2C ∨ Cost = 0
C = 0.9 B I
C= B= 0
0 ≤ C ≤ 1
YII
Cost= 1.0 + 1.0 B ¬Y
II 2
II
=B2 Ln (1 + A2 ) ∨ Cost II = 0
1 B= 2 A=
2 0
0 ≤ B2 ≤ 0.9
YIII
¬Y
C ost III = 1. 5 + 1.2 B3 III
MILP MODEL:
mi n : (3.5 y1 + 2C ) + ( y2 + B2 ) + (1.5 y3 + B3 ) − 13C + 1.8 A + 7 B1 =
− 11C + 7 B1 + B2 + 1.2 B3 + 1.8 A + 3.5 y1 + y2 + 1.5 y3
A − ( A2 + A3 ) =
0
mass balances linear
B − ( B1 + B2 + B3 ) =
0
B2 − Ln (1 + A2 ) = 0
Non linear
B3 − 1.2 Ln (1 + A3 ) = 0
C − 0.9 B = 0
C − 1 y1 ≤ 0
1
B2 − y2 ≤ 0 Linear cosntraints
0.9
1
B3 − y3 ≤ 0
0.9
y 2 + y3 ≤ 1 logical : linear
A, B, C , A1 , A2 , B1 , B2 , B3 ≥ 0
y1 , y2 , y3 ∈ {0,1}
A − ( A2 + A3 ) =
0
mass balances linear
B − ( B1 + B2 + B3 ) =
0
B2 − Ln (1 + A2 ) = 0
Non linear
B3 − 1.2 Ln (1 + A3 ) = 0
C − 0.9 B = 0
C − 1y1 ≤ 0
1
B2 − y2 ≤ 0 Linear cosntraints
0.9
1
B3 − y3 ≤ 0
0.9
y 2 + y3 ≤ 1 logical : linear
A, B, C , A1 , A2 , B1 , B2 , B3 ≥ 0
0 ≤ y1 ≤ 1
0 ≤ y2 ≤ 1
0 ≤ y3 ≤ 1
NLP-R: Results
Lagrange Multipliers
(opposite sign to the criterion we
follow in class)
Iter. 1
mi n : − 11C + 7 B1 + B2 + 1.2 B3 + 1.8 A + 3.5 y1 + y2 + 1.5 y3
MASTER:
A − ( A2 + A3 ) =
0
mass balances linear
B − ( B1 + B2 + B3 ) =
0
1
sign(3.074) B2 − Ln (1 + 0.708 ) − ( A2 − 0.708) ≤ 0
1 + 0.708
Linearizations
( A3 − 0.616) ≤ 0
1.2
sign(2.424) B3 − 1.2 Ln (1 + 0.616 ) −
1 + 0.616
C − 0.9 B = 0
C − 1y1 ≤ 0
1
B2 − y2 ≤ 0 Linear cosntraints
0.9
1
B3 − y3 ≤ 0
0.9
y 2 + y3 ≤ 1 logical : linear
A, B, C , A1 , A2 , B1 , B2 , B3 ≥ 0
y1, y 2, y3 ∈ {0, 1}
Lower bound
A − ( A2 + A3 ) =
0
mass balances linear
B − ( B1 + B2 + B3 ) =
0
B2 − Ln (1 + A2 ) = 0
Non linear
B3 − 1.2 Ln (1 + A3 ) = 0
C − 0.9 B = 0
C − 1 ≤ 0
1 Linear cosntraints
B2 − ≤ 0
0.9
B3 ≤ 0
A, B, C , A1 , A2 , B1 , B2 , B3 ≥ 0
Upper bound
λ1 = 5.468
λ2 = 1.500
A − ( A2 + A3 ) =
0
mass balances linear
B − ( B1 + B2 + B3 ) =
0
B2 − Ln (1 + A2 ) = 0
Non linear
B3 − 1.2 Ln (1 + A3 ) = 0
C − 0.9 B = 0
C − 1 ≤ 0
B2 ≤ 0 Linear cosntraints
1
B3 − ≤ 0
0.9
A, B, C , A1 , A2 , B1 , B2 , B3 ≥ 0
( A3 − 1.524) ≤ 0
1.2
sign(3.786) B3 − 1.2 Ln (1 + 1.524 ) −
1 + 1.524
C − 0.9 B = 0
C − 1 y1 ≤ 0
1
B2 − y2 ≤ 0 Linear cosntraints
0.9
1
B3 − y3 ≤ 0
0.9
y2 + y3 ≤ 1 logical : linear
y1 + y2 − y3 ≤ 1: BINARY CUT
y1 + y3 − y2 ≤ 1: BINARY CUT
A, B, C , A1 , A2 , B1 , B2 , B3 ≥ 0; y1, y 2, y3 ∈ {0, 1}
= =
A 1.524; A3 1.524;
= =
B 1.111; B3 1.111;
Best Lower Bound = 0 C = 1.000
Best Upper Bound = -1,923 Optimal solution A=2 B= 1 B=2 0
=
y1 =1; y2 0=
; y3 1
F .O = − 1.923