Chen CL
1
Process Synthesis Floudas: Nonlinea Nonlinearr and Mixed-Integer Optimization Chapter 7
Process Synthesis
Given the specifications of the inputs (e.g., feed streams) that may corresponds to raw materia materials, ls, and the specificat specification ionss of the outputs outputs (e. (e.g., g., pr produc oducts, ts, by by-products) in a process system
Develop systematically process flowsheet(s) that transform the available raw materials into the desired products and which meet the specified performance criteria of Maximum profit or minimum cost Energy efficiency ☞ Good operability with respect to ✏ Flexibility ✏ Controllability ✏ Reliability ✏ Safety ✏ Environmental regulations ☞
Cheng-Liang Chen
☞
PSE
LABORATORY
Department of Chemical Engineering National TAIWAN University
Chen CL
2
An Overall Process System
Chen CL
3
The Chemical Plant
Chen CL
4
Chen CL
Key Questions
5
Trade-offs in Process Synthesis
Q1: Which process units should be used in the process flowsheet ? Q2: How should the process units be interconnected ? Q3: What are the optimal operating conditions and sizes of the selected process units ?
⇒ Multi-objective mixed discrete-continuous optimization problem
Chen CL
6
Chen CL
7
Approaches in Process Synthesis
Difficulties/Challenges in Process Synthesis Q1: Combinatorial nature How can we deal with the large combinatorial problem effectively ?
➢
Heuristics and evolutionary search
➢
Targets, physical insights
Q2: Nonlinear (nonconvex) characteristics How can we cope with the highly nonlinear model w.r.t. the quality of its solution (local vs. global) ?
➢
Optimization
Chen CL
8
Chen CL
Optimization Approach in Process Synthesis ➢
9
Optimization Approach in Process Synthesis ➢
Step 1: Representation of Alternatives
Step 2: Mathematical Model
A superstructure is postulated in which ALL process alternatives
min f (x, y ) x,y
structures of interest are embedded and hence are candidates for
s.t. h(x, y) = 0
feasible or optimal process flowsheets
g (x, y ) ≤
0
x ∈ X ⊆ Rn y ∈ Y = {0, 1} ➢
Chen CL
10
(?)
Step 3: Algorithmic Development
Chen CL
11
Superstructure Modeling with 0 − 1 Variables
Superstructure Modeling with 0 − 1 Variables
Application: select among process units i ∈ P U
Application: select among process units i ∈ P U
Let yi =
1 if unit i is
selected
i ∈ P U
0 if unit i is NOT selected
Select one & only one unit ⇒
yi = 1
i∈P U
Select at most one unit
⇒
Suppose yi = 1 if unit i ∈ P U is selected, = 0 otherwise yj = 1 if unit j ∈ P U is selected, = 0 otherwise
Question:
If unit j is selected (yj = 1) then unit i should be selected too (yi = 1)
Others: not defined yi ≤ 1
⇒ yj − y i ≤ 0
(check it)
i∈P U
Select at least one unit
⇒
i∈P U
Derivation: yi = 1 ⇔ P i is true; yi ≥ 1
yj = 1 ⇔ P j is true
P j ⇒ P i ⇒ ¬P j ∨ P i (?)
⇒ (1 − yj ) + yi ≥ 1 (?) ⇒ y
y ≤0
Chen CL
12
Chen CL
13
Superstructure Modeling with 0 − 1 Variables
Superstructure Modeling with 0 − 1 Variables
Propositional Logic Expressions
Propositional Logic Expressions P i ≡ yi
denoted as ∨ denoted as ∧ denoted as ⊕ denoted as ¬
OR AND EXCLUSIVE OR NEGATION
⇒ yi
P 1 ⇒ P 2 is equivalent to ¬P 1 ∨ P 2
⇔ ¬P i ≡ 1 − yi 1 if clause P i is true = 0 if clause P i is false
Proposition
Mathematical Representation
1.
P 1 ∨ P 2 ∨ P 3
y1 + y2 + y3 ≥ 1 y1 ≥ 1
P 1
P 2
P 1 ∧ P 2
P 1 ∨ P 2
P 1 ⇒ P 2
¬P 1
¬P 1 ∨ P 2
P 1 ⊕ P 2
2.
P 1 ∧ P 2 ∧ P 3
1 1 0 0
1 0 1 0
1 0 0 0
1 1 1 0
1 0 1 1
0 0 1 1
1 0 1 1
0 1 1 0
3.
¬P 1 ∨ P 2 (P 1 ⇒ P 2) (¬P 1 ∨ P 2) ∧ (¬P 2 ∨ P 1) (P 1 ⇔ P 2) (P 1 if and only if P 2) P 1 ⊕ P 2 ⊕ P 3 (exactly one) (¬P 1 ∨ P 3) ∧ (¬P 2 ∨ P 3) (P 1 ∨ P 2 ⇒ P 3)
y3 ≥ 1
4. 5. 6.
Chen CL
➢
14
y1 − y2 ≤ 0 y2 − y1 ≤ 0
or y 1 = y 2
y1 + y2 + y3 = 1 y1 − y3 ≤ 0 y2 − y3 ≤ 0
Chen CL
15
Superstructure Modeling with 0 − 1 Variables
Procedure to Obtain a Conjunctive Normal Form
Procedure to Obtain a Conjunctive Normal Form Illustration
Step 1: Replace the implication by its equivalent disjunction ⇐⇒ ¬P 1 ∨ P 2
Step 2: Apply DeMorgan’s Theorem to put the negation inward ¬(P 1 ∧ P 2) ⇐⇒ ¬P 1 ∨ ¬P 2 ¬(P 1 ∨ P 2) ⇐⇒ ¬P 1 ∧ ¬P 2
➢
1 − y1 + y2 ≥ 1 (y1 − y2 ≤ 0)
Superstructure Modeling with 0 − 1 Variables
P 1 ⇒ P 2 ➢
y2 ≥ 1
Step 3: Distribute the logical OR over the logical AND recursively using the equivalent of (P 1 ∧ P 2) ∨ P 3 =⇒ (P 1 ∨ P 3) ∧ (P 2 ∨ P 3)
(P 1 ∧ P 2) ∨ P 3 ⇒ P 4 ∨ P 5 ⇓ ¬ [(P 1 ∧ P 2) ∨ P 3] ∨ (P 4 ∨ P 5) ⇓ [¬(P 1 ∧ P 2) ∧ ¬P 3] ∨ (P 4 ∨ P 5) [(¬P 1 ∨ ¬P 2) ∧ ¬P 3] ∨ (P 4 ∨ P 5) ⇓ [(¬P 1 ∨ ¬P 2) ∨ (P 4 ∨ P 5)] ∧ [¬P 3 ∨ (P 4 ∨ P 5)] [¬P 1 ∨ ¬P 2 ∨ P 4 ∨ P 5] ∧ [¬P 3 ∨ P 4 ∨ P 5] ⇓ y1 + y2 − y4 − y5 ≤ 1 1 − y1 + 1 − y2 + y4 + y5 ≥ 1 or ≥1 ≤0 1
Chen CL
16
Chen CL
17
Superstructure Modeling with Continuous and Linear 0 − 1 Variables
Superstructure Modeling with Continuous and Linear 0 − 1 Variables
Activation and Deactivation of Continuous Variables
Activation and Relaxation of Constraints If unit i does not exist (yi = 0), relax equality/inequality constraints If unit i exists (yi = 1), both equality/inequality constraints should be activated
F iLyi ≤ F i ≤ F iU yi
⇓ F i = 0
− h(x) + s+ = 0 1 − s1
for yi = 0
g (x) ≤ s2
F iL ≤ F i ≤ F iU for yi = 1
+ 1
s + s− ≤ U 1 · (1 − yi) 1 s2 ≤ U 2 · (1 − yi) + 1
−
s , s1 , s2 ≥ 0
Chen CL
18
Chen CL
19
Superstructure Modeling with Continuous and Linear 0 − 1 Variables
Superstructure Modeling with Continuous and Linear 0 − 1 Variables
Nodes with Several Inputs
Logical Constraints in Multiperiod Problems
m
Alternative 1:
If unit i is not selected (zi = 0), then yit = 0 for all periods of operation
F j − U yi ≤ 0
j =1
F j ≥ 0,
j = 1, m
T
Alternative 1: Alternative 2:
yit − T · zi ≤ 0
t=1
F j − U yi ≤ 0 F j ≥ 0,
j = 1, m
Alternative 2:
yit − zi ≤ 0 ∀i = 1, . . . , T
Chen CL
20
Chen CL
21
Superstructure Modeling with Continuous and Linear 0 − 1 Variables
Superstructure Modeling with Continuous and Linear 0 − 1 Variables
Either-Or Constraints
Constraint Functions in Logical Expressions
Either f 1(x) ≤ 0 or f 2(x) ≤ 0
If f (x) ≤ 0, then g (x) ≥ 0
⇓
⇓
f 1(x) − U (1 − y1) ≤ 0
P 1, f (x) ≤ 0 :
f 2(x) − U y1 ≤ 0
P 2, g (x) ≥ 0 : L2(1 − y2) ≤ g (x) ≤ U 2y2 −
⇓ y1 = 1
⇓P 1 ⇒ P 2 y1 = 0
or
f 1(x) ≤ 0 f 2(x) ≤ U
L1y1 + ≤ f (x) ≤ U 1(1 − y1)
¬P 1 ∨ P 2⇓
=⇒
1 − y1 + y2 ≥ 1 (y1 − y2 ≤ 0)
f 1(x) ≤ U
⇓
f 2(x) ≤ 0
y1 −
≤ 0
y2
L1y1 + ≤ f (x) ≤ U 1(1 − y1), L2(1 − y2) ≤ g (x) ≤ U 2y2 −
Chen CL
22
Chen CL
23
Superstructure Modeling with Continuous and Linear 0 − 1 Variables
Superstructure Modeling with Continuous and Linear 0 − 1 Variables
Constraint Functions in Logical Expressions
Constraint Functions in Logical Expressions
If f (x) ≤ 0 and h(x) = 0, then g (x) ≥ 0
P 1
P 2
φ(x) = max{0, f (x)} =
P 3
P 1 ∧ P 2 ⇒ P 3 → ¬(P 1 ∧ P 2) ∨ P 3 → ¬P 1 ∨ ¬P 2 ∨ P 3 ⇒ 1 − y1 + 1 − y2 + y3 ≥ 1 (y1 + y2 − y3 ≤ 1)
⇓
L1(1 − y1) ≤
L1y1 + ≤ f (x) ≤ U 1(1 − y1) L2(1 − y3) ≤ g (x) ≤ U 3y3 − − h(x) + s+ 1 − s1 = 0 − s+ 1 + s1 ≤ U 2 · (1 − y2 )
s+ s− ≥ 0
f (x) if f (x) ≥ 0
0
if f (x) < 0 ≤ U 1y1
f (x)
⇒ L2(1 − y1) ≤ φ(x) − f (x) ≤ U 2(1 − y1) L3y1 ≤
y1 + y2 − y3 ≤ 1
≤ U 3y1
φ(x)
φ(x) ≥ 0, ⇓ φ(x) − f (x) ≥ 0 ⇓ L1(1 − y1) ≤
f (x)
L2 = L 3 = 0
≤ U 1y1 −
0 ≤ φ(x) − f (x) ≤ U 2(1 − y1) 0 ≤
φ(x)
≤ U 3y1
Chen CL
24
Superstructure Modeling with Bilinear Products of Continuous and 0 − 1 Variables min
i
Let ⇒
Chen CL
L0(w ) ≤ x ≤ U 0(w ) when y = 0
xij yij
L1(w ) ≤ x ≤ U 1(w ) when y = 1
j
hij = xij yij
⇓
∀i, j
L0(w ) + [ L1(w ) − L0(w )]y ≤ x ≤ U 0(w) + [ U 1(w ) − U 0(w)]y (nonlinear product!)
⇓
xij − U (1 − yij ) ≤ hij ≤ xij − L(1 − yij )
L0 ≤ L0(w ) ≤ L0
Lyij ≤ hij ≤ U yij
U 0 ≤ U 0(w ) ≤ U 0 L1 ≤ L1(w ) ≤ L1
⇓ If yij = 1
25
Superstructure Modeling with Bilinear Products of Continuous and 0 − 1 Variables
U 1 ≤ U 1(w ) ≤ U 1
If yij = 0
L0(w ) + [ L1 − L0]y ≤ x ≤ U 0(w ) + [ U 1 − U 0]y
xij ≤ hij ≤ xij
xij − U ≤ hij ≤ xij − L
L1(w) + [ L0 − L1](1 − y) ≤ x ≤ U 1(w ) + [ U 0 − U 1](1 − y )
L ≤ hij ≤ U
0 ≤ hij ≤ 0
⇓ If y = 0 If y = 1 L0(w ) ≤ x ≤ U 0(w) L0(w ) + L1 − L0 ≤ x ≤ U 0(w ) + U 1 − U 0 L1(w ) + L0 − L1 ≤ x ≤ U 1(w) + U 0 − U 1 L1(w ) ≤ x ≤ U 1(w )
Chen CL
Modeling Nonlinearities of Continuous Variables
26
Chen CL
27
Modeling Nonlinearities of Continuous Variables Separable Concave Functions
y1 =
Separable Costs: C (x) = C 1(x) + C 2(x) + C 3(x) ⇓ A : [γ 1, C (γ 1)]; B : [γ 2, C (γ 2)]; C : [γ 3, C (γ 3)]; D : [γ 4, C (γ 4)]; ⇓ x = λ 1γ 1 + λ2γ 2 + λ3γ 3 + λ4γ 4 x = λ 2γ 2 + λ3γ 3 C (x) = λ 1C (γ 1) + λ2C (γ 2) C (x) = λ 2C (γ 2) + λ3C (γ 3) Ex: λ2 + λ3 = 1 + λ3C (γ 3) + λ4C (γ 4) λ1 + λ2 + λ3 + λ4 = 1 λ2, λ3 ≥ 0 λ1, λ2, λ3, λ4 ≥ 0 (λ1, λ4 = 0) ⇓ 1 if γ 1 ≤ x ≤ γ 2 1 if γ 2 ≤ x ≤ γ 3 1 if γ 3 ≤ x ≤ γ 4 y2 = y3 = 0 otherwise 0 otherwise 0 otherwise y1 + y2 + y3 = 1 λ1 ≤ y 1 , λ2 ≤ y1 + y2 λ3 ≤ y2 + y3, λ4 ≤ y3
Chen CL
28
Chen CL
29
Modeling Nonlinearities of Continuous Variables
Modeling Nonlinearities of Continuous Variables
Separable Concave Functions
Convexification of Nonlinear Fcn.s of Continuous Var.s
f (x) =
K +1
C (x) =
3 =⇒ segments
C (x) = λ 1C (γ 1) + · · · + λ4C (γ 4)
i=1
λiγ i
f (z ) =
K +1
λ 1 ≤ y1
=⇒
λ3 ≤ y2 + y3
segments
λ 4 ≤ y3 y1 + y2 + y3 = 1 λ1, λ2, λ3, λ4 ≥ 0 y1, y2, y3 ∈ {0, 1}3
α
cj Πixi i =
j
λi = 1
K
λ2 ≤ y1 + y2
cj ≥ 0, xi ≥ 0
zi = ln xi ⇓ xi = e zi
i=1
λ1 + λ2 + λ3 + λ4 = 1
α
cj Πixi i ,
j
K +1
x =
x = λ 1γ 1 + · · · + λ4γ 4
λiC (γ i )
λ 1 ≤ y1
cj Πieαizi =
j
w, ew : convex
i=1
⇒
cj ew
j
f (z ) : convex
λi ≤ yi−1 + yi , i = 2, . . . , K λK +1 ≤ yK K
yi = 1
i=1
λi ≥ 0,
∀i
yi ∈ {0, 1}K
Chen CL
30
Chen CL
31
Modeling Nonlinearities of Continuous Variables
Modeling Nonlinearities of Continuous Variables
Convexification: Illustration
Convexification: Illustration
f (x1, x2, x3) = x 1x2 + x01.6 + xx1 3
z1 = ln x1 ⇓ z2 = ln x2 ⇓ z3 = ln x3 f (z1, z2, z3) = ez1 ez2 + e0.6z1 + ez1−z3
= ez1+z2 + e0.6z1 + ez1−z3 (convex in z1, z2, z3)
f (x1, x2, x3, x4) = x 1x2 − x3x4 z1 = ln x1, z2 = ln x2,
⇓ z3 = ln x3, z4 = ln x4
f (z1, z2, z3, z4) = ez1+z2 − ez3+z4
difference of two convex fcn.s ⇒ non-convex
Chen CL
32
Modeling Nonlinearities of Continuous Variables
Chen CL
33
Modeling Nonlinearities of Continuous Variables
Partitions (1) f =
⇓
Partitions (2)
f 1 for x ≤ a f =
f 2 for x > a
⇓
f = f 1y + f 2(1 − y )
f 1 for x ≤ a f 2 for a < x ≤ b f 3 for x > b
f = f 1y1 + f 2y2 + f 3y3
a(1 − y ) − U y + ≤ x ≤ ay + U (1 − y )
y1 + y2 + y3 = 1
y = 0, 1
a(1 − y1) − U y1 + ≤ x ≤ ay1 + U (1 − y1) ay2 − U (1 − y2) + ≤ x ≤ by2 + U (1 − y2) by3 − U (1 − y3) + ≤ x ≤ b(1 − y3) + U y3 y1, y2, y3 = 0, 1
Chen CL
34
Thank You for Your Attention Questions Are Welcome