Jaime Cerdá*, Pedro C. Pautasso and Diego C. Cafaro

crude oil (B), time slots (S) and microcuts (MC), with the last set used to define .... (10) states that a charging tank tk either has a single predec...
1 downloads 0 Views 2MB Size
Subscriber access provided by University of Massachusetts Amherst Libraries

Process Systems Engineering

Optimization approaches for efficient crude blending in large oil refineries Jaime Cerda, Pedro Carlos Pautasso, and Diego Carlos Cafaro Ind. Eng. Chem. Res., Just Accepted Manuscript • DOI: 10.1021/acs.iecr.8b01008 • Publication Date (Web): 31 May 2018 Downloaded from http://pubs.acs.org on May 31, 2018

Just Accepted “Just Accepted” manuscripts have been peer-reviewed and accepted for publication. They are posted online prior to technical editing, formatting for publication and author proofing. The American Chemical Society provides “Just Accepted” as a service to the research community to expedite the dissemination of scientific material as soon as possible after acceptance. “Just Accepted” manuscripts appear in full in PDF format accompanied by an HTML abstract. “Just Accepted” manuscripts have been fully peer reviewed, but should not be considered the official version of record. They are citable by the Digital Object Identifier (DOI®). “Just Accepted” is an optional service offered to authors. Therefore, the “Just Accepted” Web site may not include all articles that will be published in the journal. After a manuscript is technically edited and formatted, it will be removed from the “Just Accepted” Web site and published as an ASAP article. Note that technical editing may introduce minor changes to the manuscript text and/or graphics which could affect content, and all legal disclaimers and ethical guidelines that apply to the journal pertain. ACS cannot be held responsible for errors or consequences arising from the use of information contained in these “Just Accepted” manuscripts.

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any Commonwealth realm Crown government in the course of their duties.

Page 1 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

OPTIMIZATION APPROACHES FOR EFFICIENT CRUDE BLENDING IN LARGE OIL REFINERIES

Jaime Cerdá*, Pedro C. Pautasso and Diego C. Cafaro INTEC (UNL - CONICET) Güemes 3450 - 3000 Santa Fe - ARGENTINA *Corresponding author: [email protected]

ABSTRACT To increase profit margin, refiners usually upgrade low cost crude oils by mixing them with light crudes to obtain blends of higher value. In the last years, this trend is favored by a shifting in the market demand from gasoline towards diesel fuels that makes more attractive to process crude blends with higher diesel yields. Using in-line blending stations, feedstocks for the crude distillation units (CDUs) with the desired properties are obtained by mixing flows of different types of crude oils using the right blending recipe. In large oil refineries, several CDUs are available to process a wide variety of crude oils stored in many dedicated tanks. The scheduler must not only select the cluster of tanks allocated to each CDU but also determine the scheduling of the blending operations providing the best qualified feedstocks for every distillation unit. Trace element compositions and the temperature boiling point (TBP) curve are the properties normally controlled to set the feedstock quality. In this works, two alternative approaches are proposed to solve this challenging scheduling problem: (a) an exact mixedinteger nonlinear (MINLP) formulation that simultaneously considers tank allocation and operations scheduling decisions; (b) an efficient sequential approach based on a pair of MINLP subproblems making the tank allocation at the upper level and the scheduling decisions at the lower one. After validation, the sequential approach is successfully applied to new nine case studies involving up to 4 CDUs, 60 charging tanks and 14 types of crude oil. __________________ *

Corresponding author. Telephone: +54 342 4559175. Fax: +54 342 4550944. E-mail address:

[email protected]

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

INTRODUCTION A major contribution to the refinery operating cost is the price of crude oil. The strategy applied by refiners to increase the refining margin is to purchase low cost crude oils such as highly viscous heavy crudes and sour crude oils containing a high amount of sulfur. Utilizing these crude oils is very attractive for refiners because their lower prices produce purchase savings much larger than the additional processing cost. In practice, they are upgraded by mixing with light crudes to convert them into crude blends of higher value. In other words, larger refinery profits are the result of processing blends that include lesser quantities of light crude oils and still produce high-value distillates. This trend is favored by a shifting in the market demand from gasoline towards diesel fuels that leads refiners to process crudes with higher diesel yields. Blending light crudes with heavier crude oils increases the amount of middle and heavier distillates now demanded by the market in larger proportions (Shahnovsky et al.1). Blends of crude oil can be obtained by using two alternative technologies: in-tank and inline blending. In-tank or batch blending consists on loading specific volumes of different types of crude oils into a mechanically-stirred blending tank and mixing them until reaching a homogeneous composition. Samples are withdrawn after mixing to determine whether the blend meets the desired specifications. In contrast, in-line blending is performed by simultaneously transferring flows of different crude oils from separate tanks through transfer lines into an online mixing device continuously producing the feedstock for the crude distillation units (CDUs). The blend is produced instantaneously and no stirred blending tanks are required (see Figure 1). As a result, it is the preferred blending technology. In any case, the aim of the blending process is to obtain feedstocks for the CDUs that yield the desired distillates in suitable proportions. This requires carefully choosing the ratio between the flow-rates of the different crudes based on their

ACS Paragon Plus Environment

Page 2 of 50

Page 3 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

properties. Charging tanks in oil refineries using in-line blending technology are devoted to a single type of crude oil, i.e. they are dedicated tanks. Since no mixing of crudes is performed in the tanks, the properties of the crude oil available in each one are known and remain unchanged with time.

Figure 1. Assigning tanks of different crude oils to blending stations of multiple CDUs An in-line blending station usually has a limited number of transfer lines feeding crude oils into the in-line mixing device. As the transfer lines are shared by a large number of charging tanks, the content of a limited number of them can be used to prepare the feedstock for the CDU at any time. Each of such groups will include as many tanks as the number of available transfer pipelines. In other words, a series of blends are sequentially produced in the mixing line for the CDU using the crude oils provided by different clusters of charging tanks. The recipe for each blend is chosen through an offline optimization. Another goal of the blending process is to avoid abrupt changes in the feedstock composition. Then, consecutive blends should feature rather similar composition. Selecting the clusters of charging tanks simultaneously supplying crude oils

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

to the mixing device, and determining in what order they feed the CDUs are two critical decisions for reaching the goals of the blending process. The most important properties determining both the quality and price of crude oils and crude blends are the density, the viscosity, the total acid number (TAN), the true boiling point (TBP) distillation curve, and the content of sulfur, heavy metals, nitrogen and some other trace elements (Shahnovsky et al.1, Reddy et al.2, Li et al.3, Bai et al.4,5). In particular, the TBP analysis is a reliable tool to characterize crude oil and petroleum mixtures in terms of their boiling point distribution. Using batch distillation, the crude oil is separated into a number of pseudocomponents or microcuts each one featuring a predefined true boiling point interval of approximately 10°C. The mass and specific gravity of the crude distilled during every TBP interval is measured to determine the volume or the weight yield of each microcut. To get crude blends with the desired properties, the operation of in-line crude blending stations must be supported by an optimization software and on-line process analyzers continuously monitoring the quality of the crude blends. Based on the composition data, the optimization software should predict the flow-rates of the utilized crude oils to get crude blends with the desired properties, i.e. the blending recipe. Suitable feedstocks should feature trace element concentrations below the specified upper limits and TBP distillation data close to the target values (Bai et al.4,5). Among the process analyzers available in the market, nuclear magnetic resonance (NMR) is the most common option because it has the ability to determine the specific gravity, the TBP distillation curve, the aromatic and the sulfur content, and some other properties of the crude blends1. Online process analyzers are needed to instantaneously measure the blend quality to make on-line corrections by making changes on the flow-rates of the different crude oils. Certainly, the types and volumes of the crude oils stored in the charging tanks have been purchased to produce by

ACS Paragon Plus Environment

Page 4 of 50

Page 5 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

blending a series of feedstocks for the CDUs with the desired quality at maximum refinery margin. Such decisions are made by considering the cost of various kinds of crude oils, and the prices and volumes of the final distillates demanded by the market. In this work, we consider a large oil refinery with several crude fractionation units (CDUs) performing the primary distillation of crude oil. Besides, each CDU has an in-line crude oil blending station (COBS) composed of a limited number of transfer pipelines that continuously receive flows of crude oils from dedicated tanks, and deliver them into an in-line mixing device. The crude blend is sent to the CDU for a primary distillation. Previous works4,5,6 assume a similar configuration of the crude oil blending station (COBS) but focused on the operations scheduling of a single CDU. This work intends to generalize the MINLP approach developed by Cerdá et al.6 to consider the simultaneous scheduling of crude oil blending stations feeding multiple CDUs in large oil refineries. It is a very challenging problem that also requires selecting the cluster of tanks delivering crude oil to the CDU. The novel rigorous MINLP formulation proposed in this work for the scheduling of multiple COBSs in large oil refineries can be solved to optimality in case studies involving a rather small number of CDUs and charging tanks. To overcome this drawback, a decomposition approach is also developed to split the problem into two decision levels. At the upper level, a single small-size MINLP model groups the charging tanks into as many clusters as the number of CDUs, and assigns each one to a different CDU. After knowing the cluster of tanks assigned to each CDU, the MINLP approach of Cerdá et al.6 is repeatedly applied at the lower level to determine the operations scheduling of the COBS for each individual CDU. Similarly to previous works,4,5,6 the selected problem goal is to feed the CDUs with stable feedstock featuring TBP distillation data close to the desired values and trace element concentrations below the specified upper limits. At both levels of the

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

decomposition approach, an MILP-NLP solution strategy permits to find good MINLP feasible solutions. After validating the decomposition approach, it is successfully applied to a significant number of large-size examples involving an increasing number of CDUs and charging tanks. PREVIOUS CONTRIBUTIONS A comprehensive review on crude oil blending in petroleum refineries can be found in Castro et al.7 Previous contributions to the scheduling of crude blending operations at inland oil refineries mostly assume that the crude blends supplied to the CDUs are produced using an intank or batch blending process (Lee et al.,8 Jia et al.,9 Furman et al.,10 Karuppiah et al.,11 Saharidis et al.,12 Mouret et al.,13,14,15 Yadav and Shaik,16 and Castro and Grossmann17). Crude blending occurs at non-dedicated charging tanks receiving different kinds of crude oils from the storage tanks at the marine terminal. In addition, each blending tank can feed different CDUs but one at a time, and the transfer of crude oil from the tank to some CDU can be interrupted before the tank is empty. A qualified feedstock is defined based on the concentration of one or two contaminants. Some other properties such as the TBP distillation data are omitted. Crude blends with the desired quality are obtained by properly choosing the amounts of the different crude oils to be mixed in the charging tank. However, a continuous monitoring of the blend composition is crucial because new discharges of crude oil can be made before emptying the tank. To make things worse, crude blending is also allowed in the storage tanks. Then, the control of the whole blending process is very complex. Some other papers are focused on the crude oil scheduling problem for coastal refineries. Again, crude blending takes place at non-dedicated charging tanks directly receiving lots of different crude oils from very large carriers (Reddy et al.2,18 Li et al.3, Li et al.19, Cerdá et al.20). However, these works also assume that each CDU can receive a mix of crude blends supplied by

ACS Paragon Plus Environment

Page 6 of 50

Page 7 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

several tanks. Then, it is adopted a combination of in-tank and in-line blending to produce the feedstock for the CDUs. In addition, any charging tank may sequentially feed multiple CDUs (normally at most two), and the number of charging tanks providing the feedstock to a particular CDU can change with time (from one to two and vice versa). An interesting problem feature is that the desired feedstock quality is now defined by specifying the acceptable ranges for a number of properties including the concentrations of trace elements (sulfur, nitrogen, carbon residue), Reid vapor pressure, specific gravity, viscosity, etc. Control of the feedstock quality requires monitoring the properties of the crude blends available in the charging tanks and choosing the flow-rates at which they are simultaneously supplied to the CDU. Recent works4,5,6 address the scheduling of crude oil supplies for a single distillation unit using an in-line blending station. Different types of crude oils are available but only one is stored in every charging tank. An in-line blending station is composed of a limited number of transfer pipelines and a mixing line (see Figure 1). The following rules for the operation of an inline blending station are usually considered: (a) each tank can at most feed one transfer line; (b) at any time, only one tank is delivering crude oil to each transfer line; (c) the delivery of crude oil from a charging tank should be continued without interruption until the tank is empty; (d) emptying due dates for the charging tanks should be fulfilled to receive further crude oil supplies; and (e) every transfer line must continuously receive crude oil over the scheduling horizon. In contrast to some contributions previously described, some attention is paid on the relative proportions of the final distillates leaving the CDU by specifying the desired TBP curve for the feedstock. The quality of the feedstock is specified by setting the maximum trace element concentrations, the acceptable range of light components, and the desired true boiling point (TBP) distillation curve. Groups of charging tanks should be connected to the transfer pipelines

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

in a proper sequence so as to feed the CDU with crude blends of qualified and stable properties. The objective function intends to get a feedstock with a TBP distillation curve as close as possible to the target TBP curve. Different approaches for scheduling the crude blending operations of a single CDU were proposed by Bai et al.4,5 and Cerdá et al.6 On the one hand, Bai et al.4,5 decomposed the crude blend scheduling problem into two decision levels, with the outer level allocating and sequencing tanks to transfer lines, and the inner level optimizing the flow rates at which the crude oils are injected into such lines. The two-level approach is solved by applying a pair of metaheuristics. Tabu search and differential evolution were used by Bai et al.4, while Bai et al.5 proposed a twolevel optimization framework based on constrained ordinal optimization and evolutionary algorithms. Instead of applying metaheuristic algorithms, Cerdá et al.6 develop an MINLP formulation that uses direct precedence sequencing variables to choose the emptying sequence of tanks assigned to the same transfer line, and a set of time slots to synchronize the simultaneous delivery of crude oils from different charging tanks into the same number of transfer lines. By solving the MINLP model using an MILP-NLP solution strategy, Cerdá et al.6 discover better schedules for the test examples previously proposed by Bai et al.4,5 PROBLEM DEFINITION Let us assume that several CDUs are being operated and a large number of charging tanks containing different types of crude oils are available in a large oil refinery (see Figure 1). Each CDU has its own crude oil blending station composed of a limited number of transfer lines and a mixing device where different crude oils are blended to produce a feedstock with the desired quality. Very difficult decisions to be made by the scheduler are the selection of the cluster of tanks feeding each CDU together with the scheduling of the blending operations at all

ACS Paragon Plus Environment

Page 8 of 50

Page 9 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

crude blending stations. By definition, such clusters have no common element. As a result, the optimal scheduling of in-line blending operations in large oil refineries becomes a very complex problem. The feedstock quality for every CDU is defined by specifying its TBP distillation curve and the trace elements concentration. Moreover, the total amount of crude blend assigned to each CDU will depend on both its processing capacity and the length of the planning horizon. To model the problem, we introduce the set C comprising all the crude distillation units available in the oil refinery. For large crude blending scheduling problems, the refinery planner first gathers the available charging tanks into |C| groups and assigns each group to a different CDU. The allocation procedure assumes that every charging tank should at most be assigned to a single CDU and delivers its total content of crude oil through one of the transfer pipelines of the associated blending station. Besides, charging tanks are allocated to CDUs in such a way that the sequence of feedstocks produced in the blending device present TBP curves close to the target. An increasing number of transfer lines allows to mix a higher number of crudes, yielding better feedstocks for the CDUs. In this work, an MINLP mathematical formulation for the simultaneous assignment of charging tanks to several CDUs and the operations scheduling of multiple crude oil blending stations (MCOBS) has been developed. The model is a generalization of the one proposed by Cerdá et al.6 for operations scheduling of a single in-line blending station. The allocation of charging tanks to distillation columns is the additional problem feature to be simultaneously considered. The proposed MINLP model seeks to determine: (a) the subset of charging tanks feeding each CDU; (b) the transfer pipeline into which the crude oil from every assigned tank is injected; (c) in which order the charging tanks allocated to the same transfer line will deliver their contents; (d) the volume and composition of the feedstocks sequentially produced in the

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

mixing line of the CDUs; (e) the starting and completion times of tank unloading operations delivering batches of crude oils to transfer pipelines; (f) the quadratic deviation between the actual and the desired quality of the feedstocks processed by the CDUs; (g) the quadratic change on the quality of every pair of consecutive feedstocks sent to the same CDU. The selected problem goal seeks to minimize the overall value of items (f) and (g) over all CDU. This implies to obtain feedstocks with TBP distillation curves close to the target, and pairs of consecutive feedstocks for every CDU with rather similar compositions as well. MINLP MODEL FOR THE SIMULTANEOUS SCHEDULING OF MULTIPLE IN-LINE BLENDING STATIONS The MINLP mathematical model of Cerdá et al.6 will be generalized to simultaneously determine the operations scheduling of multiple blending stations feeding the CDUs in large oil refineries. Similarly to Cerdá et al.6, binary and continuous variables are defined in terms of the following sets: charging tanks (TK), crude distillation units (C), transfer pipelines (P), batches of crude oil (B), time slots (S) and microcuts (MC), with the last set used to define the TBP distillation curves of the available crude oils and the crude blends sent to the CDUs. Compared with the model of Cerdá et al.6, the generalized MINLP model additionally involves the binary variable YCtk,c assigning charging tanks to CDUs, the continuous variable YTCtk,c,p restricted to the interval [0,1] specifying that the crude oil of tank tk is injected into the transfer pipeline p of CDUc if YTCtk,c,p = 1, and the continuous variable QCtk,c denoting the amount of crude oil from the charging tank tk processed by the distillation unit c. If YCtk,c = 1, then QCtk,c is equal to the available content of crude oil in tank tk. The other variables are similar to those introduced by Cerdá et al.6, but their domain now includes the subscript c identifying the CDU to which they

ACS Paragon Plus Environment

Page 10 of 50

Page 11 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

are associated. Model assumptions, constraints and the selected objective function of the proposed model are all given in the following sections. Model Assumptions To develop the generalized MINLP mathematical formulation, some model assumptions are made. Most of them have been already considered by Cerdá et al.6. (1) The overall amount of crude oil in the charging tanks should be distributed among the CDUs based on their processing capacities. (2) Each charging tank should deliver crude oil to a single transfer pipeline of the assigned CDU. (3) The inventory of crude oil available in a charging tank should be fully discharged into the assigned transfer line before its specified emptying due date. (4) The flow-rate at which crude oil is delivered into a transfer pipeline must be within the specified allowable range. (5) The unloading of a charging tank must not be interrupted until the tank is empty. (6) At any time, each transfer pipeline should be continuously receiving crude oil from a single charging tank. (7) A perfect mixing of the batches coming from the charging tanks is obtained in the mixing device. (8) The TBP distribution curve is the major property used to evaluate the feedstock quality. (9) The properties of the flows of crude oil concurrently supplied to the transfer pipelines of a CDU, including their TBP distribution data, blend linearly in the mixing line. (10) The mixed feedstocks should be supplied to each CDU at the specified fixed flow-rate over the entire scheduling horizon.

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 12 of 50

(11) The changeover time for switching the charging tank connected to a transfer pipeline is negligible. Model constraints Model constraints can be gathered into the following six categories: (1) allocation of charging tanks to CDUs; (2) assignment of tanks to transfer lines for each CDU; (3) cycle breaking constraints; (4) batch sizing and timing of unloading operations from charging tanks into the transfer lines; (5) synchronization of the discharge of batches into the transfer lines producing by blending the feedstock for the CDU; (6) estimation of the feedstock quality obtained in the mixing device of the CDUs. Assigning charging tanks to CDUs. Each charging tank tk ∈TK should be allocated to a single CDU. Tank tk will deliver crude oil to distillation column c only if the binary variable YCtk,c is equal to one. ∑∈ , = 1

 ∈ 

(1)

Amount of crude oil supplied by the charging tank tk to the distillation unit c∈C (QCtk,c). The whole content of the charging tank tk should be supplied to the crude distillation unit c only if it has been assigned to that CDUc ( YCtk,c = 1). Let us introduce the parameter invtk to stand for the initial content of crude oil in the charging tank tk. Then, QCtk,c = invtk whenever YCtk,c = 1. Otherwise, QCtk,c = 0. , =  ,

 ∈  ,  ∈

(2)

Distribution of the available amount of crude oil among the CDUs. Assuming that the CDUs have the same processing capacity, similar amounts of crude oil should be processed by every CDU over the planning horizon. Eqs (3)-(4) permit to have a near-uniform distribution of the

ACS Paragon Plus Environment

Page 13 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

total available amount of crude oil among the CDUs. Since every tank should feed a single CDU, assigning the same amount of crude to every CDU is usually an infeasible option. Some deviation from the exact uniform distribution is allowed by introducing the coefficients fcmin and fcmax in Eqs (3)-(4). We have adopted: fcmin = 0.95 and fcmax = 1.05. If the CDUs have different processing capacities, the parameter [1/|C|] should be replaced by the ratio between the processing capacity of CDUc and the total processing capacity of all CDUs, i.e. ∑



∈ 

 . By

Eq. (5), the total amount of crude oil stored in the available set of charging tanks TK should be processed by the CDUs. ∑∈ , ≥  ! 

"  ∑∈  #( )

 ∈ ( ! < 1)

(3)

"  ∑∈  #( )

 ∈ (( > 1)

(4)

∑∈ , ≤ ( 

∑∈ ∑∈ , = ∑∈ 

(5)

Assigning charging tanks to transfer pipelines. Each charging tank should feed at most one transfer pipeline of the blending station associated to the assigned CDU. In Eq. (6), the binary variable YTtk,p denotes the assignment of tank tk to pipeline p whenever YTtk,p = 1. ∑+∈, *,+ ≤ 1

 ∈ 

(6)

Let us define the continuous variable YTCtk,c,p restricted to take on values within the interval [0,1]. The crude oil contained in the charging tank tk is discharged into the transfer pipeline p of CDUc only if YTCtk,c,p = 1. By Eqs (7)-(9), the volume of crude oil stored in any charging tank tk must be delivered to only one transfer pipeline of the assigned CDU. *,,+ ≥ , + *,+ − 1

 ∈  ,  ∈ , / ∈ ,

(7)

*,,+ ≤ ,

 ∈  ,  ∈ , / ∈ ,

(8)

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

*,,+ ≤ *,+

 ∈  ,  ∈ , / ∈ ,

Page 14 of 50

(9)

Sequencing unloading operations from charging tanks delivering crude oil into the same transfer pipeline of a CDU. A direct precedence scheme is used to determine the sequence of unloading operations from charging tanks to the same transfer pipeline of a particular CDU. The binary variable Xtk’,tk,c,p is introduced to indicate that tank tk discharges crude oil into the pipeline p of distillation column c immediately after tank tk’ only if both tanks have been assigned to that pipeline of CDU c (i.e. YTCtk,c,p = YTCtk’,c,p = 1) and Xtk,tk’,c,p = 1. Otherwise, Xtk,tk’,c,p = 0. In case YTCtk,c,p = 1, Eq. (10) states that a charging tank tk either has a single predecessor in the queue of tanks delivering crude oil into pipeline p (i.e. ∑ 2∈ 01 ,,,+ = 1) or is the first tank 2 3 

discharging crude oil into that pipeline, i.e. XFtk,c,p = 1. By Eq. (11), a charging tank has a single successor or it is the last one delivering crude oil into the assigned pipeline, i.e. XLtk,c,p = 1. Moreover, Eqs (12)-(13) are introduced to ensure that only one tank is first/last discharging crude oil into any transfer pipeline of a distillation column. 04,,+ + ∑ 2∈ 0 1 ,,,+ = *,,+

 ∈  ,  ∈ , / ∈ ,

(10)

05,,+ + ∑ 2∈ 0,1 ,,+ = *,,+

 ∈  ,  ∈ , / ∈ ,

(11)

∑∈ 04,,+ = 1

 ∈ , / ∈ ,

(12)

∑∈ 05,,+ = 1

 ∈ , / ∈ ,

(13)

2 3 

2 3 

Allocating batches of crude oil to charging tanks. Without loss of generality, we can assume that the crude oil blending system of every CDU comprises |Pc| = np transfer pipelines for every c∈C, and a sequence of |S| feedstocks are processed in each distillation column. Every feedstock is obtained by mixing np batches of crude oils in the blending station. Therefore, a sequence of |S |

ACS Paragon Plus Environment

Page 15 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

batches coming from the charging tanks are to be injected into each transfer line to produce by mixing |S| feedstocks for a particular CDU, i.e. (np*|S|) batches per CDU. If there are nc = |C| distillation columns operating at the oil refinery, then a total of (nc* np * |S| ) batches of crude oil are needed to produce | S | feedstocks for every CDU. Let us introduce an ordered set of batches B comprising (nc* np * |S| ) elements whose first (np* |S| ) elements are preassigned to CDU1 arising first in the set C, the next (np * |S| ) batches are preassigned to CDU2 and so on. In addition, the first |S| batches allocated to a particular CDUc are preassigned to the first transfer pipeline p1 in the set Pc ,the next | S | batches are delivered to the second pipeline p2 and so on. In some cases, the number of feedstocks processed by each CDU can be different but they are always known parameters. In this way, we have defined the subset of batches Bc ⊂ B allocated to CDUc and the subset of batches Bc,p⊂ Bc assigned to pipeline p of CDUc. Besides, the proposed mathematical model incorporates the binary variable YBb,tk to indicate that batch b ∈ Bc,p is discharged from tank tk into the transfer line p of CDUc whenever YBb,tk is equal to one. By Eqs (14)-(15), every batch b ∈ Bc,p can at most be unloaded from a single charging tank among those allocated by the model to pipeline p of CDUc, i.e. from a tank tk featuring YTCtk,c,p = 1. By Eq. (16), the last elements of the subsets Bc,p are reserved for fictitious batches never used at the optimal solution. ∑∈ 78, ≤ 1

 ∈ , / ∈ ,, 9 ∈ :,+

(14)

∑8∈:,; 78, ≤ *,,+

 ∈ ,  ∈ , / ∈ ,

(15)

∑∈ 78, ≤ ∑∈ 781 ,

 ∈ , / ∈ ,, (9, 9 ) ∈ :,/ ( 9 < 9)



ACS Paragon Plus Environment



(16)

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 16 of 50

Operational constraints. Batches b ∈ Bc,p unloaded from the same charging tank tk into the pipeline p of CDUc are enforced by Eq. (17) to occur one after the other. If batches (b, b”) ∈ B, then the expression b < b” denotes that the element b precedes b” in the ordered set B. Let us now assume that the batches (b, b”) ∈ Bc,p (with b < b”) are delivered from the same charging tank tk into the pipeline p of CDUc, then the batch b’= b+1 < b” also belonging to Bc,p cannot be discharged from a different tank tk’ ≠ tk. Then, Eq. (17) drives YBb”,t to zero if ∑ 1 ∈ 781 , 1  1 3

= 1. Therefore, in case several batches are unloaded from the same charging tank tk into the pipeline p of CDUc, they should be consecutive elements of the set Bc,p. 78, + 7811 , ≤ 2 − ∑ 1 ∈ 781 , 1  1 3



′′



′′

 ∈ , / ∈ ,, >9, 9 , 9 ? ∈ :,/ >9 = 9 + 1 < 9 ? ,  ∈ 

(17)

Moreover, feedstocks for the CDUs are rarely obtained by mixing crude oils whose light microcuts mc ∈ MCL , featuring TBP ≤ 250°C, all present percentage yields either significantly higher or substantially lower than the desired values. They will generally lead to very bad solutions and, consequently, should be avoided. We can use this knowledge to further reduce the size of the solution space. To this end, we introduce the parameters yldmc,tk and ydrefmc to denote the yield of microcut mc in the crude oil stored in tank tk and the desired yield of microcut mc in the feedstock, respectively. Let us define the subset TK+ ⊂ TK whose elements are charging tanks containing light crude oils featuring yldmc,tk much greater than ydrefmc for light microcuts mc ∈MCL, and the subset TK – involving tanks of heavy crude oils with yldmc,tk much less than ydrefmc for mc ∈MCL. Assuming that the crude oil blending system of each CDU is composed of a pair of transfer pipelines, there is a simple way to disallow feedstocks obtained by mixing a pair of light crude oils or a pair of heavy crude oils. It consists of preassigning those tanks in TK+

ACS Paragon Plus Environment

Page 17 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

to one of transfer pipelines, for instance p1, and those belonging to TK – to the other pipeline p2. Then, YTtk,p1 is prefixed to 1 for any tk∈TK+ and YTtk,p2 = 1 for any tk∈TK-. Instead, the assignment of transfer pipelines to those tanks containing intermediate crudes with percentage yields of light microcuts not much different from the reference values is left to the model. When np > 2, the allocation of tanks to the remaining transfer lines (p > 2) is decided by the model. Symmetry breaking constraints. To reduce the search space by avoiding symmetrical solution, symmetry breaking constraints are added to the proposed mathematical model. Eqs (18a)-(18c) remove equivalent solutions from the feasible region by assigning the elements of Bc,p to charging tanks in the same order that they discharge crude oil into the pipeline p of CDUc. To meet that condition, we introduce the new binary variable YBNb,tk. By Eq. (18a), YBNb,tk’ is equal to 1 whenever some batch b’ < b is delivered from tank tk’ into pipeline p. Otherwise, Eq. (18b) makes YBNb,tk’ = 0. If tank tk’ directly succeeds tank tk (i.e. Xtk,tk’,c,p = 1) and batch b’ < b has been assigned to tank tk’, then YBNb,tk’ is equal to 1 and Eq. (18c) drives YBb,tk to zero. 7@8, 1 ≥ 781 , 1



 ∈ , / ∈ ,, (9, 9 2 ) ∈ :,+ (9 < 9) , ′ ∈ 

(18a)

 ∈ , / ∈ ,, 9 ∈ :,+ , ′ ∈ 

(18b)

7@8, 1 ≤ ∑81 ∈:,; 781 , 1 8 1 A8

78, ≤ 2 − 7@8, 1 − 0, 1 ′



 ∈ , / ∈ ,, 9 ∈ :,+ , ( ,  ) ∈ (  ≠  )

(18c)

Batch sizing constraints. The continuous variable QBb,tk represents the size of batch b ∈ Bc,p discharged from the charging tank tk into pipeline p of CDUc. If batch b is not discharged from tank tk, then YBb,tk = 0 and consequently QBb,tk = 0. When YBb,tk = 1, the size of batch b∈ Bc,p should never be lower than a specified minimum amount qmin. Moreover, the total amount of crude oil contained in the batches discharged from tank tk into the assigned transfer pipeline

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 18 of 50

should be equal to the initial content of tank tk (invtk). Such conditions are enforced by Eqs (19)(21). 78, ≤  ∗ 78,

 ∈ , / ∈ ,, 9 ∈ :,+ ,  ∈ 

(19)

78, ≥ DE∗ 78,

 ∈ , / ∈ ,, 9 ∈ :,+ ,  ∈ 

(20)

∑∈ ∑+∈, ∑8∈:,; 78, = 

 ∈ 

(21)

Length of batch unloading operations. The unloading rate of batches from charging tanks into the transfer lines should belong to the interval [rmin, rmax]. The continuous variable LBb,tk denotes the length of the unloading operation of batch b ∈ Bc,p from tank tk into the pipeline p of CDUc, and its value is determined by Eqs (22)-(23). When YBb,tk = 0, then LBb,tk is also equal to zero. 78, ≤ FEGH 578,

 ∈ , / ∈ ,, 9 ∈ :.+ ,  ∈ 

(22)

78, ≥ FE 578,

 ∈ , / ∈ ,, 9 ∈ :,+ ,  ∈ 

(23)

Start and end times of batch unloading operations. The unloading of batch b’∈ Bc,p from the charging tank tk’ into the pipeline p of CDUc should start after completing the discharge of batch b ∈ Bc,p from tank tk only if tk is the direct predecessor of tank tk’ (i.e. Xtk,tk’,c,p = 1) in the queue of tanks feeding pipeline p of CDUc. Obviously, the condition YBb,tk = YBb’,tk’ = 1 must also hold. Besides, if batches b,b’ ∈ Bc,p come from the same tank tk and b’ > b, then the unloading of batch b’ should start after completing the discharge of batch b. Both constraints are given by Eqs (24)-(25). In such equations, the continuous variables SBb,tk and CBb,tk stand for the times at which the unloading of batch b∈ Bc,p from tank tk begins and ends, respectively. By Eqs (26)(28), CBb,tk should never be larger than the due date for emptying tank tk (ddtk) and its value can

ACS Paragon Plus Environment

Page 19 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

be found by adding the length of the unloading operation of batch b to the related starting time SBb,tk. In addition, the value of SBb,tk should never be lower than the release time of tank tk (rttk) denoting the time at which the content of tank tk is available for processing. Besides, the time at which the discharge of batch b∈ Bc,p starts is equal to the completion time of the preceding batch (b-1)∈ Bc,p given by CBb-1,tk. Moreover, crude oil should be continuously supplied to each transfer line of any CDU without interruption. These last two constraints are given by Eqs (29) and (30), respectively. The parameter H stands for the length of the scheduling horizon. Then, it is an upper bound for the completion time of any blending operation. 78, ≤ J781 , 1 + K ∗ L2 − 78. − 781 , 1 M + K ∗ (1 − 0, 1 ,,+ )  ∈ , / ∈ ,, (9, 9 2 ) ∈ 7,+ (9 2 = 9 + 1), ( ,  2 ) ∈ (  ≠  2 )

(24)

78, ≤ J781 , + K ∗ L2 − 78, − 781 , M  ∈ , / ∈ ,, (9, 9 2 ) ∈ 7,+ (9 < 9′),  ∈ 

(25)

78, ≤ NN 78,

 ∈ , / ∈ ,, 9 ∈ :,/ ,  ∈ 

(26)

78, = J78, + 578,

 ∈ , / ∈ ,, 9 ∈ :,/ ,  ∈ 

(27)

J78, ≥ F  78,

 ∈ , / ∈ ,, 9 ∈ :,/ ,  ∈ 

(28)

∑∈PQ J78, = ∑∈ ∑∈ 78O",

 ∈ , / ∈ ,, (9 − 1), 9 ∈ :,/

(29)

∑∈PQ 78, ≤ ∑82∈:,; ∑2∈ 5782,2

 ∈ , / ∈ ,, 9 ∈ :,/

(30)

Using time slots to determine the series of feedstocks supplied to each CDU. The series of feed streams supplied to a particular CDUc over the planning horizon results from sequentially mixing

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 20 of 50

batches concurrently coming from |Pc| transfer pipelines. The unloading of such batches into the transfer lines should begin and end at the same time. To comply with that constraint, a common set of time slots s∈S for the |Pc| pipelines, and the assignment variable YSb,c are defined. The binary variable YSb,c denotes that the unloading of batch b ∈ Bc,p into pipeline p of CDUc is performed over the time slot s whenever YSb,c = 1. If batch b ∈ Bc,p is used at the optimal solution, then its unloading operation must be assigned to only one time slot. Reciprocally, a single batch b ∈ Bc,p can at most be discharged into the transfer pipeline p of CDUc during time slot s. These constraints are given by Eqs (31)-(32). ∑R∈S J8,R = ∑∈ 78,

 ∈ , / ∈ ,, 9 ∈ :,/

(31)

∑8∈:,; J8,R ≤ 1

 ∈ , / ∈ , , T ∈ S

(32)

As the batches are allocated to tanks in the same order that they discharge crude oil into the assigned pipeline of some CDU, lot b∈ Bc,p cannot be assigned to time slot s if another batch b’∈ Bc,p with b’ < b is discharged in a later slot s’ > s. Moreover, the number of unloading operations into any pair of pipelines p and p’ (with p’ ≠ p) of some CDU during any time slot must be equal, and the last elements of the set S are reserved for fictitious slots. Such conditions are imposed by Eqs (33)-(35). J8,R + J81 ,R2 ≤ 1

 ∈ , / ∈ , , 9, 9 2 ∈ :,/ (9 2 < 9) , T, T 2 ∈ S(T < T′)

(33)

∑8∈:,; J8,R = ∑82∈:,;1 J82,R

 ∈ , (/, /2 ) ∈ , (/ ≠ /2 ), T ∈ S

(34)

∑8∈U,; J8,R ≤ ∑8∈U,; J8,RO"

 ∈ , / ∈ , , T ∈ S (T > 1)

(35)

Length of the time slots and total amount of crude oil processed by each CDU over a time slot. The length of the unloading operation of batch b∈Bc,p discharged into pipeline p of CDUc and

ACS Paragon Plus Environment

Page 21 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

allocated to slot s is represented by the continuous variable LSb,s. Its value is determined by Eqs (36)-(37). Note that LSb,s = 0 if the discharge of batch b does not occur during the time slot s. By Eq. (38), LSb,s = LSb’,s if the unloading of batches b∈ Bc,p and b’∈ Bc,p’ into the pipelines p and p’ (≠ p) of CDUc occur during the same time slot s (i.e. YSb,s = YSb’,s = 1) . Then, the value of Lc,s denoting the length of slot s for CDUc is given by Eq. (38). 5J8,R ≤ K J8,R

 ∈ , / ∈ , , 9 ∈ :,/ , T ∈ S

(36)

∑R∈S 5J8,R = ∑∈ 578,

 ∈ , / ∈ ,, 9 ∈ :,/

(37)

5,R = ∑8∈:,; 5J8,R

 ∈ , / ∈ , , T ∈ S

(38)

Let us introduce the continuous variable QSb,s representing the amount of crude oil in batch b∈Bc,p allocated to time slot s. Its value is determined by Eqs (39)-(40). By operating reasons, the feed stream to CDUc should be supplied at a constant rate given by the parameter fratec. Then, the ratio between the total amount of crude oil processed during slot s and the length of that slot Lc,s must be equal to the fixed flow rate fratec. This constraint is enforced by Eq. (41). In Eq. (39), the parameter M is an upper bound on the size of any batch b. J8,R ≤ Y J8,R

 ∈ , / ∈ , , 9 ∈ :,/ , T ∈ S

(39)

∑R∈S J8,R = ∑∈ 78,

 ∈ , / ∈ ,, 9 ∈ :,/

(40)

∑+∈, ∑8∈:,; J8,R = FG Z 5,R

 ∈ , T ∈ S

(41)

Limiting the concentration of trace elements in the feedstock. The concentration of trace elements k∈K in the feedstock, like sulfur and some other contaminants, should be kept below the upper limit ,( . To this end, we introduce the continuous variable QKk,b,s representing the amount of trace element k in batch b∈Bc,p injected into pipeline p of CDUc during the time

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 22 of 50

slot s, whose value is determined by Eqs (42)-(43). In turn, Eq. (44) states that the limiting concentration of the trace element k in the feedstock must not be exceeded. In Eq. (43), the parameter vck,tk stands for the volumetric concentration of the trace element k in the crude oil available in tank tk. [,8,R ≤ max ( ) ∗ ,( J8,R ∑R∈_ [,8,R = ∑∈ , 78,

 ∈ , / ∈ ,,  ∈ , T ∈ S, 9 ∈ :,/

(42)

 ∈ , / ∈ ,,  ∈ , 9 ∈ :,/

(43)

∑+∈, ∑8∈:,; [,8,R ≤ ,( (∑+∈, ∑8∈:,; J8,R )

 ∈ ,  ∈ , T ∈ S

(44)

Volumetric yield of microcuts in the feedstock processed by CDUc during slot s. The continuous variable QMBmc,b,s denotes the amount of microcut mc contained in batch b ∈ Bc,p injected into pipeline p of CDUc during the time slot s. By Eq. (45), its value is driven to zero if YSb,s = 0. In Eq. (45), the parameter yldmc,tk represents the percentage yield of microcut mc in the crude oil contained in tank tk, and the set MC includes all the microcuts used to determine the true boiling point distribution (TBP) curve of the crude oils. In turn, `aN ( = EGH2∈bc d`aN 1 , e is the maximum predicted percentage yield of a microcut in the crude oils. Eqs (45)-(46) provide the value of QMBmc,b,s. The amount of microcut mc in the mixed feedstock supplied to CDUc during the time slot s is given by the continuous variable QMFmc,c,s, whose value is computed from Eq. (47). In turn, the percentage yield of microcut mc in the feedstock supplied to CDUc during the time slot s represented by the variable YMFmc,c,s is calculated using the nonlinear equation (48). ∑∈f Y7,8,R ≤ Y `aN ( J8,R

 ∈ , / ∈ , , 9 ∈ :,/ , T ∈ S

(45)

∑R∈S Y7,8,R = ∑∈ `aN, 78,

E ∈ f ,  ∈ , / ∈ ,, 9 ∈ :,+

(46)

ACS Paragon Plus Environment

Page 23 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

Y4,,R = ∑+∈, ∑8∈:,; Y7,8,R

E ∈ f ,  ∈ , T ∈ S

(47)

Y4,,R = Y4,,R g>∑+∈, ∑8∈:,; J8,R ?

E ∈ f ,  ∈ , T ∈ S

(48)

Limiting the yield of light components in the feedstock. To avoid difficulties in pressure control or insufficient reflux flow rate in the CDUs, the feedstock should be neither too light nor too heavy. According to Eq. (49), the total percentage yield of light components in the feedstock should belong to the interval [lyldmin, lyldmax]. The subset MCL includes all light microcuts with TBP ≤ 250°C. L∑∈f Y4,,R M a`aN ! ≤ ∑∈f h Y4,,R ≤ L∑∈f Y4,,R M a`aN(

(49)

 ∈ , T ∈ S Objective function. To achieve a proper sequence of feedstocks for each CDU, the batches of crude oils to mix and their flow rates are to be selected in such a way that the accumulate quadratic deviation of the property YMFmc,c,s from the desired value ydrefmc for every microcut mc∈MC is minimized. In addition, the cumulative quadratic change of that property in two consecutive feedstocks for a CDUc should be reduced as much as possible. The quadratic property deviation (YMFmc,c,s - ydrefmc)2 and the quadratic property change in two consecutive slots for each microcut mc, given by (YMFmc,c,s - YMFmc,c,s-1)2, are weighted by the coefficient wfmc. Larger coefficients are assigned to lighter microcuts. Then, the nonlinear objective function is given by Eq. (50). l

i = ∑∈ ∑∈f j [ ∑R∈SLY4,,R − `NFZ M + ∑

R∈S LY4,,R (nop)

l

− Y4,,RO" M ]

ACS Paragon Plus Environment

(50)

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 24 of 50

SOLVING THE MINLP FORMULATION USING AN MILP-NLP SOLUTION STRATEGY

The proposed MINLP model for the simultaneous allocation of charging tanks to multiple CDUs and the scheduling of their crude oil blending stations will be solved using an MILP-NLP solution strategy. To this end, an approximate MILP problem representation finding near-optimal values for the integer variables has been developed. By subsequently fixing such variables at their MILP-values, the MINLP is converted into an NLP model. The approximate MILP also provides a good initial point for the local NLP solver. Nonlinearities in the simultaneous MINLP formulation arise in Eq. (48) and the objective function (50). Let the continuous variable QREFmc,c,s be the desired amount of microcut mc in the mixed feedstock supplied to CDUc during the time slot s, given by Eq. (51). To linearize the MINLP formulation, the property deviation (YMFmc,c,s – ydrefmc) for the microcut mc in distillation column c at the time slot s is now expressed in terms of the linear difference DEVmc,c,s between the amount of mc in the sthfeedstock for CDUc, given by QMFmc,c,s, and the reference amount QREFmc,c,s , i.e. (QMFmc,c,s – QREFmc,c,s). The absolute value of the property deviation for the triplet (mc,c,s) is provided by Eqs (52)-(53). qr4,,R = `NFZ ∑+∈, ∑8∈:,; J8,R

E ∈ f ,  ∈ , T ∈ S

(51)

srt,,R ≥ Y4,,R − qr4,,R

E ∈ f ,  ∈ , T ∈ S

(52)

srt,,R ≥ qr4,,R − Y4,,R

E ∈ f ,  ∈ , T ∈ S

(53)

Moreover, the change of the feedstock quality in two consecutive time slots is approximated by the positive variable DIFmc,c,s. This variable is defined as the difference between the quality deviation from the target value in two consecutive slots s and (s+1) and determined by Eq. (54). The absolute value of DIFmc,s, called ADIFmc,s, is calculated by Eqs (55)-

ACS Paragon Plus Environment

Page 25 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

(56). In this way, the objective function for the approximate linear formulation is given by Eq. (57). By replacing the nonlinear constraint (48) and the nonlinear objective function (50) by the set of equations (51)-(57), an approximate MILP formulation is developed. su4,,R ≥ (Y4,,R − qr4,,R ) − (Y4,,RO" − qr4,,RO" ) E ∈ f ,  ∈ , T ∈ S (T > 1)

(54)

vsu4,,R ≥ su4,,R

E ∈ f ,  ∈ , T ∈ S (T > 1)

(55)

vsu4,R ≥ − su4,R

E ∈ f ,  ∈ , T ∈ S (T > 1)

(56)

i = ∑∈f ∑∈ j ( ∑R∈S srt,,R + ∑ R∈S vsu4,R ) nop

(57)

By solving the approximate MILP, it is also derived a good feasible solution for the original MINLP problem formulation. In fact, we can obtain the exact values of the microcut yields YMFmc,c,s and the overall quadratic deviation that corresponds to the MILP-solution using Eqs (48) and (50). By adopting such a MINLP feasible solution as the starting point for a local NLP solver, the nonlinear programming (NLP) formulation that results from fixing the binary variables YTtk,c , YBb,tk and YSb,s to the their MILP-values can be solved very fast in less than one second. In this way, a near-optimal solution for the MINLP can be found using a simple two-step MILP-NLP procedure. Almost all the total CPU time required by the solution procedure is consumed by the MILP solver. However, the approximate MILP formulation becomes very large and difficult to solve even if oil refineries involve just a pair of CDUs and a number of charging tanks over 20. Then, an alternative solution approach for a more efficient scheduling of crude oil blending stations in large oil refineries operating several CDUs is necessary. Nonetheless, the solutions provided by

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

the simultaneous formulation for small-size examples will serve as the reference to measure the performance of an alternative decomposition approach. THE SEQUENTIAL SOLUTION APPROACH To reduce the problem size, a decomposition strategy can be applied taking into account that the problem involves two major decisions: (i) the allocation of charging tanks to CDUs and (ii) the operations scheduling of the crude oil blending station of each CDU. Then, the problem is split into two subproblems that are sequentially solved. Each one deals with only one major decision. The tank allocation upper subproblem should first be solved to determine the subset of charging tanks assigned to each CDU. Afterwards, the approach of Cerdá et al.6 can be applied to scheduling the crude oil blending operations for each individual CDU. However, this decomposition approach requires discovering an appropriate target for the tank allocation subproblem. When solving the lower scheduling subproblem, such a target should facilitate the production of feedstocks for each CDU with suitable TBP curves close to the global optimal solution. A proper assignment of charging tanks to CDUs implies to produce feedstocks with TBP curves close to the target one in the mixing line. If such a goal is fully achieved, there will be a complete agreement between the actual and the desired TBP curve of the feedstocks. Therefore, the mixed crude oil obtained by blending the content of all tanks assigned to any CDU will also have the desired TBP curve. Let us call such a mix of crude oils the bulk feedstock for the CDU. A lower deviation between the TBP of the bulk feedstock for a CDU and the desired curve facilitates the achievement of a better agreement between the actual and the desired TBP curves of the individual feedstocks for that CDU. Then, the assignment of charging tanks to crude distillation units should be made in such a way that the bulk feedstock for every CDU features a

ACS Paragon Plus Environment

Page 26 of 50

Page 27 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

TBP curve as close as possible to the desired feedstock quality. In other words, the total quadratic deviation between the TBP curve of the bulk feedstock and the desired TBP should be minimized. This is the selected objective function for the upper subproblem. Model constraints in the tank allocation subproblem can be gathered into five groups: (a) the assignment constraint allocating charging tanks to crude distillation units, given by Eq. (1); (b) the sizing constraints computing the amount of bulk feedstock allocated to each CDU, given by Eqs (2)-(5); (c) trace element concentration constraints keeping them in the bulk feedstock below the specified upper limits; (d) additional constraints estimating the TBP curve for the bulk feedstock of every CDU, and its absolute deviation from the desired feedstock quality. Concentration of trace element k in the bulk feedstock for CDUc. Eq. (58) states that the concentration of trace element k in the bulk feedstock for CDUc should never exceed the specified upper limit vck,max. ∑∈ , , ≤ ,( ∑∈ ,

 ∈  ,  ∈

(58)

Yield of microcut mc in the bulk feedstock for distillation unit c. Let us introduce the continuous variables QMmc,c to represent the total volume of microcut mc, and BYmc,c to denote the yield of microcut mc both in the bulk feedstock for CDUc . Their values are determined by Eqs (59) and (60), respectively. Y, = ∑∈ `aN, ,

7, = ∑

wbx,

yz∈ wcyz,

E ∈ f ,  ∈

(59)

E ∈ f ,  ∈

(60)

Objective function for the upper subproblem. The objective function for the upper subproblem seeks to minimize the sum of the quadratic deviation between the TBP curve of the bulk

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 28 of 50

feedstock and the desired feedstock quality over all CDUs. Let us assume that the desired yield of microcut mc in the feedstock for the CDUs is ydrefmc. Then, the quadratic deviation between the bulk yield of microcut mc for CDU c (BYmc,c) and the desired yield value ydrefmc is given by: (BYmc,c – ydrefmc)2. A suitable assignment of charging tanks to CDUs can be obtained by minimizing the weighted sum of the quadratic deviation (BYmc,c – ydrefmc)2 over all microcuts mc ∈ MC and all distillation units c∈C. In the nonlinear objective function (61), the coefficient wfmc ranges from 0 to 1 and stands for the weight of the quadratic deviation associated to microcut mc. wfmc has higher values for lighter microcuts mc ∈ MCL. l

i = ∑∈ ∑∈f j L7, − `NFZ M

(61)

In this way, the MINLP model for the tank allocation subproblem consists of the nonlinear objective function (61) to be minimized subject to the constraints (1)-(5), and (58)(60). Similarly to the simultaneous tank allocation and blending operations scheduling problem, the sequential approach makes use of a MILP-NLP solution strategy to solve the upper subproblem. The approximate MILP model for the tank allocation subproblem An approximate MILP representation is obtained by avoiding the nonlinearities in the constraint (60) and the objective function (61). To this end, absolute linear deviations instead of quadratic yield deviations are handled. The desired amount of microcut mc in the bulk feedstock for CDUc (QDESmc,c) is given by Eq. (62). In turn, the absolute linear deviation (QDEVmc,c) between the total amount of microcut mc supplied to distillation unit c (QMmc,c) and the desired value (QDESmc,c) is provided by Eqs (63)-(64). srJ, = ∑∈ `NFZ, ,

E ∈ f ,  ∈

ACS Paragon Plus Environment

(62)

Page 29 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

srt, ≥ Y, − srJ,

E ∈ f ,  ∈

(63)

srt, ≥ srJ, − Y,

E ∈ f ,  ∈

(64)

The objective function for the approximate MILP formulation aims to minimize the sum of the weighted absolute deviations over all microcuts and CDUs. Its expression is given by Eq. (65). i = ∑∈ ∑∈f j srt,

(65)

Then, the approximate MILP for the tank allocation subproblem consists of minimizing the objective function (65) subject to the set of constraints (1)-(5), (58)-(59) and (62)-64). By solving the approximate MILP, a good feasible solution for the MINLP formulation can be derived. Moreover, the approximate MILP provides a suitable starting point for the local NLP solver used to find a near-optimal solution of the NLP model obtained by fixing the integer variables YCtk,c to their MILP-values. Figure 2 shows the sequential procedure for allocating tanks to multiple CDUs and scheduling the crude blending operations so as to produce qualified and stable feedstocks for each distillation unit. RESULTS AND DISCUSSION The proposed sequential approach has been tested by solving twelve examples involving up to 4 CDUs, a number of charging tanks varying from 16 to 60 and storing up to 14 different types of crude oil, and crude oil blending stations of the CDUs with two transfer pipelines. The first three examples deal with small-size problems and were solved using both simultaneous and sequential approaches. The validation of the sequential solution method is made by comparing the results provided by the two approaches so as to assess the impact of the decomposition strategy on both the solution quality and the computing time. Some deterioration of the solution

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

quality produced by the problem decomposition is generally compensated by a strong reduction of the CPU time.

Figure 2. Flowchart illustrating the two-level sequential approach After successfully completing the validation stage, the performance of the sequential approach with large-scale problems is evaluated by solving nine additional examples featuring an increasing number of CDUs, charging tanks and types of crude oil. Besides, the ability of the sequential approach to manage different desired TBP distillation curves for the feedstock is also studied. Data for the examples include: (a) the number of CDUs being operated in the oil refinery; (b) the amounts and types of crude oil contained in the available set of charging tanks; (c) the TBP distillation curve and the sulfur concentration for each available type of crude oil; (d) the desired TBP curve for the feedstock of every CDU; (e) the maximum allowed sulfur concentration in the feedstock; (f) the limiting injection rates of the crude oil into the transfer pipelines; (g) the constant flow rate of the feedstock in the mixing line; (h) the emptying due date

ACS Paragon Plus Environment

Page 30 of 50

Page 31 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

for each charging tank; and (i) the microcut weight coefficients arising in the expression of the objective function. Data for all the examples are given as Supporting Information. The computational results are also reported for the twelve examples and include: (i) model sizes and required computing times; (ii) the schedule of the tank unloading operations delivering crude oil into the assigned transfer line of the CDUs; (iii) the injection rate of the crude oils into the transfer pipelines; (iv) the TBP distillation curve and the sulfur concentration for the successive feedstocks sent to each CDU; (v) the overall linear and quadratic deviations between actual and desired TBP curves of the feedstocks supplied to the CDUs; and (vi) the overall linear and quadratic changes of the TBP distillation data in pairs of consecutive feedstocks. All the computational results obtained for the twelve examples using the proposed solution approaches are given as Supporting Information. The mathematical models are implemented in GAMS 24.8.3 and solved using CPLEX 12.7 for the MILPs, and CONOPT 3.17C for the NLPs. All computations have been performed on an Intel Core i7-6820HQ quadcore CPU, with 16 GB RAM. The relative optimality gap tolerance has been fixed to 0.01 for the MILP models, and 0.0001 for the NLPs in all examples. Besides, a maximum CPU time of 3600 s was allowed. Validating the sequential approach through Examples 1-3 Deciding on the allocation of charging tanks to multiple CDUs and the scheduling of crude oil blending operations for each distillation unit, all at the same time, is the preferred solution approach unless it demands a very high computing time even for rather small-size examples. Unfortunately, that is the case for the problem under study and, consequently, we should turn the focus on the sequential approach as an alternative solution procedure. A decomposition strategy generally produces a remarkable reduction of the computational cost at

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 32 of 50

the expense of some deterioration of the solution quality. The computational cost savings and the solution deterioration degree should be evaluated before considering the sequential approach as a reliable method to solve large case studies. Examples 1-3 are three small-size examples involving a pair of CDUs, six different types of crude oil and a number of charging tanks varying from 16 for Example 1 to 20 for Examples 2-3 (see Supporting Information). Examples 2 and 3 only differ on the desired TBP distillation curve for the feedstock, with all the other problem data shared by both examples. Examples 1-3 have been studied with a double purpose: (i) to show the fast increase of the computing time with the number of tanks when using the simultaneous solution approach, and (ii) to evaluate the performance of the sequential method based on both the solution quality and the required computing time. Results for Examples 1-3 yielded by the simultaneous and sequential approaches are given in Table 1. Table 1. Comparing results for Examples 1-3 using simultaneous and sequential approaches Example

Example 1

Example 2

Example 3 (*)

Approach Simultaneous Sequential Simultaneous Sequential Simultaneous Sequential

CDU CDU1 CDU2 CDU1 CDU2 CDU1 CDU2 CDU1 CDU2 CDU1 CDU2 CDU1 CDU2

# tanks

# slots

16

8

8 8

5 5

20

10

10 10

6 6

20

10

10 10

7 5

Best MILP-NLP solution 1.84 1.62 2.24 1.74 2.52 3.13 2.94 1.82 2.36 5.08 3.79 4.46

MILP model CPU time Gap (s) (%)

NLP model CPU time (s)

1.2

-

0.14

1.9 1.9

-

0.19 0.06

3600*

29.0

0.38

2.3 2.2

-

0.14 0.03

3600*

20.0

0.31

45.2 1.0

-

0.53 0.05

CPU time limit

Example 1 considers an oil refinery with 2 CDUs, 16 charging tanks, 6 different types of crude oils, and crude oil blending systems composed of a pair of transfer pipelines and a mixing line. Figure 3 shows the TBP distillation curves of the available crude oils. The proposed

ACS Paragon Plus Environment

Page 33 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

simultaneous approach with |S| = 16 is solved in 1.34 s of CPU time. By selecting 16 time slots, a total of eight feedstocks are supplied to the pair of CDUs (i.e., four for each one), and the full content of each charging tank is allocated to only one batch. At the best solution, four different feedstocks are consecutively processed by each CDU. The optimal overall deviation of the feedstock from both the desired TBP curve and the constant composition pattern amounts to 3.46, with individual contributions of 1.84 from CDU1 and 1.62 from CDU2 (see Table 1). When the number of slots is increased to 20, no improvement is obtained.

Figure 3. TBP distillation curves for the crude oils available at Examples 1-3 On the other hand, the sequential approach should first solve the tank allocation subproblem to determine the subset of charging tanks feeding each CDU. As it happens with the other eleven examples, the best solution of the tank allocation subproblem is found in less than one second, i.e. a negligible computing time. After knowing the subset of tanks assigned to each CDU, the mathematical formulation of Cerdá et al.6 with |S| = 5 is sequentially applied to each individual CDU. In this way, the best schedule of the crude oil blending operations and the

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

compositions of the feedstocks processed in each distillation unit can be determined. Adopting |S| = 5 means that 5 different feedstocks are processed by each CDU and the crude oil stored in two of the charging tanks are to be allocated to two consecutive batches. The content of the other tanks will take part of a single batch. The best solutions for the pair of CDUs were found in 4.05 s of CPU time and the optimal overall deviation from the problem goals amounts to 3.98, i.e. 15% above the one obtained with the simultaneous approach for Example 1 (see Table 1). The least value for |S| is the lowest integer greater or equal to the ratio between the number of tanks assigned to the CDU and the related number of transfer lines. At Example 1, eight tanks are assigned to each CDU and therefore |S| ≥ (8/2) = 4. Initially, we choose |S| = 4 for both distillation units, but better results were obtained by choosing 5 time slots as the overall property deviation decreases from 5.63 to 3.98. For both approaches, the computing time is mostly allocated to solving the approximate MILP. The best schedule of the crude blending operations and the TBP distillation curves of the feedstocks provided by the simultaneous and sequential approaches for Example 1 are all shown as Supporting Information. For Examples 2 and 3, the number of charging tanks goes up to 20, and the desired TBP data for the feedstock varies with the example. Type and amount of crude oils contained in the additional tanks and the desired TBP curves for the feedstock are given as Supporting Information. In both examples, the simultaneous approach fails to reach the optimality gap tolerance of 0.01 within the CPU time limit of 3600 s when solving the approximate MILP. In fact, the best solutions found for the approximate MILP within the time limit exhibit sizable optimality gaps of 0.29 and 0.20 for Examples 2 and 3, respectively (see Table 1). The nonoptimal solution provided by the simultaneous approach for Example 2 presents an overall property deviation of 5.65. In contrast, the sequential approach solves the two subproblems in

ACS Paragon Plus Environment

Page 34 of 50

Page 35 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

less than 5 s and discovers a better solution for Example 2 with an overall deviation of 4.76. As shown in Table 1, a lower deviation has been found with the sequential approach by adopting |S| = 6. As 10 charging tanks have been assigned to each CDU by the tank allocation subproblem, then |S| ≥ (10/2) = 5. Initially, five slots are selected but the overall deviation diminishes from 6.56 to 4.76 by increasing the value of |S| for each CDU by one.

Figure 4. TBP curves of the feedstocks for Example 2 using the simultaneous and sequential approaches

In Figure 4, the TBP distillation curves of the feedstocks for the CDUs provided by the simultaneous and sequential approaches for Example 2 are compared. The black dotted line (DES) corresponds to the desired TBP curve and the symbol fi stands for the ith-feedstock supplied to the CDU. Better results are obtained when the TBP curves of the feedstocks are close

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

to each other and near to the desired TBP curve, especially at lighter microcuts featuring higher penalty coefficients wfmc. This is the case for the solution obtained with the sequential approach. More detailed results for Example 2 are given as Supporting Information. A good choice for the desired TBP curve of the feedstock is perhaps the one featured by the bulk feedstock, i.e. the TBP curve of the crude blend resulting from mixing the contents of crude oil in all available charging tanks. In fact, it is the target TBP curve for the feedstock at Examples 1 and 2. In contrast, another choice is selected for the desired TBP distillation data of the feedstock for Example 3. Then, this example serves to evaluate the ability of the sequential approach to deal with different desired TBP data for the feedstock. As expected, the overall property deviation from both problem goals, i.e. the desired TBP curve and the constant feedstock composition pattern, rises when using both approaches to solve Example 3. Although the approximate MILP is not solved to optimality, the simultaneous approach still finds the best solution for Example 3 with a total deviation of 7.34. Instead, the sequential procedure solves that example in less than 50 s but it finds a solution with an overall deviation of 8.25, i.e. 12.5% higher. At the second step of the sequential procedure consisting on solving the MINLP model of Cerdá et al.6 for each CDU, we choose |S| = 7 for CDU1 and |S| = 5 for CDU2 (see Table 1). Similarly to Example 2, |S| ≥ (10/2) = 5. Initially, it has been chosen |S| = 5 for both distillation units but further improvements were achieved for CDU1 by successively incrementing the number of slots from 5 to 7. By so doing, the individual property deviation for CDU1 goes down from 4.89 to 3.79. Detailed results for Example 3 are given as Supporting Information. From the results found for Examples 1-3, we can conclude that: (1) the simultaneous approach is not a good option at all for the scheduling of crude oil blending operations in large

ACS Paragon Plus Environment

Page 36 of 50

Page 37 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

oil refineries with multiple CDUs and a number of charging tanks over 20; (2) the sequential strategy produces some deterioration on the solution quality but still leads to acceptable solutions at much lower computing times; (3) crude oil blending policies adopted by the simultaneous and sequential approaches to produce the feedstocks for the CDUs may be different. Based on the conclusions (1) and (2), the sequential approach can be regarded as a promising solution method for the scheduling of crude oil blending operations in large oil refineries. Nonetheless, further studies involving the solution of much larger examples should be made to confirm that assertion. Testing the sequential approach by solving larger examples In this Section, nine larger examples are solved using the sequential approach. Examples 4-7 consider an oil refinery with 2 CDUs, 30 charging tanks containing 9 different types of crude oil, and desired TBP distillation data for the feedstock that change with the example. In particular, the desired TBP curves for the feedstock in Examples 4 and 5 look quite different. The TBP distillation curves for the available crude oils are shown in Figure 5.

Figure 5. TBP distillation curves for the crude oils available at Examples 4-9

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 38 of 50

Examples 4-7 permit to evaluate the computational performance and the ability of the sequential approach for properly managing crude oil blending operations so as to produce feedstocks with the desired composition. Table 2. Best solutions and CPU times for Examples 4-12 using the sequential approach

Example

CDU

# transf. pipelines

# tanks

# slots

Best MILP-NLP solution

Example 4

CDU1 CDU2 CDU1 CDU2 CDU1 CDU2 CDU1 CDU2 CDU1 CDU2 CDU3 CDU1 CDU2 CDU3 CDU1 CDU2 CDU3 CDU4 CDU1 CDU2 CDU3 CDU4 CDU1 CDU2 CDU3 CDU4

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

16 14 15 15 16 14 15 15 15 15 15 15 15 15 15 15 15 15 15 16 15 14 15 15 15 15

9 8 8 8 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 8 8 8 8 8

5.80 4.47 5.12 9.81 8.54 4.43 6.95 5.67 5.08 7.70 4.90 6.69 7.89 6.90 4.48 5.18 7.79 4.88 3.10 6.46 6.46 3.54 5.79 7.47 3.02 10.05

Example 5 Example 6 Example 7 Example 8 Example 9

Example 10

Example 11

Example 12

MILP model CPU time (s) 2345 247 290 199 2544 309 219 388 626 464 200 1839 384 2856 755 567 336 174 1831 520 558 1126 1222 127 1370 320

Gap (%) -

NLP model CPU time (s) 0.34 0.41 0.33 0.30 0.95 0.50 0.40 0.28 0.27 0.36 0.22 0.25 0.50 0.30 0.36 0.31 0.42 0.16 0.37 0.92 0.75 0.33 0.33 0.42 0.25 0.33

Table 2 presents the overall property deviation from the problem goal at the best known solutions of Examples 4-7, the required computing times, the number of charging tanks allocated

ACS Paragon Plus Environment

Page 39 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

to the CDUs and the value of |S| adopted at the MINLP formulation of Cerdá et al.6 for each CDU.

Figure 6. Comparing the TBP curves of the feedstocks found for Examples 4 and 5 Example 4 features a desired TBP curve for the feedstock very close to the one of the bulk feedstock and presents the least overall property deviation. As expected, the property deviation takes a higher value at Example 5 because of a less convenient selection of the TBP target for the feedstock, just for CDU2. Larger deviations of the feedstock for CDU2 from both the desired TBP curve and the constant composition pattern at lighter microcuts (i.e. lower TBP values) explain the higher value of the objective function for Example 5. The TBP curves of the

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

feedstocks at the best solutions of Examples 4 and 5 are compared in Figure 6. From Table 2, it is also observed that the computing time substantially increases with the number of time slots. In Example 4, the CPU time required to solve the approximate MILP for CDU1 rises from 862 s when adopting |S| = 8 to 2345 s when |S| = 9. At the same time, the individual property deviation for CDU1 decreases from 9.63 to 5.80. Note that |S| ≥ 8 for CDU1 in Examples 4 and 6. A similar dependency of the computing time with the cardinality of the set S arises in Example 6. On the other hand, Example 7 deals with a special case study where different desired TBP curves for the feedstock have been prescribed for the two CDUs, i.e. a less convenient TBP choice for CDU1 and a better one for CDU2. Computational results are surprisingly good in both overall quality deviation and computing time. It is ranked second just after Example 4. The TBP curves of the feedstocks for the two CDUs are shown in Figure 7. Detailed results are also shown as Supporting Information.

Figure 7. The TBP curves of the feedstocks at the best solution for Example 7 Examples 8-9 both consider a large oil refinery with 3 CDUs and 45 charging tanks that contain 9 different types of crude oil. The desired composition for the feedstock substantially

ACS Paragon Plus Environment

Page 40 of 50

Page 41 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

varies with the example. It is adopted the TBP curve of the bulk feedstock for Example 8 and a substantially different TBP target for Example 9. Data for Examples 8 and 9 are all given as Supporting Information. Computational results are reported in Table 2 and with more detail as Supporting Information. From Table 2, it follows that a uniform distribution of the charging tanks among the CDUs is provided by the tank allocation subproblem for both examples, i.e. 15 tanks are allocated to each CDU. For every distillation unit, the best results are obtained by adopting the minimum number of time slots, i.e. |S| = 8. No improvement is achieved by using an additional time slot.

Figure 8. TBP curves of the feedstocks at the best solution of Example 8

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

As expected, Example 8 featuring the bulk feedstock composition as the desired target is solved at much lower computing time and it presents the least overall deviation. The total CPU time spent to solve Example 8 amounts to 1291 s and the average property deviation per CDU is 5.89. In turn, Example 9 features an average deviation of 7.16 and demands 5080 s of CPU time. Figure 8 shows the TBP curves of the feedstocks sent to the three CDUs at the best solution of Example 8.

Figure 9. TBP distillation curves for the crude oils available at Examples 10-12 Examples 10-12 are the larger examples solved in this paper. Data for those examples are given as Supporting Information. They all involve the operation of 4 CDUs processing 14 types of crude oil coming from 60 charging tanks. The desired TBP target for the feedstock varies with the example. It is closed to the bulk feedstock composition for Examples 10 and 11, and relatively distant from that choice for Example 12. The TBP distillation curves for the available crude oils are depicted in Figure 9. A non-uniform distribution of the charging tanks among the CDUs is provided by the tank allocation subproblem just for Example 11. At the other two examples, 15 tanks have been allocated to each CDU.

ACS Paragon Plus Environment

Page 42 of 50

Page 43 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

Figure 10. The TBP distillation curves for the feedstocks at the best solution of Example 11 As before, the best results are obtained for Examples 10-11 but the computing time and the overall property deviation are still reasonable for Example 12 (see Table 2). The average property deviation per CDU is equal to 5.58 for Example 10, 4.58 for Example 11 and 6.58 for Example 12. In turn, the average computing time per CDU amounts to 489 s for Example 10, 1010 s for Example 11 and 760 s for Example 12. In summary, good solutions at reasonable computing times are obtained for large crude blending scheduling problems even if less convenient choices for the desired TBP curve are made. Figure 10 shows the TBP distillation curves for the feedstocks at the best solution of Example 11.

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

CONCLUSIONS A pair of MINLP mathematical approaches for the scheduling of crude blending operations in large oil refineries has been developed. In such refineries, several CDUs are available to process a wide variety of crude oils stored in many dedicated charging tanks. Qualified feedstocks for the CDUs are sequentially obtained by mixing different crudes at their in-line blending stations. To this end, the scheduler should allocate non-intersecting clusters of tanks to CDUs and schedule an appropriate sequence of blending operations for each crude distillation unit accounting for the properties of the assigned crudes. Sulfur concentration and the temperature boiling point (TBP) curve are the properties used to determine the desired feedstock quality. One of the proposed approaches is based on a rigorous MINLP formulation that simultaneously considers allocation and scheduling decisions, but it requires a large computational effort even for medium-size case studies. To overcome this drawback, an efficient two-level sequential approach based on a decomposition strategy is also proposed. Good feasible solutions for the problem are provided by the sequential method by first solving an MINLP model allocating tanks to CDUs and then repeatedly applying the MINLP formulation introduced by Cerdá et al.6 to find the best sequence of blending operations for each CDU. In every case, approximate linear formulations were developed to solve the MINLP formulations using an MILP-NLP solution strategy. A negligible CPU time is usually needed to solve the allocation subproblem. The performance of the sequential approach is analyzed by comparing the computational results yielded by both the simultaneous and sequential approaches for examples involving up to 20 charging tanks and a pair of CDUs. The comparison shows a limited deterioration of the solution quality when using the sequential approach that is highly compensated by a strong reduction of the computational effort. After the validation stage, the sequential methodology has

ACS Paragon Plus Environment

Page 44 of 50

Page 45 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

been tested by solving nine other examples involving an increasing number of CDUs, charging tanks and types of available crude oils. In every case, feedstocks for the CDUs result from mixing flows of two different crude oils since blending stations have a pair of transfer pipelines available. Analysis of the results proves a good performance of the sequential approach, in both solution quality and total CPU time, even for large case studies involving 4 CDUs, 60 charging tanks and 14 different types of crude oil. For a given number of CDUs and charging tanks, the CPU time significantly rises with the selected number of time slots |S| (i.e. the number of feedstocks processed by the CDU) and a less convenient choice of the desired TBP data for the feed streams. In the second step of the sequential approach, the least value for |S| is the lowest integer greater or equal to the ratio between the number of tanks assigned to the CDU and the related number of transfer lines. Then, a uniform assignment of tanks to CDUs leads to lower values for |S|. To study the impact of the selected TBP target for the feedstock on the solution quality and the required CPU time, examples differing just on the specified TBP target have been solved. Better solutions are obtained at lower CPU times when the TBP target for the feedstock is close to the one featured by the bulk feedstock, i.e. the crude blend ideally obtained by mixing the contents of all the available tanks. Nonetheless, good results are still found when less convenient TBP data are specified for the feedstock or the desired TBP curve varies with the CDU. SUPPORTING INFORMATION The supporting information file contains a set of tables with all the data for Examples 1-12, the model sizes and the computational results obtained for all of them, including the schedule of the unloading operations. In addition, it presents a series of figures depicting the

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

TBP curves of the available crude oils and the feedstocks for the CDUs at the best solutions for Examples 1-12. ACKNOWLEDGMENT The authors acknowledge financial support from FONCYT-ANPCyT under Grant PICT 20142392, from CONICET under Grant PIP-940, and from Universidad Nacional del Litoral under Grant CAI+D 2011-256. NOTATION Sets B Bc Bc,p C K MC MCL Pc S TK

batches batches preassigned to distillation unit c (Bc ⊂ B) batches preassigned to pipeline p of distillation unit c (Bc,p ⊂ Bc) crude distillation units trace elements pseudocomponents or microcuts of a crude oil light microcuts transfer pipelines in the blending station of distillation unit c time slots charging tanks

Parameters ddtk emptying due date for tank tk fcmin, fcmax limiting fractions of the total available crude to process by each distillation unit invtk crude inventory in charging tank tk fratec fixed feedstock flow-rate in the mixing line lyldmin, lyldmax limiting values for the total yield of light components in the feedstock qmin minimum batch size rmin, rmax limiting discharge flow-rates of crude oil from charging tanks vck,tk volumetric concentration of trace element k in the crude oil contained in tank tk vck,max maximum allowed concentration of trace element k in the feedstock wfmc normalized weight coefficient for microcut mc ydrefmc desired volumetric yield of microcut mc in the mixed feedstock yldmc,tk volumetric yield of microcut mc in the crude oil contained in tank tk Binary variables

ACS Paragon Plus Environment

Page 46 of 50

Page 47 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

XFtk,c,p XLtk,c,p Xtk,tk’,c,p YBb,tk YBNb,tk YCtk,c YSb,s YTtk,p

denotes that tank tk is the first delivering crude oil to pipeline p if XFtk,p = 1 denotes that tank tk is the last delivering crude oil to pipeline p if XLtk,p = 1 denotes that tank tk precedes tank tk’ in the tank emptying sequence of pipe p denotes that batch b∈Bc,p is discharged from tank tk into pipeline p of CDUc denotes that some batch b’ < b is delivered from tank tk into pipe p of CDUc denotes that the charging tank tk has been assigned to distillation unit c denotes that batch b∈Bc,p is discharged into pipe p of CDUc during the time slot s assign charging tanks to transfer pipelines

Continuous variables ADIFmc,c,s BYmc,c CBb,tk DEVmc,c,s DIFmc,c,s Lc,s LBb,tk LSb,s QBb,tk QCtk,c QDEVmc,c QKk,b,s QMmc,c QMBmc,b,s QMFmc,c,s QREFmc,c,s SBb,tk YMFmc,c,s YTCtk,c,p

absolute change of the amount of mc supplied to CDUc in two consecutive slots yield of microcut mc in the bulk feedstock for CDUc end time for the discharge of batch b∈Bc,p from tank tk into pipe p of CDUc absolute deviation of the amount of mc supplied to CDUc over slot s from target change of the amount of mc supplied to CDUc in consecutive slots (s-1) and s denotes the length of time slot s for CDUc length of the unloading operation of batch b∈Bc,p from tank tk length of the unloading operation of batch b∈Bc,p allocated to time slot s size of batch b∈Bc,p discharged from tank tk into pipeline p of distillation unit c amount of crude oil delivered from tank tk to the distillation unit c absolute deviation of the amount of mc in the bulk feedstock for CDUc from the desired value amount of trace element k in batch b∈Bc,p discharged during slot s total amount of microcut mc in the bulk feedstock for CDUc amount of microcut mc in batch b∈Bc,p discharged during slot s amount of microcut mc in the feedstock for CDUc supplied during the slot s desired amount of microcut mc in the feedstock for CDUc supplied during slot s starting time for the discharge of batch b∈Bc,p from tank t into pipeline p of CDUc yield of microcut mc in the feedstock for CDUc supplied during the slot s denotes that tank tk discharges crude oil into pipeline p of distillation unit c

REFERENCES 1. Shahnovsky, G.; Cohen, T.; McMurray R. Advanced solutions for efficient crude blending. Petroleum Technology Quaterly (PTQ), 2014, Q2 ,31-37. 2.

Reddy, P.C.; Karimi, I.A.; Srinivasan, R. A new continuous-time formulation for scheduling crude oil operations. Chem.Eng. Sci. 2004, 59, 1325-1341.

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

3.

Page 48 of 50

Li, J.; Li, W.; Karimi, I.A.; Srinivasan, R. Improving the robustness and efficiency of crude scheduling algorithms. AIChE J. 2007, 53, 2659-2680.

4.

Bai, L.; Jiang, Y.H.; Huang, D.X.; Liu, X.G. A novel scheduling strategy for crude oil blending. Chinese Journal of Chemical Engineering 2010, 18(5), 777-786.

5.

Bai, L.; Jiang, Y.H.; Huang, D.X. A novel two-level optimization famework based on constrained ordinal optimization and evolutionary algorithms for scheduling of multipipeline crude oil blending. Ind. Eng. Chem. Res. 2012, 51, 9078-9093.

6.

Cerdá, J.; Pautasso, P.C.; Cafaro, D.C. Scheduling multipipeline blending systems supplying feedstocks to crude oil distillation columns. Ind. Eng. Chem. Res. 2017, 56, 10783-10797.

7.

Castro, P.M.; Grossmann, I.E.; Zhang, Q. Expanding scope and computational challenges in process

scheduling.

Comput.

Chem.

Eng.,

2018.

https://doi.org/10.1016/

j.compchemeng.2018.01.020. 8.

Lee, H.; Pinto, J.M.; Grossmann, I.E.; Park S. Mixed-integer linear programming model for refinery short-term scheduling of crude oil unloading with inventory management. Ind. Eng. Chem. Res. 1996, 35, 1630-1641.

9.

Jia, Z.; Ierapetritou, M.; Kelly, J.D. Refinery short-term scheduling using continuous time formulation: Crude oil operations. Ind. Eng. Chem. Res. 2003, 42, 3085-3097.

10. Furman, K.C.; Jia, Z.; Ierapetritou, M. A robust event-based continuous time formulation for tank transfer scheduling. Ind. Eng. Chem. Res. 2007, 46, 9126-9136. 11. Karuppiah, R.; Furman, K.C.; Grossmann, I.E. Global optimization for scheduling refinery crude oil operations. Comput. Chem. Eng. 2008, 32, 2745-2766. 12. Saharidis, G.; Minuoux, M.; Dallery, Y. Scheduling of loading and unloading of crude oil in a refinery using event-based discrete time formulation. Comput. Chem. Eng. 2009, 33, 14131426. 13. Mouret, S.; Grossmann, I.E.; Pestiaux, P. A novel priority-slot based continuous-time formulation for crude-oil scheduling problems. Ind. Eng. Chem. Res. 2009, 48, 8515-8528. 14. Mouret, S.; Grossmann, I.E.; Pestiaux, P. Time representations and mathematical models for process scheduling problems. Comput. Chem. Eng. 2011a, 35, 1038-1063.

ACS Paragon Plus Environment

Page 49 of 50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Industrial & Engineering Chemistry Research

15. Mouret, S.; Grossmann, I.E.; Pestiaux, P. A new Lagrangian decomposition approach applied to the integration of refinery planning and crude-oil scheduling. Comput. Chem. Eng. 2011b, 35, 2750-2766. 16. Yadav, S.; Shaik, M.A. Short-term scheduling of refinery crude oil operations. Ind. Eng. Chem. Res. 2012, 51, 9287-9299. 17. Castro, P.; Grossmann, I.E. Global optimal scheduling of crude oil blending operations with RTN continuous-time and multiparametric disaggregation. Ind. Eng. Chem. Res. 2014, 53, 15127-15145. 18. Reddy, P.C.; Karimi, I.A.; Srinivasan, R. Novel solution approach for optimizing crude oil operations. AIChE J. 2004, 50, 1177-1197. 19. Li, J.; Misener, R.; Floudas, C.A. Continuous-time modeling and global optimization approach for scheduling crude oil operations. AIChE J. 2012, 58, 205-226. 20. Cerdá, J.; Pautasso, P.C.; Cafaro, D.C. An efficient approach for scheduling crude oil operations in marine-access refineries. Ind. Eng. Chem. Res. 2015, 54, 8219-8238.

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

TABLE OF CONTENTS GRAPHIC

ACS Paragon Plus Environment

Page 50 of 50