# The Research on Planning of Taxi Sharing Route and Sharing Expenses

Authors: Xijun Zhang; Qirui Zhang; Zhanting Yuan; Chenhui Wang; Lijuan Zhang
Journal: Mathematical Problems in Engineering
 (2020)

---

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


---

## Body

## 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 [1–4]. 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 asPooldestdire, where Pool indicates passenger pool and dire is the driving direction. dire=0east1west; dest indicates different driving destinations, dest∈S.


#### 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:(1)Taxireq=∑Pooldestdire∑SniδV,sharing mode,∑Pooldestdire∑SniδV,nonshared mode,(2)∑SniδV=∑SniδV,∑Sni%δV=0,∑SniδV+1,∑Sni%δV≠0,where Taxireq indicates the number of taxis required, SS∈N∗ is the station information in a passenger pool, ni 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. The more the constraints, the smaller the value of δ, which is taken as δ=1 in this paper.


#### 2.2.3. Objectives to be Achieved in the Taxi Sharing Mode

The first goal: the highest rate of riding(3)Crate=Max∑Pooldestdire∑u∈S∑v∈Sxuvkpuvk4,where Crate Crate≤1 indicates the maximum taxi carrying rate, k∈Taxireq, u,v∈S xuvk indicates the path variable, in which pass is 1 and not passed is 0, and puvk 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. 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 distance(4)Cdist=Min∑Pooldestdire∑k∈Taxireq∑u,v∈SDuvk,where Cdist indicates the shortest driving distance for multiple taxis and Duvk indicates the distance traveled by taxi k from station u to station v. The specific solving process of the distance is shown in the following formula:(5)Duvk=Lou−Lov2+Lau−Lav2,where Lou indicates the longitude coordinates of station u and Lau 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 revenue(6)Cprice=Max∑Pooldestdire∑k∈Taxireq∑u,v∈SPuvk,where Cprice indicates the sum of the total revenue of multiple taxis and Puvk 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. 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:
(7)
∑
Pool
dest
dire
∑
u
∈
S
∑
v
∈
S
p
u
v
k
≤
V
k
.
(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:
(8)
∑
Pool
dest
dire
∑
k
∈
Taxi
req
∑
u
,
v
∈
S
D
u
v
k
≤
∑
Pool
dest
dire
∑
k
′
∈
Taxi
req
∑
u
,
v
∈
S
D
u
v
k
′
.
(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:
(9)
∑
Pool
dest
dire
∑
k
∈
Taxi
req
∑
u
,
v
∈
S
P
u
v
k
>
∑
Pool
dest
dire
∑
k
′
∈
Taxi
req
∑
u
,
v
∈
S
P
u
v
k
′
.
(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:
(10)
P
u
k
<
P
u
k
′
.


## 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 asPooldestdire, where Pool indicates passenger pool and dire is the driving direction. dire=0east1west; dest indicates different driving destinations, dest∈S.


### 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:(1)Taxireq=∑Pooldestdire∑SniδV,sharing mode,∑Pooldestdire∑SniδV,nonshared mode,(2)∑SniδV=∑SniδV,∑Sni%δV=0,∑SniδV+1,∑Sni%δV≠0,where Taxireq indicates the number of taxis required, SS∈N∗ is the station information in a passenger pool, ni 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. The more the constraints, the smaller the value of δ, which is taken as δ=1 in this paper.


### 2.2.3. Objectives to be Achieved in the Taxi Sharing Mode

The first goal: the highest rate of riding(3)Crate=Max∑Pooldestdire∑u∈S∑v∈Sxuvkpuvk4,where Crate Crate≤1 indicates the maximum taxi carrying rate, k∈Taxireq, u,v∈S xuvk indicates the path variable, in which pass is 1 and not passed is 0, and puvk 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. 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 distance(4)Cdist=Min∑Pooldestdire∑k∈Taxireq∑u,v∈SDuvk,where Cdist indicates the shortest driving distance for multiple taxis and Duvk indicates the distance traveled by taxi k from station u to station v. The specific solving process of the distance is shown in the following formula:(5)Duvk=Lou−Lov2+Lau−Lav2,where Lou indicates the longitude coordinates of station u and Lau 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 revenue(6)Cprice=Max∑Pooldestdire∑k∈Taxireq∑u,v∈SPuvk,where Cprice indicates the sum of the total revenue of multiple taxis and Puvk 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. 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.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 asPooldestdire, where Pool indicates passenger pool and dire is the driving direction. dire=0east1west; dest indicates different driving destinations, dest∈S.


## 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:(1)Taxireq=∑Pooldestdire∑SniδV,sharing mode,∑Pooldestdire∑SniδV,nonshared mode,(2)∑SniδV=∑SniδV,∑Sni%δV=0,∑SniδV+1,∑Sni%δV≠0,where Taxireq indicates the number of taxis required, SS∈N∗ is the station information in a passenger pool, ni 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. The more the constraints, the smaller the value of δ, which is taken as δ=1 in this paper.


## 2.2.3. Objectives to be Achieved in the Taxi Sharing Mode

The first goal: the highest rate of riding(3)Crate=Max∑Pooldestdire∑u∈S∑v∈Sxuvkpuvk4,where Crate Crate≤1 indicates the maximum taxi carrying rate, k∈Taxireq, u,v∈S xuvk indicates the path variable, in which pass is 1 and not passed is 0, and puvk 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. 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 distance(4)Cdist=Min∑Pooldestdire∑k∈Taxireq∑u,v∈SDuvk,where Cdist indicates the shortest driving distance for multiple taxis and Duvk indicates the distance traveled by taxi k from station u to station v. The specific solving process of the distance is shown in the following formula:(5)Duvk=Lou−Lov2+Lau−Lav2,where Lou indicates the longitude coordinates of station u and Lau 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 revenue(6)Cprice=Max∑Pooldestdire∑k∈Taxireq∑u,v∈SPuvk,where Cprice indicates the sum of the total revenue of multiple taxis and Puvk 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. 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:
(7)
∑
Pool
dest
dire
∑
u
∈
S
∑
v
∈
S
p
u
v
k
≤
V
k
.
(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:
(8)
∑
Pool
dest
dire
∑
k
∈
Taxi
req
∑
u
,
v
∈
S
D
u
v
k
≤
∑
Pool
dest
dire
∑
k
′
∈
Taxi
req
∑
u
,
v
∈
S
D
u
v
k
′
.
(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:
(9)
∑
Pool
dest
dire
∑
k
∈
Taxi
req
∑
u
,
v
∈
S
P
u
v
k
>
∑
Pool
dest
dire
∑
k
′
∈
Taxi
req
∑
u
,
v
∈
S
P
u
v
k
′
.
(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:
(10)
P
u
k
<
P
u
k
′
.


## 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 [11–13]. 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 lengthM (i1, i2, i3, …, im−1, im). In the entire chromosome, the natural number im 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 i1, i2, and i3, and reaches the end point, forming subpath 1. The second taxi starts from the starting point, passes through im−1 and im, 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 isShsimi,j, as shown in the following formula:(11)Shsimi,j=simi,j,simi,j≥15,0,simi,j<15,where simi,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. The stations in both locations are the same, with a probability of 1/5. The similarity calculation is shown in the following formula:(12)simi,j=countijM,where countij 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 numberN 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 Figure1:Figure 1
Taxi site cross figure.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 Section3.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 Section3.3.The improved genetic algorithm flowchart is shown in Figure2.Figure 2
Flowchart of the improved genetic algorithm.


## 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 lengthM (i1, i2, i3, …, im−1, im). In the entire chromosome, the natural number im 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 i1, i2, and i3, and reaches the end point, forming subpath 1. The second taxi starts from the starting point, passes through im−1 and im, 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 isShsimi,j, as shown in the following formula:(11)Shsimi,j=simi,j,simi,j≥15,0,simi,j<15,where simi,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. The stations in both locations are the same, with a probability of 1/5. The similarity calculation is shown in the following formula:(12)simi,j=countijM,where countij 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 numberN 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 Figure1:Figure 1
Taxi site cross figure.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 Section3.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 Section3.3.The improved genetic algorithm flowchart is shown in Figure2.Figure 2
Flowchart of the improved genetic algorithm.


## 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 [18–21]. 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 Figure3. 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.Figure 3
Sharing route division map.The taxi pricing model in the nonshared model is shown in the following formula:(13)Pi=C0,di≤d0,C0+λ1×di−d0,di>d0.The taxi pricing model in the sharing model is shown in the following formula:(14)PA=L×λ0+ΔL×λ0×r%,L+ΔL≤d0,C0+L−d0×λ1×r%+ΔL×λ1×r%,L+ΔL>d0,L>d0,L×λ0+d0−L×λ0×r%+L+ΔL−d0×λ1×r%,L+ΔL>d0,L≤d0,PB=ΔL×λ0×r%,ΔL≤d0,C0×r%+ΔL−d0×λ1×r%,ΔL>d0,r%=1Tk.where, Pi indicates the travel expenses for passengers at the i-th station (yuan), similar to PA and PB; C0 indicates the taxi starting price (yuan); di indicates the driving distance of the i-th passenger (km); d0 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 Tk indicates the number of rides that occur during taxi k driving. Among them, d0 = 3 km, C0 = 10 yuan, λ0 = 3.3 yuan/km, and λ1  = 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 Table1. 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.Table 1
Taxi starting coordinate information.
Longitude (°)
Latitude (°)
Longitude (°)
Latitude (°)
103.8404
36.05076
103.8307
36.05821
103.8456
36.06564
103.8700
36.04123
103.8720
36.05367
103.7535
36.10461
103.7750
36.08912
103.8506
36.04394
103.8878
36.03891
103.8468
36.04969Figure 4
Map of the riding point on the map.Figure 5
The sorting chart of the riding point.Next, calculate the distance of each station, and assume the number of people on the station. Some of the distances are shown in Table2. The passenger information of the station at a certain time is shown in Table 3.Table 2
Distance between stations (unit: km).
Station
1
2
3
4
5
1
0.0
1.6
3.7
7.5
8.3
2
1.6
0.0
2.8
6.6
7.9
3
3.7
2.8
0.0
3.9
5.2
4
7.5
6.6
3.9
0.0
2.5
5
8.3
7.9
5.2
2.5
0.0Table 3
Distribution table of passenger travel.
Starts
Dest
Dire
n
1, 2, 3
5
0
1, 1, 1
4, 6, 7, 8
9
0
2, 3, 1, 1
6, 4
2
1
2, 2
10, 8, 7, 5, 4
3
1
1, 2, 2, 1, 1Through 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 Table4 and Figure 6.Table 4
Sharing route information.
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
4
6, 4
2
1
2, 2
5
10, 7, 4
3
1
1, 2, 1
6
8, 5
3
1
2, 1Figure 6
Passenger pooling example figure.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 Figures7–10.Figure 7
Taxi comparison.Figure 8
Distance comparison.Figure 9
Occupancy comparison.Figure 10
Revenue comparison.It can be seen from the Figure7 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.



---

*Source: 6348578-2020-02-14.xml*