An Improved Clarke and Wright Algorithm to Solve the Capacitated Vehicle Routing Problem

— This paper proposes an effective hybrid approach that combines domain reduction with the Clarke and Wright algorithm to solve the capacitated vehicle routing problem. The hybrid approach is applied to solve 10 benchmark capacitated vehicle routing problem instances. The dimension of the instances was between 21 to 200 customers. The results show that domain reduction can improve the classical Clarke and Wright algorithm by about 18%. The hybrid approach improves the large instances significantly in comparison with the smaller size instances. This paper will not show the time taken to solve each instance, as the Clarke and Wright algorithm and the hybrid approach took almost the same CPU time.


INTRODUCTION
The Vehicle Routing Problem (VRP) is an important problem in the distribution network and has a significant role in cost reduction and service improvement.The problem is one of visiting a set of customers using a fleet of vehicles, respecting constraints on the vehicles, customers, drivers etc [1].The goal is to produce a minimum cost routing plan specified for each vehicle.The problem of vehicle scheduling was first formulated in 1959 [2] and may be stated as a set of customers, each with a known location and a known requirement for some commodity, that is to be supplied from a single depot by delivery vehicles, subject to the following conditions and constraints: • The demands of all customers must be met.
• Each customer is served by only one vehicle.
• The capacity of the vehicles may not be violated (for each route the total demands must not exceed the capacity).
The objective of a solution may be stated, in general terms, as that of minimizing the total cost of delivery, namely the costs associated with the fleet size and the cost of completing the delivery routes [3].The problem frequently arises in many diverse physical distribution situations.For example bus routing, preventive maintenance inspection tours, salesmen routing and the delivery of any commodity such as mail, food or newspapers [4].The vehicle routing problem is an integer programming problem that falls into the category of NP-Hard problems.As the problems become larger, there will be no guarantee that optimal tours will be found within reasonable computing time [5].

II. PROBLEM FORMULATION
The Capacitated Vehicle Routing Problem (CVRP) is to satisfy the demand of a set of customers using a fleet of vehicles with minimum cost.The problem is described as follows [4]: Let: • C= {1, 2,…, n}: the set of customer location.
• j q : demand of customer j.
• m: number of delivery vehicles.
• ij c : distance or associated cost between locations i and j.
• L: maximum distance a vehicle can travel.
• j P : a lower bound on the cost of travelling from the depot to customer j.

• ( ) S
ℓ : lower bound on the number of vehicles required to visit all locations of S in an optimal solution.Note that S ⊆ C and ( ) 1 The problem is to: subject to:

III. THE CLARKE AND WRIGHT ALGORITHM
The Clarke and Wright algorithm [6] is the most popular heuristic algorithm for the VRP.The algorithm calculates all the savings S ij between customers i and j.Assuming that c i0 is the cost of travelling from the depot to customer i and c ij is the cost of travelling from customer i to j.The following is a description of the Clarke and Wright algorithm to solve the CVRP: =1,…, n and i ≠ j.Rank the savings S ij and list them in descending order.
• Step 2: Create the "savings list."Process the savings list beginning with the topmost entry in the list (the largest S ij ).
For the savings under consideration (S ij ), include link (i, j) in a route if no route constraints will be violated through the inclusion of (i, j).The following three cases need to be considered.
• Case 1: If neither i nor j have already been assigned to a route, then a new route is initiated including both i and j.
• Case 2: If exactly one of the two points (i or j) has already been included in an existing route and that point is not interior to that route (a point is interior to a route if it is not adjacent to the depot in the order of traversal of points), then the link (i, j) is added to that same route.If the point is interior and not violating the capacity then add (i, j) to the same route.If it's violating the capacity make a new route with the point (customer) i.
• Case 3: If both i and j have already been included in two different existing routes and neither point is interior to its route, then the two routes are merged by connecting i and j.If they are interior then the merge cannot be done.
• Step 3: If the savings list S ij has not been exhausted, return to Step 2, processing the next entry in the list; otherwise, stop.

IV. DOMAIN REDUCTION
Observing the work of [7][8][9][10][11], one can see that some significant work has been done to improve the accuracy of the classical algorithms.However, one of the weaknesses in classical algorithms lays in accuracy, especially when dealing with large instances.This paper shows that domain reduction can solve the problem of the accuracy for large instances.Domain reduction is a method that deletes some unneeded values from the domain using a logical based approach [12].In this paper the domain reduction will be applied by adding a new constraint that deletes some large numbers from the distance matrix and thus forbids the use of certain links.The new restriction is: where c ij represent the cost between i and j, and R is a threshold that depends on the maximum number in the distance matrix.The domain reduction procedure starts by dividing the distance matrix into four parts based on the distance.In the other hand the demand matrix will be divided into four parts starting from the lowest to the greatest.
Customers with lowest demands and high (or very high) costs will be highlighted as critical customers.In the other hand, customers with high (or very high) demands and with lowest (or average) costs will be referred to as leading customers.The domain reduction will delete all the high and very high costs from the cost matrix.For the critical customers we delete the highest 50% of the edges.Taking the obtained solution in consideration, the same procedure should be repeated by applying the domain reduction on the remaining values.
The domain reduction procedure will delete some unneeded values from the distance matrix.This will improve the solution especially when combined with the Clarke and Wright algorithm.Table I illustrates how the domain reduction procedure divides the cost and demand matrices.

V. COMPUTATIONS
This section combines the domain reduction with the Clarke and Wright algorithm.The algorithm is employed to solve 10 benchmark VRP instances [13][14][15][16].A look up table for the instances used can be seen in Table II.The details of each instance can also be found in [17].Table III shows the obtained results.

VI. CONCLUSION
In general, the saving approach used by the Clarke and Wright algorithm can provide good solutions for small size instances.However, for large instances calculating the savings may consider large values which affect the solution.Hence, combining domain reduction with the Clarke and Wright algorithm is far better approach than using the Clarke and Wright algorithm alone to solve large instances.In addition, classical heuristics are easy to understand and implement compared to meta-heuristics.However, meta-heuristics can provide better results in most of the cases.This paper showed that classical algorithms can also provide accurate results.

TABLE II .
LOOK-UPTABLE FOR THE 10 BENCHAMRK VRP INSTANCES

TABLE III .
THE C&W SAVING ALGORITHM AND DOMAIN REDUCTION Table III shows that domain reduction improved the classical Clarke and Wright rapidly.It's clear that as the instances become larger, the solution improves better and get closer to simulating annealing results.Surveying the results for the last five instances one can see that the improved Clarke and Wright provides better results on large instances.The 48 customers problem improved by about 1% but other large instances show better improvements.The 101 customers problem improved by 16%.The 121 customers problem improved by 38%.The problem 151 customers problem improved by 49.8%.For the 200 customers problem, the improvement was 46%.