Vous êtes sur la page 1sur 13

TEXAS A&M UNIVERSITY, COLLEGE STATION

Advanced Process Optimization


Project 1

Sunjeev Venkateswaran, UIN: 725006079


October 21, 2016

Problem 1
Problem Statement: Write the KKT optimality conditions and determine a
KKT point for the following problems:

Part 1.1
min(x1 1)2 + (x1 3)2
s.t x1 + x2 8
x21 2x2 1
x1 , x2 0

Solution: The KKT necessary optimality conditions are the following


For the Lagrangian function L,
L = (x1 1)2 + (x1 3)2 + 1 (x1 + x2 8) + 2 (x21 2x2 1) 3 x1 4 x2
The Lagrange KKT condition is,
L = ((x1 1)2 +(x1 3)2 )+1 (x1 +x2 8)+2 (x21 2x2 1)3 x1 4 x2
The complementary condition is,
1 (x1 + x2 8) 2 (x21 2x2 1) 3 x1 4 x2 = 0
1

Dual feasibility conditions,


i = 0 (if constraint i is inactive)
j 0 (if constraint j is active)
Primal feasibilty conditions,
x1 + x2 8
x21 2x2 1 0
x1 0
x2 0
In order to find a KKT point we make use of the Active set strategy. Assuming
no active constraints initially we solve the following unconstrained problem:
f (x1 , x2 ) = min(x1 1)2 + (x1 3)2
The KKT optimality condition of the above unconstrained problem is:


2(x1 1)
f =
=0
2(x2 3)

(1)

Solving (1):
x1 = 1 and x2 = 3
Checking for any violation for inactive set of constraints,
1+38 X
161 X
10X
30X
None of the constraints are violated. Thus the KKT conditions are satisfied and
x1 = 1 and x2 = 3 is our KKT optimal point. The Hessian matrix is:
#
" 2
2
H=

f
x2
2f
yx

f
xy
2f
y 2

Solving we get,

2
H=
0

0
2

The Eigenvalues of the above matrix are 1 = 2 and 2 = 2. Since both the
eigenvalues are positive we conclude that the matrix is positive definite and
hence the function is convex. Also, the constraint x21 2x2 1 0 is convex
2

(Quadratic with highest degree coefficient positive). Therefore this is a convex


optimization problem. KKT necessary conditions are sufficient for optimality.
And hence,
x1 = 1, x2 = 3
is the optimal solution for the above optimization problem.

Part 1.2
min e(x1 +x2 )
s.t ex1 + ex2 30
x1 0
x2 0

The KKT necessary optimality conditions are the following:


For the Lagrangian function L,
L = e(x1 +x2 ) + 1 (ex1 + ex2 30) 2 x1 3 x2
Lagrange KKT conditions,
L = e(x1 +x2 ) + 1 (ex1 + ex2 30) 2 x1 3 x2 = 0
Complementary conditions,
1 (ex1 + ex2 30) 2 x1 3 x2 = 0
Dual feasibility conditions,
i = 0 (if constraint i is inactive)
j 0 (if constraint j is active)
Primal feasibilty conditions,
ex1 + ex2 30
x1 0
x2 0
Determining a KKT point.
Using the active set strategy, we assume that initially all constraints are inactive. Thus we find the KKT point for the unconstrained problem below:
f (x1 , x2 ) = min e(x1 +x2 )
3

The KKT condition for this unconstrained problem is,


 (x +x ) 
e 1 2
=0
e(x1 +x2 )

(2)

To solve (2) at least one of x1 or x2 should be . However if this happens, the


constraint ex1 + ex2 30 is violated.
Now adding that constraint in our active set. We get the Lagrangian function
to be,
L = e(x1 +x2 ) + 1 (ex1 + ex2 30)
The KKT conditions for the above unconstrained problem are,
(x +x )

e 1 2 + 1 (ex1 )
L = e(x1 +x2 ) + 1 (ex1 ) = 0
ex1 + ex2 30
and solving (3), we get x1 = ln(15), x2 = ln(15) and 1 =
violated constraints in the inactive set.

1
153

(3)

We check for any

x1 = ln(15) 0 X
x2 = ln(15) 0 X
Complementary conditions,
1 =

1
0X
153

Now checking for convexity of the objective function. The Hessian is,
 (x +x )

e 1 2 e(x1 +x2 )
H = 2 f = (x1 +x2 )
e
e(x1 +x2 )
Eigenvalues of the above matrix are, 1 = 2e(x1 +x2 ) and 2 = 0. Since the
eigenvalues are non negative, the function is convex. Also since the inequality
constraint g = ex1 + ex2 30 0 is convex (eigenvalues=ex1 and ex2 ). This is
a convex optimization problem.
Thus, the KKT necessary conditions are sufficient to establish optimality. And
hence the points,
x1 = ln(15) , x2 = ln(15) and 1 =
represent the global optimum.

1
153

Problem 2
Problem statement: Consider the following nonlinear programming problem

maxf (x) = x1 /(x2 + 1)


s.t x1 x2 2
x1 , x2 0

Part 2.1
Use KKT optimal conditions to demonstrate that (x1 , x2 ) = (4, 2) is NOT optimal.
Solution: Writing the above problem in canonical form.
ming(x) = x1 /(x2 + 1)
s.t x1 x2 2
x1 x2 2
x1 , x2 0
At (x1 , x2 ) = (4, 2) we see that the constraint x1 x2 2 is active. Therefore
the Lagrangian function L will be:
L(x1 , x2 , ) = x1 /(x2 + 1) + (x1 x2 2)
One of the KKT conditions is at any KKT point L should be equal to 0.

1/(x2 + 1) +
(4)
L(x1 , x2 , ) = x1 /(x2 + 1)2 = 0
x1 x2 2
We see that at (x1 , x2 ) = (4, 2)

1
3 +
L(4, 2, ) = 49 = 0
0

(5)

We see that for no value of , will L be equal to 0. Thus the point (x1 , x2 ) =
(4, 2) cannot be a KKT point and hence it cannot be an optimal point

Part 2.2
Derive a solution that does satisfy the Kuhn- Tucker conditions.
Solution: Again to derive a KKT point we use the active set strategy. Initially we assume none of the constraints are active. In this case we get the
unconstrained optimization problem:
ming(x) = x1 /(x2 + 1)
The KKT condition is:
L(x) = g(x) = 0
Therefore,



1/(x2 + 1)
g(x) =
=0
x1 /(x2 + 1)2

(6)

Thus (x1 , x2 ) = (0, ). Therefore there wont be a minimum for the unconstrained problem.
We will now start considering the constraints in the problem to find the optimal KKT point. Assume x1 x2 2 is active. Now the Lagrangian function
is,
x1
+ 1 (x1 x2 2)
L(x1 , x2 , 1 ) =
x2 + 1
The KKT necessary conditions are,

1
x2 +1 + 1
1
=0
(7)
L = (x2x+1)
2 1
x1 x2 2
We see that no 1 can satisfy (7). Thus the constraint x1 x2 0 cannot be
active alone.
Adding the constraint x1 0, we get the Lagrangian function to be,
L(x1 , x2 , 1 ) =

x1
+ 1 (x1 x2 2) 2 x1
x2 + 1

The KKT necessary conditions are,


1

x2 +1 + 1 2
x1

(x2 +1)2 1

L =

=0
x1 x2 2
x1

(8)

Solving (8) we get, x1 = 0, x2 = 2, 1 = 0 and 2 = 1. We see that


all Lagrange multipliers are all non-negative, thus maintaining dual feasibility
Checking the for any violated constraints.
0 + 2 2X
6

0 0X
2 0
We see that there is a constraint violation. Bringing that constraint into our
active set we get the Lagrangian function to be,
L(x1 , x2 , 1 , 2 , 3 ) =

x1
+ 1 (x1 x2 2) 2 x1 3 x2
x2 + 1

The KKT conditions,

1
x2 +1 + 1 2
x1 2 1 3
(x2 +1)

L(x1 , x2 , 1 , 2 , 3 )

x1 x2 2
x1
x2

=0

(9)

We see that (9) has no solution. We move forward by eliminating constraint


x1 0. Our Lagrangian function comes out to be,
L(x1 , x2 , 1 , 3 ) =

x1
+ 1 (x1 x2 2) 3 x2
x2 + 1

The KKT conditions are,


1
x2 +1

+ 1
x1 2 1 3
(x2 +1)

L(x1 , x2 , 1 , 3 )
x1 x2 2 = 0
x2

(10)

On solving the (10) we get, x1 = 2, x2 = 0, 1 = 1 and3 = 1. Checking the


inactive constraints for violations,
x1 = 2 0X
Also,
1 0X
3 0X
Thus,
x1 = 2, x2 = 0, 1 = 1 and 3 = 1
satisfies the Kuhn Tucker conditions.

Part 2.3
Show that this problem is NOT a convex programming problem.
Solution: One of the conditions for the problem to be convex is the objective function being convex. A function g is convex if its Hessian matrix H is
positive semi-definite.
1
For g = xx
the Hessian matrix is
2 +1


0
1/(x2 + 1)2
2
H = g(x) =
=0
(11)
1/(x2 + 1)2 2x1 /(x2 + 1)3
To obtain the eigenvalues of H we find such that:
det(I H) = 0

(12)

On solving:
det(I H) = 2 +

1
2x1

=0
(x2 + 1)3
(x2 + 1)4

(13)

Analyzing (13), we see that product of the roots is = (x21


+1)4 < 0 If the product
of the two roots is negative then the roots are of different sign. Thus there
exists a positive and negative eigenvalue for the above matrix. Therefore,
the Hessian is not positive semi-definite and hence the objective g is non-convex.
Thus this is not a convex optimization problem.

Part 2.4
Despite the conclusion in part (iii), use intuitive reasoning to show that the
solution obtained in part (ii) is, in fact, optimal.
Solution: For non-negative x1 and x2 in order to find the maximum of f (x) =
x1
x2 +1 , ideally, we would want x1 = (as large as possible) and x2 = 0 (as small
as possible). However, the constraint x1 x2 2 suggests that the difference
between x1 and x2 can be at most 2. Since we want the difference between them
to be as large as possible, the constraint will be active at the optimal solution.
Therefore,
x1 x2 = 2
(14)
And hence,
f (x) =

x1
x2 + 2
1
=
=1+
x2 + 1
x2 + 1
x2 + 1

Clearly for (x2 , x1 ) 0 maximum value of f(x) occurs at x2 =0. And hence
x1 =2 from above equation. The optimal solution being f(x)=2.

Problem 3
Problem Statement: Given the superstructure shown in Figure 1

Figure 1: Problem 3-Superstructure

Part 3.1
Introduce 0-1 variables to denote the existence (or not) of the two reactor types,
and the existence (or not) of the two separator types. Write down a logical condition, using 0-1 variables, to denote the following:
If Reactor Type 1 is selected, then only Separator Type 2 should
be considered
Solution: Introducing 0-1 variables yr1 , yr2 , ys1 and ys 2 to denote the existence
of reactors R1, R2 and Separators S1, S2 respectively. For example yr1 = 1
means that Reactor 1 is selected and yr1 = 0 means it is not.
In terms of 0-1 variables the statement can be written as,
yr1 = 1 ys2 = 1 ys1 = 0
This can be written as:
(yr1 = 1 ys2 = 1).(yr1 = 1 ys2 = 0)
(yr1 = 1 ys2 1).(yr1 = 1 ys2 0)
Thus we get
ys2 yr1 and ys1 1 yr1

Part 3.2
Assume that at the optimal solution only Reactor Type 1 and Separator Type
2 are selected. Write down a logical condition that excludes this solution from
any further analysis, in order to obtain the second best solution.
Solution: The current optimal solution can be excluded using an integer cut,
X
X
yi
yi |B| 1
iB

iN

where B = {yi |yi = 1} and N = {yi |yi = 0} and |B| is the cardinality of set B.
Applying it to this problem we get,
yr1 + ys2 yr2 ys1 1

Problem 4
In a given chemical process a gas stream is compressed to a pressure P (atm)
with a centrifugal compressor at a cost of 35, 400P ($/yr). This stream is then
mixed with a recycle stream of flowrate r (Mmol/hr) and fed to a reactor whose
annualized cost is given by
75600
P.r
The desired product is removed in a flash unit and the un reacted material is
recycled at a cost of 22, 820r($/yr). The minimum pressure at which the reaction has to proceed is 2atm and the maximum pressure that the compressor can
provide is 5atm. With the existing pump and pipeline, the maximum flowrate
that can be recycled is 1.5(M mol/hr)

Part 4.1
Formulate the optimization problem that will minimize the total annual cost of
the system
Solution: Considering C to be the total annualized cost of the process. Using the data given in the problem the followingg optimization problem arises:
75600
+ 22820 r
P r
s.t 2 P 0

min C(P, r) = 35400 P +

P 50
r 1.5 0
r0
10

Part 4.2
Determine the optimal values of the pressure P and of the recycle r by finding
a KuhnTucker (KKT) point for the optimization problem
Solution: Using the active set strategy, we will first assume that no constraints
are active. Thus the problem reduced to the following unconstrained optimization.
75600
min C(P, r) = 35400 P +
+ 22820 r
P r
Taking the gradient and equating to 0,


35400 75600/(P 2 r)
C(P, r) =
=0
(15)
22820 75600/(P r2 )
Solving the above we get,
P = 1.1124, r = 1.7258
We see that the constraints 2 P 0 and r 1.5 0 are violated. Thus
bringing both into the active set our Lagrangian function becomes,
L(P, r, 1 , 2 ) = 35400 P +

75600
+ 22820 r + 2 (2 P ) + 1 (r 1.5)
P r

KKT conditions is that,

35400 75600/(P 2 r) 2
22820 75600/(P r2 ) + 1
=0
L(P, r, 1 , 2 ) =

r 1.5
2P

(16)

Solving (16) we get,


P = 2, r = 1.5, 1 = 6020, 2 = 22800
Since 1 < 0, the constraint r 1.5 0 is eliminated. Also all the other inactive
constraints are satisfied too.
Thus our new lagrangian function becomes,
L(P, r, 1 ) = 35400 P + 75600/(P r) + 22820 r + 2 (2 P )
Taking the gradient and equating to zero,

35400 75600/(P 2 r) 2
L(P, r, 2 ) = 22820 75600/(P r2 ) = 0
2P
Solving (17) equation we get,
P = 2, r = 1.287, 2 = 20714.685
11

(17)

Checking for violations in the inactive constraints.


250 X
1.287 1.5 0 X
1.287 0 X
All the constraints are satisfied. And, 2 > 0. Thus Kuhn Tucker necessary
conditions are satisfied.
The need for second order conditions.
Calculating the Hessian of the objective function,

756002
75600
2 C(P, r) =

P 3 r

P 2 r 2

75600
P 2 r 2

756002
P r 3

The characteristic equation for the eigenvalues is:


(

2k
k
2k
)( 3 ) 4 4
P r3
P r
P r

2 2(=

k
k
3k 2
+ 3 ) + 4 4
3
P r
P r
P r

(18)

where k=75600.
Let 1 and 2 be the roots of then
1 2 =

3k 2
>0
P 4 r4

.
Thus the roots should be of same sign. And the sum of the roots,
1 + 2 = 2(

k
k
+ 3 )
3
P r
P r

The above equation is positive for positive values for (P,r) and negative for
negative values of (P,r). Thus we have positive eigenvalues if (P, r) > 0 and
negative eigenvalues if (P, r) < 0. The function is non-convex and hence the
problem is non-convex. Therefore second order conditions are required.
The second order condition states that, for any non-zero vector z such that,
z T gi (x ) = 0
z T 2 Lxx (x1 , x2 , )z > 0

(19)

where gi (x) are the active constraints in the problem. Solving for z = [z1 , z2 ]T ,we
have,
z T gi (x ) = [z1 , z2 ][1, 0]T = 0
(20)
12

Solution for (20) is,


z1 = 0
Therefore,
z = [0, z2 ]
Now second order condition says that,
z T 2 LP r (P , r , )z > 0

(21)

i.e,
z T 2 Lpr (p , r , )z = z T



14685.31 11410.5
z>0
11410.5 35463.87

(22)

Solving the above equation we get,


35463.87z22 > 0
which is always true. Thus,
P = 2, r = 1.287, 2 = 20714.685
is a strict local minimum of the problem.

Part 4.3
Is this a global optimum?
Solution: In the previous part we showed that the objective function is non
convex and the solution obtained is a local minimum. But further analysis
shows that, in our domain of interest i.e (P, r) > 0 the objective function Hessian does have positive eigenvalues. Thus we can say for (P, r) > 0 the function
is convex. Also checking the constraints we see that,
2 P 0 Af f ine
P 5 0 Af f ine
r 1.5 0 Af f ine
r 0 Linear
Thus, we can conclude that the problem is convex for (P, r) > 0. And the
optimal values obtained in the previous part are global optimum.

13

Vous aimerez peut-être aussi