A bus schedule optimization method and program product under delay conditions
By analyzing historical bus driving data, predicting the bus running time between stations, and optimizing the driving schedule, the problem of accurate prediction of bus arrival time at each station in existing technologies is solved, and on-time prediction of each bus stop is achieved during the operation process, thus improving the quality of bus service.
Patent Information
- Application Number
- CN202411901615.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing bus schedule compilation system is unable to accurately predict the time when the bus will arrive at each stop, resulting in passengers being unable to accurately arrange their travel time, affecting the quality of bus service.
By analyzing historical bus driving data, the running time of buses between stations is predicted. Combined with the delayed bus prediction results, the driving schedule is optimized and the optimized bus departure and arrival times at each station are output.
It has achieved on-time prediction for every bus stop during operation, optimized the departure intervals, allowed passengers to take the bus on time, and improved the quality of bus service.
Smart Images

Figure CN119831096B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of public transportation and data processing, in particular to a method and program product for optimizing a public transportation schedule under delay conditions. Background Art
[0002] In recent years, the diversification of public transportation options (such as subways and shared bikes) and the increasing precision of passenger travel needs have necessitated bus companies developing more sophisticated and scientific driving plans based on passenger flow and road conditions. Unlike the closed-loop operation of subways, buses are susceptible to external factors such as weather, time of day, and road conditions, making it difficult to ensure punctuality (buses arrive at each stop on the route at a fixed time). This, in turn, hinders passengers from accurately scheduling their travel times and catching the bus on time.
[0003] Current bus scheduling systems typically only consider overall on-time travel—the total travel time from the first stop to the last—to calculate vehicle turnaround time. However, there is no effective method for accurately predicting the arrival time at each intermediate stop. Summary of the Invention
[0004] In order to overcome the above-mentioned defects in the prior art, the present invention provides a method for optimizing bus schedules under delay conditions, which minimizes the deviation between the planned schedule and the optimized schedule taking into account intermediate delays by predicting the time when the bus arrives at each stop.
[0005] To achieve the above object, the present invention adopts the following technical solutions, including:
[0006] A method for optimizing a public transportation schedule under a delay condition comprises the following steps:
[0007] S1, running time prediction: by analyzing the historical driving data of buses, the running time of each bus between stations is predicted to obtain the predicted running time of each bus between stations;
[0008] S2, Delayed Bus Prediction: Determine the predicted running time between stops for each bus. If the predicted running time between stops for a bus is greater than the maximum allowed travel time, the bus is recorded as a delayed bus, and the delayed start and end stations, as well as the delay start and end times, are obtained.
[0009] S3, comprehensively analyzing the running time prediction results and the delayed train prediction results, optimizes the driving schedule, and outputs the optimized driving schedule, that is, obtains the optimized departure time and arrival time of each bus at each station.
[0010] Preferably, in step S3,
[0011] The relevant parameters for optimization are as follows:
[0012] s represents the station number, s = 1, 2, ..., n;
[0013] tr represents the bus number, tr = 1, 2, ..., m; when tr is marked as delay, it means that the bus is delayed;
[0014] H min Indicates the minimum departure time interval;
[0015] H max Indicates the maximum departure time interval;
[0016] Dwell s Indicates the length of time the bus stops at each station;
[0017] Ot s Indicates the running time of the bus between each stop;
[0018] Delay_starttime indicates the delay start time;
[0019] Delay_endtime indicates the delay end time;
[0020] Delay_startstation indicates the delay start station;
[0021] Delay_endstation indicates the delay end station;
[0022] YD time Indicates the increased congestion duration of delayed trains in the congested area;
[0023] pd s,tr Indicates the planned departure time of train number tr at station s;
[0024] pa s,tr Indicates the planned arrival time of train number tr at station s;
[0025] The decision variables for optimization are as follows:
[0026] d s,tr Indicates the departure time of train number tr at station s;
[0027] a s,tr Indicates the arrival time of train number tr at station s;
[0028] The objective function of optimization is:
[0029]
[0030] The optimization constraints are:
[0031] d s,tr -a s,tr =Dwell s
[0032] H min ≤d 1,tr -d 1,tr-1 ≤H max
[0033] d s,tr -d s,tr-1 ≥10
[0034] min(Ot Delay_endstation )+YD time ≤a Delay_endstation,tr=delay -d Delay_startstation,tr=delay
[0035] a Delay_endstation,tr=delay -d Delay_startstation,tr=delay ≤max(Ot Delay_endstation )+YD time
[0036] min(Ot s )≤a s,tr=delay -d s-1,tr=delay ≤max(Ot s )
[0037] min(Ot s )≤a s,tr -d s-1,tr ≤max(Ot s ).
[0038] Preferably, the departure time and arrival time of each bus at each station are optimized and solved using the Gurobi solver to obtain an optimized driving schedule.
[0039] Preferably, in step S2, if the predicted running time of a bus from station i to station j is greater than the maximum allowed travel time max(Ot j ), then the train is recorded as a delayed train, station i is recorded as the start station of delay, the departure time of the train at station i is recorded as the start time of delay, station j is recorded as the end station of delay, and the arrival time of the train at station j is recorded as the end time of delay.
[0040] Preferably, in step S1, the actual running time of the current train from station i to station j on the operation day is t ij , according to the historical driving data analysis, obtain the historical average running time of the train from station i to station j under the same conditions And obtain the historical average running time of subsequent trains from station i to station j under the same conditions Calculate the predicted running time y of the subsequent train from station i to station j ij ,
[0041] Preferably, by analyzing the historical driving data of buses, the historical average running speed of different buses under different conditions (such as from station i to station j) is obtained. Then through the stance distance s ij Calculate the historical average running time from site i to site j
[0042] Preferably, the actual running time of the current train on the operation day is updated in real time, the inter-station predicted running time of the subsequent trains is updated in real time, and the predicted results of the delayed trains are updated in real time, so as to perform vehicle operation simulation in real time and output the optimized driving schedule in real time.
[0043] The present invention also provides a computer program product, which includes a computer program / instruction, and when the computer program / instruction is executed by a processor, it implements the above-mentioned method for optimizing a public transportation schedule under delay conditions.
[0044] The present invention also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed, the method for optimizing a public transportation schedule under a delay condition is implemented.
[0045] The advantages of the present invention are:
[0046] (1) The present invention provides a method for optimizing a bus schedule under delay conditions, which minimizes the deviation between the planned bus schedule and the optimized bus schedule taking into account the intermediate delay by predicting the time when the bus arrives at each station.
[0047] (2) Compared with the existing timetable optimization algorithm, the present invention realizes the on-time prediction of each bus stop during operation, optimizes its departure interval, allows passengers to take the bus on time, and improves the service quality of the bus.
[0048] (3) The optimized driving schedule is sent to passengers and drivers respectively, and drivers can obtain certain psychological expectations and driving plans based on the optimized driving schedule. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 The present invention is a flow chart of a method for optimizing a public transportation schedule under delay conditions.
[0050] Figure 2 This is a diagram of a real driving timetable.
[0051] Figure 3 This is a schematic diagram of the optimized driving timetable.
[0052] Figure 4 A schematic diagram comparing the actual driving timetable and the optimized driving timetable. DETAILED DESCRIPTION
[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0054] Example 1
[0055] Depend on Figure 1 As shown in Figure 1, a bus schedule optimization method under delay conditions includes running time prediction, delayed bus number prediction, and simulation solution. The specific steps are as follows:
[0056] S1, running time prediction.
[0057] By analyzing the historical driving data of buses, we can get the historical average running speed of different buses (equivalent to different times) from station i to station j under different conditions (such as different dates and different weather conditions). Then through the stance distance s ij Calculate the historical average running time from site i to site j
[0058] The actual running time of the current train from station i to station j on the operation day is t ij , according to the historical driving data, obtain the historical average running time of the train from station i to station j under the same conditions And obtain the historical average running time of subsequent trains from station i to station j under the same conditions Calculate the predicted running time y of the subsequent train from station i to station j ij ,
[0059] S2, delayed train prediction.
[0060] The predicted running time y of the subsequent train from station i to station j is ij , and the maximum allowed travel time between the stations (i.e., from station i to station j) max(Ot j ) for comparison, if the predicted running time y ij Greater than the maximum allowed travel time max(Otj ), then the train number is recorded as a delayed train number, station i is recorded as the delay start station, the departure time of the train number at station i is recorded as the delay start time, station j is recorded as the delay end station, and the arrival time of the train number at station j is recorded as the delay end time;
[0061] S3, simulation solution.
[0062] The vehicle operation simulation is carried out based on the running time prediction results and the delayed train prediction results, and the optimized driving timetable is output, that is, the optimized departure time and arrival time of each bus at each station are obtained.
[0063] 1. Define the optimization parameters as follows:
[0064] s represents the station number, s = 1, 2, ..., n;
[0065] tr represents the bus number, tr = 1, 2, ..., m; when tr is marked as delay, it means that the bus is delayed;
[0066] H min Indicates the minimum departure time interval;
[0067] H max Indicates the maximum departure time interval;
[0068] Dwell s Indicates the length of time the bus stops at each station;
[0069] Ot s Indicates the running time of the bus between each stop;
[0070] Delay_starttime indicates the delay start time;
[0071] Delay_endtime indicates the delay end time;
[0072] Delay_startstation indicates the delay start station;
[0073] Delay_endstation indicates the delay end station;
[0074] YD time Indicates the increased congestion duration of delayed trains in the congested area;
[0075] pd s,tr Indicates the planned departure time of train number tr at station s;
[0076] pa s,tr Indicates the planned arrival time of train number tr at station s.
[0077] 2. Define the decision variables for optimization as follows:
[0078] d s,tr Indicates the departure time of train number tr at station s;
[0079] a s,tr Indicates the arrival time of train number tr at station s.
[0080] 3. Define the optimization objective function as:
[0081]
[0082] 4. Define the optimization constraints as:
[0083] (1) The departure time minus the arrival time of each bus at each stop equals the stay time:
[0084] d s,tr -a s,tr =Dwell s
[0085] Among them, the difference between the arrival time of the bus at the last stop and the departure time at the first stop is the return time.
[0086] (2) The time interval between buses of each bus number at the first stop should be greater than or equal to the minimum time interval and less than or equal to the maximum time interval:
[0087] H min ≤d 1,tr -d 1,tr-1 ≤H max
[0088] (3) The departure time of each bus at each stop should ensure that the previous bus leaves at least 10 seconds later than the next bus:
[0089] d s,tr -d s,tr-1 ≥10
[0090] (4) The arrival time of the delayed train at the delayed end station minus the departure time of the delayed train at the delayed start station must be greater than or equal to the minimum allowed travel time between stations plus the excess congestion duration, and less than or equal to the maximum allowed travel time between stations plus the excess congestion duration:
[0091] min(Ot Delay_endstation )+YD time ≤a Delay_endstation,tr=delay -d Delay_startstation,tr=delay
[0092] ≤max(Ot Delay_endstation )+YDtime
[0093] (5) The travel time of the delayed train at other non-congested stations must be greater than or equal to the minimum allowed travel time between the stations and less than or equal to the maximum allowed travel time between the stations:
[0094] min(Ot s )≤a s,tr=delay -d s-1,tr=delay ≤max(Ot s )
[0095] Alternatively, the inter-station travel time before the delayed station is directly equal to the planned inter-station running time, and the inter-station travel time after the delayed station satisfies the above constraints.
[0096] (5) The travel time between stations of a non-delayed train must be greater than or equal to the minimum allowed travel time between the stations and less than or equal to the maximum allowed travel time between the stations:
[0097] min(Ot s )≤a s,tr -d s-1,tr ≤max(Ot s )
[0098] Or, it is directly equal to the planned inter-station running time, i.e., a s,tr -d s-1,tr =pa s,tr -pd s-1,tr .
[0099] In this embodiment, the Gurobi solver is used to optimize the timetable and obtain the optimized driving timetable. Figure 2 This is a schematic diagram of the actual driving timetable (the first 5 vehicles on the up route); Figure 3 This is a schematic diagram of the optimized driving schedule; Figure 4 This is a comparison diagram of the actual driving schedule and the optimized driving schedule. The optimized driving schedule can be sent to passengers and drivers respectively, and drivers can use it to obtain certain psychological expectations and driving plans.
[0100] The present invention updates the predicted inter-station running time of subsequent trains in real time according to the actual running time of the current train on the operation day, and updates the predicted results of delayed trains in real time, thereby performing vehicle operation simulation in real time and outputting the optimized driving schedule in real time.
[0101] This paper proposes a method for optimizing bus schedules under delay conditions. By predicting bus arrival times at each stop, it minimizes the deviation between the planned schedule and an optimized schedule that accounts for delays. Compared to existing schedule optimization algorithms, this method achieves on-time prediction for every stop during bus operation, optimizes departure intervals, and allows passengers to board buses on time, improving the quality of bus service.
[0102] Example 2
[0103] In addition to the above method, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the decision-making behavior decision-making method according to various embodiments of the present application described in the above embodiment 1 of this specification.
[0104] The computer program product may be written in any combination of one or more programming languages to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0105] Example 3
[0106] An embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, causes the processor to execute the steps of the decision-making behavior decision-making method according to various embodiments of the present application described in the above-mentioned embodiment 1.
[0107] The computer-readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0108] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for optimizing a public transportation schedule under delay conditions, characterized in that: The following steps are involved: S1, running time prediction: by analyzing the historical driving data of buses, the running time of each bus between stations is predicted to obtain the predicted running time of each bus between stations; S2, Delayed Bus Prediction: Determine the predicted running time between stops for each bus. If the predicted running time between stops for a bus is greater than the maximum allowed travel time, the bus is recorded as a delayed bus, and the delayed start and end stations, as well as the delay start and end times, are obtained. S3, combining the running time prediction results and the delayed bus number prediction results, optimizes the driving schedule, and outputs the optimized driving schedule, that is, obtains the optimized departure and arrival times of each bus number at each station; In step S3, The relevant parameters for optimization are as follows: s represents the station number, s = 1, 2, ..., n; tr represents the bus number, tr = 1, 2, ..., m; when tr is marked as delay, it means that the bus is delayed; H min Indicates the minimum departure time interval; H max Indicates the maximum departure time interval; Dwell s Indicates the length of time the bus stops at each station; Ot s Indicates the running time of the bus between each stop; Delay_starttime indicates the delay start time; Delay_endtime indicates the delay end time; Delay_startstation indicates the delay start station; Delay_endstation indicates the delay end station; YD time Indicates the increased congestion duration of delayed trains in the congested area; pd s,tr Indicates the planned departure time of train number tr at station s; pa s,tr Indicates the planned arrival time of train number tr at station s; The decision variables for optimization are as follows: d s,tr Indicates the departure time of train number tr at station s; a s,tr Indicates the arrival time of train number tr at station s; The objective function of optimization is: The optimization constraints are: d s,tr -a s,tr =Dwell s H min ≤d 1,tr -d 1,tr-1 ≤H max d s,tr -d s,tr-1 ≥10 min(From Delay_endstation )+YD time ≤a Delay_endstation,tr=delay -d Delay_startstation,tr=delay a Delay_endstation,tr=delay -d Delay_startstation,tr=delay ≤max(Ot Delay_endstation )+YD time min(From s )≤a s,tr=delay -d s-1,tr=delay ≤max(Ot s ) min(From s )≤a s,tr -d s-1,tr ≤max(Ot s )。 2. The method for optimizing a public transportation schedule under delay conditions according to claim 1, characterized in that: The Gurobi solver is used to optimize the departure and arrival times of buses at various stations to obtain the optimized bus schedule.
3. The method for optimizing a public transportation schedule under delay conditions according to claim 1, characterized in that: In step S2, if the predicted travel time of a bus from station i to station j is greater than the maximum allowed travel time max(Ot j ), then the train is recorded as a delayed train, station i is recorded as the start station of delay, the departure time of the train at station i is recorded as the start time of delay, station j is recorded as the end station of delay, and the arrival time of the train at station j is recorded as the end time of delay.
4. The method for optimizing a public transportation schedule under delay conditions according to claim 1, characterized in that: In step S1, the actual running time of the current train from station i to station j on the operation day is t ij , according to the historical driving data analysis, obtain the historical average running time of the train from station i to station j under the same conditions And obtain the historical average running time of subsequent trains from station i to station j under the same conditions Calculate the predicted running time y of the subsequent train from station i to station j ij , 5. The method for optimizing a public transportation schedule under delay conditions according to claim 4, characterized in that: By analyzing the historical driving data of buses, the historical average running speed of different buses from station i to station j under different conditions is obtained. Then through the stance distance s ij Calculate the historical average running time from site i to site j 6. The method for optimizing a public transportation schedule under delay conditions according to claim 4, characterized in that: Based on the actual running time of the current train on the day of operation, the predicted inter-station running time of subsequent trains is updated in real time, and the predicted results of delayed trains are updated in real time, so as to conduct real-time vehicle operation simulation and output the optimized driving schedule in real time.
7. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements a method for optimizing a public transportation schedule under delay conditions as described in any one of claims 1-6.
8. A readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, a method for optimizing a public transportation schedule under delay conditions as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Dynamic-correction-based real-time bus arrival time predicting method
CN103440768A
Connection bus timetable adjusting method for dealing with railway delay
CN115186901A