Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

10 Blending Optimization

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Blending & Optimization

1
Technology Assessment

Conceptual
Process

Economic Technical Political


Feasibility Feasibility Feasibility

Cost Value in Use


of Production of Products

Process Simulaiton Linear Programming

2
Modeling Hierarchy
unit
operations

single single
plant Process
model
process Simulation

multi-plant refinery
model model
multiple
processes LP
multi-refinery
Simulation
model

3
What is “Linear Programming”?

• Word “Programming” used here in the sense of “planning”


• For N independent variables maximize

z = a01
• Subject to the primary x1 + a02 x2 + ⋯ + a0N xN
constraints

x1 ≥ 0, x2 ≥ 0,
• and to M additional constraints (all
…b, xNpositive)
≥ 0,
n

ai1 x1 + ai 2 x2 + ⋯ + aiN xN ≤ bi
aj1 x1 + aj 2 x2 + ⋯ + ajN xN ≥ bj
ak1 x1 + ak 2 x2 + ⋯ + akN xN = bk

4
Linear Programming

• From Numerical Recipes in Fortran 77, The Art of Scientific


Computing, by Press, Teukolsky, Vetterling, & Flannery:
“… the subject of linear programming is surrounded by notational
and terminological thickets. Both of these thorny defenses are
lovingly cultivated by a coterie of stern acolytes who have devoted
themselves to the field. Actually, the basic ideas of linear
programming are quite simple. Avoiding the shrubbery, we want
to teach you the basics by means of a couple of specific examples;
it should then be quite obvious how to generalize.”

5
Linear Programming Terminology

• Objective Function
» Function z to be maximized
• Feasible Vector
» A set of values x1, x2, …, xN that satisfies all constraints
• Optimal Feasible Vector
» Feasible vector that maximizes the objective function

6
Linear Programming Problem Solutions

• Solutions will tend to be in the “corners” of where the constraints


meet
• May have an infinite number of solutions along a constraint edge
• May not have a solution
» Incompatible constraints
» Feasible area unbounded towards the maximum

7
Sample 2D LP Problem

• Objective function
Maximize z = x1 − 3x2
• Constraints
−2 x1 + x2 ≤ 4
0.5x1 + x2 ≤ 20
1.5x1 − x2 ≤ 10
3x1 + x2 ≤ 30

8
Sample 2D LP Problem
Maximize z = x1 − 3x2

−2 x1 + x2 ≤ 4
0.5x1 + x2 ≤ 20
1.5x1 − x2 ≤ 10
3x1 + x2 ≤ 30

9
Sample 2D LP Problem
Maximize z = x1 − 3x2

−2x1 + x2 ≤ 4
0.5x1 + x2 ≤ 20
1.5x1 − x2 ≤ 10
3x1 + x2 ≤ 30

10
Sample 2D LP Problem
Maximize z = x1 − 3x2

−2 x1 + x2 ≤ 4
0.5x1 + x2 ≤ 20
1.5x1 − x2 ≤ 10
3x1 + x2 ≤ 30

11
Sample 2D LP Problem
Maximize z = x1 − 3x2

−2 x1 + x2 ≤ 4
0.5x1 + x2 ≤ 20
1.5x1 − x2 ≤ 10
3x1 + x2 ≤ 30

12
Sample 2D LP Problem
Maximize z = x1 − 3x2

−2 x1 + x2 ≤ 4
0.5x1 + x2 ≤ 20
1.5x1 − x2 ≤ 10
x2
3x1 + x2 ≤ 30

x1

13
Sample 2D LP Problem

• Solution
» Z=6.67 @ x1=6.67 & x2=0.00
• Values at “corners”

x1 X2 z
5.2 14.4 -38
8.889 3.333 -1.111
0 4 -12
0 0 0
6.667 0 6.667

14
Sample LP Problem

• Objective function
Maximize z = x1 + x2 + 3x3 − 0.5x4
• Constraints
x1 + 2 x3 ≤ 740
2 x2 − 7 x4 ≤ 0
x2 − x3 + 2 x4 ≥ 0.5
x1 + x2 + x3 + x4 = 9
• Solution
» z= @ x1=0, x2=3.325, x3=4.725, & x4=0.95

15
Simplex Method

• First published by Danzig in 1948


• Organized procedure to go from “corner” to “corner” & find the
optimal solution vector
• Introduce “slack variables” to make all inequality constraints
equality constraints
• Need to re-organize problem into a “restricted normal form” and
examine all of the coefficients in a “tableau”

16
Restricted Normal Form

• Introduce slack variables into the constraints


x1 + 2 x3 ≤ 740
2 x2 − 7 x4 ≤ 0
x2 − x3 + 2 x4 ≥ 0.5
x1 + x2 + x3 + x4 = 9
• becomes
x1 + 2 x3 + y1 = 740
2 x2 − 7 x4 + y2 = 0
x2 − x3 + 2 x4 − y3 = 0.5
x1 + x2 + x3 + x4 = 9

17
Restricted Normal Form

• Introduce “artificial variables” into the constraints


x1 + 2 x3 + y1 = 740
2 x2 − 7 x4 + y2 = 0
x2 − x3 + 2 x4 − y3 = 0.5
x1 + x2 + x3 + x4 = 9
• Becomes
740 − x1 − 2 x3 − y1 = z1
−2 x2 + 7 x4 − y2 = z2
0.5 − x2 + x3 − 2 x4 + y3 = z3
9 − x1 − x2 − x3 − x4 = z4

18
Restricted Normal Form

• Define an “auxiliary objective function”

z ′ = − z1 − z2 − z3 − z4
= − (749.5 − 2 x1 − 4 x2 − 2 x3 + 4 x4 − y1 − y2 + y3 )

19
Restricted Normal Form
The Tableau

x1 x2 x3 x4 y1 y2 y3

z 0 1 1 3 -0.5 0 0 0

z1 740 -1 0 -2 0 -1 0 0

z2 0 0 -2 0 7 0 -1 0

z3 0.5 0 -1 1 -2 0 0 1

Z4 9 -1 -1 -1 -1 0 0 0

Z’ -749.5 2 4 2 -4 1 1 -1

20
Tableau Rows & Columns
• Rows are constraints
» Represent limits of operation
» Only enter optimal solution if actually limiting
» Material balances, utility balances, unit capacities, etc.
• Columns are variables
» An LP has more columns than rows
» Column Activity — value of variable
» Columns generally represent flows in the process
» Solution vector — column activities which maximize or minimize
objective function

21
Simplex Solution Method

1. Find columns in the “z” row with positive values


2. Examine column entries beneath the column selected in 1 & find
those that are negative. Divide the element in the “constant
column” by magnitude of the “pivot element”. Find the element
with the largest increase.
3. Increase the selected variable & simultaneously pivot the column
variable to become a row variable.
4. Repeat.

22
Solved Form — Final Updated Tableau

x1 y2 y3

z 17.03 -0.95 -0.05 -1.05

x2 3.33 -0.35 -0.15 0.35

x3 4.73 -0.55 0.05 -0.45

x4 0.95 -0.10 0.10 0.10

y1 730.55 0.10 -0.10 0.90

23
Interpretation of Solved Tableau

• Variables in the “z” row have zero for a solution


• Variables in the 1st column have non-zero values for the solution
» Non-zero slack variables in the solution vector mean that that
constraint is not at the equality
• Value of the objective function is in the upper left-hand corner

24
LP Software

• Advantages of specialty software


» Creates the coefficients in the tableau
» Solves the LP problem
» Creates a report with interpreted values

25
Comparison of LP Models

Columns Rows
(variables) (equations)

LINDO 150 300


Standard Excel™
Solver™ 200 200

Premium Solvers 1,000-2,000 8,000

PIMS™ (Bechtel lic.) 200 800

EIA PMM (NEMS) 100,000 4,000

26
Problems with LPs
• Nonlinear blending
» Linearize with blending factors
1.25 1.25
(RVP ) = ∑ v (RVP )
i i

» Modify form of “ratio” models

γo = ∑ v i γ o, i = ∑V γ
i o, i
⇒ γ o ∑ Vi = ∑V γ
i o, i
∑V i

0= ∑V (γ
i o, i − γo )

• Stream pooling problem


• Nonlinear responses of processes to changes in feedstock quality
or operating conditions
• Aggregation/segregation of feedstocks
• Accuracy of solution away from baseline

27
Product Blending Example

Revenue $0
Cost $0
Profit $0.0
Profit per gal sold #DIV/0!

Raw Materials
Properties for Blending Calculations Cost & Availability Usage
Octane Cost Minimum Maximum
Number RVP VPBI ($/gal) Required Available Regular Premium Total
Butane 120 60 167.0 0.20 0 25,000 0 0 0
SR Gasoline/Naphtha 62 10.8 0.70 0 50,000 0 0 0
Reformate 100 RON 105 2 1.80 0 35,000 0 0 0
FCC Gasoline 87 5.1 0.70 0 50,000 0 0 0
Alkylate 92 4.6 1.05 0 12,000 0 0 0

Products
Lower & Upper Limits on Properties Price & Production Requirements
Price Minimum Maximum
Octane Number RVP VPBI ($/gal) Required Allowed
Regular 87 9.0 1.50 75,000
Premium 92 9.0 1.70 40,000

28

You might also like