Intercity passenger transport car-pooling bilateral multi-round-trip static scheduling method, device and equipment
Through the mixed integer planning model and Lagrangian relaxation algorithm combined with the labeling method, the consideration of vehicle round trip times and passenger interests in the double-travel round trip path planning of intercity carpooling is solved, and the efficiency and benefits of route planning are improved. In the prior art, the problem of slow convergence speed and low total returns is obtained.
Patent Information
- Application Number
- CN202411418695.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing double-sided multi-trip round trip route planning model of intercity carpooling failed to effectively consider the number of vehicle round trips and passenger interests, and the convergence speed was slow and the total return was low, which failed to effectively solve the channel problems and the impact of detour coefficients in the bilateral route planning. , resulting in difficulty in modeling and poor solution efficiency.
The hybrid integer programming model is used to construct the initial solution in combination with the spatial fill curve method and the 2-swap algorithm. The Lagrangian relaxation algorithm is used to solve the lower bound of the objective function, and the sub-short circuit scheme is introduced through the labeling method to accept sub-optimal labeling numbers that are inferior to the optimal labeling numbers. To achieve effective solution to the upper bound of the objective function.
The solution speed of bilateral path planning is improved, the convergence speed of the model is enhanced, the approximation speed of the target value of complex problems is improved, and the platform income is improved.
Smart Images

Figure CN118940929A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of inter-city static carpooling scheduling, and in particular to a method, device and equipment for static scheduling of multiple round trips on both sides of an inter-city passenger carpooling. Background Art
[0002] With the continuous development of urban agglomerations, the trend of population concentration has become increasingly obvious, and the demand for "intercity carpooling" has been continuously emphasized. Carpooling home has become the first choice for the public to choose a mode of transportation. "Intercity carpooling" refers to passengers in the same city taking the same car to the same destination city. Compared with traditional public transportation, the departure time is more flexible, and there is no need to wait for the shuttle bus time, and you can go as soon as you arrive. It has detailed advantages in terms of travel time and passenger experience, and supports pick-up and drop-off services at designated locations, and even more high-end personalized customized services. Compared with private car travel, passengers can get a high-quality travel experience without a car at the expense of a little passenger time and travel costs, while avoiding the risk of self-driving cars being unfamiliar with suburban road conditions.
[0003] For the problem of two-way multi-trip intercity carpooling, the commonly used extended heuristic algorithms and exact algorithms are used to solve such problems, such as branch and bound method and two-stage dynamic programming method, set partitioning and column generation method. Many scholars have tried to combine iterative search algorithms with heuristic algorithms, such as combining tabu search with large neighborhood search algorithm, three-stage tabu search algorithm, fruit fly optimization algorithm and improved hybrid genetic algorithm, which have achieved good results in practical problems.
[0004] Different from the one-sided intercity carpooling problem, the optimal one-sided vehicle departure path and the optimal vehicle return path do not mean that the overall path of the vehicle is optimal for multiple round trips. The problems with the path planning of two-sided intercity passenger transport with multiple round trips include: different from the one-sided planning, both sides need to consider the number of round trips of vehicles and the impact of the vehicle stopping for rest after completing a single trip; the existing multi-trip model does not consider the order grouping problem in advance, and does not comprehensively consider the channel problem and the impact of the detour coefficient under the two-sided path planning, making model modeling difficult; the existing model has slow convergence speed, low total revenue, poor problem solving efficiency, and does not solve the above problems.
[0005] In view of this, this application is filed. Summary of the invention
[0006] The present invention provides a method, device and equipment for static scheduling of multiple round trips on both sides of inter-city passenger carpooling, which can at least partially improve the above-mentioned problems.
[0007] To achieve the above object, the present invention adopts the following technical solutions: A static scheduling method for intercity passenger carpooling with multiple round trips on both sides, comprising: Obtaining passenger reservation order data of intercity passenger transport and a set of vehicles in cities A and B, and drawing a network graph according to each travel node in the passenger reservation order data, wherein the network graph includes a vertex set and an edge set; According to the passenger reservation order data and the vehicle sets in cities A and B, static carpooling scheduling is performed to construct a mixed integer programming model, wherein static carpooling scheduling means that the passenger order data is known and unchanged during scheduling; According to the mixed integer programming model, the passenger reservation order data is grouped using a space filling curve method, and an initial solution of the departure city is constructed using a 2-swap algorithm and an insertion algorithm; Based on the initial solution, a Lagrangian relaxation algorithm is used to solve the lower bound of the objective function of the mixed integer programming model, and the relaxed problem is decomposed into multiple sub-problems; To solve the sub-problem, a labeling method is used to label each passenger node, and a preset sub-short circuit scheme is introduced into the labeling method, and sub-optimal labels within a preset acceptable range that are inferior to the preset optimal labels are accepted to achieve an effective solution to the upper bound of the objective function.
[0008] The present invention also provides a static dispatching device for inter-city passenger carpooling with multiple round trips on both sides, which comprises: A data acquisition unit is used to acquire passenger reservation order data of intercity passenger transport and a set of vehicles in cities A and B, and to draw a network graph according to each travel node in the passenger reservation order data, wherein the network graph includes a vertex set and an edge set; A model building unit is used to perform static carpooling scheduling according to the passenger reservation order data and the vehicle sets in cities A and B, and to build a mixed integer programming model, wherein static carpooling scheduling means that the passenger order data is known and unchanged during scheduling; An initial solution construction unit, configured to group the passenger reservation order data using a space filling curve method according to the mixed integer programming model, and construct an initial solution of a departure city using a 2-swap algorithm and an insertion algorithm; A model lower bound solving unit, used to solve the lower bound of the objective function of the mixed integer programming model based on the initial solution by using a Lagrangian relaxation algorithm, and decompose the relaxed problem into multiple sub-problems; The model upper bound solving unit is used to solve the sub-problem, label each passenger node using a labeling method, introduce a preset sub-short circuit scheme into the labeling method, and accept sub-optimal labels within a preset acceptable range that are inferior to the preset optimal labels, so as to achieve an effective solution to the upper bound of the objective function.
[0009] The present invention also provides an inter-city passenger carpooling two-sided multiple round-trip static scheduling device, which includes a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement the inter-city passenger carpooling two-sided multiple round-trip static scheduling method as described in any one of the above items.
[0010] In summary, the intercity passenger carpooling two-sided multi-trip static scheduling method aims to maximize the profit of the carpooling platform. Compared with the unilateral path optimization problem, in the two-sided round-trip constraint scenario, it also considers the limit on the number of round trips of the vehicle and the impact of the driver's rest after completing a single trip. The present invention proposes an algorithm for solving the two-sided multi-trip round-trip carpooling path optimization problem based on the Lagrangian relaxation algorithm and the labeling method, and uses the space filling method and optimized grouping to generate an initial feasible solution. The solution speed of the two-sided path problem is slow. In the process of solving the sub-problem, the optimization idea of sub-short circuit is introduced, and the suboptimal labeling within a certain range inferior to the optimal labeling is accepted, thereby realizing the effective solution of the upper bound of the problem. The Lagrangian relaxation objective function is used to quickly obtain the lower bound of the problem, which speeds up the approximation speed of the upper and lower bounds of the target value, and can effectively improve the convergence speed of complex problem models. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a flow chart of a static scheduling method for inter-city passenger carpooling with multiple round trips on both sides provided by the first embodiment of the present invention; Figure 2 is a schematic diagram of multiple round trips of a vehicle provided by an embodiment of the present invention; Figure 3 is a schematic diagram of a 2-swap exchange method between vehicles provided by an embodiment of the present invention; Figure 4 is a schematic diagram of a method for inserting a passenger node between vehicles provided by an embodiment of the present invention; Figure 5 It is a module schematic diagram of a static dispatching device for inter-city passenger carpooling with multiple round trips on both sides provided by the second embodiment of the present invention. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0013] refer to Figure 1 As shown, the first embodiment of the present invention discloses a static scheduling method for inter-city passenger carpooling with multiple round trips on both sides, which can be executed by an inter-city passenger carpooling static scheduling device for multiple round trips on both sides (hereinafter referred to as the scheduling device), and in particular, executed by one or more processors in the scheduling device to implement the following method: S1, obtaining passenger reservation order data of intercity passenger transport and a vehicle set of cities A and B, and drawing a network graph according to each travel node in the passenger reservation order data, wherein the network graph includes a vertex set and an edge set; Specifically, step S1 includes: obtaining passenger reservation order data of intercity passenger transport and a vehicle set K of cities A and B, wherein the passenger reservation order data includes the passenger's designated boarding point, destination, and a passenger carpooling order set Q of cities A and B, , represents the set of passenger carpooling orders in city A, For the qth passenger carpooling order in city A, is the number of carpooling orders for passengers in city A, represents the set of passenger carpooling orders in city B, For the qth passenger carpooling order in city B, is the number of carpooling orders from passengers in city B, and the vehicle set K in cities A and B , represents the set of vehicles in city A, is the kth car in city A, is the number of vehicles in city A, represents the set of vehicles in city B, is the kth car in city B, is the number of vehicles in city B; Draw each travel node in the passenger booking order data to generate a network diagram ,in, is a vertex set, where vertices represent the boarding and alighting points of passengers, and the boarding and alighting points appear in pairs. For edge sets.
[0014] In this embodiment, first, the passenger reservation order data and vehicle set of intercity passenger transport are obtained, and each travel node in the order data is described as a network graph, and the network graph includes a vertex set and an edge set.
[0015] The passenger reservation order data includes the passenger's designated boarding point and destination, the passenger's agreed boarding time, represents the set of carpooling orders of passengers in cities A and B, and the set of carpooling orders of passengers in city A Represents the number of carpooling orders from passengers in city A; represents the set of carpooling orders from passengers in city B ,in represents the number of passenger carpooling orders in city B; the vehicle set , Represents the vehicle collection of cities A and B, and the vehicle collection of city A , Represents the number of vehicles in city A; the number of vehicles in city B , The number of vehicles in city B, the maximum passenger capacity of each vehicle is 6 people, and the demand point To the demand point The transport distance is The distance from the vehicle to the parking lot is not considered, that is, ,vehicle Drive to point The time is expressed as .
[0016] Describe each node of intercity ride-hailing as a network graph , represents a set of vertices, where vertices represent the boarding and alighting points of passengers. represents the edge set; the set of boarding point numbers in city A is , the number set of the drop-off points in city B is , the passenger boarding point number set in city B is , the set of alighting point numbers in city A is , pick-up and drop-off points appear in pairs, and vehicles No. The pick-up and drop-off points for the trip from City A to City B are .vehicle No. The boarding and alighting points for the return trip from City B to City A are ,vehicle No. The set of all the multiple round trip boarding and alighting points is The average passenger mileage revenue is , intercity entrance and exit ,use Indicates the intercity entry and exit points of city A, using It indicates the inter-city entry and exit points of city B; The said A trip means multiple trips. A multiple trip includes two or more single trips in opposite directions. A single trip is a one-way trip from city A to city B. Each vehicle corresponds to one trip, and each trip can only be served by one vehicle. Each multiple trip can also only be served by one vehicle, and one vehicle corresponds to multiple single trips. Represents the set of all itineraries between two cities A and B. The set of itineraries from city A to the departure point is set as , represents the total number of trips from city A to city B; the set of trips starting from city B is set to , Represents the total number of trips from city B to city A.
[0017] S2, performing static carpooling scheduling based on the passenger reservation order data and the vehicle sets in cities A and B, and constructing a mixed integer programming model, wherein static carpooling scheduling means that the passenger order data is known and unchanged during scheduling; Specifically, step S2 includes: performing static carpooling scheduling for multiple round trips on both sides according to the passenger reservation order data and the vehicle collection of cities A and B, and constructing a mixed integer programming model. The mixed integer programming model aims to maximize the profit of the carpooling platform. The model formula is: ; ; ; in, represents the maximum profit, is the total fare revenue for completing the order, is the vehicle path cost, and Both The decision variables, Indicate the order By itinerary Vehicle services, Indicate the order By itinerary Vehicle services, and Both The decision variables, Indicate itinerary Vehicles from Click to Click through, Indicate itinerary Vehicles from Click to Click through, represents the set of all itineraries for cities A and B. represents the set of trips starting from city A, is the rth trip from city A to city B, is the total number of trips from city A to city B, represents the set of trips starting from city B, is the rth trip from city B to city A, is the total number of trips from city B to city A, is the average passenger mileage revenue, is the passenger mileage cost, represents the set of boarding and alighting points of vehicle k in its rth trip from city A to city B, represents the set of boarding point numbers in city A. Number the vth boarding point in city A, It represents the set of numbers of the drop-off points in city B. Number the vth B city drop-off point, For demand point To the demand point transportation distance.
[0018] In this embodiment, according to the obtained passenger reservation order data and vehicle set, as shown in FIG. Figure 2 As shown, static carpooling scheduling for multiple round trips on both sides is performed, and a mixed integer programming model is constructed. According to the obtained passenger reservation order data and vehicle set, static carpooling scheduling for multiple round trips on both sides is performed. Static means that the passenger order data is known and unchanged during scheduling, and a mixed integer programming model is constructed; the model aims to maximize the profit of the carpooling platform: ; ; ; in, and for The decision variables are For example, Description Order By itinerary Vehicle services; and for The decision variables are For example, Explain the itinerary Vehicles from Click to point passing; represents the passenger mileage cost (yuan / km); where the objective function Represents the maximum revenue, that is, the total ticket price revenue of the completed order Subtract the vehicle path cost .
[0019] Among them, the constraints of the two-sided multi-trip model are shown in Table 1: Table 1
[0020] in, Indicates Itinerary, It means the difference between two elements. Show itinerary Vehicle Arrival The moment of Show itinerary Vehicle leaving The moment of Indicates order The scheduled boarding time, represents the maximum travel time constraint, is the decision variable ( Explain the itinerary Vehicles from Click to point passing through), represents the detour constraint, Indicates vehicle The number of round trips on both sides, Indicates vehicle The maximum number of round trips on both sides, Indicates vehicle Rest time, is the decision variable ( No vehicle arrangement No. itinerary).
[0021] S3, according to the mixed integer programming model, using a space filling curve method to group the passenger reservation order data, and using a 2-swap algorithm and an insertion algorithm to construct an initial solution of the departure city; Specifically, step S3 includes: according to the mixed integer programming model, using a space filling curve method to calculate the position parameters of each node in the space interval; Arrange the nodes and evenly divide the corresponding nodes into a plurality of regions, wherein the nodes in each region form a loop in sequence; Calculate the channel time P(k) and detour coefficient Q(k) of each loop respectively, where: , is the vehicle capacity, is the set of entrances and exits and all passenger boarding and alighting demand points, is the maximum travel time constraint, To bypass constraints; Determine whether the vehicle and trip constraints of the same vehicle meet the preset constraints; If not, the 2-swap algorithm is used to swap the positions of passengers between different vehicles with a preset probability, and the insertion algorithm is used to insert the passengers into the appropriate vehicle so that the generated initial solution satisfies the constraints.
[0022] In this embodiment, according to the established mixed integer programming model, the space-filling curve method (Space-filling Curves) is used to group the passenger orders, and then the channel problem constraints, detour coefficient constraints and vehicle capacity constraints in each loop are considered respectively, and the initial solution of the departure city is constructed using 2-swap and insertion algorithms. Finally, the vehicle capacity constraints, itinerary constraints and other constraints in each loop are checked respectively to see whether they meet the feasible solution conditions, and finally the position of the passenger in the path is adjusted to make each departure initial solution feasible. Among them, the specific solution steps of the space-filling curve method SFC are as follows: First, the position parameters of each node in the space interval are calculated using the space filling curve; Secondly, these nodes are sorted and evenly divided into several regions starting from the corresponding nodes. The nodes in each region form a loop in sequence. Calculate the channel time P(k) and detour coefficient Q(k) of each loop obtained by SFC, and the vehicle capacity limit: ,in, Represents the set of entrances and exits and all passenger boarding and alighting demand points; Finally, the space-filling curve is used to group the passenger orders and then check the vehicle and trip constraints of the same vehicle. If the above constraints are not met, the 2-swap algorithm is used with a certain probability to swap the positions of passengers between different vehicles and the insertion algorithm is used to insert the passengers into the appropriate vehicle so that the initial solution meets the constraints; Figure 3 As shown, the essence of the 2-swap algorithm is to exchange the positions of the two passengers with the closest spatial and temporal distance between the two vehicles; Figure 4 As shown, the essence of the insertion algorithm is to randomly select a passenger node in a vehicle and insert it into the adjacent vehicle with the closest time and space distance.
[0023] S4, based on the initial solution, using the Lagrangian relaxation algorithm to solve the lower bound of the objective function of the mixed integer programming model, and decomposing the relaxed problem into multiple sub-problems; Specifically, step S4 includes: according to the initial solution, solving the lower bound of the objective function of the mixed integer programming model by using a hard constraint method in the Lagrangian relaxation algorithm, wherein the hard constraint is selected as a detour constraint; Introducing Lagrange multipliers The objective function is relaxed, and the objective function of the Lagrangian relaxation model after relaxation is: ; ; ; in, is the objective function of the relaxed Lagrangian relaxation model, is the set of all the multiple round trip pick-up and drop-off points for vehicle k’s rth trip, The boarding and alighting points for the rth return trip of vehicle k from city B to city A are as follows: Passengers are numbered and assembled at the boarding point in City B. Number the wth passenger's boarding point in city B, The numbered collection for the A city drop-off point, Number the wth A-city drop-off point, is the Lagrange multiplier, represents the fixed cost of the vehicle serving customers, is the decision variable, indicates that vehicle k passes from point i to point j, is the distance of the trip r, is the subgradient vector, is the transpose, P is the set of boarding points and alighting points, It means calculating or selecting the maximum possible value of the objective function under the preset relaxation conditions; Formulate the Lagrangian dual problem , and obtain the minimum value of the Lagrangian relaxation model , find a lower bound for the original problem and decompose the relaxed problem into multiple sub-problems.
[0024] Preferably, the Lagrange multiplier is introduced Relax the objective function, specifically: The subgradient optimization method is used to quickly solve the maximization problem of non-differentiable convex functions after Lagrangian relaxation, specifically: The problem that satisfies the Lagrange duality property is divided into several sub-problems with the same vehicle, and the Lagrange multiplier is introduced. , define the upper bound of the original problem and lower bound , and initialize; Solve the subproblem of the original objective function and calculate the new function value with Lagrangian at this time , and update the lower bound of the original problem ; Calculate the subgradient based on the optimal solution of the relaxed subproblem and update the Lagrange multiplier. When the lower bound of the original problem is determined, update the number of iterations of the Lagrange multiplier. When no replacement is obtained, the number of iterations is halved and the Lagrange multiplier formula is updated as follows: ,in, For the The updated Lagrange multiplier is, For the The updated Lagrange multiplier is, is the number of elements in the set U, is the smoothing constant, the set The Lagrange multiplier is A subgradient set of is the total number of constraints; The probability of the second shortest path The probability of vehicle path short circuit optimization is based on the preset sub-problem, and the feasible solution of the original problem is iteratively searched, and the upper bound of the original objective function is updated. ; When it is determined that the difference between the upper bound of the original objective function and the lower bound of the relaxed sub-problem is less than the preset difference threshold between the relaxed sub-problem and the original problem Or when the preset number of iterations is reached, the iteration is stopped and the current optimal feasible solution is regarded as the optimal solution of the original objective function; When it is determined that the difference between the upper bound of the original objective function and the lower bound of the relaxed sub-problem is not less than the preset difference threshold between the relaxed sub-problem and the original problem Or when the preset number of iterations is not reached, repeat the above steps until the preset conditions are met.
[0025] In this embodiment, based on the initial solution, the lower bound of the objective function is solved by using the hard constraint method in the Lagrangian relaxation algorithm. In this model, the hard constraint is selected as the detour constraint, and the Lagrangian multiplier is introduced. Relax it, and the objective function of the relaxed Lagrangian relaxation model is as follows: ; ; ; After relaxation, the above constraints are still satisfied, and the Lagrange multiplier reflects the fixed cost of the vehicle serving customers and is generally positive. , the Lagrangian function values are all lower bounds of the original problem, thus constructing the Lagrangian dual problem , and obtain the minimum value of the Lagrangian relaxation model , that is, a better lower bound of the original problem can be obtained, and the relaxed problem is decomposed into multiple sub-problems.
[0026] In this embodiment, for the formula This linear piecewise convex function is not differentiable. The subgradient optimization method (Subgradient Descent) is used to quickly solve the maximization problem of this non-differentiable convex function after Lagrangian relaxation. The steps for solving the Lagrangian relaxation model using the subgradient optimization method are as follows: Step 1: Split the problem satisfying the Lagrange duality property into several sub-problems with the same number of vehicles; introduce the Lagrange multiplier , define the upper bound of the original problem and lower bound And initialize; Step 2: Solve the sub-problem of the original objective function and calculate the new function value with Lagrangian at this time , and update the lower bound of the original problem ; Step 3: Calculate the subgradient based on the optimal solution of the relaxed subproblem and update the Lagrange multiplier as follows: , if the lower bound of the original problem is If no replacement is obtained within a generation, the number of iterations is halved; Step 4: The probability of vehicle path short circuit optimization is based on solving the subproblem, iteratively searching for feasible solutions to the original problem, and then updating the upper bound of the original objective function. ; Step 5: If the difference between the upper bound of the original objective function and the lower bound of the relaxed sub-problem is less than the threshold range Or if the number of iterations is reached, the iteration is stopped and the current optimal feasible solution is regarded as the optimal solution of the original objective function. Otherwise, steps 2 to 4 are repeated.
[0027] S5, solve the sub-problem, use the labeling method to label each passenger node, and introduce a preset sub-short circuit scheme into the labeling method, accept the sub-optimal labeling within the preset acceptable range that is inferior to the preset optimal labeling, so as to achieve an effective solution to the upper bound of the objective function.
[0028] Specifically, step S5 includes: labeling all passenger points departing from the departure city and adding all passenger points to the passenger set; Select a point from the passenger set , delete it from the passenger set and mark the other points; When it is determined that the current label satisfies the vehicle passenger capacity constraint, vehicle channel constraint, detour constraint, and the vehicle has at least one feasible path after the visit, this label is compared with the planned labels. If there is a label that can be planned, this label is eliminated; When the number is available in the planned number, it is replaced and the point is put back into the passenger set; When it is determined that this number cannot dominate the planned number, this number is directly added to the planning set and the passenger set; When the passenger capacity corresponding to the number is equal to 0, the destination city is numbered, and the second shortest path strategy is adopted to accept the path that is inferior to the preset threshold of the shortest path; Repeat the above steps until the passenger set is an empty set and the solution to the subproblem is obtained.
[0029] In this embodiment, when solving the relaxed sub-problem, an improved labeling method is used to label each passenger node. The idea of secondary short circuit is introduced into the labeling method, and the secondary optimal labeling within a certain range inferior to the optimal labeling is accepted, thereby achieving an effective solution to the upper bound of the objective function. The specific steps of the improved labeling method are as follows: Step 1: Starting from the departure city, label all passenger points and add all passenger points to the passenger set; Step 2: Select a point from the passenger set , delete it from the passenger set, mark the other points, if the current label satisfies the vehicle passenger constraint, vehicle channel constraint, detour constraint, and the vehicle has at least one feasible path after the visit, go to step 3; Step 3: compare this number with the planned number. If there is a planable number, remove this number. If the number can be controlled by the planned number, replace it and put this point back into the passenger set. If this number cannot control the planned number, add this number directly to the planning set and the passenger set. Step 4: When the passenger capacity corresponding to the label is equal to 0, label the destination city. Adopt the second shortest path strategy and accept the path that is inferior to the shortest path by a certain threshold; Step 5: Repeat steps 2 to 4 until the passenger set is empty. At this time, the solution to the subproblem is obtained. The second shortest path optimization method is adopted to accept feasible solutions that are inferior to the shortest path threshold range. In this way, even if the solution method cannot search all the paths in the optimal solution of the original problem, the feasible path obtained by the labeling method also contains part of the optimal solution, and the passenger nodes visited are relatively more, and the solution efficiency is also higher.
[0030] In this embodiment, in order to verify the effectiveness of the method model and model solution proposed in the present invention, the application of the present invention will be illustrated by a practical example below. The passenger vehicle order data and GPS data from November 1, 2021 to November 30, 2021 in two adjacent cities in a certain place are selected. Among them, part of the data is selected for simulation, and the data set is the reservation data of the first and last passenger vehicles serving users in two adjacent cities in a certain place in November 2021. The model output obtains a set of carpooling routes containing several vehicles, calculates the total vehicle driving distance of each route in the set, the total driving time of each vehicle in the two cities, and compares the average travel time cost of passengers with different model methods for verification. If these indicators are better than the comparison method after optimization or have detailed improvements, the model method verification is correct.
[0031] In order to analyze and test the carpooling effects of various solution methods on the problem model in this paper, this paper calculates the reservation order data for one week (including non-working days) and takes the 7 solutions of daily data to obtain the solutions of each experiment. The daily carpooling platform profit, the average driving time of each vehicle, the average waiting time of passengers, the vehicle load rate, and the model convergence time are calculated and compared with different solution methods for testing. If these indicators are better than the comparison methods or have detailed improvements after optimization, the model method is tested correctly.
[0032] ; ; ; in, For the daily carpooling platform profit, is the average driving time of each vehicle, is the average waiting time for passengers.
[0033] The convergence criterion of the labeling module in the present invention adopts the principle of the maximum number of vehicles under the trip constraint. The convergence criterion of the genetic algorithm adopts the maximum number of iterations, and the encoding rule adopts the natural number encoding rule. The distance measurement parameter of the present invention and the comparison method is set to L1 distance, and the comparison model encoding rule is consistent. The experimental parameter settings are shown in Table 2: Table 2 Experimental parameter settings
[0034] The present invention respectively adopts the Lagrangian relaxation algorithm and the labeling method, the genetic algorithm with a unilateral strategy, the sequential construction method for maximizing platform profits, and the branch and bound method to test the proposed bilateral multi-trip round-trip carpooling path optimization problem model on a week's carpooling reservation data.
[0035] Table 3 Carpooling path results date Carpooling path (0-100 is the passenger sequence of city A, 1000- is the passenger sequence of city B) 11 / 1 [[13, 12, 14]],[[32, 33, 31, 34], [1043,1045]], [[7, 6, 4, 2, 3, 5],[1011, 1010, 1013],[15,13,12]],[[21, 24, 23, 22],[1027, 1026, 1024],[28,29],[1030,1032]] 11 / 2 [[14, 13,],[1015,1013]], [[17, 15, 19, 18],[1020, 1019]], [[6, 8, 4,9, 5, 7],[1010,1009]],[[20, 23, 24, 21, 25, 22],[1029, 1030],[28, 29,1036,1038]] 11 / 3 [[25, 27, 24, 26],[1028,1026]], [[17, 19, 18, 20],[1019, 1018,1017]], [[32, 31, 33, 34],[1035, 1032, 1033, 1034],[37,39]],[[2, 4,6, 8, 5, 7],[1008, 1006, 1009],[13,14]] 11 / 4 [[17, 22, 20, 19, 18, 21]], [[11, 13, 16, 12, 15, 14],[1022, 1020]],[[28, 31, 29],[1043, 1045],[37,38]], [[4, 6, 5, 9],[1013, 1012, 1015,1014]] 11 / 5 [[13, 14, 16, 15, 17],[1021,1022],[27, 28, 26]], [[31, 30, 29, 32],[1035,1036],[39, 40],[1042, 1044, 1041, 1045, 1046]], [[5, 7, 6, 4,3, 8],[1022, 1025, 1020, 1023],[18, 25]], [[20, 21, 22, 19, 23, 24],[1033, 1032],[1038, 1036, 1039, 1037],[35, 34]] 11 / 6 [[16, 15, 17, 20, 18, 19],[1028, 1035, 1029, 1032, 1034, 1033],[41,42]], [[9, 13, 7, 10, 11, 12],[1018, 1030, 1026, 1031, 1024, 1023],[40,43],[1047, 1045, 1043]], [[24, 25, 23, 21, 22, 26],[1044, 1042,1040,1058]], [[32, 35, 33, 36, 34, 37],[1039, 1038],[49, 48, 50, 47],[1055, 1057, 1053, 1056, 1052]] 11 / 7 [[20, 22, 25, 24, 23, 21],], [[26, 27, 30, 29, 28, 31], [1050, 1051,1048, 1049],[55, 54]], [[32, 35, 33, 34, 36, 37],[1062, 1063, 1064]],[[9, 12, 11, 7, 10, 13],[1042, 1044, 1040, 1045, 1039, 1041]] Table 4 Comparison of total vehicle profit and average convergence time of each solution method
[0036] Table 3 shows the 7-day carpooling path results of the method of the present invention. It can be seen that as the date approaches the weekend, the order scale increases, and the number of passengers who successfully carpool also increases. Table 4 shows the total platform profit of the four methods and the convergence time of the model. In terms of the objective function value of the model, the solution method proposed in the present invention increases the total profit of the platform by an average of 6.52% compared with other methods, among which the total profit obtained by the branch and bound algorithm is the lowest. Compared with the unilateral carpooling problem, the two-sided carpooling problem has additional constraints such as return trips, which increases the complexity of the problem and the difficulty of searching. Directly using traditional heuristic search algorithms may result in too large a problem population, slow iteration speed, and failure to converge.
[0037] Table 5 Comparison of average vehicle driving time and passenger waiting time for each solution method
[0038] According to Table 5, the average driving time of the vehicles in this chapter's model is 6.41% higher than that of the comparison algorithm. Analysis shows that it is a two-sided intercity carpooling path problem. Each vehicle travels on the same highway, and the overall driving distance is longer. Compared with the optimized path of the vehicle in the city, the proportion that can be improved is not large. The average waiting time of passengers is shortened by 13.24% on average compared with the comparison algorithm. Analysis shows that the model in this chapter improves the vehicle load rate. Under more passenger nodes, the optimized vehicle path reduces the detour distance of the vehicle to pick up and drop off passengers.
[0039] Table 6 Performance of each part of the method of the present invention
[0040] According to Table 6, the initial solution generated by the sequential construction method of the present invention accounts for more than 90.24% of the objective function value on average, wherein the closer to the weekend, the lower the objective function value of the initial solution. Analysis of the problem shows that with the increase of data scale, the deviation from the optimal solution is getting larger and larger when the approximate algorithm is used to solve the path, and the searchable domain of the optimal solution is also getting larger, and the space that can be optimized is also increasing. Analysis of the convergence time of each part of the present invention method shows that the generation of the initial solution accounts for an average of 11.86% of the convergence time of the entire solution method, wherein the larger the data scale, the more time-consuming the generation of the initial solution is. According to Table 6, under the premise of the same initial solution, the objective function after Lagrangian relaxation of the present invention method is shortened by an average of 15.68% compared with the objective function of the hard solution. Analysis shows that the sub-gradient optimization method can quickly obtain the lower bound of a problem for the relaxed objective function, and then search the feasible solution of the original problem as the upper bound through the sub-short path labeling method with a certain probability, and determine the optimal solution of the original problem by iteratively updating the upper and lower bounds, thereby reducing the difficulty of solving the problem. Effectively improve the convergence speed of the solution method.
[0041] In summary, the static scheduling method for intercity passenger carpooling with multiple round trips on both sides constructs a mixed integer programming model for the optimization problem of carpooling paths on both sides with multiple round trips. With the goal of maximizing the profit of the carpooling platform, compared with the unilateral path optimization problem, the impact of the number of round trips of the vehicle and the vehicle's rest after completing a single trip is considered in the scenario of bilateral round trip constraints. The algorithm flow of generating the initial feasible solution by using the space filling method and optimized grouping is used to solve the problem of slow solution speed of the bilateral path problem and the inability to converge large-scale data sets. The solution method of the present invention introduces the optimization idea of sub-short circuit in the process of solving sub-problems. When labeling customer points, suboptimal labels within a certain range inferior to the optimal label are accepted, thereby achieving an effective solution to the upper bound of the problem, and using the Lagrangian relaxation objective function to quickly obtain the lower bound of the problem, which accelerates the approximation speed of the upper and lower bounds of the target value, improves the convergence speed of the complex problem model, and the platform benefit of the solution method of the present invention is better than the comparison algorithm.
[0042] See also Figure 5 The second embodiment of the present invention further provides a static scheduling device for inter-city passenger carpooling with multiple round trips on both sides, which includes: The data acquisition unit 201 is used to acquire the passenger reservation order data of intercity passenger transport and the vehicle sets of cities A and B, and to draw a network graph according to each travel node in the passenger reservation order data, wherein the network graph includes a vertex set and an edge set; The model building unit 202 is used to perform static carpooling scheduling according to the passenger reservation order data and the vehicle sets in cities A and B, and to build a mixed integer programming model, wherein static carpooling scheduling means that the passenger order data is known and unchanged during scheduling; An initial solution construction unit 203 is used to group the passenger reservation order data using a space filling curve method according to the mixed integer programming model, and construct an initial solution of the departure city using a 2-swap algorithm and an insertion algorithm; A model lower bound solving unit 204 is used to solve the lower bound of the objective function of the mixed integer programming model based on the initial solution by using a Lagrangian relaxation algorithm, and decompose the relaxed problem into multiple sub-problems; The model upper bound solving unit 205 is used to solve the sub-problem, label each passenger node using a labeling method, introduce a preset sub-short circuit scheme into the labeling method, and accept sub-optimal labels within a preset acceptable range that are inferior to the preset optimal labels, so as to achieve an effective solution to the upper bound of the objective function.
[0043] The third embodiment of the present invention also provides an inter-city passenger carpooling two-sided multiple round-trip static scheduling device, which includes a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement the inter-city passenger carpooling two-sided multiple round-trip static scheduling method as described in any one of the above items.
[0044] Exemplarily, the above-mentioned devices and process steps can be implemented by a computer program. The computer program can be divided into one or more units. The one or more units are stored in the memory and executed by the processor to complete the present invention.
[0045] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0046] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the present invention by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0047] Wherein, if the electronic device or printer integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0048] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0049] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A static scheduling method for multiple round trips on both sides of intercity passenger carpooling, characterized in that: include: Obtaining passenger reservation order data of intercity passenger transport and a set of vehicles in cities A and B, and drawing a network graph according to each travel node in the passenger reservation order data, wherein the network graph includes a vertex set and an edge set; According to the passenger reservation order data and the vehicle sets in cities A and B, static carpooling scheduling is performed to construct a mixed integer programming model, wherein static carpooling scheduling means that the passenger order data is known and unchanged during scheduling; According to the mixed integer programming model, the passenger reservation order data is grouped using a space filling curve method, and an initial solution of the departure city is constructed using a 2-swap algorithm and an insertion algorithm; Based on the initial solution, a Lagrangian relaxation algorithm is used to solve the lower bound of the objective function of the mixed integer programming model, and the relaxed problem is decomposed into multiple sub-problems; To solve the sub-problem, a labeling method is used to label each passenger node, and a preset sub-short circuit scheme is introduced into the labeling method, and sub-optimal labels within a preset acceptable range that are inferior to the preset optimal labels are accepted to achieve an effective solution to the upper bound of the objective function.
2. The static scheduling method for intercity passenger carpooling with multiple round trips on both sides according to claim 1 is characterized in that: Obtain the passenger reservation order data of intercity passenger transport and the vehicle collection of cities A and B, and draw a network diagram based on each travel node in the passenger reservation order data, specifically: Obtain the passenger reservation order data of intercity passenger transport and the vehicle set K of cities A and B, wherein the passenger reservation order data includes the passenger's designated boarding point, destination and the passenger carpooling order set Q of cities A and B. , represents the set of passenger carpooling orders in city A, For the qth passenger carpooling order in city A, is the number of carpooling orders for passengers in city A, represents the set of passenger carpooling orders in city B, For the qth passenger carpooling order in city B, is the number of carpooling orders from passengers in city B, and the vehicle set K in cities A and B , represents the set of vehicles in city A, is the kth car in city A, is the number of vehicles in city A, represents the set of vehicles in city B, is the kth car in city B, is the number of vehicles in city B; Draw each travel node in the passenger booking order data to generate a network diagram ,in, is a vertex set, where vertices represent the boarding and alighting points of passengers, and the boarding and alighting points appear in pairs. For edge sets.
3. The static scheduling method for intercity passenger carpooling with multiple round trips on both sides according to claim 2 is characterized in that: According to the passenger reservation order data and the vehicle sets in cities A and B, static carpooling scheduling is performed and a mixed integer programming model is constructed, specifically: According to the passenger reservation order data and the vehicle collection of cities A and B, a static carpooling scheduling of multiple round trips on both sides is carried out, and a mixed integer programming model is constructed. The mixed integer programming model aims to maximize the profit of the carpooling platform. The model formula is: ; ; ; in, represents the maximum profit, is the total fare revenue for completing the order, is the vehicle path cost, and Both The decision variables, Indicate the order By itinerary Vehicle services, Indicate the order By itinerary Vehicle services, and Both The decision variables, Indicate itinerary Vehicles from Click to Click through, Indicate itinerary Vehicles from Click to Click through, represents the set of all itineraries for cities A and B. represents the set of trips starting from city A, is the rth trip from city A to city B, is the total number of trips from city A to city B, represents the set of trips starting from city B, is the rth trip from city B to city A, is the total number of trips from city B to city A, is the average passenger mileage revenue, is the passenger mileage cost, represents the set of boarding and alighting points of vehicle k in its rth trip from city A to city B, represents the set of boarding point numbers in city A. Number the vth boarding point in city A, It represents the set of numbers of the drop-off points in city B. Number the vth B city drop-off point, For demand point To the demand point transportation distance.
4. The static scheduling method for intercity passenger carpooling with multiple round trips on both sides according to claim 3 is characterized in that: According to the mixed integer programming model, the passenger reservation order data is grouped and processed using the space filling curve method, and the initial solution of the departure city is constructed using the 2-swap algorithm and the insertion algorithm, specifically: According to the mixed integer programming model, the position parameters of each node in the space interval are calculated using a space filling curve method; Arrange the nodes and evenly divide the corresponding nodes into a plurality of regions, wherein the nodes in each region form a loop in sequence; Calculate the channel time P(k) and detour coefficient Q(k) of each loop respectively, where: , is the vehicle capacity, is the set of entrances and exits and all passenger boarding and alighting demand points, is the maximum travel time constraint, To bypass constraints; Determine whether the vehicle and trip constraints of the same vehicle meet the preset constraints; If not, the 2-swap algorithm is used to swap the positions of passengers between different vehicles with a preset probability, and the insertion algorithm is used to insert the passengers into the appropriate vehicle so that the generated initial solution satisfies the constraints.
5. The static scheduling method for intercity passenger carpooling with multiple round trips on both sides according to claim 4 is characterized in that: Based on the initial solution, the Lagrangian relaxation algorithm is used to solve the lower bound of the objective function of the mixed integer programming model, and the relaxed problem is decomposed into multiple sub-problems, specifically: According to the initial solution, a lower bound of the objective function of the mixed integer programming model is solved by a hard constraint method in a Lagrangian relaxation algorithm, wherein the hard constraint is selected as a detour constraint; Introducing Lagrange multipliers The objective function is relaxed, and the objective function of the Lagrangian relaxation model after relaxation is: ; ; ; in, is the objective function of the relaxed Lagrangian relaxation model, is the set of all the multiple round trip pick-up and drop-off points for vehicle k’s rth trip, The boarding and alighting points for the rth return trip of vehicle k from city B to city A are as follows: Passengers are numbered and assembled at the boarding point in City B. Number the wth passenger's boarding point in city B, The numbered collection for the A city drop-off point, Number the wth A-city drop-off point, is the Lagrange multiplier, represents the fixed cost of the vehicle serving customers, is the decision variable, indicates that vehicle k passes from point i to point j, is the distance of the trip r, is the subgradient vector, is the transpose, P is the set of boarding points and alighting points, It means calculating or selecting the maximum possible value of the objective function under the preset relaxation conditions; Formulate the Lagrangian dual problem , and obtain the minimum value of the Lagrangian relaxation model , find a lower bound for the original problem and decompose the relaxed problem into multiple sub-problems.
6. The static scheduling method for intercity passenger carpooling with multiple round trips on both sides according to claim 5 is characterized in that: Introducing Lagrange multipliers Relax the objective function, specifically: The subgradient optimization method is used to quickly solve the maximization problem of non-differentiable convex functions after Lagrangian relaxation, specifically: The problem that satisfies the Lagrange duality property is divided into several sub-problems with the same vehicle, and the Lagrange multiplier is introduced. , define the upper bound of the original problem and the lower bound , and initialize; Solve the subproblem of the original objective function and calculate the new function value with Lagrangian at this time , and update the lower bound of the original problem ; Calculate the subgradient based on the optimal solution of the relaxed subproblem and update the Lagrange multiplier. When the lower bound of the original problem is determined, update the number of iterations of the Lagrange multiplier. When no replacement is obtained, the number of iterations is halved and the Lagrange multiplier formula is updated as follows: ,in, For the The updated Lagrange multiplier is, For the The updated Lagrange multiplier is, is the number of elements in the set U, is the smoothing constant, the set The Lagrange multiplier is A subgradient set of is the total number of constraints; The probability of the second shortest path The probability of vehicle path short circuit optimization is based on the preset sub-problem, and the feasible solution of the original problem is iteratively searched, and the upper bound of the original objective function is updated. ; When it is determined that the difference between the upper bound of the original objective function and the lower bound of the relaxed sub-problem is less than the preset difference threshold between the relaxed sub-problem and the original problem Or when the preset number of iterations is reached, the iteration is stopped and the current optimal feasible solution is regarded as the optimal solution of the original objective function; When it is determined that the difference between the upper bound of the original objective function and the lower bound of the relaxed sub-problem is not less than the preset difference threshold between the relaxed sub-problem and the original problem Or when the preset number of iterations is not reached, repeat the above steps until the preset conditions are met.
7. The static scheduling method for intercity passenger carpooling with multiple round trips on both sides according to claim 1 is characterized in that: To solve the sub-problem, a labeling method is used to label each passenger node, and a preset sub-short circuit scheme is introduced into the labeling method to accept a sub-optimal label within a preset acceptable range that is inferior to the preset optimal label, specifically: Label all passenger points starting from the departure city and add all passenger points to the passenger set; Select a point from the passenger set , delete it from the passenger set and mark the other points; When it is determined that the current label satisfies the vehicle passenger capacity constraint, vehicle channel constraint, detour constraint, and the vehicle has at least one feasible path after the visit, this label is compared with the planned labels. If there is a plannable label, this label is removed; When the number is available in the planned number, it is replaced and the point is put back into the passenger set; When it is determined that this number cannot dominate the planned number, this number is directly added to the planning set and the passenger set; When the passenger capacity corresponding to the number is equal to 0, the destination city is numbered, and the second shortest path strategy is adopted to accept the path that is inferior to the preset threshold of the shortest path; Repeat the above steps until the passenger set is an empty set and the solution to the subproblem is obtained.
8. A static dispatching device for multiple round trips on both sides of intercity passenger carpooling, characterized in that: include: A data acquisition unit is used to acquire passenger reservation order data of intercity passenger transport and a set of vehicles in cities A and B, and to draw a network graph according to each travel node in the passenger reservation order data, wherein the network graph includes a vertex set and an edge set; A model building unit is used to perform static carpooling scheduling according to the passenger reservation order data and the vehicle sets in cities A and B, and to build a mixed integer programming model, wherein static carpooling scheduling means that the passenger order data is known and unchanged during scheduling; An initial solution construction unit, configured to group the passenger reservation order data using a space filling curve method according to the mixed integer programming model, and construct an initial solution of a departure city using a 2-swap algorithm and an insertion algorithm; A model lower bound solving unit, used to solve the lower bound of the objective function of the mixed integer programming model based on the initial solution by using a Lagrangian relaxation algorithm, and decompose the relaxed problem into multiple sub-problems; The model upper bound solving unit is used to solve the sub-problem, label each passenger node using a labeling method, introduce a preset sub-short circuit scheme into the labeling method, and accept sub-optimal labels within a preset acceptable range that are inferior to the preset optimal labels, so as to achieve an effective solution to the upper bound of the objective function.
9. A static dispatching device for multiple round trips on both sides of intercity passenger carpooling, characterized in that: It includes a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement the static scheduling method for inter-city passenger carpooling with multiple round trips on both sides as described in any one of claims 1 to 7.
Citation Information
Patent Citations
A carpooling order distribution method and system
CN109948874A
Demand response type BRT vehicle scheduling algorithm based on Lagrange principle
CN115936330A
Scheduling matching method and device for back-and-forth dynamic carpooling of inter-city passenger transport
CN116663811A
Double-layer vehicle path planning method based on Lagrange relaxation algorithm
CN118247111A
Dynamic planning-based ride-sharing trip organization method, device, apparatus, and storage medium
WO2021232586A1
