Subway crew scheduling plan optimization based on generation-selection two-stage algorithm

By adopting the generation-select two-stage algorithm in the optimization of subway flight scheduling schedules, building a spatio-temporal state network and ensemble coverage model, and designing and improving the Floyd algorithm and adaptive genetic algorithm, the problem of low efficiency in flight scheduling schedule optimization in the existing technology is solved, and more efficient flight task allocation and time management are achieved.

CN119599325AActive Publication Date: 2025-03-11SOUTHWEST JIAOTONG UNIV

Patent Information

Application Number
CN202411602129.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-11
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively optimize the subway flight schedule, especially when urban rail transit lines are extended and passenger demand increases, manual compilation methods are difficult to meet actual operational needs, and the integer planning algorithm is inefficient in solving the problem.

Method used

The subway flight attendant scheduling plan optimization method based on the generation-select two-stage algorithm is adopted. The spatiotemporal state network is built in the generation stage and the flight attendant tasks are generated by the improved Floyd algorithm. The selection stage is used to build a ensemble coverage model and an adaptive genetic algorithm is designed to generate the final scheduling plan.

Benefits of technology

It effectively reduces the scale of the space-time state network, improves the efficiency of flight attendant task generation, and controls the exit and exit time of flight attendant tasks of different types of flight attendant tasks. Compared with manual compilation, the total number of flight attendant tasks is reduced by 14.48%, the total shift duration is reduced by 9.39%, and the total continuation time is reduced by 15.79%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599325A_ABST
    Figure CN119599325A_ABST
Patent Text Reader

Abstract

The invention aims to provide subway crew scheduling plan optimization based on a generation-selection two-stage algorithm, relates to the technical field of urban rail transit operation plans, and divides a subway crew scheduling plan into two stages of generation and selection. For the generation stage, constructing a space-time state network, converting crew task generation into a path search problem, and designing an improved Floyd algorithm to generate large-scale alternative crew tasks; for the selection stage, an improved set coverage model is constructed, a greedy algorithm and a genetic algorithm are designed for solving, and finally verification is carried out by taking the Chengdu subway No.5 line as an example. An example analysis result shows that compared with a manual compilation scheme, the compilation method provided by the invention is remarkable in optimization effect, the total number of crew members is reduced by 14.48%, the total on-duty time of the crew members is reduced by 9.39%, and the sum of the continuing time is reduced by 15.79%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to urban rail transit operation plan, and in particular to subway crew scheduling optimization based on a generation-selection two-stage algorithm. Background Art

[0002] The subway crew plan is the core document guiding the daily work of the subway crew. It can be divided into crew scheduling plan and crew shift plan for compilation. The crew scheduling plan has long been compiled manually. With the extension of urban rail transit lines and the increase in passenger demand, the manual compilation method can no longer meet the actual operation needs.

[0003] The solution algorithm is the key to optimizing crew scheduling. Currently, the most commonly used solution algorithms include the "generate-select" algorithm, the column generation method, and the intelligent heuristic algorithm. The "generate-select" algorithm decomposes the scheduling problem, first generates a large number of crew tasks, and then selects the optimal crew tasks from them according to the set covering / partitioning model to obtain the scheduling plan. For the task generation stage, the methods used mainly include linear relaxation, shortest path algorithm, and tree enumeration. For the task selection stage, the methods used mainly include improved branch and bound, Lagrangian relaxation, and intelligent heuristic methods. The column generation method is a solution method based on column generation technology. When solving the crew scheduling optimization problem, the problem is usually divided into a constrained main problem (RMP) and a pricing subproblem (PSP). The key to the column generation method is how to quickly solve the pricing subproblem. Most existing studies convert the pricing subproblem into the shortest path problem in a directed network graph for solution. Compared with analytical methods, intelligent heuristic methods have wide applicability and can obtain acceptable satisfactory solutions in a shorter time. The intelligent heuristic methods currently used in research mainly include taboo search algorithm, simulated annealing algorithm, genetic algorithm, ant colony algorithm, particle swarm algorithm, etc.

[0004] At present, with the extension of urban rail transit lines and the increase in passenger demand, manual compilation methods can no longer meet the actual operational needs. In the selection stage, the solution algorithm is mainly based on large-scale integer programming algorithms such as improved branch and bound algorithm, Lagrangian relaxation, and column generation method. The integer programming algorithm has low solution efficiency for large-scale crew scheduling problems. Summary of the invention

[0005] In view of the deficiencies of the prior art, the present invention provides the following technical solutions:

[0006] The subway crew scheduling optimization based on the generation-selection two-stage algorithm includes a generation stage and a selection stage. The selection stage constructs a set covering model to select crew tasks; the generation stage constructs a spatiotemporal state network and constrains the spatiotemporal state network, converts crew task generation into a path search problem, generates crew tasks by searching paths through an improved Floyd algorithm, and generates a final scheduling plan by solving the set covering model through a designed adaptive genetic algorithm;

[0007] The specific crew task generation includes the following steps:

[0008] a. Initialize parameters, initialize the total number of crew segments N, and the longest continuous driving time Working hours of various types of shifts Time range for each type of shift Time for handover and departure T jb And locomotive preparation time T zb ;

[0009] b. Crew segment division: all crew segments are divided according to the type of shift;

[0010] c. Constructing the connection matrix: number all the morning crew segments from morning to night according to the start time, and construct the crew segment connection matrix according to the spatiotemporal connection constraints;

[0011] d. Filter the starting crew segment and select the earliest attendance time of the morning shift As the lower limit of the screening of the crew segments starting from the morning shift, considering the earliest end time of the morning shift and the longest working time, the upper limit of the segments starting from the morning shift is set to Filter all the morning crew segments p with the starting time t s The set of starting crew segments that meet the conditions p morning ;

[0012] e. Improve the Floyd algorithm to search for the shortest path from any starting point to the end point in the spatiotemporal state network, and obtain the shortest path matrix and shortest path length matrix between any two service segments;

[0013] f. Crew task generation: traverse all the crew segments starting from the morning shift, and select the shortest path that meets the requirements as the crew task based on the shortest path matrix and the shortest path length matrix;

[0014] g. Crew task screening: for each crew task, determine whether its continuous driving state at any time satisfies the constraints. If not, delete the crew task. At the same time, some of the generated crew tasks may be subsets of other crew tasks. In order to reduce the complexity of subsequent crew task selection, this type of crew task is also considered for deletion.

[0015] Furthermore, the improved Floyd algorithm in e comprises the following steps:

[0016] e1. Initialize the shortest path matrix and the shortest path length matrix of the morning shift, with the shortest path length being M and the shortest path being empty; based on the morning shift continuation matrix, traverse all segments to determine whether segment i can be connected to segment j. If so, update the shortest path length and the shortest path, where the shortest path length is the difference between the end time of segment j and the start time of segment i;

[0017] e2. Iterate and update the shortest path, traverse each crew segment as the middle point k, and determine whether the shortest path is updated; if short(i,j)>short(i,k)+short(k,j), update the shortest path length and shortest path from segment i to segment j, otherwise go to e3;

[0018] e3. Update multiple shortest paths. If the lengths of the two paths are equal, determine whether the shortest path length is M. If it is M, it means that neither of the two paths is the shortest path from segment i to segment j. Otherwise, find a new shortest path from segment i to segment j and add it to the shortest path set.

[0019] e4. Repeat steps e2 and e3 until all segments are used as the middle points of the shortest path to complete the shortest path search, and obtain the shortest path matrix and shortest path length matrix between any two segments.

[0020] Furthermore, the subway crew scheduling optimization based on the generation-selection two-stage algorithm is characterized in that the connection matrix is:

[0021]

[0022] The service segment continuation matrix is ​​the basis for judging whether two service segments can be connected. Let the service segment continuation matrix be Connect. If segments i and j can be connected, then use C 1,j Indicates the connection time. If the connection is not possible, the connection time is set to infinity M. Each crew segment is numbered from morning to night according to the start time; the number of morning segments is N mor .

[0023] Furthermore, the problem of generating the driver and crew's service tasks is transformed into a problem of driver and crew's duty path planning in a space-time state network; the space-time state network is represented by G(V,E), where V(i,t,w) represents the set of points in the network, and E(i,t,w; i′,t′,w′) represents the set of directed arcs in the network. The space-time state network is also subject to flow balance constraints, continuous driving time constraints, on-duty time constraints, rest time constraints, meal time constraints, spatial connection constraints, and shift working time constraints.

[0024] The specific steps of the selection phase include:

[0025] S1, add the upper limit constraint of the set coverage model, and the upper limit is set to 3;

[0026]

[0027]

[0028]

[0029] x j ={0,1}j=1,2,…,n

[0030] In the formula, m is the number of crew segments, n is the number of feasible crew tasks, and the decision variable is x j , c j is the cost of crew tasks, a ij The coefficient matrix that makes up the constraints;

[0031] S2, based on the characteristics of the set covering model, uses 0-1 coding to represent individuals;

[0032] S3, initialization parameters, initialization of genetic algorithm population size pop, setting maximum number of iterations max_iter, crossover probability Mutation probability p m , the number of candidate crew tasks wait_num, the penalty factor Uncovered fragment upper limit y max .

[0033] S4, initialize the population and calculate the population fitness; use the greedy algorithm to generate the initial population and obtain the initial crew scheduling plan; solve the fitness function value of each individual by designing the fitness function, and record the optimal fitness and optimal scheduling plan;

[0034] S5, selection operation, based on the individual fitness function value, the population is screened using the tournament method to select parent generation individuals to enter the offspring generation;

[0035] S6, crossover operation, based on single-point crossover, randomly selects two offspring individuals for crossover operation to generate new individuals;

[0036] Design an adaptive crossover probability strategy:

[0037]

[0038]

[0039] in, represents the crossover probability of the i-th individual; Respectively represent the maximum and minimum values ​​of the adaptive crossover probability; f i represents the fitness function value of individual i, f avg , f min Respectively represent the average and minimum values ​​of the population fitness function; represents the crossover probability between individual i and individual j, taking the average of the crossover probabilities of the two;

[0040] S7, mutation operation, set mutation probability p m is 0.1, randomly selects a gene locus and flips its value;

[0041] S8, update the population. After the offspring individuals go through S6 and S7, a new population is generated and the population fitness is calculated in S4.

[0042] S9, optimization and adjustment, judging whether there are uncovered crew segments in the optimal solution, if yes, proceed to the next step; otherwise, go to S11;

[0043] S10, filter out the uncovered crew segment set, select the least crew tasks from the feasible crew set to cover, and add the newly added crew tasks to the optimal scheduling plan;

[0044] S11, generating a final scheduling plan, integrating the crew tasks corresponding to the optimal solution of the genetic algorithm and the newly added crew tasks after optimization and adjustment of the uncovered segments, to generate the final scheduling plan.

[0045] Furthermore, in S1, x j The value is 0-1, x j =1 means that crew task j is included in the final scheduling plan, otherwise x j =0;c j is the cost of the crew task, with the minimum number of crew tasks as the optimization goal, and the cost value is 1; a ij The coefficient matrix that constitutes the constraint conditions has a value of 0-1, a ij =1 means crew shift j contains crew segment i, otherwise a ij =0.

[0046] Furthermore, in said S4, the specific steps include:

[0047] S4.1, initialize the population parameters, initialize all individual chromosome genes to 0, indicating that no crew tasks are selected; for the coefficient matrix A m×n Sum the rows and columns respectively. The row sum indicates the number of times each crew segment is covered, which is recorded as A_row, and the crew task set that specifically covers the segment is recorded; the column sum indicates the number of segments covered by each crew task, which is A_column; set the parameter wait_num to indicate the number of alternative crew tasks;

[0048] S4.2, sorting of crew tasks, sorting A_column in descending order according to the number of crew task coverage, and extracting the first wait_num crew tasks with the largest number of coverage as candidate crew tasks;

[0049] S4.3, crew task selection, randomly select a crew task from the candidate crew tasks to add to the scheduling plan, and the chromosome gene position corresponding to the crew task changes from 0 to 1, indicating that the crew task is selected;

[0050] S4.4, update coefficient matrix A m×n , move the row corresponding to the covered fragment from A m×n Delete and recalculate A_row and A_column;

[0051] S4.5, judging whether all crew segments are covered. If all crew segments are covered by the selected crew tasks, go to S4.6; otherwise, go to S4.2;

[0052] S4.6, duplicate task adjustment, determine whether the selected crew tasks are duplicated, and if so, delete the duplicate crew tasks;

[0053] S4.7, generate the initialization population, traverse all individuals based on S4.1 to S4.6 to generate the initialization population;

[0054] S4.8, by designing the fitness function, solving the fitness function value of each individual, and recording the optimal fitness and the optimal scheduling plan. The fitness function is the sum of the objective function Z and the penalty function Z′. At the same time, the upper limit y of violating the constraint is set. max ;

[0055] The fitness function is:

[0056]

[0057] in, is the penalty factor; num is the number of uncovered fragments, the value cannot exceed y max , if it exceeds y max , the penalty function is set to infinity;

[0058] S4.9, determine whether the maximum number of iterations of the algorithm has been reached. If so, proceed to S9; otherwise, proceed to S5.

[0059] Compared with the prior art, the technical solution of this application has the following beneficial effects:

[0060] In the crew task generation stage, the present invention divides the crew segments into morning shift, day shift and evening shift, which can effectively reduce the scale of the spatiotemporal state network, improve the efficiency of the Floyd algorithm in searching for crew tasks, and also effectively control the departure and arrival times of crew tasks of different shift types, which is convenient for the management of crew members; in the crew task selection stage, compared with the randomly generated initial solution, the initial solution generated by the greedy algorithm can effectively improve the convergence speed of the algorithm while ensuring the quality of the optimal solution, improve the solution efficiency of the set covering model, and compared with manual compilation, the total number of crew tasks is reduced by 14.48%, the total on-duty time is reduced by about 9.39%, and the total connection time is reduced by 15.79%. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is a schematic diagram of the median multiplication path in the space-time state network;

[0062] Figure 2 Construct a schematic diagram for a spatiotemporal state network;

[0063] Figure 3 Generate schematic diagrams for crew operation sections;

[0064] Figure 4 is a coding diagram;

[0065] Figure 5 This is a simplified map of Chengdu Metro Line 5;

[0066] Figure 6 It is a schematic diagram of the time distribution of crew segments and crew operation segments;

[0067] Figure 7 This is a diagram showing the duration of work and driving time for the morning shift;

[0068] Figure 8 This is a schematic diagram of the on-duty time and driving time for day shift tasks;

[0069] Fig. 9 This is a diagram showing the duration of work and driving time for night shift tasks;

[0070] Fig.10 This is a diagram showing the duration of the morning shift tasks and the multiplication efficiency of the tasks;

[0071] Fig.11 This is a diagram showing the duration of the day shift tasks and the multiplication of the efficiency of the tasks;

[0072] Fig.12 This is a diagram showing the duration of night shift tasks and their multiplication efficiency. DETAILED DESCRIPTION

[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0074] Example:

[0075] 1. Crew task generation:

[0076] 1.1. The symbols and meanings of the relevant parameter variables of the crew scheduling model are as follows:

[0077] Table 1 Scheduling model set and index explanation

[0078]

[0079]

[0080] 1.2. Construction of spatiotemporal state network and constraints:

[0081] This application transforms the generation of driver and crew missions into a driver and crew duty path planning problem in a spatiotemporal state network. G(V,E) represents the spatiotemporal state network, where V(i,t,w) represents the set of points in the network, and E(i,t,w; i′,t′,w′) represents the set of directed arcs in the network.

[0082] 1.2.1. Flow balance constraints: Flow balance constraints need to be set for all vertices on the path to ensure that the spatiotemporal state network generates a valid value multiplication path:

[0083]

[0084] 1.2.2. Continuous driving time constraints: To prevent drivers and passengers from driving while fatigued, an upper limit on the continuous driving time of drivers and passengers should be set.

[0085] 1.2.3. On-duty time constraints. On-duty time includes shift handover time, locomotive preparation time, driving time, rest time and meal time. The calculation formula is as follows:

[0086]

[0087] In order to improve the workload balance of drivers and crew members and avoid the occurrence of "off-duty" situations, upper and lower limits are usually set for the on-duty time of crew members.

[0088] 1.2.4. Rest time constraints: To avoid fatigue driving, the rest time must meet the maximum and minimum rest time constraints.

[0089] 1.2.5. Meal time constraints. This application only considers arranging meals for day shift drivers and crew members. The constraints are as follows:

[0090]

[0091] 1.2.6. Spatial connection constraint. The spatial connection constraint requires that when the driver and crew are on duty for adjacent service segments, the terminal station of the previous service segment must be the same as the starting station of the next service segment. When the spatial connection condition is not met, the driver and crew need to be arranged to take other trains as passengers to the starting station of the next service segment. The spatial connection constraint is as follows:

[0092]

[0093] 1.2.7. Shift working time constraints. To facilitate driver and crew management, the departure and arrival times of each type of shift are required to meet the corresponding departure and arrival time constraints. The shift working time constraints are as follows:

[0094]

[0095]

[0096]

[0097] 1.3、Crew task generation algorithm:

[0098] In the spatiotemporal state network, the generation problem of crew tasks can be transformed into the on-duty path planning of drivers and crew members. This application is based on the connection matrix of crew segments and crew operation segments and designs an improved Floyd shortest path algorithm to search for the on-duty path of drivers and crew members in the spatiotemporal state network, and screens the generated large-scale crew tasks according to the relevant constraints generated by the relevant crew tasks to obtain the final crew task set.

[0099] 1.3.1. Connection matrix. The service segment connection matrix is ​​the basis for judging whether two service segments can be connected. Let the service segment connection matrix be Connect. If segments i and j can be connected, then use C i,j Indicates the connection time. If the connection is not possible, the connection time is set to infinity M. Each crew segment is numbered from morning to night according to the start time. Taking the morning shift as an example, assuming that the number of morning shift segments is N mor , and its crew segment connection matrix is ​​shown in Table 4.

[0100] Table 4 Morning shift crew segment continuation matrix

[0101]

[0102]

[0103] There are many duty segments in the generation of work segments. If the improved Floyd algorithm is used to search for duty paths, it is easy to cause a "combination explosion" phenomenon. Therefore, in order to avoid the scale of generating service tasks being too large and not conducive to the solution of the subsequent selection model, this application combines the day shift service segment lines into service work segments, and generates service tasks based on the service work segments. The combination method of service work segments is as follows:

[0104] a. Grouping of crew segments: Dividing all crew segments according to different vehicle bottoms;

[0105] b. Initialize parameters, set the upper limit of continuous driving time, determine the combination strategy of crew operation segments, and initialize j=1 to record the search starting point of the crew operation segment;

[0106] c. Crew operation segment generation: traverse all vehicle bottoms, and generate operation segments for all crew segments on the same vehicle bottom according to the numbering sequence and combination strategy. The specific generation steps are as follows:

[0107] c1. Check the fragment p in the fragment set with the same bottom of the car j Can it be combined with the subsequent adjacent fragment p j+1 combination, if it cannot be combined, then p j The fragment is regarded as a job segment, j = j + 1, if it can be combined, then [p j p j+1 ] as a work segment, j = j + 2;

[0108] c2, let the total number of segments under the same vehicle be N f , judge j<N f , then return to c1, otherwise go to c3;

[0109] c3. Determine whether the last crew segment is covered. If not, add it to the generated operation segment set;

[0110] c4. Traverse all vehicle bottoms and obtain all thorough operation section combination solutions;

[0111] d. Adjustment of crew operation sections. The combination scheme of crew operation sections is not unique. Consider modifying the upper limit of continuous driving time and changing the combination strategy of crew operation sections to obtain multiple crew operation section schemes. Compared with the crew segment combination crew tasks, generating crew tasks based on different operation section schemes can reduce the solution space of day shift crew tasks. The generation of crew operation sections is as follows: Figure 3 shown.

[0112] 1.3.2, Algorithm steps, based on the connection matrix of crew segments and crew operation segments and the improved Floyd shortest path algorithm, the shortest path from any starting point to the end point can be searched in the spatiotemporal state network. The set of crew segments included in the path is the driver and crew duty task. The task generation method for each shift is similar. Taking the morning shift as an example, the specific steps of the algorithm are as follows:

[0113] a. Initialize parameters, initialize the total number of crew segments N, and the longest continuous driving time Working hours of various types of shifts Time range for each type of shift Time for handover and departure T jb And locomotive preparation time T zb ;

[0114] b. Crew segment division: Considering the constraints of the task time range of each shift, all crew segments are divided according to the shift type;

[0115] c. Constructing the connection matrix: number all the morning crew segments from morning to night according to the start time, and construct the crew segment connection matrix considering the spatiotemporal connection constraints;

[0116] d. Filter the starting crew segment and select the earliest attendance time of the morning shift As the lower limit of the screening of the crew segments starting from the morning shift, considering the earliest end time of the morning shift and the longest working time, the upper limit of the segments starting from the morning shift is set to Filter all the morning crew segments p with the starting time t s The set of initial crew segments that meet the conditions P morning ;

[0117] e. Improve Floyd algorithm to generate crew tasks:

[0118] e1. Initialize the shortest path, initialize the morning shift shortest path matrix and the shortest path length matrix, the shortest path length is M, the shortest path is empty, and based on the morning shift continuation matrix, traverse all segments to determine whether segment i can be connected to segment j. If so, update the shortest path length and the shortest path, where the shortest path length is the difference between the end time of segment j and the start time of segment i;

[0119] e2. Iterate and update the shortest path. Traverse each service segment as the middle point k and determine whether the shortest path is updated. If short(i,j)>short(i,k)+short(k,j), update the shortest path length and shortest path from segment i to segment j. Otherwise, go to e3.

[0120] e3. Update multiple shortest paths. If the lengths of the two paths are equal, further determine whether the shortest path length is M. If it is M, it means that neither of the two paths is the shortest path from segment i to segment j. Otherwise, find a new shortest path from segment i to segment j and add it to the shortest path set.

[0121] e4. Repeat steps e2 and e3 until all segments are used as the middle points of the shortest path to complete the shortest path search, and obtain the shortest path matrix and the shortest path length matrix between any two segments;

[0122] f. Crew task generation, traverse all the morning shift start crew segments p∈P morning Based on the shortest path matrix and the shortest path length matrix, the on-duty time range constraints of the morning shift crew task are considered. Select the shortest path that meets the requirements as the crew task, taking into account the locomotive preparation time and the handover time, calculate the driver and crew's on-duty time based on the crew task, and update the crew task on-duty time;

[0123] g. Crew task screening. In the process of searching for crew tasks in the shortest path algorithm, only the spatiotemporal continuity constraints are considered, and the continuous driving time state update of the path is not considered. Therefore, for each crew task, it is determined whether the continuous driving state of any value multiplied by the time meets the constraints. If not, the crew task is deleted. At the same time, some of the generated crew tasks may be subsets of other crew tasks. In order to reduce the complexity of subsequent crew task selection, this type of crew task is also considered to be deleted.

[0124] 2. Crew mission selection:

[0125] 2.1、Set Covering Model:

[0126] For the selection of crew tasks in the second stage, this application constructs a set coverage model to select crew tasks. At the same time, in order to avoid the situation where the same crew segment is covered too many times, which is not conducive to the adjustment and optimization of subsequent crew tasks, this application considers improving the set coverage model and adding a coverage upper limit constraint, and the upper limit is set to 3:

[0127]

[0128]

[0129]

[0130] x j ={0,1}j=1,2,...,n

[0131] In the formula, m is the number of crew segments; n is the number of feasible crew tasks; the decision variable is xj , with a value of 0-1, x j =1 means that crew task j is included in the final scheduling plan, otherwise x j =0;c j is the cost of the crew task. This application considers the minimum number of crew tasks as the optimization goal, so the cost is 1, a ij The coefficient matrix that constitutes the constraint conditions has a value of 0-1, a ij =1 means crew shift j contains crew segment i, otherwise a ij =0;

[0132] 2.2, Adaptive Genetic Algorithm:

[0133] 2.2.1 Coding. Based on the characteristics of the set covering model, this application uses 0-1 coding to represent individuals. Each individual in the population represents a crew scheduling plan, represented by a chromosome. The length of the chromosome is the number of feasible crew tasks. Each gene on the chromosome corresponds to a crew task, and the value is a 0-1 variable, which has the same meaning as x. j Similarly, when the value is 1, it means that the task is selected in the scheduling plan, otherwise the scheduling plan does not select the task. The encoding process of the crew task is as follows: Figure 4 shown.

[0134] 2.2.2. Initialize the population. The initialization population is the starting point of the iterative optimization of the genetic algorithm. In order to improve the efficiency of the genetic algorithm, this application uses a greedy algorithm to generate the initial population. The specific steps are as follows:

[0135] a. Initialization parameters. Initialize all chromosome genes of each individual to 0, indicating that no crew task is selected. For the coefficient matrix A m×n Sum the rows and columns respectively. The row sum indicates the number of times each crew segment is covered, which is recorded as A_row, and the crew task set that specifically covers the segment is recorded. The column sum indicates the number of segments covered by each crew task, A_column. The parameter wait_num is set to indicate the number of alternative crew tasks.

[0136] b. Sort the crew tasks. Sort A_column in descending order according to the number of times the crew tasks are covered, and extract the first wait_num crew tasks with the largest number of times covered as candidate crew tasks;

[0137] c. Crew task selection: randomly select a crew task from the candidate crew tasks and add it to the scheduling plan. The chromosome gene position corresponding to the crew task changes from 0 to 1, indicating that the crew task is selected;

[0138] d. Update coefficient matrix A m×nWhen adding a new crew task, the crew segments that have been covered are no longer considered, so the coefficient matrix A needs to be updated m×n , move the row corresponding to the covered fragment from A m×n Delete and recalculate A_row and A_column;

[0139] e. Determine whether all crew segments are covered. If all crew segments are covered by the selected crew tasks, go to f; otherwise, go to b;

[0140] f. Adjust duplicate tasks: determine whether the selected crew tasks are duplicated. If so, delete the duplicated crew tasks.

[0141] g. Generate an initialization population. Based on a to f, traverse all individuals to generate an initialization population.

[0142] 2.2.3. Fitness function. The fitness function is used to evaluate the quality of individuals. This application sets the fitness function as the sum of the objective function Z and the penalty function Z′. The smaller the value of the fitness function, the better the individual. The penalty function means that some coverage constraints are allowed to be violated during the iteration of the genetic algorithm. At the same time, an upper limit y of the violation constraint needs to be set for the convenience of subsequent adjustments. max :

[0143]

[0144] in, is the penalty factor; num is the number of uncovered fragments, the value cannot exceed y max , if it exceeds y max , the penalty function is set to infinity;

[0145] 2.2.4. Selection operation. In genetic algorithms, the selection step is the process of selecting individuals from the current population to generate the next generation population. This application adopts the tournament selection method, that is, randomly selecting two individuals from the population each time, comparing their fitness, and selecting the individual with better fitness to enter the next generation population. The tournament selection method is simple and efficient to implement. It does not require sorting the entire population, and only requires a small amount of random selection and comparison operations. At the same time, through random selection, this method can maintain the diversity of the population and avoid premature convergence to the local optimal solution.

[0146] 2.2.5. Crossover operation. In genetic algorithms, the crossover process is the process of generating new offspring individuals by exchanging part of the genes of two parent individuals. This application adopts a single-point crossover method, randomly selects a crossover point, and exchanges the gene sequences of the two parent individuals at the crossover point to generate two new offspring individuals. In addition, in order to take into account the global search capability in the early stage of the algorithm and the local search capability in the later stage, this application designs an adaptive crossover probability strategy as follows:

[0147]

[0148]

[0149] Among them, p c (i) represents the crossover probability of the i-th individual; Respectively represent the maximum and minimum values ​​of the adaptive crossover probability; f i represents the fitness function value of individual i, f avg ,f min Respectively represent the average and minimum values ​​of the population fitness function; p c (i,j) represents the crossover probability between individual i and individual j, and the average of the crossover probabilities is taken;

[0150] 2.2.6 Mutation operation. In genetic algorithms, the mutation process increases the diversity of the population by randomly changing the gene sequence of individuals. The mutation probability is usually set between 0.01 and 0.1. Considering the population size characteristics of the crew scheduling problem, setting a smaller mutation probability may not ensure that the mutation operation enriches the diversity of the population. Therefore, this application sets the mutation probability p m is 0.1. Randomly select a gene locus and flip its value, that is, if the value of the gene locus is 1, it becomes 0; if it is 0, it becomes 1;

[0151] 2.2.7 Optimization and adjustment: After the genetic algorithm converges to obtain the optimal solution, check the number of crew segments not covered by the optimal solution. If the number of uncovered crew segments is 0, the scheduling plan corresponding to the optimal solution is the optimal scheduling plan; otherwise, filter out the uncovered crew segment set, select the least crew tasks from the feasible crew set to cover, and add the newly added crew tasks to the optimal scheduling plan to form the final scheduling plan;

[0152] 2.3 Algorithm steps:

[0153] The first step is to initialize the parameters, initialize the genetic algorithm population size pop, set the maximum number of iterations max_iter, and the crossover probability Mutation probability p m , the number of candidate crew tasks wait_num, the penalty factor Uncovered fragment upper limit y max ;

[0154] Step 2: Initialize the population. Generate the initial population based on the greedy algorithm designed above to obtain the initial crew scheduling plan.

[0155] The third step is to calculate the fitness of the population. Based on the fitness function designed in the previous article, solve the fitness function value of each individual and record the optimal fitness and optimal scheduling plan;

[0156] Step 4: Determine whether the maximum number of iterations of the algorithm has been reached. If so, go to step 9, otherwise proceed to the next step.

[0157] Step 5: Selection operation: Based on the individual fitness function value, the population is screened using the tournament method to select the parent generation individuals to enter the offspring generation;

[0158] Step 6: Crossover operation: Based on single-point crossover, two offspring individuals are randomly selected for crossover operation to generate new individuals.

[0159] Step 7: Mutation operation: Based on the mutation method described above, mutation operation is performed on the offspring individuals;

[0160] Step 8: Update the population. After the offspring individuals undergo crossover mutation, a new population is generated and the process goes to step 3.

[0161] Step 9: Optimize and adjust to determine whether there are uncovered crew segments in the optimal solution. If so, proceed to the next step, otherwise go to step 11;

[0162] Step 10: Filter out the uncovered crew segment set, select the least crew tasks from the feasible crew set to cover, and add the newly added crew tasks to the optimal scheduling plan;

[0163] Step 11: Generate the final scheduling plan by integrating the crew tasks corresponding to the optimal solution of the genetic algorithm and the newly added crew tasks after the optimization and adjustment of the uncovered segments to generate the final scheduling plan;

[0164] 3. Case analysis:

[0165] 3.1、Line data:

[0166] 3.1.1 Line overview. This case takes Chengdu Metro Line 5 as an example to optimize the subway crew scheduling plan. The line is 49.02 km long and has 41 stations, including 2 parking lots, 1 depot and 5 rotation stations, represented by S1~S8, which respectively represent Dafeng Parking Lot, Huagui Road Station, Shixi Park Station, Funing Road Station, Yuanhua Depot, Erjiang Temple Station, Huilong Station and Huilong Parking Lot. The trains on this line run large and small routes. The large route is Huagui Road-Huilong, and the small route is Shixi Park-Erjiang Temple. The ratio is 2:1. The line diagram is as follows Figure 5 As shown;

[0167] 3.1.2 Crew segments. Taking the rotation stations, parking lots and depots of the line as the dividing points, the train operation lines of the whole day are divided into 686 crew segments in total. The crew segments are arranged in the order of departure time. Some crew segments are shown in Table 5:

[0168] Table 5 Division of crew segments

[0169]

[0170] A visual analysis is performed on the 686 crew segment operation times obtained by division, such as Figure 6 As shown in the figure, it can be seen that the operation time of more than 90% of the crew segments is distributed around 30 minutes and 70 minutes, and the operation time of a few crew segments is too short, less than 10 minutes;

[0171] 3.2. Scheduling plan:

[0172] 3.2.1. Parameter setting. Before compiling the crew scheduling plan, it is necessary to first calibrate the parameters such as the continuous driving time, the maximum on-duty time, the break time, the handover time, and the meal time of the drivers and crew members according to the crew rules and regulations and laws and regulations of the operating company. In addition to the parameters related to the scheduling model, it is also necessary to calibrate the relevant parameters of the designed Floyd shortest path algorithm and the adaptive genetic algorithm, as shown in Table 6:

[0173] Table 6 Related parameter values

[0174]

[0175] 3.2.2 Result analysis, based on the relevant parameter settings of the scheduling model, all crew segments are divided into 185 morning shift crew segments, 283 day shift crew segments and 218 night shift crew segments. Based on the "generate-select" two-stage scheduling algorithm designed in this paper, 124 crew tasks are solved, including 45 morning shift crew tasks, 37 day shift crew tasks and 42 night shift crew tasks. The following is a visual analysis of the relevant indicators of the scheduling plan:

[0176] a. How long are you on duty and how long are you driving? Figure 7 , Figure 8 , Fig. 9 As shown, comparing the three types of crew tasks, the on-duty time and driving time of the day shift are both longer than those of the morning and evening shifts, with the heaviest workload and less fluctuation, showing a relatively stable work rhythm. This is mainly related to the subway crew shift system. Subway drivers and crew members generally adopt a "night-morning combined ride" system, that is, after performing the evening shift tasks, the drivers and crew members are arranged to rest in the depot or parking lot, and continue to perform the morning shift tasks the next morning. In order to avoid excessive work intensity causing driver and crew fatigue driving, the working hours of the morning and evening shifts are both shorter than those of the day shift. In addition, compared with the day shift tasks, the on-duty time and driving time of some morning and evening shift tasks fluctuate greatly, and the distribution is relatively uneven;

[0177] b. Connection duration and value multiplication efficiency Fig.10 , Fig.11 , Fig.12 As shown in the figure, comparing the three types of crew tasks, the morning shift has the shortest connection time and relatively small fluctuations, but the duty efficiency is low; the day shift has the longest connection time, showing the greatest work intensity, and the duty efficiency is relatively stable; the night shift has the largest change in connection time, but the crew's duty efficiency is higher. Overall, in terms of connection time and duty efficiency, the morning and day shifts are relatively stable, while the night shift has large fluctuations;

[0178] 3.3. Comparison of solutions:

[0179] Based on the same crew segment data, the optimized crew scheduling plan is compared with the scheduling plan manually compiled by on-site staff. The relevant indicators include the number of crew tasks, on-duty time, connection time, and duty efficiency, as shown in Table 7:

[0180] Table 7 Comparison between optimized shift scheduling and manually compiled shift scheduling

[0181]

[0182] By comparing the relevant indicators of the optimized staffing scheme and the manual staffing scheme, it can be seen that the optimized staffing scheme reduces the number of crew tasks by 14.48%, the total on-duty time by 9.39%, and the total connection time by 15.79%. At the same time, the optimization of the connection time of the crew segments reduces the unnecessary labor time of drivers and crew members, which increases the average efficiency of drivers and crew members by 13.43%. These data show that the optimized staffing scheme has obvious advantages over the manual staffing scheme in reducing the number of drivers and crew members and improving the duty efficiency of drivers and crew members. The optimized scheme can allocate tasks and time more efficiently, reduce unnecessary time waste, and make resource allocation more reasonable and efficient, thereby improving overall work efficiency and employee job satisfaction.

[0183] (1) Compared with manual preparation, the model algorithm proposed in this application has significant advantages in the preparation of shift scheduling. The total number of crew tasks is reduced by 14.48%, the total on-duty time is reduced by approximately 9.39%, and the total connection time is reduced by 15.79%. It can be seen that the shift scheduling method proposed in this paper can effectively improve the duty efficiency of drivers and crew members and reduce the labor costs of enterprises;

[0184] (2) In the crew task generation stage, the crew segments are divided into morning shift, day shift and evening shift, which can effectively reduce the scale of the spatiotemporal state network and improve the efficiency of the Floyd algorithm in searching for crew tasks. At the same time, it can also effectively control the departure and arrival times of crew tasks of different shift types, which is convenient for the management of crew members.

[0185] (3) In the crew task selection stage, compared with the randomly generated initial solution, the initial solution generated by the greedy algorithm can effectively improve the convergence speed of the algorithm while ensuring the quality of the optimal solution, thereby improving the solution efficiency of the set covering model.

[0186] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. The subway crew scheduling optimization based on the two-stage generation-selection algorithm includes a generation stage and a selection stage. The selection stage constructs a set coverage model to select crew tasks. The generation stage constructs a spatiotemporal state network and constrains the spatiotemporal state network to transform crew task generation into a path search problem. The characteristics are: The crew tasks are generated by improving the Floyd algorithm search path, and the final scheduling plan is generated by solving the set coverage model through the design of an adaptive genetic algorithm. The specific steps of the selection stage include: S1, add the upper limit constraint of the set coverage model, and the upper limit is set to 3; x j ={0,1} j=1,2,…,n In the formula, m is the number of crew segments, n is the number of feasible crew tasks, and the decision variable is x j , c j is the cost of crew tasks, a ij The coefficient matrix that makes up the constraints; S2, based on the characteristics of the set covering model, uses 0-1 coding to represent individuals; S3, initialization parameters, initialization of genetic algorithm population size pop, setting maximum number of iterations max_iter, crossover probability Mutation probability p m , the number of candidate crew tasks wait_num, the penalty factor Uncovered fragment upper limit y max . S4, initialize the population and calculate the population fitness; use the greedy algorithm to generate the initial population and obtain the initial crew scheduling plan; solve the fitness function value of each individual by designing the fitness function, and record the optimal fitness and optimal scheduling plan; S5, selection operation, based on the individual fitness function value, the population is screened using the tournament method to select parent generation individuals to enter the offspring generation; S6, crossover operation, based on single-point crossover, randomly selects two offspring individuals for crossover operation to generate new individuals; Design an adaptive crossover probability strategy: in, represents the crossover probability of the i-th individual; Respectively represent the maximum and minimum values ​​of the adaptive crossover probability; f i represents the fitness function value of individual i, f avg , f min Respectively represent the average and minimum values ​​of the population fitness function; represents the crossover probability between individual i and individual j, taking the average of the crossover probabilities of the two; S7, mutation operation, set mutation probability p m is 0.1, randomly selects a gene locus and flips its value; S8, update the population. After the offspring individuals go through S6 and S7, a new population is generated and the population fitness is calculated in S4. S9, optimization and adjustment, judging whether there are uncovered crew segments in the optimal solution, if yes, proceed to the next step; otherwise, go to S11; S10, filter out the uncovered crew segment set, select the least crew tasks from the feasible crew set to cover, and add the newly added crew tasks to the optimal scheduling plan; S11, generating a final scheduling plan, integrating the crew tasks corresponding to the optimal solution of the genetic algorithm and the newly added crew tasks after optimization and adjustment of the uncovered segments, to generate the final scheduling plan.

2. The subway crew scheduling optimization based on the generation-selection two-stage algorithm according to claim 1 is characterized by: In S1, x j The value is 0-1, x j =1 means that crew task j is included in the final scheduling plan, otherwise x j =0;c j is the cost of the crew task, with the minimum number of crew tasks as the optimization goal, and the cost value is 1; a ij The coefficient matrix that constitutes the constraint conditions has a value of 0-1, a ij =1 means crew shift j contains crew segment i, otherwise a ij =0.

3. The subway crew scheduling optimization based on the generation-selection two-stage algorithm according to claim 1 is characterized in that: In said S4, the specific steps include: S4.1, initialize the population parameters, initialize all individual chromosome genes to 0, indicating that no crew tasks are selected; for the coefficient matrix A m×n Sum the rows and columns respectively. The row sum indicates the number of times each crew segment is covered, which is recorded as A_row, and the crew task set that specifically covers the segment is recorded; the column sum indicates the number of segments covered by each crew task, which is A_column; set the parameter wait_num to indicate the number of alternative crew tasks; S4.2, sorting of crew tasks, sorting A_column in descending order according to the number of crew task coverage, and extracting the first wait_num crew tasks with the largest number of coverage as candidate crew tasks; S4.3, crew task selection, randomly selects a crew task from the candidate crew tasks to add to the scheduling plan, and the chromosome gene position corresponding to the crew task changes from 0 to 1, indicating that the crew task is selected; S4.4, update coefficient matrix A m×n , move the row corresponding to the covered fragment from A m×n Delete and recalculate A_row and A_column; S4.5, judging whether all crew segments are covered. If all crew segments are covered by the selected crew tasks, go to S4.6; otherwise, go to S4.2; S4.6, duplicate task adjustment, determine whether the selected crew tasks are duplicated, and if so, delete the duplicate crew tasks; S4.7, generate the initialization population, traverse all individuals based on S4.1 to S4.6 to generate the initialization population; S4.8, by designing the fitness function, solving the fitness function value of each individual, and recording the optimal fitness and the optimal scheduling plan. The fitness function is the sum of the objective function Z and the penalty function Z′. At the same time, the upper limit y of violating the constraint is set. max ; The fitness function is: in, is the penalty factor; num is the number of uncovered fragments, the value cannot exceed y max , if it exceeds y max , the penalty function is set to infinity; S4.9, determine whether the maximum number of iterations of the algorithm has been reached. If so, proceed to S9; otherwise, proceed to S5.

4. According to claim 1, the subway crew scheduling optimization based on the generation-selection two-stage algorithm is characterized in that: Crew task generation includes the following steps: a. Initialize parameters, initialize the total number of crew segments N, and the longest continuous driving time Working hours of various types of shifts Time range for each type of shift Time for handover and departure T jb And locomotive preparation time T zb ; b. Crew segment division: all crew segments are divided according to the type of shift; c. Constructing the connection matrix: number all the morning crew segments from morning to night according to the start time, and construct the crew segment connection matrix according to the spatiotemporal connection constraints; d. Filter the starting crew segment and select the earliest attendance time of the morning shift As the lower limit of the screening of the crew segments starting from the morning shift, considering the earliest end time of the morning shift and the longest working time, the upper limit of the segments starting from the morning shift is set to Filter all the morning crew segments p with the starting time t s The set of initial crew segments that meet the conditions P morning ; e. Improve the Floyd algorithm to search for the shortest path from any starting point to the end point in the spatiotemporal state network, and obtain the shortest path matrix and shortest path length matrix between any two service segments; f. Crew task generation: traverse all the crew segments starting from the morning shift, and select the shortest path that meets the requirements as the crew task based on the shortest path matrix and the shortest path length matrix; g. Crew task screening: for each crew task, determine whether its continuous driving state at any time satisfies the constraints. If not, delete the crew task. At the same time, some of the generated crew tasks may be subsets of other crew tasks. In order to reduce the complexity of subsequent crew task selection, this type of crew task is also considered for deletion.

5. According to claim 4, the subway crew scheduling optimization based on the generation-selection two-stage algorithm is characterized in that: The improved Floyd algorithm in e includes the following steps: e1. Initialize the shortest path matrix and the shortest path length matrix of the morning shift, with the shortest path length being M and the shortest path being empty; based on the morning shift continuation matrix, traverse all segments to determine whether segment i can be connected to segment j. If so, update the shortest path length and the shortest path, where the shortest path length is the difference between the end time of segment j and the start time of segment i; e2. Iterate and update the shortest path, traverse each crew segment as the middle point k, and determine whether the shortest path is updated; if short(i,j)>short(i,k)+short(k,j), update the shortest path length and shortest path from segment i to segment j, otherwise go to e3; e3. Update multiple shortest paths. If the lengths of the two paths are equal, determine whether the shortest path length is M. If it is M, it means that neither of the two paths is the shortest path from segment i to segment j. Otherwise, find a new shortest path from segment i to segment j and add it to the shortest path set. e4. Repeat steps e2 and e3 until all segments are used as the middle points of the shortest path to complete the shortest path search, and obtain the shortest path matrix and shortest path length matrix between any two segments.

6. According to claim 5, the subway crew scheduling optimization based on the generation-selection two-stage algorithm is characterized in that: The connection matrix is: The service segment continuation matrix is ​​the basis for judging whether two service segments can be connected. Let the service segment continuation matrix be Connect. If segments i and j can be connected, then use C 1,j Indicates the connection time. If the connection is not possible, the connection time is set to infinity M. Each crew segment is numbered from morning to night according to the start time; the number of morning segments is N mor .

Citation Information

Patent Citations

  • Crew management method and device

    CN109508809A

  • Metro crew scheduling optimization method considering fairness in full-automatic operation environment

    CN118886675A

Cited By

  • Rail transit crew scheduling optimization method based on space-time continuation network

    CN120373729A