Fleet size and fare optimization for taxi under dynamic demand

In this paper, a bi-level model is proposed, which considers the benefits of taxi driver and passenger. The upper-level model is a bi-objective program. The first objective is to minimize the waiting time of passenger in rush hour. And the second objective is to maximize the income of the driver for one day. The lower-level model is a demand function model, calculating the demand of taxi based on given fleet size and fare. The lower-level model can show the influence of fleet size and fare on the potential demand. At last, the taxi current condition of Dalian city in China is chosen to test the proposed method. The results show that the increase of fleet size can attract potential demand. But the degree of attraction mostly depends on the waiting time of passengers and taxi fare. Furthermore, both fleet size and fare of tax in Dalian are on a low level. It is necessary to increase the fleet size and the fare in the meantime.


Introduction
In recent years, with the growth of the living standard and the difficulty of parking a car, demand for taxi increases rapidly. However, taxi fleet size and fare are restrained by government, the contradiction between demand and supply is prominent. Excess fleet size can reduce the average waiting time of passenger. But the overlong dead mileage will result in a decline in taxi driver income. In contrast, when the fleet size is insufficient, it can increase taxi driver income while waiting time of passengers will be long. In addition, in the aspect of fare, variation on fare will influence passenger demand for taxi, and then, affect taxi driver income. Therefore, how to determine taxi fleet size and fare can affect taxi share parts of urban travel demand. Meanwhile both operation efficiency and service level are guaranteed.
Research on the taxi started in the 70's. Douglas (1972) was one of the researchers who first made research on the taxi market. Most of the later authors built their models on the base of formulation proposed by Douglas (1972). More realistic factors were considered in the model of taxi market (Yang et al., 2000;Wong et al., 2002). With the development of technology, new technologies such as GPS, GIS were used to simulate the operation of taxi market (Karimi and Lockhart, 1993;Liao, 2003). In these literatures on taxi, there are a lot of research on the taxi fleet size and fare. De (1975) built a model, in which the service quality was measured by the waiting time. Beesley and Glaiste (1983) proposed a model which depended on the assumptions of service at a given point, a single fare, uniform trip length and an infinitely elastic supply. The results showed that profits could not be used alone to indicate a desirable direction for a change in cab numbers. Wong et al. (1999) proposed network equilibrium model, in which taxi fleet size was important to the system. Taxi fleet size could influence the passenger waiting time and environment.  proposed model which could ascertain at equilibrium the service intensity and utilization rate of taxis and the level of service quality throughout the day. Customer demand is a function of waiting time and fare. Schaller (2007) discussed the effects of entry control on taxicab availability. The telephone order market and the cab stand hail market were analyzed. The same research can be found in Wong et al. (2003), Sirisoma et al. (2010) and so on.
Some literatures about taxi fare can be acquired. Fravel and Gilbert (1978) found that taxi demand was inelastic with respect to fare changes, but the hypothesis he made could only be tested in a tentative way. Arnott (1996) proposed that to cover the shadow cost of loss time, subsidy should be provided to taxi driver. Schaller (1999) analyzed the relationship between the taxi fare and trip demand, the availability of taxi service.  considered the congestion externalities, and adopted a realistic distance-based and delay-based taxi fare structure. Kim et al. (2008) developed a mathematical model to deals with an incremental discount policy on the taxi fare. The optimal discount rate and price breakpoint could be determined by a solution procedure. Chang et al. (2009) attempted to solve the problem of taxi fare where customer arrival rate and vacancy rate were considered. Yang et al. (2010) used an extended taxi model to examine the effects of nonlinear fare structures in taxi markets. Pareto-improving nonlinear fare amendments were beneficial to both driver and passenger. Schaller (1998) also considered the taxi fare in his paper. In fact, taxi fleet size and fare could be optimized at the same time. Shreiber (1975) explained the relation between the ride price and the availability of taxi. Schroeter (1983) proposed two methods to affect the market performance: quantitative limitation of licensed cabs and incentive mechanism of driver. The results showed that certain regulatory reforms may be beneficial to both taxi drivers and customers simultaneously. Cairns et al. (1996) discussed that price and entry regulations were essential to the taxi market. It found a positive, inelastic relationship between vacant taxicabs and demand for taxicab service.

ISSN 2238-1031
In this paper, a bi-level model is proposed which considers the benefits of both taxi driver and passenger. The upperlevel model is a bi-objective program. One objective minimizes the waiting time of passengers in rush hour. The other maximizes the income of the drivers one day. The lower model is a demand function model. The model can calculate the demand of taxi based on given fleet size and fare. The upper-level model and the lower-level model are iteratively conducted to balance taxi fleet size and the corresponding taxi fare. The rest of the paper is organized as follows: section 1 introduces the bi-level model of taxi planning which is proposed in this paper; the genetic algorithm selected for solve this problem is described in section 2; Case study of Dalian city, the convergence of the algorithm and the results analysis are presented in section 3; Finally, the conclusions and direction for future research are presented.

Problem description
At present, taxi market operation is involved with taxi, passenger and government. Their relationship is mutually dependent and constrained as the three have their own goals to pursue. Nevertheless, supply-demand equilibrium of taxi market cannot be achieved by frequent fare adjustment like other markets. Fare determined by government is stable for a period, and taxi fleet size becomes the lever of regulating supply-demand equilibrium. As main participants in the market, passenger and driver have an obvious interest conflict. Strategy of passenger focuses on whether to take a taxi, while taxi driver attempts to adjust fleet size under relative demand. When taxi fleet size is small, waiting time of passenger is long. Inconvenient trip will make passenger choose other modes of transportation. However, an excessive fleet size can attract more passengers. But the taxi driver income decreases due to high vacancy rate. At this point, market is at an imbalanced state. As the senior decision-maker, government controls the fare variation, aiming to optimize system and improve social welfare. Therefore, government should increase fare to balance interests of the two parties. In this way, waiting time of passengers will be in a satisfied range and losses of taxi driver can be compensated. Taxi, passengers and government affect each other. And the process of gaming is also a procedure of recovering equilibrium of the market. Figure 1 shows the relation of passenger, taxi driver and government.

Upper-level model
The upper-level model is a bi-objective program for taxi fleet size. Minimizing the waiting time of passenger in rush hour and maximizing the income of the driver for one day are the two objectives. Rush hour is the least satisfied period for passengers. It is also the busiest period for taxi. Benefits of passenger can be weighed by waiting time at rush hour. If it can meet the requirement of passenger, it will definitely meet the requirement of passenger at off-peak hour. Therefore, only waiting time of passenger at rush hour is chosen in this paper. For the driver, unbalanced time distribution of passenger flow often leads to different incomes during different periods. But taxi driver concerns most about income for one day. Thus, income for one day suitably represents interests of driver. Under given demand, optimal taxi fleet size can be worked out, which balances the interests of supply and demand parties.
is the average waiting time of passenger at rush hour; N is the taxi fleet size of a city; h (0<h<24) is the average operating time of a taxi per day; is the average time of passenger taking taxi at rush hour; is be a positive parameter to weight the passenger waiting time, which depends on areas that taxi services and distribution of taxi fleet size or taxi stations in this area; W is the taxi driver income per day; and are the demand at off-peak hour and rush hour respectively; D is the average distance of passenger taking taxis; a is the hours of rush hour; b is the hours of off-peak hour; P is the flag-down fare; is the fare per kilometer.

Lower-level model
The lower-level model determines the dynamic relation among demand for taxi, fleet size and fare. With the given taxi fleet size and fare, taxi demand at rush hour and off-peak hour can be gotten. Trip of a city is fixed, so demand for taxi cannot grow with the increase of fleet size unlimitedly. The increase of fleet size will attract potential demand, but the degree of increase mainly depends on waiting time of passenger and fare, i.e.
Where, M is upper bound of demand for taxi; represents the demand of passenger at the ith period; K(N,P) is the attraction coefficient of waiting time and fare to potential demand; is the original taxi fare, i.e. 8 RMB. , and are undetermined coefficients.

Solution method for model
The model proposed is a bi-level model. The upper-level model is multi-objective programming and lower-level is a supply-demand model. Considering features of the model in this paper, genetic algorithm, is an effective method which has been widely selected in many fields (Chen et al., 2013a,b;Yu et al., 2013), is also used to solve this problem. Thus, the solutions are proposed as follows: a multi-objective genetic algorithm is proposed to solve the upper-level model which can be found in Gao et al. (2000). Fleet size can be gotten under the given demand. In the lower-level model, the optimal fleet size of the upper level model is a known quantity. And reasonable demand is calculated in the lower-level model based on nonlinear iteration process. The demand will be a known quantity of the upper level model in the next iteration. The upper and the lower model iterate until the optimal solution is within limits.

Multi-objective genetic algorithm for the upper-level model
Step1. Initialize population. In this paper, binary form is chosen to code and taxi fleet size is set to N.
Step2. Calculate individual fitness. Calculate function value of each individual in population for different objective functions. Rank them according to their qualities. Finally, comprehensive fitness of each individual is calculated. Define fitness function based on ranking as:

L is the number of individuals in population;
is the jth individual in population; ( ) is the sequence number of individual j by ranking function value of objective i; ( ) is the fitness of individual for objective i; ( ) is the comprehensive fitness of individual j for all objectives. λ is a constant in (1,2). When individual expresses optimally, the fitness of that individual will express distinctly. It can be drawn from equations (7-8) that excellent individuals can get larger fitness and obtain more opportunities to evolve.
Step3. Individual selection. In simple genetic algorithm, the probability that an individual is chosen depends on its fitness. If the comprehensive fitness of an individual is large, there is higher probability to choose it into next population. This paper adopts the roulette selection method and elitist strategy. The roulette selection is used to ensure a higher probability for the individual with higher value while the elitist strategy attempt to ensure the best gene will not lose in case of degeneration.
Step4. Genetic operation. This paper adopts single-point crossover and uniform mutation operators to generate next population.
Step5. Judge whether to meet the stop conditions of the algorithm. If conditions are satisfied, algorithm stops and gives the optimal solution of upper-level model. Otherwise, Skip to Step 2.

Nonlinear iteration method of lower-level model
The Lower-level model is relation of supply and demand. Demand and supply of upper-level model are needed to calculate the demand of lower-level model. In this paper, the nonlinear iteration method is adopted to solve the problem. Taxi demand is obtained and put into the upper-level model for the next iteration.

Essential data
Up to September, 2013, there are 8724 taxis in Dalian. At present, vacancy rate of taxi in Dalian is 29%. Waiting time of passenger is over 10 minutes and degree of satisfaction is low. Compared with other similar cities, taxis fare in Dalian is at a low level and has not been adjusted for dozen years. The fare is 8 RMB and fare per kilometer is 2 RMB. Income of a taxi for whole day (double shift) is 733.06 RMB. Data processing is very important to ensure the effectiveness of essential data (Yao et al., 2014c;Zong et al., 2013a,b). With the completion of GPS system, more information about vehicle operating condition can be obtained, for example current position of the taxi, whether it is vacant, running distance of each trip, speed, etc. This paper collected GPS data of 50 taxis in main downtown of Dalian 2014a,b). And parameters of bi-level program are obtained by analyzing GPS data and the relative information of each taxi. The values of parameters are shown in Table 1.

Calculation results
When the fare is set to 8 RMB, taxi demand under different fleet size is showed in Figure 2. Taxi demand at off-peak hour is higher than that at rush hour, which is mainly caused by two reasons. On one hand, duration of off-peak time is longer than that of rush hour. On the other hand, there is heavy traffic jam at rush hour. Although passenger increases, each service time becomes longer. It can also be seen that with the increase of fleet size, demand improves accordingly, especially at nonpeak hour. It means that with the increase of fleet size, waiting time of passenger decreases and potential demand is attracted. And thus, the shorter waiting time will be, the faster demand increases accordingly.

Figure 2 -Relation between taxi fleet size and demand
The relation of taxi fleet size and waiting time of passenger, and the relation of taxi fleet size and incomes of driver are showed in Figure 3. Data from Dalian indicates that the taxi vacancy rate is less than 35% and waiting time of passenger is longer than 10 minutes. It means that taxi fleet size in Dalian is insufficient. However, increasing fleet size may raise vacancy rate and reduce incomes of taxi driver. To take interests of both taxi driver and passenger into account, fleet size and fare must be regulated. This paper compares waiting time of passenger and incomes of taxi driver under different fare which can be seen in Figure 3. From Figure 3, it can be acquired that with the increase of fleet size, taxi driver income and the waiting time of passenger with different fare both have a trend of decline. It is mainly because that the increase of fleet size makes the vacancy rate high. In this case, it is more convenient for passengers to take a taxi. When the fleet size is over 8700, taxi driver income whose fare is 9 or 10 RMB (higher than 8 RMB). When the fare is 12 RMB, taxi driver income is lower than that at 8 RMB primitively. With the increase of fleet size, it will be higher than that at 8 RMB, but lower than at 9 RMB all the time. When the flag-down fare is 10, driver has the highest income. In terms of waiting time of passenger, it can be controlled in 10 minutes under different fare when fleet size is more than 9000. Though waiting time of passenger is about 5 minutes when the fare is 12 RMB. Inhibitory effect of fare makes taxi driver income unsatisfied. When the fare is 9 RMB and 10 RMB, waiting time of passenger is about 8 minutes and 6 minutes respectively, which can be accepted by passenger. Considering taxi driver income and waiting time of passenger integrally, interests of both taxi drivers and passengers can be guaranteed when the fare is 10 RMB and taxi fleet size is 9100. Increasing fleet size makes waiting time of passengers controlled in 6 minutes. Meanwhile heightening fare can make up for losses of taxi driver caused by vacancy rate.

Convergence of the algorithm
In this paper, crossover rate is 0.8 and mutation probability is 0.05.Individual number of initial population is 60. Calculating the model for 10 times when the fare is 10 with the same situations. Convergence condition is shown as Figure  4. It can be seen that the difference of calculated results for ten times is not large. Difference between maximal and minimal fleet size is less than 1%, which means the algorithm has a superior convergence performance.

Conclusion
This paper determines the optimal taxi fleet size considering the relation of taxi demand, fleet size and fare. A bi-level model is formulated which considers the benefits of both taxi driver and passenger. The upper-level model is a bi-objective program. One objective minimizes the waiting time of passengers in rush hour and the other maximizes the income of the drivers for one day. The lower-level model is a demand function model, which calculates the demand for taxi based on given fleet size and fare. Influence of waiting time of passenger and fare on potential demand is reflected. By analyzing instance of Dalian, fleet size gap is nearly 400 PCU. Meanwhile flag-down fare should be raised to 10 RMB. These results conform to actual operating data of taxi in Dalian, which means this method has a good practicability. Fare in this paper only involves flag-down fare of taxi, so adding fare per kilometer will be the key point of feature research.