**Journal of Applied Mathematics and Physics**

Vol.05 No.11(2017), Article ID:80158,8 pages

10.4236/jamp.2017.511172

Research on Refined Oil Distribution Plan Based on Dynamic Time Window

Qian Liu, Lianhua Wang^{*}, Le Yu^{ }

Beijing Wuzi University, Beijing, China

Copyright © 2017 by authors and Scientific Research Publishing Inc.

This work is licensed under the Creative Commons Attribution International License (CC BY 4.0).

http://creativecommons.org/licenses/by/4.0/

Received: September 27, 2017; Accepted: November 4, 2017; Published: November 7, 2017

ABSTRACT

Based on the analysis of the refined oil distribution plan which includes the various vehicles models-single oil-multiple gas stations. This paper puts forward the dynamic time window of oil supplementation based on every moment, and establishes the mathematical model of the refined oil distribution plan, using C language, taking various circumstances of the model into account to find the optimal solution through several operations. This process can make the refined oil distribution plan and the distribution route is more reasonable. At the same time, the distribution cost is lowest. Through the analysis of the experimental results, the validity and algorithm of the model are proved.

**Keywords:**

Refined Oil Distribution, Vehicle Scheduling Problem, Time Window, Optimized Model

1. Introduction

With the rapid development of Chinese economy and society, logistics is becoming an indispensable part of enterprise economic activities, and its importance is increasing day by day. The petroleum and petrochemical industry is an important guarantee for the country economic and social development, and this profession is the pillar of Chinese economy [1] [2] . After years of development, the industry has gradually matured and formed a market competition pattern dominated by Petro China, Sinopec, China National Offshore Oil Corporation. In the face of such a diverse and competitive market environment, it is more important for petroleum and petrochemical enterprises to maintain their market share and higher profit margins. In order to improve their own management model and reduce the logistics operation cost, as the terminal part of the supply chain of the petroleum and petrochemical enterprises, refined oil distribution is a good breakthrough. By improving the logistics link, it can greatly reduce the enterprise’s logistics and distribution costs, and fundamentally improve the enterprise’s core-competitiveness.

In terms of its form, the issue of refined oil distribution is a problem of transport dispatching. For this problem, a large number of studies consider more about how to meet the balance of transport capacity and less consider the time constraints in the transport process. In fact, product oil has special requirements for transportation time during distribution. If the schedule is not good, it is easy to appear the phenomenon of out of stock and waiting for unloading. On the basis of previous studies, this paper combines the characteristics of oil product distribution, and puts forward the dynamic time window of oil supplementation based on every moment, and uses the C language to solve the model, so as to make the distribution plan more reasonable, which makes the distribution problem of the refined oil more in line with the actual situation.

2. Problem Description

All kinds of resources in the process of refined oil distribution are form a very complex distribution network [3] [4] , including oil depots, gas stations, transport vehicles and so on. The purpose of distribution dispatching is to generate the resource scheduling scheme which has the best benefit or the lowest cost under the restrictions of transportation resources, storage capacity, transportation time and other factors. Specifically, the route of each vehicle, the delivery time and quantity of each distribution location are shown in table [5] , so as to achieve the goal of minimum transportation cost. There are a stable supply and demand relationship between the oil depot and the gas station, so this paper takes a single oil depot as the object of study. The oil depot that has two types (single or double cabins) delivery vehicles delivers the same kind of oil to a series of gas stations during the business hours. In the case of ensuring every gas station is not out of stock at any moment, according to the inventory in the tank, this paper makes the delivery plan of the day, reasonably arranging the distribution vehicle, distribution route and time to make the delivery cost lowest.

3. Model Building

Before building a model, it is necessary to define some of the constants and variables necessary to build the model in advance, some of which are summarized by long-term tests and are generic. But some of the data can be adjusted and set according to the actual situation.

3.1. Model Hypothesis

1) Assuming that all types of distribution vehicles are adequate and are parked at the depot.

2) The delivery vehicles should be fully loaded (including all compartments), that is, when the vehicles leave the depot, each compartment needs to be filled with refined oil [6] [7] .

3) The refined oil in the same compartment must be unloaded to the same gas station. The refined oil in different compartments of the same car can be unloaded to different gas stations.

4) Assuming that the running time from the depot to the gas station and from one gas station to another gas station is t_{0} hours, and the loading time and the unloading time are ignored.

5) Assuming that every gas station unloads refined oil at the whole point of time, and the sales per hour is constant during the business hours.

6) Each gas station can use one oil truck at most to supplement refined oil at each moment.

3.2. Parameter Setting

i: the number of gas station, $i=1,2,\cdots ,N$ ;

t: the business hours of gas station, $t=0,1,\cdots ,M$ ;

f_{i}: Sales per hour of gas station i;

q_{s}: the compartment capacity of the vehicle which has one cabin;

q_{d}: a compartment capacity of the vehicle which has two cabins;

V_{i}: the capacity of the gas station i;

C_{s}: the single-trip shipping cost of the delivery which has one cabin;

C_{d}: the single-trip shipping cost of the delivery which has two cabins;

W_{it}: the inventory of the gas station i at t;

Q_{i}: safe stock of gas station i;

T_{is}: the time that gas station i begin to supplement refined oil;

T_{ie}: the time that gas station i finish supplementing refined oil;

X_{it}: binary variable. X_{it} = 1, if gas station i use a delivery vehicle which has one cabin to supplementing refined oil at t. X_{it} = 0, otherwise;

Y_{it}: binary variable. Y_{it} = 1, if gas station i use a cabin of delivery vehicle which has two cabins to supplementing refined oil at t. Y_{it} = 0, otherwise;

Z_{it}: binary variable. Z_{it} = 1, if gas station i use two cabins of delivery vehicle which has two cabins to supplementing refined oil at t. Z_{it} = 0,otherwise.

3.3. Building the Model

Based on the above problem description, model assumptions and parameter settings, the vehicle scheduling model is established:

1) Objective function

According to the above description, this paper mainly considers the transportation costs of distribution vehicles, and takes the lowest delivery cost as the optimization target:

$\mathrm{min}C={C}_{s}\times {\displaystyle \underset{i=1}{\overset{N}{\sum}}{\displaystyle \underset{t=0}{\overset{M}{\sum}}{X}_{it}}}+{C}_{d}\times \frac{{\displaystyle \underset{i=1}{\overset{N}{\sum}}{\displaystyle \underset{t=0}{\overset{M}{\sum}}{Y}_{it}}}}{2}+{C}_{d}\times {\displaystyle \underset{i=1}{\overset{N}{\sum}}{\displaystyle \underset{t=0}{\overset{M}{\sum}}{Z}_{it}}}$

2) Constraints

Gas station i can be supplemented refined oil by a delivery vehicle at most at time t [8] :

${X}_{it}+{Y}_{it}+{Z}_{it}\le 1$

The inventory of the gas station i must be less than the capacity at time t:

${W}_{it}\le {V}_{i}$

${W}_{it}={W}_{i\left(t-1\right)}+{q}_{s}\times {X}_{it}+{q}_{d}\times {Y}_{it}+2\times {q}_{d}\times {Z}_{it}-{f}_{i}$

The paper ensures that the gas station i is not out of stock at time t:

${W}_{it}-{f}_{i}\ge 0$

Because the running time from the depot to the gas station and from one gas station to another gas station is t_{0} hours. In principle, we should ensure that each gas station is not out of stock in the next t_{0} hours when the delivery task is arranged. Therefore, it is determined that the minimum inventory of refined oil at the gas station when the delivery task is arranged.

${Q}_{i}={t}_{0}\times {f}_{i}+\delta $

In the formula, δ means the minimum inventory of refined oil when the gas station is filling up.

When the inventory of the gas station reaches Q_{i}, it is necessary to issue the task of oil distribution. According to the storage and the sales of the gas station at every moment, it is necessary to predict the time period that the refined oil is expected to be delivered, that is to say, to determine the dynamic time window about supplementing refined oil.

Taking the t moment as the benchmark, the start time of the oil supplement is as follows:

${T}_{is}=\frac{{W}_{it}-{Q}_{i}}{{f}_{i}}$

The end time of the oil supplement is as follows:

${T}_{ie}={T}_{is}+{t}_{0}$

At the t moment, the vehicle scheduling can be divided into three cases by the oil time window [9] [10] :

a) When the T_{is} of the two gas stations are the same or when the T_{is} of the two gas stations are the different and
$\Delta {T}_{is}\le {t}_{0}$ , this paper considers unloading the refined oil to two gas station by using a vehicle with two compartments.

b) When $\Delta {T}_{is}>{t}_{0}$ and ${V}_{i}-{W}_{i}>2\times q$ , this paper considers unloading the refined oil to gas station i by using a vehicle with two compartments.

c) When $\Delta {T}_{is}>{t}_{0}$ and ${V}_{i}-{W}_{i}<2\times {q}_{d}$ , this paper considers unloading the refined oil to gas station i by using a vehicle with one compartments.

In the formula, DT_{is} the difference between the start time of any two gas stations’ time window.

4. Model Solution

C language is an important programming language of computer software, which is widely used in computer software programming. Computer software programming based on the C language can greatly simplify the difficulty of programming and improve the accuracy of program operation results, and have the characteristics of quick solution speed and so on [11] [12] . Therefore, this paper uses C language to program the model.

1) Setting the opening time of the gas stating T = 0.

2) Calculating the inventory and time window according to the formula.

3) Judging whether to distribute according to the time window. When the start time of time window is equal to 0, it indicates that the inventory can be still sold for t_{0} hours. At this time the vehicle begins to deliver.

4) Putting the constraint conditions into the loop control distribution.

5) Distribution plan:

(a) When the number of the start time of time window is equal to 0 is 1, according to the capacity and the inventory of gas stations to decide to use the vehicle with one compartment or two compartments.

(b) When the number of the start time of time window is equal to 0 is 2, the priority will be given to the vehicle with two compartments, which will be deliver refined oil to two gas stations.

(c) When the number of the start time of time window is equal to 0 is more than 2, it’s going to be distributed by (b) and then by (a).

6) After refueling, let T = T + 1. Go to step 2).

7) Until T = M, end the loop.

8) Outputting the final result and getting the delivery cost.

5. Case Analysis

There are five gas stations in the area. The daily business hours are from 8:00 to 22:00, and the gas stations have the same kind of refined oil and are delivered by the same oil depot. The basic information of each gas station is shown in Table 1. The oil depot has two types of delivery vehicles, and each type of distribution vehicle is abundant, meanwhile compartment information and single trip freight are shown in Table 2. The delivery vehicles are parked at the depot and start working at 7 o’clock in the morning. The time between the oil depot and the gas stations, and the gas stations was one hour. The running time from the depot to the gas station and from one gas station to another gas station is one hour. In order to ensure the each gas station is not out of stock, it is reasonable to arrange the delivery plan and the delivery route of each delivery vehicle to make the delivery cost lowest.

Based on the model and solution process, the distribution plan of gas stations is shown in the following Table 3.

According to the distribution plan, we can get the distribution route of vehicles in the following Table 4.

Table 1. The information of gas stations and tanks unit: liter.

Table 2. The information of distribution vehicle.

Table 3. Distribution plan unit: liter.

Table 4. Distribution route of vehicles.

According to the distribution plan, it can be concluded that the lowest delivery cost is 2 * 100 + 12 * 120 = 1640 yuan.

From the calculation result we can see that every gas station can successfully complete the supplementary task by using the proposed model and the method of solving, which is not appear the phenomenon of lacking of oil and wait for unloading. At the same time, making the whole freight as low as possible.

6. Conclusion

In this paper, based on the characteristics of refined oil distribution under the conditions of multiple vehicles, single oil and multiple gas stations, the paper establishes the distribution planning model of refined oil with the lowest freight rates as the objective function, the inventory of the gas station is less than the capacity and the gas station is not out of stock at any moment and other conditions as constraint conditions. The designs process of C language solves the model. The results prove that a feasible scheme can be obtained by using this model and algorithm. This paper only considers the factors such as vehicle transportation cost, gas tank volume, but in practical situation, the distribution problem of refined oil is also limited by the number of vehicles and the distance between the gas stations. In the future research, we can improve the model, increasing the influence factors and constraints, so as to increase its applicability.

Fund

Teaching Master of Beijing GaoChuang project Beijing (G02040011).

Cite this paper

Liu, Q., Wang, L.H. and Yu, L. (2017) Research on Refined Oil Distribution Plan Based on Dynamic Time Window. Journal of Applied Mathematics and Physics, 5, 2104-2111. https://doi.org/10.4236/jamp.2017.511172

References

- 1. Sun, T. (2012) The Research of Vehicle Scheduling Problem in Refined-Oil Secondary Logistics Distribution. Wuhan University of Technology, Wuhan.
- 2. Yu, G.Y. (2016) Research on Vehicle Scheduling Problem of the Refined Oil Secondary Logistics Distribution. Chongqing Jiaotong University, Chongqing.
- 3. Song, J.W. and Rong, G. (2003) Time Window Confirmation and Transportation Arrangement of Oil Distribution. Systems Engineering-Theory & Practice, 4, 63-69.
- 4. Liu, W.D., Li, S.J. and Liao, M.Y. (2005) Research on Scheduling and Optimization of Oil Distribution Plan. Logistics Technology, 9, 22-25
- 5. Yin, Q. and Dong, L.M. (2001) Discussion on the Refined Oil Distribution by Highway. Oil Depot and Gas Station, 10, 1-3.
- 6. Jin, L., Li, S.J. and Tang, L. (2007) Research on Refined Oil Distribution Plan Based on Heuristics Algorithm. Logistics Technology, 26, 58-60.
- 7. Liu, W.B., Yang, B., Yan, G. and Li, H.B. (2017) Real-Time Vehicle Scheduling Algorithm Based on Local Optimal Strategy. Journal of Yibin University, 9, 1-7.
- 8. Cheng, S.X. (2015) The Research of Refined Oil Secondary Distribution Vehicle Route Optimization Problem Based on C-W Saving Algorithm. Chang’an University, Xi’an.
- 9. Hu, Y.Q. (2007) Operations Research Tutorial. Third Edition, Tsinghua University Press, Beijing, 50-60.
- 10. Spliet, R. and Desaulniers, G. (2015) The Discrete Time Window Assignment Vehicle Routing Problem. European Journal of Operational Research, 244, 379-391. https://doi.org/10.1016/j.ejor.2015.01.020
- 11. Zhang, J.W. (2017) Computer Software Programming Analysis Based on C language. Electronics World, 5, 69.
- 12. Wei, P.P. and Cui, Z.W. (2017) C Language Programming Course Teaching Thinking. Computer Era, 9, 64-66.