Optimalization Route to Tourism Places in West Java Using A-STAR Algorithm

Indonesia has many tourism places, one of which is West Java Province. Tourist places in West Java Province are scattered in various regions, then many roads can be passed by tourists to reach these tourist places. West Java also has a complex route; therefore, an optimal route is needed to pass the complex route to tourism places in West Java Province. Based on these problems, the algorithm used is the A-STAR Algorithm. The purpose of this research is to use the A-STAR Algorithm to find the optimal route to tourism places which is influenced by distance and traffic density. The steps taken are to describe all the main lines in West Java into a graph, then process the data that has been obtained from several government agencies in the province of West Java so that it can be solved using the A-STAR Algorithm. The results of the calculation of the A-STAR Algorithm can produce an optimal route. By using the help of python, the optimal route to tourism in the Province of West Java can be obtained. This optimal route can help tourists to go to tourism places with the shortest distance in the province of West Java.


INTRODUCTION
Tourism is a variety of tourism activities and is supported by various facilities and services provided by the community, businessmen, government, and local governments. Each region throughout Indonesia has a variety of diversity and uniqueness of each, the province of West Java is one of them. West Java Province has tourism spots scattered in each district and city. This province has all the potential of mountains, seas, beaches, rice fields, valleys, waterfalls, and local wisdom. West Java Province has a complex route one of them is traffic density, where the route is one of the tools used to reach tourism places.
Optimal route search has been widely applied to various navigation applications. The process of finding the optimal route finding the smallest cost or value of a route from the starting nodes to the destination nodes. Optimal route search techniques that are often used are; blind search and heuristic search. Blind search is easier to understand than heuristic search, but the solution search time is faster and the results obtained are more varied than the heuristic search [1]. One of the optimal route search algorithms using heuristic search is the A-STAR Algorithm. This algorithm is a planning method that can be applied to situations where information about the global environment has been obtained and also has a heuristic value that can be used as a basis for consideration [2], [3].
Several previous studies have discussed finding the optimal route using the A-STAR Algorithm. Research and testing on the application of finding the closest culinary route in Bandar Lampung, it was concluded that the tests carried out on the algorithm manually and the application got valid results with the same distance [4]. Determining the best route can be done with the A-STAR Algorithm, this simulation determines the starting nodes to the end nodes with the obstacles given in each route and gets the best route compared to other routes [1]. The search for the closest route between hospitals in Samarinda is obtained using the A-STAR Algorithm [2]. The A-STAR algorithm generates the shortest path for making roguelike games in the process of pursuing enemies against the player character. [5]. semi-optimized crane placement and configuration in a modular construction was successful in resulting in significant total cost reductions compared to lift planning algorithms [6].
Based on the description above, the motivation for this research is to use the A-STAR Algorithm to find the optimal route which is affected by the distance and road density to tourist places in West Java Province. The parameter that is used to obtain the optimal route is the distance unit, with the use of four-wheeled vehicles. The road used in the study is a two-way road.

METHODS
The method used in this research is the A-STAR Algorithm. In finding the shortest route with this algorithm, the route is drawn using a graph. In this graph, each edge has two values, namely the weight value, and the heuristic value. Then the A-STAR Algorithm calculates the weight value at the th node plus the heuristic value at the th node. After that, the algorithm calculates the weight value of the − 1 node to the th node plus the heuristic value of the th node until it reaches the destination node. When the optimal value has been obtained, the algorithm performs a callback to call the route that has been passed or can be referred to as the optimal route.

Graph
A graph is a configuration of edge pairs and vertices. Many things can be represented as a graph, for example, a highway as an edge and a bus station as a node [7] A linear graph or graph = ( , ) consists of a non-empty set of = { 1 , 2 , 3 , … } called vertices or nodes, and the set = { 1 , 2 , 3 , … } called edge that connects a pair of vertices [8]. A graph is called connected if every node of the graph has a path connecting the two vertices, or it can be said to be connected if a node and there is at least one edge [9]. If e is an edge, then = ( , ) where and are different elements of . Edge = ( , ) is a pair of vertices and vertices , for an undirected graph, can also be denoted as or [1]. Graphs can be implemented for optimal route finding. Intersections, starting nodes, and ending nodes are represented as vertices. Then, the length of the road segment is represented as an edge.

Shortest Path Problem
The shortest route problem is a problem to find a path between two or more vertices in a weighted graph, the weight sought is the weight of the smallest edge that traversed [2], [10]. The shortest route problem is an optimization problem that uses a weighted graph, where the weights can represent the distance between cities, delivery times, travel costs, and so on [10]. The shortest route obtained will optimize a special linear function of the route in the form of distance, time, and or costs that will be faced during the trip [9]. The shortest route problem can be applied to both directed and undirected graphs [11]. Several kinds of shortest path problems, among others; Search for the shortest path between two nodes, search for the shortest path between all pairs of nodes, search for the shortest path from a certain node to all other nodes, and search for the shortest path between two nodes that pass through certain nodes [8].

Decision Tree
A tree in Discrete Mathematics means an undirected graph that is connected and does not contain circuits [12]. A tree has many applications such as; expression tree, binary search tree, prefix code, Huffman code, and decision tree [12].
Decision trees have many advantages in modeling optimization problems, including; being easy to interpret, easy to understand, allowing for exploring all possibilities, more accurate in terms of modeling, and complex decision-making can be changed to be simpler [12].

A-STAR Algorithm
Optimal route-finding algorithms have played many important roles in various scientific disciplines such as cybernetics, satellite navigation systems for vehicles on highways, vehicle path planning, and robotic path planning [6]. The A-STAR Algorithm is the best first search algorithm because it modifies the heuristic value, this algorithm minimizes the total cost of the path and under the right conditions can provide the best solution with optimal time [13]. In 1968 Peter Hart, Nils Nilsson, and Bertram Raphael of the Stanford Research Institute described the A-STAR Algorithm for the first time. The algorithm is an extension of Dijkstra's Algorithm which produces better time performance by using heuristic values [14].
The heuristic function contained in the A-STAR Algorithm to calculate the estimated value of a node that has been traversed is [15].
( ) = ( ) + ( ) (1) where ( ): total estimated cost ( ): cost from starting node to th node ( ): estimated cost to arrive at a destination from the n-th node The A-STAR Algorithm uses two list, namely OPEN and CLOSED. OPEN is a list that is used to store nodes/vertices that have been calculated and their heuristic values have also been calculated but have not been selected as the best node ( ( )). In other words, the list contains nodes that still have a chance to be selected as the best node. CLOSED is a list to store the nodes that have been calculated and have been selected as the best node ( ( )). In other words, the opportunity to be selected from the nodes in CLOSED does not exist (Dalem, 2018). In the A-STAR Algorithm, the value of each iteration of the OPEN list is compared and the smallest value is selected. Then the value of the next OPEN list is calculated and then compared with other ( ) values. When the value of ( ) is the smallest and there is a destination node, then the iteration stops.

Case Study
The A-STAR Algorithm can be used when the processed data has a heuristic value which is a benchmark for calculations in the algorithm. In this study, the data were secondary data obtained from several related Departement in the Province of West Java. The data used are as follows: 2016 track distance data from the Department of Spatial Planning; 2016 provincial traffic density data from the Department of Transportation; and 2019 tourism places data from the Department of Tourism and Culture. The form of data obtained is data on distances between provincial boundaries, the road ends, and intersections. The data can be seen at the link https://bit.ly/3oiddGc. between each node obtained with the help of Google Maps. If the toll road is considered unimpeded, then the lane is considered to have 0 density value. Figure 1 contains 239 nodes stating: provincial boundaries; road boundaries; intersections; and tourism in West Java Province A total of 208 nodes are: provincial boundaries; road boundaries; and intersections. Furthermore, there are 43 tourism places adjacent to the main route in West Java Province. Then the tourism place is drawn by passing the nearest route (regency/city road or village road) so that the node that states the tourism place is located on the main route. However, among the 43 nodes resulting from the withdrawal of the tourism sites, there are 11 nodes adjacent to the provincial boundary nodes, road boundaries, and intersections. Thus, 11 of the 208 nodes were converted into tourism nodes, and 32 other tourism nodes were added. Apart from the 43 tourism places nodes, the rest of the nodes are used as starting nodes. Complete data related to road names, calculating distances and density values of the 239 interrelated nodes can be seen in full at the link https://bit.ly/3oiddGc.  Table 1 describes two names of tourism places given from each city/regency in West Java Province.

Numeric Result
How to calculate the A-STAR Algorithm is done as in the example below:   The flow used by A-STAR Algorithm starts with the initial node initiation into the OPEN list then the Current Node (the current node) is made the Best Node ( score). As long as the Current Node is not the destination node, then move the Current Node into the CLOSED list. Then calculate and compare the score values of all OPEN lists. After the Current Node with the smallest score value is the destination node, then the iteration is stopped and performs a backtrack to display the route.
Python is used to help find the Optimal Route by using Equation (1) where ( ) is the total distance value, ( ) is the distance from the starting node to the nth node, and ( ) is a heuristic estimate of traffic density between nodes. Numerical is done by finding the optimal route which is the optimal distance and the route traversed by the A-STAR Algorithm. The initial node used is the southwest node of West Java Province in Sukabumi Regency (node a), with the destination node being 43 Tourism Places nodes. The route column in Table 2 is depicted with symbols representing provincial boundary nodes; road boundaries; and intersections. between these nodes is the name of the road traversed by the optimal route generated from the A-STAR Algorithm. Full data on the road can be seen at the link https://bit.ly/3oiddGc. Based on Table 3 for the tourism destination of Curug Bibijilan (node a1), the optimal route chosen is a, b, c, a1. In other words, the route it takes is Jl. Raya Ciracap -Jl. Surade -Tegalbuleud -Jl. Sagaranten -Cidolog -Curug Bibijilan with a route distance of 128.36 km. All search results for the optimal route along with the road names from each point can be seen at the link https://bit.ly/3oiddGc. Based on these numerical results, the conclusion that can be drawn is that optimizing the route to tourism in West Java using the A-STAR Algorithm can produce an optimal route. In particular, it can be concluded that the search for optimal routes that are affected by Distance and Traffic Density can be solved by the A-STAR Algorithm.

CONCLUSIONS
Based on the research, the A-STAR Algorithm can be used when information about the distance and traffic density has been obtained. In this case, traffic density becomes a heuristic value that can be used as a basis for consideration. It can be concluded that the optimal route which is affected by the distance and traffic density can be found using the A-STAR Algorithm. This research can also help tourists to get through the most optimal route to tourism places in West Java Province.