# Research on distribution route with time window and on-board constraint based on tabu search algorithm

- 91 Downloads

**Part of the following topical collections:**

## Abstract

In order to solve the problem of the optimization of delivery and pickup cargoes’ routes with time windows under the constraints of load and road, the method and algorithm were designed and researched based on these factors. Firstly, the model was built with the constraints of truck number, load quality, load capacity, maximum distance, and customer service time in order to minimize the transportation cost and time cost. Then, the Floyd Algorithm was used to determine the moving path and the shortest distance between each point with the road constraint. 0-1 integer programming method was used to determine the number and type of vehicles. Tabu search algorithm was used to determine the order of delivery and pickup points and the distribution route based on the influence of job requirements of pickup cargoes, the time cost, and the transportation cost. Finally, the case was given to verify the effectiveness of the proposed method. This method can be used to improve the efficiency of delivery and pickup cargoes and the level of distribution service.

## Keywords

Tabu search algorithm Time window Distribution path planning Road constraints## 1 Introduction

As the distribution of e-commerce is increasing, how to use the distribution information platform to analyze the data and optimize the distribution path becomes more and more important [1]. The distribution process has become more complex, because it includes not only the delivery process, but also the pickup process. The pickup information by radio communication is random, which changes the original distribution plan and increases the complexity of distribution. The multi-objective model constructed by Zheng and Cheng and Song et al. took into account the influence of the distribution service level on the distribution line, but the road constraints encountered in the distribution process were not taken into account [2, 3]. Li et al., Wen and Shen, and Ding and Jiang proposed the solution of distribution lines based on road constraints, but they lacked the consideration of the customer service level and load restrictions [4, 5, 6]. Li et al., Weng et al., Bie and Li, Bülent, Olcay et al., and Yong et al. had proposed solutions to plan the route of cargo delivery, but they had not taken into account the problem of on-board restrictions on the delivery of cargoes [7, 8, 9, 10, 11, 12, 13, 14, 15]. Based on various scholars’ valuable research, this paper studied a distribution route planning problem with time windows and the constraints of delivery and pickup cargoes’ process, load and roads. The twice tabu search algorithm was designed based on the Floyd Algorithm and 0-1 integer programming algorithm by MATLAB software. Finally, an example was used to validate the method in determining the delivery and pickup sequence and route planning.

## 2 Methodology

### 2.1 Analysis of the problem

The known values which including the truck total quantity, each truck maximum load, each truck maximum distance for distribution, the geographic information of intersection and delivery and pickup cargoes, volume and weight of cargoes were defined based on the information system of distribution center.

- (1)
Each truck started from the distribution center and reached each customer along a route back to the distribution center.

- (2)
Delivery cargo trucks followed the road that is not across the building.

- (3)
The road was a two-way road.

- (4)
The cargo volume was less than the rated load capacity of the truck (considering the load condition of flexibility, the rated load capacity of the truck would be multiplied by the factor 0.8).

- (5)
The cargo weight was less than the rated load of delivery trucks not including the driver weight (assuming the driver weight is 60 kg).

- (6)
The total volume and weight of the cargoes were less than the rated capacity of all the trucks.

- (7)
The number of express staff was greater than or equal to the number of delivery trucks.

- (8)
According to the separation principle of delivery and pickup parcels, it was possible to carry out the pickup cargoes’ work only when the spare capacity of the delivery truck exceeded half of its rated load capacity.

### 2.2 Establishment of mathematical model

#### 2.2.1 Determination of objective function

where *O* is the transportation cost in the distribution process and *P* is the total time cost.

where *S* is the location set, *H* is the customer location set, *V* is the truck set, *X*_{ijk} means truck *k* was from location *i* to customer *j*, *C*_{ijk} means unit transport cost of truck *k* from location *i* to location *j*, and *d*_{ij}means the shortest distance between location *i* and location *j*.

The variables in the model were explained as follows: *p*_{k} (*t*_{i}) is the penalty cost because truck *k* serviced customer *i* on time *t*_{i}; *t*_{i} is the time when the truck actually arrived at the customer site; *c*_{1},*c*_{2} were the maximum penalty cost because the truck *k* was early or late to service customer *i*; *a*_{1},*a*_{2} are the positive coefficients of the penalty cost of the early or late arrival of the truck, which reflected the importance of time to customers; *T*_{1} is the starting point of time window when customer *i* was served; *T*_{2} is the end point of time window when customer *i* was served.

#### 2.2.2 Constraint description

The variables in the model were explained as follows:

*Q* is the distribution address set before the start of the pickup cargoes, *E* is the distribution address set after the pickup cargoes, *N* is the distribution address set, *F* is the pickup address set, *X*_{ilk}presents whether the cargoes were transported from location *i* to location *l* by truck *k*, *h*_{j} is the cargoes’ quality of customer *j*, *q*_{j} is the cargoes’ volume of customer *j*, *M*_{k} is the maximum load capacity of truck *k*, *W*_{k}is the load space of truck *k*, *Y*_{ik} is whether truck *k* serviced the distribution point, *U*_{ik} is the access order of customer *i* on the driving route of truck *k*, *U*_{ik} is the access order of customer *j* on the driving route of truck *k*, and *D*_{k} is the maximum driving distance of truck *k*.

### 2.3 Solution of model

#### 2.3.1 Algorithm for solving the problem

*kl*.

Secondly, the access from one distribution center back to the same distribution center was calculated by a tabu search algorithm for the first time with the target of minimizing the driving distance.

Thirdly, the access was randomly divided to match *kl* parts; each part must ensure that the corresponding truck could load the delivery goods and pickup goods separately. By calculating the numerical value of the distance between the first item of subsequence and the distribution center by adding the distance between subsequence tail and the distribution center and subtracting the distance between each subsequence, the minimum numerical value condition was selected as the optimal grouping.

Then, in consideration of the delivery and pickup rule and the time window, the second time tabu search algorithm was used to optimize each sequence in the optimal group with the fixed distribution center as the first and last member of the sequence aiming at minimizing the cost.

Finally, we examined whether the total distance of the traveling path to each sequence exceeded the rated driving limit of the truck. If it exceeded, we increased the quantity of truck used by one and the solution should be re-planned. Else, the optimization result will be displayed.

#### 2.3.2 Initial optimization of distribution path

Step 1: Reading the coordinate information of cargo address and road intersections was marked as distribution path points by the Arabic numeral. The distance was calculated between cargo address and other cargo address, cargo address and intersection, and intersection and another intersection.

- (1)
Determine the shortest driving distance.

*path*represented the shortest distance between any two points of the

*n × n*matrix. The shortest distance between two points was calculated by the Floyd Algorithm. If the shortest distance between two points was not past the third point, the corresponding element of the matrix was the column number. If the shortest distance between two points passed through the third point, it was a number value of the third point. For example,

*path*(

*i*,

*j*) =

*j*meant

*i,j*points were directly connected along the road.

*Path*(

*i,j*) =

*k*meant the shortest distance between point

*i*and

*j*should pass point

*k*.

- (2)
Determine the driving path.

The path *router* was defined as an *n* × *n* cell array; *router*{*i,j*} represented the shortest path from point *i* to *j.* If *i* was equal to *j*, router{*i*, *i*} = [*i*]. If *i* and *j* were not equal, when *path*(*i,j*) = *j*, router{*i,j*} = [*i,j*] or when *path*(*i,j*) = *k*, *path*(*i,j*) = [*i, k, j*].

- (1)
Determine the truck quantity.

*kl*was determined based on the weight and volume requirements of the delivery cargoes.

- (2)
Determine the truck specification.

0-1 integer algorithm was used to determine the truck specification. The minimum rated capacity of all trucks was set as the target function. *kl* is the upper limit of the number of trucks, so as to ensure that the cargoes could be fully loaded as the constraint conditions.

#### 2.3.3 Design of the distribution path algorithm based on the pickup cargo information

Step 1: Initial planning. In the case of only considering the minimum distance, tabu search algorithm was used to calculate the optimal sequence based on the shortest distance matrix of all the cargo addresses. Address information of cargo and distribution center was randomly selected as the initial solution.The neighborhood search was made by pairwise interchange. The round number of \( \sqrt{a} \) (*a* was the sequence number) was set as the tabu length. 50*a* was set as the maximum iterations to calculate the optimized sequence.

Step2: Sequence division. *th* groups of sequences were randomly generated. The initial route *S* was divided into *kl* variety groups. *t* feasible solutions were found out based on the volume and weight of truck load capacity. Then, the least increase distance (the distance between the distribution center and subsequence header + the distance between the distribution center and subsequence tail − the distance between two subsequences) was made as the target to determine the optimal grouping situation, adjust the sequence order of optimal grouping, and form the initial solution which meets the service process.

Step 3: Optimize again. *kl* sequences were optimized with a minimum target function of time cost and transportation cost. The minimum cost was set as the target based on the time window and the rules of the pickup cargoes. The tabu search algorithm was used to re-adjust each sequence to obtain the optimal sequence. The first element of the initial solution was distribution center, the others was the sequence gotten from the second step. After the first element was fixed in the sequence, neighborhood search was made by pairwise interchange. Neighborhood space constraints included two conditions. One was that when the free space of the truck was more than half of the truck load, the pickup cargo business started. The other was that before the delivery cargo business was completed, the pickup cargoes should not be more than half of the truck load.

#### 2.3.4 Inspection and display

Inspection included whether distance traveled was more than the rated distance traveled. If not, it was displayed that black lines were road routes, the yellow point was the distribution center, and the red line was the driving route, or else the truck number was added once more and grouping planning was made again. If the truck did not meet the requirements, it indicated “the existing equipment cannot meet the requirements, please add new equipment.”

## 3 Experiment and discussion

### 3.1 The example design

*C*

_{ijk}was 3.5 yuan/km. If it was not more than the service time range of 1 h before and after,

*x*was time delta/60 yuan (time is measured in minutes), or else,

*x*was 2 yuan (

*a*

_{1}=

*a*

_{2}= 1,

*c*

_{1}=

*c*

_{2}= 2). Road information is shown in Table 1 and Table 2. (The serial number was identification of this street/road.) The information of the delivery and pickup cargo and their respective service requirements are shown in Table 3 and Table 4. (If the road number was 0, it indicated that it did not belong to the road.) The truck information is shown in Table 5.

Street/road numbering (part)

Street | Numbering (north-south) | Road | Numbering (east-west) |
---|---|---|---|

Tieshun Street | 1 | Hexing Road | 1 |

Tielu Street | 2 | Ngbin Alley | 2 |

Second Kangning Street | 3 | First Hexing Street | 3 |

Information on street/road junctions (part)

Intersection
| Intersection
| Street number on the intersection | Road number on the intersection |
---|---|---|---|

2.127 | 35.746 | 2 | 4 |

− 3.5873 | 25.9683 | 2 | 5 |

− 12.0106 | 9.2487 | 2 | 7 |

− 22.8889 | − 5.1852 | 2 | 8 |

Information on delivery of cargo (part) (scale is 1:20,000)

Index | Order 1 | Order 2 | Order 3 |
---|---|---|---|

Mark number of each distribution point | 1 | 1 | 1 |

Address of the | − 18 | 6 | 0 |

Address of the | 23 | 44 | 34 |

North-south road number | 1 | 2 | 2 |

East-west road number | 0 | 0 | 0 |

Volume | 7,020,000 | 1,125,000 | 7,020,000 |

Weight | 1 | 2 | 3 |

Upper limit of time | 8 | 10 | 10 |

Lower limit of time | 10 | 12 | 12 |

Information on the collection of cargo (part) (scale is 1:20,000)

Index | Order 1 | Order 2 | Order 3 |
---|---|---|---|

Mark number of each distribution point | 2 | 2 | 2 |

Address of the | − 42 | − 6 | − 36 |

Address of the | 8 | 24 | 8 |

North-south road number | 0 | 2 | 0 |

East-west road number | 8 | 0 | 8 |

Volume | 1,120,000 | 936,000 | 4,784,000 |

Weight | 2 | 2 | 1 |

Upper limit of time | 10 | 10 | 8 |

Lower limit of time | 12 | 12 | 10 |

The vehicle information

Type of vehicle | Speed of vehicle | Number of vehicle | Vehicle continued mileage | Maximum carrying capacity | Maximum carrying weight M |
---|---|---|---|---|---|

1.3-m truck | < 25 km/h | 1 | < 60 km | 1300–900–890 | 200 |

1.4-m truck | < 25 km/h | 2 | < 60 km | 1400–950–1050 | 300 |

### 3.2 Tabu search design based on MATLAB

According to the initial planning, sequence planning, and re-optimization in the tabu search design, the design of MATLAB code editing was carried out. The main coding of the optimization was as follows.

The code 1

Number of rows | Code |
---|---|

1 | if zzz(Si(i,j),1)==1 peiz1(i)=peiz1(i)+zzz(Si(i,j),7); |

2 | peiz2(i)=peiz2(i)+zzz(Si(i,j),6); |

3 | end |

4 | if zzz(Si(i,j),1)==1 |

5 | pei1(i)=pei1(i)+zzz(Si(i,j),7); |

6 | pei2(i)=pei2(i)+zzz(Si(i,j),6); |

7 | kong1(i)=at(1,2)-peiz1(i)+pei1(i); |

8 | kong2(i)=at(1,3)-peiz2(i)+pei2(i); |

9 | end |

10 | if zzz(Si(i,j),1)==2 |

11 | lan1(i)=lan1(i)+zzz(Si(i,j),7); lan2(i)=lan2(i)+zzz(Si(i,j),6); |

12 | end |

13 | if(kong1(i)>=0.5*at(1,2))&&(kong2(i)>=0.5*at(1,3))&&(lan1(i)==0)&&(lan2(i)==0) |

14 | Sii=[Sii;Si(i,:)];Ai=[Ai;i]; |

15 | break |

Before delivery was finished, the volume of the pickup cargo could not be more than half of the truck space. The related programming was as follows:

(kong11(i)==at(1, 2))&&(kong22(i)==at(1, 3))&&(lan11(i)<=0.5*at(1, 2))&&(lan22(i)<=0.5*at(1, 3))

*kl*sequence is optimized with the minimum time cost and transportation cost as the target function as shown in Table 7.

The code 2

Number of rows | Code |
---|---|

1 | DistanV=0;n=size(s,2); |

2 | for i=1:(n-1) |

3 | DistanV=DistanV+20*dislist(s(1,i),s(1,i+1)); |

4 | end |

5 | DistanV=DistanV+20*dislist(s(1,n),s(1,1)); |

6 | P=[]; timecost(1,1)=0; P(1,1)=8; |

7 | for i=2:n |

8 | P(1,i)=dislist(s(1,i-1),s(1,i))*20/(at(1,4)*1000)+P(i-1)+0.1; |

9 | if(zzz(s(1,i),8)<=P(1,i))&&(P(1,i)<=zzz(s(1,i),9)) |

10 | timecost(1,i)=0; |

11 | if (zzz(s(1,i),8)-P(1,i))<=1 |

12 | timecost(1,i)=(zzz(s(1,i),8) -P(1,i)); |

13 | if (P(1,i)-zzz(s(1,i),9))<=1 |

14 | timecost(1,i)=(P(1,i)-zzz(s(1,i),9)); |

15 | else timecost(1,i)=2; |

16 | end end end end |

17 | F=0.35*DistanV+sum(timecost); |

### 3.3 Experimental result display

## 4 Conclusion

The delivery and pickup cargo route plan math model was built based on time windows and load constraints. It was designed from the delivery order and path based on the Floyd Algorithm and road constraint. The 0-1 integer programming was used to determine the number and type of trucks, and then, the distribution routes and order algorithm were designed based on the tabu search algorithm under the influence of pickup cargo information. In a case, this method could divide the delivery services and pickup services reasonably, effectively solving the distribution route optimization problem under the influence of pickup cargo and various constraint conditions. According to the truck requirement and distribution operation requirements, the method can be used selectively by different distribution practitioners.

## Notes

### Acknowledgements

The research presented in this paper was supported by Northeast Forestry University, China.

### Funding

This study was supported by the Fundamental Research Funds for the Central Universities(No. 2572016CB13),the Postdoctoral program in Heilongjiang province(No LBH-Z2018).

### Availability of data and materials

Not applicable.

### Declarations

Not applicable.

### Authors’ contributions

All authors contribute to the concept, the design, and developments of the theory analysis and heuristic algorithm and the simulation results in this manuscript. All authors read and approved the final manuscript.

### Competing interests

The authors declare that they have no competing interests.

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

- 1.M.Y. Zhai, J. Zhu, Study on current development status, problems and countermeasures of rookie network [J]. Logistics technology
**35**(5), 63–67 (2016)Google Scholar - 2.J. Zheng, Y.M. Cheng, Optimization design of the delivery route by vehicles scheduling program with time windows [J]. Logistics engineering and management
**32**(10), 89–90 (2010)Google Scholar - 3.W.G. Song, H.X. Zhang, L. Tong, C-W algorithm for vehicle routing problem of non-full loads with time windows [J]. Journal of Northeastern University
**27**(1), 65–68 (2006)Google Scholar - 4.J.M. Li, Y.R. Ni, Y. Zheng, et al., Road network modeling and application oriented to third-party l ogistics distribution[J]. Computer integrated manufacturing system
**15**(9), 1765–1769 (2009)Google Scholar - 5.H.Y. Wen, Y.X. Shen, A method of computing weight of logistics navigation route planning based on analytic hierarchy process [J]. Journal of Highway and Transportation Research and Development
**25**(8), 114–118 (2008)Google Scholar - 6.B.Q. Ding, J. Jiang, Path optimization of logistics distribution vehicle based on ant colony algorithm and dynamic road impedance [J]. Forest Engineering
**30**(2), 149–152 (2014)Google Scholar - 7.J. Li, Q.L. Da, R.Y. He, Pricing credit risk with multivariate stochastic volatility model[J]. Journal of Management Science in China
**13**(10), 1–7+62 (2010)Google Scholar - 8.J. Li, Y. Zhang, The study on vehicle routing problem of simultaneous deliveries and pickups with time windows [J]. Inf. Control.
**38**(6), 752–758 (2009)Google Scholar - 9.J. Li, Y. Zhang, A tabu search algorithm for vehicle routing problem with simultaneous deliveries and pickups [J]. Theory and practice of system engineering
**27**(6), 117–123 (2007)MathSciNetGoogle Scholar - 10.K.R. Weng, K.J. Zhu, G. Liu, Collaborative transportation route optimization with lower bound flows [J]. Journal of system & management
**24**(1), 38–42 (2015)Google Scholar - 11.W.Q. Bie, Y.J. Li, Study on multiple vehicle routing problem integrated terminal cargo based on improved tabu search in distribution center[J]. Computer engineering and application
**46**(4), 216–218 (2010)Google Scholar - 12.Ç. Bülent, A new saving-based ant algorithm for the vehicle routing problem with simultaneous pickup and delivery [J]. Expert Systems With Applications
**37**(10), 6809–6817 (2010)CrossRefGoogle Scholar - 13.P. Olcay, B.K. Can, K. Osman, et al., A perturbation based variable neighborhood search heuristic for solving the vehicle routing problem with simultaneous pickup and delivery with time limit [J]. Eur. J. Oper. Res.
**242**(2), 369–382 (2015)MathSciNetzbMATHCrossRefGoogle Scholar - 14.W. Yong, M. Xiaolei, X. Maozeng, L. Yong, Y. Wang, Two-echelon logistics distribution region partitioning problem based on a hybrid particle swarm optimization-genetic algorithm [J]. Expert Syst. Appl.
**42**(12), 5019–5031 (2015)CrossRefGoogle Scholar - 15.W. Yong, M. Xiaolei, L. Zhibin, L. Yong, X. Maozeng, W. Yinhai, Profit distribution in collaborative multiple centers vehicle routing problem [J]. J. Clean. Prod.
**144**, 203–219 (2017)CrossRefGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.