Optimizing shipping routes to minimize cost using particle swarm optimization

Product shipping is important in the economic process in the company. Efficient product shipping routes should provide low transportation costs. This study based on a case company of CV. Kayana, a distributor of “Sari Roti”, has 4 motorbikes and 2 cars. Each vehicle has their own shipping routes. Nowadays, high distance for each route results on high transportation cost. Therefore, the objective of this study to minimize the distance and cost of product shipping by developing shipping algorithm using Particle Swarm Optimization (PSO) for Traveling Salesman Problem (TSP). The MATLAB software was employed to solve this problem. The solution is obtained by varying the amount of particles and number of iterations. Experimental results proved that the developed PSO is enough effective and efficient to solve shipping routes problem. The results show the proposed model have lower distance and transportation cost. It helps the company in determining the routes for product shipping with minimum transportation cost.


Introduction
Shipping route is one of the most important issues in transportation. The longer routes will result on higher transportation which effects on lower company's profit. Therefore, it is necessary to build a good and efficient distribution network throughout the company (Febtysiana et al., 2014). Distribution problems can not be separated from the world of industry which is mainly engaged in production. Distribution problems are often found in companies such as delivery of finished goods to consumers. Delivery route planning has an important role for the activity of distribution for ordering and serving quickly to consumers. Without proper planning, the risk of delays can occur (Gamayanti et al., 2015).
Companies are providing delivery service. There are few studies related to the efficiency of the vehicles and the transportation costs. Moreover, the routes taken by the drivers always change everyday. As the result, the travel time are also different everyday. In fact, it takes seven hours to deliver goods in 96.3 km for 17 with 15 minutes additional time. So the impacts are the company need longer time to distribute the goods because the delivery vehicles need to take long time to return to the starting point. It becomes inefficient in the delivery of goods.
In this problem of distribution, the vehicles play an important role because the drivers have to ensure the mobility of goods runs well and less costly. The distribution cost is affected by several things such as the delivery route chosen. Problem in determining the route, including the Traveling Salesman Problem (TSP), is a problem in determining the route taken by the vehicles to serve multiple consumers (Octora et al., 2014).
Traveling Salesman Problem (TSP) is one of the problems of distribution to determine a set of these routes of the vehicle. The vehicles depart from the same depot to serve multiple consumers and then the vehicles will return to the same depot at the same time so that the total demand of a point in a route does not exceed the capacity of vehicle (Gamayanti et al., 2015).
The method employed is a numerical method. The numerical method used is the method using a specific algorithm metaheuristic (Muyassaroh, 2012). Some methods metaheuristic among others: Tabu Search (TS), Neural Network (NW), Simulated Annealing (SA), Cross Entropy, Ant Colony Opmization (ACO) (Huang Lan & Chunguang, 2003), Genetic Algorithm (GA) and Particle Swarm Optimization (Santosa, 2017). Since 1995, the Particle Swarm Optimization has proved successful in solving problem, many problems have been effectively solved in this field, but for discrete problems, is still a few field, especially applying PSO algorithm TSP is a research direction (Xu et al., 2013).
Particle Swarm Optimization (PSO) is one of metaheuristic research techniques which were firstly introduced in 1995 by James Kennedy and Russell Eberhart based on the behavior of social interaction and communication in a bunch of animals, including a flock of birds flying in the sky and a bunch of fish. Potential solutions, called particles, moving around a search space with a speed, which is updated constantly by the experience of the particle itself and the experience of other swarm members or the experience of a whole swarm (Santosa, 2017). Utamima & Adrian (2016) investigated the placement of facilities. The methods used are distribution estimation algorithm and particle swarm optimization. The goal is to find optimal solutions in solving NP-Complete which is a single row facility layout or Single Row Facility Layout Problem (PFSB) so that the distance between the pair all the facilities can be minimized. The results of this study are providing better performance in getting the values of minimum and minimal errors in the top ten problems benchmark used. Sasmita et al. (2018) discussed the use of the regenerative braking system and pneumatic Jabodetabek electric train. Researchers used the method using particle swarm optimization method. The purpose of this study was to determine at what time of regenerative braking and braking pneumatic optimal Jabodetabek KRL so that the train could work well. The research was resulted in the optimal use of the braking system. Zhang et al. (2018) investigated the Vehicle routing problem with time windows (VRPTW). The method used in solving these problems was particle swarm optimization. This method is expected to minimize the number of vehicles and minimizing the total distance of the trip for most of the algorithms focus on the number of vehicles, while the travel distance should be considered as a primary goal in practical situations, especially in modern logistics. The results of this study, the optimal travel route.

Study of literature
Iswari & Asih (2018) investigated the vehicle which refers to the vehicle routing problem. The method used in this study was genetic algorithm and particle swarm optimization. This was done to compare the two methods. GA and PSO have been selected for both methods is a populationbased method. The objective of this research was to minimize the total distance traveled for each vehicle available. The result of this study was GA produces better solutions than PSO. However, within a period of computing, GA took longer to reach the optimal solution compared to PSO.

Research methodology
This research was conducted on May 13 -18, 2019. The method employed in this study is Particle Swarm Optimization. The data needed in the research were: a. The distance between outlets / shops b. Number of outlets / shops c. The cost involved in shipping d. Number of vehicles e. Data requests Data collection methods used in this study were as follows: -Primary data, namely data collection techniques performed directly by means of: 1) Observation, namely direct observation on the company.
2) The interview, which is collecting data to communicate directly or ask the party responsible for manager and employees of the company. -Secondary data were obtained from literature publications, such as journals, books and other data related to the corresponding problems in this study. In addition, the data defining the distance with the help of google maps to get distance data from the store to the other. The following flow charts of research that can be seen in Figure

Results and Discussion
This study was employed MATLAB software to solve the problem. The distance matrix of each node were processed as variables. The procedures in developing Particle Swarm Optimization Algorithm are as follows. a. Initialization First of all, initialization of the number of particles, the initial service, c1, c2, number itersi, initial velocity, inertia, the upper limit and lower limit was conducted. b. Evaluating the total distance Then, total distance of each route was evaluated by generating each particle based on the distance matrix. c. Determining Pbest and Gbest Next, process in finding Pbest (personal best) value, the position of Pbest is prepared in a particle in order to get the best solution. Then, the Gbest (global best) is the best particle position of Pbest.

d. Updating Position and Velocity Particles
This step aims to update the position and velocity of a particle based on the results Pbest and Gbest to perform the next iteration. e. Iteration Iteration is continuously conducted until having the most optimum Gbest as the solution (Santosa, 2017). The variable of particle swarm optimization in the optimal route can be seen in Table 1.1 below. The number of cells Number of outlets / shops The following graphs convergence results of running the Matlab program for car 1 that can be seen in Figure 1.2. That is how the researcher can get the optimal results with the amount of particles 900 and 300 in which iteration in learning rates can affect the ability to find solutions and social (group) that indicates position in a particle of the position of the swarm. It seems that the movement of the target point to a more stable and faster convergent. Other than that, in finding a solution to the global diverse population obtained a minimum as a function value less than or the same as in all other feasible points which then can no longer seek the most optimum solution or be in convergent position. Each route has a number of particles and the number of different iterations.
TSP problem is a problem of determining the most optimal route from a wide selection of existing route, by improving service delivery, it will obtain the output of the settlement of faster delivery. In addition, the optimization of this shipping route can increase the productivity and reduce the transportation cost.
The proposed model results better shipping routes. It is shown by the improvement between the current state and the proposed model which is averagely about 31%. As managerial insights, this research can be a decision support for company in a smaller calculation time with better solutions.