Improved Integrated Optimization Method of Gasoline Blend Planning

Mar 31, 2016 - ACS eBooks; C&EN Global Enterprise .... An innovative integrated optimization strategy for gasoline blend planning is proposed, and an ...
0 downloads 0 Views 2MB Size
Subscriber access provided by RMIT University Library

Article

Improved integrated optimization method of gasoline blend planning and real-time blend recipes kaixun He, Feng QIAN, Hui CHENG, and Wenli DU Ind. Eng. Chem. Res., Just Accepted Manuscript • DOI: 10.1021/acs.iecr.6b00121 • Publication Date (Web): 31 Mar 2016 Downloaded from http://pubs.acs.org on April 1, 2016

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 free 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 accessible to all readers and 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.

Industrial & Engineering Chemistry Research 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 42

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

Improved integrated optimization method of gasoline blend planning and real-time blend recipes Kaixun Hea,b , Feng Qiana* , Hui Chenga , Wenli Dua Key Laboratory of Advanced Control and Optimization for Chemical Processes (East China University of Science and Technology), Ministry of Education, Shanghai 200237, a

China; b

School of Information Science and Engineering, East China University of Science and Technology, 200237, China

ABSTRACT: An innovative integrated optimization strategy for gasoline blend planning is proposed, and an improved method to achieve online optimization of real-time blend recipes is described. The proposed strategy can calculate a rough blend and delivery sequence of gasoline and then adapt to process changes by using a three-level discrete-time algorithm. Only one blender is considered in this study. A single-period nonlinear model (NLP) is solved at the top level of the algorithm to check the feasibility of a long-term production plan. A multi-period mixed-integer nonlinear model is formulated and solved at the middle level of the algorithm to compute a short-term blend plan. Finally, a single-period NLP is solved circularly at the lowest level of the algorithm to optimize blend recipes to consider the changes in the quality of blend components. The initial plan is modified if the top-level model is not feasible. The middle-level model is resolved if an unexpected event occurs during blending. The proposed approach is advantageous because the initial planning and blending recipes can be modified online, remarkably minimizing quality giveaway and increasing the blending success rate. The performance of the proposed strategy is illustrated through its industrial application in real-world gasoline blending. Keywords: gasoline blend, integrated optimization, recipe optimization 1 Introduction Gasoline is one of the most important products in a typical petroleum refinery, roughly accounting for as much as 60%–70% of its total revenue1–3. Gasoline blending is the final and key process before a gasoline product is delivered. The final product is reblended if its qualities cannot satisfy specifications after a specific blending period.

*

Corresponding author: Feng Qian Email address: [email protected] (Feng Qian) 1

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

Reblending increases the blending cost and delays the delivery of orders. Moreover, the final gasoline product generates quality giveaways. Thus, a consistent octane giveaway of 0.1 [research octane number (RON) or motor octane number (MON)] can cost a refinery several millions of dollars annually2. In addition, blending is often highly complex and nonlinear because of the changes in blending components, unsteady demands, and constant strict specifications1,4. Therefore, the successful operation and optimization of gasoline blending has become a main focus of technological innovations in refineries to improve profitability5,6. A simple gasoline blend system is shown in Figure 1. A blend system basically mixes intermediate components according to a certain recipe to form a specific gasoline product7. Gasoline blending constraints involve management of components and product inventory, limitation of blending capacity, and required quality specifications. These drawbacks considerably increase the complexity of the blending process. A conventional gasoline blending system that manages these issues is built on three levels, namely, blend planning, scheduling, and process control. A blend planning model is usually formulated and optimized offline. A model is developed to cover a long-term scenario to primarily determine the volumes of intermediate components and the amount of the final gasoline produced during one or several months.8,9 Thus, blend planning optimization covers the proper coordination of intermediate components and the capability of blenders and suitability of products with respect to market requirements and economies10. The linear programming (LP) and nonlinear programming (NLP) models have been widely adopted to optimize blend planning8,11,12. Planning models are generally developed offline and should be adjusted in practice. Many commercial software, such as Aspen Blend, Aspen PIMS-MBO, Aspen ORION, and Honeywell’s BLEND, are applied to solve LP or NLP planning models1,5,13. However, these programs do not involve detailed scheduling decisions. Simultaneous planning and scheduling is necessary because blending plan results serve as bases for developing a proper scheduling model. Hence, many studies have attempted to integrate planning and scheduling. Mathematical models, such as mixed-integer linear programming (MILP) and mixed-integer nonlinear programming (MINLP), have been designed to solve these scheduling issues. Moro et al.14 established an NLP model representing a general refinery topology; in this model, a nonlinear process and blending relations were implemented. Glismann and Gruhn15 presented an integrated scheduling and optimization model based on a hierarchical 2

ACS Paragon Plus Environment

Page 2 of 42

Page 3 of 42

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

concept. The model solved long-range planning via NLP, and the scheduling problem was formulated via MILP. Top-level planning can then be adjusted because the new constraints can be imposed on the previous multi-blend problem in the scheduling level. Joly and Pinto16 proposed a two-level strategy to solve the combination issues of planning and scheduling, which were formulated as NLP and MILP models. The authors reported that planning and scheduling problems could be efficiently formulated as large-scale mixed-integer programming models. Subsequently, Joly et al.17extended their approach and introduced an MINLP for short-term scheduling problems. An excellent industrial application for fuel oil and asphalt production was also reported. Mendez et al.18 developed an MILP-based method to simultaneously optimize offline blending and scheduling. They also proposed an iterative algorithm to manage nonlinear gasoline properties. Li et al.1 presented a continuous time slot-based MILP model, which integrated treatment recipe, blending, and scheduling. Li and Karimi4 then extended the MILP model with unit slots to replace process slots, remarkably improving computational times. Castillo and Mahalec8 introduced inventory pinch point theory and used this theory to develop a single-period nonlinear model for gasoline blending. The main advantage of this strategy is its ability to reduce the number of different blend recipes in a short-term scheduling period. In addition, the strategy can balance the inventory, blending capability, and product demands using inventory pinch points. Castillo et al.13 expanded the model to replace the single-period procedure with a multi-period one. A two-level algorithm was adopted in the extended approach to compute blend plans. The NLP models were initially solved to determine the optimal blend recipes. Then, a multi-period MINLP program was developed to calculate the optimal production plan with fixed recipes obtained from the first level. Castillo and Mahalec5 introduced a three-level discrete-time algorithm that involved delivery of orders and detailed scheduling based on a two-level strategy5. Optimal blend recipes in the extended approach were determined in the first level, and then used to compute an approximate schedule with a discrete-time multi-period MILP model for the entire horizon. Finally, a detailed schedule solved at the third level considered production and delivery rates and the start and end times of the tasks. The model proposed by Castillo and Mahalec5 can accommodate the adjustment of the initial blend plan and determine optimal blend recipes during scheduling. However, component qualities are assumed to be constant, and order demands are predetermined. Thus, capturing the dynamic nature of the blending process proved to be difficult, indicating that recipes 3

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

and scheduling are not the optimal parameters for actual blending. Mendez19, Tang20, and Maravelias21 showed more planning and scheduling solutions. These literature reviews suggest that the previous approaches to solve planning and scheduling problems are offline-based and calculated using deterministic mathematical programming methods with a deterministic dataset. Only a few studies have considered online recipe operation and gasoline blending control. The components in an actual refinery usually originate directly from the upstream equipment for economic reasons. Therefore, variations in the component properties cannot be eliminated, and these variations usually invalidate the initial recipe7. The changeover in blend components, unsteady order demands, and other unexpected events commonly occur. Thus, real-time scheduling and recipe operation are important considerations of modern refineries to ensure high-quality final gasoline product, minimize quality giveaway, and fulfill order demands. An innovative online gasoline blend scheduling and recipe updating strategy is developed in the present work to solve gasoline planning, scheduling, and recipe updating concerns. The total volume of each gasoline grade for a scheduling horizon is determined given that scheduling operations are based on long-term blending planning results. Hence, the present work directly uses the planning results as initial production plan. The scheduling framework in this study is based on the hierarchical structure proposed by Castillo and Mahalec5,8,11,13, which is extended through planning verification, scheduling adjustment, and recipe operation. Thus, the proposed strategy can verify initial production plan, manage unplanned events, adjust blending recipe, and promptly modify scheduling. This strategy can significantly minimize quality giveaway and remarkably increase the blending success rate. The proposed strategy involves three levels. First, a single-period NLP model is established to verify the initial production plan formulated by a long-term decision. Then, a multi-period MINLP model is formulated, and approximate scheduling is calculated. Scheduling mainly determines a blending sequence, initializes blending recipes, and optimizes the delivery plan. Finally, the recipes are optimized online to manage fluctuations in the intermediate gasoline during blending under a certain period. The initial scheduling is adjusted if unexpected events occur (e.g., a change in intermediate oil and a temporary order demand). Details of the proposed strategy are discussed in section 4. The rest of this paper is presented as follows. A problem is initially described in detail in section 2, in which the problem statement and assumptions are introduced. 4

ACS Paragon Plus Environment

Page 4 of 42

Page 5 of 42

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

The blending model for certain key properties and the online analysis approach are presented in section 3. Section 4 describes the proposed online gasoline blend scheduling and recipe updating strategy. Section 5 discusses an actual industrial application, and section 6 presents the conclusions. 2 Problem definitions In the traditional gasoline blending process, numerous intermediate components are pumped into target tanks according to a pre-calculated recipe. This process is based on offline scheduling and an optimization model. Both scheduling and recipe remain unchanged during blending. All properties of the components are basically assumed to be piecewise constant. This assumption is based on the application of intermediate storage tanks for each component. However, the limited storage tank resources and intense time pressure have resulted in the direct acquisition of blend components from the upstream equipment and blending in online blend units. Therefore, the components have irregular properties that fluctuate with the upstream equipment. Consequently, the initial scheduling and blending recipe should be modified, and the use of an online gasoline blending process is necessary to resolve such problem. The flow sheet of a typical online gasoline blending comprises blend components, blenders, product tanks, and an analysis and control system (Fig. 2). The following five issues should be considered in this process: (1) long-term planning, (2) scheduling and adjustment, (3) initialization of the recipe and its real-time optimization, (4) online analysis strategy, and (5) process control strategy. This work mainly explores techniques to manage issues (1) and (3). The updating of online gasoline blend scheduling and recipe in this study is described as follows. The following data are given: 1. A predefined short-term scheduling horizon [0, H] that is divided into fixed

durations 1,2, … , N. Each period describes an online regular production; 2. A predefined online recipe optimization period (the blending recipe is fixed until the next optimization starts); 3. A set of blend components, initial inventories, properties, and unit cost of these

components. The real-time properties and flow rates of each component can be obtained via a process analytical tool [PAT, which refers to the online near-infrared (NIR) spectral analysis system in this paper]; 4. A set of products with prescribed quality specifications, initial inventories, and qualities of corresponding tanks; 5. A set of component tanks, limits on tank holdups, and flow rate of feeds into 5

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 tanks; 6. Initial production plan for the overall scheduling horizon; and 7. Blend headers and maximum blending capacity of these headers. The following characteristics are determined: 1.Blending sequence along the scheduling horizon; 2.Initial blending recipe of each production period; 3.Inventory profiles of the component and product tanks; 4.Delivery volume of each gasoline grade in one period; 5.Real-time recipe in a certain blending process; and 6.Adjustment of the initial scheduling. The following factors are subjected to the operating rules: 1. Processing capability of blenders; 2. Inventory constraints; 3. Quality specification of each gasoline grade; and 4. Maximum amount of blend components during each period. The following assumptions are considered: 1. All final products are in short supply. 2. Perfect mixing occurs in blend headers. 3. Each blending period involves only a single product. 4. Each order is completed during the blending period. 5. Each gasoline product has only one storage tank. 6. Component and product tanks may receive and feed simultaneously. 7. A product tank may deliver multiple orders simultaneously. 8. No tank exists for all wild streams (the straight blend components, e.g. OCTMD and SZORBD, which come directly from upstream units without any intermediate storage and cannot be directly manipulated by the blending application). Therefore, the inventory of these components is zero. 9. All qualities of components and a gasoline product can be obtained online via a PAT. 10. The initial production plan of a gasoline product in a scheduling horizon is determined according to the leading refinery planning. 11. Only one blender is considered.

6

ACS Paragon Plus Environment

Page 6 of 42

Page 7 of 42

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

3 Blending model and online analysis approach 3.1 Blending model Gasoline blending mixes components to produce a certain gasoline grade. Thus, a blending model is necessary to determine the qualities of the final gasoline through the component quality index. This model serves as the basis of recipe optimization and calculated scheduling. The development of a blending model is not the major objective of this study, but a gasoline blending model is introduced in this section to provide an integrated presentation. The gasoline properties considered in this work include the RON, MON, vapor pressure, aromatics (ARO), benzene (BEN), olefin (OLE), oxygen content (OC), and final boiling point (FBP). Among all these properties, RON, MON, and vapor pressure involve strongly nonlinear blending rules, whereas the other properties are usually calculated via a linear blending model. The Reid Vapor Pressure (RVP) is a standard laboratory test defined by the American Society for Testing and Materials (ASTM) to measure the volatility of gasoline and other light products2. Many previous studies1,2,11 adopted RVP in Eqs. (1)–(3), which were proposed by Gary22 and widely used in practice. The same formulation is also applied in this study. RVPBI i = ( RVPi )1.25 , i = 1, 2,..., n

(1)

n

RVPBI = ∑ ri RVPBI i , i = 1, 2,..., n

(2)

RVP =RVPBI 1/1.25

(3)

i =1

In addition to RVP, RON and MON are the key gasoline properties that indicate the anti-knock characteristics of gasoline. These parameters are also typically used as gasoline grades. Similar to RVP, RON and MON are defined by the ASTM. RON represents the engine performance under city driving conditions, whereas MON represents that highway conditions. However, various blending methods exist for octane number, such as the Ethy1 RT-70 models proposed by Healy et al.23, which are widely used, and standard octane blending models. The Ethy1 RT-70 models are shown in detail by Eqs. (4) and (5). RON b = RON + a1[ RON × Sens − ( RON )( Sens )] + a2 [(OLE 2 ) − (OLE ) 2 ] + a3 [( ARO 2 ) − ( ARO) 2 ] 7

ACS Paragon Plus Environment

(4)

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 8 of 42

MON b = MON + b1[ MON × Sens − ( MON )( Sens ) 2 ] + b2 [(OLE 2 ) − (OLE ) 2 ] + b3 [

(5)

( ARO 2 ) − ( ARO ) 2 2 ] 100

Ethy1 RT-70 requires the volume percentages of OLE and ARO, imposing a higher requirement for sample analysis. In addition, along with the change in blend components, RON, MON, OLE, and ARO may vary beyond the scope of the model parameters. Hence, a huge error occurs for both the final RONb and MON b . The blending effective method (BEM) is adopted in the current study to simplify the blending model24. BEM basically involves two steps, as follows: (i) compensation of the octane number of each blend component; and (ii) development of a linear blending model using the octane number obtained from step (i). The BEM has many advantages, such as simple form, high precision, and easy to understand, facilitating the use of this model for industrial applications. A brief review of the BEM is presented in the next paragraph. A gasoline blending process (Fig. 1), which involves n kinds of components and one final gasoline product, is considered. The octane number of the final gasoline product is calculated through the BEM using the following process. First, the octane number of each blend component is compensated. Qx ( Oo ,i ) = Oo ,i + pbo ,i , o ∈ { RON , MON }

(6)

( )

Then, a linear blending model that employs compensatory value Qx Oj,i

is

established, and the octane number of the final gasoline product is obtained through Eq. (7). n

Po = ∑ ( ri ⋅ Qx ( Ooi ) )

(7)

i =1

Only pbo ,i in Eqs. (6) and (7) requires calculation, whereas the other elements are obtained from a history dataset. According to the history data, pbo ,i can be obtained via linear regression analysis. For example, a history dataset involves m groups of blending recipes, n sets of components, and the corresponding octane number of these components. The following parameter is then obtained according to Eqs. (6) and (7):

8

ACS Paragon Plus Environment

Page 9 of 42

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

 Po1   pbo,1   2    Po   r1,1 r1,2 L r1,n   pbo,2   r1,1  M   r2,1 r2,2 L r2, n   M   r2,1 ⋅  i= + pb   M M r M P o , i l ,i  o    M     M  r rm,2 L rm,n  M   rm,1 m ,1       Pom   pbo ,n 

r1,2 r2,2 M rm,2

 Oo,1    L r1,n  Oo,2  L r2,n   M  ⋅ . rl ,i M   Oo,i   L rm, n   M    Oo,n 

(8)

The recipe matrix in Eq. (8) is denoted as Rm ,n for preservation clarity. Hence, Eq. 8 is transformed linearly as Rm ,n ⋅ PB = Y , where PB =  pb j ,1

pb j ,n 

pb j ,2 L

T

and

 Oo1   Oo,1   2    Oo   r1,1 r1,2 L r1,n  Oo,2   M   r2,1 r2,2 L r2,n   M  ⋅ Y = l − . M rl ,i M   Oo,i   Oo   M   M  r rm,2 L rm ,n   M  m ,1      Oom  Oo,n 

(9)

Compensation value PB can be calculated using the following expression:

PB = ( RmT ,n ⋅ Rm,n ) ⋅ ( RmT ,n ⋅ Y ) . −1

( 10 )

Compensation value PB for online applications is updated through the recurrence least square algorithm. The detailed presentation and accurate description of the model can be found in our previous work24, 25. A linear blend model is used for the other properties, except the octane number and RVP, as shown in Eq. (11).

QP ( g , s, t ) = ∑ r (i, g , t ) × QC ( g , s, t )

( 11 )

i

3.2 Online analysis approach Introducing an online analysis system in this section is necessary because the proposed online scheduling and recipe optimization strategy is based on a PAT. RON, MON, and other gasoline properties are traditionally analyzed based on offline laboratory analysis. However, this approach is considered unsuitable for online application because it can cause a long delay. NIR spectroscopy has been widely employed as a PAT to manage such problem, and its industrial application has been extensively reported26–30. The NIR technique is based on Beer’s law, in which the relationship between the 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 10 of 42

property (denoted as dependent variable y) and the NIR spectrum (denoted as independent variable x) can be expressed linearly as follows:

y = c0 + c1 x1 + c2 x2 + ... + cl xl

( 12 )

where c0 , c1 ,..., cl are the regression coefficients. According to Eq. (12), the properties (e.g., RON, MON, etc.) can be calculated via multivariate calibration methods, such as a partial least square (PLS) algorithm. More details on the NIR can be found in a previous work31. Additionally, the application of NIR on the gasoline blending process is presented in our previous work29,30. Preparing samples that can be used to establish a calibration model is necessary before the system is applied because the NIR analysis system is a secondary instrument. The best advantage of NIR is its ability to capture process properties and provide estimation results more rapidly than laboratory analysis. Thus, the NIR system is very convenient for online analysis. In the present work, a PLS algorithm is used to establish an NIR calibration model for online analysis. In addition, octane numbers have been compensated with the BEM discussed in section 3.1.

4 Proposed scheduling and recipe optimization strategy A conventional strategy for blending plan and scheduling is shown in Fig. 3. The traditional approach involves two steps. First, an offline multi-period scheduling model is solved to calculate the initial blend recipes, production sequence, etc. The results of the upper step are subsequently used for gasoline blending, but the recipes and scheduling remain unchanged. In this work, a three-level approach, which combines gasoline planning with discrete-time scheduling and recipe optimization, is introduced. Gasoline planning and scheduling model can be established and optimized by a single NLP or MINLP method. However, the proposed hierarchical strategy is preferred because it provides a complete production plan, scheduling, and optimal control strategy. Moreover, it optimizes the blend recipes determined by scheduling level. The top levels in this scheduling and recipe optimization system are established to verify the effectiveness of initial planning, which is calculated by longer production plan. Middle levels compute detailed schedule, i.e., blend production, volume, recipes and demands for each period. The lowest level is used to optimize blend recipes initialized by the middle level and handle unplanned events during blending. Each hierarchical level has its own task, and their combination form a complete scheduling system. 10

ACS Paragon Plus Environment

Page 11 of 42

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

4.1 Top level: Verification of the initial production plan The majority of the production plan should be adjusted before implementation because of the current unsteady orders of gasoline. The objective of the top level is to verify and modify the initial plan which has been computed by a longer-term decision. Thus, the final production plan meets the current market demand and capacity of the refinery. The objection function is defined as Eq. (13). The slack variables are zero for a feasible solution. The maximum delivery volumes of each product in blend horizon can be obtained to minimize Eq. (13).

(Spka(g ) +  obj = ∑ {(Scka(i) + Sckb(i )) × Penalty_C} + ∑   i g Spkb(g )) × Penalty_P  ( 13) min + ∑ (Vcuse (i)) + ∑ Vclose_C(i) + ∑ Vclose_P( g ) i

i

g

Vcuse (i )=Vcmax (i) − Vcin(i )

( 14)

Quantity conservation constraints involve volume balance and inventory constraints for components and product storage tanks. The detailed mathematical formulations are presented in Eqs. (15)–(18). Among these formulations, Eqs. (15) and (16) state the inventory balance of component tanks. Similarly, Eqs. (17) and (18) indicate the balance of product tanks.

Vclose_C(i ) = Vopen_C(i) + Vcin(i) − ∑ Vcout(i,g ) + Scka(i) − Sckb(i) ∀i ( 15) g

Vcmin (i) ≤ Vclose_C(i) ≤ Vcmax (i ) ∀i

( 16)

Vclose_P(g ) = Vopen_P(g ) + Vb(g) − Dp(g ) + Spka(g ) − Spkb(g ) ∀i

( 17)

Vpmin ( g ) ≤ Vclose_P(g ) ≤ Vpmax ( g ) ∀i

( 18)

The recipe balance is stated in Eq. (19). Meanwhile, Eq. (20) is used to determine the output volume of component i for the corresponding product g. Eq. (21) sets the minimum and maximum blend volumes of the blend header. n

∑ rec(i,g ) = 1

∀g

( 19)

i =1

rec(i,g ) × Vb(g ) = Vcout(i, g ) ∀g

11

ACS Paragon Plus Environment

( 20)

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

Fb min ≤ ∑ Vb(g ) ≤ Fb max

Page 12 of 42

( 21)

g

Eqs. (22)–(25) are used to calculate the quality of the product gasoline. Eq. (24) is expressed as the function of the superior and inferior quality specification limits. All blended products need to be pumped into a storage tank before delivery. Thus, only the quality specifications of the product tank should be considered, and the quality of the gasoline in blend header will be adjusted accordingly. n

Qpb(g,s ) × Vb(g ) = ∑ Qc(i,s) × Vcout(i,g ) ∀g , s

( 22)

i =1

Qp(g,s ) × ( Vb(g) + Vopen_p(g ) ) = Qpb(g,s ) × Vb(g ) + Qopen_p(g,s) × Vopen_p(g )

Qpmin (g,s) ≤ Qp(g,s) ≤ Qpmax ( g,s) ∀g , s

∀g , s

( 23)

( 24) 1

 1.25 1.25 Qp ( g,rvp ) = ∑ rec (i, g ) × ( Qc (i, rvp) )   i 

( 25)

Eq. (26) is the demand limitation in the plan horizon, where Dpt min ( g ) is the delivery volume obtained from a longer-term plan, and Dpt max ( g ) is usually set to infinity.

Dpt min ( g ) ≤ Dpt(g ) ≤ Dpt max ( g ) ∀g

( 26)

Eqs. (13)–(26) complete the top-level planning optimization model. This NLP model should be solved in advanced to provide the total blended volume of each product in the planning horizon. The minimum amount Dpt min ( g ) should be reduced if the top-level model gives an infeasible solution until the solution becomes feasible. Thus, the top model should be re-run many times, and the value of Dpt min ( g ) is usually adjusted based on the market requirement. First, the needs of the most urgent order delivery should be satisfied, and then the minimum amount of Dpt min ( g ) of other products can be reduced or set to zero.

4.2 Middle level: Blend schedule optimization The middle-level model is considered to calculate the blend and delivery sequence 12

ACS Paragon Plus Environment

Page 13 of 42

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

during scheduling horizon. Moreover, the middle level should provide the optimal initial recipes of each gasoline product for each period k. The order demands in each blending period in this level are previously unknown contrary to traditional scheduling strategy. However, the total demands in the blending horizon is a known parameter, which is obtained from the top level. This assumption is significant because the total gasoline production (includes all grades) in a blending horizon is commonly optimized through a long-term refinery planning that considers production capacity and market demands, and the results are used as predetermined information for lower scheduling. However, the delivery volumes in each period is unplanned, and making a precise estimation is difficult. Hence, a rough delivery amount should be provided for every period, and this amount should be adjusted. The objective function is shown in Eq. (27), which contains the blending cost and the penalties for the inventory. A feasible inventory for all storage tanks in each period k and an optimal blending cost for the whole scheduling horizon can be obtained to minimize k. obj = ∑∑ {(Scka(i, k ) + Sckb(i, k )) × Penalty_C} +

min

k

i

(Spka(g , k ) + Spkb(g , k )) ×    + ∑∑∑ Cost(i ) × Vcout(i, g , k ) ∑∑ k g  Penalty_P  k g i

( 27 )

Eqs. (28)–(31) are the inventory balance constraints for the components and product storage tanks in the multi-period scheduling model.

Vclose_C(i, k ) = Vopen_C(i, k ) + Vcin(i, k ) − ∑ Vcout(i,g , k ) + g

∀i, k

( 28)

Scka(i, k ) − Sckb(i, k )

Vcmin (i) ≤ Vclose_C(i, k ) ≤ Vcmax (i) ∀i, k Vclose_P(g , k ) = Vopen_P(g , k ) + Vb(g, k) − Dp(g , k ) + Spka(g , k ) − Spkb(g , k )

Vpmin ( g ) ≤ Vclose_P(g , k ) ≤ Vpmax ( g ) ∀g , k

( 29 )

∀g , k

( 30 )

( 31 )

Eqs. (32) and (33) are used to connect the closing and opening tank inventories.

Vopen_C(i,k ) = Vclose_C(i,k - 1)

( 32 )

Vopen_P(i,k ) = Vclose_P(i,k - 1)

( 33 )

The blender constraints are given by Eqs. (34)–(39). Eq. (36) limits the blending 13

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 42

volumes for each grade gasoline in a certain period, and Eq. (37) defines the total blending volume constraint in the whole scheduling horizon. The integer variable

δ ( g,bl , k ) denotes whether blend product g is in blender bl in period k. Vcout(i,g , k)= rec(i,g , k) × ∑ Vb(g , bl , k) ∀i, g , k

( 34 )

bl

n

∑ rec(i,g , k) = 1

∀g , k

( 35 )

i =1

Fbmin × δ ( g,bl , k ) ≤ Vb(g , bl , k ) ≤ Fbmax × δ ( g,bl , k ) ∀g , bl , k

∑∑∑ Vb(g,bl , k ) ≤ Fb

max

k

g

×K

( 36 )

( 37 )

bl

0 1

δ ( g,bl,k ) = 

∑ δ ( g,bl,k ) ≤ 1

( 38 )

∀bl , k

( 39 )

g

Most of the components in the present gasoline blending system (Fig. 2) are blended online, and the oils have no storage tanks. Therefore, the upper and lower boundaries for the blend volumes of these wild streams should be established. The boundary constraints are given by Eq. (40).

Vcin min (i ) ≤ Vcin(i,k ) ≤ Vcin max (i) ∀i, k

( 40 )

Eqs. (41)–(44) are the delivery constraints. Integer variable Dif ( g,k ) of 1 indicates that the volume to deliver of product g in period k will be computed within the upper and lower delivery boundaries. Otherwise, product g has no delivery demands.

∑ Dp(g,k ) ≥ Dpt(g)

∀g , k

( 41 )

k

Dpif ( g,k ) × Dpmin ≤ Dp(g,k ) ≤ Dpif ( g,k ) × Dpmax ∀g , k

( 42 )

dn min ≤ ∑ Dpif ( g,k ) ≤ dn max ∀k

( 43 )

0 Dpif ( g,k ) =  1

( 44 )

g

The quality constraints for the middle level are defined by Eqs. (45) and (46). 14

ACS Paragon Plus Environment

Page 15 of 42

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

  Qp(g,s, k ) ×  ∑∑ Vb(g,bl , k ) + Vopen(g , k )  =  g bl  ∀g,s,k Qpb(g,s, k ) × ∑∑ Vb(g,bl , k ) + Qp open ( g,s, k ) × Vopen(g , k ) g

( 45 )

bl

Qpmin ( g,s) ≤ Qp(g,s, k ) ≤ Qpmax ( g,s) ∀g,s,k

( 46 )

Eq. (47) is used to connect the closing and opening qualities in product tank. Qp open ( g,s, k )=Qp(g,s, k -1)

( 47 )

Eqs. (27)–(47) complete the middle level scheduling formulation for gasoline blending. This MINLP model provides an initial blending sequence and blending recipes, after which the model predicts the delivery demands for the scheduling horizon. The initial blending recipes given by this level will be modified by the lower level. The delivery volume of product in each period will be adjusted in the real blending process. The total delivery volumes of product g [i.e., Dpt (g)] may lead to an infeasible solution in the middle level model. Thus, the scheduling horizon of the middle level should be extended until the model provides a feasible solution. Another one period is added to the scheduling horizon, and the middle level model is re-run as long as any one of the slack variables [i.e., Scka(i, k ) , Sckb(i, k ) , Spka(g , k ) , and Spkb(g , k ) ] is not zero.

4.3 Low level: Recipe optimization The low-level model is applied online to optimize the blending recipe computed by the middle-level model. The former is solved for a single period (i.e., period t) representing a small partition of the current period of the middle level (i.e., period k). The variables δ ( g,bl,k ) and Vb( g,bl,k ) from the middle level are now parameters. In addition, the inventory of product g in period t [i.e., Vp heel ( g , t ) ] is obtained from the inventory management system of the refinery. The qualities of components [i.e.,

Qc(i,s, t ) ] are obtained from the NIR system. A feasible recipe is always obtained because the target blend volumes [i.e., Vb( g,bl,k ) ] of the low-level model are determined by the middle level and inventory constraints have been satisfied. The total run time (i.e., k) of the low-level will be extended and the flow rate of blender 15

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 16 of 42

will be decreased because of other reasons which lead to an infeasible solution. The objective in this level is presented in Eq. (48). n

obj = ∑ Cost(i ) × Vlcout(i, g , t )+∑ Qpb(g,s, t )-Qpbnir ( g , s, t ) , s ∈{RON , MON } ( 48 ) i =1

s

n

The blending cost item

∑ Cost(i) × Vlcout(i, g )

and the quality deviation item

i =1

∑ Qpb(g,s, t )-Qpb

nir

( g , s, t ) are included in the objective function. The model can

s

obtain a recipe that lead to the lowest blend cost and smallest control error by minimizing Eq. (48). The recipe and blender constraints, along with product quality equations are defined by Eqs. (49)–(54).

Vlcout(i, g , t ) = recl(i,g , t ) × Vpl goal ( g , t ) ∀i, g , t n

∑ recl(i,g , t ) = 1

∀g

( 49 )

( 50 )

i =1

Qpb(g,s, t ) × Vpl goal ( g , t ) = ∑ Qc(i,s, t ) × Vlcout(i,g , t ) × a ( g ) ∀g , s

( 51 )

g

Qp(g,s, t) × Vbl(g ) = Qpb(g,s, t ) × Vpl goal ( g,t ) + Vp heel ( g , t ) × Qp(g,s, t -1) ∀g , s ( 52 )

Qpmin ( g,s) ≤ Qp(g,s, t ) ≤ Qpmax ( g,s) ∀g , s

( 53 )

Vpl goal ( g , t ) = vbl(g ) − Vp heel ( g , t ) ∀g

( 54 )

In Eq. (52), Qp(g,s,0) is equal to Qpopen ( g,s, k ) . Eqs. (55) and (56) are used to link the middle level with the lower level by fixing the blending volume for grade g.

0 a ( g ) = ∑ δ ( g,bl,k ) =  g 1

( 55 )

vbl(g ) = Vb( g,bl,k ) ∀g

( 56 )

The calculation of the flow rate of all blending components is one of the most important tasks in this level. Eqs. (57)–(61) are used to calculate the required values subject to flow rate boundaries of components and blender.

Fblender (t ) × (1× 24 × 60-∑ t × Tperiod ) = ∑ Vpl goal ( g , t ) × a ( g ) t

g

16

ACS Paragon Plus Environment

( 57 )

Page 17 of 42

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

min max Fblender ≤ Fblender (t ) ≤ Fblender

( 58 )

Fc (i, t ) = ∑ (Fblender (t ) × recl(i,g , t ) × a ( g )) ∀i

( 59 )

Fcmin (i ) ≤ Fc (i, t ) ≤ Fcmax (i, t ) ∀i

( 60 )

Vcl(i,t ) 1× 24 × 60-∑ t × Tperiod

( 61 )

g

Fcmax (i, t )=

t

Where T period is the time horizon of period t, which is generally set to 6 minutes. The inventory constraints of components are defined by Eqs. (60) and (61), where

Vcl(i,t ) is obtained from the inventory management system of the refinery. Fcmax (i , t ) for the wild streams is equal to the maximum flow velocity of the corresponding component. The lower level comprises Eqs. (48)–(61). This formulation is calculated periodically to guarantee the gasoline product quality and minimize octane number giveaways during real-time blending.

4.4 Guidelines to handle uncertain events The uncertain events in gasoline blending mostly refer to the temporary or urgent order. The guidelines to handle such uncertain events are formulated based on the proposed scheduling approach (i.e., middle- and low-level models), as follows. An urgent order of product ga ( ga ∈ g ) at the kth period is assumed. Step a: The inventory profiles of components and products are updated; Step b: This order can be delivered immediately if the inventory of product ga can meet the urgent order. Otherwise, step c is performed; Step c: The demand volumes Vt( ga ) of product ga are calculated based on the current inventory; Step d: The model established by Eqs. (27)–(29), Eq.32, Eqs. (34)–(40), and Eqs. (45)–(47) is solved. The constraints of product tanks and delivery are not included in this model. In addition, the scheduling horizon is set to 1, the penalty coefficients of product in the objective function (i.e., Penalty_P ) is set to 0, and the following constraint is included to limit the minimum blend volumes of product ga ; 17

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

∑ Vb( g , k ) ≥ Vt( g a

a

)

Page 18 of 42

( 62 )

k

Step e: Product ga is blended as long as the current period ends if step d provides a feasible solution. Otherwise, step f is performed; Step f: The scheduling horizon of the model defined in step d is extended, and the model is resolved until a feasible solution (the final scheduling horizon is the minimum waiting period, which is denoted as kmin) is obtained. Then, step e is performed.

4.5 Hierarchical-based multi-period scheduling and recipe optimization algorithm The outline of the proposed method is shown in Fig. (3). The proposed strategy evidently comprises three major steps: (1) Components and product inventory, capacity of blend header, total demand, and quality specification are considered at the top level. Initial production plan is verified by solving a single NLP model. The slack variables are 0.0 for a feasible solution in the objective function of this formulation. A non-zero result indicates that the refinery current production capacity does not satisfy the initial plan. (2) The total demands of each gasoline are initially given by the top level, and a discrete-time multi-period MINLP model is computed at the middle level. Operation and quality constraints are considered, and the results provide a detailed schedule for the whole horizon. Initial blending recipe in each period is obtained, which also generates the lowest possible cost per unit of blended volume. Blending sequence is optimized to maximize the amount of a gasoline product subject to storage tank inventories and availability of components in a certain period. The qualities of components are assumed to be piecewise constant at this level. The optimal results are based on this hypothesis and are similar to the traditional scheduling approach. (3) The blend period is divided into several time intervals at the lower level, and each one is solved using a single NLP model. The NLP formulation is aimed at optimizing blend recipes which will be given by the middle level. In addition, flow rates of components and blend products are calculated. Components and product inventory are not considered in this level because they have been satisfied. The flowchart of the proposed method is presented in Fig. (4). The steps of the strategy are presented below: Step1: The blend horizon is set and using the top-level model to verify initial production plan. Step 2 is performed if a feasible solution exists. Otherwise, the initial 18

ACS Paragon Plus Environment

Page 19 of 42

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

plan is modified, and this step is repeated. Step 2: The inventory profile of components and product tanks from the inventory management system of the refinery is updated. The qualities of all components are checked with the NIR system. The qualities of product tanks are checked using a laboratory information management system. Step 3: The blend horizon is divided into several discrete time intervals, and the middle level model is solved. The total demands of each product gasoline in this step are obtained from step 1. The volumes to be blended, volumes to be delivered, and initial blend recipes of each product in each period k are calculated. Step 4: Production plan given by step 3 is implemented. Step 5: The recipe optimization period t is set at the beginning of a single blend period k. Blending operation is started based on the initial recipes given by step 3. Step 6: Low-level recipe optimization model is used to optimize blend recipes when the production reaches a steady state and before the start of the next blend period k. Step 7: The quality of components and products are updated using the NIR system. Optimization period t is checked. Then, step 6 is performed. Step 8: The unplanned events of this blend period k is checked. Step 9 is performed in the absence of an unplanned event. Otherwise, Step 3 is performed, and the production plan based on this unexpected event is calculated. Step 9: The blend period k is checked. Step 4 is performed if k is the end of this period, and the next blend period k + 1 is started. Otherwise, Step 7 is performed.

5 Case studies All case studies are computed using a DELL PC with Intel i3 processor, Windows 7 OS, and 4 Gb RAM. The General Algebraic Modeling System IDE 24.1.2 is used to solve the scheduling formulation. The LP/NLP models are solved using IPOPT. The MILP problem is solved using CPLEX 12.5, and the MINLP model is solved using DICOPT.

5.1 Process description The actual gasoline blending system in this work is shown in Fig. 2. The system has only one blender that can produce three products (gasoline grades of C92, C93, and C95). The blend components involved in the present gasoline blending unit are OCTMD, SZORBD, REFOR, NOARO, and SZORBG. Among these components, OCTMD and SZORBD are wild streams that directly originate from upstream units, 19

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

whereas OCTMD possesses intermediate tanks. The other components are stored in the corresponding component tanks to be used whenever necessary. Moreover, each gasoline grade has its dedicated product tank, and only one product can be produced at a time. The minimum blend volume for one blender is 6000 M3/day, and the maximum blend allowed is 15000 M3/day. The delivery volume ranges from 4000 M3/day to 15000 M3/day when the product g is delivered in period k. The top level is established to verify the initial production plan and provide a minimum blend volume for each grade. The middle level is applied offline to develop scheduling and blending tasks with a planning horizon of 14 days, in which each day is considered a blending period. The objective of this level is to calculate blending volumes and recipes for each day for every gasoline grade. The results are used as initial conditions for the low-level model. The initial recipes are optimized at the low level during online blending. The blending period (one day) is divided into 240 optimization periods, whereas the lower level is required at the beginning of every optimization period. The recipe remains unchanged during one optimization period (6 min) until the next optimization period begins. As earlier presented, the proposed strategy can possibly develop an effective scheduling scheme. This scheme can be adjusted online to manage property fluctuations of blend components and handle unplanned events. The relevant gasoline specifications are presented in Table S1, which also contains the initial quality, initial inventory, inventory limits, and minimum and maximum specifications of the products. Table S2 shows the information on the blend components, namely, the properties, inventory, cost, and supply rate.

5.2 Results and discussion We present three case studies: #1 only considers the quality constraints of product tanks; #2 considers the quality constraints of blender and product tanks; and #3 contains an unplanned event during blending. Case study #1: Only the

quality constraints of product tanks are considered

The gasoline product in a practical blending process cannot be delivered from the blender directly. The product should first be pumped into the corresponding storage tank and then delivered. Hence, only the quality constraints of gasoline in the product tanks are considered to save blending cost and reduce the quality giveaway. According to the practical production requirement of the refinery, the quality giveaway of RON in this case study is considered in the objective function of the middle level. Therefore, Eq. (27) is replaced by Eq. (63). 20

ACS Paragon Plus Environment

Page 20 of 42

Page 21 of 42

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

obj = ∑∑ {(Scka(i, k ) + Sckb(i, k )) × Penalty_C} + k

i

(Spka(g , k ) + Spkb(g , k )) ×   + ∑ (Qp(g,ron, k ) − Qp min ( g,ron)) ∑∑ k g  Penalty_P  k

( 63 )

The top level [Eqs. (13)–(26)] is calculated first based on the proposed scheduling and recipe optimization algorithm to verify the initial production plan and estimate the maximum blend volume of each gasoline product. The results show the feasibility of the initial production plan. The maximum estimate blend volumes of C92, C93, and C95 are 12458.231, 72429.081, and 39486.688 M3, respectively. Table S3 presents the blend recipes computed by the top level, and Table S4 shows its model size and execution time. The closing inventory profile of the components and product tanks at the top level are shown in Table S5. The middle-level model [Eqs. (27)–(47)] is applied in steps 2–4 of the proposed algorithm because the maximum delivery volumes of all products have been calculated by the top-level model. The calculated results show that another one period (1 day) is added to the initial scheduling horizon because it cannot provide a feasible solution within 14 periods. Thus, the initial order will be delayed for one more day. The model size at the middle level is shown in Table S4. The blending sequence and volumes of each grade are presented in Table S6. Fig. 5 contains the calculated delivery plan. Table S7 presents the blend recipes of each period, and Table S9 lists the properties of product tanks at the end of scheduling. Fig. 7 shows the inventory profiles of the products in this case study. The total blending volumes of C92, C93, and C95 in the scheduling horizon are 116461.567, 65910.319, and 27698.894 M3, respectively. Additionally, the total delivery volumes are 124601.743, 72439.52, and 39476.335 M3, respectively. The calculated delivery volumes can meet the requirement of the initial production plan. The properties of RON and MON of the product tanks of each period are shown in Table S10. Tables S9 and S10 show that the quality giveaway of RON are less than 0.3 during the whole horizon. The process control system can start the daily blending operation based on the detailed scheduling plan which is computed at the middle level. The blend operation for a certain blend period k is started according to the blend recipe. Steps 5–7 of this algorithm are implemented to optimize blending recipes when the process becomes stable. For simplicity, the lower level is applied only once for each period k in this case study. Table S8 shows the blend recipes which can be optimized at the low level. 21

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 42

In addition, Fig. 6 shows the results from the low-level optimization of product tank of C92 at a certain period k. The initial property of RON is 92.5 in Fig. 6 and then be reduced to 92.25 at the end of this period.

Case study #2: The quality constraints of blender and product tanks are considered Eq. (64) is added to the middle level to constrain the product quality in the blend header.

Qp min ( g,s ) ≤ Qpb(g,s, k ) ≤ Qpmax ( g,s ) ∀g , s

( 64 )

The properties of the product tanks of the 15th-period are presented in Table S9. The inventory profiles of products in this case are shown in Fig. 8. The giveaways of RON of C92, C93, and C95 are 0.585, 0.329, and 0.555 units, respectively, at the 15th period. The value of the objective is 59.031, which is much more than that (31.824) in case study #1. This example verifies the effectiveness advantage of the proposed algorithm and proves the assumption that it only needs to consider the quality constraints of product tanks in a blend system. The gasoline product should be pumped into a storage tank and then be delivered.

Case study #3: An unplanned event is included The blend system will implement the blend task of k+1 period at the end of the current period according to steps 8 and 9 of the proposed algorithm in the absence of an unexpected event. Otherwise, the blend system will handle the unplanned event first and then continue the initial production plan. A temporary delivery order of C93 is received at the end of the 5th period of case study #1, and the delivery volume is 10500 M3. The inventory of C93 is updated, and the volume of the tank heel is 940.415 M3, which cannot meet this temporary order. According to the guideline in section 4.4, Vt( ga ) = 10500 , and the model is solved as described in step d. The calculated blend recipe and necessary volumes of components are shown in Table S11. The results show that the temporary delivery order can be satisfied within one period. Therefore, product C93 will be blended in the 6th period, and the blend volumes are set to 10500 M3. Afterward, the middle level model is re-run, and the scheduling for periods 7–15 is calculated. The adjusted delivery plan and blending sequence of periods 7–15 are shown in Figs. 9 and 10, respectively. The close inventory profiles of products are presented in Fig.11. Thus, the proposed algorithm can effectively handle temporary delivery order and adjust initial scheduling plan. Hence, in practical blend process, the algorithm can arrange an optimal scheduling and remarkably improve production efficiency. 22

ACS Paragon Plus Environment

Page 23 of 42

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

6 Conclusions This study proposes an integrated optimization strategy of gasoline blend planning and real-time blend recipes, which is decomposed to three levels. The top level is used to verify the initial production plan given by a longer term decision. The middle level determines short-term scheduling, involving blending sequences, initial optimal blending recipes for each period, predicted demands, and daily blending amount. The low level is applied online during blending. First, the initial recipe of the blending process is optimized, after which the procedure is repeated periodically to minimize quality giveaway and meet quality specifications. Moreover, the low level can manage unplanned events rapidly. The main advantage of the proposed strategy is the feasibility of establishing an online optimization approach to solve the scheduling problem. This approach facilitates the adjustment of the initial scheduling and blending recipe depending on the demands of actual situations. The proposed strategy is applied on a real world gasoline blending process to verify its validity. The problem is solved for two-week-long horizon. The results show that the proposed algorithm can greatly minimize quality giveaway and effectively cope with unplanned events. The proposed method can be extended for multi-blenders with appropriate modification although only one blender was considered in this study. Future works should focus on this aspect to extend the proposed scheduling strategy.

ACKNOWLEDGMENT The authors would like to thank the anonymous reviewers for their comments and suggestions, which greatly improved the contents of this article. This work was supported by the Major State Basic Research Development Program of China (2012CB720500) and the National Natural Science Foundation of China (61333010, 61222303, and 61422303).

Supporting Information The Supporting Information of this article contains product specifications, component properties, initial inventories, model size, and computed results. All the tables mentioned in this paper are available in the supporting information. This information is available free of charge via the Internet at http://pubs.acs.org/.

Notation Subscripts

bl = refers to a variable or parameter related to blenders 23

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

g = the grade of a gasoline product (C92,C93,C95) i = component i ( i = 1, 2,..., n ) which participates in blending final gasoline product g , n is the number of blending components

k = the time intervals that refer to an equivalent discrete integer value (1 day) that represents regular production

kmin = the minimum waiting period

l = the number of total wavelengths considered in the NIR model m = the number of total samples considered in the BEM model

min = the minimum value a variable may have max = the maximum value a variable may have o = refers to RON or MON s = refers to the gasoline properties t = blend hours for one blend period k Parameters

ARO = refers to the volume percent of olefin ARO = the average ARO of all blending components

Cost(i ) = the unit price of blend component i dec( g ) = requirement coefficients for product g dnmin = minimum number of product that can be delivered dnmax = maximum number of product that can be delivered Dpt min ( g ) = minimum delivery volume of product g in top level model Dp max = maximum delivery volume of product at one blend period Dp min = minimum delivery volume of product at one blend period min = the minimum flow rate of blender Fblender max = the maximum flow rate of blender Fblender

Fcmin = the minimum flow rate of component’s pipeline Fcmax = the maximum flow rate of component’s pipeline

24

ACS Paragon Plus Environment

Page 24 of 42

Page 25 of 42

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

Fb min = minimum volume allowed to blend in the blender Fb max = maximum volume allowed to blend in the blender

MONb = the MON property of a gasoline product MON = the average MON of all blending components O o , i = refers to the octane number (RON or MON) of component i

OLE = refers to the volume percent of aromatics OLE = the average OLE of all blending components

Po = refers to the octane number of a gasoline product

PB = refers to the matrix of the compensation octane number pbo ,i = refers to the compensation octane number of component i

Penalty_C = penalty for the inventory slack variables of blend component Penalty_P = penalty for the inventory slack variables of product Qc(i,s ) = property s of blend component i Qp min ( g,s) = the minimum requirement of quality s in grade g Qp max ( g,s) = the maximum requirement of quality s in grade g Qpbnir ( g , s, t ) = the quality s of grade g in blender in blend period t obtained from NIR system Qx ( O o ,i ) = refers to the compensated octane number of component

i

RVPi = the RVP property of component i RVPBI i = the exponential form of RVP for component i RON b = the RON property of a gasoline product RON = the average RON of all blending components

Sens = refers to the sensitivity index, which is calculated by RON − MON Sens = the average Sens of all blending components 25

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

Tperiod = the recipe optimize period in the lower level model Vc min (i ) = the minimum volume of the tank with component i Vc max (i ) = the maximum volume of the tank with component i Vcin max (i ) = the maximum inflow volume of component i in the corresponding storage tank Vcin min (i ) = the minimum inflow volume of component i in the corresponding storage tank Vp min ( g ) = the minimum volume of the tank with product g Vp max ( g ) = the maximum volume of the tank with product g Vp goal ( g ) = the target blend volume of product g Variables

a( g ) = binary variable to determine if product g is blended in lower level model a1 , a 2 , a3 , b1 , b2 , b3 = model parameters calculated via ordinary least squares

δ ( g,bl , k ) = binary variable to determine if product g

is blended with blender bl in period

k c0 , c1 ,..., ck = refers to the regression coefficient in Eq.12.

Dp(g , k ) = delivery volume of product g in blend period k Dp if ( g,k ) = binary variable to determine if product g is delivered in period k

Dpt(g ) = the delivery volume of product g in top level model Fblender = flow rate of blender in the lower level model Fc (i) = flow rate of component i in the lower level model

Qpb(g,s) = property s of product g in blender Qp(g,s ) =property s of product g in product tank Qp(g,rvp) =reid vapour pressure of product g in product tank

Qp(g,s, k ) = property s of product g in product tank in blend period k 26

ACS Paragon Plus Environment

Page 26 of 42

Page 27 of 42

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

Qpb(g,s, k ) = property s of product g in blender in blend period k Qp open ( g,s, k ) = opening property s of product g in blend period k

rec(i,g ) = the blending recipe of component i for product g in top level model rec(i,g , k ) = the blending recipe of component i for product g in blend period k recl(i,g ) = the blending recipe of component i for product g in the lower level model Scka(i ) , Sckb(i) = slack variables of tank with component i in top level model

Spka(g ) , Spkb(g ) = slack variables of tank with product g in top level model Scka(i, k ) , Sckb(i, k ) = slack variables of tank with component i in period k Spka(g , k ) , Spkb(g , k ) = slack variables of tank with product g in period k Vb(g) = volume of product g blended in blender in top level model Vb(g, k) = volume of product g blended in blender in blend period k Vb(g , bl , k ) = volume of product g blended in blender bl in blend period k vbl(g ) = volume of product g blended in blender in lower level model Vcin(i ) = volume of component into tank with component i Vcin(i, k ) = volume of component into tank with component i Vcl(i,t ) = the remaining volumes of component i in period t Vclose_C(i, k ) = closing inventory of tank with component i in period k Vclose_C(i ) = closing inventory of tank with component i in top level model Vclose_P(g ) = closing inventory of tank with product g in top level model Vclose_P(g , k ) = closing inventory of tank with product g in period k Vcout(i,g ) = volume of component i into product g in top level model Vcout(i,g , k ) = volume of component i into product g in period k 27

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

Vlcout(i, g ) = volume of component i into product g in the lower level Vopen_P(g ) = opening volume of tank with product g in top level model Vopen_C(i, k ) = opening volume of tank with component i in period k Vopen_P(g , k ) = opening inventory of tank with product g in period k Vopen_C(i) = opening volume of tank with component i in top level model

Vpheel ( g ) = volume of product g in product tank heel in lower level model Vpl goal ( g ) = target blend volume of product g in lower level model

Vt( ga ) = the demand volumes of product ga References 1.

Li, J.; Karimi, I. A.; Srinivasan, R. Recipe determination and scheduling of gasoline blending

operations. AIChE J. 2010, 56, 441-465. 2.

Singh, A.; Forbes, J. F.; Vermeer, P. J. Woo, S. S. Model-based real-time optimization of

automotive gasoline blending operations. J. Process Control 2000, 10, 43-58. 3.

Zhao, J.; Wang, N. A bio-inspired algorithm based on membrane computing and its application to

gasoline blending scheduling. Comput. Chem. Eng. 2011, 35, 272-283. 4.

Li, J.; Karimi, I. A. Scheduling Gasoline Blending Operations from Recipe Determination to

Shipping Using Unit Slots. Ind. Eng. Chem. Res. 2011, 50, 9156-9174. 5.

Castillo, P. A. C.; Mahalec. V. Inventory Pinch Based, Multiscale Models for Integrated Planning

and Scheduling-Part II: Gasoline Blend Scheduling. AIChE J. 2014, 60, 2475-2497. 6.

Wang, W.; Li, Z.; Zhang, Q.; Li, Y. Online optimization model design of gasoline blending system

under parametric uncertainty. Control & Automation, 2007. MED'07. Mediterranean Conference on IEEE, 2007:1-5. 7.

Cheng, H.; Zhong, W.; Qian, F. Real Time Optimization of the Gasoline Blending Process with

Unscented Kalman Filter. Internet Computing & Information Services (ICICIS) 2011 International Conference on IEEE, 2011, 148-151. 8.

Castillo, P. A. C.; Mahalec, V.; Kelly, J. D. Inventory pinch algorithm for gasoline blend planning.

AIChE J. 2013, 59, 3748-3766. 9.

Cuiwen, C.; Xingsheng, G. Zhong, X. A data-driven rolling-horizon online scheduling model for

diesel production of a real-world refinery. AIChE J. 2013, 59, 1160-1174. 10. Glismann, K.; Gruhn, G. Short-term scheduling and recipe optimization of blending process. Comput. Chem. Eng. 2001, 25, 627-634. 11. Mahalec, V.; Castillo, P. Nonlinear Blend Scheduling via Inventory Pinch-based Algorithm using Discrete- and Continuous-time Models. Chem.Biochem.Eng 2015, 28, 425-436. 12. Mahalec, V.; Thakral, A. Composite planning and scheduling algorithm addressing intra-period infeasibilities of gasoline blend planning models. Canadian J. Chem. Eng. 2013, 91, 1244-1255. 28

ACS Paragon Plus Environment

Page 28 of 42

Page 29 of 42

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

13. Castillo, P.A.C.; Mahalec, V. Inventory Pinch Based, Multiscale Models for Integrated Planning and Scheduling-Part I: Gasoline Blend Planning. AIChE J. 2014, 60, 2158-2178. 14. Moro, L. F. L., Zanin, A. C., Pinto, J. M. A planning model for refinery diesel production. Comput. Chem. Eng. 1998, 22, S1039-S1042. 15. Glismann, K.; Gruhn, G. Short-term planning of blending processes: scheduling and nonlinear optimization of recipes. Chem. Eng. Tecnol 2001, 24, 246-249. 16. Joly, M.; Moro, L. F. L.; Pinto, J. M. Planning and scheduling for petroleum refineries using mathematical programming. Brazilian J. Chem. Eng. 2002, 19, 207-228. 17. Joly, M.; Pinto, J. M. Mixed-Integer Programming Techniques for the Scheduling of Fuel Oil and Asphalt Production. Chem. Eng. Res. Des. 2003, 81, 427-447. 18. M´endez, 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. M´endez, C. A.; Cerda´, J.; Grossmann, I. E.; Harjunkoski, I.; Fahl, M. State-of-the-art review of optimization methods for short-term scheduling of batch processes. Comput. Chem. Eng. 2006, 30, 913-946. 20. Tang, L.; Liu, J.; Rong, A.; Yang, Z. A review of planning and scheduling systems and methods for integrated steel production. Europ. J. Opera. Res. 2001, 133, 1-20. 21. Maravelias, C. T.; Sung, C. Integration of production planning and scheduling: Overview, challenges and opportunities. Comput. Chem. Eng. 2009, 33, 1919-1930. 22. Gary, J. H.; Handwerk, G. E.; Kaiser, M. J. Petroleum refining: technology and economics. CRC press: 2007. 23. Healy, W. C.; Maassen, C. W.; Peterson, R. T. A new approach to blending octanes. Proc. 24th Meeting of American Petroleum Institute's Division of Refining, New York: 1959. 24. Cheng, H., Liu, Z., Qian, F. A novel octane number model for gasoline blending and its application. China Computers and Applied Chemistry 2010, 27, 1317-1320. 25. Miao, J.; L. J., Zhang, W.; He, K.; Cheng, H.; Qian, F. Online update method of octane number based on the blending effect octane model and its application. Jounal of East China University of Science and Technology (Natural Science Edition) 2014, 40, 327-331. 26. Chen, M.; Khare, S.; Huang, B.; Zhang, H.; Lau, E.; Feng, E. Recursive Wavelength-Selection Strategy to Update Near-Infrared Spectroscopy Model with an Industrial Application. Ind. Eng. Chem. Res 2013, 52, 7886-7895. 27. Cernuda, C.; Lughofer, E.; Märzinger, W.; Kasberger, J. NIR-based quantification of process parameters in polyetheracrylat (PEA) production using flexible non-linear fuzzy systems. Chemom. Intell. Lab. Syst. 2011, 109, 22-33. 28. Chen, Q.; Zhao, J.; Liu, M.; Cai, J.; Liu, J. Determination of total polyphenols content in green tea using FT-NIR spectroscopy and different PLS algorithms. J. Pharma. Biom. Anal. 2008, 46, 568-573. 29. He, K.; Cheng, H.; Du, W.; Qian, F. Online updating of NIR model and its industrial application via adaptive wavelength selection and local regression strategy. Chemom. Intell. Lab. Syst. 2014, 134, 79-88. 30. He, K.; Qian, F.; Cheng, H.; Du, W. A novel adaptive algorithm with near-infrared spectroscopy and its application in online gasoline blending processes. Chemom. Intell. Lab. Syst. 2015, 140, 117-125. 31. Agelet, L. E.; Hurburgh, Jr, C. R. A Tutorial on Near Infrared Spectroscopy and Its Calibration. 29

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

Critical Reviews in Analytical Chemistry 2010, 40, 246-260. 32. Brooke A; Kendrick D; Meeraus A; Raman R. GAMS: a user’s guide. Washington, DC: GAMS Development Corporation, 1998.

Content of Figures Figure 1 Typical gasoline blending system Figure 2 Gasoline blend, analysis, and control system Figure 3 Outline of proposed planning, scheduling, and recipe optimization strategy Figure 4 Proposed planning, scheduling, and recipe optimization algorithm Figure 5 Computed demand profile for gasoline production Figure 6 Optimization result of product tank of C92 Figure 7 Inventory profiles of products in Case 1-Middle level model Figure 8 Inventory profiles of products in Case 2-Middle level model Figure 9 Adjustment demand plan for periods 7–15 (Case 3) Figure 10 Adjustment blend plan for periods 7–15 (Case 3) Figure 11 Close inventory profiles for period 7-15 (Case 3)

30

ACS Paragon Plus Environment

Page 30 of 42

Page 31 of 42

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

Table of Contents (TOC) Graphic

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

Figure 1 Typical gasoline blending system

ACS Paragon Plus Environment

Page 32 of 42

Page 33 of 42

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

Online analysis system (PAT)

Control system OCTMD

SZORBD

Optimizing server

C92

REFOR C93 NOARO

SZORBG Component oil

C95 Blend header

Figure 2 Gasoline blend, analysis and control system

ACS Paragon Plus Environment

Product gasoline

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

Conventional strategy

Blend recipe and scheduling optimization subject to constrains via full space or layered strategy (MINLP) (N time periods)

Blend production gasoline using the constant recipes

Proposed scheduling strategy Top level Long-range gasoline planning (NLP)

Page 34 of 42

Plan horizon Verify the effectiveness of initial planning

Schedule periods Middle level Initialize blend recipes and scheduling (N time periods)

Lower level Recipe updating via real-time optimization approach

Compute detailed schedule:blend production, volume, recipes and demands for each period

Recipe optimization periods Optimize blend recipes

Figure 3 Outline of proposed planning, scheduling, and recipe optimization strategy

ACS Paragon Plus Environment

Page 35 of 42

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

Solve the gasoline blend planning model (NLP) No Is solution feasible?

Change the initial blend planning

Yes Given the maximum output of each gasoline Update the inventory of component and product tanks Update the properties of component and product tanks Solve the short-time scheduling model, initialize blend recipes and the production sequence (MINLP, N time periods) Use the initial recipes calculated by MINLP to blend the corresponding gasoline

Update blend recipe using online optimization approach subjected to quality constrains(NLP)

Certain events?

No

Yes Continue Continue the the blending blending operation operation designed designed by by MINLP MINLP model model No End of this period? Yes Continue Continue the the blending blending operation operation designed designed by by MINLP MINLP model model

Figure 4 Proposed planning, scheduling and recipe optimization algorithm

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research

20000

Blend Volumes (M3)

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 36 of 42

c92

c95

c93

15000 10000 5000 0

1

Figure 5

2

3

4

5

6

7 8 9 10 Blend Period \day

11

12

13

14

15

Computed delivery volumes profile for gasoline production (Case 1)

ACS Paragon Plus Environment

Page 37 of 42

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 6 Optimization result of product tank of C92

ACS Paragon Plus Environment

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

Inventory Volumes of Products (M3)

Industrial & Engineering Chemistry Research

Page 38 of 42

25000 20000 15000 10000 5000 0 1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

Case 1: Blend Period \day C92 C93 C95

Figure 7 Inventory profiles of products in Case 1-Middle level model

ACS Paragon Plus Environment

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

Inventory volumes of products (M3)

Page 39 of 42

25000 20000 15000 10000 5000 0 1

2

3

4

5

6 7 8 9 10 Case 2: Blend Period \day C92 C93 C95

11

12

13

14

15

Figure 8 Inventory profiles of products in Case 2-Middle level model

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research

16000 14000 12000

Volumes \M3

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

10000 8000 6000 4000 2000 0

7 8 9 10 11 12 13 14 15 C92 0 11925.1 12189.5 13108.4 13392.6 14563.1 14743.8 14830.2 14890.4 C93 0 13782.3 0 0 14761.9 0 0 0 12994.6 C95 10993.6 0 0 0 0 0 0 0 0 Blend Period \day

Figure 9

Adjustment demand plan for periods 7-15 (Case 3)

ACS Paragon Plus Environment

Page 40 of 42

Page 41 of 42

C92

Volumes /M3

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

C93

C95

15000 14000 13000 12000

7 C92 14569.3

8

9

C93 C95

10 14571.3

11

12 13 14 15 14570.8 14570 14568.8 14566.4

13066.4 14327.5

14091.8

Blend Period /day

Figure 10 Adjustment blend plan for periods 7–15 (Case 3)

ACS Paragon Plus Environment

Industrial & Engineering Chemistry Research

5500

OCTMD REFOR NOARO SZORBG

4500

Volumes /M3

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 42 of 42

3500

2500

1500

500 7

8

9

10

11

12

13

14

Blend Period /day

Figure 11 Close inventory profiles for period 7-15 (Case 3)

ACS Paragon Plus Environment

15