A method for matching passengers and vehicles in online car-hailing sharing
By classifying user combination needs, calculating passenger combination paths and applying integer linear planning algorithms for matching, the problem of inefficient matching between drivers and multiple passengers in the existing technology is solved, and efficient matching and user experience improvement of online booking shared travel is achieved. .
Patent Information
- Application Number
- CN202210767313.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-06-30
AI Technical Summary
The existing technology is difficult to effectively match a driver and multiple passengers, resulting in inefficient matching of online booking shared travel.
Classify the user's needs for the combined passengers, use the edge cloud collaborative system to calculate the shortest travel time and path of the passenger combination, and use an integer linear planning algorithm to match to form the optimal passenger combination solution. Finally, the passenger is adjusted by virtual passengers or drivers. The number of combinations is the same as the number of drivers, and match again.
It has achieved efficient optimization of personnel matching in online travel shared, improved travel efficiency and user experience, promoted the popularization of green emerging transportation modes, and alleviated urban traffic pressure and pollution.
Smart Images

Figure CN115146956B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of online car-hailing matching, and in particular relates to a method for matching passengers and vehicles in online car-hailing sharing. Background Art
[0002] Shared travel refers to a mode of transportation in which people can use other people's vehicles through sharing or carpooling without owning the vehicle, and pay a fee according to their own travel needs. On the one hand, shared travel meets consumers' "desirable" self-driving needs; on the other hand, it avoids the waste caused by the ineffective use of idle vehicle resources, and thus gradually becomes one of the main travel options for the public. In addition, as the number of cars continues to increase, shared travel will be further popularized to ease the pressure on urban traffic operations; at the same time, infrastructure construction continues to improve, and there is still considerable room for development in the shared travel market in the future.
[0003] Online-booked shared travel is an important part of shared travel. The specific process is as follows: before the trip, passengers reserve a taxi through mobile apps or websites and other service platforms according to their travel needs; during the trip, passengers share the reserved taxi with other passengers in a carpooling manner; after the trip, the passengers pay the corresponding fees to the driver through the service platform. In this process, the reasonable matching of the personnel (driver and multiple passengers) in the reserved vehicle by the service platform can greatly improve the travel efficiency of online-booked shared travel and optimize the travel experience of urban residents. Therefore, optimizing the matching process of online-booked shared travel personnel is of great significance to the promotion of this emerging mode of transportation.
[0004] For example, a method for matching people in online-booked shared travel based on network representation learning (application number CN201910262393.6) applies a network representation learning model to perform representation learning on a heterogeneous ridesharing network, obtains a low-dimensional vector representation of user nodes, calculates and sorts the cosine similarity between drivers and passengers: that is, travel time, location, route, number of people, etc., and selects the passenger with the highest similarity to the driver to complete the matching. A method for matching people to cars in online-booked ridesharing (application number CN201911006628.1) selects the matching relationship between ridesharing cars and users in a matching set according to the travel cost savings value, and takes the maximum travel cost savings of the matched ridesharing cars and users as the goal to obtain the people-to-car matching results. Although both of these existing inventions have studied the matching process of shared travel, the methods they propose are mainly aimed at the model of "one driver matching one passenger", and do not consider the more extensive situation of "one driver carrying multiple passengers at the same time". Summary of the invention
[0005] Technical problem: The present invention establishes a method for matching people and vehicles in online car-hailing shared travel, which is used to achieve reasonable and efficient matching between drivers and multiple passengers in online reserved taxis. The present invention first classifies users according to their carpooling requirements, and calculates the shortest travel time and path of various passenger combinations through the edge-cloud collaborative system; secondly, the present invention applies an integer linear programming algorithm to match passengers to form an optimal passenger combination plan; finally, the present invention supplements virtual passenger combinations or virtual drivers to make the number of passenger combinations the same as the number of drivers, and again applies an integer linear programming algorithm to match passenger combinations with drivers to obtain the optimal driver-passenger matching plan. The present invention can fully optimize the personnel matching process in online car-hailing shared travel, bringing users a better travel experience and higher travel efficiency. With the help of the present invention, online car-hailing shared travel, a green emerging mode of transportation, can be more widely promoted, which has a significant positive impact on alleviating urban traffic pressure and improving urban traffic pollution.
[0006] Technical solution: To solve the above problems, the present invention provides a method for matching people in online car-hailing shared travel, which includes the following steps:
[0007] 1) Users publish their ride-sharing needs through the App. The system cloud divides users into multiple user groups, pre-processes the information of each user group to form a data file and sends it to the App of the users in the group;
[0008] 2) After receiving the data file, the user calculates the shortest passenger travel time and travel route in the App and returns the result to the system cloud; the system cloud receives the result to solve the 0-1 planning model of the passenger combination matching process and screens out the passenger combination matching solution;
[0009] 3) Matching passenger combinations with drivers. The system cloud constructs a generalized driver set and a generalized passenger combination set, solves the 0-1 planning model of the driver-passenger combination matching process, and screens and obtains the driver-passenger combination matching solution;
[0010] 4) The system cloud sends the driver-passenger matching plan to the driver and user's App, executes the matching plan, and completes the online car-hailing shared trip.
[0011] Furthermore, in step 1), the travel information includes the starting point, the end point and the carpooling demand, and each user set is pre-processed. The system cloud forms a data file with the starting point and end point information in the user set and sends it to the smartphone App of the users in the set.
[0012] Furthermore, in step 2), the carpooling demand is a carpooling demand for two persons or a carpooling demand for three persons.
[0013] Further, the specific method in step 1) is as follows:
[0014] User i publishes online ride-sharing information through the App, including the starting point O of the trip i , travel destination D i and the carpooling demand N i ,The vehicle in the system is a five-seat car, which meets the needs of two-person and three-person carpooling;
[0015] Based on the user's carpooling needs, the system cloud divides users into two groups: RP A2 RP A3 , set RP A2 The user's carpooling demand is for two people to ride together, that is, N i =2, the number of users is |RP A2 |; Set RP A3 The user's carpooling demand is three people carpooling, that is, N i =3, the number of users is |RP A3 |;
[0016] By the number of users in the collection|RP A2 |、|RP A3 | is the dividend, and the shared ride demand N of the users in the set i =2, N i =3 is the divisor, and the remainder operation is performed to obtain the remainder |RP B2 |、|RP B3 |, that is:
[0017] |RP B2 |=|RP A2 |%2
[0018] |RP B3 |=|RP A3 |%3
[0019] Among them, % represents the remainder symbol;
[0020] System pair set RP A2 RP A3 Perform the following preprocessing:
[0021] RP for two people sharing a ride A2 : In the collection RP A2 Random Selection | RP B2 | users, the selected users constitute the set RP B2 , called secondary user set 2; the unselected users constitute the set RP 2 , called primary user set 2; and RP A2 =RP B2 ∪RP 2 , if the remainder |RP B2 |=0, then Then there is a set relation RP A2 =RP 2 ;
[0022] RP for three people sharing a ride A3 : In the collection RP A3 Random Selection | RP B3 | users; the selected users constitute the set RP B3 , called secondary user set 3; the unselected users constitute the set RP 3 , called primary user set 3; and RP A3 =RP B3 ∪RP 3 , if the remainder |RP B3 |=0, then Then there is a set relation RP A3 =RP 3 ;
[0023] After receiving the user's online ride-sharing information and completing the user set classification and preprocessing, the cloud aggregates the set RP 2 RP 3 The user's travel starting point and end point are extracted, and the travel time between all nodes is extracted to form two data files: File2 and File3. After the data files are formed, the cloud sends the data file File2 to the collection RP 2 All users in the group send the data file File3 to the collection RP 3 All users in .
[0024] Furthermore, in step 2), the user set RP that needs to share a ride with two people A2 The process of internally matching passenger combinations is:
[0025] 1) RP 2 The user in the game takes himself as the first passenger and calculates the shortest passenger travel time and travel path for all possible two-passenger combinations, and returns the calculation results to the system cloud;
[0026] User i∈RP 2 After receiving the data file File2 sent by the system cloud, the smartphone of user i takes user i as the first passenger and calculates the relationship between user i and any other user j∈RP 2 The shortest travel path and travel time of the two-passenger combination formed by \{i}, and the calculation results are returned to the system cloud. The calculation formula is as follows:
[0027] P ij = {O i →O j →D i →D j, O i →O j →D j →D i}
[0028] r ij = min{t(O i , O j )+t(O j , D i )+t(D i , D j ), t(O i , O j )+t(O j , D j )+t(D j , D i )}
[0029] As shown in the above formula, "user i is the first passenger" means that the starting point O of user i i As the starting point, let user i be the first passenger to get on the bus. The driver must first pick up two passengers, user i and j, and then send them to their destinations respectively;
[0030] In the formula, O i →O j →D i →D j , O i →O j →D j →D i The paths are represented by the nodes passed in sequence, and they are all possible travel paths for the two-passenger combination {i, j} when user i is the first passenger. ij represents the travel path set of the two-passenger combination {i, j} when user i is the first passenger, t(O i , O j ), t(O j , D i )、t(D i , D j ), t(O j , D j )、t(D i , D j ) represents the travel time between the two nodes in the brackets; t(O i , O j )+t(O j , D i )+t(D i , D j ), t(O i , O j )+t(O j , D j)+t(D j , D i ) represent the possible travel time of the two-passenger combination {i, j} when user i is the first passenger, r ij represents the shortest passenger travel time for a two-passenger combination {i, j} when user i is the first passenger;
[0031] Order RP 2 The number of users in |RP 2 |, then user i∈RP 2 With other users j∈RP 2 \{i}Form(|RP 2 |-1) two-passenger combination, user i∈RP 2 Smartphones need to be (|RP 2 |-1) or more calculations.
[0032] 2) The system cloud compares the shortest passenger travel time when different users are the first passengers in each two-passenger combination, and determines the shortest passenger travel time and travel path for each two-passenger combination;
[0033] Compare the shortest passenger travel time r when user i and user j are the first passengers within the two-passenger combination {i, j} ij and r ji , determine the shortest passenger travel time for this two-passenger combination And record The corresponding travel path formula is as follows:
[0034]
[0035] Since the "Primary User Set 2" RP 2 Can form possible two-passenger combination, the system cloud needs to More than one comparison;
[0036] 3) RP B2 The users in the group form a passenger group RP C2 , calculate the shortest passenger travel time for this passenger combination and travel routes;
[0037] Under the user's "two-person ride" demand, if |RP B2 |≠0, then |RP B2 |=1, that is, "Secondary User Set 2" RP B2 There is only one user in the system, let the user be m∈RP B2 ;
[0038] RP B2This user forms a passenger group, with RP C2 It is called "Secondary Passenger Group 2" and has RP C2 ={m}, "Secondary Passenger Group 2" RP C2 Shortest passenger travel time The corresponding travel path is Om→Dm;
[0039] Let {RP C2} means only RP C2 The passenger combination set of this 1 element is called secondary passenger combination set 2;
[0040] 4) Solve the matching problem of two-passenger combinations and obtain the matching solution for two-passenger sharing with the optimal total travel time;
[0041] For any user i∈RP 2 In the end, it can only communicate with another user j∈RP 2 \{i} forms a two-passenger combination with the goal of minimizing the total travel time of passengers. Under the user's demand for two-person ride sharing, the matching problem of the two-passenger combination can be transformed into a 0-1 planning model as follows:
[0042]
[0043]
[0044] In the formula, x ij is a 0-1 variable: In the model solution, if user i and user j form a two-passenger combination {i, j}, then x ij =1, otherwise x ij =0;
[0045] Since there is no constraint i≠j in the 0-1 programming model, there are repeated two-passenger combinations {i, i} and their related parameters in the model. With variable x ii However, in reality, user i cannot form a two-passenger combination with itself. In order to enable the 0-1 programming model to solve the two-passenger matching process, the shortest passenger travel time for the repeated two-passenger combination {i, i} is Set as follows:
[0046]
[0047] In the formula, Inf represents a positive infinite constant.
[0048] The Hungarian algorithm is used to solve the 0-1 programming model, and the solution vector is x = (x ij , i∈RP 2 , j∈RP 2 )T , filter out x ij =1 corresponding to the two-passenger combination, forming the passenger combination set RP 2_2 , called the main passenger combination set 2, the number of its set elements |RP 2_2 |=|RP 2 | / 2;
[0049] Let the set RC 2 =RP 2_2 ∪{RP C2}, which represents the passenger combination set formed by users who need to share a ride, namely RP 2_2 With {RP C2}, record set RC 2 The travel paths and travel times of each passenger combination in the set, the number of elements in the set |RC 2 | represents the number of passenger combinations under the demand of two-person ride sharing.
[0050] Furthermore, in step 2), the user set RP of the three-person carpooling demand A3 The process of internally matching passenger combinations is:
[0051] 1) System cloud in RP 3 A certain number of virtual users are added in advance to form a generalized user set RP E3 RP 3 The user in the game takes himself as the first passenger and calculates the shortest passenger travel time and travel path for all possible two-passenger combinations, and returns the calculation results to the system cloud;
[0052] In the case of a user's three-person ride, the number of passengers that need to be pre-supplied before matching is |RP 3 | / 3 virtual users, virtual users' travel starting point O i , End point D i All virtual nodes do not exist in the real urban road network, and the distance between them and any real node is positive infinity. 3 | / 3 virtual users constitute the virtual user set RP V3 , virtual user set RP V3 With RP 3 The union of is the generalized user set RP E3 , namely RP E3 =RP 3 ∪RP V3 , Inf represents a constant of positive infinity;
[0053] User i∈RP 3After receiving the data file File3 sent by the cloud, the smartphone of user i takes user i as the first passenger and calculates the value between user i and any other user j∈RP 3 The shortest travel path and travel time of the two-passenger combination formed by \{i}, and the calculation results are returned to the system cloud. The calculation formula is as follows:
[0054] P ij = {O i →O j →D i →D j , O i →O j →D j →D i}
[0055] r ij = min{t(O i , O j )+t(O j , D i )+t(D i , D j ), t(O i , O j )+t(O j , D j )+t(D j , D i )}
[0056] As shown in the above formula, user i is the first passenger, that is, the starting point O of user i i As the starting point, user i is the first passenger to board the bus. The driver first picks up two passengers, user i and j, and then sends them to their destinations respectively;
[0057] In the formula, O i →O j →D i →D j , O i →O j →D j →D i The paths are represented by the nodes passed in sequence, and they are all possible travel paths for the two-passenger combination {i, j} when user i is the first passenger. ij represents the travel path set of the two-passenger combination {i, j} when user i is the first passenger, t(O i , O j ), t(O j , D i )、t(D i , D j ), t(O j , D j)、t(D i , D j ) represents the travel time between the two nodes in the brackets, t(O i , O j )+t(O j , D i )+t(D i , D j ), t(O i , O j )+t(O j , D j )+t(D j , D i ) represent the possible travel time of the two-passenger combination {i, j} when user i is the first passenger, r ij represents the shortest passenger travel time for a two-passenger combination {i, j} when user i is the first passenger;
[0058] Order RP 3 The number of users in |RP 3 |, then user i∈RP 3 With other users j∈RP 3 \{i}Form(|RP 3 |-1) two-passenger combination, user i∈RP 3 Smartphones need to be (|RP 3 |-1) or more calculations.
[0059] 2) The system cloud compares the shortest passenger travel time when different users are the first passengers in each two-passenger combination, and determines the shortest passenger travel time and travel path for each two-passenger combination;
[0060] Within a two-passenger combination {i, j}, the system compares the shortest passenger travel time r when user i and user j are the first passengers. ij and r ji , determine the shortest passenger travel time for this two-passenger combination And record The corresponding travel path formula is as follows:
[0061]
[0062] Since the "Main User Set 3" RP 3 Can form possible two-passenger combination, the system cloud needs to More than one comparison.
[0063] 3) Set the "Secondary User Set 3" RP B3 All users in the group form a passenger group RP C3, calculate the shortest passenger travel time for this passenger combination and travel routes;
[0064] Under the user's "three-person ride" demand, if |RP B3 |≠0, then |RP B3 |=1or|RP B3 |=2, that is, "secondary user set" RP B3 There are 1 or 2 users in the group, which will be grouped into RP B3 All users in the group form a passenger group, with RP C3 Denote, called "Secondary Passenger Combination 3", let Represents passenger combination RP C3 The shortest passenger travel time, let {RP C3} means only passenger combination RP is included C3 The passenger combination set of this 1 element is called "secondary passenger combination set 3";
[0065] If the set RP B3 There is one user in the system, let m∈RP B3 , then "Secondary Passenger Group 3" RP C3 ={m},RP C3 Shortest passenger travel time The corresponding travel path is O m →D m ;
[0066] If the set RP B3 There are 2 users, which can be represented as m 1 , m 2 ∈RP B3 , then "Secondary Passenger Group 3" RP C3 ={m 1 , m 2}, is a two-passenger combination, RP C3 Shortest passenger travel time That is, the two-passenger combination {m 1 , m 2}Shortest passenger travel time We also need to calculate m separately 1 、m 2 Shortest passenger travel time when first passenger Then compare and get the two-passenger combination {m 1 , m 2}Shortest passenger travel time And record The corresponding travel path;
[0067] 4) Solve the first passenger combination matching problem under the user's "three-person ride" demand. In the generalized user set RP E3 Medium Match | RP E3 | / 2 generalized two-passenger combinations, and then select |RP from the generalized two-passenger combinations 3 | / 2 real two-passenger combinations, |RP 3 | / 2 real users in a mixed two-passenger combination;
[0068] Let real users and virtual users be collectively referred to as generalized users;
[0069] If passengers i and j in a two-passenger combination {i, j} are both real users, then {i, j} is a real two-passenger combination; if passenger i in a two-passenger combination {i, j} is a real user and passenger j is a virtual user, or passenger i is a virtual user and passenger j is a real user, then {i, j} is a mixed two-passenger combination; if passengers i and j in a two-passenger combination {i, j} are both virtual users, then {i, j} is a virtual two-passenger combination. Let real two-passenger combinations, mixed two-passenger combinations, and virtual two-passenger combinations be collectively referred to as generalized two-passenger combinations;
[0070] The first passenger combination matching process under the user's three-person ride-sharing demand, in the generalized user set RP E3 Medium Match | RP E3 | / 2 generalized two-passenger combinations, for any generalized user i∈RP E3 In the end, it can only communicate with another generalized user j∈RP E3 \{i} forms a generalized two-passenger combination, with the goal of minimizing the total travel time of passengers. The matching problem of the generalized two-passenger combination can be transformed into a 0-1 programming model as follows:
[0071]
[0072]
[0073] In the formula, x ij is a 0-1 variable; in the model solution, if generalized user i and generalized user j form a generalized two-passenger combination {i, j}, then x ij =1, otherwise x ij =0;
[0074] Since there is no constraint i≠j in the 0-1 programming model, there are not only repeated two-passenger combinations {i, i} and their related parameters in the 0-1 programming model With variable x ii , there are also virtual users and possible mixed two-passenger combinations and virtual two-passenger combinations;
[0075] In order to match as many real two-passenger combinations as possible and enable the 0-1 programming model to solve the first passenger matching process of "three-passenger carpooling", let Inf represent a positive infinite constant, and set the shortest passenger travel time for any generalized two-passenger combination {i, j} as follows:
[0076] If i∈RP 3 , j∈RP 3 And i≠j, then it is a real two-passenger combination, and its shortest passenger travel time is
[0077] If i∈RP 3 , j∈RP V3 or j∈RP 3 , i∈RP V3 , then it is a mixed two-passenger combination, and its shortest passenger travel time is Inf;
[0078] If i∈RP V3 , j∈RP V3 And i≠j, then it is a virtual two-passenger combination, and its shortest passenger travel time is 2*Inf;
[0079] For a repeated two-passenger combination {i, i}, its shortest passenger time Set to 2*Inf;
[0080] The Hungarian algorithm is used to solve the 0-1 programming model, and the solution vector is x = (x ij , i∈RP E3 , j∈RP E3 ) T , filter out x ij =1 corresponds to 2*(|RP 3 | / 3) generalized two-passenger combinations, among which |RP 3 | / 3 real two-passenger combinations, |RP 3 | / 3 mixed two-passenger combinations;
[0081] Put this | RP 3 | / 3 real two-passenger combinations are selected to construct the real two-passenger combination set RP 3_2 , number of set elements | RP 3_2 |=|RP 3 | / 3;
[0082] Then |RP 3 | / 3 real users from the mixed two-passenger combination are screened out to construct the user set RP 3_1 , number of set elements | RP 3_1 |=|RP 3| / 3;
[0083] After the system completes the first passenger combination matching of "three-person ride" in the cloud, it extracts the real two-passenger combination set RP 3_2 The starting point and destination of each real two-passenger combination of two users form a data file File3_2; extract the user set RP 3_1 The starting point and end point of each user in the data file File3_1 is formed;
[0084] After the data files are formed, the cloud sends the data files File3_1 and File3_2 to RP again 3 All smartphones of users in
[0085] 5) RP 3 The user in the game takes himself as the first passenger and calculates the shortest passenger travel time and travel path for all possible three-passenger combinations, and returns the calculation results to the system cloud;
[0086] In the first passenger combination matching process of "three-person ride", the real two-passenger combination set RP was obtained 3_2 With user set RP 3_1 , let the real two-passenger combination {i, j}∈RP 3_2 , real user k∈RP 3_1 , then user i, user j, and user k form a three-passenger combination {i, j, k};
[0087] The steps to calculate the shortest passenger travel time for a three-passenger combination fi, j, k} are as follows;
[0088] User i, j ∈ {i, j}, {i, j} ∈ RP 3_2 With user k∈RP 3_1 The smartphone receives the data files File3_1 and File3_2 sent by the cloud. After receiving the files File3_1 and File3_2, the smartphone of user i takes user i as the first passenger, calculates the shortest travel path and travel time of the three-passenger combination formed by user i, user j, and user k, and returns the calculation results to the system cloud. The calculation formula is as follows:
[0089]
[0090]
[0091] As shown in the above formula, in order to meet the user's three-person carpooling needs, the driver first picks up three passengers and then sends them to their destinations separately. In the formula, P ijk represents the travel path set of the three-passenger combination {i, j, k} when user i is the first passenger; where element O j →Oi →O k →D i →D j →D k are all paths, represented by the nodes passed through in sequence, r ijk represents the shortest passenger travel time of the three-passenger combination {i, j, k} when user i is the first passenger; where element t(O k , O j )+t(O j , O i )+t(O i , D i )+t(D i , D j )+t(D j , D k ) represent the possible travel time of the three-passenger combination {i, j, k};
[0092] "Main User Set 3" RP 3 The number of users in |RP 3 |, then the real two-passenger combination {i, j}∈RP 3_2 With user k∈RP 3_1 Can be formed | RP 3 | / 3 three-passenger combination, that is, the smartphones of users i, j, and k all need to perform |RP 3 | / 3 or more calculations.
[0093] 6) The system cloud compares the shortest passenger travel time when different users are the first passengers in each three-passenger combination, and determines the shortest passenger travel time and travel path for each three-passenger combination;
[0094] Within the three-passenger combination {i, j, k}, the system compares the shortest passenger travel time r when user i, user j, and user k are the first passengers. ijk 、r jik 、r kij , determine the shortest passenger travel time for this three-passenger combination And record The corresponding travel path formula is as follows:
[0095]
[0096] Since the real two-passenger combination RP 3_2 and user set RP 3_1 Can form possible two-passenger combination, the system cloud needs to More than one comparison.
[0097] 7) Solve the second passenger combination matching problem of three people sharing a ride, and obtain the three-person passenger matching solution with the optimal total passenger travel time;
[0098] For any two-passenger combination {i, j}∈RP 3_2 In the end, it can only communicate with another user k∈RP 3_1 A three-passenger combination is formed with the goal of minimizing the total travel time of passengers. Under the user's demand for three-person ride sharing, the matching problem of the three-passenger combination can be transformed into a 0-1 planning model as follows:
[0099]
[0100]
[0101] In the formula, x ijk is a 0-1 variable; in the model solution, if the two-passenger combination {i, j} and user k form a three-passenger combination {i, j, k}, then x ijk =1, otherwise x ijk =0;
[0102] The Hungarian algorithm is used to solve the 0-1 programming model, and the solution vector is x = (x ijk , {i, j}∈RP 3_2 , k∈RP 3_1 ) T , filter out x ijk =1 corresponds to a three-passenger combination, forming the passenger combination set RP 3_3 , called the main passenger combination set 3, the number of its set elements |RP 3_3 |=|RP 3 | / 3;
[0103] Let the set RC 3 =RP 3_3 ∪{RP C3}, representing the passenger combination set formed by users who need to share a ride with three people, namely RP 3_3 With RP C3 The union of the record set RC 3 The travel paths and travel times of each passenger combination in the set, the number of elements in the set |RC 3 | represents the number of passenger combinations under the demand of three-person ride sharing;
[0104] Let RC represent the passenger combination set formed by all users in the system, which is the union of the passenger combination sets formed by users who want to share a ride with two or three people, that is, RC = RC 2 ∪RC 3 , the number of set elements |RC| represents the number of passenger combinations in the system.
[0105] Furthermore, in step 3), the process of matching passenger combinations within each passenger set is as follows:
[0106] 5.1) Match the passenger combinations and drivers in the system to form driver-passenger combinations, and calculate the travel time and travel path of each driver-passenger combination;
[0107] 5.2) Supplement a preset number of driver or passenger combinations so that the number of passenger combinations participating in the matching is equal to the number of drivers, solve the matching problem of driver and passenger combinations, and obtain the driver and passenger matching solution with the optimal total travel time.
[0108] Further, the method of step 5.1) is as follows:
[0109] Let V represent the set of drivers in the system, and the number of set elements |V| represents the number of drivers in the system;
[0110] For any driver v∈V, let V_O v represents the current position of v; for any passenger combination e∈RC, let C_O e , C_D e represents the starting point and end point of the combined travel path of passenger e, C_T e represents the combined travel time of passengers of e;
[0111] Driver v∈V is matched with passenger combination e∈RC to form a driver-passenger combination {v, e}, whose travel trajectory is: driver v starts from the current position V_O v Departure to C_O e Pick up the first passenger and continue to C_D e All passengers alight;
[0112] Let p ve Denote the travel path of the driver-passenger combination {v, e}, let t ve It represents the path travel time of the driver-passenger combination {v, e}, that is, the driver-passenger travel time, and the calculation formula is:
[0113] p ve = {VO v →CO e →CD e}
[0114] t ve =t(V_O v , C_O e )+C_T e
[0115] In the formula, p ve Indicates that the driver is moving from the current position V_O v To C_D e The travel path of t(V_Ov , C_O e ) indicates that the driver v moves from the current position V_O v To the starting point C_O of the travel path of passenger combination e e The travel time required;
[0116] The number of drivers in the system is |V|, and the number of passenger combinations is |RC|. There are |V|·|RC| possible driver-passenger combinations, and the travel time of |V|·|RC| drivers and passengers is calculated.
[0117] Furthermore, in step 5.2), the method of supplementing a preset number of driver or passenger combinations so that the number of passenger combinations participating in matching is equal to the number of drivers is as follows:
[0118] Let the real driver and the virtual driver be collectively referred to as the generalized driver, the real passenger combination and the virtual passenger combination be collectively referred to as the generalized passenger combination, and the generalized driver and the generalized passenger combination can be matched to form a generalized driver-passenger combination;
[0119] If the driver v in the driver-passenger combination {v, e} is a real driver and the passenger combination e is a real passenger combination, then let {v, e} be the real driver-passenger combination; otherwise, let {v, e} be the virtual driver-passenger combination. The real driver-passenger combination and the virtual driver-passenger combination are collectively referred to as the generalized driver-passenger combination.
[0120] Let Inf represent a positive infinite constant, add a certain number of virtual drivers or virtual passenger combinations according to the actual situation, and construct a generalized driver set and a generalized passenger combination set. The specific processing is as follows:
[0121] If the number of real passenger combinations is greater than the number of real drivers, that is, |RC|>|V|, then (|RC|-|V|) virtual drivers are added to the driver set V to form the generalized driver set V g , generalized passenger combination set RC g Equal to the passenger combination set RC, that is, RC g =RC, virtual driver v and any generalized passenger combination e∈RC g The driver and passenger travel time t ve =Inf;
[0122] If the number of real passenger combinations is less than the number of real drivers, that is, |RC|<|V|, then (|V|-|RC|) virtual passenger combinations are added to the passenger combination set RC to form a generalized passenger combination set RC. g , the generalized driver set V g Equal to the driver set V, that is, V g = V, virtual passenger combination e and any generalized driver v∈V g The driver and passenger travel time t ve =Inf.
[0123] Furthermore, for the generalized driver set and the generalized passenger combination set, driver-passenger combination matching is performed as follows:
[0124] For any generalized driver v∈V g , which can ultimately only be combined with a generalized passenger e∈RC g The generalized driver-passenger combination is formed, with the goal of minimizing the total travel time of the driver and passengers. The matching problem of the driver-passenger combination can be transformed into a 0-1 planning model as follows:
[0125]
[0126]
[0127] In the formula, y ve is a 0-1 variable: In the model solution, if the generalized driver v and the generalized passenger combination e constitute the generalized driver-passenger combination {v, e}, then y ve =1, otherwise y ve =0;
[0128] The Hungarian algorithm is used to solve the 0-1 programming problem, and the solution vector is y = (y ve , v∈V g , e∈RC g ) T , filter out ve =1, forming the generalized driver-passenger combination set VRC g , and then filter out the set VRC g The real driver-passenger combinations in the dataset are constructed to construct a driver-passenger combination set VRC, where the number of set elements |VRC| is equal to the minimum value of the number of passenger combinations |RC| and the number of drivers |V|, that is, |VRC|=min{|RC|, |V|}, and the travel path and travel time of each driver-passenger combination are recorded.
[0129] The above method realizes the matching of people and vehicles. The system cloud sends the matching results and travel routes to the driver and passenger's mobile apps in the form of orders. After the driver accepts the order, he drives according to the travel route given in the order and picks up and drops off passengers in order. The user waits to get on the car at the original location, and pays a certain fee to the driver according to the price calculated by the App after getting off at the destination. When the last passenger gets off and completes the payment, this online shared trip is completed. BRIEF DESCRIPTION OF THE DRAWINGS
[0130] Figure 1 is a flow chart of the method of the present invention;
[0131] Figure 2 A flow chart for matching passenger combinations under the demand of "two-person ride sharing";
[0132] Figure 3 The flowchart for matching passenger combinations under the demand of “three-person ride”. DETAILED DESCRIPTION
[0133] The present invention will be further described below in conjunction with examples and accompanying drawings.
[0134] The present invention provides a method for matching passengers and vehicles in a shared online car-hailing service. Figure 1 As shown, the following process is included:
[0135] 1. Users publish online ride-sharing information through mobile apps, including the starting point, end point, and ride-sharing needs. The system divides users into multiple user groups based on their ride-sharing needs and pre-processes each user group. The system cloud converts the starting point, end point, and other information in the user group into a data file and sends it to the smartphones of the users in the group.
[0136] The cloud of the system stores the real-time travel data of the pick-up and drop-off points of online ride-sharing in the example city. At a certain moment, there are 26 users in the system publishing ride-sharing demands through the mobile app. The number of users who have the demand for "two-person ride" and "three-person ride" is 7, forming the set RP A2 RP A3 The information of each user set is shown in Table 1.
[0137] Table 1 Passenger collection information
[0138]
[0139] Easy to get:
[0140] |RP A2 |=7,|RP B2 |=|RP A2 |%2=1
[0141] |RP A3 |=7,|RP B3 |=|RP A3 |%3=1
[0142] Due to |RP B2 |、|RP B3 | are not 0, select passengers. To deal with this possible situation, the system will pre-process the passenger set:
[0143] Two-person ride: Collect RP A2 Random Selection | RP B2 | = 1 user, forming the set RP B2 . User No. 5 who finally chooses "Two-person ride" and "Secondary User Set 2" RP B2={5}, the remaining users constitute the "main user set 2" RP 2 .
[0144] Three people sharing a ride: Collect RP A3 Random Selection | RP B3 | = 1 passenger, forming the set RP B3 . User No. 2 who finally chooses "Three-person ride", "Secondary User Set 3" RP B3 ={2}, the remaining users constitute the "primary user geometry 3" RP 3 .
[0145] After receiving the user's online ride-sharing information and completing the user set classification and preprocessing, the cloud aggregates the set RP 2 RP 3 The starting and ending points of users’ trips are collected, and the travel time between these nodes is extracted to form two data files: File2 and File3.
[0146] After the data file is formed, the cloud sends the data file File2 to the collection RP 2 All users' smartphones in the group send the data file File3 to the collection RP 3 All users' smartphones.
[0147] 2. User Set RP for "Two-person Carpooling" and "Three-person Carpooling" Demands A2 RP A3 Internal matching of passenger combinations. First, the user receives the data file, calculates the shortest passenger travel time and travel path for a two-passenger combination with the current user as the first passenger, and returns the result to the cloud; secondly, the system cloud receives the result, solves the 0-1 planning model of the passenger combination matching process, and screens and obtains the passenger combination matching solution.
[0148] 1. Two people sharing a ride
[0149] 1) Taking the current passenger as the first passenger, calculate the shortest passenger travel time and path for a two-passenger combination.
[0150] User i∈RP 2 The smartphone receives the data file File2 sent by the cloud. After receiving File2, the smartphone of user i takes user i as the first passenger and calculates the RP between user i and other users j∈RP 2 The shortest travel path and travel time of the two-passenger combination formed by \{i}, and the calculation results are returned to the system cloud. The calculation formula is as follows:
[0151] P ij = {O i →O j →D i→D j , O i →O j →D j →D i}
[0152] r ij = min{t(O i , O j )+t(O j , D i )+t(D i , D j ), t(O i , O j )+t(O j , D j )+t(D j , D i )}
[0153] As shown in the above formula, "user i is the first passenger" means that the starting point O of user i i As the starting point, user i is the first passenger to board the car. In order to meet the user's "two-person ride" demand, the driver needs to first pick up passengers i and j, and then send them to their destinations separately. i →O j →D i →D j , O i →O j →D j →D i The paths are represented by the nodes passed in sequence, and they are all possible travel paths for the two-passenger combination {i, j} when user i is the first passenger. ij represents the travel path set of the two-passenger combination {i, j} when user i is the first passenger. i , O j ), t(O j , D i )、t(D i , D j ), t(O j , D j )、t(D i , D j ) represents the travel time between the two nodes in the brackets; t(O i , O j )+t(O j , D i )+t(D i , D j ), t(O i , O j )+t(O j , D j)+t(D j , D i ) represent the possible travel time of the two-passenger combination {i, j} when user i is the first passenger. ij It represents the shortest passenger travel time for the two-passenger combination {i, j} when user i is the first passenger.
[0154] Order RP 2 The number of users in |RP 2 |,|RP 2 |=6, then user i∈RP 2 With other users j∈RP 2 \{i}Form(|RP 2 |-1) two-passenger combination, user i∈RP 2 Smartphones need to be (|RP 2 |-1) or more calculations.
[0155] 2) The system compares the shortest passenger travel times when different users are the first passengers in each two-passenger combination, and determines the shortest passenger travel time and travel path for each two-passenger combination.
[0156] Within a two-passenger combination {i, j}, the system compares the shortest passenger travel time r when user i and user j are the first passengers. ij and r ji , determine the shortest passenger travel time for this two-passenger combination And record The corresponding travel path. The formula is as follows:
[0157]
[0158] Since the "Primary User Set 2" RP 2 Can form possible two-passenger combination, the system cloud needs to More than one comparison.
[0159] A two-passenger combination {i, j} exists where “user j∈RP 2 \{i}", but the subsequent 0-1 planning model has parameters about the two-passenger combination {i, i} With variable x ii To this end, set Inf=999 in the system, then:
[0160]
[0161] After calculation, the shortest passenger travel time for the two-passenger combination is:
[0162] Table 2 Shortest passenger travel time for two-passenger combinations (“two-passenger sharing”)
[0163] passenger 0 1 2 3 4 6 0 999 106.74 144.92 145.88 59.54 76.98 1 106.74 999 67.91 116.58 58.31 108.13 2 144.92 67.91 999 154.82 121.68 88.94 3 145.88 116.58 154.82 999 124.79 83.46 4 59.54 58.31 121.68 124.79 999 45.43 6 76.98 108.13 88.94 83.46 45.43 999
[0164] 3) Set RP B2 All users in the group form a passenger group RP C2 , calculate the shortest passenger travel time for this passenger combination and travel routes.
[0165] Under the user's demand for "two-person ride", |RP B2 |=1,RP B2 ={5}; Set RP B2 All users in the group form a passenger group, with RP C2 Indicates that there is RP C2 ={5}, then The path is 332→119. Let {RP C2} represents passenger combination RP C2 The passenger combination set formed.
[0166] 4) Solve the matching problem of two-passenger combinations and obtain the "two-passenger carpooling" passenger matching solution with the optimal total travel time.
[0167] For any user i∈RP 2 In the end, it can only communicate with another user j∈RP 2 \{i} forms a two-passenger combination. With the goal of minimizing the total passenger travel time, under the user's "two-person ride" demand, the matching problem of the two-passenger combination can be transformed into a 0-1 planning model as follows:
[0168]
[0169]
[0170] In the formula, x ij is a 0-1 variable: In the model solution, if user i and user j form a two-passenger combination {i, j}, then x ij =1, otherwise x ij =0.
[0171] Since there is no constraint i≠j in the 0-1 programming model, there are repeated two-passenger combinations {i, i} and their related parameters in the model. With variable x ii However, in reality, user i cannot form a two-passenger combination with itself. In order to enable the 0-1 programming model to solve the two-passenger matching process, the shortest passenger travel time for the repeated two-passenger combination {i, i} is Set as follows:
[0172]
[0173] Where, Inf=999.
[0174] The Hungarian algorithm is used to solve the 0-1 programming model, and the solution vector is x = (x ij , i∈RP 2 , j∈RP 2 ) T , filter out x ij =1 corresponding to the two-passenger combination, forming the passenger combination set RP 2_2 , called the main passenger combination set 2, the number of its set elements |RP 2_2 |=|RP 2 | / 2=3.
[0175] Let the set RC 2 =RP 2_2 ∪{RP C2}, which represents the passenger combination set formed by users who need to share a ride, namely RP 2_2 With {RP C2}. Record set RC 2 The travel paths and travel times of each passenger combination in the set, the number of elements in the set |RC 2 | represents the number of passenger combinations under the demand of two-person ride sharing.
[0176] RC 2 The travel paths and travel times of the passenger combination are shown in Table 3.
[0177] Table 3 Passenger matching results for “two-person ride”
[0178]
[0179] 2. Three people sharing a ride
[0180] 1) System cloud in RP 3 A certain number of virtual users are added in advance to form a generalized user set RP E3 RP 3 The user in the system takes himself as the first passenger and calculates the shortest passenger travel time and travel path for all possible two-passenger combinations, and returns the calculation results to the system cloud.
[0181] In the case of a user's three-person ride, the number of passengers that need to be pre-supplied before matching is |RP 3 | / 3 virtual users, virtual users' travel starting point O i , End point D iAll are virtual nodes; virtual nodes do not exist in the real urban road network, and the distance between them and any real node is positive infinity. |RP 3 | / 3 virtual users constitute the virtual user set RP V3 , virtual user set RP V3 With RP 3 The union of is the generalized user set RP E3 , namely RP E3 =RP 3 ∪RP V3 , Inf represents a constant of positive infinity.
[0182] User i∈RP 3 The smartphone receives the data file File3 sent by the cloud. After receiving File3, the smartphone of user i takes user i as the first passenger and calculates the RP between user i and other users j∈RP 3 The shortest travel path and travel time of the two-passenger combination formed by \{i}, and the calculation results are returned to the system cloud. The calculation formula is as follows:
[0183] P ij = {O i →O j →D i →D j , O i →O j →D j →D i}
[0184] r ij = min{t(O i , O j )+t(O j , D i )+t(D i , D j ), t(O i , O j )+t(O j , D j )+t(D j , D i )}
[0185] As shown in the above formula, user i is the first passenger, that is, the starting point O of user i i As the starting point, user i is the first passenger to board the bus. The driver first picks up two passengers, user i and j, and then sends them to their destinations. i →O j →D i →D j , O i →O j →D j→D i The paths are represented by the nodes passed in sequence, and they are all possible travel paths for the two-passenger combination {i, j} when user i is the first passenger. ij represents the travel path set of the two-passenger combination {i, j} when user i is the first passenger, t(O i , O j ), t(O j , D i )、t(D i , D j ), t(O j , D j )、t(D i , D j ) represents the travel time between the two nodes in the brackets, t(O i , O j )+t(O j , D i )+t(D i , D j ), t(O i , O j )+t(O j , D j )+t(D j , D i ) represent the possible travel time of the two-passenger combination {i, j} when user i is the first passenger, r ij It represents the shortest passenger travel time for the two-passenger combination {i, j} when user i is the first passenger.
[0186] Order RP 3 The number of users in |RP 3 |,|RP 3 |=6, then user i∈RP 3 With other users j∈RP 3 \{i}Form(|RP 3 |-1) two-passenger combination, user i∈RP 3 Smartphones need to be (|RP 3 |-1) or more calculations.
[0187] 2) The system cloud compares the shortest passenger travel time when different users are the first passengers in each two-passenger combination, and determines the shortest passenger travel time and travel path for each two-passenger combination.
[0188] Within a two-passenger combination {i, j}, the system compares the shortest passenger travel time r when user i and user j are the first passengers. ij and r ji , determine the shortest passenger travel time for this two-passenger combination And record The corresponding travel path. The formula is as follows:
[0189]
[0190] Since the "Main User Set 3" RP 3 Can form possible two-passenger combination, the system cloud needs to More than one comparison.
[0191] Let real users and virtual users be collectively referred to as generalized users.
[0192] If passengers i and j in a two-passenger combination {i, j} are both real users, then {i, j} is a real two-passenger combination; if passenger i in a two-passenger combination {i, j} is a real user and passenger j is a virtual user, or passenger i is a virtual user and passenger j is a real user, then {i, j} is a mixed two-passenger combination; if passengers i and j in a two-passenger combination {i, j} are both virtual users, then {i, j} is a virtual two-passenger combination. Let real two-passenger combinations, mixed two-passenger combinations, and virtual two-passenger combinations be collectively referred to as generalized two-passenger combinations.
[0193] The generalized two-passenger combination {i, j} also has a "generalized user j∈RP E3 \{i}", but the 0-1 programming model does not constrain i≠j. Therefore, the 0-1 programming model not only has repeated two-passenger combinations {i, i} and their related parameters With variable x ii There are also virtual users and possible mixed two-passenger combinations and virtual two-passenger combinations.
[0194] In order to make the subsequent 0-1 programming model solve the first passenger matching process of "three-person ride" as much as possible, the shortest passenger travel time for any generalized two-passenger combination {i, j} is set as follows:
[0195] If i∈RP 3 , j∈RP 3 And i≠j, then it is a real two-passenger combination, and its shortest passenger travel time is
[0196] If i∈RP 3 , j∈RP V3 or j∈RP 3 , i∈RP V3 , then it is a mixed two-passenger combination, and its shortest passenger travel time is Inf = 999;
[0197] If i∈RP V3, j∈RP V3 And i≠j, then it is a virtual two-passenger combination, and its shortest passenger travel time is 2*Inf=1998.
[0198] For a repeated two-passenger combination {i, i}, its shortest passenger time Set to 2*Inf=1998.
[0199] At this time, the shortest passenger travel time of the generalized two-passenger combination is shown in Table 4:
[0200] Table 4 Shortest passenger travel time for generalized two-passenger combinations (“three-passenger sharing”)
[0201] passenger 0 1 3 4 5 6 -1 -2 0 1998 103.42 113.34 95.9 166.08 130.81 999 999 1 103.42 1998 54.36 132.15 38.77 105.15 999 999 3 113.34 54.36 1998 52.25 166.98 86.4 999 999 4 95.9 132.15 52.25 1998 80.15 119.8 999 999 5 166.08 38.77 166.98 80.15 1998 108.71 999 999 6 130.81 105.15 86.4 119.8 108.71 1998 999 999 -1 999 999 999 999 999 999 1998 1998 -2 999 999 999 999 999 999 1998 1998
[0202] The passengers with negative serial numbers in Table 4 are all virtual passengers.
[0203] 3) Set the "Secondary User Set 3" RP B3 All users in the group form a passenger group RP C3 , calculate the shortest passenger travel time for this passenger combination and travel routes.
[0204] Under the user's demand for "three-person ride", |RP B3 |=1,RP B3 ={2}; Set RP B3 All users in the group form a passenger group, with RP C3 Indicates that there is a "Secondary Passenger Set 3" RP C3 ={2}, then The path is 463→92. Let {RP C3} represents passenger combination RP C3 The formed passenger combination set is called "secondary passenger combination set 3".
[0205] 4) Solve the first passenger combination matching problem under the user's "three-person ride" demand. In the generalized user set RP E3 Medium Match | RP E3 | / 2 generalized two-passenger combinations, and filter out |RP 3 | / 2 real two-passenger combinations, |RP 3 | / 2 Real users in a mixed duo passenger group.
[0206] The first passenger combination matching process under the user's "three-person ride" demand requires the generalized user set RP E3 Medium Match | RP E3 | / 2 generalized two-passenger combinations. For any generalized user i∈RP E3In the end, it can only communicate with another generalized user j∈RP E3 \{i} forms a generalized two-passenger combination. With the goal of minimizing the total travel time of passengers, the matching problem of the generalized two-passenger combination can be transformed into a 0-1 programming model as follows:
[0207]
[0208]
[0209] In the formula, x ij is a 0-1 variable; in the model solution, if generalized user i and generalized user j form a generalized two-passenger combination {i, j}, then x ij =1, otherwise x ij =0.
[0210] The Hungarian algorithm is used to solve the 0-1 programming model, and the solution vector is x = (x ij , i∈RP E3 , j∈RP E3 ) T , filter out x ij =1 corresponds to 2*(|RP 3 | / 3) generalized two-passenger combinations, among which |RP 3 | / 3 real two-passenger combinations, |RP 3 | / 3 mixed two-passenger combinations.
[0211] Put this | RP 3 | / 3 real two-passenger combinations are selected to construct the real two-passenger combination set RP 3_2 , number of set elements | RP 3_2 |=|RP 3 | / 3=2.
[0212] Then |RP 3 | / 3=4 real users from the mixed two-passenger combination are selected to construct the user set RP 3_1 , number of set elements | RP 3_1 |=|RP 3 | / 3=2.
[0213] The processed set RP 3_2 and RP 3_1 They are:
[0214] RP 3_2 ={{1,5},{3,4}}
[0215] RP 3_1 ={0,6}
[0216] After the system cloud completes the first passenger combination matching of "three people sharing a ride", the set RP is extracted 3_2 The starting point and destination of each real two-passenger combination of two users form a data file File3_2; extract the set RP 3_1 The starting point and end point of each user in the cloud are used to form the data file File3_1. After the data file is formed, the cloud sends the data files File3-1 and File3-2 to the collection RP again. 3 All users' smartphones.
[0217] 5) Taking the current passenger as the first passenger, calculate the shortest passenger travel time and travel path for a combination of three passengers.
[0218] The first passenger combination matching process of "three-person ride" can obtain the real two-passenger combination set RP 3_2 With user set RP 3_1 Let the real two-passenger combination {i, j}∈RP 3_2 , real user k∈RP 3_1 , then user i, user j, and user k can form a three-passenger combination {i, j, k}.
[0219] The steps to calculate the shortest passenger travel time for a three-passenger combination {i, j, k} are as follows:
[0220] User i, j ∈ {i, j}, {i, j} ∈ RP 3_2 With user k∈RP 3_1 The smartphone receives the data files File3_1 and File3_2 sent by the cloud.
[0221] After receiving the files File3_1 and File3_2, the smartphone of user i takes user i as the first passenger and calculates the shortest travel path and travel time for the three-passenger combination of user i, user j, and user k. The calculation results are returned to the system cloud. The calculation formula is as follows:
[0222]
[0223]
[0224] As shown in the above formula, in order to meet the user's "three-person ride" demand, the driver needs to pick up three passengers first and then send them to their destinations separately. ijk represents the travel path set of the three-passenger combination {i, j, k} when user i is the first passenger; the element O j →O i →O k →D i →D j →D ketc. are all paths, represented by the nodes passed through in sequence. ijk represents the shortest passenger travel time of the three-passenger combination {i, j, k} when user i is the first passenger; where element t(O k , O j )+t(O j , O i )+t(O i , D i )+t(D i , D j )+t(D j , D k ) etc. represent the possible travel time of the three-passenger combination {i, j, k}.
[0225] 6) The system cloud compares the shortest passenger travel time when different users are the first passengers in each three-passenger combination, and determines the shortest passenger travel time and travel path for each three-passenger combination.
[0226] Within the three-passenger combination {i, j, k}, the system compares the shortest passenger travel time r when user i, user j, and user k are the first passengers. ijk 、r jik 、r kij , determine the shortest passenger travel time for this three-passenger combination And record The corresponding travel path. The formula is as follows:
[0227]
[0228] Since the real two-passenger combination RP 3_2 and user set RP 3_1 Can form possible two-passenger combination, the system cloud needs to More than one comparison.
[0229] After calculation, the shortest passenger travel time for the three-passenger combination is shown in Table 5:
[0230] Table 5 Shortest passenger travel time for three-passenger combinations (“three-passenger ride”)
[0231] passenger {1,5} {3,4} 0 112.0334 133.7166 6 102.3588 133.9529
[0232] 7) Solve the second passenger combination matching problem of "three-person carpooling" and obtain the "three-person carpooling" passenger matching solution with the optimal total passenger travel time.
[0233] For any two-passenger combination {i, j}∈RP 3_2 In the end, it can only communicate with another user k∈RP 3_1Form a three-passenger combination. With the goal of minimizing the total passenger travel time, under the user's "three-person ride" demand, the matching problem of the three-passenger combination can be transformed into a 0-1 planning model as follows:
[0234]
[0235]
[0236] In the formula, x ijk is a 0-1 variable; in the model solution, if the two-passenger combination {i, j} and user k form a three-passenger combination {i, j, k}, then x ijk =1, otherwise x ijk =0.
[0237] The Hungarian algorithm is used to solve the 0-1 programming model, and the solution vector is x = (x ijk , {i, j}∈RP 3_2 , k∈RP 3_1 ) T . Filter out x ijk =1 corresponds to a three-passenger combination, forming the passenger combination set RP 3_3 , called the main passenger combination set 3, the number of set elements | RP 3_3 |=|RP 3 | / 3=2.
[0238] Let the set RC 3 =RP 3_3 ∪{RP C3}, representing the passenger combination set formed by users who demand “three people sharing a ride”, namely RP 3_3 With RP C3 The union of . Record set RC 3 The travel paths and travel times of each passenger combination in the set. Number of set elements |RC 3 | represents the number of passenger combinations under the demand of "three-person ride".
[0239] RC 3 The travel routes and travel times of the medium passenger combination are shown in Table 6.
[0240] Table 6 Matching results for “Three people sharing a ride”
[0241]
[0242] Let RC represent the passenger combination set formed by all users in the system, which is the union of the passenger combination sets formed by users who demand "two-person ride" and "three-person ride", that is, RC = RC 2 ∪RC 3 The number of set elements |RC| represents the number of passenger combinations in the system.
[0243] 3. Passenger combinations and drivers in the matching system. The system constructs a generalized driver set and a generalized passenger combination set, solves the 0-1 planning model of the driver-passenger combination matching process, and screens and obtains the driver-passenger combination matching solution.
[0244] 1) Match the passenger combinations and drivers in the system to form driver-passenger combinations, and calculate the travel time and travel path of each driver-passenger combination.
[0245] The set of idle drivers in the current system is V, and the number of set elements |V| represents the number of drivers in the system. The specific set information is shown in Table 7:
[0246] Table 7 Driver collection information
[0247] Driver serial number Driver location Driver serial number Driver location Driver serial number Driver location 0 288 7 440 14 487 1 178 8 276 15 400 2 384 9 489 16 271 3 230 10 365 17 281 4 446 11 65 18 29 5 163 12 292 19 289 6 221 13 435
[0248] For any driver v∈V, let V_O v represents the current position of v; for any passenger combination e∈RC, let C_O e , C_D e represents the starting point and end point of the combined travel path of passenger e, C_T e represents the combined travel time of passengers of e.
[0249] Driver v∈V is matched with passenger combination e∈RC to form a driver-passenger combination {v, e}, whose travel trajectory is: driver v starts from the current position V_O v Departure to C_O e Pick up the first passenger and continue to C_D e All passengers get off.
[0250] Let p ve represents the travel path of the driver-passenger combination {v, e}; let t ve It represents the path travel time of the driver-passenger combination {v, e}, that is, the driver-passenger travel time. The calculation formula is:
[0251] p ve = {V_O v →C_O e →C_D e}
[0252] t ve =t(V_O v , C_O e )+C_T e
[0253] In the formula, p ve Indicates that the driver is moving from the current position V_O v To C_D e Travel path; t(V_Ov , C_O e ) indicates that the driver v moves from the current position V_O v To the starting point C_O of the travel path of passenger combination e e The required travel time.
[0254] The number of drivers in the system is |V|=20, and the number of passenger combinations is |RC|=7. There are |V|·|RC|=140 possible driver-passenger combinations, and the travel time of |V|·|RC|=140 drivers and passengers needs to be calculated.
[0255] 2) Supplement a preset number of driver or passenger combinations so that the number of passenger combinations participating in the matching is equal to the number of drivers, solve the matching problem of driver and passenger combinations, and obtain the driver and passenger matching solution with the optimal total travel time.
[0256] Let the real driver and the virtual driver be collectively referred to as the generalized driver; the real passenger combination and the virtual passenger combination be collectively referred to as the generalized passenger combination. The generalized driver and the generalized passenger combination can be matched to form a generalized driver-passenger combination.
[0257] If the driver v in the driver-passenger combination {v, e} is a real driver and the passenger combination e is a real passenger combination, then {v, e} is a real driver-passenger combination; otherwise, {v, e} is a virtual driver-passenger combination. Real driver-passenger combinations and virtual driver-passenger combinations are collectively referred to as generalized driver-passenger combinations.
[0258] Before solving the driver-passenger combination matching problem, it is necessary to ensure that the number of passenger combinations participating in the matching is equal to the number of drivers. Therefore, let Inf represent a sufficiently large, positive constant, add a certain number of virtual drivers or virtual passenger combinations according to actual conditions, and construct a generalized driver set and a generalized passenger combination set. The specific processing is as follows:
[0259] If the number of real passenger combinations is greater than the number of real drivers, that is, |RC|>|V|, then (|RC|-|V|) virtual drivers are added to the driver set V to form the generalized driver set V g . Generalized passenger combination set RC g Equal to the passenger combination set RC, that is, RC g =RC. Virtual driver v and any generalized passenger combination e∈RC g The driver and passenger travel time t ve =Inf;
[0260] If the number of real passenger combinations is less than the number of real drivers, that is, |RC|<|V|, then (|V|-|RC|) virtual passenger combinations are added to the passenger combination set RC to form a generalized passenger combination set RC. g . Generalized driver set V g Equal to the driver set V, that is, V g= V. Virtual passenger combination e and any generalized driver v∈V g The driver and passenger travel time t ve =Inf.
[0261] In this case, |RC|<|V|, then |V|-|RC|=20-7=13 virtual passenger combinations are added to the passenger combination set RC.
[0262] After completing the supplement of virtual drivers or virtual passenger combinations, driver-passenger combination matching is performed for the generalized driver set and the generalized passenger combination set.
[0263] For any generalized driver v∈V g In the end, it can only be combined with a generalized passenger e∈RC g Form a generalized driver-passenger combination. With the goal of minimizing the total travel time of drivers and passengers, the matching problem of driver-passenger combinations can be transformed into a 0-1 planning model as follows:
[0264]
[0265]
[0266] In the formula, y ve is a 0-1 variable: In the model solution, if the generalized driver v and the generalized passenger combination e constitute the generalized driver-passenger combination {v, e}, then y ve =1, otherwise y ve =0.
[0267] The Hungarian algorithm is used to solve the 0-1 programming problem. The solution vector is y = (y ve , v∈V g , e∈RC g ) T . Filter out the y ve =1, forming the generalized driver-passenger combination set VRC g Then filter out the VRC set g The real driver-passenger combination in the , construct the driver-passenger combination set VRC, the number of set elements |VRC| is equal to the minimum value of the number of passenger combinations |RC| and the number of drivers |V|, the number of set elements |VRC|=min{|RC|, |V|}=7. Record the travel path and travel time of each driver-passenger combination.
[0268] The travel paths and travel times of each driver-passenger combination in the VRC set are shown in Table 8.
[0269] Table 8 Driver and passenger matching results
[0270]
[0271]
[0272] 4. The cloud sends the driver-passenger matching plan to the driver and passenger’s mobile apps, executes the matching plan, and completes the online car-hailing shared trip.
[0273] The system sends the matching results and travel routes in the form of orders to the driver and passenger's mobile apps. After the driver accepts the order, he drives along the travel route given in the order and picks up and drops off passengers in order. The user waits to get on the car at the original location, and pays the driver a certain fee based on the price calculated by the App after getting off at the destination. When the last passenger gets off and completes the payment, the online shared trip is completed.
[0274] The above embodiments are only preferred implementation modes of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and equivalent substitutions without departing from the principles of the present invention. These technical solutions after improvements and equivalent substitutions to the claims of the present invention all fall within the protection scope of the present invention.
Claims
1. A method for matching people in online car-hailing shared travel, characterized in that: The method comprises the following steps: 1) Users publish their ride-sharing needs through the App. The system cloud divides users into multiple user groups, pre-processes the information of each user group to form a data file and sends it to the App of the users in the group; 2) After receiving the data file, the user calculates the shortest passenger travel time and travel route in the App and returns the result to the system cloud; the system cloud receives the result to solve the 0-1 planning model of the passenger combination matching process and screens out the passenger combination matching solution; 3) Matching passenger combinations with drivers. The system cloud constructs a generalized driver set and a generalized passenger combination set, solves the 0-1 planning model of the driver-passenger combination matching process, and screens and obtains the driver-passenger combination matching solution; 4) The system cloud sends the driver-passenger matching plan to the driver and the user's App, executes the matching plan, and completes the online car-hailing shared trip; In step 1), the travel information includes the starting point, the end point and the carpooling demand, and each user set is pre-processed. The system cloud forms a data file with the starting point and end point information in the user set and sends it to the smartphone App of the users in the set; In step 2), the carpooling demand is a carpooling demand for two persons or a carpooling demand for three persons; The specific method in step 1) is as follows: User i publishes online ride-sharing information through the App, including the starting point O of the trip i , travel destination D i and the carpooling demand N i ,The vehicle in the system is a five-seat car, which meets the needs of two-person and three-person carpooling; Based on the user's carpooling needs, the system cloud divides users into two groups: RP A2 RP A3 , set RP A2 The user's carpooling demand is two-person carpooling, that is, N i =2, the number of users is |RP A2 |; Set RP A3 The user's carpooling demand is three people carpooling, that is, N i =3, the number of users is |RP A3 |; By the number of users in the collection|RP A2 |、|RP A3 | is the dividend, and the shared ride demand N of the users in the set i =2, N i =3 is the divisor, and the remainder operation is performed to obtain the remainder |RP B2 |、|RP B3 |, that is: |RP B2 |=|RP A2 |%2 |RP B3 |=|RP A3 |%3 Among them, % represents the remainder symbol; System pair set RP A2 RP A3 Perform the following preprocessing: RP for two people sharing a ride A2 : In the collection RP A2 Random Selection | RP B2 | users, the selected users constitute the set RP B2 , called secondary user set 2; the unselected users constitute set RP2, called primary user set 2; and, RP A2 =RP B2 ∪RP2, if the remainder |RP B2 |=0, then Then there is a set relation RP A2 = RP2; RP for three people sharing a ride A3 : In the collection RP A3 Random Selection | RP B3 | users; the selected users constitute the set RP B3 , called secondary user set 3; the unselected users constitute set RP3, called primary user set 3; and, RP A3 =RP B3 ∪RP3, if remainder |RP B3 |=0, then Then there is a set relation RP A3 = RP3; After receiving the user's online shared travel information and completing the user set classification and preprocessing, the cloud summarizes the travel starting points and end points of the users in sets RP2 and RP3 respectively, extracts the travel time between all nodes, and forms two data files: File2 and File3. In addition, the cloud sends the data file File2 to all users in set RP2 and sends the data file File3 to all users in set RP3.
2. A method for matching people for online car-hailing sharing according to claim 1, characterized in that: In step 2), the user set RP that needs to share a ride with two people A2 The process of internally matching passenger combinations is: 1) The user in RP2 takes himself as the first passenger, calculates the shortest passenger travel time and travel path for all possible two-passenger combinations, and returns the calculation results to the system cloud; After user i∈RP2 receives the data file File2 sent by the system cloud, user i's smartphone uses user i as the first passenger to calculate the shortest travel path and travel time of the two-passenger combination formed by user i and any other user j∈RP2\{i}, and returns the calculation result to the system cloud. The calculation formula is as follows: P ij ={O i →O j →D i →D j ,O i →O j →D j →D i } r ij =min{t(O i ,O j )+t(O j ,D i )+t(D i ,D j ),big i ,O j )+t(O j ,D j )+t(D j ,D i )} As shown in the above formula, user i is the first passenger, that is, the starting point O of user i i As the starting point, let user i be the first passenger to get on the bus. The driver must first pick up two passengers, user i and j, and then send them to their destinations respectively; In the formula, O i →O j →D i →D j , O i →O j →D j →D i The paths are represented by the nodes passed in sequence, and they are all possible travel paths for the two-passenger combination {i, j} when user i is the first passenger. ij represents the travel path set of the two-passenger combination {i, j} when user i is the first passenger, t(O i ,O j ), t(O j ,D i )、t(D i ,D j ), t(O j ,D j )、t(D i ,D j ) represents the travel time between the two nodes in the brackets; t(O i ,O j )+t(O j ,D i )+t(D i ,D j ), t(O i ,O j )+t(O j ,D j )+t(D j ,D i ) represent the possible travel time of the two-passenger combination {i, j} when user i is the first passenger, r ij represents the shortest passenger travel time for a two-passenger combination {i, j} when user i is the first passenger; 2) The system cloud compares the shortest passenger travel time when different users are the first passengers in each two-passenger combination, and determines the shortest passenger travel time and travel path for each two-passenger combination; Compare the shortest passenger travel time r when user i and user j are the first passengers within the two-passenger combination {i, j} ij and r ji , determine the shortest passenger travel time for this two-passenger combination And record The corresponding travel path formula is as follows: 3) RP B2 The users in the group form a passenger group RP C2 , calculate the shortest passenger travel time for this passenger combination and travel routes; Under the user's demand for two-person ride sharing, if |RP B2 |≠0, then |RP B2 |=1, i.e. "Secondary User Set 2" RP B2 There is only one user in the system, let m∈RP B2 ; RP B2 This user forms a passenger group, with RP C2 Indicates, called "Secondary Passenger Group 2", with RP C2 ={m}, "Secondary Passenger Group 2" RP C2 Shortest passenger travel time The corresponding travel path is O m →D m , let {RP C2 } means only RP C2 The passenger combination set of this 1 element; 4) Solve the matching problem of two-passenger combinations and obtain the matching solution for two-passenger sharing with the optimal total travel time; For any user i∈RP2, he can only form a two-passenger combination with another user j∈RP2\{i}. The goal is to minimize the total travel time of passengers. Under the user's demand for two-person carpooling, the matching problem of the two-passenger combination is transformed into a 0-1 planning model as follows: In the formula, x ij is a 0-1 variable: In the model solution, if user i and user j form a two-passenger combination {i, j}, then x ij =1, otherwise x ij =0; Moreover, the 0-1 programming model does not constrain i≠j. For the repeated two-passenger combination {i,i}, the shortest passenger travel time is Set as follows: In the formula, Inf represents a positive infinite constant; The Hungarian algorithm is used to solve the 0-1 programming model, and the solution vector is x = (x ij ,i∈RP2,j∈RP2) T , filter out x ij =1 corresponding to the two-passenger combination, forming the passenger combination set RP 2_2 , called the main passenger combination set 2, the number of its set elements |RP 2_2 |=|RP2| / 2; Let RC2 = RP 2_2 ∪{RP C2 }, which represents the passenger combination set formed by users who need to share a ride, namely RP 2_2 With {RP C2 }, recording the travel paths and travel times of each passenger combination in set RC2. The number of set elements |RC2| represents the number of passenger combinations under the demand for two-person ride sharing.
3. A method for matching people for online car-hailing sharing travel according to claim 1, characterized in that: In step 2), the user set RP that needs to share a ride with three people A3 The process of internally matching passenger combinations is: 1) The system cloud pre-supplements a certain number of virtual users based on RP3 to form a generalized user set RP E3 ,The user in RP3 takes himself as the first passenger, calculates the shortest passenger travel time and travel path for all possible two-passenger combinations, and returns the calculation results to the system cloud; Under the user's three-person ride sharing demand, the number of virtual users pre-supplied before the passenger combination matching is |RP3| / 3, and the virtual user's travel starting point O i , End point D i All virtual nodes do not exist in the real urban road network, and the distance between them and any real node is positive infinity. |RP3| / 3 virtual users constitute the virtual user set RP V3 , virtual user set RP V3 The union of RP3 and RP4 is the generalized user set RP. E3 , namely RP E3 =RP3∪RP V3 , Inf represents a constant of positive infinity; After the smartphone of user i∈RP3 receives the data file File3 sent by the cloud, the smartphone of user i takes user i as the first passenger, calculates the shortest travel path and travel time of the two-passenger combination formed by user i and any other user j∈RP3\{i}, and returns the calculation result to the system cloud. The calculation formula is as follows: P ij ={O i →O j →D i →D j ,O i →O j →D j →D i } r ij =min{t(O i ,O j )+t(O j ,D i )+t(D i ,D j ),big i ,O j )+t(O j ,D j )+t(D j ,D o )} As shown in the above formula, user i is the first passenger, that is, the starting point O of user i i As the starting point, user i is the first passenger to board the car. The driver first picks up two passengers, user i and j, and then sends them to their destinations respectively; In the formula, O i →O j →D i →D j , O i →O j →D j →D i The paths are represented by the nodes passed in sequence, and they are all possible travel paths for the two-passenger combination {i, j} when user i is the first passenger. ij represents the travel path set of the two-passenger combination {i, j} when user i is the first passenger, t(O i ,O j ), t(O j ,D i )、t(D i ,D j ), t(O j ,D j )、t(D i ,D j ) represents the travel time between the two nodes in the brackets, t(O i ,O j )+t(O j ,D i )+t(D i ,D j ), t(O i ,O j )+t(O j ,D j )+t(D j ,D i ) represent the possible travel time of the two-passenger combination {i, j} when user i is the first passenger, r ij represents the shortest passenger travel time for a two-passenger combination {i, j} when user i is the first passenger; 2) The system cloud compares the shortest passenger travel time when different users are the first passengers in each two-passenger combination, and determines the shortest passenger travel time and travel path for each two-passenger combination; Within a two-passenger combination {i, j}, the system compares the shortest passenger travel time r when user i and user j are the first passengers. ij and r ji , determine the shortest passenger travel time for this two-passenger combination And record The corresponding travel path formula is as follows: 3) Set "Secondary User Set 3" RP B3 All users in the group form a passenger group RP C3 , calculate the shortest passenger travel time for this passenger combination and travel routes; Under the user's "three-person ride" demand, if |RP B3 |≠0, then |RP B3 |=1or|RP B3 |=2, that is, "secondary user set" RP B3 There are 1 or 2 users in the group, which will be grouped into RP B3 All users in the group form a passenger group, with RP C3 Denote, called "Secondary Passenger Combination 3", let Represents passenger combination RP C3 The shortest passenger travel time is C3 } means only passenger combination RP is included C3 The passenger combination set of this 1 element is called "secondary passenger combination set 3"; If the set RP B3 There is one user in the system, let m∈RP B3 , then "Secondary Passenger Group 3" RP C3 ={m},RP c3 Shortest passenger travel time The corresponding travel path is O m →D m ; If the set RP B3 There are 2 users, denoted as m1,m2∈RP B3 , then "Secondary Passenger Group 3" RP C3 = {m1,m2}, is a two-passenger combination, RP C3 Shortest passenger travel time This is the shortest passenger travel time for the two-passenger combination {m1, m2} It is also necessary to calculate the shortest passenger travel time when m1 and m2 are the first passengers. Then compare and get the shortest passenger travel time for the two-passenger combination {m1,m2} And record The corresponding travel path; 4) Solve the first passenger combination matching problem under the user's "three-person ride" demand. In the generalized user set RP E3 Medium Match | RP E3 | / 2 generalized two-passenger combinations, and then select |RP3| / 2 real two-passenger combinations from the generalized two-passenger combinations, and the real users in |RP3| / 2 mixed two-passenger combinations; let the real users and virtual users be collectively referred to as generalized users; If passengers i and j in a two-passenger combination {i, j} are both real users, then {i, j} is a real two-passenger combination; if passenger i in a two-passenger combination {i, j} is a real user and passenger j is a virtual user, or passenger i is a virtual user and passenger j is a real user, then {i, j} is a mixed two-passenger combination; if passengers i and j in a two-passenger combination {i, j} are both virtual users, then {i, j} is a virtual two-passenger combination. Let real two-passenger combinations, mixed two-passenger combinations, and virtual two-passenger combinations be collectively referred to as generalized two-passenger combinations; The first passenger combination matching process under the user's three-person ride-sharing demand is shown in the generalized user set RP. E3 Medium Match | RP E3 | / 2 generalized two-passenger combinations, for any generalized user i∈RP E3 In the end, it can only be combined with another generalized user j∈RP E3 \{i} forms a generalized two-passenger combination, with the goal of minimizing the total travel time of passengers. The matching problem of the generalized two-passenger combination can be transformed into a 0-1 programming model as follows: In the formula, x ij is a 0-1 variable; in the model solution, if generalized user i and generalized user j form a generalized two-passenger combination {i, j}, then x ij =1, otherwise x ij =0; Since there is no constraint i≠j in the 0-1 programming model, there are not only repeated two-passenger combinations {i,i} and their related parameters in the 0-1 programming model With variable x ii , there are also virtual users and possible mixed two-passenger combinations and virtual two-passenger combinations; In order to match as many real two-passenger combinations as possible and enable the 0-1 programming model to solve the first passenger matching process of "three-passenger carpooling", let Inf represent a positive infinite constant, and set the shortest passenger travel time for any generalized two-passenger combination {i, j} as follows: If i∈RP3,j∈RP3 and i≠j, then it is a real two-passenger combination, and its shortest passenger travel time is If i∈RP3,j∈RP V3 or j∈RP3,i∈RP V3 , then it is a mixed two-passenger combination, and its shortest passenger travel time is Inf; If i∈RP V3 ,j∈RP V3 And i≠j, then it is a virtual two-passenger combination, and its shortest passenger travel time is 2*Inf; For a repeated two-passenger combination {i,i}, its shortest passenger time Set to 2*Inf; The Hungarian algorithm is used to solve the 0-1 programming model, and the solution vector is x = (x ij ,i∈RP E3 ,j∈RP E3 ) T , filter out x ij = 1 corresponding to 2*(|RP3| / 3) generalized two-passenger combinations, among which there are |RP3| / 3 real two-passenger combinations and |RP3| / 3 mixed two-passenger combinations; Filter out |RP3| / 3 real two-passenger combinations and construct the real two-passenger combination set RP 3_2 , number of set elements | RP 3_2 |=|RP3| / 3; then filter out the real users from the |RP3| / 3 mixed two-passenger combinations to construct the user set RP 3_1 , number of elements in the collection|RP 3_1 |=|RP3| / 3; After the system completes the first passenger combination matching of three people in the cloud, it extracts the real two-passenger combination set RP 3_2 The starting point and destination of each real two-passenger combination of two users form a data file File3_2; extract the user set RP 3_1 The starting point and end point of each user in RP3 are formed to form a data file File3_1. After the data file is formed, the system cloud again sends the data files File3_1 and File3_2 to the smartphones of all users in RP3. 5) The user in RP3 takes himself as the first passenger, calculates the shortest passenger travel time and travel path for all possible three-passenger combinations, and returns the calculation results to the system cloud; In the first passenger combination matching process of three-person ride, the real two-passenger combination set RP is obtained 3_2 With user set RP 3_1 , let the real two-passenger combination {i,j}∈RP 3_2 , real user k∈RP 3_1 , then user i, user j, and user k form a three-passenger combination {i, j, k}; The steps to calculate the shortest passenger travel time for a three-passenger combination {i,j,k} are as follows; user i,j∈{i,j},{i,j}∈RP 3_2 With user k∈RP 3_1 The smartphone receives the data files File3_1 and File3_2 sent by the cloud. After receiving the files File3_1 and File3_2, the smartphone of user i takes user i as the first passenger, calculates the shortest travel path and travel time of the three-passenger combination formed by user i, user j, and user k, and returns the calculation results to the system cloud. The calculation formula is as follows: As shown in the above formula, in order to meet the user's three-person carpooling needs, the driver first picks up three passengers and then sends them to their destinations separately. In the formula, P ijk represents the travel path set of the three-passenger combination {i, j, k} when user i is the first passenger; where element O j →O i →O k →D i →D j →D k are all paths, represented by the nodes passed through in sequence, r ijk represents the shortest passenger travel time of the three-passenger combination {i, j, k} when user i is the first passenger; the element t(O k ,O j )+t(O j ,O i )+t(O i ,D i )+t(D i ,D j )+t(D j ,D k ) represent the possible travel time of the three-passenger combination {i, j, k}; 6) The system cloud compares the shortest passenger travel time when different users are the first passengers in each three-passenger combination, and determines the shortest passenger travel time and travel path for each three-passenger combination; Within the three-passenger combination {i, j, k}, the system compares the shortest passenger travel time r when user i, user j, and user k are the first passengers. ijk 、r jik 、r kij , determine the shortest passenger travel time for this three-passenger combination And record The corresponding travel path formula is as follows: 7) Solve the second passenger combination matching problem of three people sharing a ride, and obtain the three-person passenger matching solution with the optimal total passenger travel time; For any two-passenger combination {i,j}∈RP 3_3 , which can only be matched with another user k∈RP 3_1 A three-passenger combination is formed with the goal of minimizing the total travel time of passengers. Under the user's demand for three-person ride sharing, the matching problem of the three-passenger combination can be transformed into a 0-1 planning model as follows: In the formula, x ijk is a 0-1 variable; in the model solution, if the two-passenger combination {i, j} and user k form a three-passenger combination {i, j, k}, then x ijk =1, otherwise x ijk =0; The Hungarian algorithm is used to solve the 0-1 programming model, and the solution vector is x = (x ijk ,{i,j}∈RP 3_2 ,k∈RP 3_1 ) T , filter out x ijk =1 corresponds to a three-passenger combination, forming the passenger combination set RP 3_3 , called the main passenger combination set 3, the number of its set elements |RP 3_3 |=|RP3| / 3; Let RC3 = RP 3_3 ∪{RP C3 }, representing the passenger combination set formed by users who need to share a ride with three people, namely RP 3_3 With RP C3 , record the travel paths and travel times of each passenger combination in set RC3, the number of set elements |RC3| represents the number of passenger combinations under the demand of three-person carpooling; let set RC represent the set of passenger combinations formed by all users in the system, which is the union of the sets of passenger combinations formed by users with two-person carpooling and three-person carpooling needs, that is, RC = RC2 ∪ RC3, the number of set elements |RC| represents the number of passenger combinations in the system.
4. A method for matching people for online car-hailing sharing according to claim 3, characterized in that: In step 3), the process of matching passenger combinations within each passenger set is: 5.1) Match the passenger combinations and drivers in the system to form driver-passenger combinations, and calculate the travel time and travel path of each driver-passenger combination; 5.2) Supplement a preset number of driver or passenger combinations so that the number of passenger combinations participating in the matching is equal to the number of drivers, solve the matching problem of driver and passenger combinations, and obtain the driver and passenger matching solution with the optimal total travel time.
5. A method for matching people for online car-hailing sharing according to claim 4, characterized in that: The method of step 5.1) is as follows: Let V represent the set of drivers in the system, and the number of set elements |V| represents the number of drivers in the system; For any driver v∈V, let V_O v represents the current position of v; for any passenger combination e∈RC, let C_O e , C_D e represents the starting point and end point of the combined travel path of passenger e, C_T e represents the combined travel time of passengers of e; Driver v∈V is matched with passenger combination e∈RC to form a driver-passenger combination {v,e}, whose travel trajectory is: driver v starts from the current position V_O v Departure to C_O e Pick up the first passenger and continue to C_D e All passengers alight; Let p ve Denote the travel path of the driver-passenger combination {v, e}, let t ve It represents the path travel time of the driver-passenger combination {v, e}, that is, the driver-passenger travel time, and the calculation formula is: p ve ={V_O v →C_O e →C_D e } t ve =t(V_O v ,C_O e )+C_T e In the formula, p ve Indicates that the driver is moving from the current position V_O v To C_D e The travel path of t(V_O v ,C_O e ) indicates that the driver v moves from the current position V_O v To the starting point C_O of the travel path of passenger combination e e The required travel time.
6. A method for matching people for online car-hailing sharing travel according to claim 5, characterized in that: In step 5.2), the method of supplementing the preset number of driver or passenger combinations so that the number of passenger combinations participating in matching is equal to the number of drivers is as follows: Let the real driver and the virtual driver be collectively referred to as the generalized driver, the real passenger combination and the virtual passenger combination be collectively referred to as the generalized passenger combination, and the generalized driver and the generalized passenger combination can be matched to form a generalized driver-passenger combination; If the driver v in the driver-passenger combination {v, e} is a real driver and the passenger combination e is a real passenger combination, then let {v, e} be the real driver-passenger combination; otherwise, let {v, e} be the virtual driver-passenger combination. The real driver-passenger combination and the virtual driver-passenger combination are collectively referred to as the generalized driver-passenger combination. Let Inf represent a positive infinite constant, add a certain number of virtual drivers or virtual passenger combinations according to the actual situation, and construct a generalized driver set and a generalized passenger combination set. The specific processing is as follows: If the number of real passenger combinations is greater than the number of real drivers, that is, |RC|>|V|, then (|RC|-|V|) virtual drivers are added to the driver set V to form the generalized driver set V g , generalized passenger combination set RC g Equal to the passenger combination set RC, that is, RC g =RC, virtual driver v and any generalized passenger combination e∈RC g The driver and passenger travel time t ve =Inf; If the number of real passenger combinations is less than the number of real drivers, that is, |RC|<|V|, then (|V|-|RC|) virtual passenger combinations are added to the passenger combination set RC to form a generalized passenger combination set RC. g , the generalized driver set V g Equal to the driver set V, that is, V g = V, virtual passenger combination e and any generalized driver v∈V g The driver and passenger travel time t ve =Inf.
7. A method for matching people for online car-hailing sharing according to claim 6, characterized in that: For the generalized driver set and the generalized passenger combination set, driver-passenger combination matching is performed as follows: For any generalized driver v∈V g , which can ultimately only be combined with a generalized passenger e∈RC g A generalized driver-passenger combination is formed with the goal of minimizing the total travel time of the driver and passenger. The matching problem of the driver-passenger combination can be transformed into a 0-1 planning model as follows: In the formula, y ve is a 0-1 variable: In the model solution, if the generalized driver v and the generalized passenger combination e constitute the generalized driver-passenger combination {v, e}, then y ve =1, otherwise y ve =0; The Hungarian algorithm is used to solve the 0-1 programming problem, and the solution vector is y = (y ve ,v∈V g ,e∈RC g ) T , filter out ve =1 to form the generalized driver-passenger combination set VRC g , and then filter out the set VRC g The real driver-passenger combinations in the set are used to form a driver-passenger combination set VRC, where the number of set elements |VRC| is equal to the minimum value of the number of passenger combinations |RC| and the number of drivers |V|, that is, |VRC|=min{|RC|,|V|}, and the travel path and travel time of each driver-passenger combination are recorded.
Citation Information
Patent Citations
Network appointment sharing traveler matching method based on network representation learning
CN110009455A
Pedestrian-to-car online car hailing matching method
CN110992122A
Bipartite graph-based shared network driver and passenger matching method
CN111126799A
Dynamic large-scale car-sharing route planning method based on robust path
CN113962434A