You are on page 1of 61

Optimization

module
Process Engineering Course
Juan Carlos Serrato B
jcserratob@unal.edu.co
Office 320 Building 453

Optimization module
1. Optimization problem formulation (3 weeks)

2. Solution Methods (2 weeks)


Deterministics methods (1 week)
Metaheuristics methods (1 week)

Optimization software

GAMS
BARON
SIMPLEX
DUPLEX
Davison
Powell
lp_solve
CPLEX
..

Optimization methods
Deterministic methods
Branch and bound
Benders decomposition
Outer approximation
Conjugate gradient (Fletcher Reeves)
Interval analysis (Box)
SLP
SQP

Optimization methods
Metaheuristic methods
Genetic algorithms
Neural networks
Simulated annealing
Ant Colony
Particle swarm
Tabu search

Optimization problem
formulation
Why is very important to formulate
adequately an optimization problem?

Chapter 1

Most undergraduates learn by seeing how a method


is applied
Practicing professionals need to be able to recognize
when optimization should be applied (Problem formulation)
Optimization algorithms for reasonably-sized problems
are now fairly mature

Focus on a few good techniques rather than encyclopedic


coverage of algorithms

The Nature and Organization of


Optimization Problems

WHY OPTIMIZE?

1. Improved yields, reduced pollutants


2. Reduced energy consumption

3. Higher processing rates


4. Reduced maintenance, fewer shutdowns

5. Better understanding of process (simulation)


But there are always positive and negative factors to be
weighed

Chapter 1

OPTIMIZATION
Interdisciplinary Field
Max Profit
Min Cost
Max Efficiency
Requires
1. Critical analysis of process
2. Definition of performance objective
3. Prior experience (engr. judgment)

Chapter 1

Chapter 1

Chapter 1

Chapter 1

Chapter 1

Chapter 1

Material Balance Reconciliation

Least squares solution:


P

min (mA mCi mBi )


Chapter 1

i 1

opt. mA is the average value


any constraints on mA?

Chapter 1

Optimization problem
formulation
How to formulate an optimization problem
How to define an objetive function
How to choose optimization variables

Chapter 1

THREE INGREDIENTS IN OPTIMIZATION PROBLEM


1. Objective function

economic model

2. Equality Constraints

3. Inequality Constraints

Process model

1. min f(x)

x nx1

2. subject to h( x ) 0

(m1)

3. g( x ) 0

(m 2 )

(feasible

2
region :)
3

dependent variables

independent variables

relate to m1 and perhaps m 2

Chapter 1

THE SIX STEPS USED TO SOLVE


OPTIMIZATION PROBLEMS

1. Analyze the process itself so that the process variables


and specific characteristics of interest are defined, i.e.,
make a list of all of the variables.
2. Determine the criterion for optimization and specify the
objective function in terms of the above variables together
with coefficients. This step provides the performance
model (sometimes called the economic model when
appropriate).

THE SIX STEPS USED TO SOLVE


OPTIMIZATION PROBLEMS

Chapter 1

3. Develop via mathematical expressions a valid process or


equipment model that relates the input-output variables of
the process and associated coefficients. Include both
equality and inequality constraints. Use well-known physical
principles (mass balances, energy balances), empirical
relations, implicit concepts, and external restrictions. Identify
the independent and dependent variables (number of
degrees of freedom).

THE SIX STEPS USED TO SOLVE


OPTIMIZATION PROBLEMS
4. If the problem formulation is too large in scope:
(A)Break it up into manageable parts and/or
(B)Simplify the objective function
5.

Apply a suitable optimization technique


mathematical statement of the problem.

to

the

6. Check the answers and examine the sensitivity of the


result to changes in the coefficients in the problem and
the assumptions.

EXAMPLES SIX STEPS OF OPTIMIZATION


specialty chemical
100,000 bbl/yr.
2 costs inventory (carrying) or storage, production cost >

how many bbl produced per run?


Step 1
define variables
Q = total # bbl produced/yr (100,000)
D = # bbl produced per run
n = # runs/yr

Step 2
develop objective function
inventory, storage cost = k1D
production cost

= k2

per run

(could be nonlinear)

C k1 D n(k 2 k3 D)
Q
n
D
Q
C k1 D k 2 k3Q
D

(set up
cost)

k3

operating
cost per unit

Step 3

Chapter 1

evaluate constraints

integer
n
continuous
D>0
Step 4
simplification none necessary

Chapter 1

Step 5
computation of the optimum

analytical vs. numerical solution


dC
kQ
k1 2 2 0
dD
D
k 2Q
opt
D
k1
k1 1.0

k 2 10,000

k3 4.0

Q 105
D opt 31,622

check if minimum?
d 2C 2k 2Q

0
2
3
dD
D

flat optimum
30,000 D 70,000
good answer

supposecost per run k 2 k 4 D1/ 2


dC
k 2Q k 4Q

k1 2
0
3/ 2
dD
D
2D
analytical solution?

Step 6
Sensitivity of the optimum
subst Dopt into C
C opt 2 k1k 2Q k3Q
C opt
kQ
2
k1
k1

31,620

C opt
k1Q

k 2
k2

3.162

C opt
Q
k3

100,000

C opt
kk
1 2 k3
Q
Q

4.316

Chapter 1

opt

k 2Q

k1

D opt
k 2Q 1

k1
k1 2k1

15,810

D opt
k 2Q 1

k 2
k1 2k 2

1.581

D opt
0
k3

D opt
k 2Q 1

Q
k1 2Q

0.158

k1 1.0

k 2 10,000

k3 4.0

Q 100,000

RELATIVE SENSITIVITY (Percentage change)

C opt / C opt ln C opt


S

k1 / k1
ln k1
C
k1

Chapter 1

C opt 463, 240

k1 1.0

C opt
k 2Q

31,620
k1
k1
S kC1 0.0683

S kD1 0.5

S kC2 0.0683

S kD2 0.5

S kC3 0.863

SQD 0.5

S QC 0.932

S kD3 0

opt

C
k1
31620(1.0)
C
S k1

0.0683
opt
k1 C
463,240

abs. sens. on D

k1 k 2 Q k3

abs. sens. on C

k3 k1 Q k 2

Problem 4.10 Edgar.

Reactor + tower distillation process

Feed A is pure
Reaction A B, first order, isothermal
Operational conditions in tower are constant: P, T, R, etc
Production rate is constant (Qb) (mol/h)

Objetive function:

Analyzing reactor

Isothermal k=constant

Integrating
Defining conversion

Analyzing tower

Operational Cost

Problem definition

Problem solution

Problem solution

Chapter 1

PIPELINE PROBLEM
variables

parameters

V
p
f
Re
D

m
pipe cost
electricit y cost
# open days/yr
pump efficiency

Equality Constraints

Chapter 1

D2

v m

4
Re Dv /
2 L
p 2 v
f
D
f .046 Re 0.2

Chapter 1

min (Coper + Cinv.)


subject to equality constraints

Chapter 1

L 2
p 2 f v
D

need analytical formula for f

f .046 Re 0.2
pump power cost Co m

m mass flow rate

substituting for p,
4.8 0.2 2.8 2.0
Coper Co D m
Cinv C1 D1.5

smooth tubes

(annualized )

D2
4

2.8 D 4.8 C1D1.5


Total cost TC Co 0.2 2 m

Chapter 1

(constraint eliminated by substitution)


d (TC )
0
dD
solving,
(D opt )6.3

necessary condition for a minimum

Co 0.2 2 2.8

m
C1

C
(D opt ) o
C1

0.16

.32m.45 .03

opt velocity V opt

4
(sensitivity analysis)

2
Dopt

optimum velocity

Chapter 1

non-viscous liquids
gases (effect of )

3 to 6 ft/sec.
30 to 60 ft/sec.

at higher pressure lower need to use different


constraint (isothermal)

fL ln p
2 p1
2
S1V12
p
.323

p1 p2
24
D

S1 gV1 upstream velocity


or Weymouth equation
for large L, ln ( ) can be neglected
exceptions: elevation changes, slurries (settling),
extremely viscous oils (laminar flow,
f different)

Chapter 1

Heat Exchanger Variables


(given flow rate of one
1. heat transfer area
fluid, inlet
2. heat duty
temperatures, one
3. flow rates (shell, tube)
outlet temp., phys.
4. no. passes (shell, tube)
props.)
5. baffle spacing
6. length
7. diam. of shell, tubes
8. approach temperature
9. fluid A (shell or tube, co-current or countercurrent)
10.tube pitch, no. tubes
11.velocity (shell, tube)
12.p (shell, tube)
13.heat transfer coeffs (shell, tube)
14.exchanger type (fins?)
15.material of construction

Chapter 1

we have to supplement blast furnace gas with fuel oil,


but we want to minimize the purchase of fuel oil.

define:

X1 = amount of fuel oil used in generator 1


X2 = amount of fuel oil used in generator 2
X3 = amount of BFG used in generator 1
X4 = amount of BFG used in generator 2
P1 = mw output of generator 1
P2 = mw output of generator 2

range of operation of generator 1 and generator 2


18 P1 30
14 P2 25
Fuel effects in the generators are additive (can operate
on either BFG or fuel oil)

10 units of BFG are available (on the average):

Chapter 1

1 unit BFG = Btu equivalent of 1 ton/hr. fuel oil.


We need 50 mw power at all times.

P1 P2 50
Experimental data needed?

Mathematical Statement

Min C

x1

Chapter 1

fuel oil to gen 1

x2

fuel oil to gen 2

a. operating ranges
& requirements

18 P1 30
14 P2 25
P1 + P2 = 50

b. availability of
blast furnace gas

x3 + x4

c. operating
characteristics

P11 (x1)
P12 (x3)

fuel oil
BFG

gen 1

P21 (x2)
P22 (x4)

fuel oil
BFG

gen 2

P1 P11 P12

P2 P21 P22

P11 1.4609 .15186 X 1 .00145 X 12

Chapter 1

this equation is not sufficient since we


may add BFG

P12 BFG ( X 3 ) reqt. in generator 1


P1 P11 P12
P21( X 2 ) fuel oil
P22 ( X 4 ) BFG
P2 P21 P22

fcn of burners, heat transfer characteristics (convex


functions) e.g.

P11 1.4609 .15186 X1 .00145 X12

Solution
NLP
piece-wise LP
Copt 3.05
P1 30
P2 20

4 ineq. const.
6 eq. const.
No fuel oil is used in generator 1.
In generator 2, fuel oil provides 58%
of the power (rest is BFG).

heat transfer characteristics may change, or BFG may


vary w.r.t. time (on-line solution)

You might also like