A Threshold Accepting Metaheuristic for the Vehicle Routing Problem with Time Windows Olli Br¨aysy1 , Jean Berger2 , Mohamed Barkaoui2 and Wout Dullaert3 1
SINTEF Applied Mathematics, Department of Optimisation, P.O. Box 124 Blindern, N-0314 Oslo, Norway e-mail:
[email protected]
2
Defence R&D Canada - Valcartier, Decision Support Technology Section 2459 Pie-XI Blvd. North, Val-B´elair, Qc G3J 1X5, Canada e-mail:
[email protected],
[email protected] 3
Ufsia-Ruca Faculty of Applied Economics, University of Antwerp, Prinsstraat 13, 2000 Antwerp, Belgium e-mail:
[email protected]
Abstract Threshold Accepting, a variant of Simulated Annealing, is applied for the first time to a set of 356 benchmark instances for the Vehicle Routing with Time Windows. The Threshold Accepting metaheuristic is used to improve upon results obtained with a recent parallel genetic algorithm and a multi-start local search to illustrate its value as a post-processor. The Threshold Accepting metaheuristic is shown to be a fast and versatile postprocessor that can be imposed upon a variety of heuristic or metaheuristic approaches for vehicle routing to get better results in both theoretical and practical applications. Key words: Vehicle Routing, Threshold Accepting, Metaheuristics
1
Introduction
In the Vehicle Routing Problem with Time Windows (VRPTW) the objective is to design a set of minimum-cost routes, starting and ending at a central depot to service customers with a known demand by homogeneous vehicles. The demands of the customers on a route cannot exceed the vehicle’s capacity. Each customer requests service in a time window that cannot be violated. Being an NP-hard optimization problem enclosing a wide array of applications, the Vehicle Routing Problem with Time Windows has been approached in a multitude of heuristic solution techniques. These heuristics can be divided in construction heuristics, improvement heuristics and metaheuristics (see [6] and [7] for recent literature reviews). Construction
heuristics build routes sequentially or in parallel, and improvement heuristics are used to obtain higher quality solutions by trying modifications to the incumbent solution. Metaheuristics guide construction and improvement heuristics to escape local optima. To our best knowledge, this paper presents the first application of Threshold Accepting (TA) to the VRPTW. Solutions generated by the Hybrid Genetic Algorithm (HGA) of Berger et al. [2] and multi-start Local Search (LS) of Br¨aysy et al. [8] are improved in terms of distance with a new Threshold Accepting metaheuristic. The TA post-processor is powered by the IOPT intra-route improvement heuristic [4] and a new and highly efficient interroute improvement heuristic (GENICROSS) based on the work of Gendreau et al. [18] and Taillard et al. [37]. The resulting hybrid metaheuristics are indicated to be fast, cost-effective and competitive with the previous best approaches. The main contribution of this paper lies in presenting a new efficient improvement heuristic, GENICROSS, and a highly versatile and fast Threshold Accepting post-processor that can be imposed on any heuristic or metaheuristic approach to further improve upon solutions attained so far. This paper is arranged as follows. Sections 2 and 3 describe the genetic algorithm and the multi-start local search used to generate the initial solutions. The Threshold Accepting post-processor and its main components, the IOPT and the new GENICROSS operators are presented in Section 4. The computational results illustrating the power of the created hybrids and the Threshold Accepting as a post-processor are presented in Section 5. Conclusions are drawn in the last section.
2
Hybrid genetic algorithm
The Hybrid Genetic Algorithm (HGA) of Berger et al. [2] is used to generate the initial solutions to be improved upon by the Threshold Accepting postprocessor. Genetic algorithms [23, 12, 22] are adaptive heuristic search methods that mimic evolution through natural selection. They work by combining selection, recombination and mutation operations to improve a population of individuals (solutions). The selection pressure drives the population toward better solutions while recombination uses genes of selected parents to produce offspring that will form the next generation. Mutation is typically used to escape from local minima. For more details on the evolutionary and genetic algorithms for the VRPTW, we refer to [5]. Instead of typical binary encoding, in HGA each solution is represented as an integer array of customer identification numbers corresponding to the order in which the customers are serviced. A modification of the parallel insertion heuristic of Liu and Shen [27] that allows for temporal constraint violations is used to build two separate initial populations. Individuals in the first population are evolved to minimize the total travelled distance, while the second population focuses on minimizing temporal constraint vio-
lations to generate a feasible solution. A fixed number of routes is imposed for all solutions in both populations. The number of routes in the population minimizing temporal constraint violations is always one smaller than in the population minimizing distance. Once a new best feasible solution is found, the limit for the number of routes in both populations is lowered by one, and new populations are reconstructed with the parallel insertion heuristic of Liu and Shen [27]. The initial value for the number of routes is obtained with a cheapest insertion heuristic based on the insertion procedure of Liu and Shen [27]. This constrained parallel co-evolution of two populations and partial temporal constraint relaxation allows escaping local minima while progressively moving toward a better solution. The stochastic selection of parents for mating in the two populations is proportional to their fitness value, using the well-known roulette wheel scheme [22]. The fitness value is based on the number of routes, total travelled distance and number of violated temporal constraints in a solution. The population is managed by a steady-state replacement scheme, i.e., each generation we replace a set of worst individuals in the population by new ones. Contrary to traditional genetic algorithms, a small population size is typical for the recent evolutionary algorithms [5] that operate on the level of feasible solutions using time-consuming improvement heuristics in the recombination and mutation. Here we found the population size of 10 to provide a good compromise between solution quality and computational effort. Two recombination and six mutation operators are used to improve upon the two populations. Both recombination operators are based on the idea of first removing a set of customers from a solution and then reinserting the removed customers using the Solomon [36] insertion heuristic I1 or insertion procedure of Liu and Shen [27]. Both recombination operators can be understood as a modification of the Large Neighborhood Search of Shaw [34], where we restrict ourselves to two routes, and limit the subset of customers considered for insertion to each route according to the original routes of the customers in parent solutions. The main objective of these recombination operators is to reduce distance. The six mutation operators can be divided in two sets below. The first set of four techniques restructures solutions aiming mainly at minimizing the total travelled distance. The entire solution can be modified by an Ant Colony approach [15]. Subsets of the solution are restructured using Large Neighborhood Search [34] or λ-interchanges [30] for trying exchanges between all pairs of routes. The Solomon [36] I1 insertion heuristic is used to reconstruct each individual route one at a time. The other set of mutation operators attempts to insert customers in the shortest route in alternative routes using the insertion procedure of Liu and Shen [27]. If necessary, an attempt is made to repair infeasible solutions by performing inter-route exchanges that replace a tardy customer by a feasible one or two-customer sequence. The elimination of shortest route is used in the beginning to quickly obtain solutions with number of routes close to the minimum. For more details, we refer to Berger et al. [2].
3
Multi-start local search
In addition to the hybrid genetic algorithm of Berger et al. [2], the multistart Local Search (LS) of Br¨ aysy et al. [8] is used to create starting solutions for the Threshold Accepting post-processor. The local search used consists of three phases. In the first phase a sequential cheapest insertion heuristic is used to create a set of initial solutions. Then, the solutions are improved upon in the next two phases. First, an attempt is made to reduce the number of routes in the created solutions using an extension of the well-known Ejection Chains [19, 20], called Injection Trees. Then, new modifications of the intra- and inter-route CROSS-exchanges [37] are invoked to reduce the total distance in the solutions with the minimum number of routes. The initial solution procedure is a modification of the cheapest insertion heuristic of Br¨ aysy [3]. Routes are initialized by selecting randomly an as of yet unrouted customer among the customers farthest away from depot, or among the customers having earliest deadline for service. The insertion cost is defined as weighted combination of additional detour and waiting time needed to service the customer on the current partial tour. In addition, insertion of customers farthest away from depot is favored by substracting from the insertion cost the distance to the depot, multiplied by a userdefined parameter value. To speed up the search, only geographically close customers to the current partial route are considered for insertion, and for calculating the changes in waiting time quickly, a new speedup technique is introduced. Moreover, the push-forward and push-backward strategies of Solomon et al. [35] are used to evaluate the feasibility of the time window constraint quickly. The route reduction procedure in the second step of the LS heuristic is based on an extension of the Ejection Chains (EC). In EC the basic idea is to combine series of simple moves into a compound move. In VRP context these simple moves refer to removing of a customer from its route and reinserting the removed customer in another route. The goal is to “make room” for a new customer in a route by first removing another customer from the same route. In each phase within the ejection chain, one customer remains unrouted. The removal and insertion procedures are repeated until one can insert a customer to another route without the need to remove (eject) any customer. In Br¨ aysy et al. [8] the customers are inserted directly in other geographically close routes, without first removing any customers, even if it leads to violation of capacity or time window constraints. Then, in case of violation of time windows, simple intra-route reinsertions are tried to reduce lateness in the route. If the route still remains infeasible after these reinsertions, customers are considered for removal, starting from the customers causing the highest detour. Contrary to Ejection Chains, the procedure can remove also more than one customers from a route, provided that these additional customers can be inserted directly in another route. Given the complexity of the procedure, a number of speedup techniques are suggested in Br¨aysy et al. [8] to evaluate the objective function value and
the feasibility quickly, as well as to limit the search to the most promising moves. The distance improvement is performed with modifications of CROSSexchanges of Taillard et al. [37], where the basic idea is to relocate or exchange segments of consecutive customers between two routes such that the orientation of the routes is preserved. The applied LS considers also inverting the order of the customers in the selected segments. Moreover, the neighborhood is enlarged. In Taillard et al. [37] the segment from route 2 is always inserted to a position, where the segment from route 1 was removed. The LS considers in addition the most promising insertion position in route 1 for each segment removed from route 2. A first-accept strategy is used, i.e., the algorithm accepts always the first move that improves the solution, but considers first the most promising exchanges between customers closest to each other. Finally, a number of speed-up techniques is used for feasibility checking.
4
Threshold Accepting
In this Section we describe a new Threshold Accepting (TA) metaheuristic for the VRPTW that is used as a post-optimization technique to reduce total distance in the best solutions produced by the HGA and LS for each problem. The proposed TA metaheuristic draws upon two new improvement heuristics, based on CROSS-exchanges [37], and can be imposed upon any heuristic or metaheuristic approach to e.g. further reduce distance in the solution obtained so far. The Threshold Accepting metaheuristic [14, 13] is a modification of the well-known Simulated Annealing metaheuristic. Simulated Annealing (SA) draws its analogy from the annealing process of solids. In the annealing process, a solid is heated to a high temperature and gradually cooled in order for it to crystallize. The solid must be cooled slowly such that the atoms have enough time to align themselves to reach a minimum energy state. This analogy can be used in combinatorial optimizations with the states of the solid corresponding to the feasible solution, the energy at each state corresponding to the value of objective function and the minimum energy being the optimal solution. For details, see [28, 25, 1]. SA always accepts moves to neighboring solutions that improve the objective function value. More precisely, the solution S in the neighborhood N (S) is accepted as the new current solution if ∆ ≤ 0, where ∆ = C(S ) − C(S) in which C denotes the objective function. To allow the search to escape a local optimum, a stochastic approach is used to direct the search. A move that worsens the objective function value is accepted with a probability e−∆/T if ∆ > 0, where T is a parameter called the “temperature”. The value of T varies from a relatively large value to a small value close to zero. These values are controlled by a “cooling schedule”, which specifies the initial, and temperature values at each stage of the algorithm.
Dueck and Scheurer [14] and Dueck et al. [13] simplified the Simulated Annealing procedure by leaving out the probabilistic element in accepting worse solutions. Instead they introduced a deterministic threshold, t, and a worse solution is accepted if its difference to the incumbent solution is smaller or equal to the threshold. The new procedure was named Threshold Accepting . The key components of TA are the function g(t) that determines the lowering of the threshold during the course of the procedure, stopping criteria as well as the methods used to create initial and neighboring solutions. The main advantages of TA are its conceptual simplicity and its excellent performance on different combinatorial optimization problems (see e.g. [38]). Algorithm 1 describes our implementation of TA for the VRPTW. The search consists of a user-defined number of iterations (n = 500). Each iteration starts by putting the routes in the current solution in random order. This is because the order in which the routes are considered for improvement affects the further improvements and final output. As the search is restarted from the best solution several times, this reordering is needed to avoid getting stuck to the same local minimum, i.e., to diversify the search. Accepting worse solutions in the inter- and intra-route local search operators is controlled by the current value of the threshold. If the relative difference in the lengths of the new and the current set of selected arcs is less than 1 + t, the modified pair of routes is accepted. The function g(t) determining the level of the threshold is linear. Starting from a user-defined maximum threshold tmax = 1, the threshold is reduced by ∆t = 0.025 units in each iteration until zero is reached. If the stopping criterion (the maximum number of iterations) is not met, the threshold is reset to the maximum value t = tmax and gradual lowering of the threshold is repeated for the remaining iterations. In Step 6 in Algorithm 1, the search is repeated for 4 iterations with (t = 0) instead of immediately setting t = tmax . This is because in each iteration at most one move to a neighboring solution is performed for each pair of routes, and each accepted move may trigger other improvements. Thus, several iterations are often required to reach the local minimum. During the local search (Steps 3 and 4) the current best solution found is maintained in memory. If no improvement has been found for a certain number of iterations (k), we try improving the best solution with the threshold reset to its maximum. We found this strategy of restarting from the best solution important from the viewpoint of getting good results in practice, enabling similar strategic oscillation as in Tabu Thresholding [21]. The initial solution is created using the genetic algorithm or the local search described in the previous sections. For exploring the neighboring solutions we use the IOPT-operator, introduced in Br¨ aysy [4] and a new improvement heuristic, GENICROSS. IOPT is a modification of well-known Or-opt exchanges [29], where also inversion of the order of the customers in the currently selected segment is considered. Here it is used only for intraroute optimization as inter-route exchanges are handled by GENICROSS.
Algorithm 1 Threshold Accepting Post-Processor for the VRPTW (1) Start with the best feasible solution, Si , obtained with by the HGA (see Section 2) and the LS (see Section 4). Set t = tmax and Sb = Si . for n iterations do (2) Order the routes in Si randomly. for All pairs of routes in Si do (3) Try to improve the current pair of routes in Si using GENICROSS. (4) Try to improve both individual routes in the current pair of routes in Si using IOPT. end for (5) Lower the threshold by ∆t : t = t − ∆t (6) If a better solution is found, store it: Sb = Si . If no improvement has been found for k iterations, restart the search from the best solution obtained so far at a reinitialized threshold: Si = Sb and t = tmax . If t = 0 for 4 iterations, reinitialize the threshold t = tmax . end for (7) Return the best solution obtained, Sb .
GENICROSS draws upon well-known CROSS-exchanges of Taillard et al. [37]. The basic idea in CROSS-exchanges is to relocate or exchange segments of consecutive customers between two routes while preserving customer orientation in the selected segments. The GENICROSS operator evaluates all possible exchanges of segments of consecutive customers between two routes R1 and R2 . Formally, let s be the maximum length of the segments S1 and S2 (of lengths s1 and s2 ) and let p1 and p2 be the starting positions of the currently selected segments in routes R1 and R2 , respectively. Moreover, let d1 and d2 be the customer positions in the destination route, where S1 and S2 are currently considered for insertion in routes R2 and R1 , respectively. In order to try all possible exchanges of segments between two routes R1 and R2 , a neighborhood consisting of six nested loops has to be evaluated (see Algorithm 2). The first pair loops over the starting positions p1 and p2 , the second pair over the segment lengths s1 and s2 , and the last pair over the insertion positions d1 and d2 . The CROSS exchanges of Taillard et al. [37] omit the last two loops because S2 is always inserted to a location in route R1 , where segment S1 was removed, instead of trying all possible locations for S2 in R1 , i.e. d1 = p2 and d2 = p1 . Contrary to CROSS-exchanges, GENICROSS uses first-accept strategy, i.e., accepts the first move that improves the objective function value, and also considers moves in which the order of the customers in the selected segments is inverted. Compared to CROSS-exchanges, GENICROSS is much more robust and reliable according to our computational tests. This is mainly due to fact the GENICROSS considers larger neighborhood. Nevertheless, there are not significant differences in time consumption because of several speedup techniques used.
Algorithm 2 GENICROSS neighborhood for p1 from the depot to the last customer on route R1 do for p2 from the depot to the last customer on route R2 do for s1 from s to 1 do for s2 from s to 1 do for d1 from depot to last customer on route R2 do for d2 from depot to last customer on route R1 do end for end for end for end for end for end for
Figure 1: The GENICROSS operator. Segments (i, i + 1) on the lower and (j, j +1, j +2) on the upper route are simultaneously reinserted in the upper and lower routes respectively. In addition, the orientation of the segment (i, i + 1) is reversed. i −1
i+2
i+4
i −1
i +1
i
j
j −1
i+3
j +1
i+2
j
j +3
j+4
j +5
j −1
i+4
i +1
i
j+2
i+3
j +1
j+2
j +3
j+4
As checking feasibility of a route in a VRPTW takes significantly more time than evaluating the impact of the move on the objective function [3], the cost of the exchange is evaluated first and feasibility is checked only if an improvement is found. To further speed up evaluating the cost of a move, an exchange of segments S1 and S2 between routes R1 and R2 is divided in two insertions: S1 from R1 to R2 and S2 from R2 to R1 . It is obvious that in case of improvement one or both of these segment relocations must improve the objective value. Therefore, we consider inserting S2 to R1 only if insertion of S1 to R2 improved the objective function value. This does not affect the worst case complexity, but in practice makes the search much faster. Figure 1 illustrates the GENICROSS operator.
j +5
To evaluate all possible moves, the GENICROSS must be performed twice, inverting the role of the routes. The limitation of this approach is that it considers only insertions between pairs of consecutive customers in the current routes. So it does not directly consider all the moves related to exchanging segments between two routes. It is possible that for example the insertion position d1 in route R2 belong to segment S2 removed previously from R2 . In this case the actual insertion of S1 will be between customers previously located before p2 and after p2 +s2 , not after the customer located at d1 . As a result, the insertion will not be made between a pair of consecutive customers. So, as in GENIUS [18], we consider here also insertions between pairs of customers that are not consecutive. Thus, in addition to evaluating the insertion between d1 and d1 + 1, we also consider insertions between d1 and d1 + 2, d1 + 3, . . . , d1 + s to examine all moves related to segment exchanges. To speed up the feasibility checks of each move, we use the well-known push-forward and push-backward strategies introduced in [35]. Moreover, we maintain in memory the arrival times and latest possible arrival times at each customer to quickly evaluate the feasibility of time window constraints. In case some infeasibilities are found, further checks are disregarded. The GENICROSS algorithm is: Algorithm 3 The GENICROSS operator (1) Start with 2 feasible routes R1 and R2 and set value for s. for the GENICROSS neighborhood described in Algorithm 2 do (2) Try to insert segment S1 ⊆ R1 and inverted segment S1 ⊆ R1 to route R2 . (3) If the total distance of R1 and R2 is improved, check the feasibility of R2 (4) If R2 is not feasible or the insertion of S1 or was not between consecutive customers, try to insert segment S2 ⊆ R2 and inverted segment S2 ⊆ R2 to route R1 . If the total distance is improved, check the feasibility of R1 and R2 (5) If both R1 and R2 are feasible, update R1 and R2 according to the move end for (6) Return the pair of 2 routes.
5 5.1
Computational experiment Problem data
We use the well-known benchmark problems of Solomon [36] and the extended VRPTW benchmarks of Gehring and Homberger [16] to analyze the performance of the TA post-optimization, the HGA+TA and LS+TA
hybrids. The Solomon [36] problem instances consists of 100 customers located in a 100 × 100 units plane, and they are divided in six different sets called R1, R2, RC1, RC2, C1 and C2. Locations of customers are uniformly distributed in R1 and R2, and clustered in C1 and C2. The clustered and random distribution are mixed in groups RC1 and RC2. Furthermore, for instances of type 1, the capacity of the vehicle and the time window at the depot are small, and hence only a few customers can be served by one vehicle. Conversely, for instances of type 2, the vehicle capacity and time windows are larger, and hence more customers can be served by one vehicle. The distances and travel times between the customers are measured by the Euclidean distance. Each customer has one time window for accepting service, an amount of requirement and a service time, and each vehicle has a fixed capacity. For these instances, the number of vehicles is considered as the primary objective to minimize. For the same number of vehicles, the total travelled distance is considered as the secondary objective. Gehring and Homberger [16] constructed similar sets of problem instances of 200, 400, 600, 800, and 1000 customers, with 60 instances in each set. The algorithms were implemented in C++ and the computational experiments were carried out on a Pentium 400 MHz and a AMD 700 MHz computer with 128 MB of RAM.
5.2
Computational results
The performance of the proposed Threshold Accepting post-processor is illustrated in Table 1, where we present the average number of vehicles and total travelled distance with respect to six problem groups of Solomon [36]. The Table is divided in two parts. The upper part describes the best, median and worst results obtained with the HGA before post-optimization, and the corresponding values after the Threshold Accepting post-optimization. Correspondingly, the lower part presents the results of the LS before and after the post-optimization. The Threshold Accepting post-processor is used only to improve upon the total distance in the solutions obtained with the HGA and LS approaches, and the results correspond to three independent runs of the algorithms. The running time of the HGA was set to 30 minutes per instance on Pentium 400 MHz, and the average CPU time of the LS heuristic is 2.1 minutes on the AMD 700 MHz. The running time of the TA post-processor is on average 0.5 minutes per instance over all Solomon’s test problems using the AMD 700 MHz computer. To be more precise, the running time is generally a lot shorter for type 1 problems (0.2 min.) than for type 2 problems (0.8 min.) because of their smaller complexity. According to Table 1 our TA post-processor is very efficient procedure to further reduce distance in the solutions obtained with the LS and HGA. For clustered problem groups C1 and C2, the HGA and LS already produce good results, and thus the improvement potential for the TA post-processor is smaller. In other problem groups the TA post-processor is able to improve significantly the solution values very quickly. Even the best solutions of
Table 1: Comparison of the best, average and worst results for Solomon’s benchmarks, before and after the post-optimization
HGA-Best HGA+TA-Best HGA - Median HGA+TA - Median HGA - Worst HGA+TA - Worst LS-Best LS+TA-Best LS - Median LS+TA - Median LS - Worst LS+TA - Worst
R1 12.17 1,230.22 12.17 1,208.57 12.17 1,243.72 12.17 1,215.23 12.17 1,254.11 12.17 1,230.54 12.00 1,235.22 12.00 1,220.20 12.08 1,247.12 12.08 1,222.69 12.17 1,253.04 12.17 1,224.70
R2 2.73 1,009.53 2.73 971.44 2.73 1,025.80 2.73 975.93 2.73 1,041.24 2.73 997.85 2.73 979.88 2.73 970.38 2.73 998.70 2.73 977.28 2.73 1,013.22 2.73 990.08
C1 10.00 828.48 10.00 828.38 10.00 828.71 10.00 828.38 10.00 828.97 10.00 828.38 10.00 828.38 10.00 828.38 10.00 828.50 10.00 828.38 10.00 828.38 10.00 828.38
C2 3.00 589.93 3.00 589.86 3.00 597.84 3.00 589.86 3.00 606.98 3.00 589.86 3.00 589.93 3.00 589.86 3.00 590.30 3.00 589.86 3.00 590.30 3.00 589.86
RC1 11.75 1,397.63 11.75 1,372.93 11.88 1,399.76 11.88 1,380.55 12.00 1,424.60 12.00 1,386.22 11.50 1,413.50 11.50 1398.76 11.63 1,418.53 11.63 1,398.83 11.63 1,441.28 11.63 1,418.72
RC2 3.25 1,230.20 3.25 1,154.04 3.25 1,255.22 3.25 1,170.85 3.25 1,291.51 3.25 1,203.97 3.25 1,152.37 3.25 1,139.37 3.25 1,171.75 3.25 1,150.48 3.25 1,186.98 3.25 1,159.81
HGA and LS are improved on average by 3.5% and 1.1%, respectively. In case of HGA the best results for RC2 are improved even by 6.5%. The reason for smaller improvements in case of LS is that the solutions obtained with the LS are better than those of HGA, and already very close to the best known. On the other hand, it is surprising that the TA is not able to improve the median and the worst results much more than the best results, even though there is a higher potential for improvements. The median results of HGA and LS are improved on the average by 4.0% and 1.9%, and the worst results by 4.1% and 2.1%, respectively. This implies the dependency of the TA on the initial solutions, and suggests applying it to high quality solutions in the end of the search. In Table 2 we present the results obtained with the LS with and without the TA post-optimization to the extended VRPTW benchmarks of Gehring and Homberger [16]. The first row gives the Cumulative Number of Vehicles (CNV) over all 60 instances for each problem size of 200, 400, 600, 800 and 1000 customers. Similarly, the second and third rows describe the Cumulative Total Distance (CTD) over all problems of given size before and after the post-optimization. The improvement refers to the improvements obtained with the TA in terms of distance, and the last row presents the CPU in minutes using the AMD 700 MHz computer. Here one must note that we adjusted the number of iterations for the TA according to the problem size, such that 300, 200, 150, 100, and 50 iterations were performed for problem sizes of 200, 400, 600, 800 and 1000 customers respectively. As one can see from Table 2, the presented TA post-processor is able to improve the distance values significantly in all problem sizes within very reasonable time limits. Moreover, the TA post-processor seems also to scale
Table 2: Comparison of the best, average and worst results for Solomon’s benchmarks, before and after the post-optimization
CNV CTD-LS CTD-LS+TA improvement % CPU/min
200 695 178,338 172,406 3.4% 0.7
400 1392 418,936 399,132 5.0% 1.1
600 2084 864,505 810,662 6.6% 1.6
800 2776 1,456,367 1,384,306 5.2% 2.1
1000 3465 2,254,216 2,133,376 5.7% 2.8
Figure 2: The sensitivity of the results with respect to the value of the threshold in case of problems R105 and RC108
100 90 80
%
70 60 50 40 30 20 10 0 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Threshold
1.8
2
2.2
2.4
2.6
2.8
3
R105 RC108
very well, given the adaptive strategy for selecting the number of iterations. The results obtained with the hybrid LS+TA heuristic are very competitive also with all previous approaches. For details, we refer to [8]. Figure 2 illustrates the sensitivity of the results to different threshold values. The x-axis presents the threshold values tried within the range of 0-3. We experimented also with higher values than 3, but were not able to find any improvements. The Figure shows the relative difference to the smallest obtained total distance in percentages for each threshold value. More precisely, we calculated the difference in the total distance with respect to the smallest value, and divided that difference by the maximum difference in the distances of the best and the worst solutions. As one can see from the Figure 2, the best results are obtained with threshold values close to 1. Setting the threshold value too small or high clearly worsens the solution quality. On the other hand, the scale of good values seems to be quite large. In Figure 3, we illustrate the typical convergence behaviour of the proposed post-processor with results obtained for RC108 and RC205 over 5000 iterations. The curves present in percentages the difference of the distance values over the minimum value.
3.5
4 3.5 3 2.5 2 1.5 1 0.5 0
3 2.5 %
%
Figure 3: Illustration of the convergence of the suggested TA metaheuristic on problems RC108 (left) and RC205 (right).
2 1.5 1 0.5 0
0
100
200
300
Iteration
400
500
0
1000
2000
3000
4000
5000
Iteration
According to Figure 3, the TA seems to converge very quickly during the first 500 iterations close to the minimum value. For RC205 minor improvements are obtained also much later, just before 5000 iterations. It seems that especially in case of RC205 there are a lot of small improvements in subsequent iterations at certain intervals, implying that one improvement may trigger others. In Table 3 we compare the performance of our hybrids of HGA and LS with the TA post-processor with the best metaheuristics proposed previously in the literature. The first column to the left lists the authors and columns R1, R2, C1, C2, RC1 and RC2 present the average number of vehicles and average total distance with respect to the six problem groups of Solomon [36]. Finally, the rightmost column indicates the cumulative number of vehicles (CNV) and cumulative total distance (CTD) over all 56 test problems. Here we consider only the best results obtained during all the computational experiments. In addition to using HGA and LS independently to create initial solutions for TA, we also experimented with a combined approach where we took the best result of both HGA and LS to each problem instance for TA post-optimization. According to Table 3 it seems that our Hybrids with the Threshold Accepting post-processor compete very well against the best methods found in the literature. The hybrid of both HGA and LS with TA gives better or equally good results than the previous approaches in all problems groups. Table 3 also illustrates the power and the robustness of the developed postoptimization technique. It is able to improve even the best results of HGA and LS by 0.5% and 0.7%, respectively, even though they are very close to the best-known. Here one must note that due to conflicting nature of route number and distance optimization, the comparison over total distance values is reasonable only for the same number of routes.
Table 3: Best performance comparison among VRPTW algorithms.
Author Rochat and Taillard [32] Taillard et al. [37] Chiang and Russell [9] Homberger and Gehring [24] Gehring and Homberger [16] Gambardella et al. [15] Liu and Shen [27] Gehring and Homberger [17] Cordeau et al. [10] Li et al. [26] Br¨ aysy [4] Berger et al. [2] Rousseau et al. [33] Br¨ aysy et al. [8] LS+TA HGA+TA LS+HGA+TA
R1
R2
C1
C2
RC1
RC2
12.25 1,208.50 12.17 1,204.19 12.17 1,204.19 11.92 1,228.06 12.42 1,198 12.00 1,217.93 12.17 1,249.57 12.00 1,217.57 12.08 1,210.14 12.08 1,215.14 11.92 1,222.12 11.92 1,221.10 12.08 1,210.21 12.00 1,222.55 12.00 1,214.69 11.92 1,216.58 11.92 1,215.62
2.91 961.72 2.82 980.27 2.73 986.32 2.73 969.95 2.82 947 2.73 967.75 2.82 1,016.58 2.73 961.29 2.73 969.57 2.91 953.43 2.73 975.12 2.73 975.43 3.00 941.08 2.73 968.77 2.73 960.44 2.73 966.05 2.73 956.35
10.00 828.38 10.00 828.38 10.00 828.38 10.00 828.38 10.00 829 10.00 828.38 10.00 830.06 10.00 828.63 10.00 828.38 10.00 828.38 10.00 828.38 10.00 828.38 10.00 828.38 10.00 828.38 10.00 828.38 10.00 828.38 10.00 828.38
3.00 589.86 3.00 589.86 3.00 591.42 3.00 589.86 3.00 590 3.00 589.86 3.00 591.03 3.00 590.33 3.00 589.86 3.00 589.86 3.00 589.86 3.00 589.86 3.00 589.86 3.00 589.86 3.00 589.86 3.00 589.86 3.00 589.86
11.88 1,377.39 11.50 1,389.22 11.88 1,397.44 11.63 1,392.57 11.88 1,356 11.63 1,382.42 11.88 1,412.87 11.50 1,395.13 11.50 1,389.78 11.75 1,385.47 11.50 1,389.58 11.50 1,389.58 11.63 1,382.78 11.50 1,400.91 11.50 1,389.20 11.50 1,387.66 11.50 1,385.17
3.38 1,119.59 3.38 1,117.44 3.25 1,229.54 3.25 1,144.43 3.25 1,144 3.25 1,129.19 3.25 1,204.87 3.25 1,139.37 3.25 1,134.52 3.25 1,142.48 3.25 1,128.38 3.25 1,159.37 3.38 1,105.22 3.25 1,139.51 3.25 1,124.14 3.25 1,143.12 3.25 1,123.84
CNV CTD 415 57,231 410 57,523 411 58,502 406 57,876 415 56,946 407 57,525 412 59,318 406 57,641 407 57,556 411 57,467 405 57,710 405 57,952 412 56,953 406 57,825 406 57,422 405 57,646 405 57,354
Table 4: Comparison of results obtained with limited computational effort for Solomon’s (1987) benchmark problems
Author (1) Solomon [36] (2) Rochat and Taillard [32] (3) Potvin and Bengio [31] (4) Taillard et al. [37] (5) Homberger and Gehring [24] (6) Gehring and Homberger [16] (7) Gambardella et al. [15] (8) Liu and Shen [27] (9) Cordone and Wolfler-Calvo [11] (10) Gehring and Homberger [17] (11) Li et al. [26] (12) Br¨ aysy [4] (13) Berger et al. [2] (14) Br¨ aysy et al. [8] (15) HGA+TA (16) LS+TA
R1
R2
C1
C2
RC1
RC2
13.58 1436.7 12.58 1,197.42 12.58 1294.7 12.33 1,220.35 11.92 1,228.06 12.42 1,198 12.00 1,217.93 12.17 1,249.57 12.50 1,241.89 12.00 1,217.57 12.08 1,215.14 11.92 1,222.12 12.17 1,230.22 12.00 1,235.22 12.17 1,208.57 12.00 1,220.20
3.27 1402.4 3.09 954.36 3.09 1185.9 3.00 1013.35 2.73 969.95 2.82 947 2.73 967.75 2.82 1,016.58 2.91 995.39 2.73 961.29 2.91 953.43 2.73 975.12 2.73 1009.53 2.73 979.88 2.73 971.44 2.73 970.38
10.00 951.9 10.00 828.45 10.00 861 10.00 828.45 10.00 828.38 10.00 829 10.00 828.38 10.00 830.06 10.00 834.05 10.00 828.63 10.00 828.38 10.00 828.38 10.00 828.48 10.00 828.38 10.00 828.38 10.00 828.38
3.13 692.7 3.00 590.32 3.00 602.5 3.00 590.91 3.00 589.86 3.00 590 3.00 589.86 3.00 591.03 3.00 591.78 3.00 590.33 3.00 589.86 3.00 589.86 3.00 589.86 3.00 589.86 3.00 589.86 3.00 589.86
13.50 1596.5 12.38 1,369.48 12.63 1465 11.90 1,381.31 11.63 1,392.57 11.88 1,356 11.63 1,382.42 11.88 1,412.87 12.38 1,408.87 11.50 1,395.13 11.75 1,385.47 11.50 1389.58 11.75 1397.63 11.50 1,413.50 11.75 1,372.93 11.50 1,398.76
3.88 1682.1 3.62 1,139.79 3.38 1476.1 3.38 1,198.63 3.25 1,144.43 3.25 1,144 3.25 1,129.19 3.25 1,204.87 3.38 1,139.70 3.25 1,139.37 3.25 1,142.48 3.25 1,128.38 3.25 1,230.20 3.25 1,152.37 3.25 1,154.04 3.25 1,139.37
(1) DEC 10, 1 run, 0.6 (