Simultaneous Optimization of Crude Oil Blending and Purchase

Jun 1, 2012 - A New Proactive Scheduling Methodology for Front-End Crude Oil and ... Refinery scheduling with varying crude: A deep belief network ...
0 downloads 3 Views 2MB Size
Article pubs.acs.org/IECR

Simultaneous Optimization of Crude Oil Blending and Purchase Planning with Delivery Uncertainty Consideration Jian Zhang, Yanqin Wen, and Qiang Xu* Dan F. Smith Department of Chemical Engineering, Lamar University, Beaumont, Texas 77710, United States ABSTRACT: Crude-oil blending is a common practice to obtain qualified mixing oils for refinery processing at low costs. The blending component crudes are subject to inventory constraints, which in turn are dynamically affected by the refinery purchase plan including the crude-oil types, amounts, and delivery over a planned period of time. As the crude-oil price and availability constantly changes in a volatile market, the crude-oil blending and purchase planning should be coordinated and simultaneously optimized to maximize the potential profitability of a refinery plant. This becomes even more important when the uncertainty of crude-oil delivery time is also taken into account. In this paper, a general MINLP (mixed-integer nonlinear programming) model is developed to address the profit optimization of crude-oil blending and purchase planning in refinery plants. Inventory-related flexibility indexes are developed to characterize the ability of a refinery for handling the uncertainty of crude-oil delivery delays. In-depth relations between the production flexibility and the plant profit are also disclosed. The efficacy of the developed methodology is demonstrated by industrial case studies. operations.7 Saharidis et al. proposed the event-based time representation for the loading and unloading of crude oils, where the time intervals were based on events instead of time.8 Mouret presented a continuous-time model based on the idea of postulating a potential number of tasks, which simplifies both the formulation and the application to crude-oil scheduling problems.9 He also presented a single-operation sequencing (SOS) model using continuous-time formulation.10 Crude-oil blending is a short-time scheduling activity, while crude-oil purchasing is a long-time planning behavior. It is noticed that the integration of planning and scheduling in optimization has received increasing interests.11−17 Simultaneous planning and scheduling allows for desirable and timely responses to the supply and demand markets and keeps the refinery production activities stable. Meanwhile, it is also recognized that dealing with different time scales and problem sizes from the resulted optimization models is the major challenge for such integration. Recently, Mendez et al. presented an MILP-based method that addresses the simultaneous optimization of the off-line blending and the short-term scheduling problem in oil-refinery applications.18 Erdirik-Dogan and Grossmann presented a multiperiod MILP model for the simultaneous planning and scheduling of singlestage multiproduct continuous plants with parallel units.19 It should be noted that there are still a lack of systematic studies directly addressing crude-oil blending and purchase planning simultaneously. Crude-oil blending aims at obtaining qualified mixing oils for processing at low costs. The blending component crude oils are subject to inventory constraints, which in turn are dynamically affected by the refinery purchase plan including the crude-oil types, amounts, and delivery over a

1. INTRODUCTION Decision makings on crude-oil purchase are very important for refineries. Normally, crude oils are evaluated and selected by various economic models under customized processing specifications of a refinery. To pursue the maximum economic and operational benefits, most refineries blend various crude oils with different compositions and bulk properties to meet some targeted specifications before charging them to crude distillation units (CDUs) for processing. The crude-oil blending needs to consider the property and cost issues from different grades of component crudes. The crude-oil grade is mainly determined by its sulfur content and density. Lower grade crude oils with high sulfur content and density are cheaper than the higher grade ones. For most refineries, because the densities of candidate component crudes are already within the specification, the density of blended oils will not be a problem. Therefore, the price and sulfur content of crude oil actually become the key evaluation aspects that should be optimally balanced during the crude-oil purchase. Crude-oil scheduling has been studied as an important part in the recent decade. Much work was reported on short-term operational scheduling. Shan presented a discrete-time model to address the crude-oil supply scheduling for a refinery.1 Lee et al. developed an MILP (mixed-integer linear programming) model to optimize the crude-oil unloading, blending, and charging to CDUs with inventory management.2 Some studies used continuous-time representation and MILP-based model to obtain the optimal scheduling.3,4 Especially, Reddy et al. presented an MINLP (mixed-integer nonlinear programming) model and a novel MILP-based solution approach for optimizing crude-oil unloading, storage, and processing operations.5 Karuppiah et al. presented an outer-approximation algorithm to obtain the global optimum of a nonconvex MINLP model covering the crude-oil movement schedule.6 Pan et al. presented an MINLP-based model combined with heuristic rules for the efficient scheduling of crude-oil © 2012 American Chemical Society

Received: Revised: Accepted: Published: 8453

December 14, 2010 May 23, 2012 June 1, 2012 June 1, 2012 dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

same type of crude oil are aggregated and considered as one logical crude-oil tank. Meanwhile, the mixing of different types of crude oils cannot occur in the crude storage tanks since enough of a number of crude-oil tanks is available. Therefore, the number of logical crude-oil tanks is equal to the number of crude-oil types. 2.3. Crude-Oil Blending. Component crude oils are charged from their tank inventory to the blender. In this paper, a series of logical blenders are used to represent all the physical mixing processes blenders. Each blender has the constraints on the flow rate and sulfur content of the blended oil that will be charged to CDUs. Meanwhile, we define “sweet oil” as the crude oil whose sulfur content is lower than a refinery processing limit. Sweet oils can be directly processed by the refinery. On the other hand, “sour oil” is defined as the crude oil whose sulfur content is higher than the refinery limit. Sour oils cannot be directly processed, and it should be blended with other sweet oils to meet the refinery processing limit. On the basis of the above description, the optimization for crude-oil blending and purchase planning is to decide the purchase orders and the blending schedule during a planned period of time. A purchase order results in an expected arrival day of some crude oils shipped to a refinery plant. Thus, the shipping time after purchase has been accounted. It should be noted that the total time horizon of the study is four months, which can be divided into two subperiods: the current subperiod (one month) which has a fixed purchase order already; and the future subperiod (three months) during which the crude-oil purchase should be optimized. The optimization problem can be summarized as below. 2.4. Given Information. (1) Estimated daily price information in market for each type of crude oil (2) Estimated daily price information in market for refinery product, such as gasoline and diesel (3) Sulfur content of each type of crude oil (4) Projected maximum available amount of each crude during the future subperiod; Daily supply quantity constraints from the sale market for each crude oil (5) Initial plant inventory for each type of oil (6) Fixed time (days) for the current subperiod and future subperiod (7) Fixed purchase order for the current subperiod (8) Lower and upper bounds for storage tank capacity (9) Total inventory constraint at the ending time of the entire time horizon (10) Specifications of daily flow rate and sulfur content for the blended oil 2.5. Information to Be Determined. (1) Purchase orders in the future subperiod (2) Daily blending strategy for material movement from crude-oil tanks to blenders

planned period of time. In the crude-oil market nowadays, as the crude-oil price and availability of different grade constantly changes, the crude-oil blending and purchase planning should be coordinated and simultaneously optimized to maximize the potential profitability of a refinery plant. This becomes even more important when the crude-oil delivery uncertainty, i.e., the delivery time delay, is also taken into account. In practice, the purchased crude oils may not be shipped to the production site on time due to various uncertainties, which makes the refinery inventory reduce. If the delivery time delay is significant, the available inventory of a refinery may soon be depleted, resulting in the shutdown of the plant. Thus, the inherent capability of a refinery to sustain its normal operation under the uncertainty of crude-oil delivery delays needs to be carefully investigated. Various techniques have been developed for handling uncertainties, such as recourse-based classical stochastic programming, robust stochastic programming, probabilistic or chance-constraint programming, stochastic dynamic programming, fuzzy programming, flexibility analysis and optimization, and multiparametric programming for mixed-integer quadratic programming.20−26 To characterize the inherent capability of a refinery for handling the delivery delay uncertainties, the property-based and quantity-based operational flexibility indexes and their combination are introduced in this paper. Obviously, a large flexibility index is desirable for production operation. This, however, may induce more crude-oil inventories and slower cash flows. Therefore, the optimization of crude-oil blending and purchase planning should proactively take the production flexibility into account and know in-depth about the relation between the plant profitability and production flexibility. In this paper, a general MINLP model for the integration of crude-oil blending and purchase planning is developed. Property-based flexibility and quantity-based flexibility indexes are developed and combined to characterize the production flexibility of a refinery under the presence of the delivery delay uncertainty. In-depth relations between the production flexibility and profitability are also disclosed. Industrial case studies are employed to demonstrate the efficacy of the developed methodology.

2. PROBLEM STATEMENT The paper will address simultaneous optimization of crude-oil blending and purchase planning through three aspects. The specific given information, decision variables, and assumptions are indicated below. 2.1. Crude-Oil Purchase. Market information for candidate crude oils is given, including crude oil type, sulfur content, estimated oil price, and projected maximum supply quantity. The decision variables for crude oil purchase are oil types, quantities, tanker type, and delivery time. Once a purchase order is placed for a planned period of time, it will provide the arrival (delivery) date, oil types, tanker type, price, and oil property (sulfur content). 2.2. Crude-Oil Receiving. Assume that the uploading time of new delivered crude oils can be neglected. Thus, the crude oil inventory of a refinery plant will be updated right after the crude-oil delivery. Meanwhile, the crude-oil unloading cost is comparably small and not sensitive to a purchase plan during a planned period of time; it is also neglected in this paper. Note that the crude-oil receiving tanks in this study are logical tanks instead of physical ones. All the physical tanks stored with the

3. MODELING FOR CRUDE-OIL BLENDING AND PURCHASE PLANNING 3.1. Flexibility Indexes. The proposed flexibility indexes are associated with the crude-oil inventory. It means the minimum time duration based on the current inventory without receiving any new crude oils to sustain the CDU feed with satisfied blending requirements. According to the CDU feed requirements, the inventory-related production flexibility index can be classified into two categories: the property-based (i.e., 8454

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

Figure 1. Sketch of the studied system.

sulfur content) flexibility index and the quantity-based flexibility index. 3.1.1. Property-Based Flexibility Index (PFI). As shown in Figure 1, let FOj,t and COj,t, respectively, represent the flow rate and the sulfur content of blended oils from the blender j directed to CDUs in time t. FOj,t and COj,t should be within the refinery specifications. Thus, the upper and lower bounds of FOj,t are defined as FOUj,t and FOLj,t, respectively. Similarly, COUj,t and COLj,t are upper and lower bounds of COj,t. Note that any component crude oil i (i∈I) has its own sulfur content defined as CII. According to the comparison between CII and FOUj,t, the total crude set I implies two subsets: the lower sulfur-content set Il and the highest sulfur-content set Ih as defined below. Il = {i|i ∈ I , CIi ≤ min COUj , t } j

Ih = {i′|i′ ∈ I , CIi ′ = max CIi} i

where Ei,t is the inventory of the i-th crude on time t and EXt is the estimated amount of the highest sulfur crude for the feasible blending operation on time t. It is an intermediate variable, which could be solved by eq 5 as below. EX t = PFIt ∑ FOUj , t − j∈J

j∈J

PFIt =

(6)

Note that PFIt is a function of time because the crude-oil inventory, Ei,t, will change with respect to time. 3.1.2. Quantity-Based Flexibility Index (QFI). The quantitybased flexibility index, QFIt, is the minimum time duration to sustain CDU feeds with satisfied quantity requirements. It only constraints the quantity of crude oil inventories, which is calculated by eq 7.

(1) (2)

QFIt =

∑ Ei ,t /∑ FOUj ,t , ∀ t ∈ T i∈I

j∈J

(7)

Both property-based and quantity-based flexibility indexes are inventory-related variables and functions of time, which give the conservative estimation on how long the inventory at time t can sustain the refinery operation if no new crude oils are imported since then. 3.1.3. Combined Flexibility Index (CFI). During the derivations of PFIt, the estimated value of the highest sulfur crude EXt has no upper limit. In some cases, the EXt may exceed the amount of sour oil inventories. Thus, the PFIt may have possibilities of being overestimated. Under such situations, QFIt reflects the actual sustainable time. Thus, a combined flexibility index, CFIt, defined by eq 8 gives a more accurate production flexibility.

(3)

j∈J

∑ (Ei ,t CIi), ∀ t ∈ T, i′ ∈ Ih i ∈ Il

j∈J

∀ t ∈ T, i′ ∈ Ih

PFIt ∑ (FOUj , t COUj , t ) = EX t CIi ′ +

∑ (Ei ,t (CIi′ − CIi))/∑ (FOUj ,t (CIi′ − COUj ,t )), i ∈ Il

∑ Ei ,t , ∀ t ∈ T i ∈ Il

(5)

i ∈ Il

By substituting eq 5 into eq 4, it gives the formula of PFIt as:

The property-based flexibility index, PFIt, is the minimum time duration to sustain CDU feeds with the satisfied sulfur content requirement using up all the crude-oil inventories that belong to Il. Because PFIt should be as small as possible, the crude oils with high sulfur contents employed for blending operation should belong to Ih, and each blender outflow rate should reach the upper bound of FOUj,t. This is just the way of calculating PFIt based on the worst case scenario in order to identify the smallest value of PFIt, which has nothing to do with controlling daily refinery feed rate. Therefore, eqs 3 and 4 present the total mass balance and sulfur balance related to PFIt. PFIt ∑ FOUj , t = EX t +

∑ Ei ,t , ∀ t ∈ T

CFIt = min(PFIt , QFIt ), ∀ t ∈ T

(4) 8455

(8)

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

3.2. Crude-Oil Purchase and Inventory Constraints. As aforementioned, the entire time horizon T is divided into the current subperiod T1 with fixed purchase orders and the future subperiod T2, whose purchase orders need to be optimally determined. Equations 9 through 11 provide market supply constraints in different time scales. Equation 9 describes the daily market constraint of the crude-oil purchase amount in T2. Here, FIi,t is the imported amount of the i-th crude-oil tank on time t, which is equivalent as the order amount from the purchase planning; FIk is the capacity of tankers. δ is the flexible range of a tanker around its normal capacity. In the studied cases, three types of tankers are defined. The capacities of the three tankers are 400, 750 and, 1000 kilo barrels, respectively. δ is 5%. Thus, a 400 kbbl tanker can ship 380−420 kbbl crude oil; a 750 kbbl tanker can ship 712−788 kbbl crude oil, and a 1000 kbbl tanker can ship 950−1050 kbbl crude oil. zk,i,t is a binary variable which denotes whether the crude oil i will be purchased at day t by the k-th type of tanker (zk,i,t = 1) or not (zk,i,t = 0). Equation 10 means at most one type of tanker could be used to ship crude oil i at day t. Equation 11 gives the market constraint, which describes the constraint of the total available amount for each crude oil in T2. FBmax is the projected i maximum available amount of crude oil i in T2. (1 − δ)

The control of blending operation is constrained by eqs 17 and 18, where a binary variable yi,j,t is introduced. M is a parameter with sufficient big positive value. If the i-th crude oil is selected for blending operation by the j-th blender in time t, the value of yi,j,t will be one, and Fi,j,t can be a positive value; otherwise, yi,j,t will be zero, and Fi,j,t must be zero to fulfill eq 17. Since it will take a very long time in practice to mix four or more crude oils with uniform properties, eq 18 specifies the maximum number of crude oils that can be simultaneously blended in a blender. Fi , j , t ≤ Myi , j , t , ∀ t ∈ T, ∀ i ∈ I, ∀ j ∈ J

∑ yi ,j ,t

∑ zk ,i ,t ≤ 1, ∀ t ∈ T2, ∀ i ∈ I k∈K

(10)

(11)

The inventory constraints for the crude-oil tanks are shown in eqs 12 through 14. FIi , t −

∑ Fi ,j ,t = Ei ,t − Ei ,t− 1, ∀ t ∈ T, ∀ i ∈ I j∈J

EiL ≤ Ei , t ≤ EiU , ∀ t ∈ T, ∀ i ∈ I

ESteL ≤

∑ Ei ,te ≤ ESteU , ∀ i ∈ I i∈I

(12) (13) (14)

where Ei,t is the crude-oil tank inventory at the end of time t; Fi,j,t is the oil movement amount from the i-th crude-oil tank to the j-th blender in time t; ELi and EUi are the lower and upper limits of the i-th crude-oil tank; ESLte and ESUte are the lower and upper limits of the total inventory of all the crude oils at the end of the time horizon, te. Equation 12 indicates that the inventory change of each crude-oil tank is equal to the inflow amount minus the outflow amount; eq 13 gives the storage capacity constraints of each crude-oil tank, and eq 14 constraints the total inventory at te, where Ei,te is calculated by eq 12 at te. 3.3. Blending Constraints. According to Figure 1, the total mass-balance constraint and sulfur balance constraint for each blender are shown in eqs 15 and 16, respectively.

∑ Fi ,j ,t = FOj ,t , ∀ t ∈ T, ∀ j ∈ J i∈I

∑ (Fi ,j ,tCIi) = FOj ,t COj ,t , ∀ t ∈ T, ∀ j ∈ J i∈I

FOjL, t ≤ FOj , t ≤ FOUj , t , ∀ t ∈ T, ∀ j ∈ J

(19)

COj , t ≤ COUj , t , ∀ t ∈ T, ∀ j ∈ J

(20)

3.4. Primary Objective Function. The primary objective function of the optimization problem is to maximize the total profit of the studied system. The profit considers loading, shipping, and unloading cost for different crude oil tankers but does not consider the detailed oil movement costs. The total profit is calculated as the income from product sales minus crude purchase cost, loading/unloading cost, and other operating cost and plus inventory value change. It should be noted that the loading/unloading cost is accounted by a fixed loading/unloading cost per time multiplying the number of purchasing times, which can be treated as a penalty associated with purchase frequency. Because the refinery model is not integrated in this paper, the income from product sales cannot be actually obtained. Thus, the crude blending oils are considered to be “sold” to a refinery, and the blending-oil sale income is equal to the income of refinery product sales minus refinery operating costs. Therefore, the total profit is equal to the income of blending oil sales plus inventory value changes minus crude purchase costs and fixed purchase costs, which is shown in eq 21. Note that the purchasing cost for each crude oil in this study already includes the transporting cost for different types of tankers. It is a gross profit but still valuable for decision support on oil blending and purchase planning.

(9)

∑ FIi ,t ≤ FBimax , ∀ i ∈ I t ∈ T2

(18)

Equations 19 and 20 give the limits of the effluent amount and sulfur content of each blender. Note that every refinery will have its own physical processing capacity. Thus, eq 19 provides the daily upper and lower bounds for the refinery feed amount FOUj,t and FOLj,t, which somehow are also indirectly affected by product market demands.

k∈K

∀ t ∈ T2 , ∀ i ∈ I

≤ N , ∀ t ∈ T, ∀ j ∈ J

i∈I

∑ (FIkzk ,i ,t ) ≤ FIi ,t ≤ (1 + δ) ∑ (FIkzk , i , t ), k∈K

(17)

max J1 =

∑ ∑ FOj ,t (PBt

+ aj , t − bj , t COj , t )

j∈J t∈T

+

∑ (Ei ,tePi ,te − Ei ,0Pi ,0) i∈I



∑ ∑ (FIi ,tPi ,t + zk ,i ,t ΔPk) i∈I t∈T



∑ ∑ ∑ Pfxzk ,i ,t i∈I t∈T k∈K

(21)

where Ei,te is the final inventory of the i-th crude oil in the last time slot (te) of the considered time horizon; Ei,0 is the initial inventory of the i-th crude oil; Pi,te, Pi,0, and Pi,t are market (purchase) prices for the i-th crude oil in the last time slot, the

(15)

(16) 8456

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

Figure 2. Price information of crude oils and refinery main products: (a) price data for crude oils; (b) price data for refinery main products.

initial time slot, and time t, respectively; ΔPk is the difference between the shipping cost of k-th type of crude tanker and the average shipping cost; Pfx is the fixed loading/unloading cost per time for purchased crude oil; PBt is the baseline price of blending crudes on time t, which is associated with parameters of aj,t and bj,t used to adjust blending oil prices related to sulfur content. In application, PBt, aj,t, and bj,tcan be regressed on the basis of historical data. Note that there is no direct price data available for blending oils. However, Figure 2a gives the price data of crude oils for the entire time horizon, and Figure 2b gives the price of the regular gasoline and diesel of a refinery.27,28 It can be seen that

the refinery product price is almost simultaneously changing with the crude-oil price. Thus, it is reasonable to estimate the blended oil price (immediate product price) would also align the similar changing trends as shown in Figure 2a,b. In eq 21, PBt + aj,t represents the relation of refinery product price and crude oil price. The operating cost of a refinery is roughly proportional to the sulfur content of inlet crude oil, because the refinery has to spend more fuel, steam, and hydrogen to remove more sulfur from products. In eq 21, −bj,tCOj,t represents the relation between operating cost and inlet sulfur content. Therefore, the price formula of the blended oil can be modeled as PBt + aj,t − bj,tCOj,t. Also note that economic values of crude 8457

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

oils in initial and final inventories should be accounted in the objective function; otherwise, the model tends to minimize final inventories. On the other hand, a refinery runs continuously. Thus, the crude oils purchased at the end of one planning period will help the next period to keep refinery working continuously. Generally, J1 is equal to the blending income, plus inventory value increase, and in the meantime, minus the crude-oil purchasing costs. By coupling eqs 6 through 21, an optimization model will be formed, where J1 can be maximized by manipulating the control variables of FIi,t, ∀t∈T2; Fi,j,t, ∀t∈T; and yi,j,t; ∀i∈I. 3.5. Secondary Objective Functions. Besides the primary objective function for maximizing the plant gross profit, there are two secondary objective functions related to inventoryrelated production flexibility. Since the combined flexibility index is the function of time, the two secondary objective functions are shown in eqs 22 and 23.

max min CFIt

(22)

min min CFIt

(23)

t

t

Figure 3. Study strategy and procedure.

where CFIt is already defined in eq 8. Note that each of the secondary objective functions can be used to replace the primary objective function of eq 21 to form a new optimization problem with the same constraints and the control variables. The solution of the optimization problem based on the objective function of eqs 22 or 23 will, respectively, identify the upper and lower bounds of CFIt.

algorithms of the branch-and-bound type that are guaranteed to provide fairly general assumptions.29 Since the only nonlinear terms in the developed model are bilinear, BARON can guarantee to provide the global optima for the conducted optimization.

4. STUDY STRATEGY AND PROCEDURE The big picture of this study is to simultaneously optimize crude-oil blending and purchase planning under delivery delay uncertainties. The profit maximization and the production flexibility maximization are generally two contradictory aspects that should be well balanced. To quantify their relationship under crude-oil delivery uncertainty, a systematical study as shown in Figure 3 has been conducted. The first step of this study strategy is to find the upper and lower bounds of the combined flexibility index, where eqs 22 through 23 are independently employed as an objective function to solve. During the modeling solution identification, various data is needed, including the price data, inventory data, and production specifications. If the solver finds a feasible range of CFIt, the studied problem is feasible; otherwise, the process modeling or input data need troubleshooting, or the studied problem is infeasible and thus is unnecessary to continue. When the studied problem is feasible and the range of CFIt is obtained from the first step, the second step is to find the maximum gross profit, where eq 21 is employed as the sole objective function. During this step, the CFIt is not considered. Then, the third step is to simultaneously consider profit maximization and the customized minimum CFIt. Thus, a threshold expectation of the minimum CFIt can be set and added as a constraint in the optimization model, where the objective function is to maximize the gross profit as shown in eq 21. This makes the optimization more applicable in terms of having taken into account delivery delay uncertainties. For comparison, the optimization results with and without consideration of CFIt are presented and discussed. All optimization models in this paper are solved by GAMSBARON, which implements deterministic global optimization

5. CASE STUDY A refinery with a daily production capacity of 105 000 barrels is selected for the case study. The entire scheduling period (T) is 120 days (from July 12 to November 8, 2008). The first 30 days belongs to the current subperiod (T1) and the remaining days belong to the future subperiod (T2). The refinery may purchase six crude oils as listed in Table 1, where the sulfur content and price information are also given. The maximum allowed sulfur content of the blending oil to CDUs in the refinery is 1.2%. Thus, three crude oils (i.e., CBD, OMN, and WTC) are sweet oils whose sulfur contents are lower than the maximum sulfur limit. The other oils (KWT, SAH, and SAL) are sour oils, which need to be blended before refinery processing. Among Table 1. Basic Information of Available Crude Oils

crude name Cabinda (CBD) Kuwait Blend (KWT) Saudi Arabia Heavy (SAH) Saudi Arabia Light (SAL) Oman Blend(OMN) West Texas Intermediate (WTC) a

8458

sulfur content (wt %)

average price difference from EIAa ($/barrel)

initial inventory (103 barrels)

market limit in T2 (103 barrels)

0.12

−0.09

500

2500

2.40

−1.95

500

2500

2.78

−4.38

0

2500

1.85

−0.78

0

2500

1.04

0.31

500

2500

0.33

2.92

500

2500

Data from EIA price during July 12 and November 8, 2008.27 dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

these sour oils, the crude oil SAH has the maximum sulfur content of 2.78%. The maximum number of crudes that can be simultaneously blended is four. The crude-oil price is shown Figure 2a. Note that since the crude-oil average price is a weekly based price, linear functions are used to estimate the daily crude-oil price. The loading/unloading fee can be estimated from an annual report of crude ports. In this paper, the loading/unloading fee is from the annual report of Dalian Port Company Ltd.30 The initial inventory and the projected market limits in T2 for various crudes (i.e., FBimax) are also shown in Table 1. The fixed purchase orders for the current subperiod (the first month) are shown in Table 2. Table 2. Fixed Purchase Orders in the First Month day

crude oil

amount (103 barrels)

1 5 12 18 28

CBD SAH KWT WTC SAL

400 750 750 1000 400

Figure 4. CFIt change when maximizing the minimum CFIt.

gives daily crude inventories change during the time horizon. Figure 4 shows that CFIt varies within the range of 11 to 31 days. The lowest CFIt (11 days) occurs at the 18th, 35th, and 120th days. The highest CFIt (31 days) occurs at the 98th day. From Figure 5, it can be seen that the 18th, 35th, and 120th days have low sweet oil inventories, which gives the reason why the CFIt values are low in these days. On the 98th day, both sweet oil inventories and total inventories are very high; thus, its CFIt is the highest. From Figure 5, it can be seen that the inventory of sweet oils such as CBD, OMN, and WTC oils are high on most of the days because the high sweet oil inventories will keep CFIt on high value. 5.2. Profit Optimization without Flexibility Consideration. The flexibility range calculation indicates the studied problem is a feasible problem, whose optimal solution must exist. In order to highlight the merit of the proposed flexibility index, the simultaneous optimization of crude-oil blending and purchase planning without flexibility consideration is conducted. The optimization model has one less constraint than the previous model for the identification of CFI range. Table 4 gives the optimization results, where 14 purchase orders are placed in the last three months. Among these orders, the number of placement for CBD, KWT, OMN, SAH, SAL, and WTC are, respectively, 3, 0, 4, 1, 3, and 3. The total gross profit is $4712 million. Figure 6 gives a daily CFIt changing curve. Figure 7 gives daily crude inventories changes in these three months. It shows some sweet oil inventories for some days already reach or nearly reach their lower limits. Under these days, some of them might suffer infeasible blending operations under certain upsets of crude-oil delivery delays. This possibility can be checked by the proposed flexibility indexes. Figure 6 shows the flexibility index changes based on the above optimization solution. The CFIt fluctuates between 0 and 31 days, and the average value is 14 days. Although the average value looks fine, CFIt will actually drop to 0 at day 100. That means the crude-oil tankers that arrive at day 100 have zero delay tolerance; otherwise, the sulfur content of blended crude oil for CDUs will exceed the limits (the refinery would shut down and cause great profit loss) no matter what blending strategies were employed in this day. Figure 7 shows the inventory changes of various crude oils, where low inventory scenarios are clearly indicated. Therefore, the optimization

5.1. Identification of the Range of CFIt. As shown in Figure 3, the first step is to identify the flexibility range of the case study by solving the models with eqs 22 and 23 as objective functions, respectively. The optimization model has 5702 continuous variables, 2340 binary variables, and 6489 constraints. The model was solved in a DELL workstation with an Intel Core i7-2.93 GHz CPU and 16GB memory. The average solving time for each case is 1757 s. The minimum value of CFIt is 0. It is understandable because CFIt is a nonnegative number and the optimization can easily drive the plant inventory to an inoperable situation during such a long time period (four months). When eq 22 is used as an objective function, the upper bound of CFIt is identified as 11. Thus, the maximum delay time of a fresh crude delivery that the refinery plant can sustain is 11 days. It occurs at the 18th, 35th, and 120th days. This means if shipment of low-sulfur content crude oils is delayed in these days, the refinery can still work up to 11 days. The gross profit J1 under the maximum CFI is $4613 million dollars. Table 3 gives the purchase orders during the future subperiod (from the second to the fourth months). There are 12 purchase orders, in which 3 orders are placed to purchase CBD oil, 3 orders for WTC, 2 orders for OMN, 2 orders for SAL, and 2 orders for KWT. Figure 4 gives daily CFIt change, and Figure 5 Table 3. Purchase Orders When Maximizing the Minimum CFIt new orders

day

crude oil

amount (103 barrels)

1 2 3 4 5 6 7 8 9 10 11

31 36 43 51 56 74 78 86 91 101 120

SAL CBD WTC CBD OMN OMN WTC KWT OMN WTC CBD

950 380 953 1047 380 713 380 713 950 950 950 8459

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

Figure 5. Crude inventory changes when maximizing the minimum CFIt.

solution without flexibility consideration contains high operational risks for application. 5.3. Profit Optimization with Flexibility Consideration. To make the optimization results applicable, the inventory-related flexibility should be considered. On the basis of the identified CFIt range, the plant may select an appropriate time as the minimum flexibility threshold (i.e., mint CFIt ≥ the threshold) to ensure that the refinery production have a designated flexibility at any time. For this case study, the minimum flexibility threshold is designated from 0 to 11 days. Since cases with the minimum flexibility thresholds equal to 0 and 11 have been discussed in Section 5.1, another 10 cases with the minimum flexibility thresholds designated as 1 through 10 are studied, respectively. With the same computing hardware and GAMS solver, the average solving time for these 10 cases is about 1928 s. Figure 8 shows that the gross profit monotonically decreases with the increase of the minimum flexibility threshold. This is understandable because the larger the minimum flexibility threshold, the more sweet oil will be required in the inventory at any time to support such a larger operational flexibility. Since sweet oils are generally more expensive than sour oils, the purchasing cost will increase; in the meantime, this may also loose opportunities to make profit from processing available inventories. Thus, the gross profit and production flexibility should be well balanced. Figure 8 actually provides a quantitative support for the plant to mange its operational risks. Table 5 gives the optimized purchase orders when the minimum CFIt threshold is selected as 3 days. Figure 9 shows the CFIt changes based on the obtained optimization solution. Figure 10 gives its related inventory changes. The CFIt fluctuates between 3 and 28 days, and the average value is 16 days. The total profit under this case is $4712 million. As expected, the minimum CFIt is 3, which occurs at 17 and 118 days. Figure 11 provides the daily blending strategy during the planed four months for various crudes. On the basis of the blending strategy, Figure 12 shows the sulfur content change of the blended oil during the planned four months. It can be seen that the sulfur content reach the limits (1.2 wt %) most of time,

Table 4. Purchase Orders When Maximizing the Total Profit new orders

day

crude oil

amount (103 barrels)

1 2 3 4 5 6 7 8 9 10 11 12 13 14

32 35 44 45 48 54 55 64 69 101 106 107 108 119

SAL WTC OMN OMN WTC OMN SAL SAL OMN WTC CBD CBD CBD SAH

420 420 380 950 1050 750 950 950 420 950 418 713 380 950

Figure 6. CFIt change when maximizing the total profit.

8460

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

Figure 7. Crude inventory changes when maximizing the total profit.

Figure 8. Relation between gross profit and the minimum flexibility threshold.

Figure 9. CFIt change when the minimum CFIt = 3.

making the production profit high. Near the end of the planning period, the blending oils are mainly CBD. This is because the crude price drops near the end of the period and sweet oils require lower operating cost; sweet oils are thus more profitable for processing during this period of low crude-oil price. Therefore, the sulfur contents of blending oils are also down. Finally, it should be noted that the current model is allowed to purchase the crude oils day-by-day under the circumstance of spot trading. The crude oil loading/unloading costs are used as a penalty function to decrease the frequency of purchases. The maximum number of purchases are 18, which means the average interval between two purchases is 5 days. There might be some other constraints to restrict such daily purchase possibility. However, because the constraints are difficult to be summarized in a general model, they are neglected in this paper for simplification. Interestingly, the optimal results for crude oil purchase in this work are actually not day-by-day activities (see Tables 2 through 5). In real applications, small purchase

Table 5. Purchase Orders When Maximizing the Total Profit under the Minimum CFIt = 3 new orders

day

crude oil

amount (103 barrels)

1 2 3 4 5 6 7 8 9 10 11 12 13

31 32 34 48 52 60 68 75 83 90 111 118 119

CBD OMN WTC OMN WTC SAL OMN CBD WTC SAL CBD SAH CBD

380 713 380 713 950 950 950 380 950 713 723 950 950

8461

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

Figure 10. Crude inventory changes when the minimum CFIt= 3.

Figure 12. Sulfur content change when the minimum CFIt = 3.

6. CONCLUDING REMARKS Short-time crude-oil blending and long-time crude-oil purchase planning should be simultaneously considered by refineries. During the integration, the uncertainty of crude-oil delivery time delay has to be taken into account to avoid refinery shutdown events. Thus, the simultaneous optimization of crude-oil blending and purchase planning with consideration of delivery delay uncertainties greatly increases the potential profitability and production flexibility of refineries. For this purpose, an inventory-related time flexibility index, CFIt, is

amount might be rounded off (e.g., round 997 tons to 1000 tons) if the total shipment amount is still under the capacity constraint. Also it is noted that the developed model is supposed to be rerun every month or whenever the model needs to be updated, e.g., when some delivery uncertainty is introduced. This paper assumes that enough “sweet oil” sources are available in the long term market.

Figure 11. Daily blending strategy when the minimum CFIt = 3. 8462

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

FBmax i

created and a general MINLP-based model is developed in this paper. Meanwhile, the relations between the production flexibility and the plant profit are also disclosed. The efficacy of the developed methodology is demonstrated by industrial case studies.



FIk FOUj,t, FOLj,t M N

AUTHOR INFORMATION Pfx

Corresponding Author

*Phone: 409-880-7818. Fax: 409-880-2197. E-mail: Qiang.xu@ lamar.edu.

Pi,t PBt ΔPk

Notes

The authors declare no competing financial interest.



te δ

ACKNOWLEDGMENTS This work was supported in part by Texas Air Research Center, Texas Hazardous Waste Research Center, and Graduate Student Scholarship from Lamar University.





i, i’ the i-th crude j the j-th blender k the k-th type of tanker t scheduling time slot Sets

set of all crudes set of the highest sulfur crude set of low sulfur crudes set of blenders set of tanker types set of the total time slots set of time slots with the fixed crude-oil purchase set of time slots whose crude-oil purchase need to be determined

Variables

the combined flexibility index at time t sulfur content of the i-th crude outflow sulfur concentration from the j-th blender the inventory of the i-th crude on time t the estimated amount of high sulfur crudes for feasible blending operation on time t FIi,t the purchased amount of the i-th crude that will be shipped on time t Fi,j,t the movement amount from the i-th crude to the j-th blender on time t FOj,t outflow amount from the j-th blender on time t PFIt the property-based flexibility index at time t QFIt the quantity-based flexibility index at time t yi,j,t a binary variable. If the i-th crude flows to the j-th blender on time t, then yi,j,t = 0; otherwise, yi,j,t = 1 zk,i,t a binary variable. If the crude oil i is purchased at day t by the k-th type of tanker, zi,t = 1; otherwise, zi,t = 0 CFIt CIi COj,t Ei,t EXt

Parameters and coefficients

aj,t, bj,t COUj,t ELi , EUi Ei,0 ESLi , ESUi

REFERENCES

(1) Shan, N. Mathematical programming techniques for crude oil scheduling. Comput. Chem. Eng. 1996, 20, S1227−S1232. (2) 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. (3) Jia, Z.; Ierapetritou, M. Refinery Short-Term Scheduling Using Continuous Time Formulation: Crude-Oil Operations. Ind. Eng. Chem. Res. 2003, 42, 3085−3097. (4) Reddy, P. C. P.; Karimi, I. A.; Srinivasan, R. A new continuoustime formulation for scheduling crude oil operations. Chem. Eng. Sci. 2004, 59, 1325−1341. (5) Reddy, P. C. P.; Karimi, I. A.; Srinivasan, R. Novel solution approach for optimizing crude oil operations. AIChE J. 2004, 50, 1177−1197. (6) Karuppiah, R.; Furman, K. C.; Grossmann, I. E. Global optimization for scheduling refinery crude oil operations. Comput. Chem. Eng. 2008, 32, 2745−2766. (7) Pan, M.; Li, X.; Qian, Y. New approach for scheduling crude oil operations. Chem. Eng. Sci. 2009, 64, 965−983. (8) Saharidis, G. K. D.; Minoux, 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, 1413−1426. (9) Mouret, S.; Grossmann, I. E.; Pestiaux, P. Multi-operations timeslots model for crude-oil operations scheduling. Comput.-Aided Chem. Eng. 2008, 25, 593−598. (10) 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. (11) Coxhead, R. E. Integrated planning and scheduling systems for the refining industry. Optimization in Industry 2. 1994, New York: Wiley and Sons, 185−199. (12) Papageorgiou, L. G.; Pantelides, C. C. Optimal Campaign Planning/scheduling of Multipurpose Batch/semi-continuous Plants, 1. Mathematical Formulations. Ind. Eng. Chem. Res. 1996, 35, 488− 509. (13) Papageorgiou, L. G.; Pantelides, C. C. Optimal Campaign Planning/scheduling of Multipurpose Batch/semi-continuous Plants, 2. A Mathematical Decomposition Approach. Ind. Eng. Chem. Res. 1996, 35, 510−529. (14) Sand, G.; Engell, S.; Markert, A.; Schultz, R.; Schulz, C. Approximation of an ideal online scheduler for a multiproduct batch plant. Comput. Chem. Eng. 2000, 24, 361−367. (15) Rodrigues, M. T.; Latre, L. G.; Rodrigues, L. C. Short-term Planning and Scheduling in Multipurpose Batch Chemical Plants: A Multi-level Approach. Comput. Chem. Eng. 2000, 24, 2247−2258. (16) Neiro, S. M. S.; Pinto, J. M. Supply Chain Optimization of Petroleum Refinery Complexes. Proc. FOCAPO 2003, CACHE 2003, 59−72.

NOMENCLATURE

Indices

I Ih Il J K T T1 T2

the projected maximum available amount of crude oil i in T2 the capacity of the k-th type of tanker the upper and lower bounds of FOj,t a big positive number the maximum number of crudes permitted for simultaneously blending in a blender fixed loading/unloading cost per time for purchased crude oil the price of the i-th crude on time t the baseline price of blending crudes on time t the difference between the shipping cost of k-th type of crude tanker and the average shipping cost the last time slot under consideration the flexible range around the tanker capacity

parameters to calculate blending product price related to sulfur content the upper bound of COj,t the lower and upper bounds of the i-th crude inventory the initial inventory of the i-th crude the lower and upper bounds of the entire crude system inventory 8463

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464

Industrial & Engineering Chemistry Research

Article

(17) Van den Heever, S. A.; Grossmann, I. E. A Strategy for the Integration of Production Planning and Reactive Scheduling in the Optimization of a Hydrogen Supply Network. Comput. Chem. Eng. 2003, 27, 1813−1839. (18) Mendez, C. A.; Grossmann, I. E.; Harjunkoski, I.; Kabore, P. A simultaneous optimization approach for off-line blending and scheduling of oil-refinery operations. Comput. Chem. Eng. 2006, 30, 614−634. (19) Erdirik-Dogan, M.; Grossmann, I. E. Simultaneous planning and scheduling of single-stage multi-product continuous plants with parallel lines. Comput. Chem. Eng. 2008, 32, 2664−2683. (20) Bertsekas, D. P.; Tsitsiklis, J. N. Neuro-dynamic programming; Athena Scientific: Belmont, MA, 1996. (21) Birge, J. R.; Louveaux, F. V. Introduction to stochastic programming; Springer: New York, NY, 1997. (22) Bansal, V.; Perkins, J. D.; Pistikopoulos, E. N. Flexibility analysis and design of dynamic processes with stochastic parameters. Comput. Chem. Eng. 1998, 22, S817−S820. (23) Sahinidis, N. V. Optimization under Uncertainty: State-of-theart and Opportunities. Comput. Chem. Eng. 2004, 28, 971−983. (24) Verderame, P. M.; Floudas, C. A. Integration of Operational Planning and Medium-Term Scheduling for Large-Scale Industrial Batch Plants under Demand and Processing Time Uncertainty. Ind. Eng. Chem. Res. 2010, 49, 4948−4965. (25) You, F.; Grossmann, I. E. Mixed-Integer Nonlinear Programming Models and Algorithms for Large-Scale Supply Chain Design with Stochastic Inventory Management. Ind. Eng. Chem. Res. 2008, 47, 7802−7817. (26) Grossmann, I. E.; Guillen-Gosalbez, G. Scope for the application of mathematical programming techniques in the synthesis and planning of sustainable processes. Comput. Chem. Eng. 2010, 34, 1365−1376. (27) US EIA (Energy Information Administration). World crude oil prices; 2010, available online at http://www.eia.gov/dnav/pet/pet_ pri_wco_k_w.htm. (28) US EIA. Weekly retail gasoline and diesel prices; 2010, available online at http://www.eia.gov/dnav/pet/pet_pri_gnd_dcus_nus_w. htm. (29) Sahinidis, N.; Tawarmalani, M. GAMS BARON user manual; GAMS Development Corporation: Washington, DC, 2009. (30) Dalian Port (PDA) Company Ltd. Annual report of the Dalian Port Company Ltd; 2008, available online at http://www.dlport.cn/ Files/DownLoad/E%2008%20AR.pdf.

8464

dx.doi.org/10.1021/ie102499p | Ind. Eng. Chem. Res. 2012, 51, 8453−8464