# A Novel Application Based on a Heuristic Approach for Planning Itineraries of One-Day Tourist
## 5 Case Study  
This section presents a case study where the proposed multi-level algorithm approach is applied to solve the cruise tourist problem in the metropolitan port city of Bari. Bari is the capital city of Aquila Region and the second biggest city in southern Italy. Since the roman epoch, Bari became an important commercial center, during the Saracen domination. From 1071, it became a big maritime center and still today it is an important port hub of the Mediterranean sea. In the initialization phase of Algorithm 1, all the main attractions of Bari are determined and represented by the adjacency matrix of the graph \(G_{i}\) as it shown in Figure 10. Note that the weight of arcs are decided on the basis of the time preference (a) described in Section 3, according to the user. For better understanding of Figure 10 let us consider two examples: \"1 mp\" in the box from Pol 2 to Pol 1 means that the tourist should travel by foot for 1 min; \"10m p+a\" in the box from Pol 2 to Pol 7 means that the tourist should travel by foot and by bus for 7 min total. The tourist inputs are provided in the initialization phase of  
Figure 8: Algorithms comparison using data set of problem 2. Figure 7: Algorithms comparison using data set of problem 1. Figure 9: Algorithms comparison using data set of problem 3.  
the mobile application, where the tourist inserts the preferences and constraints related to: (i) the maximum available time for the outward and return path; (ii) the PoIs to visit during the outward and return path; (iii) the preferred transport mode, i.e., by foot, by bus or the fastest way (see Figure 11). Moreover for each node of the PoI network, the tourist can edit the selection of transport mode according to his/her preferences (see Figure 12). Let the Saint Nicolas Basilica (node 2) be the starting point and Lungomare Nazario Sauro (node 8) be the final point of the tourist itinerary. Note that for path \(P_{o}\) the starting point is node 2 and the final point is node 8. On the contrary, for \(P_{r}\) the starting point is node 8 and the final point is node 2. In particular, let us define the nodes of priority level 1 (maximum priority) \(V_{p}=\{1,2,4,5,8,9,10\}\), and the secondary nodes with \(V_{s}=\{3,6,7\}\). Furthermore, the PoI to be visited on the outward and return paths and the stop time at each PoI are also reported in Figures 10 and 13. Figure 11: The GUI of the user preferences. Figure 10: Adjacency matrix of graph \(G_{i}\). The Algorithm 1 creates the two graphs \(G_{o}\) and \(G_{r}\) by using only the nodes of \(G_{i}\) of priority level 1 (maximum priority) and calculates the travel times \(t_{1}\) and \(t_{2}\), as it is reported in Figure 14. It implies \(V_{o}=\{1,2,4,5,8\}\) and \(V_{r}=\{2,8,9,10\}\). The travel times \(t_{1}\) and \(t_{2}\) do not include the time needed to go from the port to the first stop of the tour, i.e., node 2, and vice versa that is equal to 10 min. In Figure 15 the vector of the times to reach the port from each node is shown. Figure 14: The Graphs \(G_{o}\) and \(G_{r}\) and the travel times \(t_{1}\) and \(t_{2}\). Figure 12: The GUI showing the travel times in the Pols network from museo Nicolaiano. Preferred transport mode can be edit. Figure 13: Stop time at each PoI. Figure 20 and 21 depicts the GUI of the mobile application showing the final outward and return paths, respectively, connecting the identified PoIs. Figure 8:0 The outward path after adding node 3 to \(G_{r}\). Figure 8:1 The GUI of the feasible solutions. Figure 8:2 The GUI of the outward path. The procedure ends and the tourist can get the sequence of attractions in both trips with the relative means of transport. In the proposed case study, the mathematical calculations to obtain the final solution are performed in about 2 seconds. The presented application demonstrates the effectiveness of the proposed heuristic approach in planning the itinerary for the one-day tourist, customizing the outward and return paths of the roundtrip in the city of Bari.