A two-level vehicle path planning method based on Lagrangian relaxation algorithm
Through a double-layer vehicle path planning method based on the Lagrangian relaxation algorithm, combined with customized buses and online ride-hailing, the problem of complex passenger demand and unstable seat utilization in urban transportation hubs is solved, and an efficient and low-carbon vehicle is realized. 'Door-to-door' service and improves operational efficiency and solution efficiency.
Patent Information
- Application Number
- CN202410451388.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-04-15
AI Technical Summary
Urban transportation hubs have large passenger demand and complex distribution. The utilization rate of customized bus seats is unstable and the coverage is limited. It is difficult to achieve efficient and low-carbon 'door-to-door' services with existing technology, especially in comprehensive passenger transportation hubs such as airports and high-speed rail stations. Connecting service is in progress.
A two-layer vehicle path planning method based on the Lagrangian relaxation algorithm is used, combined with customized buses and online ride-hailing, to construct a demand data set through order reservation information, determine the stopping sites, and construct the objective function and constraints to maximize operating income. Using Mixed integer linear programming models and heuristic algorithms optimize routes to achieve collaborative optimization of customized bus and online ride-hailing routes.
It improves the flexibility and convenience of passengers' connection services at transportation hubs, achieves more efficient and low-carbon 'door-to-door' services, improves operating income, and improves solution efficiency through decomposition algorithms to output optimal customized bus routes. , online car-hailing routes and order assignment plans.
Smart Images

Figure CN118247111B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of vehicle path planning, and in particular relates to a double-layer vehicle path planning method based on a Lagrangian relaxation algorithm. Background Art
[0002] As a key station in the urban transportation system, the connectivity and service level of urban transportation hubs are crucial to the entire urban transportation system. Promoting the high-quality development of passenger intermodal transportation at comprehensive passenger transport hubs and developing "one-time ticket purchase, one-time payment, one-code access" service products will help improve the connection efficiency and service quality of transportation hubs. To this end, the present invention proposes a new connection mode that combines customized buses with online car-hailing and carpooling.
[0003] Customized buses and online car-hailing carpooling each have unique advantages. Collaborative operation can give full play to the advantages of both, maximize resource utilization and optimize transportation costs, reduce environmental pollution and carbon emissions, and promote the sustainable development of urban public transportation. Customized buses are a public transportation operation mode that responds to demand. They have the advantages of precision, efficiency, convenience, speed, environmental protection and low carbon. They are in line with the current development trend of smart transportation of "Internet + big data + sharing" and have become a powerful means to meet the travel needs of transportation hubs. However, the large demand and complex distribution of passengers at transportation hubs, the unstable utilization rate of customized bus seats, and the limited coverage are also shortcomings that cannot be ignored. In contrast, online car-hailing carpooling is more flexible and can solve the problem of the "last mile" of residents' travel and meet the personalized needs of passengers from transportation hubs to specific destinations "door to door". Customized buses are suitable for long-distance and high-load needs, while online car-hailing carpooling is suitable for short-distance and personalized travel needs. By developing a joint service model of customized buses and online car-hailing, it will help reduce the empty driving rate of vehicles, improve overall economic benefits, and achieve more flexible and efficient urban transportation hub shuttle services. Summary of the invention
[0004] The purpose of the present invention is to provide a double-decker vehicle path planning method based on the Lagrangian relaxation algorithm. Based on the concept of vehicle intermodal transportation, a customized bus combined with online car-hailing and carpooling intermodal service model for connecting to comprehensive passenger transport hubs such as airports and high-speed railway stations is proposed to ensure service efficiency while providing efficient and low-carbon "door-to-door" service.
[0005] To achieve the above object, the present invention provides a double-layer vehicle path planning method based on Lagrangian relaxation algorithm, comprising the following steps:
[0006] S1. Construct an order demand dataset based on order reservation information, including the order origin, destination, expected pickup time, and expected drop-off time;
[0007] S2. According to the order demand data set, the number of customized bus stops is determined by the silhouette coefficient method, and the order destination is subjected to K-means cluster analysis to determine the customized bus stops; station numbers are set for transportation hubs, customized bus stops, online car-hailing service stations, and virtual destinations to build a customized bus-online car-hailing service network;
[0008] S3. According to the coordinates of the service network sites, a site distance matrix, a time matrix and a cost matrix are constructed to determine the objective function and constraints for the coordinated optimization of the customized bus and online car-hailing routes, wherein the objective function is to maximize the operating revenue of the platform, and the constraints include: demand allocation constraints, capacity limit constraints, vehicle flow balance constraints, order flow balance constraints and service time window constraints;
[0009] S4. Establishing a mixed integer linear programming model according to the objective function and the constraints;
[0010] S5. Design a heuristic algorithm based on Lagrangian relaxation to solve the model. Introduce Lagrangian multipliers to relax difficult constraints. Split the original problem into two sub-problems without complex constraints, including sub-problem 1 and sub-problem 2. Use the subgradient algorithm to update the multiplier. Iterate to obtain the upper and lower bounds of the original problem until the termination condition is met. Output customized bus routes, online car-hailing routes, and order assignment plans.
[0011] Preferably, S1 specifically includes:
[0012] Consider a set of orders , define the index of the order as The horizontal and vertical coordinates of the destination are and The total number of orders is ; The platform accepts the order The income is , the origin and destination of each order are and ; The expected service time window for an order is , where the departure time of all orders is initialized to 0, Indicates order Expected destination The latest time of; In addition, the customized bus and online car collections are defined as and , let the vehicles gather , define the index of the vehicle as and , ; The vehicle will be called The incurred fixed costs are defined as , set the vehicle's capacity limit to .
[0013] Preferably, the specific process of S2 is as follows:
[0014] S2.1. Determine the number of customized bus stops by using the silhouette coefficient method , site The calculation formula of the silhouette coefficient is as follows:
[0015] ;
[0016] in It is a site The average distance to other points in the same cluster, It is a site The average distance to the nearest other points in different clusters. Calculate the mean of the silhouette coefficients of all points, that is, obtain the total silhouette coefficient of the clustering result. Select the number of cluster centers with the largest total silhouette coefficient as the determined value;
[0017] S2.2. According to step S2.1, the number of customized bus stops is given , optional The points are used as the initial centroid, and the centroid is found to determine the stops for the customized bus.
[0018] S2.3, assign each order destination site to the nearest centroid, forming clusters;
[0019] S2.4, to minimize the cost function As the goal, recalculate the centroid of each cluster and update the location of the customized bus stop. The cost function is calculated as follows:
[0020] (2.1)
[0021] in, Indicates the site where the order destination is located; express The currently assigned cluster centroid index; Customize the bus stop location for the cluster centroid; express The currently assigned cluster centroid, is the total number of orders;
[0022] S2.5, repeat steps S2.3 and S2.4 until the cluster centroid does not change;
[0023] S2.6. After the customized bus stops are determined by the K-means clustering algorithm in steps S2.1-S2.5 above, set station numbers for transportation hubs, customized bus stops, online car-hailing service stations, and virtual destinations; consider a double-decker vehicle path topology network of customized buses and online car-hailing services with a single starting point and multiple destinations ,definition A collection of network sites. ,in, represents a set of customized bus stops, {0} represents a transportation hub stop, which is the starting point of the customized bus. Represents a collection of online car-hailing service sites. Represents a set of virtual endpoints; the index of the defined site is , the site on the topology network The road connection index is defined as a station , the roads connecting the stations are defined as , is the set of network edges.
[0024] Preferably, S3 specifically includes:
[0025] S3.1. Construct a distance matrix based on the site coordinates. The distance between each site is represented by the Euclidean distance. Suppose the coordinates of the two points are , , then the distance between two points is given by Calculate. Store the calculation results in array form, and record the array as , the array elements are , indicating that the vehicle is from Travel to The distance from each station to the virtual end point is set to 0;
[0026] S3.2. Calculate the time matrix and cost matrix based on the constructed distance matrix. Since the travel time and cost per unit distance vary among different vehicle models, calculate the travel time matrix and cost matrix for different vehicles respectively. The vehicle travel time matrix is calculated by multiplying the unit distance travel time by the distance matrix, and the calculation result is stored in the form of an array, recorded as , the array elements are , indicating vehicle from Travel to time; by vehicle The unit distance travel cost is multiplied by the distance matrix to obtain the vehicle operation cost matrix, which is recorded as , the array elements are , indicating vehicle from Travel to operating costs;
[0027] S3.3. Determine the objective function and constraints for the coordinated optimization of customized bus and online car-hailing routes; the objective function is to maximize the operating profit of the platform; the constraints include: demand allocation constraints, ensuring that each order is reasonably assigned to a service vehicle; capacity limit constraints, ensuring that the number of passengers does not exceed the capacity limit of the vehicle; vehicle flow balance constraints and order flow balance constraints, ensuring that passengers arrive at their destination accurately and uninterruptedly; service time window constraints, ensuring that passengers arrive at their destination within the expected time range.
[0028] Preferably, in S4, according to the objective function and the constraints, a specific expression of a mixed integer linear programming model is established as follows:
[0029] (4.1)
[0030] ;
[0031] (4.2)
[0032] (4.3)
[0033] (4.4)
[0034] (4.5)
[0035] (4.6)
[0036] (4.7)
[0037] (4.8)
[0038] (4.9)
[0039] (4.10)
[0040] (4.11)
[0041] (4.12)
[0042] (4.13)
[0043] (4.14)
[0044] (4.15)
[0045] (4.16)
[0046] (4.17)
[0047] (4.18)
[0048] (4.19)
[0049] (4.20)
[0050] (4.21)
[0051] (4.22)
[0052] (4.23)
[0053] (4.24)
[0054] (4.25)
[0055] (4.26)
[0056] (4.27)
[0057] in, They are the hub starting point set and the virtual end point set respectively; Customized bus stop collection, including hub-start collection ; is the set of online car-hailing service sites, which represents the set of order destination sites; For all site collections, , Indicates site index; For custom bus vehicle collection; Assemble vehicles for online ride-hailing services; For all vehicles, Indicates the vehicle index; is the order set, Indicates the order index; Accepting orders for the platform of income; For vehicles On site The operating costs of traveling between For vehicles On site The time of travel between To call a vehicle Fixed costs incurred; For vehicles Maximum capacity; For orders Expected destination the latest time; is a sufficiently large positive number, the decision variable is a non-negative real variable, representing the vehicle Visit Site time, is a binary variable and is described as follows:
[0058] ;
[0059] ;
[0060] ;
[0061] ;
[0062] The above formula (4.1) is the objective function, and the optimization goal is to maximize the operating profit of the platform, which is expressed by revenue minus variable operating costs and fixed operating costs; constraints (4.2)-(4.3) are order-vehicle allocation constraints, which ensure that an order is served by at most one customized bus. Once an order is served by a bus, a corresponding online car-hailing service must be arranged; constraint (4.4) is a capacity constraint, which limits the number of passengers to no more than the vehicle's capacity limit; constraints (4.5)-(4.9) and (4.10)-(4.15) are the path optimization constraints for customized buses and online car-hailing carpooling, respectively, to ensure that the routes of customized buses and online car-hailing services are regular. The division is coherent and reasonable; constraints (4.16)-(4.17) are order flow constraints, which ensure that the order flow reaches the order destination accurately and uninterruptedly; constraints (4.18)-(4.22) are runtime constraints, among which constraints (4.18)-(4.19) calculate the time it takes for the vehicle to arrive at the station, and constraints (4.20)-(4.21) ensure that the time it takes for passengers to arrive at the transfer point by taking the customized bus is equal to the time it takes to take an online car-hailing service at that point; constraint (4.22) is a right time window constraint, which ensures that passengers arrive at the destination before the expected get-off time; constraints (4.23)-(4.27) define the value range of the decision variables.
[0063] Preferably, the specific process of designing the Lagrangian relaxation algorithm in S5 to solve the mathematical programming model is as follows:
[0064] S5.1. Convert the objective function (4.1) of the original planning problem into the standard form of solving the minimum value, which is equivalent to:
[0065] (5.1)
[0066] Introducing Lagrange multipliers and Relax the difficult constraints (4.3) and (4.16) respectively, split the original problem into two sub-problems without complex constraints, including sub-problem 1 and sub-problem 2. The original problem model (4.1)-(4.27) also contains the coupling constraints of the two vehicle model variables, including (4.3), (4.16), (4.20)-(4.21); introduce the Lagrange multiplier and The difficult constraints (4.3) and (4.16) are relaxed to the objective equation (5.1) respectively, and the constraints (4.20)-(4.21) are eliminated to achieve the decoupling between the two vehicle model variables. The original problem is decomposed into two sub-problems without complex coupling constraints, including sub-problem 1 and sub-problem 2, which correspond to the customized bus route planning and online car-hailing carpooling route planning problems;
[0067] S5.2. Solve the subproblems based on the current Lagrange multiplier to obtain the lower bound of the original problem; based on the current Lagrange multiplier value, bring the known parameters into the two subproblem models and use the Cplex solver to solve; initially, set the Lagrange multiplier to an array of all zeros; solve the two subproblems in sequence, use the arrival time of the customized bus at the station output by subproblem 1 as the initial time input of the online car-hailing service in subproblem 2, and then solve subproblem 2; according to the dual relaxation theory, for any given Lagrange multiplier vector, solve the optimal value obtained by solving the relaxed model as the lower bound of the original model; obtain the objective function value of the solution results of subproblem 1 and subproblem 2 and sum them up. If the sum is greater than the lower bound of the original problem , then it is updated to the current lower bound value of the original problem; it should be noted that the coupling constraints (4.20)-(4.21) are removed when decomposing the original problem in step S5.1, and the role of constraints (4.20)-(4.21) is to accurately complete the time calculation of the customized bus-online car-hailing transfer point, ensuring that the time when the passenger takes the customized bus to the transfer point is equal to the time when the passenger takes the online car-hailing at that point; by solving sub-problem 1 first, the customized bus arrival time output by sub-problem 1 is used as the initial time input of the online car-hailing service in sub-problem 2, and then solving sub-problem 2 to satisfy constraints (4.20)-(4.21);
[0068] S5.3, perform a feasibility operation on the result outputted by step S5.2 to obtain the upper bound of the original problem; since the feasible domain of the original problem is enlarged, the lower bound solution obtained by Lagrangian relaxation may violate some of the relaxed constraints, therefore, perform a feasibility operation on the result outputted by step S5.2 to obtain the upper bound of the original problem;
[0069] S5.4: Use subgradient iteration algorithm to update Lagrange multipliers;
[0070] S5.5: Determine whether the iteration termination condition is met. If so, terminate the iteration; otherwise, go to S5.2.
[0071] Preferably, sub-problem 1 is a customized bus route planning problem, and the corresponding objective function and constraints are as follows:
[0072] (5.2)
[0073] ;
[0074] (5.3)
[0075] (5.4)
[0076] (5.5)
[0077] (5.6)
[0078] (5.7)
[0079] (5.8)
[0080] (5.9)
[0081] (5.10)
[0082] (5.11)
[0083] (5.12)
[0084] (5.13)
[0085] (5.14)
[0086] (5.15)
[0087] (5.16)
[0088] (5.17)
[0089] The above formula (5.2) is the objective function of sub-problem 1, which is the part of the objective function of the Lagrangian relaxation problem that only contains the variables related to the customized bus model; constraint (5.3) is the customized bus order allocation constraint, that is, one order can be served by at most one customized bus; constraint (5.4) is the customized bus capacity limit constraint, which limits the number of passengers to no more than the customized bus capacity; constraints (5.5)-(5.9) are customized bus path optimization constraints, which ensure that the customized bus service route planning is coherent and reasonable; constraint (5.10) is the order starting point constraint, which ensures that the served order starts from the hub starting point and the order flow reaches the order destination accurately and uninterruptedly; constraints (5.11)-(5.12) are the time calculations for the customized bus to arrive at the station; constraints (5.13)-(5.17) define the value range of the decision variables;
[0090] Sub-problem 2 is the online car-hailing carpooling route planning problem, and the corresponding objective function and constraints are as follows:
[0091] (5.18)
[0092] ;
[0093] (5.19)
[0094] (5.20)
[0095] (5.21)
[0096] (5.22)
[0097] (5.23)
[0098] (5.24)
[0099] (5.25)
[0100] (5.26)
[0101] (5.27)
[0102] (5.28)
[0103] (5.29)
[0104] (5.30)
[0105] (5.31)
[0106] (5.32)
[0107] (5.33)
[0108] (5.34)
[0109] The above formula (5.18) is the objective function of sub-problem 2, which is the part of the objective function of the Lagrangian relaxation problem that only contains variables related to the online car-hailing model; constraint (5.19) is the online car-hailing capacity limit constraint, which limits the number of passengers to no more than the online car-hailing capacity; constraints (5.20)-(5.25) are online car-hailing carpooling path optimization constraints, which ensure that the online car-hailing service route planning is coherent and reasonable; constraint (5.26) is the order flow constraint, which ensures that the order flow of the online car-hailing service arrives at the order destination accurately and uninterruptedly; constraints (5.27)-(5.28) are the time calculation formulas for the online car-hailing service to arrive at the station; constraint (5.29) is the right time window constraint, which ensures that the passengers arrive at the destination before the expected get-off time; constraints (5.30)-(5.34) define the value range of the decision variables.
[0110] Preferably, in S5.3, the feasibility operation of the result output by step S5.2 is performed to obtain the upper bound of the original problem, including: analyzing the solution result of S5.2, it is found that after the original problem is split into the customized bus route planning subproblem and the online car-hailing carpooling route planning subproblem, the planning of the two subproblems does not interfere with each other, which may cause a break in the order flow, resulting in an infeasible result; therefore, the result of the order arriving at the customized bus station output by subproblem 1 is brought into subproblem 2 as the order starting point of the online car-hailing carpooling service in subproblem 2, which can solve the problem of infeasible solution; the upper bound of the original problem is calculated according to the solution result, and the calculation formula is:
[0111] (5.35)
[0112] The upper bound obtained by the current feasible operation The historical minimum upper bound Compare, if it is lower than the historical minimum upper bound, update and save the minimum upper bound value , and store the feasible solution of this round as the optimal planning result; otherwise, the current upper bound is the historical minimum upper bound value, and the corresponding current upper bound .
[0113] Preferably, the specific process of updating the Lagrange multiplier using the subgradient iterative algorithm in S5.4 is as follows:
[0114] S5.4.1: Specify the Lagrangian dual problem , theoretical studies have shown that the Lagrangian relaxation problem The objective function of is a piecewise linear convex function of the Lagrange multiplier, and its optimal objective function value is the lower bound of the optimal objective function value of the original model. A better lower bound can be found by maximizing the function value. In short, in order to obtain the lower bound that is closest to the optimal solution of the original problem, it is necessary to construct the Lagrange dual problem :
[0115] (5.36)
[0116] S5.4.2: The decision variables for solving subproblems 1 and 2 in step S5.2 and Substitute the value of into equations (5.37) and (5.38) to calculate the subgradient:
[0117] (5.37)
[0118] (5.38)
[0119] The first The calculation results of the iterations are stored in the form of an array, and the array is denoted as , get the gradient of this round, if , then the Lagrangian algorithm terminates; otherwise, continue with S5.4.3;
[0120] S5.4.3: Update step size :
[0121] (5.39)
[0122] in is the current upper bound value, is the current lower bound value, is the current subgradient, The value is 2;
[0123] S5.4.4: This round and Stored as an array ,calculate , update the Lagrange multiplier.
[0124] Preferably, the iteration termination condition includes:
[0125] (1) The number of iterations does not exceed the maximum number of iterations ;
[0126] (2) The gap between the upper and lower bounds is 0, and the corresponding upper bound value is equal to the lower bound value. ;
[0127] (3) Or the objective function value does not change by more than a given value within a specified number of steps;
[0128] If any of the above conditions is met, the algorithm iteration is terminated, the current feasible upper bound solution is output, and customized bus routes, online car-hailing routes and order assignment plans are obtained.
[0129] Therefore, the present invention adopts the above-mentioned double-layer vehicle path planning method based on Lagrangian relaxation algorithm, which has the following beneficial effects:
[0130] (1) The present invention proposes a new inter-trip service model that combines customized buses with online car-hailing and carpooling. It provides passengers with customized inter-trip services based on their personalized travel needs and travel time, allowing passengers to enjoy greater flexibility and convenience in connecting services at passenger transport hubs such as airports and high-speed rail stations.
[0131] (2) The present invention establishes a mixed integer linear programming model with the goal of maximizing operating profit, comprehensively considering demand allocation constraints, capacity limit constraints, vehicle flow constraints, order flow constraints and time window constraints, and optimizes the system as a whole to more accurately plan a two-layer vehicle path optimization solution;
[0132] (3) The present invention uses the Lagrangian relaxation algorithm to solve the model, improving the efficiency of the solution while ensuring the accuracy of the results. First, the Lagrangian multiplier is introduced to relax the difficult constraints, and the original problem is split into two sub-problems without complex constraints. The multiplier is updated by the subgradient algorithm, and the upper and lower bounds of the original problem are iteratively obtained until the termination condition is met. Finally, the optimal customized bus route, online car-hailing route, and order assignment plan are output.
[0133] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0134] Figure 1 A flowchart of a double-layer vehicle path planning method based on Lagrangian relaxation algorithm of the present invention;
[0135] Figure 2 A schematic diagram of the K-means clustering algorithm flow provided by an embodiment of the present invention;
[0136] Figure 3 A line graph showing the change in the silhouette coefficient with the number of customized bus stops provided in an embodiment of the present invention;
[0137] Figure 4 A schematic diagram of the Lagrangian relaxation algorithm flow chart provided by an embodiment of the present invention;
[0138] Figure 5 A diagram of the Lagrangian relaxation iteration process for a 5-order 9-station example provided in an embodiment of the present invention;
[0139] Figure 6 A diagram of the Lagrangian relaxation iteration process for the 15-order 21-site example provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0140] The following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0141] See also Figure 1-6 A double-decker vehicle path planning method based on Lagrangian relaxation algorithm is proposed. The customized bus and online car-hailing connection mode is abstracted into a double-decker vehicle path planning problem. A mixed integer programming model is constructed and a Lagrangian relaxation algorithm is designed to solve it. The process framework of the present invention is as follows Figure 1 As shown, the specific steps implemented in the example are as follows:
[0142] S1. Build an order demand dataset based on order reservation information, including the order origin, destination, expected pick-up time, and expected drop-off time.
[0143] Assume an instance that provides services for 15 orders at a transportation hub, and set the hub starting number to , the virtual end point is , whose labels and coordinate information are shown in Table 1. The order indexes are Order_1, Order_2, ,Order_15, the horizontal and vertical coordinates of its destination, and the expected latest arrival time of each order are shown in Table 2. The departure time of all orders is initialized to 0. In addition, there are 2 customized buses and 4 online-hailing cars available for system planning to collaboratively serve 15 orders. The fixed cost of each customized bus call is 15, and the upper limit of the car capacity is 20 people; the fixed cost of each online-hailing car call is 5, and the upper limit of the car capacity is 4 people, as shown in Table 3.
[0144] Table 1 Hub start point and virtual end point information
[0145] ;
[0146] Table 2 Order data set
[0147] ;
[0148] Table 3 Parameters related to customized buses and online ride-hailing
[0149] ;
[0150] S2. According to the order demand data set, the number of customized bus stops is determined by the silhouette coefficient method, and the order destination is subjected to K-means clustering analysis to determine the customized bus stops; station numbers are set for customized bus stops, online car-hailing service stations, and virtual destinations to build a customized bus-online car-hailing service network. The flowchart of the K-means clustering algorithm used in the present invention is as follows: Figure 2 As shown, the specific steps of the algorithm are as follows:
[0151] S2.1: Determine the number of custom bus stops using the silhouette coefficient method , site The calculation formula of the silhouette coefficient is as follows:
[0152] ;
[0153] in It is a site The average distance to other points in the same cluster, It is a site The average distance to the nearest other points in different clusters. Calculate the mean of the silhouette coefficients of all points, that is, obtain the total silhouette coefficient of the clustering result. Select the number of cluster centers with the largest total silhouette coefficient as the determined Value. Different The corresponding silhouette coefficient is Figure 3 As shown, when When , the mean value of silhouette coefficient reaches a peak value of 0.489.
[0154] S2.2: According to step S2.1, the number of customized bus stops is given , choose any 4 points as the initial centroid, and find the centroid to determine the stations visited by the customized bus;
[0155] S2.3: Assign each order destination station to the nearest centroid to form 4 clusters;
[0156] S2.4: To minimize the cost function As the goal, recalculate the centroid of each cluster and update the location of the customized bus stop. The cost function calculation formula is as follows:
[0157] (2.1)
[0158] The objective function is ,in, Indicates the site where the order destination is located; express The currently assigned cluster centroid index; is the cluster centroid, i.e., the location of the customized bus stop; express The currently assigned cluster centroid.
[0159] S2.5: Repeat steps S2.3 and S2.4 until the cluster centroids do not change.
[0160] Through the K-means clustering algorithm in steps S2.1-S2.5 above, four candidate customized bus stops are selected, with coordinates of (3.88, 3.00), (1.65, 0.68), (4.18, 1.62), and (2.23.3.74). Next, set the transportation hub station number to 0 and the virtual terminal station number to , custom bus stop numbering is set to , the online car-hailing station number is set to .
[0161] S3. Based on the coordinates of the service network sites, construct the site distance matrix, time matrix and cost matrix, and determine the objective function and constraints for the coordinated optimization of the customized bus and online car-hailing routes.
[0162] S3.1: Based on the site coordinates, construct a distance matrix; the distance between each site is represented by the Euclidean distance, assuming that the coordinates of the two points are , , then the distance between two points is given by Calculate. Store the calculation results in array form, and record the array as , the array elements are , indicating that the vehicle is from Travel to The distance from each station to the virtual end point is set to 0.
[0163] S3.2: Based on the constructed distance matrix, calculate the time matrix and cost matrix. The vehicle travel time matrix is calculated by multiplying the unit distance travel time by the distance matrix, and the calculation result is stored in the form of an array, recorded as , the array elements are , indicating vehicle from Travel to Similarly, the vehicle The unit distance travel cost is multiplied by the distance matrix to obtain the vehicle operation cost matrix, which is recorded as , the array elements are , indicating vehicle from Travel to The operating costs of customized buses and online ride-hailing vehicles are shown in Table 4 for the unit distance travel time and unit distance travel cost settings. The parameters of the same vehicle model are set the same.
[0164] Table 4 Travel time and cost per unit distance of customized buses and online ride-hailing vehicles
[0165] ;
[0166] S3.3: Determine the objective function and constraints for the coordinated optimization of the routes of customized buses and online ride-hailing vehicles. The objective function is to maximize the operating revenue of the platform. The constraints include: demand allocation constraints to ensure that each order is reasonably assigned to the service vehicle; capacity limit constraints to ensure that the number of loaded passengers does not exceed the capacity of the vehicle; vehicle flow balance constraints and order flow balance constraints to ensure that passengers arrive at their destination accurately and uninterruptedly; service time window constraints to ensure that passengers arrive at their destination within the expected time range.
[0167] S4. According to the objective function and constraints, a mixed integer linear programming model is established. The specific expression is as follows:
[0168] (4.1)
[0169] ;
[0170] (4.2)
[0171] (4.3)
[0172] (4.4)
[0173] (4.5)
[0174] (4.6)
[0175] (4.7)
[0176] (4.8)
[0177] (4.9)
[0178] (4.10)
[0179] (4.11)
[0180] (4.12)
[0181] (4.13)
[0182] (4.14)
[0183] (4.15)
[0184] (4.16)
[0185] (4.17)
[0186] (4.18)
[0187] (4.19)
[0188] (4.20)
[0189] (4.21)
[0190] (4.22)
[0191] (4.23)
[0192] (4.24)
[0193] (4.25)
[0194] (4.26)
[0195] (4.27)
[0196] in, They are the hub starting point set and the virtual end point set respectively; Customized bus stop collection, including hub-start collection ; is the set of online car-hailing service sites, which represents the set of order destination sites; For all site collections, , Indicates site index; For custom bus vehicle collection; Assemble vehicles for online ride-hailing services; For all vehicles, Indicates the vehicle index; is the order set, Indicates the order index; Accepting orders for the platform of income; For vehicles On site The operating costs of traveling between For vehicles On site The time of travel between To call a vehicle Fixed costs incurred; For vehicles Maximum capacity; For orders Expected destination the latest time; is a sufficiently large positive number, the decision variable is a non-negative real variable, representing the vehicle Visit Site time, is a binary variable and is described as follows:
[0197] ;
[0198] ;
[0199] ;
[0200] ;
[0201] The above formula (4.1) is the objective function, and the optimization goal is to maximize the operating profit, which is expressed as revenue minus variable operating costs and fixed operating costs.
[0202] Constraints (4.2)-(4.3) are order-vehicle allocation constraints. Constraint (4.2) ensures that an order is served by at most one customized bus. Constraint (4.3) indicates that once an order is served by a bus, a corresponding online car-hailing service must be arranged. Constraint (4.4) is a capacity constraint, which limits the number of passengers to no more than the vehicle's capacity limit.
[0203] Constraints (4.5)-(4.9) are customized bus route optimization constraints, ensuring that customized buses match feasible routes. Constraint (4.5) constrains that the same bus cannot arrive from two sources, and constraint (4.6) constrains that the same bus cannot go to two destinations at the same time; constraint (4.7) ensures that the customized bus starts from the hub and eventually returns to the virtual destination; constraint (4.8) is the flow balance constraint of the intermediate stations on the customized bus route; constraint (4.9) is the variable and The coupling constraint between the vehicles When in the uncalled state, it cannot perform any order service. However, once the vehicle If a service is assigned to serve any order, it must be in the called state.
[0204] Constraints (4.10)-(4.15) are the optimization constraints for online car-hailing carpooling routes, ensuring that the online car-hailing service route planning is coherent and reasonable. Constraint (4.10) restricts the same online car-hailing car from arriving at the station from two sources, and constraint (4.11) restricts the same online car-hailing car from going to two destinations at the same time; constraint (4.12) ensures that the online car-hailing car is dispatched from the customized bus stop, and constraint (4.13) ensures that the online car-hailing car eventually returns to the virtual destination; constraint (4.14) is the flow balance constraint for the intermediate stations of the online car-hailing route; constraint (4.15) is the variable and The coupling constraints between them.
[0205] Constraints (4.16)-(4.17) are order flow constraints, which ensure that the order flow reaches the order destination accurately and uninterruptedly. Constraint (4.16) is the flow balance constraint of the order at the transfer point, which ensures the smooth transfer of the order; Constraint (4.17) contains the order flow constraints of the remaining points except the transfer point, which respectively represent the flow balance constraints of the order flow starting from the hub starting point, arriving at the order destination and other stations passed by the order flow.
[0206] Constraints (4.18)-(4.22) are runtime constraints, where constraints (4.18)-(4.19) are the time calculations for the vehicle to arrive at the station; constraints (4.20)-(4.21) ensure that the time calculations for the transfer points are correct; constraint (4.22) is a right time window constraint that ensures that passengers arrive at their destination before the expected alighting time; constraints (4.23)-(4.27) define the value range of the decision variables.
[0207] S5. Design a heuristic algorithm based on Lagrangian relaxation to solve the model, introduce Lagrangian multipliers to relax difficult constraints, split the original problem into two sub-problems without complex constraints, use subgradient algorithm to update multipliers, iterate to obtain the upper and lower bounds of the original problem until the termination condition is met, and output customized bus routes, online car-hailing routes and order assignment solutions. The flowchart of the Lagrangian relaxation algorithm constructed in the present invention is shown in Figure 4 , the specific steps are as follows:
[0208] S5.1: Introduce Lagrange multipliers to decompose the original planning problem. First, transform the objective function (4.1) of the original planning problem into the standard form of solving the minimum value, which is equivalent to:
[0209] (5.1)
[0210] Introducing Lagrange multipliers and Relax the difficult constraints (4.3) and (4.16) respectively, split the original problem into two sub-problems without complex constraints, including sub-problem 1 and sub-problem 2. The original problem model (4.1)-(4.27) also contains the coupling constraints of the two vehicle model variables, including (4.3), (4.16), (4.20)-(4.21); introduce the Lagrange multiplier and The difficult constraints (4.3) and (4.16) are relaxed to the objective equation (5.1) respectively, and the constraints (4.20)-(4.21) are eliminated to achieve the decoupling between the two vehicle model variables. The original problem is decomposed into two sub-problems without complex coupling constraints, including sub-problem 1 and sub-problem 2, which correspond to the customized bus route planning and online car-hailing carpooling route planning problems;
[0211] Subproblem 1 is a customized bus route planning problem, and the corresponding objective function and constraints are as follows:
[0212] (5.2)
[0213] ;
[0214] (5.3)
[0215] (5.4)
[0216] (5.5)
[0217] (5.6)
[0218] (5.7)
[0219] (5.8)
[0220] (5.9)
[0221] (5.10)
[0222] (5.11)
[0223] (5.12)
[0224] (5.13)
[0225] (5.14)
[0226] (5.15)
[0227] (5.16)
[0228] (5.17)
[0229] The above formula (5.2) is the objective function of sub-problem 1, which is the part of the objective function of the Lagrangian relaxation problem that only contains the variables related to the customized bus model; constraint (5.3) is the customized bus order allocation constraint, that is, one order can be served by at most one customized bus; constraint (5.4) is the customized bus capacity limit constraint, which limits the number of passengers to no more than the customized bus capacity; constraints (5.5)-(5.9) are customized bus path optimization constraints, which ensure that the customized bus service route planning is coherent and reasonable; constraint (5.10) is the order starting point constraint, which ensures that the served order starts from the hub starting point and the order flow reaches the order destination accurately and uninterruptedly; constraints (5.11)-(5.12) are the time calculations for the customized bus to arrive at the station; constraints (5.13)-(5.17) define the value range of the decision variables;
[0230] Sub-problem 2 is the online car-hailing carpooling route planning problem, and the corresponding objective function and constraints are as follows:
[0231] (5.18)
[0232] ;
[0233] (5.19)
[0234] (5.20)
[0235] (5.21)
[0236] (5.22)
[0237] (5.23)
[0238] (5.24)
[0239] (5.25)
[0240] (5.26)
[0241] (5.27)
[0242] (5.28)
[0243] (5.29)
[0244] (5.30)
[0245] (5.31)
[0246] (5.32)
[0247] (5.33)
[0248] (5.34)
[0249] The above formula (5.18) is the objective function of sub-problem 2, which is the part of the objective function of the Lagrangian relaxation problem that only contains variables related to the online car-hailing model; constraint (5.19) is the online car-hailing capacity limit constraint, which limits the number of passengers to not exceed the online car-hailing capacity; constraints (5.20)-(5.25) are online car-hailing carpooling path optimization constraints, which ensure that the online car-hailing service route planning is coherent and reasonable; constraint (5.26) is the order flow constraint, which ensures that the order flow of the online car-hailing service arrives at the order destination accurately and uninterruptedly; constraints (5.27)-(5.28) are the time calculation formulas for the online car-hailing service to arrive at the station; constraint (5.29) is the right time window constraint, which ensures that the passengers arrive at the destination before the expected get-off time; constraints (5.30)-(5.34) define the value range of the decision variables;
[0250] S5.2. Solve the subproblems based on the current Lagrange multiplier to obtain the lower bound of the original problem; based on the current Lagrange multiplier value, bring the known parameters into the two subproblem models and use the Cplex solver to solve; initially, set the Lagrange multiplier to an array of all zeros; solve the two subproblems in sequence, use the arrival time of the customized bus at the station output by subproblem 1 as the initial time input of the online car-hailing service in subproblem 2, and then solve subproblem 2; according to the dual relaxation theory, for any given Lagrange multiplier vector, solve the optimal value obtained by solving the relaxed model as the lower bound of the original model; obtain the objective function value of the solution results of subproblem 1 and subproblem 2 and sum them up. If the sum is greater than the lower bound of the original problem , then update to the current lower bound value of the original problem;
[0251] S5.3. Perform feasibility operations on the results output by step S5.2 to obtain the upper bound of the original problem. Analyze the solution results of S5.2 and find that after the original problem is split into the customized bus route planning subproblem and the online car-hailing carpooling route planning subproblem, the planning of the two subproblems does not interfere with each other, which may cause a break in the order flow, resulting in an infeasible result. Therefore, the result of the order arriving at the customized bus station output by subproblem 1 is brought into subproblem 2 as the order starting point of the online car-hailing carpooling service in subproblem 2, which can solve the infeasible problem. Calculate the upper bound of the original problem based on the solution results, and the calculation formula is:
[0252] (5.35)
[0253] The upper bound obtained by the current feasible operation The historical minimum upper bound Compare, if it is lower than the historical minimum upper bound, update and save the minimum upper bound value , and store the feasible solution of this round as the optimal planning result; otherwise, the current upper bound is the historical minimum upper bound value, and the corresponding current upper bound ;
[0254] S5.4: Use the subgradient iterative algorithm to update the Lagrange multiplier. The specific process is as follows:
[0255] S5.4.1: Specify the Lagrangian dual problem , theoretical studies have shown that the Lagrangian relaxation problem The objective function of is a piecewise linear convex function of the Lagrange multiplier, and its optimal objective function value is the lower bound of the optimal objective function value of the original model. A better lower bound can be found by maximizing the function value. In short, in order to obtain the lower bound that is closest to the optimal solution of the original problem, it is necessary to construct the Lagrange dual problem :
[0256] (5.36)
[0257] S5.4.2: The decision variables for solving subproblems 1 and 2 in step S5.2 and Substitute the value of into equations (5.37) and (5.38) to calculate the subgradient:
[0258] (5.37)
[0259] (5.38)
[0260] The first The calculation results of the iterations are stored in the form of an array, and the array is denoted as , get the gradient of this round, if , then the Lagrangian algorithm terminates; otherwise, continue with S5.4.3;
[0261] S5.4.3: Update step size :
[0262] (5.39)
[0263] in is the current upper bound value, is the current lower bound value, is the current subgradient, The value is 2;
[0264] S5.4.4: This round and Stored as an array ,calculate , update the Lagrange multiplier.
[0265] S5.5: Determine whether the iteration termination condition is met. If so, terminate the iteration; otherwise, go to S5.2, where the iteration termination condition includes:
[0266] (1) The number of iterations does not exceed the maximum number of iterations ;
[0267] (2) The gap between the upper and lower bounds is 0, and the corresponding upper bound value is equal to the lower bound value. ;
[0268] (3) Or the objective function value does not change by more than a given value within a specified number of steps;
[0269] If any of the above conditions is met, the algorithm iteration is terminated, the current feasible upper bound solution is output, and customized bus routes, online car-hailing routes and order assignment plans are obtained.
[0270] According to the above steps, mathematical models are constructed for the first 5 orders and 15 orders respectively, and the Lagrangian relaxation algorithm is used to solve them. When the gap between the upper and lower bounds is 0, the iteration is terminated. The iteration of the algorithm is shown in the figure below: Figure 5 , Figure 6 As shown, the optimal planning solution is output, and the solution result is compared with the Cplex output result. The comparison is shown in Table 5:
[0271] Table 5 Comparison of Lagrangian relaxation algorithm and Cplex solution results
[0272] ;
[0273] The data in Table 5 show that the total revenue of the two examples is consistent in both solution methods, which verifies the accuracy of the Lagrangian relaxation algorithm proposed in this paper. In the small-scale example, the solution time of the Cplex solver and the Lagrangian relaxation algorithm is similar; however, when the problem scale increases from 9 stations to 21 stations, the solution efficiency of the Lagrangian relaxation algorithm is significantly better than that of the Cplex solver, and the solution time is shortened by 30.96%. In the scenario of 15 orders and 21 stations, the planned customized bus routes, online car-hailing routes, and order assignment schemes are shown in Table 6.
[0274] Table 6 Optimal planning scheme for the example of 15 orders and 21 sites
[0275] ;
[0276] Therefore, the present invention adopts the above-mentioned double-decker vehicle path planning method based on the Lagrangian relaxation algorithm, and proposes a new intermodal service model combining customized buses with online car-hailing carpooling. According to the personalized travel needs and travel time of passengers, customized intermodal services are provided to passengers, so that passengers can enjoy higher flexibility and convenience in the transfer services at passenger hubs such as airports and high-speed rail stations; wherein, the present invention establishes a mixed integer linear programming model with the goal of maximizing operating profit, comprehensively considering allocation constraints, capacity limit constraints, vehicle flow constraints, order flow constraints and time window constraints, and collaboratively optimizes the routes and order assignments of the intermodal service model of customized buses and online car-hailing cars at passenger hubs such as airports to provide a more accurate double-decker vehicle path optimization solution; finally, the model is decomposed by designing and applying the Lagrangian relaxation algorithm to improve the solution efficiency while ensuring the accuracy of the solution. The Lagrange multiplier is introduced to relax the difficult constraints, the original problem is split into two sub-problems without complex constraints, the multiplier is updated by the subgradient algorithm, the upper and lower bounds of the original problem are obtained iteratively until the termination condition is met, and finally the optimal customized bus route, online car-hailing route and order assignment plan are output. The constructed Lagrange relaxation algorithm shows obvious advantages in processing large-scale examples.
[0277] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A two-layer vehicle path planning method based on Lagrangian relaxation algorithm, characterized in that: The following steps are involved: S1. Construct an order demand dataset based on order reservation information, including the order origin, destination, expected pickup time, and expected drop-off time; S2. According to the order demand data set, the number of customized bus stops is determined by the silhouette coefficient method, and the order destination is subjected to K-means cluster analysis to determine the customized bus stops; Set station numbers for transportation hubs, customized bus stops, online car-hailing service stations, and virtual destinations to build a customized bus-online car-hailing service network; S3. According to the coordinates of the service network sites, a site distance matrix, a time matrix and a cost matrix are constructed to determine the objective function and constraints for the coordinated optimization of the customized bus and online car-hailing routes, wherein the objective function is to maximize the operating revenue of the platform, and the constraints include: demand allocation constraints, capacity limit constraints, vehicle flow balance constraints, order flow balance constraints and service time window constraints; S4. Establishing a mixed integer linear programming model according to the objective function and the constraints; S5. Design a heuristic algorithm based on Lagrangian relaxation to solve the model, introduce Lagrangian multipliers to relax difficult constraints, split the original problem into two sub-problems without complex constraints, including sub-problem 1 and sub-problem 2, use the subgradient algorithm to update the multiplier, iterate to obtain the upper and lower bounds of the original problem until the termination condition is met, and output customized bus routes, online car-hailing routes, and order assignment solutions; S1 specifically includes: Consider a set of orders , define the index of the order as The horizontal and vertical coordinates of the destination are and The total number of orders is ; The platform accepts the order The income is , the origin and destination of each order are and ; The expected service time window for an order is , where the departure time of all orders is initialized to 0, Indicates order Expected destination The latest time of; In addition, the customized bus and online car collections are defined as and , let the vehicles gather , define the index of the vehicle as and , ; The vehicle will be called The incurred fixed costs are defined as , set the vehicle's capacity limit to ; S3 specifically includes: S3.
1. Construct a distance matrix based on the site coordinates. The distance between each site is represented by the Euclidean distance. Store the distance calculation results in the form of an array. The array is recorded as , the array elements are , indicating that the vehicle is from Travel to The distance from each station to the virtual end point is set to 0; S3.
2. Calculate the time matrix and cost matrix based on the constructed distance matrix. Since the travel time and cost per unit distance vary among different vehicle models, calculate the travel time matrix and cost matrix for different vehicles respectively. The vehicle travel time matrix is calculated by multiplying the unit distance travel time by the distance matrix, and the calculation result is stored in the form of an array, recorded as , that is, the time matrix, the array elements are , indicating vehicle from Travel to time; by vehicle The unit distance travel cost is multiplied by the distance matrix to obtain the vehicle operation cost matrix, which is recorded as , the array elements are , indicating vehicle from Travel to operating costs; S3.
3. Determine the objective function and constraints for the coordinated optimization of the routes of customized buses and online car-hailing services; the objective function is to maximize the operating revenue of the platform; the constraints include: demand allocation constraints, ensuring that each order is reasonably assigned to a service vehicle; capacity limit constraints, ensuring that the number of passengers does not exceed the capacity limit of the vehicle; vehicle flow balance constraints and order flow balance constraints, ensuring that passengers arrive at their destination accurately and uninterruptedly; service time window constraints, ensuring that passengers arrive at their destination within the expected time range; In S4, according to the objective function and the constraints, the specific expression of the mixed integer linear programming model is as follows: (4.1) ; (4.2) (4.3) (4.4) (4.5) (4.6) (4.7) (4.8) (4.9) (4.10) (4.11) (4.12) (4.13) (4.14) (4.15) (4.16) (4.17) (4.18) (4.19) (4.20) (4.21) (4.22) (4.23) (4.24) (4.25) (4.26) (4.27) in, They are the hub starting point set and the virtual end point set respectively; Customized bus stop collection, including hub-start collection ; is the set of online car-hailing service sites, which represents the set of order destination sites; For all site collections, , Indicates site index; For custom bus vehicle collection; Assemble vehicles for online ride-hailing services; For all vehicles, Indicates the vehicle index; is the order set, Indicates the order index; Accepting orders for the platform of income; For vehicles On site The operating costs of traveling between For vehicles On site The time of travel between To call a vehicle Fixed costs incurred; For vehicles Maximum capacity; For orders Expected destination the latest time; is a sufficiently large positive number, the decision variable is a non-negative real variable, representing the vehicle Visit site time, is a binary variable and is described as follows: ; ; ; ; The above formula (4.1) is the objective function, and the optimization goal is to maximize the operating profit of the platform, which is expressed by revenue minus variable operating costs and fixed operating costs; constraints (4.2)-(4.3) are order-vehicle allocation constraints, which ensure that an order is served by at most one customized bus. Once an order is served by a bus, a corresponding online car-hailing service must be arranged; constraint (4.4) is a capacity constraint, which limits the number of passengers to no more than the vehicle's capacity limit; constraints (4.5)-(4.9) and (4.10)-(4.15) are the path optimization constraints for customized buses and online car-hailing carpooling, respectively, to ensure that the routes of customized buses and online car-hailing services are regular. The division is coherent and reasonable; constraints (4.16)-(4.17) are order flow constraints, which ensure that the order flow reaches the order destination accurately and uninterruptedly; constraints (4.18)-(4.22) are runtime constraints, among which constraints (4.18)-(4.19) calculate the time when the vehicle arrives at the station, and constraints (4.20)-(4.21) ensure that the time when the passenger takes the customized bus to the transfer point is equal to the time when he takes the online car-hailing service at that point; constraint (4.22) is a right time window constraint, which ensures that the passenger arrives at the destination before the expected time to get off the bus; constraints (4.23)-(4.27) define the value range of the decision variables; The specific process of designing the Lagrangian relaxation algorithm in S5 to solve the mathematical programming model is as follows: S5.
1. Convert the objective function (4.1) of the original planning problem into the standard form of solving the minimum value, which is equivalent to: (5.1) Introducing Lagrange multipliers and Relax the difficult constraints (4.3) and (4.16) respectively, and split the original problem into two sub-problems without complex constraints, including sub-problem 1 and sub-problem 2. The objective function of sub-problem 1 is as follows: (5.2) The objective function of subproblem 2 is as follows: (5.18) The original problem model (4.1)-(4.27) contains the coupling constraints of two vehicle model variables, including (4.3), (4.16), (4.20)-(4.21); the Lagrange multiplier is introduced and The difficult constraints (4.3) and (4.16) are relaxed to the objective equation (5.1) respectively, and the constraints (4.20)-(4.21) are eliminated to achieve the decoupling between the two vehicle model variables. The original problem is decomposed into two sub-problems without complex coupling constraints, including sub-problem 1 and sub-problem 2, which correspond to the customized bus route planning and online car-hailing carpooling route planning problems; S5.
2. Solve the subproblems based on the current Lagrange multiplier to obtain the lower bound of the original problem; based on the current Lagrange multiplier value, bring the known parameters into the two subproblem models and use the Cplex solver to solve; initially, set the Lagrange multiplier to an array of all zeros; solve the two subproblems in sequence, use the arrival time of the customized bus at the station output by subproblem 1 as the initial time input of the online car-hailing service in subproblem 2, and then solve subproblem 2; according to the dual relaxation theory, for any given Lagrange multiplier vector, solve the optimal value obtained by solving the relaxed model as the lower bound of the original model; obtain the objective function value of the solution results of subproblem 1 and subproblem 2 and sum them up. If the sum is greater than the lower bound of the original problem , then update to the current lower bound value of the original problem; S5.3, perform feasibility operations on the results outputted in step S5.2 to obtain the upper bound of the original problem; S5.4: Use the subgradient iterative algorithm to update the Lagrange multiplier and obtain a tight lower bound for the problem; S5.5: Determine whether the iteration termination condition is met. If so, terminate the iteration; otherwise, go to S5.
2.
2. A double-layer vehicle path planning method based on Lagrangian relaxation algorithm according to claim 1, characterized in that: The specific process of S2 is as follows: S2.
1. Determine the number of customized bus stops by using the silhouette coefficient method , select the number of cluster centers with the largest total silhouette coefficient as the determined value; S2.
2. According to step S2.1, the number of customized bus stops is given , optional The points are used as the initial centroid, and the centroid is found to determine the stops for the customized bus. S2.3, assign each order destination site to the nearest centroid, forming clusters; S2.4, to minimize the cost function As the goal, recalculate the centroid of each cluster and update the location of the customized bus stop. The cost function is calculated as follows: (2.1) in, Indicates the site where the order destination is located; express The currently assigned cluster centroid index; Customize the bus stop locations for cluster centroids; express The currently assigned cluster centroid, is the total number of orders; S2.5, repeat steps S2.3 and S2.4 until the cluster centroid does not change; S2.
6. After the customized bus stops are determined by the K-means clustering algorithm in steps S2.1-S2.5 above, set station numbers for transportation hubs, customized bus stops, online car-hailing service stations, and virtual destinations; consider a double-decker vehicle path topology network of customized buses and online car-hailing services with a single starting point and multiple destinations ,definition A collection of network sites. ,in, represents a set of customized bus stops, {0} represents a transportation hub stop, which is the starting point of the customized bus. Represents a collection of online car-hailing service sites. Represents a set of virtual endpoints; the index of the defined site is , the site on the topology network The road connection index is defined as a station , the roads connecting the stations are defined as , is the set of network edges.
3. A double-layer vehicle path planning method based on Lagrangian relaxation algorithm according to claim 2, characterized in that: Subproblem 1 is a customized bus route planning problem, and the corresponding objective function and constraints are as follows: (5.2) ; (5.3) (5.4) (5.5) (5.6) (5.7) (5.8) (5.9) (5.10) (5.11) (5.12) (5.13) (5.14) (5.15) (5.16) (5.17) The above formula (5.2) is the objective function of sub-problem 1, which is the part of the objective function of the Lagrangian relaxation problem that only contains the variables related to the customized bus model; constraint (5.3) is the customized bus order allocation constraint, that is, one order can be served by at most one customized bus; constraint (5.4) is the customized bus capacity limit constraint, which limits the number of passengers to no more than the customized bus capacity; Constraints (5.5)-(5.9) are customized bus route optimization constraints, ensuring that the customized bus service route planning is coherent and reasonable; Constraint (5.10) is the order starting point constraint, ensuring that the served orders start from the hub starting point and the order flow reaches the order destination accurately and uninterruptedly; Constraints (5.11)-(5.12) are the time calculations for the customized bus to arrive at the station; Constraints (5.13)-(5.17) define the value range of the decision variables; Sub-problem 2 is the online car-hailing carpooling route planning problem, and the corresponding objective function and constraints are as follows: (5.18) ; (5.19) (5.20) (5.21) (5.22) (5.23) (5.24) (5.25) (5.26) (5.27) (5.28) (5.29) (5.30) (5.31) (5.32) (5.33) (5.34) The above formula (5.18) is the objective function of sub-problem 2, which is the part of the objective function of the Lagrangian relaxation problem that only contains the variables related to the online car-hailing model; constraint (5.19) is the online car-hailing capacity limit constraint, which limits the number of passengers to not exceed the online car-hailing capacity; constraints (5.20)-(5.25) are online car-hailing carpooling route optimization constraints, which ensure that the online car-hailing service route planning is coherent and reasonable; constraint (5.26) is the order flow constraint, which ensures that the order flow of the online car-hailing service arrives at the order destination accurately and uninterruptedly; Constraints (5.27)-(5.28) are the time calculation formulas for the online car-hailing vehicle to arrive at the station; constraint (5.29) is the right time window constraint, which ensures that the passenger arrives at the destination before the expected get-off time; constraints (5.30)-(5.34) define the value range of the decision variables.
4. A double-layer vehicle path planning method based on Lagrangian relaxation algorithm according to claim 3, characterized in that: In S5.3, the result outputted by step S5.2 is feasibly operated to obtain the upper bound of the original problem; specifically, the result of the order arriving at the customized bus station outputted by subproblem 1 is brought into subproblem 2 as the order starting point of the online car-hailing carpooling service in subproblem 2, and subproblem 2 is re-solved to solve the problem of infeasible solution caused by the interruption of order flow; the upper bound of the original problem is calculated based on the new solution result, and the calculation formula is: (5.35) The upper bound obtained by the current feasible operation The historical minimum upper bound Compare, if it is lower than the historical minimum upper bound, update and save the minimum upper bound value , and store the feasible solution of this round as the optimal planning result; otherwise, the current upper bound is the historical minimum upper bound value, and the corresponding current upper bound .
5. A double-layer vehicle path planning method based on Lagrangian relaxation algorithm according to claim 4, characterized in that: The specific process of updating the Lagrange multiplier using the subgradient iterative algorithm in S5.4 is as follows: S5.4.1: Specify the Lagrangian dual problem : ; (5.36) S5.4.2: The decision variables for solving subproblems 1 and 2 in step S5.2 and Substitute the value of into equations (5.37) and (5.38) to calculate the subgradient: (5.37) (5.38) The first The calculation results of the iterations are stored in the form of an array, and the array is denoted as , get the gradient of this round, if , then the Lagrangian algorithm terminates; otherwise, continue with S5.4.3; S5.4.3: Update step size : (5.39) in is the current upper bound value, is the current lower bound value, is the current subgradient, The value is 2; S5.4.4: This round and Stored as an array ,calculate , update the Lagrange multiplier.
6. A double-layer vehicle path planning method based on Lagrangian relaxation algorithm according to claim 5, characterized in that: The iteration termination conditions include: (1) The number of iterations does not exceed the maximum number of iterations ; (2) The gap between the upper and lower bounds is 0, and the corresponding upper bound value is equal to the lower bound value. ; (3) Or the objective function value does not change by more than a given value within a specified number of steps; If any of the above conditions is met, the algorithm iteration is terminated, the current feasible upper bound solution is output, and customized bus routes, online car-hailing routes and order assignment plans are obtained.
