Research on Taxi Pricing Model and Optimization for Carpooling Detour Problem

This paper builds a multiobjective optimization model for solving the taxi carpooling with detour problem and designs a genetic algorithm to determine a fair pricing scheme for riders and drivers.The researches show that it is feasible to share a taxi with detour. It is the key to determine appropriate carpooling payment ratio and detour carpooling payment ratio. The ratio of detour distance to travel distance has an important influence on detour carpooling. It should be limited to less than certain values. Payment ratios and the maximum value of the ratio of detour distance to travel distance are determined by the method proposed in this paper.The method can ensure benefits of passengers and drivers, which makes detour carpooling a reality. These conclusions and the method have a certain guiding significance for formulating taxi policy.


Introduction
Taxi carpooling mode has become a common travelling mode.The mode permits several passengers to share the same taxi.Taxi carpooling can effectively solve the problem of having difficulty getting a taxi at peak time.It does not only ease the traffic pressure and improve the transportation efficiency [1,2], but also reduce energy consumption [3][4][5][6].It is an effective solution to solve the urban traffic problem.
Many scholars studied the problem of carpooling [7][8][9][10][11][12].This research work focuses on the following two aspects: on the one hand, the characteristics of carpooling behavior, the influence factors of carpooling, and the effects of carpooling are studied [13][14][15][16][17][18].Shaheen analyzed carpooling situation in the San Francisco Bay Area and studied passenger characteristics, behaviors, and motivation [19].Delhomme researched the main determinants of the practice of carpooling by investigating the factual data and gave some strategies for increasing the number of carpoolers and the frequency of carpooling [20].Malodia studied the characteristics of Indian residents preference for passenger sharing based on the data from the internet survey and found that cognitive attitudes have important effects on passenger sharing behaviour [21].Tahmasseby found that distance, time, cost, gender, occupation, age, weather conditions, and other factors can affect the choice of sharing [22].Javid studied the sharing characteristics of 50 states in the United States and the District of Columbia and analyzed the impact of the carpooling policy on the environment [23].Sweta proved that carpooling mode can help to reduce congestion and fuel consumption [24].Zhang built a model of multiple passengers carpooling, analyzed carpooling advantages, and proved that carpooling can bring benefits to passengers and drivers by simulation [25].
On the other hand, the problem of carpooling matching and route optimization is studied.Jamal put forward route planning and ride matching algorithms and designed a system that can supply the users with alternative routes for their trips [26].Mallus proposed a dynamic carpooling route matching algorithm, and the method is verified by the experiment [27].Huang proposed carpool route and matching algorithm and solved carpool service problems in cloud computing based on genetic algorithm [28].Chang designed a vehicular information system that combines the improved carpooling algorithm and the VANET-based route planning and computed the optimal carpooling sequence and precise fuel costs shared [29].Ma built a taxi carpooling path optimization model, solved it based on the improved genetic algorithm, and obtained optimized path results [30].He proposed an intelligent routing scheme based on GPS data.The carpooling system provides many-to-many services with multiple pickup and dropping points [31].Xiao proposed a taxi carpooling matching algorithm based on fuzzy clustering and fuzzy recognition [32].
In summary, the above researches proved the feasibility and effectiveness of carpooling mode and solved the problem of route planning in carpooling process.However, detour is a common phenomenon of taxi carpooling in reality.Destinations of passengers are different, but they would go to the same direction.Due to the factors, such as having difficulty getting another taxi and lower cost in carpooling, some passengers agree to detour for taking the same taxi.His travel time has to be delayed, but he can get more discount than other passengers in the same carpooling travel.Passengers' payments have important influences on driver's income.The reduction of the detour passenger's cost will depress the driver's income.How to control the payments of passengers to protect interest of the driver?It is important to study the problem, which can ensure implementation of carpooling policy.However, there are limited researches on the problem.For the problem of taxi detour carpooling, this paper builds a multiobjective optimization model, designs an algorithm to solve the model based on genetic algorithm, and gets reasonable pricing stagey of detour carpooling which ensures interests of passengers and drivers simultaneously.The method makes carpooling detour a reality.The works have a certain guide significance to formulate taxi carpooling policy.

Problem Description and Notation
. .Problem Description.Suppose two passengers intend to share the same taxi.Of course, it can also be two groups.There may be more than a passenger in each group, but the sum of passengers is not more than taxi capacity.The destinations of the passengers in the same group are the same ones.Therefore, the two groups carpooling can be considered as two passengers carpooling.The problem of two passengers carpooling is studied in this paper.Suppose source of passenger  is  1 and the destination is  2 .The best route of passenger  is  1 →  2 .Source of passenger  is  1 , and the destination is  2 .The best route of passenger  is  1 →  2 .The destinations of the two passengers are different; that is,  2 ̸ =  2 , but  2 and  2 are in the same direction.Passenger  agrees to make a detour in order to share the taxi successfully.The travel routes of the two passengers are shown in Figure 1.
The problem contains two possible situations of detour as follows.
(1) The distance from  1 to  1 is zero, which means that the two passengers start from the same position.In the situation, passenger  is sent to his destination; then passenger  is sent to the destination.The travel route is  1 ( 1 ) →  2 →  2 .The travel route of passenger  is not changed.The travel route of passenger  is changed from  1 ( 1 ) →  2 to  1 ( 1 ) →  2 →  2 .Passenger  makes a detour.
(2) The distance from  1 to  1 is not zero, which means that the two passengers start from the different positions.In the situation, passenger  gets on the taxi at position  1 ; then passenger  gets on the taxi at position  1 .Passenger  arrives at the destination first and gets off at position  2 ; then passenger  gets off at position  2 .Travel route is  1 →  1 →  2 →  2 .The travel route of passenger  is not changed.The travel route of passenger  is changed from  1 →  2 to  1 →  2 →  2 .Passenger  makes a detour.
In the above carpooling situations, passenger  keeps the original route unchanged, but he shares the taxi with others in his travel, so he should enjoy discount price for carpooling.His cost should be lower than that he takes a taxi alone.Passenger  travels a new route longer than his original.His time has to be delayed.So more discount should be given to the detour passenger in order to make up for the loss of time caused by a detour.The costs of the two passengers are both reduced, which will influence the income of drivers.Therefore, it is very important to work out a reasonable charging scheme to ensure the interests of the driver and passengers simultaneously.The multiobjective optimization model of taxi carpooling detour is built to study the problem as follows.
. .Notation in the Model.All notations in the model are described as follows: : the travel distance of passenger , that is, the distance from  1 to  2 .  : the travel distance of passenger , that is, the distance from  1 to  2   : the travel distance of passenger  before passenger  getting on the taxi, that is, the distance from  1 to  1 .  : the travel distance of passenger  after passenger  getting off the taxi, that is, the distance from  2 to  2 .(): the cost of the passenger whose travel distance is .: the base kilometres in taxi charging regulations.
: the initiate price in taxi charging regulations, that is, the fee within  kilometres.  : the price per kilometre more than  kilometres according to taxi charging regulations.
: the cost of passenger  under the condition of non-carpooling.  : the cost of passenger  under the condition of non-carpooling.  : the cost of passenger  under the condition of carpooling.  : the cost of passenger  under the condition of carpooling.  : the cost of passenger  when he just shares taxi with others and does not make a detour.: the payment ratio of the non-detour passenger, which is called carpooling payment ratio.: the payment ratio of detour passenger, which is called detour payment ratio.  : the detour distance which describes the difference between travel distance after detour carpooling and original travel distance.: the driver's income under the condition of noncarpooling.(): the gas fee vehicle consumed when travel distance is .: the gas consumption per 100 km.
: the gas price per cubic meter.
: the actual travel distance of the vehicle in a carrying trip.: the driver's income per unit travel length.
: the driver's income under the condition of carpooling.: the driver's income per unit travel long under the condition of carpooling.   /  : the maximum threshold of the ratio of detour distance to travel distance.

Modelling
. .Cost of Passengers.According to the usual taxi charging regulations in China, cost of passenger is calculated as follows: If the two passengers take a taxi to their destinations, respectively, that is, they do not share a taxi, cost of passenger  and cost of passenger , respectively, are If the two passengers take the same taxi, passengers just need to pay part charge according to the current traffic policy.The cost of the two passengers is calculated specifically as follows.
Passenger  does not make a detour.His travel route is unchanged and the travel time is not delayed.If he shares a taxi with others in part road section, he can only enjoy the discount for the road section of carpooling.There is not any discount for the road section of noncarpooling.The distance of the road section passenger  shares taxi with passenger  is   −   .The distance of the road section passenger  rides taxi alone is   .The cost of passenger  is Passenger  does not only share a taxi with others, but also make a detour.The travel route of passenger  is changed, and his travel time is also delayed.So passenger  should enjoy more discount than the other passenger to make up his loss.The detour passenger needs to pay a part of the cost he pays when he does not share a taxi with others.The cost of passenger  is where detour payment ratio  is not fixed. changes inversely with relative detour distance which is the ratio of detour distance to travel distance. is defined as a function which depends on   /  as follows.
is detour distance, and   /  is the ratio of detour distance to travel distance.Function  is a decreasing function.
When   /  = 0, function  is the maximum value.The value decreases with the increases of   /  .If   /  is high so that the value is too low, the interest of the driver will be affected.Moreover, the cost of passenger  by carpooling mode must be lower than that by riding taxi alone; that is, The cost of passenger  by carpooling mode must be lower than that by sharing a taxi but no detour; that is, . .Income of Driver.The income of the driver depends on the payments of passengers and the fee of gas consumed.When travel distance of a vehicle is , the gas fee is Under the condition of noncarpooling, the driver's income of the whole travel is If the time the driver takes in a carrying trip is long, the number of carrying trips in a day will reduce, which influences the total income of the driver all day.So it is unreasonable to describe the driver's income based on the income of the driver each time carrying trip.In order to reveal the income of the driver really, the income per unit travel length is used.
Under the condition of carpooling, the driver's income in a carrying trip is Similarly, under the condition of carpooling, the income per unit travel length is For driver, the driver's unit income of detour carpooling must be more than that of noncarpooling; that is,  >  (17) . .e Ratio of Detour Distance.Passengers expect the costs reducing, while driver expects the income increasing.In addition, the ratio of detour distance to travel distance   /  is the key to realize detour carpooling.On the one hand, too long detour distance causes that passenger to be delayed for a long time, which is not accepted by the passenger.On the other hand, according to formula (6), the bigger ratio of detour distance to travel distance is, the smaller  is.The decrease of detour passenger's payment leads to the income reduction of the driver.Too small  cannot ensure interests of the driver.Therefore, the ratio of detour distance to travel distance must be confined within a range.If the ratio is more than a certain threshold, the detour carpooling will be become impossible.So the following constraint should be satisfied: . .e Multiobjective Optimization Model of Taxi Detour Carpooling.Based on the analysis above, considering the benefits of passengers and driver simultaneously, the multiobjective optimization model of taxi detour carpooling is built as follows.

Algorithm Design
. .Algorithm Procedure.The model proposed in the paper is a problem of multiobjective optimization.The purpose is to find the best price parameters  and .They must be appropriate for all the possible carpooling.Carpooling is described using travel distances of the passengers, the position of getting on or getting off the taxi, and detour distance.The population composed of various types of carpooling is called carpooling states.Carpooling is an individual of carpooling states population.The price parameters would be obtained based on the carpooling states.Good price parameters depend on carpooling states with good diversity.So the algorithm process is divided into the following two parts: (1) searching carpooling states of diversity; (2) seeking the best price parameters for the carpooling states found in problem (1).The solutions are designed based on genetic algorithm.The exact process is shown in Figure 2. Firstly, the work of searching for carpooling states is carried out.The population of carpooling states with good diversity is found.Then, the work of seeking the best price parameters for each individual of the population obtained from above the process is carried out.
The detail algorithm process would be described as follows.
is the value of attribute  of individual .x is the standardized value for   . max  is the maximum value of attribute  in the population. min  is the minimum value of attribute  in the population.The bigger evaluation value shows that the individual is far away from other individuals, which will be kept.
Diversity of the carpooling states population  is measured by ().
() is the average value of the distances between all individuals in population .The bigger () is, the better the diversity of the population is.
. . .Selection of Carpooling States.Good individuals are selected from the previous population.The selected individuals will form a new population, the size of which is the same as the previous population.Tournament selection strategy is used to select individuals in the paper.The method is as follows: (1)  1 individuals are selected randomly from the population, and  1 <  1 .
(2) The evaluation values of the selected individuals are computed.The best individual will be selected according to the evaluation values.
( . .Calculation of Price Parameters.The carpooling states population is obtained based on the above methods.Next, the best price parameters would be found based on the population.Searching price parameters is a process of optimization considering multiple objectives.The searching best price parameters are carried out for each individual found in the carpooling states population.The method is designed based on genetic algorithm as follows. . . .Generating Fronts.The size of the price parameters population is  2 .Individual of price parameters is represented by (, ). and  are generated randomly from 0 to 1, satisfying  < .
All price parameters individuals are divided into several fronts.Specific distribution principles are as follows: (1) Each individual has three goals based on formulation ( 19)- (21), that is,  1 ,  2 , and  3 .If one goal of individual  is better than that of  at least, and all goal of individual  is not worse than that of , individual  dominates , or individual  is dominated by .
(2) If individual  is not dominated by other individuals, the individual  belongs to the first front; if individual  is only dominated by individuals in the first front, the individual  belongs to the second front; if individual  is only dominated by individuals in the second front, the individual  belongs to the third front, and so on.
Then each individual is assigned to one front.The first front is not dominated totally.The individuals of the front + 1 are dominated by that of the front .The individuals of the front  are better than that of the front  + 1.
. . .Crowding Distance.Crowding distance is the distance between individuals of the same front, which describes crowding degree of individuals.The bigger crowding distance shows that the individuals are not crowded, and the diversity of the population is better.Crowding distance of individual  is denoted by   : where  and  are two individuals of the front ; that is, ,  ∈ .  () is the value of goal  of individual . max  is the maximum value of goal  of all individuals in the front . min  is the minimum value of goal  of all individuals in the front .  reflects the sum of distances between individual  and individual else in the front .If   >   , crowding degree of individual  is less than that of individual .It means that   has priority over   while selecting individuals.
. . .Selection Operator.Similarly, tournament selection strategy is used to select individuals in price parameters population. 2 individuals are selected randomly from the population, and  2 <  2 .The selected individuals are sorted in order to find the best individual.The sorting process is carried out based on the following rules.
and  are individuals of the population. 1 and  2 are fronts generated.
Each individual selected is distributed with a rank.The rank indicates the superior order of individuals.The smaller rank shows the better individual.Based on the above rules, if the front  1 is superior to  2 , the ranks of all individuals in front  1 are smaller than that of individuals in  2 .The ranks of individuals in the same front depend on crowding distances of individuals.The bigger the crowding distance is, the smaller the rank is.The individual with the smallest rank is selected based on the above method.The individual selected is the best one in the population.
The above process is carried out  2 times until  2 individuals are selected.It is necessary to check whether the new individuals satisfy  <  constraint.If the constraint is not satisfied, exchange  and .
. . .Mutation Operator.Mutation operator is carried out for individuals with probability    .Mutation position will be selected randomly in  and .If  is selected,  is regenerated randomly in the range from  to 1.If  is selected,  is regenerated randomly in the range from 0 to .

Example Analysis
Take Lanzhou city in China, for example, taxi charging standard stipulates that initiate fee is 10¥/3km, 1.4¥ per kilometer more than 3 kilometers.It costs 8 cubic meters gas consumption per 100 km.Gas price is 3.10¥ per cubic meter.The travel distances of passengers are normal distribution  ∼  (16, 5 2 ).Under these conditions, the problem of detour carpooling is analyzed based on the method proposed in this paper.
The evolution of diversity of the carpooling states population is shown as Figure 3.The diversity of the carpooling states population increases gradually until it arrives at stabilization.The final carpooling states population obtained can represent the possible carpooling space with good diversity.
The final carpooling states population containing 100 individuals are obtained.The partial results are shown in Table 1.
The work of seeking price parameters is carried out for each individual of the carpooling states population.One of the evolutionary process is given.The average profit of passenger  of each population generation is shown as Figure 4.The profit describes the cost difference between noncarpooling and detour carpooling.The value finally  converges to 2 CNY, which means that the average cost of the passenger who does not make a detour saves 2 CNY each time compared with taking a taxi alone.
The average profit of passenger  of each population generation is shown as Figure 5.The value finally converges to 5 CNY, which means that the average cost of the passenger who makes a detour saves 5 CNY each time relative to taking a taxi alone.The detour passenger gets more profitable than the nondetour passenger does.
The average profit per kilometer of the driver of each population generation is shown as Figure 6.The value finally converges to about 0.2 CNY, which means that the average income per kilometer increases 0.2 CNY compared with carrying a single passenger.Based on the results of price parameters of carpooling states, the value  is shown as Figure 7.The average value of  is 0.82. changes around 0.82.That is, the payment ratio of nondetour passenger is 0.82, which is reasonable.It can ensure the realization of carpooling detour.
The value  is shown as Figure 8.The value  ranges from 0.6 to 0.8.Discount coefficient of passenger  is smaller than that of passenger  due to time delay detour caused.The value  should be in the range from 0.6 to 0.8 to ensure the realization of carpooling detour.
The relation between   /  and  is shown in Figure 9.  decreases with the increase of   /  .It can be seen from the scatter plot that there is an obvious linear relationship between   /  and .
In the regression equation, regression coefficient is -0.1874, and intercept is 0.8039.The significance test of the regression equation is performed.The model has a significant linear relationship, and fitting degree is 0.964.If the passenger does not make a detour, that is,   /  = 0, payment ratio of the passenger is  = 0.8, which is consistent with the above analysis results.Therefore, it is easy to determine discount coefficient  based on   /  .In all individuals of the final carpooling states population, the maximum value of   /  is 0.6.So the maximum ratio of detour distance to travel distance    /  is 0.6.It shows that the passengers and the driver can get benefits simultaneously by the mode of carpooling detour when the ratio of detour distance to travel distance is within 0.6.It becomes possible to take the mode of carpooling detour under the condition.
Based on the above analysis, we can set payment ratio  to 0.82, calculate detour payment ratio  according to the regression expression obtained, and limit the maximum ratio of detour distance to travel distance to 0.6.Only in this way can carpooling with detour be successful.

Conclusions
The paper establishes the multiobjective optimization model of taxi carpooling detour, designs a solution algorithm, and proposes a method of formulating price scheme to ensure benefits of passengers and driver, which can enable carpooling detour the smooth implementation.
The following conclusions are obtained: (1) It is feasible to take a taxi by the mode of carpooling detour.Benefits of passengers and driver can be protected simultaneously.Costs of non-detour and detour passengers are reduced, and the incomes of the drivers are increased.
(2) It is the key to determining appropriate payment ratio  and detour payment ratio .The detour passenger can get more discount than the non-detour passenger can.The payment ratio  is a fixed value.The detour payment ratio

Figure 1 :
Figure 1: Travel route of the passengers.
. . .Crossover Operator.Crossover operator between individuals  and  is carried out with probability    . of individual  and that of individual  are exchanged.Suppose   is  section of individual , and   is  section of individual .Crossover operator is   ←→   .If individual  and individual  before crossover operator are  = (  ,   )  = (  ,   ), individual  and individual  after crossover operator are   = (  ,   )   = (  ,   ).

Figure 3 :
Figure 3: The diversity evolution of the carpooling states population.

Figure 4 :
Figure 4: The evolution of passenger 's average profit.

Figure 5 :
Figure 5: The evolution of passenger 's average profit.

Figure 6 :Figure 7 :
Figure 6: The evolution of the driver's average profit per kilometer.
An individual of carpooling states population is described as (  ,   ,   ,   ).For an individual,   ,   ,   , and   are random.Suppose travel distances of passengers are normal distribution, the mean value of which is  and standard deviation is .and   are created based on the normal distribution.In the process of data generation, the nonpositive values are not used.If a nonpositive value is obtained, regenerating the number until a positive value,   is chosen equably in the range [0,   ].   is chosen equably in the range [  −   +   ,   ] to satisfy constraints.The size of carpooling states population is  1 . 1 individuals are generated, which form a carpooling states population. . . .Evaluation of Carpooling States.Evaluation of each individual of carpooling states population depends on the closeness to other individuals.The closeness of individual  is the average value of the Euclidean space distances between individual  and other individual s.It is defined as . .Searching Carpooling States . . .Generating Initial Population.
The above steps are repeated  1 times until  1 individuals are selected.The  1 individuals form a new population. . . .Crossover of Carpooling States.Crossover operator between two individuals is carried out with probability    .  and   of individuals are exchanged.Suppose    is   section of individual  and    is   section of individual .It is necessary to check whether the new individuals satisfy with constraints.The processes of checking and adjustment are as follows: if   −  >   −  is not satisfied,   will be increased gradually with ranges up to   until satisfying the constraint.If there is no appropriate   found,   and   are both increased until satisfying the constraint. . . .Mutation of Carpooling States.Mutation operator is carried out for individuals with probability    .  and   have an important influence on individuals.A little change of   or   will lead to a great change.So   or   is used as mutation section.For an individual, mutation position is selected randomly.If   is selected,   section of the individual is changed into a new random number with constraints.If   is selected,   section of the individual is changed into a new random number with constraints.

Table 1 :
The partial results of carpooling states population.