Research on Vehicle Routing Problem with Soft Time Windows Based on Hybrid Tabu Search and Scatter Search Algorithm

With the expansion of the application scope of social computing problems, many path problems in real life have evolved from pure path optimization problems to social computing problems that take into account various social attributes, cultures, and the emotional needs of customers. The actual soft time window vehicle routing problem, speeding up the response of customer needs, improving distribution efficiency, and reducing operating costs is the focus of current social computing problems. Therefore, designing fast and effective algorithms to solve this problem has certain theoretical and practical significance. In this paper, considering the time delay problem of customer demand, the compensation problem is given, and the mathematical model of vehicle path problem with soft time window is given. This paper proposes a hybrid tabu search (TS) & scatter search (SS) algorithm for vehicle routing problem with soft time windows (VRPSTW), which mainly embeds the TS dynamic tabu mechanism into the SS algorithm framework. TS uses the scattering of SS to avoid the dependence on the quality of the initial solution, and SS uses the climbing ability of TS improves the ability of optimizing, so that the quality of search for the optimal solution can be significantly improved. The hybrid algorithm is still based on the basic framework of SS. In particular, TS is mainly used for solution improvement and combination to generate new solutions. In the solution process, both the quality and the dispersion of the solution are considered. A simulation experiments verify the influence of the number of vehicles and maximum value of tabu length on solution, parameters’ control over the degree of convergence, and the influence of the number of diverse solutions on algorithm performance. Based on the determined parameters, simulation experiment is carried out in this paper to further prove the algorithm feasibility and effectiveness. The results of this paper provide further ideas for solving vehicle routing problems with time windows and improving the efficiency of vehicle routing problems and have strong applicability. 1 School of Mathematics, Tonghua Normal University, Tonghua, 134000, China. 2 School of Computer Science and Technology, Hunan University of Technology and Business, Changsha, 410205, China. 3 School of Bioinformatics, University of Minnesota, Twin Cities, USA. * Corresponding Author: Xiaoliang Liu. Email: v1zone@163.com. Received: 12 April 2020; Accepted: 27 April 2020. 1946 CMC, vol.64 no.3, pp.1945-1958, 2020


VRPSTW descriptions and mathematical model 2.1 Problem description
Vehicle Routing Problem with soft time windows or VRPSTW (Vehicle Routing Problem with soft time windows, VRPSTW), for convenience of description, it is generally described as: Client Set : = {1, 2, ⋯ , }, recording the client and the distribution center collectively as N={0, 1, …, n}, and the corresponding demand of the client is , ∈ , the distribution center has k vehicles of the same model V={1, 2, …, k}, with a loading capacity of q. According to the requirements, each client needs to be served only once and each car serves no more than its own loading capacity. In order to get closer to the objective reality, suppose client is , and the service time window of the required service is [ , ], if the vehicle arrives at the client prior to , service cannot be offered to client until reaching . If the vehicle arrives at after , service will be delayed and a unit time penalty cost will be generated. It takes time to complete the task , the start time of the task i is , the task is the predecessor of the task , and the vehicle travels to j by costing time . Regardless of early arrival or delay, it will bear the time cost. Its total cost (sum of traveling costs and time loss costs) is made minimum on the basis of satisfying the restrictions.

Mathematical model
The objective function of the VRPSTW discussed in this paper considers not only the traveling costs, but also the time loss cost of service delay. The corresponding mathematical model is as follows: (1) The decision variable For the decision variable , when vehicle k travels from customer i to customer j, its value is 1, otherwise it is 0. 0 or 1 , , (2) The objective function According to the needs of practical problems, all logistics distribution requires time to be contracted. When the service is delayed, a certain amount of time will be paid. Therefore, this paper studies the problem of vehicle routing with a soft time window. Considering the loss cost of delayed services, the objective function is to construct the sum of the cost of distance and the cost of delayed services to be the smallest.
Among them, Represents the sum of time lost for all delivery customers, the start time of the task is . The model represents the transportation cost from client to client , which can be distance, cost, time, etc., and represents the loss cost of service delay.
(3) Constraint condition According to the requirements, each client needs to be served only once The total amount of goods delivered by all customers on each route is not greater than the vehicle capacity.
In the process of distribution, ensure that the vehicle starts from the distribution center and returns to the distribution center.
It takes time to complete the task , the start time of the task i is , the task is the predecessor of the task , and the vehicle travels to j by costing time . The vehicle can't reach the client before the time + + when the vehicle is According to the question, the time window of completing the task

Principles of tabu search algorithm
The tabu search algorithm, a hybrid heuristic algorithm composed of multiple strategies, is the best algorithm ever for solving vehicle routing issue and its basic idea is to mark the local optimal solutions that have been obtained, and to avoid these solutions in further iterations. It mainly involves technologies such as neighborhood, tabu list, tabu length, candidate solution, and contempt criterion.

Scatter search algorithm
The tabu search algorithm, a hybrid heuristic algorithm composed of multiple strategies, is the best algorithm ever for solving vehicle routing issue and its basic idea is to mark the local optimal solutions that have been obtained, and to avoid these solutions in further iterations. It mainly involves technologies such as neighborhood, tabu list, tabu length, candidate solution, and contempt criterion [Ampol, Onwasa and Chi (2019)].

Design of hybrid TS & SS algorithm
The main idea of TS & SS algorithm is to embed TS into the framework of SS. TS uses the scattering of SS to avoid the dependence on the quality of the initial solution, while SS uses the climbing ability of TS to jump out of the local optimal solution, so as to improve the quality of its search for the optimal solution significantly. The hybrid algorithm still uses the basic framework of SS, of which TS is mainly used for solution improvement and combine to generate new solutions. Main steps of the algorithm: Step 1: generate an initial solution set P.
Step 2: establish an initial reference set.
Step 3: improve the solution: the tabu algorithm improves the solution.
Step 4: update the reference set, generate subsets and combine to generate a new solution; and then improve the new solution.
Step 5: the reference set cannot be updated or meets the termination criterion, break; choose the solution with the best quality in the reference set and output the global optimal solution.

Representation of the solution and initialization of the cluster generation
For the feasible solution, a direct and visual representation method is adopted [Jonathan, Pedro and Reinaldo (2019)]. That is to say, for vehicle routing issue involving n customers, the representation of this solution is to directly generate a permutation of n natural numbers between 1 and n to represent client order, such as path 0-12-14-0. According to the task requirements, the solution that meets the time compatibility should be considered when arranging the path; then the better solution from the randomly generated solution set = �( , )� = 1� is chosen as the initial solution and use target value is used as reference evaluation value. The solution whose difference is greater than 1 is retained and placed in the initial population P. Repeat the process above to form a diversified initial population P.

Solution improvement method
(1) New solution is generated by combination Tabu search algorithm is a neighborhood search technology-based algorithm. Determining the neighborhood operation method is an important step in constructing the algorithm. There are many methods for neighborhood operation. We generate a new solution by realization mainly through exchanging organization and disorganization mechanism on both sides. The edge selection strategy comes from the two reference sets RefSet1 and RefSet2 on the one hand and the reference set RefSet1 on the other, thereby ensuring the diversity and high quality of the solution. if you consider picking two points on the same path,Put the selected vertices (.., i-1, j-1, i, j,...), Swap the order of edges [i-1 j-1] and [i j](A of Fig. 1), After the exchange, the customer delivery order is (…, i-1, i, j-1, j, ...), get a neighborhood of the current solution to optimize the current solution; if you consider choosing two edges [i-1 j] and [j-1 i] between different paths, Also get a neighborhood of the current solution (B of Fig. 1). Improve the solution between and within paths during the optimization process, generated by 2-opt random combination, to ensure further task assignment and path optimization. (2) Determination of tabu object Tabu objects refer to those locally optimal solutions that are forbidden in the tabu list. Based on the traditional tabu algorithm, this paper puts the best solution obtained through iteration per time as a tabu object which is put into the tabu list.
(3) Determination of tabu length The tabu list, as the core of the tabu search algorithm, determines the term and search range of the tabu object [Kazemian and Aref (2017)]. Its size greatly affects the search speed and solution quality. Therefore, this paper constructs a dynamic tabu list to make the size and structure of the tabu list change along with the search process so as to: First, prevent circulation in the search process and avoid a local optimal solution; second, enlarge the search area and improve solution scattering in initial search through adjusting its size to make path diversified and ensure search divergence. On the contrary, when the search process is close to the optimal solution, reduce the search area in order to improve solution centrality, reduce scattering and ensure search convergence [Youssef, Yasmina, Sâad et al. (2019)]. A linear relationship is constructed for this purpose, and its size is expressed as: and mean the minimum and maximum length values of tabu list; means the maximum iteration times and n means current iteration times.
(4) Determination of candidate sets There are numerous ways to determine the candidate set. Several neighbors are randomly selected from the neighborhood of the current solution as the candidate set in this paper.
(5) Determination of termination criterion The algorithm terminates when the total iteration times reach a given value, or the current best solution does not change within a given successive iteration steps.
(6) Aspiration criterion Candidate solutions may be all forbidden in the tabu search. Aspiration criterion can lift the prohibition of a certain state to achieve more efficient optimization performance. The adaptation value-based aspiration criterion is used in this paper. If a candidate solution is forbidden, whose target value is superior to "best so far", the candidate solution will be lifted from prohibition and "best sofar" will be updated.

Update candidate reference set
In order to improve the search speed and ensure scattering of SS, the method of updating the reference set is used: Forbid the solutions in the M reference sets dynamically and keep the M solutions in the reference set centrally during the further iteration. Put the solution with best quality in reference set * and solution with the largest distance with rest ones into tabu list. The number of M is 2 + [ ], where L is the number of solutions in the reference set, and n is the current iteration times.

Subset generation method
The elements in the set P are combined into two types of subsets; one is the reference subset formed by the best solution, and the other is reference solution set consisting of different solutions.

Results and conclusions 4.1 Characteristics of the task
In order to verify algorithm feasibility, Simulation Experiment the VRPSTW generated in the literature is further used, and the algorithm is programmed via JAVA language. Suppose the logistics center has 10 distribution vehicles with a maximum load capacity of 8 t, the existing 20 customers are within a square the side length of which is 20 km and the demand and supply of goods for each client are 2 t or less and the coordinates of the logistics center are (3.2 km, 14.1 km), As shown in Fig. 2, for the coordinates of the 20 customers, the quantity demanded of goods and time window for delivery. According to the above conditions, the vehicle's distribution route should be reasonably arranged to minimize the total cost (the sum of total traveling distance and loss time cost). The distance between customers can be calculated according to the coordinates of the client and the logistics center. Suppose the average speed of the distribution vehicle during the distribution process is 20 km/h, and the unloading time of the distribution vehicle at the client's site is 0.5 h/t.

Simulation Experiment 1
The influence of vehicle number constraints on solution, the relationship between and the results, and verification parameters' control over the degree of convergence is studied. Firstly, influence of the vehicle number constraint on solution is verified. Obviously, without considering the inherent cost of vehicle, the tighter the vehicle number constraint, the greater the traveling distance and time loss. Secondly verified the maximum value of the tabu length impact on the results. As can be seen from Fig. 3 that when =5, the overall cost of is stable within the range of 20-30. When =25, the solution is better, so =25.

Figure 4:
=25, the change of affects It can be known from Fig. 4 that the parameters' control over the degree of convergence is verified by calculating the same parameter for ten times. From the data, it can be seen that the larger the , the more stable the result. Cost is stable when the is changed within the range of 5-15, when =10, the solution is better, so =10.

Figure 5: Effect of parameters on solution stability
It is found through simulation experiment that the results of the solution has a high quality and stability when the parameters are set as = 10, = 25 and = 400, which further proves that the parameters affect solution quality and stability. Finally, the influence of the number of diverse solutions on the algorithm performance is tested [Song, Zhu and Sun (2014); Li, Fan and Zhang (2018)]. Suppose the maximum iteration time of the algorithm is = 500, the number of dynamically updated diverse solutions in the reference set is an integer between 5-25 and other parameters are the same as above. In summary, the parameters of the TS & SS algorithm are setting as follows: Set the maximum iteration steps of the SS algorithm as 500, the number of initial solution sets generated as 20 and the number of dynamically updated diversity solutions in the reference set as 10 to judge the value of M. If it is greater than 5, set the value of M to M=5. If the maximum iteration steps of the TS is 500, the parameters are set as follows: = 10, = 25 and = 500; the number of neighborhoods is 80. In order to facilitate comparison, the VRPSTW generated in the literature is further used, and the algorithm is programmed via JAVA language.

Simulation experiment 2
The parameter setting of the simulation experiment is based on the parameters determined in the Simulation Experiment 1. The stable experimental result is obtained after running the experiment for 10 times. According to the simulation results, it is known that in the optimization process, different routes are replaced, and then the same route is replaced to achieve route optimization. Second, considering the time factor, the shortest total cost of the route may not be the smallest. When the routes are the same and the delivery order is different, the time losses are also different. In order to further analyze the experimental results, select a few sets of typical distribution path maps for comparison and find that the paths are the same, the distribution order is different, and the time loss is different, so the total cost is different, such as a, b, c, and d; the distribution path is the farthest, But the delivery time is reasonable, so the total cost may not be the largest, such as f; seek the path and time to optimize the optimal delivery path e at the same time. According to the intelligent optimization results, the distribution company can choose the appropriate distribution route. If customers need shorter time, the route with no time loss is preferred. The length of the route may be large, such as e, f. The company pays attention to the least cost of the company, and can take the shortest path without considering time loss, such as a, b, c, d; otherwise, it must consider both the time loss and the company's interests, so choose the path with the lowest total cost, such as b, c, e.  [Chen, Huang and Dong (2008)]: simulated annealing algorithm of references. TS [Deng, Zhu and Li (2018)]: improved TS algorithm of references. Tab. 1 shows the results of running TS & SS algorithm for ten times and the comparison of the results via every algorithm. The experimental results show that the solution result obtained by using improved hybrid TS & SS algorithm for 10 times of solution is high in quality and good in stability and the average distribution cost is 110.02 km, the average number of vehicles used is 3, and the number of vehicles used for 100% calculations is 3; the average calculation time is 0.63 s. Compared with existing literature solutions, the solution is better in stability and faster in calculating speed, which indicates that the algorithm has better optimization search performance.

Conclusions
The hybrid TS & SS algorithm designed in this paper selects the better solution as the initial solution and uses a dynamic tabu list. It can be seen from the simulation results of numerical simulation: (1) From the problem being solved, This paper studies the vehicle routing problem with soft time window, is the hot issue of social computing research, the problem is to consider the needs of customers and considering the cost, universal, accords with the practice of logistics, intelligent to calculate the path cost, time cost and total cost, can be timely to choose the appropriate path actually according to the logistics distribution.
(2) We can see from the algorithm design. Hybrid TS & SS algorithm improves the global search ability and solution quality. The change of the tabu list length has a direct impact on solution quality and stability. A too short length affects divergence while a too long length affects convergence.
(3) From the simulation results, it can be seen that the average cost of the 10 time of solutions for the issue are 110.2, which greatly improves solution quality and reflects the stability, feasibility effectiveness and superiority of the algorithm.
The simulation experiments have further proved that the parameter design has a certain effect on the solution results, so the necessary simulation experiments are needed for different issues. By taking VRPSTW as an example, this paper proposes Hybrid TS & SS algorithm to solve the issue based on logistics realities and gives the linear relationship of tabu length change. In the improved algorithm, a dynamic tabu list is used to obtain the solution with high quality. The simulation results show the algorithm has a high computing efficiency and the calculation results are relatively stable, reflecting good optimization performance. It demonstrates the effectiveness and feasibility of the algorithm and provides a kind of effective method for VRPSTW research and theoretical basis for further development of the optimization search potential of intelligent algorithms. It also brings certain theoretical significance and application value for solving similar combinatorial optimization issues.