Cranfield UNIVERSITY 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 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
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. i
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
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
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
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
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
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
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
NOTATION CDU Crude Distillation Unit CDUs Crude Distillation Units LP Linear Programming MILP Mixed Integer Linear Programming MINLP Mixed Integer Non Linear Programming NLP Non Linear Programming LPG Liquefied Petroleum Gas bbl Barrels v vessel number i storage tank number j,y charging tank number l crude distillation unit number t time interval number V vessel quantity along the scheduling horizon I quantity of storage tanks in the system J quantity of charging tanks in the system L quantity of crude distillation units in the system VE grouping of vessels or tankers ST grouping of storage tanks CT grouping of charging tanks CDU grouping of crude distillation units COMP grouping of crude oil components SCH grouping of time intervals max VS i min VS i max VB j min VB j CU v CSEA v CSINV i storage tank maximum capacity storage tank minimum capacity charging tank maximum capacity charging tank minimum capacity unloading cost of vessel v per unit time interval sea waiting cost of vessel v per unit time interval inventory cost of storage tank i per unit time interval ix
CBINV j inventory cost of storage tank i per unit time interval CCHANG l changeover cost of CDU l TARR v crude oil vessel arrival date TLEA v crude oil vessel maximum departure date PUMPCAP v maximum pumping system capacity per vessel v PUMPCAP i maximum pumping system capacity per storage tank i EV v,k ES i,k DMCDU t,l concentration of component k in the crude oil vessel v concentration of component k in storage tank i demand of each CDU l per time interval TOTDMCDU l total demand of each CDU l along the scheduling horizon DMBCO j demand of each blended crude oil j along the scheduling horizon XF v,t XL v,t XW v,t F i,j,t D j,l,t Z j,y,l,t TF v TL v VV v,t VS i,t VB j,t FVS v,i,t FSB i,j,t FBC j,l,t binary variable denoting if vessel v starts unloading at time t binary variable denoting if vessel v finishes unloading at time t binary variable denoting if vessel v is unloading its crude oil at time t binary variable denoting if storage tank i is feeding charging tanks binary variable denoting if charging tank j is feeding CDU l at time t binary variable for the changeover from charging tank j to y integer variable denoting vessel v unloading initiation time integer variable denting vessel v unloading completion time continuous variable for crude oil volume vessel v continuous variable for crude oil volume in storage tank i continuous variable for crude oil volume in charging tank j continuous variable for flow rate from vessel v to storage tank i continuous variable for flow rate from st. tank i to ch. tank j 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 VKB j,k,t ES i,k,t EB j,k,t continuous variable for component k volume in storage tank i continuous variable for component k volume in charging tank j continuous variable for component k concentration in storage tank i continuous variable for sulphur concentration in charging tank j x
COST continuous variable for the total optimal operational cost max FVS v,i,t min FVS v,i,t FSB max i,j,t FSB min i,j,t FBC max j,l,t FBC max j,l,t max ES i,k min ES i,k max EB j,k min EB j,k maximum flow rate from vessel v to one storage tank i minimum flow rate from vessel v to one storage tank i maximum flow rate from storage tank i to one charging tank j minimum flow rate from storage tank i to one charging tank j maximum flow rate from charging tank j to one CDU l minimum flow rate from charging tank j to one CDU l maximum concentration of component k in storage tank i minimum concentration of component k in storage tank i maximum concentration of component k in charging tank j minimum concentration of component k in charging tank j xi
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. 1
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
Planning Analysis Scheduling Monitoring Advanced control and optimisation 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
d. The composition of the crude oil is decided by the amount of key components presented in the crude oil or in the blended crude oil. In general, sulphur is at least one of the key components for differentiating between crude oils. A uniformed discretisation is chosen in the given scheduling horizon for the proposed scheduling model. The selection of the length of each discretised time span involves a trade off between accurate operation and computational effort. The reviewed cases in this thesis involve 15 time intervals during the scheduling horizon. Instead, the 3 examples of {Lee, Pinto, et al. 1996}reviewed in this Thesis involve 8, 10 and 12 time intervals respectively. The optimisation problem involves the following sets, parameters and variables: Sets VE = {v = 1, 2... V / crude oil vessel or tankers} ST = {i = 1, 2... I / storage tanks} CT = {j,y = 1, 2... J / charging tanks} COMP = { k = 1, 2... K / crude oil components} CDU = {l = 1, 2... L / crude distillation units} SCH = {t = 1, 2... T / time intervals along the scheduling horizon} Parameters max VS i : storage tank maximum capacity. min VS i : storage tank minimum capacity. max VB j : charging tank maximum capacity. min VB j : charging tank minimum capacity. CU v : unloading cost of vessel v per unit time interval. CSEA v : sea waiting cost of vessel v per unit time interval. CSINV i : inventory cost of storage tank i per unit time interval. CBINV j : inventory cost of charging tank j per unit time interval. CCHANG l : changeover cost of CDU l. 18
TARR v : crude oil vessel arrival date to the docking station. TLEA v : crude oil vessel maximum departure date from the docking station. PUMPCAP v : maximum pumping system capacity or total flow capacity from each vessel v to storage tanks. PUMPCAP i : maximum pumping system capacity or total flow capacity from each storage tank i to charging tanks. EV v,k : concentration of component k in the crude oil vessel v. ES i,k : concentration of component k in the crude oil of storage tank i. ES min i,k : minimum concentration of component k in the blended crude oil of storage tank i. ES max i,k : maximum concentration of component k in the blended crude oil of storage tank i. EB min j,k : minimum concentration of component k in the blended crude oil of charging tank j. EB j,k max : maximum concentration of component k in the blended crude oil of charging tank j. DMCDU t,l : demand of each CDU l per time interval. TOTDMCDU l : total demand of each CDU l along the scheduling horizon. DMBCO t,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}. max FVS v,i,t : maximum crude oil rate from vessel v to one storage tank i. min FVS v,i,t : 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 max i,j,t : maximum crude oil rate from storage tank i to one charging tank j. FSB min i,j,t : 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
FBC max j,l,t : 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 min j,l,t : minimum crude oil rate from charging tank j to one CDU l.this value could be adjusted to the same value DMCDU t,l, depending on the problem conditions. Binary variables XF v,t : variable to denote if vessel v starts unloading at time t. XL v,t : variable to denote if vessel v finishes unloading at time t. XW v,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 TF v : vessel v unloading initiation time. TL v : vessel v unloading completion time. Continuous variables VV v,t : volume of crude oil in 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. 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
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 VV v, TARRv : initial volume of crude oil vessel at time equal TARR v. VS i, 1 : initial volume of storage tank i at time equal 1 in the start up of the scheduling horizon. VB j, 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
V COST = [ (TL v -TF v + 1) CU v ] + [ (TF v - TARR v ) CSEA v ] + v=1 v=1 I T [ (VS i,t + VS i,t+1 ) CSINV i /2 ] + i=1 t=1 J T [ (VB j,t + VS j,t+1 ) CBINV j /2 ] + j=1 t=1 V J J L T (CCHANG l Z j,y,l,t ) (3.1) j=1 y=1 l=1 t=1 The above equation is subjected to the following constrains: 3.3.1 Vessel Arrival and Departure Operation Rules. Each vessel must arrive to the docking station for unloading only once through the scheduling horizon: T XF v,t = 1, v VE (3.2) t=1 Each vessel leaves the docking station only once through the scheduling horizon: T XL v,t = 1, v VE (3.3) t=1 The unloading initiation time is denoted by the following equation: T TF v = txf v,t, v VE (3.4) t=1 The unloading completion time is denoted by the following equation: T TL v = txl v,t, v VE (3.5) t=1 22
Each vessel must start unloading either after or on the arrival time established at the planning level: TF v TARR v, 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: TL v < TLEA v, v VE, v V (3.7) Except for the last vessel: TL v TLEA v, v = V (3.8) Minimum duration of the vessel unloading is two time intervals: TL v - TF v 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: TF v+1 TL v + 1, v VE (3.10) Unloading of vessel v only will be possible between time TF v and TL v : T XW v,t XF v,t, t m, v VE, t=1 m { m = TARR v, TLEA v } (3.11) XW v,t T XL v,t, t > m, v VE, t=1 m { m = TARR v, TLEA v } (3.12) 23
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: VV v,t = VV v, TARRv, t = TARR v (3.13) I VV v,t+1 = VV v,t - FVS v,i,t, v VE, t SCH (3.14) i=1 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 T I T FVS v,i,t = FVS v,i,t, v VE, i=1 t=1 i=1 t=1 i=v (only valid for one side of the equation) (3.15) If there is more storage tanks than vessels, the problem could consider managing crude oil blending composition ranges per storage tank and then, each vessel could optimally unload to several tanks meeting with the pre established blending range for each storage tank as it was explained above. Whether this is the case, equation 3.15 is not useful and must not be used for this situation. However, instead the following equation should be used to control the total flow from each vessel to storage tanks within a reasonable margin: I FVS v,i,t PUMPCAP v, v VE, t SCH (3.16) i=1 24
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 T FVS v,i,t = VV v, TARRv, v VE (3.17) i=1 t=1 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,t min XW v,t FVS v,i,t FVS v,i,t max XW v,t, v VE, i ST, t SCH (3.18) FVS v,i,t min (1- F i,j,t ) FVS v,i,t FVS v,i,t max (1 - F i,j,t ), v VE, i ST, j CT, v VE, t SCH (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: VS i,t = VS i, 1, t = 1 (3.20) 25
V VS i,t+1 = VS i,t + FVS v,i,t - FSB i,j,t, v=1 j=1 J i ST, t SCH (3.21) Volume capacity limitation for storage tank i: VS i min VS i,t VS i max, i ST, t 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: 0 FSB i,j,t FSB i,j,t max ( 1- D j,l,t ), i ST, j 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. 0 FSB i,j,t FSB i,j,t max F i,j,t, i ST, j 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
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: J FSB i,j,t PUMPCAP i, i ST, t SCH (3.25) j=1 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 max circuit than when is discharging to several charging tanks. Furthermore, FSB i,j,t 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, FSB max i,j,t 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: VB j,t = VB j, 1, t = 1 (3.26) I VB j,t+1 = VB j,t + FSB i,j,t - FBC j,l,t, i=1 l=1 L j CT, t SCH (3.27) Volume capacity limitation for charging tank j: 27
VB j min VB j,t VB j max, j 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). VKS i,k,t = VKS i,k, 1, t = 1 (3.29) V VKS i,k,t+1 = VKS i,k,t + FKVS v,i,k,t - FKSB i,j,k,t, v=1 j=1 i CT, k COMP, t SCH (3.30) The following is the operating constraint on volumetric flow rate of component k from vessel v to storage tank i: J FKVS v,i,k,t = FVS v,i,t EV v,k, v VE, i ST, k COMP, t 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 ES i,k min FKSB i,j,k,t FSB i,j,t ES i,k max, i ST, j CT, k COMP, t SCH (3.32) The limitations in the volume capacity for component k in storage tank i at time t are given by: 28
VS i,t ES i,k min VKS i,k,t VS i,t ES i,k max, i 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 VKB j,k,t+1 = VKB j,k,t + FKSB i,j,k,t - FKBC j,l,k,t, i=1 l=1 I j CT, k COMP, t SCH (3.34) L 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 ES i,k, i ST, j CT, k COMP, t 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: FBC j,l,t EB j,k min FKBC j,l,k,t FBC j,l,t EB j,k max, j CT, l CDU, k COMP t SCH (3.36) The limitations in the volume capacity for component k in charging tank j at time t are given by: 29
VB j,k,t EB j,k min VKB j,k,t VB j,k,t x EB j,k max, j CT, k COMP t 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 D j,l,t = 1, l CDU, t SCH (3.38) j=1 On the other hand, each charging tank j can charge at most one CDU l at time t: L D j,l,t 1, j CT, t SCH (3.39) l=1 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 D j,l,t + D y,l,t+1-1, j,y (j y) CT, l CDU, t SCH (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
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 FBC j,l,t FBC j,l,t max D j,l,t, j CT, l CDU, t SCH (3.41) L T FBC j,l,t = DMBCO j, j 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: DMCDU t,l D j,l,t FBC j,l,t FBC j,l,t max D j,l,t, j CT, l CDU, 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
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 = DMCDU t,l D j,l,t j CT, l CDU, t 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
FBC j,l,t min D j,l,t FBC j,l,t FBC j,l,t max D j,l,t, j CT, l CDU, t SCH (3.46) J T FBC j,l,t = TOTDMCDU l, l CDU (3.47) j=1 t=1 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
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 (TL v -TF v ) CU v and not (TL v -TF v + 1) CU v 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 TF v and TL v is different in both models. 34
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
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. New Model 1996} Model Optimal Value (US $ x 1,000) 217.667 206.95 Equations & constraints 331 552 Example 1 Single variables 192 337 Discrete variables 36 116 Iterations 1,695 4,393 Solving time(seconds) 73.4 5.21 Optimal Value (US $ x 1,000) 352.55 331.74 Equations & constraints 825 1807 Example 2 Single variables 456 1138 Discrete variables 70 396 Iterations 331,493 1,598,388 Solving time (minutes) 69.3 104.7 Optimal Value (US $ x 1,000) 296.56 248.64 Equations & constraints 1222 2991 Example 3 Single variables 581 1399 Discrete variables 84 582 Iterations > 515,541 4,236,122 Solving time (minutes) Not indicated 301.9 Table 4.1 - Comparisons of optimal results with an existing model. 36
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
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) 8 Number of Vessels Arrivals 2 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 Amount Initial ( min-max ) 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 Unit changeover cost for charged oil switch CDU) Storage Tank: 0.08, Charging Tank:0.05 50(independent of sequence and 38
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 1 3 2 2 7 7 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
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 60 Crude bbl x 10000 50 40 30 20 10 0 1 2 3 4 5 6 7 8 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 100 Crude bbl x 10000 80 60 40 20 0 1 2 3 4 5 6 7 8 Volume variation- Scheduling horizon in days Charging Tank X Charging Tank Y Figure 4.3 Example 1. Charging tank optimal volume variation. 40
Example 1 60 50 Crude bbl x 10000 40 30 20 10 0 1 2 3 4 5 6 7 8 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.06 Component concentration charging tanks 0.05 0.04 0.03 0.02 0.01 0 1 2 3 4 5 6 7 8 Scheduling horizon in days Charging Tank X Charging Tank Y 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). 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
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
Scheduling Horizon (# of unit times: days) 10 Number of Vessel Arrivals 3 Arrival Time Amount of Crude oil Component 1 Component 2 Vessel 1 1 100 0.01 0.04 Vessel 2 4 100 0.03 0.02 Vessel 3 7 100 0.05 0.01 Storage Tanks Number of Storages Tanks 3 Capacity Initial Oil Amount Component 1 Component 2 Tank 1 100 20 0.01 0.04 Tank 2 100 50 0.03 0.02 Tank 3 100 70 0.05 0.01 Charging Tanks Number of Charging Tanks 3 Capacity Initial Oil Amount Initial (min-max) comp.1 concentration Initial(min-max) comp.2 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 2 Unit costs involved in vessel operation Unloading cost: 8, Sea Waiting cost: 5 Tank inventory unit cost Unit changeover cost for charged oil switch Storage Tank: 0.05, Charging Tank:0.08 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
Vessels {Lee, Pinto, et al. New Model 1996} Model 1 3 1 2 7 4 3 9 8 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
Example 2 120 100 Crude bbl x 10000 80 60 40 20 0 1 2 3 4 5 6 7 8 9 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 100 Crude bbl x 10000 80 60 40 20 0 1 2 3 4 5 6 7 8 9 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
Example 2 25 20 Crude bbl x 10000 15 10 5 0 1 2 3 4 5 6 7 8 9 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 20 Crude bbl x 10000 15 10 5 0 1 2 3 4 5 6 7 8 9 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
Example 2 Component 1 concentration charging tanks 0.06 0.05 0.04 0.03 0.02 0.01 0 1 2 3 4 5 6 7 8 9 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.035 Component 2 concentration charging tanks 0.03 0.025 0.02 0.015 0.01 0.005 0 1 2 3 4 5 6 7 8 9 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
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
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. Example 3 Flow network 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
Scheduling Horizon (# of unit times: days) 12 Number of Vessels Arrivals 3 Arrival Time Amount of Key Component Crude oil Concentration Vessel 1 1 50 0.01 Vessel 2 5 50 0.085 Vessel 3 9 50 0.06 Number of Storage tanks 3 Storage Tanks Capacity Initial Oil Amount Initial ( min-max ) 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 Amount Initial ( min-max ) 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 Unit changeover cost for charged oil switch Storage Tank: 0.04, Charging Tank:0.08 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 2 5 5 3 9 9 Table 4.7 Example 3. Optimal unloading starting date for vessels. 51
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
Example 3 90 80 70 Crude bbl x 10000 60 50 40 30 20 10 0 1 2 3 4 5 6 7 8 9 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 50 Crude bbl x 10000 40 30 20 10 0 1 2 3 4 5 6 7 8 9 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
Example 3 12 10 Crude bbl x 10000 8 6 4 2 0 1 2 3 4 5 6 7 8 9 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 10 Crude bbl x 10000 8 6 4 2 0 1 2 3 4 5 6 7 8 9 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
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
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
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 Vessels Storage Tanks Charging Tanks Figure 5.1 Oil Flow Next Work for the Oil Refinery. 57
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
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
Scheduling Horizon (# unit time) 15 days Number of Vessels Arrivals 3 Arrival Time Amount of Sulphur Content Crude oil Vessel 1 Day 1 400,000 bbl 0.01 Vessel 2 Day 6 400,000 bbl 0.03 Vessel 2 Day 10 400,000 bbl 0.05 Number of Storage tanks 3 Storage Tanks Maximum/ Minimum Capacity Tank1 350,000 bbl / 5,000 bbl Tank2 350,000 bbl / 5,000 bbl Tank3 350,000 bbl / 5,000 bbl Initial Oil Amount Number of Charging tanks 2 Charging Tanks Maximum/ Minimum Capacity Tank1 250,000 bbl / 15,000 bbl Tank2 250,000 bbl / 15,000 bbl Sulphur Content 30,000 bbl 0.01 200,000 bbl 0.03 140,000 bbl 0.05 Initial Oil Amount Number of CDU 1 Maximum flow from vessel to storage tank. Maximum flow from one storage tank to charging tanks simultaneously during any time period. Maximum flow from one storage tank to one charging tank. Maximum flow from one charging tank to one CDU. Cost involved in vessel operation Tank inventory cost Changeover cost for feed switch CDU crude oil demand Table 5.1 - Case 1. Input data summary. Range of Sulphur Content & Initial value 70,000 bbl 0.01-0.02 0.0158 190,000 bbl 0.035 0.045 0.0389 250,000 bbl/day 70,000 bbl/day 65,000 bbl/day 82,000 bbl/day Unloading: US$ 10,000/day Sea Waiting: US$ 8,000/day Storage tank: US$ 0.008 /(day x bbl) Charging tank:us$0.005/(day x bbl) US$50,000 75,000 bbl/day After applying the model for the above case the following results are highlighted: 60
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 1 Day 1 Day 2 2 Day 6 Day 7 3 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 7 8 9 10 11 12 13 14 15 1 400 250 0 2 400 250 0 3 400 250 0 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
Crude bbl x 1000 400 350 300 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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. 300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
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 2 3 4 5 6 7 8 9 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
Vessel 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 150 250 2 150 250 3 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- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Ch.T 1-1 65 48.5 65 65 65 50 1-2 25.5 18.75 2-1 65 65 40 65 50 2-2 65 65 65 36.25 3-1 1.5 5 3-2 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
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 highest sulphur content starts to unload. 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 2 3 4 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.5 - Case 1. Crude oil sulphur content variation results in charging tanks. 65
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 2 Day 4 400,000 bbl 0.03 3 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
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 1 Day 1 Day 2 2 Day 4 Day 5 3 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
Crude bbl x 1000 400 350 300 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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. 300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
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 unloaded from vessel 1 that has a sulphur concentration of 0.01. 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 2 3 4 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.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 1 Day 1 400,000 bbl 0.01 2 Day 7 400,000 bbl 0.03 3 Day 9 400,000 bbl 0.05 Table 5.8 - Case 1b. Second change of the arriving schedule. 69
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 1 Day 1 Day 2 2 Day 7 Day 8 3 Day 9 Day 10 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
Crude bbl x 1000 400 350 300 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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. 300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
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 2 3 4 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
the original arriving schedule approved at the planning level (case1) and it sometimes could happen in the oil refinery. Vessel Arrival Amount of Sulphur Time Crude oil Content 2 Day 1 400,000 bbl 0.03 1 Day 6 400,000 bbl 0.01 3 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
Vessel Starts unloading Finish unloading 2 Day 4 Day 5 1 Day 6 Day 7 3 Day 10 Day 11 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 2 400 250 0 1 400 250 0 3 400 250 0 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. Crude bbl x 1000 400 350 300 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
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. 300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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 2 3 4 5 6 7 8 9 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
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- Char.T 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1-1 65 10 65 65 65 65 1-2 32 2-1 65 39.4 65 40 65 35 2-2 65 65 24 65 8 3-1 5 3-2 65 5 65 65 Table 5.13 - Case 1c. Results for Volumetric flow rate (bbl x 1,000) per day from storage to charging tanks. 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 2 3 4 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.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
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 150,000 1 crude oil 80,000 bbl 81,000 bbl 82,000 bbl 85,000 bbl bbl volume Total optimal operational US$ 354,181.5 US$ 354,235.3 US$ 354,341.3 US$ 354,659.3 US$ 361,900.3 cost CDU total feed difference - 600 bbl - 7,000 bbl 0 bbl 0 bbl 0 bbl with respect to case 1 Iterations 95,934 1,368,463 942,089 126,339 135,000 Software 1,249.3sec 22,329.3sec 18,556.6sec 1,512.3sec 1,732.5sec time spent (20.7 min) (372.2 min) (309.3 min) (25.2 min) (28.9 min) running 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
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
Vessel Arrival Unloading Unloading Amount of Crude oil Start Finish 1 Day 1 Day 1 Day 2 400,000 bbl 2 Day 6 Day 6 Day 7 400,000 bbl 3 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. Crude bbl x 1000 400 350 300 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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.T- Char.T 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1-1 65 50 65 40 65 1-2 65 65 2-1 65 65 65 2-2 65 64 65 3-1 65 65 40 3-2 30 40 65 Table 5.15 - Case 1d. Results for volumetric flow rate in bbl x 1000 per day from storage to charging tanks. 80
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 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 150 250 0 2 250 150 0 3 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
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
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
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) 15 days Number of Vessels Arrivals 3 Arrival Time Amount of Sulphur Content 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
(min.vol.5,000bbl) Tank 2 (min.vol.5,000 bbl) 350,000 bbl 200,000 bbl 0.03 Tank 3 (min.vol.5,000 bbl) 350,000 bbl 140,000 bbl 0.05 Number of Charging tanks 2 Charging Tanks Capacity Initial Oil Amount Range of Sulphur Content & Initial value Tank1 0.01-0.02 250,000 bbl 70,000 bbl (min.vol.15,000bbl) 0.0158 Tank2 0.035 0.045 250,000 bbl 190,000 bbl (min.vol.15,000bbl) 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 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
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 1 Day 1 Day 5 2 Day 6 Day 9 3 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 6 7 Vessel 1 550 510 510 475 250 0 Day 5 6 7 8 9 10 11 Vessel 2 550 540 475 250 0 Day 10 11 12 13 14 15 Vessel 3 550 500 250 0 Table 6.3 - Case 2. Vessel volume variation (bbl x 1000) results. 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
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). 600 Crude bbl x 1000 500 400 300 200 100 0 1 2 3 4 5 6 7 8 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
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. 300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
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 2 3 4 5 6 7 8 9 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 Vessel 1 40 0 35 225 250 Day 5 6 7 8 9 10 11 Vessel 2 10 65 225 250 Day 10 11 12 13 14 15 Vessel 3 50 250 250 Table 6.4 - Case 2. Results for volumetric flow rate (bbl x 1,000) per day from vessels to storage tanks. 89
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. storage to charging tanks. Stor.T- 1 2 3 4 5 6 7 8 Char.T 1-1 65 65 65 1-2 35 2-1 65 65 9.2 2-2 42 23.8 65 65 3-1 9.8 3-2 65 10.2 Table 6.5a - Case 2. Results for volumetric flow rate (bbl x 1,000) per day from Stor.T- 9 10 11 12 13 14 15 Char.T 1-1 65 65 1-2 26.6 29.4 2-1 65 35 2-2 65 3-1 5 3-2 65 49 Table 6.5b - 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
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 2 3 4 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 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 1 Day 1 550000 bbl 0.01 2 Day 5 550000 bbl 0.03 3 Day 11 550000 bbl 0.05 Table 6.6 - Case 2a. First change of arriving schedule. 91
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 1 Day 1 Day 4 2 Day 7 Day 10 3 Day 11 Day 13 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 days and for vessel 3 is three days. Crude bbl x 1000 500 450 400 350 300 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
Crude bbl x 1000 84 82 80 78 76 74 72 70 1 2 3 4 5 6 7 8 9 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 1 2 3 4 5 6 7 Vessel 1 34.15 40.85 225 250 Day 5 6 7 8 9 10 11 Vessel 2 15 65 220 250 Day 10 11 12 13 14 15 Vessel 3 50 250 250 Table 6.8 - Case 2a. Results for volumetric flow rate (bbl x 1000) per day from vessels to storage tanks. 94
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 2 3 4 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 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
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 1 Day 1 Day 5 2 Day 6 Day 9 3 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. 600 Crude bbl x 1000 500 400 300 200 100 0 1 2 3 4 5 6 7 8 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
300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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 2 3 4 5 6 7 8 9 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
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 1 24 65 0 211 250 2 10 65 225 250 3 50 250 250 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
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 1 Day 1 Day 5 2 Day 6 Day 9 3 Day 10 Day 12 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. 600 Crude bbl x 1000 500 400 300 200 100 0 1 2 3 4 5 6 7 8 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
300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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. 100 Crude bbl x 1000 80 60 40 20 0 1 2 3 4 5 6 7 8 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
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 option d 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 Case 4 Equations and constraints 1,682 1,682 1,682 1,683 Single variables 863 863 863 863 Discrete variables 261 261 261 261 Iterations 886,901 502,694 4,631,527 1,151,095 Solving time 117.9 min. 112.7 min. 571.8 min. 208.7 min. Table 6.12 Resource summary used to solves cases. 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
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
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
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 1 Day 1 Day 2 2 Day 6 Day 7 3 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. Crude bbl x 1000 400 350 300 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
350 300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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 300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
Crude bbl x 1000 350 300 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
Crude bbl x 1000 84 82 80 78 76 74 72 70 1 2 3 4 5 6 7 8 9 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. 100 Crude bbl x 1000 80 60 40 20 0 1 2 3 4 5 6 7 8 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
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 1 150 250 2 150 250 3 150 250 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 2 3 4 5 6 7 8 1-1 65 65 65 61.8 1-2 36.4 3.35 2-1 65 28.5 65 54.2 2-2 65 36.5 3-1 6.5 3-2 65 17.75 Table 7.3a - Case 5. Results for volumetric flow rate (bbl x 1,000) per day from storage to charging tanks. 108
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 4 5 6 7 8 1-1 65 65 65 51 1-2 36.4 10.5 2-1 65 32.3 65 65 2-2 65 32.7 3-1 2.7 3-2 65 64.4 Table 7.4a - Case 6. Results for volumetric flow rate (bbl x 1000) per day from storage to charging tanks. Stor.T-Char.T 9 10 11 12 13 14 15 1-1 65 44.5 1-2 10.34 12.26 2-1 65 65 2-2 65 65 3-1 6.5 3-2 2.9 65 25.5 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
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 2 3 4 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 7.7 - Case 5. Crude oil sulphur content variation in charging tanks. 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 2 3 4 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 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
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
Each 300,000 charging 256,000 260,000 263,000 268,000 bbl tank bbl bbl bbl bbl (case 6) capacity. Total optimal operational US$ 337,643.0 US$ 336,818.5 US$ 336,476.1 US$ 331,152.1 US$ 329,186.0. cost CDU total feed 1,210,000 bbl 1,226,000 bbl 1,230,000 bbl 1,230,000 bbl 1,230,000 bbl Iterations 374,925 512,643 547,655 322,055 350,904 Software 8,609.8sec 10,199.8sec 10,361sec 7,780.7sec 7,530.5sec time spent (143 min) (170min) (173min) (129.7min) (125.5min) running 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 (PUMPCAP i )? 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
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
Crude bbl x 1000 400 350 300 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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. 300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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
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
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
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. 600 Crude bbl x 1000 500 400 300 200 100 0 1 2 3 4 5 6 7 8 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
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. 300 Crude bbl x 1000 250 200 150 100 50 0 1 2 3 4 5 6 7 8 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 2 3 4 5 6 7 8 9 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
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 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 50 250 250 2 50 250 250 3 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
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. Each storage tank capacity. 450,000 bbl 500,000 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
Case 5 Case 6 Case 7 Case 8 Equations and constraints 1,682 1,682 1,682 1,682 Single variables 863 863 863 863 Discrete variables 261 261 261 261 Iterations 319,829 350,904 490,517 1,561,413 Solving time 130.1 min. 125.5 min. 152.3 min. 293.4 min. Table 7.12 Resource summary used to solves cases. 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
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
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
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
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:255-270. 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. Mixed- Integer 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
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:39-76. 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
APENDIX A A.1 Example 1 Computer hardcopy output MODEL STATISTICS BLOCKS OF EQUATIONS 40 SINGLE EQUATIONS 552 BLOCKS OF VARIABLES 20 SINGLE VARIABLES 337 NON ZERO ELEMENTS 1445 DISCRETE VARIABLES 116 GENERATION TIME = 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 S U M M A R Y MODEL SCHEDULING OBJECTIVE CO TYPE MIP DIRECTION MINIMIZE SOLVER OSL FROM LINE 443 **** SOLVER STATUS 1 NORMAL COMPLETION **** MODEL STATUS 8 INTEGER SOLUTION **** OBJECTIVE VALUE 206.9500 RESOURCE USAGE, LIMIT 5.398 20000.000 ITERATION COUNT, LIMIT 4393 1000000000 OSL Release 2, 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 -- 10.00 Mb Work space requested by solver -- 0.61 Mb OSL step: Reading data 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 0.01 Seconds Size reduction: rows : 552 (old) 354 (new) columns : 337 (old) 337 (new) nonzeroes: 1445 (old) 1013 (new) 127
OSL step: Crash Crash option : 1 OSL step: Primal Simplex Status: Successful (optimal) Iterations: 309 Objective : 73.7155 OSL step: Branch&Bound Status: Interrupt Iterations: 4079 Nodes : 366 Objective : 206.9500 OSL step: Postsolve 0.00 Seconds 0.13 Seconds 5.06 Seconds 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: 5 Objective : 206.9500 Relaxed optimum objective value: 73.715476 Bound on best integer solution: 189.91861 Objective value of this solution: 206.95000 Relative gap:.08968 Absolute gap: 17.031385 Optcr :.10000 Optca: 0.0 **** REPORT SUMMARY : 0 NONOPT 0 INFEASIBLE 0 UNBOUNDED ÀAMS 2.25.089 DOS Extended/C 08/15/03 23:39:16 PAGE 71 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 ---- 445 VARIABLE TF.L vessel v unloading initiation time 1 2.000, 2 7.000 ---- 445 VARIABLE TL.L vessel v unloading completion and departure time 1 3.000, 2 8.000 ---- 445 VARIABLE VV.L volume of crude oil in crude vessel v at time t 128
7 1 2 3 5 6 1 100.000 100.000 50.000 2 100.000 100.000 100.000 + 8 2 50.000 ---- 445 VARIABLE VS.L volume of crude oil in storage tank i at time t 8 1 2 3 4 5 1 25.000 5.000 15.000 25.000 15.000 2 75.000 45.000 35.000 35.000 35.000 10.000 ---- 445 VARIABLE VB.L volume of crude oil in charging tank j at time t 6 1 2 3 4 5 1 50.000 50.000 90.000 100.000 80.000 2 50.000 100.000 50.000 10.000 50.000 + 7 8 1 70.000 60.000 2 50.000 90.000 ÀAMS 2.25.089 DOS Extended/C 08/15/03 23:39:16 PAGE 72 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 ---- 445 VARIABLE XF.L 0-1 variable to denote if vessel v starts unloading at time t 2 7 1 1.000 2 1.000 129
---- 445 VARIABLE XL.L 0-1 variable to denote if vessel v completes unloading at time t 3 8 1 1.000 2 1.000 ---- 445 VARIABLE XW.L 0-1 variable to denote if vessel v is unloading its crude oil at time t 2 3 7 8 1 1.000 1.000 2 1.000 1.000 ---- 445 VARIABLE VKB.L volume of component k in charging tank j at time t 6 1 2 3 4 5 1 1.000 1.000 1.400 1.500 1.200 2 2.500 4.500 2.250 0.450 2.250 + 7 8 1 1.050 0.900 2 2.250 4.650 ---- 445 VARIABLE FVS.L volumetric flow rate from vessel v to storage tank i at time t 2 3 7 8 1.1 50.000 50.000 2.2 50.000 50.000 ---- 445 VARIABLE FSB.L volumetric flow rate from storage tank i to charging tank j at time t 7 1 2 3 4 5 1.1 40.000 40.000 10.000 1.2 20.000 15.000 2.1 10.000 130
2.2 30.000 35.000 40.000 ---- 445 VARIABLE FBC.L volumetric flow rate from charging tank j to CDU l at time t 6 1 2 3 4 5 1.1 50.000 20.000 10.000 2.1 50.000 40.000 10.000 + 7 8 1.1 10.000 10.000 ÀAMS 2.25.089 DOS Extended/C 08/15/03 23:39:16 PAGE 74 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 ---- 445 VARIABLE Z.L 0-1 variable to denote transition from 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
BLOCKS OF VARIABLES 20 SINGLE VARIABLES 1138 NON ZERO ELEMENTS 5018 DISCRETE VARIABLES 396 GENERATION TIME = 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 S U M M A R Y MODEL SCHEDULING OBJECTIVE CO TYPE MIP DIRECTION MINIMIZE SOLVER OSL FROM LINE 463 **** SOLVER STATUS 1 NORMAL COMPLETION **** MODEL STATUS 8 INTEGER SOLUTION **** OBJECTIVE VALUE 331.7400 RESOURCE USAGE, LIMIT 6283.582 20000.000 ITERATION COUNT, LIMIT 1598388 1000000000 OSL Release 2, 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 -- 10.00 Mb Work space requested by solver -- 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 0.05 Seconds Size reduction: rows : 1807 (old) 1281 (new) columns : 1138 (old) 1138 (new) nonzeroes: 5018 (old) 3643 (new) OSL step: Crash Crash option : 1 OSL step: Primal Simplex Status: Successful (optimal) Iterations: 698 Objective : 104.2389 0.02 Seconds 1.06 Seconds OSL step: Branch&Bound 6282.19 Seconds 132
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: 6 Objective : 331.7400 Relaxed optimum objective value: 104.23889 Bound on best integer solution: 301.63589 Objective value of this solution: 331.74000 Relative gap:.09980 Absolute gap: 30.104111 Optcr :.10000 Optca: 0.0 **** REPORT SUMMARY : 0 NONOPT 0 INFEASIBLE 0 UNBOUNDED ÀAMS 2.25.089 DOS Extended/C 08/16/03 11:09:38 PAGE 119 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 TF.L vessel v unloading initiation time 1 1.000, 2 4.000, 3 8.000 ---- 465 VARIABLE TL.L vessel v unloading completion and departure time 1 2.000, 2 5.000, 3 9.000 ---- 465 VARIABLE VV.L volume of crude oil in crude vessel v at time t 8 1 2 4 5 7 1 100.000 50.000 2 100.000 50.000 3 100.000 100.000 133
+ 9 3 50.000 ---- 465 VARIABLE VS.L volume of crude oil in storage tank i at time t 6 1 2 3 4 5 1 20.000 39.950 89.950 82.100 82.100 82.100 2 50.000 10.050 10.050 50.000 100.000 3 70.000 70.000 70.000 21.900 21.900 21.900 + 7 8 9 10 1 69.200 69.200 69.200 69.200 2 90.800 90.800 90.800 90.800 3 50.000 100.000 ---- 465 VARIABLE VB.L volume of crude oil in charging tank j at time t 6 1 2 3 4 5 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 VB.L volume of crude oil in charging tank j at time t + 7 8 9 2 44.000 24.000 4.000 3 16.000 8.000 4.000 ---- 465 VARIABLE XF.L 0-1 variable to denote if vessel v starts unloading at time t 134
1 4 8 1 1.000 2 1.000 3 1.000 ---- 465 VARIABLE XL.L 0-1 variable to denote if vessel v completes unloading at time t 2 5 9 1 1.000 2 1.000 3 1.000 ---- 465 VARIABLE XW.L 0-1 variable to denote if vessel v is unloading its crude oil at time t 9 1 2 4 5 8 1 1.000 1.000 2 1.000 1.000 3 1.000 1.000 ---- 465 VARIABLE VKB.L volume of component k in charging tank j at time t 6 1 2 3 4 5 1.1 0.501 2.000 1.600 1.200 0.800 0.400 1.2 0.999 3.000 2.400 1.800 1.200 0.600 2.1 1.500 0.800 0.300 2.2 1.150 0.610 0.250 3.1 1.299 0.400 0.400 3.185 2.385 1.585 3.2 0.399 0.180 0.180 1.176 0.976 0.616 ÀAMS 2.25.089 DOS Extended/C 08/16/03 11:09:38 PAGE 121 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 465 VARIABLE VKB.L volume of component k in charging at time t 135
+ 7 8 9 2.1 1.500 0.800 0.100 2.2 0.919 0.432 0.072 3.1 0.768 0.384 0.192 3.2 0.256 0.112 0.072 ---- 465 VARIABLE FVS.L volumetric flow rate from vessel v to storage tank i at time t 9 1 2 4 5 8 1.1 50.000 50.000 2.2 50.000 50.000 3.3 50.000 50.000 ---- 465 VARIABLE FSB.L volumetric flow rate from storage tank i to charging tank j at time t 1 3 6 1.1 30.050 1.2 12.900 1.3 7.850 2.1 39.950 2.2 9.200 2.3 10.050 3.2 21.900 3.3 48.100 ---- 465 VARIABLE FBC.L volumetric flow rate from charging tank j to CDU l at time t 6 1 2 3 4 5 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
465 VARIABLE FBC.L volumetric flow rate from charging tank j to CDU l at time t + 7 8 9 10 2.2 20.000 20.000 4.000 6.000 3.1 8.000 4.000 4.000 4.000 ---- 465 VARIABLE Z.L 0-1 variable to denote transition from 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 47 SINGLE EQUATIONS 2991 BLOCKS OF VARIABLES 23 SINGLE VARIABLES 1399 NON ZERO ELEMENTS 7760 DISCRETE VARIABLES 582 GENERATION TIME = 0.230 SECONDS 137
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 S U M M A R Y MODEL SCHEDULING OBJECTIVE CO TYPE MIP DIRECTION MINIMIZE SOLVER OSL FROM LINE 530 **** SOLVER STATUS 1 NORMAL COMPLETION **** MODEL STATUS 8 INTEGER SOLUTION **** OBJECTIVE VALUE 248.6400 RESOURCE USAGE, LIMIT 18113.945 200000.000 ITERATION COUNT, LIMIT 4236122 1000000000 OSL Release 2, 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 -- 10.00 Mb Work space requested by solver -- 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 0.07 Seconds Size reduction: rows : 2991 (old) 2296 (new) columns : 1399 (old) 1399 (new) nonzeroes: 7760 (old) 6132 (new) OSL step: Crash Crash option : 1 OSL step: Primal Simplex Status: Successful (optimal) Iterations: 816 Objective : 107.6704 0.02 Seconds 1.70 Seconds OSL step: Branch&Bound Status: Interrupt Iterations: 4235306 Nodes : 87253 Objective : 248.6400 OSL step: Postsolve 18111.19 Seconds 0.40 Seconds 138
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: 0 Objective : 248.6400 Relaxed optimum objective value: 107.67042 Bound on best integer solution: 226.06606 Objective value of this solution: 248.64000 Relative gap:.09986 Absolute gap: 22.573941 Optcr :.10000 Optca: 0.0 **** REPORT SUMMARY : 0 NONOPT 0 INFEASIBLE 0 UNBOUNDED ÀAMS 2.25.089 DOS Extended/C 08/16/03 22:22:43 PAGE 158 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 TF.L vessel v unloading initiation time 1 1.000, 2 5.000, 3 9.000 ---- 532 VARIABLE TL.L vessel v unloading completion and departure time 1 2.000, 2 6.000, 3 10.000 ---- 532 VARIABLE VV.L volume of crude oil in crude vessel v at time t 10 1 2 5 6 9 1 50.000 25.000 2 50.000 25.000 3 50.000 25.000 ---- 532 VARIABLE VS.L volume of crude oil in storage tank i at time t 139
6 1 2 3 4 5 1 20.000 45.000 70.000 57.000 57.000 57.000 2 20.000 20.000 20.000 20.000 20.000 20.000 3 20.000 20.000 20.000 15.000 15.000 40.000 + 7 8 9 10 11 12 1 57.000 57.000 54.375 54.375 54.375 54.375 2 20.000 20.000 20.000 20.000 45.000 45.000 3 65.000 65.000 53.625 78.625 78.625 78.625 ---- 532 VARIABLE VB.L volume of crude oil in charging tank j at time t 6 1 2 3 4 5 1 30.000 30.000 30.000 48.000 38.000 28.000 2 50.000 40.000 30.000 20.000 10.000 6.000 3 30.000 20.000 10.000 + 7 8 9 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 XF.L 0-1 variable to denote if vessel v starts unloading at time t 1 5 9 1 1.000 2 1.000 3 1.000 ---- 532 VARIABLE XL.L 0-1 variable to denote if vessel v 140
2 6 10 1 1.000 2 1.000 3 1.000 completes unloading at time t ---- 532 VARIABLE XW.L 0-1 variable to denote if vessel v is unloading its crude oil at time t 10 1 2 5 6 9 1 1.000 1.000 2 1.000 1.000 3 1.000 1.000 ---- 532 VARIABLE VKS.L volume of component k in storage tank i at time t 6 1 2 3 4 5 1 0.400 0.650 0.900 0.770 0.770 0.770 2 1.000 1.000 1.000 1.000 1.000 1.000 3 1.600 1.600 1.600 1.150 1.150 3.275 + 7 8 9 10 11 12 1 0.770 0.770 0.744 0.744 0.744 0.744 2 1.000 1.000 1.000 1.000 2.500 2.500 3 5.400 5.400 4.376 5.876 5.876 5.876 ÀAMS 2.25.089 DOS Extended/C 08/16/03 22:22:43 PAGE 160 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 VKB.L volume of component k in charging tank j at time t 6 1 2 3 4 5 141
1 0.900 0.900 0.900 1.480 1.130 0.880 2 2.500 2.000 1.550 0.900 0.450 0.270 3 2.400 1.550 0.800 + 7 8 9 10 11 1 0.530 0.280 0.210 0.140 0.070 2 0.180 0.090 3 1.050 0.300 0.150 ---- 532 VARIABLE FVS.L volumetric flow rate from vessel v to storage tank i at time t 10 1 2 5 6 9 1.1 25.000 25.000 2.3 25.000 25.000 3.2 25.000 3.3 25.000 ---- 532 VARIABLE FSB.L volumetric flow rate from storage tank i to charging tank j at time t 3 8 1.1 13.000 1.3 2.625 3.1 5.000 3.3 11.375 ---- 532 VARIABLE FBC.L volumetric flow rate from charging tank j to CDU l at time t 6 1 2 3 4 5 1.2 10.000 10.000 10.000 2.1 10.000 10.000 10.000 10.000 4.000 2.000 3.2 10.000 10.000 10.000 + 7 8 9 10 11 12 1.2 10.000 2.000 2.000 2.000 2.000 2.000 142
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 ---- 532 VARIABLE Z.L 0-1 variable to denote transition from 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 S U M M A R Y MODEL SCHEDULING OBJECTIVE CO TYPE MIP DIRECTION MINIMIZE SOLVER OSL FROM LINE 460 143
**** SOLVER STATUS 1 NORMAL COMPLETION **** MODEL STATUS 8 INTEGER SOLUTION **** OBJECTIVE VALUE 338.9642 RESOURCE USAGE, LIMIT 1913.820 20000.000 ITERATION COUNT, LIMIT 397133 1000000000 OSL Release 2, 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 -- 10.00 Mb Work space requested by solver -- 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 0.02 Seconds Size reduction: rows : 1682 (old) 1021 (new) columns : 863 (old) 863 (new) nonzeroes: 4779 (old) 3197 (new) OSL step: Crash Crash option : 1 OSL step: Primal Simplex Status: Successful (optimal) Iterations: 650 Objective : 78.3530 0.01 Seconds 0.51 Seconds 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: 3 Objective : 338.9642 Relaxed optimum objective value: 78.353009 Bound on best integer solution: 308.17602 144
Objective value of this solution: 338.96425 Relative gap:.09990 Absolute gap: 30.788228 Optcr :.10000 Optca: 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 ---- 462 VARIABLE TF.L vessel v unloading initiation time 1 1.000, 2 6.000, 3 11.000 ---- 462 VARIABLE TL.L vessel v unloading completion and departure time 1 2.000, 2 7.000, 3 12.000 ---- 462 VARIABLE VV.L volume of crude oil in crude vessel v at time t 11 1 2 6 7 10 1 400.000 250.000 2 400.000 250.000 3 400.000 400.000 + 12 3 250.000 ---- 462 VARIABLE VS.L volume of crude oil in storage tank i at time t 6 1 2 3 4 5 1 30.000 115.000 316.500 291.000 291.000 291.000 2 200.000 135.000 135.000 70.000 5.000 5.000 3 140.000 138.500 138.500 73.500 70.000 70.000 145
+ 7 8 9 10 11 12 1 226.000 161.000 161.000 142.250 142.250 142.250 2 90.000 300.000 300.000 235.000 198.750 198.750 3 70.000 70.000 70.000 5.000 5.000 105.000 + 13 14 15 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 VB.L volume of crude oil in charging tank j at time t 6 1 2 3 4 5 1 70.000 201.500 250.000 168.000 90.000 15.000 2 190.000 108.000 26.000 181.500 250.000 250.000 + 7 8 9 10 11 12 1 145.000 250.000 250.000 168.000 90.000 15.000 2 168.000 90.000 15.000 163.750 200.000 250.000 + 13 14 15 1 150.000 250.000 250.000 2 168.000 90.000 15.000 ---- 462 VARIABLE XF.L 0-1 variable to denote if vessel v starts unloading at time t 1 6 11 1 1.000 2 1.000 3 1.000 146
---- 462 VARIABLE XL.L 0-1 variable to denote if vessel v completes unloading at time t 2 7 12 1 1.000 2 1.000 3 1.000 ---- 462 VARIABLE XW.L 0-1 variable to denote if vessel v is unloading its crude oil at time t 12 1 2 6 7 11 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 ---- 462 VARIABLE VKB.L volume of component k in charging tank j at time t 6 1 2 3 4 5 1 1.106 3.781 4.266 2.626 1.066 0.150 2 7.391 4.040 1.170 6.625 8.750 8.750 + 7 8 9 10 11 12 1 2.750 4.600 4.600 2.960 1.650 0.150 2 5.880 3.150 0.525 5.912 7.000 9.500 + 13 14 15 1 3.000 5.000 5.000 2 6.630 3.900 0.675 GAMS 2.25.089 DOS Extended/C 07/29/03 22:21:40 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 147
---- 462 VARIABLE FVS.L volumetric flow rate from vessel v to storage tank i at time t 12 1 2 6 7 11 1.1 150.000 250.000 2.2 150.000 250.000 3.3 150.000 250.000 ---- 462 VARIABLE FSB.L volumetric flow rate from storage tank i to charging tank j at time t 7 1 2 3 4 6 1.1 65.000 48.500 65.000 65.000 1.2 25.500 2.1 65.000 65.000 40.000 2.2 65.000 65.000 3.1 1.500 3.2 65.000 3.500 + 9 10 11 12 13 1.1 65.000 50.000 1.2 18.750 2.1 65.000 50.000 2.2 65.000 36.250 3.1 5.000 3.2 65.000 50.000 ---- 462 VARIABLE FBC.L volumetric flow rate from charging tank j to CDU l at time t 6 1 2 3 4 5 1.1 82.000 78.000 75.000 2.1 82.000 82.000 82.000 + 7 8 9 10 11 12 1.1 82.000 78.000 75.000 2.1 78.000 75.000 82.000 148
+ 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 D.L 0-1 variable to denote if the crude oil blended j charges CDU l at time t 6 1 2 3 4 5 1.1 1.000 1.000 1.000 2.1 1.000 1.000 1.000 + 7 8 9 10 11 12 1.1 1.000 1.000 1.000 2.1 1.000 1.000 1.000 + 13 14 15 2.1 1.000 1.000 1.000 ---- 462 VARIABLE Z.L 0-1 variable to denote transition from 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 07/29/03 22:21:40 PAGE 115 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 CDU l 462 VARIABLE Z.L 0-1 variable to denote transition crude blended j to y at time t in INDEX 1 = 2 3 9 149
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 S U M M A R Y MODEL SCHEDULING OBJECTIVE CO TYPE MIP DIRECTION MINIMIZE SOLVER OSL FROM LINE 458 **** SOLVER STATUS 1 NORMAL COMPLETION **** MODEL STATUS 8 INTEGER SOLUTION **** OBJECTIVE VALUE 450.8241 RESOURCE USAGE, LIMIT 11438.500 160000.000 ITERATION COUNT, LIMIT 886901 900000000 OSL Release 2, 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 -- 10.00 Mb Work space requested by solver -- 1.56 Mb OSL step: Reading data 0.05 Seconds OSL step: Scale 0.02 Seconds Range of matrix coeffients: before scaling : 0.0025-250.0000 150
after scaling : 0.0251-1.0000 OSL step: Presolve 0.07 Seconds Size reduction: rows : 1682 (old) 1021 (new) columns : 863 (old) 863 (new) nonzeroes: 4779 (old) 3197 (new) OSL step: Crash Crash option : 1 OSL step: Primal Simplex Status: Successful (optimal) Iterations: 624 Objective : 87.0352 0.01 Seconds 1.04 Seconds OSL step: Branch&Bound Status: Interrupt Iterations: 886272 Nodes : 61981 Objective : 450.8241 OSL step: Postsolve 11436.02 Seconds 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: 5 Objective : 450.8241 Relaxed optimum objective value: 87.035176 Bound on best integer solution: 419.70283 Objective value of this solution: 450.82410 Relative gap:.07415 Absolute gap: 31.121275 Optcr :.10000 Optca: 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 ---- 460 VARIABLE TF.L vessel v unloading initiation time 1 1.000, 2 6.000, 3 10.000 ---- 460 VARIABLE TL.L vessel v unloading completion and departure time 1 5.000, 2 9.000, 3 12.000 151
---- 460 VARIABLE VV.L volume of crude oil in crude vessel v at time t 6 1 2 3 4 5 1 550.000 510.000 510.000 475.000 250.000 2 550.000 + 7 8 9 10 11 12 2 540.000 475.000 250.000 3 550.000 500.000 250.000 ---- 460 VARIABLE VS.L volume of crude oil in storage tank i at time t 6 1 2 3 4 5 1 30.000 5.000 5.000 5.000 165.000 350.000 2 200.000 135.000 93.000 93.000 28.000 18.800 3 140.000 130.200 65.200 65.200 65.200 65.200 + 7 8 9 10 11 12 1 350.000 350.000 350.000 285.000 220.000 220.000 2 5.000 5.000 165.000 350.000 315.000 315.000 3 55.000 55.000 55.000 50.000 100.000 350.000 + 13 14 15 1 193.400 164.000 164.000 2 250.000 250.000 250.000 3 535.000 486.000 486.000 GAMS 2.25.089 DOS Extended/C 07/30/03 00:47: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 152
---- 460 VARIABLE VB.L volume of crude oil in charging tank j at time t 6 1 2 3 4 5 1 70.000 209.800 127.800 45.800 175.800 250.000 2 190.000 108.000 215.000 250.000 168.000 86.000 + 7 8 9 10 11 12 1 168.000 90.000 15.000 150.000 250.000 250.000 2 120.000 185.000 250.000 168.000 90.000 15.000 + 13 14 15 1 168.000 90.000 15.000 2 171.600 250.000 250.000 ---- 460 VARIABLE XF.L 0-1 variable to denote if vessel v starts unloading at time t 1 6 10 1 1.000 2 1.000 3 1.000 ---- 460 VARIABLE XL.L 0-1 variable to denote if vessel v completes unloading at time t 5 9 12 1 1.000 2 1.000 3 1.000 ---- 460 VARIABLE XW.L 0-1 variable to denote if vessel v is unloading its crude oil at time t 7 1 3 4 5 6 1 1.000 1.000 1.000 1.000 2 1.000 1.000 153
GAMS 2.25.089 DOS Extended/C 07/30/03 00:47: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 v is 460 VARIABLE XW.L 0-1 variable to denote if vessel unloading its crude oil at time t + 8 9 10 11 12 2 1.000 1.000 3 1.000 1.000 1.000 ---- 460 VARIABLE VKB.L volume of component k in charging tank j at time t 6 1 2 3 4 5 1 1.106 4.196 2.556 0.916 3.516 4.442 2 7.391 4.521 9.031 9.381 6.511 3.641 + 7 8 9 10 11 12 1 2.802 1.650 0.150 3.000 4.700 4.700 2 4.865 6.815 8.765 5.895 3.165 0.540 + 13 14 15 1 3.060 1.500 0.150 2 6.006 8.750 8.750 ---- 460 VARIABLE FVS.L volumetric flow rate from vessel v to storage tank i at time t 7 1 3 4 5 6 1.1 40.000 35.000 225.000 250.000 2.2 10.000 65.000 + 8 9 10 11 12 2.2 225.000 250.000 3.3 50.000 250.000 250.000 154
---- 460 VARIABLE FSB.L volumetric flow rate from storage tank i to charging tank j at time t 6 1 2 3 4 5 1.1 65.000 65.000 65.000 1.2 35.000 2.1 65.000 65.000 9.200 2.2 42.000 23.800 3.1 9.800 3.2 65.000 10.200 + 7 8 9 10 12 13 1.1 65.000 65.000 1.2 26.600 29.400 2.1 65.000 35.000 2.2 65.000 65.000 65.000 3.1 5.000 3.2 65.000 49.000 GAMS 2.25.089 DOS Extended/C 07/30/03 00:47: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 ---- 460 VARIABLE FBC.L volumetric flow rate from charging tank j to CDU l at time t 6 1 2 3 4 5 1.1 82.000 82.000 82.000 2.1 82.000 82.000 82.000 + 7 8 9 10 11 12 1.1 78.000 75.000 82.000 2.1 82.000 78.000 75.000 + 13 14 15 1.1 78.000 75.000 82.000 155
---- 460 VARIABLE D.L 0-1 variable to denote if the crude oil blended j charges CDU l at time t 6 1 2 3 4 5 1.1 1.000 1.000 1.000 2.1 1.000 1.000 1.000 + 7 8 9 10 11 12 1.1 1.000 1.000 1.000 2.1 1.000 1.000 1.000 + 13 14 15 1.1 1.000 1.000 1.000 ---- 460 VARIABLE Z.L 0-1 variable to denote transition from crude blended j to y at time t in CDU l INDEX 1 = 1 4 9 2.1 1.000 1.000 INDEX 1 = 2 2 6 12 1.1 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
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 S U M M A R Y MODEL SCHEDULING OBJECTIVE CO TYPE MIP DIRECTION MINIMIZE SOLVER OSL FROM LINE 460 **** SOLVER STATUS 1 NORMAL COMPLETION **** MODEL STATUS 8 INTEGER SOLUTION **** OBJECTIVE VALUE 809.9055 RESOURCE USAGE, LIMIT 34308.601 200000.000 ITERATION COUNT, LIMIT 4631527 900000000 OSL Release 2, 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 -- 10.00 Mb Work space requested by solver -- 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 0.04 Seconds Size reduction: rows : 1682 (old) 1021 (new) columns : 863 (old) 863 (new) nonzeroes: 4779 (old) 3197 (new) OSL step: Crash Crash option : 1 OSL step: Primal Simplex Status: Successful (optimal) Iterations: 597 Objective : 267.0352 0.01 Seconds 1.19 Seconds OSL step: Branch&Bound Status: Interrupt Iterations: 4630923 Nodes : 361178 Objective : 809.9055 34306.05 Seconds 157
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: 7 Objective : 809.9055 Relaxed optimum objective value: 267.03518 Bound on best integer solution: 736.29773 Objective value of this solution: 809.90550 Relative gap:.09997 Absolute gap: 73.607773 Optcr :.10000 Optca: 10.000000 GAMS 2.25.089 DOS Extended/C 07/30/03 01:13:21 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 ---- 462 VARIABLE TF.L vessel v unloading initiation time 1 1.000, 2 6.000, 3 10.000 ---- 462 VARIABLE TL.L vessel v unloading completion and departure time 1 5.000, 2 9.000, 3 12.000 ---- 462 VARIABLE VV.L volume of crude oil in crude vessel v at time t 6 1 2 3 4 5 1 550.000 526.000 461.000 461.000 250.000 2 550.000 + 7 8 9 10 11 12 2 540.000 475.000 250.000 3 550.000 500.000 250.000 158
---- 462 VARIABLE VS.L volume of crude oil in storage tank i at time t 6 1 2 3 4 5 1 30.000 5.000 5.000 5.000 165.000 350.000 2 200.000 135.000 134.000 69.000 62.000 5.000 3 140.000 140.000 140.000 75.000 39.000 39.000 + 7 8 9 10 11 12 1 318.000 318.000 318.000 253.000 219.000 219.000 2 5.000 5.000 165.000 350.000 350.000 350.000 3 39.000 5.000 5.000 5.000 55.000 305.000 + 13 14 15 1 193.000 193.000 193.000 2 285.000 225.750 225.750 3 490.000 470.250 470.250 GAMS 2.25.089 DOS Extended/C 07/30/03 01:13:21 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 VB.L volume of crude oil in charging tank j at time t 6 1 2 3 4 5 1 70.000 184.000 250.000 168.000 86.000 208.000 2 190.000 108.000 26.000 156.000 250.000 168.000 + 7 8 9 10 11 12 1 250.000 168.000 86.000 216.000 250.000 250.000 2 86.000 185.000 250.000 168.000 90.000 15.000 + 13 14 15 159
1 168.000 90.000 15.000 2 171.000 250.000 250.000 ---- 462 VARIABLE XF.L 0-1 variable to denote if vessel v starts unloading at time t 1 6 10 1 1.000 2 1.000 3 1.000 ---- 462 VARIABLE XL.L 0-1 variable to denote if vessel v completes unloading at time t 5 9 12 1 1.000 2 1.000 3 1.000 ---- 462 VARIABLE XW.L 0-1 variable to denote if vessel v is unloading its crude oil at time t 7 1 2 4 5 6 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 v is 462 VARIABLE XW.L 0-1 variable to denote if vessel unloading its crude oil at time t + 8 9 10 11 12 2 1.000 1.000 3 1.000 1.000 1.000 ---- 462 VARIABLE VKB.L volume of component k in charging tank j at time t 6 1 2 3 4 5 160
1 1.106 3.546 4.226 2.586 0.946 3.306 2 7.391 4.040 1.170 6.370 8.890 6.020 + 7 8 9 10 11 12 1 3.926 2.730 1.090 3.690 4.030 4.030 2 3.150 6.800 8.750 5.880 3.150 0.525 + 13 14 15 1 3.210 1.650 0.150 2 5.985 8.750 8.750 GAMS 2.25.089 DOS Extended/C 07/30/03 01:13:21 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 ---- 462 VARIABLE FVS.L volumetric flow rate from vessel v to storage tank i at time t 7 1 2 4 5 6 1.1 24.000 65.000 211.000 250.000 2.2 10.000 65.000 + 8 9 10 11 12 2.2 225.000 250.000 3.3 50.000 250.000 250.000 ---- 462 VARIABLE FSB.L volumetric flow rate from storage tank i to charging tank j at time t 6 1 2 3 4 5 1.1 49.000 65.000 65.000 32.000 1.2 51.000 2.1 65.000 1.000 57.000 10.000 2.2 65.000 7.000 3.2 65.000 36.000 161
+ 7 8 9 10 12 13 1.1 65.000 34.000 1.2 26.000 2.1 65.000 2.2 65.000 65.000 65.000 59.250 3.2 34.000 65.000 19.750 ---- 462 VARIABLE FBC.L volumetric flow rate from charging tank j to CDU l at time t 6 1 2 3 4 5 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 462 VARIABLE FBC.L volumetric flow rate from charging tank j to CDU l at time t + 7 8 9 10 11 12 1.1 82.000 82.000 82.000 2.1 82.000 78.000 75.000 + 13 14 15 1.1 78.000 75.000 75.000 ---- 462 VARIABLE D.L 0-1 variable to denote if the crude oil blended j charges CDU l at time t 6 1 2 3 4 5 1.1 1.000 1.000 2.1 1.000 1.000 1.000 1.000 + 7 8 9 10 11 12 162
1.1 1.000 1.000 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 07/30/03 01:13:21 PAGE 115 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 Z.L 0-1 variable to denote transition from crude blended j to y at time t in CDU l INDEX 1 = 1 5 9 2.1 1.000 1.000 INDEX 1 = 2 3 7 12 1.1 1.000 1.000 1.000 EXECUTION TIME = 19.730 SECONDS VERID WAT-25-089 USER: Linnhoff March Limited MW2 Academic License 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
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 S U M M A R Y MODEL SCHEDULING OBJECTIVE CO TYPE MIP DIRECTION MINIMIZE SOLVER OSL FROM LINE 460 **** SOLVER STATUS 1 NORMAL COMPLETION **** MODEL STATUS 8 INTEGER SOLUTION **** OBJECTIVE VALUE 329.1860 RESOURCE USAGE, LIMIT 7532.652 120000.000 ITERATION COUNT, LIMIT 350904 900000000 OSL Release 2, 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 -- 10.00 Mb Work space requested by solver -- 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 0.05 Seconds Size reduction: rows : 1682 (old) 1021 (new) columns : 863 (old) 863 (new) nonzeroes: 4779 (old) 3197 (new) OSL step: Crash Crash option : 1 OSL step: Primal Simplex Status: Successful (optimal) Iterations: 650 Objective : 78.3530 0.01 Seconds 0.72 Seconds 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 Status: Successful (optimal) 0.94 Seconds 164
**** REPORT SUMMARY : 0 NONOPT 0 INFEASIBLE 0 UNBOUNDED GAMS 2.25.089 DOS Extended/C 07/31/03 08:53:26 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 ---- 462 VARIABLE TF.L vessel v unloading initiation time 1 1.000, 2 6.000, 3 10.000 ---- 462 VARIABLE TL.L vessel v unloading completion and departure time 1 2.000, 2 7.000, 3 11.000 ---- 462 VARIABLE VV.L volume of crude oil in crude vessel v at time t 11 1 2 6 7 10 1 400.000 250.000 2 400.000 250.000 3 400.000 250.000 ---- 462 VARIABLE VS.L volume of crude oil in storage tank i at time t 6 1 2 3 4 5 1 30.000 115.000 300.000 263.600 253.100 253.100 2 200.000 135.000 102.700 37.700 5.000 5.000 3 140.000 137.300 137.300 72.300 7.900 7.900 + 7 8 9 10 11 12 1 188.100 137.100 137.100 126.760 114.500 114.500 2 90.000 275.000 275.000 210.000 145.000 145.000 3 7.900 7.900 7.900 5.000 90.000 314.500 165
+ 13 14 15 1 49.500 5.000 5.000 2 80.000 15.000 15.000 3 308.000 308.000 308.000 ---- 462 VARIABLE VB.L volume of crude oil in charging tank j at time t 6 1 2 3 4 5 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 VB.L volume of crude oil in charging tank j at time t + 7 8 9 10 11 12 1 184.000 300.000 300.000 218.000 136.000 54.000 2 218.000 136.000 54.000 132.240 274.500 300.000 + 13 14 15 1 190.500 300.000 300.000 2 218.000 136.000 54.000 ---- 462 VARIABLE XF.L 0-1 variable to denote if vessel v starts unloading at time t 1 6 10 1 1.000 2 1.000 3 1.000 ---- 462 VARIABLE XL.L 0-1 variable to denote if vessel v completes unloading at time t 2 7 11 166
1 1.000 2 1.000 3 1.000 ---- 462 VARIABLE XW.L 0-1 variable to denote if vessel v is unloading its crude oil at time t 11 1 2 6 7 10 1 1.000 1.000 2 1.000 1.000 3 1.000 1.000 ---- 462 VARIABLE VKB.L volume of component k in charging tank j at time t 6 1 2 3 4 5 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 tank j 462 VARIABLE VKB.L volume of component k in charging at time t + 7 8 9 10 11 12 1 3.140 5.600 5.600 3.960 2.320 0.680 2 8.170 5.300 2.430 4.628 9.951 11.226 + 13 14 15 1 3.605 6.000 6.000 2 8.356 4.760 1.890 ---- 462 VARIABLE FVS.L volumetric flow rate from vessel v to storage tank i at time t 167
11 1 2 6 7 10 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 ---- 462 VARIABLE FSB.L volumetric flow rate from storage tank i to charging tank j at time t 7 1 2 3 4 6 1.1 65.000 65.000 65.000 51.000 1.2 36.400 10.500 2.1 65.000 32.300 65.000 65.000 2.2 65.000 32.700 3.1 2.700 3.2 65.000 64.400 + 9 10 11 12 13 1.1 65.000 44.500 1.2 10.340 12.260 2.1 65.000 65.000 2.2 65.000 65.000 3.1 6.500 3.2 2.900 65.000 25.500 ---- 462 VARIABLE FBC.L volumetric flow rate from charging tank j to CDU l at time t 6 1 2 3 4 5 1.1 82.000 82.000 82.000 2.1 82.000 82.000 82.000 + 7 8 9 10 11 12 1.1 82.000 82.000 82.000 2.1 82.000 82.000 82.000 168
+ 13 14 15 2.1 82.000 82.000 82.000 ---- 462 VARIABLE D.L 0-1 variable to denote if the crude oil blended j charges CDU l at time t 6 1 2 3 4 5 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 D.L 0-1 variable to denote if the crude oil blended j charges CDU l at time t + 7 8 9 10 11 12 1.1 1.000 1.000 1.000 2.1 1.000 1.000 1.000 + 13 14 15 2.1 1.000 1.000 1.000 ---- 462 VARIABLE Z.L 0-1 variable to denote transition from crude blended j to y at time t in CDU l INDEX 1 = 1 6 12 2.1 1.000 1.000 INDEX 1 = 2 3 9 1.1 1.000 1.000 EXECUTION TIME = 7.090 SECONDS VERID WAT-25-089 169
GAMS 2.25.089 DOS Extended/C 07/31/03 08:53:26 PAGE 115 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 USER: Linnhoff March Limited MW2 Academic License 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
/ 1 350 2 350 3 350 / VSmin (i) "storage tank minimum capacity" VBmax (j) / 1 5 2 5 3 5 / "charging tank maximum capacity" / 1 250 2 250/ VBmin (j) "charging tank minimum capacity" / 1 15 2 15 /; parameters CU(v) "unloading cost of vessel v per unit time interval" / 1 10 2 10 3 10 / CSEA(v) "sea waiting cost of vessel v per unit time interval" / 1 8 2 8 3 8 / CSINV(i) "inventory cost of storage tank i per unit time per unit volume" / 1 0.008 2 0.008 3 0.008 / CBINV(j) "inventory cost of charging tank j per unit time per unit volume" / 1 0.005 2 0.005/ 171
TARR(v) "crude oil vessel v arrival time around the docking station" / 1 1 2 6 3 10 / TLEA(v) "crude oil vessel v departure time around the docking station" / 1 6 2 10 3 15 / ES(i) "concentration component k in the crude oil of storage tank i" / 1 0.01 2 0.03 3 0.05 / EBmin(j) "minimum concentration component k in the crude oil mix of charging tank j" / 1 0.01 2 0.035 / charging tank j" EBmax(j) "maximum concentration component k in the crude oil mix of / 1 0.02 2 0.045 / DM(t) "demand of crude blended oil from CDU's per time interval" / 1 75 2 75 3 75 4 75 5 75 172
variables 6 75 7 75 8 75 9 75 10 75 11 75 12 75 13 75 14 75 15 75 / ; 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 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 XFF(v,m) transitory variable to search XF XLL(v,m) transitory variable to search XL oil at time t CDU l at time t XW(v,t) 0-1 variable to denote if vessel v is unloading its crude D(j,l,t) 0-1 variable to denote if the crude oil blended j charges 173
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 chargin tank j EB(j,t) concentration of component k in the crude oil mix of co total operating cost; Binary variables XF,XL,XW,D,G,Z; FKSB,FKBC,VKB,EB; Positive variables VV,VS,VB,FVS,FSB,FBC,X,W,XFF,XLL, 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
Equations 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; 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 operating constrain transfer rate from vessel to tank i stmasba material balance equation for storage tank 175
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)) =e= 1.0 ; veleave(v).. sum(t,xl(v,t)) =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) =g= 1 ; vearco(v)$(ord(v) le 2).. TF(v+1) =g= TL(v) + 1 ; 176
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)) =e= 400; vtoiatt(v,i,t).. 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).. sum(j,fsb(i,j,t)) =l= 70; ncandfst1(i,j,l,t).. FSB(i,j,t) =l= FSB.up(i,j,t)*(1-D(j,l,t)) ; 177
* 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).. FBC(j,l,t)); VB(j,t+1) =e= VB(j,t) + sum(i,fsb(i,j,t)) - sum(l, 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).. sum(l,fkbc(j,l,t)); VKB(j,t+1) =e= vkb(j,t)+ sum(i,fksb(i,j,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
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