A feasible solution algorithm for a primitive vehicle routing problem

5

Click here to load reader

Transcript of A feasible solution algorithm for a primitive vehicle routing problem

Page 1: A feasible solution algorithm for a primitive vehicle routing problem

1

A feasible solution algorithm for a

primitive vehicle routing problem Cem Recai Çırak

31 December 2015

Abstract

This paper is written to give brief information about a feasible solution algorithm offer for a primitively defined vehicle routing problem. The paper broaches to subject with a short review about on a vehicle routing problem solution algorithms. After that; definition of the problem at issue, choice of the type of offered algorithm, brief explanation of the algorithm, simulation results on pseudo-randomly generated artificial problems and comparative interpretation about the performance of the algorithm are follows explicated.

1. Introduction

The vehicle routing problem (VRP) is a combinatorial optimization and integer programming problem seeking to service a number of customers with a fleet of vehicles. Proposed by Dantzig and Ramser in 1959, VRP is an important problem in the fields of transportation, distribution, and logistics. [1] The Vehicle Routing Problem (VRP) is a general name given to an entire type of problems in which a set of routes for a fleet of vehicles based at single or multiple depots must be determined for a number of physically dispersed customers. The objective of the VRP is to deliver a set of customers with known demands on minimum-cost vehicle routes starting and finishing at a depot.

A representation of a characteristic input for a VRP problem and one of its possible solution outputs can be seen below in Figure 1.

Figure 1: An instance of a VRP and its solution

Approximately all of the most commonly used techniques to solve Vehicle Routing Problems are heuristics and metaheuristics since there is no exact algorithm which guarantees to find the optimal solution within admissible computing time while the number of customers are getting larger. This is due to the issue that VRP is an NP-Hard class problem and its exact algorithm time complexity T(n)=O(cn). Classification of solution techniques and some of the most commonly used solution algorithms are listed.

Exact Approaches: Exact approaches compute every possible solution until the best (optimal) solution is found. This technique uses divide and conquer strategy by applying a branch and bound or branch and cut algorithms on a K-tree. Customers are set as leaves of K-tree. Then problem is divided into small sub-problems and solved.

Page 2: A feasible solution algorithm for a primitive vehicle routing problem

2

Heuristics: Heuristic methods perform a relatively limited exploration of the search space and get a not too bad but much faster solution by applying some experience-based guesses. Heuristics are divided into two parts as constructive methods and 2-phase algorithms.

In constructive methods, a feasible solution is provided by checking whether it satisfies the cost requirement and do not improve upon. Some reputed constructive algorithms are below:

Clark and Wright savings Matching-based savings Multi-route improvement heuristics

Kinderwater and Savelsbergh Thomson and Psaraftis Van Breedam

In 2-phase algorithms, customers are set as nodes and then divided into clusters and the routes are determined in which there are paths connecting the clusters themselves as a feedback loop. 2-phase algorithms are divided into two types:

Cluster first, route second Taillard The Petal algorithms The Sweep algorithms Fisher and Jaikumar

Route first, cluster second

In many versions of 2-phase algorithms, the main improvements are included in the applied clustering technique.

Meta-Heuristics: Meta-heuristics performs a complete search in the most appropriate regions of the solution area. Meta-heuristics gets better quality solutions in comparison with heuristics. Some reputed meta-heuristics algorithms are below:

Ant algorithms Constraint programming Genetic algorithms Tabu search

2. Problem Definition

A very simplified Single Depot Multiple Route Vehicle Routing Problem is defined as follows:

There is a single depot at the origin. There are n customers with pseudo-

randomly generated coordinates and demands with via computer programming. Their coordinates are defined with a radius between 1 and 100 and an angle between 0° and 359° with respect to the depot at the origin (0,0). Their demands are defined between 1 and 100.

All customers connected with a complete weighted graph and only one edge connects any two of customers. Weights of edges are defined as directly equal to the geometric distance between two customers which are consisting the edge.

Unlimited number of trucks are available with identical capacities. However, a truck can be used if and only if it is necessarily needed. In other words, if total demand exceeds the maximum truck capacity, then usage of another truck is allowed.

Each customer on the network must be visited exactly one times. Therefore, their demands must be satisfied at once.

Total cost is assumed equal to the sum of the weights of used edges.

Figure 2: Pseudo generated VRP scheme

Page 3: A feasible solution algorithm for a primitive vehicle routing problem

3

n: Number of customers

m: Number of trucks used

i = 1, 2, …, n;

j = 1, 2, …, n;

k = 1, 2, …, m

C0: Depot

C1, C2, …, Ci, …, Cn: Customers

T1, T2, …, Tk, …, Tm: Trucks

M: Maximum truck capacity

Di: Demand of Ci,

where 0 < Di < 100, ∀i

Eij: Edge between Ci and Cj,

where i ≠ j, ∀i,j

Rk: Route of Tk,

which is a combination of Eijs

Wij: Weight of Eij,

where 0 < Wij < 200, ∀i,j

Wk: Total weight of Rk, the sum

of Wijs that belongs to Eijs

which are consisting Rk

C(Wk): Total cost function,

𝐶(𝑊𝑘) =∑ 𝑊𝑘

𝑚

𝑘=1

Minimize total cost function:

min∑𝑊𝑘

𝑚

𝑘=1

3. Solution Algorithm

A 2-phase heuristic algorithm is used for solution. In first phase customers are assumed as nodes and they are assigned into a cluster. In second phase all clusters are routed inside and minimized total weights of each route are computed. Then total cost function is calculated as sum of total weights of all routes.

First phase algorithm works as:

1. Sort all customer according to their angle with ascending order.

2. Then add sorted customers in order into a cluster and subtract the added customer’s demand from the maximum truck capacity.

3. If remaining truck capacity is less than the added customer’s demand, remove back that last added customer from the cluster.

4. Then create a new cluster and add the removed customer into new cluster and continue to add sorted customers in order.

5. Check step 3 after each addition operation and repeat steps 3 and 4 until all customers assigned into a cluster.

Figure 3: Phase 1, clustered graph scheme

Page 4: A feasible solution algorithm for a primitive vehicle routing problem

4

Second phase algorithm works as:

1. Start with first cluster. Add depot to the cluster route as starting point. Add all customers into an adjacent list. Then sort all customers in the cluster with respect to their distances from the depot in ascending order.

2. Select the closest customer and assign it as current customer. Add current customer to the cluster route. Add its distance from the depot to total weight of route. Then mark current customer as visited.

3. Search in adjacent list except the ones marked as visited. Find the closest adjacent to current customer and assign it as next customer. Add next customer to the cluster route. Add distance between next customer and current customer to total weight of route. Then assign next customer as current customer. Then repeat this step until all adjacent list marked as visited.

4. After all adjacent list is visited. Add depot to the cluster route as finishing point. Add depot distance from the current customer to total weight of route.

5. Apply first four steps to all clusters. Then sum all total weight of routes and find total cost function value.

Figure 4: Phase 2, routed graph scheme

4. Simulation Results

Average results are obtained over 1000 simulations for each different case, for maximum truck capacity 500.

Table 1: Results for Maximum Truck Capacity 500

#*

Multiple Route Single Route

Cost Time #** Cost Time

10 532 1,6 6 496 1,9

20 1083 2,2 7 686 2,7

50 2438 4 8 1087 4,1

100 4954 7,8 8 1520 8,3

200 9996 13,1 9 2130 20

500 23811 30,2 9 3243 73,9

1000 40832 62,1 9 4523 235

10000 162200 654 9 12885 17515

Average results are obtained over 1000 simulations for each different case, for maximum truck capacity 5000.

Table 2: Results for Maximum Truck Capacity 5000

#*

Multiple Route Single Route

Cost Time #** Cost Time

10 509 1,9 10 496 1,7

20 682 2,4 20 686 2,7

50 1070 4,4 50 1087 4,4

100 1692 8,3 65 1520 8,4

200 3168 16 83 2130 19,6

500 7907 39,1 85 3243 76,4

1000 15425 77,9 93 4523 225

10000 68479 817 97 12885 16330

* Number of customers

** Number of customers per route

Since the time complexity of overall

algorithm 𝑇(𝑛,𝑚) = 𝑂(𝑛2

𝑚). This algorithm

performs approximately under linear time

complexity

Page 5: A feasible solution algorithm for a primitive vehicle routing problem

5

5. Conclusion

Graph 1: Cost minimization comparison

Graph 2: Computation time comparison

As seen in Graph 1, while number of customers is getting larger, multiple route algorithm’s cost minimization performance gets worse in comparison with single route algorithm for maximum truck capacity 500. However, if truck capacity increased (i.e. to 5000), multiple route algorithm’s performance gets significantly much better.

As seen in Graph 2, while number of customers is getting larger, multiple route algorithm’s cost minimization performance gets so much better in comparison with single route algorithm for maximum truck capacity 500. Also when truck capacity increased, there is be no significant increment in computation time of multiple route algorithm.

Although, the offered algorithm has very successful time complexity, its cost minimization performance is not good enough. Therefore, addition of 2-opt algorithm to the end of this algorithm as third step, may lead a significant improvement in its cost minimization performance also.

6. References

[1] Vehicle Routing Problem. (available on 31 December 2015). Retrieved from http://neo.lcc.uma.es/vrp/