You are on page 1of 8

Proceedings of the 2012 9th International Pipeline Conference IPC2012 September 24-28, 2012, Calgary, Alberta, Canada

IPC2012-90288

OPTIMIZATION OF OIL-SUPPLYING TIME WINDOWS FOR THE REFINED PRODUCT DEPOTS


Yongtu Liang China University of Petroleum Beijing, China Phone: 86-13910970411 Fax: 01089733990 Email: liangyt21st@139.com ABSTRACT More and more refined products of depots are delivered through the pipeline. Different product-supplying time windows lead to different pipeline transportation plans, resulting in different transportation costs. Optimization and accurate forecast of product-supplying time window will directly and significantly influence the economic benefit of pipeline companies. Till now, scholars home and abroad have launched much study on the product distribution of the service station in the downstream of the depot as well as optimization problems of product delivered from cars, product depots and railway to the depot. However, little attention has been paid to time-window optimization of products from pipeline to depot. This paper works on time-window optimization by means of operational research principle. Taking the depots along the product pipeline as the research object, characteristics of batch operation as the constraint condition and aiming to maximize the sales profit or to minimize the total fees mainly including the storage fees, ordering fees and shortage costs, this paper calculates the optimal time-window of different refined products including 90# ,93# gasoline and 0# diesel by using appropriate algorithm. Precise function for prediction of demanding is the key factor for optimization of productsupplying time windows, so time series prediction, Grey Prediction and BP artificial neutral networks prediction methods are applied here separately to get marketing demand function.On account of three kinds of marketing demands, that Ping Wang China University of Petroleum Beijing, China Phone: 86-13581924778 Email:wangping579@126.com Jing Gong China University of Petroleum Beijing,China Phone: 86-13501036944 Fax: 01089733804 Email: ydgj@cup.edu.cn

is, uniform demands, randomly discrete demands and randomly continuous demands, 7 models, including Deterministic storage model, Capacity Limitation Model,S Storage Model,(s,S) storage Model,Constant Optimal Ordering Amount Model,(q,Q) model ,Whole Period Model are established to get the optimal ordering quantity, and then time window of product-supplying can be determined by the initial stock volume, minimum download transmission capacity limit and the demand volume predicted by demand function. Based on the above research, the optimization software is developed and is validated by field data, which shows the optimization effect is good, bringing about a considerable economic benefit. INTRODUCTION With the soaring economic development these years, lots of pipelines for refinery products have been applied successively in China, and more and more products in the depots are delivered by pipelines. Then, product-supplying time of the depots is one of the most important factors for making the schedule, which directly influences the economical efficiency of the petroleum pipeline operation. Storage costs, ordering costs, and shortage penalty costs three main expenditures for depots. considering that refinery products are regularly transported by batches, operation will greatly affect the ability of depots to meet market demands. are the the the

Copyright 2012 by ASME

Till now, scholars home and abroad have launched much study on the product distribution of the service station in the downstream of the depot as well as optimization problems of product delivered from cars, product depots and railway to the depot. However, little attention has been paid to time-window optimization of products from pipeline to depot. This paper takes the depot along the product pipeline as the object and takes the batch operation characteristics of product pipeline as the constraint condition , considering that the depots customers are gas station or smaller depots, the aim is to maximize the sale profit or to minimize the total fees mainly including the storage fees, ordering fees and shortage penalty costs.and then the optimal product-supplying time window models are established using the operational research principle to get the optimal product-supplying time windows. Seven models are listed as follows,(1)Deterministic Storage Model, product shortage is neglected, and product supplying is rapid;(2)Capacity Limitation Model, which takes the capacity of a depot into account;(3)S-shape Storage Model, which considers the demand function is continuous;(4)(s,S) Model;(5)Constant Optimum Ordering Amount Model;(COOAM);(6)Q-q Model;(7)Whole Period Model (WPM). The precise prediction of the demanding function is the key factor for optimizing product-supplying time windows. On account of three kinds of marketing demands, that is, uniform demands, randomly discrete demands, and randomly continuous demands, each model tackles the problem in different perspectives. Besides, the fee values in models examples are all from the real depots. After getting the optimal ordering quantity Q, the time window of the product-supplying can be determined using the initial stock volume I at the beginning of the period and the demand Y of this period predicted by demand function, where three methods consisting of SPSSStatistical Package for Social Sciences prediction, Grey Prediction and BP artificial neutral networks are applied to make sure the accuracy of the marketing demand function. All the models described here are programmed in VC++ language to form a software which has been put into field application.

The followings are detailed discussion of seven optimization models. NOMENCLATURE A B I L Q S a b c e r s t safe capacity of a depot ordering fee initial inventory of a depot delay time for ordering product-supplying amount initial inventory amount after ordering unit price of product unit ordering fee unit storage fee unit shortage fee random variable of product demand amount minimum critical inventory amount considering the ordering fee the optimal supplying time the expected value of shortage amount in delay time L r s intensity function

(r )

2.Model1:Deterministic Storage Model (DSM) 2.1 DSM set-up condition It is assumed that product marketing demand for these product depots is continuous, and equally distributed with time; the ordering cost, ordering amount, and storage fee is unchanged; shortage penalty cost is neglected; the total amount of the depot is limited by the initial product inventory and the depot capacity; It is independent between every ordering time. 2.2 DSM Set up In this model,supplying time interval is t,and the productsupplying amount is Q; ordering fee is B, unit price of product is a,unit storage fee is c. According to the assumption above, it is easy to get that the storage fee is the lowest when inventory is zero.Thus, Q=Rt, t is the optimal supplying time. And the total storage fee is:

1 Y = B + aRt + cRt 2 . 2

(1)

Copyright 2012 by ASME

The

average

fee

every

day

y(t)

Y/t,

therefore, y (t ) = B + 1 cRt + aR , to take the differential

Unit storage fee is, c=0.018 RMB/(kga), and the average storage fee in the time t is:

action to y(t),and then the minimal y is calculated. So, we got

1 1 Rtc = 5464.555 t 0.000049 = 0.134t . 2 2


And the total average storage fee is:

t=

2B . cR

C (t ) = B / t +

1 Rtc = 0.134t + 5 / t 2

Thus, the product supplying time can be calculated as below: 2.3 A application example of DSM Assumption: 90# gasoline is stored in some depot; the marketing demand amount is predicted ,followed in the Table 1,Table 2 and Table 3 .(Notes: 30 days are divided into 3 periods,every one of which is 10 days, and thus improving calculation accuracy). Table 1: Prediction Amount of the first 10 days of 90# gasoline demand, kg 1 10th day total marketing demand by prediction
st

t0 =

2B 25 = = 6.11Day cR 0.000049 5464.555

So, the optimal supplying time is 6.11th days. The supplying time and supplying amount of every period are listed in the Table 5. Table 5:Product supplying time and amount of every period Period Supplying time(day) 1st 6.11 th 2 nd 2.13 th 3 th 3.57 th

amount

54645.55 5464.555

1st10th day average marketing demand amount per day by prediction

3. Model 2: Capacity Limitation Model (CLM) 3.1 CLM set up condition CLM considers that product demand is not uniformly distributed, which needs a demand function to describe it. We assume an schedule period is 30 days, which is divided into 3 parts with only one supplying of product in every part. The supplying amount is assumed as Q1, Q2, and Q3, greater than the least download amount from a pipeline. The selling amount is R1, R2, and R3. To get the lowest cost is the objective function of this model. 3.2 CLM set up

Table 2:Prediction Amount of the second 10 days of 90# gasoline demand, kg 10th20 th day total marketing demand amount by prediction 10th20th day average marketing demand amount by prediction 112690.7 11269.07

Table 3: Prediction Amount of the third 10 days of 90# gasoline demand, kg 20th30th day total marketing demand amount by prediction 20th30th day average amount by prediction marketing demand 159795.5 15979.55

The first time period: ordering fee is assumed to be 5 dollars, so the average ordering fee per day is 5/t RMB. Table 4:Price of different Product Product Type Price (RMB/kg) 90#gasoline 6.4 93#gasoline 6.5 0#dissel 7.2

Assumption: safe capacity of a depot is A; and the initial inventory is I; the price of the product is a; the ordering fee of an unit is b; storage fee per unit is c. In this model, only ordering fee and storage fee are taken into account, the transportation fee is neglected. Every time the ordering fee is the constant. To minimize the fee, we can get the following equations, where y(i) presents the amount of product which is seld in a period, xi presents supplying product amount;

Copyright 2012 by ASME

C1=c(I-y(1)+x1) C2=c(I-y(1)-y(2)+x1+x2) C3=c(I-y(1)-y(2)-y(3)+x1+x2+x3) Other constraint conditions are:

(2) (3) (4)

ordering amount is Q so the initial inventory is up to S=I+Q, the safety depot capacity is A. Therefore, Total income is :
r

1.Product inventory must be less than safety capacity of the depot; 2.Product demand amount must less than product inventory; 3.All quantities must be positive . The marketing demand function is got from gray prediction method, time series method, or BP artificial neural network method, which is chosen by the users. Considering that different product depots have different safety capacity and different initial inventory, the results are different. Therefore, a VC++ program is developed to calculate the optimal supplying time window and maximum profit with different initial variables, including initial inventory, safety capacity and product price.The program diagram is as follows:

a r (r )dr
0

(5)

Total ordering fee is: Total storage fee is :

B = b( S I )
C = c( S r ) (r )dr
0 S

(6) (7)

Total shortage fee is

E = e(r S ) (r )dr
s

(8)

So profit can be computed as follows: Profit = Sale Ordering fee Shortage fee Storage fee. M(S) is a continuous function of S, and by the derivation of S, the value of S is figured out when M is the largest. From the equation:

( r ) dr =

eb e+c

(9)

the critical value of S is calculated. Therefore, Q=S-I. The constraint condition is: 0<S-Y(t)<=A, which means that product shortage and capacity exceeding is never accepted. Then, supplying time is calculated. 4.3 (s, S)Model Both (s, S) Model and SSM can deal with both continuous random demand function problem and discredited demand function problem. However, they are different from dealing with product ordering fee: the ordering fee of (s, S) Model is only linked with the ordering times, which is independent of the amount of ordering product; SSM calculates the ordering fee only with the amount of ordering product. The ordering fee is relatively small for a product depot. while ordering fee is neglected in SSM, which is assumed a constant B in (s, S) Model to get value of S.

Fig.1. CLM program diagram 4. S-shape Storage Model (SSM) 4.1 SSM set up condition In this model, the demand of product is assumed to be continuous. Shortage penalty cost and ordering fee is also considered. Furthermore, the ordering fee, which is independent of the ordering times, is calculated by the quantity of product ordered. 4.2 SSM set up The demand intensity function is

(r ) and 0 (r)dr = 1

unit product price is a, unit ordering fee is b, unit storage fee is c, unit shortage fee is e, initial inventory is I, the product

Copyright 2012 by ASME

4.4 (s, S) Model set up condition The calculation of s: ordering fee is saved if the ordering action does not take place, therefore, an assumed value of s can satisfy the following inequalities:

In this model, supplying window can be calculated by (s, S) Model or CLM. The following inequality can also be applied: minimal download amount < initial inventory+ ordering amount Q product demand <= depot capacity. The ordering amount of a research period is Q, the profit is W(Q), the expectation value E[W(Q)]. So, Profit = Sale Income- Storage fee -Ordering fee - Shortage fee

a r (r )dr c
0

I +Q

0 I +Q

( S r ) (r )dr e (r S ) (r )dr B
s

a r (r )dr c
0

( s r ) (r )dr e (r s ) (r )dr
s

(10) From the calculation, s<S, and if s has more than one value, the least one of these values is selected. The storage strategy is to check the initial inventory at the beginning of a calculation period, when I<s, product ordering is needed. The ordering amount is Q, Q=S-I. And if I>s, the ordering operation is unnecessary. The calculation of S is the same as SSM, and the only difference is at the first period, the inequality s<S-Y(t)<=H should be satisfied. Initial inventory is assumed as I=250000kg, if I<S, then the amount of product ordering Q=S-I. The time for first product supplying is calculated by the equation:

Profit expected value is :

E [W (Q )] = Pr ( r ) dr + PQ ( r ) dr c (Q r ) ( r ) dr
0

( B + bQ ) ( r ) dr e ( r Q ) ( r ) dr
0 0
= P * E (r ) ( P + e) r (r )dr + ( P + e) Q (r ) dr Q 0

(c + b) Q r (r )dr +(c B) r (r )dr


0

(13)

In this equation, P*E(r) is a constant, which is called average profit. The maximum value of expected profit can be transformed to the minimum value of expected loss.
Q E[C (Q)] = P + e r (r )dr + (c + b) Qr (r )dr Q 0 (14)

(c b) r (r )dr ( P + e) Q (r )dr
0 Q

Y (t ) = I
t =1

(11)

and the next ordering time is calculated by the equation:


s < S Y (t ) < A .
t =1 T

E[C(Q)] is a continuous function of Q, and its minimal value can be computed by differential method throuth equation:.
dE[C (Q)] = (c + b) r (r )dr ( P + e) (r )dr =0 dQ 0 Q
Q
Q

(12)

(15) (16)

The inventory of the second period is I2=I1+Q-Y (t=10), the same method is applied to calculate the ordering amount and the supplying time. And the third period can be calculated in the same way. 5.Constant Optimum Model(COOAM) Ordering Amount

Noting That is, F(Q)=

F(Q)=

r (r )dr
0

5.1 COOAM setting-up condition The ordering amount is considered as constant, and demand function is continuously and randomly distributed (initial inventory is neglected).

p+e (17) c+b+ p+e Q* is calculated from these three equations; Q* is the arrest 2 point of E[C(Q)]. d E[C (Q )] = c (Q ) + P (Q) > 0 . d 2Q So Q* is the minimum value of E[C(Q)], and is also the minimum value of this model.
6. (q-Q) Model 6.1 (q-Q) Model setting-up condition

Copyright 2012 by ASME

(q-Q) Model content: the checking of depot inventory is continuous, if storage amount is lower than q, ordering amount of Q is required, and then, after the delayed time interval of L, product of the amount of Q is stored. Product ordering critical point q, ordering amount Q and delay time L (L>0) are determined with this model. In the time interval L, product demand is assumed as a random variable r , the probability density function is E(r)=. Before the ending of delayed time L, if the demand for product is bigger than q, product shortage will exist. And if the inventory of a depot deduced to zero, the shortage of the product demand is accumulated, and it will be made up when product arrives. That is called appointed shortage. The ordering fee is b , unit storage fee is c , unit shortage fee is e .The ordering amount Q and delay time are considered as constants, meanwhile, the product supplying time interval t is not known, and the inventory of the depot is not the same amount.Total average fee per time unit is assumed as F; F=ordering fee+ storage fee + shortage fee During a period, product demand is a random variable r, and its expected value E(r) and the expected value of demand value r in delayed time L has the following relationship: =LE(r). The ordering amount is Q, so the expected value of the times per time unit is E(r)/Q=/(LQ). Therefore, the expected value of ordering fee per time unit is b /(LQ). Shortage of product only exists in the delay time L. At the beginning of this time period, the initial inventory is q, and random demand variable is r . When r <q, shortage amount is zero; and when r >q, the shortage amount is (r -q). So the expected value of shortage amount in delay time L is,

Thus, the expected value of total average storage fee is E(f)=b /LQ+E(Q/2+q-)+e a /(LQ). (19)

(r ) is known and its expected value

The first ordering partial derivatives q and Q of the last equation is taken, and is set zero. And in the equation of q and Q, variables are correlated. Thus, iteration method is applied in solving the problem. Assumptions:

0 = 0Q 0 = +q 0 = +, k = 1 = k 1solve Q k Set Q = Q k solve q k , q = q k , solve k


Judge if

Q k Q k 1 < 1 , q k q k 1 < 2 is correct; if

so, output Qk and qk; otherwise, repeat iteration.

7.Whole Period Model (WPM) 7.1 WPM set up condition


The several models above divide 30 days into 3 sections, and then solve the supplying time of each section. In this model, 30 days is considered as a whole to calculate the time window. Assuming that times of product supplying is in some period, and they are distributed at the i1s, i2s ins day. The supplying amounts are x(1), x(2) x(n), 0<n<30 n<i. Initial inventory is I, ordering fee is B, safety capacity is H, unit storage fee is c, y(i) is the product demand of is day.

Y (i ) =

n = 30 i =1

y (i )
n =30 i =1 n 1 n 2

(20)

Thus, total profit of the 30-day period is

= 0 (r )dr + ( x q ) (r )dr = (r q) (r )dr


0 q q

nI Y( i ) + ( i i + 1)X (1) + ( i i + 1)X ( 2 ) + nB M = c + ...X ( n )


(21) Limitations: (1)Sale amount each day is less than the inventory. (2)Product inventory is less than safety capacity. The program diagram is as follows:

(18)

An analysis of storage fee: the inventory of a depot is a ladder shape in a ordering period t. The left value of the ladder is Q+q-, and the right value is q-, so the area of this ladder is (Q+q-+q-)t/2. Therefore, the expected value of storage fee per time unit is E(Q/2+q-).

Copyright 2012 by ASME

ARIMA(1,1,1)(0,1,1) take the logarithm:

yt, = lnytyt,1 = lnyt 1yt,12 = lnyt 12et,1 = lnet 1 yt, = 0.345 yt,1 + 0.941et,1 + 0.689 yt,12 + 0.001
1.0
1.0

0.5

0.5

0.0

0.0

-0.5

-0.5

-1.0
1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5

-1.0
1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5

Fig.3. Error residual correlation figure

Table 6 YearMonth

Prediction Output unit: ton 95%confidence 95%confidence Value interval upper limit 768.71 2010-1 396.67 1489.71 (990.45) 806.60 2010-2 393.97 1651.42 (905.89) 2010-3 43165.22 20630.78 90313.42 2010-4 53124.93 25150.20 112216.15 2010-5 73529.67 34614.54 156194.83 2010-6 72740.69 34102.57 155155.66 Notes: data in brackets is from sales data

Output TIME fmin

Fig.2. Model 7s Program Diagram 8. An project Example


ARIMA model of time series analysis is applied for the prediction of the sale of 0# diesel of some depot, Sinopec. That is, data of monthly sale amount of 0# diesel from the beginning of 2005 to the end of 2009 is applied to predict the monthly sale in the first half of the next year. ARIMA (1, 1, 1) (0, 1, 1) model of high accuracy is setup by time series analysis module provided by SPSS software. From the figure below, residual error information is fully extracted, and its randomness is apparent.

The following is a Q-q model example for the supplying time calculation in March, 2010. The daily sales of the depot satisfies the normal distribution of ,N(,0)=1392.42 ton, =0 ton. Ordering fee is 63800 RMB, storage fee b=0.049, shortage cost c=74.25, L=7. After getting the Q and q, the optimal oil-supplying time window is got by the similar method with (s,S)model and has bring economical pipeline schedule plan for the depot.

9. Conclusion
Considering the batches-feature of product pipelines, 7 models for supplying time window calculation are set up, and solutions of optimal supplying window are analyzed. Moreover,3 marketing demand prediction methods ,including Time series method, gray prediction and BP artificial neural network are combined into the models to gain the optimal oil-

Copyright 2012 by ASME

supplying amount and time, which has been programmed into a software and put into application. It is this software that can reduce the cost of the pipeline operation and is of great significance to make the pipeline distribution schedule plan.These models are used under different situations to guarantee a better prediction.

Liang Yongtu,LuCen,Fang Tao,2010,The overview of Scheduling for Products Pipeline Operation[J]Journal of Oil and Gas Technology,2012,Vol 32,issue 5,pp355-359 Teaching Material Writing Group,2000,Operations Research revised edition[M] Tsinghua Universtiy Press.March. Galligo G,Moon I.1993, The distribution free newsboy problem:review and extensions[J]Journal of the Operational Research Society,Vol 44,pp825-834 Xue Jinxing,Xue Yi,2005, Optimization model and LINDO / LINGO software[M] Tsinghua University Press. Xu Bo,Liu Zheng,2000,MatLab Engineering Application[M] Tsinghua University Press Lorenzo TiacciStefano Saetta. 2008, An approach to evaluate the impact of interaction between demand forecasting method and stock control policy on the inventory system performances[J]the International Journal of Production Economics,Vol 38,pp358-361. Kong Qingxia,Lu Qihui,2006, Demand Model of Stochastic Customer Choice and its Application in Inventory Control[J]Logistics Technology,Issue 7,pp127-130 Fu Li,Mu Dong,2007,Study on Inventory Control of DemandModel Based on Compound Distributation [J]Logistics Technology,Issue 5,pp55-71 Hong Nan. 2003, SPSS for Windows statistical product and service solutions [M].Tsinghua University Press Xue Wei, 2009, SPSS statistical analysis method and its application,(2ed Edition)[M] Electronics Industry Press Refik Gtulltu. 1997, Two-echelon Allocation Model and the Value of Information under Correlated Forecasts and Demands[J]European Journal of Operational ResearchVol 9,pp386-400.

ACKNOWLEDGMENTS
This work has been undertaken within the Science and Technology Development Project.The authors wish to acknowledge the contributions made to this project by the Lanzhou-Zhengzhou-Changsha Multiproduct Pipeline Company,Zhenzhou Depot of CNPC, Changxindian Depot of SINOPEC. The authors wish to express their sincere gratitude for this support.

REFERENCES
Liang Yongtu, 2006, Scheduling Software for Multi-product Pipeline[C]International Pipeline Conference,Calgary,Canada,pp22-27 . Diego C. Cafaro, Jaime Cerda,2007, Dynamic scheduling of multiproduct pipelines with multiple delivery due dates [J] Computers and Chemical Engineering ,Vol 32,Issue4-5,pp728753. Li Ming,Gong Jing,Liang Yongtu,2009,Scheduling Software aids pipeline design[J] Oil & Gas Journal, Vol 107 , Issue 9,pp 56-58. Liang Yongtu,Gong Jing etal,2004, Optimal operation of multi-product pipeline[J] Journal of the University of Petroleum, China, Vol 28 ,Issue 4 ,pp97-101. Li Xin,Chen Daen,Hechun,2005,Storage Theory Application in the Oil Product Inventory Management[J] International Petroleum Economics, Vol 13,Issue 4,pp28-30.

Copyright 2012 by ASME

You might also like