You are on page 1of 192

Cranfield UNIVERSITY

Cassio R. Tamara

Oil Refinery Scheduling


Optimisation

School of Engineering
Department of Process & Systems
Engineering
MSc Thesis

Cranfield UNIVERSITY
School of Engineering
Department of Process & System Engineering
MSc Thesis
Academic Year 2002-2003

Cassio R. Tamara

Oil Refinery Scheduling


Optimisation
Supervisor: Dr. Zhigang Shang
September 2003
This thesis is submitted in partial fulfilment of the requirements for the
Degree 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

_____________________________________________________________________
ii
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 be
done 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.

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 Cranfield is 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 me
to 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
_____________________________________________________________________
ii
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

TABLE OF CONTENTS
Chapter 1. INTRODUCTION.......................................................................................1
1.1 Oil Refinery Optimisation....................................................................................1
1.2 Other facts and Developments about Oil Refinery Optimisation. .......................3
1.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. ................................................24
3.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........................................................................42
4.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
_____________________________________________________________________
iii
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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. ..................................................................................................123
BIBLIOGRAFY.........................................................................................................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

_____________________________________________________________________
iv
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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. ..........................................................................13
Figure 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.............................46
Figure 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. ..............................53
Figure 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
_____________________________________________________________________
v
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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....................................80
Figure 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. ........................................96
Figure 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.....................................105
Figure 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...................................118
Figure 7.13 - Case 8. Feeding to the crude distillation unit results. Solid bars: blended
oil 1; blank bars: blended oil 2...........................................................................118

_____________________________________________________________________
vi
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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. .........................39
Table 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.........................................................................................64
Table 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. ......................................................................................................77
Table 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
_____________________________________________________________________
vii
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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....................................104
Table 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.......................112
Table 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. ..................................................................................119
Table 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

_____________________________________________________________________
viii
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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

vessel number

storage tank number

j,y

charging tank number

crude distillation unit number

time interval number

vessel quantity along the scheduling horizon

quantity of storage tanks in the system

quantity of charging tanks in the system

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

VSi

max

storage tank maximum capacity

VSimin

storage tank minimum capacity

VBjmax

charging tank maximum capacity

VBjmin

charging tank minimum capacity

CUv

unloading cost of vessel v per unit time interval

CSEAv

sea waiting cost of vessel v per unit time interval

CSINVi

inventory cost of storage tank i per unit time interval

_____________________________________________________________________
ix
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

CBINVj

inventory cost of storage tank i per 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 k in the crude oil vessel v

ESi,k

concentration of component k in storage tank i

DMCDUt,l

demand of each CDU l per time interval

TOTDMCDUl total demand of each CDU l along the scheduling horizon


DMBCOj

demand of each blended crude oil j along the scheduling horizon

XFv,t

binary variable denoting if vessel v starts unloading at time t

XLv,t

binary variable denoting if vessel v finishes unloading at time t

XWv,t

binary variable denoting if vessel v is 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 tank j is feeding CDU l at time t

Z j,y,l,t

binary variable for the changeover from charging tank j to y

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 tank j

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 i to ch. tank j

FBC j,l,t

continuous variable for flow rate from charging tank j to CDU l

FKVS v,i,k,t cont. variable for flow rate of component k from vessel v to st. tank i
FKSB

i,j,k,t

cont. variable for flow rate of component k from st. tank i to ch. tank j

FKBC j,l,k,t cont. variable for flow rate of component k from st. tank j 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 tank j

ES i,k,t

continuous variable for component k concentration in storage tank i

EB j,k,t

continuous variable for sulphur concentration in charging tank j

_____________________________________________________________________
x
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

COST

continuous variable for the total optimal operational cost

FVS v,i,t

max

maximum flow rate from vessel v to one storage tank i

FVS v,i,t

min

minimum flow rate from vessel v to one storage tank i

FSB i,j,t max maximum flow rate from storage tank i to one charging tank j
FSB i,j,t min minimum flow rate from storage tank i to one charging tank j
FBC j,l,t max maximum flow rate from charging tank j to one CDU l
FBC j,l,t max minimum flow rate from charging tank j to one CDU l
ESi,kmax

maximum concentration of component k in storage tank i

ESi,kmin

minimum concentration of component k in storage tank i

EBj,kmax

maximum concentration of component k in charging tank j

EBj,kmin

minimum concentration of component k in charging tank j

_____________________________________________________________________
xi
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 complex
automation 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.

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 planning
and 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.
_____________________________________________________________________
2
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Planning

Scheduling

Analysis

Advanced control
and optimisation

Monitoring

Regulatory
Control
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
_____________________________________________________________________
3
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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
_____________________________________________________________________
4
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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.
_____________________________________________________________________
5
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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} is
the 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
_____________________________________________________________________
6
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 be
indispensable 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
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 tradeoff 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. They
should 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} .
_____________________________________________________________________
8
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 optimal
production 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
_____________________________________________________________________
9
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 pumps
capacities, 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
_____________________________________________________________________
10
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 cost
increase.
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
_____________________________________________________________________
11
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 model
to manage the operation of gasoline finished products in an oil refinery, specifically
blending, storage and distribution pipelines.

_____________________________________________________________________
12
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 model
corresponds 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
_____________________________________________________________________
13
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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
_____________________________________________________________________
14
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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
_____________________________________________________________________
15
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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.
_____________________________________________________________________
16
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 multiperiod 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.

_____________________________________________________________________
17
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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}

Param eters
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 v per unit time interval.

CSEAv : sea waiting cost of vessel v per unit time interval.


CSINVi : inventory cost of storage tank i per unit time interval.
CBINVj : inventory cost of charging tank j per unit time interval.
CCHANGl : changeover cost of CDU l.
_____________________________________________________________________
18
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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 v to storage tanks.
PUMPCAPi : maximum pumping system capacity or total flow capacity from each
storage tank i to charging tanks.
EVv,k :

concentration of component k in the crude oil vessel v.

ESi,k :

concentration of component k in 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
tank j.
EBj,kmax

: maximum concentration of component k in the blended crude oil of

charging tank j.
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 oil j 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 v to 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 i to one charging tank j.
FSB

i,j,t

min

: minimum crude oil rate from storage tank i to 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.

_____________________________________________________________________
19
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

FBC j,l,t max : maximum crude oil rate from charging tank j to one CDU l . In general
this value corresponds to the maximum CDU l feed capacity or it could be adjusted to
a lower value.
FBC

j,l,t

min

: minimum crude oil rate from charging tank j to one CDU l .This value

could be adjusted to the same value DMCDUt,l , depending on the problem conditions.

Binary variables
XFv,t : variable to denote if vessel v starts unloading at time t.
XLv,t : variable to denote if vessel v finishes unloading at time t.
XWv,t : variable to denote if vessel v is unloading its crude oil at time t.
F i,j,t : variable to denote if the crude oil blended in storage tank i is feeding charging
tanks at time t; otherwise storage tank i could be being fed by vessel v.
D j,l,t : variable to denote if the crude oil blended in charging tank j charges CDU l at
time t; otherwise charging tank j could 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 tank j to the charging y.

Integer 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 tank j at time t.
FVS v,i,t : volumetric flow rate from vessel v to storage tank i at time t.
FSB i,j,t : volumetric flow rate from storage tank i to charging tank j at time t.
FBC j,l,t : volumetric flow rate from charging tank j 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 tank j
at time t.
_____________________________________________________________________
20
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

FKBC j,l,k,t : volumetric flow rate of component k from storage tank j to CDU l at time
t.
VKS i,k,t : volume of component k in storage tank i at time t.
VKB j,k,t : volume of component k in charging tank j at time t.
ES

i,k,t

: concentration of component k in the blended crude oil of storage tank i at

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.

Initial conditions
VVv, TARRv : initial volume of crude oil vessel at time equal TARRv .
VSi,1 : initial volume of storage tank i at 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 k in the blended crude oil of storage tank i at

time t equal 1 in the start up of the scheduling horizon.


EB j,k,1 : concentration of component k in the blended crude oil of charging tank j at
time t equal 1 in the start up of the scheduling horizon.
VKS i,k,1 : initial volume of component k in storage tank i at time t equal 1 in the start
up of the scheduling horizon .
VKB

j,k,1

: initial volume of component k in charging tank j at time t equal 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:

_____________________________________________________________________
21
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

COST =
v=1
I

-TFv + 1) CUv

+
v=1

[ (TFv - TARRv

) CSEAv

[ (VSi,t + VS i,t+1) CSINVi /2 ] +

i=1 t=1
J

[ (TLv

[ (VB j,t + VS j,t+1) CBINVj /2 ] +

j=1

t=1

(CCHANGl

j=1 y=1 l=1 t=1

Z j,y,l,t)

(3.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
t=1

XFv,t = 1 , v

VE

(3.2)

Each vessel leaves the docking station only once through the scheduling horizon:
T
t=1

XLv,t = 1 , v

VE

(3.3)

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

_____________________________________________________________________
22
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

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

(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 v only will be possible between time TFv and TLv:
T

XWv,t
m

XFv,t , t

m , v

VE,

t=1

{ m = TARRv , TLEAv }

(3.11)

XWv,t

XLv,t , t > m , v

VE,

t=1

{ m = TARRv , TLEAv }

(3.12)

_____________________________________________________________________
23
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

3.3.2 Material Balance Equations for the Vessel.


The crude oil in vessel v at time t+1 must be equal to the crude oil in vessel v at time t
taking away the crude oil transfer from vessel v to storage tank i at time t:
VVv,t = VVv, TARRv , t = TARRv

(3.13)

VV v,t+1 = VVv,t -

i=1

FVS v,i,t , v

VE , t

SCH

(3.14)

The crude oil of each vessel v has different composition. Then, if there is one storage
tank assigned to each vessel, the solution must guarantee that the crude oil from each
vessel v is transferred to the corresponded storage tank i which will handle the same
vessel crude oil composition. Then, for this general case, i is equal to v to identify the
respective storage tank for the vessel:
I

i=1

t=1

FVS v,i,t

i=1 t=1

FVS v,i,t , v

VE ,

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
i=1

FVS v,i,t

PUMPCAPv , v

VE

SCH

(3.16)

_____________________________________________________________________
24
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

The volume of the total crude oil transferred from vessel v to storage tanks during the
schedule horizon must be equal to the initial crude oil volume of vessel v:

i=1 t=1

FVS v,i,t

VVv, TARRv, v

VE

(3.17)

Equations 3.18 and 3.19 are the operating constraints on crude oil transfer rate from
vessel v to storage tank i at time t:

FVS v,i,tmin XWv,t


v

VE , i

FVS v,i,t
ST, t

FVS v,i,tmin (1- F i,j,t )


ST, j

FVS v,i,t
CT , v

FVS v,i,tmax XWv,t ,


SCH

(3.18)

FVS v,i,tmax (1 - F i,j,t ) , v


VE , t

SCH

VE ,
(3.19)

Equation 3.19 will be applicable only if storage tanks are managing crude oil blending
ranges. The term (1 - F

i,j,t

) denotes that if there is any oil transfer from vessel to

storage tank i , there is no oil transfer from storage tank i to any charging tank j at
time t.

3.3.3 Material Balance Equations for the Storage Tank.


The crude oil in storage tank i at time t+1 must be equal to the crude oil in storage
tank i at time t plus the crude oil transferred from vessel v to storage tank i at time t
taking away the crude oil transferred to charging tanks j at time t:

VSi,t

= VSi, 1 ,

t =1

(3.20)

_____________________________________________________________________
25
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

VS i,t+1 = VSi,t +
i

v=1

ST,

FVS v,i,t -

j=1

FSB i,j,t ,

SCH

(3.21)

Volume capacity limitation for storage tank i:


VSimin

VSimax ,

VSi,t

ST,

SCH

(3.22)

Equations 3.23 and 3.24 indicate the operating constraints on crude oil transfer rate
from storage tank i to charging tank j at time t:
FSB i,j,t

0
i

ST,

FSB i,j,t max ( 1- D j,l,t ) ,


CT, l

CDU , t

SCH

(3.23)

The term (1- D j,l,t ) denotes that if charging tank j is charging any CDU l , there is no
oil transfer from any storage tank i to charging tank j.

FSB i,j,t
i

ST, j

FSB i,j,t max F i,j,t ,


CT, t

SCH

(3.24)

Equation 3.24 will be applicable only if storage tanks are managing crude oil blending
ranges. The term F

i,j,t

denotes that if there is oil transfer from storage tank i to

charging tanks, it must not have oil transfer from a vessel v to storage tank i at time t.
There is no minimum set rate different from 0, because the problem considers the use
of centrifugal pumps commonly used for this kind of service and therefore, the
optimal flow FSB

i,j,t

could be controlled by process control instruments in any

optimal range including the optimal lower flows that would be required for one or
more time intervals along the scheduling horizon if the transfer between the storage
tank and one charging tank is not null at any interval of time t.
_____________________________________________________________________
26
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

However, the total maximum flow allowed by the capacity of the pump or the
pumping system from one storage tank i to several charging tanks j at time t is
controlled by the following constraint:

FSB i,j,t

j=1

PUMPCAPi , i

ST, t

SCH

(3.25)

Generally speaking, the flow rate from one storage tank to one charging tank(FSB i,j,t )
almost always is a little smaller than the total flow rate from the same tank to several
charging tanks (

FSB

i,j,t

) because the flow restrictions are bigger when the same

pumping system taking from one storage tank i is discharging to one charging tank j
circuit than when is discharging to several charging tanks. Furthermore, FSBi,j,tmax
depends on the system characteristics from each storage tank i to each charging tank
j. However, for the cases analysed in this Thesis; a symmetrical system is considered
and therefore, FSBi,j,t

max

will have the same value for each circuit from one storage

tank i to one charging tank j.


3.3.4 Material Balance Equations for the Charging Tank.
The crude oil blended in the charging tank j at time t+1 must be equal to the crude oil
in the charging tank j at time t plus the crude oil transferred from the storage tanks
taking away the crude oil transferred to the CDU l at time t:

VBj,t

= VBj, 1

VB j,t+1 = VBj,t
j

CT, t

, t =1

(3.26)
L

FSB i,j,t i=1

FBC j,l,t ,
l=1

SCH

(3.27)

Volume capacity limitation for charging tank j:


_____________________________________________________________________
27
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

VBjmin

VBjmax , j

VB j,t

CT, t

SCH

(3.28)

3.3.5 Material Balance Equations for Component k in the Storage Tank.


The volume of component k in storage tank i at time t+1 is equal to the volume of
component k in storage tank i at time t plus the volume of component k in crude oil
transferred from vessel v to the storage tank i taking away the volume of component k
in the blended crude oil i transferred to charging tanks at time t: (Theses equations
must be considered only if storage tanks have blending functions).
t = 1

VKS i,k,t = VKS i,k, 1 ,

(3.29)

VKS i,k,t+1

VKS i,k,t

CT , k

FKVS v,i,k,t

v=1

COMP ,

FKSB i,j,k,t

j=1

SCH

(3.30)

The following is the operating constraint on volumetric flow rate of component k from
vessel v to storage tank i:
FKVS v,i,k,t = FVS v,i,t EVv,k , v
i

ST , k

COMP ,

VE ,

SCH

(3.31)

The following are the operating constraints on volumetric flow rate of component k
from storage tank i to charging tank j:

FSB i,j,t ESi,kmin

FKSB i,j,k,t

CT , k

ST,

FSB i,j,t ESi,kmax


COMP ,

SCH

(3.32)

The limitations in the volume capacity for component k in storage tank i at time t are
given by:

_____________________________________________________________________
28
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

VS i,t ESi,kmin
i

VS i,t ESi,kmax

VKS i,k,t

ST , k

COMP , t

SCH

(3.33)

3.3.6 Material Balance Equations for Component k in the Charging Tank.


The volume of component k in charging tank j at time t+1 is equal to the volume of
component k in charging tank j at time t plus the volume of component k in crude oil
transferred from storage tanks to the charging tank j taking away the volume of
component k in the blended crude oil j transferred to CDU l at time t:
VKB j,k,t = VKB j,k, 1 ,

t = 1
I

VKB j,k,t+1
j

VKB j,k,t

CT , k

FKSB i,j,k,t

i=1

COMP , t

FKBC j,l,k,t ,

l=1

SCH

(3.34)

The following is the operating constraint on volumetric flow rate of component k from
storage tank i to charging tank j:
FKSB i,j,k,t = FSB i,j,t ESi,k ,
i

ST ,

CT , k

COMP ,

SCH

(3.35)

Constraint 3.35 is not needed when storage tanks are operating as blending tanks.
The following are the operating constraints on volumetric flow rate of component k
from charging tank j to CDU l:
EBj,kmin

FBC j,l,t
j

CT , l

FBC j,l,t EBj,kmax

FKBC j,l,k,t
CDU, k

COMP

SCH

(3.36)

The limitations in the volume capacity for component k in charging tank j at time t are
given by:
_____________________________________________________________________
29
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

VBj,k,t EBj,kmin
j

VBj,k,t x EBj,kmax

VKB j,k,t

CT , k

COMP

SCH

(3.37)

3.3.7 Operating Rules for Crude Oil Charging to Crude Distillation Units.
As it was stated above each CDU l only can be charged by one charging tank j at time
t:
J
j=1

D j,l,t = 1 ,

CDU , t

SCH

(3.38)

On the other hand, each charging tank j can charge at most one CDU l at time t:
L
l=1

D j,l,t

1 ,

CT , t

SCH

(3.39)

Equation 3.39 is useful when the system analysed considers more than one CDU.

If the CDU l is charged by crude oil blended j at time t and after is charged by crude
oil blended y at time t+1 then, changeover cost must be involved. The following is the
condition that confirms that changeover cost shall be charged:
Z j,y,l,t
l

j,l,t

CDU,

+ D y,l,t+1 -1
t

, j,y (j

SCH

y)

CT ,
(3.40)

3.3.8 Problem Solving Direction.


Only one of the following groups of constraints must be added to the model
depending of the production planning demand target for the crude distillation units
along the scheduling horizon.
_____________________________________________________________________
30
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

a. If it is requested a fixed demand of blended crude oils from charging tanks along
the scheduling horizon to charging all CDUs and a feed rate variation range to
feed the crude distillation units is allowed, the following constraints are
applicable:
FBC j,l,t min D j,l,t
j

CT , l
L

FBC j,l,t max D j,l,t

FBC j,l,t
CDU,

SCH

(3.41)

FBC j,l,t = DMBCOj

CT

(3.42)

l=1 t=1

This group of equations will be used in the new model to solve the examples of
{Lee, Pinto, et al. 1996 }. Particularly, this option a with these two constraints
could have infeasibility problems depending on the problems conditions. {Lee,
Pinto, et al. 1996} uses a higher charging rate variation range for feeding the
CDUs and this condition may have helped to solve the problems easier. Then, for
their examples, the charging rate variation normally goes from 25% to 100% of
the maximum value as they will be observed in their graphs of results in Chapter
4.
b. If it is requested a charging rate demand per time interval for each CDU and it is
allowed a feed rate variation up to either the maximum plant capacity per time
interval or any other maximum allowed feed per time interval, the following
constraint is applicable:
DMCDUt,l D j,l,t
j

CT , l

FBC j,l,t
CDU,

FBC j,l,t max D j,l,t


t

SCH

,
(3.43)

The application of this equation is particularly interesting if there is a short


charging variation range allowed between the feed demands from plants and their
maximum charging feeds previously fixed. The cases analysed in this Thesis in
chapters 5, 6 and 7 apply this constraint in the model to solve practical cases in an
_____________________________________________________________________
31
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

oil refinery where the manager has requested to review the potential use of the
model in the oil refinery; specifically in its crude oil feeding system to the existing
crude distillation unit. It is not desirable to be under the CDU demand charging
rate per day adjusted in 75,000 barrels per day; furthermore, the production
planning allows an overproduction up to 10 % above the CDU charging demand
per day along the scheduling horizon. Particularly, the charging feed rate per day
for the CDU could go up to 82,000 barrels per day (9.33 % more of the demand
rate per day) only if the conditions of the problem optimally allow it.
Finally, solving cases using this option b will allow an easier understanding of
the model not only for solving scheduling problems also for review the impact of
future development in the system. Particularly, a case with the CDU shutting
down one day n in the middle of the schedule horizon was analyzed using the
additional constraint:
FBC j,l,t = 0 , t = n , n

SCH

(3.44)

Logically, the feed demand per day is not fulfilled the day n; however an analysis
of the overall schedule problem is analysed with this option giving some
recommendations.
c. If it is requested a fixed feed rate demand per time interval for each CDU, the
following constraint is applicable:
FBC j,l,t
j

CT , l

DMCDUt,l D j,l,t
CDU,

SCH

(3.45)

d. If it is requested a fixed total demand per CDU along the scheduling horizon and a
charging rate variation range to feed the crude distillation units is allowed, the
following constraints are applicable.
_____________________________________________________________________
32
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

FBC j,l,t min D j,l,t


CT , l

j
J

FBC j,l,t max D j,l,t

FBC j,l,t
CDU,

SCH

(3.46)

j=1 t=1

FBC j,l,t = TOTDMCDUl

CDU

(3.47)

The following explanation applies to all groups presented:


The term D j,l,t denotes that if there is any oil transfer from storage tank i to charging
tank j , there is no oil transfer from charging tank j to CDU l.
It could have other options using for instance a combination of the above groups; but
this situation hardly could get feasible solutions unless some data needed for the
constraints are relaxed and therefore, new combination easily could come out with
similar solutions to the solutions given by one of the options presented above.
3.4 Chapter Summary.
This chapter deeply described the problem definition and the mathematical
formulation in an algebraic form of the new generic optimisation production
scheduling model for managing and optimising the operational cost in an oil refinery
regarding the scheduling functions of unloading, storage, blending and feeding of
crude distillation units. The main objective function to minimise equation 3.1, was
described including among other the changeover cost, unloading cost and inventory
cost. Moreover, all equations, constraints and variables required for the model were
well described explaining in some cases their particularities. Also, the different
directions for solving scheduling problems with this new model were indicated
pointing out the complementary different constraints that must be used in the model to
solve each one of the different options.

_____________________________________________________________________
33
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Some of the differences between this new model and the existing model developed
by {Lee, Pinto, et al. 1996} have been pointed out through this chapter except along
the model mathematical formulation due the existing quite amount of differences
detected. The main mathematical formulation differences are:

The new model presents the main objective function plus 31 equations and
constraints used to solve option b and c and 32 for options a and d
respectively. 8 equations and constraints more must be added if the problem
involves blending in storage tanks to whichever of the options presented.
Instead the existing model for solving option b presents the main objective
function plus 25 equations and constraints; the equations and constraints to
solve problems like example 3 including blending in storage tanks are missed;
{Lee, Pinto, et al. 1996}only mention that this example needs additional
constraints including a material balance equation for components in storage
tanks and the operation rule related to vessel unloading to storage tanks when
they are not feeding charging tanks or vice versa; but, they did not include any
equations and constraints in the existing model related to this matter.

The basic equations and constraints missed by {Lee, Pinto, et al. 1996}are
related with the total flow rate restriction from vessels to storage tanks;
specifically equation 3.15 and constraint 3.16. Moreover, constraint 3.25
related to the total flow rate from one storage tank to several charging tanks
also is missed. On the other hand, the existing model missed the constraints
3.6 and 3.7 related to the vessel maximum departure date.

In general, the formulation of the new equations and constraints are different
compared with the existing model; there are some differences even in
equations or constraints with similar purposes i.e. the main objective function
of the existing model is missing out to charge one day to the total unloading
cots per vessel: they wrote the total unloading cost per vessel v as (TLv -TFv )
CUv and not (TLv -TFv + 1) CUv as the new model presents. On the other
hand the outline of the constraints 3.11 and 3.12 regarding the only possibility
of unloading for vessel v between TFv and TLv is different in both models.

_____________________________________________________________________
34
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Finally, in accordance with the example and cases analysed, the model was
programmed using the software GAMS{Brooke, Kendrick, et al. 1998}, to help to get
all the possible optimal solutions since all the presented equations and constraints
tremendously multiply and grow themselves in quantity according to the different
problem conditions set up . Definitely, this has been a useful tool for assisting to get
the results otherwise by hand had been very difficult to solve problems with more
than 1,600 single equations (equations and constraints), more than 850 single
variables a more than 250 discrete variables per each example or case analysed in this
Thesis.

_____________________________________________________________________
35
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Chapter 4. MODEL REAL TEST


4.1 Introduction.
The purpose of this chapter is to test the new model solving three out of four
examples used by {Lee, Pinto, et al. 1996} related with real industrial cases in order
to optimise the production scheduling of vessel unloading, storage, blending and feed
to crude distillation units process plants. The optimal results generated by the new
model with no omission of any data given by {Lee, Pinto, et al. 1996}are shown and
compared in advance with the optimal results of the existing model in table 4.1:
Examples

Items

{Lee, Pinto, et al.


1996} Model

New Model

Optimal Value
217.667
206.95
(US $ x 1,000)
Equations &
331
552
constraints
Single variables
192
337
Example 1
Discrete variables
36
116
Iterations
1,695
4,393
Solving
73.4
5.21
time(seconds)
Optimal Value
352.55
331.74
(US $ x 1,000)
Equations &
825
1807
constraints
Single variables
456
1138
Example 2
Discrete variables
70
396
Iterations
331,493
1,598,388
Solving time
69.3
104.7
(minutes)
Optimal Value
296.56
248.64
(US $ x 1,000)
Equations &
1222
2991
constraints
Single variables
581
1399
Example 3
Discrete variables
84
582
Iterations
> 515,541
4,236,122
Solving time
Not indicated
301.9
(minutes)
Table 4.1 - Comparisons of optimal results with an existing model.

_____________________________________________________________________
36
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

As it can be observed in table 4.1 all the optimal objective values given by the new
model as results, are lower than the existing model values. In accordance with the
mathematical explanation of the new model in chapter 3, the equations and constraints
handle by the new model really are more than the existing model s ones; but the
precision and the optimal value results of the new model are better than the existing
model because they have achieved more money savings solving the same operational
scheduling problem. Furthermore, the computational advance has avoided that the
machine time running of the model for each example has been much bigger
proportional to the new number of equations and constraints.
For all the three examples explained in detail forward, the given data for quantifying
volumes and flow rates are given in barrels x 10,000 and barrels per time interval x
10,000 respectively; changeover costs are given in US$ x 1,000; sea waiting costs and
unloading costs are given in US$ x 1,000 per time interval (day) and tank inventory
unit cost are given in US$ x 0.1 per oil barrel. Therefore, optimal value results will be
in US$ x 1,000.
4.2 Example 1 Results and Analysis.
For the example 1, fig 4.1 sketches the flow network and Table 4.2 shows the input
data given by {Lee, Pinto, et al. 1996} . The given data miss some information that is
necessary for solving the problem in accordance with the option a pointed out in
chapter 3. Then, for solve the problem was used a maximum and a minimum charging
rates to the CDU of values 50 and 10 respectively. This feed rate range can be
deduced in their graphs of results corresponding to the example 1 in fig 4.6, from the
right side indicated by them with the title Proposed Schedule. Furthermore, there is
not any information also required as input data with respect to the flow rate
restrictions among vessels and tanks and among tanks; however suitable values
indicated by (*) in table 4.2, have been chosen in accordance with the two days
observed for unloading the total crude oil volume per vessel and the size of the flow
network among tanks for example 1.

_____________________________________________________________________
37
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Example 1 Flow network


CDU

Vessels

Storage
Tanks

Charging
Tanks

Figure 4.1 Oil flow network for example 1.


Scheduling Horizon (# of unit times: days)
Number of Vessels Arrivals

Arrival Time

Amount of Key Component


Crude oil
Concentration
Vessel 1
1
100
0.01
Vessel 2
5
100
0.06
Number of Storage tanks
2
Storage Tanks
Capacity
Initial Oil
Key Component
Amount
Concentration
Tank1
100
25
0.01
Tank2
100
75
0.06
Number of Charging tanks
2
Charging Tanks
Capacity
Initial Oil
Initial ( min-max )
Amount
component
concentration
Tank1
100
50
0.02 (0.015- 0.025)
Tank2
100
50
0.05(0.045 - 0.055)
Number of CDUs
1
Unit costs involved in vessel operation Unloading cost: 8, Sea Waiting cost: 5
Tank inventory unit cost
Storage Tank: 0.08 , Charging Tank:0.05
Unit changeover cost for charged oil switch 50(independent of sequence and
CDU)
_____________________________________________________________________
38
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Blended oils demand from charging tanks to CDUs : Blended oil 1: 100,
blended oil 2: 100, blended oil 3: 100
*Maximum flow rate from vessel to one storage tank
50
* Maximum flow from one storage tank to one charging tank 40
* Maximum total flow rate from one storage tank to charging tanks at any time
interval
40
Table 4.2 - System information for Example 1.
Table 4.3 points out the comparisons of the optimal unloading starting up date results
from both models for example 1.Vessel 1 starts to unload on day 3 for the existing
model; that is one day more than new model which considers this operation on day 2.
Instead, for vessel 2 both coincide starting unloading on day 7.
Vessels

{Lee, Pinto, et al. New Model


1996} Model
3
2
1
7
7
2
Table 4.3 Example 1. Optimal unloading starting date for vessels.
Figures 4.2, 4.3, 4.4, 4.5 show other optimal results from the new model for the
example 1 conditions. These results can be compared with the optimal results from
the existing model in fig. 4.6. Both results show two changeovers or feed switches to
the CDU. The new model presents the changeovers at days 2 and 5 and the existing
model at days 2 and 4 as it can be observed in fig. 4.4 and 4.6 respectively. Moreover,
despite the tank inventory costs per volume (input data in table 4.2) are higher for
storage tanks than for charging tanks there is not any explanation why the existing
model optimal behaviour for this example 1, shows higher crude oil volumes in
storage tanks than in charging tanks; optimally the effect should be in appositive
direction as show the new model results in fig.4.2 and 4.3. Then, this situation may be
causing a big part of the difference between both optimal values since the optimal
operational schedule of the existing model should be paying more money in inventory
total cost. On the other hand, the existing model results is paying one day more of sea
waiting cost (US$ 5,000) than new model results as is indicated in table 4.3.

_____________________________________________________________________
39
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

In summary, the optimal results for example 1 are better for the new model indicating
a total operational cost saving for the problem conditions of US$ 10,717 (4.92 % cost
reduction with respect to the existing model) during the 8 day scheduling horizon in
accordance with the results showed in table 4.1

Example 1
80
70

Crude bbl x 10000

60
50
40
30
20
10
0
1

Volume variation - Scheduling horizon in days


Storage Tank A

Storage Tank B

Figure 4.2 Example 1. Storage tank optimal volume variation.

Example 1
120

Crude bbl x 10000

100
80
60
40
20
0
1

Volume variation- Scheduling horizon in days


Charging Tank X

Charging Tank Y

Figure 4.3 Example 1. Charging tank optimal volume variation.

_____________________________________________________________________
40
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Example 1
60

Crude bbl x 10000

50
40
30
20
10
0
1

CDU Charging Schedule in days

Figure 4.4 Example 1. Optimal feeding to the crude distillation unit. Solid bars:
Blended oil X ; Blank bar: Blended oil Y.

Example 1

0.05
0.04
tanks

Component concentration charging

0.06

0.03
0.02
0.01
0
1

Scheduling horizon in days


Charging Tank X

Charging Tank Y

Figure 4.5 Example 1. Optimal component concentration variation in charging


tanks.

_____________________________________________________________________
41
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Figure 4.6 Example 1. Optimal results from the existing model (right side).
4.3 Example 2 Results and Analysis.
For the example 2, fig 4.7 sketches the flow network and Table 4.4 shows the input
data given by {Lee, Pinto, et al. 1996} . The given data also miss some information
_____________________________________________________________________
42
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

that is necessary for solving the problem in accordance with the option a pointed out
in chapter 3. Then, for solve the problem was used a maximum and a minimum
charging rates to the CDUs of values 20 and 4 respectively. This feed rate range can
be deduced from their graphs of results for the example 2 in fig.4.14 for both CDUs.
Furthermore, with respect to the flow rate constraints among vessels and tanks and
among tanks there is not any information also required as input data; however suitable
values indicated by (*) in table 4.4, have been chosen in accordance with the two days
observed for unloading the total crude oil volume per vessel and the size of the flow
network among tanks for example 2.

Example 2
CDU 1

Flow network

CDU 2

Vessels

Storage
Tanks

Charging
Tanks

Figure 4.7 Oil flow network for example 2.


Table 4.5 points out the comparisons of the optimal unloading starting date
recommended by both models for example 2. According to the existing model optimal
results, all vessels start to unload up to three days after the arriving day. Instead, the
new model optimal results consider starting unloading the same arriving days for the
first two vessels and allow only a delay of one day for vessel 3 before starting to
unload.
_____________________________________________________________________
43
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Scheduling Horizon (# of unit times: days)

10

Number of Vessel Arrivals


Arrival

Amount of

Time

Crude oil

Vessel 1

Vessel 2
Vessel 3

3
Component 1

Component 2

100

0.01

0.04

100

0.03

0.02

100

0.05

0.01

Number of Storages Tanks


Storage

Capacity

Tanks

Initial Oil

Component 1

Component 2

Amount

Tank 1

100

20

0.01

0.04

Tank 2

100

50

0.03

0.02

Tank 3

100

70

0.05

0.01

Number of Charging Tanks


Charging

Capacity

Tanks

Initial Oil

Initial (min-max)

Initial(min-max)

Amount

comp.1

comp.2

concentration

concentration

Tank 1

100

30

0.0167 (0.01- 0.02)

0.0333(0.03 - 0.038)

Tank 2

100

50

0.03 (0.025 - 0.035)

0.023 (0.018 - 0.027)

Tank 3

100

30

0.0433 (0.04 - 0.048)

0.0133 (0.01 -0.018)

Number of CDUs

Unit costs involved in vessel operation

Unloading cost: 8, Sea Waiting cost: 5

Tank inventory unit cost

Storage Tank: 0.05 , Charging Tank:0.08

Unit changeover cost for charged oil switch

50(independent of sequence and CDU)

Blended oils demand from charging tanks to CDUs :


Blended oil 1: 100,
blended oil 2: 100, blended oil 3: 100
*Maximum flow rate from vessel to one storage tank
50
* Maximum flow from one storage tank to one charging tank 60
* Maximum total flow rate from one storage tank to charging tanks at any time
interval
70
Table 4.4 - System information for Example 2.

_____________________________________________________________________
44
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Vessels

{Lee, Pinto, et al. New Model


1996} Model
3
1
1
7
4
2
9
8
3
Table 4.5 Example 2. Optimal unloading starting date for vessels.
Figures 4.8, 4.9, 4.10, 4.11, 4.12 and 4.13 show other optimal results from the new
model for example 2. These results can be compared with the optimal results from
the existing model in fig. 4.14.
The results of both models show three changeovers in total for both CDUs: The new
model presents one at day 4 for CDU 1 and two at days 2 and 7 for CDU 2.Instead the
existing model presents two at days 3 and 7 for CDU 1 and one at day 2 for CDU 2.
Changeovers can be observed in fig. 4.10 and 4.11 for the new model and 4.14 for the
existing model. In general, the volume variation behaviour in both storage and
charging tanks are similar; however there are some differences in magnitude of
volume managed. On the other hand, the existing model schedule results are paying
six days of sea waiting costs that means five days more (US$ 25,000) than the new
model schedule results.
In summary, the optimal results for example 2 are better for the new model indicating
a total operational cost saving for the problem conditions of US$ 20,810 (5.90% cost
reduction with respect to the existing model) along the 10 days scheduling horizon in
accordance with the results showed in table 4.1. Regarding the new model results, it is
possible that part of the US$25,000 saved in sea waiting cost have been spent in a
higher total tank inventory cost paid due to the early unloading.

_____________________________________________________________________
45
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Example 2
120

Crude bbl x 10000

100
80
60
40
20
0
1

10

Volume Variation - Scheduling horizon in days


Storage Tank 1

Storage Tank 2

Storage Tank 3

Figure 4.8 Example 2. Storage tank optimal volume variation.

Example 2
120

Crude bbl x 10000

100
80
60
40
20
0
1

10

Volume variation - Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Charging Tank 3

Figure 4.9 Example 2. Charging tank optimal volume variation.

_____________________________________________________________________
46
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Example 2
25

Crude bbl x 10000

20

15

10

0
1

10

CDU 1 charging schedule per day

Figure 4.10 Example 2. Optimal feeding to the CDU 1. Dashed bars: blended
oil 2; solid bars: blended oil 3.

Example 2
25

Crude bbl x 10000

20

15

10

0
1

10

CDU 2 charging schedule per day

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
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Example 2

0.05
0.04
tanks

Component 1 concentration charging

0.06

0.03
0.02
0.01
0
1

10

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Charging Tank 3

Figure 4.12 Example 2. Optimal concentration variation of component 1 in


charging tanks.
Example 2

0.03
0.025
tanks

Component 2 concentration charging

0.035

0.02
0.015
0.01
0.005
0
1

10

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Charging Tank 3

Figure 4.13 Example 2. Optimal concentration variation of component 2 in


charging tanks.

_____________________________________________________________________
48
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Figure 4.14 Example 2. Optimal results from the existing model.


4.4 Example 3 Results and Analysis.
For the example 3 fig 4.15 sketches the flow network and Table 4.6 shows the input
data given by {Lee, Pinto, et al. 1996}. The given data also miss some information
_____________________________________________________________________
49
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

that is necessary for solving the problem in accordance with the option a pointed out
in chapter 3. Then, for solve the problem was used a maximum and a minimum
charging rates to the CDUs of values 10 and 2 respectively. This feed rate range can
be deduced from their graphs of results for the example 2 in fig.4.20 for both CDUs.
Furthermore, with respect to the flow rate constraints among vessels and tanks and
among tanks there is not any information also required as input data; however suitable
values indicated by (*) in table 4.6, have been chosen in accordance with the two days
observed for unloading the total crude oil volume per vessel and the size of the flow
network among tanks for example 3.

Flow network

Example 3

CDU 1

CDU 2

Vessels

Storage
Tanks

Charging
Tanks

Figure 4.15 Oil flow network for example 3.


Table 4.7 points out the comparisons of the optimal unloading starting date
recommended by both models for example 3. Both models coincide with the same
optimal unloading day for each vessel recommended for the same arriving day of each
one.
_____________________________________________________________________
50
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Scheduling Horizon (# of unit times: days)


Number of Vessels Arrivals
Arrival Time

12
3
Amount
Crude oil
50
50
50

of Key
Component
Concentration
Vessel 1
1
0.01
Vessel 2
5
0.085
Vessel 3
9
0.06
Number of Storage tanks
3
Storage Tanks
Capacity
Initial Oil
Initial ( min-max )
Amount
component
concentration
Tank1
100
20
0.02 (0.01- 0.03)
Tank2
100
20
0.05(0.04 - 0.06)
Tank3
100
20
0.08(0.07 0.09)
Number of Charging tanks
3
Charging Tanks
Capacity
Initial Oil
Initial ( min-max )
Amount
component
concentration
Tank1
100
30
0.03 (0.025- 0.035)
Tank2
100
50
0.05(0.045 - 0.065)
Tank3
100
30
0.08(0.075 0.085)
Number of CDUs
2
Unit costs involved in vessel operation Unloading cost: 10, Sea Waiting cost: 5
Tank inventory unit cost
Storage Tank: 0.04 , Charging Tank:0.08
Unit changeover cost for charged oil switch 50(independent of sequence and CDU)
Blended oils demand from charging tanks to CDUs :
Blended oil 1: 50,
blended oil 2: 50, blended oil 3: 50
*Maximum flow rate from vessel to one storage tank
25
* Maximum flow from one storage tank to one charging tank 40
* Maximum total flow rate from one storage tank to charging tanks at any time
interval
40
* Maximum total flow rate from vessel to storage tanks at any time interval 25
Table 4.6 - System information for Example 3.
Vessels

{Lee, Pinto, et al. New Model


1996} Model
1
1
1
5
5
2
9
9
3
Table 4.7 Example 3. Optimal unloading starting date for vessels.
_____________________________________________________________________
51
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Figures 4.16, 4.17, 4.18 and 4.19 show other optimal results from the new model for
example 3. These results can be compared with the optimal results from the existing
model in fig. 4.20.
The optimal results of the new model present only two changeovers, one at day 4 for
CDU 2 and another at day 9 for CDU 1. Instead, the existing model optimal results
present three changeovers; one more (US$ 50,000) than the new model ; two at days 4
and 8 for CDU 1 and one at day 3 for CDU 2. Changeovers can be observed in fig.
4.18 and 4.19 for the new model and 4.20 for the existing model. In general, the
volume variation behaviour in both storage and charging tanks are similar; however
there are some differences in magnitude of volume managed along the scheduling
horizon. On the other hand, both results have not considered to pay sea waiting costs
as is indicated in table 4.7.
In summary, the optimal results for example 3 are better for the new model indicating
a total operational cost saving for the problem conditions of US$ 47,920 for the 12
days scheduling horizon in accordance with the results showed in table 4.1. It is
possible, regarding the new model results that part of the US$50,000 saved in one
changeover less, has been spent in a little higher total tank inventory cost paid for
achieving this optimal objective.

_____________________________________________________________________
52
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Example 3
90
80

Crude bbl x 10000

70
60
50
40
30
20
10
0
1

10

11

12

Volume variation -Scheduling horizon in days


Storage Tank 1

Storage Tank 2

Storage Tank 3

Figure 4.16 - Example 3. Storage tank optimal volume variation.

Example 3
60

Crude bbl x 10000

50
40
30
20
10
0
1

10

11

12

Volume variation- Scheduling horizon


Charging Tank 1

Charging Tank 2

Charging Tank 3

Figure 4.17 - Example 3. Charging tank optimal volume variation.

_____________________________________________________________________
53
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Example 3
12

Crude bbl x 10000

10
8
6
4
2
0
1

10

11

12

CDU 1 charging schedule per day

Figure 4.18 - Example 3. Optimal feeding to the CDU 1. Dashed bars: blended oil
2; solid bars: blended oil 3.

Example 3
12

Crude bbl x 10000

10
8
6
4
2
0
1

10

11

12

CDU 2 charging schedule per day

Figure 4.19 - Example 3. Optimal feeding to the CDU 2. Blank bars: blended oil
1; solid bars: blended oil 3.
_____________________________________________________________________
54
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Figure 4.20 Example 3. Optimal results from the existing model.


4.5 Chapter Summary
This chapter showed the test of the new model in detail solving the same examples
used by {Lee, Pinto, et al. 1996} when they presented their model; also called in this
Thesis, existing model for distinguishing from the new model. Both model results
have been compared in detail pointing out the differences in the results. Although the
new model manages more equations and constraints, its optimal values with respect to
minimise the total operational cost have been lower than the optimal values presented
_____________________________________________________________________
55
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

by the existing model; moreover, for the three examples together the optimal results
from the new model achieved a total difference of US$ 79,447 less costly compared
with the existing model optimal results for the same operational conditions.
Furthermore, it has been demonstrated that the features of the new model design allow
that it can be adapted to different demand conditions included

the condition

established by {Lee, Pinto, et al. 1996}for their examples. Instead, the existing model
was developed to work in only one solving direction and although, most of its results
shown in this Thesis apparently go in the same optimal path, it is less precise than the
new model solving these kind of scheduling problems.
One of the main reasons of the existing model shortcomings is that it has missed some
important equations and constraints and moreover, the formulation of some of their
existing equations and constraints are different compared with the new model as it
was well explained in chapter 3. For instance, regarding the results of example 2, it is
clear the lack of the constraints 3.7 and 3.8 for control the maximum departure date
of previous vessels in accordance with the arriving date of next vessels for avoiding
unnecessary long sea waiting for vessels. On the other hand, with respect to the total
flow constraint, {Lee, Pinto, et al. 1996} do not show any flow rate data from their
optimal results for comparing; moreover, it is clear in its model formulation that they
did not use any constraint to control total flows; however, it is difficult to evaluate if
the lack of these constraints also could have caused some additional mistakes in their
optimal results. Finally, in accordance with the mistake found in the objective
function s formulation of the existing model, with respect to the unloading cost
summation within the total cost; they could have left out to charge three unloading
day cost for each one of their examples: US$ 24,000 for examples 1 and 2 and US$
30,000 for example 3; unless they could have taken in account them in another form
not clear in their model formulation because these differences are appreciable
quantities of money that would hugely impact their final optimal values shown in
table 4.1.

_____________________________________________________________________
56
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Chapter 5. MODEL APPLICATION TO A PRACTICAL CASE


The new model will be applied to several cases related with one oil refinery in this
chapter, including also chapter 6 and 7; each case analysed has its own features and
conditions that facilitate more the understanding of the advantages of the application
of this new optimisation model to similar cases in the industry.
Particularly the oil refinery for what the cases are developed has the flow network
configuration indicated in fig.5.1 to manage all its operation of crude oil unloading,
storage, blending and feeding to its crude distillation unit. Furthermore, all the cases
will operate in a scheduling horizon of 15 days and the solving option used is b
according to the classification explained in chapter 3.

Oil Refinery Cases

Flow network

CDU

Charging
Tanks
Vessels

Storage
Tanks

Figure 5.1 Oil Flow Next Work for the Oil Refinery.

_____________________________________________________________________
57
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

5.1 Presentation of Case 1.


At the planning stage three crude oil vessels will arrive at days 1, 6 and 10
respectively and their unloading should be completed by the day 15.Each vessel
contain 400,000 bbl of crude oil Alpha, Beta and Ro, respectively. The refinery has
one CDU which has a design capacity of 82,000 bbl per day of crude oil. The two
charging tanks have blended crude oils X and Y that should be used to charging the
CDU no matter whether it is either crude oils X or Y; but however the refinery is
concerned about what kind of crude oil is charging with higher or lower sulphur
content to determine the proper sulphur neutralization control downstream. The range
of the blended composition of both charging tanks has been determined at the
planning level. The main concern is to optimise the operational cost keeping a feed
demand of 75,000 bbl per day to the crude distillation unit. Feeding less than this
amount is not allowed for fulfilling the planning targets and avoiding plant shutdown
or malfunction of its equipment operating under its normal working capacity;
however, an increase of the feed is allowed up to 82,000 bbl per day only if the
optimal results indicate it. This is considered because the oil refinery allows a total
overproduction of maximum 10% with respect to the total feed demand of 1,125,000
bbl along the scheduling horizon for all the cases analysed.
The weight fractions of sulphur (component k) which determine the quality of crude
oil are 0.01 for crude oil Alpha, 0.03 for crude oil Beta and 0.05 for crude oil Ro.
These three crude oils are blended to make two types of blending: blended crude oils
X and Y. The sulphur concentration range of X should be between 0.01 and 0.02 and
Y between 0.035 and 0.045.The storage tanks have a maximum capacity of 350.000
bbl each and the initial crude oil volumes of these tanks for crude oil Alpha, Beta and
Ro are 30,000 bbl, 200,000 bbl and 140,000 bbl, respectively. On the other hand,
charging tanks have a maximum capacity of 250,000 bbl each and the initial crude oil
volumes of these tanks for crude oils X and Y are 70,000 bbl and 190,000 bbl
respectively.

_____________________________________________________________________
58
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

The operation cost involved in this problem are the inventory cost, the vessel
harbouring cost, the vessel sea waiting cost and the CDU changeover cost charged
each time the feed is switched from crude oils X to Y or vice versa.
A sketch of the process was shown in fig.5.1. The arrows indicate the flow transfer
among equipments per interval of time. The flow transfer could be null between two
particular equipments in any particular time period in accordance with the optimal
results.
Vessel 1 arrives at the docking station at day 1 and from this day it could start to
unload crude oil Alpha into storage tank 1; it should complete unloading before day 6
and leave the docking station at most the day 6. At each time interval, crude oil can be
transferred from storage tanks and blended into charging tank X and charging tank Y.
Then, blended crude oil either X or Y charges the CDU. Vessel 2 arrives at day 6 and
from this day it could start unloading crude oil Beta into storage tank 2; it should
complete unloading before day 10 and leave the docking station at most the day 10.
Finally, Vessel 3 arrives at day 10 and from this day it could start unloading crude oil
Ro into storage tank 3; it should complete unloading either before or on day 15 and
leave the docking station at most the day 15.
Unit inventory cost for each storage tank and each charging tank are 8 x 10-3 and 5 x
10-3 US$/(day x bbl), respectively. The cost causes by the feed switch to the CDU
(changeover cost) is US$50,000 each time it occurs. Costs involving vessels are
caused by waiting in the sea corresponding to US$ 8,000 per day and by harbouring
for unloading the crude oil corresponding to US$ 10,000 per day. The unloading
incurs in higher cost.
Table 5.1 summarises all the above mentioned input data plus some other important
information that also will be taken in account for solve the case 1 problem using the
model.

_____________________________________________________________________
59
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Scheduling Horizon (# unit time)


Number of Vessels Arrivals
Arrival Time
Vessel 1
Vessel 2
Vessel 2
Number of Storage tanks
Storage Tanks
Tank1
Tank2
Tank3
Number of Charging tanks
Charging Tanks
Tank1
Tank2

Day 1
Day 6
Day 10
Maximum/
Minimum
Capacity
350,000 bbl /
5,000 bbl
350,000 bbl /
5,000 bbl
350,000 bbl /
5,000 bbl
Maximum/
Minimum
Capacity
250,000 bbl /
15,000 bbl
250,000 bbl /
15,000 bbl

15 days
3
of Sulphur Content

Amount
Crude oil
400,000 bbl
400,000 bbl
400,000 bbl
3
Initial Oil
Amount

0.01
0.03
0.05
Sulphur Content

30,000 bbl

0.01

200,000 bbl

0.03

140,000 bbl

0.05

2
Initial Oil
Amount
70,000 bbl
190,000 bbl

Range of Sulphur
Content & Initial
value
0.01-0.02
0.0158
0.035 0.045
0.0389

Number of CDU
1
Maximum flow from vessel to storage tank.
250,000 bbl/day
Maximum flow from one storage tank to charging
70,000 bbl/day
tanks simultaneously during any time period.
Maximum flow from one storage tank to one
65,000 bbl/day
charging tank.
Maximum flow from one charging tank to one CDU.
82,000 bbl/day
Cost involved in vessel operation
Unloading: US$ 10,000/day
Sea Waiting: US$ 8,000/day
Tank inventory cost
Storage tank: US$ 0.008 /(day x
bbl)
Charging tank:US$0.005/(day x
bbl)
Changeover cost for feed switch
US$50,000
CDU crude oil demand
75,000 bbl/day
Table 5.1 - Case 1. Input data summary.
After applying the model for the above case the following results are highlighted:
_____________________________________________________________________
60
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

The optimal operation cost for the 15-day scheduling horizon of case 1 is
US$338,964.3.
Table 5.2 indicates the results regarding the suitable days for starting and finishing
unloading each vessel along the scheduling horizon:
Vessel

Starts unloading

Finish unloading

Day 1

Day 2

Day 6

Day 7

Day 11

Day 12

Table 5.2 - Case 1. Unloading start and finish results.


Table 5.3 indicates the crude oil volume variation results for each vessel after starting
unloading during the scheduling horizon. Flow rates from vessels to storage tanks
shown in table 5.4 help to understand table 5.3.
Vessel
1
2

3 4 5 6

400

250

0
400

8 9 10

250

11

12

13

400

250

14

15

Table 5.3 - Case 1.Vessel volume variation (bbl x 1,000) results.


Fig.5.2 indicates the optimal volume variation for each storage tank at each time
interval (day). It accordance with the arriving and the unloading of each vessel, it is
possible to see the influence of vessel 1 feeding the storage tank 1, vessel 2 feeding
the storage tank 2 and vessel 3 feeding the storage tank 3.

_____________________________________________________________________
61
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

400
Crude bbl x 1000

350
300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 5.2 - Case1. Storage tank volume variation results.

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 5.3 - Case1. Charging tank volume variation results.


Fig 5.3 indicates the optimal volume variation at each time interval (day) for each
charging tank. It clearly indicates that when one tank is feeding the CDU, the other
tank is being fed or refilled by the crude oil from the storage tanks. Moreover, it can
be observed at the top of the graphic that in several cases the charging tank that is
_____________________________________________________________________
62
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

being refilled gets its maximum volume before the other tank has been consumed to
make the feed switch. This is a clear demonstration that charging tanks have
restriction in its volume size that it is part of the conditions of case 1. The minimum
crude oil volume for each charging tank was fixed as input condition in 15,000 bbl to
guarantee 4 hours minimum of feeding operation to the CDU if a minor emergency
happens in the system analysed upstream the charging tanks. Some refineries work
having a crude oil reserve up to 25% of the tank maximum capacity.
Fig 5.4 indicates the optimal feeding to the CDU per each time interval during the
scheduling horizon. The 75,000 bbl feed demand should be given at days 5, 8, 11 and
14. On the other hand, the 82,000 bbl maximum feed could be reached at days
1,2,3,6,9,12 and 15. The optimal total amount of crude oil proposed to feed the CDU
for case 1 during the 15 day scheduling horizon is 1,186,000 bbl (5.42 % over the
total feed demand). The feed switches (mode changeovers) are four (4) given at days
3, 6, 9 and 12 respectively and figs 5.2 and 5.3 clearly show this condition.

Crude bbl x 1000

84
82
80
78
76
74
72
70
1

10 11 12 13 14 15

Scheduling horizon in days

Figure 5.4 - Case 1. Feeding to the crude distillation unit results. Solid bars:
blended oil 1; blank bars: blended oil 2.
Table 5.4 indicates for case 1 the optimal volumetric flow rate at each time interval
(day) from vessels to storage tanks.
_____________________________________________________________________
63
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Vessel 1
1

3 4 5 6

8 9 10 11

12

13 14 15

150 250

150 250

150 250

Table 5.4 - Case 1. Results for volumetric flow rate (bbl x 1,000) per day from
vessels to storage tanks.
Table 5.5 also respectively indicates the optimal flow rate results from the storage
tanks to the charging tanks. The left side column of this table shows the sense of the
flow from determined storage tank to the indicated charging tank. In some cases is
shown that one charging tank is being fed by two or three storage tanks in the same
time interval. These amounts of flows are optimally calculated to be blended keeping
the sulphur content range for each charging tank and the maximum flow rate allowed
from one storage tank to several charging tanks or from one storage tank to one
charging tank. Specifically, this system (fig.4.1) never will present simultaneous flow
towards both charging tanks at the same time interval (day) because one of them
should be feeding the CDU at the same time interval.
St.T-

65

48.5

5 6

8 9

10

11 12 13 14 15

Ch.T
1-1
1-2
2-1

25.5

3-2

65 50
18.75

65

2-2
3-1

65 65
65 40
65

65

65 50
65

36.25

1.5

5
65

3.5

65

50

Table 5.5 - Case 1. Results for volumetric flow rate (bbl x 1,000) per day from
storage tanks to charging tanks.
Moreover, table 5.5 shows the optimal total amount of crude oil that should optimally
be transferred during the scheduling horizon, from the storage to the charging tanks to
_____________________________________________________________________
64
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

balance the CDU crude oil demand which for this case 1 is 1,109,000 bbl. This
quantity is lower than the total crude oil optimally fed to the CDU during the
scheduling horizon by 77,000 bbl. Despite the charging tanks starts at day 1 with a
volume bigger than their minimum volume, it could have expected that the flow
transferred were much bigger than the presented in the results helped by the lower
inventory cost applied to the charging tanks compared with the storage tank inventory
cost. However, the main restriction for this case 1 that may have not helped at all for
the expected optimal solution may be the limit of capacity of each charging tank that
it is reached each time the tank is refilled during the scheduling horizon.
Fig. 5.5 indicates the optimal fluctuation for the sulphur content in the crude oil of
each charging tank at any time interval (day) a long the scheduling horizon. It could
be identified that the sulphur content in both charging tanks is kept inside the range
established at the planning level. Some special findings could come out studying the
characteristics of the behaviour above shown, i.e. for charging tank 2, the sulphur
content is kept at the range lowest level during days 5 to 10 until the vessel 3 with the

Crude sulphur content/


charging tanks

highest sulphur content starts to unload.

0.05
0.045
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
1

10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1 Sulphur content

Charging Tank 2 Sulphur content

Figure 5.5 - Case 1. Crude oil sulphur content variation results in charging
tanks.
_____________________________________________________________________
65
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

5.2 Scheduling Alterations of Case 1.


The following question could arise: What could happen if it is informed that the
vessel arriving schedule has changed just after the monthly plan already have been
done and have got the approval at the managerial level? It is possible to do something
at the scheduling level in order to perform again the optimization techniques as they
were applied for the first arriving schedule presented in case 1?. The answers to these
questions are very important if the problem is relating to keeping the minimum
operational cost and hence, a good profit margin. On the other hand, several
infeasibilities could present depending of the dimension of the scheduling
modifications according to the system current conditions i.e. it could be not possible
to feed the CDU at least the demand rate per day because one vessel is delayed too
much; the sulphur content for the determined charging tank could not match to be
inside the range; it could not have either enough capacity or enough start up crude oil
volume in one of the storage tanks and so on. These infeasibilities have some
difficulties to detect in an early step at the planning level.
Table 5.6 shows the new proposed arriving schedule for case 1a (same case 1
including the modifications of the arriving schedule at the late stage):
Vessel Arrival Time Amount of Crude oil Sulphur Content
1

Day 1

400,000 bbl

0.01

Day 4

400,000 bbl

0.03

Day 11

400,000 bbl

0.05

Table 5.6 - Case 1a. First change of arriving schedule.


As it is can be deducted from this new arriving schedule the second vessel will arrive
two days earlier and the third vessel will arrive one day later with respect to the
original arriving schedule approved at the planning level for case 1.

_____________________________________________________________________
66
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

After applying the model for the above mentioned case 1a, the following results are
highlighted:
The optimal operational cost for the 15 day scheduling horizon of the new schedule,
case 1a is US$337,432.5. It is US$ 1,531.75 less costly than the original case.
Fortunately, the total operational cost has been reduced but it could have not been if
actions had not taken on time to correct and optimise the operational actions having in
account this change of schedule.
Table 5.7 indicates the suitable days for starting and finishing unloading in the
scheduling horizon of each vessel:
Vessel

Starts unloading

Finish unloading

Day 1

Day 2

Day 4

Day 5

Day 11

Day 12

Table 5.7 - Case 1a. Unloading start and finish results.


Fig.5.6 indicates the optimal variation at each time interval (day) for each storage tank
level. Comparing figs. 5.2 (original case) and 5.6, it can be seen the following main
differences regarding case 1a:

Storage tank 2 does not reach the minimum level because it is started to be fed
2 days earlier.

Storage tank 1 is assisted earlier by the storage tank 2 to do the blending and
hence, this tank 1 conserves a little more its crude oil volume during the
schedule horizon.

Fig 5.7 indicates for case 1a, the optimal volume variation at each time interval (day)
for each charging tank. It is similar to case 1 shown in fig.5.3; except for charging
tank 2 which does not have any dead time in full condition.
_____________________________________________________________________
67
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

400
Crude bbl x 1000

350
300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 5.6 - Case1a. Storage tank volume variation results.

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 5.7 - Case1a. Charging tank volume variation results.


Fig. 5.8 indicates the optimal fluctuation for the sulphur content in the crude oil of
each charging tank at any time interval (day) a long the scheduling horizon. For
charging tank 1 the sulphur content is kept more stable showing a sulphur
_____________________________________________________________________
68
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

concentration average of 0.02 (range maximum value) along the scheduling horizon
since day 3 except when the tank is consumed to the minimum volume at days 6 and
12. This situation may be presented by the early arriving effect of vessel 2 with a
crude oil sulphur concentration of 0.03 that partially is blended with crude oil

Crude sulphur content/


charging tanks

unloaded from vessel 1 that has a sulphur concentration of 0.01.

0.05
0.045
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
1

10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1 Sulphur content

Charging Tank 2 Sulphur content

Figure 5.8 - Case1a .Crude oil sulphur content variation results in charging
tanks.
For this case 1a, the optimal number of feed switches, the switch schedule and the
optimal feeding for the CDU for each time interval during the scheduling horizon are
also the same shown above in fig. 5.4 for case 1.
Other changes of arriving schedule could be considered only if the optimal solution
continues being feasible for this kind of problem size. It could be considered a
different schedule change case 1b (same case 1 including the arriving schedule
modifications at the late stage) in accordance with table 5.8:
Vessel Arrival Time Amount of Crude oil Sulphur Content
Day 1
400,000 bbl
0.01
1
Day 7
400,000 bbl
0.03
2
Day 9
400,000 bbl
0.05
3
Table 5.8 - Case 1b. Second change of the arriving schedule.
_____________________________________________________________________
69
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

As it is can be deducted from this new arriving schedule vessel 2 will arrive one day
later and vessel 3 will arrive on day earlier with respect to the original arriving
schedule approved at the planning level (case1).
After applying the model for the above mentioned case 1b, the following results are
highlighted:
The optimal operational cost for the 15 day scheduling horizon of this case 1b is
US$333,921.9. It is US$ 5,042.35 less costly than the original case.
Vessel
Starts unloading
Finish unloading
Day 1
Day 2
1
Day 7
Day 8
2
Day 9
Day 10
3
Table 5.9 - Case1b. Unloading start and finish results.
Table 5.9 indicates for this new arriving schedule alteration the suitable days for
starting and finishing unloading of each vessel.
Fig.5.9 indicates the optimal variation at each time interval (day) for each storage tank
volume. If it is compared the figures 5.2 (case 1) and 5.9 it can be observed the
following main differences regarding case 1b:

Storage tank 3 gets the minimum volume faster because it may have assisted
storage tank 2 for not being consumed before day 7.

At the final of the scheduling horizon it could be noted that the storage tank 3
was more consumed than the storage tank 2.

_____________________________________________________________________
70
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

400
Crude bbl x 1000

350
300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 5.9 - Case1b. Storage tank volume variation results.

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 5.10 - Case1b. Charging tank volume variation results.


Fig 5.10 indicates the optimal volume variation at each time interval (day) for each
charging tank l. It is more similar to the original case shown in Fig.5.3.

_____________________________________________________________________
71
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude sulphur content/ charging


tanks

0.05
0.045
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
1

5 6 7 8 9 10 11 12 13 14 15
Scheduling horizon in days

Charging Tank 1 Sulphur content

Charging Tank 2 Sulphur content

Figure 5.11 - Case1b. Crude oil sulphur content variation results in charging
tanks.
Fig. 5.11 indicates the optimal fluctuation for the sulphur content in the crude oil of
each charging tank at any time interval (day) a long the scheduling horizon. The
sulphur content of charging tank 2 is more unstable, but it is kept inside the range.
For this case 1b, the optimal number of feed switches, the switch schedule and the
optimal feeding for the CDU for each time interval during the scheduling horizon are
also the same shown above in fig. 5.4 for case 1.
5.3 Bigger Scheduling Alteration of Case 1.
Returning again to the case 1 conditions and the vessel arriving schedule changes at
the last day, it is possible to solve a more difficult problem of schedule change as is
indicated in Table 5.10.
As it is can be observed from this new arriving schedule now vessel 2 will arrive first
at day 1 and vessel 1 will arrive second at day 6. This is a big change with respect to
_____________________________________________________________________
72
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

the original arriving schedule approved at the planning level (case1) and it sometimes
could happen in the oil refinery.
Vessel
2

Arrival
Time
Day 1

Amount
of Sulphur
Crude oil
Content
400,000 bbl
0.03

Day 6

400,000 bbl

0.01

Day 10

400,000 bbl

0.05

Table 5.10 - Case 1c. Bigger change of the arriving schedule.


After the model has been applied it is found that there is no solution for this case. The
current conditions have caused infeasibilities in the system and therefore, it is not
possible to obtain optimal operational cost solution. After reviewing the problem
making some iteration it was discovered that the start up volume of storage tank 1 is
not enough for waiting vessel 1 until day 6 with the conditions presented in the
system. Then, for solve this situation; storage tank 1 should start with an initial crude
oil volume of at least 80,000 bbl and not 30,000 bbl as it originally starts for solving
case 1.
Then, considering a volume of 80,000 bbl for storage tank 1, the optimal operational
cost for the 15 days scheduling horizon of this case 1c is US$354,181.5. It is
US$15,217.25 most costly than the original case 1. Frequent problems of this type
could cause losses of more than US$ 350,000 per year even considering that the
optimal operational costs are kept. Moreover, it is important to highlight that for
calculation of this new total optimal operational cost for this case 1c, the cost of the
operation for transfer the 50,000 bbl (0.01 sulphur) from somewhere in the oil refinery
to the storage tank 1 for completing its required start up volume has not been taken in
account.
Table 5.11 indicates the suitable days for starting and finishing unloading in the
scheduling horizon of each vessel:

_____________________________________________________________________
73
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Vessel
Starts unloading
Finish unloading
Day 4
Day 5
2
Day 6
Day 7
1
Day 10
Day 11
3
Table 5.11 - Case 1c. Unloading start and finish results.
Table 5.12 indicates each vessel crude oil volume variation after starting unloading
during the scheduling horizon.
As it could be observed from both tables 5.11 and 5.12, although vessel 2 arrives at
day 1, the optimal day for start unloading is at day 4.
Vessel 1 2 3 4
5
6
7
8 9 10 11 12 13 14 15
400 250 0
2
400 250 0
1
400 250 0
3
Table 5.12 - Case 1c. Vessel volume variation (bbl x 1000) results.
Figs 5.12 and 5.13 show the storage and the charging tank optimal volume variation
respectively for case 1c. Storage tank 1 keeps at the minimum level for four (4) times
intervals while vessel 1 arrives and starts unloading.
400
Crude bbl x 1000

350
300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 5.12 - Case1c. Storage tank volume variation results.

_____________________________________________________________________
74
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

The charging tank volume variation (fig. 5.13) has minor alterations compared with
fig.5.4 for case 1. Also as it can be observed in fig. 5.14 regarding the feed to the
CDU and compared with fig. 5.3, case 1c has an optimal feed rate of 77,400 bbl the
day 4. It means for case 1c, that the total feed amount is depleted by 600 bbl along the
schedule horizon compared with case 1; but, it is still 5.37 % over the total feed
demand.

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 5.13 - Case1c. Charging tank volume variation results.

Crude bbl x 1000

84
82
80
78
76
74
72
70
1

10 11 12 13 14 15

Scheduling horizon in days

Figure 5.14 - Case 1c. Feeding to the crude distillation unit results. Solid bars:
blended oil 1; blank bars: blended oil 2.
_____________________________________________________________________
75
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Table 5.13 also respectively indicates the optimal flow rate from storage tanks to the
charging tanks for case 1c. If tables 5.13 and 5.5 are compared, storage tank 1 from
case 1c transfers the volume for blending that it can in the first two time intervals
(days) and its transfer re starts at day 6 when is being feeding by the vessel.
Stor.T- 1

8 9

10 11 12 13 14 15

Char.T
65 10
65 65
65 65
1-1
32
1-2
65 39.4
65 40
65 35
2-1
65 65 24
65 8
2-2
5
3-1
65 5
65 65
3-2
Table 5.13 - Case 1c. Results for Volumetric flow rate (bbl x 1,000) per day from

Crude sulphur content/


charging tanks

storage to charging tanks.

0.05
0.045
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
1

10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1 Sulphur content

Charging Tank 2 Sulphur content

Figure 5.15 - Case1c. Crude oil sulphur content variation results in charging
tanks.
Fig. 5.15 shows the optimal sulphur content variation for both charging tanks. If
Figs.5.15 and 5.5 (case 1) are compared, it is possible to observe for case 1c that
during the first 8 days of the scheduling horizon, the sulphur content for both tanks in
_____________________________________________________________________
76
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

average is bigger that the same presented for case 1 in the same period, due to the
influence of having a vessel of mayor sulphur content unloading earlier.
Finally, it is interesting to show in table 5.14, other results considering other starting
up volumes for storage tank 1. These results were obtained while it was done the trial
and error exercise to find its suitable minimum starting up crude oil volume.
Storage tank
1 crude oil

150,000

80,000 bbl

81,000 bbl

82,000 bbl

85,000 bbl

optimal

US$

US$

US$

US$

US$

operational

354,181.5

354,235.3

354,341.3

354,659.3

361,900.3

- 600 bbl

- 7,000 bbl

0 bbl

0 bbl

0 bbl

95,934

1,368,463

942,089

126,339

135,000

volume

bbl

Total

cost
CDU total
feed
difference
with respect
to case 1
Iterations
Software
time spent
running

1,249.3sec 22,329.3sec 18,556.6sec 1,512.3sec 1,732.5sec


(20.7 min)

(372.2 min) (309.3 min) (25.2 min)

(28.9 min)

Table 5.14 - Case 1c. Results & comparisons among different crude oil volumes
for storage tank 1.
Results shown in table 5.14 help to decide that it is better to start up the storage tank 1
with 82,000 bbl, instead 80,000 bbl. For US$ 159.6 more costly, there are 600 bbl
more to be optimally fed during the scheduling horizon starting up with 82,000 bbl.

_____________________________________________________________________
77
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

5.4 Effect of Not Control Oil Sulphur Content Applied to Case 1.


Logically, each time that the feed switch is done the plant manager knows if either a
higher or a lower sulphur content crude oil is feeding the CDU and this helps to do the
proper control to neutralise the sulphur downstream basically in accordance with the
sulphur content range in the charging crude oil. The products usually used for
neutralising and avoiding damage to the equipment and piping as a result of the
sulphur compound attack are very expensive and hence, it is strongly desirable to
optimally regulate their consumption to save money. But what could happen if
somebody at the managerial level believes that control the sulphur range during the
blending in charging tanks increase a lot the total operational costs and therefore he
wants to try not controlling anymore the sulphur content in the charging tanks and
hence, charging tanks only should concern about having enough blended crude oil to
feed the CDU not matter their sulphur content.
This is a good question to answer and the conditions of case 1 will be taken to
analysis this new case 1d, except that the control of sulphur content range in charging
tanks will not be taken in account. However, each vessel continues unloading to the
same assigned storage tank.
After applying the optimisation techniques for case 1d the following result are
highlighted:
The optimal operation cost for the 15 day scheduling horizon of this case is
US$333,566.5. It is US$ 5,397.75 less costly than case 1.
The optimal unloading start and finish and the vessel volume variations are shown in
table 5.15 for case 1d. Particularly, all vessels optimally unload the same arriving day.

_____________________________________________________________________
78
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Vessel Arrival Unloading Unloading Amount of Crude oil


Start
Finish
Day 1
Day 1
Day 2
400,000 bbl
1
2

Day 6

Day 6

Day 7

400,000 bbl

Day 10

Day 10

Day 11

400,000 bbl

Table 5.15 - Case 1d. Unloading start up and finish results.


Figs.5.16 and 5.17 indicates the optimal volume variation for storage and charging
tanks respectively at each time interval (day). If figs 5.2 and 5.3 from case 1 are
compared with figs.5.16 and 5.17, it may seem for case 1d that all storage tanks have
the same priority to be consumed according to their available crude volume at each
time interval; even the storage tank 3 is more consumed than case 1. The phenomenon
for charging tanks for both cases are similar; they mainly differ in that for case 1d,
each charging tank when has the chance to be refilled, this operation is made using the
maximum possible rate up to 65,000 bbl per day depending of the volume they need
to complete its maximum crude oil volume. This phenomenon also could be observed
in table 5.15, compared with table 5.5 for case 1.

400
Crude bbl x 1000

350
300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 5.16 - Case 1d. Storage tank volume variation results.

_____________________________________________________________________
79
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 5.17 - Case1d. Charging tank volume variation results.


The optimal feeding, the number of feed switches and the switch schedule are the
same presented in fig. 5.3 for case 1, except that the optimal feed is depleted the last
day of the period from 82,000 bbl to 75,000 bbl; but it still is 4.8% over the total feed
demand. Apparently removing the sulphur content constraint for charging tanks could
have allowed transferring more crude oil from storage to charging tanks but for this
case 1d the total optimal amount transferred along the schedule horizon (table 5.15) is
1,109,000 bbl just the same presented for case 1.
Stor.TChar.T

5 6

8 9

10 11 12 13 14 15

65 50
65 40
65
1-1
65
65
1-2
65
65
65
2-1
65 64
65
2-2
65
65 40
3-1
30
40 65
3-2
Table 5.15 - Case 1d. Results for volumetric flow rate in bbl x 1000 per day from
storage to charging tanks.

_____________________________________________________________________
80
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Finally, as it was observed with the optimal results presented, case 1d basically does
not present major additional advantages compared with case 1 (only a total optimal
cost reduction of 1.6 % compared with case 1). Instead, the plant would be losing the
optimal control of the sulphur neutralisation product consumption and hence, the
money spent in this product could increase due the unnecessary waste.
5.5 Effect of Not having Tank Inventory Cost for Case 1.
The tank inventory costs are related with the cost that the refinery has to pay for the
average crude oil volumes that manage each tank between interval of times (days).
The above analysis of case 1 and its different modification and discussions have
shown that the optimal results have taken in account the managing of the lowest
optimally possible total crude oil volumes in tanks along the scheduling horizon to
reasonably reduce the impact of this cost. A test was done considering no inventory
cost for case 1 and therefore, the following response is part of the optimal results after
the model was applied:
The optimal cost for this case is US$ 260,000. It is clear, that they correspond to four
changeovers (US$ 50,000 each) plus two days unloading per vessel (US$ 20,000 per
vessel).The changeovers also have the same schedule presented for case 1 on days
3,6, 9 and 12.
In addition, other data to highlight of this exercise is the optimal vessel unloading rate
along the scheduling horizon through table 5.16.
Vessel 1
1

3 4 5 6

8 9 10

11

12 13 14 15

150 250 0

2
3

250 150 0
150 250 0

Table 5.16 - Case 1e. Results for volumetric flow rate (bbl x 1,000) per day from
vessels to storage tanks.
_____________________________________________________________________
81
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

It is important to comment that despite there was not inventory cost to charge to the
optimal operational cost only vessel 2 is able to optimally unload the maximum rate
the first unloading day. It may possible that the other vessels were not able because
either their assigned storage tanks had enough crude oil volume during the first
unloading day or the optimal solution had not taken care about that due to the null
inventory cost.
5.6 Effect Caused by a High Reduction in Changeover Cost for Case 1.
A test was made to check the behaviour of the optimal feed switch number for a
similar problem like case 1.The refinery manager would like to review the high
changeover cost; he believes that after doing a good analysis of this cost, it could go
down if some good practices are implemented. However, reducing the changeover
cost the optimal total operational cost could be reduced but the current optimal
number of changeovers may not. The analysis of this situation showed that the
number of changeovers has a hugely dependency of the tank capacities. The test was
done with the same conditions of case 1 and reducing the changeover cost from US$
50,000 to US$ 15,000. Then, the optimal final solution indicated four changeovers on
the days 3, 6, 9 and 12, the same optimally scheduled for case 1.
5.8 Chapter Summary.
Table 5.17 shows a summary of the resources used to solve most of the cases
reviewed in this chapter.
Case 1

Case 1a

Case 1b

Case 1c Case 1d

Equations and constraints 1,682

1,683

1,682

1,670

1,562

Single variables

863

864

863

863

861

Discrete variables

261

261

261

261

261

Iterations

397,133

443,748

421,902

95,934

1,344,495

Solving time

31.9 min. 86.0 min. 78.7 min. 4.0 min. 228.97 min.

Table 5.17 Resource summary used to solves cases.


_____________________________________________________________________
82
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

A practical case has been reviewed in this chapter. The optimisation model developed
in this Thesis has been applied to this practical case, including the analysis of the
scheduling and operational cost impact when some practical modifications are applied
as they could happen in real situations i.e. vessel arrival scheduling change; inventory
cost alteration and so on. Solving the different alterations has shown that if the
conditions of the problem still are feasible, an optimal solution always could come out
for each real situation. Refinery managers would like to have this kind of support at
the scheduling level for avoiding waste of money controlling all the mentioned typical
changes that could happen during the operation of similar operating systems.
Finally, although this chapter smoothly mention the scheduling impact by the
equipment limitations, the next chapter 6 will deepen this topic.

_____________________________________________________________________
83
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Chapter 6. MODEL APPLICATION TO CASES WHERE THE


SYSTEM EQUIPMENT LIMITATIONS ARE HIGHLIGHTED.
This chapter starts to analyse the capacity limitation of the equipment presented in the
model. One of the limitations is the unloading rate capacity from vessels to storage
tanks per time interval. The optimisation results in Chapter 5 show for case 1 and the
modified situations (cases 1a, 1b, 1c, 1d and 1e) that the best way is to unload the
400,000 bbl vessel in two days. But what could happen if each vessel has 550,000 bbl
to be unloaded and the maximum capacity of the pumping system to storage tanks still
is 250.000 bbl per day?. It can be foreseen that at least three days will be needed to
unload each vessel.
On the other hand, it is possible to make other questions to evaluate the current
equipment capacity and process conditions to detect possibilities to save more money
after applying the optimisation techniques i.e. how it is possible to keep at least in an
optimal value the operational cost of the analysed system fulfilling the plant charge
demand if it is notified at the last day that the crude oil sea transportation company
has decided to increase the unloading cost?
6.1 Case 2, Effect of Increasing the Vessel Unloading Volume.
Table 6.1 has a summary of the main data for this case. It can be observed that the
data is quite similar to Table 5.1, except that the crude oil amount of each vessel has
changed.
Scheduling Horizon (# unit time)
Number of Vessels Arrivals
Arrival Time

15 days
3
of Sulphur Content

Amount
Crude oil
Vessel 1
Day 1
550,000 bbl 0.01
Vessel 2
Day 6
550,000 bbl 0.03
Vessel 2
Day 10
550,000 bbl 0.05
Number of Storage tanks
3
Storage Tanks
Maximum
Initial Oil
Sulphur Content
Capacity
Amount
Tank1
350,000 bbl
30,000 bbl 0.01
_____________________________________________________________________
84
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

(min.vol.5,000bbl)
Tank 2
350,000 bbl
(min.vol.5,000 bbl)
Tank 3
350,000 bbl
(min.vol.5,000 bbl)
Number of Charging tanks
Charging Tanks
Capacity

200,000 bbl

0.03

140,000 bbl

0.05

2
Initial Oil
Amount

Range of Sulphur
Content & Initial
value
0.01-0.02
0.0158
0.035 0.045
0.0389

Tank1
250,000 bbl
70,000 bbl
(min.vol.15,000bbl)
Tank2
250,000 bbl
190,000 bbl
(min.vol.15,000bbl)
Number of CDU
1
Maximum Flow from vessel to storage tank.
250,000 bbl/day
Maximum Flow from one storage tank to charging 70,000 bbl/day
tanks simultaneously during any time period.
Maximum Flow from one storage tank to one 65,000 bbl/day
charging tank.
Maximum Flow from one charging tank to one 82,000 bbl/day
CDU.
Cost involved in vessel operation
Unloading: US$ 10,000/day
Sea Waiting: US$ 8,000/day
Tank inventory cost
Storage tank: US$ 0.008 / (day x
bbl)
Charging tank: US$0.005/(day x
bbl)
Changeover cost per feed switch
US$50,000
CDU crude oil demand
75,000 bbl/day
Table 6.1 - Case 2. Input data summary.
After applying the model for the above case there is not feasible results because the
high sulphur oil optimal demand for blending is low to compensate the higher volume
of crude oil unloading from vessel 3 to tank 3 and therefore, the current storage
capacity for the high sulphur crude oil is not enough for keeping the remain non used
crude oil. Then to solve this problem, a tank of 600,000 bbl, available in the same
system, will be available to replace tank 3 keeping the same conditions of minimum
crude oil volume, start up crude oil volume and flow rate capacities indicated in table
6.1.

_____________________________________________________________________
85
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

After applying the model again with the new conditions for case 2 (storage tank 3
capacity changed), the following results are highlighted:
The optimal operation cost for the 15-day scheduling horizon of this case is
US$450 824.1.
Table 6.2 indicates the suitable days for starting and finishing unloading in the
scheduling horizon of each vessel:
Vessel

Starts unloading

Finish unloading

Day 1

Day 5

Day 6

Day 9

Day 10

Day 12

Table 6.2 - Case 2.Unloading start and finish results.


It can be observed from table 6.2 that the optimal unloading start up time for all
vessels is the same arriving date.
Table 6.3 indicates each vessel crude oil volume variation after starting unloading
during the scheduling horizon.
Day
1
2
3
4
5
550
510
510
475
250
Vessel 1
Day
5
6
7
8
9
550
540
475
250
Vessel 2
Day
10
11
12
13
14
550
500
250
0
Vessel 3
Table 6.3 - Case 2. Vessel volume variation (bbl x 1000) results.

6
0
10
0
15

7
11

It can be observed from table 6.3 that the optimal unloading time for vessel 1 is five
days, for vessel 2 is four days and for vessel 3 is three days. Then, according to this
table the optimal results suggest not to unload in the middle of the unloading period
for vessel 1 on day 2. This consideration may be consequence of the current available

_____________________________________________________________________
86
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

capacity of storage tanks 1 and 2. Moreover, this phenomenon could be better


understood observing the flow rate table 6.4.
Fig. 6.1 indicates the optimal variation of the storage tank volume per time interval. It
is interesting to observe that storage tanks 1 and 2 keep at the minimum volume or
close to the minimum volume around two or three days since they have been started to
be fed by the vessels. This phenomenon is because almost all their incoming volume
has been simultaneously fed to the charging tanks and therefore, it does not allow that
both tanks significantly increase their crude oil volume in this short period of time.
This behaviour helps to keep a low inventory cost. The optimal solution considers to
increase the tank remain crude oil volume close to the finish of the unloading period
i.e. tank 1 and 2 got the maximum volume the day the vessel unloading is finished.
This result is indicated in fig. 6.1, one period of time (day) after the total mass balance
has been done (equation 3.21, chapter 3).

Crude bbl x 1000

600
500
400
300
200
100
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 6.1 - Case 2. Storage tank volume variation results.


Fig 6.2 indicates the optimal crude oil volume variation of each charging tank per
time interval (day). It clearly indicates that when one tank is feeding the CDU, the
other tank is being fed or refilled by the crude oil from the storage tanks fluctuating
_____________________________________________________________________
87
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

between the minimum and maximum volume capacity of each tank. Particularly, for
this case 2, along the first half of the scheduling horizon, charging tanks never reach
the minimum volume.

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 6.2 - Case 2. Charging tank volume variation results.


Fig 6.3 indicates the optimal feeding to the CDU per each time interval during the
scheduling horizon. The 75,000-bbl feed demand should be given at days 8, 11 and
14. On the other hand, the 82,000-bbl maximum feed should be given at days 1, 2,
3,4,5,6,9,12 and 15. The optimal total amount of crude oil proposed to feed the CDU
for this case during the 15 day scheduling horizon is 1,197,000 bbl; 6.4% above the
total feed demand. They are 11,000 bbl more to feed than the case 1 in chapter 5.
Definitely, despite there is more volume of crude oil unloading during the scheduling
horizon, it could have expected that the increase in the feed to the CDU were more,
but either the current tank volume capacities or the pumping system capacities may
have prevented to achieve this objective. Chapter 7 will help to understand what it is
the real problem in the system analysed.

_____________________________________________________________________
88
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

In addition, storage tanks finish this period with more crude oil volume. Therefore,
this is important information as input condition for the next period. The optimal
numbers of feed switches or changeovers for case 2 are five (5), given at days 2,4,6,9
and 12 respectively. Figs 6.2 and 6.3 clearly show this condition. That means that the
change of vessel oil volume unloaded from 400,000 bbls to 550,000 bbls has
increased the number of changeovers from 4 to 5 it is compared cases 1 and 2.

Crude bbl x 1000

84
82
80
78
76
74
72
70
1

10 11 12 13 14 15

Scheduling horizon in days

Figure 6.3 - Case 2. Feeding to the crude distillation unit results. Solid bars:
blended oil 1; blank bars: blended oil 2.
Table 6.4 indicates for case 2 the optimal volumetric flow rate at each time interval
(day) from vessels to storage tanks. Particularly, each vessel unloads crude oil with
one specific composition to only one storage tank already assigned at the planning
level (equation 3.15, chapter 3).
Day
1
2
3
4
5
6
7
40
0
35
225
250
Vessel 1
Day
5
6
7
8
9
10
11
10
65
225
250
Vessel 2
Day
10
11
12
13
14
15
50
250
250
Vessel 3
Table 6.4 - Case 2. Results for volumetric flow rate (bbl x 1,000) per day from
vessels to storage tanks.
_____________________________________________________________________
89
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Tables 6.5a and 6.5b also respectively indicate the optimal flow rate from storage to
charging tanks. They show that the optimal total amount of crude oil transferred
during the scheduling horizon, from the storage tanks to the charging tanks to balance
the CDU crude oil demand for this case is 1,120,000 bbl. This quantity is lower than
the total crude oil fed to the CDU during the scheduling horizon by 77,000 bbl.
Stor.TChar.T
1-1
1-2
2-1
2-2
3-1
3-2
Table 6.5a

65
65
9.8

3
35

42

65

65

65

9.2

23.8

65

65

65
10.2
- Case 2. Results for volumetric flow rate (bbl x 1,000) per day from

storage to charging tanks.

Stor.TChar.T
1-1
1-2
2-1
2-2
3-1
3-2
Table 6.5b

10

65

65

65

35

11

12

13

26.6

29.4

14

15

65

65
49
- Case 2. Results for volumetric flow rate (bbl x 1,000) per day from

storage to charging tanks.


Fig. 6.4 indicates the optimal fluctuation for the sulphur content in the crude oil of
each charging tank at any time interval (day) a long the scheduling horizon. Charging
tank 2 presents an oscillating sulphur concentration along the scheduling period inside
its range, with a tendency to stabilise finishing the period at the minimum range value
(0.035). Also for the conditions presented in case 2, the CDU is prepared to receive
whichever of these blended crude oils X or Y; instead the oil refinery is mainly
concerned that the system analysed is be able to keep the sulphur content range in
each charging tank while the demand of crude oil to feed the CDU is satisfied.
_____________________________________________________________________
90
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude sulphur content/


charging tanks

0.045
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
1

10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1 Sulphur content

Charging Tank 2 Sulphur content

Figure 6.4 - Case 2. Crude oil sulphur content variation results in charging
tanks.
6.2 Scheduling Alteration of Case 2.
Similar as it was done for case 1 in chapter 5, the following questions could come out
regarding case 2: what could happen if it is informed that the vessel arriving schedule
has changed just after the monthly plan already have been done and have got the
approval at the managerial level? It is possible to do something at the scheduling level
in order to perform again the optimization techniques as they were done for the first
arriving schedule?. The answers to these questions are also very important for this
case if the problem also is relating to keeping the minimum operational cost and
hence, a good profit margin.
Table 6.6 shows the arriving schedule for the new case 2a:
Vessel Arrival Time Amount of Crude oil Sulphur Content
Day 1
550000 bbl
0.01
1
Day 5
550000 bbl
0.03
2
Day 11
550000 bbl
0.05
3
Table 6.6 - Case 2a. First change of arriving schedule.

_____________________________________________________________________
91
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

As it is can be observed from this new arriving schedule vessel 2 will arrive one day
earlier and vessel 3 will arrive one day later with respect to the original arriving
schedule approved at the planning level for case 2.
After applying the model for this case 2a (same case 2 including the modifications of
the arriving schedule), the following result are highlighted:
The optimal operational cost for the 15 day scheduling horizon of case 2a is
US$452,892.8. It is US$ 2,068.7 more costly than the original case 2.
Table 6.7 indicates the optimal suitable days for starting and finishing unloading in
the scheduling horizon of each vessel:
Vessel
Starts unloading
Finish unloading
Day 1
Day 4
1
Day 7
Day 10
2
Day 11
Day 13
3
Table 6.7 - Case 2a. Unloading start and finish results.
It can be observed from table 6.7 that the optimal unloading time for vessel 2 is two
days after arriving and the optimal unloading time period for vessels 1 and 2 are four

Crude bbl x 1000

days and for vessel 3 is three days.


500
450
400
350
300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 6.5 - Case 2a. Storage tank volume variation results.


_____________________________________________________________________
92
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 6.6 - Case 2a. Charging tank volume variation results.


Figs. 6.5 and 6.6 indicate the optimal variation of storage and charging tank volume
per time interval respectively. Fig 6.7 indicates the optimal feeding to the CDU per
each time interval during the scheduling horizon for case 2a. The 75,000-bbl feed
demand should be given at days 5,8,11 and 14. On the other hand, the 82,000-bbl
maximum feed should be given at days 1,2,3,6,9,12 and 15. The optimal total amount
of crude oil proposed to feed the CDU for this case during the 15 day scheduling
horizon is 1,186,000; 5.42 % above the total oil demand. Then, as it can observe it is
the same of case 1, even the same feed flow rate per day for the CDU (fig.5.4, chapter
5). Moreover, with respect to the original case 2 this change of arriving schedule has
reduced the total optimal feed to CDU in 11,000 bbl along the schedule horizon.
Definitely, despite there is more volume of crude oil unloading during the scheduling
horizon, the optimal solution for the new conditions does not allow an increase of the
total feed to CDU beyond the results of case 1 in chapter 5. The numbers of
changeovers for case 2a are five (5) given at days 2,3,6,9 and 12 respectively
(different to case 2 in one day) and the figs 6.6 and 6.7 clearly show this condition.

_____________________________________________________________________
93
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude bbl x 1000

84
82
80
78
76
74
72
70
1

10 11 12 13 14 15

Scheduling horizon in days

Figure 6.7 - Case 2a. Feeding to the crude distillation unit. Solid bars: blended oil
1; blank bars: blended oil 2.
Table 6.8 indicates for this case the optimal volumetric flow rate at each time interval
(day) from vessels to storage tanks. As it can be seen, for this case the optimal
solution does not present unloading interruption any interval of time inside the
unloading period.
Day

Vessel 1

34.15

40.85

225

250

Day

10

11

15

65

220

250

11

12

13

14

15

50

250

250

Vessel 2
Day

10

Vessel 3

Table 6.8 - Case 2a. Results for volumetric flow rate (bbl x 1000) per day from
vessels to storage tanks.

_____________________________________________________________________
94
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude sulphur content/


charging tanks

0.05
0.045
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
1

10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1 Sulphur content

Charging Tank 2 Sulphur content

Figure 6.8 - Case 2a. Crude oil sulphur content variation results in charging
tanks.
Fig. 6.8 indicates the optimal fluctuation for the sulphur content in the crude oil of
each charging tank at any time interval (day) a long the scheduling horizon i.e. in the
first half part of the scheduling horizon for charging tank 1 may be notable the
unloading delay of vessels 2 and 3 with higher sulphur content. However, in the last
half part of the scheduling horizon, compared with case 2, case 2a presents more
consumption of crude oil from storage tank 3 and hence, the sulphur content of both
charging tanks is in average higher than case 2.
6.3 Case 3, Effect of a High Increase in Unloading Cost.
A case 3 is presented with the same case 2 conditions but increasing the unloading
cost from US$ 10,000 to US$ 40,000 per vessel and per day since the vessel has
started up till it has finished the unloading. This case is presented to analyse the
optimal cost impact when the mentioned cost is considerably increased with respect to
the sea waiting cost.
The optimal operational cost for the 15 day scheduling horizon of this new case is
US$809,905.5.
_____________________________________________________________________
95
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

The table 6.9 indicates the optimal suitable days for starting and finishing unloading
in the scheduling horizon of each vessel:
Vessel

Starts unloading

Finish unloading

Day 1

Day 5

Day 6

Day 9

Day 10

Day 12

Table 6.9 - Case 3. Unloading start and finish results.


Comparing table 6.9 with table 6.2, case 2; it was not optimally possible to save any
unloading day for diminishing the impact of the high unloading cost. The current
capacity of some equipment may have not allowed achieving the expected response
with respect to reduce the unloading cost by using for the unloading operation the
fewer days as possible. This situation will be clarified forward in chapter 7.
Figures 6.9, 6.10 and 6.11 respectively show for this case the optimal storage tank and
charging tank volume variation and the optimal feeding to the crude distillation unit
respectively.

Crude bbl x 1000

600
500
400
300
200
100
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 6.9 - Case 3. Storage tank volume variation results.


_____________________________________________________________________
96
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 6.10 - Case 3. Charging tank volume variation.

Crude bbl x 1000

84
82
80
78
76
74
72
70
1

10 11 12 13 14 15

Scheduling horizon in days

Figure 6.11 - Case 3. Feeding to the crude distillation unit. Solid bars: blended
oil 1; blank bars: blended oil 2.
As is shown in fig 6.11, for this case the total feed to the CDU along the scheduling
horizon is 1,201,000 bbl; 6.76% above the total feed demand. This optimal result
shows that the increase of the unloading cost has increased the total operation cost but
also positively has increased the total amount of total crude oil feed to the CDU by
_____________________________________________________________________
97
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

4,000 bbl more compared with case 2 and by 15,000 bbl more compared with case 1.
But the refinery has to do a cost benefit analysis to check if this unloading cost
increase could be paid back by the increase of feed to the CDU in accordance with
case 3 optimal results. The numbers of feed switches are still five (5) for this case and
are presented at days 3,5,7,9 and 12 as is clearly shown in figures 6.10 and 6.11. The
sequence suggested for making these mode changeovers are different from case 2.
Tables 6.10 indicate the volumetric flow rate from vessels to storage tanks. Vessel 1
presents an optimal unloading interruption at the day 3. However, this situation is
quite similar to the case 2 presented in table 6.4.
Vessel 1 2 3 4
5
6 7 8
9
10 11 12 13 14 15
24 65 0 211 250
1
10 65 225 250
2
50 250 250
3
Table 6.10 - Case 3. Results for volumetric flow rate (bbl x 1000) per day from
vessels to storage tanks.

6.4 Case 4, Effect of CDU Shut Down.


This case analyses the optimisation techniques applied if along the scheduling horizon
the crude distillation unit must stop one day to be inspected and to make some minor
repairs as an emergency event for what the planning level usually does not have the
enough tools to solve this problem in an optimal way to reduce the impact in the
operational cost of the system analysed in this Thesis. These cases sometimes happen
in oil refineries when major equipment has to shut down to do non planned activities.
Case 4 has the same conditions presented for case 2, except that the CDU on day 9
can not be fed by any crude oil from charging tanks.
The optimal operational cost for the 15 day scheduling horizon of this new case is
US$ 452,267.5. It is only US$ 1,443.4 more costly than case 2.
_____________________________________________________________________
98
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

The table 6.11 indicates the suitable days for starting and finishing unloading in the
scheduling horizon of each vessel:
Vessel
Starts unloading
Finish unloading
Day 1
Day 5
1
Day 6
Day 9
2
Day 10
Day 12
3
Table 6.11 - Case 4. Unloading start and finish results.
There is no variation in the unloading period for all vessels compared with case 2,
table 6.2.
Figures 6.12, 6.13 and 6.14 respectively show for this case the storage tank volume
variation, the charging tank volume variation and the feeding to the crude distillation
unit.

Crude bbl x 1000

600
500
400
300
200
100
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 6.12 - Case 4. Storage tank volume variation results.

_____________________________________________________________________
99
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 6.13 - Case 4. Charging tank volume variation results.

Crude bbl x 1000

100
80
60
40
20
0
1

9 10 11 12 13 14 15

Scheduling horizon in days

Figure 6.14 - Case 4. Feeding to the crude distillation unit. Solid bars: blended oil
1; blank bars: blended oil 2.
It is possible to see in figure 6.13 the effect of not having feed for CDU on day 9;
charging tank 1 takes advantage of this situation to start to be refilled and charging
tank 2 already is full on day 9 and start day 10 with the same volume.
_____________________________________________________________________
100
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

As is shown in fig 6.14, for this case the total feeding to the CDU along the
scheduling horizon is 1,137,000 bbl; still 1.07 % over the total feed demand. This
optimisation result shows that the shut down of the CDU on the day 9 has allowed not
only to practically impact the optimal operation cost of the system analysed in a
minimum increase percentage (0.32%); also, it has helped to diminishes the effect of
the total lost of the day 9 feed (82,000 bbl, fig. 6.3 for case 2); only the total feed to
the CDU was depleted by 60,000 bbl considering the optimal results of this case 4.
The numbers of feed switches are still five (5) for this case and are presented at days
3,5,7, 10 and 12 as is clearly shown in figures 6.13 and 6.14. The order suggested for
making these mode changeovers are different from case 2.
However, special care should be applied solving this kind of situation using option b
because considering the optimal results for whichever case analysed, the total feeding
to CDU could be under the total feed demand expected for the scheduling horizon;
then, it will be convenient to try solving this problem using optiond previously
fixing the total feed demand required along the scheduling horizon and applying the
same constraint 3.44 for the shutdown day within this option.
6.5 Chapter Summary.
Table 6.12 shows a summary of the resources used to solve the cases reviewed in this
chapter.
Case 2
Case 2a
Case 3
Equations and constraints 1,682
1,682
1,682
Single variables
863
863
863
Discrete variables
261
261
261
Iterations
886,901
502,694
4,631,527
Solving time
117.9 min. 112.7 min. 571.8 min.
Table 6.12 Resource summary used to solves cases.

Case 4
1,683
863
261
1,151,095
208.7 min.

Some practical cases have been reviewed in this chapter. The normal operation of a
system could convert it in abnormal operation if some conditions of the system have
_____________________________________________________________________
101
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

drastically changed and no action is taken to face these changes. Optimal operational
costs and the production scheduling are directly affected. The descriptions of the
changes in conditions are guided to find the system limitations, specifically in its
equipment capacities explaining how these limitations prevent having better optimal
operational costs and operational schedules. Several comparisons have been done
even with cases from chapter 5 to help to clarify. For the analysis of the cases, the
new optimisation model is applied to the practical cases as in real situations could
happen when some scheduling or operation conditions have changed and hence, the
refinery has to prepare itself to promptly face these situations that affects the analysed
system i.e. increase of the vessel crude oil volume to unload, non planning plant shut
down in the middle of the scheduling horizon and so on. In addition, also as well as it
was mentioned in chapter 5, the different situations have shown that if the conditions
of each problem are feasible always an optimal solution could come out. However, an
infeasible situation was solved in this chapter for getting the optimal solution for one
case analysed.
In addition, the equipment limitations have come out looking for responses for solve
them and even for trying to get better optimal operational cost results. On the other
hand, there would be other concern about the impact in the optimal operational cost
and in the operational schedule if some equipments are modified; this will be the
matter of next chapter 7 that will solve questions like these:
What could happen if at the managerial level is decided to increase the volume of both
charging tanks up to 300,000 bbl. If one is ready first, is it worth it to start putting in
operation the new one operating with one of the other 250,000 old one? What could
be the optimal operational results if the refinery is managing cases with conditions
similar to the case 1 conditions?

_____________________________________________________________________
102
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Chapter 7. MODEL APPLICATION TO CASES WHERE


THINKING EITHER IN REVAMP OR CHANGE EQUIPMENT IS
POSSIBLE.
The refinery managers normally want to have some efficient tools that help them to
take decision to invest either in revamping or changing equipment in a process
system. The main question that could come out is: Is it possible to do it using the
new model to optimise the operational cost of the system analysed in this thesis?
Well, it is possible to start solving the questions presented in the chapter 6 summary.
7.1 Cases 5 and 6, Increasing Capacity of Charging Tanks.
The managerial level is consulting and preparing a project that involves the capacity
increase of both charging tanks up to 300,000 bbl. The project should be done in two
phases. The scope of the first phase is to complete the first charging tank before
starting with the other one. If one is ready first; is it worth to put in operation the new
one with the other 250,000 old one? What could be the optimal results if the refinery
is managing cases of vessel arriving schedules and conditions the same presented for
case 1 in chapter 5 ?.
In order to clarify all both cases 5 and 6, will handle the same conditions of case 1 in
chapter 5, except that for case 5, only one new charging tank will be operating with a
volume capacity of 300,000 bbl replacing one of the existing 250,000 bbl charging
tank, specifically the lower sulphur one; and case 6 will have both charging tanks new
with a volume of 300,000 bbl each. The tank unit inventory cost has not any increase
by the effect of the investment.
After applying the model for the above case 5 and case 6 the following results are
highlighted:
The optimal operation cost for the 15 day scheduling horizon of case 5 is
US$331,071.2 and for case 6 is US$ 329,186.0.
_____________________________________________________________________
103
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

It can be observed that case 5 is US$ 7,893.1 less costly than case 1 and also case 6 is
US$ 9,778.25 less costly than case 1; it means that a saving of around US$ 235,000
per year could be achieved. Although, case 6 could reduce more the optimal
operational cost it could be worth it starting when the first project phase has finished
with the first new charging tank while the other is finished in the next project phase.
The table 7.1 indicates the suitable days for starting and finishing unloading in the
scheduling horizon of each vessel. Both cases have the same optimal unloading start
and finish:
Vessel

Starts unloading

Finish unloading

Day 1

Day 2

Day 6

Day 7

Day 10

Day 11

Table 7.1 - Cases 5 and 6. Unloading start and finish results.


Figs. 7.1 and 7.2 indicate the optimal volume variation for each storage tank at each
interval (day) for cases 5 and 6.
400
Crude bbl x 1000

350
300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 7.1 - Case 5. Storage tank volume variation results.


_____________________________________________________________________
104
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

350
Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 7.2 - Case 6. Storage tank volume variation results.


It can be observed analyzing figs.7.1 and 7.2 that for both cases, storage tanks 1 and 2
have similar volume variation behaviour and tanks 2 and 3 present higher
consumption in case 6 than in case 5 because both charging tank capacities have
increased, including the high sulphur one. For both cases the optimal results indicate
a little higher consumption of storage tank oil volumes than case 1, chapter 5.
350
Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 7.3 - Case 5. Charging tank volume variation results.


_____________________________________________________________________
105
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

350
Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 7.4 - Case 6. Charging tank volume variation results.


Figs 7.3 and 7.4 indicate the optimal oil volume variation at each time interval (day)
for each charging tank. It can be observed at the top of each graphic that in some
cases the charging tank that is being refilled gets its maximum volume before the
other tank has been consumed to the minimum volume to make the feed switch. This
is a clear demonstration that charging tanks although their capacities have been
increased, they still have some volume restrictions. Later, after the other results for
both cases have been observed it would be possible to think in advance if the project
scope to increase both charging tank volumes would be profitable or not.
Figs 7.5 and 7.6 indicate for cases 5 and 6 the optimal feeding to the CDU per each
time interval during the scheduling horizon.
For case 5, the 75,000 bbl feed demand should be given at days 8 and 14; in another
hand, the 82,000 bbl maximum feed should be given at days 1, 2, 3, 4,5,6,9,10,11,12
and 15. Then, the optimal total amount of crude oil proposed to feed the CDU during
the 15 day scheduling horizon is 1,208,000 bbl; 7.38% above the total feed demand.
Hence, there are 22,000 bbl more optimally available to feed the CDU during the
schedule horizon than case 1, which means around 535,000 bbl more per year.

_____________________________________________________________________
106
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude bbl x 1000

84
82
80
78
76
74
72
70
1

10 11 12 13 14 15

Scheduling horizon in days

Figure 7.5 - Case 5. Feeding to the crude distillation unit results. Solid bars:
blended oil 1; blank bars: blended oil 2.

Crude bbl x 1000

100
80
60
40
20
0
1

9 10 11 12 13 14 15

Scheduling horizon in days

Figure 7.6 - Case 6. Feeding to the crude distillation unit results. Solid bars:
blended oil 1; blank bars: blended oil 2.
Instead for case 6, the optimal result considers that the CDU could be feed each time
interval (day) by the daily maximum plant capacity. This will be a great result when
the project has been completed. That means, the optimal total amount of crude oil
_____________________________________________________________________
107
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

proposed to feed the CDU for case 6 during the 15 day scheduling horizon is
1,230,000 bbl; 9.33 % above the total feed demand, exactly the top allowed by the
plant capacity. Then, case 6 optimally presents 44,000 additional barrels to feed the
CDU during the schedule horizon with respect to case 1, which means around
1,070,000 additional barrels per year. Feed switches or changeovers for both cases 5
and 6 are four (4) given at days 3, 6, 9 and 12 respectively, the same feed switch
behaviour presented in case 1.
Table 7.2 indicates for both cases 5 and 6 the same optimal volumetric flow rate at
each time interval (day) from vessels to storage tanks. Particularly, as each vessel
unloads crude oil with one specific composition, for this case each vessel unloads to
one specific storage tank already assigned at the planning level (application of
equation 3.15, chapter 3).
Vessel 1
2
3 4 5 6
7
8 9 10 11 12 13 14 15
150 250
1
150 250
2
150 250
3
Table 7.2 - Case 5 and 6. Volumetric flow rate in bbl x 1,000 per day from vessels
to storage tanks.

Tables 7.3a&b and 7.4a&b also respectively indicates the optimal flow rate from the
storage tanks to the charging tanks for cases 5 and 6 .
Stor.T-Char.T
1
1-1
65
1-2
2-1
65
2-2
3-1
6.5
3-2
Table 7.3a - Case 5. Results for

2
65
28.5

36.4

3.35

65

36.5

6
65

7
61.8

65

54.2

65
17.75
volumetric flow rate (bbl x 1,000) per day from

storage to charging tanks.

_____________________________________________________________________
108
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Stor.T-Char.T
9
10
11
12
13
14
15
1-1
65
49
1-2
14.45
2-1
65
49
2-2
65
44.8
3-1
18
3-2
45.75
65
Table 7.3b - Case 5. Results for volumetric flow rate (bbl x 1,000) per day from
storage tanks to charging tanks
Stor.T-Char.T
1
2
3
65
65
1-1
36.4
1-2
65
32.3
2-1
65
2-2
2.7
3-1
65
3-2
Table 7.4a - Case 6. Results for volumetric flow

4
10.5
32.7

6
65

7
51

65

65

64.4
rate (bbl x 1000) per day from

storage to charging tanks.

Stor.T-Char.T
9
10
11
12
13
14 15
65
44.5
1-1
10.34
12.26
1-2
65
65
2-1
65
65
2-2
6.5
3-1
2.9
65
25.5
3-2
Table 7.4b - Case 6. Results for volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks.

Moreover, tables 7.3a&b and 7.4a&b show that the optimal total amount of crude oil
transferred during the scheduling horizon, from the storage to charging tanks to
balance the CDU crude oil demand for cases 5 and 6 are 1,181,000 bbl and 1,242,000
bbl respectively. These quantities are lower than the total crude oil fed to the CDU
during the scheduling horizon by 27,000 bbl and 12,000 bbl respectively. As it can be
observed, the charging tank volume expansions have optimally increased the total
flow transferred from storage tanks to charging tanks compared with case 1 that was
77,000 bbl under the optimal total flow feeding the CDU.
_____________________________________________________________________
109
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Crude sulphur content/


charging tanks

0.05
0.045
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
1

10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1 Sulphur content

Charging Tank 2 Sulphur content

Crude sulphur content/


charging tanks

Figure 7.7 - Case 5. Crude oil sulphur content variation in charging tanks.

0.05
0.045
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
1

10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1 Sulphur content

Charging Tank 2 Sulphur content

Figure 7.8 - Case 6. Crude oil sulphur content variation in charging tanks.
Figs. 7.7 and 7.8 indicate the optimal fluctuation for the sulphur content in the crude
oil of each charging tank at any time interval (day) a long the scheduling horizon. For
case 6 (fig. 7.8) is notable the influence of having during the scheduling horizon a
major consumption of storage tanks 2 and 3 (higher sulphur concentration); this effect

_____________________________________________________________________
110
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

may be shown by the bigger sulphur concentration average during the scheduling
horizon in charging tank 2 compared with case 5 (fig.7.7).
Definitely, after all the results have been observed, it is easier to tell in advance that it
would be convenient for the system to increase the charging tank volume as was
indicated in the project scope. An analysis cost-benefit should be done to check is the
project may be paid back in some years. Perhaps the cost of the project could be
hardly pay back in less than three years only having in account the

presented

reduction in optimal operational cost (2.88%) and the possibility to increase optimally
the amount of crude oil charges to the CDU. However, trials and errors have been
done with the model considering a lower increase in the capacity of charging tanks
which matches the maximum feed every time interval (day) and at least a similar
optimal cost reduction as was presented for case 6.
After trails and errors were made to get the minimum optimal charging tank capacities
for searching similar or better results than case 6, it is interesting to show the final
results in table 7.5. This exercise was made keeping all the same conditions for case 6,
while both charging tank capacities was randomly changed keeping the same size for
each one.
As it can be deducted from table 7.6, for the same conditions of case 1 and expanding
charging tanks capacity to 263,000 bbl each, is possible to get optimally the maximum
total feed to the CDU. That means that the refinery could incur investing less money
for achieving the same results of case 6. Even it could be possible to think in revamp
the charging tanks from 250,000 to 263,000 bbl (5.2% volume increase) and hence,
much less money could be needed. But, the effect of having a minor total optimal
operational cost in case 6 compared to the 263,000 bbl volume expansion
consideration by US$ 7,290.1 less costly per period (around US$ 175,000 per year)
should be taken in account for the final selection according to the choices or
alternatives for the project. Perhaps, the 268,000 bbl capacity expansion (10.7%
volume increase) is a better choice for the conditions of the problem.

_____________________________________________________________________
111
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Each
charging
tank

300,000

256,000

260,000

263,000

268,000

bbl

bbl

bbl

bbl

US$

US$

US$

US$

US$

337,643.0

336,818.5

336,476.1

331,152.1

329,186.0.

1,210,000

1,226,000

1,230,000

1,230,000

1,230,000

bbl

bbl

bbl

bbl

bbl

374,925

512,643

547,655

322,055

350,904

8,609.8sec 10,199.8sec 10,361sec

7,780.7sec

7,530.5sec

(143 min)

(129.7min) (125.5min)

bbl
(case 6)

capacity.
Total
optimal
operational
cost
CDU total
feed
Iterations
Software
time spent
running

(170min)

(173min)

Table 7.5 - Case 6. Comparisons / different charging tank capacities.


7.2 Case 7, Effect of Changing Pumping Rate Capacity.
It is also possible to try to invest the money in another way maybe less convenient.
What happens if somebody thinks that the best way is to increase the capacity of each
pumping system from storage to charging tanks (PUMPCAPi)? Again, the conditions
of case 1 are used considering only the following change shown in table 7.6 with
respect to table 5.1, chapter 5, in order to work with the new case 7:
Maximum Flow from one storage tank to 100,000 bbl/day
charging tanks simultaneously during any time
period.
Maximum Flow from one storage tank to one 95,000 bbl/day
charging tank.
Table 7.6 - Case 7. Input data summary exception.
There are three storage tanks and for solving the problem, three pumping systems will
be considered, one per storage tank. The project is proposed to be made in three
_____________________________________________________________________
112
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

phases, each new pumping system will be started and finished one by one and it is
suggested to study how the optimal costs and the operational schedule of the system
are improving, first working with one new pumping system and two old ones (case
7a), second working with two new pumping systems and the last old one (case 7b)
and third working with all the new pumping systems (case 7c).The sequence for
installing the new pumping systems is from the lower sulphur (storage tank 1) to the
higher sulphur side (storage tank 3).
After applying the model for each case and getting the optimal operation cost for the
15 day scheduling horizon the following result are highlighted:
Case 7a optimal operational cost: US$ 333,692.5
Case 7b optimal operational cost: US$ 333,351.1
Case 7c optimal operational cost: US$ 333,286.3
As it could be observed in advance compared with the case 1 optimal cost (US$
338,964.25), the benefit reducing the optimal operational cost may have been less
than expected with the new storage tanks pumping systems. The maximum reduction
is US$ 5,677.95 (around US$ 138,000 per year) considering the same other
equipments and the scheduling conditions of case 1.
Fig.7.9 indicates the optimal volume variation for each storage tank at each time
interval (day) for case 7c. It is interesting to comment that the availability of the new
pumping systems may have allowed that storage tank 3 has been more consumed and
as a result, vessel 3 have optimally been able to start unloading from the arriving day
compared with fig. 5.2, case 1. Cases 7a and 7b do not show anything additional
relevant to comment regarding the storage tank volume variation.

_____________________________________________________________________
113
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

400
Crude bbl x 1000

350
300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 7.9 - Case 7c. Storage tank volume variation results.

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 7.10 - Case 7c. Charging tank volume variation.


Fig 7.10 indicates the optimal volume variation at each time interval (day) for each
charging tank for case 7c. Compared with fig. 5.3, chapter 5, it can be observed that
charging tanks are refilled faster and even in one occasion the charging tank 2 has to
_____________________________________________________________________
114
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

wait in the full condition after it already has been refilled for two continuous time
intervals(days) before it starts to be discharged at day 6. Therefore, it could be
anticipated that charging tanks continue with the restriction in their volume size for
this case 7 and the effort of this project to decrease the optimal operational cost and
also, increase the total feed to CDU is depleted by this fact. Cases 7a and 7b do not
show anything additional relevant to comment regarding the charging tank volume
variation topic.
The optimal feeding to the CDU per each time interval during the scheduling horizon
for case 7c is the same presented for case 1 in fig.5.4, chapter 5; except that it presents
a depletion of the feed on the day 15 from 82,000 to 75,000 bbl; then, the total feed to
the CDU is 1,179,000 bbl; 4.8 % above the total feed demand. For all cases, the feed
switches or changeovers are four (4) given at the same days of case 1.
Regarding the flow rates from storage to charging tanks, it is interesting to comment
that the optimal results for case 7c has indicated due to the higher flow rates, the
operation of the flow rate schedule using less time intervals (days). Table 7.7 a&b
shows this characteristic.
Stor.T-Char.T
1
2
3
4
5
6
7
8
1-1
95
95
30
1-2
43
2-1
85
95
15
2-2
95
3-1
3-2
86
Table 7.7a - Case 7c. Results for volumetric flow rate in bbl x 1,000 per day from
storage to charging tanks.
Stor.T-Char.T
9
10
11
12
13
14
15
1-1
95
30
1-2
10.4
2-1
95
2-2
95
15.45
3-1
5
10
3-2
49
65.15
Table 7.7b - Case 7c. Results for volumetric flow rate in bbl x 1,000 per day from
storage to charging tanks.
_____________________________________________________________________
115
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Moreover, this table 7.7 a&b shows that the optimal total amount of crude oil
transferred during the scheduling horizon, from the storage tanks to the charging tanks
to balance the CDU crude oil demand for this case 7c is 1,109,000 bbl, which it is the
same presented for case 1. This quantity is lower than the total crude oil fed to the
CDU during the scheduling horizon by 70,000 bbl. Although, this total crude oil
transferred value is the same in both cases; the total flow transferred from each
storage tank is different i.e. storage tank 3 for case 7c optimally transferred 215,150
bbl compared with case 1, that was 190,000 bbl (table 5.5, chapter 5).
7.3 Case 8, Increasing Capacity of Storage Tanks.
Regarding case 3, chapter 6 with the higher unloading cost, it is not satisfactory to
observe that although the optimal cost solution have increased the total feed to the
CDU by 4,000 bbl along the scheduling horizon (around 97,300 bbl per year)
compared with the original case 2 in the same chapter 5, it was not possible to save
any unloading day along the scheduling horizon for the conditions presented for this
case 3, even continuing using a temporary tank of 600,000 bbl as storage tank 3 used
to solve the system infeasibilities for the problem conditions presented since case 2
was analysed. The manager wants somebody to review this case in order to reduce the
optimal operational cost. What happen if a project is proposed to increase each
storage tank capacity from 350,000 bbl to 500,000 bbl for trying to reduce the
operational cost for the new situation of higher unloading cost (US$ 40,000 per vessel
per day)? For solve this problem a new case 8 is presented with the same conditions
of case 3, chapter 5, except that the storage tank capacity is 500,000 bbl each (the
temporary 600,000 bbl tank 3 is not longer used for solving this case 8).
After applying the optimisation techniques for the above case 8 the following result
are highlighted:
The optimal operation cost for the 15-day scheduling horizon of this case is
US$655,803.3. It is much less costly than case 3, chapter 5 by US$ 154,102.2 per
scheduling horizon or around US$ 3,750,000 per year.
_____________________________________________________________________
116
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Table 7.8 indicates the suitable days for starting and finishing unloading in the
scheduling horizon of each vessel:
Vessel
Starts unloading
Finish unloading
1
Day 1
Day 3
2
Day 6
Day 8
3
Day 10
Day 12
Table 7.8 - Case 8. Unloading start and finish results.
As it can be observed in table 7.8, the optimal solution suggests to unload each vessel
in three days that is the minimum possible according to the unloading pumping
capacity from vessels to storage tanks (see table 6.1, chapter 6). Also, it is optimally
suggested starting unloading the same arriving day for all vessels and hence, no sea
waiting cost should be charged this time.
Fig. 7.11 indicates the optimal variation of the storage tank volume per time interval.
Compared with fig. 6.9 for case 3, chapter 6; it is clear that the bigger capacity of
storage tanks(case 8) has optimally allowed to unload vessels in three days for the
same conditions.

Crude bbl x 1000

600
500
400
300
200
100
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Storage Tank 1

Storage Tamk 2

Storage Tank 3

Figure 7.11 - Case 8. Storage tank volume variation results.

_____________________________________________________________________
117
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Figs.7.12 and 7.13 indicate the optimal variation of the charging tank volume per time
interval and the optimal feeding to the CDU along the scheduling horizon. Then, it is
possible to observe compared with figs.5.10 and 5.11 for case 3, chapter 5; that the
conditions of case 8 reduces the number of feed switches needed from 5 to 4, just the
same number of case 1 .

Crude bbl x 1000

300
250
200
150
100
50
0
1

9 10 11 12 13 14 15

Scheduling horizon in days


Charging Tank 1

Charging Tank 2

Figure 7.12 - Case 8. Charging tank volume variation results.

Crude bbl x 1000

84
82
80
78
76
74
72
70
1

10 11 12 13 14 15

Scheduling horizon in days

Figure 7.13 - Case 8. Feeding to the crude distillation unit results. Solid bars:
blended oil 1; blank bars: blended oil 2.
_____________________________________________________________________
118
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Case 8 presents an optimal total feed to the CDU of 1,179,000 bbl along the
scheduling horizon which compared with case 3, chapter 5, means depletion in the
optimal total feed of 22,000 bbl (535,300 bb per year) and 7,000 bbl compared with
case 1, chapter 5. It may be possible that the reduction of feed switches has helped to
deplete the total feed to the CDU.
The flow rate from vessels to storage tanks is presented in table 7.9.
Vessel 1
1
2
3

4 5 6

9 10 11

12

13 14 15

50 250 250
50 250 250
50 250 250

Table 7.9 - Case 8. Results for volumetric flow rate (bbl x 1,000) per day from
vessels to storage tanks.
Stor.T-Char.T
1
2
3
4
5
6
7
8
1-1
65
50
65
65
1-2
33
2-1
65
65
40
2-2
65
50
3-1
3-2
65
11
Table 7.10a - Case 8. Results for volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks.
Stor.T-Char.T
9
10
11
12
13
14
15
1-1
65
65
1-2
22.4
27.85
2-1
65
35
2-2
65
10.75
3-1
5
3-2
59
50
Table 7.10b - Case 8. Results for volumetric flow rate (bbl x 1,000) per day from
storage to charging tanks.
Tables 7.9 and 7.10a&b show the optimal flow rates from vessels to storage tanks and
from storage to charging tanks. Despite the storage tanks had available more crude oil
volume only was possible to optimally transfer 1,109,000 bbl from storage to
_____________________________________________________________________
119
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

charging tanks to balance the total CDU consumption which was 70,000 bbl less than
the total feed to the CDU. But again, the refinery has to do cost benefit analysis to
face the increase of unloading cost by reviewing the impact of the storage tank
capacity change and its effect in the total optimal operational cost and in the total
optimal feed to the CDU.
Trials and errors were done considering other storage tanks volume expansions for
comparing and observing other advantages with respect case 8. The results can be
observed in table 7.11. It was found that the minimum volume for each storage tank is
450,000 bbl for being able to get an optimal solution. Alternatives analysed
considering volumes under these values were infeasible. It seems that there may not
be any possibilities to increase the total feed to the CDU by only simultaneously
changing the storage tank capacity the same for each tank. The 450,000 bbl solution is
better and represents much less money investment than the 500,000 bbl solution.
Then, by only using a volume increase of 12.86% is possible to optimally save US$
155,930 per scheduling horizon (around 3,795,000 per year) compared with case 3,
chapter 6.
500,000
Each storage tank capacity.

450,000 bbl

bbl

600,000 bbl

(case 8)
Total optimal operational cost US$ 653,973.6 US$655,803.3 US$ 653,803.3
CDU total feed

1,179,000 bbl

1,179,000 bbl

1,179,000 bbl

Iterations

1,118,757

1,561,413

1,562,713

Software time spent running

378.2 min

293.4 min

391.7min

Table 7.11 - Case 8. Comparisons / different storage tank capacities.

7.4 Chapter Summary.


Table 7.12 summarises the resources used to solve the cases reviewed in this chapter.
_____________________________________________________________________
120
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Case 5
Case 6
Case 7
Equations and constraints 1,682
1,682
1,682
Single variables
863
863
863
Discrete variables
261
261
261
Iterations
319,829
350,904
490,517
Solving time
130.1 min. 125.5 min. 152.3 min.
Table 7.12 Resource summary used to solves cases.

Case 8
1,682
863
261
1,561,413
293.4 min.

Some practical cases have been reviewed in this chapter focus on demonstrating the
model strength to support cases of equipment capacity increase for the system
analysed. Sometimes the conditions that represent abnormal operation could
temporally be calmed down in a convenient way to continue with the operation even
if the change of conditions have been managed using a temporary equipment of more
capacity. However, this is not always the case, in most cases the manager has to work
in a future plan to improve the capacities of some system equipment focused on
overall cost reduction (life cycle cost), including the optimal operational costs.
Furthermore, one of the main objectives of the project scope if it is economically
viable should be that the new system capacities could properly manage current or
future foreseeable changes of system conditions that hugely could impact cost and
production scheduling.
In addition, regarding the work done in this chapter, the new model has been applied
to search and discover the best optimal operational cost solution for each case as in
real situations could happen to become more profitable the production scheduling i.e.
analysis of charging tank capacity increase, pumping system changes, etc. The
analyses of the cases are compared with results from chapters 5 and 6, to help to
clarify. Moreover, as well as it was mentioned in chapters 5 and 6, the different
situations have shown that if the conditions of each problem are feasible always an
optimal solution could come out. However, some infeasible situations were helpful in
this chapter to discover the boundaries of optimal solutions for the different
conditions applied.

_____________________________________________________________________
121
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Chapter 8. CONCLUSIONS AND FUTURE WORKS


8.1 Conclusions
In this work, a generic optimisation MILP new model have been developed and
proposed for optimising the production scheduling of crude oil inventories, blending
and feed to process plant in oil refineries that usually unload several kind of crude oil
with different kind of compositions. An important revision of all the works related to
the production planning and scheduling in oil refineries have been done. It was
highlighted that there is still too much work to do in the production scheduling field.
Working in this field involves much more mathematical complexity for formulating
the models and more computational efforts for solving them; furthermore, much less
profit is achieved compared with the planning level; however, if the production
scheduling does not properly work, the production planning targets could be seriously
damaged.
A complete oil refinery has not been modelled at the scheduling level so far. All the
developments for managing production scheduling have been done considering one
plant or a system of an oil refinery; even a subsystem of a complete plant has been
preferred for modelling it to reduce the number of equations, constraints and variables
in the model formulation. The intention to link the planning with the scheduling level
tools through a software interface still is alive but it has not been done. In fact, for
assisting somehow to do this link with no interface, many exercises have been done
using iteration results at the scheduling level for improving the input data at the
planning level. However, the efforts also have been guided toward continuing
working hard at the scheduling level for developing better integrate solutions that
represents an overall oil refinery or a big system inside an oil refinery.
Several practical cases have been presented using the model with the purpose to offer
a good understanding of the potential benefits of the model used at the scheduling
level for optimising the operational cost applied to the crude oil inventory operations.
Moreover, it has been possible to observed reviewing the cases the advantage of the
_____________________________________________________________________
122
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

model not only to review sudden changes of vessel arriving schedules, also for
detecting infeasibilities and for supporting decisions for future system expansions
projects through iterations that have helped to identify possible better alternatives.
On the other hand, the model was successfully tested using the same conditions used
by {Lee, Pinto, et al. 1996} to solve similar cases related with the same scheduling
problem for the operation of crude oil inventory and feeding system to an oil refinery.
The differences of this new model with the model developed by {Lee, Pinto, et al.
1996} were well explained highlighting the advantages of the new model and the
shortcoming of the existing model.
Finally, it is interesting to say that despite this work has involved long hours
programming and running the model for the scheduling problem presented in this
Thesis; it has been worth it. Better production scheduling and lower operational cost
have been achieved comparing the optimal results of this new model with the optimal
results of an existing model working with the same conditions.
8.2 Future Works.
Optimisation continues being a very active area of research in academia and industry.
Then, the scope of these optimisation techniques is increasing as a result of a
combination of theoretical and algorithmic advances, which are complemented with
the rapid progress in computer hardware and software. During the last years the
solvable optimisation problems have increased in size and it is expected that this trend
continues in parallel with the computer architecture developments.
The overall refinery scheduling consists of the scheduling of three main sections: the
scheduling for the operation of crude oil inventory, the process unit operation and the
operations of finished product inventory. The scope of this work has been focused on
the first one that is very critical for keeping a good and stable operation in an oil
refinery and therefore, meeting its products demand. Furthermore, some important

_____________________________________________________________________
123
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

operation conditions downstream this section, for process plants and finished product
inventories, depend on the well managed scheduling condition of this first section.
Nowadays, the work has been continued in all of the main described sections; but
mostly modellers have worked each section separately. Each work developed has
been subjected to be improved for instance reducing the computer time running the
model; in most cases this has been the subsequent step after a new model has been
developed. Much more time and efforts should be dedicated in the future to the
process unit production scheduling that could have much more non linear
formulations that must be combined with discrete variables to get the optimal
operational modes in the scheduling horizon of each process plant; however, a good
knowledge of each process plant is necessary for improving and optimising its
production scheduling.
Finally, general efforts should be continued trying to develop a well developed
package for managing the production scheduling not only using MILP, also MINLP
techniques and covering all the overall oil refinery production scheduling as well.
Later, there will be time to think, design and developed a real software integration of
production planning and scheduling that at the end of the day should be sharing one
common data base.

_____________________________________________________________________
124
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

BIBLIOGRAFY
Barton, Paul I.; Allgor, Russell J.; Feehery, William F., and Galan, Santos. Dymamic
optimization in a discontinuous world. Industrial and Engineering Chemistry
Research. 1998; 37, 966-981.
Breiner Avi and Maman, Rafi. Refinery reaps the benefits of new. Oil & Gas Journal.
2001 Jan; 46-48.
Brooke, Anthony; Kendrick, David; Meeraus, Alexander, and Raman, Ramesh.
GAMS (General Algebraic Modeling System), a user's guide. Washington: GAMS
Development Corporation; 1998.
Douglas, James M. Conceptual design of chemical engineering processes. Chemical
Engineering series. USA: Mc Graw Hill; 1988.
Edgar, Thomas F. and Himmelblau, David M. Optimization of Chemical Processes.
Second ed. Boston: Mc Graw Hill; 2001. ISBN: 0-07-039359-1.
Geankoplis, Christie. Transport processes and unit operations . USA: 1978.
Goethe-Lundgren, Maud; Lundgren, Jan T., and Person, Jan A. An optimization
model for refinery production scheduling. Int.J. Production Economics. 2002; 78:255270.
Grossman, Ignacio E. and Biegler, Lorenz T. optimizing chemical processes.
Chemical Technology. 1995 Dec; 27-35.
Hartmann, Hans. Distinguish between scheduling and planning models. Hydrocarbon
Processing. 1998 Jul; 93-100.
Jia, Zhenia; Ierapetritou, Marianthi, and Kelly, Jeffrey D. Refinery short-term
scheduling using continuous time formulation:crude-oil operations . Industrial and
Engineering Chemistry Research. 2003: 3085-3097.
Jia, Zhenya and Ierapetritou, Marianthi. Mixed-Integer Linear Programming Model
for Gasoline Blending and Distribution Scheduling . Industrial and Engineering
Chemistry Research . 2003; 42:825-835.
Joly, M.; Moro, L. F. L, and Pinto, J. M. Planning and scheduling for petroleum
refineries using mathematical programming. Brazilian Journal of Chemical
Engineering. 2002; 19(02):207-228.
Lee, Heeman; Pinto, Jose M; Grossmann, Ignacio E., and Park, Sunwon. MixedInteger Linear Programming Model for Refinery Short-Term Scheduling of Crude Oil
Unloading with Inventory Management. Industrial and Engineering Chemistry
Research. 1996; 35:1630-1641.
Magalhaes, Marcos Vinicius de Oliviera; Moro, L. F. L.; Smania, P.; Hassimotto, M.
_____________________________________________________________________
125
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

K.; Pinto, Jose M., and Abadia, G. J. SIPP- A solution for refinery scheduling . NPRA
- National Petrochemical & Refiners Association ; San Antonio, TX. Boston; 1998.
Mas, Rodrigo and Pinto, Jose M. A mixed-integer optimization strategy for oil supply
in distribution complexes. Optimization and Engineering. 2003; 4:23-64.
McCabe, Warren L. sixth ed. New York: 2001.
Moro, L. F. L.; Zanin, A. C., and Pinto, J. M. A planning model for refinery diesel
production. Computers Chemical Engineering. 1998; 22,suppl:S1039-S1042.
Park, Hyungjin; Bok, Jin-Kwang, and Park, Sunwon. Scheduling of refinery processes
with optimal control approach. Journal of Chemical Engineering of Japan. 2001;
34(3):411-422.
Pelham, Roger and Pharris, Chuck. Refinery operations and control: A future vision.
Hydrocarbon Processing. 1996 Jul: 89-94.
Peters, Max S. and Timmerhaus, Claus D. Plant design and economics for chemical
engineers . fourth edition ed. New York: Mc Graw-Hill ; 1991.
Pinto, J. M. ; Joly, M., and Moro, L. F. L. Planning and scheduling models for
refinery operations. Computers and Chemical Engineering. 2000; 24:2259-2276.
Pinto, J. M. and Mas, R. A mixed-integer optimization strategy for oil supply in
distribution complexes . Optimisation and Engineering. 2003; 4:23-64.
Pinto, J. M. and Moro, L. F. L. a planning model for petroleum refineries . Brazilian
Journal of Chemical Engineering. 2000 Dec; 17(04-07):575-585.
Quesada, Ignacio and Grossmann, Ignacio E. a globlal optimization algorithm for
linear fractional and bilinear programs . Journal of Global Optimization. 1995; 6:3976.
Reklaitis, G. V.; Ravindran, A., and Ragsdell, K. M. Engineering optimization
methods and application. USA: John Wiley and sons; 1983.
Shah, N. mathematical programming techniques for crude oil scheduling. Computers
Chemical Engineering. 1996; 20:S1227-S1232.
Song, Jehoon ; Park, Hyungjin; Lee, Dong-Yup, and Park, Sunwon. Scheduling of
actual size Refinery Processes considering environmental impacts with multiobjective
optimization. Industrial and Engineering Chemistry Research . 2002; 41:4794-4806.
Zhang, N and Zhu, X. X. A novel modelling and decomposition strategy for overall
refinery optimisation. Computers and Chemical Engineering. 2000; 24:1543-1548.
Zhang, Nan. Novell modelling and decomposition for overall refinery optimisation
and debottlenecking. Doctor of Philosofy ed. Manchester: University of Manchester
Institute of Science and Technology; 2000 Sep.
_____________________________________________________________________
126
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

APENDIX A
A.1 Example 1 Computer hardcopy output
MODEL STATISTICS
BLOCKS OF EQUATIONS
BLOCKS OF VARIABLES
NON ZERO ELEMENTS
GENERATION TIME

40
20
1445
=

SINGLE EQUATIONS
SINGLE VARIABLES
DISCRETE VARIABLES

552
337
116

0.120 SECONDS

EXECUTION TIME
=
0.160 SECONDS
VERID WAT-25-089
AMS 2.25.089 DOS Extended/C
08/15/03 23:39:16
PAGE
44
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 443
S O L V E
MODEL
TYPE
SOLVER

SCHEDULING
MIP
OSL

**** SOLVER STATUS


**** MODEL STATUS
**** OBJECTIVE VALUE

OBJECTIVE
DIRECTION
FROM LINE

CO
MINIMIZE
443

1 NORMAL COMPLETION
8 INTEGER SOLUTION
206.9500

RESOURCE USAGE, LIMIT


ITERATION COUNT, LIMIT
OSL Release 2,

S U M M A R Y

5.398
20000.000
4393
1000000000

GAMS Link level 3

---

386/486 DOS

1.3.051-030

Could not find option file D:\GAMS\OSL.OPT


Using defaults instead.
Work space requested by user
-Work space requested by solver -OSL step: Reading data

10.00 Mb
0.61 Mb
0.00 Seconds

OSL step: Scale


0.00 Seconds
Range of matrix coeffients:
before scaling :
0.0100 50.0000
after scaling :
0.0476 1.0000
OSL step: Presolve
Size reduction:
rows
:
columns :
nonzeroes:

0.01 Seconds
552 (old)
337 (old)
1445 (old)

354 (new)
337 (new)
1013 (new)

_____________________________________________________________________
127
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

OSL step: Crash


Crash option : 1

0.00 Seconds

OSL step: Primal Simplex


0.13 Seconds
Status:
Successful (optimal)
Iterations:
309
Objective :
73.7155
OSL step: Branch&Bound
Status:
Interrupt
Iterations:
4079
Nodes
:
366
Objective :
206.9500

5.06 Seconds

OSL step: Postsolve

0.01 Seconds

OSL step: Primal Simplex


0.00 Seconds
Status:
Successful (optimal)
AMS 2.25.089 DOS Extended/C
08/15/03 23:39:16
PAGE
45
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 443
Iterations:
Objective :

5
206.9500

Relaxed optimum objective value:


Bound on best integer solution:
Objective value of this solution:

73.715476
189.91861
206.95000

Relative gap: .08968 Absolute gap:


Optcr
: .10000 Optca:

17.031385
0.0

**** REPORT SUMMARY :

0
NONOPT
0 INFEASIBLE
0 UNBOUNDED

AMS 2.25.089 DOS Extended/C


PAGE
71
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---time
1 2.000,
---1 3.000,

445 VARIABLE

08/15/03 23:39:16
M o d e l i n g

S y s t e m

TF.L

vessel v unloading initiation

TL.L

vessel v unloading completion and


departure time

VV.L

volume of crude oil in crude

2 7.000
445 VARIABLE
2 8.000

---445 VARIABLE
vessel v at

time t

_____________________________________________________________________
128
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

1
100.000
2
100.000

100.000

50.000

100.000

100.000

50.000

---445 VARIABLE
tank i at

VS.L

volume of crude oil in storage


time t

1
25.000
2
75.000
10.000

5.000
45.000

15.000
35.000

25.000
35.000

15.000
35.000

---445 VARIABLE
tank j at

VB.L

volume of crude oil in charging


time t

50.000

90.000

100.000

50.000

10.000

6
1
50.000
80.000
2
50.000
50.000
+

100.000

1
70.000
60.000
2
50.000
90.000
AMS 2.25.089 DOS Extended/C
PAGE
72
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---445 VARIABLE
v starts

XF.L

08/15/03 23:39:16
M o d e l i n g

0-1

S y s t e m

variable to denote if vessel

unloading at time t
2
1
2

1.000
1.000

_____________________________________________________________________
129
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

---v

445 VARIABLE

XL.L

0-1

variable to denote if vessel

completes unloading at time t


3

1
2

1.000

---v is

445 VARIABLE

1.000
XW.L

0-1

variable to denote if vessel

unloading its crude oil at time t


2

1
2

1.000

1.000

---tank j

445 VARIABLE

VKB.L

1.000

1.000

volume of component k in charging


at time t

1.000

1.400

1.500

2.250

0.450

6
1
1.200
2
2.250

1.000
2.500

4.500

1
2

1.050
2.250

0.900
4.650

---v to

445 VARIABLE

FVS.L

volumetric flow rate from vessel


storage tank i at time t

1.1
2.2
---tank i

50.000

50.000

445 VARIABLE

FSB.L

50.000

50.000

volumetric flow rate from storage


to charging tank j at time t

40.000

40.000

10.000

7
1.1
1.2
2.1

20.000

15.000
10.000

_____________________________________________________________________
130
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

2.2
40.000

30.000

---445 VARIABLE
charging tank

35.000

FBC.L

volumetric flow rate

from

j to CDU l at time t
1

6
1.1
10.000
2.1

50.000

20.000
50.000

40.000

1.1
10.000
10.000
AMS 2.25.089 DOS Extended/C
PAGE
74
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---from

445 VARIABLE

10.000

Z.L

08/15/03 23:39:16
M o d e l i n g

S y s t e m

0-1 variable to denote transition


crude blended j to y at time t in

CDU l
INDEX 1 = 1
2
2.1

1.000

INDEX 1 = 2
5
1.1

1.000

USER: Linnhoff March Limited


MW2
Academic License

G951213:1201CR-

**** FILE SUMMARY


INPUT
OUTPUT

Z:\GAMS\CASE-LEE1.TXT
D:\GAMS\CASE-LEE1.LST

A.2 Example 2 Computer hardcopy output


MODEL STATISTICS
BLOCKS OF EQUATIONS

40

SINGLE EQUATIONS

1807

_____________________________________________________________________
131
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

BLOCKS OF VARIABLES
NON ZERO ELEMENTS
GENERATION TIME

20
5018
=

SINGLE VARIABLES
DISCRETE VARIABLES

1138
396

0.220 SECONDS

EXECUTION TIME
=
0.230 SECONDS
VERID WAT-25-089
AMS 2.25.089 DOS Extended/C
08/16/03 11:09:38
PAGE
50
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 463
S O L V E
MODEL
TYPE
SOLVER

SCHEDULING
MIP
OSL

**** SOLVER STATUS


**** MODEL STATUS
**** OBJECTIVE VALUE

OBJECTIVE
DIRECTION
FROM LINE

CO
MINIMIZE
463

1 NORMAL COMPLETION
8 INTEGER SOLUTION
331.7400

RESOURCE USAGE, LIMIT


ITERATION COUNT, LIMIT
OSL Release 2,

S U M M A R Y

6283.582
20000.000
1598388
1000000000

GAMS Link level 3

---

386/486 DOS

1.3.051-030

Could not find option file D:\GAMS\OSL.OPT


Using defaults instead.
Work space requested by user
-Work space requested by solver --

10.00 Mb
1.68 Mb

OSL step: Reading data

0.03 Seconds

OSL step: Scale


0.03 Seconds
Range of matrix coeffients:
before scaling :
0.0100 60.0000
after scaling :
0.0390 1.0000
OSL step: Presolve
Size reduction:
rows
:
columns :
nonzeroes:
OSL step: Crash
Crash option : 1

0.05 Seconds
1807 (old)
1138 (old)
5018 (old)

1281 (new)
1138 (new)
3643 (new)
0.02 Seconds

OSL step: Primal Simplex


1.06 Seconds
Status:
Successful (optimal)
Iterations:
698
Objective :
104.2389
OSL step: Branch&Bound

6282.19 Seconds

_____________________________________________________________________
132
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Status:
Interrupt
Iterations:
1597684
Nodes
:
38978
Objective :
331.7400
OSL step: Postsolve

0.09 Seconds

OSL step: Primal Simplex


0.03 Seconds
Status:
Successful (optimal)
AMS 2.25.089 DOS Extended/C
08/16/03 11:09:38
PAGE
51
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 463
Iterations:
Objective :

6
331.7400

Relaxed optimum objective value:


Bound on best integer solution:
Objective value of this solution:

104.23889
301.63589
331.74000

Relative gap: .09980 Absolute gap:


Optcr
: .10000 Optca:

30.104111
0.0

**** REPORT SUMMARY :

0
NONOPT
0 INFEASIBLE
0 UNBOUNDED

AMS 2.25.089 DOS Extended/C


PAGE
119
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---time
1 1.000,
---1 2.000,

465 VARIABLE
2 4.000,
465 VARIABLE
2 5.000,

---465 VARIABLE
vessel v at

TF.L

08/16/03 11:09:38
M o d e l i n g

S y s t e m

vessel v unloading initiation

3 8.000
TL.L

vessel v unloading completion and


departure time

3 9.000
VV.L

volume of crude oil in crude


time t

1
100.000
2
3
100.000

50.000

100.000

50.000

100.000

_____________________________________________________________________
133
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

50.000

---465 VARIABLE
tank i at

VS.L

volume of crude oil in storage


time t

1
20.000
82.100
2
50.000
100.000
3
70.000
21.900

39.950

89.950

82.100

82.100

10.050

10.050

70.000

70.000

21.900

50.000

10

1
2
3

69.200
90.800

69.200
90.800

69.200
90.800
50.000

69.200
90.800
100.000

---465 VARIABLE
tank j at

VB.L

21.900

volume of crude oil in charging


time t

6
1
30.000
100.000
80.000
60.000
40.000
20.000
2
50.000
30.000
10.000
3
30.000
10.000
10.000
76.000
56.000
36.000
AMS 2.25.089 DOS Extended/C
08/16/03 11:09:38
PAGE
120
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
465 VARIABLE
tank j at

VB.L

volume of crude oil in charging


time t

2
3

44.000
16.000

24.000
8.000

4.000
4.000

---465 VARIABLE
v starts

XF.L

0-1

variable to denote if vessel

unloading at time t

_____________________________________________________________________
134
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

1
2
3

1.000

---v

465 VARIABLE

1.000
1.000
XL.L

0-1

variable to denote if vessel

completes unloading at time t


2

1
2
3

1.000

---v is

465 VARIABLE

1.000
1.000
XW.L

0-1

variable to denote if vessel

unloading its crude oil at time t


1

1
2
3
1.000

1.000

1.000

---tank j

465 VARIABLE

1.000

1.000

1.000

VKB.L

volume of component k in charging


at time t

1.600

1.200

0.800

2.400

1.800

1.200

0.300
0.250
0.400

3.185

2.385

0.180

1.176

0.976

6
1.1
0.501
2.000
0.400
1.2
0.999
3.000
0.600
2.1
1.500
0.800
2.2
1.150
0.610
3.1
1.299
0.400
1.585
3.2
0.399
0.180
0.616
AMS 2.25.089 DOS Extended/C
PAGE
121
G e n e r a l
A l g e b r a i c
E x e c u t i o n
465 VARIABLE

VKB.L

08/16/03 11:09:38
M o d e l i n g

S y s t e m

volume of component k in charging

tank j
at time t

_____________________________________________________________________
135
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

2.1
2.2
3.1
3.2

1.500
0.919
0.768
0.256

0.800
0.432
0.384
0.112

0.100
0.072
0.192
0.072

---v to

465 VARIABLE

FVS.L

volumetric flow rate from vessel


storage tank i at time t

50.000

50.000

50.000

50.000

9
1.1
2.2
3.3
50.000
---tank i

50.000

465 VARIABLE

FSB.L

volumetric flow rate from storage


to charging tank j at time t

1
1.1
1.2
1.3
2.1
2.2
2.3
3.2
3.3

30.050
12.900
7.850
39.950
9.200
10.050
21.900
48.100

---465 VARIABLE
charging tank

FBC.L

volumetric flow rate

from

j to CDU l at time t
1

6
1.2
20.000
20.000
20.000
20.000
20.000
2.1
20.000
20.000
10.000
3.1
20.000
20.000
20.000
3.2
20.000
AMS 2.25.089 DOS Extended/C
08/16/03 11:09:38
PAGE
123
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n

_____________________________________________________________________
136
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

charging

465 VARIABLE
tank

FBC.L

volumetric flow rate

from

j to CDU l at time t
+

10

2.2
3.1

20.000
8.000

20.000
4.000

4.000
4.000

6.000
4.000

---from

465 VARIABLE

Z.L

0-1 variable to denote transition


crude blended j to y at time t in

CDU l
INDEX 1 = 1
7
2.2

1.000

INDEX 1 = 2
4
3.1

1.000

INDEX 1 = 3
2
1.2

1.000

USER: Linnhoff March Limited


MW2
Academic License

G951213:1201CR-

**** FILE SUMMARY


INPUT
OUTPUT

Z:\GAMS\CASE-LEE2.TXT
D:\GAMS\CASE-LEE2.LST

A.3 Example 3 Computer hardcopy output


MODEL STATISTICS
BLOCKS OF EQUATIONS
BLOCKS OF VARIABLES
NON ZERO ELEMENTS
GENERATION TIME

47
23
7760
=

SINGLE EQUATIONS
SINGLE VARIABLES
DISCRETE VARIABLES

2991
1399
582

0.230 SECONDS

_____________________________________________________________________
137
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

EXECUTION TIME
=
0.240 SECONDS
VERID WAT-25-089
AMS 2.25.089 DOS Extended/C
08/16/03 22:22:43
PAGE
58
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 530
S O L V E
MODEL
TYPE
SOLVER

S U M M A R Y

SCHEDULING
MIP
OSL

**** SOLVER STATUS


**** MODEL STATUS
**** OBJECTIVE VALUE

OBJECTIVE
DIRECTION
FROM LINE
1 NORMAL COMPLETION
8 INTEGER SOLUTION
248.6400

RESOURCE USAGE, LIMIT


ITERATION COUNT, LIMIT
OSL Release 2,

CO
MINIMIZE
530

18113.945
200000.000
4236122
1000000000

GAMS Link level 3

---

386/486 DOS

1.3.051-030

Could not find option file D:\GAMS\OSL.OPT


Using defaults instead.
Work space requested by user
-Work space requested by solver --

10.00 Mb
2.48 Mb

OSL step: Reading data

0.02 Seconds

OSL step: Scale


0.02 Seconds
Range of matrix coeffients:
before scaling :
0.0100 50.0000
after scaling :
0.0317 1.0000
OSL step: Presolve
Size reduction:
rows
:
columns :
nonzeroes:

0.07 Seconds
2991 (old)
1399 (old)
7760 (old)

OSL step: Crash


Crash option : 1

2296 (new)
1399 (new)
6132 (new)
0.02 Seconds

OSL step: Primal Simplex


1.70 Seconds
Status:
Successful (optimal)
Iterations:
816
Objective :
107.6704
OSL step: Branch&Bound
Status:
Interrupt
Iterations:
4235306
Nodes
:
87253
Objective :
248.6400
OSL step: Postsolve

18111.19 Seconds

0.40 Seconds

_____________________________________________________________________
138
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

OSL step: Primal Simplex


0.07 Seconds
Status:
Successful (optimal)
AMS 2.25.089 DOS Extended/C
08/16/03 22:22:43
PAGE
59
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 530
Iterations:
Objective :

0
248.6400

Relaxed optimum objective value:


Bound on best integer solution:
Objective value of this solution:

107.67042
226.06606
248.64000

Relative gap: .09986 Absolute gap:


Optcr
: .10000 Optca:

22.573941
0.0

**** REPORT SUMMARY :

0
NONOPT
0 INFEASIBLE
0 UNBOUNDED

AMS 2.25.089 DOS Extended/C


PAGE
158
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---time

532 VARIABLE

1 1.000,
---1

2 5.000,
532 VARIABLE

2.000,

TF.L

M o d e l i n g

S y s t e m

vessel v unloading initiation

3 9.000
TL.L

6.000,

---532 VARIABLE
vessel v at

08/16/03 22:22:43

vessel v unloading completion and


departure time
3 10.000

VV.L

volume of crude oil in crude


time t

1
50.000
2
3
25.000

25.000

50.000

25.000

10

---532 VARIABLE
tank i at

50.000

VS.L

volume of crude oil in storage


time t

_____________________________________________________________________
139
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

1
20.000
57.000
2
20.000
20.000
3
20.000
40.000

45.000

70.000

57.000

57.000

20.000

20.000

20.000

20.000

20.000

20.000

15.000

15.000

10

11

1
57.000
54.375
2
20.000
45.000
3
65.000
78.625

57.000

54.375

54.375

54.375

20.000

20.000

20.000

45.000

65.000

53.625

78.625

78.625

+
12

---532 VARIABLE
tank j at

VB.L

volume of crude oil in charging


time t

1
30.000
28.000
2
50.000
6.000
3
30.000

30.000

30.000

48.000

38.000

40.000

30.000

20.000

10.000

20.000

10.000

10

11

1
18.000
8.000
6.000
4.000
2.000
2
4.000
2.000
3
14.000
4.000
2.000
AMS 2.25.089 DOS Extended/C
08/16/03 22:22:43
PAGE
159
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
---532 VARIABLE
v starts

XF.L

0-1

variable to denote if vessel

unloading at time t
1
1
2
3

1.000

---v

532 VARIABLE

1.000
1.000
XL.L

0-1

variable to denote if vessel

_____________________________________________________________________
140
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

completes unloading at time t


2
1
2
3

1.000

---v is

532 VARIABLE

10

1.000
1.000
XW.L

0-1

variable to denote if vessel

unloading its crude oil at time t


1

1.000

1.000

1.000

1.000

10
1
2
3
1.000

1.000

---532 VARIABLE
tank i at

VKS.L

volume of component k in storage


time t

0.400

0.650

0.900

0.770

0.770

1.000

1.000

1.000

1.000

1.000

1.600

1.600

1.600

1.150

1.150

10

11

0.744

0.744

0.744

1.000

1.000

2.500

4.376

5.876

5.876

6
1
0.770
2
1.000
3
3.275
+
12

1
0.770
0.770
0.744
2
1.000
1.000
2.500
3
5.400
5.400
5.876
AMS 2.25.089 DOS Extended/C
PAGE
160
G e n e r a l
A l g e b r a i
E x e c u t i o n
---tank j

532 VARIABLE

VKB.L

08/16/03 22:22:43
c

M o d e l i n g

S y s t e m

volume of component k in charging


at time t

_____________________________________________________________________
141
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

1
0.880
2
0.270
3

0.900

0.900

0.900

1.480

1.130

2.500

2.000

1.550

0.900

0.450

2.400

1.550

0.800

10

11

1
2
3

0.530
0.180

0.280
0.090

0.210

0.140

0.070

1.050

0.300

0.150

---v to

532 VARIABLE

FVS.L

volumetric flow rate from vessel


storage tank i at time t

25.000

25.000

25.000

25.000

10
1.1
2.3
3.2
25.000
3.3
---tank i

25.000
532 VARIABLE

FSB.L

volumetric flow rate from storage


to charging tank j at time t

3
1.1
1.3
3.1
3.3

13.000
2.625
5.000
11.375

---532 VARIABLE
charging tank

FBC.L

volumetric flow rate

from

j to CDU l at time t
1

10.000

10.000

10.000

4.000

6
1.2
10.000
2.1
2.000
3.2
+

10.000

10.000

10.000

10.000

10.000

10.000

10

11

10.000

2.000

2.000

2.000

2.000

12
1.2
2.000

_____________________________________________________________________
142
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

2.1
2.000
2.000
3.1
10.000
2.000
2.000
6.000
AMS 2.25.089 DOS Extended/C
08/16/03 22:22:43
PAGE
162
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
---from

532 VARIABLE

Z.L

0-1 variable to denote transition


crude blended j to y at time t in

CDU l
INDEX 1 = 2
9
3.1

1.000

INDEX 1 = 3
4
1.2

1.000

USER: Linnhoff March Limited


MW2
Academic License

G951213:1201CR-

**** FILE SUMMARY


INPUT
OUTPUT

Z:\GAMS\CASE-LEE3.TXT
D:\GAMS\CASE-LEE3.LST

A.4 Case 1 Computer hardcopy output


MODEL STATISTICS
BLOCKS OF EQUATIONS
39
SINGLE EQUATIONS
1682
BLOCKS OF VARIABLES
20
SINGLE VARIABLES
863
NON ZERO ELEMENTS
4779
DISCRETE VARIABLES
261
GENERATION TIME
=
0.240 SECONDS
EXECUTION TIME
=
0.260 SECONDS
VERID WAT-25-089
GAMS 2.25.089 DOS Extended/C
07/29/03 22:21:40
PAGE
49
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 460
S O L V E
MODEL
TYPE
SOLVER

SCHEDULING
MIP
OSL

S U M M A R Y
OBJECTIVE
DIRECTION
FROM LINE

CO
MINIMIZE
460

_____________________________________________________________________
143
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

**** SOLVER STATUS


**** MODEL STATUS
**** OBJECTIVE VALUE

1 NORMAL COMPLETION
8 INTEGER SOLUTION
338.9642

RESOURCE USAGE, LIMIT


ITERATION COUNT, LIMIT
OSL Release 2,

1913.820
20000.000
397133
1000000000

GAMS Link level 3

---

386/486 DOS

1.3.051-030

Could not find option file D:\GAMS\OSL.OPT


Using defaults instead.
Work space requested by user
-Work space requested by solver --

10.00 Mb
1.56 Mb

OSL step: Reading data

0.01 Seconds

OSL step: Scale


0.09 Seconds
Range of matrix coeffients:
before scaling :
0.0025 250.0000
after scaling :
0.0251 1.0000
OSL step: Presolve
Size reduction:
rows
:
columns :
nonzeroes:

0.02 Seconds
1682 (old)
863 (old)
4779 (old)

OSL step: Crash


Crash option : 1

1021 (new)
863 (new)
3197 (new)
0.01 Seconds

OSL step: Primal Simplex


0.51 Seconds
Status:
Successful (optimal)
Iterations:
650
Objective :
78.3530
OSL step: Branch&Bound
Status:
Interrupt
Iterations:
396480
Nodes
:
19128
Objective :
338.9642
OSL step: Postsolve

1912.54 Seconds

0.11 Seconds

OSL step: Primal Simplex


0.02 Seconds
Status:
Successful (optimal)
GAMS 2.25.089 DOS Extended/C
07/29/03 22:21:40
PAGE
50
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 460
Iterations:
Objective :

3
338.9642

Relaxed optimum objective value:


Bound on best integer solution:

78.353009
308.17602

_____________________________________________________________________
144
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

Objective value of this solution:

338.96425

Relative gap: .09990 Absolute gap:


Optcr
: .10000 Optca:

30.788228
0.0

The solution satisfies the termination tolerances


**** REPORT SUMMARY :
0
NONOPT
0 INFEASIBLE
0 UNBOUNDED
GAMS 2.25.089 DOS Extended/C
07/29/03 22:21:40
PAGE
110
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
---time
1

1.000,

---1

462 VARIABLE
2

6.000,

462 VARIABLE

2.000,

TF.L
3 11.000
TL.L

7.000,

---462 VARIABLE
vessel v at

vessel v unloading initiation

vessel v unloading completion and


departure time
3 12.000

VV.L

volume of crude oil in crude


time t

1
400.000
2
3
400.000

250.000

400.000

250.000

10

11

12

250.000

400.000

---462 VARIABLE
tank i at

VS.L

volume of crude oil in storage


time t

1
30.000
291.000
2
200.000
5.000
3
140.000
70.000

115.000

316.500

291.000

291.000

135.000

135.000

70.000

5.000

138.500

138.500

73.500

70.000

_____________________________________________________________________
145
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

+
12

10

11

1
226.000
142.250
2
90.000
198.750
3
70.000
105.000

161.000

161.000

142.250

142.250

300.000

300.000

235.000

198.750

70.000

70.000

5.000

5.000

14

15

13

1
77.250
27.250
27.250
2
133.750
83.750
83.750
3
350.000
350.000
350.000
GAMS 2.25.089 DOS Extended/C
07/29/03 22:21:40
PAGE
111
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
---462 VARIABLE
tank j at

VB.L

volume of crude oil in charging


time t

1
70.000
15.000
2
190.000
250.000

201.500

250.000

168.000

90.000

108.000

26.000

181.500

250.000

10

11

1
145.000
15.000
2
168.000
250.000

250.000

250.000

168.000

90.000

90.000

15.000

163.750

200.000

+
12

13

14

15

1
2

150.000
168.000

250.000
90.000

250.000
15.000

---462 VARIABLE
v starts

XF.L

0-1

variable to denote if vessel

unloading at time t
1
1
2
3

11

1.000
1.000
1.000

_____________________________________________________________________
146
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

---v

462 VARIABLE

XL.L

0-1

variable to denote if vessel

completes unloading at time t


2
1
2
3

1.000

---v is

462 VARIABLE

12

1.000
1.000
XW.L

0-1

variable to denote if vessel

unloading its crude oil at time t


1

11

12
1
1.000
1.000
2
1.000
1.000
3
1.000
1.000
GAMS 2.25.089 DOS Extended/C
07/29/03 22:21:40
PAGE
112
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
---tank j

462 VARIABLE

VKB.L

volume of component k in charging


at time t

1.106

3.781

4.266

2.626

1.066

7.391

4.040

1.170

6.625

8.750

10

11

2.750

4.600

4.600

2.960

1.650

5.880

3.150

0.525

5.912

7.000

13

14

15

1
2

3.000
6.630

5.000
3.900

5.000
0.675

6
1
0.150
2
8.750
+
12
1
0.150
2
9.500

GAMS 2.25.089 DOS Extended/C


PAGE
113
G e n e r a l
A l g e b r a i c
E x e c u t i o n

07/29/03 22:21:40
M o d e l i n g

S y s t e m

_____________________________________________________________________
147
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

---v to

462 VARIABLE

FVS.L

volumetric flow rate from vessel


storage tank i at time t

1.1
150.000
2.2
3.3
250.000

250.000

150.000

250.000

11

12

---tank i

462 VARIABLE

150.000

FSB.L

volumetric flow rate from storage


to charging tank j at time t

65.000

48.500

7
1.1
65.000
1.2
2.1
40.000
2.2
3.1
3.2
+
1.1
1.2
2.1
2.2
3.1
3.2

65.000
25.500

65.000

65.000
65.000

65.000

65.000

3.500

11

12

13

65.000

50.000

65.000

50.000

1.500
9

10

18.750
65.000

36.250
5.000

65.000

---462 VARIABLE
charging tank

50.000
FBC.L

volumetric flow rate

from

j to CDU l at time t
1

82.000

82.000

78.000

75.000

82.000

78.000

75.000

10

11

82.000

78.000

75.000

6
1.1
2.1
82.000
+
12
1.1
2.1
82.000

_____________________________________________________________________
148
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

13

14

15

2.1
78.000
75.000
82.000
GAMS 2.25.089 DOS Extended/C
07/29/03 22:21:40
PAGE
114
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
---462 VARIABLE
crude oil

D.L

0-1 variable to denote if the


blended j charges CDU l at time t

1.000

1.000

1.000

1.000

1.000

10

11

1.000

1.000

1.000

1.000

1.000

13

14

15

2.1

1.000

1.000

1.000

6
1.1
2.1
1.000
+
12
1.1
2.1
1.000

---from

462 VARIABLE

Z.L

0-1 variable to denote transition


crude blended j to y at time t in

CDU l
INDEX 1 = 1
6

12

2.1
1.000
1.000
GAMS 2.25.089 DOS Extended/C
PAGE
115
G e n e r a l
A l g e b r a i c
E x e c u t i o n
462 VARIABLE

Z.L

07/29/03 22:21:40
M o d e l i n g

S y s t e m

0-1 variable to denote transition

from
crude blended j to y at time t in
CDU l
INDEX 1 = 2
3

_____________________________________________________________________
149
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

1.1

1.000

1.000

USER: Linnhoff March Limited


MW2
Academic License

G951213:1201CR-

**** FILE SUMMARY


INPUT
OUTPUT

Z:\GAMS\CASE1.TXT
D:\GAMS\CASE1.LST

A.5 Case 2 Computer hardcopy output


MODEL STATISTICS
BLOCKS OF EQUATIONS
39
SINGLE EQUATIONS
1682
BLOCKS OF VARIABLES
20
SINGLE VARIABLES
863
NON ZERO ELEMENTS
4779
DISCRETE VARIABLES
261
GENERATION TIME
=
0.310 SECONDS
EXECUTION TIME
=
0.350 SECONDS
VERID WAT-25-089
GAMS 2.25.089 DOS Extended/C
07/30/03 00:47:40
PAGE
49
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 458
S O L V E
MODEL
TYPE
SOLVER

SCHEDULING
MIP
OSL

**** SOLVER STATUS


**** MODEL STATUS
**** OBJECTIVE VALUE

OBJECTIVE
DIRECTION
FROM LINE

CO
MINIMIZE
458

1 NORMAL COMPLETION
8 INTEGER SOLUTION
450.8241

RESOURCE USAGE, LIMIT


ITERATION COUNT, LIMIT
OSL Release 2,

S U M M A R Y

11438.500
160000.000
886901
900000000

GAMS Link level 3

---

386/486 DOS

1.3.051-030

Could not find option file D:\GAMS\OSL.OPT


Using defaults instead.
Work space requested by user
-Work space requested by solver -OSL step: Reading data

10.00 Mb
1.56 Mb
0.05 Seconds

OSL step: Scale


0.02 Seconds
Range of matrix coeffients:
before scaling :
0.0025 250.0000

_____________________________________________________________________
150
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

after

scaling :

OSL step: Presolve


Size reduction:
rows
:
columns :
nonzeroes:

0.0251 -

1.0000

0.07 Seconds
1682 (old)
863 (old)
4779 (old)

OSL step: Crash


Crash option : 1

1021 (new)
863 (new)
3197 (new)
0.01 Seconds

OSL step: Primal Simplex


1.04 Seconds
Status:
Successful (optimal)
Iterations:
624
Objective :
87.0352
OSL step: Branch&Bound
Status:
Interrupt
Iterations:
886272
Nodes
:
61981
Objective :
450.8241

11436.02 Seconds

OSL step: Postsolve

0.58 Seconds

OSL step: Primal Simplex


0.06 Seconds
Status:
Successful (optimal)
GAMS 2.25.089 DOS Extended/C
07/30/03 00:47:40
PAGE
50
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 458
Iterations:
Objective :

5
450.8241

Relaxed optimum objective value:


Bound on best integer solution:
Objective value of this solution:
Relative gap: .07415 Absolute gap:
Optcr
: .10000 Optca:

87.035176
419.70283
450.82410
31.121275
0.10000000

The solution satisfies the termination tolerancesGAMS 2.25.089 DOS


Extended/C
07/30/03 00:47:40 PAGE
110
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
---time
1

1.000,

---1

460 VARIABLE
2

6.000,

460 VARIABLE

5.000,

TF.L

9.000,

vessel v unloading initiation


3 10.000

TL.L

vessel v unloading completion and


departure time
3 12.000

_____________________________________________________________________
151
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

---460 VARIABLE
vessel v at

VV.L

volume of crude oil in crude


time t

1
550.000
2
550.000

510.000

510.000

475.000

250.000

10

11

2
540.000
3
250.000

475.000

250.000
550.000

500.000

+
12

---460 VARIABLE
tank i at

VS.L

volume of crude oil in storage


time t

1
30.000
350.000
2
200.000
18.800
3
140.000
65.200

5.000

5.000

5.000

165.000

135.000

93.000

93.000

28.000

130.200

65.200

65.200

65.200

10

11

1
350.000
220.000
2
5.000
315.000
3
55.000
350.000

350.000

350.000

285.000

220.000

5.000

165.000

350.000

315.000

55.000

55.000

50.000

100.000

+
12

13

14

15

1
2
3

193.400
250.000
535.000

164.000
250.000
486.000

164.000
250.000
486.000

GAMS 2.25.089 DOS Extended/C


PAGE
111
G e n e r a l
A l g e b r a i c
E x e c u t i o n

07/30/03 00:47:40
M o d e l i n g

S y s t e m

_____________________________________________________________________
152
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

---460 VARIABLE
tank j at

VB.L

volume of crude oil in charging


time t

1
70.000
250.000
2
190.000
86.000

209.800

127.800

45.800

175.800

108.000

215.000

250.000

168.000

10

11

1
168.000
250.000
2
120.000
15.000

90.000

15.000

150.000

250.000

185.000

250.000

168.000

90.000

+
12

13

14

15

1
2

168.000
171.600

90.000
250.000

15.000
250.000

---460 VARIABLE
v starts

XF.L

0-1

variable to denote if vessel

unloading at time t
1
1
2
3

1.000

---v

460 VARIABLE

10

1.000
1.000
XL.L

0-1

variable to denote if vessel

completes unloading at time t


5
1
2
3

1.000

---v is

460 VARIABLE

12

1.000
1.000
XW.L

0-1

variable to denote if vessel

unloading its crude oil at time t


1

1.000

1.000

1.000

1.000

7
1
2
1.000

1.000

_____________________________________________________________________
153
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

GAMS 2.25.089 DOS Extended/C


PAGE
112
G e n e r a l
A l g e b r a i c
E x e c u t i o n
460 VARIABLE

XW.L

07/30/03 00:47:40
M o d e l i n g

0-1

S y s t e m

variable to denote if vessel

v is
unloading its crude oil at time t
+

2
3

1.000

1.000

---tank j

460 VARIABLE

VKB.L

10

11

12

1.000

1.000

1.000

volume of component k in charging


at time t

1.106

4.196

2.556

0.916

3.516

7.391

4.521

9.031

9.381

6.511

10

11

2.802

1.650

0.150

3.000

4.700

4.865

6.815

8.765

5.895

3.165

13

14

15

1
2

3.060
6.006

1.500
8.750

0.150
8.750

---v to

460 VARIABLE

6
1
4.442
2
3.641
+
12
1
4.700
2
0.540

FVS.L

volumetric flow rate from vessel


storage tank i at time t

40.000

35.000

225.000

250.000

7
1.1
2.2
65.000

10.000

2.2
3.3

225.000

250.000

10

11

12

50.000

250.000

250.000

_____________________________________________________________________
154
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

---tank i

460 VARIABLE

FSB.L

volumetric flow rate from storage


to charging tank j at time t

65.000

65.000

65.000

9.200

10

12

65.000

65.000

6
1.1
1.2
2.1
2.2
23.800
3.1
3.2
10.200
+

65.000
35.000
65.000
42.000
9.800
65.000
7

13
1.1
1.2
29.400
2.1
2.2
3.1
3.2
49.000

26.600
65.000
65.000

35.000

65.000

65.000
5.000
65.000

GAMS 2.25.089 DOS Extended/C


PAGE
114
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---460 VARIABLE
charging tank

FBC.L

07/30/03 00:47:40
M o d e l i n g

S y s t e m

volumetric flow rate

from

j to CDU l at time t
1

82.000

82.000
82.000

82.000

10

11

82.000

78.000

75.000

6
1.1
82.000
2.1
+

82.000
7

78.000

75.000

12
1.1
82.000
2.1
+

13

14

15

1.1

78.000

75.000

82.000

_____________________________________________________________________
155
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

---460 VARIABLE
crude oil

D.L

0-1 variable to denote if the


blended j charges CDU l at time t

1.000

1.000
1.000

1.000

10

11

1.000

1.000

1.000

6
1.1
1.000
2.1

1.000

1.000

1.000

12
1.1
1.000
2.1
+

13

14

15

1.1

1.000

1.000

1.000

---from

460 VARIABLE

Z.L

0-1 variable to denote transition


crude blended j to y at time t in

CDU l
INDEX 1 = 1

2.1

1.000

1.000

INDEX 1 = 2

1.1

12

1.000

1.000

1.000

USER: Linnhoff March Limited


MW2
Academic License

G951213:1201CR-

**** FILE SUMMARY


INPUT
OUTPUT

Z:\GAMS\CASE2.TXT
D:\GAMS\CASE2.LST

A.6 Case 3 Computer hardcopy output


MODEL STATISTICS

_____________________________________________________________________
156
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

BLOCKS OF EQUATIONS
39
SINGLE EQUATIONS
1682
BLOCKS OF VARIABLES
20
SINGLE VARIABLES
863
NON ZERO ELEMENTS
4779
DISCRETE VARIABLES
261
GENERATION TIME
=
0.430 SECONDS
EXECUTION TIME
=
0.450 SECONDS
VERID WAT-25-089
GAMS 2.25.089 DOS Extended/C
07/30/03 01:13:21
PAGE
49
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 460
S O L V E
MODEL
TYPE
SOLVER

S U M M A R Y

SCHEDULING
MIP
OSL

**** SOLVER STATUS


**** MODEL STATUS
**** OBJECTIVE VALUE

OBJECTIVE
DIRECTION
FROM LINE
1 NORMAL COMPLETION
8 INTEGER SOLUTION
809.9055

RESOURCE USAGE, LIMIT


ITERATION COUNT, LIMIT
OSL Release 2,

CO
MINIMIZE
460

34308.601
200000.000
4631527
900000000

GAMS Link level 3

---

386/486 DOS

1.3.051-030

Could not find option file D:\GAMS\OSL.OPT


Using defaults instead.
Work space requested by user
-Work space requested by solver --

10.00 Mb
1.56 Mb

OSL step: Reading data

0.01 Seconds

OSL step: Scale


0.02 Seconds
Range of matrix coeffients:
before scaling :
0.0025 250.0000
after scaling :
0.0220 1.0000
OSL step: Presolve
Size reduction:
rows
:
columns :
nonzeroes:

0.04 Seconds
1682 (old)
863 (old)
4779 (old)

OSL step: Crash


Crash option : 1

1021 (new)
863 (new)
3197 (new)
0.01 Seconds

OSL step: Primal Simplex


1.19 Seconds
Status:
Successful (optimal)
Iterations:
597
Objective :
267.0352
OSL step: Branch&Bound
Status:
Interrupt
Iterations:
4630923
Nodes
:
361178
Objective :
809.9055

34306.05 Seconds

_____________________________________________________________________
157
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

OSL step: Postsolve

0.67 Seconds

OSL step: Primal Simplex


0.12 Seconds
Status:
Successful (optimal)
GAMS 2.25.089 DOS Extended/C
07/30/03 01:13:21
PAGE
50
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 460
Iterations:
Objective :

7
809.9055

Relaxed optimum objective value:


Bound on best integer solution:
Objective value of this solution:

267.03518
736.29773
809.90550

Relative gap: .09997 Absolute gap:


Optcr
: .10000 Optca:

73.607773
10.000000

GAMS 2.25.089 DOS Extended/C


PAGE
110
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---time
1

1.000,

---1

462 VARIABLE
2

6.000,

462 VARIABLE

5.000,

TF.L

M o d e l i n g

S y s t e m

vessel v unloading initiation


3 10.000

TL.L

9.000,

---462 VARIABLE
vessel v at

07/30/03 01:13:21

vessel v unloading completion and


departure time
3 12.000

VV.L

volume of crude oil in crude


time t

1
550.000
2
550.000

526.000

461.000

461.000

250.000

10

11

2
540.000
3
250.000

475.000

250.000
550.000

500.000

+
12

_____________________________________________________________________
158
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

---462 VARIABLE
tank i at

VS.L

volume of crude oil in storage


time t

1
30.000
350.000
2
200.000
5.000
3
140.000
39.000

5.000

5.000

5.000

165.000

135.000

134.000

69.000

62.000

140.000

140.000

75.000

39.000

10

11

1
318.000
219.000
2
5.000
350.000
3
39.000
305.000

318.000

318.000

253.000

219.000

5.000

165.000

350.000

350.000

5.000

5.000

5.000

55.000

+
12

13

14

15

1
2
3

193.000
285.000
490.000

193.000
225.750
470.250

193.000
225.750
470.250

GAMS 2.25.089 DOS Extended/C


PAGE
111
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---462 VARIABLE
tank j at

VB.L

07/30/03 01:13:21
M o d e l i n g

S y s t e m

volume of crude oil in charging


time t

1
70.000
208.000
2
190.000
168.000

184.000

250.000

168.000

86.000

108.000

26.000

156.000

250.000

10

11

1
250.000
250.000
2
86.000
15.000

168.000

86.000

216.000

250.000

185.000

250.000

168.000

90.000

14

15

+
12

13

_____________________________________________________________________
159
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

1
2

168.000
171.000

90.000
250.000

---462 VARIABLE
v starts

XF.L

15.000
250.000
0-1

variable to denote if vessel

unloading at time t
1
1
2
3

1.000

---v

462 VARIABLE

10

1.000
1.000
XL.L

0-1

variable to denote if vessel

completes unloading at time t


5
1
2
3

1.000

---v is

462 VARIABLE

12

1.000
1.000
XW.L

0-1

variable to denote if vessel

unloading its crude oil at time t


1

7
1
1.000
1.000
1.000
1.000
2
1.000
1.000
GAMS 2.25.089 DOS Extended/C
07/30/03 01:13:21
PAGE
112
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
462 VARIABLE

XW.L

0-1

variable to denote if vessel

v is
unloading its crude oil at time t
+
2
3
---tank j

1.000

1.000

462 VARIABLE

VKB.L

10

11

12

1.000
1.000
1.000
volume of component k in charging
at time t

_____________________________________________________________________
160
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

1
3.306
2
6.020

1.106

3.546

4.226

2.586

0.946

7.391

4.040

1.170

6.370

8.890

10

11

3.926

2.730

1.090

3.690

4.030

3.150

6.800

8.750

5.880

3.150

13

14

15

1
2

3.210
5.985

1.650
8.750

0.150
8.750

+
12
1
4.030
2
0.525

GAMS 2.25.089 DOS Extended/C


PAGE
113
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---v to

462 VARIABLE

FVS.L

07/30/03 01:13:21
M o d e l i n g

S y s t e m

volumetric flow rate from vessel


storage tank i at time t

24.000

65.000

211.000

250.000

7
1.1
2.2
65.000

10.000

2.2
3.3

225.000

250.000

---tank i

462 VARIABLE

FSB.L

10

11

12

50.000

250.000

250.000

volumetric flow rate from storage


to charging tank j at time t

49.000

65.000

65.000

1.000

6
1.1
32.000
1.2
2.1
10.000
2.2
3.2

65.000
51.000
57.000
65.000
65.000

7.000
36.000

_____________________________________________________________________
161
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

10

65.000

34.000

12

13
1.1
1.2
2.1
2.2
59.250
3.2
19.750

26.000
65.000
65.000

65.000

65.000

34.000

---462 VARIABLE
charging tank

65.000

FBC.L

volumetric flow rate

from

j to CDU l at time t
1

6
1.1
82.000
82.000
2.1
82.000
82.000
82.000
82.000
GAMS 2.25.089 DOS Extended/C
07/30/03 01:13:21
PAGE
114
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n

charging

462 VARIABLE
tank

FBC.L

volumetric flow rate

from

j to CDU l at time t
+

82.000

82.000

10

11

82.000

78.000

75.000

12
1.1
82.000
2.1
+

13

14

15

1.1

78.000

75.000

75.000

---462 VARIABLE
crude oil

D.L

0-1 variable to denote if the


blended j charges CDU l at time t

1.000

1.000

1.000

1.000

6
1.1
2.1
1.000
+

1.000
9

10

11

12

_____________________________________________________________________
162
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

1.1
1.000
2.1

1.000

1.000
1.000

13

14

15

1.1

1.000

1.000

1.000

GAMS 2.25.089 DOS Extended/C


PAGE
115
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---from

462 VARIABLE

Z.L

1.000

1.000

07/30/03 01:13:21
M o d e l i n g

S y s t e m

0-1 variable to denote transition


crude blended j to y at time t in

CDU l
INDEX 1 = 1

2.1

1.000

1.000

INDEX 1 = 2

1.1

12

1.000

1.000

1.000

EXECUTION TIME

19.730 SECONDS

USER: Linnhoff March Limited


MW2
Academic License

VERID WAT-25-089
G951213:1201CR-

**** FILE SUMMARY


INPUT
OUTPUT

Z:\GAMS\CASE3.TXT
D:\GAMS\CASE3.LST

A.7 Case 6 Computer hardcopy output


MODEL STATISTICS
BLOCKS OF EQUATIONS
39
SINGLE EQUATIONS
1682
BLOCKS OF VARIABLES
20
SINGLE VARIABLES
863
NON ZERO ELEMENTS
4779
DISCRETE VARIABLES
261
GENERATION TIME
=
0.240 SECONDS
EXECUTION TIME
=
0.290 SECONDS
VERID WAT-25-089
GAMS 2.25.089 DOS Extended/C
07/31/03 08:53:26
PAGE
49

_____________________________________________________________________
163
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
Solution Report
SOLVE SCHEDULING USING MIP FROM LINE 460
S O L V E
MODEL
TYPE
SOLVER

S U M M A R Y

SCHEDULING
MIP
OSL

**** SOLVER STATUS


**** MODEL STATUS
**** OBJECTIVE VALUE

OBJECTIVE
DIRECTION
FROM LINE
1 NORMAL COMPLETION
8 INTEGER SOLUTION
329.1860

RESOURCE USAGE, LIMIT


ITERATION COUNT, LIMIT
OSL Release 2,

CO
MINIMIZE
460

7532.652
120000.000
350904
900000000

GAMS Link level 3

---

386/486 DOS

1.3.051-030

Could not find option file D:\GAMS\OSL.OPT


Using defaults instead.
Work space requested by user
-Work space requested by solver --

10.00 Mb
1.56 Mb

OSL step: Reading data

0.03 Seconds

OSL step: Scale


0.02 Seconds
Range of matrix coeffients:
before scaling :
0.0025 250.0000
after scaling :
0.0251 1.0000
OSL step: Presolve
Size reduction:
rows
:
columns :
nonzeroes:

0.05 Seconds
1682 (old)
863 (old)
4779 (old)

OSL step: Crash


Crash option : 1

1021 (new)
863 (new)
3197 (new)
0.01 Seconds

OSL step: Primal Simplex


0.72 Seconds
Status:
Successful (optimal)
Iterations:
650
Objective :
78.3530
OSL step: Branch&Bound
Status:
Interrupt
Iterations:
350251
Nodes
:
15853
Objective :
329.1860
OSL step: Postsolve

7524.74 Seconds

4.02 Seconds

OSL step: Primal Simplex


0.94 Seconds
Status:
Successful (optimal)

_____________________________________________________________________
164
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

**** REPORT SUMMARY :

0
NONOPT
0 INFEASIBLE
0 UNBOUNDED

GAMS 2.25.089 DOS Extended/C


PAGE
110
G e n e r a l
A l g e b r a i c
E x e c u t i o n
---time
1

1.000,

---1

462 VARIABLE
2

TF.L

6.000,

462 VARIABLE

2.000,

M o d e l i n g

S y s t e m

vessel v unloading initiation


3 10.000

TL.L

7.000,

---462 VARIABLE
vessel v at

07/31/03 08:53:26

vessel v unloading completion and


departure time
3 11.000

VV.L

volume of crude oil in crude


time t

1
400.000
2
3
250.000

250.000

400.000

250.000

10

11

400.000

---462 VARIABLE
tank i at

VS.L

volume of crude oil in storage


time t

1
30.000
253.100
2
200.000
5.000
3
140.000
7.900

115.000

300.000

263.600

253.100

135.000

102.700

37.700

5.000

137.300

137.300

72.300

7.900

10

11

1
188.100
114.500
2
90.000
145.000
3
7.900
314.500

137.100

137.100

126.760

114.500

275.000

275.000

210.000

145.000

7.900

7.900

5.000

90.000

+
12

_____________________________________________________________________
165
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

13

14

15

1
2
3

49.500
80.000
308.000

5.000
15.000
308.000

5.000
15.000
308.000

---462 VARIABLE
tank j at

VB.L

volume of crude oil in charging


time t

6
1
70.000
202.700
300.000
218.000
136.000
54.000
2
190.000
108.000
26.000
192.400
300.000
300.000
GAMS 2.25.089 DOS Extended/C
07/31/03 08:53:26
PAGE
111
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
462 VARIABLE
tank j at

VB.L

volume of crude oil in charging


time t

+
12

10

11

1
184.000
54.000
2
218.000
300.000

300.000

300.000

218.000

136.000

136.000

54.000

132.240

274.500

13

14

15

1
2

190.500
218.000

300.000
136.000

300.000
54.000

---462 VARIABLE
v starts

XF.L

0-1

variable to denote if vessel

unloading at time t
1
1
2
3

1.000

---v

462 VARIABLE

10

1.000
1.000
XL.L

0-1

variable to denote if vessel

completes unloading at time t


2

11

_____________________________________________________________________
166
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

1
2
3

1.000

---v is

462 VARIABLE

1.000
1.000
XW.L

0-1

variable to denote if vessel

unloading its crude oil at time t


1

1
2
3
1.000

1.000

1.000

---tank j

462 VARIABLE

1.000

1.000

10

11

1.000

VKB.L

volume of component k in charging


at time t

6
1
1.106
3.841
5.460
3.820
2.180
0.540
2
7.391
4.521
1.170
6.734
11.040
11.040
GAMS 2.25.089 DOS Extended/C
07/31/03 08:53:26
PAGE
112
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
462 VARIABLE

VKB.L

volume of component k in charging

tank j
at time t
+
12

10

11

3.140

5.600

5.600

3.960

2.320

8.170

5.300

2.430

4.628

9.951

13

14

15

1
2

3.605
8.356

6.000
4.760

6.000
1.890

---v to

462 VARIABLE

1
0.680
2
11.226

FVS.L

volumetric flow rate from vessel


storage tank i at time t

_____________________________________________________________________
167
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

10

11
1.1
150.000
250.000
2.2
150.000
250.000
3.3
150.000
250.000
GAMS 2.25.089 DOS Extended/C
07/31/03 08:53:26
PAGE
113
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
---tank i

462 VARIABLE

FSB.L

volumetric flow rate from storage


to charging tank j at time t

65.000

65.000

65.000

32.300

7
1.1
51.000
1.2
2.1
65.000
2.2
3.1
3.2
+
1.1
1.2
2.1
2.2
3.1
3.2

65.000
36.400

10.500
65.000

65.000

32.700

65.000

64.400

11

12

13

65.000

44.500

65.000

65.000

2.700
9

10

10.340

12.260

65.000

65.000

2.900

65.000

6.500

---462 VARIABLE
charging tank

FBC.L

25.500
volumetric flow rate

from

j to CDU l at time t
1

82.000

82.000

82.000

82.000

82.000

82.000

82.000

10

11

82.000

82.000

82.000

6
1.1
2.1
82.000
+
12
1.1
2.1
82.000

_____________________________________________________________________
168
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

13

14

15

2.1

82.000

82.000

82.000

---462 VARIABLE
crude oil

D.L

0-1 variable to denote if the


blended j charges CDU l at time t

6
1.1
1.000
1.000
1.000
2.1
1.000
1.000
1.000
GAMS 2.25.089 DOS Extended/C
07/31/03 08:53:26
PAGE
114
G e n e r a l
A l g e b r a i c
M o d e l i n g
S y s t e m
E x e c u t i o n
462 VARIABLE
crude oil

D.L

0-1 variable to denote if the


blended j charges CDU l at time t

10

11

1.000

1.000

1.000

1.000

1.000

13

14

15

2.1

1.000

1.000

1.000

12
1.1
2.1
1.000

---from

462 VARIABLE

Z.L

0-1 variable to denote transition


crude blended j to y at time t in

CDU l
INDEX 1 = 1

2.1

12

1.000

1.000

INDEX 1 = 2

1.1

1.000

1.000

EXECUTION TIME

7.090 SECONDS

VERID WAT-25-089

_____________________________________________________________________
169
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

GAMS 2.25.089
PAGE
115
G e n e r a l

DOS Extended/C
A l g e b r a i c

07/31/03 08:53:26
M o d e l i n g

USER: Linnhoff March Limited


MW2
Academic License

S y s t e m

G951213:1201CR-

**** FILE SUMMARY


INPUT
OUTPUT

Z:\GAMS\CASE6.TXT
D:\GAMS\CASE6.LST

APENDIX B
* Program in GAMS developed by Cassio Tamara for the Research Project in
Optimisation of Oil refineries, MSc Process System Engineering, Cranfield University
*3 vessels, 3 storage tanks, 2 charging tanks and 1 CDU. Scheduling horizon for this
problem is 15 time intervals.
* This program is configurated for running case 1.
option iterlim =1000000000
sets
i "crude oil storage tank" /1,2,3/
j "crude oil charging tank" /1,2/
y "crude oil charging tank" /1,2/
l "crude distillation unit" /1/
t "time interval" /1*15/
m "time interval" /1*15/
v "crude vessel" / 1,2,3/
parameters
VSmax (i)

"storage tank maximum capacity"

_____________________________________________________________________
170
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

/ 1

350

350

350 /

VSmin (i)

VBmax (j)

VBmin (j)

"storage tank minimum capacity"

/ 1

5/

"charging tank maximum capacity"


/ 1

250

250/

"charging tank minimum capacity"


/ 1
2

15
15 /;

parameters
CU(v) "unloading cost of vessel v per unit time interval"
/ 1

10

10

10 /

CSEA(v) "sea waiting cost of vessel v per unit time interval"


/ 1

8/

CSINV(i) "inventory cost of storage tank i per unit time per unit volume"
/ 1

0.008

0.008

0.008 /

CBINV(j) "inventory cost of charging tank j per unit time per unit volume"
/ 1

0.005

0.005/

_____________________________________________________________________
171
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

TARR(v) "crude oil vessel v arrival time around the docking station"

TLEA(v)

/1

10 /

"crude oil vessel v departure time around the docking station"


/1

10

15 /

ES(i) "concentration component k in the crude oil of storage tank i"


/ 1

0.01

0.03

0.05 /

EBmin(j) "minimum concentration component k in the crude oil mix of


charging tank j"
/ 1
2

0.01
0.035

EBmax(j) "maximum concentration component k in the crude oil mix of


charging tank j"
/

1 0.02
2 0.045

DM(t) "demand of crude blended oil from CDU'


s per time interval"
/1

75

75

75

75

75

_____________________________________________________________________
172
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

75

75

75

75

10

75

11

75

12

75

13

75

14

75

15

75 / ;

variables
TF(v) vessel v unloading initiation time
TL(v) vessel v unloading completion and departure time
VV(v,t) volume of crude oil in crude vessel v at time t
VS(i,t) volume of crude oil in storage tank i at time t
VB(j,t) volume of crude oil in charging tank j at time t
XF(v,t) 0-1 variable to denote if vessel v starts unloading at time t
XL(v,t) 0-1 variable to denote if vessel v completes unloading at
time t
XFF(v,m) transitory variable to search XF
XLL(v,m) transitory variable to search XL
XW(v,t) 0-1 variable to denote if vessel v is unloading its crude
oil at time t
D(j,l,t) 0-1 variable to denote if the crude oil blended j charges
CDU l at time t
_____________________________________________________________________
173
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

G(y,l,t) 0-1 variable to denote if the crude oil blended j charges


CDU l at time t
Z(j,y,l,t) 0-1 variable to denote transition from crude blended j to y
at time t in CDU l
FVS(v,i,t) volumetric flow rate from vessel v to storage tank i at
time t
FSB(i,j,t) volumetric flow rate from storage tank i to charging tank
j at time t
FBC(j,l,t) volumetric flow rate from charging tank j to CDU l at
time t
FKSB(i,j,t)

vol. flow rate of component k from stor. tank i to

charg. tank j at time t


FKBC(j,l,t)

volumetric flow rate of component k from charging

tank j to CDU l at time t


VKB(j,t) volume of component k in charging tank j at time t
EB(j,t)

concentration of component k in the crude oil mix of

chargin tank j
co

total operating cost;

Binary variables XF,XL,XW,D,G,Z;


Positive

variables

VV,VS,VB,FVS,FSB,FBC,X,W,XFF,XLL,

FKSB,FKBC,VKB,EB;
integer variables TF,TL;
VV.fx('
1'
,'
1'
) = 400;
VV.fx('
2'
,'
6'
) = 400;
VV.fx('
3'
,'
10'
) = 400;
VS.fx('
1'
,'
1'
) = 30;
VS.fx('
2'
,'
1'
) = 200;
_____________________________________________________________________
174
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

VS.fx('
3'
,'
1'
) = 140;
FVS.up(v,i,t) = 250;
FSB.up(i,j,t) = 65;
FBC.up(j,l,t) = 82;
VB.fx('
1'
,'
1'
) = 70;
VB.fx('
2'
,'
1'
) = 190;
EB.fx('
1'
,'
1'
) = 0.0158;
EB.fx('
2'
,'
1'
) = 0.0389;
VKB.fx('
1'
,'
1'
) = 1.106;
VKB.fx('
2'
,'
1'
) = 7.391;
Equations
cost

define objective function

vearrive

vessel arrives one time during schedule horizon

veleave

vessel leaves one time during schedule horizon

unloit

unloading initiation time

unloct

unloading completion time

unlost

unloading time after arrival

vedurat

minimum unloading duration

vearco

vessel cannot arrives until preceding leaves

ffd

transitory equation for supporting fd

lld

transitory equation for supporting ld

fd

unloading is only possible at time bigger or equal than TF

ld

unloading is only possible at time smaller or equal than TL

intvess

first and second vessel leaving time

lastvess

last vessel leaving time

nounloa

no unloading before arriving

vemasba

material balance equation for the vessel

vevol1

oil transfer from vessel to the assigned storage tank

vevol2

total oil transfer equal to oil volume vessel

vtoiatt
stmasba

operating constrain transfer rate from vessel to tank i


material balance equation for storage tank

_____________________________________________________________________
175
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

volimst1

minimum capacity limitations for storage tank at time t

volimst2

maximum capacity limitations for storage tank at time t

ratestk

storage tank output flow balance

ncandfst1

operating constraint

blmasba

material balance equation for charging tank

volimbt1

minimum capacity limitations for charging tank at time

volimbt2

maximum capacity limitations for charging tank at time

ncandfst2

operating constraint for the CDU l plant maximum feed rate

totprod

demand fulfilment

kbmasba

material balance equation for component k in tank j

kitojatt

operating constraint on vol. flow rate k from i to j

kjtolatt1

operating constraint on vol. flow rate k from j to CDU l

kjtolatt2

operating constraint on vol. flow rate k from j to CDU l

volimkbt1

minimum capacity limitations for k in tank j at time t

volimkbt2

maximum capacity limitations for k in tank j at time t

cdubyone

cdu must be charged by only one tank j at time t

compar

makes D equal to G

changeov

calculation of Z ;

* optimal operational cost


cost..

co

=e=

sum(v,(TL(v)-TF(v)+1)*CU(V))

sum(v,(TF(v)-TARR(v))*CSEA(v))

sum((i,t)$(ord(t) le 14),((VS(i,t) + VS(i,t+1))*CSINV(i)/2)) +


sum((j,t)$(ord(t)

le

14),((VB(j,t)

VB(j,t+1))*CBINV(j)/2))

sum((j,y,l,t),Z(j,y,l,t)*50);
vearrive(v)..

sum(t,XF(v,t))

veleave(v)..

sum(t,XL(v,t))

=e= 1.0 ;
=e= 1.0 ;

unloit(v)..

TF(v)

=e= sum(t,XF(v,t)*ord(t)) ;

unloct(v)..

TL(v)

=e= sum(t,XL(v,t)*ord(t)) ;

unlost(v)..

TF(v)

=g= TARR(v) ;

vedurat(v)..

TL(v)-TF(v)

vearco(v)$(ord(v) le 2)..

=g= 1 ;
TF(v+1)

=g= TL(v) + 1 ;

_____________________________________________________________________
176
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

ffd(v,m)..

XFF(v,m) =e= sum(t$(ord(t) le ord(m)$(ord(m) lt TLEA(v) and

ord(m) ge TARR(v))),XF(v,t));
lld(v,m)..

XLL(v,m) =e= sum(t$(ord(t) gt ord(m)$(ord(m) le TLEA(v) and

ord(m) ge TARR(v) )),XL(v,t));


fd(v,t,m)$(ord(t) le ord(m)$(ord(m) lt TLEA(v) and ord(m) ge TARR(v)))..
XW(v,t) =l= XFF(v,m) ;
ld(v,t,m)$(ord(t) gt ord(m)$(ord(m) le TLEA(v) and ord(m) ge TARR(v) ))..
XW(v,t) =l= XLL(v,m) ;
intvess(v)$(ord(v) le 2)..

TL(v) =l= TLEA(v)-1;

lastvess(v)$(ord(v) eq 3)..

TL(v) =l= TLEA(v);

nounloa(v,t)$(ord(v) ge 2 and ord(t) le (TARR(v) - 1)).. XW(v,t) =e= 0;

* "Material balance equations for the vessel"


vemasba(v,t)$(ord(t) le 14 and ord(t) ge TARR(v))..

VV(v,t+1)

=e=

VV(v,t) - sum(i,FVS(v,i,t));
vevol1(v)..

sum((i,t),FVS(v,i,t)) =e= sum((i,t)$(ord(i) eq

ord(v)),FVS(v,i,t));
vevol2(v)..

sum((i,t),FVS(v,i,t))

vtoiatt(v,i,t)..

=e= 400;

FVS(v,i,t) =l= FVS.up(v,i,t)*XW(v,t);

* all vessel have the same capacity, then VVv = 400 (equat.3.17, chapter 3)
* "Material balance equations for the storage tank"
stmasba(i,t)$(ord(t) le 14)..

VS(i,t+1) =e= VS(i,t) + sum(v,FVS(v,i,t)) -

sum(j,FSB(i,j,t));
volimst1(i,t)..

VSmin(i) =l= VS(i,t);

volimst2(i,t)..

VS(i,t) =l= VSmax(i);

ratestk(i,t)..
ncandfst1(i,j,l,t)..

sum(j,FSB(i,j,t)) =l= 70;


FSB(i,j,t) =l= FSB.up(i,j,t)*(1-D(j,l,t)) ;

_____________________________________________________________________
177
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

* all storage tanks have the same pumping rate maximum capacity, then PUMPCAPi
= 70 (equat.3.25, chapter 3)

* "Material balance equations for charging tanks"


blmasba(j,t)$(ord(t) le 14)..

VB(j,t+1) =e= VB(j,t) + sum(i,FSB(i,j,t)) - sum(l,

FBC(j,l,t));
volimbt1(j,t)..

VBmin(j) =l= VB(j,t) ;

volimbt2(j,t)..

VBmax (j) =g= VB(j,t) ;

* Solving direction
ncandfst2(j,l,t)..

FBC(j,l,t) =l= FBC.up(j,l,t)*D(j,l,t) ;

totprod(t)..

FBC(j,l,t)) =g= DM(t)*D(j,l,t);

* Material balance equations for component k in the charging tank.


kbmasba(j,t)$(ord(t) le 14)..

VKB(j,t+1) =e= vKB(j,t)+ sum(i,FKSB(i,j,t))-

sum(l,FKBC(j,l,t));
kitojatt(i,j,t)..

FKSB(i,j,t) =e= FSB(i,j,t)*ES(i) ;

kjtolatt1(j,l,t)..

FKBC(j,l,t) =g= FBC(j,l,t)*EBmin(j);

kjtolatt2(j,l,t)..

FKBC(j,l,t) =l= FBC(j,l,t)*EBmax(j) ;

volimkbt1(j,t)..

VKB(j,t) =g= VB(j,t)*EBmin(j) ;

volimkbt2(j,t)..

VKB(j,t) =l= VB(j,t)*EBmax(j);

* Operating rules for crude oil charging


_____________________________________________________________________
178
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

cdubyone(l,t)..

sum(j,D(j,l,t)) =e= 1;

compar(j,y,l,t)$(ord(j) eq ord(y))..

D(j,l,t) =e= G(y,l,t);

changeov(j,y,l,t)$(ord(j) ne ord(y) and ord(t) le 14)..

Z(j,y,l,t+1) =g= D(j,l,t)

+ G(y,l,t+1) - 1 ;

model scheduling /all/;


scheduling.optfile = 1;
scheduling.workspace = 10;
option reslim = 20000;
option mip = osl;
solve scheduling using mip minimizing co;
display
TF.l,TL.l,VV.l,VS.l,VB.l,XF.l,XL.l,XW.l,VKB.l,FKBC.l,EB.l,FVS.l,FSB.l,FBC.l,D.l
,G.l,Z.l;

_____________________________________________________________________
179
Cassio R. Tamara
Oil Refinery Scheduling Optimisation
MSc Process & System Engineering
Cranfield University 2003

You might also like