Approximation Algorithms for the Maximum Profit Pick-up Problem with Time Windows and Capacity Constraint
AApproximation Algorithms for the Maximum Profit Pick-upProblem with Time Windows and Capacity Constraint ∗ Bogdan Armaselu and Ovidiu Daescu Department of Computer Science, The University of Texas at Dallas, Richardson, TX USA { bxa120530, daescu } @utdallas.edu Abstract
In this paper, we study the Maximum Profit Pick-up Problem with Time Windows andCapacity Constraint (MP-PPTWC). Our main results are 3 polynomial time algorithms, allhaving constant approximation factors. The first algorithm has an approximation ratio of (cid:39) /
60 + α √ p ) (cid:15) ) log T , where: (i) (cid:15) > T are constants; (ii) The maximumquantity supplied is q max = O ( n p ) q min , for some p >
0, where q min is the minimum quantitysupplied; (iii) α > √
10 + p/α . The second algorithm has an approximation ratio of (cid:39) (cid:15) + (2+ α ) (cid:15) √ p ) log T .Finally, the third algorithm has an approximation ratio of (cid:39) (cid:15) ) log T . While ouralgorithms may seem to have quite high approximation ratios, in practice they work well and,in the majority of cases, the profit obtained is at least 1/2 of the optimum. Keywords . Maximum profit · pick-up · time window · capacity constraint · vehicle routing The Maximum Profit Pick-up Problem with Time Windows and Capacity Constraint (MP-PPTWC) is stated as follows. We are given a certain product with a unit price of 1, and set of n suppliers (or sites), each site i being specified by its coordinates ( x i , y i ) in the plane and aninterval [ e i , l i ] called ”time window”. A vehicle can only visit a site i during its time window[ e i , l i ]. If a vehicle reaches a site i at a time t < e i , it has to wait until time t = e i . The values e i , l i are assumed to be integers in the interval [0 , T ], where T is a given constant. Each site i has a constant quantity q i of the product available. We are also given a depot D and a vehicletype with a capacity of Q , and unit fuel consumption. The unit price of fuel is also assumedto be 1. The distance d ij (in km) between suppliers i and j is given by some metric. Thenetwork consisting of all sites and the depot is considered a complete graph. On every edge ofthe graph, all vehicles are assumed to travel at the same speed s v . This makes sense since thepoint-to-point trips, in real world, are composed of mutiple road segments, and have roughlythe same average road conditions overall. The time needed to load the supplies is assumed tobe 0. Let c ij = d ij denote the traveling cost from site i to site j , and t ij = d ij /s v denote thetraveling time from i to j . The number of vehicles is unlimited. Each vehicle k is to be given aroute r k , starting and ending at D , so that it can collect a quantity of min { Q, (cid:80) i ∈ r k q i } . The ∗ This research was partially supported by NSF award IIP1439718 and CPRIT award RP150164 a r X i v : . [ c s . D S ] D ec outes r k must be vertex disjoint (except for the depot D ). That is, only one vehicle is allowedto cisit a site. The goal is to find m and a set of m routes r , . . . r m for m vehicles, such thatthe total profit P is maximized, where P = (cid:80) mk =1 ( (cid:80) i ∈ r k q i − (cid:80) ( i,j ) ∈ r k c ij ).Note that this pick-up problem we study is different from the well-known delivery problem,where vehicles are required to deliver certain quantities to certain stations and the goal is tominimize the costs. To the best of our knowledge, there is no previous work done on the pick-upproblem with the goal to maximize the profit, studied in this paper.The obvious application of this problem is decision making for profit maximization of acertain industry. However, it can be used in many other fields, such as public transportation.Stops and depots are fixed, all routes have unit ticket price, and the goal is to assign routes tomaximize the total profit (total revenue minus total fuel costs).The problem is an extension of the Traveling Salesman Problem (TSP), which is known tobe strongly NP-hard. Hence, MP-PPTWC is also a strongly NP-hard problem. Moreover, it isshown in [20] that finding a feasible solution for a vehicle routing problem with time windowsis NP-hard in the strong sense, even for only one vehicle. Even though any generalization of TSP is NP-hard, approximation schemes have been foundfor most of them. Currently, the best approximation algorithm known for the general metricTSP problem is the one given by Christofides [7], which has an approximation ratio of 3 /
2. In2000, Arora et. al presented an O ( n (log n ) O ( c ) )-time, (1 + 1 /c ) approximation ratio algorithmfor the planar version of the Euclidean TSP [1], using a randomized algorithm. They also showhow to extend their algorithm for the d -dimensional case, in which case their running timeincreases to O ( n (log n ) O (( √ dc ) d − ) ).In 1994, Fisher studied the VRP problem [13], in which there are no time windows, all of the m vehicles have an equal capacity Q , there is only one depot for all vehicles, and each customer i is specified by its coordinates in the plane and the demand q i of the product. They gave anear-optimal iterative algorithm for the problem, using an iterative lagrangian relaxation ofthe constraints. In each iteration, a minimum K-tree approach is used to obtain a relaxation,in polynomial time.In 1995, Fisher et al [14] studied the VRPTW problem, which is the same as VRP, but withtime windows [ e i , l i ] and different capacity constraints Q j for the vehicles. They show how toadapt their algorithm in [13] to work for this problem, and they also give another approachusing linear programming.Perhaps the most relevant problem related to the one that we study is the Multi-DepotVehicle Routing Problem with Time Windows and Multi-type Vehicle Number Limits [23]. Themain difference is that the goal is to minimize the number of vehicles used (if the problem isfeasible) or maximize the number of customers visited on time (if the problem is not feasible).The problem was solved by Wang et. al in 2008 using a genetic algorithm approach [23].However, their algorithm is iterative, and has no approximation ratio guaranteed.Pick-up Routing Problems have also been studied. Phan et. al [19] consider the Pick-up andDelivery Problem with Time Windows and Demands. Their optimum criteria are: minimizingtotal traveled distance, minimizing number of vehicles used and maximizing revenues. Thedifference in our case is that our optimum criterion is maximizing the profit (i.e. revenueminus cost), rather than just revenue. Jih et. al [16] study the Pickup and Delivery Problemwith Time Window Constraints. The goal of the problem the problem is to minimize boththe total traveling time and the total waiting time. Both [19] and [16] give genetic algorithmapproaches. Exact algorithms for Pick-up Routing Problems, that run in exponential time,have been given by Dessouki et. al [11]. n the Prize-Collecting TSP, the goal is to minimize the traveling costs while maximizingthe payout. Balas et al [2] combine these criteria into a single objective, namely to minimize theexpenses (i.e. traveling costs minus payout), while obtaining at least a given quota in reward.The differences from our problem are that: we do not have a reward quota to meet, there aremultiple vehicles, capacity constraint, and the problem is to pick up the goods, not to deliver.Recently, an approximation algorithm for the Deadline-TSP problem was given by Bansalet. al [3]. In the Deadline-TSP problem, we are given n sites, where each site i has a deadline D i , and we want to find a tour that maximizes the number of sites that can be visited. Thealgorithm that they give has an approximation ratio of O (log n ). They also show how toextend it to the more general Vehicle Routing with Time Windows problem, in which thereare m vehicles and sites also have release times. For this problem, they give an algorithm withan approximation ratio of O (log n ). Finally, they give an O (log(1 /(cid:15) ))-approximate algorithmfor the (cid:15) -relaxed version of the problem, in which we are allowed to extend the deadlines by afactor of 1 + (cid:15) .Several other variations of vehicle routing with time windows have been studied, includingVehicle Routing with unlimited number of vehicles [10, 15]. We first list the assumptions that need to hold in order for our approximation algorithms tohold.
Assumption 1 . If q min , q max are the minimum (resp. maximum) non-zero rewards, then q max ≤ Q and q max = O ( n p ) q min , for some p > Assumption 2 . ∀ i, j, c ij ≤ (cid:15)q j , for some (cid:15) > Assumption 3 . The optimal number of vehicles is always m ∗ ≥ √
10 + p/α , for some α > O ( n p ) time algorithm that has an approximation ratio of 16 ln 2 · (1 + π )(1 + (71 /
60 + α √ p ) (cid:15) ) log T (cid:39) /
60 + α √ p ) (cid:15) ) log T , where T is the latest timeof any time window. The algorithm relies on a novel APX for bin packing, as well as a novelTime Window-TSP approach.The second algorithm also runs in time O ( n p ), but uses an APTAS for bin packing andhas an approximation ratio of 46(1 + (cid:15) + (2+ α ) (cid:15) √ p ) log T .Finally, the third algorithm uses well-separated pair decomposition (rather than bin-packing) to split the set of sites into a sequence of pairs of subsets. Each vehicle is assigned oneof these subsets, then a routing is computed for each vehicle. The running time is O ( s n p )and the approximation ratio is 11(1 + π s )(1 + 2 (cid:15) (1 + 1 / (1 + s ))) log T , where s > s ≥
5, this is better than the second algorithm, regardless of the values of (cid:15) and p . As n → ∞ , the approximation ratio is (cid:39) (cid:15) ) log T (and the running time is O (min n p , n p )).We leave as open problems proving approximation bounds for a few, more general versionsof the problem. We describe our three algorithms for MP-PPTWC. .1 Algorithm 1 Let q i be the fixed quantity supplied by site i . We first decompose the set of sites into subsets,using a Bin Packing approximation algorithm, with q , . . . , q n as input item sizes, and Q asinput bin volume. Suppose the algorithm divides the set { , . . . , n } into a sequence of m subsets S k = { S k , . . . , S ks k } , k = 1 . . . m . For Bin Packing, we use the modified First-Fit Decreasingstrategy in [9]. We consider m vehicles, and for each vehicle k , we assign a subset S k of sitesto be visited, then do the following: . Find a route R k that maximizes the total payout P k = (cid:80) i ∈ R k −{ D } q i , using the bi-criteria algorithm in [3]. . For every j such that t kj / ∈ [ e j , l j ], we remove j from the route. If j (cid:48) , j (cid:48)(cid:48) are the predecessor,respectively, the successor of j in R k , we add an edge j (cid:48) − > j (cid:48)(cid:48) to R k .We now analyze the performance of our algorithm. Let m ∗ be the optimal number ofvehicles needed. For every vehicle k , let d ∗ k denote the optimal length of any tour that visitsall sites in S k starting and ending at D , and d ∗ the optimal total length of any set of m ∗ suchtours (over all possible S k ’s).The first two lemmas give a bound on the ratio between the total distance traveled by therouting output by the algorithm, and the optimal total distance. Lemma 1 . (cid:80) mk =1 d ∗ k ≤ mm ∗ (1 + π ) d ∗ . Proof . Consider each subset S k . First suppose all sites lie on a circle of radius r centeredat the depot, and sites define a regular polygon of length l . It is easy to see that (cid:88) k d ∗ k ≤ m (( n − m ) l + 2 r ) , (1)since the optimal tour for any S k is the regular polygon formed by the sites, plus another 2 r to connect the depot. On the other hand, one can see that d ∗ ≥ m ∗ r + ( n − m ∗ ) l, (2)as the optimal m ∗ tours are formed by disjoint chains of the regular polygon, plus 2 rm ∗ toconnect the depot in each tour. See figure 1 for an illustration. We therefore get, in this case, (cid:80) mk =1 d ∗ k d ∗ ≤ m (( n − m ) l + 2 r )2 m ∗ r + ( n − m ∗ ) l = 2 mr + ml ( n − m )2 m ∗ r + l ( n − m ∗ ) (3)From l = 2 r sin( π/n ) ≤ rπ/n , we get (cid:80) mk =1 d ∗ k d ∗ ≤ mr (1 + π − πm/n )2 m ∗ r (1 − π/n + π/m ∗ ) ≤ m (1 + π ) m ∗ . (4)Now suppose we add a site i that is not on the circle. We want to prove that the approximationratio is even less in this case. Indeed, (cid:80) mk =1 d k increases by a + b − ml , where a, b are thedistances to the closest two sites in some S k . On the other hand, d ∗ increases by a + b − l ,where a , b are the distances to the closest two sites on the circle. It is easy to check that a + b − ml ≤ ( a + ( m − / l ) + ( b + ( m − / l ) − ml = a + b − l. (5)Since i is arbitrarily chosen, it follows that in any other configuration of the sites the approxi-mation ratio is at most as large. That is, m (cid:88) k =1 d ∗ k ≤ mm ∗ (1 + π ) d ∗ (6) igure 1: All sites are vertices of a regular polygon centered at the depot. Sites are divided into 3 subsets.The optimal routing for the given division of the sites is displayed. If we add a site i , the length of therouting increases by a + b − ml .holds in any possible scenario. Lemma 2 . (cid:80) mk =1 d ∗ k ≤ (71 /
60 + α √ p )(1 + π ) d ∗ . Proof . The First-Fit-Decreasing approach in [9] yields a number of bins m ≤ / m ∗ + 1,where m ∗ is the optimal number of bins. By Assumption 3, we get m ≤ m ∗ (71 /
60 + α √
10 + p ) . (7)Plugging mm ∗ into the equation in Lemma 1, we get m (cid:88) k =1 d ∗ k ≤ (71 /
60 + α √
10 + p )(1 + π ) d ∗ . (8) he following lemma gives an upper bound on the ratio between the optimal profit obtain-able by a route on a given set S k and the actual profit obtained by our algorithm. Lemma 3 . For every vehicle k , Algorithm 1 computes a route R k with a revenue P k ≥ P ∗ k T (1+ (cid:15) ) , where P ∗ k is the revenue obtained by an optimal route within S k . The runningtime is O ( n ). Proof . In step 1, the bi-criteria approximation algorithm in [3] obtains a revenue of atleast σ k ≥ σ ∗ k T , (9)where σ ∗ k is the optimal revenue obtainable within S k . From Assumption 2, it follows that c ( k ) ≤ / (cid:15) (cid:88) i ∈ R k q i ≤ / (cid:15)σ k , (10)so the profit cannot increase if we remove sites with non-zero reward and replace them withother sites, such that the total distance is reduced. Hence, the profit of our computed R k is P k = σ k − c ( k ) ≥ σ ∗ k T · (1 − (cid:15)/ ≥ σ ∗ k T (1 + (cid:15) ) ≥ P ∗ k T (1 + (cid:15) ) . (11)The running time of the algorithm in [3], for each k , is O ( N k T log T ), where N k is the numberof vertices of G k . Since T is a constant and N k = O ( n ), this yields O ( n ) in our case. Allother running times are dominated by this one. Lemma 4 . Let ρ k be the reward obtainable by an optimal routing on S k , ∀ k , and ρ ∗ bethe reward obtainable by an optimal routing. Then (cid:80) mk =1 N k ≥ N ∗ . Proof . Let R (cid:48) = ∪ m (cid:48) k =1 R (cid:48) k be a routing that maximizes the total reward, and R k be arouting that maximizes the reward obtainable from S k , ∀ k = 1 . . . m . It is known [22] that anyBin-Packing algorithm will use at most 2 m ∗ bins, where m ∗ is the optimal number of bins.Therefore, m (cid:48) ≤ m . From R (cid:48) , we remove the sites from the m (cid:48) − m routes with fewest sitesto visit, and re-insert them into the m routes with the most customers. If capacity constraintsare violated, we leave out the least rewarding sites. For each such site removal and re-insertion,the number of sites that cannot be reached within their time window increases by at most one.For each vehicle, we construct the route such that the least rewarding site is left out. Since wemove at most n/ m (cid:88) k =1 ρ (cid:48) k ≥ ρ ∗ . (12)Since R k is optimal for vehicle k , we get m (cid:88) k =1 ρ k ≥ m (cid:88) k =1 ρ (cid:48) k ≥ ρ ∗ . (13)Using Lemmas 1-4, we can prove the following result. Theorem 5 . MP-PPTWC can be solved within an approximation ratio of 16 ln 2 · (1 +(71 /
60 + α √ ) (cid:15) )(1 + π ) log T (cid:39) /
60 + α √ p ) (cid:15) ) log T in O ( n ) time using Algorithm1. roof . Because of our Bin-Packing algorithm, we never use more than (71 /
60 + α √ p ) m ∗ vehicles, where m ∗ is the optimal number of vehicles. Since (by Lemma 2) the travel distanceis at most 1 + π of the optimal (for the same number of vehicles), we obtain a reward of π of the optimal due to traveling distance approximation. By Lemma 4, for each vehicle, ifwe used optimal reward-maximization algorithm, we would obtain at least 1 /
18 ln 2 log T (1+ (cid:15) ) of this amount using the approximate reward-maximization algorithm. Puttingit all together, we obtain at least11 + π · (cid:80) mk =1 P ∗ k (1 + (71 /
60 + α √ p ) (cid:15) )8 ln 2 log T ≥ π ) · P ∗ /
60 + α √ p ) (cid:15) ) log T (14)as profit, where P ∗ is the optimal profit. Hence, the approximation ratio is16 ln 2(1 + π )(1 + (71 /
60 + α √
10 + p ) (cid:15) ) log T. (15)The running time is dominated by the time needed to compute the approximate routes R k ,which, by Lemma 3, is O ( n p ). Algorithm 2 is the same as Algorithm 1, except it uses a different Bin Packing approach forpartitioning the set of sites into subsets. Namely, it uses the O ( n /η ) time Asymptotic PTASalgorithm in [9] that yields a number of bins not exceeding (1 + η ) m ∗ + 1, where m ∗ is theoptimal number of bins.We now analyze the performance of this algorithm. In this sense, we reuse the notations inLemmas 1-4, as well as Theorem 5. Lemma 6 . The Bin Packing step of Algorithm 2 yields a number of vehicles not exceeding(1 + α √ p ) m ∗ in O ( n p ) time. Proof . The APTAS Bin Packing algorithm yields a number of bins m ≤ (1 + η ) m ∗ + 1.Let η = √ p . Thus, m ≤ (1 + 2 √
10 + p ) m ∗ + 1 . (16)By Assumption 3, we get m ≤ (1 + 2 + α √
10 + p ) m ∗ . (17)The running time is O ( n /η ) = O ( n p ).The following lemma is a consequence of Lemma 1 and Lemma 6. Hence the proof isomitted. Lemma 7 . (cid:80) k d ∗ k ≤ (1 + α √ p ) · (1 + π ) d ∗ .Using Lemmas 2, 3, 4, 6 and 7, we prove the following result, using a similar argument asfor Theorem 5, but with different numbers. Theorem 8 . MP-PPTWC can be solved with an approximation ratio of 16 ln 2 · (1 + (cid:15) + (2+ α ) (cid:15) √ p )(1 + π ) log T (cid:39) (cid:15) + (2+ α ) (cid:15) √ p ) log T in O ( n p ) time using Algorithm 2. Proof . By Lemma 6, Algorithm 2 uses at most m ≤ (1 + α √ p ) m ∗ vehicles. By lemma2, we obtain a reward of π of the optimal due to traveling distance approximation. By emmas 3 and 4, for each set, we obtain at least
18 ln 2 log T (1+ (cid:15) ) of the optimal reward, usingthe approximate algorithm. Hence, we get a revenue of at least11 + π · (cid:80) mk =1 P ∗ k (1 + (1 + α √ p ) (cid:15) )8 ln 2 log T ≥ π ) · P ∗ (cid:15) + (cid:15) α √ p ) log T , (18)where P ∗ is the optimal profit. Therefore, the approximation ratio is16 ln 2(1 + π )(1 + (cid:15) + 2 + α √
10 + p (cid:15) ) log T. (19)By Lemmas 3 and 6, the running time is O ( n p ). . Let m = (cid:80) i =1 ...n q i Q and s > S with parameter s has m subsets . Compute the WSPD of S with parameter s into W = ( A , B ) , . . . , ( A m , B m ) . Sort W by | A i | + | B i | . For i = 1 to m doIf (cid:80) j ∈ A i q j > Q or R k − misses deadline of any sites from A i thenLabel A i as ”large”Else label A i as ”small”If (cid:80) j ∈ B i q j > Q or R k − misses deadline of any site from B i thenLabel B i as ”large”Else label B i as ”small” . Let k = 0 , C = ∅ . . For i = 1 to m doIf A i is a ”small” subset, thenassign A i to vehicle k and use the bi-criteria algorithm in [3] on (the complete graphof) A i to find an approximate route R k for vehicle k increment k and set C = C ∪ A i If C = S then stopIf B i is a ”small” subset, thenassign B i to vehicle k and use the bi-criteria algorithm in [3] on (the complete graphof) B i to find an approximate route R k for vehicle k increment k and set C = C ∪ B i If C = S then stop . Return k ∗ = k and the routes R ...k ∗ .It is easy to verify that any route R k computed by Algorithm 3 is based on a subset of sites A i ∈ W or B i ∈ W , for some i = 1 . . . m . Thus, all routes comprise a WSPD of the original setof sites. Moreover, R k does not violate any capacity constraints. Also, note that there are only k ∗ ≤ m = (cid:80) i =1 ...n q i Q vehicles used. This number of vehicles is always sufficient, regardless ofthe packing algorithm [12].We now analyze the performance of the algorithm. Let m ∗ the optimal number of vehiclesneeded. Recall that d ∗ k is the optimal length of any tour that visits all sites in S k starting andending at D , and d ∗ the optimal total length of any set of m ∗ such tours (over all possible S k ’s). emma 9 . (cid:80) mk =1 d ∗ k ≤ mm ∗ π s d ∗ . Proof . Suppose sites are vertices of a regular polygon centered at the depot, as in the proofof Lemma 1. Recall that we denoted by r the radius of the circumcircle of the sites, and by l the side of the polygon. By the WSPD property of the routing, the distance between any twosites of different subsets is at least s times the distance between any two sites from one of thesubsets. We thus have d ∗ ≥ ( n − m ∗ ) ls + 2 m ∗ r . Since l = 2 r sin( π/n ), we have d ∗ ≥ m ∗ r (1 + s sin( π/n )( n/m ∗ − . (20)On the other hand, m (cid:88) k =1 d ∗ k ≤ (( n − m ) l + 2 rs )(2 m ) ≤ mr (1 − m sin( π/n ) + n sin( π/n )) . (21)Hence m (cid:88) k =1 d ∗ k ≤ mm ∗ s − m sin( π/n ) + n sin( π/n )1 + s sin( π/n )( n/m ∗ − . (22)Since n/m ∗ >>
1, we have 1 + s sin( π/n )( n/m ∗ − > s. (23)Also, 1 − m sin( π/n ) + n sin( π/n ) < s + π. (24)Therefore, m (cid:88) k =1 d ∗ k ≤ mm ∗ (1 + π s ) d ∗ . (25) Lemma 10 . Using Algorithm 3, we get (cid:80) k ∗ k =1 d k ∗ ≤ π s ) d ∗ . Proof . It suffices to prove that k ∗ ≤ m ∗ . Then, Lemma 10 follows directly from Lemma 9.Suppose, on the contrary, that k ∗ > m ∗ . In other words, there is a packing of the quantitiessupplied at the sites into m ∗ bins of size Q . However, because of Step 4 of the algorithm, aWSPD with 2 m ∗ subsets would not cover the set of sites S and it would need more than 2 m ∗ subsets to cover S . That is, the bin packing computed via WSPD has an approximation factorgreater than 2, contradicting the result in [12].We are now ready to prove the following result. Theorem 11 . Algorithm 3 solves MP-PPTWC within an approximation ratio of 11(1 + π s )(1 + 2 (cid:15) (1 + s )) log T . It runs in O ( s n p ) time. Proof . Note that WSPD creates a sub-network of O ( s n i ) edges for each subset of size n i .Since Step 5 of the algorithm runs in O ( n pi E ) on a given graph G of n i nodes and E edges[3], where E is the number of edges in G , the running time is O ( s n pi ) per subset. Since thereare k ∗ = O ( n ) subsets, and (cid:80) k ∗ i =1 n i = n , we get a total running time of O ( s (cid:80) i =1 k ∗ n pi ) = O ( s ( (cid:80) i =1 k ∗ n i ) p ) = O ( s n p ). Using a similar argument as in Theorem 5, we get anapproximation ratio of (1 + π s ) + (cid:15) · (cid:80) mk =1 d ∗ k d ∗ π s ) · ρ TW , (26) igure 2: The GUI. Note that for all parameters of the problem, the GUI has a line with a label and atext field.where ρ TW is the factor given by the approximation ratio of the algorithm in Step 5. ByLemma 3, that would be 8(ln 2) log T (1 + (cid:15) ). However, since the input graph of Step 5 is an s − spanner , we get an additional travel cost factor of 1 + 1 / (1 + s ) Hence, ρ TW = 8(ln 2) log T (1 + (cid:15) (1 + 1 / (1 + s ))) (cid:39) . T (1 + (cid:15) (1 + 1 / (1 + s ))) . (27)Therefore, the overall approximation ratio is11(1 + π s )(1 + 2 (cid:15) (1 + 11 + s )) log T. (28) Note . For sufficiently large n , since s = O ( m ) = O (min n, n p ), we get an approximationratio of 11(1 + 2 (cid:15) ) log T , for a running time of O (min n p , n p ). We have implemented our first algorithm in JAVA, with Google Maps API, and simulated iton Google Maps.The customers’ locations are given as addresses. To find the point-to-point distances d ij ,we use Google Maps API to perform a Google Directions query from the address of customer i to the address of customer j . The travel times t ij are also given by the Google Direction query.The Google Directions are given in JSON format. The routing is displayed on the GoogleMaps by constructing, for each vehicle, a multi-leg Google Directions query (i.e. a sequenceof standard Google Direction queries with matching endpoints, except the start and the end igure 3: Routing for an instance where n = 10 is displayed with poly-lines of different colors on a GoogleMap. The depot is marked with red and supplier sites are marked with the colors of the routing visitingthem. points). In the resulting Google Map routing, only the paths are displayed on the map, thedirections are not written.Figure 2 shows the Graphical User Interface.Figure 3 shows the how the routing computed by our algorithm is displayed on GoogleMaps.We have tested our algorithms on a dataset of randomly generated problem instances.Tables 2 and 3 show, for each problem instance, the number of sites n , the maximumtime window T , the running time time , and the performance ratio ρ of Algorithm 1 (resp.,Algorithm 3, for s = 5). The values e i and l i for each site were sampled uniformly at randomin the intervals [0 , T / T / , T ]. Here the peformance ratio is defined as ρ = U/P ,where P and U are, respectively, the actual profit and the upper bound profit of the routingcomputed by the algorithm. These running times were obtained when running our program ona laptop with an Intel R (cid:13) Core I7-5500U processor at 2.40 GHz with 8 GB of RAM.Note that, in most cases, the approximation ratio is almost always below 2.5 for Algorithm2 and below 2 for Algorithm 3, which is much smaller than the respective upper bounds forboth algorithms. This reflects the average case scenario. In fact, for a given instance, the actualoptimum may be lower than the upper bound, so the approximation ratio is even smaller forthat instance. Moreover, the running time is also relatively fast in the average case, even forinstances with 50 sites (rarely the running time exceeds a few minutes on these cases). Thus,our algorithm is actually very practical.Also, note that the performance of Algorithm 1 is only slightly lower than that of Algorithm3, in most instances. This is mainly due to the fact that the total traveling cost is, on average,much lower than the theoretical upper bound, especially for non-negligible (cid:15) values (i.e. ratiobetween costof a route and its reward).Since these are the first algorithms for this particular problem, no comparison with otheralgorithms is needed. able 2 . The performance ratio and running time of Algorithm 1, when run on differentproblem instances.problem n P U ρ time (ms) T Dallas wood 10 10 66 117.5 1.78 299 15Austin tools 10 10 1497 2750 1.84 246 15Denver stone 10 10 153.6 307.2 2.0 41 12Phoenix glass 10 10 1662 3520 2.12 150 9Dallas wood 30 30 202.3 463 2.29 4766 15Austin tools 30 30 3338 5066 1.52 43006 15Denver stone 30 30 369 860 2.33 4422 12Phoenix glass 30 30 4518 8140 1.80 44498 9Dallas wood 50 50 282 570 2.02 278280 15Austin tools 50 50 4641 11747 2.53 20506 15Denver stone 50 50 551 1360 2.46 13392 12Phoenix glass 50 50 6749 16896 2.5 61992 9
Table 3 . The performance ratio and running time of Algorithm 3, when run on differentproblem instances.problem n P U ρ time (ms) T Dallas wood 10 10 66.9 117.5 1.77 167 15Austin tools 10 10 1540 2750 1.79 135 15Denver stone 10 10 144 307.2 2.13 65 12Phoenix glass 10 10 1640 3520 2.14 57 9Dallas wood 30 30 297 463 1.55 1584 15Austin tools 30 30 3640 5066 1.39 47890 15Denver stone 30 30 555 860 1.55 1871 12Phoenix glass 30 30 6250 8140 1.30 30480 9Dallas wood 50 50 491 570 1.16 38153 15Austin tools 50 50 9390 11747 1.25 45260 15Denver stone 50 50 805 1360 1.69 16376 12Phoenix glass 50 50 13500 16896 1.25 125458 9
We designed three approximation algorithms for the MP-PPTWC problem. We also imple-mented our algorithms and simulated the output of one of them using Google Maps.It remains as a future research problem to find approximation algorithms for more generalversions of MP-PPTWC, which we describe now.
One Vehicle per Supplier, Variable Supply (MP-PPTWC-VS) . A supplier may bevisited by at most one vehicle. The supply is variable and increases piece-wise linearly in time(under constant production rate ρ i > Many Vehicles per Supplier, Fixed Supply (MP-PPTWC-MFS) . A supplier maybe visited by more than one vehicle. The supply is fixed (production rate ρ i = 0) and thuspiece-wise constant in time. See figure 5 (left). Many Vehicles per Supplier, Variable Supply (MP-PPTWC-MVS) . A suppliermay be visited by more than one vehicle. The supply varies in time and is piece-wise linearlyincreasing (constant production rate ρ i > igure 4: Left: Standard version: One vehicle per supplier i , fixed supply. Some vehicle visits the supplierat time t i and picks up part of quantity q i . Right: Version VS: One vehicle per supplier i , supply varyingin time. Some vehicle visits the supplier at time t i and picks up part of quantity q i Figure 5:
Left: Version MFS: Many vehicles per supplier i , fixed supply. Some vehicles visit the supplierat times t i , t (cid:48) i and each picks up a part of the available quantity. Right: Version MVS: Many vehicles persupplier i , time-varying supply. Some vehicles visit the supplier at times t i , t (cid:48) i , t (cid:48)(cid:48) i and each picks up a part(or all) of the available quantity ote that our algorithms cannot be applied to these problems. First, the bin-packing stepassumes that the supplies are constant, which is not the case for the VS version. Second, thereward-maximization approach for each vehicle assumes that a site can be visited by one andonly one vehicle, so it does not work for the MFS, MVS versions. References [1] Arora, S.: Polynomial Time Approximation Schemes for Euclidean Traveling Salesmanand other Geometric Problems. J. ACM 45(5): 753-782 (1998)[2] Balas, E.: The prize collecting traveling salesman problem. Networks, 19:621636, 1989.[3] Bansal, N., Blum, A., Chawla, S., Meyerson, A.: Approximation Algorithms for Deadline-TSP and Vehicle Routing with Time Windows. In STOC’04[4] N., Blum, A., Chawla, S., Meyerson, A., Karger, D., Lane, T.: Approximation Algorithmsfor orienteering and discounted-reward tsp. In Proc. 44th Foundations of Computer Sci-ence, 2003.[5] Chang, Y., Chen, L.: Solve the Vehicle Routing Problem with Time Windows via a GeneticAlgorithm. In Discrete and Continuous Dynamical Systems Supplement 2007, pp. 240-249[6] Callahan, P. B. and Kosaraju, S. R.: A Decomposition of Multidimensional Point Setswith Applications to k-Nearest-Neighbors and n-Body Potential Fields. In Journal of theACM 42 (1): 6790[7] Christofides, N.: Worst-case analysis of a new heuristic for the traveling salesman problem.In Symposium on new directions and recent results in algorithms and complexity, page441. Academic Press, NY, 1976[8] Dantzig, G.B.; Fulkerson, D.R., Johnson, S.M.: Solution of a large-scale traveling salesmanproblem. In Operations Research, Vol. 2, pp.393410[9] de la Vega, F., Lueker, G.L.: Bin Packing can be solved within 1 + (cid:15) in linear time. InCombinatorica, 1:349-355, 1981.[10] Desrochers, M., Lenstra, J.K., Savelsbergh, M.W.P., Soumis, F.: Vehicle Routing withTime Windows: Optimization and Approximation. In Vehicle Routing: Methods andStudies, 1988[11] Dessouki, M., Lu, Q.: An Exact Algorithm for the Multiple Vehicle Pickup and DeliveryProblem. In Transportation Science 38(4): 503-514 (2004)[12] Dsa, G.: The Tight Bound of First Fit Decreasing Bin-Packing Algorithm IsFFD(I)(11/9)OPT(I)+6/9. In Combinatorics, Algorithms, Probabilistic and ExperimentalMethodologies, 4614/2007, Springer Berlin / Heidelberg, pp. 111[13] Fisher, M.L.: Optimal solution of Vehicle Routing Problems using Minimum K-Trees. InOprations Research, Vol. 42. No 4 (Jul - Aug 1994), pp. 626-642[14] Fisher, M.L., Jornstein, K.O., Madsen, O.B.: Vehicle Routing with Time Windows: TwoOptimization algorithms. In Operations Research, Vol. 45, No. 3, May-june 1997
15] Gendreau, M., Tarantilis, C.: Solving Large-Scale Vehicle Routing Problems with TimeWindows: The State-of-the-Art. In CIRRELT, 2010[16] Hsu, J. Y., Jih, W.: Dynamic Vehicle Routing Using Hybrid Genetic Algorithms. In ICRA1999: 453-458[17] Lau, H.C., Sim, M., Teo, K.M: Vehicle routing problem with time windows and a limitednumber of vehicles. In European Journal of Operations Research 148 (2003) 559-569[18] Miller, C.E.; Tucker, A.W., Zemlin, R.A.: Integer programming formulation of travelingsalesman problems. In Journal of Association for Computing Machinery, Vol. 7, pp. 3269[19] Phan, D.H., Suzuki, J.: Evolutionary Multiobjective Optimization for the Pickup andDelivery Problem with Time Windows and Demands (PDP-TW-D). In MONET 21(1):175-190 (2016)[20] SAVELSBERGH, M.W.P.: LOCAL SEARCH IN ROUTING PROBLEMS WITH TIMEWINDOWS. In Annals of Operations Research 4(1985/6), pp. 285 - 305[21] Dsa G., Sgall J.: First Fit bin packing: A tight analysis. To appear in STACS 2013.[22] Vazirani, Vijay V.: Approximation Algorithms (2003), Berlin: Springer, ISBN 3-540-65367-8[23] Wang, X., Xu, C., Shang, H.: Multi-depot Vehicle Routing Problem with Time Windowsand Multi-type Vehicle Number Limits and Its Genetic Algorithm. In IEEE 200815] Gendreau, M., Tarantilis, C.: Solving Large-Scale Vehicle Routing Problems with TimeWindows: The State-of-the-Art. In CIRRELT, 2010[16] Hsu, J. Y., Jih, W.: Dynamic Vehicle Routing Using Hybrid Genetic Algorithms. In ICRA1999: 453-458[17] Lau, H.C., Sim, M., Teo, K.M: Vehicle routing problem with time windows and a limitednumber of vehicles. In European Journal of Operations Research 148 (2003) 559-569[18] Miller, C.E.; Tucker, A.W., Zemlin, R.A.: Integer programming formulation of travelingsalesman problems. In Journal of Association for Computing Machinery, Vol. 7, pp. 3269[19] Phan, D.H., Suzuki, J.: Evolutionary Multiobjective Optimization for the Pickup andDelivery Problem with Time Windows and Demands (PDP-TW-D). In MONET 21(1):175-190 (2016)[20] SAVELSBERGH, M.W.P.: LOCAL SEARCH IN ROUTING PROBLEMS WITH TIMEWINDOWS. In Annals of Operations Research 4(1985/6), pp. 285 - 305[21] Dsa G., Sgall J.: First Fit bin packing: A tight analysis. To appear in STACS 2013.[22] Vazirani, Vijay V.: Approximation Algorithms (2003), Berlin: Springer, ISBN 3-540-65367-8[23] Wang, X., Xu, C., Shang, H.: Multi-depot Vehicle Routing Problem with Time Windowsand Multi-type Vehicle Number Limits and Its Genetic Algorithm. In IEEE 2008