Large-scale microscopic simulation of taxi services. Berlin and Barcelona case studies
- 1.7k Downloads
- 7 Citations
Abstract
The paper presents research on large-scale microscopic simulation of taxi services in Berlin and Barcelona based on floating car data collected by local taxi fleets. Firstly, Berlin’s and Barcelona’s taxi markets are shortly described and the demand and supply data obtained from FCD analysed. Secondly, the online taxi dispatching problem formulation for this specific case is given, followed by the definition of two real-time rule-based heuristics used to dispatch taxis dynamically within the simulation. Finally, the simulation setup in MATSim is described, and the results obtained with both heuristics are analysed and compared in terms of dispatching performance, proving the effectiveness of the second strategy at different demand and supply scales. This paper is an extended version of Maciejewski and Bischoff 2015, where only the Berlin case study was presented.
Keywords
Online taxi dispatching Dynamic vehicle routing Floating car data Berlin Barcelona MATSim Microscopic simulation1 Introduction
Simulation is an indispensable tool in order to analyse and optimize complex services with dynamically changing demand and supply, all embedded into a dynamic environment. In the case of taxi services in large cities, a reliable simulation approach must model all these elements both at the microscopic level of detail (i.e., individual customers and vehicles are simulated) and in the large-scale (regional, or at least city-wide) scope. The high dynamism of taxi demand is a result of almost all requests being immediate trips with an unspecified destination. For example, partially independent taxi drivers who can choose which rank to wait at, reject serving a request, or decide upon their working hours, account for the limited control over the stochastic supply side. Finally, urban traffic, being the environment for taxi services, implies stochastic time-dependent travel times.
Once the simulation model is ready, analysis and optimization may begin, for instance, by changing the dispatching algorithm, scaling demand and supply, or relocating taxi ranks. As far as the authors know, out of many taxi simulation models (Lee et al. 2004; Alshamsi et al. 2009; Wang et al. 2009; Seow et al. 2010; Cheng and Nguyen 2011), the microscopic ones, though limited in scope, were created for Singapore, Barcelona and Mielec, Poland only. In the case of Singapore, two distinct simulation studies were carried out. Lee et al. (2004) used Paramics to simulate taxi dispatching in Singapore’s Central Business District, whereas Seow et al. (2010) coupled the NTuCab taxi dispatching software with the MITSIMLab microscopic traffic simulator. For the Bacelona case, a multi-agent simulation implemented in MATLAB was used (Salanova et al. 2013; Salanova and Estrada 2015).
This paper presents two microscopic simulation models built for the cities of Berlin (with the neighbouring Brandenburg region) and Barcelona, which are then used to assess the performance of two real-time rule-based taxi dispatching strategies on large scale. The approach, discussed in Sec. 7, originates from an earlier work on simulating taxis in Mielec, Poland (Maciejewski and Nagel 2013a, b) by means of MATSim, a multi-agent transport simulation. Because MATSim allows simulating millions of agents both physically (fast queue-base traffic simulation) and mentally (rich behavioural model for trip planning), a large-scale, realistic simulation of taxis is possible, which makes this approach distinct.
2 Taxi supply and demand in Berlin
Currently, the Berlin taxi market consists of some 7600 vehicles licensed to operate in the city. They are organised in 3000 taxi companies employing roughly 18,000 taxi drivers. To model Berlin’s taxi supply and demand, in this paper, trajectories of Berlin’s biggest radio taxi operator, Taxi Berlin, are used. Overall, they have some 5700 vehicles working within their range, most of them equipped with GPS trackers that submit their current location and occupation status in a flexible interval (depending on the vehicle’s occupation status, but at least once every 60 s). These data are, among others, mainly used for travel time prediction in Berlin (Ebendt et al. 2012). With the current occupation status of the vehicle also being submitted, a zone-based matrix of demand for each hour can be generated and used for the demand side of the simulation. On the supply side only the amount of vehicles logged into the system at each second is known, not the actual length of each vehicle or driver shift. This is due to data anonymization by regular reassignment of IDs to vehicles. Furthermore, the amount of vehicles per zone in each occupation status is known in intervals of five minutes.
Hourly request submissions and active taxicabs in Berlin
Spatial distribution of daily taxi demand in Berlin
Average amount of idle taxis per zone in Berlin
3 Taxi supply and demand in Barcelona
The taxi sector in Barcelona comprises of 10,523 taxi licenses, from which 5 % belong to private companies and the 95 % to individuals. The number of taxi licenses has been frozen since 2005 (one license per 275 inhabitants). However, the number of driver licenses has increased significantly over the last years (13,136 in 2010, with the rate of drivers to vehicles of 1.26, while this rate was 1.14 in 2007). The demand for taxi services has been estimated by the Metropolitan Taxi Institute (IMT) as more than 200,000 trips per day, which corresponds to 1.52 % of the total number of trips in the wider area (roughly 13,000,000 trips daily). Salanova (2013) estimates the demand for taxi trips at 60,000,000 trips per year based on the GPS trackers collecting origin and destination of trips during the last ten years. On the supply side, the input data has been calculated by Salanova (2013) based on the data provided by the IMT surveys where all the drivers participated.
Spatial distribution of destinations for weekday inner-city taxi trips in Barcelona
Hourly request submissions and active taxicabs in Barcelona
4 Comparison of scenarios
Scenario comparison
Property | Berlin | Barcelona |
---|---|---|
Area of study (km\(^2\)) | 891 | 189 |
Network nodes | 11353 | 12687 |
Network links | 24350 | 23648 |
Supply (veh\(\cdot\)h) | 40444 | 69726 |
Mean working taxis (veh) | 1685 | 2905 |
Demand (req) | 27762 | 129555 |
Mean hourly demand (req/h) | 1157 | 5398 |
Mean occupied trip duration (min) | 10.1 | 8.1 |
Demand/supply ratio (req/veh/h) | 0.69 | 1.86 |
5 Online taxi dispatching
The formulation of the dispatching process was derived from an earlier formulation used by Maciejewski (2014a, b) for optimizing taxi services in Mielec, Poland. The description below covers immediate requests with unknown destinations, i.e., customers want taxis to arrive as soon as possible and they specify the destination after being picked up, which corresponds to the overwhelming majority of requests in Berlin. However, this type of request is more challenging in terms of online optimization since the provision of the demand data is maximally postponed. As for the supply side, the formulation includes time windows, which in comparison to the original model, add complexity.
A taxi driver’s schedule and a passenger’s plan
Request \(i \in N\) is open if it either has not been planned yet, \(\tau ^\mathrm {disp}_i\) is not set, or is planned to be served in the future, \(\tau ^\mathrm {disp}_i > \tau ^\mathrm {curr}\), where \(\tau ^\mathrm {curr}\) denotes the current time. Let L be the list of all open requests ordered by \(\tau ^\mathrm {dep}_i\). Each request i is inserted into L on submission, \(E^\mathrm {call}_i\), and removed from L on taxi dispatch, \(E^\mathrm {disp}_i\).
Let \(M=\{1, \ldots , m\}\) be the set of vehicles. Each vehicle \(k \in M\) is available at location \(o_k\) within the time window \([a_k, b_k)\). It is assumed that vehicles do not cruise and remain at the dropoff location of the last served customer. When no request has been assigned to k, \(o_k\) is k’s initial location and \(a_k\) is the time the taxi starts operating. Otherwise, \(o_k\) is the dropoff location, \(d_i\), and \(a_k\) is the time the dropoff ends, \(\tau ^\mathrm {drop1}_i\), of the last request assigned to k, i. Since \(d_i\) remains unknown till \(\tau ^\mathrm {pick1}_i\), both \(o_k\) and \(a_k\) are unknown temporarily as well, with the restriction that \(a_k > \tau ^\mathrm {curr}\). Let \(M^\mathrm {I}\subseteq M\) be the set of all idle vehicles; vehicle \(k \in M\) is idle if \(a_k \le \tau ^\mathrm {curr}< b_k\).
6 Rule-based heuristics
Two heuristic dispatching strategies were used to manage the fleet of taxis. Neither strategy uses information about the destinations of the busy vehicles to predict their future availability; thus, the choice of taxis to be dispatched is limited to idle taxis, \(M^\mathrm {I}\).
-
\(E^\mathrm {call}_i\) — if \(M^\mathrm {I}\ne \oslash\), vehicle \(k^*\) is dispatched to request i
-
\(E^\mathrm {drop1}_i\) — if \(L \ne \langle \rangle\), vehicle k, after having completed request i, is dispatched to request L[1]
-
\(E^\mathrm {call}_i\)—if \(M^\mathrm {I}\ne \oslash\), vehicle \(k^*\) is dispatched to request i
-
\(E^\mathrm {drop1}_i\)—if \(L \ne \langle \rangle\), vehicle k, after having completed request i, is dispatched to request \(i^*\)
7 Simulation setup
MATSim (Horni et al. 2016) was used as the simulation platform. In general, it allows for running agent-based transport simulations, and its primary purpose is activity-based travel demand modelling. Typically, simulation in MATSim is an iterative process of simulating a sequence of days, each consisting of: (1) trip planning, (2) traffic simulation (network loading), and (3) performance assessment. The experience gained over time, let agents improve their performance. The simulation process ends after the system reaches a state of relaxation (i.e., equilibrium).
Due to the growing set of extensions, MATSim’s core functionality can be extended to serve many purposes. In this study, the DVRP (Dynamic Vehicle Routing Problem) extension (Maciejewski 2016) was used to simulate taxis. The vehicle routing model implemented in this extension covers a wide range of problem types, offering such features as one-to-one and one-to-many (many-to-one) topologies, multiple depots, dynamic requests, non-homogeneous requests and vehicles, time windows, time-dependent stochastic travel times and costs, network-based routing, and vehicle monitoring and diversion.
The DVRP extension provides the connection between MATSim and the optimization algorithm. It listens to simulation events, monitors the state of simulation, binds driver behaviour to the schedules computed by the optimizer and coordinates interaction between drivers, passengers and dispatchers. It also facilitates optimization by providing the functionality of least-cost path/tree search. For a detailed description of the DVRP extension, the reader is referred to Maciejewski (2016).
For the simulation of taxis in Berlin, a network based on the OpenStreetMap data is used. It represents the road network in Berlin and the surrounding area of Brandenburg. The network consists of 11,353 nodes and 24,350 links. Using car traffic based on an earlier simulation (Neumann 2014), time-specific link travel times were generated without having to simulate all background traffic. This keeps the simulation runtime reasonable, as only taxi traffic must be considered. The extracted demand data from FCD were converted into plans for MATSim agents. Locations for origins and destinations within the zones were randomly distributed as were the actual departure times within each hour. This resulted in 27,386 agent plans with exactly one taxi trip each. With this demand, the overall stress on the system is low. However, to accommodate a comparably high share of black-market rides in Berlin (30–40 % according to estimations) (Sauer 2014), a scaling factor of 1.5 for the taxi demand seems reasonable. Moreover, taxi demand may be much higher due to bad weather conditions, public transport breakdowns, trade fairs or other events. For example, during a recent strike (15 October 2014) in the overground railway system, our data show the amount of taxi trips doubled during the afternoon peak with the taxi supply only increasing by about 20 %. On that particular day, a scaling factor for the original demand of 2.5 would be appropriate. To depicture all these fluctuations, the authors decided to scale up the demand step-wise up to 5.0 while keeping the original spatiotemporal distribution of requests.
A similar procedure was used to create a simulation scenario for taxi dispatching in Barcelona. The Barcelona road network model was extracted from the OpenStreetMap data. Consisting of 12,687 nodes and 23,648 links, the network is similar in size to that of Berlin. To provide high simulation performance, time-dependent link travel times were used instead of simulating the whole road traffic. The inner-city weekday taxi trips (Sec. 3) were modelled as taxi legs of 126,765 MATSim’s agents, each having one taxi trip. The supply side (expressed in vehicle hours) was scaled by factors between 0.4 and 2.0, aiming at both executing a sensibility analysis of the system performance for different taxi fleet sizes and determining the minimum number of taxis needed for serving all taxi trips at a reasonable level of service.
8 Results
- the average passenger wait time, representing the customers’ perspective,$$\begin{aligned} T_\mathrm {W}= \sum _{i \in N} (\tau ^\mathrm {pick0}_i - \tau ^\mathrm {dep}_i) / n, \end{aligned}$$
- the average pickup trip time, representing the drivers’ perspective,$$\begin{aligned} T_\mathrm {P}= \sum _{i \in N} (\tau ^\mathrm {pick0}_i - \tau ^\mathrm {disp}_i) / n. \end{aligned}$$
Average wait time, \(T_\mathrm {W}\), and pickup trip time, \(T_\mathrm {P}\), at each demand level in Berlin
Average wait time, \(T_\mathrm {W}\), and pickup trip time, \(T_\mathrm {P}\), at each supply level in Barcelona
In general, under high load, the first strategy is extremely myopic as it dispatches vehicles only by looking at the first request in the queue, even though the selected vehicle could be utilized more effectively if dispatched to another request. On the other hand, the other strategy takes into account all awaiting requests and sends the idle vehicle to the closest request which reduces \(T_\mathrm {P}\) and consequently increases the system throughput. Because all requests are immediate, \(T_\mathrm {P}\) is a component of \(T_\mathrm {W}\), thus, achieving relatively small \(T_\mathrm {P}\) generally leads to smaller \(T_\mathrm {W}\). This relation may be observed in Figs. 7 and 8, where keeping \(T_\mathrm {P}\) below 5 min enables the balancing strategy to serve much higher demand. Interestingly, \(T_\mathrm {P}\) drops at high undersupply (the demand scaling of 5.0 for Berlin, and the supply scaling of 0.45 for Barcelona) and is expected to drop even further as the undersupply grows, as the average distance to the nearest open request shrinks. Moreover, the balancing strategy instantaneously switches between the dispatching rules, even during short interleaving periods of undersupply and oversupply, reducing the risk of getting into larger undersupply.
Average wait time, \(T_\mathrm {W}\), and the 95th percentile, \(T_\mathrm {W95}\), at each demand level in Berlin
Average wait time, \(T_\mathrm {W}\), and the 95th percentile, \(T_\mathrm {W95}\), at each supply level in Barcelona
Average wait time, \(T_\mathrm {W}\), in relation to different demand-to-supply ratios in Berlin and Barcelona
9 Conclusions
Dispatching a fleet of thousands of vehicles in order to serve tens or hundreds of thousands of requests daily, poses a challenging optimization problem. The problem is inherently dynamic, as almost all requests are immediate and without pre-specified destinations.
By means of large-scale microscopic simulation run in MATSim, and the dynamic routing functionality offered by the DVRP module, a realistic simulation model of the taxi services in Berlin and Barcelona was developed. This allowed a detailed benchmarking of two rule-based dispatching strategies to be carried out, out of which the second was able to efficiently serve both low and high demand.
Combining both simplicity and efficiency, rule-based dispatching is a very attractive and, thus, overwhelmingly popular approach for management of a fleet of taxis in the real world. However, their apparent disadvantage is the limited planning horizon; the selected decision is the best among all possible single moves, without considering potential sequences of moves. Therefore, the authors plan to use the microscopic taxi model of Berlin and Barcelona to study in detail other, more sophisticated dispatching algorithms, the best of which could be later applied to managing a real fleet. The results of the microscopic model will be also useful for providing guidelines to the taxi policy decision makers in both cities about the number of taxis operating in each city.
Footnotes
- 1.
Around 4:00 am, taxi supply and demand is the lowest, making it an intuitive breakpoint between days.
- 2.
The supply closely follows the demand resulting in approximately two requests being served every hour by each working taxi.
- 3.
Therefore, in the previous publications, the authors referred to it as the no-scheduling strategy (NOS).
References
- Alshamsi A, Abdallah S, Rahwan I (2009) Multiagent self-organization for a taxi dispatch system. In: 8th international conference on autonomous agents and multiagent systems, pp 21–28Google Scholar
- Bischoff J, Maciejewski M, Sohr A (2015) Analysis of Berlin’s taxi services by exploring GPS traces, accepted for MT-ITS 2015Google Scholar
- Cheng S, Nguyen T (2011) Taxisim: a multiagent simulation platform for evaluating taxi fleet operations. In: Proceedings of the 2011 IEEE/WIC/ACM international conferences on web intelligence and intelligent agent technology, vol 02, IEEE Computer Society, pp 14–21Google Scholar
- Ebendt R, Sohr A, Touko-Tcheumadjeu L, Wagner P (2012) Dynamische neuplanung der Touren von express trucks unter Einbeziehung einer FCD-basierten Verkehrslage. In: Multikonferenz Wirtschaftsinformatik 2012: Tagungsband der MKWI 2012, pp 124–136Google Scholar
- Egbelu PJ, Tanchoco JM (1984) Characterization of automatic guided vehicle dispatching rules. Int J Prod Res 22(3):359–374CrossRefGoogle Scholar
- Horni A, Nagel K, Axhausen KW (eds) (2016) The multi-agent transport simulation MATSim. Ubiquity Press, LondonGoogle Scholar
- Lee D, Wang H, Cheu R, Teo S (2004) Taxi dispatch system based on current demands and real-time traffic conditions. Transp Res Rec J Transp Res Board 1882(1):193–200CrossRefGoogle Scholar
- Maciejewski M (2014a) Benchmarking minimum passenger waiting time in online taxi dispatching with exact offline optimization methods. Arch Transp 30(2):67–75CrossRefGoogle Scholar
- Maciejewski M (2014b) Online taxi dispatching via exact offline optimization. Logistyka 3:2133–2142Google Scholar
- Maciejewski M (2016) Dynamic transport services. In: Horni et al. (2016)Google Scholar
- Maciejewski M, Bischoff J (2015) Large-scale microscopic simulation of taxi services. Procedia Comput Sci 52:358–364. doi: 10.1016/j.procs.2015.05.107 CrossRefGoogle Scholar
- Maciejewski M, Nagel K (2013a) A microscopic simulation approach for optimization of taxi services. In: Albrecht T, Jaekel B, Lehnert M (eds) Proceedings of the 3rd international conference on models and technologies for intelligent transportation systems 2013, TUD press, pp 1–10Google Scholar
- Maciejewski M, Nagel K (2013b) Simulation and dynamic optimization of taxi services in MATSim. VSP working paper, TU Berlin, Transport Systems Planning and Transport Telematics, see http://www.vsp.tu-berlin.de/publications
- Neumann A (2014) A paratransit-inspired evolutionary process for public transit network design. PhD thesis, Technische Universität BerlinGoogle Scholar
- Salanova JM (2013) Modeling of taxi cab fleets in urban environment. PhD thesis, Universitat Politècnica de CatalunyaGoogle Scholar
- Salanova JM, Estrada M (2015) Agent based modelling for simulating taxi services (case study in Barcelona). Procedia Comput Sci 52:902–907. doi: 10.1016/j.procs.2015.05.162 CrossRefGoogle Scholar
- Salanova JM, Estrada M, Mitsakis E, Stamos I (2013) Agent based modeling for simulation of taxi services. J Traffic Logist Eng 1(2):159–163CrossRefGoogle Scholar
- Sauer S (2014) Wie der mindestlohn das taxi-gewerbe veraendert. Berliner Zeitung. http://www.berliner-zeitung.de/wirtschaft/mindestlohn-2015-in-deutschland-wie-der-mindestlohn-das-taxi-gewerbe-veraendert-602170. Accessed 28 Jan 2016
- Senate Department for Urban Development and the Environment (2015) Lebensweltlich orientierte Raeume (LOR) in Berlin. http://www.stadtentwicklung.berlin.de/planen/basisdaten_stadtentwicklung/lor/. Accessed 28 Jan 2016
- Seow K, Dang N, Lee D (2010) A collaborative multiagent taxi-dispatch system. IEEE Trans Autom Sci Eng 7(3):607–616CrossRefGoogle Scholar
- Wang H, Lee D, Cheu R (2009) PDPTW based taxi dispatch modeling for booking service. In: Natural computation, 2009. ICNC’09. Fifth International conference on IEEE, vol 1, pp 242–247Google Scholar
Copyright information
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.