Академический Документы
Профессиональный Документы
Культура Документы
Vol. 19, No. 02, pp. 207 - 228, April - June 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.
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, 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.
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,
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.
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
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
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, 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.
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
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)
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)
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
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)
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.
0-1 variables
constraints
continuous variables 6890
4514 4465
2629
1512 1512
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
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
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.
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
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
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