# Taxi Dispatch Optimization in Smart Cities Using TOPSIS

Authors: Adnan Abid; Naeem A. Nawaz; Muhammad Shoaib Farooq; Uzma Farooq; Irfan Abid; Iqra Obaid
Journal: Security and Communication Networks
 (2022)

---

## Abstract

The modern smart cities demand an efficient taxi dispatch system to satisfy the expectations of the passengers while giving justified rides to the drivers. Many a time, the customers have to wait too long for a taxi and the taxi driver wastes a lot of his time and the fuel in finding customers. Furthermore, some customers cancel the ride for not finding suitable category of taxi. Though there exist some algorithms that aim to optimize the assignment of taxis to appropriate customers, yet most of these approaches focus on the positioning of the taxi drivers. This research aims to address the problem of taxi dispatching while keeping in view the preferences of the customer. To this end, this research models taxi dispatch system as a multicriteria decision-making problem where not only is the distance between the passenger and the taxi a parameter, but other user preferences are also incorporated in finalizing a taxi for a given passenger travel request. The proposed method has been compared with the traditional taxi dispatching system. The results reveal more satisfactory taxi dispatching based on the users’ preferences. Furthermore, the precision of the proposed approach has been proven with lesser cancellation, improved driver rating, and reduction in complaints.


---

## Body

## 1. Introduction

The world population has been devastatingly increasing and estimated to be doubled by 2050 [1]. There has been also an increase in the number of people, moving from rural areas to cities. This rapid increase in the population of cities has created a challenge for the administration to manage the city services [2]. However, the concept of smart city introduces new notion to the transformation and upgradation of the city. Specifically, the concept of smart city aims to improve the social city services, which involves transportation, social well-being, infrastructure development, environment protection, etc. [3].Travelling is among the key activities for day-to-day living [4]. The people living in cities always try to find convenient way of travelling. Therefore, they always rely on convenient taxi services, as owning a car has never been a practical and economical solution for travelling [5]. Taxi is an essential way of transportation in most of the countries [6]. Taxi plays one of the primary roles in the lives of urban people [7]. There are several developed countries that have established their own taxi dispatch systems at the government level [8, 9]. The passenger may just dial in the reservation center to book a taxi on the go. The importance of taxis can be determined from the number of successful trips. The number of taxi rides has been significantly increasing over the years. For example, in Dubai, 104 million taxi rides were recorded in 2016 [10], which increased to 682 million in 2019 [11].In parallel to government, there are also small- and large-scale companies such as Careem in the Middle East and Uber in the United States, which offer taxi services to their customers [12]. They have developed their own software to facilitate taxi booking through mobile phone and call centers. Figure 1 presents a general taxi dispatch system where a customer can book a taxi from his/her mobile phone and dispatch is sent to drivers available in that area. The enormous increase in the business of such companies is a clear indication of the interest of the people, to hire a taxi for their daily transportation needs. It has been discussed that almost ten thousand taxi booking requests have been received daily, but not all of them are completed. Most of the confirmed rides have been cancelled by the passengers before its completion [13].Figure 1
A general taxi dispatch system.Several taxis with different traits are available in a city. The response time (the difference in the customer request time and the moment the taxi arrives at customer location) and reduced empty movement costs (the movement the taxi makes till it reaches the customer location) are the two main factors of an effective taxi fleet system [14]. Usually, a taxi routing or an assignment considers very limited factors to find a taxi for the passenger and those factors are poorly defined as well. Each time a customer books a taxi, any driver can accept that dispatch to pick up the customer. Moreover, the drivers have an open choice to either accept incoming requests or not. However, sometimes even if the closest driver may respond to it, the passenger still finds the taxi inappropriate for travelling due to a number of other factors than time, including type of car as an important factor. These factors therefore influence the number of cancellations of rides by the passengers. Therefore, the provision to assign the right taxi to the passenger has been considered a challenge. Moreover, the challenge can be overcome by allowing the passengers to properly define their selection criteria for the desired taxi. Furthermore, the system should be intelligent enough to decide the best selection, based on weightage of the attributes.The goal of this research is to define a passenger’s preference-based taxi booking system. Figure2 presents a taxi booking scenario where four passengers A, B, C, and D and five taxis T1, T2, T3, T4, and T5 are present at different locations. Each passenger has requested a taxi and waiting for the taxi to be assigned. Similarly, each passenger has their own preference for a car, to be assigned as a taxi. Let us assume each taxi can be evaluated based on five criteria C1, C2, C3, C4, and C5. The passenger preferences against each of the given criteria can be defined as weights. Table 1 presents the relative weights collected from these passengers for each criterion mentioned above. These weights are accumulating to 100 as a sum, which essentially helps provide the relative importance of each criteria, just like the pie chart. These weights help to identify individual preferences for a car to be used as a taxi.Figure 2
A toy example for taxi booking.Table 1
Relative importance of passengers for different parameters of criteria.
PassengerC1C2C3C4C5Passenger A2524221415Passenger B2724231412Passenger C2030251015Passenger D401520520The weights represented in Table1 clearly show that all the passengers have different preferences for a car to be assigned as their taxi. Therefore, if the taxi booking system fails to assign taxi according to passenger preference, this results in cancellations of the ride by the passenger. Therefore, a taxi booking system is required to assign taxi to passengers based on their preference. Let us formulate a way that should consider passenger preferences before assigning a taxi.Multiattribute decision-making (MADM) is a powerful decision-making technique to find weightages of different attributes required in decision-making [15]. Decision-making is the process of selecting the best option from all of the available alternatives. These criteria usually create conflict among attributes so there may be no solution other than satisfying all criteria simultaneously. Hence, the decision-maker needs to solve multicriteria decision-making (MCDM) problem as shown in Figure 3. The Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) is the second important method of MADM for analyzing different passenger defined attributes [16]. TOPSIS is a multicriteria decision analysis method, which was originally designed by Ching-Lai Hwang and Yoon with further enhancements by Hwang et al. [17, 18]. TOPSIS is based on the idea that the chosen alternative should be closest to the positive ideal solution (PIS) and the longest geometric distance from the negative ideal solution (NIS).Figure 3
An overview of MCDM problem.This paper proposes a TOPSIS-based Lazy Dispatching to define the method of best possible taxi selection, as per passenger’s preferred criteria. This has been further divided into two subproblems: first, how to find a taxi based on criteria previously defined and how the passenger can be allowed to define the selection criteria. The rest of the paper is organized as follows: Section2 discusses the related research studies conducted so far. Section 3 discusses the preliminaries used throughout this research study. Section 4 discusses the methodology and algorithm. Section 5 highlights the discussion and future directions. Finally, the conclusion is described in Section 6.


## 2. Literature Review

Taxi dispatching has been considered one of the promising research fields. Several researches have been presented to in the area of vehicle dispatching and routing challenges. Many of the researches focus on optimizing the taxi dispatching algorithms.Bertsimas et al. [19] developed an optimization framework, that will help to dispatch thousands of taxis in real time who are serving 2,500 customers an hour. A tractable rolling-horizon strategy for optimization has been presented for online taxi routing which can be used in a number of applications. The optimization strategy has been guided by an increased control and the prior information which is available in today’s ride-sharing dispatching systems. The strategy has been implemented on real taxi demand data in the New York City, and thus dispatching thousands of vehicles in daily routine.Takashima et al. [20] presented hierarchical support system for taxi dispatching. In the study, a macro level component has been used to calculate the optimal taxi movement. However, micro level components are used to calculate optimal taxi cruising.Wang et al. [21] modeled the dispatching problem as a Markov Decision Process. Moreover, learning solutions have been proposed based on deep Q-networks. Furthermore, an action search has been included to optimize the dispatch policy for the drivers on ride-sharing platforms.Luo et al. [22] presented a method of taxi dispatching based on Artificial Fish Swarm Algorithm (AFSA). Moreover, the standard AFSA algorithm has been improved in terms of swimming behavior, visual range, and step size. Finally, few experiments based on real data of 12000 taxis of Beijing have been performed on MATLAB to represent that the improved AFSA has better performance in dispatching system.Nourinejad and Ramezani [23] modeled a taxi dispatch system based on macroscopic fundamental diagram (MFD). The model has been introduced in cities to consider the effects of the traffic congestion on dispatching system. To minimize the vehicle delays and accumulation of passengers, a model predictive control approach has also been developed to figure out an optimal taxi dispatching rate between the regions.Yao et al. [24] discussed the dispatch system, which uses GPS, and suggested improvement of the scheduling algorithms proposed by Dijkstra. The paper recommended improvement by suggesting a range for scheduling and proves through experiments that overall time complexity can be decreased, and scheduling performance can be increased. It also highlights the worth of traffic jams information in improving algorithm.Myr [25] presented the dispatch optimization of taxicab. The data considered to optimize includes currently available taxicabs and their locations and also the data of new client’s orders and their pickup locations. The work suggested that centralizing the processing unit including taxicabs information database and a taxicab dispatching information database and both along with customers’ pickup location will help in optimizing the dispatch process.Yuan et al. [26] proposed a way to find empty taxis for the customers in the form of recommender system. This system utilizes passenger’s movement patterns and taxis’ pickup/drop-off routines. This data is extracted from GPS devices embedded in taxicabs. This system suggests cab drivers to move towards possible pickup location and on the other hand it recommends passenger to move towards locations, at shorter distances, where they are in a better position to find vacant taxis.Wenjie [27] discussed the improvement of taxi dispatching with the help of locations. The study computed the taxi vacancy status and its direction from the passenger. Additionally, other improvements on routes, taximeters, and taxi pooling are also discussed.Chen et al. [28] developed a taxi recommendation system. This system recommends taxi based on the comments of previous passengers. The application guides the passengers about the taxi rating, estimated taxi fare, distance divergence warnings, and the planned routes via AR with plate recognition technology. The divergence warning helps the passenger to know about the driver movement and may help them to avoid any bad incident.Zou et al. [29] presented a dispatch system which dispatches a route for the vacant taxis. Moreover, a probabilistic model to consider the impact of previously dispatched taxis is presented to reduce computing overhead. Finally, a trace-driven simulation has been conducted for evaluation purpose.All these studies focused on solving vehicle dispatching problems in several ways. However, the research on dispatching taxis according to the traits preferences of the passenger still needs attention. The novelty of this work is that we have optimized the taxi dispatching problem as per passenger preference.


## 3. Preliminaries

Suppose when a passenger requests a taxi for his trip, m taxisA1, A2, A3,..., Am are found available to serve the passenger. Each taxi Ai represents the feasible available car for the ride. The performance value Zij is first calculated against each feasible car. This performance value is calculated based on multiple criteria CjC1,C2,C3,…,Cn and the weight WjW1,W2,W3,…,Wn of each criterion. Hence Zij represents the performance value of each available car based on the criteria and the weight of each criterion. Therefore,(1)M=Zijm×n.A matrix is calculated to show the performance value of each car.


## 4. Methodology

The taxi dispatching problem discussed is a type of problem where available taxis in the city are trying to serve a set of customers who are trying to book for their usual travel. The basic idea is to entertain every customer’s requests for a taxi to pick him/her up around a given time and to pick up him/her from his/her specified pickup location to his/her desired drop-off location. As most of the people usually request a taxi when it is needed rather than booking upfront, most of these requests are supposed to be initiated to the system right before the start of the trip. Also, this paper focused on the delivery of the taxi according to the trait’s preferences of the passenger.Several taxis with different traits are available in a city; therefore a passenger requests to define his/her preference to find the best available taxis from the pool. The passenger is allowed to weigh each of them. A suitable taxi based on the preferences is then decided and attached to the passenger’s profile.


### 4.1. Algorithm

The proposed solution breaks the bigger dispatch problem into smaller problems. This division on one hand reduces the complexity of the system and on the other hand values priorities defined by passenger. The problem can be divided into two parts. The first part optimizes dispatching routine to address at smaller possible area rather than the whole city. In existing dispatching solutions, the system looks for the available taxi to assign the job upon each passenger request. Such dispatching solutions lack optimization as they consider the taxis in the whole city. However, in our solution the city is divided into smaller manageable regions for optimization. So, the system finds the taxi in a predefined radius instead of looking for a vacant taxi in the whole city. This reduces the complexity and processing time and optimizes overall dispatching routine. It is referred to as Lazy Dispatching.In the first step, the geographical region is divided into smaller manageable zones. In this way, a smaller zone needs to be checked to find the desired taxi upon a passenger request. For the cases where no taxis are available in a certain zone, the current zone is expanded. The expansion is done by merging another zone nearby, to requested pickup location of the customer. Figure4 demonstrates a region divided into multiple zones for illustration purposes. The vehicles are visualized as the green circles with the number corresponding to the driver identifier. However, the requests are visualized as a pair of circles: yellow for the pickup location and blue for the drop-off location with the number corresponding to the request ID. Figure 4 shows a total of 12 zones to handle dispatching. All bookings coming from different zones are buffered first and then available taxis are found in that region or nearby if need be. Hence, TOPSIS is applied to select the right taxi for the passenger. In the case that taxis are not found in the first zone, the next zone will be selected using Breadth First Search (BFS). In this way, surrounding zones are also traversed. Figure 5 represents the algorithm for this Lazy Dispatching.Figure 4
Overview of car placements with zones and passenger requests.Figure 5
Pseudocode for Lazy Dispatching.The second part of the problem addresses passenger’s preferences in terms of selecting a taxi. There are different aspects which a passenger can prefer while ordering a taxi. With the help of TOPSIS, the customer can easily define the priorities. By incorporating TOPSIS, we determine Ideal solution with maximum benefits and minimum cost. Figure6 presents the algorithm for prioritizing the alternatives (taxi) using TOPSIS to overcome the barriers of taxi booking.Figure 6
Pseudocode for prioritizing alternatives (taxis) using TOPSIS.The pseudocode of function establishDecisionMatrix is represented in Figure7. The pseudocode in Figure 8 formulates the problem of taxi assignment. In this case, TOPSIS is applied to select the right taxi for a passenger based on the weightage Wi assigned by the passenger against each criterion. Later, a decision matrix M for the traits discussed in the problem statement has been defined. Here, each time when a passenger requests a taxi, let m denote the total number of available alternatives (cars) for the ride. However, n represents the criteria used to evaluate the alternatives (car). Moreover, Zij,i=1,2,3,…m;j=1,2,3,…,n represents the evaluation value of each alternative against each criterion.Figure 7
Pseudocode for establishing decision matrix.Figure 8
Cancellation feedback screen to learn about user behavior.This evaluation value helps to find the importance of alternatives, in terms of decision criteria of each individual. Following the TOPSIS, let us declareM as matrix as given in the following equation:(2)W1W2...WnC1C2...CnM=A1A2..AmZ11Z12...Z1nZ21Z22...Z2n............Zm1Zm2...Zmn.The matrix is then converted to the normalized performance matrix. The normalized performance matrix is defined by calculating the normalized scoreNij against each column of matrix M as given in the following equation:(3)Nij=Zij∑j=1mZij2,j=1,…,nandi=1,…,m.After calculating the normalized decision matrix, positive and negative idea values are calculated. LetJ be set of benefit attributes or criteria which contributes positively towards the objective as given in equation (4). The higher result is better, e.g., safety, comfort, and rating.(4)J=maxZijm×n.LetJ′ be a set of negative attributes or criteria which contributes negatively towards the objective as given in equation (5). Hence, less is better in this case, e.g., cost and ETA.(5)J′=minZijm×n.Finally, the available alternative (taxis) will be ranked based on their closeness to the ideal solution.An example of taxi booking including four passengers and five taxis has been already discussed above. The preferences of each of the four passengers are also mentioned in Table1. Furthermore, the results based on the preferences of passenger A have been calculated by the algorithm. The results show that taxi T2 wins the situation. Therefore, taxi T2 will be booked for the passenger A.


### 4.2. A Case Study Application

To evaluate TOPSIS-based dispatching algorithm, an application has been designed. This application is designed to record the feedback of the passengers and to evaluate the overall efficiency of the algorithm. The application has multiple screens. Figure8 shows the interface of the screen which helps the passengers to give their feedback. This screen also helps to analyze the reasons of cancellation of rides.Moreover, screens represented in Figure9 have been designed to analyze the taxi driver rating. This screens also provide the feedback of the passengers relating to their trip. However, the complaints they are having related to their rides can also be recorded.Figure 9
Interface used to provide the post-ride feedback from customers.


## 4.1. Algorithm

The proposed solution breaks the bigger dispatch problem into smaller problems. This division on one hand reduces the complexity of the system and on the other hand values priorities defined by passenger. The problem can be divided into two parts. The first part optimizes dispatching routine to address at smaller possible area rather than the whole city. In existing dispatching solutions, the system looks for the available taxi to assign the job upon each passenger request. Such dispatching solutions lack optimization as they consider the taxis in the whole city. However, in our solution the city is divided into smaller manageable regions for optimization. So, the system finds the taxi in a predefined radius instead of looking for a vacant taxi in the whole city. This reduces the complexity and processing time and optimizes overall dispatching routine. It is referred to as Lazy Dispatching.In the first step, the geographical region is divided into smaller manageable zones. In this way, a smaller zone needs to be checked to find the desired taxi upon a passenger request. For the cases where no taxis are available in a certain zone, the current zone is expanded. The expansion is done by merging another zone nearby, to requested pickup location of the customer. Figure4 demonstrates a region divided into multiple zones for illustration purposes. The vehicles are visualized as the green circles with the number corresponding to the driver identifier. However, the requests are visualized as a pair of circles: yellow for the pickup location and blue for the drop-off location with the number corresponding to the request ID. Figure 4 shows a total of 12 zones to handle dispatching. All bookings coming from different zones are buffered first and then available taxis are found in that region or nearby if need be. Hence, TOPSIS is applied to select the right taxi for the passenger. In the case that taxis are not found in the first zone, the next zone will be selected using Breadth First Search (BFS). In this way, surrounding zones are also traversed. Figure 5 represents the algorithm for this Lazy Dispatching.Figure 4
Overview of car placements with zones and passenger requests.Figure 5
Pseudocode for Lazy Dispatching.The second part of the problem addresses passenger’s preferences in terms of selecting a taxi. There are different aspects which a passenger can prefer while ordering a taxi. With the help of TOPSIS, the customer can easily define the priorities. By incorporating TOPSIS, we determine Ideal solution with maximum benefits and minimum cost. Figure6 presents the algorithm for prioritizing the alternatives (taxi) using TOPSIS to overcome the barriers of taxi booking.Figure 6
Pseudocode for prioritizing alternatives (taxis) using TOPSIS.The pseudocode of function establishDecisionMatrix is represented in Figure7. The pseudocode in Figure 8 formulates the problem of taxi assignment. In this case, TOPSIS is applied to select the right taxi for a passenger based on the weightage Wi assigned by the passenger against each criterion. Later, a decision matrix M for the traits discussed in the problem statement has been defined. Here, each time when a passenger requests a taxi, let m denote the total number of available alternatives (cars) for the ride. However, n represents the criteria used to evaluate the alternatives (car). Moreover, Zij,i=1,2,3,…m;j=1,2,3,…,n represents the evaluation value of each alternative against each criterion.Figure 7
Pseudocode for establishing decision matrix.Figure 8
Cancellation feedback screen to learn about user behavior.This evaluation value helps to find the importance of alternatives, in terms of decision criteria of each individual. Following the TOPSIS, let us declareM as matrix as given in the following equation:(2)W1W2...WnC1C2...CnM=A1A2..AmZ11Z12...Z1nZ21Z22...Z2n............Zm1Zm2...Zmn.The matrix is then converted to the normalized performance matrix. The normalized performance matrix is defined by calculating the normalized scoreNij against each column of matrix M as given in the following equation:(3)Nij=Zij∑j=1mZij2,j=1,…,nandi=1,…,m.After calculating the normalized decision matrix, positive and negative idea values are calculated. LetJ be set of benefit attributes or criteria which contributes positively towards the objective as given in equation (4). The higher result is better, e.g., safety, comfort, and rating.(4)J=maxZijm×n.LetJ′ be a set of negative attributes or criteria which contributes negatively towards the objective as given in equation (5). Hence, less is better in this case, e.g., cost and ETA.(5)J′=minZijm×n.Finally, the available alternative (taxis) will be ranked based on their closeness to the ideal solution.An example of taxi booking including four passengers and five taxis has been already discussed above. The preferences of each of the four passengers are also mentioned in Table1. Furthermore, the results based on the preferences of passenger A have been calculated by the algorithm. The results show that taxi T2 wins the situation. Therefore, taxi T2 will be booked for the passenger A.


## 4.2. A Case Study Application

To evaluate TOPSIS-based dispatching algorithm, an application has been designed. This application is designed to record the feedback of the passengers and to evaluate the overall efficiency of the algorithm. The application has multiple screens. Figure8 shows the interface of the screen which helps the passengers to give their feedback. This screen also helps to analyze the reasons of cancellation of rides.Moreover, screens represented in Figure9 have been designed to analyze the taxi driver rating. This screens also provide the feedback of the passengers relating to their trip. However, the complaints they are having related to their rides can also be recorded.Figure 9
Interface used to provide the post-ride feedback from customers.


## 5. Evaluation and Discussion

To verify the effectiveness of the proposed approach, A/B testing has been adopted, whereby an equal number of passengers have been routed to the proposed TOPSIS-based Lazy Dispatching algorithm and the traditional approach. Each group contained 500 passengers to compare the results of the experiment. The precision of this algorithm has been identified based on time required to assign the taxi, number of cancellations, passenger rating to driver, and the complaints frequency. The same chance to share feedback using the screens, shown in Figures8 and 9, is provided to both groups. Results from both groups were compared after running the experiment for ten weeks.The results show that the time required for finding a taxi has been decreased due to Lazy Dispatching. Figure10 shows a comparison of execution time for finding taxis using TOPSIS algorithm and the traditional system. The passengers have to wait for a long time in the traditional system to find a taxi as compared to the suggested algorithm.Figure 10
Time required to assign the taxi to the passenger.Moreover, the results showed 20% less cancellation with TOPSIS-based Lazy Dispatching as compared to the previous adopted implementation. The experiments show that for the same group with TOPSIS-based Lazy Dispatching almost 18% decrease in car-related issues has been monitored. The results states that now the passengers have been more satisfied with the taxi they use for travelling. The reason of the satisfaction can be linked with reason as there are more chances now to get the taxi near to their preferences. Figure11 presents the graphical representation of variations in the cancellation numbers between the traditional implementation and TOPSIS-based Lazy Dispatching implementation.Figure 11
Number of cancellations by passengers.Finally, it has also been identified that 17% less complaints have been registered by the passengers who have been assigned taxis by using TOPSIS-based Lazy Dispatching. Figure12 represents the graphical demonstration of the findings concluded after the experiment. The results show that now the passengers have less complaints with the taxi as compared to the traditional system.Figure 12
Number of complaints registered by passengers.The overall results from both groups have been compared and it shows that TOPSIS-based Lazy Dispatching booking system has been more effective in comparison to the previous implementation.The common traits can be linked together according to the area or region, such as airport, city center, commercial area, etc, so that real-time demand can be estimated, and services are provided according to the demand. How many passengers required a taxi, for which area? If the flight is late, then the taxi driver should get a message about the flight delay.


## 6. Conclusion

In current smart cities scenarios, transportation is one of the key activities in the daily routine. In urban areas, people rely on taxis to reduce their physical, mental, and economic burden. The current taxi dispatching systems do not consider passenger preferences before assigning taxi, which causes major distress often. This paper proposed the framework of taxi dispatching system based on passenger preferences using TOPSIS-based Lazy Dispatching. The alpha beta tests have been conducted to prove its efficiency. The test results showed that a great value has been achieved in terms of reducing booking cancellation, increasing driver rating, and fewer complaints. Moreover, it also played an important role in engaging the right driver for the right job.With the help of TOPSIS, taxis have been grouped based on the traits. Each time when passengers requested taxis, those requests have been added in a pool too rather than treating each request individually. After the specified time, that pool of requests has been taken to match the best possible taxi from a pool of taxis. Lazy Dispatching helped to make sure that from a given pool of taxis, which themselves are already sorted based on criteria weightage, they are assigned efficiently, where efficiency is defined as a taxi with desired criteria and closest to a passenger’s requested location.The research can be extended to address the ride-sharing problem where one taxi is shared among multiple passengers. These passengers could have different pickup locations but head towards a common destination. So, to address the above scenario, the research can optimize one taxi assignment to different passengers based on TOPSIS criteria attributes.



---

*Source: 7213633-2022-01-28.xml*