Order Dispatch in Price-aware Ridesharing

Libin Zheng Lei Chen Jieping Ye Hong Kong University of Hong Kong University of Didi Research Institute, Didi Science and Technology Science and Technology Chuxing Hong Kong, China Hong Kong, China Beijing, China [email protected] [email protected] [email protected]

ABSTRACT With the prevalence of -hailing applications, ridesharing be- comes more and more popular because of its great potential in mon- etary saving and environmental protection. Order dispatch is the ' % % ! !" !$ key problem in ridesharing, which has a strong impact on riders’ $ experience and platform’s performance. Existing order dispatch re- # search works fail to consider the price of the orders, which can be &" !" an important reference because it directly relates to the platform’s !' !% profit. Our work takes the order price into concern, and formulates ( ( a constrained optimization problem, which takes platform’s profit as the optimization objective and performs controls on riders’ de- Figure 1: Example 1. tour distance and waiting time. We prove the problem is NP-hard, thus, we propose approximation methods. We further develop a simulation framework based on real ridesharing order and The dial-a-ride problem (DARP) [8, 10, 5, 16] has been widely data. We conduct experiments with this simulation framework to studied in the past years, which is a variant of the vehicle routing evaluate the effectiveness and efficiency of the proposed methods. problem [19] with time window constraints for pick-up and drop- off. The problem of adopting these methods lies in their setting that PVLDB Reference Format: Libin Zheng, Lei Chen and Jieping Ye. Order Dispatch in Price-aware all orders are served. This is not practical in real-time ridesharing Ridesharing. PVLDB, 11 (8): 853-865, 2018. due to the limited transportation capacity. Besides, integer pro- DOI: https://doi.org/10.14778/3204028.3204030 gramming techniques are commonly used to solve the problem, which leads to great time costs. Generally only small instances 1. INTRODUCTION are tested in their works [9]. There are also research works [1], which use a multi-objective function to trade-off the travel distance To utilize the empty seats in manned and reduce the mone- and the number of un-served orders. However, it is unclear on how tary cost of riders, car-hailing service providers, such as Uber1 and to regularize the penalty term. Actually, all of these works fail to Didi Chuxing2, have been promoting their ridesharing business in consider the order prices, which can be an important reference to recent years. In contrast to traditional ride-hailing services where distinguish the orders during the dispatch process. one vehicle takes at most one rider at a time, the service provider in Online algorithms have also been proposed to address the real- ridesharing may assign multiple riding orders to a car at the same time ridesharing problem. [20] and [15] re-optimize the travel plans time. Ridesharing brings a lot of benefits. For riders, they get of on arrival of each new order. This online setting con- travel fee reductions from sharing the ride with others. For car- ducts optimizations on individual orders and give them immediate hailing service providers, ridesharing enables a better utilization of responses. However, they do not consider the order prices either. the limited vehicles, which means more profits. Ridesharing also In typical ridesharing platforms ( and Didi Chuxing), the relieves their serving stress during peak ordering hours. Besides, price of a ridesharing order is decided after user’s input of desti- the government encourages such a shared for the purpose nation and before his/her drop of an order. Therefore, the prices of reducing carbon dioxide emission. Due to its great significance, of the ridesharing orders are fixed regardless of the dispatch and ridesharing has drawn increasing attention from the academia. routing results. This is quite different from non-ridesharing orders 1https://www.uber.com whose price may depend on the actual travel length. Ignorance 2http://www.xiaojukeji.com/ of the price during dispatch of the ridesharing orders may prevent Permission to make digital or hard copies of all or part of this work for the dispatcher (the server of ridesharing platforms) from finding personal or classroom use is granted without fee provided that copies are the profit-optimal solution. For example, when the vehicles are in not made or distributed for profit or commercial advantage and that copies shortage, the dispatch algorithm decides to serve which orders. The bear this notice and the full citation on the first page. To copy otherwise, to order price would be one important reference as it is directly related republish, to post on servers or to redistribute to lists, requires prior specific to the platform’s earning. Previous works on ridesharing order dis- permission and/or a fee. Articles from this volume were invited to present patch [10, 1, 20, 15] fail to distinguish the orders according to their their results at The 44th International Conference on Very Large Data Bases, August 2018, Rio de Janeiro, Brazil. prices. Proceedings of the VLDB Endowment, Vol. 11, No. 8 Example 1. In Figure 1, there are three orders o1, o2, o3 and only Copyright 2018 VLDB Endowment 2150-8097/18/04. s s s e e e DOI: https://doi.org/10.14778/3204028.3204030 one vehicle v1. o1, o2, o3 and o1, o2, o3 represent the origins and

853 Table 1: Symbols and notations

'" # '$ % Symbol Description &" !" !" O = {oi} Set of orders. V = {vj } Set of vehicles. s e o , o The origin and the destination of order oi. '$ '$ i i revi The price of order oi. costj The payment to vehicle vj . '" # '$ % P The overall profit. & !$ !$ $ Pi,j The profit of dispatching oi to vj . t(a, b) The travel time from a to b. d(a, b) The travel distance from a to b. Figure 2: Example 2. dri The detour ratio of oi. destinations respectively. Circles and edges represent the nodes θdr The threshold of detour ratio. and paths respectively in the road network. In this example, all pti The pick-up time of order oi. edges are of equal travel distance. This example corresponds to θpt The threshold of pick-up time. peak ordering periods where vehicles are in shortage. There are planj The travel plan of vehicle vj . s s e e s s e e cj The capacity of vehicle vj . two possible travel plans for v1: 1) v1o1o2o1o2; 2) v1o1o3o3o1. Without considering the order prices, the above two plans show no difference because they own the same amount of travel distance and the same number of served orders. Let us consider the order • We formulate the problem of Maximizing Profit in Price- aware Ridesharing (MPPR) and prove the problem hardness prices and assume price(o2) > price(o3). This is reasonable s e s e in Section 2. as d(o2, o2) > d(o3, o3). Note that d(·, ·) represents the shortest path distance, and has a strong impact on orders’ price in practice. • We propose the greedy method and the matching-based order Then, the price-aware solution would be dispatching o1 and o2 to dispatch methods in Section 3 and Section 4 respectively. v1. • We devise some optimization techniques in Section 5, and Example 2. Figure 2 gives an example which corresponds to the devise a real-data based simulation framework in Section 6. scenario with enough transportation capability to serve the orders. There are two orders o1 & o2 and two vehicles v1 & v2. In this • We conduct experiments to investigate the performance of s s s s example, we assume d(v1, o1) = d(v2, o2) = d1 < d(o1, o2) = our proposed algorithms, and compare them to the state-of- s e s e e e d(o1, o1) = d(o2, o2) = d(o1, o2) = d2. Without consideration of art approach in section 7. order prices, the dispatch solution with minimum travel distance is In addition to the contributions listed above, we discuss the re- to dispatch o1 and o2 to v1 and v2 respectively. However, this may not lead to the profit-optimal solution. Let us take the order prices lated work in Section 8 and conclude the paper in Section 9. The and vehicle payments into account. The profit of dispatching these important notations and symbols in the rest of this paper are sum- marized in Table 1 . two orders is equal to price(o1)+price(o2)−pay(v1)−pay(v2). The payment to a vehicle is comprised of the base fare (flag-down fare) and the travel fare. The platform would pay one base fare less 2. MAXIMIZING PROFIT IN PRICE-AWARE if employing v1 only. Let the base fare be larger than cost(d2 −d1), RIDESHARING s e s e i.e., the travel cost saving from adopting v1o1o1, v2o2o2 instead of s s e e In this section, we first explain some concepts and describe the v1o1o2o2o1. Then, the optimal dispatch solution is to dispatch both problem of profit maximization (Section 2.1). Then, we show the o1 and o2 to v1. problem hardness by a reduction from the traveling salesman prob- In this work, the goal is to maximize the platform’s profit. Given lem [4] (Section 2.2). Finally, we give some preliminary discus- an order dispatch solution, its profit is equal to the sum of order sions in Section 2.3 before description of approximation methods. prices minus the payment to the vehicles. Therefore, maximiza- tion of the profit naturally requires one to control the payment by 2.1 Problem Formulation taking care of the vehicles’ travel distance, which is also the key Definition 1 (Time epoch). A time epoch is a time instant when the objective in previous works [20, 15]. However, profit maximiza- dispatcher operates on the batched orders. tion needs to refer to the order price as well, which is ignored in those works. Following the industrial practice [30], we adopt the The dispatcher assigns orders at a time epoch, after which it setting where the dispatcher operates on the batched orders peri- batches new orders until the next time epoch. In each time epoch, odically. The dispatcher packs the pended orders and dispatches the input consists of the order set O = {oi} and the vehicle set them to the vehicles such that the profit is maximized. There are V = {vj }. constraints to ensure the rider experience, including control of de- Definition 2 (Order o ). An order o is a quaternary tuple < os, oe, tour distance and pick-up distance. To the best of our knowledge, i i i i t , rev >, where os and oe represent the starting (pick-up) loca- this is the first time that the order price has been considered in the i i i i tion and ending (drop-off) location of the order respectively, t is dispatch process. The exponentially large solution space makes it i the time when o is raised, and rev is its price (the revenue of difficult to solve the problem exactly. We prove that the problem i i serving o ). is NP-hard, and thus we propose approximation methods. To eval- i uate their performance, we develop a simulation framework based Remark: According to the handbook in the mobile application of on the real ridesharing order and vehicle data from Didi Chuxing. Didi Chuxing, users pay an upfront fare to take the ridesharing ser- In summary, our contributions are listed as follows: vice. Note that no further fare would be charged from users. This

854 upfront fare is computed by a pricing strategy, which considers the Our objective is to maximize P , which equals the price of dis- origin/destination, current demand-supply condition, and dynamic patched orders minus the payment to vehicles. The order prices are discounts (unavailable for non-sharing orders), etc. Therefore, the fixed and known, but which orders would be dispatched are uncer- P upfront fare is one of the inputs in the order dispatch process, and tain. The term revi is affected by the dispatch result oi∈planj we denote them as the order price, revi. and cannot be omitted. Our objective differs from those proposed by [8, 10, 5, 16] in that they simply minimize the travel distance as- Definition 3 (Vehicle vj ). A vehicle vj is a tuple < lj , planj , cj >, suming enough transportation capacity to serve all orders. In prac- where lj is the vehicle’s current location, planj is the travel plan, tice, not all orders can be dispatched timely. Some of them starve and cj is its capacity. for a long time, and then are cancelled. According to [30], the order cancellation rate in Didi Chuxing is above 20%. planj is the travel plan comprised by the pick-up and drop-off of Following the industrial practice [30], we opt to optimize the the uncompleted orders. For example, in Figure 1, assuming v1 is s s s e e profit locally in each round. This proceeds in a greedy manner, currently on the path between o and o , the plan v1o o o means 1 2 2 1 2 and does not guarantee a globally optimal solution with respect to that v1 is on its way towards the pick-up of o2, after which it would the whole time span. However, because of the real-time nature of drop off o1 and then o2. At any time, the number of riders in the the problem, i.e., orders arrive dynamically and may be cancelled vehicle cannot exceed cj . The function t(·, ·) gives the travel time needed between two lo- due to large delays, it is infeasible to solve the problem in a static cations w.r.t. the shortest path. For example, the time needed to manner. It is hard to optimize in the global scope unless a powerful s s e e e order prediction technique is offered. finish the aforementioned plan is t(v1, o2) + t(o2, o1) + t(o1, o2). Based on t(·, ·), we define a detour ratio for each order. Definition 8 (Maximizing profit in price-aware ridesharing, MPPR). Given a new order set O and a vehicle set V of a time epoch, the Definition 4 (Detour ratio dri,j ). The detour ratio of oi w.r.t. planj , s e problem of maximizing profit in price-aware ridesharing is to dis- t(oi ,oi ) s e dri,j , is equal to s e , where tj (oi , oi ) is the time difference tj (oi ,oi ) patch the orders to the vehicles and update their travel plans, so between pick-up and drop-off of oi in planj . that the profit (Equation (1)) is maximized, subjecting to the fol- lowing constraints: s s e e For example, in Figure 1, let the plan of v1 be v1o1o3o3o1. The I. Detour constraint. For any dispatched order, the detour ratio is s s e shortest path to serve order o1 is o1o2o1. Assuming the edges are no larger than θdr, i.e., ∀oi, dri ≤ θdr; of equal distance, the detour ratio of o1 w.r.t. this plan is: II . Pick-up constraint. For any dispatched order, its pick-up time s s s e e e is no larger than θpt, i.e., ∀oi, pti ≤ θpt; t(o1, o3) + t(o3, o3) + t(o3, o1) s s s e = 1.5 III . Capacity constraint. At any time, the number of passengers in t(o1, o2) + t(o2, o1) a vehicle is no larger than its capacity, i.e., ∀t, |{oi in vj }| ≤ cj . Detour ratio measures the relative time loss due to ridesharing. Constraint I is to protect the rider experience by controlling the Controlling the detour ratios prevents bad riding experiences. detour ratios. Similarly, Constraint II prevents bothering both rider In addition to the detour time, orders’ waiting time during pick- and driver with a large pick-up time. These two constraints corre- up also has a strong impact on their experience. spond to the service constraint and waiting time constraint in [15]

Definition 5 (Pick-up time pti). The pick-up time of oi is the time respectively. difference between when it is dispatched and when it is picked up. 2.2 Problem Hardness

For example, suppose we dispatch o1 and o3 to v1 with travel In this section, we prove that the MPPR problem is NP-hard by s s e e plan v1o1o3o3o1 in the current time epoch. Then, pt3 is equal to a reduction from a variant of the traveling salesman problem (TSP) s s s t(v1, o1) + t(o1, o3). [4]. TSP without return (TSP-WR) differs from TSP in that it does The profit of the platform is equal to the difference between the not require the salesman to return to the depot. That is, the sales- price of the dispatched orders and the payment to the drivers. man visits each non-depot node once without the need for return- ing. TSP-WR is different from the Hamiltonian path problem [23], Definition 6 (Driver payment). The payment to a vehicle is bcost+ which does not specify depots. Due to the limited space, we only costj , i.e., the base fee plus the travel fee. give proof sketches for the theoretical results in this section. Their formal proofs can be found in our technical report3. The base fee, bcost, corresponds to the flag-down fee in taxi services. For the travel fee costj , without loss of generality, we Lemma 2.1. The traveling salesman problem without return (TSP- assume that it is linear to its travel time: WR) is NP-hard.

costj = α ∗ t(planj ) Proof sketch. Given a TSP instance, we reduce it to a TSP-WR in- stance by duplicating the depot node. We need to guarantee that where t(plan ) is the travel time of plan , from the first pick-up, j j this duplicate node is the last visited node in TSP-WR solutions. before which v is empty, to the last drop-off, after which v is j j This can be realized by adding another node which is only accessi- empty again. ble from the duplicate node. Then, the optimal TSP-WR solution Based on the above concepts, we define the platform profit, which is the one which visits all TSP nodes between the depot and its is rarely considered in existing ridesharing works. duplicate with the minimized travel distance.

Definition 7 (Platform profit). The platform profit of a dispatch We now prove MPPR is NP-hard by a reduction from TSP-WR. solution is:   Theorem 2.2. The problem of maximizing profit in price-aware X X ridesharing is NP-hard. P = ( revi) − (bcost + costj ) (1) 3 vj ∈V oi∈planj http://www.cse.ust.hk/%7Elzhengab/MPPRtech.pdf

855 Proof sketch. Given a TSP-WR instance, we construct a MPPR in- Algorithm 1 The Greedy algorithm stance by mapping the depot to the current location of the only Input: order set O, vehicle set V available vehicle and the origin of all orders. Besides, each non- Output: updated plans of vehicles. depot node in TSP-WR is mapped to the destination of an order. 1: pool ← φ Then, we set critical pick-up time requirements for orders so that 2: for all (oi, vj ) ∈ O × V do they can only be picked up at the vehicle’s departure. We need to 3: if (oi, vj ) is feasible then guarantee that all orders are served in MPPR solutions. This can 4: Add pair (oi, vj ) into pool and calculate Pi,j be realized by setting loose detour requirements, large order prices, 5: end if and large vehicle capacity. Subsequently, the optimal MPPR solu- 6: end for tion is the one which visits all the nodes with the minimized travel 7: while pool 6= φ do distance. 8: (oi∗, vj∗) ← arg max(oi,vj )∈pool Pi,j . 9: if Pi,j < 0 then 2.3 Preliminary of Approximation Methods 10: break. The MPPR problem is shown to be NP-hard with a reduction 11: end if from TSP. However, existing approximation algorithms of TSP can- 12: Dispatch oi∗ to vj∗ and update planj∗. not be applied to MPPR due to the following reasons. Firstly, in 13: ∀vj , if (oi∗, vj ) ∈ pool, remove (oi∗, vj ) TSP, all tasks are served and the goal is to minimize the over- 14: for all (oi, vj∗) ∈ pool do all travel distance. In contrast, in a dispatch round of real-time 15: Update Pi,j∗ if it remains feasible. ridesharing, it is a common case that only part of orders can be 16: Remove (oi, vj∗) from pool otherwise. served due to the limited transportation capacity. This is the reason 17: end for why some orders can be immediately dispatched while others need 18: end while to wait for some moments in reality. Secondly, the algorithms of 19: return R. TSP only target at routing, which is a subproblem in MPPR. MPPR also requires its solutions to dispatch orders to different vehicles, which obviously cannot be handled by TSP solutions. Therefore, greedily dispatches one order at a time. In each execution of the we propose approximation methods for MPPR in Section 3 and 4. loop, the optimal pair (oi∗, vj∗), which brings the maximum im- A solution of MPPR includes order dispatch and route planning. mediate profit gain, is found and removed from the pool (line 8). Route planning estimates the profit of assigning an order to a ve- The algorithm stops if the profit is negative (line 9 ∼ 11), otherwise hicle, based on which orders are dispatched. Route planning aims the corresponding dispatch is conducted (line 12). The remaining to minimize the travel distance, which has been widely studied in candidate pairs of oi∗ are all removed (line 13). Similarly, due to existing works [6, 20, 15, 10, 14]. For efficiency concern, we fol- the update of planj∗, the candidate pairs of vj∗ are re-evaluated in low the setting in [6, 20, 10, 14] that after receiving a new order, a lines 14 ∼ 17. vehicle keeps its existing orders’ permutation unchanged. That is, Note that we consider the case where feasible order-vehicle pairs given an order-vehicle pair, (oi, vj ), we insert oi’s pick-up/drop-off become infeasible (lines 13 ∼ 17), but do not consider the other di- locations into vj ’s plan like [6, 20]. This insertion-based algorithm rection. This is because it is impossible that infeasible pairs become traverses all possible insertion location pairs in the plan for the new feasible after a dispatch. order, and adopts the one with the least incurred travel cost.

The route planning algorithm outputs a plan of pick-up/drop-off Lemma 3.1. ∀i,j , (oi, vj ) is feasible only if it is feasible before the for the vehicle, which decides the vehicle’s route. We assume that last dispatch. drivers always adopt the shortest path given two locations. The al- 2 gorithm has a time complexity of O(ˆc q), where cˆ is the maximum Proof. We conduct the proof by contradiction. Suppose after a dis- capacity of the vehicles and O(q) is the time cost of a shortest path patch of (o1, v1), an infeasible dispatch pair (o2, v1) becomes fea- query. In the following sections, we propose approximation meth- sible. In the following, we show that any feasible insertion of o2 ods for our focused problem, i.e., order dispatch. into plan1 would make it a feasible insertion before the dispatch, which contradicts that (o2, v1) is originally infeasible. 3. THE GREEDY ALGORITHM Without loss of generality, we assume the plan of v1, plan1, s s e e 0 Greedy based algorithms have been demonstrated effective in as v1o0o1o1o0, and assume a feasible insertion of o2 as plan1: s s s e e e 0 spatial-related assignment problems [31, 25]. In this section, we v1o0o1o2o1o2o0. Then, plan1 respects the three constraints, i.e., propose a Greedy algorithm. It proceeds step-by-step, and in each detour constraint, pick-up constraint and capacity constraint. We 00 0 step it makes the dispatch which brings the maximum immediate construct a new plan plan1 by removing o1 from planj , which s s e e 00 profit gain. As shown in Algorithm 1, the Greedy algorithm keeps is v1o0o2o2o0. It is obvious that planj satisfy the capacity con- dispatching orders until there is no feasible order-vehicle pairs. straint. Besides, both o0 and o1 must satisfy the detour constraint Algorithm 1 first puts all feasible dispatch pairs (oi, vj ) into pool and pick-up constraint, because their detour travel time and pick- and calculates their immediate profit gains (lines 2 ∼ 6). Feasible up time both decrease benefited from removal of o1. This indicates 00 dispatch pairs are those which satisfy the constraints in Definition that planj is a valid plan, and therefore (o2, v1) should be feasi- 8. The profit gain Pi,j is calculated as follows: ble before the dispatch of (o1, v1). This contracts our assumption. Though our proof proceeds by giving an example, it holds for other 1 Pi,j = revi − α ∗ ∆tj (oi) − bcost ∗ (vj is empty) (2) types of travel plans and insertions. where ∆tj (oi) is the increase in travel time from inserting oi into vj ’s travel plan. 1(vj is empty) is an indicator function which Under same conditions (demand-supply condition, ordering pe- judges whether the vehicle is empty. If so, the base fee, bcost, riod, etc.), it is clear that common ridesharing platforms (Didi Chux- needs to be deducted from the earning. After this initialization, the ing, Uber) would make a higher price for longer trips. Then, in Al- Greedy algorithm jumps to the while loop (lines 7 ∼ 18) which gorithm 1, orders with long trips tend to be prioritized and assigned

856 maximum weighted matching algorithms. Then, in section 4.2, we � �� improve the bipartite matching method by properly packing the or- � ders a priori. 4.1 Bipartite Matching (BM) � �� �� �� � � � In [22], vehicles and orders are treated as nodes of a bigraph, and a maximum weighted matching is computed to dispatch the orders. Figure 3: Example of Lemma 3.2 Similarly, we can obtain a dispatch solution with the graph match- ing method. To construct the graph, we firstly create max{|O|, |V |} in early steps, because it greedily pursues profits. In the follow- − min{|O|, |V |} dummy nodes to ensure equal number of nodes ing, we show that this prioritization pattern is wise/reasonable with in the two sides. Then, we obtain a complete bigraph by connecting some discussions. Dispatching long trips at first is beneficial for nodes in one side to all nodes from another side. For each order- both empty and manned vehicles. vehicle pair, we set their edge weights to Pi,j if the dispatch is For empty vehicles, assigning them a long trip as the first trip feasible and Pi,j > 0, otherwise we set the edge weights to 0. offers them a long initial travel. This brings more opportunities for The maximum weighted matching of the constructed bipartite their travel to be shared with latter trips. graph can be found by using combinatorial algorithms such as the For manned vehicles, without loss of generality, we assume the e Kuhn-Munkres method [21]. A matching solution can be trans- initial travel plan of a manned vehicle is vo1. A new order o2 is formed into a dispatch solution by selecting the matched pairs with firstly added to the plan as shown in Figure 3. Let D and D0 denote e s e e non-zero edge weights. The disadvantage of this pure matching- the travel distance of vo1 and vo2o1o2 respectively. Besides, let 0 based method lies in that it does not consider packing new orders. ∆D(·) and ∆D (·) denote the distance increase of inserting a node Two new orders in the same round would not be combined even if right after v in the two plans respectively. That is, for another order s s s e e 0 s their origins/destinations are very close to each other. o3, ∆D(o3) = d(v, o3) + d(o3, o1) − d(v, o1), and ∆D (o3) = Figure 4(a) gives a toy example where there are three orders d(v, os) + d(os, os) − d(v, os). 3 3 2 2 (o1, o2, o3) and two vehicles (v1, v2). v1 and v2 are currently lo- s s 0 s cated at the origin of o1 and o2 respectively. The order prices Lemma 3.2. ∀o1, o2, o3, ∆D(o3) − ∆D(o2) ≤ ∆D (o3) (revi), the base fare (bcost), and the charge per unit distance (αd) Proof. With some simple deductions, we have: in this example are shown in Table 2. All the road segments are of s 0 s s e s s s e unit length, so the cost of traveling per segment is αd = 1. Ac- ∆D(o3)−∆D (o3) = d(o3, o1)−d(o3, o2)+d(v, o2)−d(v, o1). cordingly we can construct a bigraph as shown Figure 4(b), where s e s s According to triangle inequality, we have d(o3, o1) − d(o3, o2) ≤ the zero weighted edges and dummy vehicles are omitted for sim- s e d(o2, o1). Then, plicity. The maximum weighted matching on the bigraph indicates s 0 s s e s e s the following dispatch: (o1, v1), (o3, v2). Note that o2 should be ∆D(o3)−∆D (o3) ≤ d(o2, o1)+d(v, o2)−d(v, o1) = ∆D(o2) matched to a dummy vehicle, which represents it is not dispatched. 4.2 Packing Based Matching (PBM) Lemma 3.2 states that the new insertion cost of latter orders, In this subsection, we tend to improve the pure matching method 0 s ∆D (o3), is lower bounded by their original insertion cost minus (in Section 4.1) by properly packing orders beforehand. Observing s s s the insertion cost of o2, i.e., ∆D(o3) − ∆D(o2). Note that this that the current practice in typical ridesharing applications (Didi s s 0 s lower bound is tight. ∆D(o3) − ∆D(o2) = ∆D (o3) happens Chuxing) allows at most three riders in a shared travel, packing s s when o2 = o3, i.e., the two orders have same origin. Besides, more than three orders is meaningless. We consider only packing Lemma 3.2 also holds when ∆D0(·) refers to the distance increase two orders in our algorithm. This is because, we observe from the s e of insertion between o2 and o1. real data that in a dispatch round, it is uncommon that three pended We know that if the first added trip, o2, is a longer trip, their orders can be packed without violation of the constraints. The rea- s insertion cost, ∆D(o2), tends to be larger. According to Lemma son is that the pended order set in a round is relatively sparse, and its 3.2, for latter orders, their least possible insertion cost gets smaller. size is around several hundred. Generally the triply shared rides are Time complexity. Let degv and dego denote respectively the aver- produced by assigning an order or a pack (of size two) to manned age number of feasible matches per vehicle and per order initially. vehicles. Manned vehicles refer to those which have received or- The initialization (lines 2 ∼ 6) costs O(|V ||O|cˆ2q), where O(ˆc2q) ders in previous rounds. is the time cost of route planning as mentioned in Section 2.3, and The packing based matching algorithm proposed in this section, |V | and |O| represent the number of vehicles and orders respec- consists of two steps: tively. In the while loop, dispatch operations in lines 8 ∼ 12 cost (i) Order packing. Construct an order graph, based on which O(|V |degv) in total. Update operations in lines 13 ∼ 17 cost 2 pack the orders. O(degvcˆ q). The while loop executes at most |O| times, leading 2  to an overall complexity of O (|V | +c ˆ q)degv|O| . Summing up (ii) Order dispatch. Construct a bigraph with orders/packs and the initialization cost and loop execution cost, the time complexity vehicles, based on which dispatch the orders. of Greedy is O (ˆc2q + deg )|O||V | +c ˆ2q|O|deg . v v Actually, step (ii) does exactly what we have described in Section 4.1. That is, for each order or order pack, we compute the profit 4. MATCHING-BASED METHODS of assigning it to each vehicle, which serves as the edge weight in In this section, in contrast to greedily assigning orders, we con- the bigraph. A dispatch solution is then obtained by computing a sider matching orders and vehicles in a one-shot manner. We treat maximum weighted matching. In the following, we focus on step the vehicles and orders as nodes in a bipartite graph, and combine (i), explaining how to construct the order graph and pack the orders. them using matching algorithms. More specifically, we first show To construct the order graph, we virtually create an empty vehi- in Section 4.1 that a dispatch solution can be obtained by using cle at the origin of each order like [1]. Assuming the availability of

857 ⇐=: Given a matching solution, we can obtain a packing solution Table 2: Variables of example in Figure 4 by only packing nodes which are not matched to dummy nodes. Variable rev1 rev2 rev3 bcost αd Value 12 10 15 5 1 Regarding the toy example in Figure 4(a), 4(c) and 4(d) present the corresponding order graph and the bigraph with packs. In Fig- � � !$ 5 ure 4(c), the dummy nodes are represented by the edges linking �� � nodes to themselves. Numbers on the edges represent the profits of 3 ($ the corresponding packs. The maximum weighted matching of this � � !" �� � � � graph should be (o1, o1), (o2, o3), indicating packing o2 and o3 � �� �� �� 3 (" only. Subsequently we obtain the order-vehicle bigraph as shown v v ! 7 in Figure 4(d), by considering the actual vehicles 1 and 2. The � & �� maximum weighted matching on this bigraph is (o1, v1), (o2,3, v2). Time complexity. In the graph construction stage, the order pack- (a) The example (b) The bigraph of KM ing and edge calculation costs O(|O|2cˆ2q) and O(|O||V |cˆ2q) re- spectively. In the order packing stage, we adopt the matching algo- 3 5 rithm described by Galil [11], whose time complexity is O(|O| ). 5 3 7 !$ ($ The time complexity of the Kuhn-Munkres algorithm [21] for 3 3 13 17 weighted bipartite matching is O (max{|V |, |O|}) → O(|O| ! ! ! $ " & 17 +|V |3). Summing up these costs, the time complexity of the pack- !",& (" ing based matching method is O(ˆc2q|O|(|O|+|V |)+|O|3 +|V |3). 5. OPTIMIZATIONS (c) The order graph in PBM (d) The bigraph with packs in Algorithms of real-time ridesharing are required to be rather ef- PBM ficient. In this section, we propose some optimization techniques to improve the dispatch efficiency. Section 5.1 describes a prun- Figure 4: An example of matching methods. ing strategy to avoid unnecessary distance queries, and Section 5.2 describes a node clustering method to approximate shortest-path such virtual vehicles, the order packing stage aims to maximize the distances with bounded errors. overall profit of dispatching all orders. Two orders o1 and o2 are connected in the order graph, if they can be combined without vio- 5.1 Vehicle Pruning lation of constraints I ∼ III (in Definition 8). There are four pos- When computing the profit of a dispatch (oi, vj ), Pi,j , we need s s e e s s e e s s e e sible plans to combine o1 and o2: o1o2o1o2, o1o2o2o1, o2o1o1o2 to invoke the route planning algorithm (see Section 2.3) to insert s s e e s s and o2o1o2o1. For plans starting from o1 (o2), the virtual vehicle oi into vj ’s plan. The planning algorithm returns the optimal inser- s s created at o1 (o2) would be the one to conduct the travel. A plan is tion, or nothing if all insertions fail to meet the constraints. When valid if it does not violate the constraints. o1 and o2 are connected real road networks are used, queries of shortest-path distance would in the graph if at least one valid plan yields positive profit. The be issued frequently during route planning. In our experiments edge weight is set to the maximum among the profits of the valid with the Beijing road network, we found that even the state-of- plans. By traversing all order pairs, we obtain a general graph (not art shortest-path algorithm, Contraction Hierarchy (CH) [12], still bipartite), where an edge represents a feasible pack and its weight takes some milliseconds per query. No matter which dispatch al- represents the profit of the pack. One easy follow-up is to com- gorithm is used, for each order, we need to traverse all vehicles to pute a maximum weighted matching on the graph, which yields a evaluate the dispatch feasibility and profits. This leads to a large packing solution where the total profit of the packs is maximized. amount of shortest path queries, whose time cost is unbearable. However, this method fails to consider the profits of the un-packed Our observation from the real ridesharing data indicates that for orders. Maximization of the profit of order packs does not guar- an order, due to the waiting-time constraint, only its nearby vehi- antee the maximization of profit of all orders. Remember that the cles can be dispatched. Most vehicles turn out infeasible because order packing step is to achieve the largest amount of profit from they are too far away from the order’s origin. To save the route dispatching all orders, assuming enough transportation capability. planning cost from these infeasible vehicles, we calculate the geo- Nevertheless, in the following, we would show that the aforemen- graphical distance to prune most of the infeasible vehicles. Given tioned order packing problem can be solved by weighted matching the longitude and latitude of two locations, we can calculate their algorithms with a reduction. geographical distance according to the Haversine formula4. Suppose the waiting-time constraint indicates a pick-up distance Lemma 4.1. The order packing problem can be reduced to the threshold as dpt, we have: maximum weighted matching problem. Lemma 5.1. An order-vehicle pair can be safely pruned if their geographical distance is larger than dpt. Proof. Given an order graph in the packing stage, we augment the graph by additionally creating a dummy node for each order node. The proof is straightforward: the geographical distance between Each dummy node is connected to its corresponding order node two locations is a lower bound of their distance on any road net- with the edge weight equal to the order profit. With respect to this work. The computation of the Haversine formula takes only some augmented graph, each order packing solution leads to a matching microseconds, which is much faster than the shortest path compu- solution, and vice versa. tation. =⇒: Given an order packing solution, we can construct a matching 4https://en.wikipedia.org/wiki/Haversine_ solution by matching the un-packed orders to their dummy nodes. formula#cite_note-Inman_1835-4

858 fidi h nu.T aei airfrudrtnig egv a report. give description technical algorithmic we our formal in understanding, found Its for be easier here. can it NGC make of To example spec- running is input. and center, the cluster in its ified and node a between distance allowed least threshold, the weight given edge picking the a keep until exceeds nodes, to incident is its merging NGC and of edge weighted idea The memory. of problem clustering is complexity space its Subsequently set. where operat- edge by the proceeds ing which (NGC), Clustering Neighbor-Growing its to due clustering requirement. hierarchical memory using great disables This nodes. 35692 set, node the to equal distance, complexity cluster space minimum the with with clusters two clustering combines Hierarchical greedily nodes. as their defined between is distance clusters maximum two the between distance the linkage, complete In linkage complete with clustering erarchical large prevent to centers their and con- errors. nodes should approximation between algorithm distance clustering the node trol the distance, centers’ their Sec- (in on procedure based approximation 5.2.2). 5.2.1), distance tion de- Section the first describe (in we we algorithm following, which clustering the dis- node In the our using centers. scribe pair cluster node their a between of tance distance the approximates the and of nodes, most that observed within be are than can less It are 5. edges Figure in shown is network ridesharing. real-time an for to cost leading time queries, distance of of amount amount unbearable algo- vast dispatch a The issue com- milliseconds. would shortest-path some rithms one nodes costs network, road [12] road CH 35692 a with are putation such there On Beijing), edges. of 48192 Road and Ring 5th the within (OSM) Map Street Approxi- Open Distance and Clustering Node 5.2 6 5 .. h oeCutrn Algorithm Clustering Node The 5.2.1 https://en.wikipedia.org/wiki/Hierarchical_ http://download.geofabrik.de/ bevn httentoki pre edvs ehdnamed method a devise we sparse, is network the that Observing hi- the cluster, a inside nodes road among distance the bound To by nodes two of distance the approximate to is purpose our Since road the in length edge the of distribution mass probability The the from network road city the obtain we experiment, our In | mation E | 100 stesz fteeg e.Ti ol o as a cause not would This set. edge the of size the is iue5 M fntokeg length. edge network of PMF 5: Figure N h mlydra ewr noreprmn has experiment our in network road employed The . m Probability 0.1 0.2 0.3 0.4 0.5 0.6 0 hsosrainisie st lse h road the cluster to us inspires observation This .

500 0-100 m 5 100-200 nteubnae fBiigct (i.e., city Beijing of area urban the In . θ mtr,adnal afo h edges the of half nearly and (meter), d h threshold The .

O 200-300 ( | N

| 300-500 2 ) where , 6

a ea alternative. an be can , 500-6000 θ d | N stemaximum the is | stesz of size the is O ( | E | ) , 859 old saraytecne of A center the already is ( Tablemerge. edge in new shown a grow is and it, of delete edges We new blue. grow in to need Suppose we Except center. ar- Then, the with nodes, as two center. them these of containing one cluster a bitrarily build we Table nodes, in gle red in shaded picked, is interchangeably used example. are this weight for and ‘ length Column that Note in respectively. presented to are subjecting lengths nodes their merge and to used than be larger not are lengths whose edges remove network, the in nodes nine are There scoe stecenter. only the but as chosen is Table In to equal nte4hmre igenodes center. single merge, 4th the In w eigbud h ariedsacsaogndsi h aeclus- same the in clus- nodes ter. hierarchical among distances while pairwise center, the its bounds and tering node nodes; a among between distance distances the pairwise the on acts ing I bold. in marked are of centers : neither is if result merge clustering The next the to jump F directly would it and of distance of than try i.e., centers, is existing the of one to F center new the setting by i.e., clusters, ,C A, G cso h vltoa destwieheacia cluster- hierarchical while set edge evolutional the on acts NGC . ( onweg sgonfrom grown is edge new No . If . ntefis egn prto,telatwihe edge, weighted least the operation, merging first the In 6. Figure in example the with algorithm the demonstrate We nte5hmre h ikdedge, picked the merge, 5th the In h ifrnebtenNCadheacia lseigle in: lies clustering hierarchical and NGC between difference The w a etenwcenter. new the be can ,H D, D (E, H) (F, G) (D, F) F (D,E) (B,C) (A,B) (H, (H, I) θ (E, I) � ( d , θ � ,F D, Since . � ) sstto set is , d ( D , ,I D, � ( ( spce.Nt htte r rknabtaiy Since arbitrarily. broken are ties that Note picked. is = = ) ,C A, ,B A, ( F T w sslce stenwcne,isdsac to distance its center, new the as selected is ,I D, + ) 2 � ( 6 5 4 4 4 3 2 1 � , θ scoe stenwcne.Teol xsigedge existing only The center. new the as chosen is ,B A, ) iue6 xml fnd clustering. node of Example 6: Figure d w ( { w ) ) srmvd u onweg a egonwithin grown be can edge new no but removed, is ,E D, oeta h w lseswudntb merged be not would clusters two the that Note . ) ,E D, , ( w and ( 7 ,E D, sgonadaddt Table to added and grown is ,E F, ( + ) ( nteipt eoeteagrtmsat,w first we starts, algorithm the Before input. the in ,G F, ,C B, T (E, H) ) (F, G) (D, F) ( (D,E) (A,C) (H, (H, I) (E, I) } ,E D, 1 + ) = ) � stenx ikdeg,adw suppose we and edge, picked next the is � w and codn owihw efr h next the perform we which to according , 8 = ) ) ( � { � ,C B, { ,B A, steol nieteg of edge incident only the is w ( ) A { w ,I E, � � H 6 5 4 4 4 3 3 ( ,G F, aetelatwih,adw suppose we and weight, least the have ,C B, , ( ,H E, ,E D, ol elre than larger be would , ) } F and h pae destthereafter set edge updated The . ) h igenode single the , } A and T and omretocutr,w try we clusters, two merge To . 8 = ) } 0 + ) I because , Since . (E, H) (F, G) (D, F) (D,E) (H, (H, I) (H, I) (E, I) ( { G r egdi h nlstep. final the in merged are A ,F D, � � ( ,E, D, ,H E, w r lsee with clustered are sgetrthan greater is , � � ∼ ( ,F D, θ ) I e � � d 6 6 5 4 4 4 3 A C ) n ‘ and ’ θ F eie,tethresh- the Besides, . oncstoexisting two connects h uvvdedges survived The . d ( T G , ol eremoved, be would and a oohredges. other no has A eas hycan- they because , ,C A, 7 = ) 3 hsi because is This . II C } A scoe sthe as chosen is , B w G bounds NGC . smre into merged is { ) (D, F) (F, G) (D, F) bypassing (D, I) (H, I) (D, I) (H, I) ihlength with , fTable of ’ H θ r ohsin- both are � � d sn larger no is I , B ethen We . � G � θ } shaded , d F which , ( where , ,B A, D ( D � � 7 6 4 7 6 4 4 sthe as 7 = and and B T D A ) ). 0 . , The space complexity of NGC is O(|E|). There are at most |N| The speed of the vehicles is set to 60 km/h. An idle vehicle merges, and the time cost of one merge is O(|E|). Therefore, the walks randomly along the road network. In contrast, a vehicle with time complexity of NGC is O(|E||N|). unfinished orders moves according to its plan. In our implementa- tion, if the expected finish time of a busy vehicle exceeds its online 5.2.2 Shortest-path Distance Approximation time span after a dispatch, it would become unavailable for subse- By using NGC to cluster nodes, for a shortest-path query of quent dispatch rounds. (n1, n2), we can approximate their shortest-path distance with the Order simulation. Each ridesharing order record is associated distance between their corresponding cluster centers. We set θd = with an origin, a destination, a price and a request time. The ori- 500 m for NGC. In this way, the resultant number of clusters is gin and destination are mapped to their nearest nodes in the road 5971, which is small enough, and, as we would show later, the network. In our simulation, we create the orders according to their approximation error would not be large. Because the number of request times. Remember that the dispatcher assigns orders round centers is small enough, we can compute their pairwise shortest- by round. In each round, an order would be either dispatched or path distances on the original network a priori, and cache these pended to next round. In practice, an order may be cancelled by distances in main memory during runtime. Therefore, using cen- the requester if not dispatched for a long time. As mentioned be- ters’ distance for approximation is very fast. In addition, the fol- fore, the percentage of cancelled orders in Didi Chuxing is above lowing lemma guarantees that the distance error brought by using 20% [30]. Therefore, it is important to model order cancellation to centers’ distance is bounded. coincide with the practice. To simulate orders’ cancellation, we first perform equal width Lemma 5.2. bucketing over their waiting times, where the bucket width is set to five seconds. For an order oi currently with waiting time wti, its ∀n1, n2, |d(n1, n2) − d(c1, c2)| ≤ w(en1,c1 ) + w(en2,c2 ) ≤ 2θd wti corresponding bucket index is bidx(oi) = d 5 e. where c1, c2 are the centers of n1 and n2 respectively, w(en1,c1 ) We collect a set of cancelled orders from historical data of Didi and w(en2,c2 ) are their distances in the clustering result of NGC. Chuxing. Then, for each bucket b, we retrieve the number of can- celled orders in this bucket, and denote it as #cancel(b). After a Proof. We need to show that: waiting time of wti, order oi would either be cancelled and stop at bi or keep waiting and move to subsequent buckets. Then, the prob- −w(en1,c1 ) − w(en2,c2 ) ≤ d(n1, n2) − d(c1, c2) and ability that an order is cancelled in bucket b is equal to: #cancel(b) divided by the sum of #cancel(b) and the number of cancelled or- d(n1, n2) − d(c1, c2) ≤ w(en ,c ) + w(en ,c ) 1 1 2 2 ders fallen into buckets after b. That is, Since there exists a path n1c1c2n2, we know that d(n1, n2) ≤ #cancel(bidx(oi)) w(e ) + w(e ) + d(c , c ). This proves the second in- P r(oi cancelled at bidx(oi)) = (3) n1,c1 n2,c2 1 2 P #cancel(b) equality. In the following, we demonstrate the first inequality. b∈[bidx(oi),bmax]

Suppose d(n1, n2) − d(c1, c2) < −w(en1,c1 ) − w(en2,c2 ). For an undispatched order, before we start next round’s order dis-

Then, d(c1, c2) > d(n1, n2) + w(en1,c1 ) + w(en2,c2 ). Since patch, we first update its waiting time by adding the time duration d(c1, c2) is the shortest-path distance and there is a path c1n1n2c2, between two rounds. Then, with respect to its old and new waiting we have d(n1, n2) + w(en1,c1 ) + w(en2,c2 ) ≥ d(c1, c2). Subse- time, we obtain its last and current bucket index. We go through quently, the buckets between these two indices, and check whether it would be cancelled in these buckets according to Equation (3). Only or- d(c , c ) > d(n , n ) + w(e ) + w(e ) ≥ d(c , c ) 1 2 1 2 n1,c1 n2,c2 1 2 ders which survive from all passed buckets would be kept to next This makes a contradiction. round’s dispatch. For instance, suppose in a dispatch round, order o1, which has Since we set θ = 500 m, this guarantees that distance error is already been pended for 17 s, is still not dispatched. It has to wait at most 1 km (kilometer). If the speed of a vehicle is 60 km per for next round’s dispatch, and until then its waiting time would be hour, 1 km error corresponds to a time deviation of 1 minute, which increased to 32 s, assuming the time window length of a round as does not make big difference to most of the travels. If one insists 15 s. Subsequently its passed buckets would be b4, b5 and b6. Let on using the exact shortest-path distance, we can use d(c1, c2) − pr4, pr5 and pr6 denote the cancellation probability (Equation (3)) w(en1,c1 )−w(en2,c2 ) as a lower bound of d(n1, n2). Then, it can of these buckets. Then, the probability that o1 is not cancelled by be used to prune the vehicles as stated in Lemma 5.1. next round is: (1 − pr ) ∗ (1 − pr ) ∗ (1 − pr ) 6. SIMULATION SETUP 4 5 6 Payment mechanism. We develop a simulation framework to evaluate the performance The profit of the platform is equal to the of the proposed methods. It is devised based on the real data re- price sum of dispatched orders minus the payment to the drivers. trieved from the ridesharing business of Didi Chuxing. The exper- In Didi Chuxing, the price of a ridesharing order is displayed to the iments in Section 7 are run under this simulation framework. requesters after the inputs of origin and destination, and is fixed re- Vehicle simulation. We retrieve the status change records of the gardless of the order dispatch results. We obtain directly the order vehicles, where each record indicates that a vehicle goes either on- prices from the historical records. The payment to drivers includes line or offline. In our simulation, a vehicle is available from when the base fare and the charge of travel distances. Following the com- 10 yuan it goes online to when it goes offline. Note that there may be more mon practice in China, the base fare is by default. Besides, 2 yuan than one online record of a vehicle in a day, and each of them in- the payment to vehicles’ traveling per kilometer is set to . dicates an availability time span of the vehicle. Each online record also reports the initial geographical location of the corresponding 7. EXPERIMENT vehicle. We further map this location to the nearest node in the road In this section, we run experiments to evaluate the proposed network. methods. We first describe our experimental settings in Section

860 Table 3: Experimental settings Table 4: Pruning success rate Variables Values θpt (in seconds) 300 600 900 1200 θdr 1.2, 1.5, 1.8, 2.1, 2.4 Pruning success rate 80.35% 57.03% 33.43% 32.48% θpt 300, 600, 900, 1200 0 trnd 5, 10, 15, 20 to D1. Suppose there is another vehicle v2 with travel distance D2 0 bcost 7, 10, 13 and D2 corresponding to before and after insertion of o1 respec- 0 0 0 0 tively. Besides, let D1 < D2 and D2 − D2 < D1 − D1. Then, 7.1. Then, we validate the effectiveness of the order cancellation [20] would dispatch o1 to v2 while [15] would dispatch o1 to v1. model and the optimization techniques in Section 7.2.1 and Sec- To evaluate [15] under our simulation, we offer the streaming tion 7.2.2 respectively. Besides, we report the evaluation results of order requests according to their creation times. To adapt [15] to our proposed methods in Section 7.2.3. Finally, we compare them solve our problem, on arrival of oi, [15] would need to find the with the online method in Section 7.2.4. optimal vehicle which yields the maximum profit. That is,

arg max revi − αd ∗ ∆d(planj ) 7.1 Experimental Setting vj The simulation experiment is run in the urban area of Beijing, where ∆d(plan ) is the distance increase of v ’s plan from serving i.e., the region bounded by the 5th Ring Road, with longitude from j j the new order o , and α is the charge per unit distance. Since rev 116.1996◦ to 116.5457◦ and latitude from 39.7558◦ to 40.0229◦. i d i is fixed, to maximize the profit is to minimize ∆d(plan ), i.e., the Only vehicles and orders inside this area are considered. The data j additional incurred distance, which is exactly the objective in [20]. is retrieved from the time period between 7 : 00 am and 7 : 30 am Therefore, we build an online baseline to minimize the additional in a normal weekday. Note that 7 : 00 ∼ 7 : 30 am is one of the incurred travel distance like [20]. However, the kinetic-tree-based peak ordering periods in a day. There are totally 4907 orders in this order insertion method of [15], which enumerates re-orderings, is period, and 2.73 new orders come per second on average. The road adopted to make the dispatch more effective. In other words, we network is obtained from Open Street Map7. adapt the order insertion method in [15] to optimize the objective Control variables. Remember that the proposed order dispatch al- in [20]. gorithms are round-based, and each round is associated with a time Besides, in [15], an order would be notified about its dispatch window to batch the new orders. Let t denote the time window rnd result right after its arrival. If there is no feasible dispatch, the riders of one round, and we vary t from 5 s to 20 s to examine its rnd can re-submit the requests. Therefore, in our experiment, we let an effects. Besides, in Definition 8, we have three optimization con- order request again after some seconds if it cannot be dispatched. straints, regarding the detour ratio θ (Definition 4), pick-up time dr An order would keep requesting until it is dispatched or its number θ (Definition 5) and the base fare bcost (Definition 6). The detour pt of requests exceeds the a pre-defined limit. ratio θ and pick-up time θ are varied in {1.2, 1.5, 1.8, 2.1, 2.4} dr pt Note that we do not compare with existing works of DARP, be- and {300, 600, 900, 1200} (in seconds) respectively. Besides, we cause they [8, 10, 5, 16] assume all orders are served, which cannot vary the base fare bcost from 7 to 13. Finally, to coincide with the be true in real-time ridesharing under constraints of waiting time current ridesharing practice of Didi Chuxing, the vehicle capacity and detour distance. For works without such an assumption [1], is fixed at 3. Table 3 summarizes the experimental setting of the it is unclear on how to regularize the penalty term in its objective control variables, where the default values are marked in bold. function. Comparison among proposed methods. We examine the effec- tiveness and efficiency of the proposed methods, including Greedy 7.2 Experimental results (in Section 3), BM (bipartite matching in Section 4.1) and PBM (packing based matching in Section 4.2). The amount of attained 7.2.1 Effectiveness of order cancellation model profit and the running time per round are reported. We first examine the order cancellation model presented in Sec- Comparison with the state-of-art method. For online methods tion 6. We obtain the bucketing results of the collected cancelled [20, 15], they immediately dispatch an order on its arrival. Their orders (from real data). Then, we create a set of simulated orders, difference lies in two aspects. Firstly, in terms of searching inser- whose size equals that of the real cancelled order set. The simu- tions on a vehicle’s travel plan, [15] enumerates all possible re- lated orders are then cancelled according to Equation (3) as time orderings while [20] respects the original ordering of existing or- e e goes by. Note that we do not dispatch these orders as we are only ders. For example, suppose the travel plan of a vehicle v is vo1o2. interested in their cancellation time distribution. Finally, we calcu- To add a new order o3, let us assume the optimal new plan is s e e e late the number of cancelled simulated orders of each bucket. vo3o2o1o3, which would be found by [15]. In contrast, the new e s e e e The cancellation bucket indices of the real and simulated orders plan obtained by [20] may be vo1o3o2o3 to respect that o1 is orig- e form two samples. We examine whether these two samples follow inally ahead of o2. [15] opts to pursue a better dispatch result with the same distribution using the two-sample Kolmogorov-Smirnov more time complexities. However, by using kinetic trees to store test8. The null hypothesis is that the two samples are from the the plans, [15] shows that the dispatch of an order can finish within same continuous distribution. The calculated p-value is equal to dozens of milliseconds. 0.9872, which is larger than 0.05. Therefore, it does not reject the Secondly, in terms of the optimization objective, when dispatch- null hypothesis at the 5% significance level. ing an order to a vehicle, [20] minimizes the additional incurred travel distance, while [15] minimizes the travel distance of the aug- 7.2.2 Effectiveness of Optimization techniques mented plan. For example, let the travel distance of the plan of Effectiveness of vehicle pruning. As presented in Section 5.1, 0 v1 be D1, and it would be increased to D1 if dispatched with a we prune infeasible vehicles for orders by comparing their geo- new order o1. Then, the additional incurred travel distance refers graphical distance to θ ∗ speed. On our machine, it only takes 0 pt to D1 − D1, and the travel distance of the augmented plan refers 8https://en.wikipedia.org/wiki/Kolmogorov% 7https://www.openstreetmap.org E2%80%93Smirnov_test

861 orsodn rfisaeeautda t ria ie( time arrival dy- its at each evaluated For are profits below. corresponding ( figure order the arrived For in namically shown order. as each functions, of dispatcher arrival on let (i.e., computations example, these pairs order-vehicle do eval- the we of because of cost the profits exclude the which times uating running the report We ( onds). profits achieved the including travel. ftepooe itneapoiaintcnqei olre than larger no is technique 2 approximation distance proposed the of otprrudi al ,wihaeruhysm o h proposed the for same roughly are time which algorithms. 5, evaluation Table profit in round corresponding per the cost report we above, scribed evaluating period, in experimental our problem that no 00 Note is : arrive. 7 there orders orders so when new 2.73, profits of the is number second the per before, mentioned coming As seconds. 0.0139 which centers, their and nodes between found is distance to be average set can the is It late threshold within the are result. nodes though the clustering centers, net- of the half original dis- than in the more mass centers in that probability nodes their the road and 7 between work Figure distances in the show of We tribution clusters. 5971 centers. to cluster the using real-time set in We answered shortest- of be amount can vast queries the that path so algorithm clustering node when a pose Even approximation. distance order. of each Effectiveness for pruned successfully θ be can vehicles When than larger is 4. Table rate different in under shown rate success is pruning The the using formula. distance Haversine geographical the compute to microseconds some .. oprsnaogtepooe methods proposed the among Comparison 7.2.3 iue7 M fdsacsbtenndsadtercenters. their and nodes between distances of PMF 7: Figure pt ∗ erpr h oprsnrslso u ehd nti section, this in methods our of results comparison the report We fw ontcnutteeauto nodr’arvla de- as arrival orders’ on evaluation the conduct not do we If is order per cost time evaluation profit the experiment, our In 175 175 1200 = . iecost Time ∼ 6 . θ 6 al :Poteauto iecs e round. per cost time evaluation Profit 5: Table d m t 30 : 7 rnd m hrfr,acrigt em .,tema error mean the 5.2, Lemma to according Therefore, . 500 = s 351 = t h rnn ucs aei tl around still is rate success pruning the , h am and Probability 0.1 0.2 0.3 0.4 50% 0 0 m sarayteodrn eki day. a in peak ordering the already is , . 2 � . t � 950

5 0-100 h m o G ocutrtends hc leads which nodes, the cluster to NGC for +1 s hc en htmr hnhl fthe of half than more that means which , hc sqiesalfranra vehicle normal a for small quite is which , � o s � 100-200 etoajcn ieeoh hnthe when epochs time adjacent two be 1 � ∼ � 1 θ � � . pt 10 yuan

317 200-300 o 4 ≤ � s ,isfail eilsadthe and vehicles feasible its ), � � s n h unn ie (sec- times running the and ) 300-400 � 600 � 500 � 1 . � 15 071 200 s

� 400-500 nScin52 epro- we 5.2, Section In m h rnn success pruning the , � s efrhrcalcu- further We . s m wyfo their from away P 1 ij . 20 538 3 1 t s.Ti is This ’s). o . 1 s ∼ s t o θ 4 pt ). ’s 862 fetof Effect θ In better. orders. behaves the PBM, algorithm, pack packing-based to the space case, more this brings large which a because constraint, small is is detour it This when better 1.5). are and BM and (1.2 Greedy while 2.1), and (1.8 large varying of algorithm. matching of the the Effect to running leads of which cost large, time becomes increased graph order-vehicle the in edges when because is This creases. to larger payments a more means to time leads waiting vehicles. which of pick-up, amount during larger distance a driving that is reason The d n P.A hw nTbe6 h rfisaeal0when 0 all are profits the 6, Table in meth- shown our As of profits OPT. achieved and the compare ods Dongcheng and the Beijing, in orders of and District vehicles historical the from vehicles 8 scenario. small a opt in we OPT data, with real methods our large-scale compare the OPT to on finding solution) of op- dispatch complexity the optimal computational from (the great away the solutions to Due approximation these timum. ques- are a remains far It how NP-hard. tion is problem MPPR the because solution. methods Optimal variation to significant Comparison no is there 9(d)), different over Figure For (in better. times behaves running PBM the Therefore, vehicles. less employs it cause when profit highest the when achieve Greedy and bcost PBM 9(c), Figure In different over significantly change smaller. The to gets profit payment achieved ride. large the to long Subsequently, leads a vehicles. distance the share detour really of amount not large which incurred orders of combination in when down at go peak PBM & Greedy and achieve PBM after drop and profits Greedy their sides, 8(c), Figure when In profit highest 8(d). the and 8(c) Figure in atefiin eas h re rp ssparse. of is graph Effect in order is the orders because packing efficient of fact the process accelerates nodes the which Besides, of smaller, number computation. matching becomes the graph orders, order-vehicle packing the after step. in that packing be order may an reason has The additionally it though BM, than efficient of choice. the values be all would throughout efficient is Greedy t limit. time the when inappropriate exceed PBM is and al- It BM maximum algorithms. the adopt dispatch is to the round for a time in window running time around lowed of are length PBM the that and Note BM of times ning PBM for hard it makes rides. This shared good input. when obtain the better to in is batched BM are why orders fewer reason best the The performs cases. PBM when other profit, second of ranks terms profit In Its overall. 8(b). and 8(a) Figure in fetof Effect rnd dr tcnas efudta h rfi osntawy mrv when improve always not does profit the that found be also can It when increase PBM and BM both of times running The ornasalsaeeprmn,w admypc resand orders 8 pick randomly we experiment, small-scale a run To not do They stable. are methods three all of times running The nte neetn nigi htPMi culysihl more slightly actually is PBM that is finding interesting Another run- average the that observe can we 8(b) Figure from However, sicesd ssoni iue9a,B ek at peaks BM 9(a), Figure in shown As increased. is hrfr,when Therefore, . bcost 13 = t θ θ bcost rnd θ dr pt dr slre h eeto akn resgt agr be- larger, gets orders packing of benefit the large, is and . . bcost . ntrso rfi,PMprom etwhen best performs PBM profit, of terms In . θ iue9a n ()so h xeietlresults experimental the show 9(b) and 9(a) Figure h xeietlrslso varying of results experimental The h xeietlrslso varying of results experimental The . dr bcost h aefare, base The 2 = ’s. . θ t 7 = 1 rnd pt h esni htalarge a that is reason The . ≤ θ θ ≤ epciey h esnmyb that be may reason The respectively. pt t dr 600 θ rnd 5 pt 600 = 1 = fcetagrtm ieGreedy like algorithms efficient , slre h ubro non-zero of number the large, is and θ bcost ≤ dr t . 8 5 rnd θ ’s. epooeapproximation propose We θ h rfiso l methods all of profits The . and dr sterrnigtmscan times running their as , pt svre rm7t 13. to 7 from varied is , 5 orsod oarelaxed a to corresponds 5 = ≥ θ s pt 900 and n ak o nall in top ranks and , 900 = epciey Be- respectively. t 6 rnd t θ s θ rnd dr pt respectively. respectively. 5 = θ a result may r shown are r shown are dr θ 1 = sthat is θ pt dr in- . 5 is , 4000 Greedy 8 Greedy 4000 Greedy 6 BM BM BM PBM PBM PBM 3500 3500 5 Greedy 6 BM 3000 3000 4 PBM 2500 4 2500 3 Profit Profit 2000 2000 2 2

1500 Running time (s) 1500 Running time (s) 1 1000 0 1000 0 5 10 15 20 5 10 15 20 300 600 900 1200 300 600 900 1200 trnd trnd θpt θpt

(a) Profits of various trnd’s (b) Running times of various (c) Profits of various θpt’s (d) Running times of various trnd’s θpt’s

Figure 8: Effect of trnd and θpt.

4000 Greedy 8 5000 8 Greedy BM Greedy BM 3500 PBM 4500 BM PBM 6 PBM 6 3000 4000 2500 4 3500 4 Greedy Profit Profit 2000 BM 3000 2 PBM 2

1500 Running time (s) 2500 Running time (s) 1000 0 2000 0 1.2 1.5 1.8 2.1 1.2 1.5 1.8 2.1 7 10 13 7 10 13 θdr θdr bcost bcost

(a) Profits of various θdr’s (b) Running times of various (c) Profits of various bcost’s (d) Running times of various θdr’s bcost’s

Figure 9: Effect of θdr and bcost.

750 750 Table 6: Comparison with OPT. 745 Profits 740 bcost 740 Greedy KM PBM OPT 735 730 3 34.78 13.47 15.06 44.71 Profit 730 Profit 720 5 24.16 8.91 17.48 24.16 725 7 13.89 8.13 17.72 20.61 720 710 2 4 6 8 10 5 10 15 20 25 10 0 0 0 0 num requests time gap (a) Varying number of requests (b) Varying the time gap Figure 10: Results of online method [15]. Table 7: Result summary. t θ Setting rnd pt Besides, through comparison with OPT in a small scenario, we ≤ 5 > 5 < 900 ≥ 900 show that the achieved profits of our methods are competitive. Preferred Greedy PBM Greedy PBM 7.2.4 Comparison with Online Method θ bcost Setting dr In Section 7.1, we discuss how to adapt the online dispatch < 1.8 ≥ 1.8 < 10 ≥ 10 method [15] to maximize the profit. We now conduct evaluation Preferred KM PBM Greedy PBM of this approach under the simulation. We vary the maximum al- lowed number of repeated requests of an order from 2 to 10 to see the effect. Besides, we also examine the effect of the time gap be- bcost = 10, which indicates that no orders can be dispatched. This tween two adjacent requests of an order, by varying it from 5 s to is because in the input, the vehicles are sparse and the order prices 25 s. are not large compared with the base fee (bcost = 10 by default). The results are shown in Figure 10(a) and 10(b). In Figure 10(a), Thus, we set lower base fares (from 3 to 7) and present the results the achieved profit generally goes up when the maximum number in Table 6. It can be found that the profits of our proposed methods of requests per order is increased. However, even with 10 requests are at the same scale as that of OPT. Besides, even for the worst per order, the profit is still less than 750. This is far less than the 1 algorithm KM, its profit is at least around 3 of that of OPT. For the profits of our round-based methods. Similarly, when we increase running times, our proposed methods can finish within some mil- the time gap between two adjacent requests, the achieved profit liseconds, while the brute-force OPT takes thousands of seconds to generally increases, but remains below 750. finish. To explain the profit gap between our round-based methods and Summary of the experimental results. Overall, in terms of the the online method [15], we calculate the amount of profit per or- achieved profit, PBM and Greedy perform more robustly than BM. der in results of PBM and [15], which are 11.16 and 4.90 yuan We summarize the comparison results among our methods in Table respectively. This indicates that [15] makes distinctly worse dis- 7. Note that when trnd ≤ 5 s, only Greedy can satisfy the time patches compared to PBM. Its short-sight view of the orders may requirement. When trnd > 5 s (6 s), PBM (BM) can finish the account for this. That is, it optimizes the current order without con- dispatch safely within the time window. sideration of subsequent orders. This prevents it from making good

863 computes the profit of platform if it serves this order. The profits Table 8: A toy example are reported to the platform as a bid, and the largest one would be P v v i,j 1 2 picked. The key difference between [2] and our work is that the o1 4 5 order price is upfront in our setting, and serves as an input of the o2 2 10 dispatch process. In contrast, in [2], the price of an order is affected by the final dispatch result. A rider would pay less for a longer de- dispatches from a global view. We give a simple example to help tour. One way to adapt [2] to solve our problem is to fix the order understand this. Suppose there are two manned vehicles v1 and v2, price, making it irrelevant to the detours. Then, the method in [2] both with one remaining seat. Two orders o1 and o2 come one after would degenerate to minimizing the travel cost increase of drivers. another, and the dispatch profits are shown in Table 8. Since o1 This is similar to [20, 15], comparisons with which have been car- comes ahead of o2, [15] would make the dispatch (o1, v2) and (o2, ried out in our experiments. v1), whose profit is only half of that of {(o1, v1), (o2, v2)}. Alonsomora et al. [1] study the real-time ridesharing problem in the round-based setting. They optimize an objective function 8. RELATED WORK which linearly combines the the travel time delays (caused by shar- ing the ride), and the number of un-served orders. They construct The car-hailing problem. Under the round-based setting, order a RTV graph which considers all potential packings of the orders, dispatch in unshared car-hailing degenerates to the bipartite match- and solve the problem by integer programming methods. The prob- ing problem [17], which can be solved in polynomial time. In con- lem is too complex to be solved optimally in real time, and the so- trast, car-hailing under the online setting has drawn increasing at- lution in [1] is to set timeouts to trade optimality for tractability. tention [26, 24, 29, 18], which is also named as the Online Maxi- However, since the two penalty terms, time delays and the number mum Weighted Bipartite Matching (OMWBM) problem. The goal of un-served orders, have different measures, it is unclear how to is to maximize the utility sum of the matching, where the utilities set the regularization terms. Cheng et al. [6] study the ridesharing can be defined according to the distances between vehicles and or- problem with social affinity concerns. Their goal is to let riders ders. [24, 29] and [18, 26] devise randomized algorithms with ap- with high social affinity take the same vehicle, to better their ride proximation ratios under the adversarial model and the random or- experience. der model respectively. In the adversarial model, the approximation Gidofalvi et al. [13] propose efficient order packing algorithms solutions are compared with the optimal solution in the worst case for the real-time ridesharing problem, targeting at large-scale in- of tasks’ arriving orders. In contrast, in the random order model, puts. Their goal is to maximize riders’ overall savings. They pack they are compared with the optimum under the average case of ar- all order requests, which indicates that all orders would be served riving orders. In addition to matching workers with tasks, Tong et in their setting. In [22], each driver has its own travel plan, and al. [27] also utilize the guidance on workers’ movement to further would accept an order request if their shared travel distance is large optimize the online task assignment. enough. They formulate the problem as the maximum weighted bi- The dial-a-ride problem. The typical formulation of a dial-a-ride partite graph matching problem, and propose techniques to acceler- problem (DARP) is to design travel routes for a given set of vehicles ate the edge weight calculation process. [22] differs from our work to pick up and drop off a set of customers w.r.t. their time require- in that their drivers have pre-defined travels and thus they do not ments. It can treated as a constrained vehicle routing problem [19], consider packing orders. Wang et al. [28] study the activity-based and is NP-hard as well. The main difference between DARP and ridesharing problem. Assuming the availability of users’ daily ac- real-time ridesharing lies in that DARP commonly assumes all or- tivities, they allow more than one destinations for the activities as ders can be served. This cannot be true in real-time ridesharing due longs as they are functionally similar. to the limited transportation capacity. The common objective in DARP is to minimize the overall travel distance. Integer program- ming formulations are widely adopted to find the optimal solution 9. CONCLUSION [8, 16]. However, only very small instances can be solved opti- In this paper, we study the order dispatch problem in price-aware mally within bearable amount of time costs. Therefore, heuristics ridesharing. We formulate the problem of profit maximization with have been proposed to find approximation solutions [10, 5]. These constraints on detour ratios and waiting times. To the best of our heuristics proceed in two stages. In the first stage, they cluster the knowledge, this is the first work that has taken order prices into con- orders and dispatch the clusters to vehicles. Then, in the second cern during order dispatch. We show that the problem is NP-hard, stage, they improve the dispatch by swapping the orders among ve- thus, we propose approximation methods, including the Greedy hicles. As summarized in [9], however, only small instances with method, the bigraph matching method, and the packing based match- up to hundreds of vehicles and orders have been tested on these ing method. We develop a simulation framework using real rideshar- algorithms. ing data, and evaluate the effectiveness and efficiency of the pro- The dynamic dial-a-ride problem [3, 7, 14] processes the orders posed methods with this simulation. Through comparison with in a stream. This is similar to the online ridesharing [20, 15]. How- the state-of-art method and the optimal solution, we show that our ever, [3, 7, 14] allow the dispatcher to exchange the dispatched methods are competitive and effective. orders among vehicles. This operation is clearly not supported in real-time ridesharing. In the current practice, an executed dispatch 10. ACKNOWLEDGMENT keeps intact unless the order is cancelled by the rider. Ridesharing. [20, 15] study the real-time ridesharing under the The work is partially supported by the Hong Kong RGC GRF online setting. In this setting, the streaming orders are processed Project 16207617, National Grand Fundamental Research 973 Pro- by the dispatcher one by one, in the first-come-first-serve manner. gram of China under Grant 2014CB340303, the National Science A careful discussion of these two works is presented in Section Foundation of China (NSFC) under Grant No. 61729201, Science 7.1. Another related online ridesharing work is [2], which also tar- and Technology Planning Project of Guangdong Province, China, gets at maximizing the platform’s profit, jointly considering orders’ No. 2015B010110006, and Microsoft Research Asia Collaborative price and drivers’ cost. In [2], on arrival of an order, each vehicle Research Grant. Data retrieved from Didi Chuxing.

864 11. REFERENCES [16] L. M. Hvattum, A. Løkketangen, and G. Laporte. A [1] J. Alonso-Mora, S. Samaranayake, A. Wallar, E. Frazzoli, branch-and-regret heuristic for stochastic and dynamic and D. Rus. On-demand high-capacity ride-sharing via vehicle routing problems. Networks, 49(4):330–340, 2007. dynamic trip-vehicle assignment. Proc. of the NAS, page [17] M.-Y. Kao. Weighted bipartite matching. Encyclopedia of 201611675, 2017. Algorithms, pages 1020–1020, 2008. [2] M. Asghari, D. Deng, C. Shahabi, U. Demiryurek, and Y. Li. [18] T. Kesselheim, K. Radke, A. Tonnis,¨ and B. Vocking.¨ An Price-aware real-time ride-sharing at scale: an auction-based optimal online algorithm for weighted bipartite matching and approach. In Proc. of the SIGSPATIAL GIS, page 3. ACM, extensions to combinatorial auctions. In European 2016. Symposium on Algorithms, pages 589–600, 2013. [3] A. Attanasio, J.-F. Cordeau, G. Ghiani, and G. Laporte. [19] G. Laporte. The vehicle routing problem: An overview of Parallel tabu search heuristics for the dynamic multi-vehicle exact and approximate algorithms. European journal of dial-a-ride problem. Parallel Computing, 30(3):377–387, operational research, 59(3):345–358, 1992. 2004. [20] S. Ma, Y. Zheng, and O. Wolfson. T-share: A large-scale [4] M. Bellmore and G. L. Nemhauser. The traveling salesman dynamic taxi ridesharing service. In Proc. of the ICDE, problem: a survey. Operations Research, 16(3):538–558, pages 410–421, 2013. 1968. [21] J. Munkres. Algorithms for the assignment and [5] R. W. Calvo and A. Colorni. An effective and fast heuristic transportation problems. Journal of the society for industrial for the dial-a-ride problem. 4OR - A Quarterly Journal of and applied mathematics, 5(1):32–38, 1957. Operations Research, 5(1):61–73, 2007. [22] T. Na, G. Li, T. Zhao, J. Feng, H. Ma, and Z. Gong. An [6] P. Cheng, H. Xin, and L. Chen. Utility-aware ridesharing on efficient ride-sharing framework for maximizing shared road networks. In Proc. of the SIGMOD, pages 1197–1210, route. IEEE Transactions on Knowledge & Data 2017. Engineering, PP(99):1–1, 2017. [7] A. Colorni and G. Righini. Modeling and optimizing [23] F. Rubin. A search procedure for hamilton paths and circuits. dynamic dial-a-ride problems. International transactions in Journal of the ACM (JACM), 21(4):576–580, 1974. operational research, 8(2):155–166, 2001. [24] H.-F. Ting and X. Xiang. Near optimal algorithms for online [8] J.-F. Cordeau. A branch-and-cut algorithm for the dial-a-ride maximum edge-weighted b-matching and two-sided problem. Operations Research, 54(3):573–586, 2006. vertex-weighted b-matching. Theoretical Computer Science, 607:247–256, 2015. [9] J.-F. Cordeau and G. Laporte. The dial-a-ride problem (darp): Variants, modeling issues and algorithms. 4OR - A Quarterly [25] Y. Tong, J. She, B. Ding, L. Chen, T. Wo, and K. Xu. Online Journal of Operations Research, 1(2):89–101, 2003. minimum matching in real-time spatial data: experiments and analysis. PVLDB, 9(12):1053–1064, 2016. [10] J.-F. Cordeau and G. Laporte. A tabu search heuristic for the static multi-vehicle dial-a-ride problem. Transportation [26] Y. Tong, J. She, B. Ding, L. Wang, and L. Chen. Online Research Part B: Methodological, 37(6):579–594, 2003. mobile micro-task allocation in spatial crowdsourcing. In Proc. of the ICDE, pages 49–60, 2016. [11] Z. Galil. Efficient algorithms for finding maximum matching in graphs. ACM Computing Surveys, 18(1):23–38, 1986. [27] Y. Tong, L. Wang, Z. Zhou, B. Ding, L. Chen, J. Ye, and K. Xu. Flexible online task assignment in real-time spatial [12] R. Geisberger, P. Sanders, D. Schultes, and D. Delling. data. PVLDB, 10(11):1334–1345, 2017. Contraction hierarchies: Faster and simpler hierarchical routing in road networks. Experimental Algorithms, pages [28] Y. Wang, R. Kutadinata, and S. Winter. Activity-based 319–333, 2008. ridesharing: increasing flexibility by time geography. In Proc. of the SIGSPATIAL GIS, page 1. ACM, 2016. [13] G. Gidofalvi, T. B. Pedersen, T. Risch, and E. Zeitler. Highly scalable trip grouping for large-scale collective transportation [29] Y. Wang and S. C.-w. Wong. Two-sided online bipartite systems. In Proc. of the EDBT, pages 678–689, 2008. matching and vertex cover: Beating the greedy algorithm. In Proc. of the ICALP, pages 1070–1081, 2015. [14] M. E. Horn. Fleet scheduling and dispatching for demand-responsive passenger services. Transportation [30] L. Zhang, T. Hu, Y. Min, G. Wu, J. Zhang, P. Feng, P. Gong, Research Part C: Emerging Technologies, 10(1):35–63, and J. Ye. A taxi order dispatch model based on comnatorial 2002. optimization. In Proc of the SIGKDD, pages 2151–2159, 2017. [15] Y. Huang, F. Bastani, R. Jin, and X. S. Wang. Large scale real-time ridesharing with service guarantee on road [31] L. Zheng and L. Chen. Maximizing acceptance in networks. PVLDB, 7(14):2017–2028, 2014. rejection-aware spatial crowdsourcing. IEEE Transactions on Knowledge and Data Engineering, 2017.

865