A multimodal tourist trip planner integrating road and pedestrian networks

The Tourist Trip Design Problem aims to prescribe a sightseeing plan that maximizes tourist satisfaction while taking into account a multitude of parameters and constraints, such as the distances among points of interest, the expected duration of each visit, the opening hours of each attraction, the time available daily. In this article we deal with a variant of the problem in which the mobility environment consists of a pedestrian network and a road network. So, one plan includes a car tour with a number of stops from which pedestrian subtours to attractions (each with its own time windows) depart. We study the problem and develop a method to evaluate the feasibility of solutions in constant time, to speed up the search. This result is used to devise an ad-hoc iterated local search. Experimental results show that our approach can handle realistic instances with up to 3643 points of interest (over a seven day planning horizon) in few seconds.


Introduction
Tourism industry is one of the fast-growing sectors of the worlds. On the wave of digital transformation, tourism his experiencing a shift from mass tourism to personalized travel. Designing a personalized tourist trip is a rather complex and time-consuming decision making problem. For this reason, the application of expert and intelligent systems plays an important role in personalized tourism industry. Such systems typically appear in the form of Personalized Automated Itineraries Generator, ICT integrated solution that performs on a hand-held device three main services: recommendation of attractions (Points of Interest, PoIs), route generation and itinerary customization (Gavalas et al., 2014). In this extended abstract we focus on the route generation service, known in literature as Tourist Trip Design Problem (TTDP). The objective of the TTDP is to select PoIs that maximize tourist satisfaction, while taking into account a multitude of parameters and constraints (e.g., distances among PoIs, visiting duration and opening hours for each PoI, features of the mobility environment) and respecting the daily time available for sightseeing. In last years there has been a flourishing scholarly work on the TTDP (Ruiz-Meza and Montoya-Torres, 2022). Different variants of TTDP have been studied in the literature. One of these variants refers to the mobility environment, which can be either monomodal or multimodal (Ruiz-Meza and Montoya-Torres, 2021). In this research work, we focus on the variant of TTDP where the corresponding mobility environment is characterized by two types of network: a pedestrian network and a road network. Along the itinerary, we assume that the tourist can move as a pedestrian or as a driver of a transport mean (like a car or a motorbike). We refer to this multimodal setting as a walk-and-drive mobility environment. In particular, the research presented in this paper is part of the integrated C-BAS project for developing enabling technologies aimed at territorial marketing and tourism in Puglia (Italy). For a pleasant stay in Puglia it is good to have a motor scooter or better yet a car. Indeed, as suggested by tourist guides https: //www.alongdustyroads.com/posts/useful-tips-puglia-italy, in Puglia sure, there are trains and local buses, but using them exclusively to cross this varied region is going to take more time than most travellers have. Nevertheless, the considered mobility environment is relevant not only in region like Puglia, where there is a poor accessibility of touristic attractions by means of public transportation network. As observed in (Li et al., 2020), the pandemic might guide tourists to prioritize some modes of transport over others: people might avoid mode of transport, where it is difficult to avoid contacts with other passengers. In this extended abstract we propose a heuristic solution algorithm that integrates a walk-and-drive mobility environment in the tourist trip design problem. Such variant of the TTDP presents several algorithmic issues. Firstly, we recall that the TTDP is a variant of the team orienteering problem with time windows, which has been proved to be NP-Hard (Gavalas et al., 2015a). A multimodal setting further increases the computational complexity of the TTDP. Indeed, a multimodal mobility environment widens the search space of a route generation algorithm, since it has to choose among different travel scenarios. Moreover, the solution has to prescribe not only direct connections, but also transfer connections, which occur when the tourist has to change transport mode while travelling from one PoI to another one. The algorithmic issues implied by transfer connections are highly influenced by the features of the underlying physical transportation networks. In particular, the impact of transfer connections have been investigated in literature with respect to public transportation, where a transfer connection occurs when the tourist has to walk to reach a bus stop and/or take more than one line bus before reaching the next PoI. In transit network travel time are time-dependent due to the waiting times at boarding stops. In this application setting, the main algorithmic issue concern the fast computation of such time-dependent travel times. In a walk-and-drive scenario there are no waiting times due to the mobility environment. However, as reported in Figure 1, each transfer connection defines a subtour, which would be labeled as infeasible by a solution algorithm designed for multimodal variants of TTDP studied in literature so far. For these reasons, algorithms proposed in literature for the TTDP with transport mode selections are not able to consider the walk-and-drive transfer connections without Red arcs represents direct connections corresponding to a walk-and-drive transfer connection essential structural modifications. Another issue of multimodal mobility environment is that the triangular inequality does not hold when connections involved in the inequality refers to different transport modes. Indeed when the triangular inequality holds (i.e. in a monomodal environment), the feasibility check of PoI time windows due to a PoI insertion considers only a forward delay propagation of the arrival time at the next PoIs. Similarly a PoI removal is always considered feasible wrt to opening hours of successive PoIs, since it is assumed that a removal always implies a forward propagation of a decrease of the arrival times. However, in a multimodal setting, the insertion of a POI i between a pair of PoIs j and k might imply either an increase or a decrease of the arrival time at PoI k. We seek to go one step further in at least two directions with respect to the literature. Firstly, we devise insertion and removal operators tailored for a walk-and-drive mobility environment. Then we integrate the proposed operators in the iterate local search proposed in (Gavalas et al., 2015b). For a in-depth review the reader can refer to (Ruiz-Meza and Montoya-Torres, 2022).

Problem Formulation
Let G = (V, A) denote a directed complete graph, where each vertex i ∈ V represents a PoI. The arcs of the multigraph G are a POI-based representation of two physical networks: the pedestrian network and the road network. We denote with (i, j, m ij ) ∈ A the direct connection from PoI i to PoI j with transport mode m ij ∈ {walk, drive}. Each pair of arcs (i, j, walk) and (i, j, drive) represents the quickest paths from PoI i to PoI j on the pedestrian network and the road network, respectively. As far as the travel time durations is concerned we denote with t w ij the duration of the quickest path from PoI i to PoI j with transport mode m ij equal to walk. If the shortest path duration is greater then a given threshold M axW alkT ime, then t w ij is set equal to infinity. To the arc (i, j, drive) we associated a time duration t d ij , equal to the duration of the quickest path from PoI i to PoI j on the road network increased by the time needed to park and then reach by walking PoI j. If t d ij is less or equal than a given threshold M inDriveT ime, then t d ij is set equal to infinity. Without loss of generality, we suppose that between a pair of PoIs (i,j), there always exists at least one arc. A score P i is assigned to each PoI i ∈ V . Such score is determined by taking into account both the popularity of the attraction as well as the tourist preferences. Each PoI i is characterized by a time windows [O i , C i ] and a visit duration T i . Let a i denotes the arrival time of the tourist at PoI i, with i ∈ V . The arrival time is feasible if the visit of PoI i can be completed before the closing hour C i , i.e. a i ≤ C i − T i . If the tourist arrives before the opening hour O i , then he/she can wait and start the PoI visit at time z i = max(O i , a i ). Given a starting tourist position, a tour in a walk-and-drive mobility environment consists in the selection of m itineraries of PoIs, starting and ending to the given initial tourist position. A tour is feasible if the selected PoI are visited at most once within their time windows and each itinerary duration is not greater than C max . The TTDP aims to determine the feasible tour that maximizes the total score of the visited PoIs.

Solution strategy
The reference application context of this project requires that the proposed solution algorithm determines good tours in few seconds. The most efficient heuristic algorithm proposed in the literature for TTDP is based on an Iterated Local Search (ILS) illustrated in the pseudo code Algorithm 1. The ILS consists of 3 basic elements presented briefly below and then detailed in the following paragraphs. To ease the discussion we present the 3 basic elements for a monomodal mobility environment, that a PoI insertion (removal) implies the forward (backward) propagation of an increase (decrease) of the arrival times.
Local Search Given an initial feasible solution (incumbent), a heuristic can be started to try to improve it. The idea of local search is to explore a neighbourhood of solutions close to the incumbent. Once the best solution of the neighbourhood is found, if it is better than the incumbent, then the incumbent is updated and the search restarts. In the TDDP a feasible solution is a set of m daily itineraries, each one consisting of a sequence of PoIs. For each daily itinerary of the incumbent and each PoI i (not included in the current solution), which can be visited without violating its time window, it is determined the position in the itinerary with the smallest increase (Shif t i ) in the duration of the route. Ratio i denotes the ratio between the score of the PoI P i and the extra time necessary to reach and visit the new PoI i. The POI i with the highest (P i ) 2 /Shif t i ratio is chosen for insertion. This basic iteration of insertion is repeated until it is not possible to insert further PoIs due to the constraint imposed by the maximum duration of the itineraries and by PoI time windows. At this point, we have reached a local optimal solution and we proceed to diversify the search with a Solution Perturbation phase.

Solution Perturbation
The perturbation phase has the objective of diversifying the local search, avoiding that the algorithm remains trapped in a local optima of the solution landscape. The perturbation phase aims to remove a set of PoIs occupying consecutive positions of the same itinerary. After the removal, PoIs visited after the removed PoIs undergo an update of the arrival time, which is decreased to a value as close as possible to the start time of the itinerary, in order to avoid unnecessary waiting times. It is worth noting that the perturbation strategy is adaptive. In particular, the parameter concerning the length of the perturbation (ρ d in Algorithm 1 ) turns out to be a measure of the degree of diversification of the search. For this reason ρ d is incremented by 1 for each iteration in which there has not been an improvement of the objective function. If the rho d is equal to the length of the longest route, to prevent search from cycling (i.e. restarting from the empty solution), the ρ d parameter is set to a value equal to 50 % of the length of the smallest route in terms of number of PoIs. Conversely, if the solution found by the Local Search is the new Best Solution s * , then search intensification degree is increased and a small perturbation is applied to the solution current s * , i.e. rho d perturbation is set to 1.
Finally, as far as the stopping criteria is concerned, the algorithm stops when one of the following thresholds is reached: the maximum number of iterations MaxIter without improvements or the time limit TimeLimit.

Computational Campaign
We enhanced the removal and insertion operators of the ILS proposed in order to take into account the extra travel time spent by the tourist to switch from the pedestrian network to the road network. We have tested our heuristic algorithm on a set of realistic instances derived from the pedestrian and road network of Puglia (Italy). The algorithm has been implemented in Java using Spring Framework (https:// spring.io/) and run on on Asus-PC with Intel Core i7-4710HQ CPU 2.50 GHz x 8 CPU RAM and 16GB SSD. The PoI-based graph consists of 4784 PoIs. Other heuristic parameters were • parking time: 10 minutes, • min walk car: 6 minutes, • max walking distance: 2500 meters, • walking speed: 5km/h, • ILS max iterations: 150, • ILS timeout: 1 minute.
Moreover during a pre-processing step we determine a set of clusters of PoIs defined on a geographical criteria using the K-medoids algorithm. The insertion operator of the local search has been coded so that to force successive visits to POIs grouped in the same cluster. Instances are defined by the following parameters: • number of itineraries m = 1, 2 , 7; • a radius R(=10, 20 50 km ) defining a neighbourhood of the starting tourist position. The insertion operator tries to add to the solution only PoI far from the starting position no more then R km. When R is set equal to 10000 no filter is applied and all 4784 PoIs are candidate to be inserted; • number of clusters C=0, 100, 200, 300.
For each combined value of the first three parameters we generated 10 instances, each one corresponding to a different starting position. Results are reported in Table 1, where each row represents the average value of the ten instances, with the following headings: • z: Total solution score of selected PoIs; • t: execution time in milliseconds; • # sol: number of improved solutions; • # it: total number of iterations; • # it noimp: number of improvements without consecutive improvements. The clustering-based search mechanism greatly improves the execution times of the algorithm without compromising the quality of the final solution. In particular, the results obtained for the case m = 7 show that, with clustering enabled, the search algorithm is able to do many more iterations, thus discovering new solutions and improving the quality of the final solution. We observe that by deactivating the radius filter, the search execution times significantly increase both in the not-clustered version and in the one with clustering.