Content uploaded by Ali Jamal Mahdi
Author content
All content in this area was uploaded by Ali Jamal Mahdi on Sep 25, 2023
Content may be subject to copyright.
- 1 -
„XVII. IFFK 2023”
Budapest, 2023. september 5-7.
„XVII. IFFK 2023” Budapest
Online: ISBN 978-963-88875-3-5
Paper xx
Copyright 2023. Budapest, MMA.
Editor: Dr. Péter Tamás
CAETS
További logók helye
Utilizing Heuristic Algorithms Based on Destination Ratings for Enhancing Travel
Planning
Ali Mahdi*. Domokos Esztergár-Kiss**
*Department of Transport Technology and Economics, Budapest University of Technology and Economics,
Műegyetem rkp. 3., 1111 Budapest, Hungary
*Department of construction and projects, Headquarter, University of Anbar, Al Anbar, Iraq
(Tel:+36 20- 401-1469 ; alijamalmahdi@edu.bme.hu)
** Department of Transport Technology and Economics, Budapest University of Technology and Economics,
Műegyetem rkp. 3., 1111 Budapest, Hungary
(Tel:+36 1 463-1029 ; esztergar@mail.bme.hu)
Abstract: As urban travelers seek personalized and efficient travel planning solutions, the utilization of
heuristic algorithms has gained significant attention. This study focuses on the optimization of travel
itineraries by integrating destination ratings and flexibility into the algorithm. The objective is to enhance
personalized travel experience by considering traveler preferences and efficient scheduling of destinations.
The method involves utilizing a Genetic Algorithm (GA) framework and collecting destination ratings
creating flexible scenarios, where the locations of the destinations can be changed. The outcomes
demonstrate the effectiveness of the algorithm in generating optimized travel itineraries. The substitution
of a destination, for example a cafe in the flexible scenario resulted in a significant reduction in total travel
time by about 14.3%. This indicates the algorithm’s capability to optimize travel schedules by
incorporating flexibility and considering destination ratings. The study’s implications include enhanced
personalization, improved travel efficiency, and a more satisfying travel experience.
1. INTRODUCTION
In recent years, the investigation for personalized and
efficient travel experiences has become increasingly
prominent among travelers. The plenty of destination choices,
coupled with the desire for unique itineraries, has led to a
growing interest in leveraging advanced algorithms to assist
in travel planning processes (Xiang et al., 2015). Heuristic
algorithms have gained considerable attention due to their
ability to provide optimized recommendations based on
specific criteria (Gad, 2022).
Travelers are often faced with the challenge of selecting
destinations that align with their preferences and interests. As
the number of potential destinations grows, there is a need for
efficient and effective methods to evaluate and prioritize
these choices. In recent years, the concept of rating of
destinations has gained significant attention as a valuable tool
in trip planning (Terttunen, 2017). (Miguéns et al., 2008)
investigates the consumer-generated content (CGC) on
TripAdvisor, specifically focusing on the city of Lisbon. It
explores how users collaborate and contribute to shaping the
destination’s image on this online social networking site. The
study highlights the relevance of user-generated content for
travel planning by analyzing a sample of Lisbon hotels. In the
same vein, (Bigne et al., 2023) investigate the relationship
between star ratings, sentiments expressed in online reviews,
and their impact on the customer experience. Using deep
learning, natural language processing, machine learning, and
artificial neural networks, the study analyzes the online
reviews from TripAdvisor about tourism attractions in
Venice. The findings indicate that sentiment valence aligns
with star ratings, and there is a cancel-out effect observed in
mixed-neutral reviews between positive and negative
sentiments related to the service experience dimensions.
A recent study analyses the impact of specific attributes in
online travel reviews on cognitive, affective, and conative
images of a destination, drawing on the elaboration likelihood
model and the cognitive-affective-conative model of
destination image. Using an experimental survey design with
four scenarios, the study explores the effects of high versus
low star ratings on the perception of Santa Claus Village,
Finland. The findings indicate that high-rating reviews
primarily influence cognitive image, while low-rating
reviews have a significant impact on affective image.
Additionally, the study reveals that reviews contribute to the
formation of destination image (Guo & Pesonen, 2022).
Several previous studies used heuristic algorithms to enhance
travel planning. (Miller & Roorda, 2003) developed an
activity scheduling microsimulation model that utilized
heuristic methods to organize activities and trip diary
information, considering the timing and duration of
household members’ activities. (Charypar & Nagel, 2005)
- 2 -
„XVII. IFFK 2023” Budapest
Online: ISBN 978-963-88875-3-5
Paper xx
Copyright 2023. Budapest, MMA.
Editor: Dr. Péter Tamás
Use Title Case for Paper Title
First A. Author, Second B. Author, Jr. Third C. Author
CAETS
További logók helye
focused on planning the daily activity chain, using a
mathematical formulation based on geometric distance
between activities in an optimization algorithm. Another
study introduced an approach combining activity-based
modeling and a genetic algorithm (GA) framework to
generate schedules for travelers using electric vehicles (EVs)
in an urban environment, demonstrating its effectiveness in
satisfying traveler needs and improving travel efficiency
(Rizopoulos & Esztergár-Kiss, 2020). (Esztergár-Kiss et al.,
2018) proposed a novel method considering flexible demand
points and transportation modes to plan and schedule activity
chains, achieving a reduction in total travel time.
Additionally, (Sabbani et al., 2019) utilized an ant colony
optimization algorithm to plan daily activity chains with
flexible mobility solutions, showing improved travel
performance by incorporating adaptability in the
transportation system.
While numerous studies have focused on trip related
optimization, considering factors, such as travel modes,
timing, and spatial constraints, the specific influence of
destination ratings on itinerary generation remains
unexplored. Therefore, this paper aims to address this
research gap by proposing a novel approach that integrates
destination ratings into the trip planning process. By
incorporating destination ratings, our study contributes to
enhancing the personalization and relevance of travel
itineraries.
2. METHODOLOGY
2.1 Optimization framework
The Traveling Salesman Problem (TSP) is a well-known
combinatorial optimization problem Hoffman et al., 2013). In
this study, we adapt the TSP framework to incorporate
destination ratings as a factor influencing the schedule of
destinations. The objective is to determine a schedule that
minimizes travel time while considering the ratings of each
destination. Given a set of destinations {a1, a2, a3, ..., an},
where each destination aj is associated with a known
destination rating R(ai) and travel time between destination
pairs T(ai, aj), the objective is to optimize the schedule. To
tackle this problem, we utilize a Genetic Algorithm (GA)
inspired by the processes of natural evolution. The GA
algorithm utilizes key concepts, such as generation, mutation,
selection, and crossover to iteratively improve the schedule
(Mirjalili, 2019). The mathematical representation of
Equation (1) is used to determine the scheduling of
destinations that minimize travel time while considering
destination ratings. Equation (2) represents a constraint that
ensures each destination is visited once by assigning a value
of 1 when the traveler moves from destination i to j, and 0
otherwise. Equation (3) accounts for the symmetric distance
between destinations.
min (1)
where:
U is the utility function that aims to minimize overall travel
time while considering the destination ratings,
T(ai, aj) represents the travel time from destination ai to aj,
R(aj) denotes the rating or attractiveness of destination aj
(2)
(3)
2.2 Flexibility in destination choice
Spatial flexibility in destination selection refers to the ability
of individuals to choose from a range of locations for their
destinations based on personal preferences and limitations.
Traditionally, planning methods apply fixed locations for
destinations, assuming that people regularly commute to the
same places. However, spatial flexibility recognizes that
individuals may choose alternative destinations that fulfill the
same purpose while offering higher levels of satisfaction or
meeting their specific preferences. Therefore, in this study we
take into account the preferences of travelers and consider
two distinct priorities:
1. Fixed destination: This concept implies that certain
destinations or destinations are associated with
specific predetermined locations. For example,
going to work or attending a specific event may
require individuals to visit a particular place.
2. Flexible destination: In this case the individuals
have the flexibility to choose alternative locations
that serve the same purpose. In other words,
individuals can select from different places that offer
similar services or amenities. This flexibility enables
individuals to consider factors, such as rating of
destination and personal preferences when deciding
on their destination.
This study identifies the importance of allowing individuals
to choose destinations that best suit their needs and
preferences by incorporating spatial flexibility of destination.
This approach accounts for the influence of the destination
ratings factor, enabling travelers to make informed decisions
that optimize their overall travel experience.
2.3 Study area
For this study, the research was conducted in the city of
Budapest. The capital of Hungary is a rich touristic
destination along the beautiful banks of the Danube River
(Mahdi & Esztergár-Kiss, 2022). The city is divided into two
main parts, Buda and Pest, connected by several iconic
bridges. Buda, situated on the western side of the river, is
known for its historic sites, while on the eastern side lies
Pest, a bustling hub of destination with wide boulevards,
vibrant neighborhoods, and culinary delights (Mahdi &
Esztergár-Kiss, 2021).
To retrieve destination ratings, a Python code was designed
to collect data from Google in July 2022 (Mahajan et al.,
2021). Using web scraping techniques, the code
automatically extracted rating information for various
- 3 -
„XVII. IFFK 2023” Budapest
Online: ISBN 978-963-88875-3-5
Paper xx
Copyright 2023. Budapest, MMA.
Editor: Dr. Péter Tamás
Use Title Case for Paper Title
First A. Author, Second B. Author, Jr. Third C. Author
CAETS
További logók helye
destinations in Budapest. The collected rating data served as
a crucial input for the GA utilized in the study. Alongside
another variable, such as travel time between destinations, the
ratings were incorporated into the algorithm to optimize the
scheduling of destinations and generate personalized travel
itineraries.
To assess the performance of the proposed algorithm, we
provide an example of the suggested destinations in Table 1.
Specifically, the Cafe destination (C1) is set as a flexible
choice, where the rating of this destination is 4.0. This allows
us to evaluate how well the algorithm adapts to various Café
type of choices and optimizes the overall itinerary according
to traveler preferences and ratings. The effectiveness of the
algorithm in generating optimized travel plans considering
the rating factor can be examined together with the flexibility
of the Cafe destination.
Table 1. An illustrative example of the suggested destinations
Name of Destination
Abbr.
Latitude
Longitude
Type
Rating
Hungarian Parliament Building
P
47.508222
19.045488
Fixed
4.8
House of Terror
T
47.507700
19.065058
Fixed
4.1
Hungarian National Museum
M
47.492417
19.062639
Fixed
4.5
Cafe
C1
47.496328
19.051134
Flexible
4.0
Hotel
H
47.501356
19.056529
Fixed
-
3. RESULTS
The results the two scenarios are evaluated in terms of the
order of visited destinations, the mode of transportation, and
the total travel time.
In the fixed scenario (Figure 1), where the Cafe (C1) was set
as a fixed destination with a rating of 4 stars, the algorithm
suggested a specific order of visiting destinations: Hungarian
Parliament Building (H-P), Parliament Building to House of
Terror (P-T), House of Terror to Hungarian National
Museum (T-M), Museum to Cafe (M-C1), and finally, Cafe
back to the hotel (C1-H). The mode of transportation used in
this scenario included Bus, Tram, and Metro. The total travel
time for this fixed scenario was 70 minutes.
Fig. 1. Optimization results for travel itinerary: fixed scenario
In the flexible scenario (Figure 2), the Cafe (C1) was
designated as a flexible destination, allowing the algorithm to
consider alternative Cafe choice. In this scenario, the
algorithm substituted the originally suggested Cafe (C1) with
an alternative location (C2), which had a rating of 4.8 stars
and was within a three-minute walk from the M destination.
The resulting order of visited destinations was Hungarian
Parliament Building (H-P), Parliament Building to House of
Terror (P-T), House of Terror to Hungarian National
Museum (T-M), Museum to the alternative Cafe (M-C2), and
finally, the alternative Cafe back to the hotel (C2-H). The
mode of transportation utilized in this scenario included Bus,
Tram, and Walking. The total travel time for this flexible
scenario was reduced to 60 minutes.
Fig. 2 Optimization results for travel itinerary: flexible
scenario
- 4 -
„XVII. IFFK 2023” Budapest
Online: ISBN 978-963-88875-3-5
Paper xx
Copyright 2023. Budapest, MMA.
Editor: Dr. Péter Tamás
Use Title Case for Paper Title
First A. Author, Second B. Author, Jr. Third C. Author
CAETS
További logók helye
The outcomes presented in Table 2 indicate that adopting
flexibility in the activity chain by substituting the Cafe
destination significantly reduced the total travel time and
considering the preference of traveler. This demonstrates the
optimization capabilities of the algorithm and highlights the
potential for improved travel efficiency through flexibility
scenarios.
Table 2. The outcomes of the three scenarios
Fixed
scenario
Order
H-P
P-T
T-M
M-C1
C1-H
Total travel time
(70 min)
Mode
Bus
Tram
Tram
Bus
Metro
Travel time
14
17
16
13
10
Flexible
scenario
Order
H-P
P-T
T-M
M-C2
C2-H
Total travel time
(60 min)
Mode
Bus
Tram
Tram
Walking
Bus
Travel time
14
17
16
3
10
4. DISCUSSION
The main objective of this study is to generate personalized
and efficient travel itineraries by incorporating destination
ratings and flexibility into the planning process. Two main
scenarios are proposed to evaluate the performance of the
algorithm. In the fixed scenario, where the Cafe (C1) was set
as a fixed destination with a rating of 4 stars, the algorithm
generated a specific order of visited destinations and
corresponding modes of transportation. The total travel time
for this fixed scenario was 70 minutes. On the other hand, in
the flexible scenario, the Cafe was set as a flexible
destination, allowing the algorithm to explore alternative
Cafe choice, where the suggested Cafe (C1) was substituted
with an alternative (C2) with a higher rating of 4.8 stars, and
located conveniently near the previous destination (M). The
total travel time was reduced to 60 minutes in the flexible
scenario. The outcomes from the flexible scenario highlight
the significant impact of incorporating destination ratings and
flexibility into the travel planning process. The algorithm was
able to achieve a substantial reduction in total travel time and
improve the travel efficiency for the traveler.
This finding is consistent with the literature review, which
emphasized the importance of destination ratings and online
reviews in shaping travelers’ perceptions and decision-
making (Terttunen, 2017; Miguéns et al., 2008; Bigne et al.,
2023; Guo & Pesonen, 2022). Moreover, the flexibility
scenario demonstrated in the study aligns with previous
research on heuristic algorithms in travel planning. The
itinerary generated becomes more customized and optimized
for the individual traveler’s needs by allowing the algorithm
to adapt and substitute destinations based on traveler
preferences and alternative options (Miller & Roorda, 2003;
Charypar & Nagel, 2005; Rizopoulos & Esztergár-Kiss,
2020; Esztergár-Kiss et al., 2018; Sabbani et al., 2019).
While the results presented in this study are promising and
indicative of the algorithm’s optimization capabilities, it is
essential to acknowledge potential limitations. The accuracy
and reliability of destination ratings and online reviews can
vary, and this may impact the algorithm’s performance in
real-world scenarios. Additionally, this study focus on only
two criteria the travel time and destination ratings. While
these two factors are essential in travel planning, they may
not fully capture the complexity of travelers’ preferences and
interests. Future studies in travel planning algorithms could
focus on integrating several factors, such as budget
constraints, specific interests, weather conditions, and
accessibility options. Additionally, the proposed system can
be applied using another algorithm, such as the Ant Colony
Optimization algorithm, which can offer new perspectives
and advantages in travel planning.
This study can be implicated in several aspects. The
integration of destination ratings in the algorithm ensures that
travelers receive recommendations based not only on inherent
attractiveness but also on subjective evaluations from
previous visitors. This leads to more informed and relevant
travel itineraries, enhancing the overall travel experience.
Additionally, the incorporation of flexibility in the itinerary
generation process allows the algorithm to serve individual
preferences and adapt to alternative choices, promoting a
higher level of personalization and satisfaction for travelers.
The benefits of these findings extend to both travelers and the
travel industry. For travelers, the algorithm offers optimized
itineraries that match their interests and save time and effort
in planning. On the other hand, for the travel industry, the
algorithm presents an opportunity to enhance customer
satisfaction and loyalty by delivering personalized and
efficient travel planning services.
5. CONCLUSION
This study focused on enhancing personalized and efficient
travel planning experiences by integrating destination ratings
and flexibility into a heuristic algorithm. The proposed
algorithm evaluates and ranks potential destinations based on
their ratings, ensuring that highly rated locations receive
higher priority during the itinerary generation. By
incorporating these ratings, the algorithm not only considers
the inherent attractiveness of the destinations but also takes
into account the subjective evaluations of previous visitors,
leading to more informed and relevant recommendations.
The results demonstrated the algorithm’s effectiveness in
generating optimized travel itineraries based on travel time
and destination ratings. Moreover, adopting flexibility by
substituting a Cafe location significantly reduced total travel
time, showing the algorithm’s capability to consider traveler
preferences and improve travel efficiency.
- 5 -
„XVII. IFFK 2023” Budapest
Online: ISBN 978-963-88875-3-5
Paper xx
Copyright 2023. Budapest, MMA.
Editor: Dr. Péter Tamás
Use Title Case for Paper Title
First A. Author, Second B. Author, Jr. Third C. Author
CAETS
További logók helye
FUNDING
This research was supported by the János Bolyai Research
Fellowship of the Hungarian Academy of Sciences
(BO/00090/21/6).
CONFLICT OF INTEREST
The authors declare no conflict of interests.
REFERENCES
Bigne, E., Ruiz, C., Perez-Cabañero, C., & Cuenca, A.
(2023). Are customer star ratings and sentiments
aligned? A deep learning study of the customer service
experience in tourism destinations. Service Business,
17(1), 281–314. DOI: 10.1007/s11628-023-00524-0
Charypar, D., & Nagel, K. (2005). Generating complete all-
day activity plans with genetic algorithms.
Transportation, 32(4), 369–397. DOI: 10.1007/s11116-
004-8287-y
Esztergár-Kiss, D., Rózsa, Z., & Tettamanti, T. (2018).
Extensions of the activity chain optimization method.
Journal of Urban Technology, 25(2), 125–142. DOI:
10.1080/10630732.2017.1407998
Gad, A. G. (2022). Particle swarm optimization algorithm
and its applications: a systematic review. Archives of
Computational Methods in Engineering, 29(5), 2531–
2561. DOI: 10.1007/s11831-021-09694-4
Guo, X., & Pesonen, J. A. (2022). The role of online travel
reviews in evolving tourists’ perceived destination
image. Scandinavian Journal of Hospitality and Tourism,
22(4–5), 372–392. DOI:
10.1080/15022250.2022.2112414
Hoffman, K. L., Padberg, M., & Rinaldi, G. (2013).
Traveling salesman problem. Encyclopedia of
Operations Research and Management Science, 1, 1573–
1578.
Mahajan, V., Cantelmo, G., & Antoniou, C. (2021).
Explaining demand patterns during COVID-19 using
opportunistic data: a case study of the city of Munich.
European Transport Research Review, 13, 1–14. DOI:
10.1186/s12544-021-00485-3
Mahdi, A., & Esztergár-Kiss, D. (2021). Modelling the
accommodation preferences of tourists by combining
fuzzy-AHP and GIS Methods. Journal of Advanced
Transportation, 2021, 1–16. DOI: 10.1155/2021/9913513
Mahdi, A., & Esztergár-Kiss, D. (2022). Robust Linear
Regression-Based GIS Technique for Modeling the
Processing Time at Tourism Destinations. In Lecture
Notes in Computer Science (including subseries Lecture
Notes in Artificial Intelligence and Lecture Notes in
Bioinformatics): Vol. 13335 LNCS. DOI: 10.1007/978-
3-031-04987-3_38
Miguéns, J., Baggio, R., & Costa, C. (2008). Social media
and tourism destinations: TripAdvisor case study.
Advances in Tourism Research, 26(28), 1–6.
Miller, E. J., & Roorda, M. J. (2003). Prototype model of
household activity-travel scheduling. Transportation
Research Record, 1831(1), 114–121. DOI:
10.3141/1831-13
Mirjalili, S. (2019). Evolutionary algorithms and neural
networks. In Studies in computational intelligence (Vol.
780). Springer.
Rizopoulos, D., & Esztergár-Kiss, D. (2020). A method for
the optimization of daily activity chains including
electric vehicles. Energies, 13(4), 906. DOI:
10.3390/en13040906
Sabbani, I., Omar, B., & Eszetergar-Kiss, D. (2019).
Simulation results for a daily activity chain optimization
method based on ant colony algorithm with time
windows. Simulation, 10(1), 425–430. DOI:
10.14569/IJACSA.2019.0100156
Terttunen, A. (2017). The influence of Instagram on
consumers’ travel planning and destination choice. DOI:
10.5937/EJAE19-33584
Xiang, Z., Magnini, V. P., & Fesenmaier, D. R. (2015).
Information technology and consumer behavior in travel
and tourism: Insights from travel planning using the
internet. Journal of Retailing and Consumer Services, 22,
244–249. DOI: 10.1016/j.jretconser.2014.08.005