Train working diagram compilation method based on morlet parameter adaptive differential evolution algorithm
By optimizing train timetables using a differential evolution algorithm based on Morlet parameter adaptation, the problems of high parameter sensitivity and easy getting trapped in local optima in existing technologies are solved, and more efficient and stable train timetable compilation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN UNIV OF TECH
- Filing Date
- 2026-04-08
- Publication Date
- 2026-05-29
AI Technical Summary
Existing train timetable optimization methods are highly sensitive to parameters, prone to getting trapped in local optima, have high computational cost and slow convergence speed, and are difficult to adapt and optimize quickly in complex scenarios, resulting in unstable solution results and poor transferability.
A differential evolution algorithm based on Morlet parameter adaptation is adopted. The Morlet function generates adaptive scaling factors and crossover probabilities. Combined with the opposing perturbation strategy, the decision variables of the train timetable are optimized to generate a better and more stable operation plan.
It improves the quality and stability of train timetable optimization, reduces dependence on specific parameter settings, and can quickly adapt to complex or changing train operation tasks, generating better timetable schemes.
Smart Images

Figure CN122114539A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of urban rail transit management technology, and in particular to a method for compiling train timetables based on a differential evolution algorithm with Morlet parameter adaptation. Background Technology
[0002] Train timetables (also known as train operation diagrams) are a crucial component of railway transportation system operations, and their quality largely determines the operational efficiency and service level of the entire railway network. A well-designed timetable not only ensures train safety and punctuality but also maximizes transport capacity with limited track resources, thereby significantly improving overall system efficiency and passenger satisfaction. Furthermore, train operation diagrams provide fundamental support for various aspects such as rolling stock formation, driver scheduling, and station operations, playing a vital role in connection and coordination.
[0003] In existing scheduling optimization research, although intelligent optimization methods based on genetic algorithms (GA), particle swarm optimization, and NSGA-II have been applied, these methods suffer from high parameter sensitivity, strong reliance on user experience, and a tendency to get trapped in local optima; they also lack generality. Existing technologies exhibit high parameter sensitivity; conventional evolutionary algorithms are highly sensitive to parameter settings, and different parameter combinations can lead to drastically different results. Parameter adjustment typically relies on user experience and extensive experimentation, lacking unified and universal parameter setting guidelines, thus raising the application threshold. Especially when the problem's line structure or passenger flow pattern changes significantly, existing parameters may no longer be applicable, requiring model retraining. This results in poor adaptability and weak transferability of the algorithm across different application scenarios. In complex train operation optimization problems, these algorithms are prone to premature convergence during the search process, getting trapped in local optima.
[0004] Existing train timetable optimization methods suffer from high decision space dimensionality and complex variable relationships, resulting in unstable solution quality and slow optimization speed, failing to guarantee reaching the optimal solution every time. Furthermore, their high computational cost and slow convergence speed make these methods difficult to repeatedly apply or quickly recalculate in engineering scenarios. Summary of the Invention
[0005] The purpose of this invention is to address the issues of short-route organization and train operation plan optimization in train timetable compilation. It provides a train timetable compilation method based on Morlet parameter adaptive differential evolution algorithm, which improves the quality and stability of timetable optimization solutions while ensuring train operation safety and the feasibility of operational rules.
[0006] The technical solution adopted in this invention is:
[0007] A method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm includes the following steps:
[0008] Step 1: Analyze the line parameters of the long and short route operation modes to determine the decision variables for optimizing the train timetable. The decision variables include the train departure frequency of the entire line. Frequency of short-route trains Starting point of short-distance operation section and the end point ;
[0009] Step 2: Construct a single-objective optimization function for train timetable compilation based on decision variables; the optimization objective function is: ,in The total transport capacity of the line is negative. This refers to the total departure frequency. Total travel time for passengers;
[0010] Step 3, analyze and construct constraints Ω; constraints Ω include limits on the set of stations S that are allowed as endpoints of short routes, minimum departure frequency, maximum departure frequency, minimum following interval, minimum stop time and maximum stop time;
[0011] Furthermore, the route parameters include the number of stations N, the set of stations S that can be used as endpoints of short-route routes, and the OD passenger flow matrix. Cross-sectional passenger flow Inter-station travel time The average passenger boarding and alighting time τ; the long-distance and short-distance operation modes simultaneously arrange long-distance trains running the entire route and short-distance trains running in sections on the same line.
[0012] Step 4: Solve the single-objective optimization objective function using a Morlet parameter-adaptive differential evolution algorithm and output the optimal solution. This includes the following steps:
[0013] S1, Population P initialization: Using decision variables as individual codes, randomly generate an initial population of size P. A population P, where each individual represents a set of decision variables ( The solution to ) is a D-dimensional vector;
[0014] S2, Iterative Optimization: Iteratively evolve the population P, with each generation including:
[0015] Mutation operation: For the target vector in the current population P Generate a mutation vector through mutation operations. The scaling factor φ is generated using a two-stage adaptive mechanism based on Morlet functions; the expression is as follows:
[0016] ;
[0017] in, Let be the i-th mutation vector of the G-th generation. Let be the i-th target vector in the G-th generation. Individuals are randomly selected from the top p% of individuals with fitness values in the Gth generation of population P. Based on the current fitness of population P, random individuals are selected from the top p% of individuals, where p is the selection ratio. As a feasible implementation method, p is set to 10%, and the scaling factor 𝐹 is initially set to 0.5. Let P be the sampling vector from the existing population P. The sampling vector is taken from the union of the population P and the external archive H. The external archive H is used to store suboptimal solution individuals that are eliminated in the selection operation but have potential. When an individual is not selected into the next generation population P in the competition but still has some potential value, it is stored in the archive H to avoid premature loss of information.
[0018] Crossover operation: on the mutated vector With the target vector Perform cross operations to generate test vectors The crossover probability CR is generated using a two-stage adaptive mechanism and introduces an opposing perturbation strategy during the crossover process; the expression is as follows:
[0019] ;
[0020] Wherein, CR is the crossover probability, which is generated using a two-stage adaptive mechanism and introduces an opposing perturbation strategy during the crossover process; An index is randomly selected from {1,...,D} (to ensure that at least one component comes from...). ); Let i be the test vector of generation G. The j-th dimension.
[0021] ;
[0022] in, The probability of the opposing disturbance is set to 0.03; Let be the j-th dimension of the i-th individual in the population P of the G-th generation; The i-th mutation vector of generation G. The j-th dimension; This represents a weight parameter with random perturbation, whose values are sampled from a normal distribution:
[0023] ;
[0024] in, Let represent a random variable that follows a standard normal distribution with a mean of 0 and a variance of 1. The parameter σ characterizes the standard deviation of this distribution, and is set to 1 / 6 to control the strength of the disturbance. The parameter µ represents the mean of the distribution and is set to 3σ to introduce an appropriate bias into the random disturbance.
[0025] Selection operation: Based on the objective function Calculate the test vector With the target vector The fitness value is used to select the trial vector according to the greedy strategy. With the target vector Individuals with low fitness values are selected as the best individuals and enter the next generation population P, and the population size is dynamically adjusted.
[0026] Step 5, Timetable Generation: Output the optimal solution after the termination condition is met. , , , Based on the optimal solution, calculate the departure time of the first station for both the full-journey train and the shuttle train, and recursively calculate the arrival and departure times of the full-journey train and the shuttle train at each station to generate the final train timetable.
[0027] Furthermore, the negative of the optimization objective function in step 2 is the total transport capacity of the line. The expression is as follows:
[0028] ,in, This refers to the total operating distance of the entire line. This refers to the operating distance of the short-route section;
[0029] The expression for the total departure frequency is: ;
[0030] The expression for the total travel time of passengers is:
[0031] ,
[0032] in, This represents the average waiting time across the entire line section. This represents the average waiting time within the short-distance route section. This refers to the total on-line time. For the time spent in service on short-distance routes;
[0033] Specifically, the expression is as follows:
[0034] , ;
[0035] in, The passenger flow within a short-distance route is expressed as follows: ;in, The u-th row and v-th column of the OD passenger flow matrix indicates the passenger flow from each pair of stations u to station v;
[0036] The total passenger volume for the entire route is expressed as: Where N is the number of stations on the line;
[0037] On-the-go time on short-route sections: ; For the site Arrive at the station The number of passengers; The time the train is in service at station u;
[0038] On-line time for the entire route: ; For the site Arrive at the station Customer traffic, The time spent in the vehicle at station v.
[0039] Furthermore, the constraint Ω in step 3 includes the following:
[0040] ;
[0041] Where S is the set of stations that are allowed to serve as endpoints of short-trip routes; Minimum departure frequency (times / hour); This represents the maximum departure frequency (times / hour). This represents the lower limit for the number of stations passing through a short-route section. This represents the upper limit of the number of stops passing through the short-haul section; N is the number of stops on the line.
[0042] Specifically, the constraint Ω is explained as follows:
[0043] 1) The starting and ending points of the short-distance route segments both belong to the set S of stations that are allowed to be the endpoints of the short-distance route;
[0044] 2) Minimum tracking interval (seconds) Specifically, as a feasible implementation method, It is 108.
[0045] 3) Minimum departure frequency (times / hour) Maximum departure frequency (times / hour) Specifically, as a feasible implementation method, =10, =30.
[0046] 4) Minimum stopping time (seconds) And maximum stop time (seconds) Specifically, as a feasible implementation method, and .
[0047] 5) Range of the number of stations passing through the short-distance route section [ Specifically, as a feasible implementation method, [ [3,24].
[0048] Furthermore, the expression for the adaptive mechanism of the scaling factor 𝐹 in step S2 is:
[0049] ;
[0050] in, For matrix The A weighted average, matrix This represents the set of weighted averages of historical success scaling factors, where the success scaling factor is the fitness value of successfully evolved individuals from previous generations (comparing the experimental vector to the target vector). The scaling factor value used when the fitness is smaller; For from {1~ The integer randomly selected from the set size; NFE represents the current fitness evaluation count; The threshold between the two adaptive stages, ; The maximum number of evaluations is given. Cauchy() represents the perturbation term obtained by random sampling from the Cauchy distribution.
[0051] Specifically, This represents the weighted average of successful scaling factors across previous generations, reflecting the statistical characteristics of these scaling factors that positively impact population search performance. When the number of fitness evaluations (NFE) is less than the threshold ξ, When NFE is greater than or equal to ξ, ; It is the i-th value of matrix 𝐹, and also the scaling factor value corresponding to the i-th individual in the current population P, where i refers to the i-th individual in population P, and the value range is 1 to NP.
[0052] Furthermore, the Morlet function takes the following specific form:
[0053] ;
[0054] Among them, the disturbance term and The calculation formula is:
[0055] ,
[0056] ;
[0057] Where ω is the oscillation frequency, with a value of 5; β is the Gaussian decay rate, with a value of 12.5; θ is the center offset, with a value of 0.5; and α is the amplitude, with a value of 0.05. is a random number that is uniformly distributed in the interval [0,1].
[0058] Furthermore, the adaptive mechanism for the crossover probability CR in step S2 is as follows:
[0059] initial value Generated by Gaussian distribution: ,in The initial value is 0.8;
[0060] A two-stage adjustment was then implemented:
[0061] when hour, ;
[0062] when hour, ;
[0063] Among them, threshold .
[0064] Furthermore, in step S2, the population size adjustment strategy selected for the operation is linear decrease to enhance the algorithm's development capability in the later stages of evolution, as shown in the following formula:
[0065] ;
[0066] in, , and These represent the next generation, the largest, and the smallest population sizes, respectively. For the current number of assessments, To maximize the number of evaluations, the operator Used to round a number to the nearest integer.
[0067] Furthermore, step 5 calculates the dwell time at each station. The method is as follows:
[0068] Step 5-1-1: First calculate the total time for boarding and alighting at station m per hour:
[0069] (Hour);
[0070] in, This represents the average time for boarding and alighting.
[0071] Step 5-1-2: Calculate the dwell time (in hours) for each train at station m according to the average allocation method:
[0072] ;
[0073] Step 5-1-3, finally combine the stopping constraints to truncate and obtain the stopping time. ;
[0074] ;
[0075] in, and These represent the minimum and maximum stopping times of the train at the station, respectively. This means finding the minimum value from a given set of numbers. This indicates taking the maximum value from a given set of numbers.
[0076] Furthermore, the method for generating the timetable in step 5 is as follows:
[0077] Step 5-2-1: Calculate the departure interval of the entire route at the starting station 1. (Hours), the shuttle bus departs from the starting station. Departure interval (Hour);
[0078] Step 5-2-2: Calculate the arrival station from the origin station 1. time ;
[0079] Step 5-2-3, starting from the first train time Initially, based on departure intervals and The departure time of each train at the first station is calculated recursively; however, the operating range of the shuttle train is limited to the stations. Arrive at the station .
[0080] Specifically, the formula for calculating the departure time of the qth train at station 1 (the starting point) is as follows:
[0081] ;
[0082] in, That's the departure time of the first bus. This refers to the departure time of train q at station 1 for the entire journey.
[0083] At the station The formula for calculating the departure time of the qth shuttle bus (from the origin) is as follows:
[0084] ;
[0085] in, For minibuses at the station The departure time This means finding the minimum value from a given set of numbers. The candidate departure time indicates the location of the minibus at the station. The departure time of the p-th train is calculated using the following formula: ; For the entire journey, the train is at the station. The departure time of the qth train is calculated using the following formula: ;
[0086] Step 5-2-4, starting from the first bus time Start, based on runtime and stop time The arrival and departure times of each train at each station are calculated recursively to form the train timetable;
[0087] Specifically, for each train, the arrival time is recursively calculated. For any train (whether a full-journey train or a short-journey train), let's assume its departure time at station s. yes Its arrival time at station S is Then we have:
[0088] ;
[0089] ;
[0090] ;
[0091] The entire journey starts from station 1 and proceeds recursively to station N using the formula above; the shuttle bus starts from station... Departure, only recursively push to the station .in, Let d be the travel time from station s to station s+1, and d be the stop time matrix. The stopping time at station s+1; This represents the arrival time of the vehicle at station s+1. This represents the departure time of the vehicle at station s+1.
[0092] The present invention, employing the above technical solutions, offers the following advantages over existing technologies: 1) It adaptively adjusts the search parameters based on the objective function improvement magnitude of candidate timetables and generates opposing schemes for candidate timetables using a conflicting perturbation strategy. This enhances the ability to explore the feasible solution space, thereby obtaining a better and more stable timetable scheme while satisfying the constraints of the train timetable. 2) It dynamically adjusts parameters based on the Morlet parameter adaptive mechanism to adapt to the needs of different problems, reducing dependence on specific parameter settings and maintaining high solution performance even when facing complex or changing train timetable optimization tasks. 3) The present invention has less dependence on historical data and can quickly generate optimization schemes even when new lines are put into operation, flexibly adapting to various dynamic changes.
[0093] This invention addresses the organization of short routes and optimization of train schedules in train timetable preparation. It tackles the problems of candidate timetables easily getting trapped in local optima under operational constraints and being sensitive to parameter settings, leading to fluctuations in the solution results. Under the premise of ensuring train safety and the feasibility of operational rules, this invention improves the quality and stability of timetable optimization solutions. Attached Figure Description
[0094] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments;
[0095] Figure 1 This is a flowchart illustrating the train timetable compilation method based on the Morlet parameter adaptive differential evolution algorithm of the present invention.
[0096] Figure 2 This is a schematic diagram illustrating the principle of the large and small route operation mode;
[0097] Figure 3 This is a flowchart illustrating the process of solving a single-objective optimization objective function using a differential evolution algorithm based on Morlet parameter adaptation. Detailed Implementation
[0098] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0099] like Figures 1 to 3 As shown in any of the accompanying drawings, this invention discloses a method for compiling train timetables based on a differential evolution algorithm with Morlet parameter adaptation, which includes the following steps:
[0100] Step 1: Analyze the line parameters of the long and short route operation modes to determine the decision variables for optimizing the train timetable. The decision variables include the train departure frequency of the entire line. Frequency of short-route trains Starting point of short-distance operation section and the end point ;
[0101] Step 2: Construct a single-objective optimization function for train timetable compilation based on decision variables; the optimization objective function is: ,in The total transport capacity of the line is negative. This refers to the total departure frequency. Total travel time for passengers;
[0102] Step 3, analyze and construct constraints Ω; constraints Ω include limits on the set of stations S that are allowed as endpoints of short routes, minimum departure frequency, maximum departure frequency, minimum following interval, minimum stop time and maximum stop time;
[0103] Furthermore, the route parameters include the number of stations N, the set of stations S that can be used as endpoints of short-route routes, and the OD passenger flow matrix. Cross-sectional passenger flow Inter-station travel time The average passenger boarding and alighting time τ; the long-distance and short-distance operation modes simultaneously arrange long-distance trains running the entire route and short-distance trains running in sections on the same line.
[0104] Step 4: Solve the single-objective optimization objective function using a Morlet parameter-adaptive differential evolution algorithm and output the optimal solution. This includes the following steps:
[0105] S1, Population P initialization: Using decision variables as individual codes, randomly generate an initial population of size P. A population P, where each individual represents a set of decision variables ( The solution to ) is a D-dimensional vector;
[0106] S2, Iterative Optimization: Iteratively evolve the population P, with each generation including:
[0107] Mutation operation: For each target vector in the current population P Generate mutation vectors The scaling factor φ is generated using a two-stage adaptive mechanism based on Morlet functions; the expression is as follows:
[0108] ;
[0109] in, Let be the i-th mutation vector of the G-th generation. Let be the i-th target vector in the G-th generation. Individuals are randomly selected from the top p% of individuals with fitness values in the Gth generation of the population P. Random individuals are selected from the top p% of individuals based on the current fitness of the population P, where p is the selection ratio. Let P be the sampling vector from the existing population P. The sampling vector is taken from the union of the population P and the external archive H. The external archive H is used to store suboptimal solution individuals that are eliminated in the selection operation but have potential. When an individual is not selected into the next generation population P in the competition but still has some potential value, it is stored in the archive H to avoid premature loss of information.
[0110] Crossover operation: on the mutated vector With the target vector Perform cross operations to generate test vectors The crossover probability CR is generated using a two-stage adaptive mechanism and introduces an opposing perturbation strategy during the crossover process; the expression is as follows:
[0111] ;
[0112] Wherein, CR is the crossover probability, which is generated using a two-stage adaptive mechanism and introduces an opposing perturbation strategy during the crossover process; An index is randomly selected from {1,...,D} (to ensure that at least one component comes from...). ). Let i be the test vector of generation G. The j-th dimension.
[0113] ;
[0114] in, Let be the j-th dimension of the i-th individual in the population P of the G-th generation; The i-th mutation vector of generation G. The j-th dimension; Let the probability of the opposing disturbance be set to 0.03. This represents a weight parameter with random perturbation, whose values are sampled from a normal distribution:
[0115] ;
[0116] in, Let represent a random variable that follows a standard normal distribution with a mean of 0 and a variance of 1. The parameter σ characterizes the standard deviation of this distribution, and is set to 1 / 6 to control the strength of the disturbance. The parameter µ represents the mean of the distribution and is set to 3σ to introduce an appropriate bias into the random disturbance.
[0117] Selection operation: Based on the objective function Calculate the test vector With the target vector The fitness value is used to select the trial vector according to the greedy strategy. With the target vector Individuals with low fitness values are selected as the best individuals and enter the next generation population P, and the population size is dynamically adjusted.
[0118] Step 5, Timetable Generation: Output the optimal solution after the termination condition is met. , , , Based on the optimal solution, calculate the departure time of the first station for both the full-journey train and the shuttle train, and recursively calculate the arrival and departure times of the full-journey train and the shuttle train at each station to generate the final train timetable.
[0119] Furthermore, the negative of the optimization objective function in step 2 is the total transport capacity of the line. The expression is as follows:
[0120] ,in, This refers to the total operating distance of the entire line. This refers to the operating distance of the short-route section;
[0121] The expression for the total departure frequency is: ;
[0122] The expression for the total travel time of passengers is:
[0123] ,
[0124] in, This represents the average waiting time across the entire line section. This represents the average waiting time within the short-distance route section. This refers to the total on-line time. For the time spent in service on short-distance routes;
[0125] Specifically, the expression is as follows:
[0126] , ;
[0127] in, The passenger flow within a short-distance route is expressed as follows: ;in Representation matrix The u-th row and v-th column represents the passenger flow from each pair of stations u to station v;
[0128] The total passenger volume for the entire route is expressed as: Where N is the number of stations on the line;
[0129] On-the-go time on short-route sections: ; For the site Arrive at the station The number of passengers; The time the train is in service at station u;
[0130] On-line time for the entire route: ; For the site Arrive at the station Customer traffic, The time spent in the vehicle at station v.
[0131] Furthermore, the constraint Ω in step 3 includes the following:
[0132] ;
[0133] Where S is the set of stations that are allowed to serve as endpoints of short-trip routes; Minimum departure frequency (times / hour); This represents the maximum departure frequency (times / hour). This represents the lower limit for the number of stations passing through a short-route section. This represents the upper limit of the number of stops passing through the short-haul section; N is the number of stops on the line.
[0134] Specifically, the constraint Ω is explained as follows:
[0135] 1) The starting and ending points of the short-distance route segments both belong to the set S of stations that are allowed to be the endpoints of the short-distance route;
[0136] 2) Minimum tracking interval (seconds) Specifically, as a feasible implementation method, It is 108.
[0137] 3) Minimum departure frequency (times / hour) Maximum departure frequency (times / hour) Specifically, as a feasible implementation method, =10, =30.
[0138] 4) Minimum stopping time (seconds) And maximum stop time (seconds) Specifically, as a feasible implementation method, and .
[0139] 5) Range of the number of stations passing through the short-distance route section [ Specifically, as a feasible implementation method, [ [3,24].
[0140] Furthermore, the expression for the adaptive mechanism of the scaling factor 𝐹 in step S2 is:
[0141] ;
[0142] in, The weighted average of historical success scaling factors; NFE represents the current fitness evaluation count; The threshold between the two adaptive stages, ; The maximum number of evaluations is given. Cauchy() represents the perturbation term obtained by random sampling from the Cauchy distribution.
[0143] Specifically, This represents the weighted average of successful scaling factors across previous generations, reflecting the statistical characteristics of these scaling factors that positively impact population search performance. Experimental vectors are calculated based on the objective function. and target vector fitness value, trial vector The fitness value is less than the corresponding target vector The scaling factor used for fitness values is the success scaling factor. When the number of fitness evaluations (NFE) is less than the threshold ξ, When NFE is greater than or equal to ξ, ;
[0144] Furthermore, the Morlet function takes the following specific form:
[0145] ;
[0146] Among them, the disturbance term and The calculation formula is:
[0147] ,
[0148] ;
[0149] Where ω is the oscillation frequency, with a value of 5; β is the Gaussian decay rate, with a value of 12.5; θ is the center offset, with a value of 0.5; and α is the amplitude, with a value of 0.05. is a random number that is uniformly distributed in the interval [0,1].
[0150] Furthermore, the adaptive mechanism for the crossover probability CR in step S2 is as follows:
[0151] initial value Generated by Gaussian distribution: ,in The initial value is 0.8;
[0152] A two-stage adjustment was then implemented:
[0153] when hour, ;
[0154] when hour, ;
[0155] Among them, threshold .
[0156] Furthermore, in step S2, the population size adjustment strategy selected for the operation is linear decrease to enhance the algorithm's development capability in the later stages of evolution, as shown in the following formula:
[0157] ;
[0158] in, , and These represent the next generation, the largest, and the smallest population sizes, respectively. For the current number of assessments, The maximum number of evaluations is used; each time an individual calculates its fitness value, it consumes one evaluation attempt. Once the maximum number of evaluations is used up, the result is output. (Operator) Used to round a number to the nearest integer.
[0159] Furthermore, step 5 calculates the dwell time at each station. The method is as follows:
[0160] Step 5-1-1: First calculate the total time for boarding and alighting at station m per hour:
[0161] (Hour);
[0162] Where τ represents the average time for boarding and alighting;
[0163] Step 5-1-2: Calculate the dwell time (in hours) for each train at station m according to the average allocation method:
[0164] ;
[0165] Step 5-1-3, finally combine the stopping constraints to truncate and obtain the stopping time. ;
[0166] ;
[0167] in, and These represent the minimum and maximum stopping times of the train at the station, respectively. This means finding the minimum value from a given set of numbers. This indicates taking the maximum value from a given set of numbers.
[0168] Furthermore, the method for generating the timetable in step 5 is as follows:
[0169] Step 5-2-1: Calculate the departure interval of the entire route at the starting station 1. (Hours), the shuttle bus departs from the starting station. Departure interval (Hour);
[0170] Step 5-2-2, calculate the distance from the starting station 1 to time ;
[0171] Step 5-2-3, starting from the first train time Initially, based on departure intervals and The departure time of each train at the first station is calculated recursively; however, the operating range of the shuttle train is limited to the stations. Arrive at the station .
[0172] Specifically, the formula for calculating the departure time of the qth train at station 1 (the starting point) is as follows:
[0173] ;
[0174] in, That's the departure time of the first bus. This refers to the departure time of train q at station 1 for the entire journey.
[0175] At the station The formula for calculating the departure time of the qth shuttle bus (from the origin) is as follows:
[0176] ;
[0177] in, For minibuses at the station The departure time This means taking the minimum value from a given set of numbers. The candidate departure times are calculated using the following formula: ; For the entire journey, the train is at the station. The departure time of the qth train is calculated using the following formula: ;
[0178] Step 5-2-4, starting from the first bus time Initially, based on the runtime matrix and stop time matrix The arrival and departure times of each train at each station are calculated recursively to form the train timetable;
[0179] Specifically, for each train, the arrival time is recursively calculated. For any train (whether a full-journey train or a short-journey train), let's assume its departure time at station s. yes Its arrival time at station S is Then we have:
[0180] ;
[0181] ;
[0182] ;
[0183] The entire journey starts from station 1 and proceeds recursively to station N using the formula above; the shuttle bus starts from station... Departure, only recursively push to the station .in, Let d be the travel time from station s to station s+1, and d be the stop time matrix. The stopping time at station s+1; This represents the arrival time of the vehicle at station s+1. This represents the departure time of the vehicle at station s+1.
[0184] The specific principles of this invention will be explained in detail below:
[0185] The long-distance / short-distance operation mode is a train organization method based on differentiated passenger flow demands. This mode achieves precise spatial matching of transport capacity by simultaneously scheduling long-distance trains (running the entire route) and short-distance trains (running only sections) on the same line. Long-distance trains cover the entire line, ensuring overall transport continuity; short-distance trains primarily serve densely populated sections, thereby increasing the frequency of departures in high-demand areas and differentiating the supply of transport capacity spatially.
[0186] By optimizing the departure frequency parameters of large and small route trains (Train departure frequency for the entire line) and (Frequency of short-route trains), and the starting and ending points of the short-route trains' operating sections. and (The operating sections of short-route trains) can be used to obtain the target transport capacity and corresponding departure intervals for each section. , as well as , As the optimization decision variable, a Morlet-based parameter adaptive differential evolution algorithm is used to obtain the optimal train schedule. Then, based on the given interval travel time and station information, combined with passenger flow data for each station, the arrival time of each train is calculated one by one, thereby generating the timetable for both long and short route trains.
[0187] Optimization Model Construction: The optimization model focuses on minimizing the overall objective function, while also considering maximizing transport capacity, minimizing costs, and optimizing passenger experience. The model is built based on route parameters, including the number of stations. OD passenger flow matrix Cross-sectional passenger flow Inter-station travel time And the average passenger boarding and alighting time τ. (Set) Indicates whether a station can serve as a route origin / end point. OD matrix This indicates the passenger flow between each pair of stations u and v, that is, the number of passengers who board at station u and alight at station v. (Cross-sectional passenger flow) Indicates on the site arrive Passenger flow. Operating time within the designated area. Indicates site arrive The running time. The average passenger boarding and alighting time τ (seconds / person), in a feasible implementation, is 0.04.
[0188] This model includes three optimization objectives:
[0189] 1) Maximize the total transport capacity per unit hour of the line as follows:
[0190] ;
[0191] Then there is ;
[0192] This represents the total transport capacity per unit hour of the line.
[0193] 2) Minimize the total departure frequency: Operating costs are positively correlated with departure frequency. The model objective is: ;
[0194] 3) Minimize total passenger travel time:
[0195] (1) The average time for passengers to get on and off the bus is: τ = 0.04 seconds;
[0196] The single-station boarding time t is the additional time loss caused by all passengers boarding and alighting related to station m, and the corresponding calculation formula is:
[0197] ;
[0198] Where m can take the values 1, 2, 3, 4, 5, 6…N.
[0199] (2) Average waiting time:
[0200] , ;
[0201] (3) Time spent in the vehicle:
[0202] On-the-go time on short-route sections: ;
[0203] On-line time for the entire route: ;
[0204] (4) Total passenger time target: ;
[0205] The final target optimization model is: .
[0206] According to parameters and The passenger flow of the entire line is divided into passenger flow of short-route sections and passenger flow of the entire line;
[0207] The expression for passenger flow in short-route sections is:
[0208] ;
[0209] in, Representation matrix The u-th row and v-th column represents the passenger flow from each pair of stations u to station v;
[0210] The expression for the total passenger flow of the entire line is:
[0211] ;
[0212] Where N is the number of stations on the line, and in one feasible implementation, the line has a total of N=30 stations.
[0213] Line running distance calculation: 1) Total line running distance ;2) Distance between short-distance sections ;
[0214] Constraints ensure the feasibility and safety of the solution, including the following:
[0215] 1) The start and end points of the short-distance bus section must be stations that are allowed to be the endpoints of the short-distance bus route. The set of stations that are allowed to be the endpoints of the short-distance bus route is S.
[0216] 2) Minimum tracking interval (seconds) As a feasible implementation method, It is 108.
[0217] 3) Minimum / maximum departure interval (seconds) and As a feasible implementation method, [120, 360] can be selected, corresponding to the minimum / maximum departure frequency. , .
[0218] 4) Minimum / maximum stopping time (seconds) and As a feasible implementation method, [20, 120] can be selected.
[0219] 5) Range of stations along short-haul routes and As a feasible implementation method, [3,24] can be selected.
[0220] The decision variables for the solution method based on the differential evolution algorithm are: , , and The corresponding constraints are as follows:
[0221] ;
[0222] Table 1: Core parameters of the basic differential evolution algorithm (DE)
[0223]
[0224] This invention employs a Morlet parameter-adaptive differential evolution (DE) algorithm to solve the aforementioned optimization model. Its core lies in dynamically adjusting parameters to avoid premature convergence and introducing opposing perturbation strategies to enhance diversity. The algorithm flow includes initialization, iterative optimization (mutation, crossover, selection), and termination determination, with the specific steps as follows:
[0225] Step 1: Using decision variables ( , , As an individual code, initialize the population P, and randomly generate A D-dimensional vector is defined and constrained within the feasible region.
[0226] ;
[0227] , , ;
[0228] Let be the j-th dimension of the i-th individual.
[0229] Each component is randomly generated based on its upper and lower bounds:
[0230] , ;
[0231] Here, rand(0,1) represents a uniformly random number in the range [0,1]. If an individual's dimension exceeds the boundary, that dimension is reinitialized until the individual meets the constraints.
[0232] Step 2: Calculate the initial fitness. Calculate the objective function value for each individual in the initial population P. The specific formula is as follows:
[0233] ;
[0234] Where G is the current iteration number;
[0235] Step 3: Entering the iteration (core part) Each generation of DE contains three main operations: mutation, crossover, and selection.
[0236] Differential mutation (Mutation) for each target vector Randomly select two distinct indices that are not equal to i. .
[0237] Generate a mutated vector (donor vector):
[0238] ;
[0239] in, Let be the i-th mutation vector of the G-th generation. Let be the i-th target vector in the G-th generation. For the first p% of random individuals in the population of generation G, the first p% of individuals are randomly selected based on the current population fitness, where p is the selection ratio. Let P be the sampling vector from the existing population P. The sample vector is taken from the union of the population P and the external archive H. Archive H is used to retain suboptimal solutions that are eliminated during the selection process. When an individual is not selected into the next generation of population P but still has some potential value, it is stored in archive H to avoid premature loss of information. This archive is dynamically updated and includes a mechanism for randomly discarding individuals. This mechanism is activated when the number of archives exceeds the maximum number of archives. The scaling factor φ (controls the difference amplitude) is generated in two stages: In the early stage, φ is modulated by the Morlet function, which enhances the search's exploration capability by introducing oscillations and local perturbations, while simultaneously constraining φ within the interval [0.4, 0.6] to maintain stability. The adaptive generation process of φ is defined as follows:
[0240] ;
[0241] in, This represents the weighted average of successful scaling factors across previous generations, reflecting the statistical characteristics of these scaling factors that positively impact population search performance. The experimental vector is calculated based on the objective function. and target vector fitness, test vector The fitness value is less than the corresponding target vector The scaling factor used for fitness values is the success scaling factor. NFE represents the current fitness evaluation count, NFEmax represents the maximum evaluation count, and Cauchy() represents the perturbation term randomly sampled from the Cauchy distribution. ξ represents the threshold between two adaptive phases, set to 0.4. .
[0242] ;
[0243] To effectively control the scaling factor φ, two perturbation terms were introduced. and .in, The controlled oscillation perturbation term, generated from a simplified form of the real part of the Morlet function, exhibits significant periodicity and local perturbation characteristics, thus introducing periodic but bounded changes during parameter generation. On the other hand, It is a lightweight perturbation used to introduce smooth, non-linear fluctuations, effectively preventing the K value from falling into a single evolutionary trend. Its specific definition is as follows:
[0244] ;
[0245] Where ω represents the oscillation frequency, with a value of 5; β is the Gaussian decay rate, with a value of 12.5; θ represents the center offset, with a value of 0.5; and α represents the amplitude, with a value of 0.05. Meanwhile, This represents a uniformly distributed random number taken from the interval [0,1].
[0246] Crossover uses binary crossover to generate test vectors. For each dimension j=1,...,D:
[0247] ;
[0248] Where CR is the crossover probability. An index is randomly selected from {1,...,D} (to ensure that at least one component comes from...). ).
[0249] ;
[0250] here, Let j be the dimension of the i-th individual in the population P of generation G; The i-th mutation vector of generation G. The j-th dimension; Let the probability of the opposing disturbance be set to 0.03. This represents a weight parameter with random perturbation, whose values are sampled from a normal distribution:
[0251] ;
[0252] in, Let represent a random variable that follows a standard normal distribution with a mean of 0 and a variance of 1. The parameter σ characterizes the standard deviation of this distribution, and is set to 1 / 6 to control the strength of the disturbance. The parameter µ represents the mean of the distribution and is set to 3σ to introduce an appropriate bias into the random disturbance.
[0253] The parameter CR determines the probability that an individual inherits components from the mutation vector. A larger CR guides offspring toward a local optimum, accelerating convergence; while a smaller CR increases population diversity and reduces the risk of premature convergence. In this invention, CR is generated according to a Gaussian distribution and adjusted in two stages to meet the search requirements of different evolutionary stages. This means finding the minimum value from a given set of numbers. This represents finding the maximum value from a given set of numbers, and is a stage threshold. Set to 0.4 .
[0254] ;
[0255] ;
[0256] After each iteration, the algorithm records the successful scaling factors and crossover rates, and weights them according to their contribution to fitness improvement. As shown in the following formula, the algorithm uses historical search information to dynamically adjust the parameter distribution, thereby improving the flexibility of parameter adaptation and enhancing optimization accuracy.
[0257] ;
[0258] ;
[0259] in, and These represent the sets of all successful CR and F values, respectively. Parameters and The initial values are set to 0.5 and 0.8 respectively. and They represent and The absolute difference in fitness between the original target vector and its corresponding successful trial vector. For set The Each 𝐹 value is a normalized weight coefficient; For set The The normalized weighting coefficients for each CR value. For the set of successful scaling factors Weighted statistics; For the set of success crossover probability factors The weighted statistics. The matrix corresponding to the Gth generation of evolution The One value; The successful crossover probability factor matrix corresponding to the Gth generation evolution. The Values.
[0260] Selection: For the test vector Conduct an assessment and compare it with current individuals:
[0261] ;
[0262] In other words, if the experimental solution is better, it is accepted; otherwise, the original solution is retained. This is greedy selection, which ensures that the population quality does not decline.
[0263] The population size is adjusted using a linear decreasing strategy to enhance the algorithm's development capabilities in later evolutionary stages, as shown in the following equation:
[0264] ;
[0265] in, , and These represent the next generation, the maximum, and the minimum population size, respectively. Operators Used to round a number to the nearest integer.
[0266] The selected populations were sorted by fitness from smallest to largest, and the previous populations were selected... Each individual solution is iterated over to the next generation. These three steps constitute the update process for each generation, which is repeated until a termination condition is met (reaching the maximum number of function evaluations or finding a solution with sufficient accuracy). Finally, the current optimal solution is returned as the algorithm's output.
[0267] Timetable generation: When the algorithm meets the termination condition (such as reaching the maximum number of evaluations), the optimal solution is output. , , , The specific steps are as follows:
[0268] First, calculate the train's stopping time at each station: the time spent boarding and alighting at that station per hour.
[0269] (Hour);
[0270] Where u and v refer to station u and station v respectively, and their values range from 1 to N.
[0271] The number of trains passing through station m within an hour depends on whether it is on a short-route section:
[0272] like or Only the entire route is traversed by train, and the frequency is... (columns / hour);
[0273] like There are full-trip buses and shuttle buses available, with frequencies as follows: + .
[0274] Therefore, the stopping time (in seconds) of each train at station m can be calculated using the "average distribution" approach:
[0275] ;
[0276] Combined with station constraints , Cut off in seconds. This means finding the minimum value from a given set of numbers. This means finding the maximum value from a given set of numbers.
[0277] ;
[0278] Calculate departure time. This refers to the departure time of the qth train at station u.
[0279] Departure times for the entire route, outer section (full route) or :
[0280] (Second);
[0281] Departure time of the qth train at station 1 (originating point) :
[0282] ;
[0283] in, The first bus departs at 07:00:00.
[0284] Shuttle bus departure times: Shuttle bus route (full route + shuttle bus) The total number of shuttle bus departures within one hour is: The departure interval is... .
[0285] (1) First calculate "from the starting station 1 to "time" (Related only to running time and stop time):
[0286] ;
[0287] (2) The train stays at stations throughout the entire journey The departure times are: This refers to the qth train at the station. Departure time:
[0288] ;
[0289] (3) At the station The formula for calculating the departure time of the qth shuttle bus (from the origin) is as follows:
[0290] ;
[0291] in, For minibuses at the station The departure time This means taking the minimum value from a given set of numbers. The candidate departure times are calculated using the following formula: Candidate departure times that satisfy the minimum tracking interval constraint constitute the shuttle bus at the origin station. The set of feasible departure times. This constraint is used to ensure the operational safety and timing coordination between shuttle buses and full-route buses, further achieving cost savings.
[0292] From the first train time Start, based on runtime and stop time The entire timetable is derived by using "departure time + travel time + stop time":
[0293] For each train, the departure times at each station are recursively calculated. For any train (whether on a full route or a short route), assume its departure time at station s is... Its arrival time at station S is Then we have: , ;
[0294] The entire journey starts from station 1 and proceeds recursively to station N using the formula above; the shuttle bus starts from station... Departure, only recursively push to the station .in, Let d be the travel time from station s to station s+1, and d be the stop time matrix. The stopping time at station s+1; This represents the arrival time of the vehicle at station s+1. This represents the departure time of the vehicle at station s+1.
[0295] The present invention, employing the above technical solutions, offers the following advantages over existing technologies: 1) It adaptively adjusts the search parameters based on the objective function improvement magnitude of candidate timetables and generates opposing schemes for candidate timetables using a conflicting perturbation strategy. This enhances the ability to explore the feasible solution space, thereby obtaining a better and more stable timetable scheme while satisfying the constraints of the train timetable. 2) It dynamically adjusts parameters based on the Morlet parameter adaptive mechanism to adapt to the needs of different problems, reducing dependence on specific parameter settings and maintaining high solution performance even when facing complex or changing train timetable optimization tasks. 3) The present invention has less dependence on historical data and can quickly generate optimization schemes even when new lines are put into operation, flexibly adapting to various dynamic changes.
[0296] This invention addresses the organization of short routes and optimization of train schedules in train timetable preparation. It tackles the problems of candidate timetables easily getting trapped in local optima under operational constraints and being sensitive to parameter settings, leading to fluctuations in the solution results. Under the premise of ensuring train safety and the feasibility of operational rules, this invention improves the quality and stability of timetable optimization solutions.
[0297] Obviously, the described embodiments are only a part of the embodiments of this application, not all of them. Without conflict, the embodiments and features in the embodiments of this application can be combined with each other. The components of the embodiments of this application described and illustrated herein can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
Claims
1. A method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm, characterized in that: Including the following steps: Step 1: Analyze the line parameters of the long and short route operation modes to determine the decision variables, including the train departure frequency of the entire line. Frequency of short-route trains Starting point of short-distance operation section and the end point ; Step 2, construct the single-objective optimization objective function: ,in, The total transport capacity of the line is negative. This refers to the total departure frequency. Total travel time for passengers; Step 3: Analyze and construct the constraints Ω, including the limits on the set of stations at the endpoints of the short route, the minimum departure frequency, the maximum departure frequency, the minimum following interval, the minimum stop time, and the maximum stop time; Step 4: Solve the single-objective optimization objective function using the Morlet parameter-adaptive differential evolution algorithm, and output the optimal solution, including: S1, using decision variables as individual codes, randomly generates the initial size. A population P, where each individual represents a set of decision variables ( The solution to ) is a D-dimensional vector; S2, iterative evolution of population P, each generation includes: Mutation operation: For the target vector of the current population P Generate a mutation vector through mutation operations. The expression is: ; in, Let i be the target vector of generation G. The mutation vector, Individuals randomly selected from the top p% of individuals with fitness values in generation G of population P; Let be the sampling vector of population P. is the sampled vector of the union of population P and external archive H, where external archive H is used to store individuals with potential suboptimal solutions that are eliminated in the selection operation; is the scaling factor generated by a two-stage adaptive mechanism using the Morlet function; Crossover operation: mutates the vector With the target vector Cross-generating test vectors The expression is: ; Among them, the crossover probability CR is generated using a two-stage adaptive mechanism and introduces an opposing perturbation strategy; A random index in {1,...,D}; To generate a random number in the range [0,1); Let i be the test vector of generation G. The j-th dimension; ; in, target vector The j-th dimension; For the probability of opposing perturbations These are weight parameters sampled from a normal distribution with random perturbations. The i-th mutation vector of generation G. The j-th dimension; ; in, , and µ are the random variables, standard deviation, and mean, respectively, which follow a standard normal distribution with mean of 0 and variance of 1; Selection operation: Calculate the trial vector from the objective function. With the target vector The fitness values of the two individuals are used to select the optimal individual with the smaller fitness value from the two individuals based on a greedy strategy, and the population size is dynamically adjusted accordingly. Step 5: Output the optimal solution after the termination condition is met. , , , Based on the optimal solution, calculate the first departure time of the full-journey train and the short-journey train, and recursively calculate the arrival and departure times of each station to generate the train timetable.
2. The method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm according to claim 1, characterized in that: The route parameters in step 1 include the number of stations N, the set of stations S that are allowed to be the endpoints of short-route routes, and the OD matrix. Inter-station travel time Cross-sectional passenger flow The average passenger boarding and alighting time τ; the long-distance and short-distance operation modes simultaneously arrange long-distance trains running the entire route and short-distance trains running in sections on the same line.
3. The method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm according to claim 1, characterized in that: The negative of the objective function in step 2 is the total transport capacity of the line. The expression is as follows: ,in, This refers to the total operating distance of the entire line. This refers to the operating distance of the short-route section; The expression for the total departure frequency is: ; Total travel time for passengers The expression is: , in, This represents the average waiting time across the entire line section. This represents the average waiting time within the short-distance route section. This refers to the total on-line time. This refers to the time the vehicle is in service on short-distance routes.
4. The method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm according to claim 3, characterized in that: The expression for average waiting time is as follows: Average waiting time for short-distance routes: ;in, The passenger flow within a short-distance route is expressed as follows: ;in, Passenger flow matrix The u-th row and v-th column represents the passenger flow from each pair of stations u to station v; Average waiting time across the entire line: ; The total passenger volume for the entire route is expressed as: Where N is the number of stations on the line; On-the-go time on short-route sections: ; For the site Arrive at the station The number of passengers; The time the train is in service at station u; On-line time for the entire route: ; For the site Arrive at the station Customer traffic, The time spent in the vehicle at station v.
5. The method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm according to claim 1, characterized in that: The constraints Ω in step 3 include the following: ; Where S is the set of stations that are allowed to serve as endpoints of short-trip routes; Minimum departure frequency; This represents the maximum departure frequency. This represents the lower limit for the number of stations passing through a short-route section. N represents the upper limit of the number of stations passing through a short-haul section, where N is the number of stations on the line.
6. The method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm according to claim 1, characterized in that: The expression for the adaptive mechanism of the scaling factor 𝐹 in step S2 is: ; in, The set of weighted averages of successful scaling factors from previous generations. The The value, the successful scaling factor is the test vector calculated based on the objective function. The fitness value is less than the corresponding target vector calculated based on the objective function. The scaling factor used when calculating the fitness value; For from {1~ An integer randomly selected from the set size; represents the scaling factor value corresponding to the i-th individual in the current population P; NFE represents the current fitness evaluation count. The threshold between the two adaptive stages, ; The maximum number of evaluations; Cauchy() represents the perturbation term obtained by random sampling from the Cauchy distribution; The Morlet function takes the following form: ; Among them, the disturbance term and The calculation formula is: , ; Where ω is the oscillation frequency; β is the Gaussian decay rate; θ is the center offset; and α is the amplitude. is a random number uniformly distributed in the interval [0,1]. and These are the sine and cosine functions, respectively.
7. The method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm according to claim 6, characterized in that: The adaptive mechanism for the crossover probability CR in step S2 is as follows: Crossover probability Generated by Gaussian distribution: ,in The initial value is 0.8; A two-stage adjustment was then implemented: when hour, ; when hour, ; Among them, threshold This means finding the minimum value from a given set of numbers. This indicates taking the maximum value from a given set of numbers.
8. The method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm according to claim 1, characterized in that: In step S2, the population size adjustment strategy selected for the operation is linear decrease, as shown in the following formula: ; in, , and These represent the next generation, the largest, and the smallest population sizes, respectively. For the current number of assessments, To maximize the number of evaluations, the operator Used to round a number to the nearest integer.
9. The method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm according to claim 1, characterized in that: Step 5 calculates the dwell time at each station. The method is as follows: Step 5-1-1: First calculate the total time for boarding and alighting at station m per hour: (Hour); in, This represents the average time for boarding and alighting. Passenger flow matrix The m-th row and u-th column represents the passenger flow from station m to station u; Passenger flow matrix The v-th row and m-th column represents the passenger flow from station v to station m, and N is the number of stations on the line; Step 5-1-2: Calculate the dwell time for each train at station m according to the average allocation method. ; Step 5-1-3, finally combine the stopping constraints to truncate and obtain the stopping time. ; ; in, and These represent the minimum and maximum stopping times of the train at the station, respectively. This means finding the minimum value from a given set of numbers. This indicates taking the maximum value from a given set of numbers.
10. The method for compiling train timetables based on Morlet parameter adaptive differential evolution algorithm according to claim 1, characterized in that: Step 5-2-1: Calculate the departure interval of the entire route at the starting station 1. The minibus stops at the starting station. Departure interval ; Step 5-2-2: Calculate the arrival station from the origin station 1. time ;in, The time taken to travel from station u to station u+1. The parking time at station u+1; Step 5-2-3, starting from the first train time Initially, based on departure intervals and The departure time of each train at the first station is calculated recursively; however, the operating range of the shuttle train is limited to the stations. Arrive at the station ; The formula for calculating the departure time of the qth train at station 1 is as follows: ; in, This is the departure time of the first bus. This refers to the departure time of the qth train at station 1 throughout the entire journey; At the station The formula for calculating the departure time of the qth shuttle bus is as follows: ; in, For minibuses at the station Departure time; This means finding the minimum value from a given set of numbers; The candidate departure times are calculated using the following formula: ; For the entire journey, the train is at the station. The departure time of the qth train is calculated using the following formula: ; Step 5-2-4, starting from the first bus time Start, based on runtime and stop time The arrival and departure times of each train at each station are calculated recursively to form the train timetable; the details are as follows: For each train, the arrival time is recursively calculated, assuming the departure time of any train at station s. The specific time is The arrival time at station S is Then we have: ; ; ; The entire journey starts from station 1 and proceeds recursively to station N using the formula above; the shuttle bus starts from station... Departure, only recursively push to the station ;in, This represents the travel time from station s to station s+1. The stopping time at station s+1; This represents the arrival time of the vehicle at station s+1. This represents the departure time of the vehicle at station s+1.