Next Article in Journal
InSAR-CTPIM-Based 3D Deformation Prediction in Coal Mining Areas of the Baisha Reservoir, China
Previous Article in Journal
Analysis and Characterization of Micro–Nano Pores in Coal Reservoirs of Different Coal Ranks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Personalized Tour Itinerary Recommendation Algorithm Based on Tourist Comprehensive Satisfaction

by
Dingming Liu
1,*,
Lizheng Wang
1,
Yanling Zhong
1,*,
Yi Dong
2,3 and
Jinling Kong
1
1
School of Geological Engineering and Geomatics, Chang’an University, Xi’an 710054, China
2
Aerial Photogrammetry and Remote Sensing Group Co., Ltd., Xi’an 710199, China
3
Shaanxi Engineering Research Center of Geospatial Information, Xi’an 710199, China
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2024, 14(12), 5195; https://doi.org/10.3390/app14125195
Submission received: 1 May 2024 / Revised: 3 June 2024 / Accepted: 7 June 2024 / Published: 14 June 2024

Abstract

:
Personalized travel itinerary recommendation algorithms are the focus of research in smart tourism and tourism GIS. Aiming to address issues present in travel itinerary recommendations for the increasingly popular “self-drive tour” mode, this study proposes an algorithm based on comprehensive tourist satisfaction to mitigate problems such as the neglect of important relevant factors and low degree of personalization. First, we construct a model of tourist satisfaction for travel itineraries by comprehensively considering factors including time utilization, the attractiveness of attractions, itinerary feasibility, and the diversity of attraction types. Unlike previous studies, we consider dining and accommodation time during the itinerary, the physical condition of tourists, and the diversity of attraction types, and establish penalty functions to flexibly constrain deviations from the expected conditions in itinerary planning. Then, with the optimization of comprehensive tourist satisfaction as the objective, we design a new algorithm to address the itinerary recommendation problem, supporting tourists in selecting must-visit attractions, restaurants, and hotels, as well as personalized preferences such as the sightseeing sequence. The experimental results demonstrate that our proposed algorithm outperforms two baseline algorithms, providing higher comprehensive tourist satisfaction while also exhibiting greater feasibility in itinerary planning. The proposed algorithm effectively addresses the issue of personalized travel itinerary recommendation, presenting an efficient, feasible, and practical solution.

1. Introduction

In recent years, the “self-drive tour” tourism model has become increasingly popular. Simultaneously, under the concept of holistic tourism development [1], some regions are being developed as tourism destinations to facilitate tourists’ visits to regional scenic spots through connected highways. This further promotes the development of self-drive tours. However, customizing personalized travel schedules remains a complicated and time-consuming problem for tourists. With the explosive growth of network information resources, problems such as information overload and resource misorientation have become increasingly serious [2]. Tourists need to spend a lot of time and energy searching for tourism information that truly meets their needs. Furthermore, while fixed tourist route recommendations cannot meet personalized demands, recommendations focusing solely on individual attractions fail to consider the overall travel experience. Tour itinerary recommendation has thus become a research hotspot in smart tourism and tourism GIS; both academia and industries have been constantly pursuing recommendation systems and optimization models that can accurately select attractions as well as create and recommend useful travel itineraries.
At present, there are several problems in the literature. In terms of factors considered, the relevant studies lack a comprehensive temporal dimension as they fail to consider the scheduling of dining and accommodation time. This oversight could result in deviations from travelers’ original plans during their journeys. Additionally, the recommended results often lack consideration for the diversity of scenic categories, which may lead to monotony and cause aesthetic fatigue during the journey. Furthermore, the majority of studies have not addressed the physical condition of travelers during their itinerary, potentially leading to fatigue during the journey.
At the algorithmic level, the related studies have not elucidated how to handle multiple time windows for nodes, which is crucial for multi-day itinerary planning and the scheduling of specific visit times for tourists. Moreover, personalization is generally weak, as most studies do not support the inclusion of selected tourist attractions, restaurants, and hotels or specific node visit sequences in recommendation requirements. Additionally, in most studies, recommendations for scenic spots primarily consider the intrinsic factors of the spots and user interests but fail to comprehensively assess their value within the broader context of user-defined factors and other potential scenic spots. This lack of comprehensive consideration hinders the generation of optimal itineraries.
To illustrate these issues, let us assume that John plans a three-day self-drive tour. He has arranged the departure and return times, as well as the starting and ending points of the trip. Additionally, he wishes to maintain a regular routine during the trip, including consistent meal and rest times. He plans to have lunch at Restaurant A on the second afternoon and has booked Hotel A for the first night. He hopes to visit Scenic Spot A in the morning and Scenic Spot C after that, while also visiting other attractions to meet the planned travel time. He hopes this trip will include some local historical and cultural attractions as well as rural scenic spots. Furthermore, he wants to avoid the fatigue caused by visiting multiple mountain attractions in one day and stay within a certain budget for the entrance fees of the attractions. This example illustrates a complex itinerary planning demand, highlighting the limitations of traditional recommendation systems in handling complex personalized needs.
This paper addresses the aforementioned issues by proposing a personalized tour itinerary recommendation algorithm based on tourists’ comprehensive satisfaction, specifically tailored for the self-drive tourism mode. The algorithm is characterized by a comprehensive consideration of factors and rich personalization settings, while also balancing efficiency and optimization performance. The main contributions of this study can be summarized as follows.
Firstly, we constructed a comprehensive satisfaction score for the itinerary and formulated a problem model with this indicator as the objective function. We introduced a wide range of factors into the problem, including the type, grade, popularity, opening hours, recommended visiting time, accommodation and dining availability, visitor interest types, meal and rest time preferences, physical limitations, budget constraints, planned travel time, planned starting and ending points, other personalized settings, and the time cost of the itinerary. Based on these factors, we constructed indicators for the time utilization rate, attractiveness, feasibility, and diversity of attraction types to form the comprehensive satisfaction score for tourists. Additionally, in our model, some constraint conditions are flexible, and we used penalty functions to evaluate and constrain deviations between the itinerary plan and the expected conditions, making the itinerary planning more flexible and personalized.
Secondly, we proposed a novel algorithm based on a variant of the Monte Carlo Tree Search (MCTS) algorithm and the Lin–Kernighan Heuristic (LKH) algorithm to solve the proposed problem. This algorithm fully utilizes the search capabilities of the MCTS algorithm in large search spaces and the optimization capabilities of the LKH algorithm in the Traveling Salesman Problem, efficiently and effectively addressing the itinerary recommendation problem by decomposing it into local subproblems. In the algorithm, we designed a time planning algorithm based on the minimum penalty principle and redesigned some functions in the MCTS and LKH algorithms. Furthermore, we improved the algorithm’s efficiency through the use of hash tables. The proposed algorithm supports nodes with multiple time windows, allowing tourists to select must-visit attractions, restaurants, and hotels and choose specific node visitation sequences and other personalized preferences. The experimental results using real data demonstrate that the proposed algorithm can provide itinerary recommendations with higher comprehensive satisfaction and greater feasibility in itinerary planning.
Thirdly, we proposed a system framework outlining the service approach of the algorithm and the supported personalized settings. In the designed system, tourists can input their requirements and preferences through basic settings and extensive optional settings and can then obtain detailed references for their travel itineraries in terms of both time and route.
The rest of this paper is organized as follows. Section 2 reviews the related work. Section 3 introduces the problem definition, proposed system framework, and constructed mathematical model. Section 4 presents the proposed algorithm. Section 5 describes the conducted experiments and analyzes the results. Finally, Section 6 concludes the work and proposes future directions for improvement.

2. Literature Review

In this section, we review existing research relevant to our study from two perspectives: tourism itinerary recommendation and tourism itinerary planning. Itinerary planning refers to the process of planning when a specific set of locations is determined, which is typically considered the basis for itinerary recommendation. In recent years, itinerary planning and recommendation have attracted widespread attention from fields such as operations research, computer science and applications, graph theory, and mathematics.

2.1. Research on Itinerary Recommendation Algorithms

In the realm of trip recommendation, a significant amount of research has been conducted focusing on orientation problems, combinatorial optimization problems, or similar paradigms. The primary aim across these studies is to maximize global rewards within user-defined time budgets [3]. Sajal Halder [4], for example, leveraged a variant of the Monte Carlo Tree Search to devise an amusement park itinerary recommendation method, which takes into account factors such as the popularity of scenic spots, user interest levels, and queuing times. Similarly, Chen Jing [5] analyzed the impact of weather factors on people’s travel and proposed a model of Dynamic Personalized POI Sequence Recommendation with fine-grained contexts, and solved it based on the MCTS algorithm. Kendall Taylor [6] formulated an integer linear programming model for trip recommendations, addressing selected scenic spots and solving it as an integer linear programming problem. Furthermore, Narisara Khamsing [7] devised an itinerary recommendation method for family travel, utilizing an improved large-domain adaptive search algorithm to maximize overall family satisfaction under constraints. Joy Lal Sarkar [8] likewise considered group-oriented tourism route recommendations, aiming to satisfy the preferences of each member in the group as much as possible.
Fu Chengyao [9] integrated factors like scenic spot popularity, distances, and user demand constraints to derive recommended itineraries by sequentially adding optimal scenic spots. Zhang Chenyi [10] proposed a method based on a state expansion approach to solve recommended itineraries, factoring in user interests, travel time constraints, and scenic spot time windows. In addition, Rizwan Abbas [11] introduced a route recommendation method supplemented with random recommendations based on neural network algorithms, aiming to inject novelty into scenic spot recommendations. Chen Lei [12] devised an itinerary recommendation approach grounded in graph representation learning and reinforcement learning, taking into account scenic spot popularity and user interests. Zhou Xiao [13] developed an intelligent travel route planning algorithm that employs an iterative search of clustering central motivation. In this method, clustering algorithms are employed to mine tourist attraction data based on tourists’ interests, thereby obtaining optimal scenic spots and recommended itineraries. Additionally, Zhou Xiao [14] proposed a travel recommendation algorithm based on text mining and the MP neural cell model of multiple transportation modes, achieving recommended itineraries through optimal tourism landscape matching algorithms and tourism route chain algorithms.
Zhang Yanmei [15] presented a route planning method that comprehensively considered factors such as station distances, initial travel locations, departure times, travel durations, costs, station scores, and popularity, ultimately identifying optimal routes via genetic algorithms. Phatpicha Yochum [16] introduced an adaptive genetic algorithm for personalized travel itinerary planning, incorporating attractions near starting and destination points as well as potential tourist preference factors into multi-objective optimization frameworks. Etsushi Saeki [17] proposed a multi-objective travel itinerary planning method based on ant colony algorithms, aiming to optimize travel costs and user satisfaction. A distinctive aspect of this approach involves integrating tourists’ past travel records to adjust pheromones, thereby reflecting their general preferences. Meanwhile, Ding Yi [18] addressed travel itinerary planning under time constraints and uncertain traffic conditions, using a two-stage stochastic optimization model with chance constraints and the sample average approximation (SAA) method. Additionally, Ines Gasmi [19] proposed the use of multi-objective evolutionary algorithms to balance the popularity of POIs and user interest in itinerary recommendations. By studying and comparing several multi-objective evolutionary algorithms from multiple perspectives, it was demonstrated that NSGA-II is the most effective in generating personalized itinerary recommendation rules for tourists unfamiliar with a city.

2.2. Research on Itinerary Planning Algorithms

In terms of itinerary planning, Zhou Xiao [20] proposed a tourism route planning method that comprehensively considers distance, the number of transfers between public transportation systems, and average road conditions based on a dynamic programming algorithm. Xu Ke [21] proposed a tourism route planning algorithm based on a reinforcement learning algorithm to avoid areas with frequent traffic accidents and traffic congestion. Huang Zebin [22] constrained tourist travel time by introducing time window coefficients into the ant colony algorithm heuristic function. Lu Baichuan [23] comprehensively analyzed factors such as travel distance, costs, time, operating hours, and fees of tourist attractions to propose a city suburban self-driving tour route planning method focused on enhancing the overall tourist experience. Wu Xiongbin [24] proposed a tourism experience utility objective function comprising two parts: tourism activity utility and tourism travel utility, considering various optional transportation modes and solving it based on the ant colony algorithm. Additionally, some works focus on recommending the top-K or next POI (point of interest), mainly based on collaborative filtering (CF) or matrix factorization methods, recommending the top-ranked or best tourist attractions to tourists. Heitor Werneck [25] provided an overview of this aspect of work.
The above studies have considered multiple factors for tourist itinerary planning and recommendation, implementing various algorithms. Overall, existing methods contribute to enhancing tourists’ travel experiences. However, tourists can further benefit from a more sophisticated model and algorithms with higher levels of personalization. This paper proposes a tourist itinerary recommendation algorithm that considers a wide range of factors and supports various personalized needs.

3. Problem Definition and Modeling

In this section, we present an overview of the travel itinerary recommendation problem addressed in our study and introduce the service mode of our algorithm. Subsequently, in Section 3.2, we mathematically model tourist comprehensive satisfaction, while Section 3.3 establishes the mathematical model for the travel itinerary recommendation problem with the objective of maximizing tourist comprehensive satisfaction.

3.1. Problem Definition

We define the tourism itinerary recommendation problem as follows: considering practical circumstances and expected demands in travel arrangements, we provide itinerary planning containing recommended attractions. The primary objective is to maximize the popularity and user interest in attractions, as well as the duration of attraction visits, while minimizing the deviation between estimated actual circumstances and expected conditions. In the next section, we formalize these factors and integrate them into a comprehensive satisfaction score. Additionally, the problem definition includes supporting nodes with multiple time windows, as well as various personalized settings.
This study focuses on formulating comprehensive rules by considering multiple factors and designing optimization methods to solve the complex mathematical problems proposed. It aims to provide itinerary planning references for tourists by solving the recommended scenic spots, the visiting order of nodes, and the time planning of trips, combined with path planning data between two points. The proposed algorithm can be applied independently or integrated as a complementary rule component with data-driven methods to enhance their flexibility and applicability.
The system framework illustrated in Figure 1 elucidates the service implementation approach of the algorithm. Tourists set their preferences and requirements through an interactive interface based on provided tourism information and their own needs. The system middleware converts the data into a format supported by the algorithm, and the resulting itinerary recommendations are presented to tourists via the algorithm. Figure 2 demonstrates the style of our results, where route information is derived from the sequence of node visits and corresponding route planning strategies, and time planning includes key time points during the journey and arrangements for dining and accommodation, providing tourists with time references closest to their expected conditions. Tourists can modify their requirements based on the results, and the system continuously optimizes the results based on user feedback.
The system database stores attraction attribute data extracted from tourism websites and map services, as well as travel time data between attractions under different time and route planning strategies, providing data support for tourism information display and algorithm operation. The system middleware integrates user settings with database data, obtaining travel time data for nodes outside the database by calling path planning services. It also converts user settings and database data into the format required by the algorithm through basic data calculations, including node time window calculations, user interest level calculations for nodes, and input data validation.
In addition to essential planned travel time and journey start and end points, the designed system offers a range of optional settings. Tourists can make selections based on their needs and preferences, as detailed in Figure 2. These personalized settings are achieved in two aspects. On the one hand, they are implemented through corresponding processing methods designed within the algorithm, such as selected attractions, hotels, and restaurants; the consideration of diversity in attraction types; specified node visit sequences; dining within attractions; and the exclusion of candidate attractions. On the other hand, these personalized settings benefit from the introduction of a wide range of factors in the problem; modifications to default parameters enable the fulfillment of corresponding personalized requirements, such as path planning strategies, travel modes, dining and sleeping times, expected stay and visit times for nodes (achieved by modifying node time windows), types of attractions of interest, budget constraints for attraction visits, regional restrictions for recommended attractions, and excluded candidate attractions. These data modifications can be completed within the middleware.
Appendix A introduces the basic concepts involved in this research, including nodes, meal and rest accommodation time parameters, node time windows, the node time period, scenic spot physical exertion, the scenic spot interest level, travel style, expectation, and penalty. The significance, specific forms, and quantification methods of these concepts are explained to provide readers with a clear understanding of the key terms and parameters used in the research. For detailed information, please refer to Appendix A.

3.2. Comprehensive Satisfaction of Tour Itinerary

To recommend a tour itinerary that meets the needs of tourists, we consider multiple factors. This section describes how to integrate these factors to construct a comprehensive satisfaction evaluation method for tour itinerary planning.

3.2.1. Scoring Based on the Time Utilization Ratio

People typically prefer to allocate more of their limited travel time to visiting scenic spots rather than spending it on travel or waiting. We define the Time Utilization Score ( T U S ) to evaluate the proportion of actual time spent on visiting scenic spots in the tour itinerary I . It is described using Equation (1):
T U S I = a i I A V D u r a i A v a i l a b l e T i m e
where A V D u r a i represents the actual visit duration of scenic spot a i in the itinerary plan. The duration of visiting each scenic spot will not exceed the expected time. A v a i l a b l e T i m e represents the available time, which equals the planned journey duration minus the total time for meals and rest expected during the journey.

3.2.2. Scoring Based on the Attractiveness of Recommended Scenic Spots

Furthermore, people typically prefer to visit scenic spots that are more popular and interesting. Firstly, we define the scenic spot attractiveness score ( S A S ) of scenic spots a i as follows:
S A S a i = P o p a i I n t a i
where P o p a i represents the popularity of scenic spot a i and I n t a i represents the level of interest tourists have in scenic spot a i . We then express the scenic spot attractiveness score of the itinerary ( I S A S ) based on the average S A S of the scenic spots recommended in itinerary I, as defined using Equation (3):
I S A S I = a i I , a i R S A S a i R e c N u m
where R represents the set of recommended scenic spots, and R e c N u m represents their total number.

3.2.3. Scoring Based on Itinerary Feasibility

The itinerary penalty can quantitatively evaluate the deviation between the planned itinerary and the expected situation. Please refer to Appendix B for its calculation method. Because the penalty function is time-dependent, we define the itinerary feasibility score ( F S ) to assess the relative impact of this deviation on tour itinerary I , described as follows:
F S I = 1 P ( I ) I t i n D u r
where I t i n D u r represents the duration of the tour itinerary.

3.2.4. Reward Based on Scenic Category Diversity

The monotonous categories of scenic spots in an itinerary may lead to tourist aesthetic fatigue. Considering that tourists may have preferences for the categories of scenic spots included in their itinerary, we have designed two types of diversity rewards ( R d i v ) for scenic categories. They are described as follows:
R d i v 1 I = I S c a t C a t I γ 1 + ( I S c a t I S c a t C a t I ) γ 2
R d i v 2 I = R d i v 1 + C a t I I S c a t C a t I γ 3
where I S c a t represents the set of user interest scenic spot categories and C a t ( I ) represents the set of scenic spot categories included in the itinerary. The first diversity reward R d i v 1 consists of two parts: a bonus for including the interest categories of scenic spots and a negative reward for missing interest categories in the itinerary, applicable when the user has selected interest categories. The second diversity reward R d i v 2 consists of three parts: it builds upon R d i v 1 by adding a bonus for the diversity of categories beyond the selected interest categories, and it applies even when the user has not selected interest categories. In this paper, γ 1 = 1 , γ 2 = 1 and γ 3 = 0.5 .

3.2.5. Comprehensive Satisfaction Score

After considering the aforementioned factors, we define the comprehensive satisfaction score (CSS) for the tour itinerary, represented by the following equation:
C S S I = T U S I I S A S I F S I + R d i v 1 I α 1 + R d i v 2 I α 2
Comprehensive satisfaction considers the time utilization rate, scenic spot attractiveness, itinerary feasibility, and diversity of scenic categories. Considering that not every user has needs related to the categories of scenic spots, we add the diversity reward of the scenic spot categories as additional terms to the C S S . Decision variables α 1 and α 2 are initially set to 0 by default but can be set to 0 or 1 based on user selection, but both cannot be set to 1 simultaneously.

3.3. Modeling of the Tour Itinerary Recommendation Problem Based on Comprehensive Satisfaction

We employ a mathematical model to represent the actual tour itinerary recommendation problem, as indicated in (8)–(13). Equation (8) represents the objective function, where our aim is to find a tour itinerary with routes and time arrangements that maximize the comprehensive satisfaction score. Simultaneously, it adheres to the constraints represented by (9)–(13), where x i j = 1 when the itinerary includes the visit from a i to a j in order; otherwise, x i j = 0 .
M a x   C S S I
j I x i j = 1
i I x i j = 1
x i j × x j i = 0
D e p a r t u r e T + I t i n D u r L a t e s t E n d T
a i I C o s t a i C o s t C o n s t r a i n t
Equations (9)–(11) signify that each node is visited exactly once, and the itinerary comprises no fewer than two nodes. Equation (12) ensures that the ending time of the itinerary does not exceed the expected ending time, while Equation (13) guarantees that the total cost of visiting scenic spots during the itinerary does not surpass the specified cost constraint. Additionally, the itinerary must start at the starting point and end at the destination, while adhering to the user’s personalized requirements.
Our tour itinerary recommendation problem is modeled on a variant of the combinatorial optimization problem, which has been proven to be NP-hard [26,27]. Moreover, this problem involves penalty functions related to time, further complicating its complexity. Due to its NP-hard nature, finding an optimal solution is infeasible. To address these challenges, we propose the MCTSLKH_TR algorithm, which is based on the LKH algorithm and a variant of the MCTS algorithm. These algorithms heuristically search for optimal solutions within a more promising solution space, ensuring real-time performance and effectiveness. In Section 3, we will present the implementation of this algorithm.

4. Method

This section describes our proposed algorithm. Essentially, the tour itinerary recommendation problem can be boiled down to solving two key issues: recommending which scenic spots to visit (determining the node combination of the tour itinerary) and how to plan the itinerary (including routes and timing). These two factors collectively influence the quality of the tour itinerary recommendation results. In the objective function, node combination directly determines I S A S and R d i v and sets upper limits for T U S and F S , while itinerary planning directly determines T U S and F S . Therefore, the main idea of the recommendation algorithm is to explore different node combinations and optimize the objective function of the itinerary composed of these node combinations through itinerary planning, aiming to return the optimal result among all attempts. During each iteration, the selection of candidate attractions is influenced by their performance in participating in the itinerary. We implemented this main process based on a variant of the MCTS algorithm.
As a crucial step in the recommendation algorithm, tour itinerary planning aims to find the optimal itinerary for the given set of nodes by maximizing T U S F S . We define T U S F S as the tour itinerary planning satisfaction score ( T P S S ). The tour itinerary planning problem also involves two key issues: route planning (represented as the order of node visits in the algorithm) and time planning. Both factors collectively affect the quality of the itinerary planning results. The order of node visits determines the upper limit of the T P S S , while the time scheduling on this node visit order determines the specific T P S S . Therefore, our main approach to itinerary planning is to heuristically explore different node visit sequences and optimize the TPSS under the current sequence through timing planning, aiming to return the optimal itinerary arrangement among all attempts. Itinerary planning is modeled based on the Traveling Salesman Problem, which was implemented using the LKH algorithm.
As a key step in itinerary planning, timing planning comprehensively considers the time costs of food, lodging, transportation, and sightseeing for the determined node combination and visit sequence. It primarily maximizes the T P S S through the selection of node time windows and the arrangement of food and lodging. We implemented this using a local optimal algorithm. Figure 3 illustrates the hierarchical relationship of the recommendation algorithm, itinerary planning algorithm, and timing planning algorithm, as well as the main processes of the algorithms. Next, we will provide detailed descriptions of the timing planning, itinerary planning modules, and overall algorithm implementation.

4.1. Time Planning Algorithm Based on Tour Itinerary Planning Satisfaction

Since the time planning algorithm is frequently called in the program, we opted for simplifying calculations to enhance efficiency. Specifically, we set the objective as minimizing penalties under the premise of prioritizing the time spent on visiting scenic spots to maximize the T P S S . We implemented the time planning algorithm based on a local optimal approach. Algorithm 1 outlines our time planning function. The main process is as follows: for a given itinerary sequence, starting from the starting point, each node is processed sequentially. The algorithm selects time windows and arrangements for meals and accommodations based on minimizing the penalty for each node until the end of the itinerary, returning the time planning and the value of the itinerary objective function. If it is discovered during the process that the itinerary has exceeded the latest ending time or there are nodes that cannot be visited, the itinerary is deemed ineligible, and the algorithm returns to save unnecessary computations.
A l g o r i t h m   1 : T i m e P l a n n i n g O v e r v i e w   o f   A l g o r i t h m
I n p u t : I = N o d e   s e q u e n c e ; N o d e   R e l a t e d   a t t r i b u t e ; M R T i m e P a r ;   A v a i l a b l e T i m e ;   P h y s i c a l   e x e r t i o n   l i m i t ;
O u t p u t : T P S S   a n d   I t i n e r a r y   s c h e d u l e ;
1 T i m e P l a n
2 N S t a r t i n g P o i n t ;
3 C u r r T D e p a r t u r e T i m e ;
/ C u r r T   r e p r e s e n t s   t h e   c u r r e n t   p l a n n e d   l a t e s t   t i m e , U p d a t e d   a s   t h e   p l a n n i n g   p r o g r e s s e s   /
4 w h i l e N N e x t N ! = S t a r t i n g P o i n t d o
5 N . A r r T C u r r T ;
6 N e x t N N e x t N o d e I n I t i n e r a r y N , I ;
7 O p t i m a l T i m e W i n d o w S e l e c t i o n N . A r r T , N ;
8 M e a l A n d R e s t A r r a n g e m e n t N , E x t e r n a l c a l l ;
9 P P + N . P , A V D u r = A V D u r + N . A V D u r ;
10 i f   C u r r e n t T i m e > L a t e s t E n d T i m e   o r   P > M   t h e n
11 r e t u r n   0 ;
12 T P S S A V D u r A v a i l a b l e T i m e 1 P C u r r T D e p a r t u r e T i m e
13 r e t u r n   T P S S ;
The optimal selection algorithm for time windows involves attempting all time windows for the node at the current time, calculating the corresponding waiting penalty or late penalty, and selecting the most suitable time window based on the principle of the minimal penalty. The current time is determined by the sum of the itinerary departure time and the already planned time. After determining the time window, the node will obtain a complete time period, status (early or late arrival), and actual duration of visitation.
The dining and accommodation arrangement algorithm encompasses handling for a hotel or restaurant designated by the user, as well as standard dining and accommodation scheduling. It employs recursion to handle cases where multiple dining and accommodation arrangements are required within a node’s time period. In instances of conflicting expected dining and accommodation scheduling and sightseeing times, it selects from alternative options based on the principle of minimizing penalties. These alternatives consider various scenarios, including reducing expected duration, deviating from expected schedules, and backtracking within nodes. Please refer to Appendix C for the detailed process of the dining and accommodation arrangement algorithm.
Additionally, the algorithm introduces a dynamically adjusted expected dinnertime and physical exertion limit per day. When the lunchtime shifts, we accordingly adjust the expected dinnertime to ensure a consistent interval between the two meals. If there is additional physical exertion from the previous day, the physical exertion limit for the current day will be reduced accordingly, with the reduction amount proportional to the extra physical exertion from the previous day. These adjustments better meet the needs of tourists, making the itinerary planning more aligned with real-life situations.
Based on the above rules, we determine the time period of the nodes through the selection of time windows and the arrangement of dining and accommodation time, thus achieving acceptable time planning for the itinerary.

4.2. Tour Itinerary Planning Algorithm Based on Tour Itinerary Planning Satisfaction

We have implemented the tour itinerary planning algorithm based on tour itinerary planning satisfaction (named L K H _ T P ), using the LKH algorithm, which is one of the best algorithms for solving the Traveling Salesman Problem [28].
The LKH algorithm finds the optimal solution by performing heuristic edge exchanges on the initial solution. The main framework of the L K H _ T P algorithm is similar to that of the LKH-3 algorithm.
Before running the algorithm, we perform preprocessing tasks, including creating a node set, establishing fixed edges from the endpoint to the starting point (with zero cost) for trips with different start and end points (to form the TSP problem), and disabling node visit sequences that would render nodes inaccessible.
As shown in Algorithm 2, in line 2, the candidate edge function is created to optimize the lower bound of the optimal itinerary using subgradient optimization. It calculates the likelihood of each edge being part of the optimal itinerary and associates a certain number of candidate edges with nodes. Limiting the search scope by creating a set of candidate edges, the search direction is guided based on the α measure.
Lines 4–9 use the LKH algorithm to find local optimal solutions for a specified number of runs (Runs) and return the best solution among them.
A l g o r i t h m   2 : L K H _ T P O v e r v i e w   o f   A l g o r i t h m
I n p u t : N o d e : R e l a t e d   a t t r i b u t e ; M R T i m e P a r ; A v a i l a b l e T i m e ; P h y s i c a l   e x e r t i o n   l i m i t ;
O u t p u t : T P S S   a n d   I t i n e r a r y   s c h e d u l e ;
1 L K H _ T P
2 C r e a t e C a n d i d a t e S e t ;
3 B e s t T P S S 0 ;
4 f o r   R u n 1   t o   R u n s   d o
5 T P S S F T     F i n d T o u r ;
6 i f   T P S S F T > B e s t T P S S   t h e n
7 B e s t T P S S   T P S S F T ;
8 R e c o r d B e s t T o u r ;
9 r e t u r n   B e s t T o u r ;
10 F i n d T o u r
11 B e t t e r T P S S 0 ;
12 f o r   T r i a l 1   t o   T r i a l s   d o
13 C h o o s e I n i t i a l T o u r ;
14 T P S S L K L i n K e r n i g h a n ;
15 i f   T P S S L K > B e t t e r T P S S   t h e n
16 R e c o r d B e t t e r T o u r ;
17 B e t t e r T P S S T P S S L K ;
18 A d j u s t C a n d i d a t e S e t ;
19 R e s e t C a n d i d a t e S e t ;
20 r e t u r n   B e t t e r T P S S ;
Lines 11–20 explain the F i n d T o u r function, which conducts trial experiments. In each experiment, it first generates initial tour sequences using a combination of random and heuristic methods, ensuring the sufficient diversity of initial solutions while improving the efficiency. Then, the Lin–Kernighan function attempts to improve the selected initial tour through heuristic λ o p t edge exchanges. For each tour sequence, the objective function value is obtained by calling the time planning algorithm, and this value is used to determine whether an improvement has occurred. Whenever a better tour is found, it is recorded, and the priority of candidate edges is re-ranked. Finally, the best tour among these experiments is returned, and the original candidate edge set is re-established at the exit from F i n d T o u r . For a detailed explanation of the LKH algorithm, please refer to references [28,29]. The specified node visit order is achieved by adding constraints during the generation of the initial solution and edge exchanges.

4.3. Tour Itinerary Recommendation Algorithm Based on Tourist Comprehensive Satisfaction

We implemented the itinerary recommendation algorithm by combining the algorithm described in Section 4.2 with a variant of the Monte Carlo Tree Search (MCTS) algorithm. The MCTS algorithm is a search algorithm that has been successfully applied not only in artificial intelligence (AI) games such as chess and Go [30] but also in personalized itinerary recommendation [4,5,31]. The MCTS algorithm enables us to explore smaller, more promising regions of the solution space without traversing the entire solution space, thereby improving operational efficiency.
Algorithm 3 outlines the implementation process of the MCTSLKH_TR algorithm. In each iteration, we start from the user-selected base node combination (line 6), select nodes to add to the current combination, and perform itinerary planning until inserting a scenic spot would result in exceeding the cost limit, total time limit, or inaccessible scenic spots (lines 7–15). Then, the successful itinerary from the previous iteration is recorded as the recommendation for the current iteration, and itinerary-related parameters are calculated and propagated back to relevant candidate nodes (lines 16–27). Finally, the recommendation with the maximum objective function among these itinerary recommendations is returned (line 28).
A l g o r i t h m   3 : M C T S L K H _ T R O v e r v i e w   o f   A l g o r i t h m
I n p u t : N o d e : R e l a t e d   a t t r i b u t e ; M R T i m e P a r ; P h y s i c a l   e x e r t i o n   l i m i t ; T r a v e l   s t y l e ; C o s t   c o n s t r a i n t ; R d i v   t y p e ;
O u t p u t : I : I t i n e r a r y   s c h e d u l e ;
1 M C T S L K H _ T o u r R e c
2 P r e p r o c e s s i n g ;
3 I n i t i a l i z e   N o d e R e c o r d R ,   N o d e R e c o r d V ,   N o d e R e c o r d T E ;
/ r e s p e c t i v e l y   r e c o r d   t h e   c u m u l a t i v e   R e w a r d ,   v i s i t   c o u n t ,   a n d   T i m e E f f i c i e n c y   o f   e a c h   n o d e . /
4 T o t a l S e l e N u m 0 ;
5 f o r   I t e r a t i o n s 1   t o   m a x L o o p   d o
6 I s P a s s T r u e   N o d e S e t B a s e N o d e S e t ;
7 w h i l e I s P a s s = T r u e   d o
8 P r e v i o u s N o d e S e t N o d e S e t ;
9 N S e l e c t N e x t N o d e ;
10 T o t a l S e l e N u m T o t a l S e l e N u m + 1 ;
11 N o d e S e t U p d a t e N o d e S e t N o d e S e t ,   N ;
12 I s F o u n d ,   I s P a s s H a s h S e a r c h H T a b l e ,   H a s h N o d e S e t ;
13 i f   I s F o u n d     T r u e   t h e n
14 I s P a s s ,   I t e n p L K H _ T P N o d e S e t ,   a b r i d g e d ;
15 H a s h I n s e r t H T a b l e ,   H a s h N o d e S e t ,   I s P a s s ;
16 I s F o u n d ,   T P S S ,   I t e n p H a s h S e a r c h 2 H T a b l e 2 ,   H a s h P r e v i o u s N o d e S e t ;
17 i f   I s F o u n d     T r u e   t h e n
18 T P S S ,   I t e n p L K H _ T o u r P l a n P r e v i o u s N o d e S e t ,   u n a b r i d g e d ;
19 H a s h I n s e r t 2 H T a b l e 2 ,   H a s h P r e v i o u s N o d e S e t ,   T P S S ,   I t e n p ;
20 R e w a r d I t e n p   C a l c u l a t e R a w a r d P r e v i o u s N o d e S e t ,   T P S S ;
21 T i m e E f f i c i e n c y I t e n p C a l c u l a t e T i m e E f f i c i e n c y P r e v i o u s N o d e S e t ,   I t e n p ;
22 B a c k P r o p a g a t i o n R N o d e R e c o r d R ,   I t e n p ,   R e w a r d I t e n p ;
23 B a c k P r o p a g a t i o n V N o d e R e c o r d V ,   I t e n p ;
24 B a c k P r o p a g a t i o n T E N o d e R e c o r d T E ,   I t e n p ,   T i m e E f f i c i e n c y I t e n p ;
25 C a t e g o r y R I t e n p   C a l c u l a t e C a t e g o r y R P r e v i o u s N o d e S e t ,   R t y p e ;
26 C S S I t e n p R e w a r d I t e n p + C a t e g o r y R I t e n p
27 I l i s t I l i s t I t e n p
28 R e t u r n   i t i n e r a r y   I   w i t h max C S S   f r o m   I l i s t ;
In each iteration, we decompose the itinerary recommendation task into two parts: node selection and itinerary planning, which are completed using the MCTS algorithm and the itinerary planning algorithm, respectively. The MCTS algorithm is responsible for selecting unordered node combinations, while the itinerary planning algorithm generates complete itineraries. Subsequently, the optimal itinerary recommendation result is selected based on overall satisfaction. This process differs from conventional MCTS algorithms, which gradually determine the sequence of actions, but it is better suited to our itinerary recommendation problem. It ensures the quality of itinerary planning and makes itinerary rewards more valuable, thereby promoting the selection of subsequent high-quality nodes. Additionally, this approach can reduce the computational complexity and provide more powerful personalized services through independent itinerary planning optimization algorithms.
The recommended itinerary provided in each iteration gives feedback to the relevant candidate nodes through a reward function, where the reward function is represented by Equation (14) and includes all parts of the objective function except for the reward for diversity in attraction types. This is because the diversity in the attraction types of the itinerary is independent of the quality of the nodes, and the related requirements are optional.
R e w a r d = T U S I I S A S I F S I
We simultaneously calculate both the time efficiency of nodes and the diversity of scenic categories within the itinerary. The time efficiency of a node within an itinerary is defined using Equation (15), where a l a s t represents the previous node a i in the itinerary, a n e x t represents the next node a i in the itinerary, and T D u r represents the travel time between these two points. The time efficiency of nodes is also propagated to every recommended node within the itinerary. This indicator is highly correlated with the time utilization rate of the itinerary and can highlight the inherent properties of the nodes themselves. Its average value can indirectly evaluate the positional attributes of the nodes, which we use as a heuristic factor considered in the selection node function.
T i m e E f f i c i e n c y a i = E V D u r a i E V D u r a i + T D u r a l a s t , a i + T D u r a i , a n e x t T D u r a l a s t , a n e x t
The diversity of scenic categories is calculated based on user preferences using Equation (5) or (6). The scenic category diversity reward, combined with the reward function, constitutes the objective function value of the itinerary.
In the process of incorporating scenic spots into the itinerary, the itinerary planning algorithm is used to determine whether it is still possible to insert additional spots. In such cases, optimizing the itinerary planning results is meaningless. Therefore, the itinerary planning algorithm is designed to exit as soon as an eligible itinerary planning is found (Lines 14), while a complete itinerary planning is performed when computing the final results in each iteration (Lines 18). Additionally, because the same node combination will yield the same result through itinerary planning, we utilize two hash tables to store obtained itinerary planning results, thus avoiding duplicate calculations (Lines 12–19). We enhance the efficiency of the algorithm through these measures.
Algorithm 4 outlines how to select the next node to add to the itinerary. We traverse the candidate scenic spots outside the current itinerary (Line 3), first obtaining the number of times each node has been selected. If a node has never been selected before, we directly choose that node (Lines 4–5). Next, we avoid adding nodes known to make the current itinerary infeasible through hash table queries (Lines 6–8), thereby improving the effectiveness of node additions and the diversity of node combinations. Then, we utilize the Upper Confidence Bound (UCB) algorithm to select the node with the highest UCB index from the remaining candidate nodes to add to the current itinerary (Lines 9–19).
A l g o r i t h m   4 : M C T S L K H _ T R S e l e c t N e x t N o d e
I n p u t :   N o d e R e c o r d R ;   N o d e R e c o r d V ;   N o d e R e c o r d T E ;   T o t a l S e l e N u m ;   C a n d i N o d e S e t ;   C u r r e n t N o d e S e t ;
O u t p u t : N : N e x t   n o d e   a d d   t o   t h e   i t i n e r a r y ;
1 S e l e c t N e x t N o d e
2 N S e t N u l l ;
3 f o r   N C a n d i N o d e S e t   a n d   N C u r r e n t N o d e S e t   d o
4 V i s i t C o u n t N G e t V i s i t C o u n t ( N ,   N o d e R e c o r d V ) ;  
5 i f   V i s i t C o u n t N = 0   t h e n   r e t u r n   N ;
6 I s F o u n d ,   I s P a s s H a s h S e a r c h H T a b l e ,   H a s h N o d e S e t N ;  
7 i f   I s F o u n d = T r u e   a n d   I s P a s s = F a l s e   t h e n
8 c o n t i n u e ;
9 R e w a r d N G e t R e w a r d ( N ,   N o d e R e c o r d R ) ;  
10 T i m e E f f i c i e n c y N G e t T E ( N ,   N o d e R e c o r d T E ) ;
11 E x p l o i t N R e w a r d N / V i s i t C o u n t N ;
12 E x p l o r e N C p 2 ln T o t a l S e l e N u m / V i s i t C o u n t N ;
13 H e u r N T i m e E f f i c i e n c y N / V i s i t C o u n t N S A S N ;
14 N S e t R e c o r d N S e t ,   N ;
15 f o r   n   i n   N S e t   d o  
16 N o r m a l i z a t i o n ;
17 U C B n α H H e u r i s t i c n + E x p l o i t n + E x p l o r e n ;
18 N G e t N w i t h M a x U C B
19 r e t u r n   N ;
The UCB algorithm applied to tree structures is commonly referred to as the UCT algorithm [32], typically with the objective of maximizing (16). The first part represents the exploitation value of the node, while the second part represents the exploration value of the node. Here, the parameter C p determines the emphasis on exploring nodes. We set C p to 1 / 2 to balance exploitation and exploration.
U C T n = T o t a l R e w a r d N V i s i t C o u n t N + 2 C p 2 ln V i s i t C o u n t C u r r N V i s i t C o u n t N
U C B n = α H T o t a l T i m e E f f i c i e n c y N S A S N V i s i t C o u n t N + T o t a l R e w a r d N V i s i t C o u n t N + 2 C p 2 ln T o t a l S e l e N u m V i s i t C o u n t N
Our UCB formula (as outlined in Equation (17)) significantly improves upon the original UCT algorithm. Because the candidate nodes have different intrinsic properties, we introduce a heuristic term T o t a l T i m e E f f i c i e n c y N / V i s i t C o u n t N S A S N that considers the average time efficiency and attractiveness of the nodes. It is beneficial for selecting nodes that maximize the rewards of the itinerary.
Moreover, since our node visit order depends on the itinerary planning algorithm, the choice of the next node is independent of the currently expanded node. We replace the selection count of the current node in the exploration term with the total count of selections for all nodes.
To control the influence weights of both components, we normalize both the exploitation and heuristic parts, with α H denoting the weighting coefficient for the heuristic term.

5. Experiment and Example Analysis

This section introduces four sets of experiments related to the algorithm and provides an in-depth analysis of the experimental results. Specifically, Section 5.2 describes in detail the process of setting the number of iterations and heuristic weights in the algorithm. Section 5.3 analyzes the effectiveness of heuristics in the itinerary planning algorithm. Section 5.4 analyzes the effectiveness of the selection function in the itinerary planning algorithm. Section 5.5 explores the importance of considering the dining and accommodation times in itinerary planning by comparing them with a baseline algorithm that does not consider the dining and accommodation times. Finally, Section 5.6 evaluates the optimization performance of the proposed algorithm by comparing it with other algorithms. The algorithm proposed in this paper and all baseline algorithms are developed using the C language. All experiments were conducted on a computer with the following specifications: CPU: Intel Core i7-12700H 2.30 GHz, RAM: 16 GB.

5.1. Experimental Data

The experiment took the entire area of Hanzhong City as the research area, with a total area of approximately 27,200 square kilometers. Fifty key scenic spots in Hanzhong City were selected for the study. The distribution of the study area and selected scenic spots are shown in Figure 4. One hotel was selected to simulate the user’s chosen starting point and destination. The travel time data between scenic spots was obtained from Tencent Maps’ route planning service, which provides estimated travel times based on both distance and traffic conditions derived from big data. Information such as the popularity, opening hours, ticket prices, and categories of the scenic spots was sourced from Amap and Ctrip. The evaluation of the scenic spots is based on ratings from two websites and recent visitation numbers, comprising three factors in total. Among them, the ratings of the scenic spots are generated from user data. The recommended duration for visiting each scenic spot was sourced from Mafengwo and local tourism information websites.

5.2. Parameter Debugging of Tour Itinerary Recommendation Algorithm

We conducted experiments to determine how to set the iteration count ( m a x L o o p ) and heuristic weight ( α H ) in the MCTSLKH_TR algorithm. We performed a grid search across three cases, as shown in Table 1, to find the optimal values for these two parameters that balance efficiency and effectiveness effectively.
According to Figure 5, as the iteration count m a x L o o p increases, the number of new tour itinerary planning instances and number of duplicate tour itinerary planning instances both increase gradually when the number of tour itinerary planning requirements increases linearly. Moreover, the growth rate of new itinerary planning instances gradually slows down, while the growth rate of duplicate itinerary planning instances intensifies. This is because as the iteration count m a x L o o p increases, the solution space gradually converges, meaning that a greater proportion of itinerary planning instances has been calculated. When the growth rate of duplicate itinerary planning instances approaches the growth rate of itinerary planning requirements, it suggests that the algorithm hardly produces new solutions in the increasing iteration rounds. At this stage, the computational cost no longer offers a good balance between efficiency and value. Additionally, according to Table 2, after the growth rate of duplicate itinerary planning instances increases significantly, no better solutions are generated. Balancing algorithm efficiency and effectiveness, considering the scenarios of the three cases, we set the iteration count m a x L o o p to 500.
According to Figure 6, as the heuristic weight α H increases, the number of demands for itinerary planning and the quantity of duplicate itinerary planning instances gradually increase, while the number of new itinerary planning instances first increases and then decreases. The increase in these event quantities is due to the inclusion of nodes with higher time efficiency in the heuristic guidance, reducing the time cost of itinerary distance and allowing more scenic spots to be included in the itinerary within a limited time. The decrease in the number of new itinerary planning instances is caused by the increase in the heuristic weight α H , which leads to an excessive reliance on factors contained in the heuristic, thereby narrowing the solution space and generating numerous duplicate itinerary planning instances. Since our itinerary recommendation aims to find the optimal solution among all results, an excessive reliance on the heuristic may reduce our exploration space, potentially missing better solutions. Therefore, we set the heuristic weight to the value that maximizes the number of new itinerary planning instances. Considering the situations of the three cases mentioned above, we set the heuristic weight α H to 0.6.
It can be observed that as the planned tour duration increases across the scenarios, the intersection of the number of new itinerary planning instances and the number of duplicate itinerary planning instances occurs earlier in both Figure 5 and Figure 6. This is because, with a constant number of candidate nodes, for cases where more nodes can be added, the itinerary result set will contain a larger proportion of common nodes. This leads to an increase in the proportion of duplicate itinerary planning instances.

5.3. Tour Itinerary Planning Algorithm Heuristic Effectiveness Analysis

Because time utilization and itinerary feasibility are not directly related to known factors, it is difficult to obtain heuristic information directly tailored to the objective function through preprocessing. We adopted the heuristic method from the original LKH algorithm, which is designed to optimize route costs. Taking the nodes in the recommended itinerary and corresponding conditions from Case 3 in Table 1 as an example, we conducted experiments to analyze the effectiveness of the route cost heuristic for our objective optimization.
Firstly, we compared random sequences with sequences generated using the LKH_TP algorithm and evaluated whether these sequences could form an eligible itinerary using a time planning algorithm. Figure 7 illustrates the distribution of route costs for random sequences, eligible solutions in random sequences, sequences generated using the heuristic, and eligible solutions in sequences generated using the heuristic. Table 3 indicates the number of occurrences for each event. The results show that the validity rate of random sequences is 0.18%, while the validity rate of sequences generated using the heuristic is 25.74%.
We can observe that the route heuristic aids in exploring sequences with lower route costs, and eligible solutions tend to have sequences with lower route costs. The use of heuristics significantly increases the qualification rate of experimental sequences, facilitating the discovery of eligible solutions and itinerary optimization.
Furthermore, we analyzed the impact of route costs on tour itinerary planning satisfaction. Due to the predetermined time constraints, experimental sequences often resulted in an ineligible itinerary. To address this, we conducted the analysis without imposing a total travel time limit to ensure the integrity of the itinerary.
Figure 8 illustrates the relationship between route costs and their corresponding average minimum required available time and average tour itinerary planning satisfaction. Due to the influence of time windows for tourist attractions as well as meal and accommodation times, trips with the same route costs exhibit significant differences in the minimum required available time and itinerary satisfaction. To mitigate the impact of these factors, we use averages to highlight the overall trends of the minimum required available time and itinerary satisfaction with respect to route costs. The correlation coefficients between them were found to be 0.901 and −0.914, respectively. These data were derived from the time planning results of one million random sequences without a total time limit.
It can be predicted that under predetermined time constraints, lower route costs lead to a higher probability of forming an eligible itinerary and a reduced likelihood of time loss for visiting tourist attractions within the itinerary, owing to the competition between travel time and time spent at tourist attractions. This also increases the chances of obtaining a more satisfactory itinerary. Therefore, by emphasizing attempts with lower route costs through heuristics, we can protect the visiting time and discover a better itinerary.
In conclusion, the heuristic approach to optimizing route costs is well-suited for our itinerary planning needs.

5.4. Tour Itinerary Recommendation Algorithm Selection Function Effectiveness Analysis

We also analyzed the effectiveness of the itinerary recommendation algorithm selection function through the three cases in Table 1. Firstly, we examined the effectiveness of the added heuristic factors. Figure 9 illustrates the relationship between the heuristic factors of each candidate node and the corresponding factors in the reward for the three cases. The average correlations are 0.87, 0.76, and 0.86, respectively. It can be observed that there is a high positive correlation between the heuristic and the reward. Additionally, the heuristic of the nodes exhibits greater variability compared to the reward, especially in itineraries containing more recommended attractions. This is because the heuristic removes the influence of other nodes in the reward. The inclusion of the heuristic highlights the inherent value of candidate attractions, facilitating the selection of superior attractions among those with similar rewards, which positively contributes to discovering itineraries with higher rewards. Moreover, it can be observed that in cases with longer travel durations, attractions generally exhibit a higher time efficiency, as more nodes in the itinerary make it easier to include a larger proportion of attractions along the route.
Then, we further analyzed the effectiveness of the selection function by examining the average rankings of the recommended nodes in the optimal itinerary in terms of their selected number and various dimensions in the selection function (among the 50 candidate nodes). We also assessed the distribution of nodes selected in each iteration during the algorithm process. The reference optimal values in Table 4 are based on the theoretical optimal average ranks derived from the number of recommended nodes. It can be observed that our actual values are close to or equal to the optimal values, significantly outperforming the average rank of 25 obtained randomly. This indicates that the utilization dimensions in the selection function effectively guide the selection of nodes. Additionally, from Figure 10, it can be seen that our selection function balances exploration and exploitation, gradually converging during exploration. This not only facilitates the discovery of a high-quality itinerary but also ensures a sufficient number of attempts. Overall, our selection function demonstrates excellent effectiveness in itinerary recommendation.

5.5. Analysis of Tour Itinerary Planning Results

As a key component of the algorithm, the results of itinerary planning directly impact the itinerary arrangements in the recommendation results. We conducted an analysis of the itinerary planning results through experiments. Among the fundamental elements, travel, eating, lodging, transportation, and sightseeing are all crucial. However, past research has often overlooked the importance of properly arranging dining and accommodation times. Therefore, we primarily focused on the significance of considering dining and lodging times in the temporal dimension. In our experiments, we used the recommended nodes and their corresponding conditions from the three cases in Table 1 for itinerary planning. We also selected the following two baseline algorithms, both based on the LKH algorithm:
(1)
LKH: This algorithm plans an itinerary based on minimizing route costs, which is the most basic and common method of itinerary planning. It does not consider the temporal feasibility of itinerary arrangements.
(2)
LKH-TW: This algorithm plans an itinerary based on the optimal T P S S , employing the same objective function as presented in this paper. It considers the time windows of attractions but does not consider dining and accommodation times during the itinerary. The algorithm introduces the optimal time window selection algorithm proposed in this paper to accommodate multiple time windows of attractions in multi-day trips. Additionally, to avoid unreasonable overnight travel, any intersection between attraction time windows and resting time is removed, implying a rigid arrangement for accommodation time. This algorithm represents the current level of time constraints in itinerary planning problems in the related literature.
We utilized the following seven evaluation metrics to measure the provided itinerary solutions:
(1)
The travel time ( T r a v e l T ).
(2)
Whether the itinerary exceeds the planned time ( T i m e o u t ) (indicated by 0 or 1).
(3)
Whether there are attractions that cannot be visited ( U n a b l e V i s i t ). An attraction is considered unable to be visited if, upon arrival at the node, it is already past the last entry time for that attraction within the planned travel time.
(4)
The actual duration of attraction visits planned in the itinerary ( A V i s D u r ).
(5)
The ratio of A V i s D u r to expected visit duration ( A E V D u r R a t i o ). The difference between the two values stems from late arrivals at attractions.
(6)
The itinerary penalty ( P e n a l t y ).
(7)
Tour itinerary planning satisfaction ( T P S S ).
Due to the inability of the LKH algorithm to produce evaluation metrics beyond the route cost and the evaluation metrics of the LKH_TW algorithm results not encompassing the dining and accommodation time of tourists, for the sake of uniform evaluation criteria, the solution proposed in this paper was adopted as the standard. For the itinerary planning results obtained using the two baseline algorithms, evaluation metrics other than the route cost were calculated using the time planning algorithm proposed in this paper, according to their visiting order. The results of the evaluation metrics are shown in Table 5, and Table 6 analyzes the sources of penalties for each algorithm in the cases (the values in parentheses represent the original results of A V i s D u r , P e n a l t y , and T P S S ).
We analyze the results as follows:
(1)
T r a v e l T : The LKH algorithm achieves the lowest value in all three cases. The LKH_TW algorithm and the proposed method are roughly comparable, but there is no significant enhancement compared to the LKH algorithm. This is because although our objective function does not directly consider route costs, the extent to which routes can be sacrificed to improve the time spent at attractions and itinerary feasibility is limited. In the optimization scenario of the algorithm, time constraints will restrict unreasonable routes.
(2)
T i m e o u t and U n a b l e V i s i t : Except for Case 1 where all three algorithms provide eligible results, only the proposed method offers eligible results in the remaining cases. In Case 2, the LKH algorithm misses one attraction, while the LKH-TW algorithm exceeds the planned travel time. In Case 3, both the LKH and LKH-TW algorithms miss two attractions. This indicates that the itinerary planning results provided by the two baseline algorithms are likely to be unreasonable in reality. Moreover, as the travel duration increases and the number of itinerary nodes grows, the probability and severity of unreasonable results tend to escalate.
(3)
A V i s D u r , A E V D u r R a t i o , P e n a l t y , and T P S S : It can be observed that, due to there being fewer constraints, the original T P S S of the results from the L K H _ T W algorithm is superior to that of our proposed algorithm, indicating a higher attraction visit time or fewer penalties. However, under unified time planning, its results are comparable to those of the L K H algorithm, resulting in significant losses in attraction visit time and penalties for waiting and late arrivals. This is because it overlooks the necessary dining time expenditure for tourists during travel and does not consider rest and accommodation time in the itinerary based on specific circumstances. This can lead to a disconnect between visitors’ actual experiences during travel and the planned time arrangements. It is evident that dining and accommodation time have a significant impact on itinerary planning. Meanwhile, our algorithm yields optimal results in these four indicators, with an average A E V D u r R a t i o reaching 98.67%, which is 9.82% higher than that of the L K H algorithm and 10.34% higher than that of the LKH-TW algorithm.
Through the above analysis, it can be observed that considering the arrangement of dining and accommodation time is of significant importance for detailed itinerary planning under the self-drive tour mode. Additionally, the results of the itinerary planning algorithm proposed in this paper approach the expected conditions across various indicators, ensuring a relatively complete expected visitation time and regular meal and rest schedules. The provided itinerary planning results are highly feasible.

5.6. Analysis of Tour Itinerary Recommendation Results

We conducted an analysis of the tour itinerary recommendation results through experiments. To evaluate the optimization performance of the algorithm under the same rules, we developed two algorithms as baseline algorithms. These algorithms integrate our time planning algorithm with advanced related algorithms and utilize the same objective function as our algorithm. The two baseline algorithms are as follows:
  • G r e e d y L K H _ T R : This algorithm combines our tour itinerary planning approach with the sequential attraction insertion method proposed in [9,10]. It begins with the basic node combination and attempts to add each candidate attraction to the current node combination individually. Then, it applies the L K H _ T P algorithm to plan the itinerary for each combination and selects the node that maximizes the objective function for addition. This process continues until no more attractions can be inserted. We refer to this algorithm as the G r e e d y L K H _ T R algorithm.
  • M C T S _ T R : This algorithm combines our time planning approach with a variant of the M C T S algorithm proposed in [4,31]. Its main process is similar to ours, but after selecting a node each time, it directly inserts it at the end of the current itinerary to form the itinerary sequence, without going through itinerary planning. The selection function used additionally incorporates a heuristic for the route cost to the current node on top of our algorithm and adjusts the total number of times all nodes in the exploration term of the selection function have been chosen to the number of times the current node has been selected. The feedback-related function remains the same as in our algorithm. We set the number of iterations to 10,000.
On top of the three cases in Table 1, the experimental cases added the user’s interest label as IS = {C1: Historical and Cultural}, while the remaining settings still used default parameters. We employed the following six evaluation indicators to measure the provided itinerary solutions:
(1)
The proportion of itinerary time ( T i m e P r o p o ), which represents the ratio of the total duration of the recommended itinerary to the user’s planned travel duration;
(2)
Itinerary Scenic Spot Attractiveness Score (ISAS);
(3)
Time Utilization Score ( T U S );
(4)
Feasibility Score ( F S );
(5)
Comprehensive satisfaction score ( C S S );
(6)
R u n t i m e .
These evaluation metrics can be used to comprehensively measure the quality and practicality of the recommended itinerary solutions. The experimental results are shown in Table 7, which also includes several values relevant to the evaluation metric calculations, such as the number of recommended attractions ( R e c N u m ), the actual duration of attraction visits planned in the itinerary ( A V i s D u r ), the duration of the itinerary ( I t i n D u r ), and the itinerary penalty ( P e n a l t y ). Table 8 outlines the average values of these metrics across the three cases.
We analyze the results as follows:
(1)
T i m e P r o p o : It can be observed that the recommended itineraries generated by all three algorithms effectively utilize the planned travel time of the tourists. The average T i m e P r o p o exceeds 96% across the board. Maximizing the use of time under time constraints is a fundamental requirement for tourists and is also a necessary condition for enhancing comprehensive satisfaction.
(2)
T U S ,   I S A S ,   F S ,   C S S : Among the CSS and related evaluation metrics, our algorithm achieves the best results in CSS and TUS across all three cases. The average CSS surpasses that of the G r e e d y L K H _ T R algorithm by 9.84% and exceeds that of the MCTS_TR algorithm by 14.85%. Similarly, the average TUS outperforms that of the GreedyLKH_TR algorithm by 13.20% and that of the MCTS_TR algorithm by 15.99%. Over the accumulated 9-day itineraries in the three cases, our algorithm provides an additional 610 min and 787 min of attraction visitation time compared to the GreedyLKH_TR and MCTS_TR algorithms, respectively. The FS of all three algorithms is relatively similar across the three cases, indicating that the itinerary results generated as part of the algorithm based on time planning closely match the tourists’ expectations. While the average ISAS of our algorithm is slightly lower than that of the two baseline algorithms, since the improvement of ISAS is direct and relatively simple, and the proposed algorithm selects the tour itinerary with a slightly lower ISAS but higher comprehensive satisfaction through trade-offs, it can be seen that the optimization ability of the proposed algorithm is superior to the two baseline algorithms.
(3)
Runtime: It can be observed that the MCTSLKH_TR algorithm requires a longer runtime compared to the GreedyLKH_TR algorithm under the same scenarios. However, this disadvantage is acceptable as it still promptly meets the user’s needs. According to the time complexity of the LKH algorithm, which is approximately O n 2.2 [29], theoretically, the MCTSLKH_TR and GreedyLKH_TR algorithms both have time complexities ranging from O n 2.2 to O ( n 3.2 ) . However, the MCTSLKH_TR algorithm only requires a constant number of complete itinerary planning iterations, with the remaining cases only needing to find eligible solutions. This significantly shortens the runtime and can be further accelerated through hash tables. Therefore, the time complexity of the MCTSLKH_TR algorithm is superior to the GreedyLKH_TR algorithm, and it is foreseeable that as the problem scale increases, the runtime required by the MCTSLKH_TR algorithm will outperform the GreedyLKH_TR algorithm. Additionally, the MCTSLKH_TR algorithm can directly control the runtime not to exceed a certain limit. The average runtime of the MCTSLKH_TR algorithm across the three cases is comparable to that of the MCTS_TR algorithm and has an advantage in small-scale cases.
In conclusion, the tour itinerary recommendation algorithm proposed in this paper can achieve superior itinerary recommendations, particularly in terms of time utilization. It results in tourists being able to spend more time visiting attractions and accessing a greater number of attractions within essentially the same itinerary duration.
It can be observed that the GreedyLKH_TR algorithm maintains relatively stable itinerary recommendation quality. However, the sequential insertion method is prone to becoming trapped in local optima, making it difficult to achieve better results. As the number of recommended nodes increases, the solution quality of the MCTS_TR algorithm gradually decreases. This is because with the increase in the number of recommendations, the solution space grows factorially, which cannot be compensated for by increasing the number of iterations in the MCTS_TR algorithm. Additionally, the inability to guarantee the rationality of itinerary planning reduces the reference value of itinerary rewards, and the need to select the optimal node at the current position increases the difficulty of selection.
In contrast, our algorithm combines a variant of the MCTS algorithm, balancing exploration and exploitation. It ultimately selects the best option from a global perspective. Furthermore, we separate the itinerary recommendation task into node combination and itinerary planning. Through itinerary planning, we can rapidly cover a large number of solutions and obtain high-quality feedback to guide node selection. Therefore, our method can provide high-quality itinerary planning and maintain stability as the number of recommended nodes increases.
What needs to be added to the discussion is as follows: In this chapter’s experiments, penalty metrics are computed by comparing the recommended itinerary with the user’s expected scenario. However, in actual travel scenarios, deviations may exist between the user’s anticipated dining, accommodation, and sightseeing durations and the expected scenario. Additionally, while many constraints are considered in the temporal dimension, the itinerary may also include other activities with uncertainties. Therefore, these metrics primarily reflect the deviation between the planned itinerary and the expected scenario. We lack real data to reflect the differences between user planning and actual travel scenarios.
Despite the disparities between user-inputted expectations and real scenarios, they do not affect our conclusions. Our algorithm is compared with the baseline under identical conditions. Although the experimental cases have certain limitations, they were not deliberately selected, so the experimental results still have a certain degree of comparability and credibility. Our primary focus is on providing optimal itinerary recommendations based on user expectations. Hence, despite some deviations, they do not significantly impact our research conclusions.

6. Conclusions

This paper analyzed the issues existing in the field of current tour itinerary recommendations. To address these problems, we constructed a comprehensive satisfaction model as the objective function and proposed the MCTSLKH_TR algorithm to solve them. The algorithm aims to provide detailed and satisfying itinerary recommendations for self-drive tours. The experimental results show that our itinerary recommendations exhibit higher comprehensive satisfaction compared to two baseline algorithms. Additionally, our algorithm considers more constraints in the temporal dimension compared to related work in tour itinerary planning, resulting in highly feasible itinerary arrangements.
In the future, we plan to expand this work in several ways. First, we will incorporate scenic roads into the model to provide certain rewards in itinerary planning and recommendations. Second, for dining and accommodation during the user’s tour itinerary, we will design the algorithm to not only make arrangements in terms of time but also recommend restaurants and hotels that meet the needs and preferences of the user according to the location of their tour itinerary. Third, we will use intelligent algorithms to examine user data and evaluate the level of interest in attractions. In summary, tour itinerary recommendations should continue to evolve towards intelligence and personalization.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/app14125195/s1. Table S1: Scenic Spot Attributes Data and Travel Time Data Between Scenic.

Author Contributions

Data curation, L.W. and D.L.; methodology, D.L. and Y.Z; software, D.L. and Y.D.; formal analysis, D.L., L.W. and Y.Z.; writing—original draft, D.L. and L.W.; writing—review and editing, Y.Z., J.K. and Y.D.; supervision, Y.D. and J.K.; project administration, J.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the key research and development projects of the Department of Science and Technology of Shaanxi Province (Grant No. 2020ZDLSF06-07), the research project of the Shaanxi Provincial Department of Transportation (Grant No. 21-03R), and the Shaanxi Provincial Key Research and Development Plan Project (Grant No. 2023-YBGY-200).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within the article and Supplementary Materials.

Conflicts of Interest

This research was conducted as part of a collaborative project between Chang’an University and Aerial Photogrammetry and Remote Sensing Group Co., Ltd. Author Yi Dong, affiliated with Aerial Photogrammetry and Remote Sensing Group Co., Ltd., contributed to the design of the study. The funding sponsors had no role in the design of the study.

Appendix A

The following describes the basic concepts involved in the problem and introduces their significance in this study, specific forms, and quantitative methods. The concrete form is designed to adapt to the relevant function. The defined quantification method provides a reasonable reference, and it is used for the calculation of experimental data in this paper. It can be replaced by other methods in practical applications.
Definition 1.
Node. In this paper, all locations involved in the itinerary are collectively referred to as nodes. They possess the following attributes: role (origin, destination, or waypoint), type (scenic spot, restaurant, hotel), time windows, expected duration, travel time to other nodes, and the next node in a fixed itinerary sequence (default is none). For scenic spots, additional attributes include popularity, user interest level, ticket price, category, grade, physical exertion, availability of internal dining and accommodation, and whether they are candidate scenic spots. Additionally, they have attributes such as adjacent nodes in the itinerary sequence, node penalties, internal dining and accommodation arrangements, and time cycles, which are used in the algorithm’s calculation process and output.
Definition 2.
Meal and rest accommodation time parameters ( M R T i m e P a r ). We guide the scheduling of meal and accommodation times in the itinerary planning with six parameters, including the expected lunch start time, dinner start time, rest and accommodation start time, lunch duration, dinner duration, and rest and accommodation duration. These parameters are collectively referred to as meal and rest time parameters.
Definition 3.
Node time windows. The time window of a node represents a period during which it is accessible and available. In this paper, each time window is represented by a triplet consisting of the opening time ( O p e n a i ), the last entry time ( L a s t a i ), and the closing time ( C l o s e a i ). A node may have multiple time windows, whereas for the starting point, ending point, and nodes open throughout the entire journey, their time windows are defined from the start time to the end time of the planned travel.
Definition 4.
Node time period. The node time period is a time interval composed of the arrival time of the node ( A r r T a i ) and the arrival time of the next node ( N e x t N A r r T a i ). It includes three stages: from the arrival time of the node to the start time ( S t a r t T a i ) of node visitation, from the start time of node visitation to the end time ( E n d T a i ) of node visitation, and from the end time of node visitation to the arrival time of the next node.
Definition 5.
Scenic spot physical exertion. We evaluated and quantified the physical exertion ( P E ) required to visit a scenic spot. As shown in (A1), the  P E a i  of a scenic spot  a i  is defined as the product of the recommended visit duration ( R V D u r a i ) of the scenic spot and the physical exertion coefficient  β a i . The physical exertion coefficient  β a i  depends on the terrain of the scenic spot. In this paper, climbing scenic spots  β = 2 , and other scenic spots  β = 1 . Under the default daily physical exertion limit, it is possible to avoid planning itineraries that involve continuous climbing in a single day in the algorithm.
P E a i = R V D u r a i β a i
Definition 6.
Scenic spot interest level ( I n t a i ). We define two levels of scenic spot categories, where the secondary category serves as a further differentiation of the primary category. We also define a set of scenic spot labels, denoted as  S S a i = { C 1 a i ,   C 2 a i ,   L a i } , comprising three dimensions: primary category  C 1 a i , secondary category  C 2 a i , and grade  L a i . Tourists can select their interests from all category labels and grade labels. Assuming the user selects the set of interest labels  I S = { C 1 1 ,   C 1 2 ,   C 2 1 ,   C 2 2 ,   C 2 3 ,   L 1 ,   L 2 } , the user’s interest level in scenic spot  a i  is represented by (A2), where  α  represents a fixed initial value, set to 0.5 in this study.  I S a i  represents the specificity of  I S  to  a i , as shown in (A3). If  I S  contains the secondary category  C 2 a i  of  a i  , then  I S a i  includes the primary category  C 1 a i  of  a i .
I n t a i = α + I S a i S S a i S S a i
I S a i = I S C 1 a i ,     C 2 a i I S ; C 1 a i I S I S ,                               o t h e r w i s e
Definition 7.
Travel style. The travel style denotes the compactness of the itinerary. We introduce inflation coefficients for both the travel time between destinations and the recommended duration for visiting scenic spots. By adjusting the travel time and recommended visit duration with certain proportions, we control the compactness of the itinerary. For user convenience, we have defined three sets of default coefficients corresponding to relaxed, moderate, and compact travel styles.
Definition 8.
Expectation and penalty. We distinguish problem inputs into hard conditions and expectations. Expectations refer to conditions in tour itinerary planning that are not strictly required but are desired to be achieved as much as possible. These include the duration of visiting nodes, meal and rest times, physical exertion limits, and the absence of waiting times throughout the itinerary. Since the actual itinerary often cannot fully meet these expectations, and also because this is unnecessary, we allow for deviations from these expectations in tour itinerary planning. However, to evaluate and minimize these deviations, we introduce penalty measures.

Appendix B

We have defined six types of penalties to evaluate the deviation of itinerary planning from each expected scenario, including waiting penalty, late arrival penalty, mealtime deviation penalty, mealtime reduction penalty, rest accommodation delay penalty, and physical fatigue penalty. The following describes the calculation methods for these penalties.
(1)
Waiting penalty
The waiting penalty ( W a i t P ) arises when the arrival time at a node is earlier than the opening time of the time window currently selected. It is a proportional function of the waiting duration, where the waiting duration equals the time interval between the arrival time at the node and the opening time of the node’s time window, minus the duration spent on dining and accommodation during this period.
(2)
Late arrival penalty
The late arrival ( L a t e A r r P ) penalty arises when the arrival time at the node cannot satisfy the expected duration of the visit under the currently selected time window. Figure A1 represents L a t e A r r P as a piecewise function of the lost visit duration. The lost visit duration is equal to the expected visit duration ( E V D u r a i ) minus the currently accessible duration, and M represents a sufficiently large number.
(3)
Meal- and rest-related penalties
Meal- and rest-related penalties include the meal deviation penalty M e a l D e v i a P , meal duration reduction penalty M e a l R e d u P , and rest accommodation delay penalty R e s t D e l a P . For each dining and accommodation arrangement, these penalties arise from the deviation of the scheduled time from the expected time or from not meeting the expected duration. These penalties are proportional functions of the respective deviations.
(4)
Physical fatigue penalty.
The physical fatigue penalty ( P h y s F a t i P ) arises when the cumulative physical exertion at the scenic spots for the day exceeds the expected daily physical limit. It is a proportional function of the additional physical exertion.
Figure A1. Relation between late arrival penalty and lost visit duration of node.
Figure A1. Relation between late arrival penalty and lost visit duration of node.
Applsci 14 05195 g0a1
(5)
Node penalty and itinerary penalty
We define the node penalty P a i in (A4), which equals the sum of all penalties generated within the node’s time period, added to the physical fatigue penalty. The physical fatigue penalty is calculated on a daily basis, and it is added to the respective node penalty at each rest accommodation and at the end of the itinerary. Therefore, as shown in (A5), the itinerary penalty P ( I ) equals the sum of all node penalties within the itinerary I . The itinerary penalty provides a comprehensive assessment of the deviation between the current itinerary planning and the expected scenario.
P a i = W a i t P a i + L a t e P a i + m j a i M e a l D e v i a P m j + m j a i M e a l R e d u P m j + r j a i R e s t D e l a P r j + r j a i P h y s F a t i P r j
P ( I ) = a i I P a i
In this algorithm, the penalty coefficients used are as shown in Table A1. These coefficients indicate the relative weights of each deviation and will influence the comparison of different itineraries as well as the time planning within the itinerary based on the minimum penalty principle.
Table A1. Penalty coefficient.
Table A1. Penalty coefficient.
Type W a i t P L a t e A r r P M e a l D e v i a P M e a l R e d u P R e s t D e l a P P h y s F a t i P
Coeff.0.5Phase1: 1Phase2: 20.5111

Appendix C

The processing flow of the dining and accommodation arrangement algorithm for each node is as follows:
Step 1: Determine the known type of food and lodging arrangements required at the current time. If not specified, make a judgment based on the current time (occurring at the start of the itinerary and after any nodes where tourists have specified no food and lodging arrangements), and proceed to the next step.
Step 2: Determine whether the current node is a restaurant or hotel designated by the user. If not, proceed to the next step. If it is, handle it according to the selected restaurant or hotel, and move on to Step 6.
Step 3: Determine whether the current food and lodging arrangements need to occur within the current node’s time period. If so, proceed to the next step; otherwise, exit.
Step 4: Determine if the next node in the itinerary is a designated a restaurant or hotel and supports the current dining and accommodation arrangement. The suitability of the selected node for the current dining and accommodation arrangement is based on two criteria: whether the node type supports the type of dining and accommodation, and whether postponing the dining and accommodation arrangement is acceptable. If both criteria are met, abandon the process; the dining and accommodation arrangement will move to the next node to avoid waiting or missing the time window of the next node. Otherwise, proceed to the next step.
Step 5: Make the dining or accommodation arrangement within the time period of this node; proceed to the next step.
Step 6: Determine whether the next dining and accommodation arrangement falls within the time period of the current node. If it does, proceed with recursion and return to Step 4. If not, exit the process. When a designated restaurant or hotel node triggers a self-call, it is because the expected time for the next dining or accommodation falls within the time interval ( N . E n d T , N . N e x t N A r r T ] . At this point, the node is no longer treated as a designated restaurant or hotel.
For selected restaurants or hotels, the handling method in step 2 is as follows:
(1)
If waiting is required, schedule other dining and accommodation arrangements normally during the waiting time;
(2)
If delayed but still accessible, adjust the schedule backward without affecting the next dining and accommodation arrangement, ensuring that the duration remains unchanged;
(3)
If on time or inaccessible, no action is needed.
In step 5, the accommodation and dining arrangement method are based on the following assumptions: dining and accommodation can conveniently take place near scenic spots or along the route between nodes as needed. This aligns with people’s habits and objective facts.
The main process is as follows: if the expected timing does not conflict with the time allocated for visiting the scenic spots, then the arrangement proceeds according to the expectation. Otherwise, by calculating the penalty increment for each alternative, the arrangement selects the one with the smallest penalty increment for scheduling. Taking the dining time arrangement as an example, Figure A2 depicts the scenario in which the expected arrangement start time falls within different stages of the node time period.
Figure A2. The scenario of expected start time of arrangement falling within different stages of the node time period: (a) before the visit; (b) during the visit; (c) after the visit.
Figure A2. The scenario of expected start time of arrangement falling within different stages of the node time period: (a) before the visit; (b) during the visit; (c) after the visit.
Applsci 14 05195 g0a2
Figure A2a depicts the expected start time for dining within the time interval N . A r r T , N . S t a r t T ] . The dining time will be arranged sequentially, with priority given to duration1, followed by duration2, and then duration3, as depicted in Figure A2a. In other words, we will rationalize the use of time by advancing the dining time and postponing the sightseeing time without causing lateness. If the expected dining duration cannot still be met, conflicts will arise. In such cases, we will attempt alternative solutions.
Figure A2b depicts the expected start time for dining within the time interval N . S t a r t T , N . E n d T ] . If the node supports internal dining and the expected dining duration is not greater than duration3 as depicted in Figure A2b, there is no conflict. Otherwise, alternative arrangements will be considered.
Figure A2c depicts the expected start time for dining within the time interval N . E n d T , N . N e x t N A r r T ] . In this case, there will be no conflict.
There are three alternative options for the mealtime:
Option 1: Dining is arranged within the original time interval, aiming to meet the mealtime as closely as possible without sacrificing tour time, and any remaining missing mealtime is cancelled.
Option 2: Dining is scheduled after visiting the node; the mealtime is offset at this time, but the mealtime can be guaranteed (this option should be considered only when the offset is within a certain limit).
Option 3: This meal along with the existing meal and accommodation of this node are arranged according to the expected time. The node’s time window is then re-selected after this meal, that is, considering backtracking within the node.
Under the setting of the priority of the scenic visit time, these alternatives will not sacrifice the scenic visit time. We choose the one with the smallest penalty increment (the total penalty of the current node) among the alternatives.
In the algorithm, with each dining and accommodation arrangement, the node’s penalty and time period are updated, the dining and accommodation arrangement for the node is recorded, and the next type of dining and accommodation arrangement is determined.
For the arrangement of rest and accommodation time, similar to mealtime arrangements, but to ensure tourists receive regular and sufficient rest, rest and accommodation time will not be shifted forward or reduced. The impact of physical fatigue penalties is also considered. The specific process is not elaborated here.

References

  1. Dai, X.F.; Yang, M.Y. Holistic Tourism Driving High-Quality Development of the Tourism Industry. Tour. Trib. 2022, 37, 6–8. [Google Scholar] [CrossRef]
  2. Borràs, J.; Moreno, A.; Valls, A. Intelligent tourism recommender systems: A survey. Expert. Syst. Appl. 2014, 41, 7370–7389. [Google Scholar] [CrossRef]
  3. Lim, K.H.; Chan, J.; Leckie, C.; Karunasekera, S. Personalized trip recommendation for tourists based on user interests, points of interest visit durations and visit recency. Knowl. Inf. Syst. 2018, 54, 375–406. [Google Scholar] [CrossRef]
  4. Halder, S.; Lim, K.H.; Chan, J.; Zhang, X. Efficient itinerary recommendation via personalized POI selection and pruning. Knowl. Inf. Syst. 2022, 64, 963–993. [Google Scholar] [CrossRef]
  5. Chen, J.; Jiang, W.; Wu, J.; Li, K.; Li, K. Dynamic Personalized POI Sequence Recommendation with Fine-Grained Contexts. ACM Trans. Internet Technol. 2023, 23, 1–28. [Google Scholar] [CrossRef]
  6. Taylor, K.; Lim, K.H.; Chan, J. Travel Itinerary Recommendations with Must-see Points-of-Interest. In Proceedings of the Eighth International Workshop on Location and the Web, Lyon, France, 23–27 April 2018. [Google Scholar]
  7. Khamsing, N.; Chindaprasert, K.; Pitakaso, R.; Sirirak, W.; Theeraviriya, C. Modified ALNS Algorithm for a Processing Application of Family Tourist Route Planning: A Case Study of Buriram in Thailand. Computation 2021, 9, 23. [Google Scholar] [CrossRef]
  8. Sarkar, J.L.; Majumder, A. gTour: Multiple itinerary recommendation engine for group of tourists. Expert. Syst. Appl. 2022, 191, 116190. [Google Scholar] [CrossRef]
  9. Fu, C.Y.; Hu, M.C.; Lai, J.H.; Wang, H.; Wu, J.L. TravelBuddy: Interactive Travel Route Recommendation with a Visual Scene Interface; Springer International Publishing: Cham, Switzerland, 2014; pp. 219–230. [Google Scholar]
  10. Zhang, C.Y.; Liang, H.W.; Wang, K. Trip Recommendation Meets Real-World Constraints: POI Availability, Diversity, and Traveling Time Uncertainty. ACM Trans. Inf. Syst. 2016, 35, 1–28. [Google Scholar] [CrossRef]
  11. Rizwan, A.; Muslim, H.G.; Muna, A.; Mingwei, Z.; Abdullah, A.G.; Ahmed, A.B.A.; Taha, A.; Hussein, A.; Mizanur, R.S.M. A Serendipity-Oriented Personalized Trip Recommendation Model. Electronics 2022, 11, 1660. [Google Scholar] [CrossRef]
  12. Chen, L.; Cao, J.; Tao, H.C.; Wu, J. Trip Reinforcement Recommendation with Graph-based Representation Learning. ACM Trans. Knowl. Discov. Data 2023, 17, 1–20. [Google Scholar] [CrossRef]
  13. Zhou, X.; Su, M.Z.; Liu, Z.; Zhang, D. Smart Tour Route Planning Algorithm Based on Clustering Center Motive Iteration Search. IEEE Access 2019, 7, 185607–185633. [Google Scholar] [CrossRef]
  14. Zhou, X.; Su, M.Z.; Feng, G.H.; Zhou, X.H. Intelligent Tourism Recommendation Algorithm based on Text Mining and MP Nerve Cell Model of Multivariate Transportation Modes. IEEE Access 2021, 9, 8121–8157. [Google Scholar] [CrossRef]
  15. Zhang, Y.M.; Jiao, L.J.; Yu, Z.J.; Lin, Z.; Gan, M.J. A Tourism Route-Planning Approach Based on Comprehensive Attractiveness. IEEE Access 2020, 8, 39536–39547. [Google Scholar] [CrossRef]
  16. Yochum, P.; Chang, L.; Gu, T.L.; Zhu, M.L. An Adaptive Genetic Algorithm for Personalized Itinerary Planning. IEEE Access 2020, 8, 88147–88157. [Google Scholar] [CrossRef]
  17. Saeki, E.; Bao, S.; Takayama, T.; Togawa, N. Multi-Objective Trip Planning Based on Ant Colony Optimization Utilizing Trip Records. IEEE Access 2022, 10, 127825–127844. [Google Scholar] [CrossRef]
  18. Ding, Y.; Zhang, L.; Huang, C.; Ge, R. Two-stage travel itinerary recommendation optimization model considering stochastic traffic time. Expert. Syst. Appl. 2024, 237, 121536. [Google Scholar] [CrossRef]
  19. Gasmi, I.; Soui, M.; Barhoumi, K.; Abed, M. Recommendation rules to personalize itineraries for tourists in an unfamiliar city. Appl. Soft Comput. 2024, 150, 16. [Google Scholar] [CrossRef]
  20. Zhou, X.; Li, S.H.; Gao, K.L.; Liu, C.L.; Wang, H.C.; Hu, J.W. An improved dynamic travel route planning algorithm with multiple constraints. J. North Univ. China (Nat. Sci. Ed.) 2019, 40, 57–62. [Google Scholar]
  21. Xu, K. Research and Implementation of Smart Travel Route Planning Algorithm Based on Reinforcement Learning. Master’s Thesis, Xidian University, Xi’an, China, 2020. [Google Scholar]
  22. Huang, Z.B.; Lin, H.H.; Wang, J.H.; Deng, A.F.; Luo, B.R.; Lin, G.X. Research on improved ant colony algorithm under time window in travel route planning. Sci. Technol. Innov. Appl. 2019, 29, 28–29. [Google Scholar]
  23. Lu, B.C.; Yang, J.Y.; Wang, X. City Suburban Tour Route Planning Based on Tourist Experience. J. Chongqing Jiaotong Univ. Nat. Sci. 2021, 40, 161–170. [Google Scholar]
  24. Wu, X.B.; Guan, H.Z.; Han, Y.; Ma, J.Q. A tour route planning model for tourism experience utility maximization. Adv. Mech. Eng. 2017, 9, 2071942318. [Google Scholar] [CrossRef]
  25. Werneck, H.; Silva, N.; Viana, M.; Pereira, A.C.M.; Mourão, F.; Rocha, L. Points of Interest recommendations: Methods, evaluation, and future directions. Inform. Syst. 2021, 101, 101789. [Google Scholar] [CrossRef]
  26. Vansteenwegen, P.; Souffriau, W.; Oudheusden, D.V. The orienteering problem: A survey. Eur. J. Oper. Res. 2011, 209, 1–10. [Google Scholar] [CrossRef]
  27. Blum, A.; Chawla, S.; Karger, D.R.; Lant, T.; Meyerson, A.; Minkoff, M. Approximation algorithms for orienteering and discounted-reward TSP. In Proceedings of the 44th Annual IEEE Symposium on Foundations of Computer Science Cambridge, Cambridge, MA, USA, 11–14 October 2003; pp. 46–55. [Google Scholar] [CrossRef]
  28. Helsgaun, K. An Extension of the Lin-Kernighan-Helsgaun TSP Solver for Constrained Traveling Salesman and Vehicle Routing Problems: Technical Report; Roskilde University: Roskilde, Denmark, 2017. [Google Scholar]
  29. Helsgaun, K. An effective implementation of the Lin–Kernighan traveling salesman heuristic. Eur. J. Oper. Res. 2000, 126, 106–130. [Google Scholar] [CrossRef]
  30. Coulom, R. in Efficient Selectivity and Backup Operators in Monte-Carlo Tree Search; Springer: Berlin/Heidelberg, Germany, 2007; pp. 72–83. [Google Scholar]
  31. Lim, K.H.; Chan, J.; Karunasekera, S.; Leckie, C. Personalized Itinerary Recommendation with Queuing Time Awareness. In Proceedings of the 40th International ACM SIGIR Conference on Research and Development in Information Retrieval, Tokyo, Japan, 7–11 August 2017. [Google Scholar]
  32. Kocsis, L.; Szepesvári, C. Bandit Based Monte-Carlo Planning; Springer: Berlin/Heidelberg, Germany, 2006; pp. 282–293. [Google Scholar]
Figure 1. Proposed system framework.
Figure 1. Proposed system framework.
Applsci 14 05195 g001
Figure 2. Result example.
Figure 2. Result example.
Applsci 14 05195 g002
Figure 3. Framework and workflow of the tour itinerary recommendation algorithm.
Figure 3. Framework and workflow of the tour itinerary recommendation algorithm.
Applsci 14 05195 g003
Figure 4. Study area and distribution overview of the selected scenic spots.
Figure 4. Study area and distribution overview of the selected scenic spots.
Applsci 14 05195 g004
Figure 5. The change trend of the number of tour itinerary planning requirements, new tour itinerary planning instances, and duplicate tour itinerary planning instances with the number of iterations m a x L o o p (Figure (a), (b), and (c) correspond to cases 1, 2, and 3, respectively).
Figure 5. The change trend of the number of tour itinerary planning requirements, new tour itinerary planning instances, and duplicate tour itinerary planning instances with the number of iterations m a x L o o p (Figure (a), (b), and (c) correspond to cases 1, 2, and 3, respectively).
Applsci 14 05195 g005
Figure 6. The change trend of the number of tour itinerary planning requirements, new tour itinerary planning instances, and duplicate tour itinerary planning instances with the heuristic weight α H (Figure (a), (b), and (c) correspond to cases 1, 2, and 3, respectively).
Figure 6. The change trend of the number of tour itinerary planning requirements, new tour itinerary planning instances, and duplicate tour itinerary planning instances with the heuristic weight α H (Figure (a), (b), and (c) correspond to cases 1, 2, and 3, respectively).
Applsci 14 05195 g006
Figure 7. Route cost distribution for random and heuristic trial sequences and the eligible sequences therein.
Figure 7. Route cost distribution for random and heuristic trial sequences and the eligible sequences therein.
Applsci 14 05195 g007
Figure 8. Relationship between route cost and average minimum required available time and average tour itinerary planning satisfaction score.
Figure 8. Relationship between route cost and average minimum required available time and average tour itinerary planning satisfaction score.
Applsci 14 05195 g008
Figure 9. The relationship between the heuristic factors of candidate nodes and their corresponding factors in the rewards: (a) Scenic spot attractiveness score and the average value of ISAS; (b) The average value of TimeEfficiency and the average value of TUS; (c) Heuristic in UCT and the average value of TUS * ISAS.
Figure 9. The relationship between the heuristic factors of candidate nodes and their corresponding factors in the rewards: (a) Scenic spot attractiveness score and the average value of ISAS; (b) The average value of TimeEfficiency and the average value of TUS; (c) Heuristic in UCT and the average value of TUS * ISAS.
Applsci 14 05195 g009
Figure 10. Selection of scenic spots in each iteration (Figure (a), (b), and (c) correspond to cases 1, 2, and 3, respectively).
Figure 10. Selection of scenic spots in each iteration (Figure (a), (b), and (c) correspond to cases 1, 2, and 3, respectively).
Applsci 14 05195 g010
Table 1. Experimental cases.
Table 1. Experimental cases.
CasePlanned Travel TimeStarting PointDestinationRemaining Settings
1One-day tour (day1 8:30–day1 21:30)Hotel1Hotel1default
2Three-day tour (day1 8:30–day3 21:30)Hotel1Hotel1default
3Five-day tour (day1 8:30–day5 21:30)Hotel1Hotel1default
Table 2. The round in which the best result is found for different iterations in the three cases.
Table 2. The round in which the best result is found for different iterations in the three cases.
Number of
Iterations
50100150200250300350400450500
Case 13888888888888888888
Case 22497101197197197197399402402
Case 317666666215215215215438438
Number of
Iterations
5506006507007508008509009501000
Case 188888888888888888888
Case 2402402402402402402402402402402
Case 3438438438438438438438438438438
Table 3. The number of random and heuristic sequence trials and their eligible sequences.
Table 3. The number of random and heuristic sequence trials and their eligible sequences.
EventTrialsEligible SolutionsPass Rate
Random sequence1,000,00018230.18%
Heuristic sequence113,82329,29625.74%
Table 4. The average rankings of the recommended nodes in the optimal itinerary.
Table 4. The average rankings of the recommended nodes in the optimal itinerary.
CaseOptimal Value Reference VisitCount N R e w a r d V i s i t C o u n t N T i m e E f f i c i e n c y V i s i t C o u n t N SASUCB Excluding
Exploration Part
12223.6675.6672
356.1117.5567.11113.8896.333
58899.12515.9338
Table 5. The evaluation metrics results of tour itinerary planning experiments.
Table 5. The evaluation metrics results of tour itinerary planning experiments.
CaseAlgorithm T r a v e l T
(min)
T i m e o u t U n a b l e V i s i t A V i s D u r
(min)
A E V D u r R a t i o P e n a l t y T P S S
1 L K H 4600420100.00%90.727
L K H _ T W 6600420(420)100.00%13(0)0.723(0.737)
L K H _ T P 4600420100.00%90.727
2 L K H 23801124685.58%88 + M0
L K H _ T W 260101265(1412)86.88%344 + M 1(29)0(0.821)
L K H _ T P 26400142497.80%680.817
3 L K H 42601212883.98%231 + 2M0
L K H _ T W 465012062(2504)81.37%268 + 2M(124)0(0.856)
L K H _ T P 47300248998.22%1890.848
1 For the purpose of analysis, the penalty M is represented separately.
Table 6. Analysis of penalty sources in itinerary planning results.
Table 6. Analysis of penalty sources in itinerary planning results.
CaseAlgorithm P e n a l t y Source of Penalty
W a i t P L a t e A r r P M e a l D e v i a P M e a l R e d u P R e s t D e l a P P h y s F a t i P
1 L K H 99
L K H _ T W 13 85
L K H _ T P 99
2 L K H 88 + M71M8 9
L K H _ T W 344 + M112217 + M15
L K H _ T P 6823225 9
3 L K H 231 + 2M1192M59 53
L K H _ T W 268 + 2M15866 + 2M 44
L K H _ T P 189 45151209
Table 7. The evaluation metrics results of tour itinerary recommendation experiments.
Table 7. The evaluation metrics results of tour itinerary recommendation experiments.
CaseAlgorithm R e c N u m A V i s D u r
(min)
I t i n D u r
(min)
T i m e P r o p o P e n a l t y T U S I S A S F S C S S R u n T i m e
(s)
1 G r e e d y L K H _ T R 342072993.46%80.7374.5250.9893.2980.28
M C T S _ T R 340270490.26%40.7054.550.9943.1913.77
M C T S L K H _ T R 342072993.46%80.7374.5250.9893.2980.76
2 G r e e d y L K H _ T R 61204362499.02%1150.7044.2910.9682.9252.27
M C T S _ T R 81358365299.78%1430.7943.9060.9612.98015.58
M C T S L K H _ T R 101508365299.78%2020.8824.260.9453.5499.61
3 G r e e d y L K H _ T R 122046650399.43%2650.7184.2470.9592.92414.45
M C T S _ T R 121733649599.31%1390.6084.330.9792.57728.03
M C T S L K H _ T R 152352653299.88%1760.8253.9840.9733.19937.09
Table 8. Average evaluation metric results of tour itinerary recommendation experiments.
Table 8. Average evaluation metric results of tour itinerary recommendation experiments.
Algorithm T i m e P r o p o T U S I S A S F S C S S R u n T i m e ( s )
G r e e d y L K H _ T R 97.30%0.7204.3540.9723.0495.67
M C T S _ T R 96.45%0.7024.2620.9782.91615.79
M C T S L K H _ T R 97.71%0.8154.2560.9693.34915.82
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, D.; Wang, L.; Zhong, Y.; Dong, Y.; Kong, J. Personalized Tour Itinerary Recommendation Algorithm Based on Tourist Comprehensive Satisfaction. Appl. Sci. 2024, 14, 5195. https://doi.org/10.3390/app14125195

AMA Style

Liu D, Wang L, Zhong Y, Dong Y, Kong J. Personalized Tour Itinerary Recommendation Algorithm Based on Tourist Comprehensive Satisfaction. Applied Sciences. 2024; 14(12):5195. https://doi.org/10.3390/app14125195

Chicago/Turabian Style

Liu, Dingming, Lizheng Wang, Yanling Zhong, Yi Dong, and Jinling Kong. 2024. "Personalized Tour Itinerary Recommendation Algorithm Based on Tourist Comprehensive Satisfaction" Applied Sciences 14, no. 12: 5195. https://doi.org/10.3390/app14125195

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop