An MILP approach for detailed scheduling of oil depots along a multiproduct pipeline
 1.2k Downloads
 8 Citations
Abstract
Oil depots along products pipelines are important components of the pipeline transportation system and downstream 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 mixedinteger 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.
Keywords
Products pipeline Oil depot Scheduling plan Mixedinteger linear programming (MILP) Contaminated oil Blending capacityList of symbols
Sets and indices
 \(\forall i \in I = \{ 1, \ldots ,i_{\hbox{max} } \}\)
The set of the numbers of stations in the system, \(i_{\hbox{max} }\) denotes the maximum number of stations
 \(\forall j \in J = \{ 1, \ldots ,j_{\hbox{max} } \}\)
The set of the numbers of all kinds of contaminated oil in the system, 1 denotes high gasolinecut contaminated oil, \( j_{\hbox{max}} = 2\), in this work, denotes high dieselcut contaminated oil
 \(\forall c \in C = \{ 1,2, \ldots, c_{\hbox{max} } \}\)
The set of the numbers of all kinds of oil in the system, \(c_{\hbox{max} }\) denotes the maximum number of oil types
 \(\forall gm \in Gm_{i,j} = \{ 1,2, \ldots, mm_{i,j} \}\)
The set of the numbers of contaminated oil j tanks at station i, \(mm_{i,j}\) denotes the maximum number of those oil tanks
 \(\forall go \in Go_{i,c} = \{ 1,2, \ldots, mo_{i,c} \}\)
The set of the numbers of oil c tanks at station i, \(m{\text{o}}_{i,c}\) denotes the maximum number of those oil tanks
 \(\forall t \in T = \{ 1,2, \ldots ,t_{\hbox{max} } \}\)
The set of the numbers of all time nodes sorted in order in the study horizon, \(t_{\hbox{max} }\) denotes the maximum number of time nodes
 \(Tdy_{i,j,km}\)
The set of the numbers of time nodes during batch \(km\)’s contaminated oil \(j\) crossing over station \(i\)
 \(Tdn_{i,j}\)
The set of the numbers of time nodes during contaminated oil \(j\) not crossing over station \(i\)
 \(Toy_{i,kd}\)
The set of the numbers of time nodes during station \(i\) delivering oil at first \(kd\) times
 \(Ton_{i,c}\)
The set of the numbers of time nodes during station \(i\) not delivering oil \(c\)
 \(Tey_{i,kt}\)
The set of the numbers of time nodes during station \(i\) exporting oil at first \(kt\) times
 \(Ten_{i}\)
The set of the numbers of time nodes during station \(i\) not exporting oil
 \(\forall p \in P\)
The set of the numbers of sections after linearizing Austin’s formula
 \(\forall b \in B\)
The set of the numbers of the volume divided in sections
 \(\forall kd \in KD_{i}\)
The set of the times of station \(i\) delivering oil
 \(\forall kt \in KT_{i}\)
The set of the times of station \(i\) exporting oil
 \(\forall km \in KM_{i}\)
The set of the times of contaminated oil batches crossing station \(i\)
 \(\forall ks \in KS_{i}\)
The set of the times of station \(i\) in maintenances
Continuous parameters
 \(\lambda_{1j}\)
The cost of blending contaminated oil \(j\) per unit volume
 \(\lambda_{2j}\)
The cost of fractionating oil \(j\) per unit volume
 \(\lambda_{3}\)
The operating cost of oil tanks and contaminated oil tanks
 \(\alpha_{\hbox{max} }\)
The maximum ratio of delivering volume of contaminated oil and the volume of oil existed
 \(Qg_{i}^{t}\)
The flow arriving at station \(i\) through pipeline at time node \(t\), m^{3}/h
 \(Qmd_{\hbox{min} }\)
The minimum delivering flow of contaminated oil, m^{3}/h
 \(Qmh_{\hbox{min} }\)
The minimum flow of blending operation, m^{3}/h
 \(Qfax_{i}\)
The maximum flow of fractionation operation at station \(i\)
 \(Qfin_{i}\)
The minimum flow of fractionation operation at station \(i\)
 \(Voy_{i,c,kd}\)
The volume of oil \(c\) at station \(i\) at first \(kd\) times
 \(Vay_{i,c,kd,j}\)
The total blending capacity of oil \(c\) per unit volume, delivered at station \(i\) at first \(kd\) times, to blend contaminated oil \(j\), m^{3}
 \(\beta in_{j}\)
The minimum value of blending capacity of total oil per unit volume in study system to blend contaminated oil \(j\), m^{3}
 \(\beta ax_{j}\)
The maximum value of blending capacity of total oil per unit volume in study system to blend contaminated oil \(j\), m^{3}
 \(\eta_{{j,j^{{\prime }} }}\)
The blending capacity ratio of oil to blend contaminated oil \(j\) and to blend contaminated oil \(j^{{\prime }}\), m^{3}
 \(Veax_{i,c,kt}\)
The upper limit of exporting oil \(c\) at station \(i\) at first \(kt\) times, m^{3}
 \(Vein_{i,c,kt}\)
The lower limit of exporting oil \(c\) at station \(i\) at first \(kt\) times, m^{3}
 \(\varphi_{c,j}\)
The blending capacity of oil \(c\) fractionated per unit volume to blend contaminated oil \(j\), m^{3}
 \(Vmx_{i,j,gm}\)
The upper limit of contaminated oil \(j\) tank \(gm\) at station \(i\), m^{3}
 \(Vmn_{i,j,gm}\)
The lower limit of contaminated oil \(j\) tank \(gm\) at station \(i\), m^{3}
 \(Vsx_{i,c,go}\)
The upper limit of contaminated oil \(c\) tank \(go\) at station \(i\), m^{3}
 \(Vsn_{i,c,go}\)
The lower limit of contaminated oil \(c\) tank \(go\) at station \(i\), m^{3}
 \(\xi_{j,c}\)
The volume of oil \(c\) fractionated by contaminated oil \(j\) per unit volume, m^{3}
 \(\delta\)
The loss ratio of fractionation
 \(\omega_{i,km,p}\)
The calculated equivalent of contaminated oil batches length at \(p\) linear section during the contaminated oil arriving at station \(i\) at first \(km\) times
 \(Lma_{p}\)
The upper limit of contaminated oil at \(p\) linear section calculated by Austin’s formula, m
 \(Lmi_{p}\)
The lower limit of contaminated oil at \(p\) linear section calculated by Austin’s formula, m
 \(Voma_{b}\)
The upper limit of the volume in section b, m^{3}
 \(Vomi_{b}\)
The lower limit of the volume in section b, m^{3}
 \(Lmg_{i,km}\)
The predicted length of contaminated oil arriving at station \(i\) at first \(km\) times, m
 \(\Delta \tau g_{i,km}\)
The predicted time of contaminated oil crossing over station \(i\) at first \(km\) times, h
 \(\tau dg_{i,j,km}\)
The predicted time of the head of total contaminated oil batch arriving at station \(i\) at first \(km\) times, h
 \(\tau cg_{i,j,km}\)
The predicted time of the end of total contaminated oil batch arriving at station \(i\) at first \(km\) times, h
 \(\tau odb_{i,kd}\)
The starting time of delivering oil at station \(i\) at first \(kd\) times, h
 \(\tau odn_{i,kd}\)
The ending time of delivering oil at station \(i\) at first \(kd\) times, h
 \(\tau oeb_{i,kt}\)
The starting time of exporting oil at station \(i\) at first \(kt\) times, h
 \(\tau oen_{i,kt}\)
The ending time of exporting oil at station \(i\) at first \(kt\) times, h
 \(\tau osb_{i,ks}\)
The starting time of maintenance at station \(i\) at first \(ks\) times, h
 \(\tau osn_{i,ks}\)
The ending time of maintenance at station \(i\) at first \(ks\) times, h
 \(\tau b\)
The starting moment at study horizon, h
 \(\tau n\)
The ending moment at study horizon, h
Binary parameters
 \(ds_{i,c,kd}\)
The binary variables of delivering oil. If oil \(c\) is delivered at station \(i\) at first \(kd\) times, \(ds_{i,kd,c} = 1\), if not, \(ds_{i,kd,c} = 0\)
 \(es_{i,c,kt}\)
The binary variables of exporting oil. If oil \(c\) is exported at station \(i\) at first \(kt\) times, \(es_{i,c,kt} = 1\), if not, \(es_{i,c,kt} = 0\)
 \(mv_{i,j,gm}^{t}\)
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\), \(mv_{i,j,gm}^{t} = 1\), if not \(mv_{i,j,gm}^{t} = 0\)
 \(ov_{i,c,go}^{t}\)
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\), \(ov_{i,c,go}^{t} = 1\), if not, \(ov_{i,c,go}^{t} = 0\)
 \(ik_{j,km}\)
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\),\(ik_{j,km} = 1\), if not, \(ik_{j,km} = 0\)
 \(ikd_{t,kd}\)
The distinguishing binary variables of delivering moments. If time node \(t\) is in the period of delivering oil at first \(kd\) times, \(ikd_{t,kd} = 1\), if not, \(ikd_{t,kd} = 0\)
 \(\theta odb_{i,kd,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, \(\theta odb_{i,kd,t} = 1\), if not, \(\theta odb_{i,kd,t} = 0\)
 \(\theta odn_{i,kd,t}\)
The distinguishing binary variables of the ending moments sorted for delivering oil
 \(\theta oeb_{i,kt,t}\)
The distinguishing binary variables of the starting moments sorted for exporting oil
 \(\theta oen_{i,kt,t}\)
The distinguishing binary variables of the ending moments sorted for exporting oil
 \(\theta osb_{i,ks,t}\)
The distinguishing binary variables of the starting moments sorted for maintenance
 \(\theta osn_{i,ks,t}\)
The distinguishing binary variables of the ending moments sorted for maintenance
 \(\theta md_{i,j,km,t}\)
The distinguishing binary variables of the starting moments sorted for delivering contaminated oil
 \(\theta mc_{i,j,km,t}\)
The distinguishing binary variables of the ending moments sorted for delivering contaminated oil
 \(\theta sb_{t}\)
The distinguishing binary variables of the starting moments at study horizon
 \(\theta sn_{t}\)
The distinguishing binary variables of the ending moments at study horizon
Positive continuous variables
 \(Vmd_{i,j,gm}^{t}\)
The volume of contaminated oil \(j\) stocked to tank \(gm\) at station \(i\) from \(t\) to \(t + 1\), m^{3}
 \(Vod_{i,c,go}^{t}\)
The volume of contaminated oil \(c\) stocked to tank \(go\) at station \(i\) from \(t\) to \(t + 1\), m^{3}
 \(Vmh_{i,j,gm,c,go}^{t}\)
The volume of contaminated oil \(j\) from tank \(gm\) at station \(i\) blended to tank \(go\) with exporting oil from \(t\) to \(t + 1\), m^{3}
 \(Vat_{i,c,go,j}^{t}\)
The blending capacity of the exporting oil \(c\) from oil tank \(go\) at station \(i\) to blend contaminated oil \(j\) from \(t\) to \(t + 1\), m^{3}
 \(Vmf_{i,j,gm}^{t}\)
The fractionation volume of contaminated oil \(j\) tank \(gm\) at station \(i\) from \(t\) to \(t + 1\), m^{3}
 \(Vof_{i,c,go}^{t}\)
The blending volume of oil \(c\) fractionated by contaminated oil to oil tank \(go\) at station \(i\) from \(t\) to \(t + 1\), m^{3}
 \(Vmo_{{i,j,gm^{{\prime }} ,gm}}^{t}\)
The volume of contaminated oil \(j\) switched from contaminated oil tank \(gm\) to \(gm^{{\prime }}\) from \(t\) to \(t + 1\), m^{3}
 \(Voo_{{i,c,go,go^{{\prime }} }}^{t}\)
The volume of oil \(c\) from oil tank \(go\) to \(go^{{\prime }}\) from \(t\) to \(t + 1\), m^{3}
 \(Vao_{{i,c,go,go^{{\prime }} ,j}}^{t}\)
The blending capacity of oil \(c\) switched from oil tank \(go\) to \(go^{{\prime }}\) mixing with contaminated oil \(j\) at station \(i\) from \(t\) to \(t + 1\), m^{3}
 \(Vm_{i,j,gm}^{t}\)
The stock volume of contaminated oil \(j\) tank \(gm\) at station \(i\) at time node \(t\), m^{3}
 \(Vo_{i,c,go}^{t}\)
The inventory of oil c tank go at station i at time node t, m^{3}
 \(Vam_{i,c,go,j}^{t}\)
The blending capacity of oil c in tank \(go\) to blend contaminated oil \(j\) at time node t, m^{3}
 \(Lmc_{i,km}\)
The actual length of contaminated oil out of station i at first \(km\) times, m
 \(Lmd_{i,km}\)
The actual length of contaminated oil arriving at station i at first \(km\) times, m
 \(\tau md_{i,j,km}\)
The actual time of the head of contaminated oil \(j\) arriving at station i at first \(km\) times, h
 \(\tau mc_{i,j,km}\)
The actual time of the end of contaminated oil \(j\) arriving at station i at first \(km\) times, h
 \(\tau_{t}\)
The time of number t, h
Binary variables
 \(Cmh_{i,j,gm,c,go}^{t}\)
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\), \(Cmh_{i,j,gm,c,go}^{t} = 1\), if not, \(Cmh_{i,j,gm,c,go}^{t} = 0\)
 \(Cmf_{i,j,gm}^{t}\)
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\), \(Cmf_{i,j,gm}^{t} = 1\), if not, \(Cmf_{i,j,gm}^{t} = 0\)
 \(Cmd_{i,j,gm}^{t}\)
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\), \(Cmi_{i,j,gm}^{t} = 1\), if not, \(Cmi_{i,j,gm}^{t} = 0\)
 \(Cmo_{{i,j,gm,gm^{{\prime }} }}^{t}\)
The binary variables of contaminated oil tank’s switching operation. If contaminated oil \(j\) is switched to contaminated oil tank \(gm^{{\prime }}\) from tank \(gm\) at station \(i\) at time node \(t\), \(Cmo_{{i,j,gm,gm^{{\prime }} }}^{t} = 1\), if not, \(Cmo_{{i,j,gm,gm^{{\prime }} }}^{t} = 0\)
 \(Cod_{i,c,go}^{t}\)
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\), \(Cod_{i,c,go}^{t} = 1\), if not, \(Cod_{i,c,go}^{t} = 0\)
 \(Cop_{i,c,go}^{t}\)
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\), \(Cop_{i,c,go}^{t} = 1\), if not, \(Cop_{i,c,go}^{t} = 0\)
 \(Cof_{i,c,go}^{t}\)
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\), \(Cof_{i,c,go}^{t} = 1\), if not, \(Cof_{i,c,go}^{t} = 0\)
 \(Coo_{{i,c,go,go^{{\prime }} }}^{t}\)
The binary variables of oil tank’s switching operation. If oil \(c\) is switched to oil tank \(go^{{\prime }}\) from tank \(go\) at station \(i\) at time node \(t\), \(Coo_{{i,c,go,go^{{\prime }} }}^{t} = 1\) if not, \(Coo_{{i,c,go,go^{{\prime }} }}^{t} = 0\)
 \(Smd_{i,j,gm}^{t}\)
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\), \(Smd_{i,j,gm}^{t} = 1\), if not, \(Smd_{i,j,gm}^{t} = 0\)
 \(Sod_{i,c,go}^{t}\)
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\), \(Sod_{i,c,go}^{t} = 1\), if not, \(Sod_{i,c,go}^{t} = 0\)
 \(Sop_{i,c,go}^{t}\)
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\), \(Sop_{i,c,go}^{t} = 1\), if not, \(Sop_{i,c,go}^{t} = 0\)
 \(Smh_{i,j,gm,c,go}^{t}\)
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\), \(Smh_{i,j,gm,c,go}^{t} = 1\), if not, \(Smh_{i,j,gm,c,go}^{t} = 0\)
 \(Smf_{i,j,gm}^{t}\)
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\), \(Smf_{i,j,gm}^{t} = 1\), if not, \(Smf_{i,j,gm}^{t} = 0\)
 \(Sof_{i,c,go}^{t}\)
The state binary variables of contaminated oil tank’s recycle. If oil \(c\) after fractionation is being recycled into tank \(go\) at station \(i\), \(Sof_{i,c,go}^{t} = 1\), if not, \(Sof_{i,c,go}^{t} = 0\)
 \(Smo_{{i,j,gm,gm^{{\prime }} }}^{t}\)
The state binary variables of contaminated oil switchtank. If contaminated oil \(j\) is switched from contaminated oil tank \(gm\) to \(gm^{{\prime }}\) at station \(i\), \(Smo_{{i,j,gm,gm^{{\prime }} }}^{t} = 1\), if not, \(Smo_{{i,j,gm,gm^{{\prime }} }}^{t} = 0\)
 \(Soo_{{i,c,go,go^{{\prime }} }}^{t}\)
The state binary variables of contaminated oil switchtank. If oil \(c\) is switched from contaminated oil tank \(go\) to \(go^{{\prime }}\) at station \(i\), \(Soo_{{i,c,go,go^{{\prime }} }}^{t} = 1\), if not, \(Soo_{{i,c,go,go^{{\prime }} }}^{t} = 0\)
 \(Cm_{i,km,p}\)
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\), \(Cm_{i,km,p} = 1\), if not, \(Cm_{i,km,p} = 0\)
 \(Cb_{i,c,go,t,b}\)
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, \(Cb_{i,c,go,t,b} = 1\), if not, \(Cb_{i,c,go,t,b} = 0\)
 \(Cbo_{{i,c,go,go^{{\prime }} ,b}}\)
The distinguishing binary variables of the volume of switching tank operation. Just like the definition of \(Cb_{i,c,go,t,b}\)
 \(Cbt_{i,c,go,t,b}\)
The distinguishing binary variables of the volume of export operation. Just like the definition of \(Cb_{i,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 × 10^{6} 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 upstream sources and downstream 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 turnround volume and complex operations. On the other hand, the delivery of contaminated oil to the downstream 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; Herrán et al. 2011; Relvas et al. 2009), multiple sources (MirHassani et al. 2013), treestructure pipeline (Cafaro and Cerda 2011; Castro 2010; MirHassani and Jahromi 2011) and meshstructure pipeline (Cafaro and Cerda 2012). The time representation usually includes discretetime (Zhang et al. 2015) and continuoustime (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 GhaffariHadigheh and Mostafaei (2015) solved the scheduling issue with continuoustime 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 continuoustime 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 multiperiod 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 inline 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 multiperiod model with two Lagrangian decomposition strategies to represent a petroleum refinery under uncertainty. Shi et al. (2014) presented a MILP discretetime refinery scheduling model, establishing several controllable and realizable operation modes for production units by unitwide predictive control. And a twostage 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 contaminatedoil 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 casestudy, 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
2.1.2 Blending capacity
Compared with the fractionation operation, blending is more effective since it is simpler and more costeffective. 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.
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 \(\lambda g_{j}\) is a constant, the variables of \(e\) are only \(Ts_{1}\) and \(Ts_{2}\).
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).
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.
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.

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.
 (1)
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.
 (2)
The oil physical properties do not change with temperature.
 (3)
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.
 (4)
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
To solve the issue above, in this paper we bring up a fixedcontinuous 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 fixedcontinuous 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
3.3 Delivery constraints
3.4 Export constraints
3.5 Blending constraints
3.6 Fractionation constraints
3.7 Maintenance and switchtank constraints
3.8 Oil tank and contaminated oil tank constraints
3.9 Contaminated oil batch constraints
Arriving and leaving time of mixed oil at one station can be modified by the calculated length of contaminated oil.
3.10 Time node constraints
4 Results and discussion
4.1 Example 1
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.
Basic parameters of oil tanks
Oil tank  Upper limit, m^{3}  Lower limit, m^{3}  Initial tank inventory, m^{3} 

0#D(1#)  10,000  800  5903 
0#D(2#)  10,000  800  7002 
93#G(1#)  10,000  800  6007 
93#G(2#)  10,000  800  1136 
97#G(1#)  10000  400  1502 
DMO(1#)  100  10  45 
DMO(2#)  100  10  83 
GMO(1#)  100  10  46 
GMO(2#)  100  10  60 
The physical properties of oil
Oil type  Flash point, °C  Dry point, °C 

0#D  65  – 
93#G  –  199 
97#G  –  197 
Scheduling scheme of delivery
Oil type  Start time, h  End time, h  Volume, m^{3} 

0#D  0  10.36  2928 
93#G  37.60  45.81  4777 
97#G  58.83  93.59  8026 
93#G  93.59  115.11  6757 
0#D  115.11  148.49  5104 
0#D  166.67  243  11,780 
Scheduling scheme of export
Oil type  Start time, h  End time, h  Volume, m^{3} 

0#D  23.49  32.46  5898 
100  107.14  5866  
148.04  155  5958  
93#G  10  20.50  5241 
180  195.04  5413  
97#G  125.23  135  5954 
Results of example 1
Cont. var.  Disc. var.  Par.  # of eq. con.  # ofineq. con.  CPU time, s  Total costs 

4651  6000  2128  8625  2140  917  1960 
Bl. op.  De. MO op.  De. O op.  Exp. op.  Exc. op.  Bl. vo., m^{3}  Fr. vo., m^{3} 

4  4  8  6  0  240  0 
4.2 Example 2
In this section, a realworld 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.
Basic parameters of oil depots
Oil depot  Oil tank  Upper limit, m^{3}  Lower limit, m^{3}  Initial tank inventory, m^{3} 

1#OD  0#D(1#)  20,000  800  903 
0#D(2#)  20,000  800  1002  
93#G(1#)  10,000  400  621  
93#G(2#)  10,000  400  750  
97#G(1#)  10,000  400  502  
DMO(1#)  500  10  492  
GMO(1#)  500  10  389  
2#OD  0#D(1#)  5000  200  473 
0#D(2#)  5000  200  531  
93#G(1#)  5000  200  1391  
93#G(2#)  5000  200  208  
97#G(1#)  5000  200  332  
DMO(1#)  500  10  450  
GMO(1#)  500  10  473  
3#OD  0#D(1#)  40,000  800  1324 
0#D(2#)  40,000  800  1350  
93#G(1#)  30,000  800  1024  
93#G(2#)  30,000  800  989  
97#G(1#)  5000  200  751  
97#G(2#)  5000  200  251  
DMO(1#)  500  10  447  
DMO(2#)  500  10  403  
GMO(1#)  500  10  441  
GMO(2#)  500  10  490 
The physical properties of batches
Batch  Oil type  Flash point, °C  Dry point, °C 

B1  0#D  65  – 
B2  93#G  –  199 
B3  97#G  –  197 
B4  93#G  –  198 
B5  0#D  64  – 
Results of example 2
Cont. var.  Disc. var.  Par.  # of eq. con.  # ofineq. con.  CPU time, s  Total costs 

11,533  14,140  5349  21,046  5819  2529  4388 
Bl. op.  De. MO op.  De. O op.  Exp. op.  Exc. op.  Bl. vo., m^{3}  Fr. vo., m^{3} 

8  7  19  10  4  412  0 
During 92.4–116.6 h, 1#OD is required to delivery 93# gasoline oil of 11,234 m^{3}. Due to the upper limit of 10,000 m^{3}, 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 m^{3}. 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.
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 are 5000 m^{3}. 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.
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 differences of oil physical properties, the growth of contaminatedoil 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, 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.

Minimize the volume fluctuation when oil tanks receive and export oil.

Switching operation should better happen in the daytime.

Avoid start or stop pumps during the peak period of electricity consumption as much as possible.
In this way, there will be further development to improve the model if the listed factors above are taken into account.
Notes
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.
References
 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.CrossRefGoogle Scholar
 Barzin R, Chen JJJ, Young BR, et al. Peak load shifting with energy storage and pricebased control system. Energy. 2015;92:505–14. doi: 10.1016/j.energy.2015.05.144.CrossRefGoogle Scholar
 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.CrossRefGoogle Scholar
 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.compchemeng.2010.03.005.CrossRefGoogle Scholar
 Cafaro DC, Cerda J. A rigorous mathematical formulation for the scheduling of treestructure pipeline networks. Ind Eng Chem Res. 2011;50(9):5064–85. doi: 10.1021/Ie101462k.CrossRefGoogle Scholar
 Cafaro DC, Cerda J. Rigorous scheduling of meshstructure refined petroleum pipeline networks. Comput Chem Eng. 2012;38:185–203. doi: 10.1016/j.compchemeng.2011.11.007.CrossRefGoogle Scholar
 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.CrossRefGoogle Scholar
 Cafaro VG, Cafaro DC, Mendez CA, et al. Optimization model for the detailed scheduling of multisource pipelines. Comput Ind Eng. 2015b;88:395–409. doi: 10.1016/j.cie.2015.07.022.CrossRefGoogle Scholar
 Castro PM. Optimal scheduling of pipeline systems with a resourcetask network continuoustime formulation. Ind Eng Chem Res. 2010;49(22):11491–505. doi: 10.1021/ie1010993.CrossRefGoogle Scholar
 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.Google Scholar
 GhaffariHadigheh A, Mostafaei H. On the scheduling of real world multiproduct pipelines with simultaneous delivery. Optim Eng. 2015;3:1–34.Google Scholar
 Herrá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.Google Scholar
 Herran A, de la Cruz JM, de Andres B. Global Search Metaheuristics for planning transportation of multiple petroleum products in a multipipeline system. Comput Chem Eng. 2012;37:248–61. doi: 10.1016/j.compchemeng.2011.10.003.CrossRefGoogle Scholar
 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.CrossRefGoogle Scholar
 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).Google Scholar
 Li WQ, Dai YP, Ma LW, et al. Oilsaving pathways until 2030 for road freight transportation in China based on a costoptimization model. Energy. 2015;86:369–84. doi: 10.1016/j.energy.2015.04.033.CrossRefGoogle Scholar
 Liang YT, Li M, Li JF. Hydraulic model optimization of a multiproduct pipeline. Pet Sci. 2012a;9(4):521–6. doi: 10.1007/s1218201202372.CrossRefGoogle Scholar
 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.CrossRefGoogle Scholar
 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.CrossRefGoogle Scholar
 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.CrossRefGoogle Scholar
 MirHassani SA, Jahromi HF. Scheduling multiproduct treestructure pipelines. Comput Chem Eng. 2011;35(1):165–76. doi: 10.1016/j.compchemeng.2010.03.018.CrossRefGoogle Scholar
 Mitra S, Sun LG, Grossmann IE. Optimal scheduling of industrial combined heat and power plants under timesensitive electricity prices. Energy. 2013;54:194–211. doi: 10.1016/j.energy.2013.02.030.CrossRefGoogle Scholar
 Mostafaei H, Hadigheh AG. A general modeling framework for the longterm scheduling of multiproduct pipelines with delivery constraints. Ind Eng Chem Res. 2014;53(17):7029–42. doi: 10.1021/ie4038032.CrossRefGoogle Scholar
 Neiro SM, Pinto JM. Langrangean decomposition applied to multiperiod planning of petroleum refineries under uncertainty. Latin Am Appl Res Pesquisa aplicada latino americana = Investigación aplicada latinoamericana. 2006;36(4):213–20.Google Scholar
 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.CrossRefGoogle Scholar
 Pan H, Wang L. Blending scheduling under uncertainty based on particle swarm optimization with hypothesis test. Lect Notes Comput Sci. 2006;4115:109–20.CrossRefGoogle Scholar
 Rejowski R, Pinto JM. Scheduling of a multiproduct pipeline system. Comput Chem Eng. 2003;27(8–9):1229–46. doi: 10.1016/S00981354(03)000498.CrossRefGoogle Scholar
 Rejowski R, Pinto JM. Efficient MILP formulations and valid cuts for multiproduct pipeline scheduling. Comput Chem Eng. 2004;28(8):1511–28.CrossRefGoogle Scholar
 Relvas S, BarbosaPovoa 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.CrossRefGoogle Scholar
 Relvas S, Magatao SNB, BarbosaPovoa 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.CrossRefGoogle Scholar
 Relvas S, Matos HA, BarbosaPovoa 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.CrossRefGoogle Scholar
 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.CrossRefGoogle Scholar
 Shi L, Jiang YH, Wang L, et al. A novel twostage 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.CrossRefGoogle Scholar
 Zhang H, Liang Y, Wang N, et al. Optimal scheduling of multisource singledistribution pipeline with multibatch sequential transportation. Acta Pet Sin. 2015;36(9):1148–55 (in Chinese).Google Scholar
 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.CrossRefGoogle Scholar
 Zhang HR, Liang YT, Xiao Q, et al. Supplybased optimal scheduling of oil product pipelines. Pet Sci. 2016;13(2):355–67. doi: 10.1007/s121820160081x.CrossRefGoogle Scholar
Copyright information
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.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.