A Star (A*) Algorithm Implementation to Measure Shortest Distance from Universitas Negeri Medan to Kualanamu International Airport

Searching for the shortest path is a problem that often occurs in everyday life, to determine the best distance some information is needed such as the value / cost between points to be visited. The A* (A Star) algorithm is one of the optimal algorithms in the shortest path search category. This algorithm is very good as a solution to the pathfinding process so that it can save time and money. This research was conducted to determine the shortest distance from Medan State University to Kualanamu International Airport using the A* (A Star) algorithm. The method used in this study is by collecting data using Google Maps, building a graph model as a map representation, calculating the shortest distance and evaluating it. The research results obtained show the accuracy of the A* algorithm in determining the shortest route from Medan State University to Kualanamu Airport where this can save time and money on the way.


INTRODUCTION
Kualanamu Airport is the second-largest international airport in Indonesia after Soekarno-Hatta International Airport (Permatasari, 2017).It is located in Deli Serdang Regency, North Sumatra.To optimize the airport, various transportation facilities have been prepared to provide access to and from the airport (Hamzawi, 1992), such as the airport train, the construction of toll roads, and improvements to public roads for private vehicles, taxis, and shuttle buses.
The strategic location of Kualanamu Airport, combined with the high travel activities of the community, contributes to a significant number of passengers, especially domestic travelers, both departing and arriving (Sihombing et al., 2022).In 2023, it is predicted that there will be 3,527,194 domestic passengers entering and leaving Kualanamu Airport.One of the districts in Medan city that has a high level of airport-related activities is Medan Tuntungan District.This is because the district houses many offices and educational institutions, including Universitas Negeri Medan.The distance from Universitas Negeri Medan to Kualanamu Airport is approximately 22.8 km.The actual distance is not a straight line but involves various alternative routes with multiple junctions to determine the shortest route (Byme, 1979;Hanan, 1966).In the process of object movement, finding the shortest path between source and destination points can save time and cost (Taufiq et al., 2019).Currently, determining the nearest route is widely applied and used in various applications like Google Maps (Al Hakim et al., 2022).
In the process of determining the nearest route, there are two main steps: labeling and node exploration or traversal.The most optimal node exploration process can be achieved using algorithms such as A* (A Star) (AlShawi et al., 2012) .A* (A Star) is an optimal route search algorithm that minimizes the cost from the starting point to the destination point (Budiman et al., 2018).Optimal means that the resulting route is the best route, indicating that the algorithm can reach the desired goal.In its implementation, A* (A Star) utilizes distance calculations to obtain the best path.This background knowledge supports research on the use of the A* (A Star) algorithm to determine the shortest route from Universitas Negeri Medan to Kualanamu International Airport.

METHODS
At this stage there are several stages that will be carried out, namely the stages of collecting data, modeling, calculating the A* algorithm, and evaluation.See Figure 1.

Data Collection
The data collection was carried out by extracting information through Google Maps.
Google Maps provides numerous open-source features and can be utilized to determine distances between points on a map landscape (Aisa, 2021).One of the data types utilized in this research consists of photographic images depicting route options and intersections from the starting point at Universitas Negeri Medan to the destination point, Bandara Kualanamu.See Figure 2.

Modelling
Once the image data depicting the route from Universitas Negeri Medan to Bandara Kualanamu is obtained, it is further processed using graph modelling.Graphs can be employed to represent the relationships between various points on a map by assigning weights to the connections between these points, thereby enabling optimization problem solving (Farisi, 2021).The resulting graph model representing the route from Universitas Negeri Medan to Bandara Kualanamu can be observed See Figure 3.

A* (A Star) Algorithm
The A* (A Star) algorithm is a search algorithm used to find the shortest path between a start and end point.It is widely employed in map exploration to discover the optimal path to be taken (Schmid et al., 2020).A* utilizes the Best First Search (BFS) to find the path with the smallest cost/weight, and it incorporates heuristic values as parameters (Apuroop et al., 2021;  Lai and Chambers, 2021).Heuristic refers to the actual straight-line distance from the start point to the destination (Huang et al., 2007).The A* algorithm combines the g(n) value, which represents the cost/weight accumulated from the start point to the next point, with the h(n) value, which represents the heuristic value (Mustaqoy dan Megawaty, 2020).This can be expressed mathematically as follows: () = () + ℎ() 1. f(n) is the sum of g(n) and h(n).It represents an estimated shortest path so far.f(n) is the actual shortest path that has not been explored until the A* algorithm is completed (Cui and Shi, 2011).2. g(n)/Geographical Cost is the total distance obtained from the start vertex to the current vertex (so far).3. h(n)/Heuristic Cost is the estimated distance from the current vertex (being visited) to the goal vertex (Yu and LaValle, 2016).A heuristic function is used to estimate how far the path will be taken to the goal vertex.

Heuristic Value Determination
Using the features and information contained in Google Maps by drawing a straight line at each point to the destination node, the heuristic value is then obtained as follows Figure 4: The results of recording the heuristic value at all points contained in the graph can be seen in Table 1.This heuristic value will then be used in the graph search process using the A* (A Star) algorithm (Yang, 2008).

Determining Shortest Route
At this stage, the shortest route is then taken by summing the value of g (n) with the value of h (n) See Table 2   Yang, C., Tian, S., and Long, B. (2008)

Figure 2 .
Figure 2. The route from Unimed to Kualanamu Airport using Google Maps

Figure 4 .
Figure 4. Determining Heuristic Value shortest distance, we calculate the distance and heuristic value by adding the distance from the start point to the destination point and the heuristic value of the destination point.After calculation, the distance values for each node are as follows: Point A to point B: 1,313 m.Point B to point C: 647 m.Point C to point E: 3,290 m.Point E to point F: 1,966 m.Point F to point G: 2,890 m.Point G to point H: 803 m.Point H to point J: 3,380 m.Point J to point K: 2,000 m.Point K to point L: 3,410 m.Point L to point M: 2,470 m.Point M to point O: 6,810 m.Point O to point P: 5,110 m.Point P to point N: 8,170 m. p-ISSN 2774-1656 e-ISSN 2774-1699 Issue 1, June 2023 Hal 13-22 DOI: https://doi.org/10.17509/seict.v4i1.59213p-ISSN 2775-1656 e-ISSN 2775-1699

Table 1 .
Heuristic value every point on graph.