Global Optimization for Scheduling Refinery Crude Oil...
Transcript of Global Optimization for Scheduling Refinery Crude Oil...
Global Optimization for Scheduling Refinery Crude Oil Operations
Ramkumar Karuppiah1, Kevin C. Furman2 and Ignacio E. Grossmann1
(1) Department of Chemical EngineeringCarnegie Mellon University
(2) Corporate Strategic ResearchExxonmobil Research and Engineering
Enterprise-wide Optimization Project
2
MotivationMotivationScheduling and Planning of crude oil is key problem in petrochemical refineries
Large cost savings can be realized with an optimum schedule for the movement of crude oil
VesselsStorageTanks
Charging Tanks
Crude-Distillation Unit
How to coordinate discharge of vessels with loading to storage?How to synchronize charging tanks with crude-oil distillation?
Economic refinery operation
3
Problem StatementProblem StatementCrude Supply Streams Storage
TanksCharging Tanks
Crude Distillation Units
Given:(a) Maximum and minimum inventory levels for a tank(b) Initial total and component inventories in a tank(c) Upper and lower bounds on the fraction of key components in the crude inside a tank(d) Times of arrival of crude oil in the supply streams(e) Amount of crude arriving in the supply streams(f) Fractions of various components in the supply streams(g) Bounds on the flowrates of the streams in the network(h) Time horizon for scheduling
Determine:(i) Inventory levels in the tanks at various points of time(ii) Flow volumes from one unit to another in a certain time interval(iii) Start and end times of the flows in the network
Objective: Minimize Cost
4
Previous WorkPrevious Work
Lee, H.; Pinto, J. M.; Grossmann, I. E.; Park, S. (1996). Lee, H.; Pinto, J. M.; Grossmann, I. E.; Park, S. (1996). Mixed Integer Linear Mixed Integer Linear Programming Model for Refinery ShortProgramming Model for Refinery Short--Term Scheduling of Crude Oil Term Scheduling of Crude Oil Unloading with Inventory Management. Unloading with Inventory Management. I&EC Res.I&EC Res., 35, 1630 , 35, 1630 --1641.1641.
JiaJia, Z.; , Z.; IerapetritouIerapetritou, M. G. (2003). , M. G. (2003). Refinery ShortRefinery Short--Term Scheduling UsingTerm Scheduling UsingContinuous Time Formulation: Crude Oil Operations. Continuous Time Formulation: Crude Oil Operations. I&EC Res.I&EC Res., 42, 3085 , 42, 3085 --3097. 3097.
FurmanFurman, K. C.; , K. C.; JiaJia, Z.; , Z.; IerapetritouIerapetritou, M. G. (2005). , M. G. (2005). A Robust EventA Robust Event--BasedBasedContinuous Time Formulation for Tank Transfer Scheduling. Continuous Time Formulation for Tank Transfer Scheduling. Work in Progress.Work in Progress.
5
Scheduling ModelScheduling Model
Continuous time formulation by Furman et al. (2006)
Based on time events where inputs and outputs for a unit can take place in the same time event
Assumption: No simultaneous input and output for a tankTransfers from one tank to another are denoted by streams
Formulation reduces number of binary variables required in the scheduling model
Minimize cost objectives.t. Tank constraints
Distillation unit (CDU) constraintsSupply stream constraintsVariable bounds
OpOptimization model
(P)(P)
– Total inventory in tank b at end of time event t– Inventory of component j in tank b at end of time
event t– Total flow in stream s in time event t– Flow of component j in stream s in time event t– Start time of flow in stream s in time event t– End time of flow in stream s in time event t– Existence of flow in stream s in time event t
tottsV ,jtsV ,
1,tsT2,tsT
tsw ,
Variables in the modeltot
tbI ,
jtbI ,
Binary Variables
ss
6
Time representationTime representation
Tank ATank A
Tank BTank B1
,ab tT 2,ab tT 1
, 1ab tT +2
, 1ab tT +
-- Instead of using global times t, events t are usedInstead of using global times t, events t are used
-- Instead of timing of individual operations, timing of transfersInstead of timing of individual operations, timing of transfers is usedis used
Event tEvent t Event t+1Event t+1
7
Model ConstraintsModel Constraints
Crude inflow
Crude outflow
Tank constraints
Total Inventory balances
Individual component balancesNon-linear equations containing Bilinearities
Crude Tank
Duration constraintsTo bound the flow of a stream into/from a tank in a particular time event
Simple sequencing constraints
Bounds on component fractions inside a tank
8
Model Constraints (Model Constraints (ContdContd …… ))Distillation unit constraints
Continuous operation constraint
Allocation constraintsAt most one CDU can be charged by a charging tank at a timeAt most one charging tank can charge a CDU at any point of time
Crude-mix demand constraints
Overall mass balances
Component mass balances
Start and end timing constraints
Crude supply stream constraints
Feed
Products
..
.
9
NonNon--convex MINLPconvex MINLP
Minimize a cost objective similar to the one by Jia and Ierapetritou (2003)min total cost = waiting cost for supply streams
+ unloading cost of supply streams+ inventory cost for each tank over scheduling horizon+ setup cost for charging CDUs with different charging tanks
Overall model ≡ (P) Non-convex MINLP
Convex relaxation of (P)(obtained by linearizing non-linear equations in Tank constraints and introducing McCormick estimators (1976) for bilinear terms)
MILP≡ (R)
Objective function:
Scheduling problem modeled as a Mixed Integer Nonlinear Program (MINLP)Discrete variables used to determine which flows should exist and whenModel is non-linear and non-convex
10
Global Optimization of MINLPGlobal Optimization of MINLPLarge-scale non-convex MINLPs such as (P) are very difficult to solve
Commercial global optimization solvers fail to converge to solution in tractable computational times
Special Outer-Approximation algorithm proposed to solve problem to global optimality
Guaranteed to converge to global optimum given certain tolerance between lower and upper bounds
Upper Bound : Feasible solution of (P)
Lower Bound : Obtained by solving a MILP relaxation (R) of the non-convex MINLP model with Lagrangean Decomposition based cuts added to it
NLP fixed 0-1
Master MILP
Upper Bound
Lower Bound
11
Spatial Decomposition of the NetworkSpatial Decomposition of the Network
D1
D2
Crude Supply Streams Storage
TanksCharging Tanks
Crude Distillation Units
Network is split into two decoupled sub-structures D1 and D2Physically interpreted as cutting some pipelines (Here a, b and c)Set of split streams denoted by p {a , b, c }∈
ab
c
12
Decomposition of the modelDecomposition of the modelCreate two copies of the variables pertaining to the split streams and get two sets of duplicate variables :
These duplicate variables are related by equality constraints which are added to (R) to get model (RP):
and
The equations involving the split streams are re-written in terms of the newly created variables
Non-anticipativity constraints in (RP) are multiplied by Lagrange multipliers and transferred to objective function to bring model to a decomposable form which isdecomposed into sub-models (LD1) and (LD2)
Non-anticipativityconstraints
{ }tptptpjtp
tottp wTTVV ,
2,
1,,, ,,,,
{ }1,
1,2,
1,1,
1,,
1,, ,,,, tptptp
jtp
tottp wTTVV
{ }2,
2,2,
2,1,
2,,
2,, ,,,, tptptp
jtp
tottp wTTVV
tpVV tottp
tottp ,02,
,1,
, ∀=−
tpjVV jtp
jtp ,,02,
,1,
, ∀=−
tpTT tptp ,02,1,
1,1, ∀=−
tpTT tptp ,02,2,
1,2, ∀=−
tpww tptp ,02,
1, ∀=−
13
Decomposed SubDecomposed Sub--modelsmodelsmin z1 = waiting cost for supply streams + unloading
cost of supply streams + inventory cost for tanks in D1 over scheduling horizon + setup costs for charging CDUs in D1 with different charging tanks + Optimize to
get solution *1z
Sub-problem involves duplicate variables
{ }1,
1,2,
1,1,
1,,
1,, ,,,, tptptp
jtp
tottp wTTVV
(LD1)
∑∑∑∑∑∑∑∑∑∑∑ ++++p t
tpw
tpp t
tpT
tpp t
tpT
tpj p t
jtp
Vtpj
p t
tottp
Vtottp wTTVV 1
,,1,2
,2,
1,1,
1,
1,,,,
1,,, λλλλλ
s.t. Tank constraintsDistillation unit constraintsSupply stream constraints Variable bounds
min z2 = inventory cost for tanks in D2 over scheduling horizon + setup costs for charging CDUs in D2 with different charging tanks +
Optimize to
get solution *2z
{ }2,
2,2,
2,1,
2,,
2,, ,,,, tptptp
jtp
tottp wTTVV
(LD2)
∑∑∑∑∑∑∑∑∑∑∑ −−−−−p t
tpw
tpp t
tpT
tpp t
tpT
tpj p t
jtp
Vtpj
p t
tottp
Vtottp wTTVV 2
,,2,2
,2,
2,1,
1,
2,,,,
2,,, λλλλλ
s.t. Tank constraintsDistillation unit constraintsVariable bounds
Sub-problem involves duplicate variables
14
Cut GenerationCut GenerationUsing solutions and we develop the following cuts :
Add above cuts to (R) to get (R′) which is solved to obtain a valid lower bound onglobal optimum of (P)
Remark: Update Lagrange multipliers and generate more cuts to add to (R)
*1z *
2z
waiting cost for supply streams + unloading cost of supply streams + inventory cost for tanks in D1 over scheduling horizon + setup costs for charging CDUs in D1 with different charging tanks +
≤*1z
∑∑∑∑∑∑∑∑∑∑∑ ++++p t
tpw
tpp t
tpT
tpp t
tpT
tpj p t
jtp
Vtpj
p t
tottp
Vtottp wTTVV ,,
2,
2,
1,
1,,,,,, λλλλλ
inventory cost for tanks in D2 over scheduling horizon + setup costs for charging CDUs in D2 with different charging tanks +
≤*2z
∑∑∑∑∑∑∑∑∑∑∑ −−−−−p t
tpw
tpp t
tpT
tpp t
tpT
tpj p t
jtp
Vtpj
p t
tottp
Vtottp wTTVV ,,
2,
2,
1,
1,,,,,, λλλλλ
Lagrange Multipliers
15
Advantages of Cut GenerationAdvantages of Cut Generation
Lower bound obtained is at least as strong as one from conventional Lagrangeandecomposition or LP relaxation of (R)
Alternative decomposition schemes can be used to generate more cuts to add to relaxation (R)
D3
D4Crude Distillation Units
Crude Supply Streams
StorageTanks
Charging Tanks
16
Proposed AlgorithmProposed Algorithm
Preprocessing
Bound Contraction optional
Solve Lower BoundingProblem
Solve Upper BoundingProblem
UB – LB <= tolerance ?STOP
Solution = UB
Add Integer Cuts
No Yes
Includes cutting planegeneration
Variant of Outer-Approximation ( Duran and Grossmann, 1986)
17
Illustrative ExampleIllustrative Example3 Supply streams – 6 Storage Tanks – 4 Charging Tanks – 3 Distillation units
Scheduling Horizon 15 hours
Number of supply streams 3
Arrival Time
Incoming Volume of
crude
Fraction of key component
IN1 1 60 0.03
IN2 6 60 0.05
IN3 11 60 0.065
0.075 (0.07 – 0.08)6010 – 90Tank6
0.075 (0.07 – 0.08)3010 – 90Tank5
0.065 (0.06 – 0.07)4010 – 110Tank4
0.05 (0.04 – 0.06)5010 – 110Tank3
0.03 (0.02 – 0.04)1010 – 110Tank2
0.031 (0.025 – 0.038)6010 – 90Tank1
Initial fraction of key component (min –
max)
Initial InventoryCapacity
6Number of Storage Tanks
0.075 (0.071 – 0.08)3080Tank4
0.0633 (0.06 – 0.065)3080Tank3
0.0483 (0.043 – 0.05)3080Tank2
0.0317 (0.03 – 0.035)580Tank1
Initial Fraction of key component (min –
max)
Initial InventoryCapacity
3Number of Charging Tanks
Bounds on flowrates in the streams: Lower Bound : 1, Upper Bound : 40
Number of CDUs : 3Waiting cost for supply streams (Csea): 5Unloading cost for supply streams (Cunload): 7Tank inventory costs (Cinv(b)): storage tanks – 0.05
charging tanks – 0.06Changeover cost for charged oil switch (Cset): 30Demand of mixed oils by CDUs : oil mix 1 60
oil mix 2 60 oil mix 3 60 oil mix 4 60
18
Optimal Crude Flow ScheduleOptimal Crude Flow ScheduleGantt chart of optimal schedule
Start time of crude unloading
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
time (hrs) -->
CT3
CT2
CT4
CT1
ST6
ST5
ST4
ST3
ST2
ST150
10
20
30
30
5
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
time (hrs) -->
ST1
ST2
ST3
ST4
ST5
ST6
IN1
IN3
IN2
IN1
60
60
555
Crude vessel to storage tanks
Crude transfers between storage and charging tanks
19
Optimal Crude Flow ScheduleOptimal Crude Flow Schedule
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
time (hrs) -->
CDU1 being Charged CDU2 being Charged CDU3 being Charged
DU2
DU1
DU3CT4CT3CT4
CT2CT3
CT1CT2
303030
3030
6030
Gantt chart of optimal schedule
Charging schedule for distillation units
20
Computational ResultsComputational ResultsOriginal MINLP model (P)
Example Number of Binary Variables
Number of Continuous Variables
Number of Constraints
1 48 300 946
2 42 330 994
3 57 381 1167
383.698928.60383.69383.693
361.636913.92.27359.48351.322
291.93827.70.37282.19281.141
Local optimum(using DICOPT)
Total time taken for
one iterationof algorithm*
(CPUsecs)
Relaxation gap (%)
Upper bound [on solving
(P-NLP) using
BARON ](zP-NLP)
Lower bound [obtained by
solving relaxation (RP) ]
(zRP)
Example
8025.91258100189.19383.6915874.83029600147.24383.693
5873.2310600133.80351.3214481.7931700113.35351.322
758.833430068.45281.141953.3940800-55.24281.141
Time taken to solve (RP)*
(CPUsecs)
No. of nodes
LP relaxation at root node
Solution (zRP)
Time taken to solve (R)* (CPUsecs)
No. of nodes
LP relaxation at root node
Solution(zR)
Solving MILP model (RP)(including proposed cuts)Solving MILP model (R)
Example
* Pentium IV, 2.8 GHz , 512 MB RAM
Solvers : MILP CPLEX 9.0, NLP BARON 7.2.5 (Sahinidis, 1996)
3 Supply streams 3 Supply streams –– 6 Storage tanks 6 Storage tanks –– 4 Charging tanks 4 Charging tanks –– 3 Distillation units3 Distillation units
3 Supply streams 3 Supply streams –– 3 Storage tanks 3 Storage tanks –– 3 Charging tanks 3 Charging tanks –– 2 Distillation units2 Distillation units
3 Supply streams 3 Supply streams –– 3 Storage tanks 3 Storage tanks –– 3 Charging tanks 3 Charging tanks –– 2 Distillation units2 Distillation units
BARON could not guarantee global optimality in more than 10 hours*
21
SummarySummary
New continuous time formulation used to represent the scheduling of crude oilat the front-end of a refinery
Scheduling model is a non-convex MINLP
Special Outer-Approximation algorithm proposed to solve problem to global optimality
Main idea : Generation of cutting planes for speeding up solution of MILP relaxation