Abstract

Aiming at the problem of taxi low carrying rate, unreasonable route planning, and taxi charges, this paper mainly studies the taxi sharing routes and the sharing expense model which take the maximum carrying rate, the shortest driving distance, and the sharing expense of drivers as the objective function. We consider the problems of taxi capacity limitation, the driving distance limitation, the number of people getting on and off, and the charges. Through using the passenger’s pool to classify passengers in different directions and different starting points, we use the championship selection strategy, station fragment cross design, station-supervised mutation, and pricing algorithm to solve the model. Finally, we analyze the taxi data of Lanzhou City and simulate the new ways of this paper. The results are shown that compared with the daily practice of the nonshared mode, the taxi sharing mode has obvious improvement in terms of carrying rate, driving distance, and driving benefits. Therefore, the sharing mode can be used in taxi sharing route, and the sharing expenses are reasonable and useful for passengers and drivers.

1. Introduction

In recent years, with the rapid development of China’s economy and the expansion of the urban population, people’s personalized demands for the taxi have become higher and higher. Urban taxi has become the choice with its characteristics of convenience, rapidity, comfort, and privacy. However, for the ever-increasing demand for riding, the present way of travelling can no longer meet people’s requirements. Therefore, this paper proposes a taxi sharing route planning model based on the improved genetic algorithm and a sharing expense model for taxi operation [14]. This model can not only facilitate passenger travel but also increase the number of taxis. The utilization of resources can reduce traffic congestion and at the same time reduce the personal travel expenses and improve the operational efficiency of drivers. Therefore, the study of the taxi sharing mode is of great significance to the development of urban transportation.

Domestic and foreign scholars have carried out a certain degree of research on taxi driving modes. Li et al. [5] proposed a multipath recommendation system based on cloud computing, which uses taxi drivers’ paths to select the intelligent-recommended optimal path or multiple candidate paths to meet the requirements. Zheng and Li [6] established a more practical many-to-many taxi pooling model on the basis of existing research on taxi pooling problems, taking into account factors such as passengers’ fuzzy time window and willingness to the pool, and used the improved differential evolution algorithm to solve the problem, Lang et al. [7] established a multiobjective optimization model for customized bus routes and solved the model with the improved NSGA-II algorithm.

To sum up, the existing literature did not consider the reasonable allocation of taxis when establishing taxi route optimization models. When planning for multiple taxis, it neither study the characteristics of different passengers’ driving directions and different starting positions nor consider the passenger loading rate and the shortest distance of each taxi. At the same time, there is no deep consideration of the balance of payments between the driver and the passenger. This article establishes a passenger pool to deal with passengers in different directions and different locations, and then uses the passenger pool station operation mode to rationally allocate the number of taxis according to the number of passengers at different stations in the passenger pool and establishes the model of planning of taxi sharing route and sharing expenses with the shortest driving distance, the highest taxi loading rate, and the maximum passenger cost. Finally, the model is solved using an improved genetic algorithm and a multiplicative billing algorithm.

2. Model Design

2.1. Model Assumptions

(1)Assuming that the initial state of the taxi is of no load(2)Assuming that passengers at all stations agree to sharing(3)Assuming that the distance from the taxi to the first station is negligible

2.2. Model Establishment
2.2.1. Passenger Pooling

Aiming at the problem of passenger travel in different directions, different starting points, and destinations, this paper adopts the method of passenger pooling for classification. First, according to the local terrain of Lanzhou, the taxi driving directions are roughly divided into two directions, eastward and westward; second, the pools are divided according to the destination of passengers at each station in the same direction. In this way, the driving directions and destinations of passengers at each station are pooled, and the symbol is defined as , where indicates passenger pool and is the driving direction. ; indicates different driving destinations, .

2.2.2. Vehicle Distribution

First, the passenger station information of different passenger pools is obtained by pooling the passengers, and then taxi allocation is performed for each passenger pool. In reality, the higher the passenger’s personalization requirements and constraints, the smaller the actual carrying capacity of the taxi. In this paper, taxis are allocated based on the total number of passenger stations in different passenger pools. The calculation method of allocated vehicles is shown as follows:where indicates the number of taxis required, is the station information in a passenger pool, indicates the number of passengers at the i-th station of a passenger pool, indicates take integer which is shown in formula (2), and the nonshared mode is the same as formula (2), indicates the maximum passenger capacity of the taxi, and indicates the constraint coefficient, . The more the constraints, the smaller the value of , which is taken as in this paper.

2.2.3. Objectives to be Achieved in the Taxi Sharing Mode

The first goal: the highest rate of ridingwhere indicates the maximum taxi carrying rate, , indicates the path variable, in which pass is 1 and not passed is 0, and indicates the number of passengers that taxi k is passing through station to station .

Formula (3) indicates the sum of the number of passengers who successfully boarded during the taxi driving process. This formula can maximize the carrying capacity and enable the taxi driver to pick up and drop more passengers.

The second goal: the shortest total distancewhere indicates the shortest driving distance for multiple taxis and indicates the distance traveled by taxi k from station u to station . The specific solving process of the distance is shown in the following formula:where indicates the longitude coordinates of station u and indicates the latitude coordinates of station u, and it is combined with Baidu map for online measurement and recording during calculation.

Formula (5) represents the sum of the distances of the taxis k passing through the station during the successful ride, and the formula can effectively calculate the total shortest driving distance of multiple taxis.

The third goal: the highest total revenuewhere indicates the sum of the total revenue of multiple taxis and indicates the revenue generated by taxi k from station to station . For the specific calculation formula, refer to the charging algorithm in Section 4.

Formula (6) shows the sum of the returns of multiple taxis in the sharing mode. This formula can not only calculate the travel expenses of passengers at each station but also find the driving income after each car is shared.

2.3. Constraints

(1)Taxi carrying capacity constraints: in the process of taking a passenger, the total number of passengers on the bus during driving is not greater than the maximum passenger capacity of the taxi [8, 9], as shown in the following formula:(2)Taxi driving distance constraint: after the taxi runs through the ride mode, the total distance traveled by all taxis is not greater than the total driving distance under the nonshared mode of taxis [10], as shown in the following formula:(3)Driver sharing income constraint: the taxi driver’s income in the sharing mode is greater than that in the nonsharing mode so that the smooth implementation of the passenger-passing mode can be promoted, as shown in the following formula:(4)Passenger sharing ride cost constraint: in the sharing ride mode, the fare generated by passengers at each station in the different passenger pools should be less than the nonshared ride, so as to stimulate passengers to travel in a ride, as shown in the following formula:

3. Improved Genetic Algorithm Design

In view of the fact that the optimization problem of the multiobjective optimization model belongs to the NP-hard problem, it cannot be solved by the traditional single-objective genetic algorithm. Therefore, the multiobjective genetic algorithm with high efficiency is an inevitable choice [1113]. The taxi route optimization model objective function above mentioned belongs to the multiobjective optimization model. The factors included in the model are the best carrying rate, the optimal driving distance, and the minimum use of the taxi. On the basis of the genetic algorithm, this paper realizes the planning of multitaxi travel path by designing the station coding of chromosomes, crosses and mutates the station repeats, as well deletions in the genetic process. The specific algorithm design process is as follows.

3.1. Station Coding and Decoding Design

For the purpose of simplicity and convenient computer processing, this article uses a station coding format for chromosomes. The solution vector obtained by the taxi model in the previous section can be compiled into multiple chromosome of length M (, , , …, , ). In the entire chromosome, the natural number represents the M-th station, and the station coding sequence is divided into a plurality of subsequence segments according to the number of taxis used. Then, it forms a subpath for each taxi travelling through different stations. Such a chromosomal code can be interpreted as follows: the first taxi starts from the starting point, passes through , , and , and reaches the end point, forming subpath 1. The second taxi starts from the starting point, passes through and , and reaches the end point, forming subpath 2. The k taxis depart in turn, complete all the driving stations, and form k subpaths.

3.2. Genetic Population Initialization

Aiming at the optimization problem of the taxi sharing route in this paper, it is considered that a maximum of 4 people will be multiplied, that is, 10 network nodes will be fully arranged, so the initial population of the algorithm is set to 20. Although the genetic algorithm search optimal solution does not depend on the initial population setting, if the initial population is distributed in the most ideal state, that is, evenly distributed in the feasible domain, it will help the genetic algorithm not fall into the local optimization problem [14].

3.3. Calculation of Fitness

In the calculation of fitness, the use of “punishment and sharing” and other strategies to operate and to penalize low-competence individuals so that the better individuals in the population are not destroyed enhances the global optimization ability of the algorithm. The shared function is a function that measures the degree of similarity between two individuals in a group. The closeness between individuals is mainly in the similarity of the genotype or the phenotype. The larger the value of the shared function, the higher the similarity between individuals, and the shared function is , as shown in the following formula:where indicates the similarity between individual i and individual j. According to the situation that there is at least one person at each station, taxi allocation can be performed according to the number of stations. At least two passengers at the station are assigned to the same vehicle. The stations in both locations are the same, with a probability of 1/5. The similarity calculation is shown in the following formula:where indicates the number of stations repeated in individual i and individual j. When calculating the fitness, first calculate the fitness value of each individual in the group. Calculate the fitness value of each taxi based on the taxi’s load and driving distance. When the taxi’s load capacity and driving distance exceed the limit conditions, the additional use of the taxi will be penalized.

3.4. Championship Operator Design

The probability that an individual is selected in a genetic algorithm is proportional to its fitness. The fitness is adjusted by the shared function to increase the probability that individuals with lower fitness are eliminated. Individuals with higher fitness are retained, and the individual of the population is enhanced. Accuracy avoids the disturbing effects of poor individuals on genetic processes.

Fitness is the basis for selecting operators. Selection operators are screened according to the fitness of each individual. The purpose is to inherit the genetic information of the excellent gene fragments and increase the global convergence and computational efficiency of the genetic algorithm. Therefore, for the taxi synthesis problem in this paper, using the championship selection strategy [15], the specific steps of the championship selection strategy are as follows:Step 1: determine the number N of individuals selected each timeStep 2: N individuals are randomly selected from the population (each individual is selected with the same probability), and according to the fitness value of each individual, the individual with the best fitness value is selected to enter the next generation populationStep 3: repeat step (2) multiple times (the number of repetitions is the size of the population) until the new population size reaches the original population size

3.5. Crossover Operator Design

Due to the constraints of taxi-ride sharing, if simple crossover operators are still used, a large number of infeasible solutions may be generated in the passenger pool. The situation that produces an infeasible solution is shown in Figure 1:

As in the passenger pool, the same taxi can only visit the stop location once [16], but in the children generated in Figure 1 above, it can be seen that child 1 visited station 8 and station 3 twice and did not access station 4 and station 6; child 2 visited station 4 and station 6 twice and did not access station 3 and station 8. Therefore, they are not feasible solutions. Aiming at the phenomenon of infeasible solutions, the site crossover operator designed below can effectively avoid the generation of infeasible solutions. The specific steps are as follows:Step 1: firstly, it is necessary to judge the station information on the chromosome to ensure that the taxi information on the outer two ends of the randomly generated intersection is different so that the parent chromosomes can be crossed by the complete subpath. The intersection part may be station information of multiple subpaths.Step 2: after the first step of operation, there will still be multiple visits to the same station in the child, and the children need to be sorted. Select the station information with duplicate conditions in the children and then judge the taxi according to the information of the station. If the duplicate station in a subpath does not meet the constraints in this article, the duplicate station is deleted. If there is station information that is not accessed by the same taxi in the child, the location of the station where the duplicate station information appears in the chromosome intersection is supplemented with the information of the station.Step 3: after the second step, the number of stations passing through each taxi is basically determined, but since there is a constraint on the distance traveled by the taxi, it is necessary to sort the station coding order on the intersection to ensure the subpath. The distance traveled is the shortest. This operation can be performed after the parental variation.

3.6. Mutation Operator Design

If the traditional mutation operator is used for calculation, it is easy to generate problems such as station duplication and missing [17]. Therefore, this paper uses the station-supervised mutation operator. There are two types of mutation: (1) randomly generate single-point mutations; (2) randomly exchange the positions of two stations. In the above two cases, the station supervision method is used to repair the station of the mutation. The location of the mutation is corrected by repeating the supervision list and repeating the station.

Variations can help to adjust the local details of the optimal solution. After completing the mutation operation, it need to use Step 3 in Section 3.5 to organize the children to ensure the feasibility of the children.

3.7. End Condition

If the preset evolution algebra or stop condition is reached, the algorithm ends, and the final demodulation generated by the genetic algorithm is decoded by the decoding function to obtain the travel route and the station access sequence of each taxi. Otherwise, return to Section 3.3.

The improved genetic algorithm flowchart is shown in Figure 2.

4. Charging Algorithm

Referring to the local taxi fare in Lanzhou, this paper considers the many-to-many mode. When designing the taxi-share cost model, the cost sharing of the joint road segment is used in the form of percentage [1821]. The proportion of the cost sharing is determined according to the number of times the multiplication occurs during driving.

The cost calculation of the multiplication process is performed by a piecewise accumulation system, as shown in Figure 3. Passenger A’s distance was divided into two sections AoBo and BoAd due to passenger B joining. Among them, A is the starting point of the first batch of passengers, B is the starting point of the second batch of passengers, subscript o is the starting point, d is the getting off point, L is the nonshared distance, and ∆L is the sharing distance.

The taxi pricing model in the nonshared model is shown in the following formula:

The taxi pricing model in the sharing model is shown in the following formula:where, indicates the travel expenses for passengers at the i-th station (yuan), similar to and ; indicates the taxi starting price (yuan); indicates the driving distance of the i-th passenger (km); indicates the taxi starting mileage (km); indicates the starting rate (yuan/km); indicates the out-of-start rate (yuan/km); indicates the cost sharing ratio of the Co-ride section; and indicates the number of rides that occur during taxi k driving. Among them,  = 3 km,  = 10 yuan,  = 3.3 yuan/km, and  = 1.4 yuan/km.

The steps of the charging algorithm in the sharing model are as follows:Step 1: according to the established charging model, segment the road segments of each riding point.Step 2: analyze the ride situation of each passenger road section. Different charging methods are adopted for the taxi conditions of different passenger road sections. For example, in the nonshared ride section, the driver charges according to the distance traveled. In the sharing ride section, consider the occurrence. The number of rides is charged for the percentage of passengers charged.Step 3: through the calculation of different road sections, finally, sum up the total revenue of each taxi.

5. Case Study

This paper uses the Lanzhou taxi data to analyze the driving route. The starting position data of the taxi driving are shown in Table 1. Firstly, the interest points of the taxi driving are extracted by cluster analysis. The mapping of the clustered network nodes on the map is shown in Figure 4. Then, we sign the riding points on the map, and the effect is shown in Figure 5.

Next, calculate the distance of each station, and assume the number of people on the station. Some of the distances are shown in Table 2. The passenger information of the station at a certain time is shown in Table 3.

Through the design of the improved genetic algorithm for the station information after pooling, the driving path of each taxi is finally obtained as shown in Table 4 and Figure 6.

Finally, by comparing the driving route and income situation of the taxi based on the sharing mode with the nonshared mode, the results are shown in Figures 710.

It can be seen from the Figure 7 that the number of taxis used after sharing is reduced by 57% compared to the number of taxis used before sharing, reducing the investment in taxi numbers; as can be seen from Figure 8, the total travel distance of the taxi after sharing is reduced by 44% compared to the total travel distance before sharing, which shortens the taxi travel distance; as can be seen from Figure 9, compared to the nonshared mode, when sharing ride situation occurs, the load factor of each taxi in the sharing mode is significantly increased; and as can be seen from Figure 10, compared to the nonshared ride mode, when sharing ride situation occurs, the total revenue of each taxi in the sharing mode increases and decreases with the distance traveled. So, for the same number of passengers, the driving efficiency of the sharing mode based on the improved genetic algorithm is significantly improved compared to the driving efficiency of the nonsharing mode. Therefore, without considering the traffic congestion and driving time, adopting the improved genetic algorithm and the charging algorithm can not only improve the efficiency of taxi operation but also save the taxi distance and reduce the passenger’s travel expenses and increase the driver’s travel efficiency.

6. Conclusions

(1)This paper comprehensively considers the constraints of taxi capacity, driving distance, passenger travel expenses, and driver’s driving efficiency and establishes an optimization model for taxi synthesis route planning and coride cost, which contain the highest passenger loading rate, the shortest taxi distance, and the maximum driver’s total revenue.(2)This paper designs a multiobjective improved genetic algorithm based on the taxi optimization route model. Firstly, the improved genetic algorithm is used to obtain the feasible solution of the model, and the optimal taxi-ride line is obtained. Then, it analyzes the driving distance of the taxi and the use of the taxi in the sharing mode and compares the result with the nonshared mode. Finally, it shows the superiority of the route planning in the sharing mode.(3)This paper designs a charging algorithm based on the optimization taxi fare cost model. By using the percentage mode to calculate the charging mode of the sharing ride section cost, the charging of sharing rides and nonshared rides is separately charged. The final result shows that this billing algorithm is reasonable for both passengers and drivers.

Data Availability

(1) The data used in this study are from Lanzhou Lanma Company. The data are the GPS information of the taxi. (2) The GPS data used to support the findings of this study are available from the corresponding author Xijun Zhang ([email protected]). (3) Because the data used in this article come from the company's internal database, which involves personal privacy, it is not open to the public.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors would like to thank the National Natural Science Foundation of China (61461027 and 61465007) for the financial support.