Вы находитесь на странице: 1из 22

Brazilian Journal

of Chemical ISSN 0104-6632


Printed in Brazil
Engineering

Vol. 19, No. 02, pp. 207 - 228, April - June 2002

PLANNING AND SCHEDULING


FOR PETROLEUM REFINERIES USING
MATHEMATICAL PROGRAMMING
M.Joly1, L.F.L.Moro1,2 and J.M.Pinto1*
1
Department of Chemical Engineering, University of So Paulo
05508-900, So Paulo - SP, Brazil.
E-mail: jompinto@usp.br
2
PETROBRAS, Petrleo Brasileiro S/A

(Received: December 20, 2001 ; Accepted: April 17, 2002)

Abstract - The objective of this paper is the development and solution of nonlinear and mixed-integer
(MIP) optimization models for real-world planning and scheduling problems in petroleum refineries.
Firstly, we present a nonlinear planning model that represents a general refinery topology and allows
implementation of nonlinear process models as well as blending relations. The optimization model is
able to define new operating points, thus increasing the production of the more valuable products and
simultaneously satisfying all specification constraints. The second part addresses scheduling problems
in oil refineries, which are formulated as MIP optimization models and rely on both continuous and
discrete time representations. Three practical applications closely related to the current refinery scenario
are presented. The first one addresses the problem of crude oil inventory management of a refinery that
receives several types of crude oil delivered exclusively by a single oil pipeline. Subsequently, two
optimization models intended to define the optimal production policy, inventory control and distribution
are proposed and solved for the fuel oil and asphalt plant. Finally, the planning model of Moro et al.
(1998) is extended in order to sequence decisions at the scheduling level in the liquefied petroleum gas
(LPG) area for maximization of the production of petrochemical-grade propane and product delivery.
Keywords: optimization, planning, scheduling, operations research, mixed-integer programming.

INTRODUCTION systems that take into account production objectives.


As a result, unit optimizers were introduced.
The eighties were characterized by the emergence Nevertheless, the optimization of production units
of international markets and the development of does not assure the global economic optimization of
global competition. The chemical processing the plant. The objectives of individual units are
industry had to restructure in order to compete usually conflicting and thus contribute to suboptimal
successfully in this new scenario and better and many times infeasible operation. The lack of
economic performance with more efficient plant computational technology for production scheduling
operation has been achieved (Moro et al., 1998). is the main obstacle to the integration of production
Implementation of advanced control systems in objectives into process operations (Barton et al.,
oil refineries generated significant gains in 1998). A more efficient approach would incorporate
productivity of the plant units. These results current and future constraints in the synthesis of
increased the demand for more complex automation production schedules. The short-term production

*To whom correspondence should be addressed


208 M.Joly, L.F.L.Moro and J.M.Pinto

objectives must be translated into operating has allowed the development of general production
conditions for the processing units. Such an plans for the whole refinery, which can be
approach supplies an analytical tool for the effect of interpreted as general trends. As pointed out by
economic disturbances in the performance of the Pelham and Pharris (1996), planning technology can
production system and provides mechanisms to be considered well developed and major
account for commercial and technological breakthroughs should not be expected. The major
uncertainties. advances in this area will be based on model
This paper describes the approach taken in the refinement, notably through the use of nonlinear
development of optimization models for production programming, as in Picaseno-Gamiz (1989) and,
planning and scheduling of oil refineries. The plant more recently, Moro et al. (1998) and Pinto and
is divided into subsystems, which although coupled, Moro (2000).
allow development of the representation of the main Bodington (1992) also mentions the lack of
scheduling activities within relevant time horizons. systematic methodologies for handling nonlinear
The final objective is to develop strategies for blending relations. Ramage (1998) refers to
incorporating these models in an automated planning nonlinear programming (NLP, MINLP) as a
and scheduling system that generates short-term necessary tool for the refineries of the 21st century,
schedules. as a result of the significant progress made in the
This paper is organized as follows: first, an nineties (Viswanathan and Grossmann, 1990; Prn et
overview of planning and scheduling activities in oil al., 1999).
refineries is introduced. Developments in mixed- On the other hand, there are few commercial tools
integer representations for nonlinear planning for production scheduling and these do not allow a
models are presented, followed by a discussion of rigorous representation of plant particularities (Rigby
optimization work in refinery scheduling with et al., 1995; Moro et al., 1998). For that reason,
applications in crude oil management, production refineries are developing in-house tools strongly
and distribution of oil products, such as fuel based on simulation (Steinschorn and Hofferl, 1997;
oil, asphalt and LPG. Finally, conclusions are drawn Magalhes et al., 1998) in order to obtain essential
and current as well as future developments are information for a given system (Moro and Pinto,
presented. 1998). In the open literature there are specific
applications based on mathematical programming,
such as crude oil unloading and gasoline blending
OVERVIEW OF PLANNING AND (Bodington, 1992; Rigby et al., 1995; Shah, 1996;
SCHEDULING IN OIL REFINERIES Lee et al., 1996). Ballintjin (1993), who compares
continuous and mixed-integer linear formulations
The potential benefits of optimization for process and points out the low applicability of models based
operations in oil refineries with applications of linear only on continuous variables, also discusses the lack
programming in crude blending and product pooling of rigorous models for refinery scheduling.
have long been observed (Symonds, 1955). Oil It has also been recognized that the integration of
refinery management is increasingly concerned with new technologies into process operations is an
improving the planning of their operations. The essential profitability factor and that this can only be
major factor, among others, is the dynamic nature of achieved through appropriate planning (Cutler and
the economic environment. Companies must assess Ayala, 1993; Macchietto, 1993). According to a
the potential impact of variations in demands for survey of hydrocarbon processing companies,
final product specifications, prices and crude oil management pointed to sales and planning, planning
compositions or even be able to explore immediate and operations management and planning and
market opportunities (Magalhes et al., 1998). distribution (Bodington, 1995) as major areas for
Coxhead (1994) identifies several applications of process integration. Mansfield et al. (1993) discuss
planning models in the refinery and oil industry, the issue of integration of the process control,
such as crude selection, crude allocation for multiple optimization and planning activities into gasoline
refineries, partnership models for raw material blending. Bodington and Shobrys (1996) and
supply and operations planning. Steinschorn and Hofferl (1997) point out the
The availability of LP-based commercial software importance of on-line integration of planning,
for refinery production planning, such as PIMS scheduling and control.
(Process Industry Modeling System - Bechtel, 1993),

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 209

This refinery has one crude distillation unit (CD1),


PLANNING MODEL one vacuum distillation unit (VD1), one FCC unit
(FCC), one propane-deasphalting unit (PDA), three
This work focuses on the development of hydrotreating units (two for kerosene and one for
nonlinear planning models for refinery production. diesel, referred to as HT1, HT2 and HT3), one C3/C4
Planning activities involve optimization of raw separation unit (DEP) and one MTBE production
material supply, processing and subsequent unit (UMTBE).
commercialization of final products over one or Figure 1 shows the units, streams and destinations
several time periods. of each stream modeled in this study. The objective
Moro et al. (1998) developed a nonlinear is to analyze different market scenarios and to
planning model for refinery production that can compare the different production frameworks in
represent a general topology. The model relies on a terms of profitability.
general representation of refinery processing units in Two cases are presented in this study. In the first
which nonlinear equations are considered. The unit case we tried to reproduce as closely as possible the
models are composed of blending relations and current situation in terms of stream allocation, while
process equations. Also, the unit variables must in the second case we considered that the market has
satisfy bound constraints, which consist of product an unlimited demand for any product, provided that
specifications, maximum and minimum unit feed all specifications are honored (free market).
flow rates and limits on operating variables. Although this situation does not occur in practice, it
A typical oil refinery generates several streams allows evaluation of the profit improvement margin
that are blended in order to specify a commercial that can be achieved with planning optimization.
product. Furthermore, there are products of different The GAMS modeling system (Brooke et al.,
grades that must satisfy market demands. The model 1998) was used to implement the refinery planning
assumes the existence of several processing units, model, which was solved using the CONOPT
which produce a variety of intermediate streams with algorithm, based on the generalized reduced gradient
different properties that can be blended to constitute method. The model is composed of 254 variables,
the desired products. The topology of the refinery is 210 constraints and 438 nonlinear nonzero elements.
defined by sets that specify connections between The optimization results cause an increase in severity
streams and units. in the atmospheric distillation unit, thus increasing
The model of a typical unit is represented by the diesel production at the expense of vacuum
following variables: distillation feed. As a net result of the changes in
i) Feed flow rate: this is the combination of the rates stream allocation and unit operating variables, the
of every incoming stream. production of gasoline and jet fuel, the most
ii) Feed properties: these are derived from the mixing profitable products, can be increased. These changes
of individual streams calculated through blending can be summarized as follows:
algorithms that are generally nonlinear. i) In the current situation, the heavy naphtha is split
iii) Unit operating variables: variables such as heater almost equally between petrochemical naphtha and
outlet temperature and reaction temperature are used gasoline. Optimization directed most of the heavy
to control unit performance. These variables usually naphtha to the gasoline pool, limited by the octane
influence product flow rates and properties in a very specification. An additional amount was sent to the
nonlinear mode. metropolitan diesel pool, which allows reduction of
iv) Product flow rates: each product stream flow rate the sulfur content, the most limiting specification, in
is a function of the feed flow rate, the feed properties this stream.
and the operating variables. It is important to note ii) On the other hand, addition of naphtha to the
that since each product stream can be sent to various diesel stream is limited by the minimum density
destinations, it may be further split into several specification.
streams. iii) The kerosene stream was allocated in a similar
v) Product properties: these are functions of the feed manner in both situations, with the sole difference
properties and unit operating variables. being that optimization did not send any of this
A real-world application was developed for stream to export fuel oil, thus achieving a slightly
production planning at the REVAP refinery in S. bigger production of jet fuel.
Jos dos Campos (SP, Brazil), as illustrated in Figure The optimization algorithm was able to define a
1 and described in detail in Pinto and Moro (2000). new operating point, thus increasing production

Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
210 M.Joly, L.F.L.Moro and J.M.Pinto

of more valuable oil and pushing product computing technology. One of the major issues has
specifications closer to their constraints. For been on-time representation. Parallel research has
instance, production of propene and metropolitan been conducted on both discrete and continuous-time
diesel increased by three orders of magnitude, models. Another important aspect that is under study
whereas the model indicated production of export concerns compatibility between planning and
fuel oil that was not part of the end product pool scheduling models.
(Pinto and Moro, 2000). This new operating point We address scheduling problems in oil refineries,
represents an increase in profitability of which are formulated as mixed-integer optimization
approximately US$ 50,000,000, which shows the models and rely on both continuous and discrete time
tremendous potential for financial gain embedded in representations. The problem in crude oil inventory
the planning activity. management that involves the optimal operation of
crude oil unloading from pipelines, transfer to
storage tanks and the charging schedule for each
SCHEDULING AT OIL REFINERIES crude oil distillation unit is formulated and solved.
Furthermore, the paper will cover the development
As previously mentioned, scientific work in this and solution of optimization models for short-term
area has concentrated on the development of scheduling of a set of operations in refinery
optimization models and solution methods for production and distribution. Production problems in
refinery subsystems. This is mainly due to the the fuel oil/asphalt and LPG areas of the REVAP
complexity of scheduling operations, which are refinery in So Jos dos Campos (SP, Brazil) are
translated into large-scale combinatorial problems presented. The former area is described in detail in
(NP-Complete, at least), and limitations in section 4.2, including two MIP formulations.

Figure 1: Schematic representation of the REVAP production plant.

Crude Oil Scheduling delivered by an oil pipeline (Moro and Pinto, 1998).
The system consists of a crude oil pipeline, a series
This work addresses the problem of crude oil of storage tanks and distillation units. As in Lee et al.
inventory management at a real-world refinery that (1996) and Shah (1996), the problem involves
receives several types of crude oil, which are transfers from the pipeline to the crude tanks,

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 211

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

Figure 2: Refinery crude system.


Firstly, a discrete-time mixed-integer makes model solution infeasible for a relevant
optimization model was proposed for the generation scheduling horizon, which is of at least three to four
of a schedule for refinery crude oil management. days.
However, this model has severe computational To circumvent this difficulty we develop a second
limitations since it results in a large number of model with variable-length time slots, which
0-1 variables, as in Kondili et al. (1993). This fact represent crude oil receiving operations as well as

Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
212 M.Joly, L.F.L.Moro and J.M.Pinto

periods between the receiving operations. The along the scheduling horizon. A real-world
system generated by this model is capable of creating application is developed for the scheduling of crude
a short-term schedule, spanning a horizon of oil at the REVAP refinery in So Jos dos Campos
approximately one week and taking into account (SP, Brazil), which receives on the order of ten
volume and quality constraints as well as operational different types of crude oil in seven crude storage
rules. These rules include minimum time for crude tanks and has a distillation capacity of 200,000
utilization due to brine settling. There are also barrels per day. The total time horizon spans 112
operational constraints such as the one that imposes hours, during which four completely defined oil
the condition that any time only one tank can receive parcels have to be received from the pipeline.
at the same time but several can feed the columns Six oil tanks are available; all of them have the
simultaneously and another that a tank cannot same capacity, but different amounts and qualities of
receive and send oil at the same time. Inputs to the oil at the beginning of the time horizon. We consider
problem are the crude arrival schedule, which three different kinds of oil, Bonito, Marlin and RGN.
describes the volumes and qualities of the crude oils The distillation unit has a target feed flow rate of
to be received in the refinery within the desired 1,500 m3/h during the entire time horizon.
horizon; the crude demands and the current levels The distribution of the oil parcels during the time
and qualities of crude oil in the storage tanks. horizon is shown in Figure 3, which also shows the
Calculation of crude properties for blended streams subperiods and the number of time slots defined for
is a critical decision. These properties are normally each one of them. More detailed information on the
represented by indices that are linear on a volumetric oil parcels can be found in Table 1.
basis. Nevertheless, indices are nonlinear functions Table 2 describes the initial conditions of the oil
of the properties. This feature complicates solution tank. All tanks are assumed to be adequately
of optimization models since it introduces prepared to feed the distillation unit, i.e., settling has
nonconvex equations and requires the solution of already taken place. The tanks have the same
mixed-integer nonlinear programming models. dimensions and their capacity is 80,000 m3, while the
Based on this information, a schedule is generated minimum operating volume is 13,000 m3. The
to cover the main decisions, such as the strategy for minimum settling time is defined as 24 hours and
feeding oil from the storage tanks to the distillation this is the minimum time necessary for brine
units as well as internal transfers between the tanks separation after a tank receives oil from a pipeline.

oil parcel 3
oil parcel 1 oil parcel 2 oil parcel 4

Figure 3: Oil parcel scheduling.

Table 1: Oil parcel scheduling.

Volume of oil Start time End time


Oil parcel Composition
(m3) (h) (h)
1 60,000 8 20 100% Bonito
2 50,000 48 58 100% Marlin

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 213

3 1,000 58 58.2 100% Marlin


4 60,000 100 112 100% RGN

Table 2: Initial conditions of oil tanks.

Volume
Tank Composition
m3
01 40,000 50% Bonito, 50% Marlin
02 50,000 100% Marlin
03 15,000 70% Bonito, 30% RGN
04 50,000 100% Marlin
05 20,000 60% Bonito, 40% RGN
06 15,000 60% Bonito, 30% Marlin, 10%RGN

Figure 4: Receiving and sending operations during time horizon.

The problem so defined, with 19 time slots, four MILP problem with 21504 binary variables. The
oil parcels, six tanks and three kinds of oil, generates solution of this type of problem is far beyond the
an MILP problem with 912 discrete variables and capabilities of current mixed-integer optimization
5,599 equations, which was solved using the OSL technology.
solver (IBM, 1991) embedded in the GAMS
software. Fuel Oil/Asphalt Production
The solution can be seen in Figure 4. It is clear
that the constraints of minimum settling time and the While some mention that optimization of fuel
demand that the distillation unit be continuously fed oil production does not generally allow fruitful
are honored. increases in refinery profitability (Rigby et al.,
If the fixed-time-slot duration approach were used 1995), the case of the REVAP Refinery is unique
in this same problem, it would be necessary to define (Magalhes et al., 1998) for the following
slot duration as being 15 minutes, thus generating an reasons:

Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
214 M.Joly, L.F.L.Moro and J.M.Pinto

i) the plant has relevant storage limitations in the being utilized to dilute RASF, the TK-42208 level
fuel oil area; must increase at an appropriate rate while pure LCO
ii) most of the plant production is transferred flows in the dilution line (see Figure 5). A strategy of
through oil pipelines, which operate the intense flux allocating the fuel oil production temporarily to a
between refineries; tank is feasible but undesirable since it implies
iii) the plant generates approximately 80% of all fuel additional processing steps, such as viscosity
oil consumed in Brazil and adjustment/homogenization. Storage tanks cannot be
iv) the fuel oil monopoly has recently been broken charged and discharged simultaneously; the HG
(May 1999). storage tank, which is continually charged, is an
The objective is the development and solution of exception The distribution of a given product by
mixed-integer (MIP) optimization models for the oil pipeline or trucks requires that two tanks
related problems of fuel oil and asphalt production. that contain it are connected to the same line; TK-
Figure 5 illustrates the system configuration which 44108 and TK-43307, which operate individually,
includes one deasphalting unit (UDASF), one are exceptions. Hence, the option of replacing
cracking unit (UFCC), two storage tanks for diluents, the supplier tank in the case of an urgent need
fifteen storage tanks for final products, four charging to receive material does not exist. UVO/asphalt is
terminals and two oil pipelines as well as all their only distributed by trucks (from 6:00 a.m. to 6:00
interconnections. During the scheduling horizon, p.m.). Oils are only distributed by oil pipelines.
asphalt residue (RASF) is produced in the UDASF as Demands for these products have been previously
the bottom product and further diluted on-line with defined by refinery planning and should be precisely
at least one of the following diluents: decanted oil met.
(OCC) and light cycle oil (LCO) for the purpose of It is assumed that
producing four grades of fuel oil (FO1, FO2, FO3 (A1) the system is isothermal and at ambient
and FO4), or with another diluent, heavy gasoil temperature;
(HG), to produce two asphalt specifications (CAP 07 (A2) all fluids are incompressible;
and CAP 20). Moreover, the plant produces two (A3) there is a preassignment of products to tanks, as
grades of ultraviscous oil (UVO1 and UVO2) that shown in Figure 5, and temporary storage is not
must have only pure LCO from the UFCC as the allowed;
RASF diluent. The UDASF production must also (A4) the viscosity of the oil mix is calculated by the
satisfy a minimal demand for pure RASF for the weighed volumetric flow of streams into the mixer
refinery oil header (roh). The major specification of (see Figure 5) and their viscosity values;
all final products is the viscosity range, which has to (A5) the mix between RASF and diluents is ideal
be adjusted by proper dilution with the available and there is perfect mixing in the mixer;
diluents. The OCC (from the UFCC) and the HG (A6) the initial plant conditions and demands are
supply streams are completely consumed by the known a priori; there are no deadlines.
plant; the HG supply stream is directed to storage in (A7) changeover times are neglected.
TK-42221 and the OCC stream from UFCC is either Unlike Moro and Pinto (1998), where the time
directly utilized for RASF dilution or directed to required to carry out the task can vary considerably,
storage in TK-42208 (mix of LCO and OCC), since this problem can be modeled under discrete time, as
these two operations cannot occur simultaneously. In in Lee et al. (1996). Due to the dispatching timetable
contrast to the above description, the LCO stream for UVO/asphalt, two modeling rules are imposed:
from the UFCC must be directed to the plant only (R1) the scheduling horizon (SchH) must start at
when necessary, i.e., when it is required to charge either 6:00 a.m. or 6:00 p.m.; (R2) SchH must be a
TK-42208 or when UVO1 (or UVO2) must be natural multiple of 12 hours. Table 3 shows the
produced. In this case, to assert that pure LCO is model nomenclature.

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 215

Figure 5: Schematic representation of the plant.

Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
216 M.Joly, L.F.L.Moro and J.M.Pinto

Table 3: Nomenclature.
(a) Indices and Sets FSEC minimal LCO flow rate directed to TK-
42208 while an UVO is produced;
d = 1,2,,D diluent storage tanks; HTb auxiliary 0-1 parameter to model the
I = 1,2,,I fuel oil storage tanks; timetable of UVO/asphalt unloading;
q = 1,2,,Q UVO/asphalt storage tanks; MIDs nominal viscosity of s;
o = 1,2,,O oil pipelines; MIFOp viscosity specification for p;
s = 1,2,,S diluents; MIUVv viscosity specification for v;
p = 1,2,,P fuel oil grades; MIRASF nominal viscosity of RASF;
v = 1,2,,V UVO/asphalt grades; VDZd initial volume in d;
t = 1,2,,T time interval; VIZi initial volume in i;
b = 1,2,,(DT.( T/12)) auxiliary index (see constraint VQZq initial volume in q;
4h); VDdmin; VDdmax lower and upper volumetric capacity
Sd set of s that can be stored in d, i.e., bounds of d, respectively;
S1={s=1}, S2={s=2;s=3}; VIimin; VIimax lower and upper volumetric capacity
Pi set of p that can be stored in i, i.e., bounds of i, respectively;
P1=P2={p=1}, P3=P4={p=2}, VQqmin ; VQqmax lower and upper volumetric capacity
P5=P6={p=3} and P7={p=4}; bounds of q, respectively.
Vq set of v that can be stored in q, i.e.,
V1=V2={v=1}, V3=V4={v=2}, (c) Binary Variables
V5={v=3 and V6= V7=V8={v=4}. Convention: 1 if the event is true, 0 otherwise.

(b) Parameters XDCt denotes whether TK-42208 is charged at t;


Costs, demands and rates are given on volumetric basis, XICi,t denotes whether i is charged at t;
except where explicitly mentioned. XIDi,o,t denotes whether i is unloaded to o at t;
XQCq,t denotes whether q is charged at t;
CBi pumping costs, per unit flow rate, between XQDq,t denotes whether q is unloaded at t;
tank i and any oil pipeline; XDRASFt denotes whether the dilution line (see
CDs unit cost of diluent s; Figure 5) transports HG at t;
CR RASF unit cost; XLCOt denotes whether the RASF is diluted with
CINVDd inventory cost coefficient of storage in d pure LCO (from UFCC) at t;
per volume and time units; XZt denotes whether the OCC stream (from
CINVIi inventory cost coefficient of storage in i per UFCC) charges TK-42208 at t;
volume and time units; XWt denotes whether CAP-20 is sent to its
CINVQq inventory cost coefficient of storage in q charging terminal (see Figure 5) at t.
per volume and time units;
DMFOo,p demand for p on market fed by o during the (d) Continuous Variables
scheduling horizon; The flow rates are given on a volumetric basis.
DMUVv demand for v during the scheduling
horizon; FRASFAt RASF flow rate from UDASF to roh at t;
DMRA minimal demand for (pure) RASF in FRASFUt RASF flow rate from UDASF to mixer at t;
roh during the scheduling horizon; FDRASFd,t flow rate from d to mixer at t;
DT time length, in hours, of each discretized FIRASFi,t flow rate from mixer (RASF+OCC+LCO) to i at t;
time span. It is restricted to a natural FQRASFq,t flow rate from mixer (RASF+HG or
divisor of 12, i.e., DT {1,2,3,4,6,12}; RASF+LCO) to q at t;
FHG HG feed flow rate to TK-42221; FDCs,t flow rate of diluent s to storage (in the
FLCO, FOCC LCO and OCC nominal production rates by dedicated tank) at t;
UFCC, respectively; FIDi,o,t flow rate from i to o at t;
FDDd max maximum unloading flow rate for d; FQDq,t flow rate from q to respective charging
FIDmax maximum unloading flow rate for i; terminal at t;
FQDmax maximum unloading flow rate for q; FOo,p,t flow rate of p in o at t;
FOomin, FOomax flow rate lower and upper bounds in o, FOCCRt OCC flow rate from UFCC to mixer at t;
respectively; FPLCOt LCO flow rate from UFCC, effectively
FRASFM nominal RASF production rate by used by the plant at t;
UDASF; FRLCOt LCO flow rate from UFCC to mixer at t;
FRASFmin minimal RASF flow rate from UDASF to VDd,t diluent level in d at t;
feed the mixer in t; VIi,t product level in i at t;
Fmax maximum mixing flow rate produced in the VQq,t product level in q at t;
mixer; VISCt viscosity of the blend generated in mixer at t.

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 217

(a) MINLP Model to satisfy product specifications and demands, and


transportation in oil pipelines, as in Pinto et al.
The first optimization model presented in this (2000).
work generates an MINLP that is composed of
objective function (1) and constraints (2a to 6b) as (I) Operating Cost
follows. The formulation relies on the model
developed to represent the short-term scheduling of Minimize
several operations that include receipt of product
from processing units, storage and inventory Operating Cost = Raw-material cost + inventory cost
management in intermediate tanks, blending in order + pumping cost

T S
Operating Cost = (CDs FDCs,t ) + CD2 FOCCR t + CD3 FRLCO t + CR FRASFM +
[
t =1 s =1
I Q D
+ (CINVIi VIi,t ) + (CINVQq VQq,t ) + (CINVDd VQd,t ) + (1)
i =1 q =1 d =1
I O
+ (CBi FIDi,o,t )]
i =1o =1

Subject to
VDd,t ' = VDZd +
(II) Material Balance Constraints
t'
Fuel oil volume in storage tank i at time t = + [ (FDCs,t ) FDRASFd,t ] (2e)
initial fuel oil volume in tank i + fuel oil flow rate t =1 s Sd
from mixer to tank i up to time t fuel oil flow rate d = 1,..., D; t ' = 1,...,T
transferred from tank i to oil pipelines up to time t.
t' O VDd min VDd,t VDd max
VIi,t ' = VIZi + [FIRASFi,t (FIDi,o,t )] d = 1,..., D; t = 1,...,T
(2f)
t =1 o =1
(2a)
i = 1,...,I; t ' = 1,...,T (III) Supply of Demand for Plant Products

Also, all capacities have lower and upper Total amount of fuel oil (sent by oil pipelines) as
bounds. well as UVO/asphalt (delivered to the charging
terminals) must precisely meet the foreseen demand.
VIi min VIi,t VIi max i = 1,..., I; t = 1,...,T (2b) The minimal demand for (pure) RASF for the roh
must also be satisfied.
Similar balances hold for UVO/asphalt and T
diluent storage tanks, as in (2c-2d) and (2e-2f),
respectively.
DMFOo,p = (FOo,p,t ) o = 1,...,O; p = 1,...,P (3a)
t =1
t'
VQq,t ' = VQZq + (FQRASFq,t FQDq,t ) T
t =1
(2c)
DMUVv = (FQDq,t ) v = 1,..., V (3b)
q = 1,...,Q; t ' = 1,...,T t =1q Vq

T
VQq min VQq,t VQq max
(2d)
DMRA (FRASFA t ) (3c)
t =1
q = 1,...,Q; t = 1,...,T
(IV) Operating Rules

Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
218 M.Joly, L.F.L.Moro and J.M.Pinto

Constraint (4h) takes this rule into account by setting


At each time t, continuous plant production must XQDq,t=0 during the nocturnal period.
be directed, to storage in a specific single tank.
XQDq,t HTb
I Q
(XICi,t ) + (XQCq,t ) = 1 t = 1,...,T (4a) b = 1,...,[T /(12 / DT)];
(4h)
i =1 q =1
(12 / DT) (b 1) + 1 t (12 / DT) b;
For operational reasons, storage tanks are not q = 1,...,Q
loaded and unloaded at the same time. An exception
is made for TK-42221, which is continuously where HTb is given by (4i) and denotes the start time
charged with an HG feeding stream. of the scheduling horizon, as follows:
O HT1 = 1 if the scheduling horizon starts at 6 : 00 a.m.
XICi,t + (XIDi,o,t ) 1 i = 1,...,I; t = 1,...,T (4b)
HT1 = 0 if the scheduling horizon starts at 6 : 00 p.m. (4i)
o =1
and HTb-1 HTb b = 2,3,...,(T/(12/DT))
XQCq,t + XQDq,t 1 q = 1,...,Q; t = 1,...,T (4c)
Asphalt production requires HG as the RASF
The unloading conditions for fuel oil, UVO and diluent, as in (4j). Note that XDRASFt is set to 1
asphalt storage tanks are stated by constraints (4d- since HG may never be mixed with OCC and/or
4g). For security reasons, two storage tanks that LCO.
contain the same product must be connected to the
same line when one of them unloads. TK-44108 and 8
TK-43307 are exceptions to this rule. (XQCq,t ) XDRASFt = 0 t = 1,...,T
q =5
XIDi,o,t XIDi +1,o,t = 0 (4j)
(4d)
i = 1,3,5; o = 1,...,O; t = 1,...,T UVO production claims pure LCO (i.e., from the
UFCC) as the RASF diluent, as in (4k).
XQDq,t XQDq +1,t = 0 q = 1,3; t = 1,...,T (4e)
4

It is important to note that an oil pipeline can (XQCq,t ) XLCOt = 0 t = 1,...,T (4k)
q =1
transport only one fuel oil grade at each time t, as
stated by (4f).
The continuous OCC production by the UFCC
must either be stored in TK-42208 or sent directly to
I
the mixer to produce fuel oil. However, the OCC
(XIDi,o,t ) 2 o = 1,...,O; t = 1,...,T (4f)
stream (from the UFCC) can only be stored at time t
i =1 if TK-42208 is able to receive material at this time,
as in (4l).
When CAP-20 is unloaded, then XWt=1 (0
otherwise). Hence, only two of three CAP-20 storage XZt XDC t t = 1,...,T
tanks are connected to the terminal line, as in (4g).
(4l)
8
( (XQDq,t )) 2 XWt = 0 t = 1,...,T (4g) While an UVO or asphalt is being produced, the
OCC stream should be directed to storage in TK-
q =6
42208, as stated by (4m-4n), since these products
must not contain OCC.
UVO and asphalt can be sent through the truck
terminals only from 6:00 a.m. to 6:00 p.m. XDRASFt + (1 XZt ) 1 t = 1,...,T (4m)

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 219

XLCO t + (1 XZ t ) 1 t = 1,...,T (4n) 0 FDRASF1,t XDRASFt FDD1max


(V) Material Flow Constraints (5f)
t = 1,...,T (TK-42221)
The continuous RASF production by the UDASF
can be divided into two streams. One of them feeds 0 FDRASF2,t min[(1 XDCt ),
the roh. The other is sent to the mixer, where at each
time t, a fuel oil, UVO or asphalt is produced, as in ,(1 XDRASFt )] FDD2max (5g)
(5a). Constraint (5b) imposes a lower bound on the
RASF flow rate to the mixer. t = 1,...,T (TK-42208)

FRASFM = FRASFA t + FRASFU t As mentioned above, TK-42221 is continuously


(5a) charged at a constant rate, as in (5h).
t = 1,...,T
FDC1,t = FHG t = 1,...,T
FRASFU t FRASFmin t = 1,...,T (5b) (5h)

The blended stream generated in the mixer is OCC production by the UFCC is either totally
given by the sum of RASF and diluent streams stored (TK-42208) or directed to the mixer, as in (5i-
directed to the mixer at time t, as in (5c). 5j).
Furthermore, it must obey pump limitations in lines
of the plant, as in (5d-5e). FDC2,t = XZt FOCC t = 1,...,T (5i)

I Q
FOCCR t = (1 XZ t ) FOCC t = 1,...,T
(FIRASFi,t ) + (FQRASFq,t ) = (5j)
i =1 q =1
D LCO production by the UFCC is directed to the
(5c)
= FRASFU t + (FDRASFd,t ) + plant only when charging TK-42208 and/or
producing UVO is desired, as in (5k). In the latter
d =1
case, to assure that pure LCO is being used as the
+ FOCCR t + FRLCO t t = 1,...,T RASF diluent, TK-42208 must be fed with a
minimal LCO flow rate (FSEC) while UVO is
0 FIRASFi,t XICi,t Fmax produced, as stated by (5l).
(5d)
i = 1,..., I; t = 1,...,T FPLCO t = FDC3,t + FRLCO t t = 1,...,T (5k)

0 FQRASFq,t XQCq,t Fmax FDC3,t FSEC XLCO t t = 1,...,T (5l)


(5e)
q = 1,...,Q; t = 1,...,T Furthermore, the nominal LCO production rate of
the UFCC must be obeyed, as in (5m-5n).
A diluent storage tank can unload at time t if
during this interval: 0 FRLCO t XLCO t FLCO t = 1,...,T (5m)

i) it is not being charged, 0 FPLCO t XDC t FLCO t = 1,...,T (5n)


ii) the dilution line is not being used by the other
diluent storage tank, and
iii) the plant is not producing UVO. Flow rates must obey pump limitations, as stated
by (5o-5p).
Note that i) does not hold for the HG storage tank
since it is continuously charged. Constraints (5f-5g) 0 FIDi,o,t XIDi,o,t FID max
consider these conditions for TK-42221 (HG) and (5o)
TK-42208 (LCO+OCC), respectively. i = 1,..., I; o = 1,...,O; t = 1,...,T

Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
220 M.Joly, L.F.L.Moro and J.M.Pinto

0 FQDq,t XQDq,t FQD max of FDRASF2,t twice since the TK-42208 stores two
kinds of diluents.
(5p)
q = 1,...,Q; t = 1,...,T
D s2

At each time t, the flow rate of product p in oil


{[ (FDRASFd,t MIDs ) + FRASFUt
d =1 sSd
pipeline o is given by the summation of streams
from fuel-oil storage tanks (restricted to the set Pi ) MIRASF + FOCCR t MID2 + FRLCOt MID3 ] /
to this pipeline, as in (5q). (6b)
D
FOo,p,t = (FIDi,o,t )
/[( (FDRASFd,t ) + FRASFUt + FOCCR t +
d =1
iPi
(5q) + FRLCOt ]} = VISCt t = 1,...,T
o = 1,...,O; p = 1,..., P; t = 1,...,T
It is important to note that (6b), which results
Also, when not null, the flow rate in oil pipelines immediately from assumption (A4), is nonlinear.
has lower and upper bounds, as in (5r-5s). Furthermore, (6b) is a nonconvex bilinear equation,
which is hard to solve (Quesada and Grossmann,
FOo,p,t FOo min 1995). On the other hand, a suitable mathematical
treatment of equations (6a) and (6b), similar to that
i6 i>6 done by Lee et al. (1996), allows derivation of an
[ (0.5 XIDi,o,t ) + (XIDi,o,t )] (5r) exact MILP model.
iPi iPi
(b) MILP Model
o = 1,...,O; p = 1,..., P; t = 1,...,T
Due to the analogy between viscosity and
FOo,p,t FOo max composition implicit in assumption (A4), we
(5s) reformulate the viscosity constraints (6a-6b) in a
o = 1,...,O; p = 1,..., P; t = 1,...,T linear way. Details can be found in Joly (1999). In
contrast to Lee et al. (1996), in which a rigorous
linear reformulation could not be obtained due to the
Note that factor 0.5 in (5r) restricts the existence of lower and upper bounds for the product
summation value on the right-hand side to either 0 or specification, an exact linear formulation may be
1 since when XIDi,o,t=1 (i=1,3,5), we have derived since the problem has exact values for
XIDi+1,o,t=1 due to tank alignment. viscosity specifications. The linear formulation relies
on management of viscosity by disaggregation of the
(VI) Viscosity Constraints stream variables into two sets. The first one is used
to perform material balances in the system and the
At each time t, viscosity must be adjusted other, which is composed only of new variables,
according to the product, as in (6a). takes into account the viscosity characteristics of the
streams. The reformulated linear constraints are
Q given by (7a-7i).
VISC t = (MIUVv XQCq,t ) +
q =1 vVq t'

I
(6a) VIK i,t ' = VIZi MIi + [FIRASFKi,t
t =1
+ (MIFOp XICi,t ) t = 1,...,T O
(7a)
i =1 pPi
(FIDKi,o,t )] i = 1,..., I; t ' = 1,...,T
o =1
In addition, the availability of diluents should be
considered, as stated by (6b). Here, the double
summation is restricted to s 2 to avoid computation VIi,t MIi = VIK i,t i = 1,..., I; t = 1,...,T (7b)

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 221

FIRASFK i,t XICi,t Ui VQq,t MQq = VQK q,t


(7c) (7f)
where Ui = Fmax MIi i = 1,..., I; t = 1,...,T q = 1,...,Q; t = 1,...,T

FIDi,o,t MIi = FIDKi,o,t


FQRASFK q,t XQCq,t U q
i = 1,..., I; o = 1,...,O; t = 1,...,T
(7d) where Uq = Fmax MQq (7g)
q = 1,...,Q; t = 1,...,T
VQK q,t ' = VQZq MQq +
t' FQDq,t MQq = FQDK q,t
+ (FQRASFKq,t FQDKq,t ) (7e)
(7h)
t =1 q = 1,...,Q; t = 1,...,T
q = 1,...,Q; t ' = 1,...,T

D s2
FRASFU t MIRASF + (FDRASFd,t MIDs ) + FOCCR t MID2 +
d =1 sSd
I Q (7i)
+ FRLCO t MID3 = (FIRASFKi,t ) + (FQRASFKq,t ) t = 1,...,T
i =1 q =1

Constraint (6b) is replaced by linear constraint (IBM, 1991), which was also applied to the MILP
set (7a, 7b, 7e, 7f, 7i), and therefore variable master problems of DICOPT++. CONOPT2
VISCt is eliminated. The remaining constraints are (Brooke et al., 1998) and MINOS5 (Brooke et al.,
due to the need to reformulate constraint (6a), 1998) were used to solve the NLP subproblems.
since variable VISCt no longer exists (constraints Stop on worsening NLP was the stopping criterion
7c and 7g), and to preserve to consistency of the for DICOPT++.
reformulated model (constraints 7d and 7h). An A real-world example based on maximum plant
important feature of this MILP model is that new capacity (200,000 m3/month) is presented. The
constraints and continuous variables are necessary. main plant data are reported in Table 4. Model
However, it is important to note that the dimensions are shown in Figure 6. Figures 7 to 9
combinatorial aspect of the MINLP model is illustrate some results. Four cases of unavailability
preserved. The MILP structure is composed of the of the oil pipeline to So Paulo are also
same objective function given in (I) and considered: unavailability between t=0 and t=9
constraints stated in (II), (III), (IV), (V) as well as (case A), 9t18 (case B), 18t27 (case C) and
constraints (7a-7i). 27t36 (case D).
Table 5 shows the computational performance
(c) Computational Results of the MIP models. Aiming to consider costs
originating from the material loss produced by the
The GAMS modeling system (Brooke et al., undesirable mixing of products transported in oil
1998) was used in order to implement the MIP pipelines, we incorporate transition constraints
optimization models and generate their solutions. (TCs), as proposed in Pinto and Joly (1999).
The DICOPT++ outer-approximation code Figure 8 compares the resulting delivery schedules
(Viswanathan and Grossmann, 1990) solved the with and without TCs. Incorporating TCs increases
nonconvex MINLP model, whereas the solution of substantially the MIP dimension; the MILP model
the MILP model was obtained with an LP-based now has 6733 variables, of which 1968 are
branch and bound (BB) search performed by OSL binaries, and 7985 constraints.

Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
222 M.Joly, L.F.L.Moro and J.M.Pinto

Table 4: Main plant data for the real-world example (SchH = 3 days; DT = 2 hours).

Fuel-oil storage tanks i=1 i=2 i=3 i=4 i=5 i=6 i=7
-3 3
Capacity limitation (10 .m ) 2-30 2-30 2-30 2-30 2-30 2-30 2-65
3
Max. unload. flow rate (m /h) 167 167 167 167 167 167 167
UVO/Asphalt storage tanks q=1 q=2 q=3 q=4 q=5 q=6 q=7 q=8
Capacity limitation (10-3.m3) 0.5-4 0.5-4 0.5-4 0.5-4 0.5-4 0.5-4 0.5-4 0.5-4
Max. unload. flow rate (m3/h) 83 83 83 83 83 83 83 83
Diluent and RASF
Diluent storage tanks d=1 d=2 s=1 s=2 s=3 RASF
specification
Capacity limitation (10-3.m3) 2-50 2-50 Viscosity range 20 4 4 35
3 3
Max. unload. flow rate (m /h) 208 208 Plant production (m /h) 25 67 67 150
Product specification p=1 p=2 p=3 p=4 v=1 v=2 v=3 v=4
Viscosity range 14 16 18 20 18 24 30 32
-3 3 *
Demand (10 .m ) 0.7/3 2/0.8 3.5/0 0/3 1.2 2.2 0.9 2.9
Stream FRASFM Fomin* Fomax* FSEC max
F
3
Flowrate (m /h) 150 42/42 333/416 8.33 240
*
Relative to the local oil pipeline (o=1) and the oil pipeline to So Paulo (o=2), respectively.

Table 5: Computational performance (Pentium266 Mhz).

Case Model Nodes Iter. CPU time (s) Objective

MILP 937 15674 570.46 969.61


A
MINLP - 13815 335.36 966.99
MILP 1296 16626 711.01 965.72
B
MINLP - 15508 391.45 961.14
MILP 764 13086 490.86 954.99
C
MINLP - 23792 531.98 956.99
MILP 1197 23080 851.78 950.65
D
MINLP - 12845 299.30 959.49

0-1 variables
constraints
continuous variables 6890
4514 4465
2629
1512 1512

MINLP model MILP model

Figure 6: Dimensions of the MIPs

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 223

10 F O 1 (p =1 ) 12 4 4
10 UVO 1 (v =1)
8 TK-43301 (i=1)
8 TK-44113 (q=1)
6 TK-43302 (i=2)
6 F O 2 (p =2 ) 2 TK-44114 (q=2) 2 UVO 2 (v =2 )
4
4 TK-43303 (i=3) TK-44111 (q=3)
2 2 TK-44112 (q=4)
TK-43304 (i=4)
0 0 0 0
1 4 7 10 13 16 19 22 25 28 31 34 37 1 36 1 36 1 36

10 10 4 4
F O 4 (p =4 ) C A P -0 7 (v =3 )
8 8
TK-43 307(i=7) TK-44 108 (q=5)
6 6 C A P -2 0 (v =4 )
F O 3 (p =3 )
2 2
4 TK-4 33 05 (i=5 ) 4 TK-44110 (q=6)
2 TK-4 33 06 (i=6 ) TK-44115 (q=7)
2
TK-44116 (q=8)
0 0 0 0
1 36 1 36 1 36 1 36

Figure 7: Volume (m3) x Time for fuel-oil storage tanks.


3 3
(m /h ) L OC A L OIL P IP E L INE (o =1) (m /h ) LO C AL O IL P IP E LIN E FO1
400 400 (WIT H T RANS IT IO N M O D E L ING )
FO2
300 FO1 300 FO3
FO2 FO4
200 200
FO3
100 FO4 100

0 0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35

3 3
(m /h ) OIL P IPE L INE T O S O P AUL O (o=2 ) (m /h ) FO1
O IL P IP E L INE T O S O P A ULO
400 FO1 400 (WIT H T RANS IT IO N M O D E L ING ) FO2
300 FO2 300 FO3
FO3 FO4
200 200
FO4
100 100

0 0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35

Figure 8: Dispatch schedules without (left) and with (right) transition constraints.
PRODUCTION SCHEDULE AND STORAGE INFORM ATION
START (6:00 A.M.) END (6:00 A.M.)
t=1 5 10 15 20 25 30 36 FO1 UVO1
1

FO2 UVO2
0
FO3 CAP-07
4113
3307
3301
3301
3307
3301
3302
4108
3302
4108
3301
4108
3301
4108
3302
3307
3301
4113
3301
3301
3307
3307
3301
4108
4108
3307
3301
3301
3301
3303
3302
3307
3301
3301
3301
3301

FO4 CAP-20
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4
TK-4

Figure 9: Production schedule and storage information.

LPG Scheduling distillation, delayed coking etc. The fact that LPG
can be liquefied at low pressures allows the storage
Liquefied petroleum gas (LPG) is basically a mix of large amounts in spheres.
of hydrocarbons with three and four carbon atoms. In the refinery studied, the LPG raw material
This product may be used as domestic fuel for stream is fed to a distillation column, which
cooking and heating, and it is also an important separates it into one stream that is rich in three-
source of petrochemical intermediate products, such carbon-atom hydrocarbons and another that is rich in
as propene and iso-butane. four-carbon-atom hydrocarbons. This column
In a typical refinery, the catalytic cracking operates in two different modes: the normal mode,
process is the major producer of LPG and producing propane for use as domestic fuel (bottled
approximately a quarter of its load is transformed gas or LPG), and the special mode, which employs a
into three- and four-carbon atom hydrocarbons. high internal reflux ratio, aiming at the production of
Additional amounts are produced by crude propane for petrochemical purposes. This
Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
224 M.Joly, L.F.L.Moro and J.M.Pinto

petrochemical propane is very profitable and its (low pressure and higher density). The butane
production must usually be maximized. When in this produced can also be marketed as bottled gas or
high-purity mode of operation, the capacity of the injected into the gasoline pool or, more frequently,
column is limited and it cannot process the entire fed into the MTBE unit. This unit produces methyl-
LPG stream, which implies that part of it must be terc-butyl-ether, a gasoline additive. It is also
bypassed to storage. possible to feed stored LPG or propane into the
The storage farm comprises eight spheres capable separation column, an operation known as
of handling LPG or propane (high pressure and low reprocessing. The overall scheme of the LPG
density) and four spheres suitable for butane storage processing area is shown in Figure 10.

Figure 10: Refinery LPG system.

The main scheduling difficulties in this system In the MILP formulation, time horizon is divided
arise from the fact that most LPG and LPG by- into a fixed number of time slots of unknown
products are shipped from the refinery through a duration. For some of these time slots the initial or
pipeline. Because of this, large quantities of each final instant in time is already known due to
product must be available when pumping starts, knowledge of decisions that occur at that instant in
since small amounts cannot be transferred. In general time. Other time slots are entirely free, but for the
the refinery operates by almost reaching its storage reason that they must occur in order and have no
capacity and then shipping most of the product, overlaps between them. The latter are known as soft
ending up with a very small amount. In contrast, the time slots, whose duration is defined by the
local market demand for LPG is almost continuous. optimization algorithm. The former are known as
The problem is to make use of the processing hard time slots. The schedule of the inputs must be
resources, raw material and storage room in such a taken into account when defining the time slots to be
way that product delivery schedules and quantities used. Any operation whose precise start and/or end
can be honored. The objective function involves time is known in advance is defined as a hard time
maximization of product deliveries and of the slot. On the other hand, the time between two hard
available inventory of intermediate propane for the time slots may be divided into a number of soft
minimal number of spheres used. time slots, whose durations will be set by the
The optimization model relies on a Mixed-Integer optimization algorithm. The number of slots is in
Linear Programming (MILP) formulation. Two main principle arbitrary; however, it must be defined in
decisions concerning this formulation are now to order to guarantee a sufficiently precise solution for
represent the time domain and how to structure the a reasonable computational time.
model, which involves definition of continuous and The model assumes the existence of several
discrete variables as well as their relationships. processing units, which produce a variety of

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 225

intermediate streams with different properties that spheres can send streams to LPG and C3 product
can be blended to constitute the desired products. pools and to the distillation column to be
The basic aspects of this formulation were described reprocessed. The butane spheres can feed the LPG
in section 3 of the present paper and by Moro et al. and butane product pools and the MTBE unit.
(1998) for the planning problem, in which the time v) Product pools: these units represent the product
domain is not taken into account. In this work we consumers and are modeled simply as a sink.
extend that formulation to the scheduling problem, vi) Bypass: represents the pipe that is used to bypass
where decisions must be sequenced and time is an the distillation column and send the product directly
important issue. Nevertheless, in the present to the LPG spheres.
formulation aspects related to product quality were The desired product delivery schedule is an input
not investigated so the problem remains linear. into the optimization algorithm and the LPG
A unit is a processing element that transforms a production flow rate is also known in advance.
feed into several products. The distribution and During the overall time horizon propane, LPG and
properties of these products are related to the feed butane must be produced, sampled, analyzed and
flow rate and properties and the unit operating delivered. Furthermore the sphere farm must be
variables. A product can be the feed of another unit adequately managed so that the maximum and
and the feed of any unit is the mix of every stream minimum volumetric capacities are honored.
sent to it. The following example is closely related to the
There are two classes of units in the formulation: actual refinery situation. The total time horizon spans
the processing units and the storage units. The 108 hours, during which propane, LPG and butane
processing units continuously transform the feed into must be produced, sampled, analyzed and delivered
one or more products so that the steady-state material to customers. Furthermore the tank farm, comprising
balance around them is always satisfied. On the other eight LPG and propane spheres and four butane spheres,
hand, for storage units the material balance must must be adequately managed so that the maximum and
include the nonstationary accumulation term. The minimum volumetric bounds are satisfied.
processing and storage units defined for the LPG The desired product delivery schedule and the
scheduling problem are as follows: LPG production flow rate are inputs into the
i) Feed unit: it is used simply to mix all the external optimization algorithm. The objective is to maximize
streams and distribute the resulting mixture to product deliveries and the available inventory of
downstream units. It produces only one stream, a intermediate propane.
mix of C3 and C4 (C3C4) that can be distributed According to these definitions, a total of twelve
between the distillation column and the bypass unit. variable-size time slots were defined and the GAMS
ii) Distillation column: since the column can operate modeling system (Brooke et al., 1998) was used to
in two different modes it was necessary to create two implement the optimization model, which contains
units to represent it, and constraints were added to 536 discrete variables and 3294 equations, and was
assure that only one can operate during a given time solved with the OSL solver (IBM, 1991). Solution of
slot. The unit used to represent the high-purity this type of problem in a Pentium II 300MHz PC
propane operation mode produces special propane may take several minutes to a few hours.
(C3i) and butane (C4). The other unit produces Figure 11 shows the operations performed during
standard grade propane (C3n) and butane. In both the scheduling horizon in the spheres. This figure
cases the C3 stream can be sent to the spheres or to makes clear that the main operating rules for the
the bypass unit, while the C4 stream can be directed LPG and C3 spheres (EF01 to EF08) are satisfied,
only to storage. e.g., that the finished product can be withdrawn from
iii) MTBE unit: it is used to process a C4 stream a sphere only after the minimum resting time of 24
producing MTBE and raffinate. The MTBE stream hours has elapsed. In this example, only five spheres
is directed to the corresponding product pool unit, were necessary to accomplish the operations. The
while raffinate must be stored in a LPG or butane results for the butane spheres (EF25 to EF28) reveal
sphere. a similar behavior. Only three butane spheres were
iv) Spheres: these units have the capability to store found to be necessary to perform the operations.
the product so are considered storage units. The LPG

Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
226 M.Joly, L.F.L.Moro and J.M.Pinto

(a) LPG and C3 spheres (b) Butane spheres

Figure 11: Gantt charts for the LPG problem.

CONCLUSIONS causes an increase in model size; nevertheless it has


the advantage of providing a lower bound to the
Applications in planning and scheduling for objective function. Interestingly, similar results were
refinery operations have been addressed in this obtained in terms of both solution quality and
paper. Discrete and continuous time representation computational times.
approaches for handling the highly combinatorial Clearly, while susceptible to infeasible times to
issues of these representations were tested. obtain global optimal solutions, these modeling and
Continuous-time models were found to avoid the solution strategies enable the scheduler to explore
difficulty originating in the relevant differences in market opportunities, mainly in the short term or in
processing time of the operations involved, as in the any unexpected situation, and thus provide an
case of the crude-receipt scheduling problem. efficient tool. Therefore, the dynamic nature of the
Nevertheless, satisfactory results were obtained petrochemical industry requires continuous work in
within a reasonable period of time by discretization order to allow the necessary enhancements related to
of the scheduling horizon for important areas of the computer-aided scheduling tools to be made.
refinery. In fact, understanding of these real-world
It has been shown that planning/scheduling planning/scheduling problems constitutes the most
problems can be efficiently formulated as large-scale difficult step in reaching this target, since several
MIP models. Clearly, the complexity of these operational features of the plant are closely related to
problems resides in the large number of the process experts, a fact that presents an additional
combinatorial alternatives due to the operational difficulty to the modeler. Many times, this is
decisions that must be taken in order to satisfy all responsible for divergences between the modeler and
product requirements. In order to provide a better the user. Suri et al. (1995) mention this fact as one of
understanding of modeling techniques, a more in- the major challenges in operations research during
depth view of the inherent features of the fuel oil and the last 15 years, since the scientific community
asphalt production problem was presented. As frequently considers industrial problems to be solved
discussed, the problem can in principle be modeled as soon as a paper is published.
as a large-scale MINLP, which has the disadvantage Other important areas of the refinery, such as the
that no global solution is guaranteed by conventional distillation units and the FCC area, which operate
MINLP solution algorithms due to bilinear terms in under different schedules, are currently under study.
viscosity constraints. These nonconvexities can be The problems of crude oil distribution between the
avoided by introducing individual entity flows. A refineries as well as the management of common oil
rigorous MILP model derived from the previous pipelines are also fundamental to the efficient
nonlinear one is then obtained in order to ensure operation of an oil company. More general,
theoretical global optimality. This linearization important issues, such as integration of logistics,

Brazilian Journal of Chemical Engineering


Planning and Scheduling for Petroleum Refineries 227

planning and scheduling as well as more efficient Lee H., Pinto, J.M., Grossmann, I.E. and Park, S.
modeling and solution techniques, remain to be (1996) Mixed-Integer Linear Programming
studied. Model for Refinery Short-Term Scheduling of
Crude Oil Unloading with Inventory
Management. Ind. Eng. Chem. Res., 35, 1630-
REFERENCES 1641.
Macchietto, S. (1993) Bridging the Gap Integration
Ballintjin, K. (1993) Optimization in Refinery of Design, Operations Scheduling and Control.
Scheduling: Modeling and Solution. In: In: Foundations of Computer Aided Process
Optimization in Industry, 3, Ciriani, T.A. and Operations; Rippin, D.W.T., Hale, J.C., Davis,
Leachman, R.C., Eds, 191-199. John Wiley & J.F., Eds, 207-230, CACHE, Austin.
Sons, New York. Magalhes, M.V.O., Moro, L.F.L., Smania, P.,
Barton, P.I., Allgor, R.J., Feehery, W.F. and Galn, Hassimotto, M.K., Pinto, J.M. and Abadia, G.J.
S. (1998) Dynamic Optimization in a (1998) SIPP A Solution for Refinery
Discontinuous World. Ind. Eng. Chem. Res., 37, Scheduling. In: 1998 NPRA Computer
966-981. Conference, National Petroleum Refiners
Bechtel (1993) PIMS (Process Industry Modeling Association, November 16-18, San Antonio.
System) User's Manual. Version 6.0, Bechtel Mansfield, K.W., Maphet, J.G., Bain, M.L., Bosler,
Corp., Houston. W.H. and Kennedy, J.P. (1993) Gasoline
Bodington, C.E. (1992) Inventory Management in Blending with an Integrated On-line
Blending Optimization: Use of Nonlinear Optimization, Scheduling and Control System. In:
Optimization for Gasoline Blend Planning and AIChE National Spring Meeting, Paper 40b,
Scheduling. In: ORSA/TIMS National Meeting, Houston.
San Francisco. Moro, L.F.L, Zanin, A.C. and Pinto, J.M. (1998) A
Bodington, C.E. (1995) Planning, Scheduling, and Planning Model for Refinery Diesel Production.
Control Integration in the Process Industries. Comput. Chem. Eng, 22 (Suppl.), S1039- S1042.
McGraw Hill, New York. Moro, L.F.L. and Pinto, J.M. (1998) A Mixed-
Bodington, C.E. and Shobrys, D.E. (1996) Optimize Integer Model for Short-Term Crude Oil
the Supply Chain. Hydrocarbon Processing, Scheduling. In: AIChE Annual National Meeting,
75(9), 55-60. paper 241c, Miami Beach.
Brooke, A., Kendrick, D., Meeraus, A. and Raman Pelham, R. and Pharris, C. (1996) Refinery
R. (1998) GAMS - A User's Guide. GAMS Operation and Control: A Future Vision.
Development CO., Washington DC. Hydrocarbon Processing, 75(7), 89-94.
Coxhead, R.E. (1994) Integrated Planning and Picaseno-Gamiz, J. (1989) A Systematic Approach
Scheduling Systems for the Refining Industry. In: for Scheduling Production in Continuous
Optimization in industry, 2, Ciriani, T.A. and Processing Systems. Ph.D. thesis. (in English),
Leachman, R.C., Eds, 185-199, John Wiley & University of Waterloo, Waterloo (Canada).
Sons, New York. Pinto, J.M. and Joly, M. (1999) MILP Model for
Cutler, C.R. and Ayala, J.S. (1993) Integrating Off- Scheduling of Continuous Multiproduct Plant
line Schedulers with Real Time Optimizers. Paper Distribution. In: 15th Int. Conference on CAD/CAM
40a. In: AIChE National Spring Meeting, Robotics & Factories of the Future, guas de
Houston. Lindia (Brazil).
IBM (1991) IBM-OSL Guide and Reference (release Pinto, J.M., Joly, M. and Moro, L.F.L. (2000)
2), Kingston. Planning and Scheduling Models for Refinery
Joly, M. (1999) Mixed Integer Optimization Operations Comput. Chem. Eng., 24, 2259-2276.
Techniques for the Scheduling and Production Pinto, J.M. and Moro, L.F.L. (2000) A Planning
Management in Petroleum Refineries. M.Sc. diss. Model for Petroleum Refineries. Braz. J. Chem.
(in Portuguese), Escola Politcnica da Eng., 17(04-07), 575-585.
Universidade de So Paulo, So Paulo (Brazil). Prn, R., Harjunkoski, I. and Westerlund, T. (1999)
Kondili, E., Pantelides, C.C. and Sargent, R.W.H. Convexification of Different Classes of Non-
(1993) A General Algorithm for Scheduling convex MINLP Problems. Comput. Chem. Eng.,
Batch Operations. Comput. Chem. Eng 17, 211- 23, 439-448.
227.

Brazilian Journal of Chemical Engineering, Vol. 19, No. 02, pp. 207 - 228, April - June 2002
228 M.Joly, L.F.L.Moro and J.M.Pinto

Quesada, I. and Grossmann, I.E. (1995) Global Dynamic Recursion. In: NPRA Computer
Optimization of Bilinear Process Networks with Conference, New Orleans.
Multicomponent Flows. Comput. Chem. Eng., 19, Suri, R., Diehl, G.W.W., Treville, S. and Tomsicek,
1219-1242. M.J. (1995) From CAN-Q to MPX: Evolution of
Ramage, M.P. (1998) The Petroleum Industry of the Queuing Software for Manufacturing. Interfaces
21st Century. In: Foundations of Computer Aided 25 (5), 128-150.
Process Operations FOCAPO 98, Snowmass. Symonds, G.H. (1955) Linear Programming: The
Rigby, B., Lasdon, L.S. and Waren, A.D. (1995) The Solution of Refinery Problems. Esso Standard Oil
Evolution of Texacos Blending Systems: From Company, New York.
OMEGA to StarBlend. Interfaces, 25(5), 64-83. Viswanathan, J. and Grossmann, I.E. (1990) A
Shah, N. (1996) Mathematical Programming Combined Penalty Function and Outer
Techniques for Crude Oil Scheduling. Comput. Approximation Method for MINLP Optimization
Chem. Eng., 20 (Suppl.), S1227- S1232. Comput. Chem. Eng., 14(7), 769-782.
Steinschorn, D. and Hofferl, F. (1997) Refinery
Scheduling Using Mixed Integer LP and

Brazilian Journal of Chemical Engineering

Вам также может понравиться