Model and solution for the traveling salesman problem with multiple time windows

. This paper applies the multi-time window traveling salesman problem to not only optimize the logistics cost, but also effectively endow users with multiple discrete idle optional time periods to meet the time requirements of just-in-time production. In the process of problem solving, firstly, the dynamic penalty factor is introduced into the objective function and the penalty function is added to relax the constraints of multi-time window in order to construct the relaxation model. Secondly, while in solving the model, the compressed annealing algorithm, which has the property of probability convergence, is proposed on the basis of the simulated annealing algorithm with only temperature parameter. The dynamic penalty factor is added as a pressure parameter to control the probability of the transition to an infeasible route regarding the time windows. Finally, comparison through data experiments between multi-time windows and single-time windows verifies the practicability of the former and comparison between the solution algorithm and simulated annealing algorithm verifies the stability of compressed annealing algorithm. The result shows that the compressed annealing algorithm is a comparatively better method to solve multi-time window traveling salesman problem.


Overview
With the development of lean production, the demand for punctuality is increasing and the timely and efficient services provided by the logistics industry are gaining more and more attention, so the Traveling Salesman Problem with time windows has been widely and intensively studied, among which the Traveling Salesman Problem with time window (TSPTW) is one of the important research directions.The practical applications of TSPTW in industry and service industry are also very wide: parcel delivery, bank courier, bus logistics and logistics handling systems with automatic guided vehicles.bank couriers, bus logistics and logistics handling systems with automated guided vehicles.In addition, the Traveling Salesman Problem with time windows is equivalent to the time sensitive production scheduling problem prevalent in the manufacturing industry.
The Traveling Salesman Problem with multiple time windows studied is an extension of the single time-window Traveling Salesman problem.Based on the time-constrained problem, the simulated annealing method is extended to the Traveling Salesman Problem with multiple time windows.The Traveling Salesman Problem with multiple Time windows is to find a minimum-cost travel path in which a vehicle departs from a specific warehouse and returns to this warehouse, visiting one user at a time.Each user has multiple non-intersecting time windows, and the delivery vehicle must serve each user within or near a time window corresponding to that time window, and each user must be served.Multiple time windows can precisely meet the time requirements of users, and also enable users to effectively use multiple discontinuous free optional time slots, which can improve customer satisfaction and effectively reduce costs for enterprises, and have high practical value.Wolfler Calvo (2000) [1] proposed a heuristic algorithm which first used task relaxation to construct the initialization path and then improved the path by local search method.This heuristic is more effective for over 200 clients and instances with wide time windows.Ma, Zuo and Yand [2] studied the vehicle path problem with multiple time windows and established a mathematical model; Peng and Zhou [3] proposed to solve the vehicle path problem with multiple time windows.proposed a hybrid ant colony algorithm for solving the vehicle path problem with multiple time windows, and Huang and Li [4] designed a genetic algorithm for solving the vehicle path problem with multiple time windows.Huawei Ma [5] designed an improved ant colony algorithm for solving multi-time-window vehicle path problems that allows split distribution.Huang Qiu-ai et al [6] improved the traditional genetic algorithm by introducing the optimal individual retention mechanism and designed a mathematical model to solve it, which verified the effectiveness of the algorithm and its model.Zhu Ling-ling [7] proposed a collaborative contraindicated optimization algorithm, which solves by scanning algorithm to find the initial solution, and then design adaptive modification of contraindicated length and multiple sub contraindicated algorithms for collaborative optimization.Li Zhen-ping et al [8] used the intelligent water drop algorithm to explore the multi-time window vehicle path problem effectively.
In this paper, The Traveling Salesman Problem with multiple time windows is studied by introducing a dynamic penalty multiplier in the objective function, which relaxes the time constraint and establishes a relaxed mathematical model for The Traveling Salesman Problem with multiple time windows, which is solved by proposing a compressed annealing algorithm, which is a generalization of the simulated annealing algorithm to obtain an effective heuristic algorithm.Also the algorithm can maintain the property of probabilistic convergence to the global minimum set of solutions as already proved by Ohlmann.etal[9].

Problem analysis
The Traveling Salesman Problem with multiple time windows can be described as follows: a vehicle, starting from a distribution center, delivers to each user on the path and must serve each user.The users have multiple non-intersecting time windows, and the delivery vehicle must serve each user within (or near) one of the time windows corresponding to that user, and return to the distribution center after completing the delivery task.For the convenience of the study, it is assumed that the vehicle capacity is not limited and the vehicle service time for each user is negligible, i.e., it is set to 0. The vehicle arrives early and needs to wait for the time window to open before serving.Our goal is both to reduce the service outside the time window and to reduce the total delivery time.In order to define the penalty function () P  , it is necessary to consider four scenarios for the moment , so the moment of reaching the user at point , i.e., the moment the vehicle arrives at the user at point i p is closer to the j th time window and can be considered late to serve immediately, then Thus the penalty function of the whole path is Also based on the above analysis the moment of arrival of the user at point i p 1 is obtained as follows:

Model formulation
The general traveling salesman r problem is modeled as follows.
min ( ) f  s.t.S  where S is the set of feasible paths, () f  is determined by equation (1).In this paper, the penalty function is added to the objective function, which can relax the restriction of the time window.A sufficiently large non-negative dynamic penalty factor b is introduced according to the literature [10] to make the relaxation model and the original planning model duality.Now, we build the following relaxation model for the multi-time window problem.

Model solution
The compressed annealing algorithm is an improvement on the simulated annealing algorithm.The compressed annealing algorithm adds a dynamic penalty factor  as a pressure to the simulated annealing algorithm, giving the algorithm two parameters.The temperature parameter controls the probability that the route cost becomes higher and the pressure parameter controls the probability that the arrival moment is not in the time window.
In a compressed annealing algorithm, the iterative correction of the pressure  will involve the pressure valve *  .The approximate value of the pressure valve  is generally obtained by multiple iterations.In this paper, we follow the approximation function of the pressure valve in the literature [2].
, where the value of  represents the percentage of penalty terms with respect to the objective function and During the search process of the compression annealing algorithm, the pressure is gradually increased, while the temperature is gradually decreased.Therefore, the initial value of the pressure can be determined as   0 0 .The calculation of the initial value of temperature  0 and the approximation of the pressure valve  requires the following steps.
(1) Generate random r pairs of adjacent feasible paths in S to form the set a. Compute the average absolute difference v  of the objective function () f  in the set R .Referring to the cooling and Ohlmann [12] pressurization criteria in Dowsland [11], the chosen correction equation for cooling and pressurization is kk The range of two of these parameters is . ., .

Analysis of numerical results
Because the data of real logistics enterprises are not available and there is no standard test data of multi-time-window path problem in the international arena, the test data of this paper is composed by constructing 100 random nodes with the coordinates of nodes in [10,50] according to random distribution, the coordinates of the starting point are the middle position (30,30), the starting point has no time window, and the remaining nodes are randomly generated in [0,12] respectively 1, 2, 3 mutually non-coincident time windows, the total time sum of each time window does not exceed 6.In this paper, the relevant parameters in the multi-time-window travel quotient problem solved by the compressed annealing algorithm take the values ., .
  0 9999 , l  3000 , max I  75 .The algorithm was implemented in Win7 (Intel core i3-2370M CPU2.4GHZ, 6Gmemory) platform using matalab2016a language.The data experiments were tested for 20, 50, 80, and 100 nodes, respectively, and the minimum and average cost results of the paths were obtained for each set of data tested 100 times as shown in Table 1. the results of solving the test data for 100 nodes using the simulated annealing algorithm and Algorithm 4.1, respectively, are shown in Table 2.
From the analysis of Table 1, it is obtained that the minimum cost gradually decreases with the increase of the number of time windows, which is consistent with the reality.Meanwhile, the average value of each group of data is closer to the minimum value, and the stability of Algorithm 4.1 is better.As can be seen from Table 2, the difference between the minimum values of the two algorithms is not large, but the mean value of the simulated annealing algorithm deviates more from the minimum value, which is less stable.In terms of CPU running time, Algorithm 4.1 is significantly faster than the simulated annealing algorithm.In a comprehensive comparison, Algorithm 4.1 can effectively solve the Traveling Salesman Problem with multiple time windows.

Conclusion
We studied the Traveling Salesman Problem with multiple time windows, built a relaxation model for the problem, and then designed a two-stage heuristic algorithm based on the compressed annealing algorithm to solve the problem, and the experimental results showed that the algorithm can effectively solve the traveler problem with multiple time windows.
In this paper, we only consider the impact of multi-time window constraints on the model, but the impact of real-life constraints such as the number of vehicles, the maximum distance limit, the maximum service time limit, and the vehicle capacity on the model is not further investigated, while the simulated data used in the data experiments.In further research work, we can consider introducing more constraints and obtaining real data of enterprises, so that the theory of the Traveling Salesman Problem with Multiple Time Windows can serve logistics enterprises better.

S
graph, where { , , , } Nn  01 is the finite set of nodes or customers, A is the set of arcs connecting customers.A tour is defined by the order in which the n customers are visited and denoted by { be all path sets, where i p denotes the index of the customer in the i th position of the tour.Let customer 0 denote the depot and assume that every tour begins and ends at the depot, i.e, cp denotes the travel time from i p to i p 1 .Thus the total time to complete the path is ( windows for the user at point i p The Traveling Salesman Problem with multiple time windows is composed of two parts: the Traveling Salesman Problem and the multi-time-window.The Traveling Salesman Problem is NP-hard, and the multiple time windows increase the complexity of the problem again.In this paper, we introduce the idea of penalty function to add the constraints of time windows to the objective function, which also facilitates the heuristic search for the solution.

a
when the vehicle reaches the user at point i p on the path.(1) If ii pp ae  1 , i.e., the vehicle arrives before the first time window opens for the user at point i p and needs to wait, then ()  , i.e., The vehicle arrives after the last time window closes for the user at point i p , then ()

1 ,
, i.e., the vehicle arrives at the user at point i p at the moment exactly in the j th time window, then () i Pp  0 ,so the moment of reaching the user at point i .e., The vehicle arrives between the j th time window and the j  1 th time at point e., the moment Vehicle arrives at point i p is closer to the j  1 th time window, can be considered early to need to wait for the j  1 th time window to open, then so the moment of reaching the user at point

4 ITM
are established by equations (1), (2) and (3), and the first constraint is a deformation of equation (4), which indicates the relationship between the moment of arrival of the vehicle at point i p 1 and the moment of arrival at Web of Conferences 45, 01017 (2022) CSCNS2021 https://doi.org/10.1051/itmconf/20224501017point i p .

( 2 ) 1 ,
The initial value of the temperature is ln( ) the range of  values in the numerical experiments of this paper is   ., .0 75 0 99 .Let the length of Markov chain in the algorithm be l , the cooling schedule for each iteration be   temperature and pressure values when iterating from kl  1 to () kl  1 , respectively.

. 1 Step 1 5 ITM
give the two-stage heuristic algorithm for solving the relaxation model (5) designed based on the compressive annealing algorithm.Algorithm 4Gives the initial conditions.(1) Initialize the optimal path best  such that () best f    and () best P  0 ; initialize the parameter m  0 , choose the Markov chain length as l , and do not accept the upper bound max I on the number of feasible solutions .Web of Conferences 45, 01017 (2022) CSCNS2021 https://doi.org/10.1051/itmconf/20224501017


are unchanged, st  0 .A local search in the neighborhood of k  search to generates a new feasible solution y .(2) If ( , ) ( , ) then

Table 2 .
Comparison of the results of simulated annealing algorithm and Algorithm 4.1