Optimization

What is optimization about?

• Typical problems in process design or plant operation have many (possibly infinite) solutions.

• Optimization is concerned with selecting the \underline{best} alternative among the entire set by efficient quantitative methods.

• Computer methods are typically required to do the necessary calculations.

Optimization Problems Found in Industry

\underline{Problem 1}: The rate of return on investment is given by

R = 100(1 − t)\frac{[S − (V + F/n)]}{I/n}

R = rate of return
t = tax rate
S = sales price
V = variable cost of production
F = fixed charge
n = number of units produced
I = total investment

What is the maximum rate of return as a function of n?

\underline{Problem 2}: A refinery has two crude oils that have yields and maximum allowable production rates as shown below:

Crude 1 Crude 2 Rate
Gasoline  70  31 6,000
Kerosene  6  9 2,400
Fuel oil  24  60 12,000

The profit on processing crude 1 is $1.00/bbl and on crude 2 is $0.70/bbl. What are the optimum daily feed rates of the two crudes to this plant?

\underline{Problem 3}: A chemical company sells three products and has found that its revenue function is f = 10x + 4.4y^{2} + 2z where x, y and z are the monthly production rates of each chemical. Furthermore, limits on production rates are described by

\begin{aligned}x & ≥ & 2 \\ z^{2} + 2y^{2} & ≥ & 3 \\ x + 4y + 5z & ≤ & 32 \\ x + 3y + 2z & ≤ & 29 \end{aligned}

What is the best production schedule for this company?

Course Outline

• Unconstrained Optimization • Constrained Optimization • Numerical Methods

• Linear Programming UNCONSTRAINED OPTIMIZATION Example 1: A non-elementary reaction A → B is occurring in a CSTR with the following rate kinetics:

r_{A} = \frac{k_{1}C_{A}}{(k_{2} + C_{A})(k_{3} + C_{A})}  (1)

where

\begin{aligned}k_{1} & = & 0.25 \\ k_{2} & = & 0.50 \\ k_{3} & = & 500 \end{aligned}

It is possible to operate the reactor at any concentration between C_{A} = 10 and C_{A} = 20 mol/l. At what concentration should it be operated so that the rate is \underline{maximum}

Brute Force Solution Strategy

• Choose different values of C_{A} between 10 and 20 mol/l and calculate r_{A} at each value of C_{A}.

• Plot r_{A} vs C_{A}.

• Fit a curve through the points and find the C_{A} that corresponds to the maximum r_{A}.

\begin{matrix}C_{A} & r_{A} × 10^{6} \\ 10 & 466.85 \\ 12 & 468.75 \\ 14 & 469.61 \\ 16 & 469.81 \\ 18 & 469.58 \\ 20 & 469.04 \end{matrix}

8 9

\underline{EXAMPLE 2} Suppose:

r_{A} = \frac{k_{1}C_{A}C_{B}}{(k_{2} + C_{A})(k_{3} + C_{B})}  (2)

What are the optimal values of C_{A} and C_{B}?

Analysis of Brute Force Strategy

• Strategy is simple to use.

• However, it is tedious to use if there is more than one variable involved.

• Constraints are not handled explicitly.

Review of Material from Elementary Calculus

Given a function f(x) that is continuous and twice differentiable, a stationary point x^{∗} is defined by:

\frac{∂f}{∂x} |_{x=x^{∗}} = 0  (3)

• x^{∗} is a minimum if \frac{∂^{2}f}{∂x^{2}} |_{x=x^{∗}} > 0

• x^{∗} is a maximum if \frac{∂^{2}f}{∂x^{2}} |_{x=x^{∗}} < 0

• x^{∗} is a saddle point if \frac{∂^{2}f}{∂x^{2}} |_{x=x^{∗}} = 0 EXAMPLE 1 REVISITED A non-elementary reaction A → B is occurring in a CSTR with the following rate kinetics:

r_{A} = \frac{k_{1}C_{A}}{(k_{2} + C_{A})(k_{3} + C_{A})}  (4)

where

\begin{aligned}k_{1} & = & 0.25 \\ k_{2} & = & 0.50 \\ k_{3} & = & 500 \end{aligned}

It is possible to operate the reactor at any concentration between C_{A} = 10 and C_{A} = 20 mol/l. At what concentration should it be operated so that the rate is \underline{maximum}

r_{A} = \frac{k_{1}C_{A}}{(k_{2} + C_{A})(k_{3} + C_{A})}  (5)

\frac{∂r_{A}}{∂C_{A}} = 0 => C_{A} = 15.81  (6)

It can be easily shown that the second derivative is negative and so C_{A} = 15.81 is a maximum.

Analysis of Analytical Approach

• Provides explicit formulae to determine optimal values.

• However, it requires the funciton to be differentiated twice.

• Constraints are not handled explicitly.

Sign Convention

We will consider only minimization problems from now on with the knowledge that maximizing a function is the same as minimizing the negative of that function. For example,

Max(−2x^{2} − 2x + 1)  (7)

is the same as

Min(+2x^{2} + 2x − 1)  (8)

Multivariable Version of Analytical Approach

Problem without Constraints Consider a \underline{scalar} function f(x) where x is a vector.

x = [x_{1} x_{2} ... x_{n}]^{T}

Then, the necessary conditions for a local minimum are:

\frac{∂f}{∂x} |_{x=x^{∗}} = 0  (9)

The sufficient conditions for a local minimum are:

\frac{∂^{2}f}{∂x^{2}} |_{x=x^{∗}} > 0  (10)

The \underline{necessary} conditions for a local minima imply that we need to solve:

\begin{aligned}\frac{∂f}{∂x_{1}} & = & 0 \\ \frac{∂f}{∂x_{2}} & = & 0 \\ & . \\ & . \\ \frac{∂f}{∂x_{n}} & = & 0 \end{aligned}  (11)

The solution of the above n nonlinear equations results in the vector x^{∗}.

The \underline{sufficient} conditions for a local minima imply that the following matrix has all positive eigenvalues.

[ \begin{matrix}\frac{∂^{2}f}{∂x_{1}^{2}} & \frac{∂^{2}f}{∂x_{1}∂x_{2}} & ... & \frac{∂^{2}f}{∂x_{1}∂x_{n}} \\ \frac{∂^{2}f}{∂x_{2}∂x_{1}} & \frac{∂^{2}f}{∂x_{2}^{2}} & ... & \frac{∂^{2}f}{∂x_{2}∂x_{n}} \\ . & . & ... \\ . & . & ... \\ \frac{∂^{2}f}{∂x_{n}∂x_{1}} & \frac{∂^{2}f}{∂x_{n}∂x_{2}} & ... & \frac{∂^{2}f}{∂x_{n}^{2}} \end{matrix} ]_{|_{x=x^{∗}}}  (12)

If some eigenvalues are positive and some are negative, the point x = x^{∗} is called a \underline{saddlepoint}. If one or more eigenvalues are zero, the point x = x^{∗} is called a \underline{singular} point and more information is needed to determine if the point is a minimum point or not.

\underline{EXAMPLE 2}: Find the stationary points for the following functions and determine if the stationary points are a minimum, saddlepoint or singular points.

1. f(x) = x_{1}^{2} − 2x_{1}x_{2} + 4x_{2}^{2}

2. f(x) = −x_{1}^{2} + 2x_{1}x_{2} + 3x_{2}^{2}

3. f(x) = x_{1}^{2} − 4x_{1}x_{2}^{2} + 3x_{2}^{4} \underline{EXAMPLE 3} A chemical company produces two products and has determined that its cost function is given by:

f(x) = x_{1}^{4} − 2x_{1}^{2}x_{2} + x_{2}^{2} + x_{1}^{2} − 2x_{1} + 5

where x_{1} is the production rate of the first product and x_{2} is the production rate of the second product. Determine the production rates of x_{1} and x_{2} at which the cost function is minimized.