Floudas: Floudas: Nonlinea Nonlinearr and Mixed-Integ Mixed-Integer er Optimizati Optimization on Chapter 7
Process Synthesis
Cheng-Liang Chen
PSE
LABORATORY
Department of Chemical Engineering National TAIWAN University
Chen CL
1
Process Synthesis
Given the specifications of the inputs (e.g., feed streams) that may corresponds to raw raw mate materia rials ls,, and and the the specifi specifica cati tion onss of the the outp output utss (e.g (e.g., ., produc roducts ts,, byproducts) 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
Chen CL
1
Process Synthesis
Given the specifications of the inputs (e.g., feed streams) that may corresponds to raw raw mate materia rials ls,, and and the the specifi specifica cati tion onss of the the outp output utss (e.g (e.g., ., produc roducts ts,, byproducts) 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
Chen CL
2
An Overall Process System
Chen CL
3
The Chemical Plant
Chen CL
4
Key Questions
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
5
Trade-offs in Process Synthesis
Chen CL
6
Difficulties/Challenges in Process Synthesis
Q1: Combinatorial nature ⇒ How can we deal with the large combinatorial problem effectively ?
Q2: Nonlinear (nonconvex) characteristics ⇒ How can we cope with the highly nonlinear model w.r.t. the quality of its solution (i.e., local vs. global) ?
Chen CL
7
Approaches in Process Synthesis
Heuristics and evolutionary search
Targets, physical insights
Optimization
Chen CL
8
Optimization Approach in Process Synthesis
Step 1: Representation of Alternatives A superstructure is postulated in which all process aternatives structures of interest are embedded and hence are candidates for feasible or optimal process flowsheets
Chen CL
9
Step 2: Mathematical Model min f (x, y ) x,y
s.t. h(x, y ) = 0 g (x, y ) ≤
0
x ∈ X ⊆ Rn y ∈ Y = {0, 1}
(?)
Step 3: Algorithmic Development
Chen CL
10
Mathematical Model of Superstructure Modeling with 0 − 1 Variables Only
Propositional Logic Expressions: OR AND EXCLUSIVE OR NEGATION
denoted as ∨ denoted as ∧ denoted as ⊕ denoted as ¬
P 1 ⇒ P 2 is equivalent to ¬P 1 ∨ P 2 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
1
1
1
1
1
0
1
0
1 0
0 1
0 0
1 1
0 1
0 1
0 1
1 1
0
0
0
0
1
1
1
0
Chen CL
11
P i ≡ yi
⇒ yi
1.
⇔ ¬P i ≡ 1 − yi 1 if clause P i is true = 0 if clause P i is false
Proposition
Mathematical Representation
P 1 ∨ P 2 ∨ P 3
y1 + y2 + y3 ≥ 1 y1 ≥ 1
2.
P 1 ∧ P 2 ∧ P 3
y2 ≥ 1 y3 ≥ 1
3. 4. 5. 6.
¬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)
1 − y1 + y2 ≥ 1 (y1 − y2 ≤ 0) y1 − y2 ≤ 0 y2 − y1 ≤ 0
or y1 = y2
y1 + y2 + y3 = 1 y1 − y3 ≤ 0 y2 − y3 ≤ 0
Chen CL
12
Procedure to Obtain a Conjunctive Normal Form:
Step 1: Replace the implication by its equivalent disjunction P 1 ⇒ P 2
⇐⇒ ¬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
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)
Chen CL
13
Illustration: (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]
⇓ 1 − y1 + 1 − y2 + y4 + y5 ≥ 1 1 − y3 + y4 + y5 ≥ 1
or
y1 + y2 − y4 − y5 ≤ 1 y3 − y4 − y5 ≤ 0
Chen CL
14
Select Among Process Units i ∈ P U :
yi = 1
select only one unit
yi ≤ 1
select at most one unit
yi ≥ 1
select at least one unit
i∈P U
i∈P U
i∈P U
Select Unit i If Unit j Is Selected: If unit j is selected (P j is true or yj = 1) then unit i should be selected too (P i is true or yi = 1) Others: not defined P j ⇒ P i ⇒ ¬P j ∨ P i ⇒ (1 − yj ) + yi ≥ 1 ⇒ yj − yi ≤ 0
Chen CL
15
Mathematical Model of Superstructure Modeling with Continuous and Linear 0 − 1 Variables
Activation and Deactivation of Continuous Variables: F iLyi ≤ F i ≤ F iU yi
⇓ F i = 0
for yi = 0
F iL ≤ F i ≤ F iU for yi = 1
Chen CL
16
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 − − = 0 h(x) + s+ s 1 1
g (x) ≤ s2 − ≤ U 1 · (1 − yi) + s+ s 1 1
s2 ≤ U 2 · (1 − yi) − s+ , s 1 1 , s2 ≥ 0
Chen CL
17
Nodes with Several Inputs: m
Alternative 1:
F j − U yi ≤ 0
j =1
Alternative 2:
F j ≥ 0,
j = 1, m
F j − U yi ≤ 0 F j ≥ 0,
j = 1, m
Chen CL
18
Logical Constraints in Multiperiod Problems: If unit i is not selected (zi = 0), then yit = 0 for all periods of operation T
Alternative 1:
yit − T · zi ≤ 0
t=1
Alternative 2:
yit − zi ≤ 0 ∀i = 1, . . . , T
Chen CL
19
Either-Or Constraints: Either f 1(x) ≤ 0 or f 2(x) ≤ 0
⇓ f 1(x) − U (1 − y1) ≤ 0 f 2(x) − U y1 ≤ 0
⇓ y1 = 1 f 1(x) ≤ 0 f 2(x) ≤ U
y1 = 0
or
f 1(x) ≤ U f 2(x) ≤ 0
Chen CL
20
Constraint Functions in Logical Expressions: Illustration
If f (x) ≤ 0, then g (x) ≥ 0 ⇓ P 1, f (x) ≤ 0 :
L1y1 + ≤ f (x) ≤ U 1(1 − y1)
P 2, g (x) ≥ 0 : L2(1 − y2) ≤ g(x) ≤ U 2y2 −
⇓P 1 ⇒ P 2
=⇒
¬P 1 ∨ P 2⇓
1 − y1 + y2 ≥ 1 (y1 − y2 ≤ 0)
⇓ y1 −
y2
≤ 0
L1y1 + ≤ f (x) ≤ U 1(1 − y1), L2(1 − y2) ≤ g(x) ≤ U 2y2 −
Chen CL
21
Constraint Functions in Logical Expressions: Illustration
If f (x) ≤ 0 and h(x) = 0, then g(x) ≥ 0
P 1
P 2
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) ⇓ y1 + y2 − y3 ≤ 1 L1y1 + ≤ f (x) ≤ U 1(1 − y1) L2(1 − y3) ≤ g (x) ≤ U 3y3 − − − h(x) + s+ s 1 1 = 0 − + s+ s 1 1 ≤ U 2 · (1 − y2 ) − s+ , s 1 1 ≥ 0
Chen CL
22
Constraint Functions in Logical Expressions: Illustration
φ(x) = max{0, f (x)} = L1(1 − y1) ≤
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 ≤
≤ U 3y1
φ(x)
φ(x) ≥ 0, ⇓ φ(x) − f (x) ≥ 0 ⇓ L1(1 − y1) ≤
f (x)
L2 = L3 = 0
≤ U 1y1 −
0 ≤ φ(x) − f (x) ≤ U 2(1 − y1) 0 ≤
φ(x)
≤ U 3y1
Chen CL
23
Mathematical Model of Superstructure Modeling with Bilinear Products of Continuous and 0 − 1 Variables Illustration: min
i
Let
⇒
xij yij
j
hij = xij yij
∀i, j
xij − U (1 − yij ) ≤ hij ≤ xij − L(1 − yij ) Lyij ≤ hij ≤ U yij
⇓ If yij = 1
If yij = 0
xij ≤ hij ≤ xij
xij − U ≤ hij ≤ xij − L
L ≤ hij ≤ U
0 ≤ hij ≤ 0
Chen CL
24
Illustration: L0(w) ≤ x ≤ U 0(w) when y = 0 L1(w) ≤ x ≤ U 1(w) when y = 1
⇓ L0(w) + [ L1(w) − L0(w)]y ≤ x ≤ U 0(w) + [ U 1(w) − U 0(w)]y (nonlinear product!) ⇓ L0 ≤ L0(w) ≤ L0 U 0 ≤ U 0(w) ≤ U 0 L1 ≤ L1(w) ≤ L1 U 1 ≤ U 1(w) ≤ U 1 L0(w) + [ L1 − L0]y ≤ x ≤ U 0(w) + [ U 1 − U 0]y L1(w) + [ L0 − L1](1 − y ) ≤ x ≤ U 1(w) + [ U 0 − U 1](1 − y ) ⇓ 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
Mathematical Model of Superstructure Modeling Nonlinearities of Continuous Variables
25
Chen CL
26
Modeling Separable Concave Functions: 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)
+ λ3C (γ 3) + λ4C (γ 4) λ1 + λ2 + λ3 + λ4 = 1 λ1, λ2, λ3, λ4 ≥ 0
y1 =
1 if γ 1 ≤ x ≤ γ 2 0 otherwise λ1 λ3
C (x) = λ 2C (γ 2) + λ3C (γ 3)
Ex: λ2 + λ3 = 1 λ2, λ3 ≥ 0 (λ1, λ4 = 0)
⇓ 1 if γ 2 ≤ x ≤ γ 3 y2 = y3 = 0 otherwise y1 + y2 + y3 = 1 ≤ y1, λ2 ≤ y1 + y2 ≤ y2 + y3, λ4 ≤ y3
1 if γ 3 ≤ x ≤ γ 4 0 otherwise
Chen CL
27
K +1
C (x) =
3 =⇒ segments
C (x) = λ 1C (γ 1) + · · · + λ4C (γ 4)
K +1
λ1 ≤ y1 λ3 ≤ y2 + y3 λ4 ≤ y3 y1 + y2 + y3 = 1 λ1, λ2, λ3, λ4 ≥ 0 y1, y2, y3 ∈ {0, 1}3
λi γ i
i=1
λ1 + λ2 + λ3 + λ4 = 1 λ2 ≤ y1 + y2
i=1
K +1
x =
x = λ 1γ 1 + · · · + λ4γ 4
λiC (γ i)
λi = 1
K
=⇒ segments
i=1
λ1 ≤ y1
λi ≤ yi−1 + yi, i = 2, . . . , K λK +1 ≤ yK K
yi = 1
i=1
λi ≥ 0,
∀i
yi ∈ {0, 1}K
Chen CL
28
Convexification (of Nonlinear Fcn.s of Continuous Var.s):
f (x) =
α
cj Πixi i ,
cj ≥ 0, xi ≥ 0
j
zi = ln xi ⇓ xi = ezi f (z ) =
α cj Πixi i
=
j
w, ew : convex
j
⇒
αi zi
cj Πie
=
cj ew
j
f (z ) : convex
Chen CL
29
Convexification: Illustration
f (x1, x2, x3) = x1x2 + 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)
Chen CL
30
Convexification: Illustration
f (x1, x2, x3, x4) = x1x2 − 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
31
Partitions (1)
f =
⇓
f 1 for x ≤ a f 2 for x > a
f = f 1y + f 2(1 − y ) a(1 − y ) − U y + ≤ x ≤ ay + U (1 − y ) y = 0, 1