Introduction

As they grow in popularity, ride-hailing and food-delivery services such as Uber, Lyft, Ola or Foodora are quickly transforming urban transportation ecosystems1,2. These services have revolutionized most aspects of the transportation market. By managing the rides through a mobile application, they lower the entry barriers to the service for both users or passengers and drivers. The rating system facilitates trust between drivers and users, and the flexible working hours make ride-hailing services a popular choice for people starting a new career or a side-job.

A key feature of these services is that an algorithm replaces human dispatchers in the task of matching available drivers to the incoming requests. Companies are now able to optimize the matching with unprecedented precision using data they possess on cars, drivers, and traffic conditions3, resulting in better service availability, shorter waiting times, and ultimately a boost in efficiency or company profits4 (optimization refers to maximizing efficiency in a given system, with given supply and demand parameters). On the other hand, in the process of maximizing effectiveness or minimizing waiting times, drivers’ interests get sidelined, also, undesirable social outcomes might emerge5,6,7,8.

Recent studies and media articles raise concerns about the risks threatening workers’ well-being, including racial bias, worker safety, fairness to workers, and asymmetries of information and power. As documented in case studies9,10,11,12,13, workers are struggling to obtain remedies through official channels12,14,15, and strikes have become common in the past years (see Chapter 2 in15) with drivers of Uber, Lyft, Ola, Foodora demanding higher fares, job security, and livable incomes all over the world16.

The dispatcher systems of traditional taxi services allowed drivers to hear the same information and receive updates about traffic conditions13, moreover, drivers were in direct contact with their employers. However, as described by Rosenblat and Stark in their article “Case Study of Uber Drivers”, Uber-like modern systems subject drivers to algorithmic management methods coupled with an almost compulsory blind acceptance of destinations. This results in a hierarchical information flow, in which the company decides the content and the means of disclosing information to the drivers12. The app-based communication, helpdesk-like assistance, and the automatized algorithmic features act as barriers between employees and management, annihilating this relationship15. Additionally, given the proprietary nature of these systems, there is limited access to data or the rules of the system5,17,18. As a result, drivers don’t have a detailed insight into the underlying processes and consequences of frequent condition changes12,13,19,20,21, seek communication channels outside of the companies’ systems14,22, and regulatory oversight is hindered23,24.

Most existing literature in the area of taxi matching algorithms is concerned with optimizing aggregate outcomes for the whole system25,26,27,28,29,30,31. Such approaches aim to maximize the benefits for the company or to minimize the adverse effects such as CO2 emissions, overall distances driven, or the passenger waiting times. Following the line of fairness measurement literature32,33,34,35, we instead focus on the fair distribution of income from the drivers perspective, because current systems do not guarantee the same income for the same amount of work, neither across workers nor over time9,10,19,21.

We use an agent-based simulation to systematically study the mechanisms in ride-hailing and delivery systems from the perspective of the drivers for a fixed timeframe of one week. Given the social context of the problem, the timeframe of interest is defined to be relatively short: workers of ride-hailing companies have to focus on daily and weekly income targets because of regular fees and payments15,36,37. Moreover, initial wage differences might be amplified through different feedback loop mechanisms11,38, that hinder the balancing effect which evens out inequalities in the long run. We first quantify the income inequality level of systems that use a company-level efficiency maximizing approach, and explore how the system-level behavior changes as a function of input parameters like the number and distribution of taxis and passengers, city layout, and driving strategies. Next, we investigate the trade-off between fairness of driver incomes and loss in overall revenue through an algorithm, designed to integrate the fairness perspective into the matching of drivers with requests.

Income Inequality in Ride Hailing

We create a simulated city environment with drivers, passengers and various parameters which we will introduce throughout the section. Our goal is to simulate a diverse range of cities and real-world traffic conditions, thus we derive our model parameters from real-world data sets.

Taxis in our city drive along a grid, moving one block at each time step, with constant speed. In our basic setting, both request and drop-off locations are most likely to be in the city center, in line with previous studies on real-world data39,40,41,42. The matching algorithm between drivers and requests is similar to the algorithm that Uber and most taxi companies use: passengers are matched with the closest available car. Additional parameters capture various real-world scenarios such as city layout, changes in supply and demand, driver strategies, and different settings of the matching algorithm. The pricing scheme is similar to that of UberX in Boston43, and fuel costs are accounted for44. We run all simulations for what equals a 40-hour workweek (see Section 3 for details), and calculate income as the earning over the time a driver spends online. Initially, the closest available driver is assigned to the longest waiting passenger (see details of the nearest algorithm in Section 3), and every driver remains at the drop-off location of their latest passenger.

According to interviews with Uber drivers15, the main concerns of drivers are their hourly wage, the overall rates with which they operate, and the number of hours they need to work until they reach a given daily/weekly income target. In our simulation, inequality will manifest as a varying hourly wage, as drivers spend the same amount of time online. In real life, the same often manifests as a highly varying number of hours needed to achieve a given amount of income. Since Uber drivers have limited possibilities to communicate with each other (in contrast to traditional taxi companies, see p. 9415, it prohibits them from comparing their wages and strategies. Therefore, while drivers might not recognize it, their lack of information and the information asymmetry towards to company are the greatest problems in such a system. Thus, our goal is to create a system of full information, helping us investigate the distribution of incomes across workers for various settings.

Changes in Supply and Demand

We use two variables to calibrate the supply and the demand in our system: the supply d (density) is defined as the number of taxis per square kilometer, while \(R\) captures demand-to-supply ratio, which is the fraction of the demanded travel distance over the supplied travel distance (see Section 3 for details). To pick parameter spaces for \(d\) and \(R\) that cover actual real-world scenarios, we calculate the number of cars and passengers using empirical data from the NYC Taxi and Limousine Commission45.

The dots in Fig. 1A depict each hour of the year 2013 in NYC in the \(d-R\) parameter space. On top, in white, we place an example day, 15 January 2013, with its hourly parameter values. We see that even within one day and one city, both parameters strongly vary. While such detailed data is not available from other cities, we analyzed aggregate statistics as well as extreme events such as public transportation failures, strikes, or bad weather conditions (see Section 3). We conclude that the taxi density range \(d\in [3,30]\) [1/km2] and the demand-to-supply ratio range \(R\in [0.1,1]\) will capture a wide range of city sizes, seasonal changes, varying traffic at different times of the day, and even extraordinary events that cause sudden changes in the demand or supply.

Figure 1
figure 1

(A) Hourly values of the taxi density d and the demand-to-supply ratio R throughout the year 2013 in NYC. Parameter changes within one selected day, 15 January are plotted as white connected triangles. The total income (B) and Gini coefficient (C) for varying demand-to-supply ratio, at three fixed density values. We see that income grows linearly as the demand-to-supply ratio grows. Higher demand leads to a decrease in inequality, for all density levels. The total income (D) and Gini coefficient (E) for varying density values, at three fixed demand-to-supply ratio values. Higher demand generates higher incomes. Inequality grows with more cars in a city.

While Uber uses increased fares for high demand locations or periods called surge pricing, we chose not to implement this feature in our system. The timescale of surge pricing is very small compared to one shift or to the timescale of the whole simulation46, and we omit rapidly changing temporal pricing parameters. According to the literature and Uber’s own research, higher surge multipliers result in fewer requests, thus, surge pricing decreases \(R\)47,48,49. On the drivers’ side, the surge has the long-term effect of drivers learning the most locking times and areas, as such, surge pricing increases supply in the long run, which decreases \(R\) and increases \(d\)47. Our parameter ranges of \(R\) and \(d\) are wide enough to cover these cases of decreased demand and increased supply that could be the result of an ongoing surge.

Figure 1B shows how the average income changes with growing number of requests, but constant taxi numbers, that is, a constant density \(d\). Each marker denotes the averaged result of 10 simulations, ran with the associated parameters. As expected, the income is directly proportional to the demand, regardless of \(d\). For example, by doubling the demand-to-supply ratio \(R\) from 0.3 to 0.6, the income roughly increases from $4700 to $9400 for all three \(d\) values. Thus, as long as the system is able to serve all the passengers, demand determines the total income. After a certain point, incomes saturate as taxis are not able to serve all requests, and the system reaches its maximum capacity around \(R=0.78\). (We caution the reader that fares highly vary across cities, service providers, and over time even within the same company. While we present the incomes in $, the values are approximations of the fares and the emphasis is on the relative value and the shape of the distributions).

Figure 1C measures the inequality for the same parameters using the Gini coefficient of the incomes at the end of the simulation. Gini coefficient is an inequality measure that captures the deviation of the Lorenz curve of the income distribution from that of an ideal one, where a given cumulative percentile of the population holds the same percentile amount from the incomes (see Section 3). For low demand, that is, low \(R\), the Gini coefficient starts at high values, with \(0.18\) for \(d=5\,[1/{\text{km}}^{2}]\), 0.32 for \(d=15\,[1/{\text{km}}^{2}]\) and 0.45 for \(d=25\,[1/{\text{km}}^{2}]\). As the demand increases, the Gini coefficient decreases and converges for different taxi densities, with the Gini at \(R=0.6\) equalling to as little as 0.01 for all three measured \(d\) values.

Figure 1D–E depicts the effect of increasing traffic (more demand and more supply), that is, constant \(R\), but increasing taxi density \(d\). Again, higher demand generates higher average incomes, that is roughly $3100 for \(R=0.2\), $6200 for \(R=0.4\), and $9400 for \(R=0.6\). The income is only very slightly affected by the taxi density in a city, as it increases by only 3% for a tenfold increase of \(d=3\,[1/{\text{km}}^{2}]\) to \(d=30\,[1/{\text{km}}^{2}]\). However, higher density leads to a more unequal distribution of those same average incomes, as seen from Fig. 1E. For \(R=0.2\), the Gini coefficient almost doubles with the same a tenfold increase of taxi density \(d=3\,[1/{\text{km}}^{2}]\) to \(d=30\,[1/{\text{km}}^{2}]\) that caused the 3% increase in the incomes. For higher demand, this inequality shift is smaller: while there is a 14% increase with changing \(d=3\,[1/{\text{km}}^{2}]\) to \(d=30\,[1/{\text{km}}^{2}]\) for \(R=0.4\), the Gini is almost constant for \(R=0.6\).

Since the phenomenon that inequality increases with increasing supply is not intuitive, we expand on the explanation a little: let us consider the probability of a driver at a certain position being assigned to the next ride. Using the nearest algorithm, our chosen driver gets the job if no other drivers are closer to the request origin. In practice, this means that with a higher density \(d\), taxis on the outskirts of the city are even less probable to be assigned to a ride because other available drivers might “stand in their way”. On the other hand, a lower taxi density means that the potential reach of drivers who are further away from the center increases, which equalizes the ride assignment probabilities and lowers the Gini coefficients.

Finally, we note that in certain parameter ranges of our system, we find inequalities that are as high as for the entire income distribution of a whole country50. As opposed to our simulation, people in a country work in different positions, different sectors, and might have very different skills. Therefore, it is remarkable that in an artificially equalized situation (drivers with equal working hours and equal skills), the Gini index of incomes is of the same magnitude.

Varying Spatial Activity

Next, we consider variations in the city layout and the traffic flow patterns. Apart from the simplest city center scenario, we run simulations for i.) a city with a larger center, ii.) a city with 2 centers, and iii.) cases where the pickup and destination locations do not overlap (see the detailed description of these layouts in Section 3, and the distributions illustrated in Fig. 1 of the SI). Our motivation is explained by Fig. 2A which shows the temporal and spatial changes in the difference between trip origin and destination location distributions in NYC. We can clearly see the average flow of passengers in the morning towards the center for work (Fig. 2B) and away from the center in the evening (Fig. 2C).

Figure 2
figure 2

(AC) Temporal and spatial changes in the difference between trip origin and destination locations in NYC. (A) Hourly average of the unsigned symmetric difference Δ\({\rho }_{OD,\text{abs}}\) in NYC pixel areas. The figure indicates that origin and destination patterns vary throughout one day. (B and C) Spatial distribution of \({\rho }_{OD}\) at 8 AM and 7 PM in NYC. Red values indicate more pickups, blue values more drop-offs in a pixel area. At 8 AM, there is an influx into the center of Manhattan and other business and work areas. At 7 PM, the direction of the taxi flow is reversed, as people travel towards the outskirts from the center. See Section 3 for details on Δ\({\rho }_{OD,\text{abs}}\) and \({\rho }_{OD}\). (D) Average income of drivers depending on city layout. Generally, the overlapping cases generate more income, and movement towards the city center as well. (E) Gini coefficient of the seven layouts with varying demand-to-supply ratios. As demand grows, inequality decreases for every layout. Non-overlapping layouts (flows) in the city generate higher inequality.

Before we turn our attention to income inequality in the above layouts, it is worth investigating whether and how they affect the overall income, since they all share the same \(R\) given identical traffic, i.e., the same demand-to-supply ratio. Figure 2D shows that the average income strongly depends on the distribution of spatial activity, when examining a setting with fixed \(d=15\,[1/{\text{km}}^{2}]\) and \(R=0.48\). If the distribution of origins and destinations overlap completely, more income is generated regardless of the details, e.g. the spreading of the city center or having multiple centers.

On the other hand, in the cases where there is a dominating flow of vehicles due to asymmetries in the origin and destination demands, the income is lowered to roughly 50% (Outwards flow) and 20% (Inwards flow). Moreover, inequality is significantly higher over the whole demand-to-supply \(R\) range (Fig. 2E). In the Inwards flow case, the Gini coefficient starts from as high as 0.76, but decreases fast thereafter, and reaches 0.07 for \(R=0.6\). When the traffic flows mostly outwards from the city center, the initial Gini of 0.45 decreases very slowly, though, and stays as high as 0.38 for \(R=0.6\). The above results indicate that the distribution of spatial activity strongly influences both the average income and income inequality. This might be mitigated by modifying the idling strategy of drivers, as we will describe in the next subsection. However, drivers have no real-time information about the spatial distribution of requests, thus, they can only rely on their intuition or past experiences when choosing their idling strategy. This creates a situation where only platform control operations51, or shared knowledge about driver and passenger positions could decrease the effect of the spatial imbalances.

Waiting vs Cruising

An important decision every driver faces many times throughout the day is what to do in the time period until the next request comes in, which might amount to a considerable share from the overall time spent online3,24. So far in our simulations, the cars were waiting in place after dropping off their passengers. Another obvious idling strategy is to cruise back towards the center to meet more demand. While in a real system, drivers presumably use a mix of these two strategies, here, we investigate the outcome of the two extreme cases, namely when all taxi drivers either wait or head towards the city center.

Intuitively, we would expect that the cruising strategy leads to similar throughput in the cases of overlapping pick-up and drop-off distributions, smaller overall throughput in the cases where traffic flows towards the center, and higher overall throughput when population flows towards the outskirts. But does higher throughput also lead to lower Gini coefficients?

Figure 3A–E shows the waiting/cruising scenarios side by side for \(d=15\,[1/{\text{km}}^{2}]\) and \(R=0.4\). We observe significant differences in fairness between the waiting and cruising strategies in all city layouts. In the case of overlapping pick-up/drop-off location distributions, the waiting strategy is fairer, as illustrated by the narrower distributions on Fig. 3A–C corresponding to lower Gini coefficients while the average income is untouched. In the case of the asymmetrical layouts, the strategy of cruising back to the center increases fairness, and in the Outwards flow layout, it even raises the average income (decrease of the Gini from 0.22 to 0.07 and average income increases by almost 200%), see Fig. 3D.

Figure 3
figure 3

(AE) Distribution of incomes of different cruising strategies for different city layouts at \(R=0.4\) and d = 15 [1/km2]. In symmetrical layouts, the cruising strategy leads to more unequal distribution of incomes with similar means. Among the asymmetrical layouts, in the case of outward flows, cruising towards the center leads to higher incomes. (FJ) Distribution of incomes of different matching algorithms in different city layouts and with the waiting strategy, at fixed d = 15 [1/km2] and \(R=0.4\). The poorest matching strategy creates a more equal distribution for all of the investigated geometries. (AJ) The vertical scale of the distributions is omitted for better readability, but all distributions are normalized such that the areas under the curve are equal to 1. Triangles mark the means below the distribution curves.

These results underline the importance of transparency and the direct effect of information asymmetry on drivers, who in the current setup of ride-hailing systems can not make informed decisions about their strategies. Moreover, it shows that a seemingly small change in the system settings can lead to large differences in the fairness guarantees of the overall system.

Fixing the algorithm

Lastly, we examine whether we can incorporate the fairness perspective into our system and achieve more equal incomes while conserving the overall revenue, similarly to the perspective of33. Our goal is to keep track of drivers’ income throughout the day and take it into account when assigning rides.

With this idea in mind, we create the poorest algorithm: a modification of the current matching algorithm which keeps track of drivers’ income at each point in time and assigns taxis based the money they made so far. In this poorest case, the pool of drivers available for a certain passenger is still limited to be within a certain distance to avoid unreasonably far matches (see details in Section 3). To meaningfully compare the algorithms, we include a baseline algorithm that assigns drivers to passengers randomly within a given radius. This random setup should create higher fairness but lower total income than picking the nearest available vehicle.

Figure 3F–J shows the income distribution for the three algorithms for all city layouts. The narrow distributions of the poorest algorithm in the symmetric cases show that this poorest correction effectively mitigates the adverse effects of the nearest algorithm. In these cases, poorest performs even better than the random assignment that we consider as a baseline for fair conditions. Moreover, the strategy also helps mitigating inequalities on the Inwards flow layout. While not as strongly as with the other layouts, poorest significantly increases fairness with the Outwards flow layout, and even increases the mean income. Since the nearest algorithm mostly assigns drivers from the center, more and more drivers end up in the outskirts without close-by rides. As the poorest algorithm is more likely to pick a driver stranded on the outskirts, it compensates for this undesired process and ultimately leads to higher mean income.

Concluding Discussion

We presented results of an agent-based automated taxi system simulation from a so-far unexplored angle, namely, the fairness of incomes among drivers. Our simulation environment allows us to cover a wide spectrum of city layouts and traffic conditions, and to test arbitrary matching algorithms. We find that a low demand-to-supply ratio (more taxis/fewer passenger requests) leads to greater inequality and that the inequality is largely dependent on the spatial distribution of request origins and destinations, on the chosen idling strategy of the drivers, and the matching algorithm.

We also proposed a new matching algorithm that attempts to equalize incomes by promoting drivers on the lower end of the current income distribution. This method significantly boosts fairness in driver incomes in all investigated scenarios, while not impairing, and sometimes even increasing average incomes through stimulating optimal spatial redistribution of the taxis. This proposed approach is just a showcase to demonstrate how a small modification in the matching algorithm can lead to significantly fairer income distribution. It also shows the validity of a simulation model for testing interface or policy changes. While regulators are increasingly aware of the problems such platforms create, they still lack the tools for monitoring the large-scale effects. As research in algorithmic fairness suggests, policies could include certain target metrics that such stochastic, complex, algorithmically-driven systems should achieve when aiming for better social outcomes.

Notably, our most surprising result is that drivers with the same qualifications and working hours can end up with vastly different incomes by chance after simulating one week. One might argue that these income differences, observed over a short time period, disappear in the long run. This would indeed be the case under our model if used for long-term predictions (even if the regression to the mean could take a considerable amount of time, see Fig. 6 in the SI). However, literature suggests that workers have to focus on daily and weekly income targets because of regular fees and payments15,36,37, and also, their income is mostly reported weekly by Uber15. Thus, short-term income variance creates unpredictable circumstances and may cause drivers to take risks such as unsafe amounts of overtime12, or quitting the job2,15,37,52.

Moreover, a large body of sociological and economic literature has shown that emerging inequalities are amplified through feedback loops and other processes that are not directly captured by the simulation in this paper11,38. These initial income differences combined with emerging feedback loops and varying skills, working hours, and ratings can result in increased and continuing wage gaps. For example, introducing driver skills into the simulation would most likely have created a cumulative disadvantage between drivers that persists over time.

While hourly wage would align with our fairness criteria and would solve most of the precarity issues of the drivers, it would also eliminate the gamified and algorithmized incentives with which ride-hailing companies try to enhance the performance and efficiency of their systems. Related work suggests that the current setup of ride-hailing companies includes multiple mechanisms that help the companies keep the wages down, which makes it unlikely that they would switch to an hourly payment system. In the current setup, least earning drivers who drop out of the system can be easily replaced by newcomers since the barriers to entry the work are low13,15. Moreover, since drivers bear all the liabilities and responsibilities related to their work, the company is not forced to compensate them fairly15,53. Unionizing is also out of the question, given the independent contractor status52,53,54.

Due to the sheer size and complexity of the problem, our study is limited in different ways. First, our city model simplifies complex road maps to a square grid, and the traffic model averages over highly dynamic conditions such as the true taxi velocity, which might depend on the time of day, road type, and physical obstacles. For example, Uber’s surge pricing, which aims to steer supply and demand, is an important factor in driver earnings and another source of unpredictability. In contrast, our algorithms are only elementary dispatching systems that are likely not identical to the proprietary solutions. Finally, we neglect any possible effect of the difference in worker skills, such as varying driving skills or differences in app usage. Incorporating such measures into the system design would make it very hard to disentangle the income differences coming from geometry, supply, and demand or the initial skill distribution. On the other hand, if implemented, they would extend the simulation timescale to confirm the existence of long-term inequalities.

Impact

Our results underline the urgency to establish the necessary means for drivers to make informed decisions while working. In our view, giving more control to workers is only helpful when coupled with insights that help them make informed decisions. Currently, drivers’ basic decisions, such as when and where to work, are based on limited and local information. Our systematic analysis aims to fill this gap by connecting local knowledge with global outcomes while focusing on drivers’ interests. We derive results that directly help drivers align short-term strategies with their long-term goals based on a few key system indicators such as demand, supply or the spatial distribution of requests.

Our work will be among the firsts to take fairness metrics into account in the evaluation of system performance. Currently, companies focus on maximizing their own efficiency5, which does not align with worker welfare and fairness. Technical research has followed the former demand, considering only optimization problems of system-level efficiency. By sharing our simulation system on GitHub (https://github.com/bokae/taxi), we hope to encourage the research community to work towards a thorough understanding of the effects of algorithm choice on social outcomes, and that eventually service designers will be provided with specific technical recommendations on how to implement a possible fairness perspective. Ultimately, fairness guarantees, either provided by the platforms themselves or via external monitoring of policy agencies, are necessary to increase the trust between ride-hailing companies and their workers.

Lastly, we want to emphasize the advantages of complex systems methods in algorithmic fairness research. Currently, most algorithmic auditing research projects focus on identifying issues with individual platforms at particular points in time55,56. We presented an enhanced approach to algorithmic auditing that takes into account system dynamics, complex phenomena, and downstream consequences of algorithms. This allows the generalization of insights across platforms, pointing towards the fundamental properties of socio-technical systems. Complex algorithmic auditing has the potential to be adapted to research harmful phenomena beyond this project, such as the filter bubble effect, discrimination, or polarization in algorithmically aided systems57,58,59.

Materials and Methods

Simulated city

We investigate generalized and simplified ride-hailing systems with an agent-based simulation. In this simulation, the city is represented as a square grid similarly to60, consisting of \(n\) times (\(n=20\)) \(m\) pixels (\(m=20\)). To associate simulation units to real-world dimensions, the side length of the pixels is set to \(du=100\,\text{m}\) in SI distance units.

Time, movement, and distances

In each simulation time step, taxis move exactly one distance unit on the grid, and they keep this constant average velocity v throughout the whole simulation. We set v to be 10 m/s, a hypothetical average daytime speed as in25, which implicitly defines simulation time unit: \(tu=a\)/\(v=10\,\text{s}\). All presented results throughout the paper correspond to simulations ran for what equals a 40-hour workweek, that is, until \(5\cdot 8\cdot 3600\)/\(tu=14400\) simulation time units. Literature suggests one workweek to be a reasonable time frame for which workers might expect predictable and stable incomes because of weekly fixed costs36.

Supply and demand

There are T taxis in the system. We control the number of taxis through a density parameter \(d\), which is the number of taxis per total area of the system. The dimension of \(d\) is [1/km2].

$$d=\frac{T}{A}=\frac{T}{n\cdot m\cdot d{u}^{2}}.$$
(1)

The demand-to-supply ratio is characterized by a dimensionless measure \(R\), which is the fraction of the total demanded travel distance over the distance provided by the taxis during the same time window:

$$R=\frac{\lambda \cdot l\cdot t}{T\cdot v\cdot t}=\frac{\lambda \cdot l}{T\cdot v},$$
(2)

where l is the average trip length requested by passengers in the system, t is the elapsed time, and λ is the average number of requests per time unit.

Traffic flow and city layout

Since the spatial distribution of the demand is typically not uniform in a city39,40,41, we introduce different probability distributions that characterize the request origins and destinations. In the simplest case, the origin and destination distributions are identical 2D Gaussians, mimicking scenarios where demand is higher in the city center, and gradually decreases further from the core61,62. The scenarios where origin and destination distributions are not overlapping, such as in the case of morning rush hours or late-night rides to residential areas, are simulated by defining separate Gaussian distributions for request origin and destination, respectively, with different standard deviations or centers. Table 1 provides the different distributions in our simulations, with f being the weight of Gaussian mixtures, μ their centers, and σ their standard deviations. We compared the distribution of trip lengths generated from these Gaussian distributions to that of a real-world dataset63. We concluded that the distribution from a real day is the composition of many different system states and spatial activities, therefore, we do not require a strict match between the statistics of the two. We also generated layouts with different cutoffs (exponential, sigmoid) in the decrease of the density of the pick-ups and drop-offs towards the outskirts, but the results did not differ qualitatively from those obtained with Gaussian distributions.

Table 1 List of different origin and destination distributions in the simulations.

Implementation

Once we have the taxis and incoming requests in the system, we have to define how these elements behave while running the simulation. If a passenger makes a request, the origin and destination location is submitted to the waiting queue, and the request is first marked as pending. At each time step, we try to assign an available taxi to all requests in the queue, from oldest to newest. If the assignment is successful, the request is marked as confirmed, and the assigned taxi is marked as booked, and it ceases to be available. When the taxi reaches the request origin, it picks up the passenger, and the taxi and the request both enter into serving state. A path is created for the taxi, along which it moves towards the request destination as the time is running. Once the destination is reached, the taxi drops off the passenger, the request is marked as completed, and the taxi becomes available again. Requests that pend too long, that is, for more than 30 simulation units (corresponding to 5 min in real time units) in the pending queue are canceled, as passengers tend to not waiting very long.

Income

Because the pricing scheme might differ between different service providers, cities, or it might change rapidly even within the same system (similar to surge pricing in Uber46), we only introduce illustrative USD values based on real UberX fares from an example US city, Boston43. Thus, the income has a fixed $2/trip and a distance-based $1/km part, that already includes the mile-based and minute-based fees calculated using an average velocity of 10 m/s. Note that the final income values only serve as indicators of general income trends in mean incomes and inequalities, and they shall not be interpreted as realistic incomes. Fixed costs are assumed to be identical for each driver, thus they are omitted from the calculations. Fuel consumption is proportional to the total distance covered (going for and serving a request, cruising while empty). With an average price of fuel of $3 per gallon44, an estimated 10 l per 100 km35 consumption leads to ≈ $0.008/du costs.

Matching algorithm

The essence of the assignments between taxis and requests is the matching algorithm. All presented algorithms first consider a pool of available drivers in a 1 km range around the request origin. We note here that the 1 km pool limit is arbitrary, and the total income loss that the algorithm causes is directly related to this distance we allow here. First, we implement the nearest algorithm, that looks for the nearest available taxi from the pool. This algorithm is the basis for many existing solutions29,31,64,65. We also propose a mechanism that takes the drivers’ previous incomes into account and chooses the driver with the least income so far (poorest). As a baseline, we also include a method with uniform random assignment from the pool (random).

We can also set different initial conditions and different idle behavior for the taxi drivers. They either start the day from a “taxi base” in the center location or from a random location on the grid that mimics their “home” location. After a completed ride, they can either be waiting for their next ride in place, or they can start cruising back towards the city center. There is also a possibility for simulating a realistic 8-hour shift, where after the end of the shift, every taxi completes its last assignment (if it has one) and then starts the new shift again from their “home/taxi base”.

The code for the simulation is available at https://github.com/bokae/taxi.

Supply and demand parameter ranges

To match our simulation to real-world parameter values, we obtained the only comprehensive ride-hailing vehicle dataset that is available for the vehicles operating in New York City from the year 201363. We calculate average trip length \(l\), average velocity \(v\), number of distinct taxis operating \(T\), and number of served requests per second \(\lambda \) for each hour of the year from the dataset. Using Eqs. (1) and (2), we calculate the two main system parameters \(d\) and \(R\) for these hours using \(A=783\,{\text{km}}^{2}\) as the area for NYC. Figure 1A shows the calculated values, and the changes in \(d\) and \(R\) within one sample day on 15 January 2013. According to the figure, \(d\) varies between 2 and 15 [1/km2], and \(R\) between 0.2 and 0.75. However, we do not have data on the number of canceled requests. Therefore, it might happen even within this dataset, that the real value of \(R\) is higher than 0.75 during peak hours. We also calculate approximations of \(d\) and \(R\) based on aggregated metrics for other towns. For example, we take a typical example for an oversupplied taxi system, the traditional taxi service in Berlin, with d ≈ 1 − 5 [1/km2] throughout one day, and a typical \(R=0.5\) in peak hours66. An opposite scenario of undersupply is present in the city of Barcelona, where \(d\) varies between 15 [1/km2] and 35 [1/km2],and \(R\) between 0.15 and 0.567. Though representing very different real-life situations, in terms of overall numbers, both cities fall into our simulated parameter range. Extreme events such as public transportation failures or bad weather conditions might cause a sudden increase in demand, sometimes as high as doubling \(R\)67. Therefore, we conduct our simulations for up to \(R=1\).

City layouts

We also investigate whether an expected shift in the direction of the trips happens during a day. First, we divide NYC into rectangular pixels of 0.01° longitude and 0.01° latitude, and we calculate the normalized distribution of pick-ups \({\rho }_{O}(x,y,h)\) and drop-offs \({\rho }_{D}(x,y,h)\) for each hour \(h=0,\ldots ,23\) averaged over one year. We filter those x, y longitude-latitude pixels in the dataset, where the overall number of both pick-ups and drop-offs is below 5, and where x [−74.05, −73.9], and y [40.67, 40.85].

Normalization means that for each h,

$$\sum _{x,y}\,{\rho }_{O}(x,y,h)=\sum _{x,y}\,{\rho }_{D}(x,y,h)=1.$$
(3)

We then define the symmetric difference between these two distributions:

$$\Delta {\rho }_{OD}(x,y,h)=\frac{{\rho }_{O}(x,y,h)-{\rho }_{D}(x,y,h)}{{\rho }_{O}(x,y,h)+{\rho }_{D}(x,y,h)}$$
(4)

Figure 2A shows the daily mean of the absolute values of the symmetric differences in the pixels

$$\Delta {\rho }_{OD,\text{abs}}(h)=\frac{1}{N}\,\sum _{x,y}\,|\Delta {\rho }_{OD}(x,y,h)|,$$
(5)

where N is the number of x, y pairs in the analysis. Figure 2B,C show Δ\({\rho }_{OD}(x,y,8)\) and Δ\({\rho }_{OD}(x,y,19)\), respectively, on the taxi zone map of NYC. We can observe the inflow of people into the city center in the morning, and the outflow of the traffic around 7 PM.

Fairness metric and its interpretation

To assess the inequality in the income distributions of the drivers after 1 week’s worth of work, we calculate the Gini coefficient68. The Gini coefficient is an important tool in economics for analyzing income distributions over countries or regions. Its typical value for countries (being between 0.2–0.4) is summarized e.g. in OECD reports50. The value of the Gini coefficient is independent of the mean of the distribution, therefore, differences in the inequalities can be compared for scenarios generating different mean incomes in the simulation.