Bus scheduling method and device, electronic equipment and computer readable storage medium
By acquiring static and dynamic information about bus operations and optimizing the scheduling process using simulated annealing algorithm, the problem of low scheduling efficiency caused by reliance on human experience in existing technologies is solved, and intelligent automatic generation and dynamic adjustment of bus driving plans are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PENG CHENG LAB
- Filing Date
- 2023-09-25
- Publication Date
- 2026-08-04
AI Technical Summary
Existing bus dispatching methods rely on the personal experience of dispatchers, resulting in low scheduling efficiency and difficulty in achieving efficient driving plan formulation and real-time adjustments in case of emergencies.
By acquiring static basic information and static scheduling information of public transportation operations, the first train chain set and driving plan information are calculated. In abnormal situations, dynamic basic information and historical passenger flow information are acquired to dynamically adjust the second driving plan. The simulated annealing algorithm is used to optimize the scheduling process.
It enables the automatic generation and dynamic adjustment of bus driving plans, reducing reliance on dispatchers' experience and improving scheduling efficiency.
Smart Images

Figure CN117371687B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent transportation technology, and in particular to a bus dispatching method, device, electronic device, and computer-readable storage medium. Background Technology
[0002] The core operations of urban public transport are mainly divided into two parts: static and dynamic scheduling. Static scheduling is based on historical passenger flow data to create driver-vehicle driving plans, while dynamic scheduling is based on real-time anomalies to dynamically adjust driver-vehicle driving plans. Based on citizens' travel needs, public transport companies develop reasonable driving plans using existing resources. Under normal circumstances, driving tasks are arranged according to the driving plan; under abnormal circumstances, the driving plan needs to be adjusted in real time to provide citizens with efficient and stable travel services. However, currently, the formulation of driving plans and the real-time adjustment of driving plans in emergencies are mostly done manually. Manual adjustments often rely on the dispatcher's personal experience and familiarity with the passenger flow distribution along the route. The resulting driving plans vary from person to person, thus easily leading to low scheduling efficiency. Summary of the Invention
[0003] The main objective of this application is to provide a bus dispatching method, device, electronic device, and computer-readable storage medium, which makes the bus dispatching process more intelligent and improves the efficiency of scheduling.
[0004] To achieve the above objectives, a first aspect of this application proposes a bus dispatching method, the method comprising:
[0005] Obtain basic static information and static dispatch information for public transportation operations;
[0006] The first bus route chain set is determined based on the static basic information of bus operation and the static scheduling information;
[0007] The first driving plan information is calculated based on the static basic information of bus operation, the static scheduling information, and the first vehicle chain set; and the driving plan is executed based on the first driving plan information.
[0008] In the event of an anomaly during the execution of the driving plan based on the first driving plan information, obtain basic information on bus operation dynamics, historical passenger flow information, and dynamic dispatch information.
[0009] The second bus route chain set is determined based on the aforementioned dynamic basic information on bus operation and the aforementioned dynamic scheduling information;
[0010] The second driving plan information is calculated based on the static basic information of bus operation, the dynamic basic information of bus operation, the historical passenger flow information, the dynamic scheduling information, and the second train number chain set; and the driving plan is adjusted and executed based on the second driving plan information.
[0011] In some embodiments, the static basic information of bus operation includes a departure timetable, the static scheduling information includes a first constraint term, and the step of determining the first bus route chain set based on the static basic information of bus operation and the static scheduling information includes:
[0012] A first directed graph is constructed based on the departure timetable, wherein the first directed graph includes a first set of nodes, and each node in the first set of nodes represents a trip;
[0013] The first train number chain is obtained by traversing each node in the first node set according to the first constraint.
[0014] In some embodiments, the first constraint includes working time constraint information, and the step of traversing each node in the first node set according to the first constraint to obtain the first train number chain set includes:
[0015] Construct a first temporary node set based on the first node set;
[0016] Select the node with the smallest number from the first temporary node set as the first node, and extract the attributes of the first node to obtain the attribute value of the first node, wherein the attribute value of the first node includes the departure time.
[0017] The train schedule end time of the first node is determined based on the departure time and the working time constraint information; and a time interval is determined based on the departure time and the train schedule end time.
[0018] A first subgraph is selected from the first directed graph based on the time interval; and nodes with an out-degree of zero or an in-degree of zero, except for the first node, are deleted from the first subgraph to obtain a first updated subgraph.
[0019] The first updated subgraph is searched to obtain a first set of feasible paths starting from the first node; and the first set of feasible paths is updated according to the first constraint term.
[0020] Delete the first node from the first temporary node set;
[0021] If the first temporary node set is not empty, the node with the smallest number is reselected from the first temporary node set for traversal processing; if the first temporary node set is empty, the updated set of all first feasible paths is determined as the first train chain set.
[0022] In some embodiments, the dynamic basic information of bus operation includes information on executed driving tasks and information on currently executed driving tasks; the dynamic scheduling information includes departure times to be executed and a second constraint; and the step of determining the second bus chain set based on the dynamic basic information of bus operation and the dynamic scheduling information includes:
[0023] A second directed graph is constructed based on the executed driving task information, the currently executed driving task information, and the departure time to be executed. The second directed graph includes a second set of nodes, and each node in the second set of nodes represents a trip.
[0024] The second train number chain set is obtained by traversing each node in the second node set according to the second constraint.
[0025] In some embodiments, the second constraint includes working time constraint information, and the step of traversing each node in the second node set according to the second constraint to obtain the second train number chain set includes:
[0026] Construct a second temporary node set based on the second node set;
[0027] Select the node with the smallest number from the second temporary node set as the second node, and extract the attributes of the second node to obtain the attribute values of the second node, wherein the attribute values of the second node include the departure time;
[0028] The train chain end time of the second node is determined based on the departure time and the working duration constraint information; and a time interval is determined based on the departure time and the train chain end time.
[0029] A second subgraph is selected from the second directed graph based on the time interval; and nodes with an out-degree of zero or an in-degree of zero, except for the second node, are deleted from the second subgraph to obtain the second updated subgraph.
[0030] The second updated subgraph is searched to obtain a second set of feasible paths starting from the second node; and the second set of feasible paths is updated according to the second constraint term.
[0031] Delete the second node from the second temporary node set;
[0032] If the second temporary node set is not empty, select the node with the smallest number from the second temporary node set for traversal processing; if the second temporary node set is empty, determine the updated set of all second feasible paths as the second train chain set.
[0033] In some embodiments, calculating the first travel plan information based on the static basic information of bus operation, the static scheduling information, and the first vehicle chain set includes:
[0034] Construct a first initial solution based on the first train number chain set;
[0035] The current temperature is used as the initial temperature for the simulated annealing algorithm, and the first initial solution is used as the first optimal solution at the initial temperature.
[0036] The current temperature is updated. When the current temperature is equal to the preset termination temperature, the first driving plan information is determined based on the first optimal solution, the static basic information of bus operation, and the static scheduling information. When the current temperature is greater than the termination temperature, the first optimal solution is updated and iterated at the current temperature.
[0037] In some embodiments, constructing the first initial solution based on the first train number chain set includes:
[0038] Select the node with the smallest number from the first train number chain set as the third node;
[0039] Randomly select one feasible path from the set of all feasible paths of the third node as the optimal path;
[0040] Delete all feasible paths under the nodes included in the optimal path from the first set of train routes;
[0041] If the first train number chain set is not empty, select the node with the smallest number from the first train number chain set as the new third node; if the first train number chain set is empty, summarize the optimal paths to obtain the first initial solution.
[0042] In some embodiments, the static scheduling information includes a static scheduling strategy and a static scheduling objective function, wherein the static scheduling objective function is determined by the static scheduling strategy, and the step of updating and iterating the first optimal solution at the current temperature includes:
[0043] Initialize the count value of the preset counter, and determine the value of the first objective function based on the first optimal solution and the static scheduling objective function;
[0044] Construct a first neighborhood solution based on the first optimal solution;
[0045] If the first neighborhood solution satisfies the preset resource conditions, the second objective function value is calculated based on the first neighborhood solution and the static scheduling objective function.
[0046] The acceptance probability of the first neighborhood solution is determined based on the first objective function value and the second objective function value.
[0047] The first optimal solution and the first objective function value are updated based on the acceptance probability of the first neighborhood solution and the preset calculation judgment conditions.
[0048] The counter value is incremented by 1, and it is determined whether the counter value is not less than a preset iteration number threshold.
[0049] If the counter count is not less than the iteration number threshold, the first optimal solution is output as the optimal solution at the current temperature; if the counter count is less than the iteration number threshold, the first neighborhood solution is reconstructed based on the first optimal solution.
[0050] In some embodiments, constructing a first neighborhood solution based on the first optimal solution includes:
[0051] Select the first untraversed path from the first optimal solution, and randomly generate the first random number;
[0052] If the first random number is less than a preset coefficient of variation, the node corresponding to the first path is placed in a preset node set, and an edge of the first path is randomly selected and placed in a preset constraint set; if the first random number is not less than a preset coefficient of variation, the first path is placed in a preset path set.
[0053] In the case that all paths have been traversed in the first optimal solution, the node with the smallest number is selected from the preset set of nodes as the fourth node.
[0054] Among all feasible paths starting from the fourth node, select one feasible path as the optimal path, and all nodes of the optimal path are in the preset node set, all edges are not in the constraint set, and place the optimal path in the preset path set.
[0055] Delete the nodes contained in the optimal path from the preset set of nodes;
[0056] If the preset set of nodes is not empty, the node with the smallest number in the set of nodes is selected as the new fourth node; if the first train chain set of the node set is empty, the preset set of paths is used as the first neighborhood solution.
[0057] In some embodiments, the step of calculating the second objective function value based on the first neighborhood solution and the static scheduling objective function when the first neighborhood solution satisfies preset resource conditions includes:
[0058] The number of drivers assigned to the second task, the number of drivers operating the second cross-line operation, and the number of vehicles arranged are calculated based on the solution of the first neighborhood.
[0059] The required resource conditions are determined based on the number of drivers assigned to the second task, the number of drivers operating the second cross-line, and the number of vehicles arranged in the second task.
[0060] If the current required resource conditions meet the preset resource conditions, the second objective function value is obtained by obtaining the objective function value of the first neighborhood solution according to the static scheduling objective function; if the current required resource conditions do not meet the preset resource conditions, the first neighborhood solution is reconstructed according to the first optimal solution.
[0061] In some embodiments, updating the first optimal solution and the first objective function value based on the first neighborhood acceptance probability and preset calculation judgment conditions includes:
[0062] Construct a random number and compare the random number with the acceptance probability of the first neighborhood solution;
[0063] If the random number is less than the acceptance probability of the first neighborhood solution, the first neighborhood solution is taken as the first optimal solution, and the second objective function value is taken as the first objective function value; if the random number is not less than the acceptance probability of the first neighborhood solution, the first optimal solution and the first objective function value are not updated.
[0064] In some embodiments, the dynamic scheduling information includes a dynamic scheduling strategy and a dynamic scheduling objective function, wherein the dynamic scheduling objective function is determined by the dynamic scheduling strategy. The step of calculating the second travel plan information based on the static basic information of bus operation, the dynamic basic information of bus operation, the historical passenger flow information, the dynamic scheduling information, and the second vehicle chain set includes:
[0065] Construct a second initial solution based on the second train number chain set;
[0066] The current temperature is used as the initial temperature for the simulated annealing algorithm, and the second initial solution is used as the second optimal solution at the initial temperature;
[0067] The current temperature is updated. When the current temperature equals the preset termination temperature, the second driving plan information is determined based on the second optimal solution, the basic dynamic information of bus operation, the historical passenger flow information, and the dynamic scheduling information. When the current temperature is greater than the termination temperature, the second optimal solution is updated and iterated at the current temperature.
[0068] To achieve the above objectives, a second aspect of this application provides a bus dispatching device, the device comprising:
[0069] The first processing module is used to acquire static basic information and static scheduling information of bus operation;
[0070] The second processing module is used to determine the first bus route chain set based on the static basic information of bus operation and the static scheduling information.
[0071] The third processing module is used to calculate the first driving plan information based on the static basic information of bus operation, the static scheduling information and the first vehicle chain set; and to execute the driving plan based on the first driving plan information.
[0072] The fourth processing module is used to obtain basic information on bus operation dynamics, historical passenger flow information, and dynamic dispatch information when an anomaly occurs during the execution of the driving plan based on the first driving plan information.
[0073] The fifth processing module is used to determine the second bus route chain set based on the bus operation dynamic basic information and the dynamic scheduling information;
[0074] The sixth processing module is used to calculate the second driving plan information based on the static basic information of bus operation, the dynamic basic information of bus operation, the historical passenger flow information, the dynamic scheduling information and the second train number chain set; and to adjust and execute the driving plan according to the second driving plan information.
[0075] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the bus dispatching method described in the first aspect.
[0076] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the bus dispatching method described in the first aspect.
[0077] The bus dispatching method, device, electronic equipment, and computer-readable storage medium proposed in this application involve: acquiring static basic information and static dispatching information of bus operations; determining a first set of bus routes based on the static basic information and static dispatching information; calculating a first driving plan based on the static basic information, static dispatching information, and the first set of bus routes; and executing the driving plan based on the first driving plan information. If an anomaly occurs during the execution of the driving plan based on the first driving plan information, acquiring dynamic basic information of bus operations, historical passenger flow information, and dynamic dispatching information; determining a second set of bus routes based on the dynamic basic information of bus operations and dynamic dispatching information; finally, calculating a second driving plan based on the static basic information of bus operations, dynamic basic information of bus operations, historical passenger flow information, dynamic dispatching information, and the second set of bus routes; and adjusting the execution of the driving plan based on the second driving plan information. Through the above technical solution, the automatic generation and dynamic adjustment of bus driving plans are achieved, avoiding reliance solely on the past experience of dispatchers, making the bus dispatching process more intelligent and improving scheduling efficiency. Attached Figure Description
[0078] Figure 1 This is a schematic diagram of the device architecture for performing a bus dispatching method provided in an embodiment of this application;
[0079] Figure 2 This is a flowchart of the bus dispatching method provided in the embodiments of this application;
[0080] Figure 3 yes Figure 2 The detailed flowchart of step S200 in the process;
[0081] Figure 4 yes Figure 3 The detailed flowchart of step S220 in the process;
[0082] Figure 5 This is a flowchart illustrating the specific process of calculating the first train number chain set provided in the embodiments of this application;
[0083] Figure 6 yes Figure 2 The detailed flowchart of step S500 in the process;
[0084] Figure 7 yes Figure 6 The detailed flowchart of step S520 in the process;
[0085] Figure 8 This is a flowchart illustrating the specific process of calculating the second train number chain set provided in the embodiments of this application;
[0086] Figure 9yes Figure 2 The detailed flowchart of step S300 in the process;
[0087] Figure 10 yes Figure 9 The detailed flowchart of step S310 in the process;
[0088] Figure 11 yes Figure 9 The detailed flowchart of step S330 in the process;
[0089] Figure 12 yes Figure 11 The detailed flowchart of step S332 in the process;
[0090] Figure 13 yes Figure 11 The detailed flowchart of step S333 in the process;
[0091] Figure 14 yes Figure 11 The detailed flowchart of step S335 in the process;
[0092] Figure 15 yes Figure 2 The detailed flowchart of step S600 in the process;
[0093] Figure 16 This is a flowchart illustrating the specific process of calculating the first or second driving plan information provided in the embodiments of this application.
[0094] Figure 17 This is a schematic diagram of the bus dispatching device provided in the embodiments of this application;
[0095] Figure 18 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0096] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0097] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0098] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0099] First, let's analyze some of the terms used in this application:
[0100] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. AI attempts to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.
[0101] Based on this, embodiments of this application provide a bus dispatching method and apparatus, electronic device, and computer-readable storage medium. The bus dispatching method acquires static basic information and static dispatching information for bus operations; then determines a first set of bus routes based on the static basic information and static dispatching information; then calculates a first driving plan based on the static basic information, static dispatching information, and the first set of bus routes; and executes the driving plan based on the first driving plan information. If an anomaly occurs during the execution of the driving plan based on the first driving plan information, dynamic basic information, historical passenger flow information, and dynamic dispatching information for bus operations are acquired; then a second set of bus routes is determined based on the dynamic basic information and dynamic dispatching information; finally, a second driving plan is calculated based on the static basic information, dynamic basic information, historical passenger flow information, dynamic dispatching information, and the second set of bus routes; and the driving plan is adjusted and executed based on the second driving plan information. Through the above technical solution, the automatic generation and dynamic adjustment of bus driving plans are achieved, avoiding reliance solely on the past experience of dispatchers, making the bus dispatching process more intelligent and improving scheduling efficiency.
[0102] The bus dispatching method, apparatus, electronic device, and computer-readable storage medium provided in this application are specifically described through the following embodiments. First, the bus dispatching method in this application is described.
[0103] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0104] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0105] The bus dispatching method provided in this application relates to the field of intelligent transportation technology. The bus dispatching method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the bus dispatching method, but is not limited to the above forms.
[0106] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0107] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0108] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0109] Please see Figure 1 , Figure 1 This is a schematic diagram of an apparatus architecture for performing a bus dispatching method according to an embodiment of this application. Figure 1 In the example, the device architecture includes a static basic data acquisition module 1000, a static scheduling interactive module 1100, a dynamic basic data acquisition module 1200, a dynamic scheduling interactive module 1300, a feasible region generation module 1400, a solution module 1500, and a driving plan execution module 1600; wherein, the static basic data acquisition module 1000, the static scheduling interactive module 1100, the dynamic basic data acquisition module 1200, and the dynamic scheduling interactive module 1300 are all data-connected to the feasible region generation module 1400, and the feasible region generation module 1400, the solution module 1500, and the driving plan execution module 1600 are connected in sequence.
[0110] It should be noted that the static basic data acquisition module 1000 collects static basic information on bus operation, and the static scheduling interactive module 1100 configures and determines the static scheduling information. The static scheduling interactive module 1100 enables human-computer interaction with scheduling management personnel. The static basic information on bus operation and the static basic information are input into the feasible region generation module 1400 to calculate the first bus number chain set. The first bus number chain set, the static basic information on bus operation, and the static basic information are input into the solution module 1500 to calculate the first driving plan information. Finally, the first driving plan information is sent to the driving plan execution module 1600 for execution processing. During the execution of the first driving plan information using the driving plan execution module 1600, if an anomaly occurs, the dynamic basic data acquisition module 1200 will collect dynamic basic information on bus operation and historical passenger flow information. Based on the configuration of the dynamic scheduling interactive module 1300, dynamic scheduling information is determined, enabling human-computer interaction with dispatch management personnel. Inputting the bus operation dynamic basic information and dynamic basic information into the feasible domain generation module 1400 allows for the calculation of the second bus route chain set. Finally, inputting the second bus route chain set, the bus operation dynamic basic information, dynamic scheduling information, historical passenger flow information, and bus operation static basic information into the solution module 1500 yields the second driving plan information, realizing dynamic adjustment of the driving plan. Finally, the second driving plan information is input into the driving plan execution module 1600 for re-execution of the driving plan. Through the above technical solution, the automatic generation and dynamic adjustment of bus driving plans are achieved, avoiding reliance solely on the dispatcher's past experience, making the bus dispatching process more intelligent and improving scheduling efficiency.
[0111] The device architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. Those skilled in the art will know that with the evolution of device architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0112] It will be understood by those skilled in the art that Figure 1 The device architecture shown does not constitute a limitation on the embodiments of this application, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0113] Based on the structure of the above-described device architecture, various embodiments of the bus dispatching method of this application are proposed.
[0114] Please see Figure 2 , Figure 2This is an optional flowchart of the bus dispatching method provided in the first aspect embodiment of this application. Figure 2 The method may include, but is not limited to, steps S100 to S600.
[0115] Step S100: Obtain basic static information and static dispatch information for bus operation;
[0116] Step S200: Determine the first bus route chain set based on the static basic information of bus operation and static scheduling information;
[0117] Step S300: Calculate the first driving plan information based on the static basic information of bus operation, static scheduling information, and the first bus route chain set; and execute the driving plan based on the first driving plan information.
[0118] Step S400: If an anomaly occurs during the execution of the driving plan based on the first driving plan information, obtain the basic information on bus operation dynamics, historical passenger flow information, and dynamic dispatch information.
[0119] Step S500: Determine the second bus route chain set based on the basic information on bus operation dynamics and dynamic scheduling information;
[0120] Step S600: Calculate the second driving plan information based on the static basic information of bus operation, the dynamic basic information of bus operation, historical passenger flow information, dynamic scheduling information, and the second bus number chain set; and adjust the driving plan according to the second driving plan information.
[0121] In steps S100 to S600 of this embodiment, the bus dispatching method acquires static basic information and static dispatching information for bus operations; then, it determines a first set of bus routes based on the static basic information and static dispatching information; next, it calculates a first driving plan based on the static basic information, static dispatching information, and the first set of bus routes; and executes the driving plan based on the first driving plan information. If an anomaly occurs during the execution of the driving plan based on the first driving plan information, it acquires dynamic basic information, historical passenger flow information, and dynamic dispatching information for bus operations; then, it determines a second set of bus routes based on the dynamic basic information and dynamic dispatching information; finally, it calculates a second driving plan based on the static basic information, dynamic basic information, historical passenger flow information, dynamic dispatching information, and the second set of bus routes; and adjusts the execution of the driving plan based on the second driving plan information. Through the above technical solution, the automatic generation and dynamic adjustment of bus driving plans are achieved, avoiding reliance solely on the dispatcher's past experience, making the bus dispatching process more intelligent and improving scheduling efficiency.
[0122] It should be noted that abnormal situations that may occur during the execution of the driving plan based on the initial driving plan information may include, but are not limited to: driver leave, sudden vehicle malfunction, traffic congestion on the route, and a sudden increase in passengers on the route. When abnormal situations occur, dynamic basic information on bus operations, historical passenger flow information, and dynamic dispatch information can be obtained, providing data support for subsequent dynamic adjustments to the bus driving plan.
[0123] It is worth noting that if an anomaly occurs during the execution of the driving plan based on the first driving plan information, dynamic basic information on bus operation, historical passenger flow information, and dynamic dispatch information can be obtained. Subsequently, the driving plan can be dynamically adjusted based on the obtained dynamic basic information on bus operation, historical passenger flow information, and dynamic dispatch information.
[0124] It should be noted that static scheduling information may include a first objective function, a first constraint term, and a static scheduling strategy, while dynamic scheduling information may include a second objective function, a second constraint term, and a dynamic scheduling strategy. The weight coefficients of the first objective function can be determined by the static scheduling strategy, and the weight coefficients of the second objective function can be determined by the dynamic scheduling strategy. Furthermore, the configuration of static scheduling information can be done manually; for example, the relevant parameters of the first constraint term and the static scheduling strategy can be manually selected to determine the first objective function. The configuration process for dynamic scheduling information is similar to that for static scheduling information and will not be elaborated here. Based on the integrated dynamic and static scheduling framework for public transportation, this application, through a human-computer interaction mode, allows for flexible fine-tuning of the objective function, constraints, and scheduling strategy, enabling the integration of different abnormal scheduling scenarios and broadening its application scope. This application can also achieve regional collaborative scheduling of public transportation resources, realizing the generation and dynamic adjustment of multi-route combined driving plans.
[0125] For example, the static basic information of bus operation may include the planned departure timetable for the day, the drivers on duty for the day, the buses available for the day, the binding relationship table between drivers and vehicles, and the binding relationship table between drivers and routes, as shown in the table below:
[0126]
[0127]
[0128] For example, the basic information on bus operation dynamics may include the driving tasks already executed that day, the driving tasks currently being executed, abnormal disturbance information, and historical passenger flow information for each station, as shown in the table below:
[0129]
[0130] It is worth noting that static scheduling mainly involves creating driving plans for vehicle drivers based on known departure timetables. Therefore, the core objective of static scheduling is to consider the operating costs of the bus company, which mainly consist of driver wages, overtime costs, deviation costs due to uneven working hours, and vehicle operating costs. The first objective function can be set as follows:
[0131]
[0132]
[0133]
[0134]
[0135] Y i =β4×(L i,1 ×M i,1 +L i,2 ×M i,2 )
[0136] B j (k j )=β1×k j
[0137] β1 represents the hourly wage cost paid to drivers and sales personnel for normal work, with a default value of 30 RMB / h; β2 represents the hourly overtime cost paid to drivers and sales personnel for overtime work, with a default value of 50 RMB / h; β3 represents the hourly deviation cost caused by uneven work hours among shifts, at 10 RMB / h; β4 represents the operating cost per kilometer of vehicle (mainly electricity cost), with a default value of 1 RMB / km; α, ρ, τ, and γ are weighting coefficients, α+ρ+τ+γ=1, with default values of α=0.3, ρ=0.3, τ=0.2, and γ=0.2. These parameters can be adjusted according to actual conditions.
[0138] N is the total number of drivers; F j (ω j P represents the wage cost of the j-th driver; j (ω j K represents the overtime cost of the j-th driver; j (ω j Y represents the deviation cost due to the uneven working hours of the j-th driver; i B represents the vehicle operating cost for route i; j (k j ) represents the implicit cost incurred by the j-th driver waiting for rest; n represents the number of routes; ω jLet k be the working hours of the j-th driver in a day (the time the driver's last bus arrives at the station - the time the driver's first bus departs); j S represents the total rest time for the j-th driver in one day; i1 S represents the number of bus stops along the route i in the upbound direction; i2 This represents the number of bus stops along the route on the downhill section. The number of passengers boarding at station u in the up direction during time period h of line i; The number of passengers boarding at station u in the down direction during time period h of line i; The frequency of buses departing in the up direction of line i during the time period h is expressed as buses / hour. L is the departure frequency of buses going downhill on line i during time period h, in vehicles / hour; i,1 L is the length of line i in the up direction; i,2 M is the length of line i in the down direction; i,1 M represents the number of trains departing in the uphill direction on line i per day; i,2 Let i be the number of trains departing in the down direction on line i in one day;
[0139] The adjustable and configurable parameters are shown in the table below:
[0140]
[0141]
[0142] It should be noted that, for the convenience of administrators, a pre-configured set of static scheduling strategies—objective function weight coefficient pairs (or fine-tuning the corresponding weights) can be selected, or a custom static scheduling strategy—objective function weight coefficient pair can be defined. See the table below for details:
[0143] Default policy Default objective function weight coefficients Minimum number of drivers strategy α=0.7, ρ=0.1, τ=0.1, γ=0.1 Minimize driver idle time strategy α=0.4, ρ=0.1, τ=0.1, γ=0.4 Driver labor equilibrium strategy α=0.3, ρ=0.1, τ=0.5, γ=0.1
[0144] It should be noted that the first set of constraints mainly includes four categories: duration, dining, operations, and special items. Custom constraints can also be added based on actual needs. The main constraints are shown in the table below:
[0145]
[0146]
[0147] It is worth noting that, based on the actual situation and abnormal circumstances of the fleet, management personnel adjust the default value of the second constraint, select a dynamic scheduling strategy, and configure the weight coefficients of the second objective function. The second objective function can be set as follows:
[0148]
[0149]
[0150]
[0151]
[0152] Y i =β4×(L i,1 ×M i,1 +L i,2 ×M i,2 )
[0153] B j (k j )=β1×k j
[0154]
[0155]
[0156] α, ρ, τ, γ, and δ are weighting coefficients, where α + ρ + τ + γ + δ = 1. The default values are α = 0.2, ρ = 0.2, τ = 0.2, γ = 0.2, and δ = 0.2. These parameters can be adjusted according to actual conditions.
[0157] Z i,1 (h) represents the cumulative waiting cost for passengers in the h-th time period of line i in the upward direction; Z i,2 (h) represents the cumulative waiting cost for passengers in the h-th time period in the downlink direction of line i; S i,1 S represents the number of bus stops along the route i in the upbound direction; i,2 This represents the number of bus stops along the route on the downhill section. The number of passengers boarding at station u in the up direction during time period h of line i; The number of passengers boarding at station u in the down direction during time period h of line i; The frequency of buses departing in the up direction of line i during the time period h is expressed as buses / hour. H represents the departure frequency of buses alighting on line i in the down direction during time period h, in vehicles / hour; i For route i, the daytime operating hours are divided into h = (1, 2, 3... H) based on passenger flow. i ( ) time periods. For information on other parameters, please refer to the parameter descriptions in the static scheduling interactive module.
[0158] The adjustable and configurable parameters are shown in the table below:
[0159]
[0160] It should be noted that the most common abnormal situations in bus operation can be divided into three main scenarios: the first is adjustment scenarios due to changes in available personnel and vehicles caused by vehicle malfunctions, driver leave, etc.; the second is adjustment scenarios due to changes in operating conditions caused by delayed vehicle arrivals, etc., while maintaining the same available personnel and vehicles; and the third is adjustment scenarios due to changes in passenger flow conditions caused by sudden surges in passenger volume, etc. The various adjustment strategies and parameters requiring manual configuration and confirmation are shown in the table below:
[0161]
[0162]
[0163] It is worth noting that the second constraint in the dynamic scheduling process is the same as the first constraint in the static scheduling process described above, and will not be repeated here.
[0164] Please see Figure 3 In some embodiments, the static basic information for bus operation includes a departure timetable, and the static scheduling information includes a first constraint term. Step S200 may include, but is not limited to, steps S210 to S220:
[0165] Step S210: Construct a first directed graph based on the departure timetable, wherein the first directed graph includes a first set of nodes, and each node in the first set of nodes represents a trip.
[0166] Step S220: Traverse each node in the first node set according to the first constraint term to obtain the first train number chain set.
[0167] In steps S210 to S220 of this embodiment, during the calculation of the first bus route chain set, a first directed graph is first constructed based on the departure timetable. The first directed graph includes a first set of nodes and a first set of edges. Each node in the first set of nodes represents a trip; each edge in the first set of edges represents the connection between two nodes, i.e., after a driver completes one trip, they can continue on the next trip. Finally, the first bus route chain set is obtained by traversing each node in the first set of nodes according to the first constraint term and the first set of edges. After obtaining the first bus route chain set, preparations are made for the subsequent generation of the first driving plan information. The first constraint term can be selected according to actual needs, improving the rationality of the driving plan formulation. The static basic information of bus operation includes the daily planned departure timetable, drivers on duty that day, available buses for the day, a driver-vehicle binding relationship table, and a driver-route binding relationship, etc.
[0168] Please see Figure 4In some embodiments, the first constraint includes working duration constraint information, and step S220 may include, but is not limited to, steps S221 to S227:
[0169] Step S221: Construct a first temporary node set based on the first node set;
[0170] Step S222: Select the node with the smallest number from the first temporary node set as the first node, and extract the attributes of the first node to obtain the attribute value of the first node, wherein the attribute value of the first node includes the departure time.
[0171] Step S223: Determine the end time of the train chain of the first node based on the departure time and working duration constraint information; and determine the time interval based on the departure time and end time of the train chain of the first node.
[0172] Step S224: Select the first subgraph from the first directed graph according to the time interval; and delete nodes with zero out-degree or zero in-degree except for the first node in the first subgraph to obtain the first updated subgraph.
[0173] Step S225: Perform search processing on the first updated subgraph to obtain a first set of feasible paths starting from the first node; and update the first set of feasible paths according to the first constraint term.
[0174] Step S226: Delete the first node from the first temporary node set;
[0175] Step S227: If the first temporary node set is not empty, reselect the node with the smallest number from the first temporary node set for traversal processing; if the first temporary node set is empty, determine the updated set of all first feasible paths as the first train chain set.
[0176] In steps S221 to S227 of this embodiment, during the traversal of each node in the first node set based on the first constraint term and the first edge set, a first temporary node set is first constructed based on the first node set. Then, the node with the smallest number in the first temporary node set is selected as the first node, and attribute extraction is performed on the first node to obtain its attribute values. These first node attribute values include six attributes: trip number, route number, departure time, departure station, arrival time, and arrival station. Then, the train chain end time of the first node is determined based on the departure time and working duration constraint information. Finally, a time interval is determined based on the departure time and train chain end time of the first node. Next, based on the time interval, a first subgraph is selected from the first directed graph; and nodes with an out-degree of zero or an in-degree of zero, except for the first node, are deleted from the first subgraph to obtain the first updated subgraph; then, the first updated subgraph is searched to obtain the first feasible path set starting from the first node; and the first feasible path set is updated according to the first constraint term; then, the first node is deleted from the first temporary node set; finally, if the first temporary node set is not empty, the node with the smallest number is re-selected from the first temporary node set for traversal; if the first temporary node set is empty, the updated set of all first feasible paths is determined as the first train chain set.
[0177] It should be noted that a first temporary node set is constructed based on the first node set to prepare for subsequent traversal of each node in the first node set. The node with the smallest number in the first temporary node set is selected as the starting point for traversal, allowing all nodes in the first temporary node set to be traversed sequentially. The end time of the train chain for the first node is determined based on the departure time and working duration constraints, and a time interval is determined based on these constraints. A first subgraph that meets the time conditions is selected from the first directed graph based on the time interval. The first feasible path set is updated based on the first constraint term, i.e., the first feasible path set is updated and filtered based on the specific constraints in the first constraint term, deleting feasible paths that do not meet the specific constraints. The first constraint term can be manually set, thus making the formulation of the travel plan more flexible.
[0178] For example, please refer to Figure 5 , Figure 5 This paper illustrates the specific process of calculating and obtaining the first bus route chain set based on static basic information and static scheduling information of public transportation operations. The process can be summarized as follows:
[0179] Step 1: Compile the all-day departure timetable for multiple / single routes for buses. sch Transform into a directed graph G(V,E,P)V ,P E ); where V is the set of nodes {v1, v2, v3, v4, ... v n}, where a node represents a trip; E is the set of edges (node pairs), (v i ,v j ) is node v i With node v j A connected directed edge represents a driver who can complete the journey v. i Then start the trip v j ;P V This is a collection of attribute values for nodes, where each node contains the trip number i, the route number line_no, and the departure time st. i Departure Station i Arrival time et i Arrival Station i There are 6 attribute values; P E This is the set of attribute values for the edges, with each edge containing one attribute value: the interval rest duration.
[0180] Edge connection rules: Forming an edge (v i ,v j The basic condition is the journey v i The time of arrival et i Less than the journey v j departure time j , and es i with es j equal.
[0181] Step 2: Construct a temporary node set V1 = V;
[0182] Step 3: Select the node v with the smallest number from set V1. i ;
[0183] Step 4: In the directed graph G(V,E,P) V ,P E Extract node v from ) i The node attribute values (trip number i, line number line_no, departure time st) i Departure Station i Arrival time et i Arrival Station i );
[0184] Step 5: Calculate the latest end time st of this train chain based on the working duration constraint t_c set in the static scheduling interaction module. i +t_c;
[0185] Step 6: In graph G, filter out [st] that meet the criteria within the specified time range.i ,st i The nodes and edges of +t_c] form the subgraph G′;
[0186] Step 7: In subgraph G′, remove nodes with an out-degree of 0 that are connected to node v. i Nodes whose departure stations are inconsistent (except for node v) i (Except for the node v), remove nodes with an in-degree of 0 (except for the node v). i outside);
[0187] Step 8: Obtain the node v using the depth-first search algorithm. i set of all feasible paths starting from the origin i ={route i,1 ,route i,2 ,....,route i,k Each path consists of multiple nodes;
[0188] Step 9: In the set i Delete paths that do not meet the constraints set in the static scheduling interaction module, such as paths that do not meet the rest time requirements between two adjacent trips;
[0189] Step 10: Delete node v from set V1 i ;
[0190] Step 11: Determine if set V1 is empty. If it is, proceed to step 12; otherwise, proceed to step 3.
[0191] Step 12: Compile a set of feasible paths for each traversed node. i This yields a set of feasible paths for multi-line combination / single-line static scheduling, which is the first train chain set.
[0192] Please see Figure 6 In some embodiments, the dynamic basic information of bus operation includes executed driving tasks, driving tasks in progress, abnormal disturbance information, historical passenger flow information of each station, etc., and the dynamic scheduling information includes the departure time to be executed and the second constraint. Step S500 may include, but is not limited to, steps S510 to S520:
[0193] Step S510: Construct a second directed graph based on the executed driving task information, the currently executed driving task information, and the departure time to be executed. The second directed graph includes a second set of nodes, and each node in the second set of nodes represents a trip.
[0194] Step S520: Traverse each node in the second node set according to the second constraint term to obtain the second train number chain set.
[0195] In steps S510 to S520 of the embodiments of this application, during the process of calculating and determining the second train schedule chain set, a second directed graph is first constructed based on the executed driving task information, the currently executed driving task information, and the departure time to be executed. The second directed graph includes a second node set and a second edge set. Each node in the second node set represents a trip; each edge in the second edge set represents the connection relationship between two nodes, i.e., after a driver completes one trip, they can continue to the next trip. Then, the second train schedule chain set is obtained by traversing each node in the second node set according to the second constraint term and the second edge set.
[0196] It should be noted that a second directed graph is constructed based on the information of executed train tasks, the information of currently executed train tasks, and the departure times to be executed. This allows the construction of the second train number chain set to be based on the current train situation, making subsequent dynamic adjustments to the train schedule more reasonable. Furthermore, each node in the second node set is traversed based on the second constraint term and the second edge set. The second constraint term can be set according to the actual situation, thus making the dynamic scheduling process more flexible.
[0197] Please see Figure 7 In some embodiments, the second constraint includes five categories of information: working hours, meals, operations, and special items. Step S520 may include, but is not limited to, steps S521 to S527.
[0198] Step S521: Construct a second temporary node set based on the second node set;
[0199] Step S522: Select the node with the smallest number from the second temporary node set as the second node, and extract the attributes of the second node to obtain the attribute values of the second node. The attribute values of the second node include 6 attributes such as trip number, route number, departure time, departure station, arrival time, and arrival station.
[0200] Step S523: Determine the end time of the train chain of the second node based on the departure time and working duration constraint information; and determine the time interval based on the departure time and the end time of the train chain.
[0201] Step S524: Select a second subgraph from the second directed graph based on the time interval; and delete nodes with zero out-degree or zero in-degree except for the second node from the second subgraph to obtain the second updated subgraph.
[0202] Step S525: Perform a search process on the second updated subgraph to obtain a second set of feasible paths starting from the second node; and update the second set of feasible paths according to the second constraint terms.
[0203] Step S526: Delete the second node from the second temporary node set;
[0204] Step S527: If the second temporary node set is not empty, reselect the node with the smallest number from the second temporary node set for traversal processing; if the second temporary node set is empty, determine the updated set of all second feasible paths as the second train chain set.
[0205] In steps S521 to S527 of this embodiment, during the process of traversing each node in the second node set according to the second constraint term to obtain the second train chain set, a second temporary node set is first constructed based on the second node set; then, the node with the smallest number in the second temporary node set is selected as the second node, and attribute extraction is performed on the second node to obtain the attribute values of the second node, wherein the attribute values of the second node include six attributes: trip number, route number, departure time, departure station, arrival time, and arrival station; then, the train chain end time of the second node is determined according to the departure time and working duration constraint information; and the time interval is determined according to the departure time and the train chain end time. Next, a second subgraph is selected from the second directed graph based on the time interval; then, nodes with an out-degree of zero or an in-degree of zero, except for the second node, are deleted from the second subgraph to obtain the second updated subgraph; then, the second updated subgraph is searched to obtain the second feasible path set starting from the second node; and the second feasible path set is updated according to the second constraint term; then, the second node is deleted from the second temporary node set; finally, if the second temporary node set is not empty, the node with the smallest number is re-selected from the second temporary node set for traversal; if the second temporary node set is empty, the updated set of all second feasible paths is determined as the second train number chain set.
[0206] It should be noted that a second temporary node set is constructed based on the second node set to prepare for subsequent traversal of each node in the second node set. The node with the smallest number in the second temporary node set is selected as the starting point for traversal, allowing all nodes in the second temporary node set to be traversed sequentially. The end time of the train chain for the second node is determined based on the departure time and working duration constraints, and a time interval is determined based on these constraints. A second subgraph that meets the time conditions is selected from the second directed graph based on the time interval. The second feasible path set is updated based on the second constraint terms, i.e., the second feasible path set is updated and filtered based on the specific constraints in the second constraint terms, deleting feasible paths that do not meet the specific constraints. The second constraint terms can be manually set, thus making the formulation of the travel plan more flexible.
[0207] For example, please refer to Figure 8 , Figure 8 This paper illustrates the specific process of calculating and obtaining the second bus route chain set based on dynamic basic information and dynamic scheduling information of public transportation operations. The process can be summarized as follows:
[0208] Step 1: Based on the driving tasks dt that have been executed at the current moment collected by the dynamic basic data acquisition module. r Driving tasks currently in progress (dt) c The information, and the adjusted departure time data configured in the dynamic scheduling interactive module, are transformed into a directed graph G(V,E,P). V ,P E );
[0209] Unlike the static scheduling of feasible train route chains, in graph construction, the connection relationship between the currently executed departure time (node) and the currently executing departure time (node) must and can only satisfy dt. r dt c The order requirement, rather than the rules: forming an edge (v i ,v j The basic condition is the journey v i The time of arrival et i Less than the journey v j departure time j , and es i with es j If they are equal, they can be freely connected.
[0210] For the connection relationship between the edge and the currently pending departure time (node) configured and adjusted in the dynamic scheduling interactive module, the rule is satisfied: forming an edge (v i ,v j The basic condition is the journey v i The time of arrival et i Less than the journey v j departure time j , and es i with es j If they are equal, they can be freely connected;
[0211] Step 2: Construct a temporary node set V1 = V;
[0212] Step 3: Select the node v with the smallest number from set V1. i ;
[0213] Step 4: In the directed graph G(V,E,P) V ,P E Extract node v from ) iThe node attribute values (trip number i, line number line_no, departure time st) i Departure Station i Arrival time et i Arrival Station i );
[0214] Step 5: Calculate the latest end time st of this train chain based on the working duration constraint t_c set in the dynamic scheduling interaction module. i +t_c;
[0215] Step 6: In graph G, filter out [st] that meet the criteria within the specified time range. i ,st i The nodes and edges of +t_c] form the subgraph G′;
[0216] Step 7: In subgraph G′, remove nodes with an out-degree of 0 that are connected to node v. i Nodes whose departure stations are inconsistent (except for node v) i (Except for the node v), remove nodes with an in-degree of 0 (except for the node v). i outside);
[0217] Step 8: Obtain the node v using the depth-first search algorithm. i set of all feasible paths starting from the origin i ={route i,1 ,route i,2 ,....,route i,k Each path consists of multiple nodes;
[0218] Step 9: In the set i Delete paths that do not meet the constraints set in the dynamic scheduling interaction module, such as paths that do not meet the rest time requirements between two adjacent trips;
[0219] Step 10: Delete node v from set V1 i ;
[0220] Step 11: Determine if set V1 is empty. If it is, proceed to step 12; otherwise, proceed to step 3.
[0221] Step 12: Compile a set of feasible paths for each traversed node. i This yields a set of feasible paths for dynamic scheduling of multiple routes / single routes, which is the second train chain set.
[0222] Please see Figure 9 In some embodiments, step S300 may include, but is not limited to, steps S310 to S330:
[0223] Step S310: Construct the first initial solution based on the first train number chain set;
[0224] Step S320: Use the current temperature as the initial temperature of the simulated annealing algorithm, and use the first initial solution as the first optimal solution at the initial temperature;
[0225] Step S330: Update the current temperature. When the current temperature is equal to the preset termination temperature, determine the first driving plan information based on the first optimal solution, the static basic information of bus operation, and the static scheduling information. When the current temperature is greater than the termination temperature, update and iterate the first optimal solution at the current temperature.
[0226] In steps S310 to S330 of this embodiment, during the calculation of the first travel plan information, a first initial solution is first constructed based on the first train number chain set; then, the current temperature is used as the initial temperature for the simulated annealing algorithm, and the first initial solution is used as the first optimal solution under the initial temperature; next, the current temperature is updated; when the current temperature equals a preset termination temperature, the first travel plan information is determined based on the first optimal solution, the static basic information of bus operation, and the static scheduling information; when the current temperature is greater than the termination temperature, the first optimal solution is updated and iterated under the current temperature. In this embodiment, the simulated annealing algorithm is used to obtain the first optimal solution, and the first travel plan information is determined based on the first optimal solution, the static basic information of bus operation, and the static scheduling information.
[0227] It is worth noting that the terms "first" and "second" in the embodiments of this application are only used to distinguish similar objects and do not represent that the two are different in nature or attribute. The above distinction is only for the purpose of making the illustration of the embodiments clearer. For example, the first neighborhood solution and the second neighborhood solution are not different in attribute or property.
[0228] Please see Figure 10 In some embodiments, step S310 may include, but is not limited to, steps S311 to S314:
[0229] Step S311: Select the node with the smallest number from the first train number chain set as the third node;
[0230] Step S312: Randomly select a feasible path from the set of all feasible paths of the third node as the optimal path;
[0231] Step S313: Delete all feasible paths under the nodes contained in the optimal path from the first train chain set;
[0232] Step S314: If the first train number chain set is not empty, select the node with the smallest number from the first train number chain set as the new third node; if the first train number chain set is empty, summarize the optimal paths to obtain the first initial solution.
[0233] In the embodiments of this application, steps S311 to S314, during the process of constructing a first initial solution based on the first train number chain set, firstly, the node with the smallest number in the first train number chain set is selected as the third node; then, a feasible path is randomly selected from all feasible paths of the third node as the optimal path; next, all feasible paths under the nodes contained in the optimal path are deleted from the first train number chain set; finally, if the first train number chain set is not empty, the node with the smallest number in the first train number chain set is selected as the new third node; if the first train number chain set is empty, all selected optimal paths are summarized to obtain the first initial solution, thus preparing the prerequisite for determining the subsequent optimal solution.
[0234] Please see Figure 11 In some embodiments, step S330 may include, but is not limited to, steps S331 to S337:
[0235] Step S331: Initialize the count value of the preset counter, and determine the value of the first objective function based on the first optimal solution and the static scheduling objective function;
[0236] Step S332: Construct the first neighborhood solution based on the first optimal solution;
[0237] Step S333: If the first neighborhood solution satisfies the preset resource conditions, the second objective function value is calculated based on the first neighborhood solution and the static scheduling objective function.
[0238] Step S334: Determine the acceptance probability of the first neighborhood solution based on the first objective function value and the second objective function value;
[0239] Step S335: Update the first optimal solution and the first objective function value according to the acceptance probability of the first neighborhood solution and the preset calculation judgment conditions;
[0240] Step S336: Increment the counter value by 1, and determine whether the counter value is not less than the preset iteration number threshold;
[0241] Step S337: If the counter count value is not less than the iteration number threshold, output the first optimal solution as the optimal solution at the current temperature; if the counter count value is less than the iteration number threshold, reconstruct the first neighborhood solution based on the first optimal solution.
[0242] In steps S331 to S337 of this embodiment, during the update and iteration process of the first optimal solution at the current temperature, a preset counter value is first initialized, and a first objective function value is determined based on the first optimal solution and the static scheduling objective function. Then, a first neighborhood solution is constructed based on the first optimal solution. Next, if the first neighborhood solution satisfies preset resource conditions, a second objective function value is calculated based on the first neighborhood solution and the static scheduling objective function. Then, the acceptance probability of the first neighborhood solution is determined based on the first and second objective function values. Next, the first optimal solution and the first objective function value are updated based on the acceptance probability of the first neighborhood solution and preset calculation judgment conditions. Then, the counter value is incremented by 1, and it is determined whether the counter value is not less than a preset iteration number threshold. Finally, if the counter value is not less than the iteration number threshold, the first optimal solution is output as the optimal solution at the current temperature. If the counter value is less than the iteration number threshold, the first neighborhood solution is reconstructed based on the first optimal solution.
[0243] It is worth noting that in the process of calculating and determining the first driving plan information, the first objective function can be determined according to different static scheduling strategies, and the driving plan can be guaranteed to meet the operational specifications according to the constraints in the first constraint term. Therefore, the bus scheduling method of this application embodiment can be applied to various application scenarios.
[0244] In determining the first objective function value, the initial objective function value is first calculated based on the first initial solution and the static scheduling objective function; then, the first required number of drivers, the first number of cross-line operation drivers, and the first required number of buses are calculated based on the first initial solution; finally, the first objective function value is calculated based on the first required number of drivers, the first number of cross-line operation drivers, the first required number of buses, and the static scheduling objective function, thus preparing the groundwork for determining the optimal solution in the future.
[0245] Please see Figure 12 In some embodiments, step S332 may include, but is not limited to, steps S3321 to S3326:
[0246] Step S3321: Select the first untraversed path from the first optimal solution and randomly generate the first random number;
[0247] Step S3322: If the first random number is less than the preset coefficient of variation, place the node corresponding to the first path in the preset node set, and randomly select an edge of the first path to place in the preset constraint set; if the first random number is not less than the preset coefficient of variation, place the first path in the preset path set.
[0248] Step S3323: In the case that all paths have been traversed in the first optimal solution, select the node with the smallest number from the preset node set as the fourth node.
[0249] Step S3324: Select a feasible path as the optimal path from all feasible paths starting from the fourth node, and ensure that all nodes of the optimal path are in a preset node set and all edges are not in the constraint set, and place the optimal path in the preset path set.
[0250] Step S3325: Delete the nodes contained in the optimal path from the preset node set;
[0251] Step S3326: If the preset node set is not empty, select the node with the smallest number from the node set as the new fourth node; if the node set is empty, use the preset path set as the first neighborhood solution.
[0252] In the process of constructing a first neighborhood solution based on a first optimal solution, as illustrated in steps S3321 to S3326 of this application embodiment, the following steps are performed: First, an untraversed first path is selected from the first optimal solution, and a first random number is randomly generated. Next, if the first random number is less than a preset coefficient of variation, the node corresponding to the first path is placed in a preset node set, and an edge of the first path is randomly selected and placed in a preset constraint set. If the first random number is not less than a preset coefficient of variation, the first path is placed in a preset path set. Then, if all paths in the first optimal solution have been traversed, the node with the smallest number is selected from the node set as the fourth node. Next, a feasible path is selected from all feasible paths of the fourth node as the optimal path, and all nodes of the optimal path are in the preset node set, and all edges are not in the constraint set. The optimal path is then placed in the preset path set. Next, the nodes contained in the optimal path are deleted from the preset node set. Finally, if the preset node set is not empty, the node with the smallest number is selected from the node set as the new fourth node. If the preset node set is empty, the preset path set is used as the first neighborhood solution.
[0253] Please see Figure 13 In some embodiments, step S333 may include, but is not limited to, steps S3331 to S3333:
[0254] Step S3331: Calculate the number of drivers assigned to the second task, the number of drivers operating the second cross-line, and the number of vehicles arranged based on the solution of the first neighborhood.
[0255] Step S3332: Determine the current required resource conditions based on the number of drivers assigned for the second task, the number of drivers for the second cross-line operation, and the number of vehicles arranged for the second task.
[0256] Step S3333: If the current required resource conditions meet the preset resource conditions, obtain the second objective function value by obtaining the objective function value of the first neighborhood solution according to the static scheduling objective function; if the current required resource conditions do not meet the preset resource conditions, reconstruct the first neighborhood solution according to the first optimal solution.
[0257] In the process of calculating the second objective function value, steps S3331 to S3333 of the embodiments of this application first calculate the required resource conditions based on the first neighborhood solution. The required resource conditions include the second required number of drivers, the second number of cross-line operation drivers, and the second required number of buses. Then, if the required resource conditions meet the preset resource conditions, the objective function value of the first neighborhood solution is obtained according to the static scheduling objective function to obtain the second objective function value. If the required resource conditions do not meet the preset resource conditions, the first neighborhood solution is reconstructed based on the first optimal solution.
[0258] It is worth noting that when the current required resource conditions meet the preset resource conditions, the objective function value of the first neighborhood solution will be obtained according to the static scheduling objective function to obtain the second objective function value; and when the current required resource conditions do not meet the preset resource conditions, the first neighborhood solution needs to be reconstructed according to the first optimal solution so that the first neighborhood solution can meet the current resource constraints.
[0259] Please see Figure 14 In some embodiments, step S335 may include, but is not limited to, steps S3351 to S3352:
[0260] Step S3351: Construct a random number and compare the random number with the acceptance probability of the first neighborhood;
[0261] Step S3352: If the random number is less than the acceptance probability of the first neighborhood, the solution of the first neighborhood is taken as the first optimal solution, and the second objective function value is taken as the first objective function value; if the random number is not less than the acceptance probability of the first neighborhood, the first optimal solution and the first objective function value are not updated.
[0262] In steps S3351 to S3352 of the embodiments of this application, during the process of updating the first optimal solution and the first objective function value according to the first new solution acceptance probability and the preset calculation judgment conditions, a random number is first constructed and compared with the first neighborhood acceptance probability; then, if the random number is less than the first neighborhood acceptance probability, the first neighborhood solution is taken as the first optimal solution and the second objective function value is taken as the first objective function value; if the random number is not less than the first neighborhood acceptance probability, the first optimal solution and the first objective function value are not updated.
[0263] Please see Figure 15 In some embodiments, the dynamic scheduling information includes a dynamic scheduling strategy and a dynamic scheduling objective function. The dynamic scheduling objective function is determined by the dynamic scheduling strategy, which is determined by abnormal disturbances, current resource conditions, and historical passenger flow information. Step S600 may include, but is not limited to, steps S610 to S630:
[0264] Step S610: Construct a second initial solution based on the second train number chain set;
[0265] Step S620: Use the current temperature as the initial temperature of the simulated annealing algorithm, and use the second initial solution as the second optimal solution at the initial temperature;
[0266] Step S630: Update the current temperature. When the current temperature equals the preset termination temperature, determine the second driving plan information based on the second optimal solution, the basic information of bus operation dynamics, historical passenger flow information, and dynamic scheduling information. When the current temperature is greater than the termination temperature, update and iterate the second optimal solution at the current temperature.
[0267] In steps S610 to S630 of the embodiments of this application, during the process of calculating and determining the second travel plan information, a second initial solution is first constructed based on the second train number chain set; then, the current temperature is used as the initial temperature of the simulated annealing algorithm, and the second initial solution is used as the second optimal solution under the initial temperature; finally, the current temperature is updated. When the current temperature is equal to a preset termination temperature, the second travel plan information is determined based on the second optimal solution, the basic dynamic information of public transport operation, the historical passenger flow information, and the dynamic scheduling information; when the current temperature is greater than the termination temperature, the second optimal solution is updated and iterated under the current temperature.
[0268] It is worth noting that the second optimal solution is updated based on the acceptance probability of the second neighborhood and the preset calculation judgment conditions, which ensures that the second optimal solution can meet the current resource constraints.
[0269] It should be noted that in the process of calculating and determining the second driving plan information, the second driving plan information can be determined based on the static basic information of bus operation, the dynamic scheduling strategy, and the updated second optimal solution. Among them, the dynamic scheduling strategy can be selected manually, and the dispatcher can adjust the dynamic scheduling strategy according to actual needs to adapt to various dynamic adjustment application scenarios, so that the bus scheduling method of this application embodiment can be more widely used and can be applied to various scheduling scenarios.
[0270] It is worth noting that the steps of constructing a second initial solution based on the second train chain set, determining the third objective function value based on the second initial solution and the dynamic scheduling objective function, constructing a second neighborhood solution based on the second optimal solution, calculating the fourth objective function value based on the second neighborhood solution and the dynamic scheduling objective function, and updating the second optimal solution based on the second neighborhood acceptance probability and the preset calculation judgment conditions are all similar to the specific steps in the static scheduling process. The only difference is that the execution objects are different, which will not be elaborated here.
[0271] For example, please refer to Figure 16 , Figure 16 The specific process for calculating and determining the first or second train schedule information is illustrated. The first train schedule information is obtained based on static scheduling, while the second train schedule information is obtained based on dynamic scheduling required when an anomaly occurs during the execution of the first train schedule information. This embodiment of the application also utilizes an annealing algorithm model, and the process can be as follows:
[0272] Step 1: Initialize the annealing algorithm model parameters. Initial temperature T, temperature decay value ΔT, and the threshold number of iterations N at the current temperature. T Minimum temperature value T min Current temperature T c , cooling coefficient μ, coefficient of variation of the solution θ;
[0273] Step 2: Construct the initial solution.
[0274] Step 2.1: Initialize the node set of the train schedule to be assigned: set_n = {v1, v2, v3, v4, ... v n}, the node is a directed graph G(V,E,P) generated from the set of feasible train routes. V ,P E All nodes of ).
[0275] Step 2.2: Select the node v with the smallest number from set_n. i ;
[0276] Step 2.3: At node v i set of all feasible paths i={route i,1 ,route i,2 ,....,route i,k In this process, a random strategy is used to select a path as the optimal path (route). i such as route i =route i,2 Find the optimal path and record it.
[0277] Step 2.4: Update set_n. That is, in set_n, delete the optimal path selected in step 2.3 (such as route). i,2 The nodes contained in )
[0278] Step 2.5: Determine if set_n is an empty set. If it is, proceed to step 2.6; otherwise, return to step 2.2.
[0279] Step 2.6: Summarize the optimal paths of each recorded node to obtain the initial solution p_1;
[0280] Step 3: Calculate the objective function value of the initial solution p_1.
[0281] Step 3.1: Calculate the objective function value tv_optimal of p_1 according to the objective function calculation formula configured in the static / dynamic scheduling interactive module;
[0282] Step 3.2: Calculate dr_size1, dr_line_s1, and v_size1 based on the initial solution p_1.
[0283] Each path represents a driver required to perform a task, and the number of paths is the number of drivers needed. The number of paths in the path set p_s is dr_size1, meaning that driving tasks have been assigned to dr_size1 drivers.
[0284] Group the bus routes into groups based on the bus route numbers that the route contains, count the number of routes in each group, and obtain the driver route statistics table dr_line_s1 that has crossed routes on the same day, as well as the number of vehicles arranged v_size1.
[0285] Step 3.3: Update the objective function value tv_optimal;
[0286] tv_optimal=tv_optimal×(1+Z1+Z2+Z3)
[0287]
[0288]
[0289]
[0290] Step 4: Initialize the optimal solution p_2 = p_1, and the counter count1 = 0;
[0291] Step 5: Counter count2 = 0;
[0292] Step 6: Construct the neighborhood solution p_neighb;
[0293] Step 6.1: Initialize the node set set_n, path set p_s, and constraint set C of the train schedule to be reassigned. S It is an empty set;
[0294] Step 6.2: Construct a set of nodes, set_n, for the train schedule to be reassigned using a random method;
[0295] Step 6.2.1: Select an untraversed path from p_2, randomly generate a random number between [0,1]. If the random number is less than the coefficient of variation θ, add the node corresponding to the path to set_n, and randomly select an edge from the path to add to the constraint set C. S If the path is not specified, then the path is added to the path set p_s.
[0296] Step 6.2.2: Determine whether all paths in p_2 have been traversed. If yes, proceed to step 6.3; otherwise, proceed to step 6.2.1.
[0297] Step 6.3: Select the node v with the smallest number from set_n. i ;
[0298] Step 6.4: At node v i set of all feasible paths i ={route i,1 ,route i,2 ,....,route i,k In this process, a random strategy is used to select a path as the optimal path (route). i And all edges in the optimal path are not in the constraint set C. S In, such as route i =route i,2 The optimal path is determined and placed into the set p_s.
[0299] Step 6.5: Update set_n. That is, in set_n, delete the optimal path selected in step 6.4 (such as route). i,2 The nodes contained in )
[0300] Step 6.6: Determine if set_n is an empty set. If it is, proceed to step 6.7; otherwise, return to step 6.3.
[0301] Step 6.7: Neighborhood solution p_neighb = p_s;
[0302] Step 6.8: Calculate dr_size1, dr_line_s1, and v_size1 based on the neighborhood solution p_neighb.
[0303] Each path represents a driver required to perform a task, and the number of paths is the number of drivers needed. The number of paths in the path set p_s is dr_size1, meaning that driving tasks have been assigned to dr_size1 drivers.
[0304] Group the bus routes into groups based on the bus route numbers that the route contains, count the number of routes in each group, and obtain the driver route statistics table dr_line_s1 that has crossed routes on the same day, as well as the number of vehicles arranged v_size1.
[0305] Step 6.9: Determine if the current solution meets the given resource requirements. If Z is greater than 0, proceed to step 6; otherwise, proceed to step 6.10.
[0306] Z = Z1 + Z2 + Z3
[0307]
[0308]
[0309]
[0310] Step 6.10: count2 = count2 + 1, proceed to step 7;
[0311] Step 7: Calculate the objective function value of the neighborhood solution p_neighb. Calculate the objective function value tv_neigh of p_neighb according to the objective function calculation formula configured in the static / dynamic scheduling interactive module;
[0312] Step 8: Calculate the probability ρ of accepting the new solution;
[0313]
[0314] Step 9: Determine whether to accept the new solution. Generate a random number π in the interval [0,1]. When π < ρ, update the optimal train schedule p_2 = p_neighb and tv_optimal = tv_neighb; otherwise, do not update p_2 and tv_optimal.
[0315] Step 10: Has the current temperature been reached? Number of iterations: count2 ≥ N T If yes, proceed to step 11; otherwise, proceed to step 6.
[0316] Step 11: Determine if the termination condition is met: T c ≤T min If so, output p_2 as the optimal train schedule and proceed to step 13; otherwise, proceed to step 12.
[0317] Step 12: count1 = count1 + 1, the current temperature decays according to the following formula, and then proceeds to step 5;
[0318]
[0319] Step 13: Associate the optimal train schedule p_2 with the driver and a specific train to obtain the daily static scheduling / current dynamic scheduling train schedule.
[0320] For static scheduling scenarios: based on the dr data in the static basic data acquisition module schedule v buS Requirements such as dr_bus, dr_line, and dr_line_s are used to associate each path in the optimal bus schedule p_2 with a specific driver and a specific bus to obtain the static dispatch schedule for the day;
[0321] For dynamic scheduling scenarios: based on the dr data in the static basic data acquisition module schedule v bus Based on requirements such as dr_bus, dr_line, and dr_line_s, as well as the current dynamic scheduling strategy, the current dynamic scheduling plan is obtained. Subsequently, the driving tasks can be assigned to the corresponding drivers for execution according to the generated static / dynamic scheduling plan.
[0322] The embodiments of this application are mainly applied to scenarios such as public transportation operation scheduling. By automatically generating and dynamically adjusting regional driving plans, the workload of manual scheduling and management can be significantly reduced. On the other hand, regionalized operation, while ensuring the level of operational service, can further improve the utilization rate of resources such as drivers and vehicles, and reduce operating costs.
[0323] Please see Figure 17 This application embodiment also provides a bus dispatching device 10, which can implement the above-described bus dispatching method. The device includes:
[0324] The first processing module 100 is used to acquire static basic information and static scheduling information of bus operation;
[0325] The second processing module 200 is used to determine the first bus route chain set based on the static basic information of bus operation and static scheduling information.
[0326] The third processing module 300 is used to calculate the first driving plan information based on the static basic information of bus operation, static scheduling information and the first train chain set; and to execute the driving plan based on the first driving plan information.
[0327] The fourth processing module 400 is used to obtain basic information on bus operation dynamics, historical passenger flow information, and dynamic dispatch information when an anomaly occurs during the execution of the driving plan based on the first driving plan information.
[0328] The fifth processing module 500 is used to determine the second bus route chain set based on the basic information of bus operation and dynamic scheduling information;
[0329] The sixth processing module 600 is used to calculate the second driving plan information based on the static basic information of bus operation, the dynamic basic information of bus operation, historical passenger flow information, dynamic scheduling information, and the second train number chain set; and to adjust and execute the driving plan according to the second driving plan information.
[0330] The specific implementation method of this bus dispatching device is basically the same as the specific implementation method of the bus dispatching method described above, and will not be repeated here.
[0331] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned bus dispatching method. This electronic device can be any smart terminal, including a tablet computer or an in-vehicle computer.
[0332] Please see Figure 18 , Figure 18 The hardware structure of an electronic device 700 according to another embodiment is illustrated. The electronic device 700 includes:
[0333] The processor 710 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0334] The memory 720 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 720 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 720 and is called and executed by the processor 710 using the bus dispatching method of the embodiments of this application.
[0335] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described bus dispatching method.
[0336] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0337] The bus dispatching method, device, electronic equipment, and storage medium provided in this application embodiment acquire static basic information and static dispatching information for bus operations; then determine a first set of bus routes based on the static basic information and static dispatching information; next, calculate a first driving plan based on the static basic information, static dispatching information, and the first set of bus routes; and execute the driving plan based on the first driving plan information. If an anomaly occurs during the execution of the driving plan based on the first driving plan information, acquire dynamic basic information, historical passenger flow information, and dynamic dispatching information for bus operations; then determine a second set of bus routes based on the dynamic basic information and dynamic dispatching information; finally, calculate a second driving plan based on the static basic information, dynamic basic information, historical passenger flow information, dynamic dispatching information, and the second set of bus routes; and adjust the execution of the driving plan based on the second driving plan information. Through the above technical solution, the automatic generation and dynamic adjustment of bus driving plans are achieved, avoiding reliance solely on the dispatcher's past experience, making the bus dispatching process more intelligent, improving vehicle utilization, and enhancing scheduling quality.
[0338] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0339] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0340] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0341] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0342] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification 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 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.
[0343] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0344] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0345] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0346] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0347] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it 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 all or part 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 multiple 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 of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0348] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A bus dispatching method, characterized in that, The method includes: Obtain basic static information and static dispatch information for public transportation operations; The first bus route chain set is determined based on the static basic information of bus operation and the static scheduling information; The first driving plan information is calculated based on the static basic information of bus operation, the static scheduling information, and the first vehicle chain set; and the driving plan is executed based on the first driving plan information. In the event of an anomaly during the execution of the driving plan based on the first driving plan information, obtain basic information on bus operation dynamics, historical passenger flow information, and dynamic dispatch information. The second bus route chain set is determined based on the aforementioned dynamic basic information on bus operation and the aforementioned dynamic scheduling information; The second driving plan information is calculated based on the static basic information of bus operation, the dynamic basic information of bus operation, the historical passenger flow information, the dynamic scheduling information, and the second vehicle chain set; and the driving plan is adjusted and executed based on the second driving plan information. The static basic information of bus operation includes a departure timetable, the static scheduling information includes a first constraint term, and the step of determining the first bus route chain set based on the static basic information of bus operation and the static scheduling information includes: A first directed graph is constructed based on the departure timetable, wherein the first directed graph includes a first set of nodes, and each node in the first set of nodes represents a trip; The first train number chain set is obtained by traversing each node in the first node set according to the first constraint term. The first constraint includes working time constraint information. The step of traversing each node in the first node set according to the first constraint to obtain the first train number chain set includes: Construct a first temporary node set based on the first node set; Select the node with the smallest number from the first temporary node set as the first node, and extract the attributes of the first node to obtain the attribute value of the first node, wherein the attribute value of the first node includes the departure time. The train schedule end time of the first node is determined based on the departure time and the working time constraint information; and a time interval is determined based on the departure time and the train schedule end time. A first subgraph is selected from the first directed graph based on the time interval; and nodes with an out-degree of zero or an in-degree of zero, except for the first node, are deleted from the first subgraph to obtain a first updated subgraph. The first updated subgraph is searched to obtain a first set of feasible paths starting from the first node; and the first set of feasible paths is updated according to the first constraint term. Delete the first node from the first temporary node set; If the first temporary node set is not empty, the node with the smallest number is reselected from the first temporary node set for traversal processing; if the first temporary node set is empty, the updated set of all first feasible paths is determined as the first train chain set. The dynamic basic information of bus operation includes information on executed driving tasks and information on currently executed driving tasks. The dynamic scheduling information includes departure times to be executed and a second constraint. Determining the second bus route chain set based on the dynamic basic information of bus operation and the dynamic scheduling information includes: A second directed graph is constructed based on the executed driving task information, the currently executed driving task information, and the departure time to be executed. The second directed graph includes a second set of nodes, and each node in the second set of nodes represents a trip. The second train number chain set is obtained by traversing each node in the second node set according to the second constraint.
2. The bus dispatching method according to claim 1, characterized in that, The second constraint includes working time constraint information. The step of traversing each node in the second node set according to the second constraint to obtain the second train number chain set includes: Construct a second temporary node set based on the second node set; Select the node with the smallest number from the second temporary node set as the second node, and extract the attributes of the second node to obtain the attribute values of the second node, wherein the attribute values of the second node include the departure time; The train chain end time of the second node is determined based on the departure time and the working duration constraint information; and a time interval is determined based on the departure time and the train chain end time. A second subgraph is selected from the second directed graph based on the time interval; and nodes with an out-degree of zero or an in-degree of zero, except for the second node, are deleted from the second subgraph to obtain the second updated subgraph. The second updated subgraph is searched to obtain a second set of feasible paths starting from the second node; and the second set of feasible paths is updated according to the second constraint term. Delete the second node from the second temporary node set; If the second temporary node set is not empty, select the node with the smallest number from the second temporary node set for traversal processing; if the second temporary node set is empty, determine the updated set of all second feasible paths as the second train chain set.
3. The bus dispatching method according to claim 1, characterized in that, The calculation of the first travel plan information based on the static basic information of bus operation, the static scheduling information, and the first vehicle chain set includes: Construct a first initial solution based on the first train number chain set; The current temperature is used as the initial temperature for the simulated annealing algorithm, and the first initial solution is used as the first optimal solution at the initial temperature. The current temperature is updated. When the current temperature is equal to the preset termination temperature, the first driving plan information is determined based on the first optimal solution, the static basic information of bus operation, and the static scheduling information. When the current temperature is greater than the termination temperature, the first optimal solution is updated and iterated at the current temperature.
4. The bus dispatching method according to claim 3, characterized in that, The construction of the first initial solution based on the first train number chain set includes: Select the node with the smallest number from the first train number chain set as the third node; Randomly select one feasible path from the set of all feasible paths of the third node as the optimal path; Delete all feasible paths under the nodes included in the optimal path from the first set of train routes; If the first train number chain set is not empty, select the node with the smallest number from the first train number chain set as the new third node; if the first train number chain set is empty, summarize the optimal paths to obtain the first initial solution.
5. The bus dispatching method according to claim 3, characterized in that, The static scheduling information includes a static scheduling strategy and a static scheduling objective function, wherein the static scheduling objective function is determined by the static scheduling strategy. The step of updating and iterating the first optimal solution at the current temperature includes: Initialize the count value of the preset counter, and determine the value of the first objective function based on the first optimal solution and the static scheduling objective function; Construct a first neighborhood solution based on the first optimal solution; If the first neighborhood solution satisfies the preset resource conditions, the second objective function value is calculated based on the first neighborhood solution and the static scheduling objective function. The acceptance probability of the first neighborhood solution is determined based on the first objective function value and the second objective function value. The first optimal solution and the first objective function value are updated based on the acceptance probability of the first neighborhood solution and the preset calculation judgment conditions. The counter value is incremented by 1, and it is determined whether the counter value is not less than a preset iteration number threshold. If the counter count is not less than the iteration number threshold, the first optimal solution is output as the optimal solution at the current temperature; if the counter count is less than the iteration number threshold, the first neighborhood solution is reconstructed based on the first optimal solution.
6. The bus dispatching method according to claim 5, characterized in that, The step of constructing a first neighborhood solution based on the first optimal solution includes: Select the first untraversed path from the first optimal solution, and randomly generate the first random number; If the first random number is less than a preset coefficient of variation, the node corresponding to the first path is placed in a preset node set, and an edge of the first path is randomly selected and placed in a preset constraint set; if the first random number is not less than a preset coefficient of variation, the first path is placed in a preset path set. In the case that all paths have been traversed in the first optimal solution, the node with the smallest number is selected from the preset set of nodes as the fourth node. Among all feasible paths starting from the fourth node, select one feasible path as the optimal path, and all nodes of the optimal path are in the preset node set, all edges are not in the constraint set, and place the optimal path in the preset path set. Delete the nodes contained in the optimal path from the preset set of nodes; If the preset set of nodes is not empty, the node with the smallest number is selected from the set of nodes as the new fourth node; if the set of nodes is empty, the preset set of paths is used as the first neighborhood solution.
7. The bus dispatching method according to claim 5, characterized in that, The step of calculating the second objective function value based on the first neighborhood solution and the static scheduling objective function when the first neighborhood solution satisfies the preset resource conditions includes: The number of drivers assigned to the second task, the number of drivers operating the second cross-line operation, and the number of vehicles arranged are calculated based on the solution of the first neighborhood. The required resource conditions are determined based on the number of drivers assigned to the second task, the number of drivers operating the second cross-line, and the number of vehicles arranged in the second task. If the current required resource conditions meet the preset resource conditions, the second objective function value is obtained by obtaining the objective function value of the first neighborhood solution according to the static scheduling objective function; if the current required resource conditions do not meet the preset resource conditions, the first neighborhood solution is reconstructed according to the first optimal solution.
8. The bus dispatching method according to claim 5, characterized in that, The step of updating the first optimal solution and the first objective function value based on the acceptance probability of the first neighborhood solution and preset calculation judgment conditions includes: Construct a random number and compare the random number with the acceptance probability of the first neighborhood solution; If the random number is less than the acceptance probability of the first neighborhood solution, the first neighborhood solution is taken as the first optimal solution, and the second objective function value is taken as the first objective function value; if the random number is not less than the acceptance probability of the first neighborhood solution, the first optimal solution and the first objective function value are not updated.
9. The bus dispatching method according to claim 1, characterized in that, The dynamic scheduling information includes a dynamic scheduling strategy and a dynamic scheduling objective function. The dynamic scheduling objective function is determined by the dynamic scheduling strategy. The step of calculating the second travel plan information based on the static basic information of bus operation, the dynamic basic information of bus operation, the historical passenger flow information, the dynamic scheduling information, and the second vehicle chain set includes: Construct a second initial solution based on the second train number chain set; The current temperature is used as the initial temperature for the simulated annealing algorithm, and the second initial solution is used as the second optimal solution at the initial temperature; The current temperature is updated. When the current temperature equals the preset termination temperature, the second driving plan information is determined based on the second optimal solution, the basic dynamic information of bus operation, the historical passenger flow information, and the dynamic scheduling information. When the current temperature is greater than the termination temperature, the second optimal solution is updated and iterated at the current temperature.
10. A bus dispatching device, characterized in that, The device includes: The first processing module is used to acquire static basic information and static scheduling information of bus operation; The second processing module is used to determine the first bus route chain set based on the static basic information of bus operation and the static scheduling information. The third processing module is used to calculate the first driving plan information based on the static basic information of bus operation, the static scheduling information and the first vehicle chain set; and to execute the driving plan based on the first driving plan information. The fourth processing module is used to obtain basic information on bus operation dynamics, historical passenger flow information, and dynamic dispatch information when an anomaly occurs during the execution of the driving plan based on the first driving plan information. The fifth processing module is used to determine the second bus route chain set based on the bus operation dynamic basic information and the dynamic scheduling information; The sixth processing module is used to calculate the second driving plan information based on the static basic information of bus operation, the dynamic basic information of bus operation, the historical passenger flow information, the dynamic scheduling information, and the second vehicle chain set; and to adjust and execute the driving plan according to the second driving plan information. The static basic information of bus operation includes a departure timetable, the static scheduling information includes a first constraint term, and the step of determining the first bus route chain set based on the static basic information of bus operation and the static scheduling information includes: A first directed graph is constructed based on the departure timetable, wherein the first directed graph includes a first set of nodes, and each node in the first set of nodes represents a trip; The first train number chain set is obtained by traversing each node in the first node set according to the first constraint term. The first constraint includes working time constraint information. The step of traversing each node in the first node set according to the first constraint to obtain the first train number chain set includes: Construct a first temporary node set based on the first node set; Select the node with the smallest number from the first temporary node set as the first node, and extract the attributes of the first node to obtain the attribute value of the first node, wherein the attribute value of the first node includes the departure time. The train schedule end time of the first node is determined based on the departure time and the working time constraint information; and a time interval is determined based on the departure time and the train schedule end time. A first subgraph is selected from the first directed graph based on the time interval; and nodes with an out-degree of zero or an in-degree of zero, except for the first node, are deleted from the first subgraph to obtain a first updated subgraph. The first updated subgraph is searched to obtain a first set of feasible paths starting from the first node; and the first set of feasible paths is updated according to the first constraint term. Delete the first node from the first temporary node set; If the first temporary node set is not empty, the node with the smallest number is reselected from the first temporary node set for traversal processing; if the first temporary node set is empty, the updated set of all first feasible paths is determined as the first train chain set. The dynamic basic information of bus operation includes information on executed driving tasks and information on currently executed driving tasks. The dynamic scheduling information includes departure times to be executed and a second constraint. Determining the second bus route chain set based on the dynamic basic information of bus operation and the dynamic scheduling information includes: A second directed graph is constructed based on the executed driving task information, the currently executed driving task information, and the departure time to be executed. The second directed graph includes a second set of nodes, and each node in the second set of nodes represents a trip. The second train number chain set is obtained by traversing each node in the second node set according to the second constraint.
11. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the bus dispatching method according to any one of claims 1 to 9.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the bus dispatching method according to any one of claims 1 to 9.