7/25/2019 Tesis Tamara Cassio
1/192
CranfieldUNIVERSITY
Cassio R. Tamara
Oil Refinery Scheduling
Optimisation
School of Engineering
Department of Process & Systems
Engineering
MSc Thesis
7/25/2019 Tesis Tamara Cassio
2/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
ii
CranfieldUNIVERSITY
School of Engineering
Department of Process & System Engineering
MSc Thesis
Academic Year 2002-2003
Cassio R. Tamara
Oil Refinery SchedulingOptimisation
Supervisor: Dr. Zhigang Shang
September 2003
This thesis is submitted in partial fulfilment of the requirements for theDegree of Master of Science
Cranfield University, 2003. All rights reserved. No part of this publication may be
reproduced without the written permission of the copyright owner
7/25/2019 Tesis Tamara Cassio
3/192
i
ABSTRACT
Nowadays, the development of global competition has been one of the main factors
that have driven the efforts toward the optimisation development. Therefore, oil
refineries have been encouraged to be restructured for competing successfully in this
new scenario with low profit margin, tighter environmental regulations and more
efficient plant operation. However, many years and a lot of human and computational
efforts have been dedicated to improve the techniques applied for the overall refinery
optimisation. Good developments have come successfully operating at the planning
level; but developing and solving rigorous overall plant optimisation models at the
production scheduling level still are at research stage and much more work must bedone to continue improving in this field through the involvement of difficult tasks due
to the mathematical complexity of the models which have the compulsory use of a
large quantity of equations and variables that hugely increase the size of the problem.
This Thesis presents a new generic mixed integer linear programming model for
optimising the scheduling of crude oil unloading, inventories, blending and feed to oil
refineries that usually unload several kinds of crude oils with different compositions.The objective function of the model consists on minimising the operational cost
generated during the mentioned operation. Case studies are presented and compared
each other illustrating the capabilities of the model to solve operation scheduling
problems in this area and to support future expansion projects for the system as they
happen in real situations. The solution involves optimal operation of crude oil
unloading, optimal transfer rates among equipments in accordance with the pumping
capacities and tank volume limitations, optimal oscillation of crude oil blended
compositions and fulfilment of the oil charging demand per process unit.
7/25/2019 Tesis Tamara Cassio
4/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
ii
ACKNOWLEDGEMENT
In memory of my father.
I still remember when I left my country far away from here, with my wife and my two little
children to come to Cranfield, full of hopes and wishes, with the only purpose to study and fulfil
my major dream attending and completing post grade studies abroad in a well known university
as Cranfieldis known. It was a difficult decision to come to the UK with limited resources in the
middle of my professional productive career, with more than 15 years of continuous work in an
oil refinery from Ecopetrol.
I would like to give my thanks to my wife Norma, my daughter Natalia and my son Sebastian for
staying with me during the long months living and sharing together busy and happy moments,
as well as uncertain times. Moreover, I really appreciate the constant prayers of my mother and
my wife during all our stay here.
Furthermore, I would like to give my thanks to Colfuturo which gave me the financial support for
my tuition fees and part of my living expenses. On the other hand, despite the policies and the
difficult moments encountered by Ecopetrol and my country, I really appreciate the tireless and
willing support from the oil refinery manager Mr. Antonio Escalante searching for economical
approval to cover the financial support given by Colfuturo . Thanks also to Mrs Martha
Espinosa, Mr Carlos Bustillo, Mr Jorge Villalba and other important people at the high staff and
board level that were supporting the process.
Finally, I really appreciate the advice and support from Dr. Zhigang Shang for encouraging meto improve the quality and value of my Thesis and his high motivation towards my research.
Furthermore, I would also like to give my thanks to Professor Mike Sanderson, Mrs Linda
Withfield and Mrs Janet Dare for all their kind support and help from the Process and System
Engineering Department during this very important year of my life. From Mr Ivor Rhodes, I
thank him for patiently keeping me on the waiting list to come to Cranfield for three years.
Cassio Tamara, Cranfield, 28th August 2003
7/25/2019 Tesis Tamara Cassio
5/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
iii
TABLE OF CONTENTS
Chapter 1. INTRODUCTION.......................................................................................1
1.1 Oil Refinery Optimisation....................................................................................1
1.2 Other facts and Developments about Oil Refinery Optimisation. .......................31.3 Present Work........................................................................................................6
Chapter 2. OVERVIEW OF SCHEDULING OPTIMISATION ..................................8
2.1 Scheduling General Concern. ..............................................................................8
2.2 Crude Oil Inventory Scheduling Optimisation. ...................................................9
2.3 Review of Production Scheduling Developments .............................................10
Chapter 3. PRODUCTION SCHEDULING PROBLEM DEFINITION....................13
3.1 Problem Definition.............................................................................................13
3.2 Optimisation Model Formulation Introduction..................................................16
3.3 Model Mathematical Formulation. ....................................................................21
3.3.1 Vessel Arrival and Departure Operation Rules. .........................................22
3.3.2 Material Balance Equations for the Vessel.................................................243.3.3 Material Balance Equations for the Storage Tank. .....................................25
3.3.4 Material Balance Equations for the Charging Tank. ..................................27
3.3.5 Material Balance Equations for Component k in the Storage Tank. ..........28
3.3.6 Material Balance Equations for Component k in the Charging Tank.........29
3.3.7 Operating Rules for Crude Oil Charging to Crude Distillation Units. .......30
3.3.8 Problem Solving Direction. ........................................................................30
3.4 Chapter Summary. ............................................................................................33
Chapter 4. MODEL REAL TEST................................................................................35
4.1 Introduction........................................................................................................36
4.2 Example 1 Results and Analysis........................................................................37
4.3 Example 2 Results and Analysis........................................................................424.4 Example 3 Results and Analysis........................................................................49
4.5 Chapter Summary ..............................................................................................55
Chapter 5. MODEL APPLICATION TO A PRACTICAL CASE..............................57
5.1 Presentation of Case 1........................................................................................58
5.2 Scheduling Alterations of Case 1.......................................................................66
5.3 Bigger Scheduling Alteration of Case 1. ...........................................................72
5.4 Effect of Not Control Oil Sulphur Content Applied to Case 1..........................78
5.5 Effect of Not having Tank Inventory Cost for Case 1. ......................................81
5.6 Effect Caused by a High Reduction in Changeover Cost for Case 1.................82
5.8 Chapter Summary. .............................................................................................82
Chapter 6. MODEL APPLICATION TO CASES WHERE THE SYSTEM
EQUIPMENT LIMITATIONS ARE HIGHLIGHTED. .............................................84
6.1 Case 2, Effect of Increasing the Vessel Unloading Volume..............................84
6.2 Scheduling Alteration of Case 2. .......................................................................91
6.3 Case 3, Effect of a High Increase in Unloading Cost. .......................................95
6.4 Case 4, Effect of CDU Shut Down. ...................................................................98
6.5 Chapter Summary. ...........................................................................................101
Chapter 7. MODEL APPLICATION TO CASES WHERE THINKING EITHER IN
REVAMP OR CHANGE EQUIPMENT IS POSSIBLE...........................................103
7.1 Cases 5 and 6, Increasing Capacity of Charging Tanks...................................103
7.2 Case 7, Effect of Changing Pumping Rate Capacity. ......................................112
7/25/2019 Tesis Tamara Cassio
6/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
iv
7.3 Case 8, Increasing Capacity of Storage Tanks.................................................116
7.4 Chapter Summary. ...........................................................................................120
Chapter 8. CONCLUSIONS AND FUTURE WORKS ............................................122
8.1 Conclusions......................................................................................................122
8.2 Future Works. ..................................................................................................123BIBLIOGRAFY.........................................................................................................125
APENDIX A ..............................................................................................................127
A.1 Example 1 Computer hardcopy output ...........................................................127
A.2 Example 2 Computer hardcopy output ...........................................................131
A.3 Example 3 Computer hardcopy output ...........................................................137
A.4 Case 1 Computer hardcopy output..................................................................143
A.5 Case 2 Computer hardcopy output..................................................................150
A.6 Case 3 Computer hardcopy output.................................................................156
A.7 Case 6 Computer hardcopy output..................................................................163
APENDIX B ..............................................................................................................170
7/25/2019 Tesis Tamara Cassio
7/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
v
LIST OF FIGURES
Figure 1.1- The cycle of refining operations. ................................................................3
Figure 1.2 - Optimisation Efforts for improving profitability .....................................5
Figure 3.1 - Problem Representation. ..........................................................................13Figure 4.1 Oil flow network for example 1. .............................................................38
Figure 4.2 Example 1. Storage tank optimal volume variation. ...............................40
Figure 4.3 Example 1. Charging tank optimal volume variation..............................40
Figure 4.4 Example 1. Optimal feeding to the crude distillation unit. Solid bars:
Blended oil X ; Blank bar: Blended oil Y. ...........................................................41
Figure 4.5 Example 1. Optimal component concentration variation in charging
tanks. ....................................................................................................................41
Figure 4.6 Example 1. Optimal results from the existing model (right side). ..........42
Figure 4.7 Oil flow network for example 2. .............................................................43
Figure 4.8 Example 2. Storage tank optimal volume variation. ...............................46
Figure 4.9 Example 2. Charging tank optimal volume variation.............................46Figure 4.10 Example 2. Optimal feeding to the CDU 1. Dashed bars: blended oil 2;
solid bars: blended oil 3. ......................................................................................47
Figure 4.11 Example 2. Optimal feeding to the CDU 2. Blank bars: blended oi1 1;
Dashed bars: blended oil 2; solid bars: blended oil 3. .........................................47
Figure 4.12 Example 2. Optimal concentration variation of component 1 in charging
tanks. ....................................................................................................................48
Figure 4.13 Example 2. Optimal concentration variation of component 2 in charging
tanks. ....................................................................................................................48
Figure 4.14 Example 2. Optimal results from the existing model. ..........................49
Figure 4.15 Oil flow network for example 3. ...........................................................50
Figure 4.16 - Example 3. Storage tank optimal volume variation. ..............................53Figure 4.17 - Example 3. Charging tank optimal volume variation. ..........................53
Figure 4.18 - Example 3. Optimal feeding to the CDU 1. Dashed bars: blended oil 2;
solid bars: blended oil 3. ......................................................................................54
Figure 4.19 - Example 3. Optimal feeding to the CDU 2. Blank bars: blended oil 1;
solid bars: blended oil 3. ......................................................................................54
Figure 4.20 Example 3. Optimal results from the existing model. ...........................55
Figure 5.1 Oil Flow Next Work for the Oil Refinery. ..............................................57
Figure 5.2 - Case1. Storage tank volume variation results. .........................................62
Figure 5.3 - Case1. Charging tank volume variation results........................................62
Figure 5.4 - Case 1. Feeding to the crude distillation unit results. Solid bars: blended
oil 1; blank bars: blended oil 2.............................................................................63
Figure 5.5 - Case 1. Crude oil sulphur content variation results in charging tanks.....65
Figure 5.6 - Case1a. Storage tank volume variation results. .......................................68
Figure 5.7 - Case1a. Charging tank volume variation results......................................68
Figure 5.8 - Case1a .Crude oil sulphur content variation results in charging tanks. ...69
Figure 5.9 - Case1b. Storage tank volume variation results. .......................................71
Figure 5.10 - Case1b. Charging tank volume variation results....................................71
Figure 5.11 - Case1b. Crude oil sulphur content variation results in charging tanks. .72
Figure 5.12 - Case1c. Storage tank volume variation results. .....................................74
Figure 5.13 - Case1c. Charging tank volume variation results....................................75
7/25/2019 Tesis Tamara Cassio
8/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
vi
Figure 5.14 - Case 1c. Feeding to the crude distillation unit results. Solid bars:
blended oil 1; blank bars: blended oil 2. ..............................................................75
Figure 5.15 - Case1c. Crude oil sulphur content variation results in charging tanks. .76
Figure 5.16 - Case 1d. Storage tank volume variation results. ....................................79
Figure 5.17 - Case1d. Charging tank volume variation results....................................80Figure 6.1 - Case 2. Storage tank volume variation results. ........................................87
Figure 6.2 - Case 2. Charging tank volume variation results.......................................88
Figure 6.3 - Case 2. Feeding to the crude distillation unit results. Solid bars: blended
oil 1; blank bars: blended oil 2.............................................................................89
Figure 6.4 - Case 2. Crude oil sulphur content variation results in charging tanks.....91
Figure 6.5 - Case 2a. Storage tank volume variation results. ......................................92
Figure 6.6 - Case 2a. Charging tank volume variation results.....................................93
Figure 6.7 - Case 2a. Feeding to the crude distillation unit. Solid bars: blended oil 1;
blank bars: blended oil 2. .....................................................................................94
Figure 6.8 - Case 2a. Crude oil sulphur content variation results in charging tanks. ..95
Figure 6.9 - Case 3. Storage tank volume variation results. ........................................96Figure 6.10 - Case 3. Charging tank volume variation. ...............................................97
Figure 6.11 - Case 3. Feeding to the crude distillation unit. Solid bars: blended oil 1;
blank bars: blended oil 2. .....................................................................................97
Figure 6.12 - Case 4. Storage tank volume variation results. ......................................99
Figure 6.13 - Case 4. Charging tank volume variation results...................................100
Figure 6.14 - Case 4. Feeding to the crude distillation unit. Solid bars: blended oil 1;
blank bars: blended oil 2. ...................................................................................100
Figure 7.1 - Case 5. Storage tank volume variation results. ......................................104
Figure 7.2 - Case 6. Storage tank volume variation results. ......................................105
Figure 7.3 - Case 5. Charging tank volume variation results.....................................105Figure 7.4 - Case 6. Charging tank volume variation results.....................................106
Figure 7.5 - Case 5. Feeding to the crude distillation unit results. Solid bars: blended
oil 1; blank bars: blended oil 2...........................................................................107
Figure 7.6 - Case 6. Feeding to the crude distillation unit results. Solid bars: blended
oil 1; blank bars: blended oil 2...........................................................................107
Figure 7.7 - Case 5. Crude oil sulphur content variation in charging tanks. .............110
Figure 7.8 - Case 6. Crude oil sulphur content variation in charging tanks. .............110
Figure 7.9 - Case 7c. Storage tank volume variation results. ....................................114
Figure 7.10 - Case 7c. Charging tank volume variation. ...........................................114
Figure 7.11 - Case 8. Storage tank volume variation results. ....................................117
Figure 7.12 - Case 8. Charging tank volume variation results...................................118Figure 7.13 - Case 8. Feeding to the crude distillation unit results. Solid bars: blended
oil 1; blank bars: blended oil 2...........................................................................118
7/25/2019 Tesis Tamara Cassio
9/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
vii
LIST OF TABLES
Table 4.1 - Comparisons of optimal results with an existing model. ..........................36
Table 4.2 - System information for Example 1............................................................39
Table 4.3 Example 1. Optimal unloading starting date for vessels. .........................39Table 4.4 - System information for Example 2............................................................44
Table 4.5 Example 2. Optimal unloading starting date for vessels. .........................45
Table 4.6 - System information for Example 3............................................................51
Table 4.7 Example 3. Optimal unloading starting date for vessels. .........................51
Table 5.1 - Case 1. Input data summary. ....................................................................60
Table 5.2 - Case 1. Unloading start and finish results. ................................................61
Table 5.3 - Case 1.Vessel volume variation (bbl x 1,000) results. ..............................61
Table 5.4 - Case 1. Results for volumetric flow rate (bbl x 1,000) per day from vessels
to storage tanks. ...................................................................................................64
Table 5.5 - Case 1. Results for volumetric flow rate (bbl x 1,000) per day from storage
tanks to charging tanks.........................................................................................64Table 5.6 - Case 1a. First change of arriving schedule. ...............................................66
Table 5.7 - Case 1a. Unloading start and finish results. ..............................................67
Table 5.8 - Case 1b. Second change of the arriving schedule. ....................................69
Table 5.9 - Case1b. Unloading start and finish results. ...............................................70
Table 5.10 - Case 1c. Bigger change of the arriving schedule. ...................................73
Table 5.11 - Case 1c. Unloading start and finish results. ............................................74
Table 5.12 - Case 1c. Vessel volume variation (bbl x 1000) results. ..........................74
Table 5.13 - Case 1c. Results for Volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks. ....................................................................................76
Table 5.14 - Case 1c. Results & comparisons among different crude oil volumes for
storage tank 1. ......................................................................................................77Table 5.15 - Case 1d. Unloading start up and finish results. .......................................79
Table 5.15 - Case 1d. Results for volumetric flow rate in bbl x 1000 per day from
storage to charging tanks. ....................................................................................80
Table 5.16 - Case 1e. Results for volumetric flow rate (bbl x 1,000) per day from
vessels to storage tanks. .......................................................................................81
Table 5.17 Resource summary used to solves cases.................................................82
Table 6.1 - Case 2. Input data summary. ....................................................................85
Table 6.2 - Case 2.Unloading start and finish results. .................................................86
Table 6.3 - Case 2. Vessel volume variation (bbl x 1000) results. ..............................86
Table 6.4 - Case 2. Results for volumetric flow rate (bbl x 1,000) per day from
vessels to storage tanks. .......................................................................................89
Table 6.5a - Case 2. Results for volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks. ....................................................................................90
Table 6.5b - Case 2. Results for volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks. ....................................................................................90
Table 6.6 - Case 2a. First change of arriving schedule. ...............................................91
Table 6.7 - Case 2a. Unloading start and finish results. ..............................................92
Table 6.8 - Case 2a. Results for volumetric flow rate (bbl x 1000) per day from
vessels to storage tanks. .......................................................................................94
Table 6.9 - Case 3. Unloading start and finish results. ................................................96
7/25/2019 Tesis Tamara Cassio
10/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
viii
Table 6.10 - Case 3. Results for volumetric flow rate (bbl x 1000) per day from
vessels to storage tanks. .......................................................................................98
Table 6.11 - Case 4. Unloading start and finish results. ..............................................99
Table 6.12 Resource summary used to solves cases...............................................101
Table 7.1 - Cases 5 and 6. Unloading start and finish results. ...................................104Table 7.2 - Case 5 and 6. Volumetric flow rate in bbl x 1,000 per day from vessels to
storage tanks.......................................................................................................108
Table 7.3a - Case 5. Results for volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks. ..................................................................................108
Table 7.3b - Case 5. Results for volumetric flow rate (bbl x 1,000) per day from
storage tanks to charging tanks ..........................................................................109
Table 7.4a - Case 6. Results for volumetric flow rate (bbl x 1000) per day from
storage to charging tanks. ..................................................................................109
Table 7.4b - Case 6. Results for volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks. ..................................................................................109
Table 7.5 - Case 6. Comparisons / different charging tank capacities.......................112Table 7.6 - Case 7. Input data summary exception....................................................112
Table 7.7a - Case 7c. Results for volumetric flow rate in bbl x 1,000 per day from
storage to charging tanks. ..................................................................................115
Table 7.7b - Case 7c. Results for volumetric flow rate in bbl x 1,000 per day from
storage to charging tanks. ..................................................................................115
Table 7.8 - Case 8. Unloading start and finish results. ..............................................117
Table 7.9 - Case 8. Results for volumetric flow rate (bbl x 1,000) per day from vessels
to storage tanks. .................................................................................................119
Table 7.10a - Case 8. Results for volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks. ..................................................................................119Table 7.10b - Case 8. Results for volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks. ..................................................................................119
Table 7.11 - Case 8. Comparisons / different storage tank capacities. ......................120
Table 7.12 Resource summary used to solves cases...............................................121
7/25/2019 Tesis Tamara Cassio
11/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
ix
NOTATION
CDU Crude Distillation Unit
CDUs Crude Distillation Units
LP Linear Programming
MILP Mixed Integer Linear Programming
MINLP Mixed Integer Non Linear Programming
NLP Non Linear Programming
LPG Liquefied Petroleum Gas
bbl Barrels
v vessel number
i storage tank number
j,y charging tank number
l crude distillation unit number
t time interval number
V vessel quantity along the scheduling horizon
I quantity of storage tanks in the system
J quantity of charging tanks in the system
L quantity of crude distillation units in the system
VE grouping of vessels or tankers
ST grouping of storage tanks
CT grouping of charging tanks
CDU grouping of crude distillation units
COMP grouping of crude oil components
SCH grouping of time intervals
VSimax
storage tank maximum capacity
VSimin
storage tank minimum capacity
VBjmax
charging tank maximum capacity
VBjmin
charging tank minimum capacity
CUv unloading cost of vessel vper unit time interval
CSEAv sea waiting cost of vessel v per unit time interval
CSINVi inventory cost of storage tank iper unit time interval
7/25/2019 Tesis Tamara Cassio
12/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
x
CBINVj inventory cost of storage tank iper unit time interval
CCHANGl changeover cost of CDU l
TARRv crude oil vessel arrival date
TLEAv crude oil vessel maximum departure date
PUMPCAPv maximum pumping system capacity per vessel v
PUMPCAPi maximum pumping system capacity per storage tank i
EVv,k concentration of component kin the crude oil vessel v
ESi,k concentration of component kin storage tank i
DMCDUt,l demand of each CDU l per time interval
TOTDMCDUl total demand of each CDU lalong the scheduling horizon
DMBCOj demand of each blended crude oilj along the scheduling horizon
XFv,t binary variable denoting if vessel vstarts unloading at time t
XLv,t binary variable denoting if vessel v finishes unloading at time t
XWv,t binary variable denoting if vessel vis unloading its crude oil at time t
F i,j,t binary variable denoting if storage tank i is feeding charging tanks
D j,l,t binary variable denoting if charging tankj is feeding CDU lat time t
Z j,y,l,t binary variable for the changeover from charging tankj toy
TFv integer variable denoting vessel v unloading initiation time
TLv integer variable denting vessel v unloading completion time
VVv,t continuous variable for crude oil volume vessel v
VSi,t continuous variable for crude oil volume in storage tank i
VBj,t continuous variable for crude oil volume in charging tankj
FVS v,i,t continuous variable for flow rate from vessel v to storage tank i
FSB i,j,t continuous variable for flow rate from st. tank ito ch. tankj
FBC j,l,t continuous variable for flow rate from charging tankjto CDU lFKVS v,i,k,t cont. variable for flow rate of component kfrom vessel vto st. tank i
FKSB i,j,k,t cont. variable for flow rate of component k from st. tank ito ch. tank j
FKBC j,l,k,t cont. variable for flow rate of component kfrom st. tankj to CDU l
VKS i,k,t continuous variable for component k volume in storage tank i
VKB j,k,t continuous variable for component k volume in charging tankj
ES i,k,t continuous variable for component kconcentration in storage tank i
EB j,k,t continuous variable for sulphur concentration in charging tankj
7/25/2019 Tesis Tamara Cassio
13/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
xi
COST continuous variable for the total optimal operational cost
FVS v,i,tmax
maximum flow rate from vessel vto one storage tank i
FVS v,i,tmin minimum flow rate from vessel v to one storage tank i
FSB i,j,tmax maximum flow rate from storage tank i to one charging tankj
FSB i,j,tmin
minimum flow rate from storage tank ito one charging tankj
FBC j,l,tmax
maximum flow rate from charging tankjto one CDU l
FBC j,l,tmax
minimum flow rate from charging tankjto one CDU l
ESi,kmax
maximum concentration of component kin storage tank i
ESi,kmin
minimum concentration of component kin storage tank i
EBj,kmax
maximum concentration of component kin charging tankj
EBj,kmin minimum concentration of component k in charging tankj
7/25/2019 Tesis Tamara Cassio
14/192
1
Chapter 1. INTRODUCTION.
1.1 Oil Refinery Optimisation.
The encouragement to optimise the production planning in oil refineries comes from
the mid fifties when the first applications of linear programming appeared for crude
oil blending and product pooling. Since then, the potential benefits of optimisation for
process operations have come continuously improving. This phenomenon has been
accentuated by the development of global competition and the emergence of
international markets generated from the eighties. Therefore, the competence has
become hard and many oil refineries and petrochemical industries are being
restructured for competing successfully in this new scenario with requirements of low
profit margin, tighter environmental regulations, and more efficient plant operation.
In addition, unit optimizers have been introduced with the implementation of
advanced control systems, generating significant gains in the productivity of the
plants. These successful results have increased the demand for more complexautomation systems that take into account the production objectives {Zhang 2000}.
However, unit optimizers determine optimal values of the process variables but
simply considering current operational conditions {Pinto, Joly, et al. 2000} within a
plant subsystem.
On the other hand, the optimisation of subsystems in the plant does not assure the
global economic optimisation of the plant. The objectives of individual subsystems in
the plant are usually conflicting among them and as consequence; they contribute to
suboptimal and many times infeasible operations. Furthermore, the lack of
computational technology for production scheduling has been the main obstacle for
the integration of production planning objectives into process operations {Barton,
Allgor, et al. 1998}. This integration would help to foresee and solve all the possible
operation infeasibilities on time.
7/25/2019 Tesis Tamara Cassio
15/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
2
Oil refinery managers are increasingly concerned with improving the planning and
scheduling of their operations for achieving better results and increasing the profit
margin. The major factor that makes this labour difficult among others is the dynamic
nature of the economic environment assisted by the continuous changing of markets.
Then, oil refineries must face the potential impact of demand variations for final
product specifications, volumes requested and prices or even be able to explore
immediate market opportunities {Joly, Moro, et al. 2002}.
Furthermore, the most successful refineries are those which closely monitor their
performance, adjust properly their operations and identify the main weakness for
promptly correcting them {Zhang 2000}. There are many decisions involved to
achieve the optimal operation of an oil refinery. From the managerial level, managers
need to decide which crude oils to purchase, which oil blended compositions to
process, which products to produce, which operating rules to follow, which catalyst to
use, which operating mode to use for each process and so on. And from the process
level, operators have to determine and control the detailed operation conditions for
each equipment and subsystem in the plant. Finally, all decisions should interact the
best among each other {Zhang & Zhu 2000}.
Nevertheless, an operation cycle (See Fig. 1.1), has been proposed by {Pelham &
Pharris 1996} for oil refineries to help to integrate the main functions and achieve
profitable manufacturing by producing quality products under a safe operating
margin. The cycle starts with central planning to determine long term and mid-term
operations. Then, scheduling deals with the short term day-to-day operations.
Advanced control and on line optimisation should translate the goals set by planningand scheduling to real time process targets, which should be executed by regulatory
control. Monitoring and analysing the results will provide feedbacks to the initial
decision-making procedure. The cycles should be completed with overall refinery
optimisation. The main task consists of finding the best combination of those
decisions to maximise the overall profit. Since overall refinery optimisation almost
covers all the aspects relating to the profit making refinery operations, this is still
considered one of the most difficult and challenging optimisation tasks.
7/25/2019 Tesis Tamara Cassio
16/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
3
Figure 1.1- The cycle of refining operations.
1.2 Other facts and Developments about Oil Refinery Optimisation.
As it was mentioned above since the fifties when linear programming technology
started to produce industrial applications mainly for planning purposes, considerable
research efforts have been applied for oil refinery optimisation. As a result, problems
have been formulated as linear models only because the algebraic applied between
variables are linear or can be closely approximated by linear equations. However, for
process operations which have highly non linear formulations, regarding the kinetics,
thermodynamics, hydromechanics, etc, usually the operation still is manually
controlled based on the operators experience.
The availability of LP-based commercial software for refinery production planning,
such as RPMS (Bonner and Moore, 1979) and PIMS (Process Industry Modelling
System-Bechtel Corp., 1993) have allowed the development of general production
plans for the whole refinery, which can be interpreted as general trends. Then, it is
possible to consider that planning technology is well developed, fairly standard and
widely understood and major changes could not be seen, but evolutionary changes
Planning
Monitoring
Analysis Scheduling
RegulatoryControl
Advanced controland optimisation
7/25/2019 Tesis Tamara Cassio
17/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
4
could occur {Pelham & Pharris 1996 }. In fact, nowadays it already has started to
appear interesting particular development for overall plant and oil refinery production
planning using non linear programming (NLP) techniques {Moro, Zanin, et al. 1998};
{Zhang & Zhu 2000} and {Pinto & Moro 2000}. But, there are still few commercial
tools for production scheduling and these have not allowed a rigorous presentation of
plant particularities {Moro, Zanin, et al. 1998}. For that reason, refineries are
developing in-house tools strongly based on simulation in order to obtain essential
information for a given system {Magalhaes, Moro, et al. 1998 } very particular for
each refinery. Then, nowadays the efforts are strongly guided toward the development
of production scheduling packages that represent the particularities of each plant or
system. In addition, the major work expected in the future whether this development
is successful should be the integration in one integrated information system of the
production planning and the scheduling functions, which allow planners and
schedulers to operate from a single workstation using applications that have access to
the same databases.
The current situation is similar as fig. 1.2 shows. Fewer efforts have been required to
achieve the biggest benefits by preparing the strategic planning and even the
production planning using linear programming in a horizon of one month up to one
year or more. Then, linear programming has come addressing the long term planning
optimisation models achieving these objectives with no major problems. If it moves
down in the fig. 1.2; much more efforts have to be applied to increase the profit
margin in much less proportion. These are the cases related with the production
scheduling and the process operation level which should handle period of time from
hourly base to horizon up to 15 days.
On the other hand, there are some books and papers that mention specific applications
based on mathematical programming, which compare continuous LP and formulations
using MILP, MINLP or NLP and point out the low applicability of models based only
on continuous variables and discuss the lack of rigorous models for refinery
scheduling using other formulations. A mixed integer linear program (MILP) is the
extension of the LP model that involves discrete variables that help to greatly expands
7/25/2019 Tesis Tamara Cassio
18/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
5
the ability to formulate and solve real-world problems, because logical decisions
(those with variables 0 or 1) can be included. Moreover, in reason of the
combinatorial nature introduced by discrete variables in MILP problems, these have
been very hard to solve. However, MILP and MINLP techniques are essential for
solving optimisation problems in the production scheduling field that mostly relies on
discrete variables.
Figure 1.2 - Optimisation Efforts for improving profitability
In summary, the integration of new technologies into process operations is an
essential profitability factor and this can be achieved by through appropriate planning
and scheduling {Joly, Moro, et al. 2002}. Therefore, the importance of on line
integration of planning, scheduling and control has come increasing. Overall plant and
oil refinery production planning presently continue relying on linear programming,
while process optimisation mainly has used either mixed integer linear (MILP), non
linear (NLP) or mixed integer non linear (MINLP) programming techniques. For
individual process or subsystem optimisations, rigorous models have been used to
optimise detailed operating conditions, such as temperatures, detailed process flow
rates, tank volume fluctuations, pressures, blending range compositions, etc. The
results of this kind of optimisation are much closer to the reality. However, there is
still no proper link so far between an overall plant linear programming (LP)
optimisation and different process optimisations in MILP, NLP or MINLP.
7/25/2019 Tesis Tamara Cassio
19/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
6
1.3 Present Work.
The main purpose of this Thesis out of briefly facilitating the understanding of the
huge work that still is demanding the oil refinery optimisation at the scheduling level,
is to develop for oil refineries a new generic scheduling MILP model for optimising
the total operational cost for all the operation that involves the crude oil unloading,
inventory, blending and feeding to crude distillations units in oil refineries, that is one
of the most critical scheduling work in oil refineries due to the operational and
economic impact that it represents. Then, the model development includes the
scheduling of vessel unloading, storage and inventory control, blending and crude oil
component composition control and feeding to crude distillation units. The model
emphasises along the scheduling horizon to strictly follow all the system restrictions
i.e. crude oil component composition range; maximum pumping rate; continuous
feeding rate to guarantee regular feeding to CDUs and so on.
In addition, chapter 2 presents an overview of scheduling optimisation and briefly
reviews all the quite few developments made for production scheduling in oil
refineries pointing out their main particularities. Chapter 3 describes the problem
definition and presents the mathematical formulation of the new model; also it points
out through the chapter content the main conceptual and mathematical differences
between this new model and the model made by {Lee, Pinto, et al. 1996}.
Particularly, in chapter 4, the new model is tested applying the same conditions given
by the examples indicated by {Lee, Pinto, et al. 1996} to show the advantages of the
new model and the shortcomings of the existing model made by {Lee, Pinto, et al.
1996} comparing both results. The model presented by {Lee, Pinto, et al. 1996} isthe oldest one better illustrated found in the literature for this similar purpose and
have encouraged subsequent developments in this field.
On the other hand, some practical cases are presented along chapters 5, 6 and 7
following the request of one particular oil refinery from ECOPETROL, Colombia;
they have been solved using the model to show its advantages and strengths for
solving other examples with different conditions. However, most of the data and
7/25/2019 Tesis Tamara Cassio
20/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
7
conditions used for the cases are close to the reality for whichever oil refinery. For
better understanding of these cases it is recommendable to start reviewing them from
chapter 5. Some examples and comparisons among them are shown to explain the
benefits of the model not only for production scheduling optimisation, also for helping
to discover and solve equipment limitations and to analyse the impact caused by
equipment expansion applications logically inside the production scheduling scheme,
keeping the target of the operational cost optimisation. Some of the example features
ever have been shown so far in any paper. Thus, it is demonstrated through the
examination of the cases that the new model is flexible and could be adapted to solve
similar cases in oil refineries.
Chapter 8 presents the conclusion of the Thesis and future works. Appendix A shows
partial hardcopy outputs from GAMS {Brooke, Kendrick, et al. 1998 } indicating
only the solve summary and the data used in the Thesis for all the three examples
analysed in chapter 4 and for some practical cases analysed in chapters 5,6 and 7.
Normally, one output per exercise involves more than 100 pages showing all the
features of the solving steps to get the optimal solution as well as the solution
summary and data mentioned. On the other hand, appendix B shows as an example,
the model programmed using the software GAMS, specifically for solving case 1.
Other examples and cases were run changing the input data according to the new
conditions and adding or taking away some equations or constraints according to the
model mathematical formulation explained in chapter 3.
Finally, due the handling of a huge amount of equations and variables by the model
for solving these examples and cases; definitely, the documentation was found to beindispensable for the software GAMS{Brooke, Kendrick, et al. 1998 } used to
program the model which helped to assist solving the model equations and
constraints for obtaining the optimal solutions for all the problem conditions.
7/25/2019 Tesis Tamara Cassio
21/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
8
Chapter 2. OVERVIEW OF SCHEDULING OPTIMISATION
2.1 Scheduling General Concern.
The scheduling is strongly related to the planning at other levels, and it affects many
types of decisions in the oil refinery. The ability to efficiently construct high quality,
feasible and low cost schedules is therefore crucial for the refinery in order to be
competitive.
The scheduling should be concerned about which mode of operation to use in either
each process plant or each plant subsystem at each point of time, in order to satisfy the
demand for a given set of products. A mode of operation for a process plant is
specified by the combination of products consumed and produced in the process, and
by the yield levels for each of the products. Changeovers between modes of operation
cause disturbances and extra costs to the refinery. Hence, long sequences of the same
mode of operation applying few changeovers are preferred. However, long sequences
imply larger inventory volumes for some products and an increased need for storage
capacity with associate larger holding and capital costs. Thus, there must be a trade-
off between the negatives effects of frequents changeovers (feed switch and start up
costs), and the cost of keeping large inventory volumes {Goethe-Lundgren, Lundgren,
et al. 2002}.
On the other hand, scheduling models are intended to determine the timing of the
actions to execute the plan, taking in account i.e. available storage, arrivals of
feedstock (by vessels or oil pipes) and handling of blending compositions. Theyshould focus on the when to do. They investigate the limitations imposed by space
and time. Then, an accurate description of the initial inventory in all the tanks
(compositions and quantities) and a prediction of all the streams required or presented
in the boundary of the system during the coming days are needed. They should draw
attention to problems encountered in storage (overflow or shortage) and timing
(demurrage). Solving these problems may require rescheduling, reallocation of
storage facilities or even reformulation of another plan {Hartmann 1998} .
7/25/2019 Tesis Tamara Cassio
22/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
9
In addition, regarding the scope of the new model developed in this Thesis; the model
is designed to help to solve all the concerns mentioned above related to the scheduling
problem. Moreover, the activities of crude oil unloading, storage, blending and
feeding operations, are considered one of the major bottlenecks in the production
chain in oil refineries and therefore, it is interesting to start assisting with the model to
solve the scheduling concerns from this area where delays imply loss of time and lack
of resources and deliveries ahead of the deadlines may cause excess of inventory. At
the end of the day, every refinery must proceed with efficient schedules regarding
theses activities within their operational planning scope.
2.2 Crude Oil Inventory Scheduling Optimisation.
Typically, an oil refinery receives its crude oil through a pipeline, which is linked to a
docking station where oil vessels or tankers unload. The unloading schedule of these
tankers is usually defined at the corporate level and can not be changed easily {Joly,
Moro, et al. 2002}. Thus, for a given scheduling horizon, the number, type and
arriving and departure times of the oil tankers are known a priori.
This thesis is focused on the production scheduling optimisation of operation modes
concerning crude oil vessel unloading, storage, blending and feed to crude distillation
units (CDUs). The new optimisation model proposes the strategic operation for the
system in accordance with the given conditions and the optimal operational cost
calculated. The strategic operation if it is feasible must follow the proposed suitable
unloading days for vessels and the proposed flow rates among vessels and tanks,
among storage and charging tanks and among tanks and plants for keeping the optimalproduction scheduling given by the model results. Moreover, this model can be used
as a viable tool not only for supporting the shipment planning, also for discovering
system infeasibilities and for strategic decisions concerning investments in storage
and pumping systems.
The purpose is to satisfy the demand while the inventory volumes and the pumping
system capacities are not violated. The shipment plan requires to be realizable in
7/25/2019 Tesis Tamara Cassio
23/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
10
terms of production, and a cross checking between the shipment plan and the
corresponding required feeding to plants according to the production schedule should
be done to be sure that the feeding can be done in due time {Goethe-Lundgren,
Lundgren, et al. 2002 }. Moreover, the new optimisation model will help to do this
cross checking and answer whether a shipment plan definitely can match in terms of
production or not.
On the other hand, the need for some supporting optimisation tools for the scheduling
is also accentuated by the frequent change in the planning situation. For example, the
shipment plan may change since it is based on forecasts of demand and vessels may
arrive delayed or interchanged. Whenever a change occurs in the shipment plan, a re
scheduling of the involved system needs to be carried out in order to not lose money
stopping the possible operational cost increase by this effect. Moreover, there would
be other non planned situations for instance that could affect the production
scheduling and therefore, a rescheduling also is needed to check if the conditions are
still feasible and the optimal operational cost has not been negatively impacted i.e.
crude oil vessel unloading volume increase; cost alteration in vessel operations and so
on.
In summary, the new optimisation model can be used to evaluate whether a suggested
shipment plan is feasible or not, to evaluate the optimal operational cost incurred by a
particular shipment plant, and to support decisions on whether a shipment plan
should be changed or not. Of great importance to mention, it is also the possibility of
analysing many scenarios and to be able to make fast evaluations of consequences of
sudden changes in shipment plans, proposed changes in some tanks or pumpscapacities, etc.
2.3 Review of Production Scheduling Developments
A good mention of important contributions to the production planning and scheduling
in oil refineries already has been done through chapters 1 and 2. However, regarding
the concern of this Thesis related to the optimal operational scheduling for crude oil
7/25/2019 Tesis Tamara Cassio
24/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
11
unloading, inventory , blending and feeding to CDUs, the first MILP works were
reported by {Shah 1996 }and {Lee, Pinto, et al. 1996 }.{Shah 1996} complementarily
mentions that his model could be extended to cover the design of tanks not giving any
practical example about this matter and {Lee, Pinto, et al. 1996 } particularly presents
a better illustrated model than {Shah 1996}, focused on using a continuously feed
following a demand of blended crude oils for charging the CDUs . Other
developments in this area have appeared later by {Pinto, Joly, et al. 2000}; {Joly,
Moro, et al. 2002}; {Goethe-Lundgren, Lundgren, et al. 2002} ; {Mas & Pinto 2003 }
and {Jia, Ierapetritou, et al. 2003 }. {Pinto, Joly, et al. 2000} and {Joly, Moro, et al.
2002} present a MILP problem unloading the crude oil by scheduled batches of
different composition through a single oil pipeline instead unloading from vessels;
moreover, they use only one set of tanks for managing the storage and blending
operations just before feeding the CDUs. {Goethe-Lundgren, Lundgren, et al. 2002}
emphasises the operation modes and formulates a MILP model considering an
example changing storage tank capacities for analysing future investments. {Mas &
Pinto 2003} presents a decomposition strategy applying several MILP models for
each subsystem of a large system analysed which has events too difficult to solve
simultaneously and {Jia, Ierapetritou, et al. 2003 } propose a solution which leads to a
MILP model with fewer binary and continuous variables and fewer constraints saving
computer time; moreover, their model was tested using the same condition data of the
examples of {Lee, Pinto, et al. 1996 }; nevertheless, the results from {Jia, Ierapetritou,
et al. 2003} show that the optimal operational costs have increased for three out of
four examples of {Lee, Pinto, et al. 1996 }; specifically, 8.76 % more for example 1,
10.82% more for example 2 and 1.98 % more for example 4; example 3 presents a
reduction of 3.68 %; but, they do not present any explanation with respect to the costincrease.
On the other hand, considering another section of the oil refinery, few developments
for the production scheduling optimisation have been done for particular process
plants in oil refineries. These applications should involve models developed using
MILP or MINLP techniques. {Joly, Moro, et al. 2002} develops a MINLP model for
managing the production scheduling problem in a fuel oil and asphalt plant including
7/25/2019 Tesis Tamara Cassio
25/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
12
its inventory control and distribution; but the MINLP is transformed to a MILP
because no global solution was guaranteed by the convectional MINLP solution
algorithms due to the bilinear terms in the viscosity constraints. {Magalhaes, Moro,
et al. 1998} describes the development of an integrated production scheduling system
(SIPP) for an oil refinery that at the date of the paper publication was in
commissioning. The system integrates other refinery applications and databases and
the MILP optimisation techniques; but they do not refer to any interface done between
the LP-tool at the planning level and the tools used at the scheduling level. Even at the
scheduling level is not mentioned any interface among the applications that works at
this level and the MILP optimisation techniques used. The SIPP user has to apply an
iterative process until the scheduling programme is feasible. Moreover, special care
should be applied to identify is the feasible solution is the optimal. On the other hand,
process units models are presented as steady-state based in the data input from the
LP-planning and instead, tanks and pipelines have transient models. Separately, they
mention an application using MILP techniques to assist the scheduling production of
the LPG area and their future intention to be managed by the SIPP.
Finally, regarding the production scheduling optimisation of finished product
blending , storage and distributions, it has been other developments by {Breiner Avi
& Maman 2001 } and {Jia & Ierapetritou 2003}. {Breiner Avi & Maman 2001}
introduces a MINLP developed system (MPMP) successfully installed in an oil
refinery for managing and optimising the final product blending and storage
production scheduling. The MINLP is extremely difficult to solve satisfactorily and
hence, they use a four step algorithm and separate the MILP from the NLP operation
for solving it. On the other hand, {Jia & Ierapetritou 2003} introduces a MILP modelto manage the operation of gasoline finished products in an oil refinery, specifically
blending, storage and distribution pipelines.
7/25/2019 Tesis Tamara Cassio
26/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
13
Chapter 3. PRODUCTION SCHEDULING PROBLEM
DEFINITION.
This chapter presents the problem definition and the mathematical formulation of the
production scheduling optimisation problem for the unloading, storage, blending and
feeding of an oil refinery. The new model will be formulated using general notation
showing the possibility of using the model for a general problem of this matter.
3.1 Problem Definition
The system configuration for this production scheduling optimisation modelcorresponds to a multistage system consisting of vessels, storage tanks, charging
tanks, and CDUs as is illustrated in fig.3.1.
Figure 3.1 - Problem Representation.
For a given scheduling horizon, crude oil vessels arrive to the refinery docking station
which only allows one vessel for unloading. In accordance with the planning level
each vessel will have a reasonable date for leaving that should be at most the date that
the next vessel arrives. The day one vessel arrives could start to unload depending of
7/25/2019 Tesis Tamara Cassio
27/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
14
the optimal results recommended by the model in accordance with all the current
conditions of the system analysed. The day one vessel finishes unloading should be up
to one day before its maximum departure date fixed at the planning level; the reason is
because the maximum departure date allowed for the preceding vessel is the same
planned arriving date of the next vessel and potentially this next vessel could start
unloading on the arriving date. Instead {Lee, Pinto, et al. 1996} is not clear in their
model description about the established limit for the vessel departure date after it has
completed unloading. Each time that a vessel rescheduling is done, the maximum
departure dates for vessels are reformulated in accordance with the new arriving dates
for each vessel and both will be new input conditions to the optimisation model for
avoiding basic interferences.
The crude oil is unloaded into storage tanks at the docking station and the problem
considers one pre selected storage tank per vessel that manages the same crude oil
composition of the vessel. Then, the crude oil is transferred from storage tanks to
charging tanks. Each crude oil inside the charging tank must carry out to be within a
range of blended crude oil composition determined at the planning level for the
scheduling horizon. The fulfilment of this blended composition range is made per tank
having in account the material balance of the remaining volume and the different
flows coming in or coming out the tank with their different compositions per time
interval. Then, blended crude oils from charging tanks are charged into the CDUs and
whenever that it is optimally required feed switches are done from one kind of
blended crude oil to another for each CDU. Finally, it is important to mention that
whether a charging tank is feeding a CDU, it must not be fed by any storage tank or
vice versa.
In addition, there will be probably special problems that could consider more storage
tanks than crude oil vessels and therefore, vessels have to unload to more than one
storage tank. This situation could be managed by the optimisation model carrying out
a pre established crude oil blended composition range in each storage tank like
charging tanks. Then, storage tanks have to carry out blending material balance
conditions and limitations the same presented in charging tanks i.e. they must not be
7/25/2019 Tesis Tamara Cassio
28/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
15
fed by vessels if they are feeding charging tanks or vice versa. Through the model
mathematical explanation, the equations that should be used to solve this particular
problem will be pointed out. This situation makes more difficult the solving solution
as it will be illustrated solving the example 3 of {Lee, Pinto, et al. 1996} in chapter 4.
On the other hand, the new model for the production scheduling optimisation
developed in this Thesis is concerned to meet a feed demand per each crude
distillation unit (CDU) and not concerned instead to meet a fixed demand of a specific
blended crude oil demand for charging the CDUs along the scheduling horizon,
disregarding the allowed charging rate variation per each CDU as {Lee, Pinto, et al.
1996} presents. However, the new model easily can be configured selecting the
properly required solving option depending on the desirable kind of demand for the
problem. Furthermore, to meet a feed demand to each plant does not mean that the
control of charging different blended crude oils will be lost; although, there is not a
fixed amount of blended oil to consume along the scheduling horizon, the manager
could know what kind of blended oil will optimally charge each CDU following its
feed changeovers i.e. either high or low sulphur content crude oil. Moreover, to meet
a feed demand guarantees the stable running of the plant along the scheduling horizon
and a clear understanding of the production planning fulfilment.
Although {Lee, Pinto, et al. 1996} shows in their existing model the operating
constraints for the flow rate variation, it is not clear how they manage the restriction
to total flow rates variation among vessels and tanks and among storage and charging
tanks. This new model totally takes care about this situation that is very important in
real situations in accordance with the pumping system capacities and the real flow
limitations with respect to pumping in parallel to different tanks from one single
source that could be either a tank or a vessel.
On the other hand, {Lee, Pinto, et al. 1996} compares the results from their example 1
and made comparisons between ruled based schedule and optimal schedules.
Regarding this matter, it is understood that ruled based or heuristic schedules are not
the best and therefore, this Thesis is interested not only to find the optimal schedules
7/25/2019 Tesis Tamara Cassio
29/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
16
and the optimal operational cost for each situation, also in exploring and analysing
how the optimal operational cost of the system could be improved, for instance
attending one manager concern like this: If there is some money to invest in the
feeding system to plants, what we should do to reduce the optimal operational cost
and simultaneously getting at each time interval (day) the feeding rates to plants
closer or equal to the maximum capacity as well. Finally, it is possible to observe
other own particularities of this new model along the model presentation and
explanation in this chapter.
3.2 Optimisation Model Formulation Introduction
Given the configuration of this multistage system and the arrival time of the vessels,
the equipment capacity limitations and the key component concentration ranges for
crude oils, the problem will focus on determine the following operating variables to
minimise costs:
a. Waiting time for each vessel in the sea after arriving.
b.
Unloading duration time for each vessel.
c. Crude oil unloading rate from vessels to storage tanks.
d. Crude oil transfer and blending rates from storage tank to charging tanks.
e. Inventory volumes of storage and charging tanks.
f. Crude distillation unit charging rates fulfilling the demand per each CDU.
Instead {Lee, Pinto, et al. 1996} sets to fulfil a demand of blended crude oils.
g. Sequence of type of blending crude oil to be charged in each CDU in
accordance with the optimal mode changeovers.
The following are the operating rules that have to be obeyed:
a. In the scheduling horizon each vessel for unloading should arrive and leave
the docking station.
b. If a vessel does not arrive at the docking station, it can not unload the crude
oil.
7/25/2019 Tesis Tamara Cassio
30/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
17
c. If a vessel leaves the docking station, it can not continue unloading the crude
oil.
d. The vessel can start unloading the same arriving date.
e.
The vessel can not unload on its maximum departure date. Except for the last
vessel.
f. While the charging tank is charging one CDU, crude oil can not be fed into
the charging tank and vice versa.
g. Each charging tank can feed at most one CDU at one time interval.
h. Each CDU is charged by only one blended crude oil at one time interval.
On the other hand these are the following operating constrains that must be met:
a. Equipment capacity limitations: Tank capacity and pumping rate.
b. Quality limitations of each blended crude oil: Range of component
concentrations in each blended crude oil.
c. Demand per interval of time (day) of each CDU. Instead {Lee, Pinto, et al.
1996}sets up to follow a demand of each blended crude oil for the scheduling
horizon.
The model minimises the operation cost for the total system shown. The model is
formulated using general notation and MILP formulation, showing the possibility of
using the model for a general problem of this matter. In order to develop the multi-
period MILP model, continuous and binary variables are associated with the system
network. The following are the assumptions for the proposed model:
a. Only one vessel docking station for crude oil unloading is considered.
b. The time applied for the changeover are neglected and also the transient flows
generated during either start up or shut down when a changeover is done.
c. Perfect blending is assume for each charging tank while it is being fed by
different crude oils, and additional blending time inside the tank is not
required before it charges the CDU.
7/25/2019 Tesis Tamara Cassio
31/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
18
d. The composition of the crude oil is decided by the amount of key components
presented in the crude oil or in the blended crude oil. In general, sulphur is at
least one of the key components for differentiating between crude oils.
A uniformed discretisation is chosen in the given scheduling horizon for the proposed
scheduling model. The selection of the length of each discretised time span involves a
trade off between accurate operation and computational effort. The reviewed cases in
this thesis involve 15 time intervals during the scheduling horizon. Instead, the 3
examples of {Lee, Pinto, et al. 1996}reviewed in this Thesis involve 8, 10 and 12
time intervals respectively.
The optimisation problem involves the following sets, parameters and variables:
Sets
VE= {v = 1, 2... V/ crude oil vessel or tankers}
ST= {i = 1, 2... I/ storage tanks}
CT= {j,y = 1, 2... J/ charging tanks}
COMP= { k = 1, 2... K/ crude oil components}
CDU= {l = 1, 2... L/ crude distillation units}
SCH= {t = 1, 2... T/ time intervals along the scheduling horizon}
Parameters
VSimax
: storage tank maximum capacity.
VSimin
: storage tank minimum capacity.
VBjmax
: charging tank maximum capacity.
VBjmin
: charging tank minimum capacity.
CUv : unloading cost of vessel vper unit time interval.
CSEAv : sea waiting cost of vessel vper unit time interval.
CSINVi : inventory cost of storage tank iper unit time interval.
CBINVj: inventory cost of charging tankjper unit time interval.
CCHANGl: changeover cost of CDUl.
7/25/2019 Tesis Tamara Cassio
32/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
19
TARRv: crude oil vessel arrival date to the docking station.
TLEAv: crude oil vessel maximum departure date from the docking station.
PUMPCAPv: maximum pumping system capacity or total flow capacity from each
vessel vto storage tanks.
PUMPCAPi :maximum pumping system capacity or total flow capacity from each
storage tank ito charging tanks.
EVv,k : concentration of component kin the crude oil vessel v.
ESi,k : concentration of component kin the crude oil of storage tank i.
ESi,kmin
: minimum concentration of component k in the blended crude oil of storage
tank i.
ESi,kmax: maximum concentration of component k in the blended crude oil of storage
tank i.
EBj,kmin: minimum concentration of component k in the blended crude oil of charging
tankj.
EBj,kmax
: maximum concentration of component k in the blended crude oil of
charging tankj.
DMCDUt,l : demand of each CDU l per time interval.
TOTDMCDUl : total demand of each CDU l along the scheduling horizon.
DMBCOt,j : demand of each blended crude oilj along the scheduling horizon. It will
be used to solve the examples of {Lee, Pinto, et al. 1996}.
FVS v,i,tmax:maximum crude oil rate from vessel vto one storage tank i.
FVS v,i,tmin:minimum crude oil rate from vessel v to one storage tank i. This variable
is not mandatory to have a value. It could be either 0 or a positive value depending of
the minimum flow restriction for the vessel pumping system that normally is assisted
working in series with the refinery pumping system to storage tanks.FSB i,j,t
max: maximum crude oil rate from storage tank ito one charging tankj.
FSB i,j,tmin
: minimum crude oil rate from storage tank ito one charging tank j. By
default this parameter has a value of 0 as the minimum value. A small optimal flow
rate if it is optimally required could be managed with centrifugal pumps and process
control instrumentation.
7/25/2019 Tesis Tamara Cassio
33/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
20
FBC j,l,tmax
: maximum crude oil rate from charging tankjto one CDU l. In general
this value corresponds to the maximum CDU lfeed capacity or it could be adjusted to
a lower value.
FBC j,l,tmin: minimum crude oil rate from charging tank jto one CDU l.This value
could be adjusted to the same valueDMCDUt,l, depending on the problem conditions.
Binary variables
XFv,t : variable to denote if vessel vstarts unloading at time t.
XLv,t : variable to denote if vessel vfinishes unloading at time t.
XWv,t : variable to denote if vessel vis unloading its crude oil at time t.
F i,j,t : variable to denote if the crude oil blended in storage tank iis feeding charging
tanks at time t; otherwise storage tank icould be being fed by vessel v.
D j,l,t : variable to denote if the crude oil blended in charging tankjcharges CDU lat
time t; otherwise charging tankjcould be being fed by storage tanks.
Z j,y,l,t : variable to denote switch of the blended crude oil fed to CDU l from the
charging tankjto the chargingy.
In teger variables
TFv : vessel v unloading initiation time.
TLv : vessel v unloading completion time.
Continuous variables
VVv,t: volume of crude oil in vessel v at time t.
VSi,t: volume of crude oil in storage tank i at time t.
VBj,t: volume of crude oil in charging tankj at time t.FVS v,i,t: volumetric flow rate from vessel vto storage tank i at time t.
FSB i,j,t: volumetric flow rate from storage tank i to charging tankj at time t.
FBC j,l,t: volumetric flow rate from charging tankj to CDU l at time t.
FKVS v,i,t: volumetric flow rate of component k from vessel v to storage tank i at time
t.
FKSB i,j,k,t: volumetric flow rate of component k from storage tank i to charging tankj
at time t.
7/25/2019 Tesis Tamara Cassio
34/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
21
FKBC j,l,k,t: volumetric flow rate of component kfrom storage tankj to CDU lat time
t.
VKS i,k,t : volume of component kin storage tank iat time t.
VKB j,k,t : volume of component kin charging tankjat time t.
ES i,k,t : concentration of component k in the blended crude oil of storage tank iat
time t.
EB j,k,t : concentration of component k in the blended crude oil of charging tank j at
time t.
COST : total optimal operational cost.
In itial conditions
VVv, TARRv : initial volume of crude oil vessel at time equal TARRv .
VSi,1 : initial volume of storage tank iat time equal 1 in the start up of the scheduling
horizon.
VBj,1 : initial volume of charging tank j at time equal 1 in the start up of the
scheduling horizon.
ES i,k,1 : concentration of component kin the blended crude oil of storage tank iat
time tequal 1 in the start up of the scheduling horizon.
EB j,k,1 : concentration of component kin the blended crude oil of charging tank jat
time tequal 1 in the start up of the scheduling horizon.
VKS i,k,1 : initial volume of component kin storage tank iat time tequal 1 in the start
up of the scheduling horizon .
VKB j,k,1 : initial volume of component kin charging tank jat time tequal 1 in the
start up of the scheduling horizon.
3.3 Model Mathematical Formulation.
The model focus on minimising the following operation cost of the system for the
operations of crude oil vessel unloading, storage, blending and feeding to crude
distillation units in an oil refinery. Then, this is the main objective equation that
represents the total operation cost of the system:
7/25/2019 Tesis Tamara Cassio
35/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
22
V V
COST = [(TLv -TFv + 1) CUv ] + [ (TFv - TARRv ) CSEAv ] +v=1 v=1
I T
[ (VSi,t+ VS i,t+1) CSINVi/2] +i=1 t=1
J T
[ (VB j,t+ VS j,t+1) CBINVj/2] +j=1 t=1
J J L T
(CCHANGl Z j,y,l,t) (3.1)j=1 y=1 l=1 t=1
The above equation is subjected to the following constrains:
3.3.1 Vessel Arrival and Departure Operation Rules.
Each vessel must arrive to the docking station for unloading only once through the
scheduling horizon:
T
XFv,t = 1 , v VE (3.2)t=1
Each vessel leaves the docking station only once through the scheduling horizon:
T
XLv,t = 1 , v VE (3.3)t=1
The unloading initiation time is denoted by the following equation:
T
TFv = tXFv,t , v VE (3.4)t=1
The unloading completion time is denoted by the following equation:
T
TLv = tXLv,t , v VE (3.5)
t=1
7/25/2019 Tesis Tamara Cassio
36/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
23
Each vessel must start unloading either after or on the arrival time established at the
planning level:
TFv TARRv , v VE (3.6)
Each vessel must finish unloading up to one interval of time before the maximum
departure time established at the planning level:
TLv < TLEAv , v VE , v V (3.7)
Except for the last vessel:
TLv TLEAv , v = V (3.8)
Minimum duration of the vessel unloading is two time intervals:
TLv - TFv 1 , v VE (3.9)
The preceding vessel must finish unloading one time interval before the next vessel in
the sea arrives and starts to unload:
TFv+1 TLv + 1 , v VE (3.10)
Unloading of vessel vonly will be possible between time TFv and TLv:
T
XWv,t XFv,t , t m , v VE,t=1
m { m= TARRv , TLEAv} (3.11)
T
XWv,t XLv,t , t >m , v VE,t=1
m
{ m= TARRv , TLEAv} (3.12)
7/25/2019 Tesis Tamara Cassio
37/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimisation
MSc Process & System Engineering Cranfield University 2003
24
3.3.2 Material Balance Equations for the Vessel.
The crude oil in vessel vat time t+1 must be equal to the crude oil in vessel vat time t
taking away the crude oil transfer from vessel v to storage tank iat time t:
VVv,t= VVv, TARRv , t = TARRv (3.13)
I
VV v,t+1 = VVv,t - FVS v,i,t , v VE , t SCH (3.14)i=1
The crude oil of each vessel vhas different composition. Then, if there is one storage
tank assigned to each vessel, the solution must guarantee that the crude oil from each
vessel vis transferred to the corresponded storage tank iwhich will handle the same
vessel crude oil composition. Then, for this general case, iis equal to v to identify the
respective storage tank for the vessel:
I T I T
FVS v,i,t = FVS v,i,t , v VE,
i=1 t=1 i=1 t=1
i=v(only valid for one side of the equation) (3.15)
If there is more storage tanks than vessels, the problem could consider managing
crude oil blending composition ranges per storage tank and then, each vessel could
optimally unload to several tanks meeting with the pre established blending range for
each storage tank as it was explained above. Whether this is the case, equation 3.15 is
not useful and must not be used for this situation. However, instead the following
equation should be used to control the total flow from each vessel to storage tanks
within a reasonable margin:
I
FVS v,i,t PUMPCAPv , v VE, t SCH (3.16)i=1
7/25/2019 Tesis Tamara Cassio
38/192
_____________________________________________________________________
Cassio R. Tamara Oil Refinery Scheduling Optimis