Responsive bus intelligent scheduling and path planning method, system and electronic device
By constructing a mixed-integer programming computational model and a set covering problem, and combining historical travel data to generate a set of alternative routes, the order's route compatibility is determined in real time. This solves the NP-complete problem of responsive bus route planning, thereby reducing passenger waiting time and improving system efficiency.
Patent Information
- Application Number
- CN202510161937.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-02-12
AI Technical Summary
Existing technologies cannot effectively solve the route planning problem of responsive buses, resulting in long passenger waiting times and high system resource consumption, and cannot achieve reasonable route planning using polynomial-time algorithms.
By constructing a mixed-integer programming computational model, the path planning problem is transformed into a set covering problem, and the mixed-integer programming computational model is used to solve it. A set of alternative routes is generated by combining historical travel data, the order is judged in real time to determine whether it is on the way, and the route is determined based on the number of vehicles available for dispatch. The mixed-integer programming computational model is used to obtain an approximate optimal solution.
It effectively reduces passenger waiting time, improves the rationality of route planning and the flexibility and operational efficiency of the public transportation system, solves the problem of NP-completeness, and enhances the market value of responsive public transportation.
Smart Images

Figure CN120124912B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent transportation and information technology services, and in particular to a responsive intelligent bus scheduling and route planning method, system, and electronic device. Background Technology
[0002] Demand-responsive public transport, also known as responsive bus service, is a type of public transport mode that does not have fixed routes and stops at passenger demand locations based on online and / or offline travel requests. It can be defined as a route-variable public transport service. In other words, it can select bus routes based on specific passenger needs to provide shared transportation services for multiple passengers. Or, in other words, it operates by responding to passenger travel demand; each operation requires scheduling planning and vehicle route planning based on actual passenger demand to achieve dynamic carpooling public transport services. Response-responsive public transport combines the characteristics of personal transportation and public transport, and can compensate for the shortcomings of traditional public transport.
[0003] Given that responsive public transport requires dynamic and variable route planning to consider the travel needs of multiple ride-sharing passengers, reasonable route planning is a core challenge. Furthermore, route planning and scheduling for responsive public transport is an NP-complete problem, and there is currently no solution using a multinomial-time algorithm.
[0004] Based on the above, it is essential to provide a route planning method and system for responsive buses, enabling them to perform reasonable and effective dynamic route planning when considering the actual needs of several ride-sharing passengers. This ensures that the number and rationality of routes meet actual operational requirements, thereby significantly improving passenger experience and reducing system resource consumption, and ultimately enhancing the market value of responsive buses. Summary of the Invention
[0005] In view of this, the present invention provides a responsive intelligent bus dispatching and route planning method, system and electronic device, which can respond to passengers' pending travel orders based on operating vehicles (vehicles that have departed) and idle vehicles (vehicles that have not yet departed), which not only effectively reduces passengers' waiting time, but also makes the route planning more in line with actual needs, thereby greatly improving the flexibility and operational efficiency of the bus system.
[0006] The first aspect of this invention discloses a responsive intelligent bus scheduling and route planning method, which includes the following steps:
[0007] S1, obtain a set of alternative routes based on historical travel data;
[0008] S2, retrieves current pending travel orders that have been formed up to the current time;
[0009] S3 determines in real time whether the current pending travel order is on the same route as the currently dispatched vehicles. If it is on the same route, the corresponding order is assigned to the corresponding dispatched vehicle and the corresponding order is defined as a responded order.
[0010] S4, define the orders that are not on the same route in the current pending travel orders as unresponsive orders, and collect them to generate an unresponsive order set;
[0011] S5, construct a set coverage problem model between the alternative path set and the unresponsive order set, with the objective of minimizing the number of paths in the alternative path set to cover the maximum number of unresponsive orders in the unresponsive order set;
[0012] S6. Construct a mixed integer programming computation model, and solve the set covering problem model based on the constructed mixed integer programming computation model to obtain an approximate optimal solution that is close to the objective of the set covering problem model;
[0013] S7. Based on the solution results of the mixed integer programming calculation model, and limited by the current number of buses that can be dispatched, determine the dispatch routes to satisfy unresponsive orders.
[0014] In the above implementation process, historical travel data includes vehicle historical operation data and passenger historical order data. Vehicle historical operation data includes at least vehicle GPS data, while passenger historical order data includes at least passenger card swipe data. Vehicle GPS data includes time, vehicle number, and GPS data; passenger card swipe data includes the vehicle number and time of the card swipe. Based on this historical travel data, historical station statistics can be generated, and then a set of candidate routes can be obtained based on the historical station statistics and a road map generated from the original geographic information. It should be particularly noted that in this invention, the set of candidate routes is a complete set of shortest paths between stations; that is, the set of candidate routes can be the optimal set of routes, or the optimal route network, composed of the complete set of shortest paths between stations.
[0015] In the implementation of the intelligent scheduling and route planning method of this invention, the current pending travel order can be either an online order or an offline order. First, it is determined whether the current pending travel order is along the same route. If it is determined to be along the same route, it is determined that the corresponding order can be carpooled. Based on this, the corresponding order can be assigned to a vehicle that has already departed along the same route.
[0016] In the specific implementation process, considering that the route planning problem of responsive public transport is actually solving the shortest path problem through designated stops, and the shortest path problem through designated stops is an NP problem with no universally accepted optimal solution, but considering that the orders in the application scenario of this method have a temporal order, the determination of whether an order is on the right track can be decomposed and simplified from the NP-hard shortest path problem through designated stops to a problem solvable in polynomial time. The specific implementation steps, namely, in step S3 of determining whether an order is on the right track, include:
[0017] S301, set each pending travel order as a newly added order, and define its origin and destination as the new order origin and new order destination;
[0018] S302, In all current routes of all currently dispatched vehicles, the starting point of the newly added order is first inserted into all stations included in the current route of the currently dispatched vehicle, and then the ending point of the new order is inserted into any position after the insertion position of the new order starting point, forming a potential shortest path set;
[0019] S303, the path from the order origin to the order destination is set as the ideal shortest path for the order, the completion time of the ideal shortest path for the order is set as t0, the completion time of the order from the order origin to the order destination in the current path of the currently dispatched vehicle is set as t1, and the value of t1 / t0 is defined as the satisfaction value, and the satisfaction value is set to be less than or equal to the upper limit of satisfaction.
[0020] S304, traverse the potential shortest path set. If traveling along the current path results in the satisfaction value of every passenger in the currently departing vehicle and the passenger corresponding to the newly added order being less than or equal to the upper limit of satisfaction, then the newly added order is determined to be on the same route. The current vehicle, the current path, the newly added order, and the change in passenger waiting time caused by the current path are added to the candidate path set. After the current vehicle, the current path, the newly added order, and the change in passenger waiting time caused by the current path are added to the candidate path set, the candidate path set is formed into the candidate path set for the new order.
[0021] S305 sorts the set of alternative routes from smallest to largest based on the changes in passenger waiting time caused by the current route, and takes the route at the top as the route for the new order and assigns it to the corresponding departing vehicle.
[0022] That is, in step S3 of this invention, the starting point and ending point of the new order are first inserted into the current path of the already dispatched vehicle in chronological order. Then, the potential shortest path set is traversed to determine whether each current path with the inserted starting point and ending point of the new order satisfies the satisfaction value of all passengers (including passengers who have accepted orders / ridden and passengers with new orders) in the currently dispatched vehicle. This determines whether the newly added order is on the same route. Finally, all current paths that satisfy the satisfaction value are sorted in ascending order according to the change in passenger waiting time caused by them, and the path at the top is selected as the new order path. That is, the path with the least impact on passenger waiting time among all current paths that satisfy the satisfaction value is selected as the new order path. Based on the process disclosed in step S3 of this invention, and based on the chronological order of orders in the application scenario of this method, the determination of whether the new order is on the same route is effectively completed. That is, the NP-hard shortest path problem passing through a specified station is effectively decomposed and simplified into a problem solvable in polynomial time.
[0023] According to the method disclosed in the first aspect of the present invention, after step S305, the method further includes: S306, removing the newly added order corresponding to the new order path from the alternative path set (i.e., the alternative path set after the new order is added), recalculating the remaining current paths corresponding to the departing vehicles corresponding to the determined new order path, and re-executing step S305 after recalculation. That is, after adopting the leading path as the new order path, the order corresponding to the leading path should be removed from the alternative path set so that the other paths corresponding to the departing vehicles corresponding to the leading path can be recalculated, i.e., the calculation in step S305 is re-performed, and after recalculation, the alternative path set is sorted from smallest to largest according to the change in passenger waiting time caused by the current path, and the currently leading path is selected as the final new order path. By performing this step, it is ensured that the new order path does not conflict with the paths of the departing vehicles, minimizing duplicate paths, improving service range, responding to all orders with the fastest efficiency, and keeping the system in an optimal state.
[0024] After processing the orders along the same route, the set of unresponsive orders, composed of these unresponsive orders, forms a set covering problem together with the set of alternative paths. That is, in this scenario, there are two sets: the set of unresponsive orders and the set of alternative paths. In this invention, a shortest path planning problem is constructed between the set of unresponsive orders and the set of alternative paths; that is, the problem aims to select the shortest path for the unresponsive orders. To solve this problem, this invention innovatively designs a method to transform the shortest path planning problem into a set covering problem. Specifically, it constructs a set covering problem with the objective of minimizing the number of paths in the set of alternative paths while maximizing the number of unresponsive orders in the set of unresponsive orders. In other words, in this invention, a shortest path planning problem is first constructed between the set of unresponsive orders and the set of alternative paths. Then, the shortest path planning problem is transformed into a set covering problem, that is, selecting as few (minimized) paths as possible from the set of alternative paths, such that the vertex set covered by these paths includes as many (i.e., maximized) the origins and destinations of the unresponsive orders.
[0025] However, the set covering problem is also an NP-complete problem, meaning it cannot be solved using a polynomial-time algorithm. In this invention, a mixed-integer programming computational model is used to find an approximate optimal solution, thus yielding a better solution. Finally, based on this solution and limited by the current number of available buses, the routes to fulfill unanswered orders can be determined, i.e., the departure routes in this paper.
[0026] Specifically, the mixed-integer programming calculation model is pre-constructed based on mixed-integer programming variables and mixed-integer programming constraints. The mixed-integer programming variables include:
[0027] A family of first variables, consisting of several first variables, where the first variable indicates whether an order is responded to, and the number of first variables is the number of orders.
[0028] A family of second variables, consisting of several second variables, where each second variable indicates whether an order is responded to by a certain path, and the number of second variables is the number of orders multiplied by the number of paths;
[0029] A family of third variables formed by several third variables, where the third variable indicates whether an order has been accepted for a certain path, and the number of third variables is the number of paths;
[0030] The mixed-integer programming computational model is constructed to solve the problem with minimizing the sum of the third variable as the optimization objective.
[0031] Additionally, the constraints for mixed-integer programming include:
[0032] The first condition includes that orders from core sites must be responded to;
[0033] The second condition is that if a response is required to an order, at least one path must be assigned to it.
[0034] The third condition is that the assigned path must pass through the start and end points of the corresponding order, and the start point must be before the end point;
[0035] The fourth condition is that each order can only be responded to by one path;
[0036] The fifth condition is that the sum of the second variables corresponding to the paths where the first variable is 1 is not zero.
[0037] Here, a first variable of 1 indicates that an order has been responded to, and the sum of the second variables corresponding to the path where the first variable is 1 is not zero means that the responded order must have a route.
[0038] Based on the above variable and condition settings, it is possible to effectively ensure that orders can be responded to. That is, it is possible to effectively achieve the optimization objective of selecting as few (minimizing) paths from the candidate path set and ensuring that the vertex set covered by these paths includes as many (i.e., maximizing) the origin and destination points of unresponsive orders. Then, based on the next solution step, it is possible to determine the paths used to satisfy unresponsive orders.
[0039] Furthermore, in step S7, after obtaining the solution from step S6, all paths with a third variable of 1 are selected from the candidate path set. The selected paths are then sorted from largest to smallest based on the sum of their corresponding second variables. The top N selected paths are chosen as departure routes, where N must simultaneously satisfy both the current number of buses that can depart and the solution result. That is, N is limited to the smaller of the current number of buses that can depart and the solution result.
[0040] Additionally, step S1 of obtaining a set of alternative routes based on historical travel data as disclosed in the method of this invention includes:
[0041] S101 generates historical station statistics based on historical passenger card swipe data and historical vehicle GPS data;
[0042] S102: Select historical sites with card swipe counts exceeding a certain value from historical site statistics, and aggregate all core sites into a core site set;
[0043] S103, calculate the intersection information of roads within the vehicle operating area based on the original geographic information, and calculate the road map of the vehicle operating area based on the road information and intersection information;
[0044] S104, based on the road map, the location of the core station is matched with the original geographic information, thereby calculating the edge of the core station from the road map, and then the edge where the core station is located is divided into two new edges with the core station as the break point. The two new edges are respectively connected to the two endpoints of the original edge and the core station.
[0045] S105, enumerate all unique core station pairs, calculate the shortest path for all core station pairs in the road map to obtain the shortest path between each pair of core station pairs, and define the set of shortest paths between all core station pairs as the set of shortest paths between core stations.
[0046] S106, take each core station as the starting point of a path set, find the station closest to the last station of the corresponding path set from the stations outside each path set, and iterate in this way until all stations are added to the full-site path set covering all stations.
[0047] S107 combines the full site path set with the core site path set as the alternative path set.
[0048] In the implementation of steps S101-S107 above, since the candidate path set is generated based on road map information (raw geographic information) and the shortest path algorithm, the final candidate path set closely matches the geographic information and historical operational data of the operating area. This significantly improves the rationality of the candidate path set in actual operation. In other words, because the candidate path set has already been generated based on road map information and the shortest path algorithm, the system's responsiveness and real-time performance in processing user orders are greatly improved, and the overall stability of the system is also enhanced.
[0049] The second aspect of this invention discloses a system for implementing the responsive intelligent bus scheduling and route planning method disclosed in the first aspect of this invention, the system comprising:
[0050] The first acquisition unit is constructed by obtaining a set of alternative routes based on historical travel data.
[0051] The second acquisition unit is configured to acquire, in real time, the current pending travel orders that have been formed before the current moment;
[0052] The carpooling judgment unit is constructed to determine in real time whether the current pending travel order is on the same route as the currently dispatched vehicles. If it is on the same route, the corresponding order is assigned to the corresponding dispatched vehicle and the corresponding order is defined as a responded order.
[0053] The unresponsive order set generation unit is constructed by defining the orders that are determined to be out of the way in the current pending travel orders as unresponsive orders, and then aggregating them to generate an unresponsive order set;
[0054] The set coverage problem model building unit is constructed by building a set coverage problem model between the set of alternative paths and the set of unresponsive orders. The model is set with the objective of minimizing the number of paths in the set of alternative paths and maximizing the number of unresponsive orders in the set of unresponsive orders.
[0055] The mixed integer programming construction and computation unit is constructed by building a mixed integer programming computation model and solving a set covering problem model based on the built mixed integer programming computation model to obtain an approximate optimal solution that is close to the objective of the set covering problem model.
[0056] The departure route determination unit is constructed by determining the departure route to satisfy unresponsive orders based on the solution results of the mixed integer programming calculation model and the current number of buses that can be dispatched.
[0057] The third aspect of the present invention discloses an electronic device, which includes a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the responsive intelligent bus scheduling and route planning method disclosed in the first aspect of the present invention.
[0058] The fourth aspect of the present invention discloses a computer-readable storage medium storing at least one instruction, at least one program, code set or instruction set, wherein the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the responsive bus intelligent scheduling and route planning method disclosed in the first aspect of the present invention.
[0059] Beneficial Effects: The responsive intelligent bus scheduling and route planning method of this invention can respond to passengers' pending travel orders based on both operating vehicles (vehicles that have already departed) and idle vehicles (vehicles that have not yet departed). This not only effectively reduces passenger waiting time but also ensures that the route planning is more in line with actual needs, greatly improving the flexibility and operational efficiency of the bus system. Furthermore, in the route planning for unresponsive orders, the set of alternative routes and the set of unresponsive orders are first constructed as a set covering problem, thus transforming the route planning problem into a set covering problem. Then, by using a mixed integer programming computational model, the route planning that needs to respond to unresponsive orders can be quickly and conveniently determined based on the obtained better approximate solution. This solves the problem in the prior art that route planning, being an NP-complete problem, cannot be solved by polynomial-time algorithms.
[0060] The responsive bus intelligent scheduling and route planning method and system of the present invention are disclosed in detail below with reference to the embodiments shown in the accompanying drawings and the reference numerals. Attached Figure Description
[0061] Figure 1The flowchart of the responsive intelligent bus scheduling and route planning method of the present invention is shown.
[0062] Figure 2 The flowchart illustrating the implementation steps of step S1 in the responsive intelligent bus scheduling and route planning method of the present invention is shown.
[0063] Figure 3 The flowchart illustrating the implementation steps of step S3 in the responsive intelligent bus scheduling and route planning method of the present invention is shown. Detailed Implementation
[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0065] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0066] Figure 1 This invention illustrates a responsive intelligent bus dispatching and route planning method and system. Combined with... Figure 1 As shown, the first aspect of this invention discloses a responsive intelligent bus scheduling and route planning method, which includes the following steps:
[0067] S1, obtain a set of alternative routes based on historical travel data;
[0068] S2, retrieves current pending travel orders that have been formed up to the current time;
[0069] S3 determines in real time whether the current pending travel order is on the same route as the currently dispatched vehicles. If it is on the same route, the corresponding order is assigned to the corresponding dispatched vehicle and the corresponding order is defined as a responded order.
[0070] S4, define the orders that are not on the same route in the current pending travel orders as unresponsive orders, and collect them to generate an unresponsive order set;
[0071] S5, construct a set coverage problem model between the alternative path set and the unresponsive order set, with the objective of minimizing the number of paths in the alternative path set to cover the maximum number of unresponsive orders in the unresponsive order set;
[0072] S6. Construct a mixed integer programming computation model, and solve the set covering problem model based on the constructed mixed integer programming computation model to obtain an approximate optimal solution that is close to the objective of the set covering problem model;
[0073] S7. Based on the solution results of the mixed integer programming calculation model, and limited by the current number of buses that can be dispatched, determine the dispatch routes to satisfy unresponsive orders.
[0074] Figure 2 This document illustrates a flowchart of the implementation steps for step S1 in the responsive intelligent bus scheduling and route planning method of the present invention. (Combined with...) Figure 2 As shown, step S1 is implemented based on the following specific steps:
[0075] S101 generates historical station statistics based on historical passenger card swipe data and historical vehicle GPS data;
[0076] S102: Select historical sites with card swipe counts exceeding a certain value from historical site statistics, and aggregate all core sites into a core site set;
[0077] S103, calculate the intersection information of roads within the vehicle operating area based on the original geographic information, and calculate the road map of the vehicle operating area based on the road information and intersection information;
[0078] S104, based on the road map, the location of the core station is matched with the original geographic information, thereby calculating the edge of the core station from the road map, and then the edge where the core station is located is divided into two new edges with the core station as the break point. The two new edges are respectively connected to the two endpoints of the original edge and the core station.
[0079] S105, enumerate all unique core station pairs, calculate the shortest path for all core station pairs in the road map to obtain the shortest path between each pair of core station pairs, and define the set of shortest paths between all core station pairs as the set of shortest paths between core stations.
[0080] S106, take each core station as the starting point of a path set, find the station closest to the last station of the corresponding path set from the stations outside each path set, and iterate in this way until all stations are added to the full-site path set covering all stations.
[0081] S107 combines the full site path set with the core site path set as the alternative path set.
[0082] Step S101 primarily processes historical passenger card swipe data and vehicle GPS data to analyze passenger boarding points and travel times. Specifically, it includes the following sub-steps:
[0083] Sub-step a: Generate card swipe location information from vehicle GPS data and passenger card swipe data.
[0084] The vehicle GPS data mainly includes time, vehicle number, and GPS data; the attendance data mainly includes vehicle number and time. The vehicle GPS data and attendance data are categorized according to their vehicle numbers, and the attendance and GPS data for each vehicle are placed in a list and sorted by time. Then, for each attendance record, the GPS range of that attendance record is calculated based on the two nearest adjacent GPS data points.
[0085] Sub-step b: Calculate the site information of the attendance data based on the attendance data, GPS data, and site data information.
[0086] GPS data generally contains a certain amount of error. Assuming this error follows a two-dimensional normal distribution, the probability of a check-in occurring at a particular station can be calculated based on the GPS data for each check-in. For a given check-in, if there is a station among all stations with a probability greater than a specified threshold (tentatively set at 95%), that station is designated as the station for that check-in.
[0087] Sub-step c involves generating virtual orders based on the check-in station information and its statistics. By generating virtual orders, route sets can be pre-generated, eliminating the need for real-time generation when users place orders and improving operational efficiency.
[0088] First, the total number of check-ins for each site is calculated based on the site information of all check-in data for all dates. Then, the probability of each site appearing is calculated based on the number of check-ins for each site and the total number of check-ins for all sites. Next, to approximate the distribution of real orders as closely as possible, all check-in data for a specific date is selected, and the check-in sites of these check-ins are used as the order initiation sites. The check-in time of these check-ins is used as the order initiation time. Finally, based on the frequency of each site's appearance, a random number is used to calculate the destination of an order.
[0089] Step S102 serves to form a core station set, enabling the construction of a candidate route set based on these core stations. This ensures that the final candidate route set more closely reflects historical actual travel demand. Core stations are those with a total number of check-ins exceeding a certain threshold; in this invention, the threshold is set to 10,000 check-ins. Stations with statistical data exceeding this threshold are added to the core station set.
[0090] For step S103, the specific implementation process is as follows: In the original geographic information data, each straight road is represented by its starting point, ending point, and other road attributes. However, the intersections of roads intersecting with this road, i.e., road junctions, are not represented in the dataset. Therefore, each road needs to be represented as a group of line segments, and the intersections between every two roads need to be calculated to obtain the geographic information coordinates of the intersections. Based on this, the intersections are considered as vertices in the graph structure, and the line segments between two intersections are considered as edges in the graph structure. A graph structure representing all road information in the region can then be calculated from the road information and intersection information. This graph structure is called a road graph. The road graph can be an undirected graph or a directed graph. For convenience, the algorithm in this invention uses an undirected graph, but in practical applications, a directed graph is recommended to reduce errors.
[0091] For steps S104 and S105, the specific implementation process is as follows: First, the location of the core station is mapped to the original geographic information to calculate the edge where the core station is located. The edge where the core station is located is divided into two new edges with the core station as the breakpoint. These two edges are respectively connected by the two endpoints of the original edge and the core station. Then, all unique pairs of core stations are enumerated, Dijkstra's shortest path algorithm is applied to all pairs of core stations in the road map, and all these calculation results are saved. The set of shortest paths between all pairs of core stations is called the shortest path set between core stations.
[0092] Based on the above steps S101-S105, proceed to steps S106-S107 to finally form a set of alternative routes for use in responding to travel orders.
[0093] The steps for route planning in response to travel orders are as follows.
[0094] First, proceed to step S3, which involves determining in real time whether the current pending travel order is on the same route as the currently dispatched vehicles. If it is on the same route, the corresponding order is assigned to the corresponding dispatched vehicle and defined as a responded order.
[0095] In the specific implementation of step S3, this invention designs a solvable problem based on polynomial time, thereby solving the technical problem that existing route planning, as an NP problem, lacks a universally accepted optimal solution. Specifically, for bus routes, they must cover the destinations of all passengers, as well as the origins and destinations of all accepted orders. Therefore, the route planning problem for responding to buses is actually solving the shortest path problem through designated stops. The shortest path problem through designated stops is an NP problem with no universally accepted optimal solution. However, the inventors of this application have noticed that pending orders have a temporal order, and since the algorithm for determining the route's order applies to vehicles that have already departed, certain restrictions can be placed on the shortest path algorithm for multiple orders to simplify the problem. That is, the NP-hard shortest path problem through designated stops can be decomposed and simplified into a solvable problem in polynomial time.
[0096] Figure 3 A flowchart illustrating the implementation steps of step S3 in the responsive intelligent bus scheduling and route planning method of the present invention is shown. Specifically, step S3 can be designed to be implemented based on the following steps:
[0097] S301, set each pending travel order as a newly added order, and define its origin and destination as the new order origin and new order destination;
[0098] S302, In all current routes of all currently dispatched vehicles, the starting point of the newly added order is first inserted into all stations included in the current route of the currently dispatched vehicle, and then the ending point of the new order is inserted into any position after the insertion position of the new order starting point, forming a potential shortest path set;
[0099] S303, the path from the order origin to the order destination is set as the ideal shortest path for the order, the completion time of the ideal shortest path for the order is set as t0, the completion time of the order from the order origin to the order destination in the current path of the currently dispatched vehicle is set as t1, and the value of t1 / t0 is defined as the satisfaction value, and the satisfaction value is set to be less than or equal to the upper limit of satisfaction.
[0100] S304, traverse the potential shortest path set. If traveling along the current path can make the satisfaction value of each passenger in the currently departing vehicle and the passenger corresponding to the newly added order less than or equal to the upper limit of satisfaction, then determine that the newly added order is on the way, and add the current vehicle, the current path, the newly added order, and the change in passenger time in the vehicle caused by the current path to the candidate path set.
[0101] S305 sorts the set of alternative routes from smallest to largest based on the changes in passenger waiting time caused by the current route, and takes the route at the top as the route for the new order and assigns it to the corresponding departing vehicle.
[0102] Specifically, for steps S301-S302, assuming there is an existing vehicle route R passing through points B, s1...sn, where B represents the current position of the vehicle, then for a newly added order D and its origin and destination S and T, its potential shortest path can be generated using this method: first insert S into all nodes included in R, then insert T into any position after the insertion position of S. The size of this potential shortest path set is n^2, which, in polynomial time, decomposes and simplifies the NP-hard shortest path problem passing through specified nodes into a solvable problem in polynomial time.
[0103] Regarding steps S303-304, the specific implementation process can be as follows: For passengers, there exists a shortest path ST directly from their starting point S to their destination T. Let t0 be the time taken to travel from S to T along this path; let t1 be the time taken for the passenger to travel from S to T on the bus. To ensure passenger satisfaction, t1 / t0 must be within a certain range, and this constraint is called the upper limit of passenger satisfaction. The upper limit of satisfaction set in this algorithm is less than or equal to 1.2. Traverse the aforementioned set of potential shortest paths. If traveling along this path satisfies every passenger on the bus and the passenger corresponding to the latest order, then add [the vehicle, the change in passenger time on the bus caused by the path, the order, and the path] to the set of candidate paths.
[0104] Next, step S305 is performed to determine the route of the new order and assign it to the corresponding dispatched vehicle.
[0105] In another embodiment of the present invention, after step S305, the method further includes: S306, removing the newly added order corresponding to the new order path from the new order alternative path set, recalculating the remaining current paths corresponding to the dispatched vehicles corresponding to the new order path, and re-executing step S305 after recalculation.
[0106] Based on the above steps S301-S306, the determination of whether each order in the pending travel orders is on the same route as the currently dispatched vehicle is completed.
[0107] After the above steps are completed, if there are still unresponsive orders, they are defined as unresponsive orders, and all unresponsive orders before the current time can be aggregated into an unresponsive order set.
[0108] In this invention, a passenger-carrying algorithm based on solving a set-covering problem is designed to address the demand response problem for unresponsive orders. The departure response steps for unresponsive orders are explained below.
[0109] As mentioned earlier, route planning is an NP-complete problem. Based on this, for the demand response scenario of unresponsive orders, there are two sets: the set of unresponsive orders and the set of alternative routes. The set of unresponsive orders consists of the orders that occurred before the current time but have not yet been responded to, while the set of alternative routes is the optimal set of routes composed of the set of shortest paths between core sites and the set of paths covering all sites.
[0110] Since there are no existing travel orders in the scenario of responding to unresponded orders, there is no temporal order between the orders. Therefore, the method used in the aforementioned route judgment, which decomposes the NP-hard shortest path problem through a specified station into a solvable problem in polynomial time, cannot be used.
[0111] To address the route planning problem in the scenario of responding to unresponsive orders, this invention employs the following approach: Step S5, constructing a set coverage problem model between the candidate route set and the unresponsive order set. The model is defined as aiming to cover the maximum number of unresponsive orders in the unresponsive order set with the minimum number of routes in the candidate route set. In other words, the set coverage problem is described as covering the maximum number of passenger orders with the minimum number of routes. Step S6, constructing a mixed-integer programming computation model and solving the set coverage problem model based on this model to obtain an approximate optimal solution that closely approximates the objective of the set coverage problem model. Step S7, based on the solution results of the mixed-integer programming computation model, and limited by the current number of available buses, determining the departure routes to satisfy the unresponsive orders.
[0112] In other words, the route planning problem for unresponsive orders is transformed into a set covering problem. Even for set covering problems, which are NP-complete, they cannot be solved by polynomial-time algorithms. However, by using a mixed-integer programming computational model to find an approximate optimal solution, a better solution can be obtained. Based on this solution, and with the current number of buses available for departure as a limit, the route to satisfy the unresponsive orders can be determined, which is the departure route in this paper.
[0113] The route planning implementation process for dispatching vehicles with unanswered orders is as follows:
[0114] Based on the description of the set covering problem, a mixed-integer programming computational model is constructed, which includes mixed-integer programming variables and mixed-integer programming constraints. The mixed-integer programming variables include:
[0115] A family of first variables, consisting of several first variables, where the first variable indicates whether an order is responded to, and the number of first variables is the number of orders.
[0116] A family of second variables, consisting of several second variables, where each second variable indicates whether an order is responded to by a certain path, and the number of second variables is the number of orders multiplied by the number of paths;
[0117] A family of third variables formed by several third variables, where the third variable indicates whether an order has been accepted for a certain path, and the number of third variables is the number of paths;
[0118] The mixed-integer programming computational model is constructed to solve the problem with minimizing the sum of the third variable as the optimization objective.
[0119] The constraints for mixed-integer programming include:
[0120] The first condition includes that orders from core sites must be responded to;
[0121] The second condition is that if a response is required to an order, at least one path must be assigned to it.
[0122] The third condition is that the assigned path must pass through the start and end points of the corresponding order, and the start point must be before the end point;
[0123] The fourth condition is that each order can only be responded to by one path;
[0124] The fifth condition is that the total amount of the second variable corresponding to an order where the first variable is 1 is not zero.
[0125] After the model is built, a mixed-integer programming code package (specifically the `mip` package used in the actual Python implementation) is invoked to find an approximate optimal solution, using the minimum sum of the third variable as the optimization condition. After finding this solution, all paths where the third variable is 1 are selected, and these paths are sorted from largest to smallest based on the sum of their corresponding second variables. The top N selected paths are chosen as departure routes, where N must simultaneously satisfy both the current number of available buses and the solution result. That is, N is limited to the smaller of the current number of available buses and the solution result. Given M buses, if M is less than N, vehicles can be assigned to at most the first M routes that meet the departure conditions.
[0126] By following all the steps above, you can complete the response of your travel order regarding whether it is along the same route or to dispatch a vehicle.
[0127] The present invention also discloses a system for implementing the responsive intelligent bus scheduling and route planning method of the present invention, the system comprising:
[0128] The first acquisition unit is constructed by obtaining a set of alternative routes based on historical travel data.
[0129] The second acquisition unit is configured to acquire, in real time, the current pending travel orders that have been formed before the current moment;
[0130] The carpooling judgment unit is constructed to determine in real time whether the current pending travel order is on the same route as the currently dispatched vehicles. If it is on the same route, the corresponding order is assigned to the corresponding dispatched vehicle and the corresponding order is defined as a responded order.
[0131] The unresponsive order set generation unit is constructed by defining the orders that are determined to be out of the way in the current pending travel orders as unresponsive orders, and then aggregating them to generate an unresponsive order set;
[0132] The set coverage problem model building unit is constructed by building a set coverage problem model between the set of alternative paths and the set of unresponsive orders. The model is set with the objective of minimizing the number of paths in the set of alternative paths and maximizing the number of unresponsive orders in the set of unresponsive orders.
[0133] The mixed integer programming construction and computation unit is constructed by building a mixed integer programming computation model and solving a set covering problem model based on the built mixed integer programming computation model to obtain an approximate optimal solution that is close to the objective of the set covering problem model.
[0134] The departure route determination unit is constructed by determining the departure route to satisfy unresponsive orders based on the solution results of the mixed integer programming calculation model and the current number of buses that can be dispatched.
[0135] The present invention also discloses an electronic device, which includes a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the responsive intelligent bus scheduling and route planning method disclosed in the present invention.
[0136] The present invention also discloses a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the responsive intelligent bus scheduling and route planning method disclosed in the present invention.
[0137] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0138] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0139] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0140] It should also be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0141] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A responsive intelligent bus scheduling and route planning method, characterized in that, Includes the following steps: S1, obtain a set of alternative routes based on historical travel data; S2, retrieves current pending travel orders that have been formed up to the current time; S3 determines in real time whether the current pending travel order is on the same route as the currently dispatched vehicles. If it is on the same route, the corresponding order is assigned to the corresponding dispatched vehicle and the corresponding order is defined as a responded order. S4, define the orders that are not on the same route in the current pending travel orders as unresponsive orders, and collect them to generate an unresponsive order set; S5, construct a set coverage problem model between the alternative path set and the unresponsive order set, which is set to the objective of minimizing the number of paths in the alternative path set to cover the maximum number of unresponsive orders in the unresponsive order set; S6. Construct a mixed integer programming computation model, and solve the set covering problem model based on the constructed mixed integer programming computation model to obtain an approximate optimal solution that is close to the objective of the set covering problem model; S7. Based on the solution results of the mixed integer programming calculation model, and limited by the current number of buses that can be dispatched, determine the dispatch routes to satisfy unresponsive orders. Step S1 includes: S101 generates historical station statistics based on historical passenger card swipe data and historical vehicle GPS data; S102: Select historical sites with card swipe counts exceeding a certain value from historical site statistics, and aggregate all core sites into a core site set; S103, calculate the intersection information of roads within the vehicle operating area based on the original geographic information, and calculate the road map of the vehicle operating area based on the road information and intersection information; S104, based on the road map, the location of the core station is matched with the original geographic information, thereby calculating the edge of the core station from the road map, and then the edge where the core station is located is divided into two new edges with the core station as the break point. The two new edges are respectively connected to the two endpoints of the original edge and the core station. S105, enumerate all unique core station pairs, calculate the shortest path for all core station pairs in the road map to obtain the shortest path between each pair of core station pairs, and define the set of shortest paths between all core station pairs as the set of shortest paths between core stations. S106, take each core station as the starting point of a path set, find the station closest to the last station of the corresponding path set from the stations outside each path set, and iterate in this way until all stations are added to the full site path set covering all stations. S107, combine the full site path set and the core site path set as the candidate path set.
2. The method according to claim 1, characterized in that, The mixed-integer programming computation model is pre-constructed based on mixed-integer programming variables and mixed-integer programming constraints. The mixed-integer programming variables include: A family of first variables, consisting of several first variables, where the first variable indicates whether an order is responded to, and the number of first variables is the number of orders. A family of second variables, consisting of several second variables, where each second variable indicates whether an order is responded to by a certain path, and the number of second variables is the number of orders multiplied by the number of paths; A family of third variables formed by several third variables, where the third variable indicates whether an order has been accepted for a certain path, and the number of third variables is the number of paths; The mixed integer programming computation model is constructed to solve the problem with minimizing the sum of the third variable as the optimization objective.
3. The method according to claim 2, characterized in that, The constraints of the mixed-integer programming include: The first condition includes that orders from core sites must be responded to; The second condition is that if a response is required to an order, at least one path must be assigned to it. The third condition is that the assigned path must pass through the start and end points of the corresponding order, and the start point must be before the end point; The fourth condition is that each order can only be responded to by one path; The fifth condition is that the sum of the second variables corresponding to the paths where the first variable is 1 is not zero.
4. The method according to claim 3, characterized in that, In step S7, after obtaining the solution from step S6, all paths with the third variable set to 1 are selected from the available path set, and the selected paths are sorted from largest to smallest according to the sum of the second variable corresponding to each selected path. The top N selected paths are taken as departure paths, where N must be less than or equal to the current number of buses that can be dispatched and less than or equal to the solution result.
5. The method according to claim 1, characterized in that, Step S3 includes: S301, set each pending travel order as a newly added order, and define its origin and destination as the new order origin and new order destination; S302, In all current routes of all currently dispatched vehicles, the starting point of the newly added order is first inserted after all stations included in the current route of the currently dispatched vehicle, and then the ending point of the new order is inserted at any position after the insertion position of the new order starting point, forming a potential shortest path set; S303, the path from the order origin to the order destination is set as the ideal shortest path for the order, the completion time of the ideal shortest path for the order is set as t0, the completion time of the order from the order origin to the order destination in the current path of the currently dispatched vehicle is set as t1, and the value of t1 / t0 is defined as the satisfaction value, and the satisfaction value is set to be less than or equal to the upper limit of satisfaction. S304, traverse the set of potential shortest paths. If traveling along the current path can make the satisfaction value of each passenger in the currently departing vehicle and the passenger corresponding to the newly added order less than or equal to the upper limit of satisfaction, then determine that the newly added order is on the way, and add the current vehicle, the current path, the newly added order, and the change in passenger time in the vehicle caused by the current path to the set of alternative paths. S305 sorts the set of alternative routes from smallest to largest based on the changes in passenger waiting time caused by the current route, and takes the route at the top as the route for the new order and assigns it to the corresponding departing vehicle.
6. The method according to claim 5, characterized in that, The process after step S305 includes: S306, removing the newly added order corresponding to the new order path from the new order alternative path set, recalculating the remaining current paths corresponding to the dispatched vehicles corresponding to the new order path, and re-executing step S305 after recalculation.
7. A system for implementing the responsive intelligent bus scheduling and route planning method according to any one of claims 1-6, characterized in that, include: The first acquisition unit is constructed by obtaining a set of alternative routes based on historical travel data. The second acquisition unit is configured to acquire, in real time, the current pending travel orders that have been formed before the current moment; The carpooling judgment unit is constructed to determine in real time whether the current pending travel order is on the same route as the currently dispatched vehicles. If it is on the same route, the corresponding order is assigned to the corresponding dispatched vehicle and the corresponding order is defined as a responded order. The unresponsive order set generation unit is constructed by defining the orders that are determined to be out of the way in the current pending travel orders as unresponsive orders, and then aggregating them to generate an unresponsive order set; The set coverage problem model building unit is constructed to build a set coverage problem model between the set of alternative paths and the set of unresponsive orders, with the objective of minimizing the number of paths in the set of alternative paths to cover the maximum number of unresponsive orders in the set of unresponsive orders. The mixed integer programming construction and computation unit is constructed by building a mixed integer programming computation model and solving the set covering problem model based on the built mixed integer programming computation model to obtain an approximate optimal solution that is close to the objective of the set covering problem model. The departure route determination unit is constructed by determining the departure route to satisfy unresponsive orders based on the solution results of the mixed integer programming calculation model and the current number of buses that can be dispatched.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to enable the electronic device to perform the responsive intelligent bus scheduling and route planning method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or instruction set is loaded and executed by a processor to implement the responsive intelligent bus scheduling and route planning method as described in any one of claims 1-6.
Citation Information
Patent Citations
Vehicle path planning method, device and system based on column generation algorithm
CN113822486A
Demand response public transport network planning and variable line type dynamic scheduling method and device
CN118153870A