Research on Refined Oil Distribution Plan Based on Dynamic Time Window

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.


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 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.

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.

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.

Model Hypothesis
1) Assuming that all types of distribution vehicles are adequate and are parked at the depot.
Q. Liu et al.
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.

Parameter Setting
i: the number of gas station, ; 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.

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: ∑∑ Journal of Applied Mathematics and Physics

2) Constraints
Gas station i can be supplemented refined oil by a delivery vehicle at most at time t [8]: The inventory of the gas station i must be less than the capacity at time t: The paper ensures that the gas station i is not out of stock at time t: 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.
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: The end time of the oil supplement is as follows: 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 0 is T t ∆ ≤ , this paper considers unloading the refined oil to two gas station by using a vehicle with two compartments.

b) When
and 2 i i V W q − > × , this paper considers unloading the refined oil to gas station i by using a vehicle with two compartments.c) When V W q − < × , this paper considers unloading the refined oil to gas station i by using a vehicle with one compartments.
In the formula, ∆T is the difference between the start time of any two gas stations' time window.
Q. Liu et al.

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.

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.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.

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.

Q.
Liu et al.DOI: 10.4236/jamp.2017.5111722105 Journal of Applied Mathematics and Physics 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.

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

Table 2 .
The information of distribution vehicle.