Two-stage carpool matching method and system for large traffic hub connecting taxis
Through a two-stage ride-sharing matching method combined with adaptive hierarchical clustering and improved genetic algorithm, the taxi ride-sharing model in large transportation hubs is optimized, which solves the problem of long waiting time for passengers in large transportation hubs and achieves efficient passenger matching and resource utilization.
Patent Information
- Application Number
- CN202411923765.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing technologies lack effective taxi-sharing matching methods in large transportation hubs, resulting in long waiting times for passengers and waste of resources. It is especially difficult to efficiently match large-scale passenger requests during peak hours, and the impact of passengers' large luggage is not considered.
A two-stage ride-sharing matching method is adopted. First, passenger requests are clustered by an adaptive hierarchical clustering algorithm. Then, an improved genetic algorithm is used to optimize path planning. Combined with path vector similarity and time characteristics, a taxi ride-sharing model is constructed to minimize the total vehicle mileage and the number of service vehicles.
It improves passenger matching efficiency, shortens passenger waiting time and detour distance, and enhances computing efficiency, significantly improving the feasibility of carpooling, especially in high-intensity passenger evacuation scenarios at large transportation hubs.
Smart Images

Figure CN119884777B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of transportation technology, and in particular to a two-stage ride-sharing matching method and system for connecting taxis at a large transportation hub. Background Art
[0002] In recent years, the rapid rise of high-speed rail in my country has brought about numerous challenges in inter-city and inter-city transportation connectivity. Long taxi wait times for passengers arriving at hubs have become a prominent issue. As key nodes in the entire transportation network, rapidly evacuating arriving passengers at hubs is crucial for strengthening integrated connectivity and improving the passenger travel experience. Taxis or online ride-hailing services often only carry one or two passengers, leading to long taxi waits and wasted resources during peak hours. Taxipooling can effectively improve taxi utilization, offering a transportation method that balances capacity and passenger wait times. Furthermore, the high concentration of arrival times and locations at hubs significantly enhances the feasibility of taxipooling. Therefore, given the concentrated arrival flow at hubs, research on taxipooling has significant practical value in rapidly evacuating hub passengers.
[0003] Existing taxi-sharing matching methods primarily focus on solving problems related to road network sharing and taxi-sharing matching for connecting to public transportation systems like subways and buses. These methods often focus on global optimization, considering factors such as boarding location and time to develop passenger matching solutions and shared ride routes. However, passengers at large transportation hubs typically arrive at a concentrated number of stations, requiring rapid and efficient matching of large-scale requests concentrated at boarding points (O), which increases the optimization complexity.
[0004] The technical problem to be solved by this invention is how to consider the factors of passengers' large luggage and construct a hub taxi carpooling model; based on the high optimization complexity of the hub carpooling problem, a two-stage carpooling matching method is designed to improve the passenger matching efficiency and thus evacuate the high-intensity arriving passengers at the hub more quickly. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a two-stage ride-sharing matching method and system for connecting taxis at large transportation hubs in response to the defects in the existing technology.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] The present invention provides a two-stage ride-sharing matching method for connecting taxis at a large transportation hub, the method comprising the following steps:
[0008] Step 1: Taking the shortest total vehicle mileage and the minimum number of service vehicles as optimization objectives, while considering the characteristics of hub passengers and using parameters including large luggage, departure and arrival times as constraints, a hub taxi sharing model is constructed;
[0009] Step 2: Obtain passenger requests and cluster them using an adaptive hierarchical clustering algorithm based on the path vector similarity that integrates direction and spatiotemporal features to obtain passenger request clusters.
[0010] Step 3: Based on the hub taxi carpooling model and passenger request clusters, the improved adaptive genetic algorithm is used to solve the carpooling path planning problem and obtain the passenger matching solution and carpooling travel path.
[0011] Furthermore, the method of step 1 of the present invention includes:
[0012] Step 11: Establish model assumptions for the hub taxi ride-sharing model, including:
[0013] The taxi arrives at the waiting area before the passengers and leaves the hub after all passengers have arrived;
[0014] All passengers can arrive at the designated location before the earliest scheduled departure time;
[0015] Each taxi has the same speed and travels at a constant speed throughout the journey;
[0016] The road network is smooth, and the impact of random disturbances including traffic congestion is not considered;
[0017] Step 12: Set the objective function and constraints of the hub taxi ride-sharing model, including:
[0018] The objective function is set to minimize the overall consumption of the system, that is, the total mileage of all vehicles and the number of required service vehicles are minimized; ensure that each passenger can be served by only one taxi; ensure that all service taxis depart from the hub and cannot return to the hub during the service process; ensure flow balance; capacity constraints, that is, the number of passengers for each request and the total amount of luggage carried cannot exceed the carrying capacity of the car; set time window constraints; the latest arrival time of passengers riding in the same car is the departure time of the taxi, which must meet the departure time window of each passenger; ensure that the arrival time of each passenger must meet the arrival time window; decision variables use 0-1 integer constraints.
[0019] Step 13: Build a hub taxi sharing model based on model assumptions, objective functions, and constraints.
[0020] Furthermore, the hub taxi sharing model constructed in step 13 of the present invention is specifically:
[0021]
[0022]
[0023] In which, a directed network G = (N, E) is introduced, where N is the set of points, E is the set of edges, i, j, l are the indexes of the passenger request destination, i, j, l∈N, 0 represents the hub point, N0 represents the set of all points including the hub (0), k is the taxi index, k∈K; the case of taxis returning to the hub is not considered, d ij is the actual distance from i to j; c f is the fixed usage fee for each taxi; c d is the unit distance operating cost of each taxi; Q represents the total capacity of taxis; p i is the number of passengers requesting i; b i is the number of large luggage requested by passenger i; B is the number of luggage that can be placed in the trunk; W is the number of luggage that can be placed on one seat; v is the vehicle speed; s is the time it takes for each passenger to get off the bus, i.e., the service time; [e i ,l i ] and [ee i ,ll i ] represent the departure time window and arrival time window of passenger i respectively; x ijk is a decision variable that equals 1 if passenger i is served by taxi k from point j to point l, and 0 otherwise.
[0024] Furthermore, the method of step 2 of the present invention comprises:
[0025] Step 21: Based on the fact that the starting points of hub passengers are the same and the direction of the passenger route plays a decisive role in the driving path, the direction similarity is calculated;
[0026] Step 22: Calculate the spatiotemporal distance similarity based on the impact of the detour degree between the passenger's destinations on the passenger's ride-sharing experience;
[0027] Step 23: Based on the impact of travel routes and travel time on passenger matching, the direction similarity and spatiotemporal distance similarity are combined with the request time to calculate the path vector similarity;
[0028] Step 24: Calculate the path vector similarity distance of the two path vectors based on their path vector similarities;
[0029] Step 25: Propose a method to automatically determine the optimal clustering parameters based on the clustering feature ratio, and automatically determine the number of clusters k by analyzing the change characteristics of the path similarity distance during the hierarchical clustering process;
[0030] Step 26: Clustering to obtain passenger request clusters: Based on the path vector similarity distance and the automatically determined k value, the large-scale passenger requests are divided into k request clusters.
[0031] Furthermore, the method for calculating the direction similarity in step 21 of the present invention is:
[0032] Calculate the cosine value cos<λ1,λ2> of the intersection angle between the vectors λ1 and λ2 obtained from the starting and ending points of the two paths. If μ≤cos<λ1,λ2>≤1, the two vectors are considered to have similar directions, which can be expressed as:
[0033]
[0034] Where VD(R1, R2) represents the directional similarity of the two paths, and M is a constant greater than a certain threshold;
[0035] The method for calculating the spatiotemporal distance similarity in step 22 is:
[0036] For any two passenger requests with time attributes t1, t2 and location attributes x1, x2, we can get the spatiotemporal distance similarity measure of the two paths R1 and R2:
[0037]
[0038] where VS(x1,x2) is the degree of detour between the two nodes, d(x1,x2) is the actual distance between the two nodes, d(0,x1) and d(0,x2) refer to the actual distances from hub 0 to the requested destinations x1 and x2, respectively, VT(t1,t2) represents the degree of overlap of passenger request time windows, and α and β are normalization factors that balance the importance of spatiotemporal distances.
[0039] Furthermore, the method for calculating the path vector similarity in step 23 of the present invention is:
[0040] By adding direction similarity as an influencing factor to the spatiotemporal distance similarity index, the expression of the path vector similarity measurement method is obtained:
[0041] VDTS(R1,R2)=VD(R1,R2)□VTS(R1,R2)
[0042] Among them, VDTS(R1, R2) represents the path vector similarity of paths R1 and R2, VD(R1, R2) represents the direction similarity of the two path vectors, and VTS(R1, R2) represents the spatiotemporal distance similarity of the two paths;
[0043] The method for calculating the path vector similarity distance in step 24 is:
[0044] The path vector similarity distance is defined as follows:
[0045] DVDTS(r1,r2)=N-VDTS(R1,R2)
[0046] Among them, DVDTS(R1, R2) represents the path vector similarity distance of requests r1 and r2, N is a constant, and the driving paths corresponding to requests r1 and r2 are R1 and R2 respectively.
[0047] Furthermore, in step 25 of the present invention, the method for automatically determining the number of clusters k by analyzing the changing characteristics of the path similarity distance during the hierarchical clustering process includes:
[0048] Define the number of clusters after each merger as s, D s is the merging distance corresponding to the number of clusters s, R s It represents the growth rate of the merged distance when the number of clusters is s. When the growth rate of the merged distance is less than a certain threshold, it means that the merged distance grows slowly, indicating that the hierarchical structure tends to be stable. Therefore, the final number of clusters k is to meet the stable ratio. The maximum number of clusters s is:
[0049]
[0050]
[0051] Among them, the stable ratio It is the last inflection point of the ratio curve with significant growth.
[0052] Furthermore, the method of step 3 of the present invention includes:
[0053] Step 31: For each clustered passenger request cluster, the passenger sharing plan of a car is used as a chromosome, the chromosome is encoded and an initial sharing plan that meets the constraints of the hub taxi sharing model is generated as the initial population of the genetic algorithm;
[0054] Step 32: Using the optimization objective of the hub taxi sharing model as the fitness function, calculate the fitness of the individual, and calculate the three-quarter median, one-quarter median, maximum, and minimum values of the population fitness;
[0055] Step 33: Adaptively determine the crossover probability and mutation probability;
[0056] Step 34: Determine whether the population meets the convergence conditions. If so, output the passenger matching solution and the shared ride path. If not, continue to execute the following steps.
[0057] Step 35: Determine whether the population concentration condition is met. If so, it means that the fitness of the middle 50% of the individuals in the population is close to the fitness of nearly 100% of the individuals between the maximum and minimum values of the population, indicating that the population is more concentrated. Therefore, the mutation operation is performed first to expand the diversity of the population, and then the crossover operation is performed to produce excellent individuals. If not, it means that the fitness of the middle 50% of the individuals in the population is not close to the fitness of nearly 100% of the individuals between the maximum and minimum values of the population, indicating that the population is more dispersed. Therefore, the crossover operation is performed first and then the mutation operation is performed to ensure population diversity.
[0058] Step 36: Optimal preservation strategy; calculate the optimal fitness of the offspring individuals after crossover and mutation operations and compare it with the individual with the best fitness in the parent generation. If the best individual in the parent generation is better than the offspring, then eliminate one individual in the offspring and put the best individual in the parent generation into the offspring;
[0059] Step 37: Return to step 32.
[0060] Furthermore, the method for adaptively determining the crossover probability and the mutation probability in step 33 of the present invention is:
[0061] Crossover probability p c and mutation probability p m The adaptive calculation formula is:
[0062]
[0063] Among them, p c and p m Represent the crossover probability and mutation probability respectively, a is arcsin(f3-f1 / f max -f min ), which represents the degree of closeness between the fitness of the middle 50% of the individuals in the population and the fitness of nearly 100% of the individuals between the maximum and minimum values of the population, and k1, k2, k3, and k4 are constants;
[0064] The condition for judging the concentration of the population in step 35 is: arcsin(f3-f1) / (f max -f min )≥π / 6.
[0065] The present invention provides a two-stage ride-sharing matching system for connecting taxis at large transportation hubs, comprising:
[0066] a memory for storing executable computer programs;
[0067] The processor is configured to implement the above-mentioned two-stage ride-sharing matching method for connecting taxis at large transportation hubs when executing the executable computer program stored in the memory.
[0068] The beneficial effects produced by the present invention are:
[0069] 1. This paper constructs a hub taxi carpooling model that considers passengers' oversized luggage. Experiments demonstrate that the impact of oversized luggage must be considered in hub scenarios to ensure the feasibility of carpooling routes. To address the high complexity of hub carpooling, a two-stage algorithm, PVS-AHC-IGA, is designed to solve it. PVS stands for path vector similarity, AHC stands for adaptive hierarchical clustering algorithm, and IGA stands for improved genetic algorithm.
[0070] The present invention has proved through experiments that the two-stage carpooling matching method proposed in the present invention can effectively quantify and cluster similar passenger requests, improve the computing efficiency by 85%, and reduce the waiting time and detour distance of passengers.
[0071] 2. In terms of model construction, this paper optimizes the vehicle's total mileage and the number of service vehicles, while also considering the characteristics of hub passengers and using constraints such as oversized luggage and departure and arrival times to construct a hub taxi-sharing model. This model comprehensively considers the characteristics of large transportation hubs and addresses the lack of corresponding models in the existing art.
[0072] 3. This paper proposes a path vector similarity measurement method that considers both directional and spatiotemporal characteristics. It also incorporates request time, grouping passengers with similar routes and a short time span into the same cluster. This method significantly improves the accuracy of clustering similar passengers. Furthermore, this paper proposes a method for automatically determining optimal clustering parameters based on cluster feature ratios, reducing the influence of subjectivity in clustering results.
[0073] 4. Traditional genetic algorithms achieve generational evolution of a population through a gene selection-crossover-mutation operation. The crossover operator selects superior individuals through genetic recombination, while the mutation operator ensures population diversity. However, this crossover-then-mutation operation can easily lead to increasingly concentrated population fitness in later stages, while the mutation operator has little impact on individual populations, resulting in local convergence. To address this, the present invention proposes an adaptive algorithm flow that utilizes an improved adaptive genetic algorithm to solve the carpool route planning problem, deriving passenger matching solutions and carpool travel routes, and preventing the algorithm from falling into local optima. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0075] Figure 1 Schematic diagram of the PVS-AHC-IGA algorithm flow provided by the present invention;
[0076] Figure 2 A schematic diagram of the path vector provided by the present invention;
[0077] Figure 3 A schematic diagram of the distribution of passenger request destinations is provided for example. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0079] Example 1
[0080] Aiming at the shortcomings of the existing technology, the present invention constructs a hub taxi carpooling model that takes passengers' large luggage into consideration. With the minimization of the total vehicle mileage and the number of service vehicles as the optimization goal, a two-stage carpooling matching method based on PVS-AHC-IGA is proposed to solve the problem of low matching efficiency of the existing technology under large passenger flow conditions.
[0081] The embodiment of the present invention proposes a two-stage carpooling matching method for taxis connecting to large transportation hubs. The method mainly includes: constructing a carpooling model for hub taxis that takes into account passengers' large luggage; clustering passenger requests using an adaptive hierarchical clustering algorithm based on the similarity of path vectors that integrate direction and spatiotemporal features; and obtaining passenger matching solutions and carpooling routes using an improved adaptive genetic algorithm. The process of the present invention is shown in the attached figure. Figure 1 shown.
[0082] Step 1: Taking the shortest total vehicle mileage and the minimum number of service vehicles as the optimization objectives, while considering the characteristics of hub passengers and taking large luggage, departure and arrival times as constraints, a hub taxi sharing model is constructed.
[0083] Step 11: Model assumptions, specifically:
[0084] 1) The taxi arrives at the waiting area before the passengers and leaves the hub after all passengers have arrived;
[0085] 2) All passengers can arrive at the designated location before the earliest scheduled departure time;
[0086] 3) Each taxi has the same speed and travels at a constant speed throughout the journey;
[0087] 4) The road network is unobstructed, without considering the impact of random disturbances such as traffic congestion.
[0088] Step 12: Set the objective function and constraints of the hub taxi ride-sharing model, including:
[0089] Objective function (1) represents the minimum overall consumption of the system, that is, the total mileage of all vehicles and the number of service vehicles required. Constraints (2) and (3) ensure that each passenger can be served by only one taxi. Constraints (4) and (5) ensure that all service taxis depart from the hub and cannot return to the hub during the service process. Constraint (6) ensures traffic balance. Constraint (7) is a capacity constraint, that is, the number of passengers and the total amount of luggage carried by each request cannot exceed the carrying capacity of the car. Constraints (8) and (9) are time window constraints. Formula (8) stipulates that the latest arrival time of passengers riding in the same car is the departure time of the taxi, which must meet the departure time window of each passenger; Formula (9) ensures that the arrival time of each passenger must meet the arrival time window. Formula (10) is a 0-1 integer constraint on the decision variable. The specific formula is shown below.
[0090] Step 13: Build a hub taxi sharing model.
[0091]
[0092]
[0093] In this case, a directed network G = (N, E) is introduced, where N is the set of points, E is the set of edges, i, j, l are the indices of the passenger request destination, i, j, l∈N, 0 represents the hub, N0 represents the set of all points including the hub (0), k is the taxi index, k∈K. Without considering the case where the taxi returns to the hub, d ij is the actual distance from i to j; c f is the fixed usage fee for each taxi; c d is the unit distance operating cost of each taxi; Q represents the total capacity of taxis; p i is the number of passengers requesting i; b i is the number of large luggage requested by passenger i; B is the number of luggage that can be placed in the trunk; W is the number of luggage that can be placed on one seat; v is the vehicle speed; s is the time it takes for each passenger to get off the bus (service time); [e i ,l i ] and [ee i ,ll i ] represent the departure time window and arrival time window of passenger i respectively; x ijk is a decision variable that equals 1 if passenger i is served by taxi k from point j to point l, and 0 otherwise.
[0094] Step 2: Based on the path vector similarity that integrates direction and spatiotemporal features, the passenger requests are clustered using an adaptive hierarchical clustering algorithm.
[0095] Path vector similarity: driving path and ride time are key factors affecting passenger matching. In the hub carpooling problem, the similarity of driving paths needs to consider two points: a. The starting points of hub passengers are the same, and the direction of the passenger route plays a decisive role in the driving path; b. Under the premise of similar driving directions, the distance between the passenger destinations has little effect on the near-to-far driving mode of the present invention, but the degree of detour between the passenger destinations will directly affect the passenger's carpooling experience. Accordingly, the present invention proposes a path vector similarity measurement method that takes into account direction and spatiotemporal characteristics, integrates request time, and aims to classify passengers with similar paths and small time spans into the same cluster.
[0096] In the non-pooling state, requests r1 and r2 can obtain two paths R1 and R2 starting from the hub. Take the starting points q1 and q2 and the end points z1 and z2 of the two paths, connect the starting and end points, and obtain vectors λ1 and λ2, as shown in Figure 2 shown.
[0097] Step 21: Calculate the direction similarity.
[0098] Calculate the cosine value of the angle between the vectors λ1 and λ2 obtained from the starting and ending points of the two paths, cos<λ1,λ2>. If μ≤cos<λ1,λ2>≤1, the two vectors are considered to be similar in direction, which is specifically expressed as:
[0099]
[0100] Among them, VD(R1, R2) represents the directional similarity of the two paths, and M is a large constant.
[0101] Step 22: Calculate the spatiotemporal distance similarity.
[0102] The time attribute refers to the time window from the hub, which stipulates that passengers with overlapping departure time windows have a matching opportunity. The longer the overlapping time, the higher the chance of successful matching. The location attribute refers to the degree of detour between the request destinations. For any two passenger requests with time attributes t1, t2 and location attributes x1, x2, the spatiotemporal distance similarity measurement method of the two paths R1 and R2 is obtained, as shown in formula (14):
[0103]
[0104] where VS(x1,x2) is the degree of detour between the two nodes, d(x1,x2) is the actual distance between the two nodes, d(0,x1) and d(0,x2) refer to the actual distances from hub 0 to the requested destinations x1 and x2, respectively, VT(t1,t2) represents the degree of overlap of passenger request time windows, and α and β are normalization factors that balance the importance of spatiotemporal distances.
[0105] Step 23: Calculate the path vector similarity.
[0106] By adding direction similarity as an influencing factor to the spatiotemporal distance similarity index, the expression of the path vector similarity measurement method is obtained as follows:
[0107]
[0108] Among them, VDTS(R1, R2) represents the path vector similarity of paths R1 and R2, VD(R1, R2) represents the direction similarity of the two path vectors, and VTS(R1, R2) represents the spatiotemporal distance similarity of the two paths.
[0109] Adaptive hierarchical clustering algorithm: Since the hierarchical clustering algorithm requires the input of the number of clusters k as a parameter, the present invention proposes a method for automatically determining the optimal clustering parameters based on the cluster feature ratio to reduce the influence of subjectivity in the clustering results.
[0110] Step 24: Define the path vector similarity distance.
[0111] The path vector similarity distance is defined as follows:
[0112] DVDTS(r1,r2)=N-VDTS(R1,R2) (16)
[0113] Wherein, DVDTS(R1, R2) represents the path vector similarity distance of requests r1 and r2, N is a constant, and VDTS(R1, R2) represents the path vector similarity of the driving paths R1 and R2 of requests r1 and r2.
[0114] Step 25: Automatically determine the k value.
[0115] In the hierarchical clustering process, the path vector similarity distance has a monotonically increasing characteristic. The path similarity distance between similar entities or subclusters is generally small. When similar entities or subclusters are merged, the path vector similarity distance increases slowly; when entities or subclusters with large differences are merged, the path vector similarity distance increases significantly. Therefore, by analyzing the changing characteristics of the path similarity distance in the hierarchical clustering process, it can provide an important reference for automatically determining the number of clusters k. As shown in formula (17), the number of clusters after each merger is defined as s, and D s is the merging distance corresponding to the number of clusters s, R s It represents the growth rate of the merged distance when the number of clusters is s. When the growth rate of the merged distance is small (the merged distance grows slowly), it means that the hierarchical structure tends to be stable. Therefore, the final number of clusters k is to meet the stable ratio. The maximum number of clusters s is shown in formula (18).
[0116]
[0117] Among them, the stable ratio It is the last inflection point of the ratio curve with significant growth.
[0118] Step 26: Clustering to obtain passenger request clusters.
[0119] Based on the path vector similarity, the path vector similarity distance is obtained, and the large-scale passenger requests are divided into k request clusters according to the automatically determined k value.
[0120] Step 3: Use the improved adaptive genetic algorithm to solve the carpooling path planning problem and obtain the passenger matching solution and carpooling route.
[0121] Traditional genetic algorithms achieve generational evolution of a population through gene selection-crossover-mutation operations. The crossover operator obtains excellent individuals through gene recombination, and the mutation operator ensures the diversity of the population. However, this operation of first crossover and then mutation can easily lead to the population fitness becoming increasingly concentrated in the later stages, and the mutation operator has little effect on the individuals in the population, resulting in local convergence. To this end, the present invention proposes an adaptive algorithm flow to prevent the algorithm from falling into local optimality. The solution flow chart is shown in the figure below. Figure 1 shown.
[0122] Step 31: For each clustered passenger request cluster, the passenger sharing plan of a car is used as a chromosome, the chromosome is encoded and an initial sharing plan that meets the constraints of the hub taxi sharing model is generated as the initial population of the genetic algorithm.
[0123] Step 32: Take the optimization objective of the hub taxi sharing model as the fitness function, calculate the fitness of the individual, and calculate the three-quarter median, one-quarter median, maximum and minimum values of the population fitness.
[0124] Step 33: Adaptively determine the crossover probability and mutation probability. Since fixed control parameters are prone to affect the convergence performance of the genetic algorithm, in order to better play the role of the control parameters, the crossover probability p c and mutation probability p m The adaptive calculation formula of is shown in equations (19) and (20).
[0125]
[0126] Among them, p c and p m Represent the crossover probability and mutation probability respectively, a is arcsin(f3-f1 / f max -f min), which represents the degree to which the fitness of the middle 50% of the population is close to the fitness of nearly 100% of the individuals between the maximum and minimum values of the population. k1, k2, k3, and k4 are constants.
[0127] Step 34: Determine whether the population meets the convergence conditions. If so, output the passenger matching plan and the shared ride path. If not, continue to execute the next step.
[0128] Step 35: Determine arcsin(f3-f1) / (f max -f min )≥π / 6. If so, the closer the fitness of the middle 50% of the individuals in the population is to the fitness of nearly 100% of the individuals between the maximum and minimum values of the population, the more concentrated the population is. Therefore, it is necessary to perform a mutation operation first to expand the diversity of the population and then perform a crossover operation to produce excellent individuals. If not, the farther the fitness of the middle 50% of the individuals in the population is from the fitness of nearly 100% of the individuals between the maximum and minimum values of the population, the more dispersed the population is. Therefore, it is necessary to perform a crossover operation first and then a mutation operation to ensure population diversity.
[0129] Step 36: Optimal Preservation Strategy. The optimal fitness of the offspring individuals generated after the crossover and mutation operations is calculated and compared with the individual with the optimal fitness in the parent generation. If the optimal individual in the parent generation outperforms the offspring, one of the offspring individuals is removed and the optimal individual from the parent generation is added to the offspring. The optimal preservation strategy is also key to ensuring the convergence speed of the adaptive genetic algorithm designed in this invention.
[0130] Step 37: Return to step 32.
[0131] Example 2
[0132] To implement this invention, we used real taxi data from Wuhan, China, using Hankou Station as the research target for this study. We selected 229 taxi trips departing from Hankou Station between 10:00 PM and 11:00 PM. The data included the order ID, the latitude and longitude of the starting and ending points, and the start and end times of the order.
[0133] Experimental parameter settings:
[0134] The parameters used in the model are set as follows: taxi fixed usage fee c f The unit distance operation cost is 20 yuan; d The cost is 1 yuan per kilometer. The number of suitcases B that can be placed in the trunk is 2; the number of pieces of luggage W that can be placed on a seat is 2. The vehicle speed v is 40 km / h. The time it takes to get off at each service point, s, is 0.2 minutes.
[0135] The parameters in the solution algorithm are set as follows: in the PVS-based hierarchical clustering algorithm, the spatial weight α and the temporal weight β are 1 and 5 respectively, and the maximum cosine value of the angle between the two vectors is μ In the IGA algorithm, parameters k1 = 1.2, k2 = 1.0, k3 = 1.5, k4 = 0.5, and the maximum number of iterations is M is 100.
[0136] Regarding instance generation, the e of the departure time window i is the order start time. Combined with the actual operation data of taxis in Wuhan, the passenger waiting time width is randomly generated in the range of [5,15]. The arrival time window is designed to be [e i +d ij / v+s,l i +γ(d ij / v+s)], where γ = 1.5 represents the maximum acceptable detour rate for passengers. Next, the number of passengers and the number of large luggage items carried are randomly generated for each request. Each request has 1 or 2 passengers with probabilities of 80% and 20%, respectively, and 0, 1, or 2 large luggage items with probabilities of 50%, 40%, and 10%, respectively. The actual distances between all requests are obtained using the Python package OSMnx.
[0137] Experimental comparison:
[0138] To analyze the effectiveness of the two-stage algorithm, the results of the PVS-AHC-IGA algorithm were compared with those of the direct IGA algorithm. Table 1 shows the average results of 10 runs of the two algorithms. It can be seen that the two-stage algorithm of the present invention achieves the same optimization objective as the model solved using the global optimization method, but with an 85% reduction in time consumption, and the average passenger detour rate and average passenger waiting time are reduced by 8% and 30%, respectively. This demonstrates that the clustering method proposed in this paper can effectively aggregate similar passengers into the same cluster, improving the algorithm's computational efficiency and thus achieving the goal of rapidly matching large-scale passenger requests at the hub.
[0139] Table 1 Comparison of optimization results for passenger case
[0140]
[0141] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0142] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A two-stage ride-sharing matching method for connecting taxis at large transportation hubs, characterized in that: The method comprises the following steps: Step 1: Taking the shortest total vehicle mileage and the minimum number of service vehicles as optimization objectives, while considering the characteristics of hub passengers and using parameters including large luggage, departure and arrival times as constraints, a hub taxi sharing model is constructed; Step 2: Obtain passenger requests and cluster them using an adaptive hierarchical clustering algorithm based on the path vector similarity of the fusion direction and spatiotemporal features to obtain passenger request clusters. The specific method is as follows: Automatically determine the number of clusters by analyzing the changing characteristics of path similarity distance during hierarchical clustering ; Define the number of clusters after each merger as , is the number of clusters The corresponding merge distance, Indicates the number of clusters When the growth rate of the merged distance is less than a certain threshold, the number of clusters obtained is To meet the stability ratio The maximum number of clusters ; Step 3: Based on the hub taxi carpooling model and passenger request clusters, an improved adaptive genetic algorithm is used to solve the carpooling route planning problem and obtain the passenger matching solution and carpooling route. The specific method is as follows: Step 31: For each clustered passenger request cluster, the passenger sharing plan of a car is used as a chromosome, the chromosome is encoded and an initial sharing plan that meets the constraints of the hub taxi sharing model is generated as the initial population of the genetic algorithm; Step 32: Using the optimization objective of the hub taxi sharing model as the fitness function, calculate the fitness of the individual, and calculate the three-quarter median, one-quarter median, maximum, and minimum values of the population fitness; Step 33: Adaptively determine the crossover probability and mutation probability; Step 34: Determine whether the population meets the convergence conditions. If so, output the passenger matching solution and the shared ride path. If not, continue to execute the following steps. Step 35: Determine whether the population concentration condition is met. If so, it means that the fitness of 50% of the individuals in the middle of the population is close to the fitness of nearly 100% of the individuals between the maximum and minimum values of the population, indicating that the population is more concentrated. Therefore, the mutation operation is performed first to expand the diversity of the population, and then the crossover operation is performed to produce excellent individuals. If not, it means that the fitness of 50% of the individuals in the middle of the population is not close to the fitness of nearly 100% of the individuals between the maximum and minimum values of the population, indicating that the population is more dispersed. Therefore, the crossover operation is performed first and then the mutation operation is performed to ensure population diversity. Step 36: Optimal preservation strategy; calculate the optimal fitness of the offspring individuals after crossover and mutation operations and compare it with the individual with the best fitness in the parent generation. If the best individual in the parent generation is better than the offspring, then eliminate one individual in the offspring and put the best individual in the parent generation into the offspring; Step 37: Return to step 32.
2. The two-stage ride-sharing matching method for connecting taxis at large transportation hubs according to claim 1 is characterized in that: The method for step 1 includes: Step 11: Establish model assumptions for the hub taxi ride-sharing model, including: The taxi arrives at the waiting area before the passengers and leaves the hub after all passengers have arrived; All passengers can arrive at the designated location before the earliest scheduled departure time; Each taxi has the same speed and travels at a constant speed throughout the journey; The road network is smooth, and the impact of random disturbances including traffic congestion is not considered; Step 12: Set the objective function and constraints of the hub taxi ride-sharing model, including: The objective function is set to minimize the overall consumption of the system, that is, the total mileage of all vehicles and the number of service vehicles required are minimized; ensure that each passenger can be served by only one taxi; ensure that all service taxis depart from the hub and cannot return to the hub during the service process; ensure traffic balance; capacity constraints, that is, the number of passengers and the total amount of luggage carried by each request cannot exceed the carrying capacity of the car; set time window constraints; the latest arrival time of passengers riding in the same car is the departure time of the taxi, which must meet the departure time window of each passenger; ensure that the arrival time of each passenger must meet the arrival time window; decision variables are constrained by 0-1 integers; Step 13: Build a hub taxi sharing model based on model assumptions, objective functions, and constraints.
3. The two-stage ride-sharing matching method for connecting taxis at large transportation hubs according to claim 2 is characterized in that: The hub taxi sharing model built in step 13 is as follows: Among them, the introduction of directed network , is a set of points, is the edge set, is the index of the passenger's requested destination, , 0 represents the pivot point, represents the set of all points including the hub (0), is the taxi index, ; Ignoring the situation where the taxi returns to the hub, yes arrive The actual distance; is the fixed usage fee for each taxi; is the unit distance operating cost of each taxi; represents the total capacity of taxis; It is a passenger request the number of people; It is a passenger request Number of large luggage; Indicates the number of suitcases that can be placed in the trunk; Indicates the number of pieces of luggage that can be placed on a seat; is the vehicle speed; is the time it takes each passenger to get off the bus, i.e. the service time; and Represents passengers Departure time window and arrival time window; is a decision variable, if passenger From point Arrive By taxi If the service is enabled, it is 1; otherwise, it is 0.
4. The two-stage ride-sharing matching method for connecting taxis at large transportation hubs according to claim 1 is characterized in that: The method for step 2 includes: Step 21: Based on the fact that the starting points of hub passengers are the same and the direction of the passenger route plays a decisive role in the driving path, the direction similarity is calculated; Step 22: Calculate the spatiotemporal distance similarity based on the impact of the detour degree between the passenger's destinations on the passenger's ride-sharing experience; Step 23: Based on the impact of travel routes and travel time on passenger matching, the direction similarity and spatiotemporal distance similarity are combined with the request time to calculate the path vector similarity; Step 24: Calculate the path vector similarity distance of the two path vectors based on their path vector similarities; Step 25: Propose a method to automatically determine the optimal clustering parameters based on the clustering feature ratio, and automatically determine the number of clusters by analyzing the changing characteristics of the path similarity distance during the hierarchical clustering process. ; Step 26: Clustering to obtain passenger request clusters: based on the path vector similarity distance and automatically determined The value divides the passenger large-scale request into request clusters.
5. The two-stage ride-sharing matching method for connecting taxis at large transportation hubs according to claim 4 is characterized in that: The method for calculating the directional similarity in step 21 is: Calculate the vectors of the starting and ending points of the two paths 、 The cosine of the angle between ,if , then the two vectors are considered to have similarity in direction, which can be expressed as: in, represents the directional similarity of the two paths, is a constant greater than a certain threshold; The method for calculating the spatiotemporal distance similarity in step 22 is: For any two passenger requests, with time attributes 、 and location attributes 、 , and obtain two paths and The spatiotemporal distance similarity measure of : in, is the degree of detour between two nodes, is the actual distance between two nodes, and Refers to hub 0 to the request end point respectively and The actual distance, represents the degree of overlap of passenger request time windows, and is a normalization factor that balances the importance of spatial and temporal distances.
6. The two-stage ride-sharing matching method for connecting taxis at large transportation hubs according to claim 4 is characterized in that: The method for calculating the path vector similarity in step 23 is: By adding direction similarity as an influencing factor to the spatiotemporal distance similarity index, the expression of the path vector similarity measurement method is obtained: · in, Indicates the path and The path vector similarity of represents the directional similarity of the two path vectors, Indicates the similarity of the spatial and temporal distances of two paths; The method for calculating the path vector similarity distance in step 24 is: The path vector similarity distance is defined as follows: in, Express a request and The path vector similarity distance of Is a constant, request and The corresponding driving paths are and .
7. The two-stage ride-sharing matching method for connecting taxis at large transportation hubs according to claim 4 is characterized in that: In step 25, the number of clusters is automatically determined by analyzing the changing characteristics of the path similarity distance during the hierarchical clustering process. The methods include: Define the number of clusters after each merger as , is the number of clusters The corresponding merge distance, Indicates the number of clusters When the growth rate of the merged distance is less than a certain threshold, it means that the merged distance grows slowly, indicating that the hierarchical structure tends to be stable. Therefore, the final number of clusters To meet the stability ratio The maximum number of clusters , the formula is: Among them, the stable ratio It is the last inflection point of the ratio curve with significant growth.
8. The two-stage ride-sharing matching method for connecting taxis at large transportation hubs according to claim 1 is characterized in that: The method for adaptively determining the crossover probability and mutation probability in step 33 is: Crossover probability and mutation probability The adaptive calculation formula is: in, and represent the crossover probability and mutation probability respectively, for , which indicates how close the fitness of the middle 50% of the individuals in the population is to the fitness of nearly 100% of the individuals between the maximum and minimum values of the population. , , , is a constant; The conditions for determining population concentration in step 35 are: .
9. A two-stage ride-sharing matching system for connecting taxis at large transportation hubs, characterized by: include: a memory for storing executable computer programs; The processor is configured to implement the two-stage ride-sharing matching method for connecting taxis at a large transportation hub as described in any one of claims 1 to 8 when executing the executable computer program stored in the memory.
Citation Information
Patent Citations
Junction station connection taxi sharing scheduling matching method
CN116468219A
Integrated matching method of shared autonomous vehicle and rail transit transfer considering carpooling
CN118735194A