A Capacitated Vehicle Routing Problem with Toll-by ... - Springer Link

9 downloads 0 Views 219KB Size Report
Different from most toll rules, toll-by-weight allows the charging rates on some ... problem (CVRP) which considers the toll-by-weight rule, and the objective is to.
A Capacitated Vehicle Routing Problem with Toll-by-Weight Rule Chenghao Shen, Hu Qin , and Andrew Lim

Abstract. Most literature on min-cost network flow problems such as shortest path problem (SPP), traveling salesman problem (TSP), vehicle routing problem (VRP), assumes that the rate of any arc is constant. However, this assumption may not be true for some real applications occurring in China due to the toll-by-weight rule. Different from most toll rules, toll-by-weight allows the charging rates on some arcs to vary with vehicle’s total weight. Obviously, the min-cost path between two nodes may vary as the actual load of the vehicle changes when toll-by-weight rule is considered. In this work, we study a new variation of capacitated vehicle routing problem (CVRP) which considers the toll-by-weight rule, and the objective is to minimize the total transportation cost involved. To solve this problem, we implemented a simulated annealing (SA) algorithm and the results of extensive experiments showed the effectiveness of this algorithm.

1 Introduction Most min-cost network flow problems in literature such as shortest path problem (SPP), traveling salesman problem (TSP), vehicle routing problem (VRP) assume that the rates associated with the network arcs are constant. However, this assumption may not always be true. For example, as of Jun 2007, about 20 provinces in China have put toll-by-weight rule into practice, which allows the charging rate to Chenghao Shen and Andrew Lim School of Computer Science and Engineering, South China University of Technology, Guangzhou, P.R. China e-mail: [email protected] Hu Qin and Andrew Lim Department of Management Sciences, City University of Hong Kong, Tat Chee Ave, Kowloon Tong, Hong Kong e-mail: [email protected], [email protected] 

Corresponding author.

B.-C. Chien and T.-P. Hong (Eds.): Opportunities and Challenges, SCI 214, pp. 311–316. c Springer-Verlag Berlin Heidelberg 2009 springerlink.com 

312

C. Shen et al.

vary with vehicles’ total weights. This example demonstrates that investigating network problems with non-constant arc rate has great practical value in China. In this paper, we study a capacitated vehicle routing problem (CVRP) with toll-by-weight rule (CVRPW), which can be described as follows: (1) The objective is to minimize the total transportation cost involved, which comprise two parts, vehicle cost and toll-by-weight. (2) There is only one depot and each vehicle starts from the depot, serves a set of customers and returns to the depot. The total demand of customers served by one vehicle must not exceed its capacity. (3) Both the capacity of the vehicle and the demands of all customers are measured by weight. (4) All vehicles have the same capacity and the number of vehicles is unlimited. (5) After serving one customer, the vehicle unloads customer’s goods and the corresponding weight is deducted from its total weight. (6) All customers have to be served exactly once. The charging rule is represented by expression (1). Cv (d) = α ∗ d is the vehicle cost including expenditure of oil, driver and so on, where d denotes the length of the travel distance and α denotes the vehicle cost per kilometer. T (w, d) is the cost resulted from toll-by-weight charged based on the vehicle’s total weight w and the travel distance d. T (w, d) may be different in different highways. To explain this point, we take two highways, Ronghuxi highway and Xiangjin highway in Hubei province as examples. Expression (2) is the toll-by-weight rule for Ronghuxi highway and expression (3) is for Xiangjin highway, which are both illustrated in Figure 1(a) by curves. C(w, d) = Cv (d) + T (w, d) ⎧ 0.75d ⎪ ⎪ ⎨ 0.15wd T (w, d) = 1 7 w2 + 40 w − 18 )d ⎪ (− 800 ⎪ ⎩ (0.075w + 1.875)d

if w < 5 if 5 ≤ w < 10 if 10 ≤ w < 40 if w > 40

6 Ronghuxi Highway Xiangjin Highway

toll-by-weight per kilometer

5

100

km

S1

100

km

4

Depot

C

S2

110

2

km

1

0

110km

100km

3

1

m 20k

S3 0

10

20

30

40

50

Weight

(a) Toll-by-weight per k ilometer

(b) Three paths between Depot and Customer C

Cost (a=5)

Toll-by-weight

5t

20t

50t

5t

20t

50t

Expression 3

575

788

1063

p 1: Depot -> S1 -> C

1150

1576

2126

Depot - S2

Expression 3

575

788

1063

p 2 : Depot -> S2 -> C

1180

1549

2026

Depot - S3

Expression 4

605

761

963

p 3 : Depot -> S3 -> C

1265

1591

2013

S1 - C

Expression 3

575

788

1063

S2 - C

Expression 4

605

761

963

S3 - C

Expression 4

660

830

1050

(c) The cost for the highway in different weight

Path

Cost(a=5)

Highway Depot - S1

- When the demand is 5t, p1 is the best path - When the demand is 20t, p2 is the best path - When the demand is 50t, p3 is the best path (d) The cost for the three paths in different weight

Fig. 1 Toll-by-Weight per kilometer

(1)

(2)

A Capacitated VRP with Toll-by-Weight Rule

Depot

60

60

10t

km

70k

D 70k m

b) Solution 1

a) Netw ork Solution

Distance

Cost

1

350

2659

2

370

2543

10t

20t C

m

60

m

Depot

20t

km

40k

A

m

m

km

km

km 60

60 D

70km

20t

20t

km

m

40k

C A

60k

km

20t

60

C

80 km

80 km

60

km

km

20t

10t

B

50

50

A

B 10t

10t

40k

B

313

D 70k

m

10t

Depot

c ) Solution 2

Note : The vehicle cost is charged 5 per kilometer The toll-by-w eight is charged as expression (2)

Fig. 2 A simple highway network

⎧ 0.5d ⎪ ⎪ ⎨ 0.1wd T (w, d) = 7 1 (− 1 w2 + 60 w − 12 )d ⎪ ⎪ ⎩ 1200 (0.05w + 1.25)d

if w < 5 if 5 ≤ w < 10 if 10 ≤ w < 40 if w > 40

(3)

Let us consider a simple case shown in Figure 1(b) in which there is only one customer C and three nodes S1 S2 and S3 , which represent the crosspoints of different highways. We can easily find that between Depot and C, there are three paths p1 , p2 and p3 available. In the classical CVRP problem, the shortest path from Depot and customer C is p1 . However, when the toll-by-weight rule is considered, the best path from Depot to C varies according to the actual weight of the vehicle. Shown as Figure 1 (b) and (c), given the vehicle cost is 5 per kilometer, we can find when the customer demands change, the associated min-costs route also changes. Figure 2 shows an example with two vehicles and four customers. If we adopt constant rate, solution 1 is the better one and whereas if toll-by-weight rule is adopted, solution 2 becomes better in terms of the overall transportation cost. Since the classical VRP is NP-hard, the CVRPW is obviously NP-hard. If only one vehicle and one customer are considered, our problem becomes a shortest path problem with the toll-by-weight rule, which has already been studied in [1]. If we fix the rates for all network arcs, the problem actually is a standard CVRP which has be extensively studied for many decades. The book edited by P. Toth and D. Vigo [2] collects many of the known methods and results regarding CVRP.

2 Calculating Cost between Two Nodes In the algorithm we will introduced in next section, calculating the min-cost path of two nodes as long as the weight of the vehicle is changed is unrealistic since it may consume considerable computational time. To deal with this, we propose an approximate way described as follows: discretize the weight range at a given precision and calculate the min-cost path for each node pair and each value of the weight. For example, you can discretize the weight range [0, 3] into a discrete number set A = {0, 1, 2, 3}. Then, calculate the min cost-path for all values in A and store these

314

C. Shen et al.

paths into one table. When you need the min-cost path for weight 1.2, which lies in [1, 2] and is close to 1, you can just use the min-cost path for weight 1. If the weight is 1.8, you can use the min-cost path for weight 2. If higher precision is required, more computational time will be spent as well.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Data: C is the list of customers to be inserted Result: Solution S create an empty solution S; while C is not empty do randomly choose a customer c, and delete it from C ; minCost ← ∞, bestR ← null; foreach Route r in the current solution S do keep the order of the customers in r, try to insert c into r at a place with the lowest insertion cost e; if e < minCost then minCost ← e, bestR ← r end end create a new route r’ to server customer c with cost e’.; if e < minCost then add Route r to current solution S; else insert c into bestR end

Algorithm 1. The randomized insertion algorithm

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Data: S the initial solution Data: T0 , Te the initial and termination temperature Data: c the cooling ratio 0 < c < 1 Data: K the max successful operations at given temperature Data: N the max attempts at given temperature Result: best the best solution found t ← T0 ; best ← S; while t > Te do i ← 0, n ← 0; while i < K and n < N do randomly choose routes r1 and r2 from S; if r1 = r2 then apply the operation within route; else apply the operation between routes; if S is changed then cc ← the change of the total cost on S ; if cc < 0 then accept the change to S; try to update best, if S is better ; else μ ← cc/ f (S) ; accept the changes with a probability e−μ /t , otherwise undo changes; end end if S is changed then i ← i + 1; n ← n+1 ; end t ← t ·c ; end

Algorithm 2. The Simulated Annealing algorithm

3

Solution Procedures–Simulated Annealing Algorithm

To solve this problem, we have developed a tabu search (TS) algorithm and a simulated annealing (SA) algorithm. But from the results of the experiments we found that the SA dominated over TS in terms of solution quality and computation speed. Due to the space limitations, we only expose a part of the results. We use a randomized insertion (RI) algorithm to construct initial solutions. This insertion algorithm tries to insert customers one by one into the best position of the current solution

A Capacitated VRP with Toll-by-Weight Rule

315

until all the customers are served. Details of the insertion algorithm are exposed in Algorithm 1. In our simulated annealing algorithm shown in Algorithm 2, we use some neighborhood operators called generalized n-op operators proposed by [3] for VRPTW, which are:(1) Move a sub-route from one route to a different random location on the same route; (2) Move a sub-route from one route to a random location on one of other routes; (3) Swap two disjoint sub-routes on the same route; (4) Swap a sub-route from one route and another sub-route from another route; (5) Reverse a sub-route in one route. The length of the sub-routes is randomly selected from the range [0, M], where M is the maximal length of the sub-routes. According to some pilot experiments we observed that M = 3 or 4 could provide good results.

4 Experiments and Conclusion As we did not find benchmark problems in the literature associated with our problem, we only tested the performance of our algorithm based on our self-generated instances. For all instances, data that they require are: charging rules, highway length and customer demand. We obtained Chinese highway network structure and associated distance data from [4] and then we randomly classified all highways into three types: close type highway, open type highway and free highway. According to the requirements in an official guiding document [5] issued by Chinese Communication Ministry, the toll-by-weight charging rules in three types of highways are specified as follows: Open Type To (w, d): If w ≤ 20, the vehicle is charged by β per kilometer per ton; if 20 < w ≤ 40, the former 20 ton is charged as To (20, d), and the left weight (w − 20) is charged by δ per kilometer per ton, where δ is a rate that linearly decreases on weight from β to 0.8β ; if w > 40, the former 40 ton is charged as To (40, d), and the left weight (w − 40) is charged by 0.8β per kilometer per ton. Close Type Tc (w, d): If w ≤ 20, the vehicle is charged by β per kilometer per ton; if 20 < w ≤ 40, the former 20 ton is charged as Tc (20, d), and the left weight (w − 20) is charged by δ per kilometer per ton, where δ is a rate that linearly decreases on weight from β to 0.5β ; if w > 40, the former 40 ton is charged as Tc (40, d), and the left weight (w − 40) is charged by 0.5β per kilometer per ton. Free Type T f (w, d): T f (w, d) = 0 Rate β for each highway was randomly generated from U[0.02, 0.1], where U[a, b] denotes the uniform distribution in the interval [a, b]. The number of customers were taken from the data set {100, 200, 300, 400, 500}, thereby we have five types of instances. Then, we randomly selected some nodes in highway network as customer locations and the customer demands were randomly selected from U[0.5, 10]. We generated six instances for each type and therefore 30 instances entirely. We implemented our SA algorithm with Java and ran all experiments on a desktop with 2.2GHz AMD Duo and 2 GB RAM. As RI is the initial solution for SA, we take it as a baseline of improvement. Observed from the results in table 1, we

316

C. Shen et al.

Table 1 Experimental results n 100

200

300

400

500

1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6

RI Objective 742727 670308 680410 805910 853661 727444 1615711 1356250 1484392 1532161 1611121 1385114 2396134 2034065 2233764 2368512 2519571 2050262 3081097 2852013 3001713 3162125 3295919 2781891 3795836 3625957 3782834 3992848 4213092 3399905

Objective 403248 322205 329755 461138 511263 334218 819416 578247 627643 796394 844256 601520 1131241 855802 884571 1167541 1243520 791984 1442774 1120581 1166162 1598037 1636382 1070926 1764981 1384036 1435840 1961578 2030622 1283921

SA Improvement 45.71% 51.93% 51.54% 42.78% 40.11% 54.06% 49.28% 57.36% 57.72% 48.02% 47.60% 56.57% 52.79% 57.93% 60.40% 50.71% 50.65% 61.37% 53.17% 60.71% 61.15% 49.46% 50.35% 61.50% 53.50% 61.83% 62.04% 50.87% 51.80% 62.24%

Time 99 94 91 61 88 64 131 108 100 96 132 116 152 157 178 146 125 224 164 162 181 164 149 205 217 220 233 195 226 209

Objective: best known objective value; Improvement = (RI Objective - SA Objective)/RI Objective;

can easily find that SA can improve the quality of solution from 40.11% to 62.24% compared with the solutions generated simply by RI, which shows that this SA algorithm can provide the practitioners with relative high quality solutions. In this paper, we studied a capacitated vehicle routing problem with toll-byweight (CVRPW) rule. This is a variation of VRP, which has great practical value in China. After analyzing this problem, we implemented a simulated annealing algorithm to solve to it. The experiments showed that the SA algorithm was able to produce relatively high-quality solutions.

References 1. Chen, X., Li, J.: Design and implementation of vehicle routing optimization system based on toll-by-weight. MIE of China 17, 69–72 (2007) 2. Toth, P., Vigo, D.: The Vehicle Routing Porblem. SIAM, Philadelphia (2001) 3. Osman, I.H.: Metastrategy simulated annealing and tabu search algorithms for the vehicle routing problem. Annals of Operations Research 41, 421–451 (1993) 4. China map data posted on webmap, http://sms.webmap.cn/xq.asp?dbid=127 5. Document of chinese communication ministry (Website, 2005), http://www.wzjt.gov.cn/dzzf/jtfg/jtgf/06092001203803223.htm

Suggest Documents