Determination of the Medical Equipment Delivery Route for PT Tri Sapta Jaya Using Simulated Annealing (SA) Algorithm

This research was conducted at PT Tri Sapta Jaya, a medical equipment distributor company. The product distribution to consumers was inefficient due to using traditional methods. The division of regions and determination of delivery routes was based on districts and cities. The existing delivery method faced various challenges, including delivery delays and inefficient routes. This inefficiency results in potential financial losses for the company in terms of delivery costs. To assist the company in improving delivery efficiency, this research focuses on determining vehicle routes considering vehicle capacity (Capacity Vehicle Routing Problem). In solving and searching for solutions, the research uses Simulated-Annealing algorithm. The algorithm generated an initial solution randomly and improved the solution by changing the positions of consumers within a route and switching positions of consumers between routes to obtain the best solution. The computation time of the developed Simulated Annealing algorithm was quite efficient, taking only 2 seconds for 25 consumers. Based on the data from PT Tri Sapta Jaya, the best solution obtained was 615,319. This result was achieved using the Simulated Annealing algorithm with the parameters T0 = 100,000, Ta = 1, and α = 0.9.


Introduction
In a company, the role of distribution and transportation is important (Martens et al., 2012).One of the roles of distribution and transportation is to ensure goods/products reach consumers.It is important for companies to ensure distribution and transportation performance in order to provide excellent service to consumers.An assessment of distribution and transportation performance needs to be carried out to see delivery efficiency.There are five delivery performance criteria, namely delivery time, delivery accuracy, delivery costs, delivery quality and delivery availability (Meier et al., 2013).However, not all of the five delivery performance criteria have the same level of importance for each company.Delivery time performance criteria, for example, are the most important thing for companies operating in the pharmaceutical sector such as PT Tri Sapta Jaya.
PT Tri Sapta Jaya is a pharmaceutical distributor of medicines and medical devices.This company is a distributor that supplies medicinal products and medical devices to pharmacies, clinics and hospitals.In the delivery process, the company determines delivery routes based on district and city areas (geographical regions).The distribution of delivery routes taking into account geographical areas causes the delivery process to be inefficient.There are two main losses that a company can experience due to an inefficient delivery process, firstly the costs incurred will be higher due to the longer total journey, and secondly there is the possibility of delays occurring which could damage the company's image (Guiffrida & Nagi, 2006), apart from that the accuracy of equipment delivery Health care is very necessary because it relates to the level of health services and affects the accuracy of patient treatment.One example is when the high number of COVID-19 cases that have occurred has caused demand for health goods and services to increase (Rizal & Saidatuningtyas, 2021), that is when timely delivery of medical equipment is needed.The process of sending medical devices from one source to several consumer points is known as the Vehicle Routing Problem (VRP) (Redi et al., 2020).

Literature Review
This VRP model has experienced development by having many variants developed based on real cases in real life.There are five main VRP variants developed by researchers, namely, first is Stochastic Vehicle Routing Problem (SVRP) (Gendreau et al., 2016), second is Periodic Vehicle Routing Problem (PVRP) (Archetti et al., 2017), third is Split Delivery Vehicle Routing Problem (SDVRP) (Bianchessi et al., 2019), fourth Multi-Depot Vehicle Routing Problem (MDVRP) (Lalla-Ruiz & Voß, 2020) and its variant Capacity Vehicle Routing Problem (CVRP) (Redi et al., 2020).Based on literature studies, the problems at PT Tri Sapta Jaya fall into the CVRP category because in the delivery process PT Tri Sapta Jaya has vehicles with limited capacity.What is different about the problem in this research is that the capacity of the vehicles at PT Tri Sapta Jaya is different (heterogeneous), not homogeneous as in the case of CVRP in general.
CVRP research has been carried out by many other researchers with various study systems.Several CVRP studies have been developed, for example to determine delivery routes for raw materials to manufacturers (Dassisti et al., 2017), to solve basic material distribution problems (Andriansyah et al., 2020), for distribution of pharmaceutical deliveries (Redi et al., 2020), and CVRP by considering fuel as a constraint in determining the route (Normasari et al., 2019).Apart from research developments on this CVRP variant, there is also a lot of research that focuses on developing solution search algorithms.This is because the CVRP problem is classified as a Mixed Integer Linear Programing (MILP) problem.The MILP

Determination of The Medical Equipment Delivery Route for PT Tri Sapta Jaya Using Simulated Annealing (SA) Algorithm
problem requires a very long computing time so many researchers use algorithms to search for solutions (Abdel-Basset et al., 2018).

Research Method
The problem of determining vehicle routes for medical equipment requires accurate delivery times.PT Tri Sapta Jaya has several types of vehicles that have different capacities.Delivery optimization is carried out by maximizing the selection of vehicle types but still considering the timeliness of delivery.Table 1 explains the model components considered in this research.The objective function in this research is minimizing shipping costs by calculating the total travel distance and vehicle usage costs.Selecting the right vehicle capacity will result in shipping cost savings.The first decision variable to look for is the vehicle route which takes into account the timeliness of delivery which is characterized by a time window.The second decision variable is the selection of the type of vehicle based on the most efficient capacity for each route formed.To be able to calculate this model, several data parameters are needed, such as the distance between consumer locations, the demand of each consumer and the capacity of each vehicle.
Based on the model components described, the solution search is carried out using the Simulated Annealing algorithm.The SA method, which has flexibility in solving combinatorial optimization problems, was chosen to overcome complex problems.Apart from that, the SA algorithm also has an advantage in finding a solution because the iteration can be stopped as needed or when finding the optimal solution.In table 2 you can see the Simulated Annealing Pseudocode for the VRP case.*Simulated Annealing Iteration* 11.As long as the temperature (\(T\)) is greater than the final temperature: 12. Randomly select two stops and swap their positions to form a neighbouring solution. 13.Calculate the difference in objective function values between neighbouring solutions and the current solution (\(\Delta F\)).
If \(\Delta F < 0\), accept the neighbouring solution as the current solution.
**Best Solution Storage** 15.Save the best solution found during the iteration.
**Termination Criteria** 16.When the temperature (\(T\)) reaches the final temperature or the number of iterations reaches the maximum limit, end the algorithm.**Best solution** 17.The best solution found is a vehicle route that provides the minimum total distance/mileage.**Evaluation and Optimization** 18. Evaluate whether the best solution meets all criteria, such as vehicle capacity and other constraints. 19.If the solution does not meet the criteria, consider adjusting parameters or adding constraints in the objective function Searching for solutions using the SA algorithm optimizes vehicle capacity.Each vehicle will be prioritized according to its optimal capacity.
In this research, the data used is data from 25 consumers and 1 depot as a source.Every consumer has a delivery request.In Figure 1 you can see a map of consumer and depot locations.There are two types of vehicles used, namely 2 vehicles with a capacity of 1800 mini boxes and 6 vehicles with a capacity of 800 boxes.

Result and Discussion
In this research, the initial route solution is formed randomly by adding 1 consumer to the first route, if capacity is still sufficient then the next consumer will be added to the route, route 2 will be formed.When no consumers can be added due to capacity reasons and the time window requirements are met.The formation of the initial route/initial solution will be completed if all consumers have entered the route.Next, each route will see its objective value.In Figure 2 you can see an illustration of route formation where consumer k2 randomly enters the route and is followed randomly by consumers k4 and k5, because route one is full a second route is formed, this method is carried out until all routes are formed.
The second stage is to set the SA parameters with the initial temperature  0 = 100.000andfinal temperature   = 1with the rate of temperature decrease  = 0.9.The initial solution that is formed will involve random changes in consumer positions within one route and also between routes.This change is subjected to objective value testing.This route improvement continues until the temperature reaches the final temperature.The first solution improvement is carried out by exchanging consumer positions as in the example in Figure 3, consumer K2 is swapped with consumer K5 and on route 2 consumer K12 is swapped with consumer K25.The second solution improvement is carried out by exchanging consumers between routes, as in Figure 4, consumer K4 is exchanged for consumer K7.Every time repairs are carried out, the objective value is always checked so that changes in the objective value can be seen.
In Figure 5, it can be seen that the objective value has changed, but the algorithm still receives a higher objective value than before when the temperature is still high.But when the temperature is low, the algorithm will accept a smaller objective value.By setting SA parameters like this, the number of iterations is ±6800 with a computing time of ±2s.The algorithm program was tested for consistency by executing the program repeatedly 10 times as in table 3. The results show the best value with a result of 615,319 with a computing time of 2s.This result is the best result from several experiments with changed SA parameters.SA parameter changes were made by increasing the initial temperature but did not significantly change the objective value but the computing time increased 10 times.Likewise with changes in the initial temperature drop, so that the SA parameter setting chosen is a good solution and the computing time is very fast.The resulting solution is also tested for validation of results such as the route formed and vehicle capacity.Based on the results obtained, 5 different routes were formed, using vehicles, namely 2 vehicles with a capacity of 1800 and 3 vehicles with a capacity of 800.Of these five routes, all vehicles were visited and all consumer requests were transported by vehicles.These results can be seen in Figure 3.Each route also meets the requirements.On route 1 and route 2 the highest vehicle capacity used is 1631, this value is still lower than the capacity of large vehicles, namely 1800.And for routes 3, 4 and 5 the highest vehicle capacity used is 712, this value is also smaller than the capacity small vehicles, namely 800.These results can be seen in table 4. So these results have met the desired result criteria.In table 4 it can be seen that the results obtained are in accordance with the desired conditions.The use of vehicles also follows the desired logic because large sized vehicles are used first because according to calculations large sized vehicles are more efficient than small sized vehicles.

Conclusion
This research applies the Simulated annealing (SA) method to determine the vehicle route for delivering medical equipment to PT Tri Sapta Jaya.The factors considered in this research are distance traveled, vehicle capacity which is different from the objective function which is the shipping cost from calculating the total distance and the cost of using the vehicle.In this research, several results were found, namely the effectiveness of the Simulated Annealing algorithm in obtaining very effective solutions.This can be seen from the very fast computing time, namely 2s.The two parameter settings in this algorithm are also very important.It is necessary to carry out various kinds of tests from several combinations of parameters.The results show that the quality of the solution and the computing time are very dependent on the parameter settings performed.So that the selected parameters produce a solution that is close to the optimal value in a short time.Through the implementation of the Simulated Annealing algorithm, VRP problems involving a large number of customers can be resolved quickly.This algorithm is also flexible to use according to the complexity of the existing problems.With these results, it is hoped that it can contribute to the shipping, distribution and other logistics industries.With this solution, companies can save shipping costs and increase operational efficiency.
Thus, this research can contribute to the problem of shipping route optimization using the Simulated Annealing algorithm.Further research can be focused on developing algorithms so that they can improve the quality of the solution but cannot maintain fast computing times, besides that, they can also add limitations such as multi trip and multi depot for more complex cases.

Figure 2
Figure 2 Initial Solution Formation

Figure 3
Figure 3 Internal route solution changes

Figure
Figure 4Changes in solutions between routes

Figure
Figure 5Iteration graph for decreasing Objective Value

Figure 6
Figure 6 Formed route scheme

Table 2Pseudocode Simulated
Annealing 1. ### Vehicle Route Selection Method using Simulated Annealing **Initial Solution Initialization** 2. Determine the location of consumers who are passed by vehicles. 3. created an initial solution by randomly grouping consumers in one vehicle route.**Objective Function** 4. Calculate the total distance/travelled for the initial solution.

Table 3Comparison
of best value results with computing time

Table 4
Tour formation and capacity