A Dynamic Scheduling and Route Planning Method for Dynamic Tour Buses, Electronic Device, and Storage Medium
Optimizing the dynamic parade bus scheduling model through the time domain rolling framework and ALNS algorithm, the problem of solving the problem of speed and passenger service level in the existing technology is solved, and the system operation efficiency and passenger service quality are improved.
Patent Information
- Application Number
- CN202510695234.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-05-28
AI Technical Summary
When handling dynamic passenger flow requirements, the existing dynamic cruising bus system cannot solve the problem of speed, passenger service level and vehicle operation efficiency, resulting in too long waiting time for passengers and underutilization of vehicle resources.
The time domain rolling framework combined with the ALNS algorithm is adopted to establish a hybrid integer planning model for dynamic parade bus scheduling. By calculating the shortest arc set and the earliest/night departure time set, the ALNS algorithm is used to optimize the vehicle path and passenger matching relationship to achieve dynamic scheduling.
It significantly improves the operating efficiency and passenger service level of the dynamic cruising bus system, reduces the vehicle's air mileage and passenger travel time, especially during peak passenger flow.
Smart Images

Figure CN120220452B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for dynamic dispatching and path planning of a dynamic cruising bus, electronic equipment and a storage medium, and belongs to the technical field of urban public transportation dispatching and travel path planning. Background Art
[0002] As a new mode of transportation, dynamic cruising buses combine "flexibility" and "intensiveness" and feature online reservations, on-demand scheduling, smart navigation, and regional cruising. Compared with highly intensive modes of transportation such as conventional buses, dynamic cruising buses can better meet people's personalized, differentiated, and diversified travel needs. Compared with highly flexible modes of transportation such as online ride-hailing, dynamic cruising buses have lower travel costs and can meet larger-scale travel needs. Around 2023, dynamic cruising buses began to be put into operation in China. Different forms of dynamic cruising buses appeared across the country, and achieved remarkable results in improving the service level and flexibility of urban public transportation.
[0003] Although dynamic cruising buses have been put into operation in many cities across China, due to their relatively short operational history and immature operating models, they typically use commercial solvers or simple plug-in algorithms to handle new dynamic passenger flow demands. The former can maximize the utilization of vehicle operating resources, but their computational speed is too slow to be commercially applicable. The latter, while capable of completing vehicle dispatch in a relatively short period of time, only considers the feasibility of dispatch and the rationality of the route at a specific moment, rather than considering global optimization. Therefore, the algorithm is inefficient in situations with high short-term passenger flow density, and the matching of vehicles and orders is often irrational, resulting in long passenger wait times and difficulty in fully utilizing vehicle operating resources.
[0004] Therefore, those skilled in the art are in urgent need of resolving the contradiction between the speed of solution, the level of passenger service and the efficiency of vehicle operation that cannot be taken into account at the same time. Summary of the Invention
[0005] Objective: To overcome the shortcomings of the existing technology, the present invention provides a dynamic cruising bus dynamic scheduling and path planning method, electronic equipment and storage medium. A mixed integer programming model for dynamic cruising bus scheduling is established. The mixed integer programming model is dynamically solved using a time domain rolling framework combined with the ALNS (Adaptive Large Neighborhood Search) algorithm, which can simultaneously take into account the model solution speed, passenger service level and vehicle operation efficiency.
[0006] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is:
[0007] In a first aspect, a method for dynamic scheduling and path planning of a dynamic cruising bus is provided, specifically comprising:
[0008] Step 1: Based on the total point set and the road network hybrid graph, calculate the shortest arc between any two points in the total point set to obtain the arc set; based on the arc set and the latest boarding time set, obtain the latest getting-off time set.
[0009] Step 2: Based on the departure location set, boarding point set, alighting point set, total point set, service volume set of each point, earliest boarding time set, latest boarding time set, latest alighting time set, and arc set, a mixed integer programming model for dynamic cruising bus scheduling is established.
[0010] Step 3: Based on the arc set, the earliest boarding time set, the latest boarding time set, the latest alighting time set, and the service volume set of each point, the initial solution of the mixed integer programming model for dynamic cruising bus scheduling is obtained.
[0011] Step 4: For the dynamic cruising bus scheduling mixed integer programming model, the ALNS algorithm (adaptive large-scale search algorithm) is used to solve the initial solution to obtain the optimal solution, and the matching relationship between passengers and vehicles in the current time domain and the vehicle's operation path are output.
[0012] Step 5: Based on the optimal solution, calculate the vehicle information and passenger status at the end of the time window, and initialize the next time domain based on the vehicle information and passenger status.
[0013] Step 6: Continuously repeat steps 1 to 5, calculate the optimal solution for each time domain, and dynamically update the vehicle scheduling and operation path of the dynamic cruising bus based on the optimal solution of each time domain.
[0014] Furthermore, the step 1 specifically includes:
[0015] Step 1.1: For any two points , For the total point set in the k-time domain, based on the road network hybrid graph G, calculate the shortest arc from i to j on the road network hybrid graph G , get any two points k time domain arc sets .in, , represents the starting position set of k time domain vehicles; is the boarding point set of passengers in the k-time domain, is the set of passengers’ getting-off points in the k-time domain.
[0016] Step 1.2: For the Arc , calculate the arc that the vehicle passes Time required , For arc The length of the vehicle, v is the speed of the vehicle.
[0017] Step 1.3: For the points , calculate the earliest boarding time at point i , latest boarding time ,in Make reservations for passengers. , For the upper limit of passenger waiting time, establish the earliest boarding time set in k time domain , the latest boarding time set ,in , .
[0018] Step 1.4: For boarding points Corresponding drop-off point , calculate the drop-off point The latest drop-off time of vehicles , establish the k-time domain latest get-off time set ,in: is the vehicle's detour coefficient, This is the latest boarding time.
[0019] Furthermore, the step 2 specifically includes:
[0020] Step 2.1: Build a mixed integer programming model for dynamic cruising bus scheduling , the expression is as follows:
[0021]
[0022] in, is the vehicle operating cost, is the penalty cost for rejecting an order, is the passenger's travel time cost, The time cost for passengers waiting for the bus; is the vehicle operating cost weight, is the order rejection cost weight, is the passenger travel time cost weight, is the passenger's waiting time cost weight; is the unit time operation cost coefficient, The penalty cost coefficient for rejecting an order, is the passenger travel time cost coefficient, is the passenger waiting time cost coefficient; Is vehicle c passing through arc , For vehicles passing through the arc the time required; is the time when vehicle c arrives at the boarding point i, The vehicle c arrives at the corresponding get-off point of the boarding point i time, is the earliest boarding time for point i. Where: C is the vehicle set, is the total point set of k time domain, is the k-time domain boarding point set, is the set of get-off points in the k-time domain.
[0023] Step 2.2: Set k time domain orders Divided into and Two major categories, For the set of orders that are still in the waiting state, is the set of orders to which service vehicles have been assigned, Can be divided into and Two categories, including: The set of orders for which passengers have been assigned a vehicle but have not yet boarded the vehicle. A set of orders representing passengers who have been assigned to a service vehicle and have boarded the vehicle.
[0024] Step 2.3: Based on the order set classification, the k-time domain boarding point set is divided into and , the k-time domain alighting point set is divided into and ; and They represent the set of boarding points and the set of alighting points that are still in the waiting state; 、 They are the set of boarding points and the set of alighting points that must be visited respectively. Can be divided into and ,in Indicates that the vehicle has not yet visited the boarding point set, Indicates that the vehicle has successfully accessed the boarding point set.
[0025] Step 2.4: For all order sets that have been assigned service vehicles and the set of orders that are still pending The corresponding point set satisfies the following constraints:
[0026]
[0027]
[0028]
[0029]
[0030]
[0031] in, Indicates whether vehicle c needs to visit the boarding point i, Indicates whether vehicle c needs to visit the get-off point i Is vehicle c passing through arc , represents the alighting point corresponding to the boarding point i.
[0032] Step 2.5: For any point flow and the capacity of vehicle c, the following constraints must be met:
[0033]
[0034]
[0035]
[0036] in, represents the starting position set of all vehicles in the k-time domain, Represents the arrival point of vehicle c Number of people in the car at the time Representative Points The number of passengers getting on and off the bus, Indicates the arrival point of vehicle c The number of people in the car at the time, M is an arbitrarily large positive number, Represents the upper limit of the vehicle's capacity, Indicates whether vehicle c passes through the arc .
[0037] Step 2.6: For any vehicle , the following time constraints and path selection constraints should be met:
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045] in, is the time when vehicle c arrives at point i, The time it takes for the vehicle to get on and off after arriving at the station. is the time when vehicle c arrives at point j, For the boarding point i ( )’s earliest boarding time, For the boarding point i ( )Latest boarding time, For the get-off point i ( ) is the latest drop-off time. To reach the drop-off point corresponding to the boarding point i time, For vehicles passing through the arc The time required, Indicates meaningless paths where sites connect to each other.
[0046] Furthermore, the step 3 specifically includes:
[0047] Step 3.1: Based on all vehicles in the k time domain The departure location set of the time window , for any vehicle ,set up is the first dimension of the path vector of vehicle c, and initializes the initial path vector of vehicle c [ v c k ] c , get the original path solution for all vehicles :
[0048] x route 0 = [ [ v 0 k ] 0 ⋮ [ v c k ] c ⋮ [ v c k ] C ]
[0049] in, ( ) represents the initial position of the vehicle at time k in the time domain, [ v c k ] c ( ) represents the initial path solution of vehicle c;
[0050] Step 3.2: For the boarding point , insert point i into the initial path vector of vehicle c to obtain the corrected path vector of vehicle c [ v c k , ⋯ , i <mprescripts / > <none / > ‵ , i ] c ,in: is the last point that vehicle c passes when it arrives at the boarding point i, is the set of boarding points in the k-time domain.
[0051] Step 3.3: Calculate the time when vehicle c arrives at each point on the corrected path vector and the number of passengers in the vehicle when it arrives at that point based on the corrected path vector of vehicle c. The calculation formula is: ; Number of passengers in the car The calculation formula is: .in, Indicates arrival at the site time, Indicates the time it takes for the vehicle to get on and off after arriving at the station. Indicates that the vehicle passes through the arc The time required, Vehicle c arrives at point Number of people in the car at the time Representative Points The number of passengers getting on and off the bus.
[0052] Step 3.4: Under the premise of meeting the time constraint and path selection constraint, Corresponding drop-off point ,Will Inserted into the corrected path vector of vehicle c [ v c k , ⋯ , i <mprescripts / > <none / > ‵ , i , j ] c and calculate the arrival time , Number of passengers in the vehicle , for order points that cannot be inserted , then move it to the order set that is still in the waiting state in the k-time domain , is the set of get-off points in the k time domain.
[0053] Step 3.5: Check all orders Execute steps 3.2, 3.3, and 3.4 to obtain the initial solution x and k. The order set in the time domain is still in the waiting state. R waiting k = [ ⋯ ,( i , j ) ] , where the initial solution x consists of three parts: path , arrival time , Number of arrivals .
[0054] Furthermore, the step 4 specifically includes:
[0055] Step 4.1: According to the roulette rules, randomly select the corresponding destruction operator.
[0056] Step 4.2: Use the selected destruction operator to convert the path of the initial solution x Destruction, get the path of the destruction solution , and record the destruction operator used.
[0057] Step 4.3: According to the roulette rule, randomly select the corresponding repair operator.
[0058] Step 4.4: According to the repair operator selected by the repair operator roulette, Repair and get new solutions ,in It includes three parts: optimal solution for vehicle routing , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving , record the repair operator used.
[0059] Step 4.5: Based on the new solution The quality of the operator is scored, and the real-time temperature is reduced based on the simulated annealing algorithm to obtain the operator score and the number of times the operator is used.
[0060] Step 4.6: Update the destruction operator weight and repair operator weight based on the operator score and the number of times the operator is used.
[0061] Step 4.7: When When , continue to perform steps 4.1 to 4.6. When the simulated annealing is completed, the real-time temperature is reset and the ,when When , the iteration is completed and the optimal solution is output , where the optimal solution It includes three parts: optimal solution for vehicle routing , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving .
[0062] Furthermore, the step 5 specifically includes:
[0063] Step 5.1: Based on the optimal solution of the vehicle path, calculate the optimal solution of vehicle c in the time window Length of the arc segment traveled inside Time Window The time window within which all outstanding orders are fulfilled for the vehicle.
[0064] Step 5.2: Based on the length of the arc traveled by vehicle c ,calculate The ratio of the total path length to determine the position of vehicle c at the end of the time window is obtained. Time Domain The vehicle departure position set at the beginning of the time window , Time Domain The vehicle departure position set at the beginning of the time window The expression is as follows:
[0065] a) When vehicle c is When work occurs within the time window, the ratio of the road section traveled to the total length is , at this time, vehicle c is located at the position corresponding to the ratio in the optimal path, where is the total length of the optimal path for vehicle c;
[0066] b) When vehicle c is When the vehicle stops working within the time window, vehicle c is still at the starting point in the time domain k. .
[0067] Step 5.3: Based on the optimal solution of the vehicle path, vehicle c is placed in the time window The service volume of each point passed by the vehicle c in the time window is summed up to get The total service volume in the time window is calculated by adding the total service volume and vehicle c in the time window Initial number of people in the car Add up to get vehicle c in the time window The number of people in the car at the end is Time Domain Number of people in the car at the beginning of the time window . Keep the optimal path The sections that have not yet been executed, combined with get Time Domain Original path solution for the time window
[0068] Step 5.4: Read the Time Domain Orders collected within the time window, update Time domain order set , boarding point collection , drop-off point , total point set , Earliest boarding time set 、Latest boarding time set As the initialization of the next time domain.
[0069] Furthermore, the step 6 specifically includes:
[0070] make , repeat steps 1 to 5 to calculate Optimal vehicle routing solution in time domain , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving , and continuously repeat steps 1 to 5, each time calculating the optimal solution of a time domain.
[0071] In a second aspect, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements a dynamic cruising bus dynamic scheduling and path planning method as described in any one of the first aspects.
[0072] According to a third aspect, a computer device includes:
[0073] Memory, used to store instructions.
[0074] The processor is configured to execute the instructions so that the computer device performs the operations of the dynamic cruising bus dynamic scheduling and path planning method as described in any one of the first aspects.
[0075] Beneficial effects: The present invention provides a dynamic cruising bus dynamic scheduling and path planning method, electronic device and storage medium, establishes a dynamic cruising bus mixed integer programming model (MIP), uses a rolling time domain framework combined with the ALNS algorithm to successfully realize the dynamic solution of the dynamic cruising bus operation scheduling mixed integer programming model, and can well take into account the model solution speed, passenger service level and vehicle operation efficiency at the same time, providing a new theoretical solution for the operation scheduling of dynamic cruising buses, and significantly improving the operation efficiency of the dynamic cruising bus system.
[0076] Compared to the plug-in algorithms currently used by many bus companies, this method considers global optimization of travel demand within a specific time window, rather than local optimization based on first-come, first-served service. This significantly improves the accuracy of matching demand with vehicles, reducing vehicle idle miles and passenger travel time, particularly during peak passenger flow periods. This method can also be used to simulate and verify the operation of dynamic cruising buses in newly established service areas, as well as to analyze the impact of fleet size adjustments and changes in passenger flow distribution on their operational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 The figure is a flow chart of a method for dynamic scheduling and path planning of a dynamic cruising bus according to the present invention.
[0078] Figure 2 Schematic diagram of the various elements of the dynamic cruising bus of the present invention.
[0079] Figure 3 This is a rolling time domain schematic diagram of the present invention.
[0080] Figure 4 This is a schematic diagram of the initial path of the present invention.
[0081] Figure 5 This is a schematic diagram of the optimal path of the present invention. DETAILED DESCRIPTION
[0082] The following is a clear and complete description of the technical solutions in the examples of the present invention, in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.
[0083] The present invention will be further described below with reference to specific embodiments.
[0084] Example 1:
[0085] This embodiment introduces a dynamic cruising bus dynamic scheduling and path planning method, such as Figure 1 As shown, the following steps are included:
[0086] Step 1: Read the road network data within the service area, construct a hybrid road network graph within the service area, initialize the fleet position, generate the vehicle departure position set, and set the time domain division and time window length of the study period.
[0087] Step 2: Read all order data within the time window in the current time domain to establish an order set, generate a set of boarding points, a set of alighting points, a set of total points, a set of service volumes at each point, a set of earliest boarding times, and a set of latest boarding times.
[0088] Step 3: Based on the total point set and the road network hybrid graph, calculate the shortest arc between any two points in the total point set to obtain the arc set; based on the arc set and the latest boarding time set, obtain the latest alighting time set.
[0089] Step 4: Based on the departure location set, boarding point set, alighting point set, total point set, service volume set of each point, earliest boarding time set, latest boarding time set, latest alighting time set, and arc set, a mixed integer programming model for dynamic cruising bus scheduling is established.
[0090] Step 5: Based on the arc set, the earliest boarding time set, the latest boarding time set, the latest alighting time set, and the service volume set of each point, the initial solution of the mixed integer programming model for dynamic cruising bus scheduling is obtained.
[0091] Step 6: Input the initial solution and the dynamic cruising bus scheduling mixed integer programming model into the ALNS algorithm (adaptive large-scale search algorithm) to obtain the optimal solution, and output the matching relationship between passengers and vehicles in the current time domain (including passenger boarding time, service vehicle, estimated arrival time) and the vehicle's operation path.
[0092] Step 7: Based on the optimal solution, calculate the vehicle information and passenger status at the end of the time window, and initialize the next time domain based on the vehicle information and passenger status.
[0093] Step 8: Repeat steps 3 to 7 continuously, calculate the optimal solution of a time domain each time, and dynamically update the vehicle scheduling and operation path of the dynamic cruising bus based on the optimal solution of each time domain.
[0094] Furthermore, the step 1 specifically includes:
[0095] Step 1.1: Read the service area The road network data in the ,road network data consists of edges and points, where the edge data records the point numbers at both ends of the ,edge.
[0096] Step 1.2: Based on the road network data, connect the edges and points to build a road network hybrid graph G .
[0097] Step 1.3: Divide the study period into N is the time domain, denoted as k ( N ). For each time domain k ,set up 、 The length of the two time windows is the total length of + .exist The vehicle receives the passenger order within the time window. The vehicle executes all outstanding orders within the time window.
[0098] Step 1.4: Initialize the vehicle c The initial location is the station, based on the vehicle c The initial position of the vehicle c exist k Time Domain Starting point of the time window , construct all vehicles in k Time Domain The departure location set of the time window ,in, C For the vehicle set, , .
[0099] As a preferred solution, the step 2 specifically includes:
[0100] Step 2.1: Read the k Time domain window All order data within the time domain are constructed together with the uncompleted orders. k Order Set , where the order data includes but is not limited to the following fields: pick-up point, drop-off point, reservation time, and number of passengers.
[0101] Step 2.2: Order-based , extracted in k The boarding point and the alighting point in the time domain are obtained , drop-off point , get the total point set .
[0102] Step 2.3: Order Based , get the service volume of each point , get the service volume set of each point ,in , meeting the conditions:
[0103]
[0104] when When the service volume of this point is 0, ;when When the passenger gets on the bus at this point, ;when When the passenger gets off at this point, .
[0105] Step 2.4: For the point , calculation point i Earliest boarding time , latest boarding time ,in For appointment time, , Establish the earliest boarding time set for the passenger waiting time limit , the latest boarding time set ,in: , .
[0106] As a preferred solution, the step 3 specifically includes:
[0107] Step 3.1: For any two points , based on the road network hybrid graph G , using Dijkstra algorithm to calculate the road network i arrive j The shortest arc , get any two points Arc Set .
[0108] Step 3.2: For the Arc , calculate the time required for the vehicle to pass through the arc ,in , For arc length, v is the vehicle speed.
[0109] Step 3.3: For boarding points Corresponding drop-off point , calculate the drop-off point Latest drop-off time: , establish the latest get-off time set ,in is the vehicle's detour coefficient.
[0110] As a preferred solution, the step 4 specifically includes:
[0111] Step 4.1: Establish the objective function
[0112]
[0113]
[0114] in, is the vehicle operating cost, is the penalty cost for rejecting an order, is the passenger's travel time cost, The time cost for passengers waiting for the bus; is the vehicle operating cost weight, is the order rejection cost weight, is the passenger travel time cost weight, is the passenger's waiting time cost weight; is the unit time operation cost coefficient, The penalty cost coefficient for rejecting an order, is the passenger travel time cost coefficient, is the passenger waiting time cost coefficient; is a 0 / 1 variable, when Representative vehicle c Not passing through the arc ,when Representative vehicle c Through the arc , ; For vehicles c Arrive at the boarding point i time, For vehicles c Arrival and boarding point i Corresponding drop-off point time, .
[0115] Step 4.2: Set the order Divided into and Two major categories, For the set of orders that are still in the waiting state, is the set of orders for which service vehicles have been assigned, which can be divided into and Two categories, including The set of orders for which passengers have been assigned a vehicle but have not yet boarded the vehicle. A set of orders representing passengers who have been assigned to a service vehicle and have boarded the vehicle.
[0116] Step 4.3: Based on the order set classification, the pickup point set , drop-off point Each is divided into and 、 and ; and They represent the set of boarding points and the set of alighting points that are still in the waiting state; 、 are the set of boarding points and the set of alighting points that must be visited, Can be divided into and ,in Indicates that the vehicle has not yet visited the boarding point set, Indicates that the vehicle has successfully accessed the boarding point set.
[0117] Step 4.4: For all order sets that have been assigned service vehicles and the set of orders that are still pending , and its corresponding point set should satisfy the constraints:
[0118] (1);
[0119] (2);
[0120] (3);
[0121] (4);
[0122] (5);
[0123] Wherein, formula (1) represents the vehicle c Unable to access the pick-up point i ; Formula (2) represents vehicle c and boarding point i The matching relationship, Indicates vehicle c Need to visit the pick-up point i , Indicates vehicle c No need to visit the pick-up point i ; Formula (3) represents vehicle c and drop-off point i The matching relationship, Indicates vehicle c Need to visit the drop-off point i , Indicates vehicle c No need to visit the drop-off point i ; Formula (4) indicates that all orders in the waiting state can only be served once at most; Formula (5) indicates that the pick-up point and the drop-off point need to be visited by the same vehicle. Indicates the boarding point i The corresponding drop-off point.
[0124] Step 4.5: For the flow and vehicles at any point c The capacity needs to meet the following constraints:
[0125] (6);
[0126] (7);
[0127] (8);
[0128] in, Representative vehicle c Arrival point The number of people in the car when ; Formula (6) represents the flow limit of each point, when Time, point i The flow can only flow out but not in. Time, point i The flow of vehicles needs to maintain the balance of inflow and outflow; Formula (7) indicates that the vehicle c In the arc The capacity constraint, when the vehicle passes through the arc When the vehicle reaches arc The number of people in the car at the starting point is not greater than the number of people in the car at the arrival arc The number of people in the vehicle at the destination; Formula (8) represents the capacity limit of the vehicle, Represents the upper capacity of the vehicle.
[0129] Step 4.6: For any vehicle , the following time constraints and path selection constraints should be met:
[0130] (9);
[0131] (10);
[0132] (11);
[0133] (12);
[0134] (13);
[0135] (14);
[0136] (15);
[0137] in, For vehicles c Arrival point i time, For boarding point i The corresponding drop-off point, is the time it takes for the vehicle to get on and off after arriving at the station; Formula (9) represents the time it takes for the vehicle to get on and off c Through the arc Time constraints, vehicles c Through the arc The starting time is earlier than the passing arc The time of the destination; Formula (10) represents the vehicle c Arrive at the boarding point i The time is not earlier than the earliest boarding time at that point ; Formula (11) represents the vehicle c Arrive at the boarding point i The time is no later than the latest boarding time of the point ; Formula (12) represents the vehicle c Arrive at the drop-off point i The time is no later than the latest get-off time at that point ; Formula (13) limits the detour time of each passenger; Formula (14) ensures that the vehicle needs to visit the order pick-up point before visiting the drop-off point; Formula (15) limits the vehicle c Choose the path that makes no sense.
[0138] As a preferred solution, the step 5 specifically includes:
[0139] Step 5.1: Based on the vehicle starting position set , for any vehicle ,set up For vehicles c The first dimension of the path vector, initializing the vehicle c The initial path vector , get the original path solution for all vehicles :
[0140]
[0141] in, ( ) indicates that the vehicle is in the time domain k The initial position when ( ) indicates a vehicle c The initial path solution.
[0142] Step 5.2: For the boarding point ,Will i Insert vehicle c The initial path vector of the vehicle c Corrected path vector ,in For vehicles c Arrive at the boarding point i The last point passed by.
[0143] Step 5.3: According to the vehicle c The corrected path vector of the vehicle is calculated c The arrival time at each point of the corrected path vector and the number of passengers in the car when it arrives at that point. The calculation formula is: ; Number of passengers arriving in the car The calculation formula is: .
[0144] Step 5.4: Under the premise of satisfying the time constraint and path selection constraint of step 4.6, Corresponding drop-off point ,Will Insert into vehicle c Corrected path vector and calculate 、 , for order points that cannot be inserted , then move it to the waiting order set .
[0145] Step 5.5: Check all orders Execute steps 5.2, 5.3, and 5.4 to obtain the initial solution. x and waiting order set , where the initial solution x It consists of three parts: path , arrival time , Number of arrivals .
[0146] As a preferred solution, the step 6 is to x The ALNS algorithm is used to obtain the optimal solution, which includes:
[0147] Step 6.1: According to the roulette rules, randomly select the corresponding destruction operator.
[0148] Step 6.2: Use the selected destruction operator to convert the solution x Path Destruction, get the path of the destruction solution , and record the destruction operator used, which includes the following categories:
[0149] a) Random destruction operator: for vehicles c Corrected path vector , randomly removed Quantity of order points, get the vehicle c The path destruction vector of the removed order point pair is placed into the waiting order set ,in For vehicles c The number of orders served, is the proportion of orders that are randomly removed.
[0150] b) Greedy destruction operator: for vehicles c Corrected path vector , remove the order point pair that has the greatest impact on the operating cost, and get the vehicle c The path destruction vector of the removed order point pair is placed into the waiting order set .
[0151] c) Exchange destruction operator: for vehicles c Corrected path vector , under the premise of ensuring that the time constraints, path selection constraints and capacity constraints are met, the order of getting on and off the two pairs of order points is exchanged to obtain the vehicle c The path destruction vector.
[0152] Step 6.3: According to the roulette rule, randomly select the corresponding repair operator.
[0153] Step 6.4: According to the repair operator selected by the repair operator roulette, Repair and get new solutions ,in It includes three parts: optimal solution for vehicle routing , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving , record the repair operator used, there are the following types of repair operators:
[0154] a) Random repair operator: for vehicles c The path destruction vector obtained after destruction by the destruction operator , randomly from the waiting order set Select an order pair It is inserted into the destruction solution under the premise of satisfying time constraints, path selection constraints and capacity constraints to obtain a feasible new solution.
[0155] b) Greedy repair operator: For the waiting order set An order point in , insert it into the vehicle under the premise of meeting the time constraint, path selection constraint and capacity constraint c The path destruction vector , calculate vehicle c The increment of operating cost, the point corresponding to the minimum increment of operating cost Insert it into the corresponding vehicle path, complete a greedy insertion, and repeat this process until the waiting order set All order point pairs that can be inserted are inserted.
[0156] c) Regret repair operator: For the waiting order set An order point in , insert it into the vehicle under the premise of meeting the time constraint, path selection constraint and capacity constraint c The path destruction vector , calculate vehicle c The increment of the operating cost is recorded, the minimum and the second minimum of the operating cost increment are recorded, and the position corresponding to the minimum value of the operating cost increment is used as the order point. The first insertion position, calculate the order point pair The regret value of the order point pair with the largest regret value is inserted into its primary insertion position to complete a regret insertion. Repeat this process until the waiting order set The order points that can be inserted in Are inserted.
[0157] Step 6.5: Based on the solution The quality of the corresponding operator is scored, and the real-time temperature is reduced based on the simulated annealing algorithm. The process is as follows:
[0158] Note x The total cost is y ,untie The total cost is ;Optimal solution The total cost is .like The corresponding operator score increases h points, the number of times the corresponding operator is used increases by one, so ;like , then the corresponding operator score increases m Divide, order , Remain unchanged; if , it indicates that the new solution is an inferior solution. According to the Metropolis criterion of the simulated annealing algorithm, a number is randomly generated. ,like , then the corresponding operator score increases lpoints, the number of times the corresponding operator is used increases by one, and ,like , then the corresponding operator score increases ul points, of which T is the real-time temperature, and the temperature reduction formula is: , is the temperature reduction coefficient.
[0159] Step 6.6: Update the operator weight according to the operator score and the number of times the operator is used. The formula for updating the destruction operator weight is: , is the destruction operator weight update coefficient, Destruction operator n The score, Destruction operator n The repair operator weight update formula is: , To repair the operator weight update coefficient, To repair the operator n The score, To repair the operator n The number of times it is used.
[0160] Step 6.7: When When , continue to perform steps 6.1 to 6.6. When the simulated annealing is completed, the real-time temperature is reset and the ,when When , the iteration is completed and the optimal solution is output, where the optimal solution It includes three parts: optimal solution for vehicle routing , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving .
[0161] As a preferred solution, the step 7 specifically includes:
[0162] Step 7.1: Calculate the optimal solution of the vehicle path based on the optimal solution c In the time window Length of the arc segment traveled inside , the calculation formula is: ,in For vehicles c running time.
[0163] Step 7.2: Based on the vehicle c Length of the arc traveled ,calculate The ratio of the total length of the path to determine the vehicle c At the end of the time window, we get Time Domain The vehicle departure position set at the beginning of the time window , the calculation methods are divided into two categories:
[0164] a) When the vehicle c exist When work occurs within the time window, the ratio of the road section traveled to the total length is , at this time the vehicle c Located at the position corresponding to this ratio in the optimal path, where For vehicles c The total length of the optimal path;
[0165] b) When the vehicle c exist When the vehicle stops working within the time window, c Still located k Time domain starting point .
[0166] Step 7.3: Based on the optimal path of the vehicle, move the vehicle c In the time window The service volume of each point passed by the vehicle is added up to get c In the time window The total service volume within the vehicle c In the time window Initial number of people in the car Add up to get the vehicle c In the time window The number of people in the car at the end is Time Domain Number of people in the car at the beginning of the time window . Keep the optimal path The sections that have not yet been executed, combined with get Time Domain Original path solution for the time window .
[0167] Step 7.4: Read the Time Domain Orders collected within the time window, update the order set , boarding point collection , drop-off point , total point set , Earliest boarding time set 、Latest boarding time set As the initialization of the next time domain.
[0168] As a preferred solution, the step 8 specifically includes: Repeat steps 3 to 7 to calculate the optimal solution for the vehicle path in each time domain. , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving , and continuously repeat steps 1 to 5, each time calculating the optimal solution of a time domain.
[0169] Example 2:
[0170] The method of the present invention will be further described in detail below with reference to a specific embodiment of a dynamic cruising bus in a certain area of a city and the accompanying drawings.
[0171] 1. Read the road network data within the service area, construct a hybrid road network graph within the service area, initialize the fleet position, generate the vehicle departure position set, and set the time domain division and time window length of the study period.
[0172] Read the road network data of a dynamic cruising bus service area in a certain area of a city. The road network data consists of point data and edge data. The attributes of point data include: point ID, longitude, and latitude. The attributes of edge data include: edge ID, edge type, endpoint ID, and edge length. The specific data formats are shown in Table 1 and Table 2.
[0173] Table 1 Point attribute table
[0174]
[0175] Table 2 Edge attribute table
[0176]
[0177] Connect edges and points according to the edge endpoint ID and point ID to build a road network hybrid graph G ,picture G See the schematic diagram of Figure 2 The initial position of the fleet is set as the bus station in the study area. The present invention sets the fleet size to 4. , the starting position set is , time domain The length is 10 minutes, 、 The time window length is set to 5 minutes. According to the current operation status of dynamic cruising buses in the study area, the fleet start time is set to 7:00. Figure 3 This is a schematic diagram of the rolling time domain.
[0178] 2. Read all order data within the time window to establish an order set, generate a set of boarding points, a set of alighting points, a set of total points, a set of service volumes at each point, a set of earliest boarding times, and a set of latest boarding times.
[0179] Read in Time Domain All order data within the time window, create an order set , where the order data attributes include: initiation time, starting point ID, destination ID, and number of passengers. The order initiation time is converted to minutes based on midnight. The specific data format is shown in Table 3:
[0180] Table 3 Order data
[0181]
[0182] Get the pickup point set based on order data , drop-off point , get the total point set , the service volume set of each point , Earliest boarding time set , set an upper limit on the waiting time for passengers , according to the formula , get the latest boarding time set .
[0183] 3. Hybrid graph based on total point set and road network G , calculate the shortest arc between any two points to get the arc set; based on the arc set and the latest boarding time set, get the latest getting off time set.
[0184] for Use Dijkstra's algorithm to calculate the shortest arc between any two points in , establish arc set :
[0185] Set vehicle speed , according to the formula , calculate the time required for the vehicle to pass through the arc. Set the detour coefficient , according to the formula , calculate the latest get-off time, and get the latest get-off time set .
[0186] 4. Based on the departure location set, boarding point set, alighting point set, total point set, service volume set of each point, earliest boarding time set, latest boarding time set, latest alighting time set, and arc set, a mixed integer programming model for dynamic cruising bus scheduling is established.
[0187] In this example, based on the starting location set , boarding point collection , drop-off point , total point set , service volume set , Earliest boarding time set 、Latest boarding time set , latest get-off time set and arc sets , establish a mixed integer programming model for dynamic cruising bus scheduling.
[0188] The model parameters are set as follows: operating cost weight , rejection cost weight , travel time cost weight , Passenger waiting time cost weight ; Unit time operating cost coefficient , Unit: Yuan / min, penalty cost coefficient for order rejection , Unit: Yuan / order, Passenger travel time cost coefficient , Unit: Yuan / min, Passenger waiting time cost coefficient , Unit: Yuan / min; Vehicle capacity limit ; Service time at each point ; Detour coefficient ; Large Number .
[0189] The objective function is:
[0190]
[0191] The constraints are:
[0192]
[0193]
[0194]
[0195]
[0196]
[0197]
[0198]
[0199]
[0200]
[0201]
[0202]
[0203]
[0204]
[0205]
[0206]
[0207] in, , , , .
[0208] 5. Based on the arc set, the earliest boarding time set, the latest boarding time set, the latest alighting time set, and the service volume set of each point, an initial solution is obtained.
[0209] Collection-based , initialize the vehicle path vector as: , will be collected and Insert the vehicle path vector to get the initial solution x :
[0210]
[0211] Get the waiting order set: , visualize the four paths as shown in the attached Figure 4 .
[0212] According to the formula , calculate arrival time:
[0213]
[0214] According to the formula Calculate the number of people in the car:
[0215]
[0216] After checking that all routes meet the constraints, the best solution is recorded. .
[0217] 6. Input the initial solution and the mixed integer programming model of dynamic cruising bus scheduling into the ALNS algorithm (adaptive large area search algorithm) to obtain the optimal solution.
[0218] The ALNS algorithm solution algorithm parameters are set as follows: initial temperature , termination temperature ; , , , ; ; , ; ; .
[0219] Set the initial weight of the destruction operator and the repair operator to 1, the initial score of the destruction operator and the repair operator to 1, and set the random removal ratio .
[0220] According to the destruction operator roulette, the initial solution x Use the random destruction operator to randomly remove each vehicle path. The number of order pairs, get the destruction solution Path:
[0221]
[0222] The order pair to be removed 、 、 、 Move to waiting order set .
[0223] According to the repair operator roulette, a random repair operator pair is selected. Repair. Waiting order set All order point pairs, randomly determine the order point pairs Insert vehicle , other order points are not inserted and the repair solution is obtained :
[0224]
[0225] Calculate arrival time:
[0226]
[0227] Calculate the number of arrivals:
[0228]
[0229] from Remove ,have to:
[0230]
[0231] For the solution x 、 、 The cost is shown in Table 4. From Table 4, we can see that x The total cost is lower than the solution ,therefore Inferior to solution x , the optimal solution Remain unchanged.
[0232] Table 4 Solution costs
[0233]
[0234] According to the Metropolis criterion, randomly generated numbers , so accept the solution ,make Random Destruction Operator and Random Repair Operator score increase points, the number of uses increases by 1; according to the formula , , respectively update the random destruction operator and random repair operator weights; according to the formula , the temperature drops to 97, at this time , repeat step 6 until , complete a temperature drop process, reset the temperature , number of iterations , execute the next iteration. When the iteration is completed, the output Optimal solution in time domain :
[0235]
[0236] Arrival Time:
[0237]
[0238] Number of people in the car:
[0239]
[0240] at this time , Table 5 shows the optimal solution cost, and the optimal route is visualized as Figure 5 .
[0241] Table 5 Optimal solution cost
[0242]
[0243] 7. Based on the optimal solution Calculate the vehicle information at the end of the time window, initialize the next time domain, and complete the dynamic scheduling and route planning of the cruising bus.
[0244] Based on the optimal path , according to the formula Calculating vehicles c exist Time Domain The length of the arc segment traveled within the time window is: 、 、 、 ; Calculate the total length of the vehicle path: 、 、 、 By ratio , determine the vehicle c exist Time Domain The position at the end of the time window. Done Time Domain Initialization of vehicle position at the beginning of the time window: .
[0245] Keep the best path The sections that have not yet been executed, combined with get Time Domain Original path solution for the time window have to:
[0246]
[0247] based on , calculated in the vehicle c exist Time Domain The number of people in the car at the end of the time window, completing the vehicle c exist In the time domain Initialization of the number of people in the car at the beginning of the time window: , , , .
[0248] Read in Time Domain Orders collected within the time window, update the order set , boarding point collection , drop-off point , total point set , Earliest boarding time set 、Latest boarding time set ,make , repeat steps 3 to 7 to calculate Optimal vehicle routing solution in time domain , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving .
[0249] To illustrate the superiority of the present invention, the calculation results of the present invention and the Gurobi commercial solver at different order densities are compared under the premise of the same fleet size. The comparison results are shown in Table 6. At low order density, the solution speed of the commercial solver Gurobi is faster than that of this method. As the order density increases, the calculation speed of the commercial solver Gurobi decreases significantly. At an order density of 6 orders / 5 minutes or more, it is no longer possible to complete the solution within 3 hours. Therefore, compared with the commercial solver Gurobi, this method has a more outstanding solution capability. In addition, from the solution results, the proposed solution algorithm has the same solution results as the commercial solver Gurobi at 2 orders / 5 minutes and 4 orders / 5 minutes, which proves the solution accuracy of this method.
[0250] Table 6 compares the results of the algorithm constructed by the present invention with those of the commercial solver Gurobi.
[0251]
[0252] Based on the operating characteristics of dynamic cruising buses, the present invention establishes a mixed integer programming model for dynamic cruising buses, constructs an ALNS algorithm to solve the model once, and uses a rolling time domain framework to dynamically update the path of the dynamic cruising bus. First, a road network hybrid graph of the study area is established. Then, order data within the study time domain is collected to establish a mixed integer programming model, and the model is solved using the ALNS algorithm to obtain the optimal solution. Finally, the next time domain is initialized based on the obtained optimal solution, and the dynamic scheduling and path planning of the dynamic cruising bus are completed through the rolling time domain. The method meets the real-time requirements of dynamic cruising bus vehicle scheduling and path planning, and can simultaneously take into account the solution speed, vehicle operation efficiency, and passenger service level, providing a model and solution method support for the real-time and efficient operation of dynamic cruising buses.
[0253] Example 3:
[0254] This embodiment introduces a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a dynamic cruising bus dynamic scheduling and path planning method as described in any one of the embodiments 1 is implemented.
[0255] Embodiment 4:
[0256] This embodiment introduces a computer device, including:
[0257] Memory, used to store instructions.
[0258] The processor is used to execute the instructions so that the computer device performs the operations of a dynamic cruising bus dynamic scheduling and path planning method as described in any one of Example 1.
[0259] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0260] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0261] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0262] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0263] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for dynamic scheduling and path planning of a dynamic cruising bus, characterized by: Specifically include: Step 1: Based on the total point set and the road network hybrid graph, calculate the shortest arc between any two points in the total point set to obtain the arc set; Based on the arc set and the latest boarding time set, the latest getting off time set is obtained; Step 2: Based on the departure location set, boarding point set, alighting point set, total point set, service volume set of each point, earliest boarding time set, latest boarding time set, latest alighting time set, and arc set, a mixed integer programming model for dynamic cruising bus scheduling is established; Step 3: Based on the arc set, the earliest boarding time set, the latest boarding time set, the latest alighting time set, and the service volume set of each point, obtain the initial solution of the mixed integer programming model for dynamic cruising bus scheduling; Step 4: Based on the initial solution, the adaptive large-scale search algorithm is used to solve the mixed integer programming model of dynamic cruising bus scheduling to obtain the optimal solution, and the matching relationship between passengers and vehicles in the current time domain and the operation path of the vehicles are output; Step 5: Based on the optimal solution, calculate the vehicle information and passenger status at the end of the time window, and initialize the next time domain according to the vehicle information and passenger status; Step 6: Repeat steps 1 to 5, and calculate the optimal solution of a time domain each time. Dynamically update the vehicle scheduling and operation path of the dynamic cruising bus based on the optimal solution of each time domain. The step 2 specifically includes: Step 2.1: Build a mixed integer programming model for dynamic cruising bus scheduling , the expression is as follows: ; in, is the vehicle operating cost, is the penalty cost for rejecting an order, is the passenger's travel time cost, The time cost for passengers waiting for the bus; is the vehicle operating cost weight, is the order rejection cost weight, is the passenger travel time cost weight, is the passenger's waiting time cost weight; is the unit time operation cost coefficient, The penalty cost coefficient for rejecting an order, is the passenger travel time cost coefficient, is the passenger waiting time cost coefficient; Is vehicle c passing through arc , For vehicles passing through the arc the time required; is the time when vehicle c arrives at the boarding point i, The vehicle c arrives at the corresponding get-off point at the boarding point i time, is the earliest boarding time of point i; where: C is the vehicle set, is the total point set of k time domain, is the k-time domain boarding point set, is the set of get-off points in the k-time domain; Step 2.2: Set k time domain orders Divided into and Two major categories, For the set of orders that are still in the waiting state, is the set of orders to which service vehicles have been assigned, Can be divided into and Two categories, including: The set of orders for which passengers have been assigned a vehicle but have not yet boarded the vehicle. The set of orders representing passengers who have been assigned to a service vehicle and have boarded the vehicle; Step 2.3: Based on the order set classification, the k-time domain boarding point set is divided into and , the k-time domain alighting point set is divided into and ; and They represent the set of boarding points and the set of alighting points that are still in the waiting state; 、 They are the set of boarding points and the set of alighting points that must be visited respectively; Can be divided into and ,in Indicates that the vehicle has not yet visited the boarding point set, Indicates that the vehicle has successfully accessed the boarding point set; Step 2.4: For all order sets that have been assigned service vehicles and the set of orders that are still pending The corresponding point set satisfies the following constraints: ; ; ; ; ; in, Indicates whether vehicle c needs to visit the boarding point i, Indicates whether vehicle c needs to visit the get-off point i Is vehicle c passing through arc , represents the drop-off point corresponding to the boarding point i; Step 2.5: For any point flow and the capacity of vehicle c, the following constraints must be met: ; ; ; in, represents the starting position set of all vehicles in the k-time domain, Represents the arrival point of vehicle c Number of people in the car at the time Representative Points The number of passengers getting on and off the bus, Indicates the arrival point of vehicle c The number of people in the car at the time, M is an arbitrarily large positive number, Represents the upper limit of the vehicle's capacity, Indicates whether vehicle c passes through the arc ; Step 2.6: For any vehicle , the following time constraints and path selection constraints should be met: ; ; ; ; ; ; ; in, is the time when vehicle c arrives at point i, The time it takes for the vehicle to get on and off after arriving at the station. is the time when vehicle c arrives at point j, is the earliest boarding time for boarding point i, ; is the latest boarding time for boarding point i, ; is the latest getting-off time for getting-off point i, ; To reach the drop-off point corresponding to the boarding point i time, For vehicles passing through the arc The time required, Indicates the meaningless path of the site self-connection; The step 5 specifically includes: Step 5.1: Based on the optimal solution of the vehicle path, calculate the optimal solution of vehicle c in the time window Length of the arc segment traveled inside ; Time window The time window for executing all outstanding orders for the vehicle; Step 5.2: Based on the length of the arc traveled by vehicle c ,calculate The ratio of the total path length to determine the position of vehicle c at the end of the time window is obtained. Time Domain The vehicle departure position set at the beginning of the time window , Time Domain The vehicle departure position set at the beginning of the time window The expression is as follows: a) When vehicle c is When work occurs within the time window, the ratio of the road section traveled to the total length is , at this time, vehicle c is located at the position corresponding to the ratio in the optimal path, where is the total length of the optimal path for vehicle c; b) When vehicle c is When the vehicle stops working within the time window, vehicle c is still at the starting point in the time domain k. ; Step 5.3: Based on the optimal solution of the vehicle path, vehicle c is placed in the time window The service volume of each point passed by the vehicle c in the time window is summed up to get The total service volume in the time window is calculated by adding the total service volume and vehicle c in the time window Initial number of people in the car Add up to get vehicle c in the time window The number of people in the car at the end is Time Domain Number of people in the car at the beginning of the time window ; Keep the optimal path The sections that have not yet been executed, combined with get Time Domain Original path solution for the time window ; Step 5.4: Read the Time Domain Orders collected within the time window, update Time domain order set , boarding point collection , drop-off point , total point set , Earliest boarding time set 、Latest boarding time set As the initialization of the next time domain.
2. A method for dynamic scheduling and route planning of a dynamic cruising bus according to claim 1, characterized in that: The step 1 specifically includes: Step 1.1: For any two points , For the total point set in the k-time domain, based on the road network hybrid graph G, calculate the shortest arc from i to j on the road network hybrid graph G , get any two points k time domain arc sets ;in, , represents the starting position set of k time domain vehicles; is the boarding point set of passengers in the k-time domain, is the set of passengers’ getting-off points in the k-time domain; Step 1.2: For the Arc , calculate the arc that the vehicle passes through Time required , For arc The length of , v is the vehicle speed; Step 1.3: For the point , calculate the earliest boarding time at point i , latest boarding time ,in Make reservations for passengers. , For the upper limit of passenger waiting time, establish the earliest boarding time set in k time domain , the latest boarding time set ,in , ; Step 1.4: For boarding points Corresponding drop-off point , calculate the drop-off point The latest drop-off time of vehicles , establish the k-time domain latest get-off time set ,in: is the vehicle's detour coefficient, This is the latest boarding time.
3. The method for dynamic scheduling and route planning of a dynamic cruising bus according to claim 1, characterized in that: The step 3 specifically includes: Step 3.1: Based on all vehicles in the k time domain The departure location set of the time window , for any vehicle ,set up is the first dimension of the path vector of vehicle c, and initializes the initial path vector of vehicle c , get the original path solution for all vehicles : ; in, represents the initial position of the vehicle at time k in the time domain, represents the initial path solution of vehicle c; Step 3.2: For the boarding point , insert point i into the initial path vector of vehicle c to obtain the corrected path vector of vehicle c ,in: is the last point that vehicle c passes when it arrives at the boarding point i, is the set of boarding points in the k-time domain; Step 3.3: Calculate the time when vehicle c arrives at each point on the corrected path vector and the number of passengers in the vehicle when it arrives at that point based on the corrected path vector of vehicle c; where arrival time is The calculation formula is: ; Number of passengers in the car The calculation formula is: ;in, Indicates arrival at the site time, Indicates the time it takes for the vehicle to get on and off after arriving at the station. Indicates that the vehicle passes through the arc The time required, Vehicle c arrives at point Number of people in the car at the time Representative Points the number of passengers getting on and off the bus; Step 3.4: Under the premise of meeting the time constraint and path selection constraint, Corresponding drop-off point ,Will Inserted into the corrected path vector of vehicle c and calculate the arrival time , Number of passengers in the vehicle , for order points that cannot be inserted , then move it to the order set that is still in the waiting state in the k-time domain , is the set of get-off points in the k-time domain; Step 3.5: Check all orders Execute steps 3.2, 3.3, and 3.4 to obtain the initial solution x and k, and the order set in the time domain is still in the waiting state. , where the initial solution x consists of three parts: path , arrival time , Number of arrivals .
4. The method for dynamic scheduling and route planning of a dynamic cruising bus according to claim 1, characterized in that: The step 4 specifically includes: Step 4.1: According to the roulette rules, randomly select the corresponding destruction operator; Step 4.2: Use the selected destruction operator to convert the path of the initial solution x Destruction, get the path of the destruction solution , and record the damage operator used; Step 4.3: Randomly select the corresponding repair operator according to the roulette rule; Step 4.4: According to the repair operator selected by the repair operator roulette, Repair and get new solutions ,in It includes three parts: optimal solution for vehicle routing , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving , record the repair operator used; Step 4.5: Based on the new solution The quality of the operator is scored, and the real-time temperature is reduced based on the simulated annealing algorithm to obtain the operator score and the number of times the operator is used; Step 4.6: Update the destruction operator weight and repair operator weight based on the operator score and the number of times the operator is used; Step 4.7: When When , continue to perform steps 4.1 to 4.6; when When the simulated annealing is completed, the real-time temperature is reset and the ,when When , the iteration is completed and the optimal solution is output , where the optimal solution It includes three parts: optimal solution for vehicle routing , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving .
5. The method for dynamic scheduling and route planning of a dynamic cruising bus according to claim 1, characterized in that: The step 6 specifically includes: make , repeat steps 1 to 5 to calculate Optimal vehicle routing solution in time domain , optimal solution for vehicle arrival time , optimal solution for the number of vehicles arriving , and continuously repeat steps 1 to 5, each time calculating the optimal solution of a time domain.
6. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, a dynamic cruising bus dynamic scheduling and path planning method as described in any one of claims 1 to 5 is implemented.
7. A computer device, characterized in that: include: a memory for storing instructions; The processor is configured to execute the instructions so that the computer device performs the operations of the dynamic cruising bus dynamic scheduling and path planning method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Bus and cruise bus scheduling method
CN114971136A
Dynamic demand response electric bus scheduling method based on improved adaptive large-field algorithm
CN115547052A