Planning and scheduling models for refinery operations

2 downloads 0 Views 504KB Size Report
b PETROBRAS, Petróleo Brasileiro S/A, Brazil. Abstract. The main ..... Cru + % o Vu. C6u,oVu,o nQu,F. (6). The revenue from products is defined over all prod-.
Computers and Chemical Engineering 24 (2000) 2259 – 2276 www.elsevier.com/locate/compchemeng

Planning and scheduling models for refinery operations J.M. Pinto a,*, M. Joly a, L.F.L. Moro a,b a

Department of Chemical Engineering, Uni6ersity of Sa˜o Paulo, Sa˜o Paulo SP, 05508 -900, Brazil b PETROBRAS, Petro´leo Brasileiro S/A, Brazil

Abstract The main objective of this work is to discuss planning and scheduling applications for refinery operations. Firstly, the development of a nonlinear planning model for refinery production is presented. The model is able to represent a general refinery topology and allows the implementation of nonlinear process models as well as blending relations. Considering the market limitations for each oil derivative usually supplied by the refinery, the optimization model is able to define new operating points, thus increasing the production of more valuable products, while satisfying all specification constraints. Real-world applications are developed for the planning of diesel production in the RPBC refinery in Cubata˜o (SP, Brazil) among others. The optimization results were compared to the current situation, where no computer algorithm is used and the stream allocation is made based on experience, with the aid of manual calculations. The new operating point represents an increase of several million dollars in annual profitability. The second part of the work addresses scheduling problems in oil refineries that are formulated as mixed integer optimization models and rely on both continuous and discrete time representations. The problem of crude oil inventory management that involves the optimal operation of crude oil unloading from pipelines, transfer to storage tanks and the charging schedule for each crude oil distillation unit will be discussed. Furthermore, the paper will consider the development and solution of optimization models for short-term scheduling of a set of operations that includes: product receiving from processing units, storage and inventory management in intermediate tanks, blending in order to attend oil specifications and demands, and transport sequencing in oil pipelines. Important real-world examples on refinery production and distribution are reported: the diesel distribution problem at RPBC refinery and the production problems related to the fuel oil/asphalt and LPG areas of the REVAP refinery in Sa˜o Jose´ dos Campos (SP, Brazil), which produces approximately 80% of the national consumption. © 2000 Elsevier Science Ltd. All rights reserved. Keywords: Refinery operations; Scheduling applications; Oil refinery

1. Introduction The 1980s were characterized by the emergence of international markets and the development of global competition. The chemical processing industry had to go through severe restructuring in order to compete successfully in this new scenario. Better economic performance has been achieved with a more efficient plant operation. The implementation of advanced control systems in oil refineries has allowed significant productivity gains in the plant units. The resulting savings have created interest for more complex automation systems that explicitly take into account production objectives. Unit optimizers determine optimal values of the process * Corresponding author. E-mail address: [email protected] (J.M. Pinto).

variables but simply consider current operational conditions. The optimization of the production units does not achieve the global economic optimization of the plant. Usually the objectives of the individual units are conflicting and thus contribute to a sub-optimal and many times infeasible overall operation. The lack of computational technology for production scheduling is the main obstacle for the integration of production objectives and process operations. A more efficient approach would have to incorporate current and future constraints in the synthesis of production schedules, translate short term production objectives in operating conditions to the processing units, supply an analysis tool for the effect of economical disturbances in the performance of the production system within a horizon, and provide mechanisms to account for commercial as well as technological uncertainties.

0098-1354/00/$ - see front matter © 2000 Elsevier Science Ltd. All rights reserved. PII: S0098-1354(00)00571-8

2260

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

According to SIPP (1997) that identified the major needs for tools in production planning and scheduling in oil refineries, the traditional approach for operations planning makes use of linear models for generating a feasible plan in a monthly horizon and relies on manual/spreadsheet calculations. This process, despite requiring time and effort from the scheduler, simply generates a feasible solution that does not fully exploit solutions which are economically more attractive, not even for sub-areas of the refinery where gains would clearly improve the operation. The main objective of SIPP (Integrated System for Production Planning), which is now in the final stage of development, is to make the solution generated by a Linear Programming planning model practicable. Since the operational constraints are not present in the LP model, the main goal is to implement a solution, which violates as little as possible and it is still similar to the LP solution. According to Magalha˜es, Moro, Smania, Hassimotto, Pinto and Abadia (1998) important results were already achieved, which are as follows: “ Centralized information. SIPP is the single platform that is required for the production scheduler. It is no longer necessary to connect to several computers to get a complete view of the current status both of the refinery and in all the remaining refining plants in order to develop a new schedule. “ Increase of the scheduling horizon. Since the system allows access to future projections (demands, oil extraction, tanker arrivals, etc.), the scheduler has the opportunity of working with longer horizons. This horizon was normally restricted to three days and currently has been raised to 7 days. “ What-if analysis. With the implementation of the system it will be possible to react more quickly to unexpected situations through cause and effect analysis. “ Knowledge preser6ation. This may be considered the most important aspect brought by the system that resulted in a better understanding of the scheduling problem. The main benefits of the system will be perceived from the implementation of models and algorithms that will support the production scheduler. Among these, the goal is to develop and implement mathematical programming models based on mixed integer optimization algorithms. The objective of this paper is to describe the approach taken in the development of optimization models for production planning and scheduling for oil refineries. The plant is divided into sub-systems, which although coupled, allow the development of representation of the main scheduling activities within relevant time horizons. The final objective is to develop strategies for incorporating these models in an automated planning and scheduling system that generates short

term schedules that consider time-dependent conditions integrated to the global refining scheme. This paper is organized as follows: first, an overview of planning and scheduling activities in oil refineries is introduced. Developments of representations for nonlinear planning models are discussed, followed by the optimization work in refinery scheduling with applications in crude oil management and scheduling, production and distribution of oil products, such as diesel, fuel oil/asphalt and LPG. In particular, the mathematical model for production and distribution of oil dervatives is presented. Finally, conclusions are drawn and current as well as future developments are presented.

2. Overview of planning and scheduling in oil refineries The potential benefits of optimization for process operations in oil refineries have long been observed, with applications of linear programming in crude blending and product pooling (Symonds, 1955). Oil refineries are increasingly concerned with improving the planning of their operations. The major factor, among others, is the dynamic nature of the economic environment. Companies must assess the potential impact of important changes such as demands for final product specifications, prices, and crude oil compositions or even be capable to explore immediate market opportunities (Magalha˜es et al., 1998). Coxhead (1994) identifies several applications of planning models in the refining and oil industry, including: crude selection, crude allocation for multi-refinery situations, partnership models for negotiating raw material supply and operations planning. The availability of LP-based commercial software for refinery production planning, such as RPMS (Refinery and Petrochemical Modeling System — Bonner & Moore, 1979) and PIMS (Process Industry Modeling System — Bechtel, 1993) has allowed the development of general production plans of the whole refinery, which can interpreted as general trends. As pointed out by Pelham and Pharris (1996), the planning technology can be considered well developed and relevant progress should not be expected. The major advances in this area will be based on model refinement, notably through the use of nonlinear programming, as recently in Picaseno-Gamiz (1989) and Moro, Zanin and Pinto (1998). Bodington (1992) also mentions the lack of systematic methodologies for handling nonlinear blending relations. Despite that, progress in nonlinear programming in the nineties (Viswanathan & Grossmann, 1990; Po¨rn, Harjunkoski & Westerlund, 1999) allowed that many authors, such as Ramage (1998), refer to nonlinear programming (NLP, MINLP) as a necessary tool for the refineries of the 21st-century. The

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

pooling problem is studied by Fieldhouse (1993), who solves simultaneously the mass balance equations and quality relations with successive linear approximation. On the other hand, commercial tools for production scheduling are few and these do not allow a rigorous representation of plant particularities (Rigby, Lasdon & Waren, 1995; Moro et al., 1998). For that reason, refineries are developing in-house tools strongly based on simulation (Steinschorn & Hofferl, 1997; Magalha˜es et al., 1998) in order to obtain essential information for a given system (Moro & Pinto, 1998). In the literature there are specific applications based on mathematical programming, such as crude oil unloading and gasoline blending (Bodington, 1992; Rigby et al., 1995; Lee, Pinto, Grossmann & Park, 1996; Shah, 1996). The lack of rigorous models for refinery scheduling is also discussed by Ballintjin (1993), who compares continuous and mixed-integer linear formulations and points out to the low applicability of models based only on continuous variables. More generally, the scheduling literature presents very few optimization based formulations for the scheduling of continuous multiproduct plants, as opposed to the large amount of work in batch plants (Reklaitis, 1992; Pinto & Grossmann, 1998). Nowadays, due to need for moving towards flexible plants, which must promptly respond to market requirements, continuous processing has received more attention (Ierapetritou & Floudas, 1998). Examples of planning and scheduling of continuous multiproduct plants are presented for the single stage (Sahinidis & Grossmann, 1991) and multistage case (Pinto & Grossmann, 1994). It has also been recognized that the integration of new technologies for process operations is an essential profitability factor and that it can only be achieved through appropriate planning (Cutler & Ayala, 1993; Macchietto, 1993). According to a recent survey of hydrocarbon processing companies, it is pointed out by management that among the main areas for integration there are: sales and planning, planning and operations

2261

management and planning and distribution (Bodington, 1995). The importance of on-line integration of planning, scheduling and control is pointed out by Bodington and Shobrys (1996) and Steinschorn and Hofferl (1997). Mansfield, Maphet, Bain, Bosler and Kennedy (1993) discuss the issue of integration of process control, optimization and planning activities in gasoline blending.

3. Planning models The work focus on the development of nonlinear planning models for refinery production. Planning activities involve optimization of raw material supply, processing and subsequent commercialization of final products over one or several time periods. Moro et al. (1998) developed a nonlinear planning model for refinery production that is able to represent a general refinery topology. The model relies on a general representation for refinery process units in which nonlinear equations are considered. The unit models are composed of blending relations and process equations. Also, the unit variables must satisfy bound constraints, which consist of product specifications, maximum and minimum unit feed flowrates and limits on operating variables. Fig. 1 shows the representation of a typical unit. The model of a typical unit u is represented by the following equations: Feed flowrate: Qu,F = %

% Qu%,s,u

(1)

u%  Uu s  Su %,u

Feed properties: Pu,F, j = fj (Qu%,s,u, Pu%,s, j )

u% Uu, sSu%,u,

jJs

(2)

Total flowrate of each product stream: Qu,s = f(Qu,F, Pu,F, j, Vu )

jJF,

sSU

(3)

Unit product stream properties: Pu,s, j = fj (Pu,F, j, Vu )

jJs,

sSU

(4)

Product stream flowrates (splitter): Qu,s = %

u%  Us,u

Fig. 1. Typical process unit.

Qu,s,u%

sSU

(5)

Eqs. (1) and (2) represent the mixing of the feed streams. These are defined by the sets Uu and Su%,u which denote the units u% whose destination is u and the streams leaving unit u’ whose destination is unit u, respectively. The properties of the resulting feed stream are nonlinear functions of the entering feed streams as well as each property jJs, where Js is the set of properties relevant to stream s. The process model is defined in Eqs. (3) and (4), which relate the product flowrate and properties to the

2262

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

Fig. 2. Schematic representation of the RPBC diesel production plant.

flowrate and properties of the feed stream as well as to the operating variables. In general, the process model may be a simple yield relation or a complex system of equations based on conservation principles and constitutive relations. Usually, mass balances and yield expressions are used to determine product flow rates; energy balances are not included in the model. The mass balance in a unit may not satisfied due to material losses and to the possible existence of streams that are not modeled, in the event that they are irrelevant to the model in question. Yield expressions are based on a standard value, which is determined over average values obtained from plant data. The effect of the feed properties as well as those of the operating variables is applied over the standard yield, in the form of gains, also determined experimentally. Most of the physical properties are calculated from mixing indexes, which are based on correlations. Likewise, the effect of the feed and operating variables in the properties of the product streams is computed through gains. Note that the operating variables are defined as continuous. Nevertheless, if a given unit runs under different operating modes (campaigns), these could be represented by discrete variables. An additional difficulty in this case is that the resulting planning model would be a (nonconvex) MINLP. In (5), since each product streams may have multiple destinations, a simple balance is imposed in each of these streams. These are either sent to the final product pool or sent to another processing unit. Additionally, operational bound constraints are imposed on the flowrates due to market limitations as well as on the properties because of product specifications. The objective is to maximize the profit (Pr) of the refinery, defined as the sales revenue, the sum of feed costs and the total operating cost, which is the sum of

operation cost of each unit, yielding: Pr= % CpuQu,p − % CFuQu,F u  Up



u  UF

n

− % Cru + % C6u,oVu,o Qu,F uU

o  Vu

(6)

The revenue from products is defined over all products generated in the units in Up, which is the set of units that generate finished products. The feed costs are also defined over the set of units that are fed by external streams, Uf. The cost of operation per unit feed stream in each processing unit depends (linearly) on the operating variables of all units (U). A real-world application was developed for the planning of diesel production in the RPBC refinery in Cubata˜o (SP, Brazil), as illustrated in Fig. 2. The refinery has as main objective the production of diesel fuel with different specifications and demands shown in Table 1 Diesel specifications Property

Diesel Regular

Density 0.82/0.88 (min/max) Flash point (min) – (°C) ASTM 50% 245.0/310.0 (min/max) (°C) ASTM 85% 370.0 (max) (°C) Cetane number 40.0 (min) Sulfur content 0.5 (max) (% wt.)

Metropolitan 0.82/0.88 –

Maritime 0.82/0.88 60.0

245.0/310.0

245.0/310.0

360.0

370.0

42.0

40.0

0.3

1.0

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

2263

Table 2 Main results for the diesel production problem Diesel

Current operation Regular

Total flow rate (m3/d) Properties Density Flash Point (oC) ASTM 50% (oC) ASTM 85% (oC) Cetane number Sulfur content (% wt.)

4878 0.880 66.8 291.0 369.7 41.9 0.29

Optimal

Metropolitan 5500 0.880 61.8 282.2 357.0 42.0 0.20

Table 1. These are as follows: Metropolitan diesel (low sulphur levels), regular diesel and maritime diesel (high flashing point). The process includes crude distillation units, vacuum distillation units, fluid catalytic cracking unit, coking unit, hydrotreating unit and diesel pools. The processing units operate in steady state and produce a variety of intermediate streams, with different properties, that can be blended to generate the desired kinds of diesel fuel. The modeling system GAMS (Brooke, Kendrick & Meeraus, 1992) was used to implement the optimization model, which contains 233 variables, 199 equations and 620 non-linear non-zeroes and was solved with CONOPT, based on a feasible path generalized reduced gradient method. The optimization results were compared to the current situation, where no computer algorithm is used and the stream allocation is made based on experience, with the aid of manual calculations. Considering the market limitations for each kind of diesel oil usually supplied by the refinery, the optimization algorithm was able to define a new point of operation, increasing the production of more valuable oil, while satisfying all specification limits. A summary of the main results in shown in Table 2. For example, the refinery produces approximately 5500 m3/d of metropolitan diesel, while the market could absorb up to 7000 m3/d. Since this is the most valuable diesel, it is clear that there is room to increase the refinery profit. The refinery also produces 3500 m3/d of maritime diesel, a low-valued product, while the minimum rate due to commercial agreements is 3000 m3/d. This situation arises because this kind of diesel is relatively easy to produce, since it has less restrictive specifications. This new operating point represents an increase in profitability of approximately US$ 6 000 000 per year. Currently an application is under development for the overall production planning at the REVAP refinery based on the generalized model representation. Several processing units are modeled, such as atmospheric distillation, vacuum distillation, fluid catalytic cracking, hydrotreating and deasphalting.

Maritime 3500

Regular 3877

0.860 79.5 270.3 354.1 40.5 0.38

0.871 88.0 292.9 370.0 41.9 0.45

Metropolitan 7000 0.880 60.5 283.0 360.0 42.0 0.20

Maritime 2999 0.869 70.0 267.0 350.2 40.3 0.21

4. Scheduling in oil refineries As previously mentioned, the work has focused on the development of optimization models and solution methods for refinery sub-systems. This is mainly due to the complexity of scheduling operations, which are translated into large-scale combinatorial problems (NPComplete, at least), and limitations in computing technology. One of the major issues has been on time representation. Parallel research has been conducted on both discrete and continuous time models. Another important aspect that is under investigation concerns compatibility between planning and scheduling models. We address scheduling problems in oil refineries, which are formulated as mixed integer optimization models and rely on both continuous and discrete time representations. Although in general continuous time formulations provide substantial reductions on the combinatorial feature of a model, the use of a discrete time representation may still be attractive since: “ Resource constraints under discrete time representation are much easier to handle. For instance, inventory constraints in continuous time are inherently nonlinear (and nonconvex) due to the bilinear terms involving flowrates and time intervals. In order to avoid the solution of non-convex models, linearization techniques are frequently used. Consequently, the performance of the solution method may deteriorate due to a significant increase in the integrality gap of the linearized models. This fact (observed in Section 4.1, for instance) is undesirable, mainly in the case of complex industrial processes where a feasible schedule is often imperative. “ If the execution times involved in the problem are of the same order of magnitude, the size of the resulting discrete model is less dependent on the scheduling horizon and can be solved in reasonable time. “ Discrete time models provide in general tight formulations, which means that they present a relatively low integrality gap (Xueya & Sargent, 1996).

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

2264

Therefore, in light of the above arguments, Sections 4.2 and 4.3 will be founded in discrete representation. The problem of crude oil inventory management (Section 4.1) involves the optimal operation of crude oil unloading from pipelines, transfer to storage tanks and the charging schedule for each crude oil distillation unit is formulated and solved with a continuous time representation. Furthermore, the paper will consider the development and solution of optimization models for short-term scheduling of a set of operations that includes: product receiving from processing units, storage and inventory management in intermediate tanks, blending in order to attend oil specifications and demands, and transport sequencing in oil pipelines. The mathematical formulation for such a problem is presented. Important real-world examples on refinery production and distribution are reported. The diesel pooling and distribution problem at the RPBC refinery is solved (Section 4.2). Production problems related to the fuel oil/asphalt (Section 4.3) and LPG (Section 4.4) areas of the REVAP refinery in Sa˜o Jose´ dos Campos (SP, Brazil), which produces approximately 80% of all fuel oil consumed in Brazil, are also reported. In the LPG problem, an optimization model that is an extension of the generalized planning model is proposed.

4.1. Crude oil scheduling This work addresses the problem of crude oil inventory management of a real world refinery that receives several types of crude oil, which are delivered by an oil pipeline (Moro & Pinto, 1998). The system consists of a crude oil pipeline, a series of storage tanks and distillation units. As in Lee et al. (1996) and Shah (1996), the problem involves transfers from the pipeline to the crude tanks, internal transfers among tanks and charges to the crude distillation units. The processing time of the tasks involved may vary from few minutes to several hours. Typically, an oil refinery receives its crude oil through a pipeline, which is linked to a docking station,

Fig. 3. Refinery crude system.

where oil tankers unload. The unloading schedule of these oil tankers is usually defined at corporate level and cannot be easily changed. Thus, for a given scheduling horizon, the number, type, start and end times of the oil parcels are known a priori. In the pipeline, adjacent crude oil types share an interface, which has to be properly handled. If these adjacent batches of oil (known as parcels) present significantly different properties, it becomes necessary to take into account this mixing that always occur within the pipeline, which causes the degradation of part of the higher quality oil. Therefore it is necessary to send this mixed oil either to storage together with the oil of lower quality or to a tank assigned to receive such mixtures. This operation is called interface separation and the volume of this interface is defined based on prior experience. In the refinery the crude oil is stored in cylindrical floating-roof tanks, with a total capacity in the range of tens of thousands cubic meters, which is usually sufficient for a few days of refinery operation. Floating roof tanks provide much smaller loss of volatile petroleum components than the usual fixed roof tanks; on the other hand they demand a minimum product volume of about 20% of total capacity so to avoid damaging the floating device. The crude oil must be stored in these tanks for a certain amount of time until it can be processed in the distillation units. There is a minimum amount of time to allow the separation of the brine that forms an emulsion with the oil. Thus it is not possible to feed the distillation units directly from the pipeline, even if an intermediate tank is used. It is possible to transfer oil among tanks, although such operations are seldom performed, since they are lengthy and it is usually simpler to blend two or more tanks while feeding the distillation units. If the oil quality in a given tank and the distillation unit operating conditions are not compatible, it is necessary to process it simultaneously with the oil from another tank. This situation may arise if a certain crude oil is too heavy, in which case there will not be enough product in the distillation tower top section to produce a proper amount of internal reflux, or if the crude is too light, which may cause difficulties in pressure control. As a rule, these properties are known a priori by the refiner and can be correlated to the petroleum origin. On the other hand, it is mandatory that the distillation units be fed with an oil flow rate as close as possible to a target value, defined at the corporate planning level, to maximize production and, consequently, profit. It is imperative that oil feeds such units continuously, because a shutdown is a very costly and undesirable operation. In this work we analyze the problem of generating an optimal schedule for crude oil operations for a refinery petroleum system described in Fig. 3, which includes

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

2265

Fig. 4. Oil parcel scheduling.

receiving oil from pipeline, transferring oil among tanks, waiting for the brine to be separated, and feeding the distillation units. These decisions are taken with the objective of maximizing the operating profit by maximizing production while minimizing the number of tanks used. Firstly, a discrete time mixed integer optimization model is proposed for the generation of a plan for refinery crude oil management. However, this model has computational limitations since it results in an unnecessary increase of the number of 0 – 1 variables, as in Kondili, Pantelides and Sargent (1993). This fact makes the model solution unattainable for a relevant scheduling horizon, which is at least of 3 – 4 days. To circumvent this difficulty, we develop an alternate model with variable length time slots, which represent crude oil receiving operations as well as periods between two receiving tasks (Moro & Pinto, 1998). The system generated by this model is capable of creating a short-term schedule, with a horizon of approximately 1 week that takes into account volume and quality constraints as well as operational rules. These rules involve, among others, minimum time for crude utilization, due to brine settling. There are also operational constraints such as the one that imposes that just one tank receives at the same time but several can feed the columns simultaneously and the requirement that a tank cannot receive and send oil at the same time. Inputs to the problem are the crude arrival schedule, which describes the volumes and qualities of the crude oils to be received in the refinery within the desired horizon; the crude demands and the current levels and qualities of crude oil in the storage tanks. A critical decision concerns the calculation of crude properties for blended streams. These properties are normally represented by indexes, which are linear on a volumetric basis. Nevertheless, indexes are nonlinear functions of the properties. Based on this information, a schedule is generated, which describes the main decisions such as: feed strategy from the storage tanks to the distillation units as well as internal transfers among tanks along the scheduling horizon. A real-world application is developed for the scheduling of crude oil in the REVAP refinery in Sa˜o Jose´ dos Campos (SP, Brazil) that receives in the order

of ten different types of crude oil in seven crude storage tanks and a distillation capacity of 200 000 barrels per day. We study an example derived from the actual refinery situation. The total time horizon spans 112 h, during which four completely defined oil parcels have to be received from pipeline. Six oil tanks are available, all of them with the same capacity, but with different amounts and qualities of oil in the beginning of the time horizon. We consider three different kinds of oil, Bonito, Marlin and RGN. The distillation unit has a target feed flow rate of 1500 m3/h during the entire time horizon. The distribution of the oil parcels during the time horizon is shown in Fig. 4, which also shows the sub-periods and the number of time slots defined for each one of them. More detailed information on the oil parcels can be found in Table 3. Table 4 describes the oil tank initial conditions. All tanks are considered to be adequately prepared to feed the distillation unit, i.e. settling has already taken place. The tanks have the same dimensions and their capacity Table 3 Oil parcel scheduling Oil parcel

Volume of oil (m3)

Start time (h)

End time (h)

1

60 000

8

20

2

50 000

48

58

3

1000

58

58.2

4

60 000

100

112

Composition

100% Bonito 100% Marlin 100% Marlin 100% RGN

Table 4 Initial conditions of oil tanks Tank

Volume (m3)

Composition

01 02 03 04 05 06

40 000 50 000 15 000 50 000 20 000 15 000

50% Bonito, 50% 100% Marlin 70% Bonito, 30% 100% Marlin 60% Bonito, 40% 60% Bonito, 30%

Marlin RGN RGN Marlin, 10%RGN

2266

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

Fig. 5. Receiving and sending operations during time horizon.

is 80 000 m3 while the minimum operating volume is 13 000 m3. The minimum settling time is defined as 24 h and this is the minimum time necessary for brine separation after a tank receives oil from pipeline. The problem so defined, with 19 time slots, four oil parcels, six tanks and three kinds of oil, generates an MILP problem with 912 discrete variables and 5599 equations, which was solved using OSL (IBM, 1991), embedded in the GAMS software (Brooke et al., 1992). The problem solution can be seen in Fig. 5. It is clear that the constraints of minimum settling time and the demand that the distillation unit always be fed are honored. If the fixed time slot duration approach were used in this same problem, we would be forced to define a slot duration of 15 min, which would generate a MILP problem with 21504 binary variables. The solution of such a problem is far beyond the capabilities of current mixed integer optimization technology.

4.2. Production and distribution A typical oil refinery produces several streams, whose major specifications are based on their physical and/or chemical properties such as flash point, composition of key components, density and/or viscosity, among others. These streams are usually blended in order to satisfy final product specifications and further sent to consumer markets, in agreement with the foreseen necessities throughout the scheduling horizon. The refinery model addressed in this work assumes the existence of several processing units, which generate several streams that are differentiated only by the composition of their key elements, (e.g. sulfur and lead content). After processing, these streams are stored in intermediate tanks and further sent through oil pipelines as final product or mixed with others aiming to produce a desired blend. The system is shown in Fig. 6, which

includes charging pipelines from U crude distillation units (CDUs) to storage area, I storage tanks (where I= 2U) and J oil pipelines that may transport P grades of products, as well as all their interconnections. The processing in the CDUs, which operate continuously during the scheduling horizon, is sent by charging pipelines in such mode that each pipeline transports only one kind of product, denoted primary product, to the storage area where there are two dedicated tanks. Each tank stores only one kind of product and due to operational reasons it is not allowed that storage tanks load and unload simultaneously; therefore, when one tank unloads the stream from CDU must be directed to the other one. All properties of the stored hydrocarbon are the same as those obtained in the CDU, and thus known. The distribution of the primary products is done by J oil pipelines that transport these pure products or their blends, both denoted final products, in order to achieve the specification relative to the composition of keycomponents. Mixed-integer constraints are proposed that take into account transitions among products in oil pipelines. Each oil pipeline supplies only one consumer market where there is a demand known a priori, along the scheduling horizon, for different grades of final

Fig. 6. General scheme of scheduling problem.

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276 Table 5 Nomenclature Indices and sets i =1, …, I tanks; j =1, ..., J pipelines; p (or n)= 1 ,..., P products; k= 1, ..., K key-comp.; t= 1, …, T time; u= 1,...,U CDUs Binary 6ariables XWi,t : denotes if tank i is loading at time t; DDi,j,t : denotes if tank i feeds oil pipeline j at time t; XDIj,p,t /XDFj,p,t : denotes if there was the start/end of transport of product p by oil pipeline j at time t; DOj,p,t : denotes if oil pipeline j transports product p at time t; TRANj,p,n : denotes if there was transition from product p to n in oil pipeline j during the horizon; TRANSj,p,n : auxiliary variable for transition modeling Continuous 6ariables FVSi,t : volumetric flowrate from CDU to tank i at time t; VSi,t : volume of tank i at time t; FSBi,j,t : volumetric flowrate from tank i to oil pipeline j at time t; FOj,p,t : volumetric flowrate of product p in oil pipeline j at time t; TDIj,p /TDFj,p : initial/final transport time of product p in oil pipeline j Parameters PRp : revenue per unit volume of final product p; CRMi : cost per unit volume of raw material in tank i; CPi : pumping cost from tank i to any oil pipeline j per flow unit; CINVi : inventory cost of tank i per unit volume and time; CHANGEp,n : transition cost between final products p and n (p to n); FVSMAXi /FVSMINi : max/min volumetric flowrate from CDU to tank i; VSMAXi /VSMINi : capacity bounds of tank i; VSZEROi : initial volume of tank i; DMj,p : volumetric demand of product p by oil pipeline j; FSBMAXi,j /FSBMINi,j : max/min volumetric flowrate from tank i to oil pipeline j; FOMAXj /FOMINj : max/min volumetric flowrate in oil pipeline j; ESi,k : composition of key-element k in tank i; Cp,k : specification of product p in key-element k; NTRANj : total number of transitions in oil pipeline j; NTj,p : 0–1 parameter that denotes the existence of demand for p in oil pipeline j

products that are discerned only by the composition of the key-elements.

2267

6. all products have the same (constant) density and their blends constitute an ideal solution; 7. changeover times are neglected. A remark should be made on assumption (4), whose main objective is to reduce computational time. Although this assumption could be in principle relaxed, since transition costs would tend to penalize solutions with many changeovers, it would incur in a much larger combinatorial problem. Nevertheless, it is recognized that the global optimal solution may be affected in cases that inventory levels are high (it would be necessary to unload more than once along the horizon) and/or storage is expensive (higher operating costs). Note that the values of flowrate bounds in Table 5 should be specified in agreement with the time span adopted. Maximize: Profit= sales revenue− raw material cost− pumping cost−inventory cost− transition cost. J

P

T

Profit= % % % (PRp · FOj,p,t ) j=1 p=1 t=1 I

J

T

− % % % [(CRMi + CPi ) · FSBi, j,t ] i=1 j=1 t=1 I

T

− % % (CINVi · VSi,t ) i=1 t=1 J

P

N

− % % % (TRANj,p,n · CHANGEp,n )

Subject to: 1. Material balance constraints Volumetric balances are developed in (8a) and volumes of all storage tanks are bounded in (8b). t



J

VSi,t = VSZEROi + % FVSi,t − % (FSBi, j,t ) t=1

4.2.1. Mathematical formulation The model is based on a uniform discretization of time and relies on the following assumptions: 1. each oil pipeline j can be simultaneously fed by one or more storage tanks, aiming to generate on line the oil blends with correct key-composition; 2. each storage tank i feeds at most NCi oil pipelines simultaneously and connects with any oil pipeline j; 3. the oil mixing properties are calculated by a weighted relation based on the properties of the original streams; 4. the expedition of final products by any oil pipeline occurs only once throughout the scheduling horizon (i.e. in a single batch); 5. material losses due to undesirable mixing that occurs within the oil pipeline when there is a transport changeover of two final products incurs on a transition cost, which is sequence dependent;

(7)

j=1 p=1 n=1

i= 1,…, I

j=1

t= 1, …, T

n

(8a)

VSMINi 5 VSi,t 5 VSMAXi i= 1, …, I;

t= 1, …, T

(8b)

Constraint (9a) enforces the global balance for the blending streams, while in (9b) the key-component balances are done, whose specifications are exactly imposed or may also be stated as lower/upper bounds. P

I

p=1

i=1

j =1, …, J;

t= 1, …, T

% (FOj,p,t )= % (FSBi, j,t )

p

I

P=1

i=1

(9a)

% (Cp,k ·FOj,p,t )= % (FSBi, j,t ·ESi,k ) j= 1, …, J;

k= 1, …, K;

t= 1, …, T

(9b)

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

2268

2. Demand constraints The plant must also satisfy the foreseen demands in each market. In (10), demand must be exactly met, but may also be enforced as a lower/upper bound. T

DMj,p = % (FOj,p,t )

j = 1, …, J;

p = 1, …, P

pipelines) must satisfy upper and lower flow bounds due to pumping limitations, as stated by constraints (12a–2c). FVSMINi · XWi,t 5 FVSi,t 5 FVSMAXi · XWi,t i= 1, …, I;

t= 1, …, T

(12a)

t=1

(10) 3. Operating rules Constraints (11a– b) state that it is not allowed that storage tanks load and unload simultaneously and impose that tank i feeds at most NCi oil pipelines at every time. XWi,t + XWi + 1,t = 1

i =1,3,5, …;

t =1,…, T (11a)

J

NCi · XWi,t + % (DDi, j,t ) 5 NCi j=1

i = 1, …, I;

t= 1, …, T

(11b)

Expedition of final product p by oil pipeline j occurs at most once during the scheduling horizon (i.e. a single batch). If this process begins, it must finish before the end of the period, as in (11c). Moreover, in (11d) the start time must precede its end. T

% (XDIj,p,t )5 1

T

and

t=1

% (XDIj,p,t −XDFj,p,t ) =0 t=1

j= 1, … J;

p=1, …, P

(11c)

T

T

t=1

t=1

p=1, …, P

(11d)

Product p is sent by oil pipeline j only between TDIj,p and TDFj,p as in (11e). t

DOj,p,t = % (XDIj,p,t −XDFj,p,t ) t=1

j =1, …, J;

p=1, …, P;

t = 1, …, T

i= 1, …, I;

(11e)

It is not allowed that storage tank i(Öi ) unloads to oil pipeline j at time t if this oil pipeline must not transport products in this moment as stated by constraint (11f).

j= 1, …, J;

t= 1, …, T

j= 1, …, J;

p= 1, …, P;

t=1, …, T

DDi, j,t 5 % (DOj,p,t )

(12c)

5. Transition relations Constraint (13a) imposes that if oil pipeline j transports product n later than product p, it is possible that there is a transition from product p to n (denoted by TRANSj,p,n = 1). This is a necessary, but not sufficient condition. Otherwise, constraint (13c) sets TRANSj,p,n to zero if product n is transported earlier than product p. Note that TRANSj,p,n indicates only the potential transition from p to n, but this transition may not take place even when TRANSj,p,n = 1. Consider the case that oil pipeline j transports products A, B and C in this order. From (13a): TRANSj,A,B = TRANSj,A,C = TRANSj,B,C = 1. However, it is clear that are only transitions from A to B and from B to C. TRANSj,p,n ] (TDIj,n − TDIj,p )/(T) p=1, …, P;

TRANSj,p,n = 0

j =1, …, J

n= p;

j= 1, …, J

(13a) (13b)

− T · (TRANSj,p,n )5 (TDIj,n − TDIj,p ) j= 1, …, J;

p= 1, …, P;

n= 1, …, N

(13c)

Note that P= N. Constraints (13d–f) impose that a transition from product p to n (Ön, n" p) and viceversa occurs at most once. The sum of all binary variables TRANj,p,n, which truly denote the occurrence of transition from product p to n in oil pipeline j, must match the total number of transitions, NTRANj, as in (13h).

!

P

NTRANj = max 0, % (NTj,p )− 1

P

(12b)

FOMINj · DOj,p,t 5 FOj,p,t 5 FOMAXj · DOj,p,t

n" p;

% (t · XDIj,p,t )= TDIj,p 5TDFj,p = % (t · XDFj,p,t ) j= 1, …J;

FSBMINi, j · DDi, j,t 5 FSBi, j,t 5 FSBMAXi, j · DDi, j,t

"

p=1

p=1

i = 1, …, I;

j =1, …, J;

t =1, …, T

(11f)

Additionally, in (11g) each oil pipeline at each time t can transport at most one final product. P

% (DOj,p,t )51

j =1, …, J;

t =1,…, T

(11g)

p=1

4. Flowrate constraints All streams (from CDUs to storage tanks, from storage tanks to oil pipelines and those within the oil

where the first argument of the max operator accounts for the case that no product is sent through oil pipeline j during the scheduling horizon and the second argument denotes that the number of transitions depends on the number of products sent. In the previous case of A, B and C sent through pipeline j, we have p (NTj,p )=3 and therefore NTRANj = 2, i.e. two transitions occur. NTj,p is a 0–1 parameter that is activated by the modeling if there is demand of product p in market fed by j.

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

TRANj,p,n 5TRANSj,p,n j = 1, …, J;

p=1,…, P;

n= 1, …, N

(13d)

N

% (TRANj,p,n )51

j= 1, …, J;

p =1, …, P

n=1

(13e) P

% (TRANj,p,n )51

j= 1, …, J;

n =1, …, N

p=1

(13f ) P

N

% % (TRANj,p,n )= NTRANj

j= 1, …, J

(13g)

p=1 n=1

4.2.2. Real-world application A real-world example is presented that is based on Moro et al. (1998) (see Section 3), who studied the diesel production planning problem at the PETROBRAS RPBC refinery in Cubata˜o (SP, Brazil). The system includes three CDUs, six storage tanks and three oil pipelines and was solved for a scheduling horizon of one day, at every hour. The plant produces three diesel grades: metropolitan (p = 1), regular (p= 2) and maritime diesel (p =3) as shown in Table 6. It is assumed that the relevant properties are the sulfur content (k= 1) and the cetane number (k = 2). The remaining properties are not changed when different oils are mixed. Since metropolitan is the most valuable diesel and adding the fact that its demand can be accepted as unlimited, its distribution must be maximized in order to increase the refinery profitability. This problem works with lower and upper limits for the specification of two key-components in question and also allows flexibility to determine the metropolitan diesel demand, which has a lower bound of 5000 m3/d. It is also assumed that regular diesel specification

2269

should be obtained by proper dilution since no rigorous control related to the composition of key-elements is done in CDU2. The metropolitan diesel storage tanks may feed at most two oil pipelines simultaneously and the remaining ones only one pipeline. The modeling system GAMS (Brooke et al., 1992) was used in order to implement the optimization model and its solution method. The branch and bound code OSL (IBM, 1991) was utilized to solve this MILP model, which contains 2252 continuous variables, 1278 0–1 variables and 3065 constraints. In order to reduce the computational expense, the relative optimality criterion was set to a non-zero value and valid constraints were included in the model to reduce the size of the search tree providing significant timesaving. The model solution provides, at each time of the scheduling horizon, flowrates of all streams as well as the schedule for tank loading and unloading, all information for the mixing process, volumes in all tanks and operation schedule for oil pipelines. The optimal schedule for this real-world distribution problem is shown in Fig. 7.

4.3. Fuel oil/asphalt production Although some authors such as Rigby et al. (1995) mention that in general the optimization of fuel oil area does not provide fruitful gains in terms of refinery profitability, this may not always be the case. For instance, for the REVAP refinery this area is singular since (Magalha˜es et al., 1998): “ there are significant storage limitations in the fuel oil area; “ the Brazilian oil sector is under a gradual end of 43 year-old monopoly of the PETROBRAS (started in 1992), fact mentioned by Hartveld (1996) as respon-

Fig. 7. Optimal operation schedule for the diesel example.

$ 40.3/39.0 40.0/40.0

$0.6/0.4

1.0/1.0

Diesel specifications p= 1 p= 2 p=3

a=1 (from u=1) a=2 (from u=2) a=3 (from u=3)

Key.comp.2 (cetane n.) 42.0/42.0

Key-comp.1 S (% weight) 0.3/0.3

Primary products

Cetane number ]42 ]40 ]40

Sulfur (% wt.)

50.30 50.50 51.00

42.0/42.0 $ 40.3/39.0 40.0/40.0

0.3/0.3 $ 0.6/0.4 1.0/1.0

i = 1/i= 2 i = 3/i= 4 i= 5/i=6

Kep-cp.2 cetane n.

Key-cp.1 S (% weight)

Storage tank

Table 6 System information for the diesel example

0.90 0.50 0.10

Sale pr. ($/vol.)

180–200

220–250

Prod. Rate (m3/h) 250–300

Storage limits (m3) 2000–30 000 2000–30 000 2000–30 000

1/2 1.1

1/3 1.0

2/1 1.3

2/3 1.2

3/1 1.9

Transition cost between final products p/n (p to n) ($)

Demand (×10−3 m3) in j =1/2/3 ]5.0/1.0/0.0 4.0/1.0/1.0 0.0/1.5/2.0

50–250

50–400

Flowrate bounds (m3/h) 50–400

0.20/0.20 0.18/0.18 0.16/0.16

Pump cost ($/vol.t)

j =3

j=2

j =1

Oil pipeline

0.10/0.10 0.12/0.12 0.11/0.11

Invent cost ($/vol.t)

0.05

0.40

0.60

Vol. cost ($/vol.)

30–500 40–500 40–500

Unload limits (m3/h)

3/2 1.9

2270 J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

2271

Fig. 8. Schematic representation of the plant.

sible for the new extraordinary business opportunities in Brazil. More specifically, fuel oil monopoly was recently broken (May, 1999); “ a substantial amount of the plant production is dispatched by oil pipelines, which operate intense flux among refineries of the state of Sa˜o Paulo; “ the plant is responsible for approximately 80% of all fuel oil consumed in Brazil. In this context, the present work considers the shortterm scheduling of fuel oil and asphalt production with operations management, which include mixing, storage and distribution. A set of final products is diluted and sent to intermediate storage tanks, and may undergo further eventual corrections in dilution rates previous to its distribution to the consumer market, whose demand is determined from refinery planning. The objective is the development of an optimization model which is able to define the production schedule of a real world problem at the PETROBRAS REVAP Refinery, located in Sa˜o Jose´ dos Campos (SP, Brazil). The resulting model produces an optimal policy of production and inventory control throughout the scheduling horizon regarding the foreseen product demands under operational restrictions, with the objective of minimizing the costs involved in this portion of the plant. Fig. 8 illustrates the system configuration which includes one deasphalting unit (UDASF), one cracking unit (UFCC), two storage tanks for diluents, 15 storage tanks for final products, four charging terminals and two oil pipelines as well as all their interconnections. During the scheduling horizon, asphaltic residue (RASF) is produced in the UDASF, as bottom product, and further diluted on-line with at least one of the following diluents: decanted oil (OCC) and light cycle oil (LCO), with the purpose of producing four grades of fuel oil (FO1, FO2, FO3 and FO4), or with another diluent, heavy gasoil (HG) aiming to produce two asphalt specifications (CAP 07 and CAP 20). Moreover, the plant produces two grades of ultra-viscous oil (UVO1 and UVO2) which must contain only

pure LCO from UFCC as diluent. The UDASF production must also satisfy a minimal demand of pure RASF to the refinery oil-header (roh). The major specification of all final products is the viscosity range, which has to be adjusted by proper dilution with available diluents. The OCC and the HG streams are totally utilized to supply the plant necessities; the HG stream is directed to storage in tank TK-42221 and the OCC stream from UFCC is directly utilized for RASF dilution or directed to storage in TK-42208 (which contains LCO and OCC mixed) once is not permitted that two operations occurs simultaneously. Unlike the above described, the LCO stream must be directed to the plant only when necessary, i.e. when is desired to charge the storage tank TK-42208 or when UVO1 (or UVO2) must be produced. In this case, to assert that pure LCO is being utilized to dilute RASF, the TK42208 level must increase at a proper rate while pure LCO flows in the dilution line (see Fig. 8). A priori, the last procedure may be also used to produce fuel oil, but it is not employed indeed. There is no pre-assignment of final products to tanks, with the exception of asphalt and UVO although this should occur whenever possible, in agreement with Fig. 7. Sometimes it is necessary, in order to meet demand, to temporarily store products in tanks originally dedicated to other oil grades, due to storage limitation. The presence of residual product in the tank, prior to the transfer, requires viscosity adjustment by addition of diluents or pure RASF directly to the tank and homogenization steps. This strategy of allocating the production temporarily in a tank is often applied to optimize the tank farm utilization as a function of the foreseen demand and existing inventory, however it is undesirable once it implies on additional process steps, such as homogenization and viscosity analysis. The storage tanks cannot be charged and discharged simultaneously, with the exception of HG storage tank, which is continually charged. The distribution of a given product, by oil pipeline or trucks, requires that

2272

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

Fig. 9. Plant production throughout the scheduling horizon (06:00 h start time).

two tanks that contain it are connected to the same line, with exception of tanks TK-44108 and TK-43307, which operate individually. Hence, there is the option of replacing the supplier tank in case of problems during the discharge operation, as for example the urgent necessity of receiving material in one of tanks. The distribution of UVO/Asphalt is only performed by trucks, from 06:00 to 18:00 h and the distribution of all FOs is only done by oil pipelines; one is utilized essentially to the transport of FO1 and FO4 to Sa˜o Paulo and another is utilized to transport FO1, FO2 and FO3 to nearby cities. Set-up times can be neglected. The problem is first modeled as a non-convex mixedinteger non-linear programming (MINLP), which has the inconvenience that no global solution is guaranteed by conventional MINLP algorithms, although this difficulty is partially circumvented by the augmented penalty version of the outer-approximation method. A rigorous mixed-integer linear (MILP) model derived from the previous non-linear one is obtained, which may theoretically be solved to global optimality (Pinto & Joly, 2000). The MILP also incorporates transition

relations to compute material loss generated by the undesirable mixing among products transported in the oil pipelines. Although the number of 0–1 variables remains unchanged, the linearization causes an increase in the model size; nevertheless it has the advantage of providing a lower bound to the objective function. The most important operating variables of the problem are the order of plant production, flowrate values of all streams, as well as the distribution schedule. The solvers DICOPT+ + (Viswanathan & Grossmann, 1990) and OSL (IBM, 1991) embedded in the modeling system GAMS (Brooke et al., 1992) were used to implement the MIP optimization models for a scheduling horizon of 3 days discretized in 2 h intervals. In order to reduce the CPU time, the relative optimality criterion was set to a non-zero value and valid constraints were tested to reduce the size of the search tree providing significant timesaving. The computational performances of the both MIP models are evaluated and compared according to algorithmic structures and modeling features. The smaller model (MINLP) has 2629 continuous variables, 1584 0–1 variables and 4630 constraints and its computational results are graphically presented in Figs. 9–11.

4.4. LPG scheduling Liquefied petroleum gas (LPG) is basically a mix of hydrocarbons with three and four carbon atoms. This

Fig. 10. Flowrates in oil pipelines (m3/h).

Fig. 11. Volume ( × 10 − 3 m3) of several tanks as function of time (06:00 h start time).

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

2273

Fig. 12. Refinery LPG system.

product may be used as domestic fuel for cooking and heating and it is also an important source of petrochemical intermediate products, such as propene and iso-butane. In a typical refinery, the catalytic cracking process is the major producer of LPG and approximately a quarter of its load is transformed in three and four carbonatom hydrocarbons. Additional amounts are produced by crude distillation, delayed coking, etc. The fact that LPG can be liquefied at low pressures allows the storage of large amounts in spherical tanks, known simply as spheres. In the refinery studied, the LPG raw material stream is fed to a distillation column, which separates it into a stream rich in hydrocarbons with three carbon atoms and another rich in four carbon atom hydrocarbons. This column can operate in two different modes: normal mode that produces propane for use as domestic fuel (bottled gas or LPG), and special mode, which employs a high internal reflux ratio, that produces propane for petrochemical purposes. This petrochemical propane is a very profitable product and its production is usually maximized. When in this high-purity mode of operation, the column capacity is limited and cannot process the entire LPG stream, which implies that part of it must be bypassed straight to storage. The storage farm comprises eight spheres capable of handling LPG or propane (high pressure and low density) and four spheres suitable for butane storage (low pressure and higher density). The butane produced can also be marketed as bottled gas, or injected in the gasoline pool or, more frequently, fed to the MTBE unit. This unit produces the methyl-terc-butyl-ether, a gasoline additive. It is also possible to feed stored LPG or propane to the separation column, an operation known as reprocessing. The overall scheme of the LPG processing area is shown in Fig. 12. The main scheduling difficulties in this system arise from the fact that most LPG and LPG by-products are

shipped from the refinery through a pipeline. Due to that, large quantities of each product must be available when pipeline pumping starts, since small amounts cannot be shipped in this way. In general the refinery operates by almost reaching its storage capacity and then ships most of the product, ending up with a very small amount. On the other hand, the local market demands LPG more or less continuously. The problem is how to make use of the processing resources, raw material and storage room so that the product delivery schedules and quantities are honored. The objective function asks for the maximization of product deliveries and the available inventory of intermediate propane while the number of spheres used is minimized. The optimization model relies on a mixed integer linear programming (MILP) formulation (Pinto & Moro, 2000). Two main decisions concerning this formulation are the representation of the time domain and the model structure itself, which involves the definition of continuous and discrete variables as well as their relationships. In the MILP formulation, time horizon is divided in a fixed number of time slots of unknown duration. For some of these time slots the initial or final time instant is previously known due to decisions that must happen at that time instant. The other time slots are entirely free but for the fact that they must be subsequent and there must not be overlaps among them. These last are known as soft time slots, whose duration is defined by the optimization algorithm. The first ones are known as hard time slots. The schedule of the inputs must be taken into account when defining the time slots to be used. Any operation whose precise time is known in advance defines a ‘hard’ time slot. On the other hand, the time between two hard time slots may be divided into a number of ‘soft’ time slots, whose duration will be set by the optimization algorithm.

2274

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

The model assumes the existence of several processing units, producing a variety of intermediate streams, with different properties, that can be blended to constitute the desired products. The basic aspects of this formulation were described by Moro et al. (1998) for the planning problem, in which the time domain is not taken into account. In this work we extend that formulation for the scheduling problem, where decisions must be sequenced and time is an important issue. On the other hand, in the present formulation aspects related to product qualities were not investigated (the problem remains linear). We define a unit as a processing element that transforms a feed into several products. The distribution and properties of these products are related to the feed flow rate and properties and the unit operating variables. A product can be the feed of another unit and the feed of any unit is the mix of every stream sent to it. There are two classes of units in the formulation: the processing units and the storage units. The processing units continuously transform the feed into one or more products, so that the steady-state material balance around them is always satisfied. On the other hand, the storage units merely store products for later usage. In this case, the material balance must include the non-stationary accumulation term. The processing units defined for the LPG scheduling problem are as follows: “ Feed unit: it is used simply to mix all the external streams and distribute the resulting mixture to downstream units. It produces only one stream, a mix of C3 and C4 (C3C4) that can be distributed between the distillation column and the bypass unit. “ Distillation column: since the column can operate in two different modes we created two units to represent it and added constraints to assure that only one may operate during a given time slot. The unit used to represent the high-purity propane operation mode produces special propane (C3i) and butane (C4). The other unit produces standard grade propane (C3n) and butane. In both cases the C3 stream can be sent to the spheres or to the bypass unit, while the C4 stream can be directed only to storage. “ MTBE unit: process a C4 stream producing MTBE and raffinate. The MTBE stream is directed to the corresponding product pool unit, while raffinate must be stored in a LPG or butane sphere. “ Spheres: these units have the capability to store product and so are considered storage units. The LPG spheres can send streams to LPG and C3 product pools and to the distillation column to be reprocessed. The butane spheres can feed the LPG and butane product pools and the MTBE unit. “ Product Pools: these units represent the product consumers and are modeled simply as a sink. “ Bypass: represents the pipe that is used to bypass the distillation column and send product direct to the LPG spheres.

The desired product delivery schedule is an input to the optimization algorithm and the LPG production flow rate is also known in advance. During the total time horizon propane, LPG and butane must be produced, sampled, analyzed and delivered. Furthermore the tank farm must be adequately managed, so that the maximum and minimum volumes are honored. We built an example closely related to the actual refinery situation. The total time horizon spans 58 h, during which propane, LPG and butane ought to be produced, sampled, analyzed and delivered to customers. Furthermore the tank farm, comprising eight LPG and propane spheres as well as four butane spheres must be adequately managed. The objective is to maximize product delivery as well as the inventory of petrochemical propane. The LPG production pattern and the desired product deliveries are known in advance as well as the desired feed rate to MTBE unit. In this case, total amount of 3550 m3 of LPG must be delivered between 26 and 34 h. Also, a total volume of 1100 m3 of petrochemical propane must be delivered between 54 and 58 h, while 2000 m3 of butane must be sent to customers between 50 and 54 h. The LPG production flowrate is 137 m3/h and remains the same along the horizon. Moreover, MTBE desired flowrate must be reduced from 14 to 13 m3/h at time 31 h. According to these definitions, a total of ten variablesize time slots were defined, most of which were considered ‘hard’ time-slots, i.e. with known duration. The modeling system GAMS version 2.50 (Brooke et al., 1992) was used to implement the optimization model, which contains 774 discrete variables and 3807 equations and was solved with OSL solver. The results clearly show that the presented optimization system is capable of deriving an adequate schedule for the LPG production decisions. The optimal schedule is shown in Fig. 13.

5. Conclusions Applications in planning and scheduling for refinery operations have been addressed in this paper. It has been shown that these problems can be efficiently formulated as large-scale MIP optimization models. Discrete and continuous time representation approaches for handling the highly combinatorial issues of these representations were tested. Continuous time models were found to avoid the difficulty originated by the relevant differences in processing time of the several operations involved, as in the case of crude receiptscheduling problem. Nevertheless, optimal results were obtained in reasonable time through discretization of scheduling horizon for important areas of the refinery.

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

2275

Fig. 13. Optimal LPG schedule.

Real-world refinery problems were presented and solved. The MILP models can be solved with the LP based branch and bound method while the generalized reduced gradient method was satisfactory for NLP ones. The solution of the MINLP non-convex model presented for the fuel oil production problem can in principle be accomplished with the augmented penalty version of the outer-approximation method implemented in DICOPT + +. The computational requirements of all solution methods proposed are reasonable. However, it is computationally infeasible to obtain global optimal solutions due to the highly combinatorial features of the MIP formulations. In fact, the understanding of these real-world planning/scheduling problems constitute the most difficult step for obtaining optimal solutions, since several operational features of the plant are closely related to the process experts, a fact that represents an additional difficulty to the modeler task. Many times, this is responsible for divergences between the modeler and the user. Suri, Diehl, Treville and Tomsicek (1995) mention this fact as one of the major challenges in Operations Research in the last 15 years since the scientific community frequently see the industrial problems as solved as soon as a paper is published. On the other hand, the dynamic nature of the Petrochemical

Industry requires continuous work in order to allow the necessary enhancements related to the computer aided scheduling tools. Other important areas of the refinery are currently under investigation, such as the distillation units and the FCC area, which operate under different campaigns. The problems of crude oil distribution among the refineries as well as the management of common oil pipelines are also fundamental for the efficient operation of an oil company. More generally, important issues remain to be investigated, such as integration of logistics, planning and scheduling, as well as more efficient modeling and solution techniques. References Ballintjin, K. (1993). Optimization in refinery scheduling: modeling and solution. In T. A. Ciriani, & R. C. Leachman, Optimization in industry, vol. 3 (pp. 191 – 199). New York: Wiley. Bechtel (1993). PIMS (Process Industry Modeling System) User’s manual. Version 6.0. Houston, TX: Bechtel Corp. Bodington, C. E. (1992). Inventory management in blending optimization: use of nonlinear optimization for gasoline blend planning and scheduling. In ORSA/TIMS National Meeting, San Francisco (CA). Bodington, C. E. (1995). Planning, scheduling, and control integration in the process industries. New York: McGraw Hill.

2276

J.M. Pinto et al. / Computers and Chemical Engineering 24 (2000) 2259–2276

Bodington, C. E, & Shobrys, D. E. (1996). Optimize the supply chain. Hydrocarbon Processing, 75 (9), 55–60. Bonner & Moore (1979). RPMS (Refinery and Petrochemical Modeling System): a system description. Houston, NY: Bonner and Moore Management Science. Brooke, A., Kendrick, D., & Meeraus, A. (1992). GAMS — a user’s guide (release 2.25). San Francisco, CA: The Scientific Press. Coxhead, R. E. (1994). Integrated planning and scheduling systems for the refining industry. In T. A. Ciriani, & R. C. Leachman, Optimization in industry, vol. 2 (pp. 185–199). New York: Wiley. Cutler, C. R., & Ayala, J. S. (1993). Integrating off-line schedulers with real time optimizers. In AIChE National Spring Meeting, paper 40a, Houston, TX. Fieldhouse, M. (1993). The pooling problem. In T. A. Ciriani, & R. C. Leachman, Optimization in industry, vol. 3 (pp. 223–230). New York: Wiley. Hartveld, M. (1996). The chemical industry, by country — Brazil. Hydrocarbon Processing, 75 (9), 118–118. IBM (1991). IBM-OSL guide and reference (release 2). Kingston, NY. Ierapetritou, M. G., & Floudas, C. A. (1998). Effective continuoustime formulation for short-term scheduling. 2. Continuous and semicontinuous processes. Industrial & Engineering Chemistry Research, 37, 4360 – 4374. Kondili, E., Pantelides, C. C., & Sargent, R. W. H. (1993). A general algorithm for scheduling batch operations. Computers & Chemical Engineering, 17, 211 –227. Lee, H., Pinto, J. M., Grossmann, I. E., & Park, S. (1996). Mixed-integer linear programming model for refinery short-term scheduling of crude oil unloading with inventory management. Industrial & Engineering Chemistry Research, 35, 1630–1641. Macchietto, S. (1993). Bridging the gap — integration of design, operations scheduling and control. In D. W. T. Rippin, J. C. Hale, & J. F. Davis, Foundations of computer aided process operations (pp. 207 – 230). Austin, TX: CACHE. Magalha˜es, M. V. O., Moro, L. F. L., Smania, P., Hassimotto, M. K., Pinto, J. M., & Abadia, G. J. (1998). SIPP — A solution for refinery scheduling. 1998 NPRA Computer Conference, National Petroleum Refiners’ Association, November 16–18, San Antonio, TX. Mansfield, K. W., Maphet, J. G., Bain, M. L., Bosler, W. H., & Kennedy, J. P. (1993). Gasoline blending with an integrated on line optimization, scheduling and control system. Paper 40b. AIChE National Spring Meeting, Houston, TX. Moro, L. F. L, Zanin, A. C., & Pinto, J. M. (1998). A planning model for refinery diesel production. Computers & Chemical Engineering, 22 (Suppl), S1039–S1042. Moro, L. F. L., & Pinto, J. M. (1998). A mixed-integer model for short-term crude oil scheduling. In AIChE Annual National Meeting, paper 241c. Miami Beach, FL. Pelham, R., & Pharris, C. (1996). Refinery operation and control: a future vision. Hydrocarbon Processing, 75 (7), 89–94.

.

Picaseno-Gamiz, J. (1989). A systematic approach for scheduling production in continuous processing systems. Ph.D. Thesis, University of Waterloo, Waterloo, Canada. Pinto, J. M., & Grossmann, I. E. (1994). Optimal cyclic scheduling of multistage continuous multiproduct plants. Computers & Chemical Engineering, 18 (9), 797 – 816. Pinto, J. M., & Grossmann, I. E. (1998). Assignment and sequencing models for the scheduling of chemical processes. Annals of Operations Research, 81, 433 – 466. Pinto, J. M., & Moro, L. F. L. (2000). A mixed-integer model for LPG scheduling. Accepted at the European Symposium on Computer Aided Process Engineering-ESCAPE-10, Florence, Italy. Pinto, J. M., & Joly, M. (2000). Mixed-integer programming techniques for the scheduling of fuel oil and asphalt production. Accepted at the European Symposium on Computer Aided Process Engineering-ESCAPE-10, Florence, Italy. Po¨rn, R., Harjunkoski, I., & Westerlund, T. (1999). Convexification of different classes of non-convex MINLP problems. Computers & Chemical Engineering, 23, 439 – 448. Ramage, M. P. (1998) The petroleum industry of the 21st Century. In Foundations of computer aided process operations-FOCAPO 98, Snowmass, CO. Reklaitis, G.V. (1992). O6er6iew of scheduling and planning of batch process operations. NATO Advanced Study Institute – Batch Process Systems Engineering, Antalya, Turkey. Rigby, B., Lasdon, L. S., & Waren, A. D. (1995). The evolution of Texaco’s blending systems: from OMEGA to StarBlend. Interfaces, 25 (5), 64 – 83. Sahinidis, N. V., & Grossmann, I. E. (1991). MINLP model for cyclic multiproduct scheduling on continuous parallel lines. Computers & Chemical Engineering, 15, 85 – 103. Shah, N. (1996). Mathematical programming techniques for crude oil scheduling. Computers & Chemical Engineering, 20 (Suppl.), S1227 – S1232. SIPP (1997). Scheduling REVAP – Production scheduling system. System specification. V. 3.0, Petrobras Petro´leo Brasileiro S/A, Rio de Janeiro, Brazil. Steinschorn, D., & Hofferl, F. (1997). Refinery scheduling using mixed integer LP and dynamic recursion. In NPRA Computer conference, New Orleans, LA. Suri, R., Diehl, G. W. W., Treville, S., & Tomsicek, M. J. (1995). From CAN-Q to MPX: evolution of queuing software for manufacturing. Interfaces, 25 (5), 128 – 150. Symonds, G. H. (1955). Linear programming: the solution of refinery problems. New York: Esso Standard Oil Company. Viswanathan, J., & Grossmann, I. E. (1990). A combined penalty function and outer approximation method for MINLP optimization. Computers & Chemical Engineering, 14 (7), 769 – 782. Xueya, Z., & Sargent, R. W. H. (1996). The optimal operation of mixed production facilities. Computers & Chemical Engineering, 20 (6/7), 897 – 904.