Bus timetable generation method based on travel time and passenger flow probability prediction
Through a method based on trip time and passenger flow probability prediction, combined with sparse multi-objective optimization algorithm, the problems of complexity and multi-objective optimization in bus schedule formulation are solved, and efficient operation and intelligent management of the bus system are achieved.
Patent Information
- Application Number
- CN202411435608.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing bus schedule formulation methods are difficult to cope with the randomness of itinerary and passenger flow, resulting in low operational efficiency, and difficult to solve the problem of model complexity and dimensionality disasters, which cannot effectively deal with multi-objective optimization and future adaptability.
Using a method based on trip time and passenger flow probability prediction, the long-term probability joint prediction model and super-large-scale random multi-objective hybrid integer planning model are designed, combined with sparse multi-objective optimization algorithm, quickly solve the bus schedule, considering multi-line, multi-model and Two-way scheduling and other scenarios, optimize targets such as passenger capacity and waiting time.
It improves the operation efficiency of the bus system, reduces passenger waiting time and operating costs, enhances the intelligence level of the system, adapts to complex traffic environments, and improves the value of data utilization and service quality.
Smart Images

Figure CN119323413A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of bus timetable customization, and in particular to a bus timetable generation method based on travel time and passenger flow probability prediction. Background Art
[0002] Urban public transportation systems constitute the cornerstone of urban infrastructure. They not only have a profound impact on citizens' daily travel experience, but are also an important force in promoting the healthy development of urban economies. With the acceleration of urbanization, the rapid increase in urban population density and the surge in the number of private cars, building an efficient, economical and environmentally friendly urban public transportation system has become a key solution to alleviate urban traffic pressure. In the operation and maintenance of this complex system, compiling a scientific and reasonable bus timetable is the top priority to ensure high-quality and efficient public transportation services and control operating costs.
[0003] Beijing Public Transport Group currently still uses a semi-automated dispatching mode for bus schedule formulation, which relies heavily on dispatchers to adjust parameters based on their rich experience and use spreadsheets to complete the schedule. This process is not only time-consuming and labor-intensive, but also places extremely high demands on the dispatchers' familiarity with the routes. The formulated timetable is likely to be unable to cope with the dynamic changes in future road conditions and passenger demand, resulting in a decrease in the execution efficiency of the operation plan. Beijing's intelligent bus system uses IC cards and vehicle positioning technology to automatically collect passenger flow and arrival time information. Travel time and passenger flow are key parameters in the process of bus schedule formulation. The data accumulated by Beijing Public Transport Company contains rich historical information and future trends, but the potential of these data has not yet been fully explored and utilized.
[0004] In the field of bus timetable formulation, many variables and factors are intertwined and work together to improve the quality of public transportation services, making it an extremely challenging optimization task. At present, most studies have adopted assumptions and simplifications to deal with the complexity of the model, making the generated bus timetable impossible to actually apply. Its complexity is specifically reflected in five aspects: 1) The parameters of the bus timetable problem are difficult to determine. Travel time and passenger flow are the key input parameters of this problem, but they have significant randomness, making it difficult to calculate key intermediate variables such as vehicle arrival time, passenger capacity, and passenger waiting time. In this regard, many literatures have proposed different assumptions and simplified methods; 2) The bus timetable problem is a large-scale optimization problem. This problem has multiple dimensions, such as routes, time, vehicles, stations, passengers, etc. The scale of the established model also faces the problem of dimensionality disaster, which leads to the problem. It is difficult to solve, and many studies only use short-term data for simulation experiments; 3) The bus timetable problem is a multi-objective optimization problem, which must not only meet the passengers' demand for riding and improve the service quality, but also reduce the operating costs of the bus company as much as possible; 4) The bus timetable problem has many application scenarios and limitations. In order to reduce the complexity of modeling, many studies have simplified some key factors and constraints in the modeling process to varying degrees, such as vehicle capacity restrictions and vehicle quantity restrictions; 5) The bus timetable problem is an optimization of the past. Many studies only use numerical experiments or historical data for optimization, and cannot verify the adaptability of the generated timetable in future bus operations.
[0005] Therefore, how to provide a bus schedule generation method based on travel time and passenger flow probability prediction is a problem that technicians in this field need to solve urgently. Summary of the invention
[0006] One purpose of the present invention is to propose a bus schedule generation method based on travel time and passenger flow probability prediction. The present invention can input irregular raw data into a prediction model by designing a paradigm for processing travel time and passenger flow data, and then perform long-term probability joint prediction, and further input the prediction result processing into an optimization model; then, by constructing a super-large-scale random multi-objective mixed integer programming model, application scenarios such as multiple line types, multiple vehicle types and their two-way scheduling are considered, model restrictions such as passenger capacity and number of vehicles are considered, and optimization objectives such as passenger waiting time and departure times are considered, so that the solved model is closer to the actual application scenario; finally, by designing a constraint-priority sparse multi-objective optimization algorithm (CPS-NSGA-III), introducing an adaptive population initialization method, a constraint priority mechanism and a sparse mutation operator, such a constrained super-large-scale multi-objective optimization problem can be solved quickly and effectively.
[0007] The method for generating a bus schedule based on travel time and passenger flow probability prediction according to an embodiment of the present invention comprises the following steps:
[0008] S1. Collect data through GPS devices and passenger flow counters installed on buses, including bus travel time and passenger flow data;
[0009] S2, preprocessing the data, including denoising, missing value filling and data standardization, to obtain an original data set with irregular random time intervals;
[0010] S3, using a resampling function to resample the original data set with a suitable resampling granularity to obtain a resampled data set in an input format accepted by the prediction model in the next step;
[0011] S4, constructing and training a long-term probability joint prediction model for travel time and passenger flow, performing a long-term probability joint prediction on the resampled data set, and obtaining a predicted resampled data set;
[0012] S5, using a filling function to fill the predicted resampled data set to obtain a predicted data set in an input format accepted by the optimization model;
[0013] S6, using a selection function to select the predicted data set to obtain a predicted data set with the same time point as the original data set, for evaluating the optimal resampling granularity in S3;
[0014] S7. Construct a large-scale random multi-objective mixed integer programming model, taking into account application scenarios such as multiple line types, multiple vehicle types and their two-way scheduling, model constraints such as passenger capacity and number of vehicles, and optimization objectives such as passenger waiting time and departure times, so that the solved model can be actually applied;
[0015] S8, inputting the prediction data set in the input format accepted by the optimization model at the optimal resampling granularity confirmed in S6 into the ultra-large-scale stochastic multi-objective mixed integer programming model;
[0016] S9. Design a sparse multi-objective optimization algorithm for constrained optimization, introduce an adaptive population initialization method, a constraint priority mechanism and a sparse mutation operator, and solve the ultra-large-scale random multi-objective mixed integer programming model. This can solve the problem quickly and effectively and generate a bus schedule.
[0017] The S2 specifically includes:
[0018] Define the original dataset:
[0019]
[0020] Among them, y(ti ) indicates that at time point t i The observation values of the original data under, the observation values of all time points constitute an original data set I.
[0021] The S3 specifically includes:
[0022] S31. Define the resampled data set:
[0023]
[0024] in, Indicates the time point of resampling The observations under, the observations at all time points constitute an original data set J.
[0025] S32. Resample the original data set to obtain a resampled data set:
[0026]
[0027] Among them, F is the resampling function, f is the basic aggregation function, O j is the set of original data falling within the resampling interval, that is, for the set O j The original data in is calculated by the basic aggregation function f to obtain the resampled data ΔT is the resampling granularity, is the resampling interval, and the initial resampling time point is set to the departure time of the first bus:
[0028] Optionally, the S4 specifically includes:
[0029] S41. Define the long-term probability joint prediction problem of travel time and passenger flow: Get the resampled data set from time point arrive The number of passengers boarding the qth station Number of people getting off the bus And the travel time series from the qth station to the next station and covariate X q , predict a specific type of data at T time points in the future The probability distribution of is:
[0030]
[0031] Among them, the time series is the data used for training, and the time series thereafter represents the part that needs to be predicted, T is the number of predicted data, and its time span is the same as the length of the future schedule to be generated;
[0032] S42. Calculate the likelihood function to obtain the probability distribution of the specific type of data:
[0033]
[0034] in, Represents all types of data given and covariate X q When a certain type of data probability.
[0035] S43, train the model using deep learning architecture;
[0036] S44. Use the trained model to make predictions and obtain the predicted resampled data set:
[0037]
[0038] in, Represents the time point of resampling The predicted values at all time points constitute a predicted resampled data set
[0039] The S5 specifically includes:
[0040] S51. Define the prediction data set in the input format accepted by the optimization model:
[0041]
[0042] in, Represents the time point t at which the model is optimized k The predicted values under ′ and the predicted values at all time points constitute a prediction data set K.
[0043] S52, filling the predicted resampled data set into the optimized model time point:
[0044]
[0045]
[0046] Where g is the basic filling function, P k It is a set of adjacent predicted resampled data sandwiched on both sides of the predicted data in the input format accepted by a certain optimization model, that is, for the set P k The predicted resampled data in the prediction is calculated by the basic filling function g to obtain the predicted value at the optimized model time point is the resampled data of the adjacent predictions, It is the interval of adjacent predicted resampled data time points, that is, the resampling interval.
[0047] Optionally, the S6 specifically includes:
[0048] S61, the original data set at time point t a Divide into training set and test set
[0049] S62, resample the training set and test set of the original data set using different resampling granularities to obtain a training set of the resampled data set and test set Among them, b ΛT is the resampled data distance division time point t a The index of the most recent time point. Different resampling granularities will result in different index values.
[0050] S63, training, predicting and filling according to the steps S4 and S5 to obtain a prediction data set in an input format accepted by the optimization model:
[0051] S64. Define a predicted data set with the same time point as the original data set
[0052] S65, in set K test Select a set from
[0053]
[0054]
[0055] Among them, H is the selection function, h is the basic selection function, Q i It is the set of predicted data in the input format accepted by the optimization model that falls within the adjacent original data interval, that is, for the set Q i The prediction data in the input format accepted by the optimization model in the example is calculated by the basic selection function h to obtain the prediction value at the original time point. [t i ,t i+1 ) represents the adjacent raw data interval. For the last raw data, the set Q i is the set of prediction data in the input format accepted by all subsequent optimization models;
[0056] S66. Use the evaluation function to compare the prediction performance under different resampling granularities.
[0057] Optionally, the S7 specifically includes:
[0058] S71. Define the bus schedule problem, specifically including a bus route in direction k on the future day d, with a number of bus stations M k (The number of bus stops in different directions may be different), and the set of vehicle models S running on the line, subdividing the operating time into several minimum decision time intervals Δt, and deciding whether to start the bus at each minimum decision time interval. The goal is to find a departure plan that can achieve satisfactory results on a series of indicators f; The following table defines the meaning of the bus schedule problem index, set, parameter, and variable:
[0059] Table 1 Symbols and meanings of bus timetable problem
[0060]
[0061]
[0062] S72: Define decision variables, decision variables is a 0-1 variable, means that the bus of type s with index i is dispatched at time t in direction k on day d, otherwise,
[0063]
[0064] S73: Calculate the total waiting time at the station; when the bus with index i is sent in the k direction on the dth day and arrives at the jth station, the total waiting time of the bus at the jth station is the next time from the previous bus to the jth station From the beginning to the moment when the bus arrives at the jth station, the sum of the waiting time of all passengers arriving at the jth station. The earlier the passengers arrive at the station, the longer the waiting time:
[0065]
[0066] in, It indicates the time when the bus with index i is dispatched in direction k on day d and arrives at station j. It means the next time when the bus with index i-1 is dispatched in direction k on day d and arrives at station j. The calculated time range is from time The time from the beginning to the time when the current vehicle arrives at this station End, for the first train, the starting time is 0, = represents the waiting time of passengers arriving at the bus station at time t on the dth day. The earlier the passengers arrive at the station, the longer the waiting time. S74: Calculate the passenger capacity of the bus; the passenger capacity of the bus with index i sent in the k direction on the dth day and arriving at the jth station is the sum of the changes in the number of passengers getting on and off at all previous stations:
[0067]
[0068] in, It represents the change in the number of passengers in the k direction at the j station at a certain time t on the d day. It means the next time when the bus with index i-1 is dispatched in direction k on day d and arrives at station j. The calculated time range is from time The time from the beginning to the time when the current vehicle arrives at this station For the first bus, the starting time is 0. Finally, the cumulative sum of the previous stations at the jth station can be calculated to get the passenger capacity of the bus at the jth station.
[0069] S75: Calculate the passenger base of buses. Different models have different passenger bases. This base reflects the change in the number of people in the bus as the bus level increases. It can be expressed as the ratio of the maximum passenger capacity of different models of buses to the number of levels:
[0070]
[0071] Among them, bn s represents the number of passengers on the s-type bus, and NCL is the number of vehicle passenger levels that are set. After calculating the number of passengers on the bus, the passenger level can be calculated:
[0072]
[0073] in, represents the level of passengers of the bus with index i that leaves the k-th direction on the d-th day when it arrives at (or leaves) the j-th station; It represents the number of passengers on the bus with index i sent in direction k on day d. The mathematical expression is:
[0074]
[0075] S76: Calculate the bus congestion: When the number of passengers on the bus reaches a certain level, the vehicle will become crowded. The number of passengers at this time is called the congestion threshold.
[0076]
[0077] in, represents the degree of congestion felt by passengers when the bus with index i is sent in direction k on day d at (or leaves) the jth station, and CT is the congestion threshold;
[0078] S77: Calculate the degree of waste of bus capacity; for the degree of waste of bus capacity, when the number of passengers in the bus's maximum cross-section is less than a certain level, we believe that the vehicle has wasted its capacity. The number of passengers at this time is called the capacity threshold. The degree of waste of bus capacity can be expressed as:
[0079]
[0080] in, represents the degree of capacity waste of the bus with index i sent in direction k on day d, It represents the number level corresponding to the maximum cross-sectional passenger flow of the bus with index i sent in direction k on day d, and TT is the capacity waste threshold;
[0081] S78: Calculate vehicle departure status; if the bus departs from the station, then
[0082]
[0083] Among them, since the value of i is a large number, it may be filled with 0, so a judgment condition needs to be added It represents the time when the s-type vehicle with index i departs from the starting station in the k direction on the dth day. The mathematical expression is:
[0084]
[0085] S79: Calculate the vehicle return status; if the bus returns to the station, then
[0086]
[0087] in, It indicates the time when the s-type vehicle with index i is sent out in the -k direction on the dth day to return to the terminal station. It represents the time when the s-type vehicle with index i sent in direction k on day d arrives at the terminal. The mathematical expression is:
[0088]
[0089] λ represents the rest time after the bus returns, such as charging the vehicle, the driver taking a rest, etc. The bus, It means that the bus needs to rest before it can be ready for the next operation, and it is not in operation hours. Although buses returning to the bus station still need to be charged in reality, this does not need to be reflected in the model, otherwise the array index will be out of bounds;
[0090] S710: Calculate vehicle usage:
[0091]
[0092] in, represents the usage of bus type s in direction k at time t on day d, represents the change in the number of buses of type s in the k direction at time t on the dth day. By summing the number of buses before time t, the number of buses running on the line relative to the starting time can be calculated. This means that the number of type s buses in direction k on day d has increased compared to the initial number. This means that the number of type s buses in direction k on day d has decreased compared to the starting number.
[0093] S711: Calculate the starting number of vehicles;
[0094] For one-way departure routes and loop routes, they only have one bus station, and the initial number of buses on any day is the initial number on the first day:
[0095]
[0096] For two-way lines, vehicles will be parked at both the starting station and the terminal station. Since the number of departures in the two directions may be different, the number of buses at the two stations may fluctuate. Then the initial number of vehicles on the dth day is:
[0097]
[0098] in, Represents the change in the number of buses of model s in direction k at the end of day d.
[0099] S712: Build a bus schedule generation model:
[0100] Construct an objective function that minimizes the average waiting time of passengers:
[0101]
[0102] in, is a random variable, is through Calculate the total waiting time of passengers.
[0103] Construct the objective function that minimizes the average congestion:
[0104]
[0105] in, is a random variable, is through Calculated bus congestion.
[0106] Construct the objective function that minimizes the average capacity waste:
[0107]
[0108]
[0109] in, is a random variable, is through The calculated degree of waste of bus capacity.
[0110] Construct the objective function that minimizes the number of departures:
[0111]
[0112] Add a departure constraint, that is, at any given time point t, at most one bus is dispatched:
[0113]
[0114] Add the first and last bus constraints. According to the standard practice of bus operation, the first and last buses of the day are fixed. Therefore, the present invention ensures that at least one bus is dispatched at or on the time of the first and last buses to construct the following constraints:
[0115]
[0116] Add a passenger capacity constraint, that is, the number of passengers on the bus cannot exceed the maximum passenger capacity:
[0117]
[0118]
[0119] in, represents the maximum passenger capacity of the bus with index i dispatched in direction k on day d, h s Indicates the maximum passenger capacity of the s-type bus. Add a bus quantity constraint, that is, the number of buses running on the line at each moment does not exceed the total number of buses initially at the starting station:
[0120]
[0121] Add a maximum departure interval constraint. In order to ensure a certain service level of buses, the departure interval between two adjacent buses must be less than the maximum departure interval hw:
[0122]
[0123] Finally, the stochastic multi-objective mixed integer programming model is constructed:
[0124]
[0125] The S8 specifically includes:
[0126] S81, predicted number of people who will board the bus Input optimization model
[0127] S82, predicted number of people getting off the bus Input optimization model
[0128] S83, the predicted value of the travel time Input optimization model
[0129] Among them, the site subscript q in the prediction model is represented by subscript j in the optimization model; during the prediction process, data of different running directions will be predicted, which is represented by subscript k in the optimization model; the prediction time span will be divided into different days, which is represented by subscript d in the optimization model.
[0130] Optionally, the S9 specifically includes:
[0131] S91: Conversion of the bus schedule generation model, converting the two constraints of passenger capacity limit and number of vehicles on the line into the objective function, while the first and last bus constraints and the constraint that at most one vehicle can depart at each time point will be satisfied during chromosome encoding, and the maximum bus departure interval constraint will be modified on the chromosome after crossover mutation to meet the constraint.
[0132] Transform the passenger capacity constraint into the objective function of the optimization model:
[0133]
[0134] in, Indicates the degree of violation of the passenger capacity constraint. When the constraint condition is not met, the degree of violation of the constraint is greater than 0; when the constraint condition is met, the degree of violation of the constraint is 0.
[0135] Convert the bus quantity constraint into the objective function of the optimization model:
[0136]
[0137] in, Indicates the degree of violation of the bus quantity constraint. When the constraint condition is not met, the degree of violation of the constraint is greater than 0; when the constraint condition is met, the degree of violation of the constraint is 0.
[0138] The transformed unconstrained agent model is:
[0139]
[0140] Therefore, the objective function of the proxy model of the bus schedule generation model consists of two parts: one is the four objective functions of the problem itself, and the other is the objective function converted from the two constraints.
[0141] S92: Initialize the parameters of the genetic algorithm; set the population size to N pop ; The maximum number of iterations is N gen ; Initialize the gene library table and set the frequency of genotypes appearing at each gene point to 0;
[0142] S93: Chromosome encoding; Assuming there are n types of bus models, the chromosome has n+1 values, 0 means no bus is dispatched at this time, 1 means the first type of bus is dispatched at this time, 2 means the second type of bus is dispatched at this time, and so on. This design can meet the constraint that at most one bus is dispatched at a time point, that is, formula (10). In addition, in order to ensure that the bus can dispatch the first and last buses, that is, formula (11), the first and last genotypes of the chromosome should be non-zero numbers.
[0143] S94: Adaptive population chromosome initialization;
[0144] S95: Calculate the objective function;
[0145] S96: Select operation, select N according to the tournament strategy pop individual;
[0146] S97: Crossover operation, multi-point crossover between the selected individuals and individuals in the population to generate N pop offspring;
[0147] S98: mutation operation, counting the frequency of each genotype in each gene locus of the population, adding it to the gene library table, and calculating the degree of genotype confusion of the gene locus. The more chaotic the gene locus, the greater the probability of mutation;
[0148] S99: Repair operation, repairing chromosomes whose departure interval is greater than the maximum departure interval and chromosomes whose number of vehicles on the line exceeds the number of vehicles;
[0149] S910: Merge operation, merge the parent population and the child population, and the population size becomes 2N pop ;
[0150] S911: Perform non-dominated sorting on the targets of constraint transformation to obtain individuals at each layer;
[0151] S912: Update the population; select individuals from each layer in turn until the population size is greater than or equal to N pop , if the population size is exactly equal to N pop , then update the population; if the population size is greater than N pop , then for the last layer of individuals selected, use the individual selection method of NSGA-III to select individuals that can just make the population size equal to N pop The number of individuals is then updated to the population;
[0152] S913: Determine the termination condition. If the termination condition is not met, repeat S95-S912; if the termination condition is met, calculate the objective function and output the optimization result.
[0153] Optionally, the adaptive population chromosome initialization specifically includes:
[0154] Remove unreasonable departure intervals, set maximum and minimum departure intervals, replace departure intervals greater than the maximum departure interval with the maximum departure interval, and replace departure intervals less than the minimum departure interval with the minimum departure interval;
[0155] Further calculate the mean and variance of the departure interval;
[0156] Since the calculated mean and variance are not smooth and may produce missing values, the present invention uses wavelet decomposition to denoise and interpolate, and calculates the positive and negative twice variance based on the mean of the departure interval to obtain the interval for sampling the departure time; since the minimum decision granularity is minutes, the denoised departure interval and twice the variance interval are rounded to minutes.
[0157] Starting from the departure time of the first train, randomly sample a departure interval within its departure interval to obtain the departure time of the next moment, and continue to randomly sample a departure interval within the departure interval of this moment, and so on, until the departure time exceeds the departure time of the last train, cut off at the departure time of the last train, terminate the sequence generation, and obtain the departure plan.
[0158] The beneficial effects of the present invention are:
[0159] (1) Improving the operating efficiency of the public transportation system: By jointly predicting travel time and passenger flow, bus schedules can be formulated more accurately, reducing the phenomenon of empty buses and overloaded buses, and improving the overall operating efficiency of the public transportation system.
[0160] (2) Reduce passenger waiting time: By optimizing the bus schedule, the bus arrival time is made more accurate, which reduces the waiting time of passengers and improves passenger satisfaction.
[0161] (3) Save operating costs: By rationally arranging bus departure times and schedules, unnecessary energy consumption and operating costs can be reduced, thereby improving economic efficiency.
[0162] (4) Adapt to changing traffic conditions: By combining real-time traffic conditions, weather conditions, major events and other influencing factors, the bus schedule can be flexibly adjusted to adapt to the complex and changing traffic environment and maintain the stable operation of the bus system.
[0163] (5) Improving the value of data utilization: Through in-depth mining and analysis of historical data, we can make full use of big data technology to improve the value of data utilization and provide a scientific basis for the intelligent management of the public transportation system.
[0164] (6) Enhance system intelligence: Introduce machine learning and time series analysis methods to achieve accurate prediction of travel time and passenger flow, improve the intelligence level of the system, and promote the development of smart transportation.
[0165] (7) Optimizing passenger travel experience: By providing more accurate and stable bus timetables, we can optimize passenger travel experience and improve the service quality and competitiveness of the bus system. BRIEF DESCRIPTION OF THE DRAWINGS
[0166] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0167] Figure 1 A flowchart of a bus schedule generation method based on travel time and passenger flow probability prediction proposed by the present invention;
[0168] Figure 2 A schematic diagram of a large-scale stochastic multi-objective mixed integer programming model for constructing a bus schedule generation method based on travel time and passenger flow probability prediction proposed by the present invention;
[0169] Figure 3 A schematic diagram of a sparse multi-objective optimization algorithm for constrained optimization of a bus schedule generation method based on travel time and passenger flow probability prediction proposed in the present invention. DETAILED DESCRIPTION
[0170] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0171] refer to Figure 1-3 ,The bus schedule generation method based on travel time and passenger flow probability prediction includes the following steps:
[0172] S1. Collect data through GPS devices and passenger flow counters installed on buses, including bus travel time and passenger flow data;
[0173] S2, preprocessing the data, including denoising, missing value filling and data standardization, to obtain an original data set with irregular random time intervals;
[0174] S3, using a resampling function to resample the original data set with a suitable resampling granularity to obtain a resampled data set in an input format accepted by the prediction model in the next step;
[0175] S4, constructing and training a long-term probability joint prediction model for travel time and passenger flow, performing a long-term probability joint prediction on the resampled data set, and obtaining a predicted resampled data set;
[0176] S5, using a filling function to fill the predicted resampled data set to obtain a predicted data set in an input format accepted by the optimization model;
[0177] S6, using a selection function to select the predicted data set to obtain a predicted data set with the same time point as the original data set, for evaluating the optimal resampling granularity in S3;
[0178] S7. Construct a large-scale random multi-objective mixed integer programming model, taking into account application scenarios such as multiple line types, multiple vehicle types and their two-way scheduling, model constraints such as passenger capacity and number of vehicles, and optimization objectives such as passenger waiting time and departure times, so that the solved model can be actually applied;
[0179] S8, inputting the prediction data set in the input format accepted by the optimization model at the optimal resampling granularity confirmed in S6 into the ultra-large-scale stochastic multi-objective mixed integer programming model;
[0180] S9. Design a sparse multi-objective optimization algorithm for constrained optimization, introduce an adaptive population initialization method, a constraint priority mechanism and a sparse mutation operator, and solve the ultra-large-scale random multi-objective mixed integer programming model. This can solve the problem quickly and effectively and generate a bus schedule.
[0181] In this implementation, S2 specifically includes:
[0182] Define the original dataset:
[0183]
[0184] Among them, y(t i ) represents the observed value of the original data at time point ti, and the observed values at all time points constitute an original data set I.
[0185] In this implementation, S3 specifically includes:
[0186] S31. Define the resampled data set:
[0187]
[0188] in, Indicates the time point of resampling The observations under, the observations at all time points constitute an original data set J.
[0189] S32. Resample the original data set to obtain a resampled data set:
[0190]
[0191] Among them, F is the resampling function, f is the basic aggregation function, O j is the set of original data falling within the resampling interval, that is, for the set O j The original data in is calculated by the basic aggregation function f to obtain the resampled data ΔT is the resampling granularity, is the resampling interval, and the initial resampling time point is set to the departure time of the first bus:
[0192] Different types of data have different aggregation strategies. For travel time data, the basic aggregation function is:
[0193]
[0194] Among them, if the set O j is not empty, that is, there are original data falling within the resampling interval, and the average value of all data within the sampling interval is calculated. j | is the number of elements in the set; if the set O j If it is empty, that is, there is no original data in the resampling interval, linear interpolation is performed.
[0195] For passenger flow data, the basic aggregation function is:
[0196]
[0197] Among them, if the set O j is not empty, that is, there are original data falling within the resampling interval, and all data within the sampling interval are summed; if the set O j If it is empty, that is, there is no original data in the resampling interval, it will be filled with 0.
[0198] In this implementation, S4 specifically includes:
[0199] S41. Define the long-term probability joint prediction problem of travel time and passenger flow: Get resampled data from time point arrive The number of passengers boarding the qth station Number of people getting off the bus And the travel time series from the qth station to the next station and covariate X q , predict a specific type of data in the future T time The probability distribution of is:
[0200]
[0201] Among them, the time series is the data used for training, and the time series thereafter represents the part that needs to be predicted, T is the number of predicted data, and its time span is the same as the length of the future schedule to be generated;
[0202] S42. Calculate the likelihood function to obtain the probability distribution of the specific type of data:
[0203]
[0204] in, Represents all given types of data and covariate X q When a certain type of data probability.
[0205] S43, using the deep learning architecture to train the model. In this embodiment, the DeepAR model is selected to train the model, and the likelihood function can be written as follows:
[0206]
[0207] in, is the hidden state of the neural network at the jth stage. Function h represents a function implemented by a multi-layer recurrent neural network (RNN), specifically using a long short-term memory unit (LSTM). Function h is responsible for receiving three inputs: the hidden state of the previous stage Observations from the previous period and the covariate X q , and based on these inputs and the overall parameters of the model Θ r To calculate the hidden state of the current stage is a mapping function that transforms the hidden state of the current stage into To estimate The parameters of the probability distribution of .
[0208] Since the number of people getting on and off the bus is count data and the travel time does not follow a normal distribution, this embodiment chooses to use a negative binomial distribution as the form of the likelihood function:
[0209]
[0210] in, The parameters in the negative binomial distribution are mapped by the following equation:
[0211]
[0212] in, b μ , b α are the parameters to be trained, It is used to calculate the linear transformation of the mean μ in the negative binomial distribution, It is a linear transformation used to calculate the shape parameter α in the negative binomial distribution. Since the mean and shape parameter of the negative binomial distribution are required to be positive, the results of these two linear transformations will be activated by the softplus function to ensure that they are all positive. In this way, the output of the network can directly predict the parameters of the negative binomial distribution through these calculations, and then be used to calculate a specific time point The conditional probability of .
[0213] S44. Use the trained model to make predictions and obtain the predicted resampled data set:
[0214]
[0215] in, Represents the time point of resampling The predicted values at all time points constitute a predicted resampled data set
[0216] The specific prediction process is:
[0217] First, the model is initialized based on historical data, using known historical data To initialize the state of the model, that is, from the time point To the time point The historical time series values are and the corresponding covariate X q Input model;
[0218] Next, we generate predictions recursively, starting from the time point At the beginning, at each time point thereafter, the model is based on the hidden state of the previous time point and the known covariate X q , calculate the new hidden state through the function h Then, use and model parameters Θ r Determine the probability distribution parameters of the current time step through the function θ and
[0219] Then sample and feedback to draw a sample from the probability distribution Each iteration generates a new hidden state based on the previous prediction result, and then repeats this process until the end of the prediction range is reached.
[0220] Finally, multiple prediction trajectories are generated. The above prediction steps will be repeated multiple times, each time producing a different prediction trajectory. All these trajectories together constitute the joint prediction distribution of the future behavior of the time series.
[0221] In this implementation manner, S5 specifically includes:
[0222] S51. Define the prediction data set in the input format accepted by the optimization model:
[0223]
[0224] in, Represents the time point t at which the model is optimized k The predicted values under ′ and the predicted values at all time points constitute a prediction data set K.
[0225] S52, filling the predicted resampled data set with the predicted value at the optimized model time point:
[0226]
[0227]
[0228] Where g is the basic filling function, P k It is a set of adjacent predicted resampled data sandwiched on both sides of the predicted data in the input format accepted by a certain optimization model, that is, for the set P k The predicted resampled data in the prediction is calculated by the basic filling function g to obtain the predicted value at the optimized model time point is the resampled data of the adjacent predictions, It is the interval of adjacent predicted resampled data time points, that is, the resampling interval.
[0229] Different types of data have different filling strategies. For travel time data, the basic filling function is:
[0230]
[0231] Wherein, ΔT is the resampling granularity. Before the last resampled data, linear interpolation is performed on the data to be filled; and the data after the last resampled data is filled with the last resampled data.
[0232] For passenger flow data, the basic filling function is:
[0233]
[0234] Among them, Δt is the time interval of filling data, and ΔT is the resampling granularity, that is, Before the last resampled data, the resampled prediction values are evenly distributed to the decision time points; the data after the last resampled data needs to be filled according to the span between the last original data and the last resampled data.
[0235] In this implementation manner, S6 specifically includes:
[0236] S61, the original data set at time t a Divide into training set and test set
[0237] S62, resample the training set and test set of the original data set using different resampling granularities to obtain a training set of the resampled data set and test set Among them, b ΛT is the resampled data distance division time point t a The index of the most recent time point. Different resampling granularities will result in different index values.
[0238] S63, training, predicting and filling according to the steps S4 and S5 to obtain a prediction data set in an input format accepted by the optimization model:
[0239] S64. Define a predicted data set with the same time point as the original data set
[0240] S65, in set K test Select a set from
[0241]
[0242]
[0243] Among them, H is the selection function, h is the basic selection function, Q i It is the set of predicted data in the input format accepted by the optimization model that falls within the adjacent original data interval, that is, for the set Qi The prediction data in the input format accepted by the optimization model in the example is calculated by the basic selection function h to obtain the prediction value at the original time point. [t i ,t i+1 ) represents the adjacent raw data interval. For the last raw data, the set Q i is the set of prediction data in the input format accepted by all subsequent optimization models;
[0244] Different types of data have different selection strategies. For travel time, the predicted value at the decision time point is directly selected. The basic selection function is:
[0245]
[0246] For passenger flow data, it is necessary to aggregate the predicted values at the decision time points within the adjacent original time points. The basic selection function is:
[0247]
[0248] S66. Use the evaluation function to compare the prediction performance under different resampling granularities.
[0249] The continuous ranked probability score (CRPS) is a measure of the consistency between the probability prediction and its actual observed value, and its mathematical expression is as follows:
[0250]
[0251] Where y = y(t i ), represents the cumulative distribution function of the forecast distribution, is the indicator function of the observation y, Describes how far the predicted cumulative distribution is from the actual observed values.
[0252] The smaller the CRPS value, the better the consistency between the predicted distribution and the actual observed value, and the higher the prediction performance. When comparing the prediction performance of different resampling granularities, a lower CRPS value means a better probability prediction.
[0253] In this implementation manner, the S7 specifically includes:
[0254] S71. Define the bus schedule problem, specifically including a bus route in direction k on the future day d, with a number of bus stations M k(The number of bus stops in different directions may be different), and the set of vehicle models S running on the line, subdividing the operating time into several minimum decision time intervals Δt, and deciding whether to start the bus at each minimum decision time interval. The goal is to find a departure plan that can achieve satisfactory results on a series of indicators f; The following table defines the meaning of the bus schedule problem index, set, parameter, and variable:
[0255] Table 1 Symbols and meanings of bus timetable problem
[0256]
[0257]
[0258] S72: Define decision variables, decision variables is a 0-1 variable, means that a bus of type s with index i is dispatched in direction k at time t on day d, otherwise,
[0259]
[0260] S73: Calculate the total waiting time at the station; when the bus with index i is sent in the k direction on the dth day and arrives at the jth station, the total waiting time of the bus at the jth station is the next time from the previous bus to the jth station From the beginning to the moment when the bus arrives at the jth station, the sum of the waiting time of all passengers arriving at the jth station. The earlier the passengers arrive at the station, the longer the waiting time:
[0261]
[0262] in, It indicates the time when the bus with index i is dispatched in direction k on day d and arrives at station j. It means the next time when the bus with index i-1 is dispatched in direction k on day d and arrives at station j. The calculated time range is from time The time from the beginning to the time when the current vehicle arrives at this station End, for the first train, the starting time is 0, It represents the waiting time of passengers who arrive at the bus station at time t on the dth day. The earlier the passengers arrive at the station, the longer the waiting time.
[0263] S74: Calculate the passenger capacity of the bus; the passenger capacity of the bus with index i sent in direction k on the dth day and arriving at the jth station is the sum of the changes in the number of passengers getting on and off at all previous stations:
[0264]
[0265] in, It represents the change in the number of passengers in the k direction at the j station at a certain time t on the d day. It means the next time when the bus with index i-1 is dispatched in direction k on day d and arrives at station j. The calculated time range is from time The time from the beginning to the time when the current vehicle arrives at this station For the first bus, the starting time is 0. Finally, the cumulative sum of the previous stations at the jth station can be calculated to get the passenger capacity of the bus at the jth station.
[0266] S75: Calculate the passenger base of buses. Different models have different passenger bases. This base reflects the change in the number of people in the bus as the bus level increases. It can be expressed as the ratio of the maximum passenger capacity of different models of buses to the number of levels:
[0267]
[0268] Among them, bn s It represents the passenger base of model s bus, and NCL is the number of vehicle passenger levels set;
[0269] Table 2 Distribution of vehicle occupancy levels when the number of occupancy levels is 5
[0270]
[0271] Table 2 gives the number of people in two bus types (12m and 18m) at five preset occupancy levels (NCL = 5), which can be calculated using the following formula:
[0272]
[0273] in, represents the level of passengers of the bus with index i that leaves the k-th direction on the d-th day when it arrives at (or leaves) the j-th station; It represents the number of passengers on the bus with index i sent in direction k on day d. The mathematical expression is:
[0274]
[0275] S76: Calculate the bus congestion: When the number of passengers on the bus reaches a certain level, the vehicle will become crowded. The number of passengers at this time is called the congestion threshold.
[0276]
[0277] in, represents the degree of congestion felt by passengers when the bus with index i is sent in direction k on day d at (or leaves) the jth station, and CT is the congestion threshold;
[0278] S77: Calculate the degree of waste of bus capacity; for the degree of waste of bus capacity, when the number of passengers in the bus's maximum cross-section is less than a certain level, we believe that the vehicle has wasted its capacity. The number of passengers at this time is called the capacity threshold. The degree of waste of bus capacity can be expressed as:
[0279]
[0280] in, represents the degree of capacity waste of the bus with index i sent in direction k on day d, It represents the number level corresponding to the maximum cross-sectional passenger flow of the bus with index i sent in direction k on day d, and TT is the capacity waste threshold;
[0281] S78: Calculate vehicle departure status; if the bus departs from the station, then
[0282]
[0283] Among them, since the value of i is a large number, it may be filled with 0, so a judgment condition needs to be added It represents the time when the s-type vehicle with index i departs from the starting station in the k direction on the dth day. The mathematical expression is:
[0284]
[0285] S79: Calculate the vehicle return status; if the bus returns to the station, then
[0286]
[0287] in, It indicates the time when the s-type vehicle with index i is sent out in the -k direction on the dth day to return to the terminal station. It represents the time when the s-type vehicle with index i sent in direction k on day d arrives at the terminal. The mathematical expression is:
[0288]
[0289] λ represents the rest time after the bus returns, such as charging the vehicle, the driver taking a rest, etc. The bus, It means that the bus needs to rest before it can be ready for the next operation, and it is not in operation hours. Although buses returning to the bus station still need to be charged in reality, this does not need to be reflected in the model, otherwise the array index will be out of bounds. ;
[0290] S710: Calculate vehicle usage:
[0291]
[0292] in, represents the usage of bus type s in direction k at time t on day d, represents the change in the number of buses of type s in the k direction at time t on the dth day. By summing the number of buses before time t, the number of buses running on the line relative to the starting time can be calculated. This means that the number of type s buses in direction k on day d has increased compared to the initial number. This means that the number of type s buses in direction k on day d has decreased compared to the starting number.
[0293] S711: Calculate the starting number of vehicles;
[0294] For one-way departure routes and loop routes, they only have one bus station, and the initial number of buses on any day is the initial number on the first day:
[0295]
[0296] For two-way lines, vehicles will be parked at both the starting station and the terminal station. Since the number of departures in the two directions may be different, the number of buses at the two stations may fluctuate. Then the initial number of vehicles on the dth day is:
[0297]
[0298] in, Represents the change in the number of buses of model s in direction k at the end of day d.
[0299] S712: Build a bus schedule generation model:
[0300] Construct an objective function that minimizes the average waiting time of passengers:
[0301]
[0302]
[0303] in, is a random variable, is through Calculate the total waiting time of passengers.
[0304] Construct the objective function that minimizes the average congestion:
[0305]
[0306] in, is a random variable, is through Calculated bus congestion.
[0307] Construct the objective function that minimizes the average capacity waste:
[0308]
[0309] in, is a random variable, is through The calculated degree of waste of bus capacity.
[0310] Construct the objective function that minimizes the number of departures:
[0311]
[0312] Add a departure constraint, that is, at any given time point t, at most one bus is dispatched:
[0313]
[0314] Add the first and last bus constraints. According to the standard practice of bus operation, the first and last buses of the day are fixed. Therefore, the present invention ensures that at least one bus is dispatched at or on the time of the first and last buses to construct the following constraints:
[0315]
[0316] Add a passenger capacity constraint, that is, the number of passengers on the bus cannot exceed the maximum passenger capacity:
[0317]
[0318] in, represents the maximum passenger capacity of the bus with index i dispatched in direction k on day d, h s Indicates the maximum passenger capacity of the s-type bus. Add a bus quantity constraint, that is, the number of buses running on the line at each moment does not exceed the total number of buses initially at the starting station:
[0319]
[0320] Add a maximum departure interval constraint. In order to ensure a certain service level of buses, the departure interval between two adjacent buses must be less than the maximum departure interval hw:
[0321]
[0322] Finally, the stochastic multi-objective mixed integer programming model is constructed:
[0323]
[0324] In this implementation manner, S8 specifically includes:
[0325] S81, predicted number of people who will board the bus Input optimization model
[0326] S82, predicted number of people getting off the bus Input optimization model
[0327] S83, the predicted value of the travel time Input optimization model
[0328] Among them, the site subscript q in the prediction model is represented by subscript j in the optimization model; during the prediction process, data of different running directions will be predicted, which is represented by subscript k in the optimization model; the prediction time span will be divided into different days, which is represented by subscript d in the optimization model.
[0329] In this implementation manner, the S9 specifically includes:
[0330] S91: Conversion of the bus schedule generation model, converting the two constraints of passenger capacity limit and number of vehicles on the line into the objective function, while the first and last bus constraints and the constraint that at most one vehicle can depart at each time point will be satisfied during chromosome encoding, and the maximum bus departure interval constraint will be modified on the chromosome after crossover mutation to meet the constraint.
[0331] Transform the passenger capacity constraint into the objective function of the optimization model:
[0332]
[0333] in, Indicates the degree of violation of the passenger capacity constraint. When the constraint condition is not met, the degree of violation of the constraint is greater than 0; when the constraint condition is met, the degree of violation of the constraint is 0.
[0334] Convert the bus quantity constraint into the objective function of the optimization model:
[0335]
[0336] in, Indicates the degree of violation of the bus quantity constraint. When the constraint condition is not met, the degree of violation of the constraint is greater than 0; when the constraint condition is met, the degree of violation of the constraint is 0.
[0337] The transformed unconstrained agent model is:
[0338]
[0339] Therefore, the objective function of the proxy model of the bus schedule generation model consists of two parts: one is the four objective functions of the problem itself, and the other is the objective function converted from the two constraints.
[0340] S92: Initialize the parameters of the genetic algorithm; set the population size to N pop ; The maximum number of iterations is N gen ; Initialize the gene library table and set the frequency of genotypes appearing at each gene point to 0;
[0341] S93: Chromosome encoding; Assuming there are n types of bus models, the chromosome has n+1 values, 0 means no bus is dispatched at this time, 1 means the first type of bus is dispatched at this time, 2 means the second type of bus is dispatched at this time, and so on. This design can meet the constraint that at most one bus is dispatched at a time point, that is, formula (10). In addition, in order to ensure that the bus can dispatch the first and last buses, that is, formula (11), the first and last genotypes of the chromosome should be non-zero numbers.
[0342] S94: Adaptive population chromosome initialization;
[0343] S95: Calculate the objective function;
[0344] S96: Select operation, select N according to the tournament strategy pop individual;
[0345] S97: Crossover operation, multi-point crossover between the selected individuals and individuals in the population to generate N pop offspring;
[0346] S98: mutation operation, counting the frequency of each genotype in each gene locus of the population, adding it to the gene library table, and calculating the degree of genotype confusion of the gene locus. The more chaotic the gene locus, the greater the probability of mutation;
[0347] S99: Repair operation, repairing chromosomes whose departure interval is greater than the maximum departure interval and chromosomes whose number of vehicles on the line exceeds the number of vehicles;
[0348] S910: Merge operation, merge the parent population and the child population, and the population size becomes 2N pop ;
[0349] S911: Perform non-dominated sorting on the targets of constraint transformation to obtain individuals at each layer;
[0350] S912: Update the population; select individuals from each layer in turn until the population size is greater than or equal to N pop , if the population size is exactly equal to N pop , then update the population; if the population size is greater than N pop , then for the last layer of individuals selected, use the individual selection method of NSGA-III to select individuals that can just make the population size equal to N pop The population is then updated with the number of individuals;
[0351] S913: Determine the termination condition. If the termination condition is not met, repeat S95-S912; if the termination condition is met, calculate the objective function and output the optimization result.
[0352] In this implementation, the adaptive population chromosome initialization specifically includes:
[0353] Remove unreasonable departure intervals, set maximum and minimum departure intervals, replace departure intervals greater than the maximum departure interval with the maximum departure interval, and replace departure intervals less than the minimum departure interval with the minimum departure interval;
[0354] Further calculate the mean and variance of the departure interval;
[0355] Since the calculated mean and variance are not smooth and may produce missing values, the present invention uses wavelet decomposition to denoise and interpolate, and calculates the positive and negative twice variance based on the mean of the departure interval to obtain the interval for sampling the departure time; since the minimum decision granularity is minutes, the denoised departure interval and twice the variance interval are rounded to minutes.
[0356] Starting from the departure time of the first train, randomly sample a departure interval within its departure interval to obtain the departure time of the next moment, and continue to randomly sample a departure interval within the departure interval of this moment, and so on, until the departure time exceeds the departure time of the last train, cut off at the departure time of the last train, terminate the sequence generation, and obtain the departure plan.
[0357] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A bus schedule generation method based on travel time and passenger flow probability prediction, characterized in that: The steps include: S1. Collect data through GPS devices and passenger flow counters installed on buses, including bus travel time and passenger flow data; S2, preprocessing the data, including denoising, missing value filling and data standardization, to obtain an original data set with irregular random time intervals; S3, using a resampling function to resample the original data set with a suitable resampling granularity to obtain a resampled data set in an input format accepted by the prediction model in the next step; S4, constructing and training a long-term probability joint prediction model for travel time and passenger flow, performing a long-term probability joint prediction on the resampled data set, and obtaining a predicted resampled data set; S5, using a filling function to fill the predicted resampled data set to obtain a predicted data set in an input format accepted by the optimization model; S6, using a selection function to select the predicted data set to obtain a predicted data set with the same time point as the original data set, for evaluating the optimal resampling granularity in S3; S7. Construct a large-scale stochastic multi-objective mixed integer programming model; S8, inputting the prediction data set in the input format accepted by the optimization model at the optimal resampling granularity confirmed in S6 into the ultra-large-scale stochastic multi-objective mixed integer programming model; S9. Design a sparse multi-objective optimization algorithm for constrained optimization, solve the ultra-large-scale random multi-objective mixed integer programming model, and generate a bus schedule.
2. The method for generating a bus schedule based on travel time and passenger flow probability prediction according to claim 1, characterized in that: The original data set of S2 is represented as: Among them, y(t i ) represents the time point t i The observation values of the original data under, the observation values of all time points constitute an original data set I.
3. The method for generating a bus schedule based on travel time and passenger flow probability prediction according to claim 1, characterized in that: The S3 specifically includes: The resampled dataset is represented as: in, Indicates the time point of resampling The observations under, the observations at all time points constitute a resampled data set J; The resampling process is expressed as: Among them, F is the resampling function, f is the basic aggregation function, O j is the set of original data falling within the resampling interval, that is, for the set O j The original data in is calculated by the basic aggregation function f to obtain the resampled data is the resampling interval, ΔT is the resampling granularity, and the initial resampling time point is set to the departure time of the first bus:
4. The method for generating a bus schedule based on travel time and passenger flow probability prediction according to claim 1, characterized in that: The S4 specifically includes: S41. Define the long-term probability joint prediction problem of travel time and passenger flow: Get resampled data from time point arrive The number of passengers boarding the qth station Number of people getting off the bus And the travel time series from the qth station to the next station and covariate X q , predict a specific type of data at T time points in the future The probability distribution of is: Among them, the time series is the data used for training, and the time series thereafter represents the part that needs to be predicted, T is the number of predicted data, and its time span is the same as the length of the future schedule to be generated; S42. Calculate the likelihood function to obtain the probability distribution of the specific type of data: in, Represents all given types of data and covariate X q When a certain type of data The probability of S43, train the model using deep learning architecture; S44. Use the trained model to make predictions and obtain the predicted resampled data set: in, Represents the time point of resampling The predicted values at all time points constitute a predicted resampled data set 5. The method for generating a bus schedule based on travel time and passenger flow probability prediction according to claim 1, characterized in that: The S5 specifically includes: S51. Define the prediction data set in the input format accepted by the optimization model: in, Represents the time point t at which the model is optimized k The predicted values under ′, the predicted values at all time points constitute a prediction data set K; S52, using the filling function G to fill the predicted resampled data set to the predicted value at the optimized model time point: Where g is the basic filling function, P k It is a set of adjacent predicted resampled data sandwiched on both sides of the predicted data in the input format accepted by a certain optimization model, that is, for the set P k The predicted resampled data in the prediction is calculated by the basic filling function g to obtain the predicted value at the optimized model time point is the resampled data of the adjacent predictions, It is the interval of adjacent predicted resampled data time points, that is, the resampling interval.
6. The method for generating a bus schedule based on travel time and passenger flow probability prediction according to claim 1, characterized in that: The S6 specifically includes: S61, the original data set at time point t a Divide into training set and test set S62, resample the training set and test set of the original data set using different resampling granularities to obtain a training set of the resampled data set and test set Among them, b ΛT is the resampled data distance division time point t a The index of the most recent time point. Different resampling granularities will result in different index values. S63, training, predicting and filling according to the steps S4 and S5 to obtain a prediction data set in an input format accepted by the optimization model: S64. Define a predicted data set with the same time point as the original data set S65. Select the predicted value at the original time point using a selection function, wherein the selection function is: Among them, H is the selection function, h is the basic selection function, Q i It is the set of predicted data in the input format accepted by the optimization model that falls within the adjacent original data interval, that is, for the set Q i The prediction data in the input format accepted by the optimization model in the example is calculated by the basic selection function h to obtain the prediction value at the original time point. [t i ,t i+1 ) represents the adjacent raw data interval. For the last raw data, the set Q i is the set of prediction data in the input format accepted by all subsequent optimization models; S66. Use the evaluation function to compare the prediction performance under different resampling granularities.
7. The method for generating a bus schedule based on travel time and passenger flow probability prediction according to claim 1, characterized in that: The S7 specifically includes: S71. Define the bus schedule problem, specifically including a bus route in direction k on the future day d, with a number of bus stations M k , and the set S of vehicle models running on the line, subdivide the operating time into several minimum decision time intervals Δt, and decide whether to start the train at each minimum decision time interval; S72: Define decision variables, decision variables is a 0-1 variable, means that the bus of type s with index i is dispatched at time t in direction k on day d, otherwise, S73: Calculate the total waiting time at the station: in, It indicates the time when the bus with index i is dispatched in direction k on day d and arrives at station j. It means the next time when the bus with index i-1 is dispatched in direction k on day d and arrives at station j. The calculated time range is from time The time from the beginning to the time when the current vehicle arrives at this station End, for the first train, the starting time is 0, represents the waiting time of passengers arriving at the bus station at time t on the dth day. The earlier the passengers arrive at the station, the longer the waiting time; S74: Calculate the passenger capacity of a bus: in, It represents the change in the number of passengers in the k direction at the j station at a certain time t on the d day. It means the next time when the bus with index i-1 is dispatched in direction k on day d and arrives at station j. The calculated time range is from time The time from the beginning to the time when the current vehicle arrives at this station End, for the first bus, the starting time is 0, and finally the cumulative sum of the previous stations for the jth station can be calculated to get the passenger capacity of the bus at the jth station; S75: Calculate the number of passengers on the bus: Among them, bn s Indicates the number of passengers on the s-type bus, and NCL is the number of vehicle passenger levels that are set. The bus passenger level is calculated using the obtained bus passenger number base: in, represents the level of passengers of the bus with index i that leaves the k-th direction on the d-th day when it arrives at (or leaves) the j-th station; It represents the number of passengers on the bus with index i sent in direction k on day d. The mathematical expression is: S76: Calculate bus congestion: in, represents the degree of congestion felt by passengers when the bus with index i is sent in direction k on day d at (or leaves) the jth station, and CT is the congestion threshold; S77: Calculate the degree of waste of bus capacity: in, represents the degree of capacity waste of the bus with index i sent in direction k on day d, It represents the number level corresponding to the maximum cross-sectional passenger flow of the bus with index i sent in direction k on day d, and TT is the capacity waste threshold; S78: Calculate vehicle departure status: in, It represents the time when the s-type vehicle with index i departs from the starting station in the k direction on the dth day. The mathematical expression is: S79: Calculate vehicle return status: in, It indicates the time when the s-type vehicle with index i is sent out in the -k direction on the dth day to return to the terminal station. It represents the time when the s-type vehicle with index i sent in direction k on day d arrives at the terminal. The mathematical expression is: λ represents the rest time after the bus returns; It means that the bus needs to rest before it can be ready for the next operation; S710: Calculate vehicle usage: in, represents the usage of bus type s in direction k at time t on day d, represents the change in the number of buses of type s in the k direction at time t on the dth day. The number of buses running on the line relative to the starting time is obtained by summing up the number of buses before time t. This means that the number of type s buses in direction k on day d has increased compared to the initial number. This means that the number of type s buses in direction k on day d has decreased compared to the starting number; S711: Calculate the number of vehicles at the start time: For one-way departure routes and loop routes: For two-way split lines: in, represents the change in the number of buses of type s at the end of day d in direction k; S712: Build a bus schedule generation model: Construct an objective function that minimizes the average waiting time of passengers: in, is a random variable, is through The calculated total waiting time of passengers; Construct the objective function that minimizes the average congestion: in, is a random variable, is through The calculated bus congestion; Construct the objective function that minimizes the average capacity waste: in, is a random variable, is through The calculated degree of waste of bus transport capacity; Construct the objective function that minimizes the number of departures: Add a departure constraint, that is, at any given time point t, at most one bus is dispatched: Add the first and last bus constraints, that is, at least one bus must be dispatched at or on the time of the first and last buses: or Add a passenger capacity constraint, that is, the number of passengers on the bus cannot exceed the maximum passenger capacity: in, represents the maximum passenger capacity of the bus with index i dispatched in direction k on day d, h s Indicates the maximum passenger capacity of the s-type bus; add a bus quantity constraint, that is, the number of buses running on the line at each moment does not exceed the total number of buses initially at the starting station: Add a maximum departure interval constraint. In order to ensure a certain service level of buses, the departure interval between two adjacent buses must be less than the maximum departure interval hw: Finally, the stochastic multi-objective mixed integer programming model is constructed: when Eqs(12)-(25).
8. The method for generating a bus schedule based on travel time and passenger flow probability prediction according to claim 1, characterized in that: The S8 specifically includes: S81, predicted number of people who will board the bus Input optimization model S82, predicted number of people getting off the bus Input optimization model S83, the predicted value of the travel time Input optimization model Among them, the site subscript q in the prediction model is represented by subscript j in the optimization model; during the prediction process, data of different running directions will be predicted, which is represented by subscript k in the optimization model; the prediction time span will be divided into different days, which is represented by subscript d in the optimization model.
9. The method for generating a bus schedule based on travel time and passenger flow probability prediction according to claim 1, characterized in that: The S9 specifically includes: S91: Conversion of bus schedule generation model: Transform the passenger capacity constraint into the objective function of the optimization model: in, Indicates the violation degree of the passenger capacity constraint. When the constraint condition is not met, the violation degree of the constraint is greater than 0; when the constraint condition is met, the violation degree of the constraint is 0; Convert the bus quantity constraint into the objective function of the optimization model: in, Indicates the degree of violation of the bus quantity constraint. When the constraint condition is not met, the degree of violation of the constraint is greater than 0; when the constraint condition is met, the degree of violation of the constraint is 0; Other constraints will be satisfied during chromosome encoding and repair; Therefore, the transformed unconstrained agent model is: S92: Initialize the parameters of the genetic algorithm; set the population size to N pop ; The maximum number of iterations is N gen ; Initialize the gene library table and set the frequency of genotype occurrence at each gene point to 0; S93: Chromosome code; 0 means no bus is dispatched at this time, 1 means the first type of bus is dispatched at this time, 2 means the second type of bus is dispatched at this time, n means the nth type of bus is dispatched at this time; n represents the total number of bus models; S94: Adaptive population chromosome initialization; S95: Calculate the objective function; S96: Select operation, select N according to the tournament strategy pop individual; S97: Crossover operation, multi-point crossover between the selected individuals and individuals in the population to generate N pop offspring; S98: mutation operation, counting the frequency of each genotype at each gene locus in the population, adding it to the gene library table, and calculating the degree of genotype confusion at the gene locus; S99: Repair operation, repairing chromosomes whose departure interval is greater than the maximum departure interval and chromosomes whose number of vehicles on the line exceeds the number of vehicles; S910: Merge operation, merge the parent population and the child population, and the population size becomes 2N pop ; S911: Perform non-dominated sorting on the targets of constraint transformation to obtain individuals at each layer; S912: Update the population; select individuals from each layer in turn until the population size is greater than or equal to N pop , if the population size is exactly equal to N pop , then update the population; if the population size is greater than N pop , then for the last layer of individuals selected, use the individual selection method of NSGA-III to select individuals that can just make the population size equal to N pop The population is then updated with the number of individuals; S913: Determine the termination condition. If the termination condition is not met, repeat S95-S912; if the termination condition is met, calculate the objective function and output the optimization result.
10. The method for generating a bus schedule based on travel time and passenger flow probability prediction according to claim 8, characterized in that: The adaptive population chromosome initialization specifically includes: Remove unreasonable departure intervals, set maximum and minimum departure intervals, replace departure intervals greater than the maximum departure interval with the maximum departure interval, and replace departure intervals less than the minimum departure interval with the minimum departure interval; Further calculate the mean and variance of the departure interval; Using wavelet decomposition, denoising and interpolation, the positive and negative double variances of the mean of the departure interval are calculated to obtain the interval of departure time sampling; Starting from the departure time of the first train, randomly sample a departure interval within its departure interval to obtain the departure time of the next moment, and continue to randomly sample a departure interval within the departure interval of this moment, and so on, until the departure time exceeds the departure time of the last train, cut off at the departure time of the last train, terminate the sequence generation, and obtain the departure plan.