The Research on Planning of Taxi Sharing Route and Sharing Expenses

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. -rough 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. -e 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. -erefore, the sharing mode can be used in taxi sharing route, and the sharing expenses are reasonable and useful for passengers and drivers.


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. erefore, this paper proposes a taxi sharing route planning model based on the improved genetic algorithm and a sharing expense model for taxi operation [1][2][3][4]. is model can not only facilitate passenger travel but also increase the number of taxis. e utilization of resources can reduce traffic congestion and at the same time reduce the personal travel expenses and improve the operational efficiency of drivers. erefore, 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. is 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.

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

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. e calculation method of allocated vehicles is shown as follows: where Taxi req indicates the number of taxis required, S(S ∈ N * ) is the station information in a passenger pool, n i 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), V (V � 4) indicates the maximum passenger capacity of the taxi, and δ indicates the constraint coefficient, 0 < δ ≤ 1. e more the constraints, the smaller the value of δ, which is taken as δ � 1 in this paper.

Objectives to be Achieved in the Taxi Sharing
Mode. e first goal: the highest rate of riding where C rate (C rate ≤ 1) indicates the maximum taxi carrying rate, k ∈ Taxi req , u, v ∈ S x k uv indicates the path variable, in which pass is 1 and not passed is 0, and p k uv indicates the number of passengers that taxi k is passing through station u to station v.
Formula (3) indicates the sum of the number of passengers who successfully boarded during the taxi driving process. is formula can maximize the carrying capacity and enable the taxi driver to pick up and drop more passengers. e second goal: the shortest total distance where C dist indicates the shortest driving distance for multiple taxis and D k uv indicates the distance traveled by taxi k from station u to station v. e specific solving process of the distance is shown in the following formula: where Lo u indicates the longitude coordinates of station u and La u 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. 2 Mathematical Problems in Engineering e third goal: the highest total revenue where C price indicates the sum of the total revenue of multiple taxis and P k uv indicates the revenue generated by taxi k from station u to station v. 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. is formula can not only calculate the travel expenses of passengers at each station but also find the driving income after each car is shared.

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:

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. erefore, the multiobjective genetic algorithm with high efficiency is an inevitable choice [11][12][13]. e taxi route optimization model objective function above mentioned belongs to the multiobjective optimization model. e 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. e specific algorithm design process is as follows. e k taxis depart in turn, complete all the driving stations, and form k subpaths.

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].

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. e shared function is a function that measures the degree of similarity between two individuals in a group. e closeness between individuals is mainly in the similarity of the genotype or the phenotype. e larger the value of the shared function, the higher the similarity between individuals, and the shared function is Sh(sim(i, j)), as shown in the following formula: Mathematical Problems in Engineering where sim(i, j) 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. e stations in both locations are the same, with a probability of 1/5. e similarity calculation is shown in the following formula: where count ij 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.

Championship Operator Design.
e probability that an individual is selected in a genetic algorithm is proportional to its fitness. e 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. e purpose is to inherit the genetic information of the excellent gene fragments and increase the global convergence and computational efficiency of the genetic algorithm. erefore, 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 time Step 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 population Step 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. e 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. erefore, 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. e 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. e 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. e distance traveled is the shortest.
is operation can be performed after the parental variation.

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]. erefore, this paper uses the station-supervised mutation operator.
ere 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. e 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.

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. e improved genetic algorithm flowchart is shown in Figure 2.

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 [18][19][20][21]. e proportion of the cost sharing is determined according to the number of times the multiplication occurs during driving. e 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. e taxi pricing model in the nonshared model is shown in the following formula: e taxi pricing model in the sharing model is shown in the following formula: where, P i indicates the travel expenses for passengers at the ith station (yuan), similar to P A and P B ; C 0 indicates the taxi starting price (yuan); d i indicates the driving distance of the i-th passenger (km); d 0 indicates the taxi starting mileage (km); λ 0 indicates the starting rate (yuan/km); λ 1 indicates the out-of-start rate (yuan/km); r% indicates the cost sharing ratio of the Co-ride section; and T k indicates the number of rides that occur during taxi k driving. Among them, d 0 � 3 km, C 0 � 10 yuan, λ 0 � 3.3 yuan/km, and λ 1 � 1.4 yuan/km. e 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. e 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.

Case Study
is paper uses the Lanzhou taxi data to analyze the driving route.
e 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. e mapping of the clustered network nodes on the map is shown in Figure 4. en, 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.
e passenger information of the station at a certain time is shown in Table 3.
rough 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 7-10.

Mathematical Problems in Engineering
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         Taxi  Stations  Dest  Dire  n  1  1, 2, 3  5  0  1, 1, 1  2  4, 7, 8  9  0  2, 1, 1  3  6  9  0  3   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. erefore, 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.

Conclusions
(1) is 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) is 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. en, 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) is 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. e final result shows that this billing algorithm is reasonable for both passengers and drivers.

Data Availability
(1) e data used in this study are from Lanzhou Lanma Company. e data are the GPS information of the taxi. (2) e GPS data used to support the findings of this study are available from the corresponding author Xijun Zhang (zhangxijun198079@sina.com). (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
e authors declare that they have no conflicts of interest.