An MILP approach for detailed scheduling of oil depots along a multi-product pipeline

Petroleum Science, Apr 2017

Oil depots along products pipelines are important components of the pipeline transportation system and down-stream markets. The operating costs of oil depots account for a large proportion of the total system’s operating costs. Meanwhile, oil depots and pipelines form an entire system, and each operation in a single oil depot may have influence on others. It is a tough job to make a scheduling plan when considering the factors of delivering contaminated oil and batches migration. So far, studies simultaneously considering operating constraints and contaminated oil issues are rare. Aiming at making a scheduling plan with the lowest operating costs, the paper establishes a mixed-integer linear programming model, considering a sequence of operations, such as delivery, export, blending, fractionating and exchanging operations, and batch property differences of the same oil as well as influence of batch migration on contaminated volume. Moreover, the paper verifies the linear relationship between oil concentration and blending capability by mathematical deduction. Finally, the model is successfully applied to one of the product pipelines in China and proved to be practical.

A PDF file should load here. If you do not see its contents the file may be temporarily unavailable at the journal website or you do not have a PDF plug-in installed and enabled in your browser.

Alternatively, you can download the file locally and open with any standalone PDF reader:

https://link.springer.com/content/pdf/10.1007%2Fs12182-017-0151-8.pdf

An MILP approach for detailed scheduling of oil depots along a multi-product pipeline

An MILP approach for detailed scheduling of oil depots along a multi-product pipeline Hao-Ran Zhang 0 Yong-Tu Liang 0 Qi Liao 0 Jing Ma 0 Xiao-Han Yan 0 0 Beijing Key Laboratory of Urban Oil and Gas Distribution Technology, China University of Petroleum , Beijing 102249 , People's Republic of China Oil depots along products pipelines are important components of the pipeline transportation system and down-stream markets. The operating costs of oil depots account for a large proportion of the total system's operating costs. Meanwhile, oil depots and pipelines form an entire system, and each operation in a single oil depot may have influence on others. It is a tough job to make a scheduling plan when considering the factors of delivering contaminated oil and batches migration. So far, studies simultaneously considering operating constraints and contaminated oil issues are rare. Aiming at making a scheduling plan with the lowest operating costs, the paper establishes a mixed-integer linear programming model, considering a sequence of operations, such as delivery, export, blending, fractionating and exchanging operations, and batch property differences of the same oil as well as influence of batch migration on contaminated volume. Moreover, the paper verifies the linear relationship between oil concentration and blending capability by mathematical deduction. Finally, the model is successfully applied to one of the product pipelines in China and proved to be practical. Products pipeline; Oil depot; Scheduling plan; Mixed-integer linear programming (MILP); Contaminated oil; Blending capacity - 8j 2 J ¼ f1; . . .; jmaxg 8c 2 C ¼ f1; 2; . . .; cmaxg 8gm 2 Gmi;j ¼ f1; 2; . . .; mmi;jg 8go 2 Goi;c ¼ f1; 2; . . .; moi;cg The set of the numbers of stations in the system, imax denotes the maximum number of stations The set of the numbers of all kinds of contaminated oil in the system, 1 denotes high gasoline-cut contaminated oil, jmax ¼ 2, in this work, denotes high diesel-cut contaminated oil The set of the numbers of all kinds of oil in the system, cmax denotes the maximum number of oil types The set of the numbers of contaminated oil j tanks at station i, mmi;j denotes the maximum number of those oil tanks The set of the numbers of oil c tanks at station i, moi;c denotes the maximum number of those oil tanks 8kd 2 KDi 8km 2 KMi The set of the numbers of all time nodes sorted in order in the study horizon, tmax denotes the maximum number of time nodes The set of the numbers of time nodes during batch km’s contaminated oil j crossing over station i The set of the numbers of time nodes during contaminated oil j not crossing over station i The set of the numbers of time nodes during station i delivering oil at first kd times The set of the numbers of time nodes during station i not delivering oil c The set of the numbers of time nodes during station i exporting oil at first kt times The set of the numbers of time nodes during station i not exporting oil The set of the numbers of sections after linearizing Austin’s formula The set of the numbers of the volume divided in sections The set of the times of station i delivering oil The set of the times of station i exporting oil The set of the times of contaminated oil batches crossing station i The set of the times of station i in maintenances Qmdmin Veaxi;c;kt Veini;c;kt Vmxi;j;gm Vmni;j;gm Vsxi;c;go Vsni;c;go The operating cost of oil tanks and contaminated oil tanks The maximum ratio of delivering volume of contaminated oil and the volume of oil existed The flow arriving at station i through pipeline at time node t, m3/h The minimum delivering flow of contaminated oil, m3/h The minimum flow of blending operation, m3/h The maximum flow of fractionation operation at station i The minimum flow of fractionation operation at station i The volume of oil c at station i at first kd times The total blending capacity of oil c per unit volume, delivered at station i at first kd times, to blend contaminated oil j, m3 The minimum value of blending capacity of total oil per unit volume in study system to blend contaminated oil j, m3 The maximum value of blending capacity of total oil per unit volume in study system to blend contaminated oil j, m3 The blending capacity ratio of oil to blend contaminated oil j and to blend contaminated oil j0, m3 The upper limit of exporting oil c at station i at first kt times, m3 The lower limit of exporting oil c at station i at first kt times, m3 The blending capacity of oil c fractionated per unit volume to blend contaminated oil j, m3 The upper limit of contaminated oil j tank gm at station i, m3 The lower limit of contaminated oil j tank gm at station i, m3 The upper limit of contaminated oil c tank go at station i, m3 The lower limit of contaminated oil c tank go at station i, m3 The volume of oil c fractionated by contaminated oil j per unit volume, m3 The loss ratio of fractionation The calculated equivalent of contaminated oil batches length at p linear section during the contaminated oil arriving at station i at first km times The upper limit of contaminated oil at p linear section calculated by Austin’s formula, m The lower limit of contaminated oil at p linear section calculated by Austin’s formula, m The upper limit of the volume in section b, m3 Dsgi;km sdgi;j;km scgi;j;km sodbi;kd sodni;kd soebi;kt soeni;kt sosbi;ks sosni;ks The lower limit of the volume in section b, m3 The predicted length of contaminated oil arriving at station i at first km times, m The predicted time of contaminated oil crossing over station i at first km times, h The predicted time of the head of total contaminated oil batch arriving at station i at first km times, h The predicted time of the end of total contaminated oil batch arriving at station i at first km times, h The starting time of delivering oil at station i at first kd times, h The ending time of delivering oil at station i at first kd times, h The starting time of exporting oil at station i at first kt times, h The ending time of exporting oil at station i at first kt times, h The starting time of maintenance at station i at first ks times, h The ending time of maintenance at station i at first ks times, h The starting moment at study horizon, h The ending moment at study horizon, h dsi;kd;c ¼ 1, if not, dsi;kd;c ¼ 0 The binary variables of exporting oil. If oil c is exported at station i at first kt times, esi;c;kt ¼ 1, if not, esi;c;kt ¼ 0 The binary variables of contaminated oil tank’s maintenance. If contaminated oil j tank gm at station i needs to be required during moment t to t þ 1, mvti;j;gm ¼ 1, if not mvti;j;gm ¼ 0 The binary variables of contaminated oil tank’s maintenance. If contaminated oil c tank go at station i needs to be required during time node t to t þ 1, ovti;c;go ¼ 1, if not, ovti;c;go ¼ 0 The distinguishing binary variables of the contaminated oil in front. If the contaminated oil j is ahead of others with the contaminated oil at first km times crossing over the station i,ikj;km ¼ 1, if not, ikj;km ¼ 0 The distinguishing binary variables of delivering moments. If time node t is in the period of delivering oil at first kd times, ikdt;kd ¼ 1, if not, ikdt;kd ¼ 0 Binary parameters dsi;c;kd The binary variables of delivering oil. If oil c is delivered at station i at first kd times, hodbi;kd;t hodni;kd;t hoebi;kt;t hoeni;kt;t hosbi;ks;t hosni;ks;t hmdi;j;km;t hmci;j;km;t The distinguishing binary variables of the starting moments sorted for delivering oil. All the time nodes are in ascending order, so if the starting moment of delivering oil at station i at first kd times is sorted in first t place, hodbi;kd;t ¼ 1, if not, hodbi;kd;t ¼ 0 The distinguishing binary variables of the ending moments sorted for delivering oil The distinguishing binary variables of the starting moments sorted for exporting oil The distinguishing binary variables of the ending moments sorted for exporting oil The distinguishing binary variables of the starting moments sorted for maintenance The distinguishing binary variables of the ending moments sorted for maintenance The distinguishing binary variables of the starting moments sorted for delivering contaminated oil The distinguishing binary variables of the ending moments sorted for delivering contaminated oil The distinguishing binary variables of the starting moments at study horizon The distinguishing binary variables of the ending moments at study horizon Binary variables Cmhti;j;gm;c;go The binary variables of the contaminated oil tank’s blending operation. If contaminated oil j from tank gm at time node t blends with oil c from tank go, Cmhti;j;gm;c;go ¼ 1, if not, The stock volume of contaminated oil j tank gm at station i at time node t, m3 The inventory of oil c tank go at station i at time node t, m3 The blending capacity of oil c in tank go to blend contaminated oil j at time node t, m3 The actual length of contaminated oil out of station i at first km times, m The actual length of contaminated oil arriving at station i at first km times, m The actual time of the head of contaminated oil j arriving at station i at first km times, h The actual time of the end of contaminated oil j arriving at station i at first km times, h The time of number t, h Cmhti;j;gm;c;go ¼ 0 The binary variables of contaminated oil tank’s fractionation operation. If contaminated oil j from tank gm at station i is fractionated at time node t, Cmfit;j;gm ¼ 1, if not, Cmfit;j;gm ¼ 0 The binary variables of contaminated oil tank’s delivery operation. If contaminated oil j is delivered into contaminated oil tank gm at station i at time node t, Cmiti;j;gm ¼ 1, if not, Cmiti;j;gm ¼ 0 The binary variables of contaminated oil tank’s switching operation. If contaminated oil j is switched to contaminated oil tank gm0 from tank gm at station i at time node t, Cmoti;j;gm;gm0 ¼ 1, if not, Cmoti;j;gm;gm0 ¼ 0 The binary variables of contaminated oil tank’s delivery operation. If oil c is delivered into oil tank go at station i at time node t, Codit;c;go ¼ 1, if not, Codit;c;go ¼ 0 The binary variables of contaminated oil tank’s export operation. If oil c is exported from oil tank go at station i at time node t, Copti;c;go ¼ 1, if not, Copti;c;go ¼ 0 The binary variables of contaminated oil tank’s fractionation and recycle operation. If oil c after fractionation is recycled into oil tank go at station i at time node t, Cofit;c;go ¼ 1, if not, Cofit;c;go ¼ 0 Vamti;c;go;j Lmci;km Lmdi;km smdi;j;km smci;j;km Cmoti;j;gm;gm0 Smhti;j;gm;c;go Smoti;j;gm;gm0 Cmi;km;p Cbi;c;go;t;b The binary variables of oil tank’s switching operation. If oil c is switched to oil tank go0 from tank go at station i at time node t, Cooti;c;go;go0 ¼ 1 if not, Cooti;c;go;go0 ¼ 0 The state binary variables of contaminated oil tank’s delivery. If contaminated oil j is delivered into contaminated oil tank gm at station i at time node t, Smdit;j;gm ¼ 1, if not, Smdit;j;gm ¼ 0 The state binary variables of oil tank’s delivery. If oil c is delivered into contaminated oil tank go at station i at time node t, Sodit;c;go ¼ 1, if not, Sodit;c;go ¼ 0 The state binary variables of oil tank’s export. If oil c in oil tank go is being exported from station i at time node t, Sopti;c;go ¼ 1, if not, Sopti;c;go ¼ 0 The state binary variables of contaminated oil tank’s blend. If contaminated oil j in contaminated oil tank gm is being blended with oil tank go exporting oil c at station i, Smhti;j;gm;c;go ¼ 1, if not, Smhti;j;gm;c;go ¼ 0 The state binary variables of contaminated oil tank’s fractionation. If contaminated oil j in contaminated oil tank gm is being fractionated at station i, Smfit;j;gm ¼ 1, if not, Smfit;j;gm ¼ 0 The state binary variables of contaminated oil tank’s recycle. If oil c after fractionation is being recycled into tank go at station i, Sofit;c;go ¼ 1, if not, Sofit;c;go ¼ 0 The state binary variables of contaminated oil switch-tank. If contaminated oil j is switched from contaminated oil tank gm to gm0 at station i, Smoti;j;gm;gm0 ¼ 1, if not, Smoti;j;gm;gm0 ¼ 0 The state binary variables of contaminated oil switch-tank. If oil c is switched from contaminated oil tank go to go0 at station i, Sooti;c;go;go0 ¼ 1, if not, Sooti;c;go;go0 ¼ 0 The distinguishing binary variables of the linear section divided by Austin’s formula. If the batch state of contaminated oil arriving at station i is in section p, Cmi;km;p ¼ 1, if not, Cmi;km;p ¼ 0 The distinguishing binary variables of the volume of oil tanks’ inventory. If the inventory of oil c tanks go at station i at time node t is in period b, Cbi;c;go;t;b ¼ 1, if not, Cbi;c;go;t;b ¼ 0 Cboi;c;go;go0;b Cbti;c;go;t;b The distinguishing binary variables of the volume of switching tank operation. Just like the definition of Cbi;c;go;t;b The distinguishing binary variables of the volume of export operation. Just like the definition of Cbi;c;go;t;b 1 Introduction 1.1 Background At present, oil products are still one of the major energy sources in industries, such as power generation, transportation, metallurgy, chemical industry and light industry. According to statistics, refinery throughput is 76.8 9 106 bbl/d (BP 2014) and pipelines can provide an economic transportation mode for petroleum industries. As a result, in both producing and consuming countries, a large amount of oil products is transported from refineries or wharfs to oil depots through pipelines and then pumped to downstream markets (Li et al. 2015; Liang et al. 2012a). Oil depots connecting up-stream sources and down-stream markets, play a vital role in the entire transportation system (Duan et al. 2016). However, it is complex to make a scheduling plan. On the one hand, oil depots have large turn-round volume and complex operations. On the other hand, the delivery of contaminated oil to the down-stream stations is a systematic issue and the operation of each oil depot is interrelated with others. Until now, scheduling plans for most large and dynamic oil depot systems are made by field engineers subjectively and from experience. Therefore, the plans may not be globally optimum and lead to much higher operating costs (Barzin et al. 2015; Mitra et al. 2013). Based on the systematic optimal theory, a mathematic model in this paper is established to make scheduling plans for oil depots. The results show that the proposed method can improve the accuracy of scheduling, shorten the time of making decision and reduce operating costs. 1.2 Related work Presently, many researchers have devoted themselves to pipeline scheduling, synthetically considering pipeline structure, time representation, modeling types, and solution approaches. The pipeline topological structures include: single source (Cafaro and Cerda 2008; Herra´n et al. 2011; Relvas et al. 2009), multiple sources (MirHassani et al. 2013), tree-structure pipeline (Cafaro and Cerda 2011; Castro 2010; MirHassani and Jahromi 2011) and meshstructure pipeline (Cafaro and Cerda 2012). The time representation usually includes discrete-time (Zhang et al. 2015) and continuous-time (Zhang et al. 2016b) representation. The MILP (Rejowski and Pinto 2004) and mixedinteger nonlinear programming (MINLP) (Cafaro et al. 2015b) models are established and solved by brand and bound algorithms, hybrid computational approach (Zhang et al. 2017) or heuristic algorithms (Rejowski and Pinto 2003) to work out the scheduling scheme. Research on oil depot constraints along pipelines has been focused and the pipeline and depot can be perceived as a whole system through related simplification. Mostafaei and Hadigheh (2014) and Ghaffari-Hadigheh and Mostafaei (2015) solved the scheduling issue with continuous-time representation based on the integration of MILP models, and they took minimum operation costs of the pipeline as the objective to satisfy depot requirements. Cafaro et al. (2015a) solved the same scheduling issue with a continuous-time MILP model which can accelerate the solving speed. The work of Cafaro and Cerda (2010) and MirHassani and BeheshtiAsl (2013) also considered dual purpose depots. Herran et al. (2012) proposed a multi-period MINLP model to optimize the plan to produce and transport multiple petroleum products from a refinery plant to several depots. Cafaro et al. (2015b) considered the pressure loss due to friction along single source pipelines with multiple depots, using nonlinear equations to rigorously track power consumption at each pipeline segment. These pipeline operation scheduling models consider the inventory of depots as a constraint. However, operation costs of each depot tank are not considered in their work. Meanwhile, the depot operation is too complex to be described by a constraint. Some researchers have paid attention to this issue. Relvas et al. (2006) have considered a system that has a pipeline pumping oil from a refinery to an oil depot. Three different stages are considered in the process: loading from pipeline, performing settling and approving tasks, and unloading for clients. It combines the optimal pipeline schedule with tank inventory management. Relvas et al. (2013) have improved the model and make it easier to determine feasible time intervals or the number of pumping batches. Neiro et al. (2014) focused on the scheduling of an in-line diesel blending and distribution subsystem of an oil refinery, considering crude oil unloading, mixing, and inventory control, production unit scheduling, and finished product blending and shipping. However, these models are not comprehensive enough. In the real world, there are more than three stages in oil tanks. Operation among the oil tanks and operation of oil blending should be considered, and the differences of oil properties should also be taken into account. When products are transported sequentially in pipelines, contaminated oil cannot be avoided, and it will influence the detailed scheduling (Liang et al. 2012b). A blending operation is one main method to deal with the contaminated oil. In previous research, the blending operations were taken into account as an important issue (Kolodziej et al. 2013; Pan and Wang 2006). Neiro et al. (2006) presented a stochastic multi-period model with two Lagrangian decomposition strategies to represent a petroleum refinery under uncertainty. Shi et al. (2014) presented a MILP discrete-time refinery scheduling model, establishing several controllable and realizable operation modes for production units by unitwide predictive control. And a two-stage Lagrangian decomposition approach was applied to decompose a refinery scheduling problem (Shi et al. 2015). However, it is difficult to apply these methods above in dealing with scheduling of oil depots considering the special technological constraints for contaminated oil processing. 1.3 Contributions of this work • • • All the previous studies ignored the differences in the physical properties of different batches of one type of oil. While due to the production parameters, material ratio and other differences, the same type of oil produced at different times will also have differences in physical properties. The paper takes these differences into consideration. The paper verifies the linear relationship between contaminated-oil concentration and blending capacity. The paper considers the following operations in the oil depot: delivery, export, blending, fractionation and maintenance. An approach for dealing with oil depot scheduling problem by MILP models is presented. A Chinese case-study, a large scale of oil depot system of a refined oil products pipeline, is under research. 1.4 Paper organization The adopted methodology and details of the mathematical model are given in Sects. 2 and 3 respectively. In Sect. 4 a real case in China is taken as an example, then the detailed scheduling in each oil depot is drawn, and the model’s feasibility is verified. Conclusions are provided in Sect. 5. 2 Methodology 2.1 Issue description This work mainly focuses on making a schedule scheme with the least cost for transit depots to operate tank switching, contaminated oil delivery, back tail and treatment, under the condition that all the constraints can be satisfied. To deal with the issue, three aspects need to be considered: depot operation, oil blending and contaminated batches. 2.1.1 Operations in oil depots The transportation mode of product pipelines is multi-batch sequential transportation as shown in Fig. 1. The products are injected at the initial station and delivered at intermediate oil depots and the terminal depot. The exporting schedules of oil depots will be made according to the demand of down-stream markets. When batches migrate in the pipelines, contaminated oil cannot be avoided due to thermal diffusion and turbulent diffusion and its volume will increase with the migration of the interface between two batches. In actual production, contaminated oil is usually treated in two ways: blending and fractionation. The blending operation means contaminated oil can be blended with the oil in the exporting pipeline according to a certain proportion. Fractionation means contaminated oil is fractionated to qualified oil, and recycled to the oil tank. When a tank needs to be repaired, it is necessary to transfer the oil into other tanks with the same kind of oil in advance. It is called a tank switching operation. All of these operating processes are shown in Fig. 1. There are three kinds of refined oil products (ROP1, ROP2 and ROP3) and three kinds of contaminated oil (MO1, MO2 and MO3), which are given in different colors. In Fig. 1, green solid lines denote delivery lines; green dashed lines denote export lines; blue solid lines denote fractionation lines; blue dashed lines denote recycle lines; red dashed lines denote blending lines; and black lines denote switching lines. 2.1.2 Blending capacity Compared with the fractionation operation, blending is more effective since it is simpler and more cost-effective. Blending operation can be classified into the following two cases. One is to put the light component oil into the heavy one, and the other the opposite, putting the heavy component oil into the light one. There are a variety of indicators to evaluate the quality of refined products, such as oxidation stability, sulfur content, octane number, ash, copper corrosion, moisture, mechanical impurities, lubricity, kinematic viscosity, pour point, cold filter plugging point, flash point, distillation range, density. The quality of the original oil is no doubt affected by the blending operation. The blending capacity means that maximum volume of contaminated oil can be treated under the premise of ensuring the oil’s standard. In actual production, due to production parameters, material ratio and other differences, the same kind of oil produced at different times will also have some differences. In other words, the oil may have different blending capacities. Considering the nonlinear effects of the blending oil on the physical properties and the mixing of different kinds of oils with different physical properties in a tank, the problem is more complex. Fig. 1 Operations in oil depots In the situation of heavy component oil blended with light contaminated oil, Li et al. (2011) have concluded that flash point is the most sensitive item according to the result of comparing test data with standards’ control indexes. With the increase in the proportion of light component oil in heavy oil, flash point decreases faster while other items change insensitively. Furthermore, when flash point becomes unqualified, others can still meet the requirements of the standard. By comparing test data of different mixing ratios with the result solved by each recommended experiential formula, Li et al. (2011) have concluded that the formula (1) agrees well with the experimental results, and the formula (1) can be used to calculate heavy component oil’s blending capacity. qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi Ts ð0:061TscÞ2 0:313 Tsc Vgc;j ¼ kgj 0:061Tsc where Vgc;j denotes the blending capacity of heavy component oil c per unit volume mixing with contaminated oil j; kgj denotes contaminated oil j’s ratio of containing light component oil; Tsc denotes heavy component oil c’s flash point; and Ts denotes the lowest flash point allowed. The experiential formula of calculating contaminated oil’s flash point: Terminal depot where Tsm1, Tsm2 denotes previously respective flash point of two same kinds of oil before mixing; l1, l2 denotes mixing ratio. If light component contaminated oil is blended into heavy contaminated oil composed of two heavy components oil, the blending capacity of per unit volume of heavy contaminated oil will be: where Vgec;j denotes the blending capacity of heavy component oil c per unit volume mixing with contaminated oil j calculated by a standard formula. Formula (3) is derived from physical equations, thus it can be used as a standard equation to calculate the blending capacity of contaminated heavy component oil per unit volume mixed with light oil. If blending capacity is calculated by linear sum according to the blending proportion, it can be denoted by formula (4). calculate the blending capacity of light component oil per unit volume mixing with heavy component oil. Vgcc;j ¼ kqgjðffiffiffiffiffiffiffiffiffiffiffiffiffiðffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 0:061 Tsm1l1 þ Tsm2l2Þ l1 ð0:061Tsm1Þ2 0:313 Tsm1 Ts qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi Ts l2 ð0:061Tsm2Þ2 0:313 Tsm2 where Vgcc;j denotes the blending capacity of heavy component oil c per unit volume mixing with contaminated oil j calculated by linear sum according to the blending proportion. e denotes the differences of formulas (3) and (4). If l2 ¼ 1 l1, l1 2 ½0; 1 is given, e can be expressed by formula (5). Z If kgj is a constant, the variables of e are only Ts1 and Ts2. Within the scope of oil flash point, the differences of the results calculated by formulas (3) and (4) are very small, just as shown in Fig. 2. In other words, after mixing of the same kind of oil produced at different times, its blending capacity of mixing light component oil can be calculated by linear summing of these oils’ previous blending capacities. In the situation of light component oil blended with heavy contaminated oil, Li et al. (2011) have concluded that the dry point is the most sensitive item according to the experimental data fitting and sensitivity analysis. In other words, other items can still meet the requirements of the standard when the dry point is just higher than its allowable limit. Therefore, in the mixed proportional range, formula (6) denotes the linear relation between dry point and mixing proportion. Moreover, formula (7) can be used to 3 e c n r2 e e iff 1 D Fig. 2 Differences between formula 3 and 4 Tzc ¼ l1Tzm1 þ l2Tzm2 where Vdc;j denotes the blending capacity of light component oil c per unit volume mixing with contaminated oil j; kdj denotes the proportion of heavy component oil included in contaminated oil j; Tzc denotes the dry point of light component oil c; Tz denotes the highest dry point allowed by the standard; Tzm1, Tzm2 denote the dry points of two same types of oil before blending. The blending capacity of light component oil, mixed by the same kind of oil produced at different times can be calculated by linear summing of the two previous oils’ blending capacities from formulas (6) and (7). Based on the analysis above, it is verified that the blending capacities of the same kind of oil can be added linearly. Besides, the blending capacity ratio regarding different sorts of contaminated oil of a certain kind of oil product should meet the condition: 8j; 8j0 2 J; 8c 2 C 8j; 8j0 2 J; 8c 2 C 2.1.3 Contaminated oil batch The products, pumped in sequence at the initial station, will generate two different types of contaminated oil with the migration in the pipeline. The first one is caused by two kinds of oil with similar components. The other is caused by two kinds of oil with different components. The first kind of contaminated oil is usually neglected in actual production because it has little influence on physical properties of qualified oil. The intermediate stations usually cut the contaminated oil into two segments. In other words, the contaminated oil is cut at the middle position and offloaded into two qualified oil tanks respectively. As shown in Fig. 1, intermediate oil depots and the terminal oil depot do not have contaminated oil tanks for MO3 because the components of ROP1 and ROP2 are similar. The two segments of MO3 are transported, respectively, into corresponding qualified oil tanks. Therefore, MO3 is not taken into consideration in the paper. The second kind of contaminated oil is usually cut into four segments. As shown in Fig. 1, ROP2 and ROP3 have large differences. When contaminated oil is caused by ROP2 and ROP3, the beginning and the ending segments of contaminated oil are delivered into the qualified oil tank, and the other two segments are, respectively, delivered into two different contaminated oil tanks. The former part MO2 of the two intermediate segments includes more ROP3, while the latter part includes more ROP2. The volume of contaminated oil continuously increases with the migration of contaminated oil in the pipeline due to the influence of convection and diffusion. Meanwhile, due to the nonlinear growth of the volume of contaminated oil, the delivery plan for contaminated oil at one station may have effects on the oil volume and the arrival time at other stations, thereby affecting other stations’ schedules. Moreover, the delivery plan for contaminated oil is related to the plan of blending and fractionation; thus, it also has effects on other stations’ scheduling plans such as export and switch. As a result, considering the nonlinear volatility of the volume of contaminated oil in the pipeline, the entire scheduling of oil depots along products pipeline will form a unified entity with its sub-parts affecting each other, which makes the solution of scheduling plan much more complex. According to Austin et al. (1963), formula (9) is mostly used to calculate the volume of contaminated oil. 0 !2 Lmdi;km ¼ 11:75di0:51Rei 01:1;km@ 8i 2 I; 8km 2 KMi If the injection scheduling of the initial station and the delivery scheduling of other stations are known, the flow rate and oil type in each time window can be obtained, and Rei 1;km is known. Formula (9) is a nonlinear equation Lmdi;km ¼ fi;kmðLmci 1;kmÞ as shown in Fig. 3. A nonlinear equation would add to the complexity of the optimal model. This paper comes up with a method of linearization in the following stages: the independent variable is divided into several sections, and at each section, the solution of all the independent variables is represented by the solution of the average value of the independent variable. In this way, Fig. 3 Austin formula and linearization in stages Austin formula Linearization in stages the nonlinear equation can be converted into a sectional linear equation like stairs. As shown in Fig. 3, Lmci 1;km is divided into several sections. If Lmci 1;km belongs to section b, Lmci 1;km 2 ½Lmii 1;km;b; Lmai 1;km;b . In this section, Lmdi;km identically equals fi;km Lmai 1;km;b2 Lmii 1;km;b . 2.2 Model requirements The model is formulated as MILP and the optimization is executed using MATLAB R2014a. A detailed scheduling of oil depots along product pipeline can be obtained by solving the model. Given: • Time horizon of studying. • Basic information of pipeline and stations: pipeline information, station location, the count of oil tanks and contaminated oil tanks, inventory limits of oil tanks, the capacity of fractionation facilities, the initial storage and blending capacities of oil in tanks. • Injection order and volume of oil in the initial station, the blending capacities of batches. • Approximate scheduling of delivery: starting and ending time of delivery operations at oil depots, and delivery volume. • Approximate scheduling of export: starting and ending time, oil type and volume of export operations. • Approximate scheduling of maintenance: starting and ending time of oil tank’s maintenance. Detailed scheduling of delivery: the volume of delivered oil at oil tanks, the actual time and volume of delivering oil, the number of contaminated oil tanks. Detailed scheduling of export: the number of exporting oil tanks and the corresponding volume needed to be exported. Detailed scheduling of blend: the type of contaminated oil, the number of contaminated oil tanks and the volume of oil. Detailed scheduling of fractionation: the type of contaminated oil, operating time, the volume of contaminated oil, the number of contaminated oil tanks. Objective: Minimize the total costs of delivery, export, blending, fractionation and tank switching operations of all the oil tanks during the study horizon to schedule the oil tanks’ detailed operation under various operational and technical constraints. In order to build and solve the model effectively, assumptions are made as follows: In the light of the lower flowrate of contaminated oil delivered at intermediate stations and the shorter contaminated length, the influence of contaminated oil delivery operation on batches’ flowrate and time of arriving at stations is not taken into consideration. The oil physical properties do not change with temperature. The given scheduling for batch delivery and oil export at transit oil tanks is reasonable, which can be satisfied with batch migration, hydraulic and tank inventory constraints. Supposing that the oil in the tank and the oil from the pipeline have been fully mixed, and their physical properties are same. 3 Mathematical model 3.1 Time windows The time nodes, usually fixed, of export and delivery at stations are given in the paper. However, considering the solution of the detailed scheduling plan, the way of just dividing time windows by fixed nodes cannot meet the model’s requirement. The reason is that the approximate scheduling plan is different from a detailed scheduling plan which needs to determine the exact time nodes of each operation and the corresponding oil volume of each tank. So each operation at the oil depots must specify an object in each time window, and the starting and ending time of each time window must correspond with each operation. If the time windows were divided only by fixed time nodes, they would be too sparse to affect the solution. As shown in Fig. 4a, all the fixed time nodes are sorted by time order, and the space between two adjacent time nodes is a time window. Taking time window 6 as an example, according to scheduling requirements and operation constraints, product oil cannot be delivered into several tanks at one time, that is, the product oil can only be delivered into one oil tank during the entire time window. If time window 6 is long enough that the planned volume of oil is more than each oil tank’s capacity, the model will have no solution due to its contradictory constraints. Fig. 4 Division of time windows To solve the issue above, in this paper we bring up a fixed-continuous mixed time expression. As illustrated in Fig. 4b, just like the method of dividing fixed time windows, all the time nodes are sorted by time order and several continuous time nodes are inserted into the space between fixed time nodes. Those continuous time nodes need to meet the requirements of the time order. In this way, the whole study horizon is divided into more time windows than that in previous studies. As shown in Fig. 4, the time window 6, divided by fixed time expressions, is divided into three time windows, 10, 11 and 12, using fixed-continuous mixed time expressions. Therefore, the oil, which used to be delivered in time window 6, can be mostly delivered into three tanks, so the oil scheduling system is more flexible than that in previous studies. 3.2 Objective function The objective of the model is to draw up a lowest cost scheduling plan while meeting each constraint. The cost of oil depots along a products pipeline mainly includes blending costs, fractionation costs and switching costs. The blending costs are related to the volume of oil need to be disposed of. The expression of the objective function is: t¼1 i¼1 j¼1 gm¼1 Xtmax Ximax Xjmax mXmi;j t¼"1 i¼1 j¼1 gm¼1 Xtmax Ximax Xjmax mXmi;j Codit;c;go þ Copti;c;go þ Cofit;c;go þ 2 3.3 Delivery constraints If the binary variable denoting the delivery state of an oil tank is 0, the delivery volume is 0. Supposing M is a large constant. Smdit;j;gmM Vmdit;j;gm 8t 2 T ; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j Sodit;c;goM Vodit;c;go 8t 2 T ; 8i 2 I; 8c 2 C; 8go 2 Goi;c During the time when contaminated oil j is passing through the intermediate station i, the intermediate station i can choose to deliver contaminated oil j or not. In order to reduce the effect of delivering operations on the batch transportation, the ratio of the volume of contaminated oil need to be delivered and the volume of arriving oil in the period should be smaller than the allowable maximum value. gm¼1 8t 2 Tdyi;j;km; 8i 2 f1; 2; . . .; imax 1g; 8j 2 J; 8km 2 KMi 8t 2 Toni;c; 8i 2 I; 8c 2 C According to the definition of a binary variable, only when the state binary variable of last moment and this moment are 0 and 1, respectively, can the operation binary variable of this moment be 1. Because the objective function is to obtain the minimal costs and is positively correlated with operation binary variables, the variable can be constrained only by determining its lower bound. Cmdit;j;gm Smdit;j;gm Smdit;j;g1m 8t 2 T ; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j Codit;c;go Sodit;c;go Sodit;c;1go 8t 2 T ; 8i 2 I; 8c 2 C; 8go 2 Goi;c During the delivering time at a station, the amount of delivery for all the tanks is equal to the total volume of oil arriving at the station in the corresponding period. Vodit;c;go ¼ Qgtiðst 3.4 Export constraints When contaminated oil arrives at the terminal station, all of it should be delivered. Vmditmax;j;gm ¼ Qgtimax ðst gm¼1 8t 2 Tdyimax;j;km; 8j 2 J; 8km 2 KMi Moreover, the delivering flow rate must be larger than the minimum flow rate. Qmdminðst If contaminated oil j has not arrived at station i, it cannot be delivered at station i. 8t 2 Tdni;j; 8i 2 I; 8j 2 J During the time when station i is delivering oil c, there must be one oil tank receiving the oil each time. 8t 2 Toyi;c; 8i 2 I; 8c 2 C esi;c;ktVeaxi;c;kt If station i is not delivering oil c, its binary variable denoting the state of oil tank’s delivery is 0. 8t 2 Teyi;kt; 8i 2 I; 8j 2 J; 8c 2 C; 8kt 2 KTi X Xmoi;c During the time of export, the sum of the volume of export and blending operations in all time windows should be in the allowable range. Due to the constraints of export facilities, only one oil tank is allowed to export oil at a station at the same time. If the state binary variable of an oil tank is 0, its blending capacity of exporting oil is 0. Sopti;c;goM j¼1 8t 2 T ; 8i 2 I; 8c 2 C; 8go 2 Goi;c The state binary variable of an oil tank is 0 if it is not exporting an oil. 8t 2 Teni; 8i 2 I; 8c 2 C; 8go 2 Goi;c X Xmoi;c esi;c;ktVeini;c;kt 8t 2 Teyi;kt; 8i 2 I; 8j 2 J; 8c 2 C; 8kt 2 KTi According to formula (8a, 8b), the blending capacity’s percentage for export oil blended with different kinds of contaminated oil is a constant value. The relationship between export operating binary variable and export state binary variable is similar to formula (19). Copti;c;go Sopti;c;go Sopti;c;1go 8t 2 T ; 8i 2 I; 8c 2 C; 8go 2 Goi;c 3.5 Blending constraints If the blending state binary variable of a contaminated oil tank is 0, the blending volume oil is 0. According to the processing requirements, a blending operation happens only when oil is exported to other stations. If there is no export operation, all oil tanks’ state binary variables are 0. Smhti;j;gm;c;go ¼ 0 8t 2 Teni; 8i 2 I; 8j 2 J; 8c 2 C; 8gm 2 Gmi;j; 8go 2 Goi;c During blending operations, the blending volume of contaminated oil should be less than its blending capacity. Moreover, the flow of blending operation should be more than the minimum flow rate. 8t 2 Teyi;kt; 8i 2 I; 8j 2 J; 8c 2 C; 8go 2 Goi;c; 8kt 2 KTi Qmhminðst The relationship of blending operation binary variable and blending state binary variable is similar to formula (19). Smhti;j;1gm;c;go 8t 2 T ; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j Due to the constraints of blending devices, only one contaminated oil tank at a station is allowed to blend contaminated oil at a time. j¼1 gm¼1 c¼1 go¼1 3.6 Fractionation constraints If the fractioning state binary variable of a contaminated oil tank is 0, the volume of fractionation is 0. Smfit;j;gmM Vmfit;j;gm 8t 2 T ; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j The volume of fractionating contaminated oil should be within the upper and lower bounds at any moment. Vmfit;j;gm ðst st 1ÞQfaxi 8t 2 T ; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j Vmfit;j;gm ðst st 1ÞQf ini þ ðSmfit;j;gm 8t 2 T ; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j The relationship of the fractionating operation binary variable and fractionating state binary variable is the same as formula (19). Cmfit;j;gm Smfit;j;gm Smfit;j;g1m 8t 2 T ; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j The fractionated oil should be pumped into the corresponding oil tank. The fractionated volume of all kinds of oil is related to the contaminated oil’s previous volume, type and fractionation loss. ! Xmoi;c X2 mXmi;j go¼1 j¼1 gm¼1 8t 2 T ; 8i 2 I; 8c 2 C; 8t 2 T If the fractionating recycle state binary variable of an oil tank is 0, its fractionating blending volume is 0. Sofit;c;goM Vofit;c;go 8t 2 T ; 8i 2 I; 8c 2 C; 8go 2 Goi;c The relationship of a fractionating recycle operating binary variable and the fractionating blending state binary variable is the same as formula (19). Cofit;c;go Sofit;c;go Sofit;c;g1o 8t 2 T; 8i 2 I; 8c 2 C; 8go 2 Goi;c 3.7 Maintenance and switch-tank constraints Without maintenance, the inventories of contaminated oil tanks are in the allowed range. mvti;j;gmÞVmni;j;gm Vmti;j;gm ð1 8t 2 T; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j A contaminated oil tank is not allowed to take two operations such as blend, switch and fractionation at the same time. If a tank needs repair, oil should be pumped into other oil tanks storing the same kind of oil. If the switching state binary variable of a contaminated oil tank is 0, the volume of switch-tank oil is 0. Smoti;j;gm;gm0 M Vmoti;j;gm;gm0 8t 2 T; 8i 2 I; 8j 2 J; 8gm; 8gm0 2 Gmi;j If the switching state binary variable of a contaminated oil tank is 0, its blending capacity of exchanging to other oil tanks is 0. The relationship of switching operation binary variable and switching state binary variable is the same as formula (19). 8t 2 T; 8i 2 I; 8j 2 J; 8gm; 8gm0 2 Gmi;j Sooti;c;1go;go0 8t 2 T; 8i 2 I; 8c 2 C; 8go; 8go0 2 Goi;c According to formula (19), the blending capacity ratio of exchanging oil blended with different kinds of contaminated oil is a constant. Vaoti;c;go;go0;j ¼ gc;j;j0 Vaoti;c;go;go0;j0 8t 2 T; 8i 2 I; 8j; 8j0 2 J; 8c 2 C; 8go; 8go0 2 Goi;c ð46Þ 3.8 Oil tank and contaminated oil tank constraints The current inventory of a contaminated oil tank is the sum of the accumulated oil of last moment, the contaminated oil delivered at this moment and the switching oil minus blended and fractionated oil. Vmti;j;gm ¼ Vmti;j;1gm þ Vmdit;j;gm mXmi;j 8t 2 T; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j 8t 2 T; 8i 2 I; 8c 2 C; 8go; 8go0 2 Goi;c Without maintenance, the blending capacity of oil stocked in oil tanks has certain limitation due to the inventory of oil tanks. Voti;c;go ð1 ovti;c;goÞVsxi;c;go 8t 2 T; 8i 2 I; 8c 2 C; 8j 2 J; 8go 2 Goi;c Voti;c;go ð1 ovti;c;goÞVsni;c;go 8t 2 T; 8i 2 I; 8c 2 C; 8j 2 J; 8go 2 Goi;c The inventory of oil tanks, the volume of switch and export operation should be in a range of volume. Smhti;j;gm;c;go þ Smfit;j;gm Smoti;j;gm;gm0 þ Smoti;j;gm0;gm 8t 2 T; 8i 2 I; 8j 2 J; 8gm 2 Gmi;j The blending capacity of an oil tank is the sum of its blending capacity of last moment, delivery, recycle and switching oil’s blending capacity during this period minus export oil’s blending capacity. Vamti;c;go;j ¼ Vamti;c;1go;j þ ikdt;kdVodit;c;goVayi;c;kd;j Xmoi;c Vatit;c;go;j 8t 2 T; 8i 2 I; 8kd 2 KDi; 8c 2 C; 8j 2 J; 8go 2 Goi;c The inventory of an oil tank is the sum of its volume at the last moment, delivered and switched volume during this period minus the volume of export. Voti;c;go ¼ Voti;c;1go þ Vodit;c;go mXmi;j Vooti;c;go;go0 [ Vomab þ Cboi;c;go;go0;b 8t 2 T; 8i 2 I; 8c 2 C; 8j 2 J; 8go; 8go0 2 Goi;c 8b 2 B 8i 2 I; 8c 2 C; 8j 2 J; 8go; 8go0 2 Goi;c 8b 2 B Cbti;c;go;t;b M 8t 2 T; 8i 2 I; 8c 2 C; 8go 2 Goi;c; 8b 2 B Votit;c;go [ Vomib þ Cbti;c;go;t;b 8t 2 T; 8i 2 I; 8c 2 C; 8go 2 Goi;c; 8b 2 B 8t 2 T; 8i 2 I; 8c 2 C; 8go 2 Goi;c; 8b 2 B There should be a certain ratio between the inventory of oil tanks and the blending capacity of oil tanks. 2Vamti;c;gm;j Vomab þ Vomib þ ð1 þ ðCboi;c;gm;gm0;b0 Cbi;c;gm;t;bÞM 2Vaoti;c;gm;gm0;j Vomab0 þ Vomib 2Vamti;c;gm;j Vomab þ Vomib þ ðCbi;c;gm;t;b Cboi;c;gm;gm0;b0 ÞM 2Vamti;c;go;j Vomab þ Vomib þ ð1 þ ðCbti;c;go;t;b0 1ÞM Cbi;c;go;t;b M 8t 2 T; 8i 2 I; 8c 2 C; 8j 2 J; 8go 2 Goi;c; 8b 2 B Cbti;c;go;t;b0 ÞM Voti;c;go [ Vomib þ Cbi;c;go;t;b 8t 2 T; 8i 2 I; 8c 2 C; 8j 2 J; 8go 2 Goi;c; 8b 2 B 2Vatit;c;go Vomab0 þ Vomib0 8t 2 T; 8i 2 I; 8c 2 C; 8j 2 J; 8go 2 Goi;c; 8b 2 B Cboi;c;go;go0;b M 8t 2 T; 8i 2 I; 8c 2 C; 8j 2 J; 8go; 8go0 2 Goi;c 8b 2 B 8t 2 T; 8i 2 I; 8c 2 C; 8go 2 Goi;c 8i 2 I; 8c 2 C; 8go; 8go0 2 Goi;c; No oil tank is allowed to do delivery, export, switch, blending and fractionation operations simultaneously at the same time. Sodit;c;go þ Sopti;c;go þ Sofit;c;go þ ðSooti;c;go;go þ Sooti;c;go0;goÞ 1 3.9 Contaminated oil batch constraints After linearizing Austin’s formula, the length of contaminated oil of each batch when arriving at stations can be denoted as follows: X cn Cmi;km;pxi;km;p Lmci 1;km Lmap þ 1 Cmi;km;p M 8i 2 I; 8km 2 KMi; 8p 2 P Lmci 1;km [ Lmip 1 Cmi;km;p M 8i 2 I; 8km 2 KMi; 8p 2 P X Lmap þ Lmip 8i 2 I; 8km 2 KMi; 8p 2 P The length of contaminated oil when it leaves the station is equal to its arriving length minus the delivering volume divided by pipeline cross-sectional area. All contaminated oil should be delivered to the terminal oil depot. P P2 mPmi;j Lmci;km ¼ Lmdi;km 8t 2 Tdyi;j;km; 8i 2 I; 8j 2 J; 8km 2 KMi 8km 2 KMimax Arriving and leaving time of mixed oil at one station can be modified by the calculated length of contaminated oil. When cutting the contaminated oil into four segments, the time of the former contaminated oil batch leaving the The following time nodes cannot be sorted earlier than the time nodes in the front, while the time nodes in the front cannot be sorted later than the time node behind. All time nodes, such as the starting and ending time of delivery, export, maintenance and study horizon, the arriving time of contaminated oil batch, are regarded as the model’s time nodes. Because the fixed time nodes are given as model’s known parameters, the sorting order of time nodes are also the model’s known parameters sorted by fixed-continuous time expression. Taking kst and kht as internal variables, their expressions and constrains are shown as follows: X X hodbi;kd;tsodbi;kd þ hodni;kd;tsodni;kd hoebi;kt;tsoebi;kt þ hoeni;kt;tsoeni;kt hosbi;ks;tsosbi;ks þ hosni;ks;tsosni;ks Xi ks X X hmdi;j;km;tsmdi;j;km þ hmci;j;km;tsmci;j;km X X þ þ þ þ hsbtsb þ hsntsn X X X X hodbi;kd;t þ hodni;kd;t hoebi;kt;t þ hoeni;kt;t hosbi;ks;t þ hosni;ks;t i ks X X X hmdi;j;km;t þ hmci;j;km;t þ hsbt þ hsnt 8i 2 I; 8j 2 J; 8kd 2 KDi; 8kt 2 KTi; 8ks 2 KSi; station is equal to the time of the latter arriving, and is also equal to the average time of the sum of contaminated oil batches in and out. 4 Results and discussion 4.1 Example 1 smdi;j;km ¼ sdgi;km Lmgi;km 8i 2 I; 8j 2 J; 8km 2 KMi smci;j;km ¼ scgi;km þ ikj;km Lmgi;km 8i 2 I; 8j 2 J; 8km 2 KMi Lmdi;km 3.10 Time node constraints Lmdi;km 8km 2 KMi Provided that there is a single delivery station, the model will be simplified as a depot scheduling model. The model is solved by MATLAB 2014b solver with Intel Core i74770k (3.50 GHz) hardware. There is a transit depot, which can respectively stock 0# diesel (0#D), 93# gasoline (93#G) and 97# gasoline (97#G), as well as include oil tanks for high diesel-cut contaminated oil (DMO) and high gasoline-cut contaminated oil (GMO). The basic parameters of each oil tank are shown in Table 1. And the physical properties of each batch of oil are shown in Table 2. In this paper, the MILP model is established for the transit depot. The studying horizon is 243 h. There are a total of six times for oil delivery and export. The scheduling scheme of delivery and export are shown in Tables 3 and 4. In this paper, the cost of oil and contaminated oil tank’s operation is 100 CNY per unit, and the cost of fractionating contaminated oil is 10 CNY/m3. Because blending contaminated oil can increase the benefits of enterprise, the cost of contaminated oil is -1 CNY/m3. According to the method in the paper, a MILP model is established to solve the oil transit depot scheduling issue and the results are shown in Table 5. According to Tables 3 and 4, the model is established to solve the detailed scheduling scheme. With the prerequisite that the scheduling of delivery and export and the tank inventory are met, oil can be delivered (or exported) into (or from) specific tanks in turn and switching frequency of tanks can be reduced as much as possible. The contaminated oil delivered is going into back tail treatment. The detailed scheduling scheme of oil tanks obtained by the model is shown in Fig. 5, and the detailed scheduling scheme of contaminated oil tanks is shown in Fig. 6. Figures 5 and 6 illustrate that the oil tank scheduling can fully meet the needs of the entire system. During the period of export, the volume sum of exporting oil and blending contaminated oil is equal to the export demand. The inventory of each oil tank varies with time as shown in Fig. 7, and the inventory variation of contaminated oil tanks with time is shown in Fig. 8. The results indicate that if every time the oil delivery (or export) into (or from) tanks for only once is guaranteed, both the operating cost and oil evaporation loss will be cut down. However, the large amount of the second delivery of diesel leads to the need for two diesel tanks. GMO and DMO should go to back tail as far as possible before oil is to be exported every time. Therefore, at the moment when the scheduling ends, Upper limit, m3 Lower limit, m3 Initial tank inventory, m3 Table 2 The physical properties of oil Table 3 Scheduling scheme of delivery Start time, h End time, h Flash point, C Dry point, C Table 4 Scheduling scheme of export Start time, h End time, h Volume, m3 Volume, m3 the tank level of each contaminated oil tank is below the lower limit. 4.2 Example 2 In this section, a real-world case of a depot system in China is given and its mathematic model is established according to the proposed MILP formulation. The model is solved by MATLAB 2014b solver on a computer with Intel Core i74770k (3.50 GHz) hardware. There are 3 oil depots (1#OD, 2#OD and 3#OD) along the products pipeline, which can respectively stock 0# diesel (0#D), 93# gasoline (93#G) and 97# gasoline (97#G). The basic parameters are shown in Table 6. In the whole system, only a contaminated oil fractionation equipment with 20 m3/h processing capacity is settled at 3#OD. Before optimization, a large amount of contaminated oil is transported to 3#OD, for the scheduling concern of 1#OD and 2#OD. When a lot of contaminated oil cannot be blended with export operation at 3#OD, it is necessary to fractionate contaminated oil by fractionation equipment, which increases the production costs. In this paper, the MILP model is established for this oil depot system. The studying horizon is 175 h. 0#D(2#) and 93#G(2#) in 3#OD, respectively, need to be repaired during 25.5–69.4 and 120.1–165.9 h. The approximate delivery scheduling plan is shown in Fig. 9. There are five batches (B1, B2, B3, B4 and B5), and the physical properties of 0#D(1#) denotes 1# diesel oil tank with 0# diesel. 93#G(1#) denotes 1# gasoline oil tank with 93# gasoline. 97#G(1#) denotes 1# gasoline oil tank with 97# gasoline. DMO(1#) denotes 1# contaminated oil tank with high diesel-cut contaminated oil. GMO(1#) denotes 1# contaminated oil tank with high gasoline-cut contaminated oil Table 5 Results of example 1 De. MO op. De. O op. # of eq. con. # ofineq. con. CPU time, s Bl. vo., m3 Total costs Fr. vo., m3 93#G(1#) 5206 0#D(1#) 2928 DMO(1#) 35 15 Fig. 5 Scheduling plan of oil tanks 5816 2927 5958 Fig. 6 Scheduling plan of contaminated oil tanks each batch of oil are shown in Table 7. Each oil depot needs to accept a specific volume of delivered oil at the specified time according to the scheduling plan. Moreover, oil depots need to export oil in the specified time according to the demand of down-stream markets. The scheduling plan of export is also shown in Fig. 9. In this paper, the cost of oil and contaminated oil tank’s operation is 100 CNY per unit, and the cost of fractionating contaminated oil is 10 CNY/m3. Because blending contaminated oil can increase the benefits of enterprise, the cost of contaminated oil is -1 CNY/m3. According to the method in the paper, a MILP model is established to solve the oil depot system scheduling issue and the results are shown in Table 8. The detailed scheduling plan of oil tanks is shown in Fig. 10, and the detailed scheduling plan of contaminated oil tanks is shown in Fig. 11. Figures 10 and 11 show that the oil tank scheduling can fully meet the needs of the entire system. During the period of export, the volume sum of exporting oil and blending contaminated oil is equal to the export demand. For example, the volume of 0#D needed to be exported in 1#OD is 9200 m3 during 43.1–52.4 h. The corresponding result after optimization is that 0#D(2#) exports 9105 m3 oil and DMO(1#) is blended with 95 m3 high diesel-cut contaminated oil. At the same time, the model takes the tank’s maintenance into consideration. Before the maintenance of 0#D(2#) and 93#G(2#) in 3#OD, the oil in them are switched into other oil tanks with the same kind of oil. During 92.4–116.6 h, 1#OD is required to delivery 93# gasoline oil of 11,234 m3. Due to the upper limit of 10,000 m3, there should be two oil tanks for receiving oil in turn and 1#OD should take first. When it comes to 110 h, 1#OD is required to export 93# gasoline oil of 8724 m3. Since the model aims to minimize the switching times of tanks and only 1#OD inventory can satisfy the export requirement, 1#OD should start to export instead of receiving oil, while 2#OD should start to receive oil. The inventory of each oil tank varies with time as shown in Fig. 12. Considering the limit of inventory, some operating plan should be divided into several periods, for Fig. 7 Inventory of oil tanks. Notes: 1#I denotes the inventory of 1# oil tank. 2#I denotes the inventory of 2# oil tank. LU denotes the upper bound of the oil tank. LL denotes the lower bound of the oil tank. 1#BCH denotes the blending capacity of 1# oil tank blending with heavy component oil. 2#BCH denotes the blending capacity of 2# oil tank blending with heavy component oil. 1#BCL denotes the blending capacity of 1# oil tank blending with light component oil. 2#BCL denotes the blending capacity of 2# oil tank blending with light component oil. BC denotes the blending capacity LL Fig. 8 Inventory of contaminated oil tanks. Notes: 1#HI denotes the inventory of 1# heavy component oil tank. 2#HI denotes the inventory of 2# heavy component oil tank. 1#LI denotes the inventory of 1# light component oil tank. 2#LI denotes the inventory of 2# light component oil tank. LU denotes the upper bound of the oil tank. LL denotes the lower bound of the oil tank instance, the same kind of oil is stocked into different oil tanks and is exported from different oil tanks. For example, 3#OD needs to deliver 8279 m3 97#G during 150.3–165.9 h and the results are divided into 3 periods. Firstly, during 150.3–160.1 h, 2784 m3 oil is delivered into 97#G(1#). Secondly, after this period, the station needs to export 97#G. However, the capacity of 97#G(1#) is low so it is necessary to stop delivering oil into 97#G(1#) and to start exporting 97#G. Therefore, the oil is delivered into 97#G(2#). Thirdly, 97#G(1#) reaches the lower bound at 165.1 h, so it is necessary to stop exporting oil from 97#G(1#) and to start delivering oil. Finally, 97#G(2#) takes export operation. The inventory variation of contaminated oil tanks with time is shown in Fig. 13. The volume variation of two contaminated-oil batches in the pipeline is shown as Fig. 14. It can be seen that, although the initial inventory of the tank is relatively high, using only the blending operation can better balance the contaminated oil to avoid the fractionation operation, thereby reducing the operating costs. In the light of the above results, it is general to finish the valve opening operation only once when oil delivery and export are performed every time. Since DMO can be easily contaminated by diesel oil, it should be treated with back tail for the sake of satisfying the inventory constraints of contaminated oil tanks. Similarly, so does gasoline oil when exported. But for some special cases such as 97# gasoline oil flowing into 3#OD, it is necessary to operate two tanks simultaneously because the scheduling time overlaps and both the gasoline oil tanks 3 are 5000 m . When delivery starts, the 1#OD should be first opened and then the 2#OD; and when it turns to the 2#OD, the 1#OD should carry out export. In the light of 3#OD as the terminal depot, thus, it required to blend some DMO so as to ensure contaminated tanks can once receive DMO from B5 batch for once. When the 1#OD inventory comes up to the lower limit, the 2#OD is blended with GMO for export. It is seen from the Austin formula that the contaminated oil volume will come be the lowest in a scheduling scheme if there is no contaminated oil delivery. A large amount of contaminated oil needs to be delivered in 3#OD at the terminal station, yet there is not enough space for DMO delivered last time which remains unprocessed, leading to some DMO should be shared at intermediate stations. Upper limit, m3 Lower limit, m3 Initial tank inventory, m3 Fig. 9 OD’s scheduling of delivery and export Table 7 The physical properties of batches Flash point, C Dry point, C 1#OD denotes 1# oil depot. 0#D(1#) denotes 1# diesel oil tank with 0# diesel. 93#G(1#) denotes 1# gasoline oil tank with 93# gasoline. 97#G(1#) denotes 1# gasoline oil tank with 97# gasoline. DMO(1#) denotes 1# contaminated oil tank with high diesel-cut contaminated oil. GMO(1#) denotes 1# contaminated oil tank with high gasoline-cut contaminated oil 5 Conclusion The paper puts forward a new view of oil blending capacity and verifies the linear relationship of mixing oil concentration and oil blending capacity. The paper also presents a new method for detailed scheduling of oil depots along a product pipeline based on a MILP model. The model established in this paper considers the issues such as De. O op. # of eq. con. # ofineq. con. CPU time, s Bl. vo., m3 Total costs Fr. vo., m3 Fig. 10 Scheduling plan of OD differences of oil physical properties, the growth of contaminated-oil batches, the type of contaminated oil and the different operation modes in oil depots and those issues make the formulation more practicable but more complex. The model, aiming at solving the minimum cost scheduling of oil depots system, takes the cost of blending and fractionation as well as the operation of oil and contaminated oil tanks into consideration. The MILP model, considering the constraints of delivery, export, blending, fractionation, maintenance, switching, oil and contaminated oil tank, 8504 8724 4504 4636 4777 4800 2784 3362 695 Table 8 Results of example 2 De. MO op. 2#OD 93#G(1#) 1#OD 93#G(1#) Fig. 11 Scheduling plan of contaminated oil tanks 3 m, CB L C I B 0 B I B 1 , I B D I B I B I B # # 1 1 L 1 , I B # # 1 1 L b Fig. 13 Inventory of contaminated oil tanks. Notes: 1#HI denotes the inventory of 1# heavy component oil tank. 2#HI denotes the inventory of 2# heavy component oil tank. 1#LI denotes the inventory of 1# light component oil tank. 2#LI denotes the inventory of 2# light component oil tank. LU denotes the upper bound of the oil tank. LL denotes the lower bound of the oil tank Fig. 14 The volume variation of contaminated oil batches in pipeline contaminated oil batch and time node, is solved by MATLAB 2014. This method is successfully applied to a Chinese actual oil depot system, which includes three oil depots. All of them can deliver and export 0# diesel, 93# and 97# gasoline. There are, respectively, 7 oil tanks in 1# and 2# oil depot, and 10 oil tanks in 3# oil depot. By solving the model, a 175 h detailed scheduling plan is given. Moreover, the contaminated oil is properly dealt with in real time by blending operations, so the plan effectively avoids the accumulation of contaminated oil in 3# oil depot, which increases the profits of oil depots. At the same time, there is no need to make fractionation operation which saves a lot of costs. As a result, the model is feasible and effective. Product pipeline scheduling plans are closely related to the oil depots along the pipeline. The paper takes batch migration as a known condition and only focuses on oil depots scheduling plan. In the future, the authors intend to do more research on an entire optimization of batch migration and oil depot scheduling plans. When establishing the optimization model, the contaminated plug in pipelines is regarded as a contamination interface. While in the real pipeline operation, the contaminated plug will influence the time of batches arriving at stations, resulting in lower accuracy of scheduling schemes. Thus the further research should take the contaminated plug into consideration. Moreover, the following points should be paid attention during oil delivery and export: Acknowledgements This work was part of the Program of ‘‘Study of the mechanism of complex heat and mass transfer during batch transport process in product pipelines’’ funded under the National Natural Science Foundation of China, Grant Number 51474228. The authors are grateful to all study participants. Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://crea tivecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. Austin JE , Palfrey JR , Austin JE , et al. Mixing of miscible but dissimilar liquids in serial flow in a pipeline . Proc Inst Mech Eng . 1963 ; 1963 (178): 377 - 95 . Barzin R , Chen JJJ , Young BR , et al. Peak load shifting with energy storage and price-based control system . Energy . 2015 ; 92 : 505 - 14 . doi:10.1016/j.energy. 2015 .05.144. BP ( 2014 ) BP statistical review of world energy . www.bp.com/ statisticalreview2014. Cafaro DC , Cerda J. Dynamic scheduling of multiproduct pipelines with multiple delivery due dates . Comput Chem Eng . 2008 ; 32 ( 4-5 ): 728 - 53 . doi:10.1016/j.compchemeng. 2007 .03. 002. Cafaro DC , Cerda J. Operational scheduling of refined products pipeline networks with simultaneous batch injections . Comput Chem Eng . 2010 ; 34 ( 10 ): 1687 - 704 . doi:10.1016/j.compchem eng. 2010 .03.005. Cafaro DC , Cerda J. A rigorous mathematical formulation for the scheduling of tree-structure pipeline networks . Ind Eng Chem Res . 2011 ; 50 ( 9 ): 5064 - 85 . doi:10.1021/Ie101462k. Cafaro DC , Cerda J. Rigorous scheduling of mesh-structure refined petroleum pipeline networks . Comput Chem Eng . 2012 ; 38 : 185 - 203 . doi:10.1016/j.compchemeng. 2011 .11.007. Cafaro VG , Cafaro DC , Mendez CA , et al. MINLP model for the detailed scheduling of refined products pipelines with flow rate dependent pumping costs . Comput Chem Eng. 2015a; 72 : 210 - 21 . doi:10.1016/j.compchemeng. 2014 .05.012. Cafaro VG , Cafaro DC , Mendez CA , et al. Optimization model for the detailed scheduling of multi-source pipelines . Comput Ind Eng. 2015b; 88 : 395 - 409 . doi:10.1016/j.cie. 2015 .07.022. Castro PM . Optimal scheduling of pipeline systems with a resourcetask network continuous-time formulation . Ind Eng Chem Res . 2010 ; 49 ( 22 ): 11491 - 505 . doi:10.1021/ie1010993. Duan ZG , Liang YT , Guo Q , et al. An automatic detailed scheduling method of refined products pipeline . In: IEEE international conference on control and automation. 2016 . p. 816 - 23 . Ghaffari-Hadigheh A , Mostafaei H. On the scheduling of real world multiproduct pipelines with simultaneous delivery . Optim Eng . 2015 ; 3 : 1 - 34 . Herra´n A , Defersha FM , Chen M , et al. An integrated multi period planning of the production and transportation of multiple petroleum products in a single pipeline system . Int J Ind Eng Comput . 2011 ; 2 ( 1 ): 19 - 44 . Herran A , de la Cruz JM , de Andres B. Global Search Metaheuristics for planning transportation of multiple petroleum products in a multi-pipeline system . Comput Chem Eng . 2012 ; 37 : 248 - 61 . doi:10.1016/j.compchemeng. 2011 .10.003. Kolodziej SP , Grossmann IE , Furman KC , et al. A discretizationbased approach for the optimization of the multiperiod blend scheduling problem . Comput Chem Eng . 2013 ; 53 : 122 - 42 . doi:10.1016/j.compchemeng. 2013 .01.016. Li H , Liang J , Zhu F , et al. Mixing experiment and critical proportion calculation for contamination of products . Oil Gas Storage Transp . 2011 ; 30 ( 3 ): 180 -2 (in Chinese). Li WQ , Dai YP , Ma LW , et al. Oil-saving pathways until 2030 for road freight transportation in China based on a cost-optimization model . Energy . 2015 ; 86 : 369 - 84 . doi:10.1016/j.energy. 2015 .04. 033. Liang YT , Li M , Li JF . Hydraulic model optimization of a multiproduct pipeline . Pet Sci . 2012a ; 9 ( 4 ): 521 - 6 . doi:10.1007/ s12182- 012 - 0237 -2. Liang YT , Li M , Zhang N. A study on optimizing delivering scheduling for a multiproduct pipeline . Comput Chem Eng. 2012b; 44 : 127 - 40 . doi:10.1016/j.compchemeng. 2012 .05.007. MirHassani SA , Abbasi M , Moradi S. Operational scheduling of refined product pipeline with dual purpose depots . Appl Math Model . 2013 ; 37 ( 8 ): 5723 - 42 . doi:10.1016/j.apm. 2012 .11.009. MirHassani SA , BeheshtiAsl N. A heuristic batch sequencing for multiproduct pipelines . Comput Chem Eng . 2013 ; 56 : 58 - 67 . doi:10.1016/j.compchemeng. 2013 .05.007. MirHassani SA , Jahromi HF . Scheduling multi-product tree-structure pipelines . Comput Chem Eng . 2011 ; 35 ( 1 ): 165 - 76 . doi:10.1016/ j.compchemeng. 2010 .03.018. Mitra S , Sun LG , Grossmann IE . Optimal scheduling of industrial combined heat and power plants under time-sensitive electricity prices . Energy . 2013 ; 54 : 194 - 211 . doi:10.1016/j.energy. 2013 .02. 030. Mostafaei H , Hadigheh AG. A general modeling framework for the long-term scheduling of multiproduct pipelines with delivery constraints . Ind Eng Chem Res . 2014 ; 53 ( 17 ): 7029 - 42 . doi:10. 1021/ie4038032. Neiro SM , Pinto JM . Langrangean decomposition applied to multiperiod planning of petroleum refineries under uncertainty . Latin Am Appl Res Pesquisa aplicada latino americana = Investigacio´n aplicada latinoamericana . 2006 ; 36 ( 4 ): 213 - 20 . Neiro SMS , Murata VV , Pinto JM . Hybrid time formulation for diesel blending and distribution scheduling . Ind Eng Chem Res . 2014 ; 53 ( 44 ): 17124 - 34 . doi:10.1021/ie5009103. Pan H , Wang L. Blending scheduling under uncertainty based on particle swarm optimization with hypothesis test . Lect Notes Comput Sci . 2006 ; 4115 : 109 - 20 . Rejowski R , Pinto JM . Scheduling of a multiproduct pipeline system . Comput Chem Eng . 2003 ; 27 ( 8-9 ): 1229 - 46 . doi:10.1016/S0098- 1354(03)00049- 8 . Rejowski R , Pinto JM . Efficient MILP formulations and valid cuts for multiproduct pipeline scheduling . Comput Chem Eng . 2004 ; 28 ( 8 ): 1511 - 28 . Relvas S , Barbosa-Povoa APFD , Matos HA . Heuristic batch sequencing on a multiproduct oil distribution system . Comput Chem Eng . 2009 ; 33 ( 3 ): 712 - 30 . doi:10.1016/j.compchemeng. 2008 .10.012. Relvas S , Magatao SNB , Barbosa-Povoa APFD , et al. Integrated scheduling and inventory management of an oil products distribution system . Omega Int J Manag Sci . 2013 ; 41 ( 6 ): 955 - 68 . doi:10.1016/j.omega. 2013 .01.001. Relvas S , Matos HA , Barbosa-Povoa APFD , et al. Pipeline scheduling and inventory management of a multiproduct distribution oil system . Ind Eng Chem Res . 2006 ; 45 ( 23 ): 7841 - 55 . doi:10.1021/ ie060309c. Shi L , Jiang YH , Wang L , et al. Refinery production scheduling involving operational transitions of mode switching under predictive control system . Ind Eng Chem Res . 2014 ; 53 ( 19 ): 8155 - 70 . doi:10.1021/ie500233k. Shi L , Jiang YH , Wang L , et al. A novel two-stage Lagrangian decomposition approach for refinery production scheduling with operational transitions in mode switching . Chin J Chem Eng . 2015 ; 23 ( 11 ): 1793 - 800 . doi:10.1016/j.cjche. 2015 .08.017. Zhang H , Liang Y , Wang N , et al. Optimal scheduling of multi-source single-distribution pipeline with multi-batch sequential transportation . Acta Pet Sin . 2015 ; 36 ( 9 ): 1148 - 55 (in Chinese). Zhang H , Liang Y , Liao Q , et al. A hybrid computational approach for detailed scheduling of products in a pipeline with multiple pump stations . Energy . 2017 ; 119 ( 15 ): 612 - 28 . doi:10.1016/j.energy. 2016 .11.027. Zhang HR , Liang YT , Xiao Q , et al. Supply-based optimal scheduling of oil product pipelines . Pet Sci . 2016 ; 13 ( 2 ): 355 - 67 . doi:10. 1007/s12182- 016 - 0081 -x.


This is a preview of a remote PDF: https://link.springer.com/content/pdf/10.1007%2Fs12182-017-0151-8.pdf

Hao-Ran Zhang, Yong-Tu Liang, Qi Liao, Jing Ma, Xiao-Han Yan. An MILP approach for detailed scheduling of oil depots along a multi-product pipeline, Petroleum Science, 2017, 434-458, DOI: 10.1007/s12182-017-0151-8