AN IMPROVED SIMULATED ANNEALING FOR THE CAPACITATED VEHICLE ROUTING PROBLEM ( CVRP )

In the industrial sector, in order to increase the company's competitive profit and ratio, must be able to suppress as much expenditure as possible. Product distribution is one of the logistics processes in the industry which consumes the most costs. Products must be distributed to customers in different locations and also with varying requests. The problem belongs to Capacitated Vehicle Routing Problem (CVRP) that is considered as one of the complex combinatorial optimization problems included in the NP-Hard Problem category, which is a problem that requires difficult computation and a lot of time along with the increasing size of the problem data. So, in this study improvisation will be carried out in the form of modifying the simulated annealing method to solve the combinatorial problem so that the optimal distance in the case of distribution will be obtained. In addition, in this study a comparison will be made between basic simulated annealing and also improved simulated annealing. Based on the results of the research it is proven that Improved Simulated Annealing can provide a better solution.


INTRODUCTION
In the world of industrial business, one of the activities carried out is product distribution to customers.The challenge in distribution activities is to deliver products to customers in the right time and place [1].Distribution is a major part of logistics activities and is a key link between industry and customers in supply chain [2].This requires handling in the form of determining the right route to minimize costs that will increase profits and the company's competitive level [3].
In a distribution process activity, a vehicle is needed to carry the product and distribute it to several destination locations according to customer demand.A vehicle has a certain carrying capacity so that it will become a problem in the implementation of distribution management.In this case, the problem can be called the Capacitated Vehicle Routing Problem (CVRP), which is a problem in determining the route of a vehicle that has a certain capacity in the distribution process.For example the distribution of goods at retail stores [4], motor fuel [5], and distribution in the pharmaceutical sector [6].
CVRP is a variation of the Vehicle Routing Problem which is one of the many problems studied in the field of operating research and combinatorial optimization [7].In addition, CVRP is also one of the complex combinatorial optimization problems belonging to NP-Hard Problem, which is a problem whose solution requires a difficult computational process and a lot of time along with increasing data size problems [8].The complexity of the problem of CVRP is finding a route solution for vehicles that start and end in the warehouse and the vehicle will only cross to the customer's location once to distribute the goods and the total demand does not exceed the vehicle's load capacity.The objective function of CVRP is to minimize the costs that will be incurred in product distribution to all customers by finding optimal route patterns that can minimize the distance traveled so that all products can be distributed to customers according to stochastic demand efficiently.To solve CVRP problems based on literature studies that have been done can be solved with three methods of resolution, namely exact, heuristic, and meta-heuristic [9].The exact way is to use all possible solutions by doing mathematical and analytical calculations [10].So that by using the exact method can only be used for a few problem data so that as the size of the data increases the problem will be increasingly difficult to do [5].
However, to produce a better value for a minimum distance, it is necessary to improvise on the Simulated Annealing method, because of its tendency to be trapped in the local optima, so to get the best performance from the simulated annealing method, improvisation will be carried out in this study as a modification on simulated annealing in order to produce optimum solutions in solving CVRP cases.In previous study improved simulated annealing has been used for solving Vehicle Routing Problem with Time Windows (VRPTW) and produce a promising result [15].In this research in addition to using the dataset by Augerat et al., (1995) which is a popular dataset in the case of CVRP, in this study the dataset used is the latest benchmark of CVRP problems which includes various characteristics of problems found in real applications by Uchoa et al. (2016) with the hope that the results of this study can contribute to the completion of CVRP and be used as a comparison for future research.The purpose of this study is to obtain minimum value from the total distance traveled by all vehicles in solving the problem of CVRP.
The brief structure of this paper in part one is the introduction for this research will be conducted, in part two is a research method that will present the methodology of this study, then in next part we will explain the analysis of the results in this study, the last are conclusions of this research and suggestions for future work.
In this study will be used one of the local search-based meta-heuristic methods that is namely simulated annealing (SA) algorithm.SA has also been implemented to determine the optimal route in VRP cases such as Hybrid VRP which produces an average standard deviation of 0.64% [11], also in the Open Location Routing Problem (OLRP) problem [12], and multi-trip task on VRPTW [13].The advantage of SA algorithm is that this method does not just throw away a bad solution, but still accepts the solution and provides an opportunity ratio for the solution to be reused, so that these efforts can reduce the possibility of being trapped in a local optimum solution [14].

RESEARCH METHOD
CVRP was first introduced by Dantzig and Ramser (1959) [16].CVRP is one of the problems of VRP (Vehicle Routing Problem) which is defined as a problem for determining the optimal route for vehicles to carry out distribution trips starting from the warehouse to the customer's destination [9].In CVRP, there are several vehicles used and each vehicle has a carrying capacity of goods, and after distributing the vehicle will return to the warehouse.To solve CVRP problems in this study simulated annealing method will be used, and improvisation methods will be used to improve the performance of the method so that the resulting solution is optimal.The methodology in this study is presented in Figure 1.
On the issue of Capacitated Vehicle Routing Problem (CVRP) in this study used several popular datasets that are often used by researchers as instances of problems in resolving CVRP, namely the dataset by Augerat [17].In addition, this study will also use a dataset by Uchoa [7] as the latest dataset of CVRP problems that have higher complexity.In this result and analysis chapter, a number of experiments will be presented in the basic simulated annealing method for computational time and minimum distance that will be used as a comparison with improved simulated annealing which is the method proposed in this study.In Table 1, a list of datasets that will be used in this study is presented which have previously been tested for validity using the Pearson formula which produces a valid value.In Table 1 there are a number of nodes which are the number of locations of the problem domain, the number of vehicles, the capacity of each vehicle, and also the best known solution from previous research.Determining the optimal route in the CVRP case is depicted in a graph showing the route pattern that will be passed by the vehicle presented in Figure 1.In Figure 1 is a visualization of the customer location that must be visited by the vehicle symbolized by the numbers 0 to 31 from problem domain A-n32-k5.The depot position is symbolized by number 31, while the customer is 0-30.In Figure 2 an example is given of applying a route to a problem in the dataset A-n32-k5 based on the coordinates of position X and Y generated by basic simulated annealing.The pattern in the graph shows the route for the vehicle in delivering the goods to the customer based on the number of customer requests.The route determination for CVRP completion in this study was completed by using the simulated annealing method.In addition, a comparison between basic simulated annealing and improved simulated annealing was carried out to determine the performance of the best simulated annealing method so that it could resolve CVRP optimally.The purpose of this study is to get the minimum total distance which calculate by euclidean distance that must be passed by the vehicle, which determines the distance in CVRP influenced by the demand for each customer that will be adjusted to the capacity of the vehicle.So that the design method needed in this study is simulated annealing to get a solution in the form of an optimal route pattern that will produce a minimum total distance.

Simulated Annealing
Simulated annealing (SA) is an opportunitybased meta-heuristic algorithm to solve combinatorial optimization problems adapted from metal or material cooling processes in thermodynamics [18].In accordance with the opportunity-based concept, the bad solutions found will not be immediately discarded, but given the opportunity to be used as a solution.As for a temperature T, the opportunities are formulated according to the laws of thermodynamics as follows in equation ( 1): E is the energy used, and the value of k is Boltzmann's constant, which is 1.3806488x10 23 [19].Simulated annealing parameters can be analogous to the following: • Physical Material, is a representation of solutions.• The energy used is an objective or cost value.
• Temperature, is a value that functions to control parameters.• Cooling Rate, is a value in the process of decreasing the temperature whose function is used to find out how quickly the final solution can be obtained.Temperature reduction can be analogous to the following equation (2). Information: The pseudocode of basic simulated annealing for solving capacitated vehicle routing problem in this research is as follows: The step of basic simulated annealing algorithm is declare below: 1. Initialize the initial variable Initialize random numbers for the route length (customer).Determine the value of the initial temperature (T0) and the final temperature (Tt) the maximum number of iterations, the temperature reduction factor (α) and the initial objective value (E) or OldDistances.

Looking for new solutions
Looking for a new solution by generating length (customer) with random numbers and simultaneously calculating the objective value of the new solution.

Evaluates Energy or Distances(E)
Evaluate the new solution using the following evaluation formula in Equation (3).
Information : If the objective value of a new solution is better than the objective value of the initial solution then a new solution will be accepted.However, if the opposite is the case, the new solution is still considered to be accepted based on the following probability formula in Equation ( 4) : Information : T = Control parameter (Temperature) r = Random value between 0 and 1.

Lower control parameters
After obtaining a new solution, the control parameters are derived according to the formula in equation (2).

Improved Simulated Annealing
Improvisation or modification of the Simulated Annealing method is done to prevent SA from being trapped in the local optima, it is necessary to improvise on the SA method.One form of modification has been proposed ny Yuxin et al. which uses two stages in the implementation of modified simulated annealing [20].At the stage (1) the highest initial temperature is taken and annealing concept from Very Fast Simulated Annealing (VFSA) is proposed by Li, Koike and Pathmathevan [21].Stockhastic disturbance is used globally for models that aim to find and lock the optimal solution part.On the stage (2) the lowest initial temperature is taken and also conducts a stockhastic disturbance globally for the model, which means there will be interference around the model which aims to reduce the search space when locking the optimal solution space to improve the acceptance efficiency of the model.In this research, improvisation of simulated annealing algorithm is as follows: The annealing plan of the simulated annealing method in stage 1 is defined as Equation ( 5): + , (-) = + ./012345-, 6 7 (5) T0 is the initial temperature, k is the iteration number, c is the value of the constant given, and N is the number of inversion parameters.When the temperature is less than the value of Te specified, stage 2 will be carried out with the Equation (6).

Solution Representation
In this study the solution is represented as a sequential number with the number of location points for customers to visit.The numbers generated randomly using the method used in this study are Particle Swarm Optimization and Simulated Annealing.The example of the solution representation in the dataset A-n32-k5 is presented in Figure 3.

Figure 3. Example of Solution Representation
In the Figure 3 the column with the yellow block is an example of the route solution for the first vehicle, as well as the next yellow block until the last vehicle, while the column with gray ash block shows the request for each location that will be adjusted to the vehicle capacity.Then, to calculate the total distance traveled on a route, the Euclidean distance formula will be used in equation (7).

RESULT AND ANALYSIS
In this section we will present the results and analysis of the implementation of improved simulated annealing and also basic simulated annealing in solving CVRP cases using the dataset presented in Table 1.To measure whether the simulated annealing method that has been improvised before has a good performance, several test scenarios including benchmarking are computation time and also the total minimum distance that must be spent by the vehicle on all routes that have been generated previously.In Table 2 and Table 3, the results of the experiment were carried out 5 times for the completion of CVRP using a dataset A-n32-k5 which produced each computation time and minimum total distance.
In Table 2 presented the computational results of CVRP problems using basic annealing that has been carried out experiments on the number of iterations with each of them has been carried out 5 times and from these results it can be concluded that the more number of iterations used will certainly increase computing time, but with the addition of the number of iterations, it will provide a better solution, namely the minimum distance calculated using the euclidean distance formula for the distance that must be taken during the route that has been generated using the basic simulated annealing method.The results of these experiments are presented in Table 3 which using dataset A-n32-k5.
In Table 3, it can be concluded that the more iterations carried out will have an impact on the minimum distance that must be taken by the vehicle.In Table 4 the experimental results for all domain problems used in this study will be presented in Table 1 for computational time and minimum distance based on the number of iterations.The overall results of experiments on all datasets used in this study are presented in Table 4 with the number of iterations arranged as many as 100000.
In Table 5 it can be seen that the more iterations performed will certainly increase computational time, but the increase in computational time will also have an impact on the best solutions produced, which as presented in Table 6.
In Table 6, it can also be proven that as the number of iterations increases, the best solution is produced, testing for the entire dataset is shown in Table 7.In addition to testing using simulated annealing in CVRP cases, this study also tested the improved simulated annealing method and also looked at how the effect of method modification on the solution to be produced was minimizing the total minimum distance.Similar to the previous basic simulated annealing test, a number of iterations will be tested with 5 trials, then it will be analyzed whether the number of iterations also has a significant effect on the solution obtained.The results of these tests on computation time and also the results of the solutions will be presented in Table 5 and Table 6 which also using dataset A-n32-k5.After testing basic SA and also improved SA, in Figure 4 and Figure 6 a graph will be displayed from the results of the best distance generated by each method, so that it can be seen how much influence modification on simulated annealing can have an impact on the results of the CVRP case.Based on Figure 4, 5, 6 and 7, it can be seen that Improvisation on the simulated annealing method has a significant effect on the time of rotation, but also can produce a better solution than basic simulated annealing.

CONCLUSION
In this study a solution has been made to the case of the Capacitated Vehicle Routing Problem (CVRP) using the Simulated Annealing (SA) method.To get the best performance from the SA method, improvisation was done in this study in the form of modifications to the SA method by making 2stage modifications using the annealing plan.Based on the test results, a comparison between the basic method and improved simulated annealing has been carried out in 100000 iterations to obtain optimal results.The comparison shows that improvisation in the SA method had a significant impact with the increase in the best minimum distance.For further research, a comparison can be made between the SA method and other heuristic methods to prove the heuristic method that is most suitable for solving CVRP cases.

Figure 2 .
Figure 2. Example of Route Pattern

Table 2 .
The result using Basic SA on Computational Time

Table 3 .
The Result using basic SA on Distance Value

Table 4 .
The Result using basic SA for the whole dataset

Table 5 .
The Result using improved SA on computational time

Table 6 .
The Result using Improve SA on Distance Value

Table 7 .
The Result using improved SA for the whole dataset