Travel route scheduling based on user’s preferences using simulated annealing

Nowadays, traveling has become a routine activity for many people, so that many researchers have developed studies in the tourism domain, especially for the determination of tourist routes. Based on prior work, the problem of determining travel route is analogous to ﬁnding the solution for travelling salesman problem (TSP). However, the majority of works only dealt with generating the travel route within one day and also did not take into account several user’s preference criteria. This paper proposes a model for generating a travel route schedule within a few days


INTRODUCTION
These days, travelling has become a daily need for people, especially during holidays.On most cases, tourist will try to visit new tourism places they never visit before [1].Therefore, plenty of tourists want to visit that places for several days.So, the tourists need to plan their travel.Usually, tourists have travel agent to plan the travel schedule and guide their trip.
There are many studies that develop the systems that are able to replace travel agent, specifically on deciding which destination suits the user's need, as well as determining travel route.This system evolved as a recommender system, capable of recommending tourism destination and travel routes.The travel routes are generated based on its opening hours and visiting duration [2].However, the model in the determination of the travel route can only accommodate one-day visit time.Vansteenwegen et al utilize Greedy Randomized Adaptive Search Procedure (GARSP) to develop City Trop Planner for planning route 5 cities in Belgium [3].Form that research, the model created is able to schedule a travel route for several days with constraints such as open hours on and rest periods i.e. lunch.However, the selection of that route scheduling is only based on travel time, whereas in the real world, tourists choose tourism destinations based on many criteria, such as popularity, the reviews on those destinations, entry fee and so forth.
In many works, the problem of determining travel route is similar to finding the solution from the Traveling Salesman Problem (TSP) .TSP is a problem where a salesman must visit each node exactly once with optimal time where the start node and the end node are the same node.In a travel route, TSP can be Ì ISSN: 2088-8708 analogous to visiting tourist attractions exactly once in one day where the start and end node is the tourist's lodge.There are plenty of algorithms which can be implemented to solve TSP, i.e.,Genetic Algorithm (GA) [4], Simulated Annealing (SA) [5], Taboo Search [6], Particle Swarm Optimization [7], Harmony Search [8], Quantum Annealing [9], Ant Colony optimalization (ACO) [10], neural network [11] and so on.We use Simulated Annealing algorithm (SA) to generate travel route schedule, because SA is an algorithm with the best travel solution quality based on 3 aspects: mean value, standard deviation, running time [12].Simulated Annealing is a method to find the solution of combinatorial problem [13,14], developed from Metropolish algorithm, which is an algorithm for solving problems in the field of physics.The Metropolish algorithm was developed around 1940's, utilizing the Monte Carlo simulation process [15].Simulated Annealing works by taking behavioral analogy in physics process, particularly the process of freezing or annealing.This process starts when the temperature of the liquid object is still high and then the temperature is slowly lowered to a specified temperature.If the temperature is done drastically, it will end bad.
The majority of the previous researches developed a model of determining of travel routes in one day and did not accommodate tourist's preferences of the desired routes, which probably involve multiple criteria.This paper proposes a model by adopting Simulated Annealing method, to generate a travel route schedule within several days, taking into account the three criteria of tourist's needs: 1).Tourists want to visit as many attractions as possible within a few days, 2) tourists want to visit the popular destinations, 3) tourists want a travel route that minimizes the budget.Thus, the problem of determining the travel route is seen as a multi-criteria problem.To solve the multi-criteria problem, we utilize the concept of multi attribute utility theory (MAUT).MAUT is a method which is frequently used for evaluating products based on the value of weight and utilities of some criteria/attributes [16] The weight of each criterion is obtained based on degree of interest (DOI) of users.DOI is a user degree of interest for each criterion, with the interval [0,1].Travel route schedule determination also considers some constraints, which are: 1) travel time limits per day, 2) opening/closing hours, and 3) the average amount of visit time for each destination.This research is one part of our research project, to develop a conversation-based recommender system in the tourism domain.The system will recommend tourist destinations as well as recommend a tour route based on explicitly stated user needs.This research is one part of our research project, to develop a conversation-based recommender system in the tourism domain.The system will recommend tourist destinations as well as recommend a tour route based on explicitly stated user needs.The system generates conversation by utilizing the concept of semantic reasoning [17,18,19] 2.
THE SYSTEM OVERVIEW The system is able to recommend travel route schedule based on user preferences.The proposed model generates the travel route schedule which is based on Simulated Annealing algorithm.1 shows the system overview.Generally, the steps in generating travel route schedule are as follow: 1. User provides : The hotel or the lodge where the user stays.(c) DOI (degree of Interest) DOI is the user degree of interest to each criterion, as a form of user preferences.The system accommodates 3 different criteria of needs, which are: 1) tourist want to visit as many places as possible within a few days (routes are based on travel time), 2) tourist want to visit popular destinations (routes based on rating), 3) tourists want a travel route that minimized the budget (routes based on tariff).The value of DOI is between the interval of [0,1].
2. System performs optimal route search with Simulated Annealing algorithm.At this stage, system retrieves the destination data and time matrix data from database, for the calculation of fitness value.

3.
Once the optimal route is obtained, then the system performs the scheduling process using the accumulated travel time and the duration of visits on each tourist destination.

SIMULATED ANNEALING FOR ROUTE SCHEDULING
Basically, the determination of travel route can be viewed as a problem to find the solution for TSP.Generally, the optimal TSP route is determined based on the time or nearest distance.This research proposes a model to generate travel route schedule (TSP) based on 3 criteria (multi criteria).As discussed in section 2, these three criteria can be considered as parameters for route determination, which are: 1).Travel time, 2).Rating, 3).The price of each tourist destination.The time travel is taken from Google Maps, taking the typical time instead of real time, since tourists can plan the tours in advance.In addition, there is also checking for constraints such as opening and closing hours on each accumulation of each tourist destination schedule and the maximum time of tourist visits in one day.The steps of determining travel route are as follow:

Parameter Initialization
Some of the initialized Simulated Annealing parameters are: initial temperature, cooling rate, stopping temperature.The parameters are used to determine the number of iteration in the annealing process.At the stage of parameter initialization, the parameters used are taken by experiment.

(a) The Initialization of The First (tour) Solution
In this stage, the system will generate initial (tour) solution.The initial generation of tour can be done by making tour randomly.
(b) The Formation of New Tour (Solution) The formation of new tour (solution) as the candidate for the solution.This new solution can be a better solution than the previous solution.For the formation of a new (tour) solution, the system uses the swapping mutation method.Swapping mutation is done by selecting 2 nodes randomly from the previous solution.After that, the nodes are reversed to generate a new (tour) solution.Here's an illustration of generating a new tour (solution).
• Solution before 1 2 4 5 3 After two (tour) solutions obtained, its total time will be accumulated to obtain the tourist route per day.Each tour visit begins and ends at the hotel selected by user.Every day, the tour begins at 08.00 until 20.00.To determine the travel route per day, the system checks the schedule of the opening and closing hours each destination.The algorithm for time accumulation is explained in Algorithm 1.
Algorithm 1 AcumulateTime (solution) input: solution, output: perDaySolution The steps in algorithm 1 can be explained as follows, • If the known (tour) solution is as follow, With the open and close hours are shown in Table where, AT Table 2 shows the time accumulation of each tourist destination in the range solution.Range solution is the number of tourist destination, then at each accumulated destination, the system checks the opening and closing hours according to Table 1.Because the 4 th node exceeds the closing time, then 1 2 4 5 3 7 6 8 The node will be saved for the next day route, then the scheduling continues to the next node until the time constraint is met.Time constraint has the value of "true" when the time range is between 08.00-20.00(in accordance with the time limit of tourist visits in 1 day).Based on the accumulation of time, the results of the tour in one day can be seen in Table 3.

• Fitness Value Calculation
The fitness value in Simulated Annealing, commonly referred to energy [20].The calculation of fitness value aims for the selection of the (tour) solution, so that the best solution can be determined.In this research, optimized tour search is done by two kinds of fitness value calculation: a Based on single criteria (travel time).The calculation of fitness value only uses a single criterion, which is travel time.The fitness value calculation can be formulated with the following equation:  The fitness value calculated by using Multi Attribute Utility Theory (MAUT) method, including travel time, rating and fare of each tourist destination.The fitness value can be formulated as follows, where, w 1 = weight of travel time w 2 = weight of rating w 3 = weight of fare The definitions for time(X) is provided in Eq. 2, while rating(X) and tarif f (X) are provided in Eq. 5 and 6, respectively.In this case, normalization is required in determining duration(a, b) as defined in Eq. 4 where n min duration is the minimum value duration and max duration refers to the maximum value of duration.The fitness value which is formulated based on the popularity rating is formulated as follows, Where n is the length of the solution.As for the fitness value which is based on tariff, the formulation is as follows, where n is the length of the solution.Normalization operations for rating(X) and tarif f (X) are performed as the same as that of duration(a, b).
• Acceptance Probability Calculation After the fitness value from the new (tour) solution is obtained, we have to checks whether the new (tour) solution is a better (tour) than previous solution by this acceptance probability.The algorithm to determine the best solution candidate is shown in Algorithm 2 [21].

5:
end if 6: end ifreturn solution; The function of acceptance probability can be formulated as follows [22] P accept (S(i), S(i − 1)) • Temperature decrease item The each iteration is done to decrease the temperature value.The common way to decrease this temperature is the geometric cooling schedule [21].Formally, the temperature drop can be formulated as follows, where T is temperature and coolingrate is a constant for the decrease in the Simulated Annealing algorithm The iteration is complete if the temperature value is less than the stopping temperature.Based on this iteration, we get a solution (tour) that will be taken as a tourist route in one day.

EVALUATION
For evaluation, we have to determine the best parameters of the simulated annealing algorithm, such as temperature T , cooling rate α, and stopping temperature.We conduct some tests for it, by combining those parameters.For each combination, a trial was done 10 times to get the test results.
Table 4 shows the result of the parameter test with predetermined interval value.The best parameter combination is determined from the total node, running time, and total days.Based on table 4, we notice that the best combination is temperature = 15000, cooling rate = 0.99, and stopping temperature = 0.0002.After obtaining the best parameters, then those parameters will be used on system performance testing.We evaluate the system by considering two aspects; performance test and running time test.The results of the proposed model will be compared with the results of the ant colony optimization algorithm, in our previous work [23].The performance test use single criterion (time) and multi criteria (time, rating, fare).We involve 28 tourist destination.This test is done in 10 trials.The performance is determined by the optimum aspect of the travel route resulted and also the running time.

Travel Tour Optimality Test 4.1.1. The Optimality Based on Number of Tourist Places (Nodes) in Tour
Figure 3 shows the test results based on the number of nodes (tourist destinations) in a tour using a single criterion (travel time) approach.For the input nodes 2 to 7 nodes, we notice that there are no difference performance for both algorithm.Meanwhile, input nodes 8 through 21 using the Ant Colony algorithm, produce more nodes in the tour, compared to Simulated Annealing algorithm.But for many input nodes (22 to 27), the number of nodes in tour for the Simulated Annealing algorithm has better results than the Ant Colony algorithm.
Figure 4 shows the test results based on the number of nodes in best tour using multi criteria approach.It can be seen that these results do not have a significant difference with the results obtained from the single criterion approach.The Ant Colony algorithm has better results when the input nodes are 8 to 21, while the Simulated Annealing algorithm has better results with input nodes of 22 to 27.Based on both test results, we notice that: 1) the number of nodes in tour, no significant trend differences between single criterion and multi criteria approach, 2) For a small number of input nodes, Ant Colony is superior, however for the larger number of input nodes (in this case is over 22 nodes), the model proposed using Simulated Annealing is better in terms of optimality.

The Optimality Based on the Amount of Visit Days
Optimality test based on the amount of days of tourist visit by using single criteria approach, is shown by Figure 5.It shows that the result of Simulated Annealing algorithm has no significant difference to the Ant Colony algorithm.The difference occurs only in the number of input nodes of 7, where the Simulated Annealing algorithm has slightly better results.Figure 6 shows the test results based on the number of tourist visits by multi criteria.It can be seen that there is no significant difference between the Simulated Annealing algorithm and the Ant Colony algorithm.The only difference is, for the number of input node is 7, the Ant Colony algorithm has slightly better results, which is the 7 nodes are visited in an average of 2 days, while the Simulated Annealing with the average of 3 days.However, with these 2 test results, it can be noticed that the performance of the proposed model using the Simulated Annealing algorithm is no different from the model using Ant Colony algorithm.In addition, referring to Figure 5 and 6, we also notice that there is a slight difference in the number of days recommended, especially in the total input of 8 nodes.Meanwhile, in the other total input nodes, the recommended number of days is the same.

Running Time Test
Figure 7 shows the result of running time testing using single criterion approach.For a small number of input nodes, Simulated Annealing model has a slower running time, whereas when the number of input nodes is larger, the model with the Simulated Annealing Model has faster running time compare to Ant Colony model.
The running time test for the multi-criteria approach is shown in Figure 8.We notice that this result has no significant difference from the result that used a single criterion.In the test for a small number of nodes, Simulated Annealing has a longer time running, whereas when the number of total input nodes is large, Simulated Annealing has faster running time compared to the Ant Colony algorithm.

CONCLUSION
Based on the result of performance test, it can be concluded that there is no significant difference performance (i.e.optimality and running time), between travel tour with single criterion and multi-criteria approach.Thus, determining the travel route based on multi-criteria user preferences that covers: 1) Tourists want to visit as many tourist attractions as possible within several days, 2) Tourists want to visit the popular tourist destinations, and 3) Tourists want a travel route that can minimize the budget, can be implemented without interfering on the performance.
From the optimality aspect, it can be concluded that Simulated Annealing is able to schedule a travel route with good For the input nodes that has the same number as the number of tours, it will relatively have similar results, this is due to the limit of the number of days so that the number of tourist destinations visited have a relatively equal number.Likewise, on the length of running time with the high number of input nodes, it does not have a significant difference due to the number of nodes obtained relatively the same, so that the fitness value calculation that affects the running time has the same relative results.
From the comparison of test results to Ant Colony algorithm, the result of the number of tours in the route using Simulated Annealing has a better result for the case on the large amount of data input.This is because the combination of candidate solutions produced has a wide range of variety.After that, if it is viewed from the running time of Simulated Annealing on the case of scheduling the travel route, on the average it has faster running time than the Ant Colony algorithm.

6.
(a) Travel DestinationsUser is given the opportunity to choose the desired travel destination.(b) Hotel

Figure 1 .
Figure 1.The Overview of the System

Ì ISSN: 2088- 8708 Figure 2 .
Figure 2. The steps of generating travel route schedule i])= the arrival time on ith destination.F T (node[i])= the finished time on ith destination.T (a, b)= time travel between two tourist destination from point A to point B. Illustrated as follows: X= The travel tour solution of x 1 , x 2 , ..., x n .T ime(X)= Fitness value based on travel time n = Length of node or tour x i = The ith node/tourist spot Duration(a, b)= Trip duration from node a to b b Based on multi criteria (time, rating, and fare)

Int
accept = The acceptance probability function to obtain the best solution candidate T = Temperature.S(i) = Solution gained on iteration-i ∆S = F (S(i − 1)) − F (S(i))

Table 1 .
The opening and closing hours of each destination .• Time CalculationThe time displayed in the scheduling is the time range from arrival time until finish of each tourist Int J Elec & Comp Eng, Vol. 9, No. 2, April 2019 : 1275 -1287

Table 2 .
The result of time accumulation of each destination