Bus visualization scheduling method and system based on bus passenger flow and turnover time
By combining spatiotemporal network optimization algorithms and regular expression parsing of non-standardized files, a bus timetable is generated and visualized, solving the problem of low compilation efficiency in existing technologies. This enables dynamic adjustment and intuitive evaluation of bus timetables, thereby improving the efficiency of bus operation scheduling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TONGJI UNIV
- Filing Date
- 2023-01-31
- Publication Date
- 2026-07-24
AI Technical Summary
The existing methods for compiling bus timetables rely on manual experience, making dynamic adjustments difficult, resulting in low compilation efficiency and an inability to meet the needs of complex bus operations.
A visual scheduling method based on bus passenger flow and turnaround time is adopted, which combines spatiotemporal network optimization algorithm and non-standardized file parsing of regular expressions to generate timetables and conduct comprehensive evaluation. The timetables are then visualized through Gantt charts, allowing dispatchers to make adjustments.
It enables dynamic adjustment of timetables, improves compilation efficiency, meets dispatchers' needs for intuitive understanding and real-time evaluation of timetables, and optimizes bus operation scheduling.
Smart Images

Figure CN116307486B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic operation scheduling, and in particular to a visual bus scheduling method and system based on bus passenger flow and turnaround time. Background Technology
[0002] Public transportation systems are a core pillar of urban development. In recent years, with the improvement of people's economic living standards, travel demand has been increasing, and the requirements for the quality of transportation services have been continuously rising, specifically in terms of the rationality of bus timetables and passenger comfort. The key to improving the quality of public transportation services and the proportion of public transportation trips lies in the optimization of bus operation and scheduling, and the bus timetable is the main manifestation of this optimization. The bus timetable is the core plan that directs the transportation production of enterprises, stipulating the production organization procedures for vehicles and drivers. Timetable compilation requires consideration of various factors such as vehicles, personnel, routes, stations, labor rules, and scheduling models, while simultaneously finding a balance between controlling operating costs and providing high-quality service.
[0003] Currently, bus timetable scheduling mainly relies on manual experience to repeatedly adjust corresponding time nodes and manually calculate modified departure intervals and evaluation indicators to obtain timetables that meet business needs. This method is not flexible enough, cannot proactively adapt to changes in operating conditions, and is difficult to dynamically adjust according to actual circumstances. Furthermore, the process is not intuitive and cannot provide real-time feedback on the evaluation indicators of the adjusted timetables, resulting in low efficiency in bus timetable creation. On the other hand, timetables generated solely using model optimization algorithms cannot meet the complex needs of public transportation operations. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a visual bus scheduling method and system based on bus passenger flow and turnaround time.
[0005] The objective of this invention can be achieved through the following technical solutions:
[0006] A visual bus scheduling method based on bus passenger flow and turnaround time includes the following steps:
[0007] S1. Verify the rationality and feasibility of the relevant parameters, and use the parameters that pass the verification as input parameters;
[0008] S2. Generate timetables by parsing non-standardized files based on spatiotemporal network optimization algorithms or regular expressions;
[0009] S3. Obtain basic information data of the timetable and display the departure time, travel time and road sign number of all services in the timetable, i.e., Gantt chart visualization;
[0010] S4. Calculate the evaluation indicators for road signs and service schedules in the timetable and make a comprehensive evaluation of the generated timetable. If it meets the actual needs, then end; if it does not meet the actual needs, proceed to step S5.
[0011] S5. Change the input parameters in the timetable or select scene automatic optimization, adjust the timetable and repeat steps S3 and S4.
[0012] Furthermore, the relevant parameters in step S1 include the number of vehicles at the main and auxiliary stations, departure interval, operating time, first and last bus times, historical data time, and road sign number. The rationality of the input parameters is to detect missing and incorrect data, and the feasibility of the input parameters is to verify whether the data can generate an initial timetable.
[0013] Furthermore, the non-standardized file parsing based on regular expressions includes splitting holiday and weekday timetables, obtaining the main and secondary timetable stations, obtaining the departure time of each bus, parsing the operating time of each bus, and numbering the road sign serial numbers of different buses.
[0014] Furthermore, the step S2 of generating the timetable based on the spatiotemporal network optimization algorithm specifically includes:
[0015] S21. Based on the spatiotemporal network, two actual stations and a virtual dining station are set up in space, and the time connection between the actual shift, the virtual shifts to and from get off work and the dining shift is set up in time.
[0016] S22. Based on step S1, with the goal of minimizing the number of vehicles, establish an integer linear programming model under the constraints of traffic balance, different driver shift work time limits, meal limits, timetable limits, and shift pair limits.
[0017] S23. Pre-set network parameters, calculate the GAP value, and determine whether the GAP value is reasonable or whether the number of iterations has been reached to end the solution; otherwise, continue to reset the parameters for the next iteration.
[0018] Furthermore, the GAP refers to the percentage difference between the theoretical solution and the actual solution of the integer linear programming model:
[0019]
[0020] Where bestbound is the theoretically solved function value, and bestteger is the integer solved function value.
[0021] Furthermore, the comprehensive evaluation of the timetable in step S4 includes checking the rest time between timetable shifts, checking the working time of the same road sign, checking the ratio of trips to rest at the same road sign, and checking the time interval between shifts, calculating the minimum number of vehicles required for the timetable, and recording the operation log.
[0022] Furthermore, the road sign evaluation indicators in step S4 include the ratio of working hours to rest days, working hours, and daily mileage, calculated as follows:
[0023] The rest-time ratio is the ratio of the sum of rest times for all shifts to the sum of travel times for all shifts.
[0024]
[0025] in, Let i be the rest time for the i-th shift. Let C be the travel time for the i-th trip. shift Total number of train services;
[0026] The working hours for each road sign are the time from the driver's arrival to their departure. In addition to the shift travel time and rest time, it also includes the time for the driver to report in advance, vehicle refueling and maintenance, the time to eat, and the long rest time between shifts.
[0027]
[0028] in, Let i be the working time of the i-th road sign. Let i be the time of the j-th departure from the i-th road sign. For the time of arrival at the i-th road sign for the j-th time, we need to subtract the meal time, which is 30 minutes.
[0029] Daily mileage refers to the number of kilometers traveled daily by the vehicles transporting the road signs.
[0030]
[0031] in This represents the total number of outbound trains. The length represents the total number of outbound trains. u The length represents the distance in kilometers for the uplink route. d This refers to the distance in kilometers for the downlink route.
[0032] Furthermore, the evaluation indicators for shifts in step S4 include the departure interval, turnaround time, and rest time of the shifts.
[0033] Furthermore, step S5 specifically includes:
[0034] S51. Select the moving bus schedule with the mouse to adjust the departure time and the corresponding road sign.
[0035] S52. Change the input parameters to change the departure time or route number of the corresponding bus;
[0036] S53. Select different scene options to adjust the timetable based on the spatiotemporal network optimization algorithm;
[0037] S54. Record user operation logs for rollback.
[0038] Furthermore, the aforementioned bus visualization scheduling system based on bus passenger flow and turnaround time includes a backend data feasibility verification module, a timetable generation module, a timetable adjustment module, a timetable indicator evaluation module, a timetable file processing module, and a frontend data input interface, a timetable data and adjustment interface, and a timetable data evaluation interface.
[0039] The feasibility analysis of generating a timetable from the input parameters is divided into basic data verification and data rationality verification. Basic data verification is to check for missing or incorrect data, while data rationality verification is to check whether the data can generate an initial timetable.
[0040] The timetable generation module is divided into two categories: non-standardized file parsing based on regular expressions and generation using optimization algorithms based on spatiotemporal networks.
[0041] The timetable adjustment module, after obtaining the basic information modification parameters of the timetable, readjusts the timetable, including both manual adjustment and adjustment for specific scenarios, and modifies the corresponding timetable file.
[0042] The timetable indicator evaluation module obtains timetable data information from the timetable file and calculates the comprehensive evaluation of the timetable, road sign evaluation, and service frequency evaluation.
[0043] The data input interface is the interface for scheduling input to generate timetable parameters and adjust constraints;
[0044] The timetable data and adjustment interface is a timetable Gantt chart in the form of a horizontal axis representing time and a vertical axis representing road signs. It allows dispatchers to use a mouse, input data, and select a page for automatic optimization of specific scenarios.
[0045] The timetable data evaluation interface mainly uses a web front-end to visualize the timetable evaluation data.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] 1. This invention generates timetables by combining spatiotemporal network optimization algorithms and regular expressions to parse non-standardized files. When dispatchers adjust corresponding shifts, they only need to input the relevant data. The timetable adjustment module can dynamically adjust the timetable according to changes in actual operating conditions, thereby helping to optimize repetitive operations in the timetable compilation process and improving the efficiency of timetable compilation.
[0048] 2. This invention displays the timetable in the form of a Gantt chart on a coordinate axis with road sign number on the vertical axis and time on the horizontal axis, summarizes the comprehensive evaluation of the timetable in text form, and displays the evaluation indicators of road signs and shifts to dispatchers through a timetable data evaluation interface, which can effectively meet the dispatchers' needs for intuitive understanding of the timetable.
[0049] 3. When the dispatcher adjusts the timetable shifts, the timetable indicator evaluation module of this invention obtains timetable data information from the timetable file, calculates the comprehensive evaluation, road sign evaluation, and shift evaluation of the timetable, and verifies the feasibility of the timetable; at the same time, the evaluation indicators change in real time according to the dispatcher's adjustments, which can help the dispatcher understand the changes of various timetable indicators during use and determine the next adjustment direction. Attached Figure Description
[0050] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0051] Figure 2 This is a schematic diagram illustrating the detailed user process of the auxiliary scheduling system in an embodiment of the present invention;
[0052] Figure 3 This is a schematic diagram of the timetable basic data input interface in an embodiment of the present invention;
[0053] Figure 4 This is a schematic diagram of the basic data input error feedback prompt interface in an embodiment of the present invention;
[0054] Figure 5(a) is a schematic diagram of the unstructured original timetable 1 in an embodiment of the present invention;
[0055] Figure 5(b) is a schematic diagram of the unstructured original timetable 2 in an embodiment of the present invention;
[0056] Figure 6 This is a schematic diagram of a non-standardized file parsing process based on regular expressions in an embodiment of the present invention;
[0057] Figure 7 This is a schematic diagram of the spatiotemporal network model in an embodiment of the present invention;
[0058] Figure 8 This is a flowchart of the local search solution method in an embodiment of the present invention;
[0059] Figure 9 This is a schematic diagram of the timetable visualization interface in an embodiment of the present invention;
[0060] Figure 10 This is a schematic diagram of the comprehensive evaluation of the timetable in an embodiment of the present invention;
[0061] Figure 11This is a schematic diagram illustrating the evaluation of timetables, road signs, and service schedules in an embodiment of the present invention.
[0062] Figure 12(a) is a time diagram before the timetable mouse is adjusted in an embodiment of the present invention;
[0063] Figure 12(b) is a schematic diagram of the time after the timetable mouse is adjusted in an embodiment of the present invention;
[0064] Figure 13(a) is a schematic diagram of the shift schedule before the timetable mouse is adjusted in an embodiment of the present invention;
[0065] Figure 13(b) is a schematic diagram of the train schedule after the timetable mouse is adjusted in an embodiment of the present invention;
[0066] Figure 14(a) is a schematic diagram of the timetable input data before adjustment in an embodiment of the present invention;
[0067] Figure 14(b) is a schematic diagram of the timetable input data after adjustment in an embodiment of the present invention;
[0068] Figure 15(a) shows the original time representation in an embodiment of the present invention;
[0069] Figure 15(b) is a schematic diagram of the optimization results of the timetable in the scenario of optimizing the number of vehicles in the embodiment of the present invention;
[0070] Figure 15(c) is a schematic diagram of the optimization results of the timetable in the scenario of optimizing the number of vehicles and balancing the workload in the embodiment of the present invention;
[0071] Figure 15(d) is a schematic diagram comparing the optimization results of the timetable in the embodiment of the present invention under the scenarios of fixed number of vehicles and balanced workload;
[0072] Figure 16 This is a schematic diagram of the backend database logical relationship design in an embodiment of the present invention;
[0073] Figure 17(a) is a schematic diagram of the timetable before adjustment in an embodiment of the present invention;
[0074] Figure 17(b) is a schematic diagram of the timetable adjustment in an embodiment of the present invention. Detailed Implementation
[0075] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0076] like Figure 1 As shown, a visual bus scheduling method based on bus passenger flow and turnaround time includes the following steps:
[0077] S1. Verify the rationality and feasibility of the relevant parameters, and use the parameters that pass the verification as input parameters;
[0078] S2. Generate timetables by parsing non-standardized files based on spatiotemporal network optimization algorithms or regular expressions;
[0079] S3. Obtain basic information data of the timetable and display the departure time, travel time and road sign number of all services in the timetable, i.e., Gantt chart visualization;
[0080] S4. Calculate the evaluation indicators for road signs and service schedules in the timetable and make a comprehensive evaluation of the generated timetable. If it meets the actual needs, then end; if it does not meet the actual needs, proceed to step S5.
[0081] S5. Change the input parameters in the timetable or select scene automatic optimization, adjust the timetable and repeat steps S3 and S4.
[0082] The relevant parameters in step S1 include the number of vehicles at the main and auxiliary stations, departure interval, operating time, first and last bus times, historical data time, and road sign number. The rationality of the input parameters is to detect missing and incorrect data, and the feasibility of the input parameters is to verify whether the data can generate an initial timetable.
[0083] Non-standardized file parsing based on regular expressions includes splitting holiday and weekday timetables, obtaining the main and secondary timetable stations, getting the departure time of each bus, parsing the operating time of each bus, and numbering the road sign serial numbers of different buses.
[0084] Step S2, which generates the timetable based on the spatiotemporal network optimization algorithm, specifically includes:
[0085] S21. Based on the spatiotemporal network, two actual stations and a virtual dining station are set up in space, and the time connection between the actual shift, the virtual shifts to and from get off work and the dining shift is set up in time.
[0086] S22. Based on step S1, with the goal of minimizing the number of vehicles, establish an integer linear programming model under the constraints of traffic balance, different driver shift work time limits, meal limits, timetable limits, and shift pair limits.
[0087] S23. Pre-set network parameters, calculate the GAP value, and determine whether the GAP value is reasonable or whether the number of iterations has been reached to end the solution; otherwise, continue to reset the parameters for the next iteration.
[0088] GAP refers to the percentage difference between the theoretical solution and the actual solution of an integer linear programming model.
[0089]
[0090] Where bestbound is the theoretically solved function value, and bestteger is the integer solved function value.
[0091] The comprehensive evaluation of the timetable in step S4 includes checking the rest time between timetable shifts, checking the working time of the same road sign, checking the ratio of trips to rest at the same road sign, and checking the time interval between shifts. It also calculates the minimum number of vehicles required for the timetable and records the operation log.
[0092] In step S4, the evaluation indicators for road signs include the ratio of driving to rest days, working hours, and daily mileage, calculated as follows:
[0093] The rest-time ratio is the ratio of the sum of rest times for all shifts to the sum of travel times for all shifts.
[0094]
[0095] in, Let i be the rest time for the i-th shift. Let C be the travel time for the i-th trip. shift Total number of train services;
[0096] The working hours for each road sign are the time from the driver's arrival to their departure. In addition to the shift travel time and rest time, it also includes the time for the driver to report in advance, vehicle refueling and maintenance, the time to eat, and the long rest time between shifts.
[0097]
[0098] in, Let i be the working time of the i-th road sign. Let i be the time of the j-th departure from the i-th road sign. For the time of arrival at the i-th road sign for the j-th time, we need to subtract the meal time, which is 30 minutes.
[0099] Daily mileage refers to the number of kilometers traveled daily by the vehicles transporting the road signs.
[0100]
[0101] in This represents the total number of outbound trains. The total number of outbound trains, length u The length represents the distance in kilometers for the uplink route. d This refers to the distance in kilometers for the downlink route.
[0102] The evaluation indicators for shifts in step S4 include the departure interval, turnaround time, and rest time of each shift.
[0103] Step S5 specifically includes:
[0104] S51. Select the moving bus schedule with the mouse to adjust the departure time and the corresponding road sign.
[0105] S52. Change the input parameters to change the departure time or route number of the corresponding bus;
[0106] S53. Select different scene options to adjust the timetable based on the spatiotemporal network optimization algorithm;
[0107] S54. Record user operation logs for rollback.
[0108] A public transport visual scheduling system based on public transport passenger flow and turnaround time includes a backend data feasibility verification module, a timetable generation module, a timetable adjustment module, a timetable indicator evaluation module, a timetable file processing module, and a frontend data input interface, a timetable data and adjustment interface, and a timetable data evaluation interface.
[0109] The feasibility analysis of generating a timetable from input parameters is divided into basic data verification and data rationality verification. Basic data verification is to check for missing or incorrect data, while data rationality verification is to check whether the data can generate an initial timetable.
[0110] The timetable generation module is divided into two categories: non-standardized file parsing based on regular expressions and generation using optimized algorithms based on spatiotemporal networks.
[0111] The timetable adjustment module readjusts the timetable after obtaining the basic information and modification parameters, including both manual adjustment and adjustment for specific scenarios, and modifies the corresponding timetable file.
[0112] The timetable indicator evaluation module obtains timetable data information from the timetable file and calculates the comprehensive evaluation of the timetable, road sign evaluation, and service frequency evaluation.
[0113] The data input interface is used to generate timetable parameters and adjust constraints.
[0114] The timetable data and adjustment interface is a timetable Gantt chart format with time on the horizontal axis and road signs on the vertical axis. It allows dispatchers to use a mouse, input data, and select specific scenarios for automatic optimization.
[0115] The timetable data evaluation interface mainly uses a web front-end to visualize the timetable evaluation data.
[0116] A public transport visual auxiliary scheduling system based on operating time and turnaround time, wherein the detailed user process of the auxiliary scheduling system is as follows: Figure 2 As shown, it includes the following steps:
[0117] S1: The dispatcher inputs parameters, verifies the rationality and feasibility of the input parameters, and provides feedback to the dispatcher.
[0118] In this embodiment, the basic parameters of the timetable include: number of road signs, number of starting parking lots, number of ending parking lots, prescribed departure interval, prescribed travel time, operating time of starting parking lots, operating time of ending parking lots, and selection of historical passenger flow data. The input interface for the basic timetable parameters is as follows: Figure 3 As shown, the data is passed from the front end to the back end logic function for data rationality and feasibility verification.
[0119] S11: The rationality of input parameters is checked for missing or incorrect data, while the feasibility of input parameters checks whether the data can generate an initial timetable. The basic parameter input error feedback interface is as follows: Figure 4 As shown;
[0120] S2: The timetable optimization algorithm automatically generates an initial timetable based on the input parameters;
[0121] In this embodiment, the timetable optimization algorithm generation is divided into two methods: non-standardized file parsing based on regular expressions or optimization algorithm generation based on spatiotemporal networks.
[0122] Non-standardized file parsing based on regular expressions refers to parsing existing unstructured data timetables, such as the "Anhong Line Timetable" shown in Figures 5(a) and 5(b). These timetables consist of a weekday timetable (upper half) and a holiday timetable (lower half) on the same page. Each timetable includes basic information, and the operating time is listed after each actual service, while the cell after non-operating services is empty. Therefore, "implementation date" can be used as a keyword to separate weekday and holiday timetables. "Check-in" and "entry" can be used as keywords to define the data range. The first and last stops, "An" and "Hong," are obtained by extracting the data from the column following the "Check-in" row. The departure time of the corresponding service in the even-numbered column is extracted based on its presence or absence. The operating time of the service is obtained from the values in the even-numbered columns. The route number and service sequence are obtained from the columns. This process yields the basic data of the timetable. The parsing process is as follows: Figure 6 As shown.
[0123] The optimization algorithm based on spatiotemporal networks refers to the process of constructing vehicle timetable operation scheduling based on a time-network model. Spatially, three nodes are set (representing two actual stations and a virtual dining station). Temporally, the service cycle is converted into timestamps with certain time intervals as possible time nodes. A schematic diagram of the spatiotemporal network is shown below. Figure 7As shown. The types of connecting lines include: the connection between the starting point and the ending point signifies the actual shifts; the connection between the starting point or the ending point and the virtual node signifies meal times; and the outflow from the starting point or the ending point signifies commuting.
[0124] An integer linear programming model is established based on the spatiotemporal network, with minimizing the bus fleet size as the objective function:
[0125]
[0126] Constraints 1 and 2 represent the flow balance constraints of the nodes; constraints 3, 4, and 5 represent the working time constraints of drivers in different work modes; constraints 6, 7, and 8 represent the constraints of drivers' lunch time; constraint 9 represents the constraints of drivers' commuting to and from get off work; constraints 10 and 11 represent the constraints of each shift being executed by one driver.
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136]
[0137]
[0138] The symbol settings are explained below:
[0139]
[0140]
[0141]
[0142] In the algorithm's solution process, a local search algorithm is designed to effectively target the network parameters. First, some decision variables in the model are randomly fixed, and a sub-model is constructed to solve for the other unfixed variables. Then, the solved variables are updated to the network values. Next, some variables are randomly fixed again to solve for a new sub-model. This local search iterative process is repeated until a convergent solution is obtained or a predetermined maximum number of iterations is reached. The algorithm's solution process is as follows: Figure 8 As shown.
[0143] The parameters of the spatiotemporal network optimization algorithm are set as follows: operating cost r is 1 yuan / minute, fixed cost p per vehicle is 100 yuan / (day*vehicle), driver's working time is 300-450 minutes for both shifts and 540-840 minutes for normal shifts, meal time is 10:30-13:30, and meal time is 15-25 minutes.
[0144] S3: Displays the timetable in the form of a Gantt chart;
[0145] S31: Obtain basic information about the timetable from the timetable generation algorithm;
[0146] S32: Use Ajax to pass the data to the front end, and use the Canvas component to visualize the data using a Gantt chart with the horizontal axis representing time periods and the vertical axis representing road signs. This will display the departure time, travel time, and road sign number of all services in the timetable.
[0147] S33: Hovering the mouse over the shift displays basic information about the shift;
[0148] The basic information of the bus schedule includes the departure time, the up and down route, the corresponding road sign number, and the operating hours of the route.
[0149] A visualized timetable refers to a system built using the Django framework to handle data transfer between the front-end and back-end. The back-end calculates and provides the data, which is then passed to the front-end via AJAX. The front-end uses JavaScript's basic Canvas and Div libraries to visualize the timetable as a Gantt chart. The timetable visualization interface looks like this: Figure 9 As shown.
[0150] S4: Evaluation metrics for visualizing the timetable output;
[0151] S41: Calculate the evaluation indicators for road signs and service schedules in the generated timetable;
[0152] S42: Visualize the results of the evaluation indicators;
[0153] S43: Make a comprehensive evaluation of the generated timetable based on the evaluation index results of the timetable.
[0154] The overall evaluation of the above timetable is as follows:
[0155] 1. Verify the rest time between shifts in the timetable, including the rest time for shifts of different modes, and the rest time + empty run + rest time for shifts of the same mode;
[0156] 2. Verify the working hours of the same road signs in the timetable, including the working hours of drivers who work one day on and one day off, which are 9 to 14 hours, and the working hours of drivers who work five days on and two days off, which are 7 to 9 hours.
[0157] 3. Check the ratio of service to rest stop for the same road sign in the timetable, and issue a warning for road signs with a service to rest stop ratio of less than 0.2;
[0158] 4. Check the departure intervals of the buses in the timetable and issue a warning for departure intervals exceeding 45 minutes;
[0159] 5. Theoretical minimum number of vehicles and historical operation logs.
[0160] A schematic diagram of the comprehensive evaluation of the timetable is shown below. Figure 10 As shown, the selected timetable evaluation indicators include road sign evaluation and service frequency evaluation, which have a positive effect on timetable compilation. Based on Echarts, the timetable road sign and service frequency evaluation diagrams are displayed on the web front-end. Figure 11 As shown.
[0161] Road sign evaluations include:
[0162] 1. The rest-time ratio is the ratio of the sum of rest times for all shifts to the sum of travel times for all shifts:
[0163]
[0164] in This refers to the rest time for the i-th shift. This refers to the travel time of the i-th train, C. shift This refers to the total number of train services;
[0165] 2. Road sign working hours refer to the time from the arrival to the departure of each driver. This includes the shift travel time, shift rest time, and time for driver pre-reporting, vehicle refueling and maintenance, etc. The 30-minute meal break and the long rest period between shifts need to be subtracted. The calculation formula is as follows:
[0166]
[0167] in This is the working time of the i-th road sign. It is the time of the j-th departure from the i-th road sign. This refers to the time when the i-th road sign arrives for the j-th time;
[0168] 3. Daily vehicle mileage is the number of kilometers traveled daily by vehicles transporting various road signs. The calculation formula is as follows:
[0169]
[0170] in This refers to the total number of upbound trains. This refers to the total number of outbound trains, length u This refers to the length of the uplink route. d This refers to the distance in kilometers for the downlink route;
[0171] 4. Evaluation of service schedules includes departure intervals, turnaround time, and rest time.
[0172] S5: The dispatcher adjusts the timetable by dragging the mouse or entering data, and records the operation log for rollback; specific steps S5 include:
[0173] S51: The mouse selects and moves the bus schedule by capturing the mouse position through events such as OnMouseMove and OnMouseUp to adjust the departure time of the bus schedule by moving it left and right, and adjusts the corresponding road sign by moving it up and down. The adjusted data is then passed to the backend, as shown in Figures 12(a) and 12(b), and Figures 13(a) and 13(b).
[0174] S52: Users can change the departure time or road sign number of the corresponding bus by inputting data, transmit the changed data to the backend, and change the LEFT and TOP coordinate pixel values of the corresponding bus on the frontend, as shown in Figure 14(a) and Figure 14(b).
[0175] S53: Users can select specific scenarios to automatically optimize timetables; the comparison diagrams of timetable optimization results for different scenarios are shown in Figures 15(a), 15(b), 15(c) and 15(d);
[0176] S54: Record user operation logs for rollback purposes.
[0177] The logic for users to adjust shift data includes:
[0178] 1. While adjusting departure times, the operating hours of each bus will be changed in segments according to the turnaround time of the route;
[0179] 2. Adjustments to the number of road signs in the adjustment logic can be made by dragging the shift number to the outside of the vertical axis to add more;
[0180] 3. If the number of trips on a certain intermediate road sign is 0 during the adjustment process, then delete that road sign.
[0181] The automatic optimization scenarios for timetable adjustments include:
[0182] 1. Optimize the minimum number of vehicles required.
[0183] L=M
[0184] 2. Optimize the minimum number of vehicles and balance the working time of road signs.
[0185] L=φ(W u -W l )+M
[0186] 3. Optimize minimum number of vehicles and reduce rest time.
[0187] L=M+φ*∑(T i +T j )
[0188] 4. Balance the workload of road signs
[0189] L=φ(W u -W l )
[0190] 5. Optimize the minimum number of vehicles assigned and reduce the rest time for drivers at their assistant stations.
[0191] L=M+φ*maxT l
[0192] Where M represents the number of vehicles, W u W represents the maximum working time of the road sign. l T represents the minimum working time for a road sign. i T represents the deputy station's rest time. j This indicates the main station's rest time.
[0193] The automatic optimization algorithm includes constraints, objective function, and solution process:
[0194] 1. The algorithm input is the basic information of the timetable to be optimized, and the algorithm output is the basic information of the optimized timetable.
[0195] 2. The constraint settings are divided into inviolable hard constraints and flexible soft constraints. Hard constraints include driver commute station constraints, shift pair constraints, vehicle constraints, and first and last bus time constraints. Soft constraints may include driver meal time constraints and constraints determined according to the optimization scenario. The constraints are the same as those in step S2 for the integer programming model based on the spatiotemporal network. The optimization algorithm model is programmed using Pyomo in Python.
[0196] 3. The objective function is determined based on the selected automatic optimization scenario adjusted according to the timetable. The model solver calls the CPLEX solver, tries different model error GAP values, and outputs the solution corresponding to the smallest GAP value as the optimal solution.
[0197] User operation logs are stored in corresponding tables in MySQL using Django's ORM model. The backend database logical relationship design is as follows: Figure 16 As shown.
[0198] S6: The timetable evaluation indicators are automatically updated while the timetable is adjusted until a timetable that meets business needs is adjusted; the dynamic evaluation diagram of the timetable adjustment process is shown in Figure 17(a) and Figure 17(b).
[0199] In this example, the scheduler's operations are mainly performed on a cloud server-based front-end platform. Through interaction with the back-end algorithm and front-end visualization, timetables can be generated more quickly and the changes in indicators for timetable adjustments can be understood. Comprehensive evaluation suggestions are provided to help the scheduler rearrange the timetable.
[0200] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A visual bus scheduling method based on bus passenger flow and turnaround time, characterized in that, Includes the following steps: S1. Verify the rationality and feasibility of the relevant parameters, and use the parameters that pass the verification as input parameters; The relevant parameters include the number of vehicles at the main and auxiliary stations, departure intervals, operating hours, first and last bus times, historical data times, and road sign numbers. The rationality of the input parameters is to detect missing and incorrect data, and the feasibility of the input parameters is to verify whether the data can generate an initial timetable. S2. Timetable generation based on spatiotemporal network optimization algorithm; The timetable generation based on the spatiotemporal network optimization algorithm specifically includes: S21. Based on the spatiotemporal network, two actual stations and a virtual dining station are set up in space, and the time connection between the actual shift, the virtual shifts to and from get off work and the dining shift is set up in time. S22. Based on step S1, with the goal of minimizing the number of vehicles, establish an integer linear programming model under the constraints of traffic balance, different driver shift work time limits, meal limits, timetable limits, and shift pair limits. S23. Pre-set network parameters, calculate the GAP value, and determine whether the GAP value is reasonable or whether the number of iterations has been reached to end the solution; otherwise, continue to reset the parameters and perform the next iteration. The method of generating timetables based on the spatiotemporal network optimization algorithm specifically involves constructing a vehicle timetable operation and scheduling process according to a time network model. Spatially, three nodes are set, representing two actual stations and a virtual dining station. Temporally, service cycles are converted into timestamps with certain time intervals to serve as possible time nodes. An integer linear programming model is established based on the spatiotemporal network, with minimizing the bus fleet size set as the objective function. Set the flow balancing constraints for the nodes as follows: The constraints on the working hours of drivers in different work modes are set as follows: The constraints on drivers' lunch break time are set as follows: The constraints for drivers commuting to and from get off work are set as follows: The constraint that each shift is executed by one driver is set as follows: in, For site collection, The main station is where the first and last trains depart. As a secondary station, For virtual dining stations, A set of nodes in a spatiotemporal network. For vehicle assembly, For the possible set of time, For shift operation type, This is the normal driver mode for commuting to work. This is a driver mode with two shifts. For a set of virtual shift schedules, A collection of spatiotemporal connections. For the actual set of operating shifts, For the collection of rest time, A set of timetables joined together. For node indexing, , For the index of the possible time set, Index for vehicles and drivers, For indexes of the running type, Identify the node To the node From timestamps to timestamp The spatiotemporal arc index, if This refers to the actual number of shifts in operation. ,if This refers to rest time. , An index for a timetable join, representing the departure time of one vehicle and the departure time of another. The next consecutive departure time for the buses at the terminal station. , For operating costs, For the fixed cost per vehicle per day, For the interval between two consecutive possible times, To minimize the time interval between meals, for p Minimum and maximum working time thresholds for the driver-mode operation. For the fastest and latest meal times, For binary decision variables, represents the choice of covariate variables. Indicates that vehicle k originates from node move From timestamps arrive ,otherwise ,if This indicates the vehicle. At the node Waiting from timestamp arrive ); For binary decision variables, representing the choice of timetable connections, Indicates time From the terminal Departure, and the next departure will take place on time. Depart from the station, otherwise, ; As a binary decision variable, it indicates the choice of operation type. Indicates driver type ,otherwise, ; For the driver's working hours, This is for the driver's mealtime; S3. Obtain basic information data of the timetable and display the departure time, travel time and road sign number of all services in the timetable, i.e., Gantt chart visualization; S4. Calculate the evaluation indicators for road signs and service schedules in the timetable and make a comprehensive evaluation of the generated timetable. If it meets the actual needs, then end; if it does not meet the actual needs, proceed to step S5. S5. Change the input parameters in the timetable or select scene automatic optimization, adjust the timetable and repeat steps S3 and S4.
2. The public transport visual scheduling method based on public transport passenger flow and turnaround time according to claim 1, characterized in that, The GAP refers to the percentage difference between the theoretical solution and the actual solution of an integer linear programming model. in, The function value obtained from the theoretical solution. The function value to be solved for integers.
3. The public transport visual scheduling method based on public transport passenger flow and turnaround time according to claim 1, characterized in that, The comprehensive evaluation of the timetable in step S4 includes checking the rest time between timetable shifts, checking the working time of the same road sign, checking the ratio of trips to rest at the same road sign, and checking the time interval between shifts. It also calculates the minimum number of vehicles required for the timetable and records the operation log.
4. The public transport visual scheduling method based on public transport passenger flow and turnaround time according to claim 1, characterized in that, The road sign evaluation indicators in step S4 include the ratio of working hours to rest days, working hours, and daily mileage, calculated as follows: The rest-time ratio is the ratio of the sum of rest times for all shifts to the sum of travel times for all shifts. in, For the first The rest time for each shift, For the first The travel time for each flight Total number of train services; The working hours for each road sign refer to the time from the driver's arrival to their departure. This includes the shift travel time, shift rest time, driver's early arrival time, vehicle refueling and maintenance time, time to deduct for meals, and long rest periods between shifts. in, For the first The working hours for each road sign For the first The first road sign The time of the next departure. For the first The first road sign The arrival time needs to be reduced by 30 minutes for lunch; Daily mileage refers to the number of kilometers traveled daily by the vehicles transporting the road signs. in This represents the total number of outbound trains. This represents the total number of outbound train services. This refers to the distance in kilometers for the uplink route. This refers to the distance in kilometers for the downlink route.
5. The public transport visual scheduling method based on public transport passenger flow and turnaround time according to claim 1, characterized in that, The evaluation indicators for shifts in step S4 include the departure interval, turnaround time, and rest time of each shift.
6. The public transport visual scheduling method based on public transport passenger flow and turnaround time according to claim 1, characterized in that, Step S5 specifically includes: S51. Select the moving bus schedule with the mouse to adjust the departure time and the corresponding road sign. S52. Change the input parameters to change the departure time or route number of the corresponding bus; S53. Select different scene options to adjust the timetable based on the spatiotemporal network optimization algorithm; S54. Record user operation logs for rollback.
7. A public transport visual scheduling system based on public transport passenger flow and turnaround time, applying the public transport passenger flow and turnaround time visual scheduling method as described in claim 1, characterized in that, This includes backend data feasibility verification, timetable generation module, timetable adjustment module, timetable indicator evaluation module, timetable file processing, and frontend data input interface, timetable data and adjustment interface, and timetable data evaluation interface. The data feasibility test is divided into basic data test and data rationality test; Basic data validation checks for missing or incorrect data, while data validity checks whether the data can be used to generate an initial timetable. The timetable generation module generates timetables based on an optimization algorithm for spatiotemporal networks; The timetable adjustment module, after obtaining the basic information modification parameters of the timetable, readjusts the timetable, including both manual adjustment and adjustment for specific scenarios, and modifies the corresponding timetable file. The timetable indicator evaluation module obtains timetable data information from the timetable file and calculates the comprehensive evaluation of the timetable, road sign evaluation, and service frequency evaluation. The data input interface is the interface for scheduling input to generate timetable parameters and adjust constraints; The timetable data and adjustment interface is a timetable Gantt chart in which time is displayed on the horizontal axis and road signs are displayed on the vertical axis. It allows dispatchers to use a mouse, input data, and select a page for automatic optimization of specific scenarios. The timetable data evaluation interface mainly uses a web front-end to visualize the timetable evaluation data.
Citation Information
Patent Citations
CN109544901A
CN112001560A