Algorithms for Trip-Vehicle Assignment in Ride-Sharing

We investigate the ride-sharing assignment problem from an algorithmic resource allocation point of view. Given a number of requests with source and destination locations, and a number of available car locations, the task is to assign cars to requests with two requests sharing one car. We formulate this as a combinatorial optimization problem, and show that it is NP-hard. We then design an approximation algorithm which guarantees to output a solution with at most 2.5 times the optimal cost. Experiments are conducted showing that our algorithm actually has a much better approximation ratio (around 1.2) on synthetically generated data. Introduction The sharing economy is estimated to grow from $14 billion in 2014 to $335 billion by 2025 (Yaraghi and Ravi 2017). As one of the largest components of sharing economy, ride-sharing provides socially efficient transport services that help to save energy and to reduce congestion. Uber has 40 million monthly active riders reported in October 2016 (Kokalitcheva 2016) and Didi Chuxing has more than 400 million users(Tec 2017). A large portion of the revenue of these companies comes from ride sharing with one car catering two passenger requests, which is the topic investigated in this paper. A typical scenario is as follows: There are a large number of requests with pickup and drop-off location information, and a large number of available cars with current location information. One of the tasks is to assign the requests to the cars, with two requests for one car. The assignment needs to be made socially efficient in the sense that the ride sharing does not incur much extra traveling distance for the drivers or and extra waiting time for the passengers. In this paper we investigate this ride-sharing assignment problem from an algorithmic resource allocation point of view. Formally, suppose that there are a set R of requests {(si, ti) ∈ R : i = 1, . . . ,m} where in request i, an agent is at location si and likes to go to location ti. There are also a set D of taxis {dk ∈ R : k = 1, . . . , n}, with taxi k currently at location dk. The task is to assign two agents i and j to one taxi k, so that the total driving distance is as small as possible. The distance measure d(x, y) here can be Copyright c © 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. Manhattan distance (i.e., 1-norm), Euclidean distance (i.e., 2-norm), or distance on graphs if a city map is available. Here for any fixed tuple (k, {i, j}), the driver of taxi k has four possible routes, from the combination of the following two choices: he can pick agent i first or agent j first, and he can drop agent i first or drop agent j first. We assume that the driver is experienced enough to take the best among these four choices. Thus we use the total distance of this best route as the driving cost of tuple (k, {i, j}), denoted by cost(k, {i, j}). We hope to find an assignment M = {(k, {i, j}) : 1 ≤ i, j ≤ m, 1 ≤ k ≤ n} that assigns the maximum number of requests, and in the meanwhile with the cost(M) = ∑ (k,{i,j})∈M cost(k, {i, j}), summation of the driving cost, as small as possible. Here an assignment is a matching in the graph in the sense that each element in R∪D appears at most once in M . In this paper, we formulate this ride-sharing assignment as a combinatorial optimization problem. We show that the problem is NP-hard, and then present an approximation algorithm which, on any input, runs in time O(n) and outputs a solution M with cost(M) at most 2.5 times the optimal value. Our algorithm does not assume specific distance measure; indeed it works for any distance1. We conducted experiments where inputs are generated from uniform distributions and Gaussian mixture distributions. The approximation ratio on these empirical data is about 1.1-1.2, which is much better than the worst case guarantee 2.5. In addition, the results indicate that the larger n and m are, the better the approximation ratio is. Considering that n and m are very large numbers in practice, the performance of our algorithm may be even more satisfactory for practical scenarios. Related Work Ridesharing has become a key feature to increase urban transportation sustainability and is an active field of research. Several pieces of work have looked at dynamic ridesharing (Caramia et al. 2002; Fabri and Recht 2006; Agatz et al. 2012; Santos and Xavier 2013; Alonso-Mora et al. 2017), and multi-hop ridesharing (Herbawi and Weber 2011; Drews and Luxen 2013; Teubner and Flath 2015). That is, the algorithm only needs that d is nonnegative, symmetric and satisfies the triangle inequality. The Thirty-Second AAAI Conference on Artificial Intelligence (AAAI-18)

[1]  Martin W. P. Savelsbergh,et al.  Optimization for dynamic ride-sharing: A review , 2012, Eur. J. Oper. Res..

[2]  Gianpaolo Oriolo,et al.  Routing a Fleet of Vehicles for Dynamic Combined Pick-up and Deliveries Services , 2002 .

[3]  Tayfun Sönmez,et al.  Room assignment-rent division: A market approach , 2004, Soc. Choice Welf..

[4]  Xin Huang,et al.  Assignment and Pricing in Roommate Market , 2016, AAAI.

[5]  Christoph M. Flath,et al.  The Economics of Multi-Hop Ride Sharing , 2015, Bus. Inf. Syst. Eng..

[6]  Michael Weber,et al.  Evolutionary Multiobjective Route Planning in Dynamic Multi-hop Ridesharing , 2011, EvoCOP.

[7]  Yves Crama,et al.  Approximation algorithms for three-dimensional assignment problems with triangle inequalities , 1992 .

[8]  David S. Johnson,et al.  Computers and Intractability: A Guide to the Theory of NP-Completeness , 1978 .

[9]  Kimmo Eriksson,et al.  Three-dimensional stable matching with cyclic preferences , 2006, Math. Soc. Sci..

[10]  Eric Horvitz,et al.  Collaboration and shared plans in the open world: studies of ridesharing , 2009, IJCAI 2009.

[11]  Chien-Chung Huang,et al.  Two's Company, Three's a Crowd: Stable Family and Threesome Roommates Problems , 2007, ESA.

[12]  A. Fabri,et al.  On dynamic pickup and delivery vehicle routing with several time windows and waiting times , 2006 .

[13]  Niam Yaraghi,et al.  The Current and Future State of the Sharing Economy , 2017 .

[14]  Gilbert Laporte,et al.  The dial-a-ride problem: models and algorithms , 2006, Ann. Oper. Res..

[15]  Richard F. Hartl,et al.  Demand Responsive Transportation , 2011 .

[16]  Xin Huang,et al.  Online Roommate Allocation Problem , 2017, IJCAI.

[17]  Gerhard J. Woeginger,et al.  Some Geometric Clustering Problems , 1994, Nord. J. Comput..

[18]  Vladimir Gurvich,et al.  Stable matchings in three-sided systems with cyclic preferences , 2004, Discret. Math..

[19]  Jean-François Cordeau,et al.  A Branch-and-Cut Algorithm for the Dial-a-Ride Problem , 2006, Oper. Res..

[20]  Emilio Frazzoli,et al.  On-demand high-capacity ride-sharing via dynamic trip-vehicle assignment , 2017, Proceedings of the National Academy of Sciences.

[21]  Cristina V. Lopes,et al.  An Online Mechanism for Ridesharing in Autonomous Mobility-on-Demand Systems , 2016, IJCAI.

[22]  Dennis Luxen,et al.  Multi-Hop Ride Sharing , 2013, SOCS.

[23]  Bernhard Nebel,et al.  A Mechanism for Dynamic Ride Sharing Based on Parallel Auctions , 2011, IJCAI.

[24]  Harold N. Gabow,et al.  Data structures for weighted matching and nearest common ancestors with linking , 1990, SODA '90.

[25]  Eduardo C. Xavier,et al.  Dynamic Taxi and Ridesharing: A Framework and Heuristics for the Optimization Problem , 2013, IJCAI.