Hybrid genetic–tabu search algorithm to optimize the route for capacitated vehicle routing problem with time window

Optimization of transportation and distribution costs is one of the important issues in the supply chain management area. It is caused by their large contribution to the logistics costs that can reach up to 40%. Thus, choosing the right route is one of the efforts that can be done to resolve the issue. This study aims to optimize the capacitated vehicle routing problem with time windows (CVRPTW) for mineral water company distributor with pick-up and delivery problem. To achieve the aim, this study used hybrid algorithm, Genetic Algorithm (GA) and Tabu Search Algorithm (TS). The selection of this hybrid algorithm is due to its capability in minimizing travel distance. The result of this study shows that not only the algorithm has successfully reduced the existing route but also predicted the optimum number of homogenous fleet. By running the algorithm, this study concludes that the number of the optimum routes for this study can be reduced for up to 15.99% than the existing route.


Introduction
Production is one of the efforts done by companies in fulfilling human needs. Companies should be able to convert input into output that match with customer demand (Lu, 2011). Since supply chain is a contraction of activities ranging from production, inventory, warehouse, and distribution a coordination between several parties along the line is count to be essential (Hugos, 2018). Among those activities, distribution is an aspect that often become the bottleneck for the smooth return process due to the uncertainty and complexity related to transportation. Fortunately, by using software, the barrier entitled to transportation in terms of its involvement with groups of data, models, and optimization methods can be solved (Crainic and Laporte, 2012). To transport and distribute, it may take up to 40% from the logistic cost (Frazelle, 2002). Since it affects the product price, efficiency in transportation sector is needed and expected to lower other costs, such as production and distribution cost. Distribution is a key factor of the whole company's profit because it also affects supply chain cost and customer value directly. The problem that commonly faced is to find the right distribution route to achieve effectiveness and efficiency.
However, determining distribution route is not as easy as it seems. The right route should be defined correctly so the products that being delivered to customer will arrive just in time. In defining route, there are some aspects that should be considered, such as the availability of fleet, its capacity to ship certain number of products, distance between nodes (including depot and customers), and others.
Based on the type of its packaging, the products of the company are divided into three segments: glass (240 ml), bottle (600 ml and 1500 ml), and gallon (19 L). The company plans to distribute the products to the customers and agents (distributors) with various demands, locations, and time windows. Table 1 shows the demand and time window for every customer. The company has to route the vehicle not only to deliver filled gallons but also to take empty gallons at the customer end and exchange them for the filled gallons. The empty gallons will then be reprocessed so it can be used and sent back to customer. The company has two homogeneous vehicles to pick up and deliver the orders. Each vehicle has the same capacity; it may carry maximum 100 gallons. Therefore, the company must consider the number of gallons that must be sent and taken from customers. When distributing products, problems such as delay in delivering products to customers and agents may occur. As summarized in the Table 2, there are some customers that experienced delay in shipping along with the number of gallons that they ordered. Additionally, Table 2 also provide information concerning the backlog. Upon that unfortunate occurrence, the company receive complaints from its customers. After further investigation, this study finally figured that route determination, unemptied gallons, and production cut off are the root cause of the problem. Moreover, from Table 3 and Figure 1 it is apparent that the major problem among all of the factors is route determination. Thus far, the focus of this study is to optimize the route of every vehicle by considering the capacity of vehicle, demand to pick up and delivery, as well as the time windows. For further clarity, Figure 2 illustrate the spread of the company's customers.
Given the nature of problem that raised in the company, Vehicle Routing Problem (VRP), which is defined as combinatorial optimization problem that determines optimum route by using fleet based on depots to serve customers (Toth and Vigo, 1998) is considered as the most suitable solution for the case of this water company due to its excellent performance in finding the optimum route. Specifically, this study used VRP Pick-Up and Delivery (VRPPD) approach that matches with the characteristic of the company's operation which is to deliver filled gallons and pick-up the empty gallons.
In solving VRP, there are some algorithms that mostly used, such as Genetic Algorithm (GA) (Baker and Ayechew, 2003;Mohammed et al., 2017) and Tabu Search (TS) (Brilliane et al., 2019;Abdurrahman et al., 2018;Lai et al., 2016). Both Genetic Algorithm and Tabu Search have their own flaws, GA cannot be able to get an optimum solution but close to the expected result. Meanwhile TS is a local search that cannot find better solution except the optimum ones. With that being said, it is better to combine both GA and TS in order to cover the flaws of each algorithm.

Literature Review
Vehicle Routing Problem (VRP) was first introduced by Dantzig and Ramser in 1959 as truck dispatching (Toth and Vigo, 2014). As knowledge grows, the problem then called as Vehicle Routing Problem. VRP then defined as combinatorial optimization problem that determines optimum route by using fleet based on depots to serve customers (Toth and Vigo, 1998). VRP can be used to define routes with the goal of meeting customer demand by minimizing transportation costs. Vehicle determination is done by looking at the limits to the capacity and the cheapest cost.
The goals of the VRP that proposed by Toth and Vigo (2002) are listed as follows: 1. Minimize the overall transportation costs that depends on travel distance taken overall and fixed cost related with the number of vehicles used 2. Minimize the number of vehicles used to serve all customers 3. Balancing the travel route 4. Minimize penalties related with customers served According to Toth and Vigo (2014), there are several types of VRP nowadays. Those are: Capacitated VRP is included as classic VRP, which purpose is to minimize total cost by designing optimum distribution route and load brought by fleet is not exceeding its capacity. Fleet used is homogeneous and only serves one route and there is only one depot.

VRP with Heterogenous Fleet of Vehicles (VRPHF)
Characteristics of this VRP is the vehicles used are more than one and has different characteristics for each vehicles. The characteristics including capacity, variable and fixed cost, velocity, and access to different customers depend on vehicles used.

VRP with Time Window (VRPTW)
Customers have a range of service time, such as service must be done on a range of time windows that have been set on each customers. 4. VRP Pick Up and Delivery (VRPPD) VRP problem that allow the vehicle to perform delivery and pick-up tasks at once. This kind of VRP starts with distribution process in depot and ends with the last customer pick-up to depot. 5. VRP with Backhauls (VRPB) Here, there are two kinds of customers which are linehaul and backhaul. Linehaul is where products are delivered at customers first, while backhaul is where products should be taken off from customers when the vehicle is empty. Customers visited by empty fleet called backhauls.

VRP with Multiple Depot (MDVRP)
This VRP variant has more than one depot. Each customer gets the product delivered by one vehicle from one of the depots. Each vehicle departs from a depot and ends at the different depot. 7. VRP with Multiple Product and Compartments.
This VRP variation allows the customers to order more than one product type at once. In general, this type of VRP involves vehicles with multi compartments.

VRP with Multiple Trip
Variations of this VRP is taken when company has limited number of vehicles and its capacity can't handle many load, so the vehicle should be used simultaneously.

VRP with Split Delivery
This VRP variant allow customers to be served by more than one vehicle because demands are split, while on a standard VRP one customer is only visited by one vehicle. 10. Periodic VRP This form of VRP covers the problem of determining the day of the customer's visit within a certain period of time periodically. The problems described in Section 1 can be categorized as Vehicle Routing Problem Pick-Up and Delivery. There are several methods or algorithms in solving route selection problems, namely exact, heuristic and metaheuristic algorithms. The exact algorithm does not fit because it takes a very long time to complete and only covers a few distribution points. Heuristic algorithms can be used, but if there are too many distribution points, the solution can be "trapped" in local optimization so it is less optimal. So, metaheuristic is suitable because it can produce global optimization.
Hybrid GA-TS is an algorithm that combines two algorithms, Genetic Algorithm and Tabu Search. There are several references with different processes. Mak and Sun (2009) added Tabu Search to each mutation and crossover in Genetic Algorithm. Sonawe and Ragha calculate using Genetic Algorithm first, then the Genetic Algorithm result is used as input in Tabu Search (Sonawane and Ragha, 2014).
Methods that can be used are Genetic Algorithm, Tabu Search and Hybrid Genetic Algorithm-Tabu Search. In this study, the three algorithms are compared to find out the results using which algorithm was the best. First is the calculation using Genetic Algorithm. Second is the calculation using Tabu Search. And the last is hybrid Genetic Algorithm-Tabu Search, which combines the two previous algorithms, with the details of the first step using Genetic Algorithm, then the output obtained becomes the input for Tabu Search.
This research focuses on VRP, with VRPPD specifications. there were several previous studies that used VRP as well.

Mathematical Model
Following is the mathematical model that being used to formulate the problem according to the existing condition, which in this case the objective function is to minimize travel distance.
Let we have Indexes: i = index of notation, where i = 0,1,2,3, ... n is the customer / distribution center that started. j = index of notation, where j = 0,1,2,3, ... n is the customer / distribution center that ended. v = index of notation, v = 0,1 ... v is the number of distribution fleet used Parameters: J = customer nodes J0 = all nodes including depot V = vehicle numbers cap = vehicle capacity Cij = distance between node >> dj = amount of gallon delivered demanded by customer node >> pj = amount of gallon picked customer node >> N = number of nodes M = sufficiently large number lv = load of vth vehicle when leaving the depot lj = load of vehicle after serving customer node j >> sj = variable used to avoid subtours, can be interpreted as position of node in the route.
Decision variable: Xijv = binary decision variable that indicates whether vth vehicle travels from i to j

Objective function:
Min ∑ 0 ∑ 0 ∑ Constraints: Constraint (1) shows that for each trip from node i travels to j is only served by a v fleet. Where j is the numbers of customers.
Constraint (2) shows that each vehicle that travels from node i to node j is the same as it goes to and leave from the same city.
Constraint (3) shows that the amount of delivered gallon to each customer is represents by the maximum load of vehicles when leaving the depot.
Constraint (4), (5), (6), and (7) shows that the maximum load (the total number of gallons that being delivered and picked up) for each vehicle after delivering to a node.
Constraint (8) and (9) shows that each fleet that is on duty has only one route to deliver and pick up gallons.
Constraint (10) shows the binary decision variable of vehicle (v th ) that travels from i to j, meaning the node that being visited marked by 1, and 0 otherwise.

Hybrid Genetic-Tabu Search Algorithm
In this study, there are two metaheuristic algorithms that being used, Genetic Algorithm and Tabu Search. Before processing the data by metaheuristic algorithm, initial solution or input for the algorithms are retrieved from the existing distribution route that has been used by the company to distribute their products to customers. Accordingly, the result by using Genetic Algorithm are generated by using existing distribution route as the first individual then it is being reordered for the next individuals. Meanwhile for Tabu Search, the existing distribution route also becomes the input of the calculation. At this stage, several exchange of nodes called neighbor, are performed in order to find the best structure among the results that was generated through each iteration for further use. Since the Genetic Algorithm and Tabu Search that has been explained before were ran separately, the results from each analysis do not affect each other. However, in the next calculation both Genetic Algorithm and Tau Search are combined so the result can be compared. This aims to find out the optimum result in defining the best distribution route for the company. Figure 3 is an influence diagram for this research. Although the company already have a "reference" for its existing distribution route, the delays are still occurred. This is because the company does not have as well-calculated distribution route. Since distribution route is closely related to decision variable, travel distance and maximum load of vehicles, it is also known as controllable input in this study. Travel distance is defined by length of route travelled per day and the distribution route. Accordingly, the travel distance for each fleet is affected by the distance among the customers themselves and between distribution center and customers. When delivering products, the load should not exceed the fleet capacity. Therefore to determine the maximum capacity, knowing the distribution route and the amounts of picked and delivered gallons is essential. Hybrid GA-TS is an algorithm that combines two algorithms, namely Genetic Algorithm and Tabu Search. There are several references with different processes. Mak and Sun (2009) added Tabu Search to each mutation and crossover in Genetic Algorithm. Some researchers calculate using Genetic Algorithm first, then the Genetic Algorithm result is used as input in Tabu Search (Sonawane and Ragha, 2014;Utamima et al., 2015). The process can be seen on Figure 4. To run the analysis using Genetic-Tabu Algorithm, this study use the 2017 version of MATLAB software in building the algorithm. The first step is initialization process which begins by determining the parameters required in the calculation, which covers the determination of the number of genes in the chromosome. Genes represent the number of customers. After determined the number of genes in a single chromosome, then the determination of the number of individuals in the population is conducted. The number of individuals in this study were set as 50 individuals or potential solutions. Thereafter, the probability of crossover is set to 0.8 and the mutation probability is set to 0.1. Furthermore, the next step is defining the initial solution which is the existing distribution route. As for other individuals were randomly raised through the process of permutation of genes in the first individual within the chromosomes. Next is defining fitness value. Since the existing route is already available, the fitness is bigger than the ones that raised randomly. After defining fitness, then selection step is done. Here, by using fitness value, it is possible that the higher the acquired fitness value, the higher the possibility to maintain next generation. Next is crossover, which aims to generate new individual. The parent is taken from the previous step, which is selection. The last step is mutation, which aims to increase the diversity level among chromosomes. Then we continued by Tabu Search. The input for this algorithm is similar to the prior stages which is the existing distribution route. This input is initially processed by the Genetic Algorithm then the generated output becomes and input that will be further calculated using Tabu Search. Hence, the output of hybrid algorithm is going to be optimum.

Results and Discussion
After running the analysis by using Genetic Algorithm and Tabu Search, then both algorithms are combined in order to reveal whether the hybrid algorithm will generate the better solution compared to those two or not. Table 5 is the comparison table of each route distance. On the existing, the farthest distance is 154.87 km. After being calculated using the three schemes of algorithms, each of the highest values becomes 154.87 km, 113.302 km, and 113.156 km for Genetic Algorithm, Tabu Search, and Hybrid Genetic Algorithm-Tabu Search respectively. Upon that fact, it can be conclude that the calculation using Hybrid Genetic Algorithm-Tabu Search produce the best results in compare to the existing route and other algorithms. Based on calculations that have been done using the three algorithms, it is known that the results obtained for the proposed route has fewer amounts than the existing route. If the total existing route are 13, by using TS algorithm of the routes shortened to 10 routes. With that being said, even TS can reduced the number of existing routes, it is the hybrid algorithm that can produce the routes with shortest distance to travel. This reduction can happen because the algorithm considers the nearest distance in determining the route. Therefore, not only each vehicle is controlled during the fulfillment of customer demand but also it optimized the vehicle capacity. Furthermore, table 6 shows the result of hybrid GA-TS for distribution routes for pickup and delivery.  Finally, it is important to verify the demands and the capacity of vehicles to picking-up and delivering gallons. Verification is needed to ensure that the suggested route generated from Genetic Algorithm calculation is in accordance with constraint that is used in the research. To verify it, as the following aspects are the criteria that need to comply: 1) Vehicle depart once from DC and return back to DC in one departure.
2) The total demand and pick-up gallons of one route is not exceeding vehicle capacity Table 7 shows the capacity comparison that can be carried by the vehicle when distributing gallons. In this study, each vehicle can carry for up to 100 gallons. Since the existing route itself has not been well calculated, it can be seen that the number of gallons carried through the existing route is not close to the maximum amount of vehicle load. Compared to the results obtained using the three algorithms, the suggestion shows better results in terms of load because there are several cargos that can carry close to and even precisely to 100 gallons.

Conclusion
After conducting the calculation to determine optimum route by using Genetic Algorithm, Tabu Search, and Hybrid Genetic-Algorithm, the total distance of existing routes got reduced from 1029.99 km to 932.478 km, 982.965 km, and 789.673 km respectively. It can be conclude that the best solution and result was obtained by using the Hybrid Genetic Algorithm-Tabu Search which generate a travel distance of 789.673 with the decreased travel distance for as much as 15.99%.
To improve the result, this study suggest that further study can consider time window given by customer and also the effect on transportation cost after calculating the suggested distribution route. Furthermore, future study can also simulate the result using visualization to facilitate the route determination.