Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Path optimization of taxi carpooling

  • Changxi Ma ,

    Roles Conceptualization, Data curation, Formal analysis, Funding acquisition, Investigation, Methodology, Project administration, Resources, Software, Supervision, Validation, Visualization, Writing – original draft, Writing – review & editing

    machangxi@mail.lzjtu.cn

    Affiliation School of Traffic and Transportation, Lanzhou Jiaotong University, Lanzhou, China

  • Ruichun He,

    Roles Investigation, Validation, Writing – original draft, Writing – review & editing

    Affiliation School of Traffic and Transportation, Lanzhou Jiaotong University, Lanzhou, China

  • Wei Zhang

    Roles Resources, Visualization, Writing – original draft, Writing – review & editing

    Affiliation School of Traffic and Transportation, Lanzhou Jiaotong University, Lanzhou, China

Abstract

The problem that passengers are hard to take taxis while empty driving rate is high widely exists under the traditional taxi operation mode. The implementation of taxi carpooling mode can alleviate the problem in a certain extent. The objective of this study is to optimize the taxi carpooling path. Firstly, the taxi carpooling path optimization model with single objective and its extended model with multiple objectives are built respectively. Then, the single objective path optimization model of taxi carpooling is solved based on the improved single objective genetic algorithm, and the multiple-objective path optimization model of taxi carpooling is solved based on the improved multiple-objective genetic algorithm. Finally, a case study is carried out based on a road network with 24 nodes. The case study results show the path optimization models and algorithms of taxi carpooling proposed in the paper can quickly get the taxi carpooling path, and can increase the income of taxi driver while reduce the cost for passengers.

1. Introduction

Taxi is an important transport mode in urban transportation system. Encouraging passengers sharing taxies could increase the transportation efficiency, shorten the total distance and cutting off idling time, alleviate road congestion, and reduce emissions [1]. At present, many scholars have carried out researches on taxi carpooling problem. Ardekani et al. proposed the taxi carpooling rate decision method where driver wages, vehicle operating cost, and other practitioner’s reasonable compensation cost are shared by the travel time or travel distance on the basis of vehicle fuel consumption rate [2]. Morisugi et al. got demand function Jakarta Indonesia using micro economics method, considering quasi linear indirect utility function of cost rate and passenger carrying rate. The cost function is composed of fixed cost and variable cost, and then the linear regression method is used to estimate the parameters. The maximum of social welfare is taken as the goal to calculate the best taxi rate and scale [3]. Chang et al. established a stochastic optimal control model with flexible start price to keep reasonable empty driving rate and meet the market demand [4]. Zou et al. established the transportation network model to calculate the shortest carpooling path, and analyzed the how road factors can influence on the shortest path [5]. Zhou developed a model of taxi path selection as well as rate optimization based on the fairness principle, which takes passengers’ minimum travel time and cost as the objective function and guarantees drivers’ reasonable income as constraints, considering the interests of drivers and passengers. The genetic algorithm was used to solve the model [6]. Guo et al. constructed the distance matrix of road traffic network, and they solved the shortest distance and determined the shortest route based on the matrix iteration method in the operations research, and carried out analysis for a certain road network [7]. Wang discussed the static and dynamic carpooling modes, dividing carpooling mode into several types, such as one to one, one to many and many to many modes. He developed the path selection method and rate optimization model [8]. Cheng et al. studied the dynamic taxi carpooling problem of many to many modes with different types of taxis and different types of passengers. The benefits that gained from travelers and drivers were considered, the time window constraint was introduced into the coordination mechanism, and the taxi carpooling optimization model was established [9]. Yan proposed effective route scheduling model, and designed solving method to deal with taxi carpooling problem well [10]. Chen et al. studied carpooling application using a social community, considering travel cost reduction [11]. Galland et al. studied individual mobility behavior in carpooling based on multi-agent simulation method [12]. Manzini et al. designed a decision support system for solving carpooling problem which has applied researches results into the reality [13]. Kammerdiener et al. built a classification model based on multiple constraints, and they solved the problem of ride-sharing partners [14].

Through analysis of the above research results, the current researches on the path optimization of taxi carpooling do not consider the driver's income and passengers' satisfaction at the same time, which causes limitation of the optimization results [1517]. This paper constructs a taxi path optimization model considering the two aspects, which takes minimize taxi traveling distance and time as the objective function, takes taxi detour distance, passenger satisfaction, passenger fees and taxi driver income as constraints, and then the improved genetic algorithm is developed to solve the model.

This paper is arranged as follows: the second section constructs the path optimization model of taxi carpooling, the third section designs solution algorithm, the fourth section is case study, and the last section is the research conclusion and prospect.

2. Taxi carpooling path optimization model

2.1 Hypothesis condition

  1. Each taxi drive is independent to others.
  2. Vehicle capacity of each taxi is 3 passengers.
  3. In order to reduce the waiting time, the taxi first takes all the passengers and then goes to the corresponding destination.
  4. Passengers are not allowed to transfer.
  5. The driving speed of a taxi keeps unchanged under the condition of carpooling and single riding taxi.
  6. The taxi driver chooses the shortest path under the condition of single riding taxi.

2.2 Establishing the objective function

Detour can increase the passengers’ travel time to a certain extent in carpooling, so this paper takes the minimum taxi travel distance as the objective function, and optimizes the taxi carpooling path. The objective function is as follows: (1) where A is the set of nodes in road network, i,jA, i,j is adjacent; dij is the distance from i to j; kn, n is the set of taxis; lp, p is the set of carpooling path, and , .

2.3 Constraint conditions

2.3.1 Detour constraint conditions.

Carpooling may increase some passengers’ detour distance. For the whole taxi system, the overall travel distances can’t exceed to that of the same demand of travel distances with single riding taxi. (2) where KN, N is the set of taxis with single riding taxi; LP, P is the set of paths with single riding taxi, and , .

2.3.2 Passengers satisfaction constraint.

Taxi carpooling may lead to detour, and increase travel time. Passengers have direct perception of riding time, so travel time is used to describe passengers' satisfaction of carpooling. (3) (4) where sm is the satisfaction of passenger m; tm is the travel time of passenger m with carpooling (min); Tm is the travel time of passenger m with single riding taxi (min); α is the passengers’ tolerance for increasing of travel time (%); λ is the lower limit of passengers’ satisfaction.

2.3.3 Passenger carpooling cost constraint.

The starting point and a destination of each passenger may be different. The cost of a journey is shared by the passengers on the taxi. So a reasonable cost sharing method is needed in order to reflect the principle of fairness. If a passenger's travel distance is within the mileage of the taxi starting price, he or she only shares the starting price with the other passengers.

(5)(6)(7)

Such carpooling as the situation in which each passenger’s cost of carpooling is less than that of riding alone paid by the passengers. (8) where is the maximum number of passengers sharing with passenger m in vehicle k; is the number of passengers with passenger m on the road section ij of vehicle k; is the unit mileage cost shared of passenger m on the road section ij (CNY/km); cm is the cost of passenger m with carpooling. Cm is the cost of passenger m riding lonely. d0 is start mileage (km); C0 is starting price(CNY); r0 is price per kilometer(CNY/km), .

2.3.4 Driver income constraint.

In order to protect the interests of taxi drivers, income of the driver with carpooling should be higher than the cost of the passenger whose travel distance is the longest distance among passengers with single riding taxi.

(9)

2.3.5 Model expansion.

In the above modeling process, it is assumed that all taxis are traveling at a constant speed. However, as urban traffic demand increases, traffic congestion often occurs, so the speed of taxis cannot be maintained at a constant speed. In this way, we can further expand the model.

Assuming that the taxi speed is not uniform, for the optimization problem of taxi carpooling path, we need to add an objective function based on the aforementioned optimization model. This paper takes the minimum taxi travel time as the objective function, and optimizes the taxi carpooling path. The objective function is as follows: (10) where cij is the distance from i to j.

3. Algorithm design

The problem of taxi carpooling is a Non-deterministic Polynomial complete problem [9], therefore, the traditional simple algorithm cannot be used to solve the model effectively. Genetic algorithm can avoid the constraints of problem features, such as linearity, continuity, differentiability, and multimodality. Several feasible results of the optimization problem can be acquired by parallel operation on one chromosome, which is an effective algorithm for large-scale combinational optimization problems. Therefore, the genetic algorithm is introduced to solve the problem of taxi carpooling.

3.1 Single objective genetic algorithm

Before the model expands, the optimization model of taxi carpooling is a single objective optimization model, and the single objective genetic algorithm is used to solve it.

3.1.1 Encoding.

In order to ensure the passengers’ comfort with carpooling, the taxi is allowed to carry three passengers. The passengers will be randomly numbered. The passengers with the same starting position and destination will be compiled into the same number, which is called a group. The taxis will carry passengers in code order. If there are Npas passengers in the road network, encoding length is Lcode based on natural number encoding. (11) where Gp is the number of groups with the same starting position and destination.

So the number of taxi Npas passengers needs is (12) If six passengers want to take the taxi (the starting position and destination are not exactly the same), the encoding process is showed in Fig 1.

If the starting position and destination of the passenger mentioned above are the same, the encoding process is showed in Fig 2.

3.1.2 Fitness function.

Fitness function has a close relationship to the objective function. Fitness function of this algorithm is as follows: (13) where z1(i) is the objective function value of the model, Cmax is a larger number.

3.1.3 Selection operation.

The good chromosomes are expected to be inherited with higher probability, and the inferior chromosomes enter the next generation with lower probability. Firstly, the population is sorted, and the probability of chromosome inheritance to the next generation is determined by the evaluation function. Then, roulette method is used to select operation. Evaluation function based on the order is used in this paper. The individuals are sorted in descending order based on F(i), and choice is carried out according to the following ways[1819].

(14)(15)

It is obvious that F(i) decreases with i increases, and the gap between F(i) can be changed through updating the a value.

(16)(17)

The cumulative probability of chromosome entry into the next generation is determined by the evaluation function. A random number between 0 and 1 is generated. And if r meets qi−1rqi, the chromosome i is selected to enter the next generation.

3.1.4 Crossover operation.

The crossover operation is the main step to generate new individuals of the generation. Cross probability pc (0<pc<1) is given in this algorithm. A random number r ∈ (0,1) is generated. If r < pc, a bit is selected randomly, exchanges genetic, and each code finishes necessary internal exchange to prevent some passengers from being taken multiple times or not being taken, which avoid generating infeasible solutions. The rule is showed in Fig 3.

3.1.5 Mutation operation.

Mutation can improve the local search ability of genetic algorithm and the diversity of location groups [11]. Normally, mutation probability pm (0<pm<1) is given, and a random number r ∈ (0,1) is generated. If r < pm, two different positions of the chromosome are determined, then exchange them. Mutation rule is showed in Fig 4.

3.1.6 Termination rule.

The number of the maximum evolutionary is used as the termination judgment condition, that is, when the cumulative number of generations in which the optimal solution does not change is more than a sufficiently large positive integer N, the algorithm terminates.

3.2 Multiple-objective genetic algorithm

3.2.1 Algorithm design idea.

The extended optimization model of taxi carpooling is a multiple-objective optimization model. For the multiple-objective optimization, the representative solution algorithms are Niched Pareto Genetic Algorithm (NPGA), Non Dominated Sorting Genetic Algorithm (NSGA-II), and Strength Pareto Evolutionary Algorithm (SPEA2), etc. [20].

Those algorithms all have favorable solving efficiency in specific issue. However, for a concrete issue, they cannot be applied directly but applied after revised according to the attribute of the issue [2122]. This paper, aiming the characteristics of multiple-objective optimization of taxi carpooling path and combining the idea of multi-objective optimization, designs an improved genetic algorithm to solve the multiple-objective problem.

Different with single-objective optimization, the multiple objectives in multi-objective optimization can conflict with each other, and the improvement of one sub-objective may lower the performance of another sub-objective [23]. In other words, it is impossible to make multiple sub-objectives reach optimal. Therefore, the multi-objective optimization will generally get a non-inferior solution set. The elements of the set are called Pareto optimal solutions or non-inferior optimal solution. The Pareto optimal solution means there is no better solution superior to one of the objectives and not inferior to other objectives. In other words, it is impossible to optimize some objectives without deteriorating other objectives. For all objectives, the elements in Pareto optimal solution set are incomparable with each other. For actual application, one or multiple solutions from the Pareto optimal solution set of the multi-objective problem according to the understanding of the problem and preference of decision makers as the optimal solution of the multi-objective optimization problem to be solved. Therefore, the main task to solve the multi-objective optimization problem is to determine as more as and extensively distributed Pareto optimal solutions.

The genetic algorithm is a group operation algorithm. Through concurrent operation of one population, the multiple feasible solutions of the optimal problem can be found out without being restricted by property of the problem. The multi-objective optimization problem is mainly to find out a Pareto optimal solution set. Therefore, the genetic algorithm is an effective mean in Pareto optimal solution set to solve multi-objective optimization problem.

This paper, according to the framework of common multi-objective evolutionary algorithm, designs an improved genetic algorithm to solve the multiple-objective optimization problem of taxi carpooling path. This algorithm adopts banker principle to construct the Pareto optimal solution set, and keeps the distributivity of improved groups by crowding density method. In the aspect of genetic manipulation, this algorithm abandons the traditional crossover and mutation operators, and designs a kind of pertheno-genetic algorithm according to the characteristics of taxi carpooling problem. The flow diagram of the algorithm is showed in Fig 5, in which, Pop is population and |pop| is the scale of population, which is expressed by A; Paretos is the Pareto optimal solution set, and |Paretos| is number of the Pareto optimal solutions in the solution set, which is expressed by B. The end conditions adopt certain algebra constraints.

3.2.2 Genetic operator design.

The selection operators, crossover operators and mutation operators are important parts in genetic algorithm. Their design decides the solving efficiency of genetic algorithm. The specific operation of operator selection can be seen in Fig 5. The crossover operators and mutation operators are easy to generate large amount of infeasible solutions. Therefore, this paper, combining the characteristics of taxi carpooling problem, designs a pertheno-exchange operator and pertheno ortho-position exchange operator to replace the traditional crossover and mutation operators.

  1. Pertheno-exchange operator: select two different gene positions of parental chromosome at random, and exchange the positions of the two genes to form filial chromosome. Apparently, the exchange will not generate infeasible solution.
  2. Pertheno ortho-position exchange operator: select two different gene positions of parental chromosome at random, and confirm the staring and end position of ortho-position exchange section according to the sequence of the two gene positions. If the genes within the starting and end position are of even number, exchange all odd number genes with the odd even number genes to the right; if the genes within the starting and end position are of odd number, the last odd number gene remains unchanged while all other odd number genes are exchanged with the even number genes to the right. Apparently, the ortho-position exchange will not generate infeasible solution, either.

3.2.3 Pareto optimal solution set constructed by banker principle.

The banker principle is a kind of non-backtracking method. The newly constructed Pareto optimal solution needs not to compare with the existing Pareto optimal solutions. Supposed Paretos is the Pareto optimal solution set, and Pop is improved population, the Pareto optimal solution set of Pop constructed by banker principle is as follows:

  1. Step1: initialize Pareto optimal solution set.
  2. Srep2: take an individual a (generally the first individual) from Pop as the banker, and compare the banker with other individuals in sequence. When comparing, the individuals dominated by banker will be deleted.
  3. Step3: after compared the banker with all individuals in Pop, if an individual b dominates banker a, the banker a will be deleted. Otherwise, the banker a will be put into Paretos.
  4. Step4: repeat step2 and step3 till Pop is empty.

3.2.4 Individual crowding density calculation.

The distributivity of improved population is an important part of multiple-objective optimization. The crowding density method is adopted to keep the distributivity of the improved population. Specifically, the crowding distance is used to show the crowding density of individuals. The larger the crowding distance of an individual is, the smaller crowding density is. Before calculating the crowding distance of each individual, sort the population according to the each sub-objective function value. Supposed DistancePop[i] is the crowding distance of individual i, and Pop[i]. f[j] is the jth objective value of individual i, and if there are m objectives, the crowding distance of individual i will be: (18)

4. Case study

Suppose there are nine passengers and they want to take taxis in a road network with 24 nodes(Fig 6). The distance between adjacent nodes is a random value between 1km and 8km. The traveling time between adjacent nodes is a random value between 0.2h and 4h. Three taxis are needed for the nine passengers. The nine passengers are numbered randomly as in Table 1. The single objective genetic algorithm of taxi path optimization is achieved with Visual Studio6.0. Parameters are set as follows: PopSize = 200, Gen = 1000, Pc = 0.1, Pm = 0.1, V = 50km/h, d0 = 3km, C0 = 10CNY; r0 = 1.4CNY/km, α = 0.4, λ = 0.6, a = 0.9.

The total travel distance and travel time of passengers with carpooling and non-carpooling are showed in Fig 7 and Fig 8 respectively.

The income of taxi driver, travel mileages and carpooling path with carpooling and non- carpooling are showed in Table 2.

The single objective genetic algorithm evolutionary graph for solving the carpooling path optimization is showed in Fig 9.

The above calculation results show that the total mileages of three taxis are 126.9km with carpooling, which shortens about 35.6% compared with non-carpooling. By comparison with the cost for the passenger whose travel mileage is the largest with non-carpooling, the increasing values of the three taxis are 22.2 CNY, 6.8 CNY and 20.24 CNY respectively, and the taxi income is increased by about 36.7%. The nine passengers could save up to144.88 CNY in total.

For the extended model, we have written an improved multi-objective genetic algorithm program based on Visual Studio6.0. We set the size of population PopSize = 200, Evolutionary generation MaxGen = 200, Crossover rate CrossRate = 0.95, and Mutation rate MutationRate = 0.1. Other parameters have the same values as before. The Pareto solution set can be obtained by calculation, which are showed in Table 3.

The strength Pareto genetic algorithm (SPEA) is used to test the efficiency of the improved multi-objective genetic algorithm. The algorithm parameter and Pareto optimal solution set selection strategy are the same as those of the improved multi-objective genetic algorithm designed in this paper. The results are showed in Table 4.

thumbnail
Table 4. Performance comparison between SPEA and improved multi-objective genetic algorithm.

https://doi.org/10.1371/journal.pone.0203221.t004

From Table 4, we can see the mean values of two objective functions obtained from the improved multi-objective genetic algorithm designed in this paper are better than SPEA, and the run time is reduced. The results show that the improved multi-objective genetic algorithm designed in this paper can not only obtain a more satisfactory solution, but also has faster convergence speed compared with the traditional genetic algorithm.

5. Research conclusions and prospects

The taxi carpooling system is researched in this paper, and the following conclusions are obtained.

(1) The path optimization model of taxi carpooling system is built with taxi travel distance minimum as the objective function, and detour distance, passenger satisfaction, cost of passengers and taxi driver income as constraints. The genetic algorithm is used to solve the model, and the case study results show that the optimal model and the algorithm are feasible. For the model, algorithm and program code has important reference value for the development and perfecting function of taxi APP.

(2) The case study shows the passenger carpooling shortens the total travel distance of taxi under the condition of the same travel demand. Carpooling can contribute to the mitigation of urban traffic congestion and energy saving and emission reduction to some extent. Although the carpool will make some passengers detour distance and increase the travel time, but the operation mode can greatly reduce passengers’ cost.

(3) Taxi carpooling can increase drivers’ income and reduce the passengers’ cost by the above analysis, which can make the driver and passengers to reach a "win-win" situation, and alleviates travel difficult problem as well.

After the research on the taxi carpooling path optimization model and algorithm, the development of carpooling APP and the design of scientific cost sharing meter are key content of the next research stage.

References

  1. 1. Pedro MD, Fernandes R, Ferreira M. Reducing the environmental impact of taxi operation: the taxi-sharing use case. International Conference on Its Telecommunications,2012,13(1):319–323.
  2. 2. Ardekani SA, Jamei B, Herman R. A taxicab fare policy formula based on fuel consumption consumption observation.Transportation Research Record, 1986,1103:33–39.
  3. 3. Morisugi H, Arintono S, Parajuli BP. Fare level and fleet optimization of taxi and bus optimization in yogyakarta indonesia. Journal of Easter Asia Society for Transportation Studies,1997, 2(5):1547–1553.
  4. 4. Chang TH, Chu TS. Optimal taxi market control operated with a flexible initial fare policy.Networking, Sensing and Control, 2004,2(1):1335–1440.
  5. 5. Zou XD, Zheng SF, Ban XG, Lian XM. Optimal path algorithm for road network with traffic capacity limits. Journal of Highway and Transportation Research Development, 2002,19(4):82–84.
  6. 6. Zhou HP, Zhong BQ, Peng XH, Xia X.The route choice and rate optimization model of taxi pooling. Journal of Changsha University of Science and Technology, 2011,8(1):20–25.
  7. 7. Guo RJ,Wang WX. Shortcut optimization of taxi pooling based on matrix iteration method. Journal of Dalian Jiaotong University, 2011,32(4):28–31.
  8. 8. Wang LZ, Discussion on static and dynamic sharing mode of taxis in big cities. Master Dissertation of Changsha University of Science&Technology, 2012.
  9. 9. Cheng J,Tang ZH,Liu J,Zhong L. Research on dynamic taxi carpooling model based on genetic algorithm, Journal of Wuhan University of Technology (Transportation Science & Engineering),2013,37(1):187–191.
  10. 10. Yan S, Chen CY, Wu C C. Solution methods for the taxi pooling problem, Transportation, 2012,39(3), 723–748.
  11. 11. Chen YT, Hsu CH. Improve the carpooling applications with using a social community based travel cost reduction mechanism, International Journal of Social Science and Humanity, 2013,3(2), 87–91.
  12. 12. Galland S, Knapen L, Gaud N, Janssens D, Lamotte O, Koukam A, Wets G. Multi-agent simulation of individual mobility behavior in carpooling, Transportation Research Part C, 2014,45:83–98.
  13. 13. Manzini R, Pareschi A. A decision support system for the car pooling problem, Journal of Transportation Technologies, 2012, 2 (2):85–101
  14. 14. Kammerdiener T, Zhang H. Classification of ride-sharing partners based on multiple constraints, Journal of Computing Sciences in Colleges, 2011,26(4):95–101.
  15. 15. Ma XL, Wu YJ, Wang YH, Chen F, Liu JF. Mining smart card data for transit riders’ travel patterns, Transportation Research Part C: Emerging Technologies, 2013,36:1–12.
  16. 16. Tang JJ, Zhang S, Chen XQ, Liu F, Zou YJ. Taxi trips distribution modeling based on entropy-maximizing theory: a case study in harbin city—China. Physica A, 2018,493, 430–443.
  17. 17. Tang JJ, Liang J, Zhang S, Huang HL, Liu F. Inferring driving trajectories based on probabilistic model from large scale taxi GPS data, Physica A, 2018, 506, 566–577.
  18. 18. He ZB, Zheng L, Chen P, Guan W, Mapping to cells: a simple method to extract traffic dynamics from probe vehicle data, Computer-Aided Civil and Infrastructure Engineering, 2017,32(3):252–267.
  19. 19. He ZB, Guan W, Ma SF. A traffic condition based route guidance strategy for a single destination road network, Transportation Research Part C: Emerging Technologies, 2013,32(4), 89–102.
  20. 20. Deb K, Pratap A, Agarwal S, et al. A fast and elitist multi-objective genetic algorithm: NSGA-II, IEEE Trans on Evolutionary Computation, 2002, 6(2):182–197.
  21. 21. Wang Y, Ma XL, Li ZB, Liu Y, Xu MZ, Wang YH. Profit distribution in collaborative multiple centers vehicle routing problem. Journal of Cleaner Production, 2017, 144: 203–219.
  22. 22. Wang Y, Ma XL, Liu MW, Gong K, Liu Y, Xu MZ, Wang YH. Cooperation and profit allocation in two-echelon logistics joint distribution network optimization. Applied Soft Computing, 2017, 56: 143–157.
  23. 23. Yang X, Chen A, Wu JJ, Gao ZY, Tang T, An energy-efficient rescheduling approach under delay perturbations for metro systems, Transportmetrica B: Transport Dynamics, 2018, https://doi.org/10.1080/21680566.2017.1421109.