Metaheuristics for Tourist Trip Planning Pieter Vansteenwegen, Wouter Souffriau, Greet Vanden Berghe, and Dirk Van Oudheusden
Abstract The aim of this paper is to present an overview of metaheuristics used in tourism and to introduce skewed variable neighbourhood search to solve the team orienteering problem (TOP). Selecting the most interesting points of interest and designing a personalised tourist trip, can be modelled as a TOP with time windows (TOPTW). Guided local search (GLS) and variable neighbourhood search (VNS) are applied to efficiently solve the TOP. Iterated local search (ILS) is implemented to solve the TOPTW. The GLS and VNS algorithms are compared with the best known heuristics and applied on large problem sets. The obtained results are almost of the same quality as the results of these heuristics but the computational time is reduced significantly. For some of the problems VNS calculates new best solutions. The results of the ILS algorithm, applied to large problem sets, have an average gap with the optimal solution of only 2.7%, with much less computational effort. Keywords Guided local search Iterated local search Team orienteering problem with time windows Variable neighbourhood search
1 Introduction Many tourists visit a region or city during one or more days. It is obviously impossible to visit everything and tourists want to select what they believe to be the most attractive points of interest (POI). Nowadays, their selection is based on information of web sites, articles in magazines, or on guidebooks available in bookstores or libraries. Once the selection is made, the tourists decide on the time to visit each POI and they choose a route between the points. Tourists face several difficulties acting this way: information in guidebooks is rarely up-to-date, POIs are (partly) closed due to renovation and some timetables (theatre, for example) are unavailable. Even P. Vansteenwegen () Centre for Industrial Management, Katholieke Universiteit Leuven, Celestijnenlaan 300a – bus 2422, 3001 Leuven, Belgium e-mail:
[email protected]
M.J. Geiger et al. (eds.), Metaheuristics in the Service Industry, Lecture Notes in Economics and Mathematical Systems 624, DOI 10.1007/978-3-642-00939-6 2, c Springer-Verlag Berlin Heidelberg 2009
15
16
P. Vansteenwegen et al.
selecting the most attractive POIs is not easy. Usually, tourists are happy if they devise a somewhat attractive and feasible schedule, but they remain clueless about whether or not better schedules are possible. Current Mobile Tourist Guides (MTG) such as Gulliver’s Genie [1], GUIDE [2], CRUMPET [3], IMAGE [4] and Dynamic Tour Guide [5] support the comparison of up-to-date information and allow the user to read related pieces of information. They help tourists in choosing destinations, they provide shortest routes between these destinations, etc. They do not propose, however, integrated holiday plans. The next generation MTGs must provide a more integrated service. They will become completely personalised, and selection, routing and scheduling features will be enhanced. Point of interest information and the user profile can be combined to determine the value of any POI for a particular tourist [2, 6]. In composing a trip, the sum of the POI values should be maximised, but the cost and available time are key constraints. Obviously, other kinds of information are necessary as well: How many days do tourists want to spend in a given region or city? Are they travelling by car? Did they already visit this city before and are there POIs that they want to see again? Next-generation MTGs will use these information components to suggest a personal and feasible trip plan, including travelling directions. In order to better model the problems tourists face in practice, the model should be extended with some extra features. A few straightforward extensions are: opening and closing times of POIs, budget limitations of tourists and trips of multiple days. Another extension is that it may sometimes be worthwhile to follow a certain route, for instance a drive through a beautiful canyon, when it is generally assumed that POIs are situated at a specific location. Another complicated extension considers the weather dependency of POI values. On a rainy day an open-air museum or a panoramic view loses a lot of its value. The above-mentioned problem to suggest personal tourist trips can be modelled as a tourist trip design problem (TTDP) [7]. This paper presents three different metaheuristics to solve trip planning problems in tourism. In the next section, the TTDP is discussed in more detail. Section 3 describes a guided local search algorithm and a variable neighbourhood search algorithm to tackle one variant of the TTDP. In Sect. 4, an iterated local search algorithm that deals with another variant of the TTDP is presented. Section 5 concludes the paper.
2 Tourist Trip Design Problem In its simplest formulation the TTDP can be considered to be identical with the orienteering problem (OP) [8]. In the OP a set of n locations i is given, each with a score Si . The starting point (location 1) and the end point (location n) are fixed and can coincide. The time needed to travel from location i to j is known for all locations. Not all locations can be visited since the available time is limited to a given time budget Tmax . The goal of the OP is to determine a route, limited by Tmax ,
Metaheuristics for Tourist Trip Planning
17
that visits some of the locations, in order to maximise the total collected score. Each location can be visited at most once. The OP differs from the well-known travelling salesperson problem (TSP) in that its goal is to maximise the total score collected instead of minimising the travel time/distance. Furthermore, not all locations have to be visited in the OP. Of course, determining the shortest path between the selected locations will be useful to visit as many locations as possible in the available time. The OP can be extended with time windows and multiple-day planning. This is called the team orienteering problem with time windows (TOPTW). The team orienteering problem (TOP) is an OP for which the goal is to determine m routes, each limited to Tmax , that maximise the total collected score. In the TOPTW the locations have a service or visiting time Ti and a time window that should be respected. The OP [8] is also known as the selective travelling salesperson problem [9], the maximum collection problem [10] and the bank robber problem [11]. Furthermore, the OP can be formulated as a special case of the resource constrained travelling salesperson problem [12], as a travelling salesperson problem with profits [13] or as a resource constrained elementary shortest path problem [14]. Many (T)OP applications are described in the literature: the sport game of orienteering [15], the home fuel delivery problem [16], athlete recruiting from high schools [10], routing technicians to service customers [17], etc. Usually, most of these applications also require time windows and, as a consequence, the TOPTW model can be applied to many real life situations. The best published heuristics for the TOP are described in Archetti et al. [18]. They implement variable neighbourhood search and tabu search algorithms. A detailed and extended review of many algorithms for the OP and the TOP can be found in Tang and Miller-Hooks [17]. Many articles have been published regarding vehicle routing with time windows. Yet, only three articles deal with the OPTW [14,19,20], none were found about the TOPTW. Righini and Salani [14] apply bi-directional dynamic programming to solve the OPTW to optimality. Bar-Yehuda et al. [20] also mention the OPTW, but only for the special cases where all points have the same score and points are situated on a line or in the Euclidean plane. They do not consider time limits on the route duration. This paper presents a guided local search algorithm and a variable neighbourhood search algorithm to solve the TOP and an iterated local search algorithm to solve the TOPTW. The algorithms are tested on large problem sets and the results are compared with the results of the best published algorithms.
3 Guided Local Search and Variable Neighbourhood Search for the TOP In this section, two metaheuristic frameworks are applied to solve the team orienteering problem (without time windows). Both algorithms apply similar local search procedures to find a high quality solution. First, all these procedures are explained.
18
P. Vansteenwegen et al.
Next, the two frameworks implementing these procedures are clarified. Finally, the results obtained by these metaheuristics are compared with each other and with the best published results.
3.1 Procedures Construction Procedure As a construction heuristic (Construct) the “Initialisation method” described by Chao et al. [21] is used. First, all points that cannot be reached are removed from the problem. Then, a fixed number of points, furthest from the start and end point, are selected. Each of the m routes is started by assigning one of these chosen points to the route (m is the number of routes). Next, all the remaining points are inserted into these m routes using cheapest insertion, by only looking at the distance, not at the score. If all m routes exhaust the time budget and unassigned points remain, new routes are constructed with these points (using cheapest insertion) until all points are assigned. Finally, the best m routes are selected to start the remaining part of the algorithm. Intensification Procedures First, five moves are discussed that increase the total score of the solution: Insert, TwoInsert, Replace, TwoReplace and Change. Next, two moves are described that reduce the travel time between the selected points: TwoOpt and Swap. Finding the shortest route between the selected points is not an explicit part of the TOP objective. However, the shorter the route, the more likely extra points can be added to that route later: 1. The Insert move tries to visit one point extra. Only the least time consuming and feasible position to include each extra point is retained. 2. The TwoInsert move tries to visit two extra points. For each combination of two not yet included points, the least time consuming and feasible positions to include each of the points in the same route are considered. If both points should be inserted in the same position, the best sequence to insert the two points in the route should be determined. The move is only considered if the total insertion time is smaller than the available time budget. 3. For the Replace move all non-included points are considered for insertion. For every point it is checked what would be the least time consuming position in the route to include that point. If enough time budget is available for insertion, the point is inserted. If the remaining budget is insufficient, all included points with a lower score are considered for exclusion. If excluding one of these points from the route creates enough time to insert the non-included point under consideration, a replacement will be carried out: the included node will be excluded, and the non-included node will be inserted at its least time consuming position.
Metaheuristics for Tourist Trip Planning
19
4. For the TwoReplace move all combinations of two non-included points are considered for insertion. For each combination, the least time consuming and feasible positions to include each of the points in the same route are considered. If necessary, two successive included points are considered for exclusion to make the insertion feasible. Only TwoReplace moves that increase the total score are considered. 5. The Change move generates neighbours in an opposite way to Replace and TwoReplace. Change first removes five successive points in a route to increase the available time budget for insertion. Next, the non-included points are sorted based on their score and, if feasible, they are inserted one by one on the least time consuming position, until no more points can be inserted. If the removal and the insertion result in a higher total score, the new solution is accepted as a neighbour. Otherwise, no neighbour is determined and the next five points are removed. 6. A very popular move to reduce the travel time between selected cities is TwoOpt [22]. TwoOpt removes two edges from the route to replace them with two new edges not previously included in the route. The route has to remain closed and the total travel time should be reduced. 7. A Swap exchanges two points belonging to different routes. If time can be saved in each route by this exchange, or if the time saved in one route is longer than the extra time needed in the other route, the new solution is added to the Swap neighbourhood. Of course, the available time budget of both routes has to be respected. Insert, TwoInsert, Replace, TwoReplace and TwoOpt are single-route procedures that simultaneously operate on several routes. Change is applied to each route separately. Diversification Procedures Three different procedures are used to diversify the search. Diversifying is often used to escape local optima. Remove and Disturb simply remove a certain number of successive points in each route. Group tries to gather the available budget spread over different routes within the current solution into a single route in the new solution: 1. Group tries to bring together the available time left in different routes. For most problems, it is better to have a lot of time available in one route and no time left in the other routes, than to have a little time available in each route. In the former case, it is more likely that another point can be added to the solution. Group is constructed based on this observation. For each included point the possibility of moving it to another route is calculated. If possible, the point is moved from its original route to the new route. In this way, time is made available in the original route and this time can be used to insert a new point later. Obviously, the algorithm guarantees that as soon as a point is removed from a route, no other points can be moved to the route by this procedure. This is necessary to avoid that the available time left in this route is first increased but later decreased.
20
P. Vansteenwegen et al.
2. Remove works with two parameters. The first parameter determines the number of successive points to be removed from each route. The second parameter determines the position in every route to start the removal. If the end point of a route is reached before a sufficient number of points is removed, removing continues from the start point. The position to start removing is always the position after the last removal during the previous phase. 3. Disturb removes a part of each route in a different way than Remove. It removes a fixed percentage of points between the starting point and the end point, either at the beginning or at the end of the route, depending on the moment that this heuristic is used in the algorithm.
3.2 Guided Local Search Framework Guided Local Search (GLS) was developed by Voudouris and Tsang [23]. GLS penalises, based on a utility function, unwanted solution features during each local search iteration. The penalty decreases the objective function during every iteration. It allows the solution procedure to escape from local optima and to continue the search. The GLS algorithm implements Insert, Replace, TwoOpt, Swap, Disturb and Group. All moves, except Disturb, are used as a local search heuristic. This means that a move is applied until no more improvements are possible. For instance, the Insert move will be applied until no more points can be inserted. Before GLS was applied, a test run with a combination of the above-mentioned moves showed that the Replace heuristic was the most contributing to increase the score and the TwoOpt heuristic was the most contributing to reduce travel time. In order to improve these heuristics, GLS is applied to Replace and TwoOpt. We did not apply GLS to all the moves because that would be too time consuming. In order to escape from the local optimum obtained by the Replace heuristic, two GLS penalties are used. The first “penalty” increases the score of the nonincluded point with the highest score. The second penalty decreases the score of the included point with the lowest score and removes it from the route. After applying these penalties and rewards, the Replace heuristic is used again during the next iteration step, but always with the modified scores. The GLS iteration steps are carried out a fixed number of times. At the end of each iteration, the real total score, without the penalties, is calculated and the best route is saved. In order to escape from the local optimum obtained by the TwoOpt heuristic, the GLS framework penalises the longest arc in the current solution. After penalisation, TwoOpt local search is used once more during the next iteration step, but always with the increased distances. The GLS iteration steps are carried out a fixed number of times. At the end of each iteration, the real total distance, without the penalties, is calculated and the best route is saved.
Metaheuristics for Tourist Trip Planning
21
Algorithm Structure Algorithm 1 presents the pseudo code of the GLS algorithm.
Algorithm 1: The GLS algorithm’s pseudo-code Construct; ALG Loop D 0; while ALG Loop < 10 do ALG Loop C1; LS Loop D 0; while Solution improved and LS Loop < 10 do LS Loop C1; Swap local search; TwoOpt guided local search; Swap local search; Group local search; Insert local search; Replace guided local search; end if Solution better than BestFound then BestFound D Solution; else if Solution DD Bestfound then if Not Disturbed before then Disturb; else Return BestFound; end end if ALG Loop DD 5 then Disturb; end end Return BestFound;
The algorithm starts with Construct. Afterwards the local search heuristics are implemented in two loops: the Algorithm loop (ALG Loop) and the Local Search Loop (LS Loop). The LS Loop is embedded in the ALG Loop. The ALG Loop starts with the LS Loop, disturbs the constructed routes when necessary and ends the algorithm after 10 iterations. The LS Loop applies the local search methods Swap, TwoOpt, Group, Insert and Replace in a fixed sequence and ends after 10 iterations or, to reduce the calculation time, if the current solution is not improved by LS Loop. ALG Loop and LS Loop are both limited to 10 iterations because increasing this parameter does not significantly improve the results and only causes longer computation times. The GLS algorithm is described in detail in Vansteenwegen et al. [24].
22
P. Vansteenwegen et al.
3.3 Skewed Variable Neighbourhood Search Framework VNS is a metaheuristic developed by Hansen and Mladenovic [25] that systematically exploits the idea of changing the neighbourhood, both in moving to the local optima (“local search”) as in escaping from the local optima (“shaking”). VNS has the advantages that the basic schemes are simple and require few or no parameters and that very high-quality solutions are obtained for many problems. Skewed VNS (SVNS) is a modification of VNS that is often used for problems that have several separated and possibly far apart valleys containing near-optimal solutions. To better explore the search space far away from the current best solution, a solution could be accepted, that is not necessarily as good as the best one known, provided that it is far from the current solution. This is the “recenter” part of SVNS. A distance measure between solutions should be defined to apply this VNS variant. Algorithm Structure In this SVNS algorithm all the intensification moves are used to generate neighbourhoods. Group and Remove are used for diversification, Disturb is not applied in this algorithm. During Remove, the number of points that are removed in each route, is equal to the parameter k of the SVNS framework (Algorithm 2). The recenter part of the algorithm, typical for SVNS, needs some extra explanation. If the result from the shaking phase and local search (x 00 ), is better than the best solution yet (x), the search is recentered: x 00 is assigned to x and the new solution becomes the best solution. Typical to Skewed VNS, the search will also be recentered when x 00 is slightly worse than x, provided that the distance between x 00 and x is large enough. In this case, the distance between two solutions is defined as the number of points that are present in x 00 but not in x. If the search is recentered, k is initialised to 1, otherwise, k is increased by 1. Only when the total score actually increases, the number of iterations with no improvements (NoImprovement) is initialised to 0. In all other cases, NoImprovement is increased by 1.
3.4 Results The algorithms were tested on a large number of test problems and compared with published results. Test sets were used from Chao [26] and from Tang and MillerHooks [17]. The best results for the TOP were published by Archetti et al. [18]. All experiments were carried out on a personal computer Intel Pentium 4 with 2.80 GHz and 1 GB RAM. It has the same specifications as the computer used by Archetti et al. [18]. All the test results are summarised in Tables 1–3 (with n, the number of locations and m, the number of routes). For the diamond-shaped and square-shaped test
Metaheuristics for Tourist Trip Planning
23
Algorithm 2: Structure of the SVNS algorithm Set of local search moves (Nj ): Insert, TwoOpt, Swap, Replace,TwoInsert, TwoReplace, Change; Construct ! x; while NoImprovement < 40 do k D 0; while k < 25 do Shaking: alternate between Remove.x; k/ and Group.x/ ! x 0 ; j D 0; Local Search: while j < 7 do Find best neighbor in Nj .x 0 / ! x 00 ; if x 00 is better than x 0 then x 0 D x 00 ; j D 0; else j C 1; end end Recenter or not: if x 00 is better than x then x D x 00 ; k D 0; NoImprovement D 0; if x is better than BestFound then Bestfound D x; end else NoImprovement C1; if x 00 is slightly worse than x, but x 00 is far from x then x D x 00 ; k D 0; else k C 1; end end end end Return BestFound;
problems of Chao, the GLS algorithm (GLS) performs almost as well as Chao’s algorithm (CHAO) and the SVNS algorithm (SVNS) performs better. The average gap between the GLS and CHAO is 0.56%, the performance of SVNS is 0.24% better than CHAO. For both algorithms the computational times are reduced substantially. CHAO was executed on a SUN 4/370 workstation. On test sets 1 and 3 of Chao, GLS performs almost as well as the tabu search heuristic of Tang et al. (TST) and SVNS performs better. Again, the average computational time is reduced. TST was executed on a DEC Alpha XP1000 computer with 1 GB RAM and 1.5 GB swap.
24
P. Vansteenwegen et al.
Table 1 Average score gap Average score gap Name (number of problems) Diamond-shaped (14) Square-shaped (26) Set 1 and 3 (24) Set 4 (56) Set 5 (74) Set 6 (24) Set 7 (58)
n 64 66 32;33 100 66 64 102
m 1 1 2,3,4 2,3,4 2,3,4 2,3,4 2,3,4
GLS CHAO 0.23 0.74
TST
ARCH
0.16 0.93 0.61 0.61 2.24
1.67 1.27 0.99 2.17
SVNS CHAO 0.33 0.20
TST
ARCH
0.42 0.55 0.49 0.18 0.11
0.20 0.18 0.20 0.04
Table 2 Number of times GLS and SVNS perform better than, equal to or worse than other algorithms GLS Better Equal Worse Total number of problems the comparison is based on
SVNS
CHAO 8 18 14
TST 46 83 107
ARCH 17 75 120
CHAO 11 28 1
TST 80 105 51
ARCH 49 99 64
40
236
212
40
236
212
Table 3 Average CPU times compared to other algorithms Average CPU (s) Name n Diamond-shaped 64 Square-shaped 66 Set 1 and 3 32;33 Set 4 100 Set 5 66 Set 6 64 Set 7 102
m 1 1 2,3,4 2,3,4 2,3,4 2,3,4 2,3,4
GLS 2:8 2.5 1:1 11:4 3:5 4:3 12:1
SVNS 2.6 2.6 0.2 7.4 1.5 1.9 4.3
CHAO 177.0 158.6
TST
ARCH
2:1 193:2 23:6 18:9 104:8
22:5 34:2 8:7 10:3
The results for test sets 4–7 are compared with TST and with the “z min value” of the “FAST VNS FEASIBLE” algorithm of Archetti et al. [18] (ARCH). The obtained solutions of TST and ARCH are slightly better than GLS, on average 1.04% and 1.59%. SVNS outperforms TST (0.32%) but is slightly worse than ARCH (0.15%). However, the computational times of GLS and SVNS are lower. The SVNS framework clearly outperforms the GLS algorithm. The obtained scores are higher, and the computational time is smaller. For 11 problems SVNS calculates better results than the best published results so far. The new best routes are presented in Table 5 in Appendix.
Metaheuristics for Tourist Trip Planning
25
4 Iterated Local Search for the TOPTW For the team orienteering problem with time windows, a straightforward and fast iterated local search (ILS) heuristic, which performs very well on the available data sets, has been developed. The heuristic combines an insertion step and a shaking step to escape from local optima. ILS is described by Lourenc¸o et al. [27]. A sequence of local search solutions is built up, instead of repeating random local search trials. A good balance between improving and shaking intermediate solutions is essential.
4.1 Insertion Step Insert is a local search heuristic that adds new points to a route, one by one. Before an extra visit to a point can be inserted in a route, it should be verified that all visits to other points, scheduled after the insertion position, still satisfy their time window after insertion. In order to develop a fast heuristic, a quick evaluation of each possible insert move is necessary. Checking, every time, all other visits on their feasibility would consume too much time. This can be avoided by recording MaxShift for each included point. MaxShift is defined as the maximum time the service completion of a given visit can be delayed, without making any visit infeasible. Another useful concept is Wait, i. e. the waiting time in case the arrival at a point takes place before the start of the time window. The service itself can only start when the time window opens. If the arrival takes place during the time window, Wait equals zero. For a feasible insertion of a new visit j between visits i and k, the total time consumption of visit j should be limited to the sum of Wait and MaxShift of visit k. Obviously, service j should also fit the time window of point j . For each visit that can be inserted, the smallest required insertion time is determined. The visit with the highest ratio “square of point score over insertion time” will be selected for insertion. The score is applied to the power two because, due to time windows and waiting, insertion time becomes less relevant than score for adding new visits to the route. All the steps mentioned above do not require much computation time since only very simple and quick evaluations are used, thanks to the MaxShift recording. After each insertion, all the other visits should be updated. Visits after the insertion require an update of Wait, the arrival time, the start of the service, the leave time and MaxShift. Visits before the insertion may require an update of MaxShift.
4.2 Shake Step Shake is used to escape from local optima. During this step, one or more visits will be removed. Shake uses two parameters as input, the first one indicates how many
26
P. Vansteenwegen et al.
consecutive visits to remove in each route (NumberToRemove), the second indicates the place in each route to start the removing process (StartPosition). If during the removal the end point is reached, the removal continues after the start point. After the removal, all the visits following the removed visits are shifted forward as much as possible, in order to avoid unnecessary waiting. These visits should be updated similarly to the updating in the Insert Step. For the visits before the removed visits only MaxShift should be updated.
4.3 The Iterated Local Search Heuristic Algorithm 3 presents the heuristic’s pseudo code. The heuristic starts with empty routes and initialises all the parameters of Shake to one. The heuristic runs through a loop until no improvements for the incumbent best solution are identified during a fixed number of iterations. Firstly the Insert local search is applied until a local optimum is reached. If this solution is better than the incumbent solution, the solution is recorded and NumberToRemove is reset to one for the next Shake. Secondly Shake is applied. After each shake step, StartPosition is increased by the value NumberToRemove and NumberToRemove is increased by one. If StartPosition equals the size of the smallest route, this size is subtracted to determine the new position. If NumberToRemove equals 30, it is reset to one.
Algorithm 3: The ILS algorithm’s pseudo code StartPosition D 1; NumberToRemove D 1; NumberOfTimesNoImprovement D 0; while NumberOfTimesNoImprovement < 150 do Insert local search; if Solution better than BestFound then BestFound D Solution; NumberToRemove D 1; NumberOfTimesNoImprovement D 0; else NumberOfTimesNoImprovement C1; end Shake Solution (NumberToRemove, StartPosition); StartPosition D StartPosition + NumberToRemove; NumberToRemove C1; if StartPosition > Size of smallest route then StartPosition D StartPosition Size of smallest route; end if NumberToRemove DD n=3m then NumberToRemove D 1; end end Return BestFound;
Metaheuristics for Tourist Trip Planning
27
By using the shake parameters as described above, other visits are removed during every Shake Step and during the entire procedure, most likely, every visit is removed at least once. This proves to be an excellent technique to better explore the entire solution space and to correct wrong decisions which were earlier taken implicitly by the Insertion Step. This property is enhanced by the fact that the heuristic always continues the search from the current solution, it never returns to the best solution found. This technique is called iterated local search with a random walk acceptance criterion [27]. n and the maximum number of The maximum number of locations to remove 3m iterations without improvement (150) are the only parameters to predetermine in this heuristic. For the maximum number of locations to remove, a percentage of mn (numn , ber of locations/number of routes) is used. Changing this percentage, from mn to 5m has no significant effect on the quality of the results or computation times. Furthermore, it appeared that further increasing the maximum number of iterations without improvement does not significantly improve the results and only causes longer computation times. The ILS algorithm is described in more detail in Vansteenwegen et al. [28].
4.4 Results The ILS algorithm was tested on the available test problems and compared with optimal results published by Righini and Salani [14]. Righini and Salani created 58 problems for the OPTW using Solomon’s data set of vehicle routing problems with time windows and ten problems of multi-depot vehicle routing problems of Cordeau, Gendreau and Laporte. Since for TOPTW no data sets are available, two new sets of 68 and 39 problems are created based on the data sets of Righini and Salani. The first data set uses all the instances from Righini and Salani (68), but with the number of routes equal to two instead of one. In this case two times the optimal score of the original problem is used as a benchmark for the obtained total score. This is obviously an overestimation since the optimal result can never be higher, but it can be much lower than this number. The second data set uses the original instances from Solomon (29) and Cordeau et al. (10), with the number of routes equal to the number of vehicles. With this number of routes it is possible to visit every point and hence the optimal result equals the sum of all scores. Since these problems have up to 20 routes they should be regarded as very complicated TOPTW. All computations were carried out on a personal computer Intel Pentium 4 with 1.80 GHz processor and 1 GB RAM. Righini and Salani did their calculations on a comparable PC Pentium 4 with 1.6 GHz processor and 512 MB RAM. The average gap with the optimal solution for all the OPTW instances is only 1.8%. In the worst case, with 288 points, the gap is 9.4% and in 32 of the 68 cases the optimal solution is obtained. The average calculation time for Solomon’s instances is only 0.4 s, compared to more than 400 s with the fastest method of Righini and Salani.
28
P. Vansteenwegen et al. Table 4 Average CPU times compared to other algorithms Score GAP (%) m 1 2 3–20
Number of instances 68 68 39
With Optimal UB Optimal
Average 1:8 10:0 2:1
CPU (s) Worst 9:4 24:0 10:0
Average 1:0 3:7 17:9
Worst 14:0 56:8 177:0
Even for the TOPTW with m equal to two, the average gap with the upper bound remains acceptable. For the TOPTW with up to 20 routes, the average gap with the optimal solution for all these problems is only 2.1%. The worst score has a gap of 10.0%. Of course, the computation time for these very complicated problems is much longer, due to the many routes that have to be constructed and improved. The computation time is on average 47.1 s. Yet, the average computation time is still many times shorter than the computation time Righini and Salani needed to solve the problems with only one route. All the test results are summarised in Table 4. As an example, the results for the TOPTW of Cordeau et al. with 3–20 routes are presented in Table 6 in Appendix. Finally, it should be noticed that in this case always the exact distance between two points is used, where Righini and Salani always rounded down the distance to the first (Solomon) or second (Cordeau et al.) decimal. Obviously, rounding down distances makes it sometimes possible to add an extra visit.
5 Conclusions and Further Work Many optimisation problems occur in tourism. In this paper three different metaheuristics are presented to solve variants of the tourist trip design problem. Obviously, the tourism sector has many more opportunities for operational research and metaheuristics [7]. The presented guided local search (GLS) and skewed variable neighbourhood search (SVNS) algorithms use a combination of heuristics to solve the (team) orienteering problem (TOP). The obtained results have a similar quality as the results of the best known heuristics. However, the computational time is reduced significantly. The SVSN framework clearly outperforms the GLS algorithm and discovers, for 11 problems, routes with a higher score than the best results published so far. The iterated local search (ILS) metaheuristic solves the team orienteering problem with time windows (TOPTW) fast and effectively. An Insert Step is applied at every iteration to improve the current best solution. A Shake Step is implemented in a specific manner to successfully escape local optima. The heuristic performs very well on a large set of problems with up to 288 points. For 68 problems with one route, the average gap with the optimal solution is only 1.8%, and the worst gap is 9.4%. The average computation time is 1.6 s. For 39 problems with a range of three up to 20 routes, the average gap is 2.1% and the worst gap is 10.0%.
Metaheuristics for Tourist Trip Planning
29
Similar to most metaheuristics, the presented algorithms require accurate parameter setting. Instead of determining these parameters based on preliminary testing, it might be useful to apply a genetic algorithm as an upper level heuristic to determine the best parameter set. Very promising results were obtained with this technique and are described in Souffriau et al. [29]. Until now, only one constraint has to be respected in the TOPTW. It is certainly possible to extend the ILS heuristic to efficiently solve problems with more constraints, such as in the case of realistic tourist trip design problems (budget limitations, distance travelled, etc.). Furthermore, the integration of public transportation, introducing time windows on certain arcs, is an interesting research path to follow.
Appendix See Tables 5 and 6. Table 5 New best routes for 11 test problems of Chao et al. [21] n m Tmax Travel time Score Route 64 1 35:0 34:86 576 1 9 14 20 27 35 42 34 41 33 32 24 31 38 30 22 29 37 44 50 55 59 62 64 64 1 60:0 59:40 1;062 1 3 6 10 15 21 28 36 43 49 54 48 42 35 27 20 26 34 41 33 40 32 39 45 38 31 24 17 12 7 11 16 23 30 22 29 37 44 50 55 59 62 64 64 1 70:0 69:88 1;188 1 2 4 7 12 18 24 17 11 16 23 31 38 30 22 29 37 44 50 55 51 45 39 32 40 33 25 19 26 20 14 10 15 21 27 35 28 36 43 49 54 48 42 34 41 47 53 61 63 64 64 1 75:0 74:71 1;236 1 3 6 10 15 21 27 20 14 19 26 34 42 35 28 36 43 49 54 58 53 47 48 41 33 40 46 39 32 25 18 24 17 12 7 11 16 23 31 38 30 22 29 37 44 50 55 45 51 56 59 62 64 64 1 80:0 79:19 1;284 1 3 6 10 14 19 26 20 15 21 28 36 43 49 54 58 53 48 42 35 27 34 41 33 25 18 13 8 4 7 12 17 11 16 23 30 22 29 37 44 50 55 51 46 39 45 38 31 24 32 40 47 52 57 61 63 64 66 1 35:0 34:24 465 1 29 28 27 26 34 42 50 58 59 60 61 62 63 55 54 46 38 66 66 1 95:0 94:24 1;395 1 30 22 14 13 5 6 7 8 9 17 16 24 25 33 41 49 57 65 64 63 55 54 62 61 60 59 58 50 42 34 26 18 10 2 3 4 12 11 19 27 35 43 51 52 53 45 37 66 66 1 100:0 99:81 1;445 1 21 13 12 11 19 18 10 2 3 4 5 6 7 8 9 17 25 24 32 33 41 49 48 47 46 54 55 56 57 65 64 63 62 61 60 59 58 50 42 34 26 27 35 43 51 52 53 45 37 66 66 1 105:0 104:92 1;520 1 30 22 14 15 7 6 5 4 3 2 10 18 26 34 42 50 58 59 60 61 62 63 64 65 57 49 41 33 25 17 9 8 16 24 32 40 48 56 55 54 53 52 51 43 35 27 19 11 12 13 21 29 66 66 1 110:0 109:81 1;560 1 30 22 23 15 14 13 12 4 5 6 7 8 9 17 16 24 25 33 32 40 41 49 57 65 64 56 48 47 55 63 62 54 53 61 60 52 51 59 58 50 42 34 26 18 10 2 3 11 19 27 35 43 44 45 66 66 1 125:0 124:92 1;670 1 30 22 14 13 21 20 12 4 5 6 7 8 9 17 16 15 23 24 25 33 32 31 39 40 41 49 48 47 55 56 57 65 64 63 62 54 46 45 53 61 60 52 44 36 35 43 51 59 58 50 42 34 26 18 10 2 3 11 19 27 28 29 66
30
P. Vansteenwegen et al. Table 6 Results of ILS for TOPTW with m D 3 20 Name n pr01 48 pr02 96 pr03 144 pr04 192 pr05 240 pr06 288 pr07 72 pr08 144 pr09 216 pr10 288
m 3 6 9 12 15 18 5 10 15 20
Tmax 1,000 1,000 1,000 1,000 1,000 1,000 1,000 1,000 1,000 1,000
ILS 589 1;165 1;722 2;420 3;297 3;630 910 1;985 2;732 3;850
Opt 657 1;220 1;788 2;477 3;351 3;671 948 2;006 2;736 3;850 Average Worst
GAP (%) 10:4 4:5 3:7 2:3 1:6 1:1 4:0 1:0 0:1 0:0
CPU (s) 0:7 4:1 26:3 43:4 58:4 177:0 3:6 22:5 38:8 95:6
2:9 10:4
47:1 177:0
References 1. O’Hare, G., O’Grady, M.: Gulliver’s Genie: a multi-agent system for ubiquitous and intelligent content delivery. Comput. Commun. 26, 1177–1187 (2002) 2. Davies, N., Cheverst, K., Mitchell, K., Efrat, A.: Using and determining location in a contextsensitive tour guide. IEEE Computer 34(8), 35–41 (2001) 3. Schmidt-Belz, B., Laamanen, H., Poslad, S., Zipf, A.: Location-based mobile tourist services – first user experiences. In: Enter 2003, Helsinki, Finland (2003) 4. Edwards, S., Blythe, Ph., Scott, S., Weihong-Guo, A.: Tourist Information Delivered Through Mobile Devices: Findings from the IMAGE Project. Inf. Technol. Tour. 8, 31–46 (2006) 5. Ten Hagen, K., Kramer, R., Hermkes, M., Schumann, B., Mueller, P.: Semantic matching and heuristic search for a dynamic tour guide. In: Frew, A., Hitz, M., O’Connor, P. (eds.) Information and communication technologies in tourism. Springer, Vienna (2005) 6. Souffriau, W., Vansteenwegen, P., Vertommen, J., Vanden Berghe, G., Van Oudheusden, D.: A personalised tourist trip design algorithm for mobile tourist guides. Appl. Artif. Intell. 22, 964–985 (2008) 7. Vansteenwegen, P., Van Oudheusden, D.: The mobile tourist guide: an OR opportunity. OR Insights 20(3), 21–27 (2007) 8. Tsiligirides, T.: Heuristic methods applied to orienteering. J. Oper. Res. Soc. 35, 797–809 (1984) 9. Laporte, G., Martello, S.: The selective travelling salesman problem. Discrete Appl. Math. 26, 193–207 (1990) 10. Butt, S., Cavalier, T.: A heuristic for the multiple tour maximum collection problem. Comput. Oper. Res. 21, 101–111 (1994) 11. Arkin, E., Mitchell, J., Narasimhan, G.: Resource-constrained geometric network optimization. In: Proceedings of the 14th ACM Symposium on Computational Geometry, 307–316 (1998) 12. Pekny, J., Miller, D.: An exact parallel algorithm for the resource constrained travelling salesman problem with application to scheduling with an aggregate deadline. In: Proceedings of the 1990 ACM Annual Conference on Cooperation (1990) 13. Feillet, D., Dejax, P., Gendreau, M.: Travelling salesman problems with profits. Transport. Sci. 39, 188–205 (2005) 14. Righini, G., Salani, M.: Dynamic programming for the orienteering problem with time windows. Technical Report 91, Dipartimento di Tecnologie dell’Informazione, Universita degli Studi Milano, Crema, Italy (2006) 15. Chao, I., Golden, B., Wasil, E.: A fast and effective heuristic for the orienteering problem. Eur. J. Oper. Res. 88, 475–489 (1996)
Metaheuristics for Tourist Trip Planning
31
16. Golden, B., Levy, L., Vohra, R.: The orienteering problem. Nav. Res. Logistics 34, 307–318 (1987) 17. Tang, H., Miller-Hooks, E.: A Tabu search heuristic for the team orienteering problem. Comput. Oper. Res. 32, 1379–1407 (2005) 18. Archetti, C., Hertz, A., Speranza, M.: Metaheuristics for the team orienteering problem. J. Heuristics 13, 49–76 (2007) 19. Kantor, M., Rosenwein, M.: The orienteering problem with time windows. J. Oper. Res. Soc. 43(6), 629–635 (1992) 20. Bar-Yehuda, R., Even, G., Shahar, S.: On approximating a geometric prize-collecting travelling salesman problem with time windows. J. Algorithms 55, 76–92 (2005) 21. Chao, I., Golden, B., Wasil, E.: The team orienteering problem. Eur. J. Oper. Res. 88, 464–474 (1996) 22. Lin, S.: Computer solutions of the traveling salesman problem. Bell Syst. Tech. J. 44, 2245–2269 (1965) 23. Voudouris, C., Tsang, E.: Guided local search and its application to the travelling salesman problem. Eur. J. Oper. Res. 113, 469–499 (1999) 24. Vansteenwegen, P., Souffriau, W., Vanden Berghe, G., Van Oudheusden, D.: A guided local search metaheuristic for the team orienteering problem. Eur. J. Oper. Res. 196(1), 118–127 (2008). doi: 10.1016/j.ejor.2008.02.037 25. Hansen, P., Mladenovic, N.: Variable neighbourhood search: Principles and applications. Eur. J. Oper. Res. 130, 449–467 (2001) 26. Chao, I.: Algorithms and solutions to multi-level vehicle routing problems. Ph.D. Dissertation, Applied Mathematics Program, University of Maryland, College Park, USA (1993) 27. Lourenc¸o, H., Martin, O., St¨utzle, T.: Iterated local search. In: Glover, F., Kochenberger, G. (eds.) Handbook of metaheuristics, pp. 321–353. Kluwer, Norwel (2003) 28. Vansteenwegen, P., Souffriau, W., Van Oudheusden, D.: Iterated local search for the team orienteering problem with time windows. Working paper 2008-08, Centre for Industrial Management, Katholieke Universiteit Leuven, Belgium (2008) 29. Souffriau, W., Vansteenwegen, P., Vanden Berghe, G., Van Oudheusden, D.: Automated parameterisation of a metaheuristic for the orienteering problem. In: Cotta, C., Sevaux, M., S¨orensen, K. (eds.) Adaptive and multilevel metaheuristics. Studies in Computational Intelligence, pp. 255–269. Springer, Berlin, (2008). ISBN: 978-3-540-79437-0, doi:10.1007/978-3-54079438-7 13