Dynamic Relocation in Ridesharing via Fixpoint Construction
Abstract
To address spatial imbalances in the supply and demand of drivers, ridesharing platforms can make use of policies to direct driver relocation.
We study a simple model of this problem, which allows us to give a constructive characterization of the unique ﬁxpoint of system dynamics.
Using this construction, we design a dynamic policy that provides stronger, than previous work, guarantees about its rate of convergence to the ﬁxpoint.
Simulations demonstrate the beneﬁts of our approach.
INTRODUCTION
Ridesharing platforms such as Didi, Lyft, and Uber match passengers in need of transportation with drivers who can provide it.
As drivers provide service to passengers, they themselves travel and so may end up in a new region when seeking to next provide service.
Unbalanced demand to and from a region leads to an excess or shortage of drivers in that region and calls for a policy for relocation of drivers.
Designing good relocation policies that direct drivers from regions where there is an excess to regions where there is a shortage is therefore a key challenge both for providing efﬁcient service [Afeche et al., 2018] and minimizing environmental costs [Ward et al., 2021].
Prior work has developed a number of models of the problem of designing relocation policies, including in the context of other decisions such as pricing.
Many of these models are, however, quite complex and the results are often focused on optimizing a particular objective such as revenue or availability.
This leads to several related challenges.
In some analyses it is simply assumed that the system has achieved some notion of steady state or equilibrium without justiﬁcation of how the system dynamics lead there [Bimpikis et al., 2019, Besbes et al., 2021].
Furthermore, this steady-state behavior may only be examined for an optimal policy for a particular objective, leaving the behavior of the system if a policy is chosen to address another objective [Bimpikis et al., 2019, Hosseini et al., 2021, Iglesias et al., 2019, Zhang and Pavone, 2016].
Even for those few analyses that have addressed the convergence behavior of arbitrary policies, the complexity of the model has typically lead to a nonconstructive analysis [Braverman et al., 2019].
In this paper we address these problems by adopting a simple stylized model that can be thought of as a special case or limiting behavior of a number of models in the literature (see Section 1.1).
In it, the area where the ridesharing platform operates is divided into r regions and there is a ﬁxed total mass of drivers available to serve passengers.
Time is discrete and at each step a ﬁxed mass of passengers seek service in each region.
The drivers currently in that region carry passengers to their destination.
If the mass of drivers exceeds the mass of passengers in a region, the remaining drivers relocate according to a ﬁxed policy (which may include staying where they are).
Both carrying passengers and relocating take a single time unit.
If the mass of passengers exceeds the mass of drivers in a region, the excess passengers are simply not served
The simplicity of our model allows us to provide concise arguments that establish a number of key properties.
• Each combination of policy and total mass of drivers has a unique ﬁxpoint of the system dynamics.
• Starting from any initial conditions, the system dynamics converge to this unique ﬁxpoint.
The ﬁxpoint is continuous and monotone in the mass of drivers and can be constructed via the stationary distributions of a linear number of Markov chains.
Our arguments are based on the analysis of a piecewise linear
generalization
of
Markov
chains which
may
be of independent interest.
As an example of the beneﬁts of such a rigorous understanding of the behavior of the system, we analyze the problem of dynamically adjusting the policy to converge to the ﬁxpoint as rapidly as possible from arbitrary initial conditions.
We introduce a dynamic policy that makes use of our ﬁxpoint construction and is the ﬁrst to have guarantees about its rate of convergence and the welfare loss while converging relative to welfare in the chosen ﬁxpoint.
Simulations based on data from Didi show superior performance to prior approaches for handling stochastic demands.
Additional simulations on synthetic data show that it converges substantially faster than previous heuristic approaches.
In our simple model these previous approaches target maximizing efﬁciency and our approach matches their performance while being more ﬂexible in its ability to target other metrics such as availability.
1.1 RELATED WORK
Our model is part of a growing literature that analyzes the stationary behavior of ridesharing systems either in a direct formulation as optimization problem [Bimpikis et al., 2019,
Pavone et al., 2012] or as the ﬂuid limit of a queueing model [Braverman et al., 2019, Hosseini et al., 2021, Iglesias et al., 2019, Banerjee et al., 2017, Zhang and Pavone, 2016,
Waserhole and Jost, 2012].
Indeed, our model is a special case of a number of these.
There are also models of service networks which lack the crucial aspect of ridesharing that providing service changes which customers can be served in the future [Caldentey et al., 2009, Adan and Weiss, 2012,
Gurvich and Ward, 2014].
Closest to our theoretical results, Braverman et al.
[2019] analyze the dynamics of a queueing system with a ﬂuid limit, which generalizes our model.
As we do, they show convergence to a unique ﬁxpoint.
Their analysis is nonconstructive and substantially more complex.
They examine dynamic relocation but provide only simple heuristics.
Our analysis is constructive and simpler, and we provide theoretical guarantees for dynamic relocation.
Hosseini et al.
[2021] recently examined the use of dynamic policies to address stochastic deviations from the ﬁxpoint of system dynamics due to a ﬁnite population of drivers and passengers.
While their analysis is quite different from ours, they exploit some of the same underlying properties of the dynamics and we use an adaptation of their heuristic as a comparison in our experiments.
As we demonstrate, in our experiments we obtain faster convergence and can target a wider range of objectives.
While our focus is on the design of relocation policies, there is also a literature on the implications of implementing them with self-interested drivers through pricing or other mechanisms.
Closest to our work are those on spatial pricing [Afeche et al., 2018, Besbes et al., 2021, Lu et al., 2018,
Bimpikis et al., 2019], but other work examines temporal policies such as charging “surge” prices at times of peak demand [Hall et al., 2015, Banerjee et al., 2015, Cachon et al., 2017, Chen and Sheldon, 2015, Garg and Nazerzadeh, 2021,
Hall et al., 2017] and combining both spatial and temporal pricing [Buchholz, 2015, Guda and Subramanian, 2017, Ma et al., 2019].
While we treat all drivers and passengers in a region as interchangeable, there are also ﬁner-grained models which focus on decisions about which speciﬁc driver to match to each passenger [Hu and Zhou, 2022, Castillo et al., 2017, Özkan and Ward, 2020, Biswas et al., 2017].
PRELIMINARIES 2.1 NOTATION
Let r denote the number of regions.
In the sequel, all the vectors are r -dimensional
and all the matrices are r × r dimensional.
We sometimes abuse notation and denote by
A [ i, j ] the term ( A [ i ])
[ j ] .
For two vectors A and B , we say that A ≥ B if max( A, B ) =
A , where the max (here and elsewhere in this document) is taken point-wise.
Thus, for every i ,
A [ i ] ≥ B [ i ] .
Similarly, for vectors A and B , A ≤ B if min( A, B )
=
A .
Similarly, if A and B are matrices, we say that A ≥ B (resp.
A ≤ B ) if for every i and j ,
A [ i, j ] ≥ B [ i, j ] (resp.
A [ i, j ] ≤ B [ i, j ] ).
We denote by c the vector whose entries are all c .
In particular we use 0 —the all 0 vector, and 1 —the all 1 vector.
We use boldface to denote the sum of a vector or a matrix.
Thus, A is the sum of A ’s entries.
For a matrix A , 1 A is the vector whose i th entry is the sum of the i th column of A .
Similarly, A 1 , is the vector whose i th entry is the sum of the i th row of A .
For a positive real x , let a vector induced by x be any ( rdimensional) vector of non-negative reals whose sum is x .
We call a vector A induced by 1 a probability vector .
Every vector induced by a positive x uniquely deﬁnes a probability vector
A by normalization.
Conversely, every probability vector A deﬁnes a vector induced by x , namely xA , which we call the the vector induced by x given A .
A right stochastic matrix , or just a stochastic matrix is a matrix all of whose rows are probability vectors.
Such a matrix corresponds to a Markov chain and is ergodic if for some power k , A k is positive.
Ergodic matrices have unique stationary distribution .
We use the predicate Erg ( A ) to denote that a stochastic matrix A is ergodic.
If Erg ( A ) , we denote by σ ( A ) its unique stationary distribution, thus
[Equation]
2.2 MODEL
Our model of a ridesharing system has four key parts:
A demand matrix W such that W [ i, j ] denotes the mass of passengers wishing to travel from i to j .
For technical convenience we assume that for every i and j , W [ i, j ] > 0 .
W induces a right stochastic matrix which we denote V where V [ i, j ] is the fraction of passengers in region i who wish to travel to j ; 2.
A policy π —a probability vector where π [ j ] denotes the fraction of drivers who have no passengers that relocate to region j .
We denote by Z π the set of regions i for which π
[ i ] = 0 .
For notational convenience we sometimes refer to a stochastic matrix Π where each row is π . 3.
A total mass of drivers in the system q ≥ 0 .
At each timestep the current state of the system is represented by a mass distribution M where M [ i ] denotes the mass of drivers at region i .
Thus we require M ≥and M = q .
From a region i , the ﬁrst up to W
[ i ] drivers are distributed full , that is with passengers, to every region j proportional to V [ i, j ] .
The other drivers, if any, drive empty , that is passenger-less, to a destination according to π .
A region i for which M
[ i ] ≥ W
[ i ] is called saturated ; otherwise it is called unsaturated .
Let U M be the set of unsaturated regions given M .
Let out ( M )
[ i ] be the vector describing the outﬂow from region i given M .
For every region i , out W,π ( M )[ i ] =
[Equation]
The ﬁrst line, as well as the ﬁrst term in the second line, refer to full rides from i , while the second term in the second line refers to empty rides from i .
We assume that time is discrete and all rides and relocations take unit time.
Denote by next ( M ) the vector of the drivers available in each location in the next step.
Then for every region i , next ( M ) W,
[Equation] [Equation]
=
[Equation] [Equation]
For brevity, when it does not create ambiguity we may omit the W or π from the subscript.
A fact that will be used repeatedly is that next ( M ) (and its component parts) are monotone and continuous in M :
Lemma
The functions out ( M ) and next ( M ) are continuous and increasing in M .
Proof: Consider a region i and the function out ( M )
[ i ] which is either a product of M [ i ] — a scalar which is continuous in M —and a constant vector, or a sum of two such vectors.
Hence out ( M )[ i ] is continuous.
In either case, it is also increasing in M .
Since next ( M ) is a summation over out ( M ) ’s columns, the claim follows.
(cid:46)(cid:47)
The stylized model we have described is a special case of a number of models in the literature (e.g. [Bimpikis et al., 2019, Braverman et al., 2019, Hosseini et al., 2021]).
We have made it as simple as possible to enable a clear, concise analysis.
We discuss relaxing assumptions in Sec. 8.
CONSTRUCTING A FIXPOINT
Fix a demand matrix W and a policy π .
We present an algorithm (Alg. 1) that, given a quantity q ≥ 0 , constructs a mass distribution M such that M = q and M = next ( M ) .
Here, next ( M ) is analogous to the action of a Markov chain and such a ﬁxed point would correspond to a stationary distribution.
However, in general the action of next ( M ) is not a Markov chain because out W,π is piecewise linear rather than linear.
We ﬁrst introduce some notation and claims that are used in the algorithm and its proof of correctness.
3.1 BUILDING BLOCKS
A mass distribution M deﬁnes the marginal transition matrix T M where for every region i ,
T M [ i ] = (cid:26) V
[ i ] i ∈
U M π otherwise
Because W [ i, j ] > 0 for all i and j , T M is ergodic for every
M for which U M includes some non- Z π regions.
Given M such that Erg ( T M ) and σ = σ ( T M ) , deﬁne q ( M ) =
min i ∈ U M
(( W 1 [ i ] − M
[ i ]) /σ
[ i ])
That is, q ( M ) is the maximal mass that can be added, according to σ , to M as not to cause any region that was unsaturated to be oversaturated.
The following lemma establishes that if M = next ( M ) and there are some non- Z π unsaturated regions, then adding any quantity q ≤ q ( M ) to
M , proportionally to σ ( T M ) , will maintain the ﬁxpoint.
Lemma 2 Assume M = next ( M ) and U M ∩ Z π (cid:54) = ∅ , and let σ = σ ( T M ) .
Then for every q (cid:48) , 0 ≤ q (cid:48) ≤ q ( M ) , M + q (cid:48) σ is a ﬁxpoint mass distribution of next () .
Proof: Consider some q (cid:48) , 0 ≤ q (cid:48) ≤ q ( M ) and
i ∈
U M ∩ Z π .
The additional outﬂow from region i in M (cid:48) =
M + q (cid:48) σ relative to M is q (cid:48)
σ [ i ] .
Every region j contributes q (cid:48)
σ [ j ] T M [ j, i ] into i .
Since σ = σ ( T M ) , (cid:80) j q (cid:48)
σ [ j ] T M [ j, i ]
= q (cid:48)
σ [ i ] .
(cid:46)(cid:47)
The following lemma establishes that if M = next ( M ) with all unsaturated regions in Z π , then adding any quantity q ≥ 0 to M , according to π , will maintain the ﬁxpoint.
Lemma 3 Assume M = next ( M ) and U M ⊆
Z π .
Then for every q ≥ 0 , M + qπ is a ﬁxpoint mass distribution.
The proof, along with subsequent omitted proofs, can be found in App.
C
3.2 THE CONSTRUCTION
Let q ≥ 0 .
We now describe a construction that allocates q drivers into a mass distribution M such that M is a ﬁxpoint.
The function mapping q into the ﬁxpoint is piecewise linear and is accomplished in at most r + 1 phases.
In all but possibly the last phase, a portion of the remaining qallocation is distributed among the regions as to satisfy the ﬁxpoint yet so that no unsaturated region becomes oversaturated, until either q is exhausted or all non-
Z π regions are saturated.
If all non- Z π regions are saturated and q is not exhausted, the remaining mass is distributed according to π .
The construction algorithm is in Alg.
Algorithm 1: Construction of Fix Point
Input: A willing demand W , a policy π , and a total mass of drivers, and q
Output: A mass distribution M such that M = q
and next ( M )
=
M 1 M : a vector, init 0 /* current mass distribution */ 2 m : init q /* current mass */ 3 i : init r /* ghost variable for correctness proof */ 4 while ( m > 0)
do if U M ⊆
Z π then σ ← π ∆q ← m else σ ← σ ( T M )
∆q ← min( q ( M ) , m ) end
M ← M + ∆q · σ m ← m − ∆q i ← i −15 end 16 return M
We now show that:
Theorem 1 The Algorithm in Alg.
1 terminates, and upon termination M
= next ( M ) and M = q .
UNIQUENESS OF FIXPOINT FOR next
Fix a demand matrix W and a policy π .
For every q ∈ R + we have shown how to construct a ﬁxpoint of next with total mass q .
We now show this ﬁxpoint is unique.
Let
S q = { M ∈ ( R ≥ 0 ) r : M = q } denote the set of mass distributions with total mass q .
In the proof, rather than conﬁning our analysis to S q we extend it to a complete lattice L on which one can, with the aid of an auxiliary monotonically increasing function ( aux ) that has the same ﬁxpoints as next , apply the Knaster-Tarski theorem to show that the ﬁxpoint of next in S q is unique.
Theorem 2 Let W and π be given.
For all q ≥ 0 , the function next has a unique ﬁxpoint in S q .
The proof of the theorem relies on the following technical lemma.
Consider two mass distributions M 0 and Msuch that M 0 (cid:12) M
and let i and j be regions such that next ( M 0 )
[ i ] =
next ( M 1 )
[ i ] and M
[ j ] < M 1 [ j ] .
That is, the increase in mass from M 0 to M 1 adds drivers to j but does not result in additional inﬂow to i .
The following lemma show that this is equivalent to having i assigned no rides by π and j being saturated in M 0 .
Lemma 4 Let M 0 and M 1 be mass distribution vectors such that M 0 (cid:12) M 1 .
Let J ⊆
U M 0 be the set of unsaturated regions j for which M
[ j ] < M 1 [ j ] .
Then for all regions i , next ( M 0 )
[ i ] =
next ( M 1 )
[ i ] iff i ∈
Z π and J = ∅
OPTIMAL MASS ALLOCATION
So far, we have shown how given a ﬁxed willingness W (and thus also V ), policy π , and mass q we can compute the unique ﬁxpoint.
However, a ridesharing platform will typically have at least some control over π .
A natural question is how π should be chosen.
We examine how this can be done to maximize the number of full rides.
We give a linear programming approach to calculating such an optimal π .
This type of approach has been used in a number of similar models [Braverman et al., 2019, Hosseini et al., 2021,
Bimpikis et al., 2019], but we provide a complete treatment as we use it in our experiments
Recall the deﬁnition of out from Sec. 2.
There we split the computation of number of rides outgoing from a region according to whether the region is saturated.
If the region is unsaturated, then obviously all outgoing rides are full.
Else, some outgoing rides are empty, and distributed according to π .
Let F [ i, j ] denote the full outgoing rides from i to j and E
[ i, j ] the empty outgoing rides.
That is, for a mass distribution M ,
[Equation]
[ i ] otherwise and
[Equation]
otherwise
Rather than directly calculating a policy π that at the ﬁxpoint maximizes F , we instead provide a linear program in
Fig.
1 that deﬁnes when a solution (cid:104) F, E (cid:105) is feasible in that it results from the ﬁxed point of some policy π for supply q .
The ﬁrst constraint restricts to non-negative values.
The second, S upply-constraint , requires that the total trafﬁc is q .
The third, F low-constraint , requires that at each region the in- and out- ﬂows are equal (thus the solution is a ﬁxpoint).
The fourth, D emand-constraint , requires that the full outgoing trafﬁc at each region is no more than the willing demand at the region.
Finally, the ﬁfth, P roportion-constraint , requires that full outgoing trafﬁc at each region is allocated according to the willingness entry for that region.
[Equation]
constraint
[Equation]
[Figure]
[Equation]
[Figure]
[Equation]
[Figure]
[Equation]
[Figure]
Below are some properties of feasibility as deﬁned here.
Observation 1 Let W and π be given.
Given any q ≥ 0 , there is a feasible solution for q .
Observation 2 Let W and π be given and let (cid:104) F, E (cid:105) be feasible for q .
Then the following all hold:
For every c , 0 ≤ c ≤ 1 , (cid:104) cF, cE (cid:105) is feasible for cq ; 2.
If (cid:104) F (cid:48) , E (cid:48) (cid:105) is feasible for q (cid:48) and ( F + F (cid:48) ) ≤ W , then (cid:104) F + F (cid:48) , E + E (cid:48)
(cid:105) is feasible for q + q (cid:48) ; 3.
(Every non-trivial x > 0 carrying empty cycle can be removed:) (a) If for some region i , E
[ i, i ] > x > 0 , then if E (cid:48) is just like E only that E
[ i, i ] =
E [ i, i ] − x , then (cid:104) F, E (cid:48) (cid:105) is feasible for q − x ; (b) If for some regions i and j , i (cid:54) =
j , and some x > 0 , E [ i, j ] , E
[ j, i ] ≥ x , then if E (cid:48) is just like E only that E (cid:48)
[ i, j ] =
E [ i, j ] − x and E (cid:48)
[ j, i ] =
E [ j, i ] − x , then (cid:104) F, E (cid:48) (cid:105) is feasible for q − 2 x .
The requirements of feasibility are linear, thus the problem
OA, in Fig. 2, is a linear programming problem.
[Figure]
The only requirement of a ﬁxpoint not directly enforced by feasibility is that drivers do not leave empty if there are passengers waiting.
The following lemma shows that, at the optimal solution, every region has a greedy strategy: it only sends empty cars after all demand is satisﬁed.
Lemma 5 Let q ≥ 0 , and assume (cid:104) F 0 , E 0 (cid:105) is feasible for q .
If there exists some i 0 and j 0 such that E
[ i 0 , j 0 ] >and F 0 [ i 0 , j 0 ] < W [ i 0 , j 0 ] , then (cid:104) F 0 , E 0 (cid:105) is not an optimal solution of OA.
DYNAMIC RELOCATION VIA FIXED POINT CONSTRUCTION
In this section we introduce our formulation of the problem of computing a dynamic relocation policy, introduce a particular policy based on our ﬁxed point construction in Alg. 1, and show it has attractive theoretical properties in terms of convergence rate and welfare loss while converging.
6.1 THE DYNAMIC RELOCATION PROBLEM
Given W and π and some q > 0 , let M ∗ such that M ∗ =
q be the unique ﬁxed point of next whose existence is guaranteed by Th.
In analogy with a Markov chain, M ∗ serves as a stationary distribution.
As part of our analysis in this section (Cor. 1), we will show that it also serves as a limit distribution.
That is, starting from any mass distribution Msuch that M
=
M ∗ , lim t →∞ next t ( M 0 ) =
M ∗ .
However, obtaining M ∗ by repeated application of next () may take a long time, which has been observed to be an important problem for applying relocation policies in practice [Braverman et al., 2019].
The problem of dynamic relocation is to ﬁnd a sequence of policies that accelerate convergence.
Given an initial mass distribution M 0 , a dynamic relocation policy computes a sequence of policies { π i } t =0 such that the sequence { M t } t =0 , where each M t +1 =
next π t ( M t ) , converges to M ∗ faster than the sequence obtained when next π is applied iteratively.
Unless no region is saturated, mass distributions M and M (cid:48)
= next π (cid:48) ( M ) uniquely deﬁnes π (cid:48) =
( M (cid:48) − 1 F ( M ))
/ E ( M ) (see Sec. 5).
Hence the problem of dynamic relocation can be stated as identifying a sequence { M t } t =0 as above that satisﬁes:
mass conservation: for every step t , M t =
M ∗ 2.
relocation constraint: for every step t ≥ 0 , M t +1 ≥ 1 ( F ( M t ))
6.2 OUR DYNAMIC RELOCATION POLICY
We now introduce our dynamic policy based on our ﬁxpoint construction.
Before doing so, we introduce some additional notation.
• Let ν ( q ) be the unique ﬁxpoint of next π with mass q .
That is, next π ( ν ( q )) =
ν ( q ) and ν ( q ) =
q .
• Let ν − 1 be the ν ’s inverse extended to all mass distributions, ν − 1 ( M )
= max { q (cid:48) :
ν ( q (cid:48) )
≤ M } , that is, captures the mass of the greatest ﬁxpoint vector that is no larger than M .
We next deﬁne our dynamic relocation policy inductively.
For a vector A , deﬁne ([ A ]) + = max( A, 0 ) , where as usualis the all zeroes vector and the maximum is taken coordinatewise.
Given M t , we deﬁne q t +1 to be the maximum solution to (cid:88)
[Equation]
Th.
1 implies that ν ( q ) is monotone increasing and continuous in q .
Thus, ([( ν ( q ) − 1 F ( M t ))])
+ is also monotone non-decreasing and continuous in q .
If E ( M t ) > 0 , q t +1 is the unique solution, and if E ( M t ) = 0 , the set of solutions { q (cid:48) | ν ( q (cid:48) ) ≤ 1 F ( M t ) } has as its maximum q t +
=
ν − 1 ( 1 F ( M t )) , hence q t +1 is well deﬁned.
We deﬁne M t +1 = max( 1 F ( M t ) , ν ( q t +1 )) .
To verify that this is a dynamic policy, note that the relocation constraint,
M t +1 ≥ 1 ( F ( M t )) , is satisﬁed by construction.
As for the mass conservation constraint, M t + 1 = (cid:80) i ([ 1 F ( M t )
+ ( ν ( q t +1 ) − 1 F ( M t )])
+ [ i ] =
F ( M t )
+ E (
M t
[Equation]
6.3 CONVERGENCE PROPERTIES
We now analyze the convergence properties of our dynamic relocation policy.
We show that it converges, at least linearly, to M ∗ and that a same argument shows that M ∗ acts as a limit distribution.
To obtain a stronger guarantee, we relate the progress made by the dynamic policy to E ( M ) , the mass of drivers we actually control.
The resulting guarantee also provides a bound on the mass of extra empty rides relative to those inherent in M ∗ .
Our ﬁrst result is that the q t are strictly increasing at a rate that implies (at least linear) convergence.
Let ∆( t ) =
M ∗ − q t .
Since ν ( M ∗ ) = M ∗ , ∆( t ) can serves as a measure of the distance between the ﬁxed point we have succeeded in “constructing” so far and our goal.
Lemma
[Equation]
Lem.
6 shows that we are guaranteed to make progress even if we do not control the relocation of any drivers, and is analogous to results about the convergence of Markov chains toward their stationary distributions.
Because it does not rely on relocation, it is quite weak; a simpler version of its proof shows that simply statically using π satisﬁes essentially the same bound.
This also shows that M ∗ acts as a limit distribution of the dynamics.
Corollary 1 For all mass distributions M 0 such that M 0 =
M ∗ , lim t →∞ next tπ ( M 0 ) =
M ∗
To get an (often) stronger bound, recall that the essence of our dynamic relocation policy is that it makes the maximum progress it can given the mass it controls.
Let ∆ E ( t ) =
E ( M t ) − E ( ν ( q t )) .
This captures the mass of relocating drivers beyond that present in ν ( q t ) .
The following lemma, whose proof is in App. C, shows that this provides a lower bound on the progress made by the algorithm.
[Equation]
When ∆ E ( t ) is large, which requires many drivers to be relocating, Lem.
7 guarantees that we make rapid progress toward our goal.
It also guarantees that our dynamic relocation policy has an attractive welfare property: because we make progress at least equal to the mass of drivers relocating who would not also be relocating under ν ( q t ) (and also under M ∗ ), we end up paying the cost of extra relocation at most once for each driver.
Thus, the total excess mass of empty rides (cid:80) t E ( M t ) − E ( M ∗ ) is at most M ∗ , as the following observation, whose proof is in App.
C, shows.
[Equation]
We are aware of no prior approach that provides such a guarantee.
It is easy to see, for example, that the static policy π can have more than one extra relocation per driver.
(Construct an example where all the drivers start in the same region and essentially all relocate in the ﬁrst step but this is not the ﬁxpoint.)
Many other prior approaches are heuristic and do not even provide a guarantee of convergence.
SIMULATIONS
Our simulations are based on a dataset from Didi fromfor an unspeciﬁed region in China that was processed by
Braverman et al.
[2019] into a form suitable for our model, representing nine major regions of the city.
For completeness we provide the model parameters in App. A.
Notably, these include non-uniform distances between regions.
While our theoretical analysis assumed unit travel times, our constructive approach is easily adapted to this richer setting.
See
App.
A for a discussion.
Braverman et al.
[2019] perform their experiments in a large continuous-time system while we apply our discrete time model using 15-minute intervals.
Our results are similar which validates our discrete approach.
The results of both this recreation and a variant we introduce show that our dynamic relocation policy outperforms prior approaches in this setting.
7.1 WHAT WE COMPARE
We compare our approach, which we refer to as C ON , with four other policies:
S TA .
This is a static policy that sets π t = π for all t .
From
Cor.
1 it follows that S TA guarantees convergence to the ﬁxpoint, yet, as we pointed out, it may do so slowly.
Thus S TA represents a baseline in the absence of a more sophisticated dynamic policy.
G DY .
This is a greedy policy that distributes the relocating mass proportional to the unmet demand in each region with a one-step look ahead.
That is, it takes π t
[ i ] ∝ ([ W 1 − 1 F ( M t )])
+ , which guarantees that as many relocating drivers as possible will have a passenger at time t + 1 while spreading them among the regions where they can be useful.
As G DY does not depend on π , it may not converge to the ﬁxpoint, but it does provide a meaningful baseline for other metrics based purely on the provision of service.
L KA .
This is a heuristic proposed by Braverman et al.
[2019] that forms a model based on the average of demand patterns over a lookahead window and ﬁnds the optimal static policy for this average.
For the look head, we use 2, 3, and 4 steps.
H MR .
We adapt the dynamic policy of Hosseini et al.
[2021], which dispatches a single car at a time, to our setting.
In particular, their algorithm computes a measure of which region will generate the most long-run service and sends the car there.
Since the results of this computation do not change until a region is saturated, we adapt their policy by assigning relocating drivers to this region until (a) it becomes saturated or (b) the mass reaches the ﬁxpoint mass of the region.
7.2 RESULTS
Our ﬁrst experiment is based on a similar experiment by
Braverman et al.
[2019] and uses the same parameters.
We simulate the system for four hours.
Initially the supply of drivers is large relative to the demand for rides, so almost all requests can be served.
However, after two hours demand increases sharply and passengers’ destinations (i.e. V ) are randomly permuted.
Table 1 show the resulting availability averaged over 20 runs.
Availability is a standard metric in this setting and is the average fraction of demand served across regions.
(See App.
B for more discussion of this and other metrics.)
Our results for S TA and L KA are qualitatively similar to those reported by Braverman et al.
[2019] in their Table 4.
In the ﬁrst two hours almost all demand is served while the S TA performance drops with the demand transition as it is slow to adapt to the new demand pattern.
In contrast,
L KA with lookaheads of 2, 3, and 4, steps (30, 45, or
[Table]
minutes) can anticipate the change and has a smoother transition.
The other three approaches (H MR , G DY , and C ON ) do not anticipate the change but simply adapt to it rapidly.
H MR and G DY achieve similar performance to L KA , while our C ON adapts the fastest and outperforms the alternatives.
Our second experiment extends this approach by keeping the overall level of demand ( W ) ﬁxed while permuting the pattern of demand as in the previous experiment.
We permute the demand 19 evenly-spaced times over the course of the experiment and report results averaged over 20 runs.
We treat S TA as a baseline and report the percentage change in availability relative to it for each of the other policies.
Fig.
3 shows two variations.
On the left, we ﬁx the ratio between supply ( M ) and demand ( W ) at 1.15 and vary the number of steps between demand changes.
We start this variation from 5 steps, which corresponds to updates everyminutes, as we think smaller values represent unreasonably fast changes of demand.
In contrast to our ﬁrst experiment,
L KA only slightly outperforms S TA .
Intuitively, while L KA can anticipate future demand patterns without a signiﬁcant excess of drivers, its ability to reposition them for future demand while still serving current demand is limited.
Since
C ON simply adapts changing demand patterns rapidly, it remains highly effective although the beneﬁts decrease as changes in demand become less frequent.
Neither G DY nor
H MR performs well in this setting relative to S TA .
On the right, we ﬁx the number of steps between demand changes at 10 and vary the ratio between supply and demand.
The performance of all policies improves relative to S TA as the supply of drivers increases.
G DY , as a simple baseline, is still outperformed by the other approaches.
However, now H MR does better than the lookahead approaches at sufﬁciently high levels of supply.
7.3 ADDITIONAL SIMULATIONS
In App.
B we present the results additional simulations on synthetic data.
They show that with static demand patterns
C ON consistently converges substantially faster than other policies and has a performance that is often close to or matching a lower bound.
The effect of this on efﬁciency (the mass of passengers served) relative to the other policies is, however, quite small.
When targeting an objective for selecting an optimal ﬁxedpoint that puts weight on fairness rather than just efﬁciency, C ON leads to economically meaningful improvements in availability, showings its ability to target a wider range of objectives than previous approaches.
DISCUSSION
We have studied a model of relocation policies for ridesharing platforms and given a constructive characterization of the unique ﬁxpoint of system dynamics.
Using this construction, we designed a dynamic policy that provides guarantees about its rate of convergence to the ﬁxpoint and analyzed the magnitude of these beneﬁts in simulations.
To obtain these results, we used a stylized model.
We conclude by discussing the extent to which our results extend to richer models.
Within our basic setup we made use of several assumptions.
First, that drivers do not relocate if there are waiting passengers.
This is typically a mild assumption in models of spatial demand imbalances, but would be more relevant in a study of temporal ones [Ma et al., 2019].
Second, that drivers carry passengers regardless of their destination.
This is a common requirement, but some work has investigated the beneﬁts from allowing strategic passenger selection [Afeche et al., 2018].
Third, that there is a positive demand in in between every two regions.
This assumption guarantees ergodicity, and in many of our results could likely be reduced to that weaker requirement.
It is also relevant for our convergence rate analysis of dynamic policies, although there it could likely be replaced by an eigenvalue-based bound, as is typical in the analysis of mixing time of Markov chains.
This assumption seems quite reasonable in practice: All it requires is that, for a reasonable decomposition of a city to regions, people occasionally wish to travel from any given part of the city to any other.
Unless this grid of regions is very ﬁne this seems quite likely.
Fourth, that the relocation policy is the same for every region.
We believe our results can be obtained without it, albeit with substantial additional notational clutter.
For our experiments on the Didi data, our results demonstrate empirically the effectiveness of this extension.
There are also a number of features our basic model excludes.
We work with a continuum of drivers, but previous work has shown that dynamics with a continuum of drivers approximately hold with discrete drivers as the number of drivers grows [Braverman et al., 2019, Banerjee et al., 2017].
We also assume that time is discrete and all journeys take a single unit of time.
As in the simulations, discrete but non-uniform journey times can be modeled by introducing additional “regions” which represent drivers in transit, and our results likely generalize.
1 Adding travel times to the linear programming approach is straightforward, and previous work has observed that, as long as the platform controls the relocation policy, non-uniform travel times do not signiﬁcantly affect the behavior of the model [Bimpikis et al., 2019].
Journey times of a single pair of regions may vary over time.
A key takeaway from prior work is that as long as the number of vehicles is large this factor is essentially irrelevant, which is why we did not include it in our model or experiments [Braverman et al., 2019].
While we do not explicitly consider a dynamic willing demand matrix W , it is the motivation for our results in
Sec.
6.3 with guarantees on convergence speed towards the ﬁxed point comes from this issue.
In particular, policies that are slow to adapt can be stuck, never approaching the ﬁxpoint before W changes.
In contrast, our dynamic policy can deal with a changing demand matrix by converging rapidly before the change is so large that the target becomes outdated.
Our simulations on synthetic data (the left subﬁgures of Fig.
1, Fig. 2, Fig. 4, and Fig.
6 in the appendix) show that the convergence towards the ﬁxed point is indeed very fast and is generally faster than an expected substantial change of the demand.
Table 1, which is drawn from real scenarios, shows similarly rapid adaptation (note the availability in hour 3, after the change in W, is nearly identical to hourfor C ON while most other methods do substantially better in hour 4 than hour 3.)
Both subﬁgures of Fig.
3 also deal with dynamic W and the results demonstrate the superior performance of our dynamic policy.
Our constructive algorithm myopically attempts to make as much progress toward the ﬁxpoint as possible.
An interesting direction for future work would be to treat the problem of dynamic relocation as a planning or reinforcement learning problem.
Our theoretical results can be viewed as providing a characterization of key aspects of a model to enable model-based approaches.
One could imagine adding an approach based on Monte Carlo Tree Search or similar techniques
[Sutton and Barto, 2018].
From this perspective, the lower bound (L B ) we compare to in some of the additional experiments in the appendix is the optimal plan for a relaxed version of the problem and in those experiments
C ON shows near-optimal performance.
Finally, we do not model prices or monetary relocation costs.
As these do not affect the system dynamics, most of our results would be unchanged.
The primary effect would be to adjust the objective of problem OA (Fig. 2) accordingly.
Nor do we consider settings where drivers have partial or total control over relocation decisions, and thus the sequential decision problem is faced by drivers rather than the platform.
Of course, a major role of prices is to inﬂuence the relocation decisions of rational drivers.
Our results provide key characterizations that justify formulating the problem from the perspective of a single driver in terms of the ﬁxpoint induced by the behavior of other drivers, an approach which has been fruitful in other game-theoretic work on marketplaces [Kash et al., 2015].
Acknowledgements
This material is based upon work supported by the National
Science Foundation Program on Fairness in AI in collaboration with Amazon under Grant No. 1939743, by the National
Science Foundation under Grant No. 1918429, and by the
Discovery Partners Institute (DPI) Science Team Seed Grant Program. DPI is part of the University of Illinois System.