Adaptive Diversification Metaheuristic for the FSMVRPTW
O. Br¨ aysy et al.
An adaptive diversification heuristic for the Fleet Size and Mix Vehicle Routing Problem with Time Windows Olli Br¨aysy∗
Pekka Hotokka∗
∗ Agora
† Institute
Wout Dullaert†‡
Yuichi Nagata§
Innoroad Laboratory, University of Jyv¨ askyl¨ a, Finland P.O.Box 35, FI-40014 Jyv¨ askyl¨ a, Finland olli.braysy,
[email protected]
of Transport and Maritime Management Antwerp (ITMMA) University of Antwerp Keizerstraat 64, 2000 Antwerpen, Belgium
[email protected] ‡ Antwerp
Maritime Academy Noordkasteel-Oost 6, 2030 Antwerpen, Belgium
§ Graduate
School of Information Sciences Japan Advanced Institute of Science and Technology 1-1 Asahidai, Nomi, Ishikawa 923-1292, Japan
[email protected]
1
Introduction
The classical or capacitated Vehicle Routing Problem assumes vehicles to be homogeneous and customers to accept service at any given time. Both assumptions are rarely met in practice. Without a doubt, accomodating time windows to reflect service preferences of the customers and opening hours of the depot is the most common and best studied extension of the Vehicle Routing Problem. Dealing with homogeneous vehicles has relatively speaking received less attention, but its practical importance and computational complexity should not be underestimated. Liu and Shen [1] introduced the Fleet Size and Mix Vehicle Routing Problem with Time Windows (FSMVRPTW), and developed a benchmark of 168 instances derived from the well-known 100-customer Solomon benchmark for the VRPTW. Their paper triggered a series of contributions on the FSMVRPTW, surveyed in Br¨ aysy et al. [2]. In spite of the large number of real customers involved, academic research on heterogeneous routing problems has been limited to relatively small problem instances, often using the 100customer problem instances of Liu and Shen [1] as a benchmark. In this paper, we focus on the new distance-based objective variant for the FSMVRPTW to replace the common en EU/MEeting 2008 - Troyes, France, October 23–24, 2008
1
O. Br¨ aysy et al.
Adaptive Diversification Metaheuristic for the FSMVRPTW
route time objective, as suggested in Br¨ aysy et al. [2], and report on a powerful adaptive diversification heuristic for the 600 new large-scale problem instances for the FSMVRPTW derived from the Gehring and Homberger [3] problem instances for the VRPTW in Br¨ aysy et al. [4], using real-life data on the available vehicle types and costs.
2
Solution approach
The suggested heuristic solution method is based on the two previous studies by Br¨ aysy et al. [2, 4]. The current approach, however, contains several improvements to both diversify and intensify the search. The method consists of three phases and a preprocessing step. The preprocessing step is used to define a limit value for each customer point, giving a radius (distance) within which the c closest customers are located. This speeds up the identification of the close customers during the search.
2.1
Phase 1: Initial solution construction
The initial solution is generated with a modification of the savings heuristic , suggested in Br¨ aysy et al. [4]. The search is started by serving each customer with a separate route. Then, an attempt is made to merge routes in a greedy way until the total cost of the solution (including both vehicle cost and total distance) cannot be improved. Vehicle sizes are updated whenever needed and always set to the smallest vehicle available capable of serving the customers on the route. When merging two routes R1 and R2 , the search is not limited to inserting R1 either in front of or after R2 , but also positions between consecutive customers within route R2 are considered. To save computation time, the merges are limited to the p closest routes only. The geographical proximity of the routes is based on the Euclidean distance of the average X and Y coordinates of the customers in the routes. Each time m route mergers have been executed, the information on the geographically close routes is updated. Moreover, after selecting two geographically close routes, R1 and R2 , only the c customers from R2 which are closest to the endpoints of R1 are considered as insertion of merging points. Here p, m and c are user-defined parameters. For more details, we refer to Br¨ aysy et al. [4].
2.2
Phase 2: Route elimination heuristic
In the second phase an attempt is made to reduce the number of routes in the created initial solution. The applied route elimination procedure (ELIM) is based on simple customer reinsertions. All routes of the incumbent solution are considered for depletion in random order and eliminations are attempted until no more improvements can be found with respect to the total cost objective. For a given route, ELIM removes all customers, and tries to insert them one by one in the order they are currently served in the p geographically closest neighboring routes. The geographically close routes are determined both before and after Phase 2. For a given customer v and geographically close route R2 , only insertion positions adjacent to one of the c closest customers with regard to v are considered and the best feasible insertion according to the total cost objective is selected. In case the current route cannot be eliminated at a lower cost, the executed insertions are backtracked. 2
EU/MEeting 2008 - Troyes, France, October 23–24, 2008
Adaptive Diversification Metaheuristic for the FSMVRPTW
2.3
2.3.1
O. Br¨ aysy et al.
Phase 3: Local search improvement
Local searches
In Phase 3, an attempt is made to further improve the solution from Phase 2. The improvement is based on four local search heuristics. In addition to the above described ELIM procedure (it is applied here every second iteration), the applied local search operators include a route splitting operator called SPLIT, and ICROSS and IOPT operators suggested in Br¨ aysy [5]. In this paper, the scope of these ICROSS and IOPT local search operators, however, is adjusted during the search. ICROSS relocates or exchanges segments of consecutive customers between two separate routes such that also inverting the customer order in the segments is considered. The ICROSS neighborhood is usually large, so several limitation strategies are applied to achieve scalability. In addition to limiting the maximum segment length (ls ), only geographically close routes and only segments that involve the geographically closest customer pairs in the two routes are considered. Instead of considering a fixed number of close routes, p, (as in Phases 1 and 2) for a given route R1 , an analysis step is made in the beginning of Phase 3 and after each successful SPLIT move. In the analysis step the ICROSS is applied to the p closest routes of each route, starting from the closest and we record to each route the information that how many of its closest routes should be considered to find improvements. In other words, we stop with a close route p′ with which ICROSS cannot find improvement, and record for each route its p′ value. This strategy enables a lot more flexible and problem dependent search. In case p′ < 3, we set p′ = 3. During the search, for a given route R1 , its p′ geographically closest routes are considered in random order to better diversify the search. For a given customer v, currently served by R1 , ICROSS first checks all customers w in R2 that are among c closest from v and whose time window match with v. The time windows match if Ev + Sv + T IM E(v, w) ≤ Lw where Ev is the earliest possible service time of v, Sv is the service time of v, T IM E(v, w) is the travel time between v and w, and Lw is the latest possible service time of w. In the same way as with p, the value of c is defined separately for each route in the analysis step. We note this value c′ . Then, the resulting (v, w) pairs are sorted in ascending order according to their Euclidean distance, and ICROSS moves are attempted only for segments that start from v or w and only for insertion positions adjacent to v or w and only for q closest (v, w) pairs, starting from the closest pair. Along the same lines, the IOPT intra-tour operator is limited to the c closest customers with regard to the segment endpoints. To enable efficient diversification and exploration of the search space, we suggest here a new acceptance strategy for the local search moves. Instead of the traditional first- or best-accept rules based on the objective function only, we keep here track of the arc frequencies in the obtained solutions during the search. Every time when evaluating a new move, we calculate both the total cost value and the sum of the frequencies of the new arcs created by the move. This is repeated for all feasible moves of a given neighborhood. Then the feasible move that improves the total cost value and has the lowest total arc frequency is selected. To further increase the efficiency of the improvement phase, the local searches do not consider a route pair or a single route if no improvement was found last time and the routes have not changed since. EU/MEeting 2008 - Troyes, France, October 23–24, 2008
3
O. Br¨ aysy et al. 2.3.2
Adaptive Diversification Metaheuristic for the FSMVRPTW
Metaheuristic frameworks
To escape local minima, the above described local searches are guided by the well-known Threshold Accepting (TA) and Tabu Search (TS) metaheuristics. The basic idea of TA is to allow also local search moves that worsen the objective value, as long as the worsening is within the current value of the threshold limit. The threshold limit Tm ax, is adjusted during the search. For more details of the basic approach, see Dueck and Scheurer [6]. Here a modified version of the TA with several improvements are suggested. At the beginning of the search the maximum value of the threshold, Tm ax, is defined randomly within range [0.03 − 0.08]. The algorithm starts with threshold T = 0 (no worsening allowed) and is repeated with that value until a local minimum is reached. Then, T is set to Tmax a new maximum value, T = mod(10)+1 . The equation in the nominator calculates the modulus of the number of times the value of T has been reset to a new value after searching with T = 0. The main idea is that in the beginning we allow large jumps (more worsening), and then smaller and smaller jumps. After resetting T ten times, large jumps are again attempted. At each iteration, T is reduced by ∆T units (defined randomly in range [0.005 − 0.010]) until T = 0. When T = 0, the search is repeated with zero threshold until no more improvements Tmax can be found. After that, T is set to T = mod(10)+1 again and so on until nimprove iterations are tried. If no more improvements have been found for a given number of iterations nrestart , the search is restarted from the current best solution and the threshold is set to T = Tmax . The value of nrestart is set randomly (with 50% probability) to either 10 or 40. In addition to the threshold value that controls the acceptance of individual moves, we also control the total relative worsening of the solution quality with respect to the current best solution to avoid allowing too many worsening moves. More precisely, when the total worsening exceeds a given percentage (defined randomly in the range 2 − 10%), T is set immediately to zero. Moreover, for SPLIT, the worsening is not allowed as we found that it resulted in too large diversification. The threshold is set to zero also each time when new best solution is found to intensify the search. The above described limited threshold accepting approach results easily in repeating the same moves several times. To avoid this and speed up the search, we included a simple tabu search method that is applied simultaneously with the TA. The TS is applied here only with the ICROSS and IOPT operators. Within the TS scheme, we record as tabu the arcs connecting the first nodes of the route segments for moves that actually improve the objective value. The tabu status of these arcs forces keeping them for a given number of iterations (40), even if changing them would enable further improvements (no aspiration criteria). We also noticed that the suggested route neighborhood-based limited search often prevents larger changes to the solution structure. To allow also larger modifications, we developed also another search strategy, called “chain mode” for exploring the route pairs with ICROSS. Here, instead of considering routes and their closest neighboring routes in random order, the route pairs considered next for improvement are selected based on the previous improving moves. More precisely, given an improving ICROSS move with route R1 and one of its closest routes R2 , we set R2 as next R1 and attempt improvements with its closest routes. This is repeated until improvements can be found. Moreover, the allowed maximum total worsening is increased here to vary randomly within the range of 3 − 15%). The chain mode is started with each restart and terminated when a new best solution is found. 4
EU/MEeting 2008 - Troyes, France, October 23–24, 2008
Adaptive Diversification Metaheuristic for the FSMVRPTW
3
O. Br¨ aysy et al.
Computational experiments - Conclusions
In contrast to Liu and Shen [1], the sum of all vehicle costs and total distance is considered as the optimization objective, as opposed to the sum of vehicle costs and en route time. The new objective was first introduced in Br¨ aysy et al. [2] and it is believed to be of a higher practical value than the former objective function. Tabel 1 reports on Liu and Shen benchmarks for the MSDAL, BPDRT-Quick and BPDRT-Normal heuristics developed in Br¨ aysy et al. [4] and four implementations of the current heuristic (very quick, quick, medium, normal), using respectively 500, 1000, 2000 and 4000 iterations. To support the research on large-scale heterogeneous routing problems, Br¨ aysy et al. [4] developed a new set of benchmark based on the large-scale VRPTW benchmark instances of Gehring and Homberger [3]. For 300 benchmark problems, ranging from 200 to 1000 customers each, a single set of 8 vehicle types and 2 cost levels were constructed based on real-life cost data and general testing considerations 2. Computational testing on both benchmark sets indicates that the new heuristics are highly competitive, both with respect to computation time and solution solution quality.
References [1] Liu, F.-H. and S.-Y. Shen (1999): “The fleet size and mix vehicle routing problem with time windows”. In: Journal of the Operational Research Society, 50, 721–732. [2] Br¨ aysy, O., Dullaert, W., Hasle, G., Mester, D. and M. Gendreau (2008): “An Effective Multi-restart Deterministic Annealing Metaheuristic for the Fleet Size and Mix Vehicle Routing Problem with Time Windows”. In: Transportation Science, available online. [3] Gehring, H., and J.A. Homberger (1999): “Parallel hybrid evolutionary metaheuristic for the vehicle routing problem with time windows”. In: Miettinen, K., Mkel, M., and Toivanen J. (1999). Proceedings of EUROGEN99. Jyvskyl, University of Jyvskyl, 57–64. [4] Br¨ aysy, O., Porkka, P., Dullaert, W., Repoussis, P.P., and C.D. Tarantilis (2008): “A well-scalable Metaheuristic for the Fleet Size and Mix Vehicle Routing Problem with Time Windows”. Paper submitted to Expert Systems with Applications. [5] Br¨ aysy, O. (2003): “A reactive variable neighborhood search for the vehicle routing problem with time windows”. In: INFORMS Journal on Computing, 15, 347–368. [6] Dueck, G., and T. Scheurer (1990): “Threshold accepting: a general purpose optimization algorithm”. In: Journal of Computational Physics, 90, 161–175.
EU/MEeting 2008 - Troyes, France, October 23–24, 2008
5
Quick 7084.01 5687.23 4070.70 3167.08 4960.78 4225.94 4865.96 0.26 5 0.59 11 1615.49 1185.36 1544.82 1143.37 1756.42 1371.29 1436.12 0.56 5 0.56 15
Medium 7084.63 5688.28 4076.79 3180.56 4967.44 4232.27 4871.66 0.37 5 1.09 3 1616.18 1185.19 1545.19 1142.26 1748.93 1373.28 1435.17 0.49 5 1.26 17
Normal 7083.02 5686.75 4054.53 3157.80 4931.74 4214.76 4854.77 0.03 5 2.54 46 1615.39 1185.19 1536.06 1133.98 1742.14 1362.34 1429.18 0.07 5 2.64 39
MSDAL 7087.20 5719.98 4074.73 3194.50 4958.93 4241.72 4879.51 0.54 3 23.17 3 1616.99 1186.33 1538.90 1158.71 1749.37 1381.71 1438.67 0.74 3 26.58 13
ESWA Normal 7085.91 5689.40 4060.96 3180.58 4935.52 4231.25 4863.94 0.22 5 3.27 7 1615.40 1185.69 1539.90 1149.06 1749.66 1372.82 1435.42 0.51 5 3.32 14
ESWA Quick 7090.23 5688.60 4080.65 3205.98 4975.33 4233.13 4878.99 0.53 5 0.34 2 1617.97 1187.23 1559.07 1168.47 1790.99 1391.67 1452.57 1.71 5 0.35 5
Best found 7083.02 5686.75 4051.33 3157.80 4927.13 4214.76 4853.46 0.00
1615.39 1185.19 1534.74 1132.33 1738.96 1362.19 1428.13 0.00
EU/MEeting 2008 - Troyes, France, October 23–24, 2008
C1 (A) C2 (A) R1 (A) R2 (A) RC1 (A) RC2 (A) Average % above minimum Runs CPU, s (average) best-known solutions C1 (C) C2 (C) R1 (C) R2 (C) RC1 (C) RC2 (C) Average % above minimum Runs CPU, s (average) best-known solutions
Very quick 7089.05 5688.32 4091.34 3184.10 4985.15 4239.90 4879.64 0.54 5 0.3 3 1616.18 1186.11 1552.71 1152.03 1764.13 1376.06 1441.20 0.92 5 0.34 10
6
Adaptive Diversification Metaheuristic for the FSMVRPTW O. Br¨ aysy et al.
Table 1: Liu and Shen (1999) [1] benchmarks
Quick 13617.50 28486.80 46834.88 66481.68 89237.05 48931.58 2.69 5 5.7 6 3797.76 8419.47 15883.50 25594.35 37900.22 18319.06 0.84 5 6.1 23
Medium 13519.39 28267.10 46672.78 66177.07 88900.91 48707.45 2.22 5 9.6 15 3798.75 8424.22 15893.30 25594.71 37887.44 18319.68 0.85 5 10.9 55
Normal 13345.68 27818.90 45483.22 64776.13 87062.85 47697.36 0.10 5 20.4 261 3779.93 8361.12 15759.89 25428.66 37574.34 18180.79 0.08 5 22 215
MSDAL 13494.78 28121.16 46648.79 67325.11 91862.62 49490.49 3.86 5 805.3 17 3870.58 8658.01 16592.86 26940.42 40557.01 19323.78 6.37 5 872.6 3
ESWA Normal 13588.70 28337.82 46498.11 66312.86 89165.95 48780.69 2.37 5 21.3 2 3829.72 8502.17 16036.31 25994.01 38552.68 18582.98 2.30 5 21.2 3
ESWA Quick 13923.96 29195.41 48197.18 69182.82 93994.43 50898.76 6.82 5 3.1 0 3888.61 8751.84 16748.80 27518.43 41250.37 19631.61 8.07 5 3.1 0
Best found 13288.73 27673.64 45467.83 64767.43 87055.76 47650.67 0.00
3775.81 8354.51 15747.09 25405.87 37546.48 18165.95 0.00
7
O. Br¨ aysy et al.
200 (A) 400 (A) 600 (A) 800 (A) 1000 (A) Average % above minimum Runs CPU, s (average) best-known solutions 200 (C) 400 (C) 600 (C) 800 (C) 1000 (C) Average % above minimum Runs CPU, s (average) best-known solutions
Very quick 13725.26 28859.90 47292.69 67232.60 90346.17 49491.32 3.86 5 3.3 0 3824.98 8503.76 16030.37 25807.27 37969.05 18427.08 1.44 5 3.6 9
Adaptive Diversification Metaheuristic for the FSMVRPTW
EU/MEeting 2008 - Troyes, France, October 23–24, 2008
Table 2: PBDRT benchmarks [4] benchmarks