You are on page 1of 16

Journal of Petroleum Science and Engineering 159 (2017) 148–163

Contents lists available at ScienceDirect

Journal of Petroleum Science and Engineering


journal homepage: www.elsevier.com/locate/petrol

Optimizing detailed schedules of a multiproduct pipeline by a monolithic


MILP formulation
Haihong Chen a, Lili Zuo a, Changchun Wu a, *, Li Wang a, Feng Diao a, Jie Chen a, b, Yanfei Huang a
a
National Engineering Laboratory for Pipeline Safety, Beijing Key Laboratory of Urban Oil and Gas Distribution Technology, China University of Petroleum, Beijing, China
b
PetroChina Oil & Gas Control Center, Beijing, China

A R T I C L E I N F O A B S T R A C T

Keywords: A multiproduct pipeline is an economical way for transporting several products from a single source to multiple
Multiproduct pipeline delivery stations over a long distance. This paper addresses how to optimize detailed schedules of a multiproduct
Batch schedules pipeline. A discrete-time mixed integer linear programming model is developed, which adopts a novel objective
Optimization function to seek the minimum summation of pumping rate variations in every pipeline segment along a pipeline
Mixed integer linear programming (MILP) during a scheduling horizon. The feasibility of the new objective function is demonstrated in theory. A conclusion
is drawn that the more stable pumping rate of a pipeline segment is, the lower frictional loss for pumping products
is. Besides operational constraints, two sets of special constraints are introduced into the model for improving the
operability and practicability of detailed schedules. One is the stopping and running duration limitations of in-
jection operations and another one is the flow rate stability requirements of injection and delivery operations. The
proposed MILP model is successfully tested on two real world multiproduct pipelines using CPLEX as solver.

1. Introduction passing by the station and the rest enters into the downstream
adjacent pipeline segment.
1.1. Background
The main goal for the problem on optimizing detailed schedules of a
A multiproduct pipeline can transport several products in sequence multiproduct pipeline is to determine an injection schedule and a dis-
and usually contains multiple entries and exits. At every entry/exit along tribution schedule. The injection schedule consists of sequence of prod-
a pipeline, there is a station with tanks used to discharge products with ucts to be pumped into the pipeline, their injection volumes, times and
the pipeline. Delivery/injection operations performed by any station flow rates. The distribution schedule consists of volumes, times and flow
along a pipeline are limited by shippers and markets. It's usually a rates of every delivery station receiving products from in-transit batches
challenging work to make detailed schedules of a multiproduct pipeline. at every batch injection. Fig. 2 depicts detailed schedules for a hypothesis
To meet consumer demands for products at every station along a pipeline multiproduct pipeline transporting three products P1-P2-P3 from a
and for safe and smooth operation of a pipeline, dispatchers must control unique source S0 to three delivery stations D1-D2-D3. At 0 h, the pipeline
delivery/injection volumes in every period. In a multiproduct pipeline stores four batches B1P2,30000, B2P3,20000, B3P2,20000 and B4P1,10000,
system, delivery operations can be divided into two types, as depicted where subscripts indicate product type and volume in m3 of batches.
in Fig. 1. During 0–10 h, input station S0 injects 10000 m3 of product P1 into the
pipeline at 1000 m3/h and delivery station D3 receives 10000 m3 of
(a) Full-stream delivery: A delivery station receives product from an product P2 from batch B1. Thus, at 10 h, the volume of batch B4 rises to
in-transit batch by the flow rate of the batch passing by the station, 20000 m3 and that of batch B1 reduces to 20000 m3. During 10–30 h,
which makes the downstream adjacent pipeline segment input station S0 injects 20000 m3 of batch B5P2 into the pipeline at
shutdown. 1000 m3/h. Meanwhile, station D1 receives 5000 m3 of product P2 from
(b) Side-stream delivery: A part of a batch is downloaded by a de- batch B3 at 250 m3/h, station D2 receives 5000 mm3 of product P3 from
livery station at a receiving rate less than the flow rate of the batch batch B2 at 250 m3/h and station D3 downloads 10000 m3 of product P2
from batch B1 at 500 m3/h. During 30–40 h, the whole pipeline is idle.

* Corresponding author.
E-mail address: wucc@cup.edu.cn (C. Wu).

https://doi.org/10.1016/j.petrol.2017.09.036
Received 14 June 2017; Received in revised form 12 September 2017; Accepted 17 September 2017
Available online 21 September 2017
0920-4105/© 2017 Elsevier B.V. All rights reserved.
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Garcia-Sanchez et al. (2008). devised a tabu search and a simulation


model for scheduling of a multiproduct pipeline. The simulation model
allows an accurate and suitable assessment of every particular schedule,
whereas the tabu search guides the searching process and eventually
succeeds in obtaining satisfactory schedules in terms of a set of relevant
criteria. Herran et al. (2012). used four meta-heuristic methods that are
multi-start search, variable neighborhood search, taboo search and
simulated annealing to solve the MILP formulation proposed by Herran
Fig. 1. Different type of delivery operations. et al. (2010). Chen et al. (2016, 2017). used simulated annealing algo-
rithm to optimize detailed schedules of a single-source and multi-depot
During 40–60 h, 10000 m3 of batch B6P3 is injected into the pipeline at multiproduct pipeline. Zhang et al. (2016, 2017). applied ant colony
500 m3/h and 10000 m3 of product P1 from batch B4 is delivered to optimization algorithm and simplex method to generate detailed batch
station D1 at 500 m3/h. During 10–30 h, stations D1 and D2 perform schedules for a supply-based multiproduct pipeline.
side-stream delivery operations which make pipeline segments D1-D2
and D2-D3 active. In pumping run 40–60 h, station D1 implements a (3) Mathematical models
full-stream delivery operation which makes pipelines segments D1-D2
and D2-D3 idle. As seen in Fig. 2, the pipeline transports three prod- Rejowski et al (Rejowski and Pinto, 2003). developed a pair of MILP
ucts by a back-to-back way. Moreover, at every batch injection, every discrete-time optimization models for scheduling of a single multi-
delivery station can download a product which is different from the product pipeline with a single source and multiple terminals. The first
product injected into the pipeline at the input station. one segregates pipeline segments into single-product packs of equal size,
whereas the second one divides them into packs of unequal size. The
1.2. Related works approach can satisfy many operation constraints, such as mass balances,
distribution constraints, product demands, sequencing constraints and
A major challenge in the problem on optimizing detailed schedules of loading/unloading operations of tanks and of a pipeline. Rejowski et al
a multiproduct pipeline is how to track batches in the pipeline that is (Rejowski and Pinto, 2004). proposed a set of special constraints to
subjected to intermittent operations. For solving this problem, many minimize contaminated product inside a pipeline and a set of integer cuts
heuristic, meta-heuristic and mathematical models have been published. to improve the efficiency of the second MILP formulation. Rejowski et al
(Rejowski and Pinto, 2008). established a continuous-time mixed-integer
(1) Heuristic models non-linear programming (MINLP) model, which considers pumping costs
depended on the booster stations yield rates. Different from the works
Sasikumar et al. (1997). proposed a heuristic search model that published by Rejowski et al. (Rejowski and Pinto, 2003, 2004, 2008),
consists of state space search method and beam search method to Cafaro et al (Cafaro and Cerda, 2004). proposed a novel continuous-time
generate good injecting schedules for a single source and multiple des- MILP model without division of pipeline segments into packs for the
tinations pipeline. Relvas et al. (2009). presented a problem-oriented same system, which particularly considers higher pumping costs at daily
heuristic approach to provide a set of information on the most desir- peak periods. However, the proposed MILP model can just provide
able sequences of products to be pumped into a pipeline. In turn, (Mir- aggregate schedules, including sequence of products to be pumped into
Hassani and BeheshtiAsl, 2013). proposed a heuristic method to achieve the pipeline, their injection volumes, times and flow rates, and the set of
a near-optimal solution in a reasonable time for scheduling a real life aggregate product deliveries to depots at every batch injection. Each
system that is composed of an oil refinery, a pipeline connected to a aggregate delivery consists of the given batch, the amount to be trans-
storage tank farm. ferred, and the receiving terminal. Cafaro et al. (2011). presented a
continuous-time planning approach and three different heuristic rules to
(2) Meta-heuristic models generate detailed schedules based on the information provided by
aggregate schedules. The disadvantage of this work is that all

Fig. 2. Detailed schedules for a hypothesis multiproduct pipeline.

149
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

intermediate delivery stations are forbidden to simultaneously receive (2) Stopping and running duration limitations of injection operations
products from in-transit batches. Then, Cafaro et al. (2012, 2015a). are introduced into the proposed MILP formulation, which can
proposed continuous-time formulations that generate improved detailed avoid frequent flow restarts of a pipeline.
schedules, by allowing intermediate stations to implement side-stream (3) Flow rate stabilities of injection and side-stream delivery opera-
delivery operations. In general, Cafaro et al (Cafaro and Cerda, 2004; tions are considered in the proposed MILP formulation, which can
Cafaro et al., 2011, 2012, 2015a). use a two-stage approach to generate improve the practicability of detailed schedules.
detailed schedules. Later, Cafaro et al (Cafaro et al., 2015b; Cafaro and (4) Time schedules for examining and repairing the pipeline can be
Cerda, 2009, 2010a, 2012, 2010b). extended the two-stage approach to satisfied in the MILP formulation. This limitation means that all
multi-source and multi-depot pipelines, tree-structure pipeline networks pipeline segments must be shutdown over some appointed time
and mesh-structure pipeline networks, respectively. Similar to works by periods.
Cafaro et al., Relvas et al. (2006, 2007, 2013). introduced inventory (5) The input station can continue to inject a product to the old batch
management into the optimization of scheduling for a single-source and that is closest to the origin of the pipeline during the new sched-
single-depot pipeline system. MirHassani et al (MirHassani and Jahromi, uling horizon, which is never considered by previous works.
2011; MirHassani et al., 2011, 2013). developed MILP models for a
single-source and multi-depot pipeline system, a single pipeline system
with dual purpose depots, and a tree-structure pipeline network system, 1.4. Paper organization
respectively. In contrast to the two-stage approach, Mostafaei et al
(Mostafaei and Ghaffari Hadigheh, 2014; Mostafaei et al., 2015a; Mos- Section 2 describes the scheduling issue and gives the problem's as-
tafaei et al., 2015b, 2015c; Ghaffari-Hadigheh and Mostafaei, 2015; sumptions and known conditions. Section 3 develops a discrete-time
Mostafaei et al., 2016; Zaghian and Mostafaei, 2016; Mostafaei and MILP formulation for optimizing detailed schedules of a single source
Castro, 2017). proposed monolithic continuous-time models for opti- and multi-depots multiproduct pipeline, including the objective function
mizing detailed schedules of single source and multi-depot pipelines, and constraints. Section 4 briefly presents the available solving technique
multi-source and multi-depot pipelines and treelike pipeline networks, for the proposed MILP model. Section 5 tests the proposed MILP model
respectively. on two real world multiproduct pipelines. Conclusions are provided in
In most previous works, the total cost for pumping products from the Section 6.
source to delivery stations along a pipeline is usually taken as the
objective function. According to historical statistics about the cost for 2. Problem description
pumping products, unit pumping cost which is used to roughly calculate
total pumping cost is usually provided in advance. And CDj;p can be given 2.1. Assumptions
according to historical statistics on pumping costs for overcoming fric-
tional and elevation losses. Considering pumping cost is mainly gener- (1) A multiproduct pipeline system is composed of an input station,
ated from operating pumps which power products to overcome frictional several intermediate delivery station and a terminal station, as
and elevation losses, Cafaro et al. (2015a). introduced an objective depicted in Fig. 3. The input station located at the origin of a
function which directly uses frictional and elevation losses to calculate pipeline can receive products from the refinery and inject prod-
total pumping cost instead of using unit pumping cost. However, the ucts into the pipeline. Intermediate and terminal delivery stations
equations for calculating frictional loss make the objective function can receive products from a pipeline.
non-linear and non-convex. As a result, the model by Cafaro et al. (2) When two batches of different products are adjacently trans-
(2015a). is not suitable to be directly solved using commercial optimi- ported, contamination will inevitably occur. In this paper, the
zation solvers due to considerable computational burdens. Thus, for volume of unpurified product section (see Fig. 4) belonging to the
reducing computational burdens, Cafaro et al. decomposed the proposed head or the tail of any batch is assumed to be a constant value
MINLP model into an MILP model and a NLP (non-linear programming) (2000 m3). Contaminated product is forbidden to be delivered to
model. Different from Cafaro et al. (2015a), this paper introduces a novel any intermediate station.
objective function about the stability of pumping rate in pipeline seg- (3) Whenever an input station is injecting a product to a pipeline,
ments, which is derived from the equations for calculating frictional loss. several delivery stations can simultaneously receive products from
The new objective function not only ensures the optimization model the pipeline.
linear, but also makes optimal schedules more practical. (4) Input station has multiple tanks for storing products.
(5) Sometimes, a pipeline under running state has to be interrupted
over a specific period due to examining and repairing of the
1.3. Contributions of this work pipeline. Generally, time schedules for examining and repairing a
pipeline are given before drafting detailed schedules.
The objective of this work is to develop a more practical mathematical (6) During a new scheduling horizon, the input station can continue
formulation to optimize detailed schedules of a single-source and multi- to inject product into the old batch which is closest to the origin of
depot multiproduct pipeline without division of pipeline segments into a pipeline at the starting moment of the scheduling horizon. For
packs and any decomposition strategy. The contributions of this example, in Fig. 2, input station S0 continues to inject product P1
work are: into old batch B4 during 0–10 h.
(7) Batches in a single source and multi-depots pipeline are only
(1) In previous works, the total cost for pumping products by a pushed to move forward at batch injections performed at the input
pipeline is usually taken as the objective function. Instead, a novel station. When products are out of storage in the input station, the
objective function is proposed to seek the minimum summation of input station has to intermit injecting operations. Since no product
pumping rate variations in every pipeline segment along a pipe- is injected into the pipeline for pushing batches to move forward,
line during a scheduling horizon. Moreover, the feasibility that the the whole pipeline will be idle. Considering the economy of
novel objective function replaces the traditional objective func- operating a pipeline that the cost for a flow restart of a multi-
tion about total pumping cost is demonstrated in theory. A product pipeline is too high, the stopping duration and the
conclusion is drawn that the more stable pumping rate of a running duration for input station injecting products into a pipe-
pipeline segment is, the lower frictional loss for pumping line should be long enough to avoid frequent flow restarts of the
products is. whole pipeline.

150
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Fig. 3. Schematic diagram of a multiproduct pipeline.

Fig. 4. Schematic diagram for contaminated product of a batch.

(8) When the flow rate by which any station receives a product from According to the aforementioned conditions, (a) sequence of products
an in-transit batch or injects a product to a batch varies, pipeline to be pumped into the pipeline, their injection volumes, times and flow
operators have to adjust opening of valves. The more frequently rates at the input station and (b) volumes, times and flow rates of every
the delivery/injection rates of stations change, the heavier the delivery station receiving products from in-transit batches at every batch
workloads of pipeline operators are. In reality, a good batch injection need to be optimized.
schedule should keep the flow rates of the input station injecting
product to a batch or an intermediate delivery station receiving 3. Mathematical model
product from an in-transit batch in two consecutive periods at the
same value as possible. 3.1. Objective function

2.2. Known conditions In previous works, the minimum total cost (G) for pumping products
from the source to depots along a pipeline is usually taken as the
(1) Volumetric coordinate of every station from the input station objective function, as seen in Eq. (1). Weight factor CDj;p is the estimated
along a pipeline. Volumetric coordinate of a station is equal to the pumping cost for transporting 1 m3 of product p from the origin of a
summation volumetric capacity of its upstream pipeline segments. pipeline to delivery station j. The pumping cost is mainly generated from
(2) Upper and lower flow rates that the input station injects products operating pumps which power products in a horizontal pipeline to
into the pipeline or delivery stations receive products from the overcome frictional loss.
pipeline.
X
J max X
Imax X X
Pmax kmax1
(3) Upper and lower pumping rates of every pipeline segment along Min G ¼ CDj;p ⋅VPj;i;p;k (1)
the pipeline. j¼2 i¼1 p¼1 k¼1
(4) Maximum and minimum allowed inventory levels at station tanks.
(5) Minimum stopping and running durations of injection operations. However, the optimal detailed schedules using Eq. (1) as the objective
(6) Maximum and minimum batch sizes of every product. function cannot accurately calculate the total cost for overcoming fric-
(7) Length of the scheduling horizon. tional losses. Thus, this paper introduces an objective function to mini-
(8) Overall demand volumes of delivery stations receiving products mize the actual frictional loss for a horizontal pipeline. The frictional loss
from pipeline. (hf ) for pumping a product can be calculated by Liebenson's equation Eq.
(9) Production rates of products at the refinery during the scheduling (2). Then, the total energy consumption P (in J) due to frictional loss can
horizon. be calculated by Eq. (3).
(10) Line-fill of the pipeline at the starting moment of the scheduling
Q2m ⋅νm
horizon, including the sequence and volume of batches. For hf ¼ β ⋅L (2)
D5m
example, in Fig. 2, at 0 h, the line-fill of the pipeline consists of
four batches (B1-P2-30000 m3, B2-P3-20000 m3, B3-P2- where L is length of a pipeline segment, in m. D is inner diameter of a
20000 m3, B4-P1-10000 m3) where (--) represents pipeline segment, in mm. Q is pumping rate, in m3/s. ν is kinematic
(batch-product-volume). viscosity of the pumped product, in m2/s. β and m are constant factors
(11) Inventory of products stored in input station at the starting which are related to flow regime (0  m  1).
moment of the scheduling horizon.
(12) Time schedules for examining and repairing the pipeline. ρgβνm L 3m
P ¼ ρgQhf T ¼ Q T ¼ αQ3m T (3)
(13) Time duration that the input station has been continuously D5m
injecting products into the pipeline at the starting moment of the
scheduling horizon. where ρ is product density, in kg/m3. g is acceleration of gravitation that
(14) Time duration that the input station has intermitted injecting is 9.8 m/s2. T is pumping duration, in second. α is a constant fac-
tor, α ¼ ρgβν
m
L
products into the pipeline at the starting moment of the sched- D5m .
uling horizon. However, using frictional loss to calculate pumping cost will make the
(15) New batch number of every product that will be pumped into the model non-linear (Cafaro et al., 2015a). Instead, this work adopts
pipeline. pumping rate stability of pipeline segments as the objective function.
Next, this paper will explain how the stable flow can help achieve the
According to the above conditions, the optimal batch schedules of the goal about minimizing frictional pressure loss.
input and delivery stations along the pipeline need to be made. A specific pipeline segment is designated to continuously pump a

151
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

certain amount (M in m3) of a product during a time period (t in second). (3) Variable QDj;k indicates pumping rate of pipeline segment j in time
The pipeline segment can pump the product at a fixed pumping rate interval ðtk ; tkþ1 Þ. Variable QAj indicates average pumping rate of
(M ¼ M=t, in m3/h) or at several values of pumping rate pipeline segment j during the scheduling horizon.
(M1 ; M2 ; ⋯; Mn ). For the latter pumping way, every pumping rate (4) sk : It's important to note that the periods for examining and
(Mr 2 fM1 ; M2 ; ⋯; Mn g) lasts for tr seconds. As a result, the relationship repairing the pipeline are removed in the objective function,
between M, M1 , M2 ⋯, Mn , M, t1 , t2 ⋯, tn and t can be determined by: because all the pipeline segments along the pipeline must be
8 shutdown during these periods.
> P
n
(5) Weight factor cpj is used to avoid pumping rate fluctuations being
>
< M ¼ M⋅t ¼ Mr ⋅tr
r¼1
(4) concentrated in some large-diameter and long-distance pipeline
> P
n
>
: t¼ tr segments, even though overall they are minimized. The larger the
r¼1 volume capacity of a pipeline segment is, the greater the value of
Then, assuming that flow regime is unchanged when the product is the weight factor should be. The value of weight factor cpj can be
pumped by the pipeline segment, the frictional losses for pumping the given by Eq. (10).
product in two pumping ways can be calculated by: Fjþ1  Fj
8 cpj ¼ j ¼ 1; 2; ⋯; J max  1 (10)
3m FJ max
< P1 ¼ α⋅M t
Xn
(5)
: P2 ¼ α⋅ Mr3m ⋅tr
r¼1
(6) Weight factor θ that is set to be kmax1
1
is used to weaken the in-
Set UðxÞ ¼ x3m (x  0), then fluence of the number of time intervals on expression n1 . For
 example, a pipeline segment is assumed to be operated at 800 m3/
_
UðxÞ ¼ ð3  mÞx2m  0
(6) h over (0–60 h) and 600 m3/h over (60–120 h). If time period

UðxÞ ¼ ð3  mÞð2  mÞx1m  0 (0–120 h) is divided into four 30-h time interval, then
P4  

_
Due to UðxÞ €
 0 and UðxÞ  0, UðxÞ is a convex function which sat-
3
k¼1 QDj;k  QAj ¼ 400 m /h. If time period (0–120 h) is
P  
isfies Jensen's inequality as follows, divided into six 20-h time interval, then 6k¼1 QDj;k  QAj  ¼ 600
Pn  Pn m3/h. Obviously, for a same pumping rate profile of a pipeline
r¼1 σ r ⋅xr σ ⋅Uðxr Þ P  
U P Pn r
 r¼1 (7) segment, the value of kmax1 QDj;k  QAj  varies with the num-
r¼1 σ r r¼1 σ r
n k¼1
ber of time intervals. After introducing θ ¼ kmax1
1
into expression
Then, substitute Eq. (4) and Eq. (5) into Jensen's inequality. Pkmax1  

n1 , k¼1θ⋅ QDj;k  QAj is not heavily related to the number of
Xn  Xn Xn time intervals.
tr ⋅Mr tr ⋅UðMr Þ   tr ⋅UðMr Þ
U Xn r¼1
 Xn
r¼1
⇒U M  r¼1
tr tr t Since the objective function (9) is nonlinear, two non-negative vari-
r¼1 r¼1
Xn (8) 1
ables fj;k 2
and fj;k are introduced to linearize the objective function.
3m tr ⋅Mr3m 3m
X n
⇒M  r¼1
⇒α⋅M t  α⋅ tr ⋅Mr3m Min N ¼ n1 þ n2
t r¼1

Hence, for a given transportation task, the pumping way that a 8 JX X


max 1 kmax1
>
> ¼ sk ⋅cpj ⋅θ⋅fj;k1
pipeline segment pumps a product at a constant rate has less frictional >
< n1
loss than the pumping way that a pipeline segment pumps a product at j¼1 k¼1
(11)
> JX X
max 1 kmax1
several rates. In other words, the more stable the pumping rate of a >
>
: n2 ¼ sk ⋅cpj ⋅fj;k2
pipeline segment is, the lower frictional loss for pumping products is.
j¼1 k¼2
Since friction loss leads the formulation to be non-linear, this work takes
pumping rate stability of pipeline segments as the objective function,
which seeks to minimize the summation of pumping rate variations in fj;k1  QDj;k  QAj  fj;k1 j < J max ; k < kmax (12)
every pipeline segment along a pipeline during a scheduling horizon
excluding the periods for examining and repairing the whole pipeline. fj;k2  QDj;k  QDj;k1  fj;k2 j < J max ; 2  k < kmax (13)
Min N ¼ n1 þ n2 According to inequalities (12) and (13), the minimum  values of non- 
8 negative variables fj;k 1
and fj;k 2
are QDj;k  QAj  and QDj;k  QDj;k1 ,
JX X
max 1 kmax1
 
>
> sk ⋅cpj ⋅θ⋅QDj;k  QAj 
respectively. Moreover, considering that all the weight factors sk , cpj and
< n1 ¼
>
θ are non-negative in the objective function, the value of the objective
j¼1 k¼1
(9)    
>
>
JX X
max 1 kmax1
  function if fj;k 1
¼ QDj;k  QAj  and fj;k 2
¼ QDj;k  QDj;k1  (∀j < J max ,
>
: n2 ¼ sk ⋅cpj ⋅QDj;k  QDj;k1   
k < kmax) must be not greater than that if fj;k 1
> QDj;k  QAj  or
j¼1 k¼2  
2
fj;k > QDj;k  QDj;k1  (∃j < J max , k < kmax). Therefore, if the values of fj;k
1
   
j;k
2 1 
and f are optimum, then f ¼ QDj;k  QAj and f ¼ QDj;k  QDj;k1 
j;k
 2 
j;k
(∀j < J max , k < kmax).
(1) Expression n1 aims at reducing the summation of overall de-
viations between the real-time pumping rates and the mean
pumping rate in every pipeline segment. 3.2. Operation constraints
(2) Expression n2 is used to reduce the summation of overall de-
viations of the real-time pumping rates between consecutive pe- Fig. 5 depicts where operation constraints are imposed on detailed
riods in every pipeline segment, which can avoid wildly variations schedules of a pipeline. For the input station, inventory constraints need
in the pumping rates of pipeline segments in a short period. to be satisfied. When the input station injects products into the pipeline,
product sequences, injecting rates, product sizes and when a product/
batch can be injected into the pipeline should be considered. When

152
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Fig. 5. Schematic diagram for illustrating where constraints are imposed.

delivery stations download products, delivery rates, demands and when during a scheduling horizon, the upper coordinate of batch i should be
batches can be downloaded should be considered. Moreover, how always be equal to the volume of batch i.
batches move in the pipeline should be exactly described in the model
and pumping rates of pipeline segments should be always kept in
permissible ranges. Hi;k ¼ Wi;k i ¼ Imax; k  kmax (21)
If old batch i (i ¼ 1) is closest to the end of a pipeline at the starting
3.2.1. Inventory constraints of input station moment of a scheduling horizon, the upper coordinate of batch i should
For an input station, the inventory of any product p stored in tanks at be always be equal to the coordinate of the terminal station.
tkþ1 is equal to the sum of (a) the inventory of product p at tk , (b) the
volume of product p supplied by the refinery in ðtk ; tkþ1 Þ and (c) sub- H1;k ¼ FJ max k  kmax (22)
tracting the overall volume of the input station injecting product p into
the pipeline during ðtk ; tkþ1 Þ. At any moment, the upper coordinate of any batch should be not
greater than the coordinate of the terminal station.
X
Imax
Vtankp;kþ1 ¼ Vtankp;k þ QRp ⋅τ  VP1;i;p;k p 2 P; k < kmax (14) Hi;k  FJ max 2  i  Imax; k  kmax (23)
i¼1

The initial inventory of every product stored in input station is known 3.2.3. Pump rate constraints of pipeline segments
beforehand. In any time interval ðtk ; tkþ1 Þ, the pumping rate of pipeline segment j is
equal to the flow rate of the input station injecting products into the
Vtankp;1 ¼ Vtankp0 p2P (15) pipeline, subtracting the sum of the flow rate of every delivery station
2; ⋯; j receiving products from in-transit batches.
At any moment, the inventory of any product in input station must be
kept within the permissible range. X
Imax X
j X
Imax
QDj;k ¼ Q1;i;k  Qj' ;i;k j < J max ; k < kmax (24)
Vminp  Vtankp;k  Vmaxp p 2 P; k  kmax (16) i¼1 j' ¼2 i¼1

Considering safety and economy of operating a pipeline, pumping


3.2.2. Batch tracking constraints rates of all the pipeline segments must be kept within the permissible
The volume of batch i in a pipeline at any moment tk 2 T is equal to ranges or at zero.
the summation of (a) the volume of batch i in the pipeline at tk1 , (b) the
overall volume of the input station injecting products into batch i over spj;k ⋅QSmin  QDj;k  spj;k ⋅QSmax j < J max ; k < kmax (25)
j j
ðtk1 ; tk Þ and (c) subtracting the sum of the volume of every delivery
station receiving product from batch i in ðtk1 ; tk Þ. If a pipeline needs to be examined and repaired during time interval
ðtk ; tkþ1 Þ, all the pipeline segments along the pipeline must be under the
X
J max
idle state.
Wi;k ¼ Wi;k1 þ V1;i;k1  Vj;i;k1 i 2 I; 2  k  kmax (17)
j¼2 JX
max 1

spj;k  sk ⋅jJ max  1j k < kmax (26)


At the starting moment of the scheduling horizon, the volume of every j¼1
old batch is given beforehand and that of every new batch is zero.
If pipeline segment j is idle in the time interval ðtk ; tkþ1 Þ, all the
Wi;1 ¼ Wi0 i 2 I old (18) downstream pipeline segments must be also under the idle state.

Wi;1 ¼ 0 i 2 I new (19) spj;k  spjþ1;k j  J max  2k < kmax (27)


Moreover, the average pumping rate of any pipeline segment j during
As seen in Fig. 6, at any moment tk 2 T, the upper coordinate of batch
the scheduling horizon excluding the periods for examining and repair-
i is equal to the sum of the upper coordinate of batch i þ 1 and the volume
ing the pipeline is determined using Eq. (28).
of batch i.
X
kmax1 X
kmax1
Hi;k ¼ Hiþ1;k þ Wi;k i < Imax; k  kmax (20) sk ⋅QAj ⋅τ ¼ sk ⋅QDj;k ⋅τ j < J max (28)
k¼1 k¼1
If batch i (i ¼ Imax) is the last new batch pumped into the pipeline

Fig. 6. Schematic diagram for constraint (20).

153
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

X
kmax1
3.2.4. Injection constraints of input station yi;p ⋅VBPmin
p  VP1;i;p;k þ yi;p ⋅Wi0  yi;p ⋅VBPmax
p i ¼ Imaxold ; p 2 P
k¼1
(1) Product allocation (38)

Every new batch consists of a single product. X


kmax1
ori ⋅yi;p ⋅VBPmin
p  VP1;i;p;k  ori ⋅yi;p ⋅VBPmax
p i 2 I new ; p 2 P (39)
X
Pmax
k¼1
yi;p ¼ 1 i 2 I new
(29)
p¼1 Auxiliary binary variable ei;p ¼ ori ⋅yi;p is introduced to linearize
constraint (39).
Any two sequential transported batches must consist of
8
different products.
> X
kmax1
>
> ei;p ⋅VBPmin  VP1;i;p;k  ei;p ⋅VBPmax
>
< p p
yi;p þ yiþ1;p  1 Imaxold  i < Imax; p 2 P (30) k¼1
ori þ yi;p  2⋅ei;p  0 i 2 I new ; p 2 P (40)
>
>
The products that old batches consist of are known beforehand. >
> ori þ yi;p  ei;p  1
:
ei;p  0
yi;p ¼ y0i;p i 2 I old ; p 2 P (31)

The total batch number of every product injected into a pipeline


during the scheduling horizon is also given beforehand. (4) Fig. 7 depicts the condition for an input station injecting product
to batch i during the period ðtk ; tkþ1 Þ is that the upstream interface
X
Imax
of batch i must be located at the origin of a pipeline at tk .
yi;p ¼ Imaxnew
p p2P (32)
i¼Imaxold þ1
Hi;k  Wi;k  FJ max ⋅ð1  x1;i;k Þ i  Imaxold ; k < kmax (41)
During the scheduling horizon, the input station is unable to inject
products into old batches except the old batch that is closest to the origin
(2) For any injection operation, injecting rate of the input station must
of the pipeline.
be kept within the allowed range or at zero.
X
kmax1
x1;i;k ⋅QI1min  Q1;i;k  x1;i;k ⋅QI1max i 2 I; k < kmax (33) x1;i;k ¼ 0 i  Imaxold  1 (42)
k¼1

If the first pipeline segment is active in time interval ðtk ; tkþ1 Þ, it in-
(3) Batch size constraints dicates that one batch is being injected into the pipeline at the input
station. Otherwise, no batches are injected during period ðtk ; tkþ1 Þ.
In any time interval ðtk ; tkþ1 Þ, the volume of an input station injecting
batch i into a pipeline is equal to its injecting rate multiplied by X
Imax
x1;i;k ¼ sp1;k k < kmax (43)
its duration. i¼1

V1;i;k ¼ Q1;i;k ⋅τ i 2 Ik < kmax (34) If new batch i is injected into a pipeline during the scheduling hori-
zon, new batch i  1 must have been also injected.
Constraints (35) and (36) are used to determine the volume of the
input station injecting product p to batch i. If batch i dose not contain ori1  ori i  Imaxold þ 2 (44)
product p (yi;p ¼ 0), then VP1;i;p;k ¼ 0. If yi;p ¼ 1, then V1;i;k ¼ VP1;i;p;k ,
because any batch just consists of a single product. 3.2.5. Delivery constraints of intermediate stations
X
V1;i;k ¼ VP1;i;p;k i 2 I; k < kmax (35)
(1) Constraint (45) states the relation between volume, flow rate and
p2P
time of a delivery operation. Constraints (46) and (47) determine
the volume of station j receiving product p from batch i.
X
kmax1
VP1;i;p;k  yi;p ⋅VBPmax i 2 I; p 2 P (36)
p Vj;i;k ¼ Qj;i;k ⋅τ 2  j < J max ; i 2 I; k < kmax (45)
k¼1

During the scheduling horizon, the batch size of any product p must X
Vj;i;k ¼ VPj;i;p;k 2  j < J max ; i 2 I; k < kmax (46)
be kept within the permissible range. If not, the contamination between p2P
two sequential transported batches of different products will be sharply
increased. Constraint (37) determines whether batch i is injected into the
X
kmax1
pipeline by the input station during the scheduling horizon. Considering VPj;i;p;k  yi;p ⋅VBPmax 2  j < J max ; i 2 I; p 2 P (47)
p
the old batch that is closest to the origin of the pipeline at the starting k¼1
moment of the scheduling horizon is allowed to be injected during the
scheduling horizon. The size bounds for this old batch are imposed in
constraint (38), whereas those of new batches are imposed in
(2) In any time interval ðtk ; tkþ1 Þ, the flow rate that any intermediate
constraint (39).
station j receives products must be kept within the measurement
X range of flow meters or at zero.
1 kmax1
⋅ori  x1;i;k  ori ⋅kmax i 2 I (37)
kmax k¼1 xj;i;k ⋅QIjmin  Qj;i;k  xj;i;k ⋅QIjmax 2  j < J max ; i 2 I; k < kmax (48)

154
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Fig. 7. Conditions for the input station injecting a batch into the pipeline.

X
(3) Fig. 8 depicts conditions for any intermediate station j receiving VJ max ;i;k ¼ VPJ max ;i;p;k i 2 I; k < kmax (54)
product from in-transit batch i over time interval ðtk ; tkþ1 Þ p2P
a. At moment tk , the upper coordinate of batch i must be not less
than the coordinate of station j. Meanwhile, the volume be- X
kmax1
tween the downstream interface of batch i and station j must be VPJ max ;i;p;k  yi;p ⋅VBPmax
p i2I (55)
not less than the volume of unpurified oil section belonging to k¼1

the head of batch i. If pipeline segment J max  1 connected to the terminal station is idle
b. At the moment tkþ1 , the lower coordinate of batch i must be not in period ðtk ; tkþ1 Þ, no batches can be delivered to the terminal station.
greater than the coordinate of station j. Meanwhile, the volume Otherwise, one or more batches should be delivered to the terminal
between the upstream interface of batch i and station j must be station during period ðtk ; tkþ1 Þ.
not less than the volume of unpurified oil section belonging to
the tail of batch i. X
Imax

  xJ max ;i;k  Imax⋅spJ max 1;k k < kmax (56)


Fj þ v  Hi;k þ FJ max ⋅ 1  xj;i;k 2  j < J max ; i 2 I; k < kmax (49) i¼1

  3.2.7. Demand constraints


Hi;kþ1  Wi;kþ1 þ v  Fj þ FJ max ⋅ 1  xj;i;k 2  j < J max ; i
The actual total volume that any delivery station downloads any
2 I; k < kmax (50) product from pipeline should meet the overall demand. In reality, a small
deviation (ε ¼ 5%) between the actual total receiving volume and de-
mand volume is allowed.

(4) In any time interval ðtk ; tkþ1 Þ, any intermediate station can receive X X
Imax kmax1
at most one batch. Moreover, if upstream adjacent pipeline VPdemand
j;p ⋅ð1  εÞ  VPj;i;p;k  VPdemand
j;p ⋅ð1 þ εÞ j  2; p 2 P
segment j  1 is idle over the period ðtk ; tkþ1 Þ, no batches can be i¼1 k¼1

delivered to delivery station j. (57)

X
Imax
3.3. Special constraints
xj;i;k  spj1;k 2  j < J max ; k < kmax (51)
i¼1
3.3.1. Running and stopping duration constraints of injection operations
3.2.6. Delivery constraints of terminal station
As seen in Fig. 9, during time interval ðtk ; tkþ1 Þ, only when the upper (1) Running duration constraints
coordinate of batch i at moment tkþ1 is equal to the coordinate of the
terminal station, the terminal station can receive product from in-transit If the input station has been continuously injecting products for kon0 ⋅τ
batch i. This limitation can be satisfied by constraints (22), (23) and (52). hours at the starting moment of the new scheduling horizon, the input
station should continue to carry out injecting operations for at least
Hi;kþ1  FJ max ⋅xJ max ;i;k i 2 I; k < kmax (52) ðKON  kon0 Þ⋅τ hours. If not, constraint (58) is redundant.
Constraint (53) states that if batch i is not downloaded by the terminal Xso⋅ðKONkon0 Þ  
station, the volume of the terminal station receiving the product from k' ¼1
1  sp1;k' ¼ 0 (58)
batch i is zero.
Once the input station starts to inject products, the injecting operation
VJ max ;i;k  FJ max ⋅xJ max ;i;k i 2 Ik < kmax (53) should be continuously performed for at least KON⋅τ hours, which is
stated in constraint (59).
Constraints (54) and (55) determine the volume of the terminal sta-
XkþKON1  
tion downloading product p from batch i. sp1;k'  sp1;k  sp1;k1 ⋅KON 2  k  kmax  KON (59)
k' ¼k

Fig. 8. Conditions for an intermediate delivery station receiving product from a batch.

155
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Fig. 9. Conditions for the terminal station downloading product from a batch.

For the last execution of the input station injecting products into the station thrice. However, if the delivery rates in the three consecutive
pipeline during the scheduling horizon, which is started at the moment t ' , periods are kept at the same value, pipeline operators just need to execute
the available time (tkmax  t ' ) by the end of the scheduling horizon is a single operation instead of the three single operations. A good detailed
perhaps less than the minimum running duration KON⋅τ. However, schedule should be human-oriented and fully consider the requirements
considering the input station can continue to carry out injecting opera- of pipeline operators. Nevertheless, full-stream delivery operations have
tions in the next scheduling horizon, the input station either uninter- no such limitations, because the delivery rates depend on pumping rates
ruptedly injects products or does not carry out injecting operations all the of the upstream pipeline segment and cannot be arbitrarily changed. If
time during the whole available period (t '  tkmax ). xj;i;k ¼ 1 and spj;k ¼ 1, it indicates that intermediate delivery station j
Xkmax1 carries out a side-stream delivery operation in the time interval ðtk ; tkþ1 Þ.
 
sp1;k'  sp1;k  sp1;k1 ⋅ðkmax  kÞ kmax  KON < k < kmax If xj;i;k ¼ 1 and spj;k ¼ 0, it denotes that intermediate delivery station j
k ' ¼k
carries out a full-stream delivery operation in time interval ðtk ; tkþ1 Þ. Only
(60)
when intermediate delivery station j carries out side-stream delivery
operations during two consecutive periods, constraint (65) is active.
(  
(2) Stopping duration constraints Qj;i;k  Qj;i;kþ1 þ 4 spj;k  spj;kþ1  xj;i;k  xj;i;kþ1 ⋅QIjmax 2  j<J max ; i 2 I
 
Qj;i;k  Qj;i;kþ1  4 spj;k  spj;kþ1  xj;i;k  xj;i;kþ1 ⋅QIjmax k  kmax 2
Similar to running duration constraints of an input station, stopping
duration constraints are stated using constraints (61)–(63). (65)

Xð1soÞ⋅ðKOFFkoff 0 Þ 4. Solving technique


k ' ¼1
sp1;k' ¼ 0 (61)
In Section 3, a discrete-time MILP formulation is developed to opti-
XkþKOFF1    
1  sp1;k'  sp1;k1  sp1;k ⋅KOFF 2k mize detailed schedules of a single source and multi-depots multiproduct
k ' ¼k
pipeline. The developed MILP model consists of objective function (11)
 kmax  KOFF (62) and constraints (12)–(38) and (40)–(65). CPLEX is generally known as a
commercial MILP solver, which uses a branch-and-bound algorithm. In
Xkmax1    
1  sp1;k'  sp1;k1  sp1;k ⋅ðkmax  kÞ kmax this paper, the developed MILP model is solved using IBM ILOG CPLEX
k ' ¼k
Optimizer 12.6.3 (ILOG, 2015).
 KOFF < k < kmax (63)
5. Case study
3.3.2. Injecting rate stability constraints of injection operations
Flow rates by which an input station injects products to batches in two In this section, the proposed MILP formulation is tested on two real-
consecutive periods should be kept at the same value as possible. If not, world multiproduct pipelines called XA and XB for short. The test plat-
pipeline operators will have to adjust opening of valves or switch scheme form is Intel Core i7-6700 K CPU @4.00 GHz using CPLEX 12.6.3 with 8
of pumps located at the input station. sp1;k ¼ 1 indicates that the input parallel threads. Section 5.1 states basic data for pipelines XA and XB.
station (j ¼ 1) injects a product into the pipeline over time interval Sections 5.2 and 5.3 present optimal detailed schedules for pipelines XA
ðtk ; tkþ1 Þ. Only when input station performs injection operations during and XB, respectively, which use pumping rate variations as the objective
two consecutive periods, constraint (64) is active. function. In section 5.4, comparisons on the two different objective
functions that are related to pumping costs and pumping rate variations
8 Imax
P X
Imax
 
> respectively, are given to illustrate the superiority of the new objective
>
< Q1;i;k  Q1;i;kþ1 þ 2  spj;k  spj;kþ1 ⋅QI1max
i¼1 function on pumping rate variations.
i¼1
k  kmax  2
>
> P
Imax X
Imax
 
: Q1;i;k  Q1;i;kþ1  2  spj;k  spj;kþ1 ⋅QI1max
i¼1 i¼1
5.1. Basic data
(64)
5.1.1. Basic data for pipeline XA in case 1
Pipeline XA depicted in Fig. 10 can convey two products P1 and P2
3.3.3. Delivering rate stability constraints of side-stream delivery operations
from input station D0 to three delivery stations D1, D2 and D3 at the
When an intermediate station receives a product from a batch by side-
pumping rate range of 200–1000 m3/h. The recommended injecting rate
stream delivery operations in two consecutive periods, flow rates of the
of input station D0 ranges from 600 to 1000 m3/h, whereas the delivery
two operations should be kept at the same value as possible. If not, the
rate of intermediate stations D1-D2 should be kept within 100–300 m3/h.
workloads of pipeline operators will increase. For example, a delivery
Besides, the receiving rate range of terminal station D3 is 200–1000 m3/
station downloads a product from an in-transit batch at three different
h. The inventory of products P1 and P2 stored in input station D0 ranges
rates in three consecutive time intervals (0–10 h), (10–20 h) and
from 8000–80,000 m3. The size range of products P1 and P2 transported
(20–30 h), respectively. For accomplishing the specific delivery sched-
by pipeline XA is 30,000–100,000 m3. The minimum stopping and
ules, pipeline operators have to adjust opening of the valve located at the
running durations of injection operations are set to be 20 h. The unit costs

156
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Fig. 10. Schematic diagram of pipeline XA.

for pumping products from the input station to delivery stations are (D1, P2 into batch B3. In turn, three new batches (B4, P1, 93,064 m3), (B5, P2,
P1, 0.17 $/m3), (D1, P2, 0.10 $/m3), (D2, P1, 0.35 $/m3), (D2, P2, 0.20 46,532 m3) and (B6, P1, 36,319 m3) are sequentially injected into
$/m3), (D3, P1, 0.69 $/m3) and (D3, P2, 0.39 $/m3), respectively. pipeline XA by input station D0 during (50–240 h). The injection volume
In this work, pipeline XA is tested for a ten-day scheduling horizon of every single-product batch is kept within 30,000–100,000 m3. In
(0–240 h). During the scheduling horizon, the refinery can continuously (0–200 h), input station D0 injects products into batches B3, B4 and B5 at
supply product P1 at the rate of 400 m3/h and product P2 at the rate of a fixed rate of 931 m3/h, whereas in (200–241 h), input station D0
600 m3/h to input station D0. At 0 h, inventories at input station D0 are conveys product P1 into batch B6 at a different rate of 908 m3/h. At batch
(P1, 51,360 m3) and (P2, 24,810 m3), respectively. Besides, at 0 h, line- injections, stations D1 and D2 implement side-stream delivery operations
fill of pipeline XA is shown in Fig. 10 and input station D0 has intermitted in turn. At 0 h, station D2 receives product P1 from batch B2 at a rate of
injecting products into pipeline XA for 20 h. Overall demands for prod- 161 m3/h, which ends at 40 h. Immediately, station D1 starts a new
ucts at delivery stations of pipeline XA are given in Table 1. receiving operation that product P2 from batch B3 is delivered to station
D1 at a rate of 161 m3/h during 40–60 h, which is followed by a new
5.1.2. Basic data for pipeline XB in case 2 receiving operation performed by station D2 at a rate of 161 m3/h during
Pipeline XB comprises an input station S0 and five delivery stations 60–110 h. Stations D1 and D2 continue to take turns performing
(S1-S5), as depicted in Fig. 11. The inventory of products P1, P2 and P3 receiving operations until 240 h. As shown in Fig. 13, good bridging of
stored in input station S0 ranges from 8000–80,000 m3. The pumping receiving operations keeps pumping rate of pipeline segment D2-D3 at a
rate range of every pipeline segment along pipeline XB is 400–1200 m3/ constant value (770 m3/h) over (0–110 h). Inventory variation of prod-
h. The flow rate range of input station S0 conveying products to pipeline ucts in input station D0 is depicted in Fig. 14. During 0–50 h, inventory of
XB is 600–1200 m3/h and that of every intermediate delivery station product P1 in input station D0 rises from 51,360 to 71,360 m3 due to
(D1-D3) receiving products from pipeline XB is 100–1200 m3/h. The receiving 20,000 m3 of product P1 from the refinery at 400 m3/h. In the
minimum and maximum batch sizes of all the products are 40,000 m3 same period, inventory of product P2 in input station D0 reduces from
and 80,000 m3. The minimum stopping and running durations of injec- 24,810 to 8278 m3 due to receiving 30,000 m3 of product P1 from the
tion operations are set to be 20 h. The unit costs for pumping products refinery at 600 m3/h and outputting 46,532 m3 of product P1 to pipeline
from the input station to delivery stations are (S1, P1, 0.50 $/m3), (S1, XA at 931 m3/h. In 50–150 h, due to outputting 93,064 m3 of product P1
P2, 0.28 $/m3), (S1, P3, 0.25 $/m3), (S2, P1, 1.00 $/m3), (S2, P2, 0.57 to pipeline XA at 931 m3/h and receiving 40,000 m3 of product P1 and
$/m3), (S2, P3, 0.50 $/m3), (S3, P1, 1.51 $/m3), (S3, P2, 0.85 $/m3), (S3, 60,000 m3 of product P2 from the refinery, inventory of product P1 at
P3, 0.75 $/m3), (S4, P1, 2.01 $/m3), (S4, P2, 1.14 $/m3), (S4, P3, 1.01 station D0 reduces from 71,360 m3 to 18,296 m3 and that of product P2
$/m3), (S5, P1, 2.51 $/m3), (S5, P2, 1.42 $/m3) and (S5, P2, 1.26 $/m3), increases from 8278 m3 to 68,278 m3. Moreover, it can be observed that
respectively. inventory levels of products remain within the allowable range
In this work, pipeline XB is tested for a scheduling horizon (0–300 h). (8000–80,000 m3) at station D0.
During the scheduling horizon, the refinery continuously supplies prod-
ucts P1, P2 and P3 to input station S0 at the same rate of 290 m3/h. At
5.3. Case 2 for pipeline XB using pumping rate variations as objective
0 h, inventories at input station S0 are (P1, 57,780 m3), (P2, 49,620 m3)
function
and (P3, 33,080 m3), respectively. Besides, at 0 h, line-fill of pipeline XB
is shown in Fig. 12. Overall demands for products at delivery stations of
Provided different values of time step τ, optimal solutions for pipeline
pipeline XB are given in Table 2. At 0 h, input station S0 has intermitted
XB given by the proposed MILP formulation can be found in Table 3. By
injecting products into pipeline XB for 20 h. Moreover, pipeline XB is
setting τ ¼ 30 h, no feasible solution is found. By setting τ ¼ 15 h, an
arranged to be examined and repaired over period (120–180 h).
optimal solution is found in 128 s. Further, by adopting τ ¼ 10 h, an
optimal solution is found in 1272 s. However, when τ is set to be 5 h, a
5.2. Case 1 for pipeline XA using pumping rate variations as objective
non-optimal solution is found in 10,000 s with an optimality gap of
function
24.41%. By setting τ ¼ 10 h, the optimal detailed schedule for pipeline
XB is depicted in Fig. 15. During first pumping run (0–10 h), input station
Provided different values of time step τ, optimal solutions for pipeline
S0 injects 10,897 m3 of product P2 into batch B4. In turn, four new
XA given by the proposed MILP formulation can be found in Table 3. By
batches (B5, P1, 65,381 m3), (B6, P2, 43,587 m3), (B7, P3, 57,730 m3),
setting τ ¼ 40 h, no feasible solution is found. By changing τ from 20 to
and (B8, P2, 73,127 m3) are sequentially injected into pipeline XB by
10 h, the value of objective function reduces from 284 to 229 m3/h. By
input station S0 during (10–300 h). Batch B7 is injected into pipeline in
τ ¼ 5 h, a feasible solution is found in 10,000 s with an optimality gap of
two discontinuous periods (110–120 h) and (180–230 h), due to the
85.98%. Fig. 12 depicts the optimal detailed schedule for pipeline XA by
requirements for examining and repairing pipeline XB in (120–180 h). As
adopting τ ¼ 10 h, where bold bars present delivery or injection opera-
seen in Fig. 15, all the batches in pipeline XB remain motionless in time
tions and blue numbers above them indicate their flow rates in cubic
period (120–180 h). The whole pipeline remains active during the
meters per hour. Flow rates of injection/delivery operations are rounded
scheduling horizon except the required stopping period (120–180 h). In
in Fig. 12. During (0–50 h), input station D0 injects 46,532 m3 of product
other words, pipeline XB is in full use during the scheduling period. At
every injection, all the intermediate delivery stations carry out side-
Table 1
Overall demands for products at delivery stations of pipeline XA in (m3). stream delivery operations. Most batches are delivered to every inter-
mediate station by at most one single operation during the scheduling
Product D1 D2 D3
horizon, except that station S2 downloads batch B5 and station S4 re-
P1 16,000 8000 58,000 ceives batches B2, B3 and B5 by two single operations, respectively.
P2 8000 8000 130,000
During the scheduling horizon except period (120–180 h), stations S1

157
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Fig. 11. Schematic diagram of pipeline XB.

Fig. 12. Optimal detailed schedule for pipeline XA by adopting τ ¼ 10 h.

S2-S3 and S3-S4 seem to be relatively stable, whereas pumping rate


Table 2
fluctuations are mainly concentrated in last pipeline segment S4-S5. In-
Overall demands for products at delivery stations along pipeline XB in (m3).
ventory variation of products in input station S0 is depicted in Fig. 18. It
Product S1 S2 S3 S4 S5
can be observed that inventory levels of products remain within the
P1 4500 3000 4500 6000 35,000 allowable range (8000–80,000 m3) at station S0.
P2 6000 7500 0 9000 100,000
P3 4500 9000 6000 4500 60,000

5.4. Comparison between different objective functions


and S2 implement side-stream delivery operations in turn. Pumping rate
profiles of all the pipeline segments are depicted in Figs. 16 and 17. In this section, Case 1 and Case 2 are also solved using the old
Pumping rate variation ranges of all the pipeline segments at batch in- objective function about pumping costs. Table 4 presents optimal solu-
jections are (S0-S1, 937–1090 m3/h), (S1-S2, 794–1090 m3/h), (S2-S3, tions for Case 1 and Case 2 using different objective functions (1) and
797–947 m3/h), (S3-S4, 794–947 m3/h) and (S4-S5, 400–831 m3/h), (11), by setting τ ¼ 10 h or 15 h. For any case, the relative deviation on
respectively. The maximum pumping rate variation amplitudes of all the pumping costs are not greater than 1.8%. However, the deviation on
pipeline segments in any two consecutive running periods that the pumping rate variations are very widely. The relative deviations on N are
pipeline segments remains active are (S0-S1, 108 m3/h), (S1-S2, 143 m3/ not less than 89% in Case 1 and those are not less than 66% in Case 2.
h), (S2-S3, 143 m3/h), (S3-S4, 114 m3/h) and (S4-S5, 433 m3/h), Through comparisons, using pumping rate variations as the objective
respectively. Pumping rate profiles for pipeline segments S0-S1, S1-S2, function can only guarantee the economy of operating a pipeline, but also
significantly improve the pumping rate stability of operating a pipeline.

Table 3
Solutions given by CPLEX for Case 1 and Case 2 using pumping rate variations as objective function.

Example Time step τ (h) Objective function (m3/h) No. of constraints No. of binary variables No. of continuous variables CPU time (s) Optimality gap (%)

Case 1 5 220 11,509 1517 6256 10,000 85.98


10 229 5821 773 3136 971 0
15 233 3925 525 2096 35 0
20 284 2977 401 1576 17 0
40 Infeasible 1555 215 796 – –

Case 2 5 1205 25,081 3224 15,979 10,000 24.41


10 1240 12,661 1634 7999 1272 0
15 13,312 8521 1104 5339 128 0
30 Infeasible 3553 468 2147 – –

158
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Fig. 13. Pumping rate profiles of pipeline segments along pipeline XA.

Fig. 14. Evolution of product inventories at station D0 along pipeline XA.

Fig. 15. Optimal detailed schedule of pipeline XB by adopting τ ¼ 10 h.

159
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Fig. 16. Pumping rate profiles of pipeline segments S0-S1, S1-S2 and S2-S3 along pipeline XB.

Fig. 17. Pumping rate profiles of pipeline segments S3-S4 and S5-S6 along pipeline XB.

Fig. 18. Evolution of product inventories at station S0 along pipeline XB.

6. Conclusions injection and side-stream delivery operations. The proposed MILP


formulation is successfully tested on pipeline XA with four stations
In this paper, an MILP discrete-time model for optimizing detailed transporting two products and pipeline XB with six stations transporting
schedules of a multiproduct pipeline with a single source and multiple three products. By adopting time step τ ¼ 10 h, the optimal detailed
depots have been developed without division of pipeline segments into schedule for pipeline XA over (0–240 h) is found in 971 s, whereas that
packs and any decomposition strategy, which seeks to minimize pumping for pipeline XB over (0–300 h) is obtained in 1272 s. Through compar-
rate fluctuations in every segment of a pipeline. The model introduces isons on two different objective functions Eq. (1) and Eq. (11), optimal
two sets of special constraints that are the stopping and running duration detailed schedules using the objective function on pumping rate varia-
limitations of injection operations and the flow rate stabilities of tions can significantly improve the pumping rate stability of operating a

160
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Table 4
Optimal solutions for Case 1 and Case 2 using different objective functions.

Example Time step τ (h) Optimization objective Pumping cost G ($) Relative deviation on G (%) Pumping rate variation N (m3/h) Relative deviation on N (%)

Case 1 10 G 96,162 1.3 2543 91


N 97,431 229
15 G 96,162 1.8 2190 89
N 97,910 233

Case 2 10 G 346,756 0.8 3686 66


N 349,842 1240
15 G 347,006 1.3 4764 72
N 351,547 1332

pipeline, which makes the proposed MILP model more practical. On address scheduling of tree-structure and mesh-structure multi-
future works, the proposed model will be improved and extended to product pipelines.

Nomenclature

Indexes and sets


i2I Set of batches transported by the pipeline during the scheduling horizon, I ¼ I old ∪I new , Imax ¼ Imaxold þ Imaxnew
I old
Set of old batches in the pipeline at the starting moment of the scheduling horizon. Old batches are numbered starting from ‘1’ by the distance
to the initial station from far to near, i 2 I old , i ¼ 1; 2; ⋯; Imaxold
I new Set of new batches injected into the pipeline during the scheduling horizon. New batches are numbered staring from Imaxold þ 1 by inputting
time order, i 2 I new , i ¼ Imaxold þ 1; Imaxold þ 2; ⋯; Imaxold þ Imaxnew
j2J Set of stations and pipeline segments, j ¼ 1; 2; ⋯; J max . If j ¼ 1, station j is an input station. If j ¼ J max , station j is a terminal station. Pipeline
segment j is located between station j and station j þ 1
p2P Set of products transported by the pipeline, p ¼ 1; 2; ⋯; Pmax
T Set of time nodes, tk 2 T, k ¼ 1; 2; ⋯; kmax

Non-binary parameters
CDj;p Unit cost for pumping product p from input station to delivery station j ($/m3)
cpj Weight factor of pipeline segment j that is used to avoid the pumping rate fluctuations being concentrated in one station
Fj Volumetric coordinate of station j from the origin of the pipeline (m3)
new
Imaxp New batch number of product p injected into the pipeline during the scheduling horizon
KOFF Minimum number of time intervals that the input station intermits injecting products into the pipeline.
koff 0 The total number of time intervals that the input station has intermitted injecting products into the pipeline at the starting moment of the
scheduling horizon
KON Minimum number of time intervals that the input station continuously injects products into the pipeline.
kon0 Total number of time intervals that the input station has been continuously injecting products into the pipeline at the starting moment of the
scheduling horizon
QIjmax QIjmin Upper and lower flow rates that station j injects products into the pipeline or receives products from the pipeline (m3/h)
QRp Production rate of product p at the refinery during the scheduling horizon (m3/h)
max min
QSj , QSj
Upper and lower pumping rates of pipeline segment j between station j and station j þ 1 (m3/h)
tk Moment of time node k (h)
v Volume of unpurified oil section belonging to the header or the tail of a batch
VBPmax min
p , VBPp
Maximum and minimum batch sizes of product p (m3)
Vmaxp , Vminp
The maximum and minimum allowed inventory levels for product p at input station (m3)
demand
VPj;p Overall demand for product p that needs to be delivered to delivery station j (m3)
Vtank0p Initial inventory of product p at input station (m3)
Wi0 Volume of old batch i at the starting moment of the scheduling horizon (m3)
ε A allowed small deviation (ε ¼ 5%) between the actual total receiving volumes and demand volumes in delivery stations
θ A weight factor is used to weaken the influence of the number of time intervals on objective function
τ Time step that is used to divide the scheduling horizon (h)

Binary parameters
sk 0 if the whole pipeline is arranged to be examined and repaired in time intervalðtk ; tkþ1 Þ
so 1 if the input station is injecting products into pipeline when the former scheduling horizon ends
0
yi;p 1 if old batch i consists of product p

161
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Continuous variables
1 2
fj;k , fj;k Auxiliary non-negative variables
G Objective function about the total cost for pumping products to delivery stations
Hi;k Upper volumetric coordinate of batch i at moment tk (m3)
N Objective function about the stability of pumping rate in pipeline segments
n1 A term in objective function N that aims at reducing the summation of overall deviations between the real-time pumping rates and the mean
pumping rate in every pipeline segment
n2 A term in objective function N that is used to reduce the summation of overall deviations of the real-time pumping rates between consecutive
periods in every pipeline segment
Qj;i;k Flow rate by which station j injects batch i into the pipeline or receives batch i from the pipeline in time interval ðtk ; tkþ1 Þ (m3/h)
QAj Average pumping rate of pipeline segment j during the scheduling horizon (m3/h)
QDj;k Pumping rate of pipeline segment j in time interval ðtk ; tkþ1 Þ (m3/h)
Vj;i;k Volume by which station j injects batch i into the pipeline or receives batch i from the pipeline in time interval ðtk ; tkþ1 Þ (m3)
VPj;i;p;k Volume by which station j injects product p to batch i or receive product p from batch i in time interval ðtk ; tkþ1 Þ (m3)
Vtankp;k Inventory of product p in input station at moment tk (m3)
Wi;k Volume of batch i in the pipeline at moment tk (m3)

Binary variables
ei;p Auxiliary variable
ori 1 if new batch i is injected into the pipeline during the scheduling horizon
spj;k 1 if pipeline segment j is active in time interval ðtk ; tkþ1 Þ
xj;i;k 1 if station j receives/injects batch i in time interval ðtk ; tkþ1 Þ
yi;p 1 if batch i contains product p

Abbreviations
MILP Mixed integer linear programming
MINLP Mixed integer non-linear programming
NLP Non-linear programming

References MirHassani, S.A., Jahromi, H.F., 2011. Scheduling multi-product tree-structure pipelines.
Comput. Chem. Eng. 35, 165–176.
MirHassani, S.A., Moradi, S., Taghinezhad, N., 2011. Algorithm for long-term scheduling
Cafaro, D.C., Cerda, J., 2004. Optimal scheduling of multiproduct pipeline systems using
of multiproduct pipelines. Industrial Eng. Chem. Res. 50, 13899–13910.
a non-discrete MILP formulation. Comput. Chem. Eng. 28, 2053–2068.
MirHassani, S.A., Abbasi, M., Moradi, S., 2013. Operational scheduling of refined product
Cafaro, D.C., Cerda, J., 2009. Optimal scheduling of refined products pipelines with
pipeline with dual purpose depots. Appl. Math. Model. 37, 5723–5742.
multiple sources. Industrial Eng. Chem. Res. 48, 6675–6689.
Mostafaei, H., Castro, P.M., 2017. Continuous-time scheduling formulation for straight
Cafaro, D.C., Cerda, J., 2010a. Operational scheduling of refined products pipeline
pipelines. AIChE J. 62, 1923–1936.
networks with simultaneous batch injections. Comput. Chem. Eng. 34, 1687–1704.
Mostafaei, H., Ghaffari Hadigheh, A., 2014. A general modeling framework for the long-
Cafaro, D.C., Cerd
a, J., 2010b. A rigorous mathematical formulation for the scheduling of
term scheduling of multiproduct pipelines with delivery constraints. Industrial Eng.
tree-structure pipeline networks. Industrial Eng. Chem. Res. 50, 5064–5085.
Chem. Res. 53, 7029–7042.
Cafaro, D.C., Cerda, J., 2012. Rigorous scheduling of mesh-structure refined petroleum
Mostafaei, H., Alipouri, Y., Zadahmad, M., 2015. A mathematical model for scheduling of
pipeline networks. Comput. Chem. Eng. 38, 185–203.
real-world tree-structured multi-product pipeline system. Math. Methods Operations
Cafaro, V.G., Cafaro, D.C., Mendez, C.A., 2011. Detailed scheduling of operations in
Res. 81, 53–81.
single-source refined products pipelines. Industrial Eng. Chem. Res. 50, 6240–6259.
Mostafaei, H., Castro, P.M., Ghaffari-Hadigheh, A., 2015. A novel monolithic MILP
Cafaro, V.G., Cafaro, D.C., Mendez, C.A., et al., 2012. Detailed scheduling of single-source
framework for lot-sizing and scheduling of multiproduct treelike pipeline networks.
pipelines with simultaneous deliveries to multiple offtake stations. Industrial Eng.
Industrial Eng. Chem. Res. 54, 9202–9221.
Chem. Res. 51, 6145–6165.
Mostafaei, H., Alipouri, Y., Shokri, J., 2015. A mixed-integer linear programming for
Cafaro, V.G., Cafaro, D.C., Mendez, C.A., et al., 2015. MINLP model for the detailed
scheduling a multi-product pipeline with dual-purpose terminals. Comput. Appl.
scheduling of refined products pipelines with flow rate dependent pumping costs.
Math. 34, 979–1007.
Comput. Chem. Eng. 72, 210–221.
Mostafaei, H., Castro, P.M., Ghaffari-Hadigheh, A., 2016. Short-term scheduling of
Cafaro, V.G., Cafaro, D.C., Mendez, C.A., Cerda, J., 2015. Optimization model for the
multiple source pipelines with simultaneous injections and deliveries. Comput.
detailed scheduling of multi-source pipelines. Comput. Industrial Eng. 88, 395–409.
Operations Res. 73, 27–42.
Chen, H., Wu, C., Zuo, L., et al., 2016. Applying the Simulated Annealing Algorithm to
Rejowski, R., Pinto, J.M., 2003. Scheduling of a multiproduct pipeline system. Comput.
Optimize the Scheduling of Products Pipelines. Presented at the PSIG Annual
Chem. Eng. 27, 1229–1246.
Meeting. Pipeline Simulation Interest Group (PSIG), Vancouver, British Columbia.
Rejowski, R., Pinto, J.M., 2004. Efficient MILP formulations and valid cuts for
Paper No. 1605.
multiproduct pipeline scheduling. Comput. Chem. Eng. 28, 1511–1528.
Chen, H., Wu, C., Zuo, L., et al., 2017. Optimization of detailed schedule for a
Rejowski, R., Pinto, J.M., 2008. A novel continuous time representation for the
multiproduct pipeline using a simulated annealing algorithm and heuristic rules.
scheduling of pipeline systems with pumping yield rate constraints. Comput. Chem.
Industrial Eng. Chem. Res. 56, 5092–5106.
Eng. 32, 1042–1066.
Garcia-Sanchez, A., Arreche, L.M., Ortega-Mier, M., 2008. Combining simulation and tabu
Relvas, S., Matos, H.A., Barbosa-Povoa, A.P.F., Fialho, J., Pinheiro, A.S., 2006. Pipeline
search for oil-derivatives pipeline scheduling. Metaheuristics Sched. Industrial
scheduling and inventory management of a multiproduct distribution oil system.
Manuf. Appl. 128, 301–325.
Industrial Eng. Chem. Res. 45, 7841–7855.
Ghaffari-Hadigheh, A., Mostafaei, H., 2015. On the scheduling of real world multiproduct
Relvas, S., Matos, H.A., Barbosa-P ovoa, A.P.F., Fialho, J., 2007. Reactive scheduling
pipelines with simultaneous delivery. Optim. Eng. 16, 571–604.
framework for a multiproduct pipeline with inventory management. Industrial Eng.
Herr
an, A., de la Cruz, J.M., de Andres, B., 2010. A mathematical model for planning
Chem. Res. 46, 5659–5672.
transportation of multiple petroleum products in a multi-pipeline system. Comput.
Relvas, S., Barbosa-Povoa, P., Matos, H.A., 2009. Heuristic batch sequencing on a
Chem. Eng. 34, 401–413.
multiproduct oil distribution system. Comput. Chem. Eng. 34, 712–730.
Herr
an, A., de la Cruz, J.M., et al., 2012. Global Search Metaheuristics for planning
Relvas, S., Magat~ao, S.N.B., Barbosa-Povoa, A.P.F., Neves, F., 2013. Integrated scheduling
transportation of multiple petroleum products in a multi-pipeline system. Comput.
and inventory management of an oil products distribution system. Omega 41,
Chem. Eng. 37, 248–261.
955–968.
ILOG, 2015. IBM ILOG OPL 12.6.3: Language User's Manual. IBM, USA.
Sasikumar, M., Prakash, P.R., Patil, S.M., et al., 1997. Pipes, a heuristic search model for
MirHassani, S.A., BeheshtiAsl, N., 2013. A heuristic batch sequencing for multiproduct
pipeline schedule generation. Knowledge-Based Syst. 10, 169–175.
pipelines. Comput. Chem. Eng. 56, 58–67.

162
H. Chen et al. Journal of Petroleum Science and Engineering 159 (2017) 148–163

Zaghian, A., Mostafaei, H., 2016. An MILP model for scheduling the operation of a refined Zhang, H.R., Liang, Y.T., Liao, Q., et al., 2017. A hybrid computational approach for
petroleum products distribution system. Operational Res. 16, 513–542. detailed scheduling of products in a pipeline with multiple pump stations. Energy
Zhang, H.R., Liang, Y.T., Xiao, Q., et al., 2016. Supply-based optimal scheduling of oil 119, 612–628.
product pipelines. Petroleum Sci. 13, 355–367.

163

You might also like