Rail transit crew scheduling optimization method based on space-time connection network
By optimizing the train crew scheduling based on a spatiotemporal continuity network method and the Lagrange relaxation algorithm, the problems of low efficiency and low accuracy in existing technologies are solved, and a scientific and automated crew scheduling plan is realized, optimizing the number of shifts and the working hours of crew members.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG RAIL TRANSIT OPERATION MANAGEMENT GROUP CO LTD
- Filing Date
- 2025-04-09
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies for scheduling urban rail transit crews suffer from low efficiency and accuracy due to manual scheduling, making it difficult to adapt to operational development requirements. Furthermore, the lack of a rapid adjustment mechanism leads to redundant plans or violations of crew rules, making it impossible to balance the needs of the enterprise and the rights of the crew members, and hindering the achievement of fully automated scheduling plans.
A method based on spatiotemporal continuity network is adopted to divide the crew segment, construct the spatiotemporal continuity network of the scheduling plan, establish an optimization model for the rail transit crew scheduling plan, and solve it through the Lagrange relaxation algorithm to optimize the crew scheduling plan.
It has enabled scientific decision-making and overall management of the flight attendant scheduling plan, reduced the number of shifts, reduced non-paid time for flight attendants, optimized work time deviations and the number of times they can take extra flights, and improved the scientific nature and fairness of the scheduling plan.
Smart Images

Figure CN120373729B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer application technology, and in particular to a method for optimizing rail transit crew scheduling based on a spatiotemporal connection network. Background Technology
[0002] Crew scheduling management is a core component of urban rail transit operation management, and its rationality and scientific nature directly affect line operation efficiency, human resource costs, and driving safety. With the rapid expansion of urban rail transit networks and the continuous increase in operational density, the complexity of crew scheduling plans and the need for dynamic adjustments have significantly increased. How to obtain crew schedules scientifically and rationally, and achieve scientific decision-making and overall management of crew duties, is a key issue that needs to be addressed in crew scheduling management.
[0003] Currently, the existing technology for compiling urban rail transit crew scheduling plans mainly adopts a manual method. The conventional manual scheduling method is labor-intensive, inefficient, and inaccurate, and is no longer able to meet the requirements of urban rail operation development.
[0004] Existing technologies for airline cabin crew scheduling primarily operate on a daily cycle, optimizing using a multi-commodity flow model aimed at minimizing costs, and employing methods such as preprocessing, DW decomposition, and branch and bound. In a few urban rail transit cabin crew scheduling optimization methods, temporary operational plan changes are used as scenarios for adjusting cabin crew schedules, employing methods such as column generation and Lagrange relaxation. Existing research suffers from slow response to unforeseen circumstances, lacks rapid rescheduling mechanisms, and often results in highly redundant or rule-breaking adjusted plans. Furthermore, it focuses primarily on a single objective, failing to balance corporate needs with cabin crew rights, leading to poor fairness in scheduling plans. Additionally, the penalty mechanism for unauthorized passenger behavior is inadequate, and the reliance on fixed time segments for shift type classification results in incomplete task coverage, making fully automated adjustments to cabin crew schedules difficult.
[0005] The disadvantages of the existing urban rail transit crew scheduling methods described above include:
[0006] The existing method of manually compiling crew schedules is time-consuming, labor-intensive, inefficient, and inaccurate. Furthermore, this method is affected by the experience and professional competence of the staff involved, making it difficult to meet the requirements of urban rail transit operation development.
[0007] Existing cabin crew scheduling methods primarily address anonymous cabin crew duty plans, with little research on adjusting the schedules for each individual cabin crew member. Current methods struggle to consider factors such as the current work status and workload of cabin crew members, and require the adjusted duty schedules to be manually assigned to each crew member, making it difficult to achieve fully automated cabin crew scheduling. Summary of the Invention
[0008] The embodiments of the present invention provide a method for optimizing the scheduling of urban rail transit crews based on a spatiotemporal connection network, so as to effectively optimize the scheduling plan of urban rail transit crews.
[0009] To achieve the above objectives, the present invention adopts the following technical solution.
[0010] A method for optimizing rail transit crew scheduling based on spatiotemporal continuity networks includes:
[0011] Divide the rail transit system into crew segments and generate crew shifts based on these segments;
[0012] Construct a time-space continuity network for the scheduling plan based on the crew shift;
[0013] The objective function for establishing an optimization model of rail transit crew scheduling based on the spatiotemporal continuity network of scheduling plans;
[0014] The objective function of the rail transit crew scheduling optimization model is solved by the Lagrange relaxation algorithm to obtain the rail transit crew scheduling plan.
[0015] Preferably, the process of dividing rail transit into crew segments and generating crew shifts based on these segments includes:
[0016] The urban rail transit operation map is divided into operation tasks by using depots and stations as dividing points to obtain crew segments. According to the constraints of the crew shift, the generated crew segments are combined into crew shifts. The constraints of the crew shifts include: the combination of crew segments must satisfy the following conditions in space: the starting station of the subsequent segment must be the same as the ending station of the previous segment; and in time, the starting time of the subsequent segment and the ending time of the previous segment must meet a certain time interval.
[0017] Preferably, the method for constructing a time-space continuity network for the scheduling plan based on the crew shift includes:
[0018] The source point, the service base, and the segmented service segments are regarded as nodes. Virtual entry and exit arcs, departure and return arcs, departure and boarding arcs, boarding arcs, boarding arcs, boarding arcs, rest arcs, and boarding arcs that meet the service connection conditions are established between each node, thereby constructing a time-space connection network for the scheduling plan.
[0019] In the spatiotemporal continuity network of the scheduling plan, the source node represents the virtual start and end point of the network. Based on the input depot and station information, as well as the shift type, a pair of crew base start and end points is established for each shift type. A virtual outgoing arc connects the virtual starting point and the base starting point, representing the crew member's transition from the initial state to the on-duty state; a virtual incoming arc connects the base ending point and the virtual ending point, representing the crew member's transition from the off-duty state to the end state; an on-duty arc connects the base starting point and the crew segment node, representing the crew member's arrival at the base and the start of their daily shift; an off-duty arc connects the crew segment node and the base... The terminus represents the flight attendant's completion of a day's duty and departure from that base. The "start" arc connects the base node and the flight segment node, indicating that the flight attendant starts their shift at that base and performs their first duty in a convenient manner. The "continue" arc connects the flight segment node, indicating that the flight attendant performs two consecutive flight segments without engaging in other activities during this period. The "break" arc connects the flight segment node, indicating that the flight attendant performs the first flight segment and then takes a break in between. The "break" arc connects the flight segment node, indicating that the flight attendant takes a break after performing the first flight segment and then continues performing the second flight segment.
[0020] Preferably, in the time-space connection network of the scheduling plan, the constraints of connection time and rest time are considered, that is, the connection time of two crew segments must be greater than the minimum connection time and the sum of the connection time and the working time of the second crew segment must be less than the maximum rest time.
[0021] In the aforementioned time-space connection network of the scheduling plan, the break time constraint is considered, that is, the connection time between two crew segments must be greater than the minimum break time and less than the maximum break time.
[0022] In the aforementioned time-space continuity network of the scheduling plan, meal time constraints are taken into account, that is, the actual meal time must be greater than the minimum meal time and less than the maximum meal time.
[0023] In the aforementioned time-space connection network of the scheduling plan, the constraints of connection time and rest time are considered. That is, the connection time of two crew segments must be greater than the minimum connection time, and the sum of the connection time and the working time of the second crew segment must be greater than the minimum rest time and less than the maximum rest time.
[0024] Preferably, the objective function of the rail transit crew scheduling optimization model based on the spatiotemporal connection network of the scheduling plan includes:
[0025] Based on the spatiotemporal continuity network of the scheduling plan, the following parameters and variables are defined:
[0026] N represents the set of all crew segments, and i is any one of the crew segments;
[0027] P represents the set of all crew shifts, and p is any one of the crew shifts;
[0028] This indicates the lower limit of working hours for morning, afternoon, and evening shifts;
[0029] This indicates the maximum working hours for morning, afternoon, and evening shifts;
[0030] This indicates the minimum driving time for morning, afternoon, and evening shifts;
[0031] This indicates the maximum driving time for morning, afternoon, and evening shifts;
[0032] Indicates the maximum duration of a single continuous work session;
[0033] Tr max Tr min Indicates the upper and lower limits of the break time;
[0034] Tm max Tm min Indicates the upper and lower limits of the dining time;
[0035] Tc max Tc min Indicates the upper and lower limits of the continuation time;
[0036] Indicates the lunchtime window;
[0037] Indicates the dinner time window;
[0038] f s These represent the penalty values for driving time below the upper limit, rest time exceeding the lower limit, meal time exceeding the lower limit, connecting time exceeding the lower limit, and ride-sharing penalty, respectively.
[0039] These represent the driving time of shift p and Td, respectively. max The difference between shift p and Tr min The difference between shift p and meal time and Tm min The difference, the connection time of shift p and Tc min The difference;
[0040] c out This indicates the cost of deploying flight attendants;
[0041] x p Let x be a 0-1 decision variable; if path p is selected, then x... p =1, otherwise 0;
[0042] Let be a 0-1 decision variable. If task o with the crew segment number k is covered by path p in the form of a normal value multiplication, then... Otherwise, it is 0;
[0043] With the optimization objectives of minimizing the number of crew shifts, minimizing non-paid time for crew members, minimizing deviations from standard working hours, and minimizing the number of convenient rides, the objective function of the rail transit crew scheduling optimization model is established as follows:
[0044]
[0045] Among them, the coefficients of the decision variables c p The total cost of path p is expressed as:
[0046]
[0047] c p It is divided into three parts: Part 1, c out Let p be the fixed cost of selecting a route, representing the attendance cost of a flight attendant. Limiting the number of selected routes effectively limits the number of shifts. (Part Two) The penalties for deviations in flight attendant driving time and non-paid time are as follows: penalties are imposed for driving time below the upper limit, and penalties are imposed for additional time exceeding the lower limit of the activity time standard during breaks, meals, and connections; the third part, fs, is the penalty for taking a ride during the extension of path p.
[0048] The constraints for setting the optimization model for rail transit crew scheduling include:
[0049] Crew segment coverage constraint: Each crew segment must be covered by a normal arc exactly once, ensuring that all crew segments are operated by a crew member.
[0050]
[0051] Decision variable value constraints:
[0052]
[0053] Preferably, the step of solving the objective function of the rail transit crew scheduling optimization model using the Lagrange relaxation algorithm to obtain the rail transit crew scheduling plan includes:
[0054] The Lagrange dual problem model after setting the relaxed crew segment coverage constraint is as follows:
[0055] LD = maxL(λ) i )
[0056]
[0057] Where, L(λ) i Let be the Lagrange relaxation function, and the formula introduces the Lagrange multiplier λ. i By continuously adjusting the Lagrange multiplier λ i For L(λ) i Iterate, and penalize the difficult constraints in the objective function that do not satisfy the original problem, such that L(λ) i The solution gradually approaches the direction that satisfies the constraints of the original problem, z. LR The value continuously increases, approaching the lower bound of the objective function of the rail transit crew scheduling optimization model. Then, for all multipliers λ... i The corresponding z LR Find the maximum value z LD Thus, the lower bound solution of the objective function is obtained;
[0058] The Lagrange relaxation function L(λ) i After equivalent transformation, we can obtain the following formula:
[0059]
[0060] The formula consists of two terms. The first term is the path cost of the work shift, which is calculated by adjusting the node costs in the continuity network based on the multipliers and searching for the shortest path that satisfies the constraints in the network. The second term is the sum of the Lagrange multipliers of each crew segment, representing the "total cost of task resources", which is calculated by the number of times each task is covered in each iteration.
[0061] The initial feasible solution of the objective function is generated using a greedy labeling method. The specific algorithm design is as follows:
[0062] Step 1: Initialize the currently uncovered task set uncover_set, and set the algorithm parameter k = 0;
[0063] Step 2: Check if uncover_set is empty. If it is, proceed to Step 6; otherwise, proceed to Step 3.
[0064] Step 3: Perform a greedy search based on labeling on the network:
[0065] 3)Ac i(r) ≤Ac i(r′) If r is better than r′;
[0066] 4)Ac i(r′) ≤Ac i(r) If r is better than r′, then r is superior to r′.
[0067] Step 4: If the greedy search successfully generates a new path, add the new path to the column pool, update uncover_set, reset k=0, and set the multiplier λ of the node whose value is multiplied by the new path value. i =λ i —M, where M is an infinite positive number, makes it more difficult to multiply a node that has already been multiplied again, so return to Step 2; if no new path is generated, let k+1 and proceed to Step 5;
[0068] Step 5: When k increases to a certain level, it indicates that the algorithm has failed to generate a new path after multiple iterations. Therefore, perform the following operations based on the value of k, and return to Step 2:
[0069] 5) If k>3, then let the value multiplier λ be the value multiplier of all nodes that have not been multiplied. i =λ i +M makes nodes that are not multiplied by value easier to multiply by value;
[0070] 6) If k>5, then let μ be the multiplier of all nodes that have been multiplied. i =μ i +M makes it easier to multiply nodes that have already been multiplied by value;
[0071] 7) If k > 10, then adjust the paths in the column pool;
[0072] 8) If k > 20, proceed to Step 6.
[0073] Step 6: If uncover_set is empty, or k > 20, the algorithm ends;
[0074] The path adjustment algorithm for k > 10 is designed as follows:
[0075] Step 1: Check if uncover_set is empty. If it is empty, proceed to Step 7; otherwise, proceed to Step 2.
[0076] Step 2: Traverse the uncover_set, obtain a node k_node that has not been multiplied, and greedily search for a path from the starting point s to k_node. Traverse the labels k_labels of k_node, and check if there are any valid labels k_valid_labels for covered nodes that have not been multiplied. If there are, proceed to Step 4; otherwise, proceed to Step 3.
[0077] Step 3: Make the path from the starting point s to k_node feasible. Traverse k_labels, obtain a label k_label of a node, backtrack to it, obtain the covered nodes need_cover_nodes in its predecessor label, traverse the path in the column pool, update all need_cover_nodes in the path to the scalar multiplication, that is, vacate the need_cover_nodes in the path in the column pool one by one to make k_label feasible, and then proceed to Step 4.
[0078] Step 4: Starting from k_valid_labels, search for the path from k_node to the end point t. Traverse the labels t_labels of the end point t and check if there are any valid labels t_valid_labels that have not been multiplied by the covered nodes. If there are, proceed to Step 6; otherwise, proceed to Step 5.
[0079] Step 5: Make it feasible to reach the endpoint t from k_node. Traverse t_labels, obtain a label t_label of a node, repeat the specific steps of Step 3 to make t_label feasible, and then proceed to Step 6;
[0080] Step 6: Update uncover_set, then return to Step 1;
[0081] Step 7: The path adjustment algorithm ends;
[0082] Solve for L(λ) i This is equivalent to finding the set of feasible paths in the spatiotemporal network that satisfy the rule constraints and have the minimum path cost. The labeling method is used to assign values to L(λ). i The solution is performed using the following algorithm:
[0083] In the aforementioned time-space continuity network of the scheduling plan, for Define a label set L i L i(r) =(Ac i(r) Ad i(r) ,Acd i(r) ,Aw i(r) Ms i(r) PreL i(r) PreA i(r) ,shift i(r) ) represents the content of the r-th label of node i, which respectively represent the cumulative cost, cumulative driving time, cumulative continuous driving time, cumulative working time, meal status, predecessor label, predecessor arc, and shift type when the label is extended to node i;
[0084] Step 1: Initialize the network and labels. Initialize the coverage cost for all crew segment nodes in the network, i.e., for... Clear the label set of all nodes in the network, and then clear the base origin. Initialize the labels;
[0085] Step 2: Label extension. Starting from the base origin, traverse each node according to the topological order. Update the label set of the current node based on the label set of the predecessor node and the type of the predecessor arc segment. Determine the feasibility of labeling the current node i with label r according to the crew rules.
[0086] Step 3: Delete dominant labels. When traversing to the current node, the node's label set needs to be checked according to the label dominance rules. Dominant labels are filtered and deleted, keeping only non-dominant labels. r,r′∈R i And r≠r′, the labeling rules are as follows:
[0087] 3)Ac i(r) ≤Ac i(r′) Ad i(r) ≥Ad i(r′) ,Acd i(r) ≥Acd i(r′) ,Aw i(r) ≥Aw i(r′) If r is better than r′;
[0088] 4)Ac i(r′) ≤Ac i(r) Ad i(r′) ≥Ad i(r) ,Acd i(r′) ≥Acd i(r) ,Aw i(r′) ≥Aw i(r) If r is better than r′, then r is superior to r′.
[0089] Step 4: Label backtracking. Once all nodes and their labels have been traversed, select the label with the smallest Ac from the base endpoint label set for each of the three work shift types. Backtrack according to its predecessor label to generate a work shift path with the lowest cost for the corresponding work shift type. The combination of these work shift paths with the lowest cost constitutes the final crew scheduling plan.
[0090] We decided to use the subgradient method to update the Lagrange multipliers. The update method for the multipliers is as follows:
[0091]
[0092] Where, σ k Let represent the step size of the k-th iteration, which changes dynamically during the iteration process. The update method and the rules it must follow are as follows:
[0093] σk =σ0 / k
[0094]
[0095] The current solution is improved by using exchange and deletion operators;
[0096] 3) Commutation Operator
[0097] The swap operator randomly selects two paths p1 and p2 in the current column pool, and randomly selects path segment s1 in p1. It then finds a path segment s2 in p2 that can be swapped with s1. Subsequently, s1 is removed from p1 and s2 is inserted. After a successful swap, the new path p1′ is output.
[0098] 4) Deletion operator
[0099] The deletion operator randomly selects a path p1 in the current column pool, and randomly selects a path segment s1 in p1. It then deletes s1 from p1 and outputs the new path p1′ after successful deletion.
[0100] Solving the Lagrange dual problem provides a set of feasible paths for the primal problem. The upper bound solution is obtained by directly solving the primal model through the solver. The initial feasible solution and all feasible paths obtained by solving the Lagrange dual problem during the iteration process are added to the path candidate set as a column pool. The upper bound solution is obtained by calling the solver directly to solve the primal model based on the obtained column pool.
[0101] As can be seen from the technical solutions provided by the embodiments of the present invention above, the method of the present invention divides the urban rail transit operation diagram according to the depot and the station, combines the generated crew segments to obtain the corresponding crew shifts, constructs the time-space connection network of the shift schedule, establishes an optimization model for the rail transit crew shift schedule, and finally designs a Lagrange relaxation algorithm solution model to effectively optimize the urban rail transit crew shift schedule.
[0102] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of the invention. Attached Figure Description
[0103] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0104] Figure 1A flowchart illustrating a method for optimizing rail transit crew scheduling based on a spatiotemporal connection network, provided in an embodiment of the present invention.
[0105] Figure 2 A schematic diagram of a time-space continuity network for scheduling plans provided in an embodiment of the present invention;
[0106] Figure 3 This is a flowchart of a Lagrange relaxation algorithm provided in an embodiment of the present invention;
[0107] Figure 4 A flowchart of a greedy-labeling algorithm for solving the problem is provided in an embodiment of the present invention;
[0108] Figure 5 This is a flowchart of a path adjustment algorithm solution provided in an embodiment of the present invention. Detailed Implementation
[0109] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0110] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or couplings. The term “and / or” as used herein includes any and all combinations of one or more of the associated listed items.
[0111] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0112] To facilitate understanding of the embodiments of the present invention, the following will provide further explanation and description with reference to the accompanying drawings and several specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.
[0113] This invention proposes a method for optimizing rail transit crew scheduling based on a spatiotemporal continuity network. The method first divides the urban rail transit operation map into crew segments by using the depot and the station as dividing points. Then, according to the constraints of the crew shift, the generated crew segments are combined into crew shifts. Based on this, a spatiotemporal continuity network for the scheduling plan is constructed, and a realistic rail transit crew scheduling plan optimization model is established. Finally, a Lagrange relaxation algorithm is designed to solve the model.
[0114] The research process of the method includes: crew segment division and shift generation; construction of a time-space continuity network for shift scheduling; establishment of an optimization model for rail transit crew scheduling; and design of the Lagrange relaxation algorithm.
[0115] The flowchart of a rail transit crew scheduling optimization method based on a spatiotemporal continuity network provided in this embodiment of the invention is as follows: Figure 1 As shown, the processing steps include the following:
[0116] Step S1: Divide the rail transit into crew segments and generate crew shifts based on the crew segments.
[0117] A crew segment is the smallest organizational unit obtained by dividing operational tasks using the depot and the station as "dividing points," and it forms the basis for generating crew shifts. The combination of crew segments between two rest breaks is called a crew work segment, which is the set of crew segments where a crew member works continuously for one period. Different combinations of crew segments will result in different final crew shifts. In actual operation, the number of crew segments is enormous, reaching hundreds or even thousands, and the number of possible combinations is countless.
[0118] Based on the constraints of crew shifts, crew segments can be combined into crew shifts. Typically, a crew member's daily shift consists of only one shift. A shift can be composed of multiple crew segments belonging to different train sets and not spatially or temporally related. However, the timing and spatial intervals between crew segments during their transitions involve numerous constraints, making the solution more difficult. In different crew environments, the scheduling problem should also consider the differences between various operating environments, resulting in different models and solution methods. The ultimate goal of crew scheduling is to find the optimal or near-optimal set of crew shifts.
[0119] Step S2: Construct a time-space continuity network for the scheduling plan based on the crew shift.
[0120] A schematic diagram of a time-space continuity network for scheduling constructed according to an embodiment of the present invention is shown below. Figure 2 As shown, the parameters of the time-space continuity network for the scheduling plan are defined as follows:
[0121] For all points in the network, it has t i , Six attributes represent the departure time, arrival time, originating station, destination station, working time, and node type of a crew segment. For all node types, there are...
[0122] In addition to sharing common node attributes, the origin and destination nodes of the flight crew base also possess the shift attribute. i (Day shift, night shift, and early shift are represented by 1, 2, and 3 respectively).
[0123] Based on the shift type to which the crew segment belongs, a corresponding number of task nodes are constructed for all crew segments. In addition to the common attributes of nodes, the task nodes also have the attribute k. t i l i , timetable i , representing the crew segment number to which the task belongs, node cost, running time, running distance, originating base, ending base, and train number, respectively. All task nodes together constitute set V. r ,for This refers to the departure time of the first stop in the flight attendant segment. That is the arrival time at the final station. It is the starting station of the first station. The final stop is the last station.
[0124] For all arcs in the network, there exists t ij , Two attributes represent the continuity time and the arc type, respectively. For all arc types, there are...
[0125] Tc min 、Tc max These represent the minimum and maximum continuation times, respectively; Tr min Tr max T represents the minimum and maximum rest time, respectively; m Indicates the actual meal time, Tm min Tm max These represent the minimum and maximum dining times, respectively.
[0126] (1) Constructing the successor network:
[0127] Step 1: Create nodes
[0128] 1) Source
[0129] The source node represents the virtual start and end point of the network, denoted as , ... and for for
[0130] 2) Crew base node
[0131] Based on the input information about the depot and station, as well as the shift type, a pair of origin and destination nodes for each shift type is established. All origin and destination nodes for the shifts constitute a set. Among them, for For the station name; Both are station names.
[0132] 3) Crew segment nodes
[0133] First, based on the input operation diagram, the system is divided using depots and duty stations as "dividing points" to obtain a set of crew segments. Since different shifts have different departure and return bases, it is necessary to define the shift type to which each crew segment belongs. However, if crew segments are divided directly using a single time point as the cutting point, some crew segment nodes near the cutting point will not be connected to the departure and return base nodes, resulting in these crew segment nodes not being covered. Therefore, it was decided to use time intervals to divide tasks into shift types, defining the start time of each shift type in this way. The start times of two different shift types may overlap. When a task's start time falls within the overlapping interval of two shift types, the task is defined as belonging to both shift types simultaneously; when the task's start time falls within a non-overlapping interval, the task is defined as belonging to the shift type of the interval in which the start time falls.
[0134] Finally, the set of all nodes is V.
[0135] Step 2: Establish the connecting arc
[0136] 1) Virtual In / Out Arc: A virtual in / out arc is an arc connecting the source node and the base node. The virtual out arc connects the virtual start point and the base start point, representing the flight attendant's transition from the initial state to the on-duty state. The virtual in arc connects the base end point and the virtual end point, representing the flight attendant's transition from the off-duty state to the finished state. The construction method for virtual in / out arcs is as follows: For Establish a virtual arc, and all virtual arcs form a set. for Establish a virtual incoming arc, and all virtual incoming arcs form a set.
[0137] 2) Departure and Return Arcs: Departure and return arcs are arcs connecting base nodes and crew segment nodes. The departure arc connects the base start point and the crew segment node, indicating that the crew member departs from the base and begins their daily shift. The return arc connects the crew segment node and the base end point, indicating that the crew member completes their daily shift and returns from the base. The construction method for departure and return arcs is as follows: For j∈V r ,satisfy shift i =shift j Establish an attendance arc, and all attendance arcs form a set. for satisfy Establish a set of all departure arcs. for c ij =0.
[0138] 3) Attendance-based ride-on arc: Similar to the attendance arc, the attendance-based ride-on arc connects the base node and the crew segment node, representing the crew member's attendance at the base and their ride-on service for the first task. The construction method for the attendance-based ride-on arc is as follows: For j∈V r ,satisfy Construct an arc of attendance times, and all such arcs form a set.
[0139] 4) Continuing Arc: A continuing arc is an arc connecting flight attendant segments, representing two consecutive flight attendant segments without breaks, meals, or other activities in between. Therefore, the continuing time of the continuing arc mainly includes the flight attendant handover time and waiting time multiplied by the next flight attendant segment time. The method for constructing a continuing arc is as follows: For j∈V r / i, satisfying Then a task arc is established. All successive arcs form set A. c .
[0140] 5) Connecting Flight Arc: A connecting flight arc is an arc that connects flight attendants between different flight segments, indicating that a flight attendant completes the first flight segment and then immediately takes the second, without a break in between. The method for constructing a connecting flight arc is as follows: For j∈V r / i, satisfying A task arc is established whereby a connecting arc can be formed when the connection time of two crew segments meets the minimum connection time limit, and the sum of the connection time and the working time of the second crew segment does not exceed the maximum rest time limit. All connecting arcs constitute set A. cs .
[0141] 6) Rest Arc: A rest arc is also an arc connecting flight attendant segments. Unlike a task arc, a rest arc represents a break after a flight attendant has completed their first flight segment, before starting their second. Therefore, the connection time of a rest arc is primarily the rest time itself. The method for constructing a rest arc is as follows: For j∈V r / i, satisfying Then establish an intermittent arc. All intermittent arcs form set A. r .
[0142] It's important to note that dining, as a special type of break activity, has similar succession conditions to break arcs. Therefore, when constructing the network, dining arcs are not specifically characterized; instead, they are included within break arcs to avoid excessive network size and redundancy. However, since dining changes the flight attendants' eating status, it's necessary to determine whether a break arc can be used for dining when constructing it. This is done by assigning an additional attribute φ to the break arc. ij To indicate, for Satisfy Tm min ≤T m ≤Tm max If φ is considered to be a suitable time for dining during the break, then it is assumed that the break arc is suitable for dining. ij =1, otherwise φ ij =0.
[0143] T m The calculation method differs depending on the scenario, based on the connection time T. conn Compared to the dining time window From the perspective of the relationship, the actual dining time T m There are three possible scenarios. Scenario one involves a portion of the continuation time falling within the mealtime window, in which case T... m or Secondly, if the entire continuum falls within the mealtime window, then T m =T conn Thirdly, if the follow-up time completely covers the dining time window, then... In this scenario, the connection time is too long, and the actual meal time far exceeds the minimum meal time, meaning an increase in non-paid time and impacting flight attendant efficiency. Therefore, this situation is not considered in this paper. By calculating T... m Determine φ ij The value of the interval arc (i,j) can be used to determine whether it can be used for dining.
[0144] 7. Break-time Arcade: A break-time arc connects different flight segments, indicating that a flight attendant completes one segment before starting the next, with a break in between. The method for constructing a break-time arc is as follows: For j∈V r / i, satisfying A convenient rest arc is established when the connection time of two service segments meets the minimum connection time limit, and the sum of their connection time and the working time of the second service segment simultaneously meets both the minimum and maximum rest time limits. Similar to rest arcs, convenient rest arcs also include mealtime scenarios; the rules for determining mealtimes are the same as for rest arcs and will not be repeated. All convenient rest arcs constitute set A. rs .
[0145] Let A be the set of all arcs.
[0146] Step 3: Construct the continuation network, denoted as G(V,A).
[0147] Step S3: Establish the objective function of the rail transit crew scheduling optimization model based on the time-space continuity network of the scheduling plan.
[0148] (1) Define the following parameters and variables:
[0149] N represents the set of all crew segments, and i is any one of them.
[0150] P represents the set of all crew shifts, and p represents any one of those crew shifts.
[0151] This indicates the lower limit of working hours for the morning, afternoon, and evening shifts.
[0152] This indicates the maximum working hours for the morning, afternoon, and evening shifts.
[0153] This indicates the lower limit of driving time for the morning, afternoon, and evening shifts.
[0154] This indicates the maximum driving time for the morning, afternoon, and evening shifts.
[0155] This indicates the maximum duration of continuous work in one session.
[0156] Tr max Tr min Indicates the upper and lower limits of the break time.
[0157] Tm max Tm min Indicates the upper and lower limits of the dining time.
[0158] Tc max Tc min Indicates the upper and lower limits of the continuation time.
[0159] This indicates the lunchtime window.
[0160] Indicates the dinner time window.
[0161] f s These represent the penalty values for driving time below the upper limit, rest time exceeding the lower limit, meal time exceeding the lower limit, connecting time exceeding the lower limit, and ride-sharing penalty, respectively.
[0162] These represent the driving time of shift p and Td, respectively. max The difference between shift p and Tr min The difference between shift p and meal time and Tm min The difference, the connection time of shift p and Tc min The difference.
[0163] c out This indicates the cost of deploying flight attendants.
[0164] x p Let x be a 0-1 decision variable; if path p is selected, then x... p =1, otherwise 0.
[0165] Let be a 0-1 decision variable. If task i with crew segment number k is covered by path p in the form of a normal value multiplication, then... Otherwise, it is 0.
[0166] (2) Objective function of the optimization model for rail transit crew scheduling
[0167] The optimization objectives of the model are to minimize the number of flight attendant shifts, minimize non-paid time for flight attendants, minimize deviations from standard working hours, and minimize the number of convenient rides. The comprehensive expression of the objective function is as follows:
[0168]
[0169] Among them, the coefficients of the decision variables c p The total cost of path p can be expressed as:
[0170]
[0171] c p It can be divided into three parts: the first part, c outThe fixed cost of selecting path p can be understood as the attendance cost of a flight attendant. Limiting the number of selected paths effectively limits the number of shifts. Part Two... The penalties for deviations in flight attendant driving time and non-paid time mainly include penalties for driving time below the upper limit, and penalties for additional time exceeding the minimum activity time standard during breaks, meals, and connections. The third part, fs, represents the penalty for taking a ride during the extension of path p.
[0172] (3) Constraints of the Rail Transit Crew Scheduling Optimization Model
[0173] Crew segment coverage constraint: Each crew segment must be covered by a normal arc exactly once, ensuring that all crew segments are operated by a crew member.
[0174]
[0175] Decision variable value constraints:
[0176]
[0177] Step S4: Solve the objective function of the above-mentioned rail transit crew scheduling optimization model using the Lagrange relaxation algorithm to obtain the rail transit crew scheduling plan.
[0178] Based on the requirements for solution quality and speed in the flight attendant scheduling problem, the Lagrange relaxation algorithm is adopted to solve the flight attendant scheduling problem. By relaxing the "hard constraints" in the model, the original problem is decomposed into a set of multiple independent work shifts' time and space shortest path subproblems. This decouples the subproblems while ensuring solution quality and efficiency. Figure 3 This is a flowchart of a Lagrange relaxation algorithm provided in an embodiment of the present invention.
[0179] (1) Expression of the Lagrange duality problem model
[0180] The Lagrange dual problem model (LD) after relaxing the crew segment coverage constraint is as follows:
[0181] LD = max L(λ) i )
[0182]
[0183] In the above model, L(λ) i Let be the Lagrange relaxation function, and the formula introduces the Lagrange multiplier λ. i Since L(λ) iCompared to the original problem, this problem has relaxed some constraints, thus possessing a larger solution space. Its solution is often an infeasible solution to the original problem, but its objective function value z... LR This can serve as a lower bound for the objective function value z of the original problem. By continuously adjusting the Lagrange multiplier λ... i For L(λ) i Iterate, and penalize the difficult constraints in the objective function that do not satisfy the original problem, such that L(λ) i The solution gradually approaches the direction that satisfies the constraints of the original problem, z. LR The value of λ continuously increases, approaching the lower bound of the original problem, and then for all multipliers λ... i The corresponding z LR Find the maximum value z LD This gives us the lower bound solution to the original problem.
[0184] The Lagrange relaxation function L(λ) i After equivalent transformation, we can obtain the following formula:
[0185]
[0186] The formula consists of two terms. The first term is the path cost of the work shift, which can be calculated by adjusting the node costs in the continuity network based on the multipliers and searching for the shortest path that satisfies the constraints in the network. The second term is the sum of the Lagrange multipliers of each crew segment, representing the "total cost of task resources", which can be calculated by the number of times each task is covered in each iteration.
[0187] (2) Generation of the initial feasible solution
[0188] The greedy-labeling method is used to generate an initial feasible solution to the original problem. The specific algorithm design is as follows:
[0189] Step 1: Initialize the currently uncovered task set uncover_set, and set the algorithm parameter k = 0;
[0190] Step 2: Check if uncover_set is empty. If it is, proceed to Step 6; otherwise, proceed to Step 3.
[0191] Step 3: Perform a greedy search based on label-setting in the network. Unlike the general label-setting method, the greedy search's label dominance principle only retains the path cost, allowing the algorithm to quickly generate lower-cost paths.
[0192] 5)Ac i(r) ≤Ac i(r′) If r is better than r′;
[0193] 6)Ac i(r′) ≤Ac i(r) If r is better than r′, then r is superior to r′.
[0194] Step 4: If the greedy search successfully generates a new path, add the new path to the column pool, update uncover_set, reset k=0, and set the multiplier λ of the node multiplied by the new path value. i =λ i —M (M is an infinite positive number) increases the difficulty of multiplying a node that has already been multiplied again, so return to Step 2; if no new path is generated, let k+1 and proceed to Step 5;
[0195] Step 5: When k increases to a certain level, it indicates that the algorithm has failed to generate a new path after multiple iterations. Therefore, perform the following operations based on the value of k, and return to Step 2:
[0196] 9) If k>3, then let the value multiplier λ be the value multiplier of all nodes that have not been multiplied. i =λ i +M makes nodes that are not multiplied by value easier to multiply by value;
[0197] 10) If k>5, then let μ be the multiplier of all nodes that have been multiplied. i =μ i +M makes it easier to multiply nodes that have already been multiplied by value;
[0198] 11) If k > 10, then adjust the paths in the column pool;
[0199] 12) If k > 20, proceed to Step 6.
[0200] Step 6: If uncover_set is empty, or k > 20, the algorithm ends.
[0201] The flowchart of a greedy labeling algorithm provided in this embodiment of the invention is as follows: Figure 4 As shown.
[0202] The path adjustment algorithm for k > 10 is designed as follows:
[0203] Step 1: Check if uncover_set is empty. If it is empty, proceed to Step 7; otherwise, proceed to Step 2.
[0204] Step 2: Traverse the uncover_set, obtain a node k_node that has not been multiplied, and greedily search for a path from the starting point s to k_node. Traverse the labels k_labels of k_node, and check if there are any valid labels k_valid_labels for covered nodes that have not been multiplied. If there are, proceed to Step 4; otherwise, proceed to Step 3.
[0205] Step 3: Make the path from the starting point s to k_node feasible. Traverse k_labels, obtain a label k_label for each node, backtrack along it, and obtain the covered nodes need_cover_nodes from its predecessor labels. Traverse the paths in the column pool, updating all need_cover_nodes in the paths to be multiplied, that is, gradually freeing up need_cover_nodes in the paths in the column pool to make k_label feasible, and then proceed to Step 4.
[0206] Step 4: Starting from k_valid_labels, search for the path from k_node to the endpoint t. Iterate through the labels t_labels of the endpoint t, and check if there are any valid labels t_valid_labels that have not been multiplied by the covered nodes. If there are, proceed to Step 6; otherwise, proceed to Step 5.
[0207] Step 5: Make it feasible to reach the endpoint t from k_node. Traverse t_labels, obtain a label t_label for each node, repeat the specific steps of Step 3 to make t_label feasible, and then proceed to Step 6.
[0208] Step 6: Update uncover_set, then return to Step 1;
[0209] Step 7: The path adjustment algorithm ends.
[0210] The flowchart of a path adjustment algorithm provided in this embodiment of the invention is as follows: Figure 5 As shown.
[0211] (2) Methods for solving the Lagrange duality problem
[0212] As the above analysis shows, the key to solving the LD problem lies in obtaining L(λ) for each iteration. i The optimal solution of ) is given by L(λ) i From the structure of L(λ), we can see that solving L(λ) iThe scheduling problem is equivalent to finding the set of feasible paths in a spatiotemporal network that satisfy the rule constraints and have the minimum path cost, which is a resource-constrained shortest path problem. Since scheduling problems involve multiple resource constraints (such as working hours, continuous working hours, and rest periods), the labeling method can represent the consumption of various resources by the current node as a set of labels. As the labels extend, the path is gradually expanded. By performing a feasibility check on the labels of the current node at each step, paths that do not meet the resource constraints are filtered out, reducing the generation of invalid paths. Furthermore, since the objective function of the constructed model contains multiple types of penalty terms, with different penalty values set for activities such as rest periods and meals exceeding limits, the labeling method allows for the application of corresponding penalty values based on different arc types during path expansion, flexibly adjusting path costs. In addition, by performing a dominance check on the labels during path expansion, dominant labels can be filtered out in advance, improving solution efficiency. Therefore, the labeling method is used for L(λ) i The solution is performed using the following algorithm:
[0213] In the connection network, for Define a label set L i L i(r) =(Ac i(r) Ad i(r) ,Acd i(r) ,Aw i(r) Ms i(r) PreL i(r) PreA i(r) ,shift i(r) ) represents the content of the r-th label of node i, which respectively represent the cumulative cost, cumulative driving time, cumulative continuous driving time, cumulative working time, meal status, predecessor label, predecessor arc, and shift type when the label extends to node i.
[0214] Step 1: Initialize the network and labels. Initialize the coverage cost for all crew segment nodes in the network, i.e., for... Clear the label set of all nodes in the network, and then clear the base origin. The labels are initialized as shown in Table 1.
[0215] Table 1. Virtual Starting Point Number Initialization Method
[0216]
[0217] Step 2: Label Extension. Starting from the base origin, traverse each node according to the topological order. Update the label set of the current node based on the label set of the predecessor node and the type of the predecessor arc segment. The update method is shown in Table 2. Then, determine the feasibility of labeling the current node i with label r according to the service rules. The determination rules are shown in Table 3. Rule 1 states that if the current shift belongs to the day or night shift type, and the departure time of the crew segment represented by the current node is later than the lunch or dinner time window, and the shift's meal status is "not eaten," then the shift does not meet the meal constraint and is deemed infeasible. Rule 2 states that if the cumulative continuous driving time of the current shift exceeds the rule limit, then the shift is deemed infeasible. Rule 3 states that if the cumulative driving time or cumulative working time does not meet the minimum driving time limit when the shift ends, then the shift is deemed infeasible. Rule 4 states that if the cumulative driving time or cumulative working time exceeds the maximum driving time limit when the shift ends, then the shift is deemed infeasible. Rule 5 states that when the shift ends, the shift type of the current shift must be consistent with the shift type of the base destination; otherwise, the shift is infeasible, ensuring that shifts originating from a base starting point of a specific shift type can extend to the corresponding base destination.
[0218] Table 2 Labeling Update Method
[0219]
[0220]
[0221] Table 3 Rules for Determining Infeasibility by Label Number
[0222]
[0223]
[0224] Step 3: Delete Dominant Labels. When traversing to the current node, the node's label set needs to be checked according to the label dominance rules. Dominant labels are filtered and deleted, retaining only non-dominant labels, thereby controlling the size of the labels and speeding up the path search. r,r′∈R i And r≠r′, the labeling rules are as follows:
[0225] 5)Ac i(r) ≤Ac i(r′) Ad i(r) ≥Ad i(r′) ,Acd i(r) ≥Acd i(r′) ,Aw i(r) ≥Aw i(r′) If r is better than r′;
[0226] 6)Aci(r′) ≤Ac i(r) Ad i(r′) ≥Ad i(r) ,Acd i(r′) ≥Acd i(r) ,Aw i(r′) ≥Aw i(r) If r is better than r′, then r is superior to r′.
[0227] Step 4: Label Backtracking. Once all nodes and their labels have been traversed, select the label with the smallest Ac from the base endpoint label sets for each of the three work shift types. Backtracking based on its predecessor label will generate a work shift path with the minimum cost for the corresponding work shift type.
[0228] (3) Lagrange multiplier update method
[0229] Since the Lagrange dual function is often non-smooth in practical optimization problems, the subgradient method can handle non-smooth cases well. Therefore, it was decided to use the subgradient method to update the Lagrange multipliers. The update method for the multipliers is as follows:
[0230]
[0231] Where, σ k Let represent the step size of the k-th iteration, which changes dynamically during the iteration process. The update method and the rules it must follow are as follows:
[0232] σ k =σ0 / k
[0233]
[0234] (4) Improved lower bound solution of the neighborhood search algorithm
[0235] The Lagrange relaxation algorithm may get stuck in local optima during iteration, failing to find the global optimum. Neighborhood search algorithms, through local transformations of functions, move from one solution to another in the search space. With a suitable neighborhood structure and search strategy, they have the opportunity to escape local optima and explore other parts of the solution space, increasing the likelihood of finding a better solution. Therefore, exchange and deletion operators are designed to improve the current solution.
[0236] 5) Commutation Operator
[0237] The swap operator randomly selects two paths p1 and p2 in the current column pool, and randomly selects path segment s1 in p1. It then finds a path segment s2 in p2 that can be swapped with s1. Subsequently, s1 is removed from p1 and s2 is inserted. After a successful swap, the new path p1′ is output.
[0238]
[0239] 6) Deletion operator
[0240] The deletion operator randomly selects a path p1 from the current column pool, and randomly selects a path segment s1 from p1. It then deletes s1 from p1 and outputs the new path p1′ after successful deletion.
[0241]
[0242]
[0243] (5) Method for obtaining the Lagrange upper bound solution
[0244] Solving the Lagrange dual problem provides a set of feasible paths to the primal problem, allowing the solver to directly solve the primal model to obtain an upper bound solution. First, the initial feasible solution and all feasible paths obtained during the iteration process are added to a path candidate set as a column pool. Then, based on the obtained column pool, the solver is invoked to directly solve the primal model to obtain an upper bound solution.
[0245] In summary, compared with the existing method of manually adjusting the crew scheduling plan, the present invention significantly improves the efficiency of adjusting the crew scheduling plan by constructing and solving an optimization model.
[0246] When constructing the model, this invention comprehensively considers objectives such as the number of flight attendant shifts, non-paid time for flight attendants, deviation of flight attendants' working hours from the standard, and number of convenient rides, making the resulting flight attendant scheduling plan more scientific and reasonable.
[0247] The Lagrange relaxation algorithm designed in this invention can solve the flight attendant scheduling plan adjustment model, and has the characteristics of good versatility, good solution quality and high solution efficiency.
[0248] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing the present invention.
[0249] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
[0250] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for apparatus or system embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The apparatus and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0251] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for optimizing rail transit crew scheduling based on spatiotemporal continuity networks, characterized in that, include: Divide the rail transit system into crew segments and generate crew shifts based on these segments; Construct a time-space continuity network for the scheduling plan based on the crew shift; The objective function for establishing an optimization model of rail transit crew scheduling based on the spatiotemporal continuity network of scheduling plans; The objective function of the rail transit crew scheduling optimization model is solved using the Lagrange relaxation algorithm to obtain the rail transit crew scheduling plan. The objective function of the rail transit crew scheduling optimization model based on the spatiotemporal connection network of the scheduling plan includes: Based on the spatiotemporal continuity network of the scheduling plan, the following parameters and variables are defined: Represents the set of all crew segments. For any one of the crew segments; This indicates the assembly of all crew shifts. For any of the crew shifts; This indicates the lower limit of working hours for morning, afternoon, and evening shifts; This indicates the maximum working hours for morning, afternoon, and evening shifts; This indicates the minimum driving time for morning, afternoon, and evening shifts; This indicates the maximum driving time for morning, afternoon, and evening shifts; Indicates the maximum duration of a single continuous work session; Indicates the upper and lower limits of the break time; Indicates the upper and lower limits of dining time; Indicates the upper and lower limits of the continuation time; Indicates the lunchtime window; Indicates the dinner time window; , , , , These represent the penalty values for driving time below the upper limit, rest time exceeding the lower limit, meal time exceeding the lower limit, connecting time exceeding the lower limit, and ride-sharing penalty, respectively. , , , They represent the train / bus schedules. Driving time and The difference, the number of shifts Time and The difference, the number of shifts Meal time and The difference, the number of shifts Continuation time and The difference; This indicates the cost of deploying flight attendants; For 0-1 decision variables, if the path If selected, then Otherwise, it is 0; For 0-1 decision variables, if the task The path is multiplied by the normal value. Coverage, then Otherwise, it is 0; With the optimization objectives of minimizing the number of crew shifts, minimizing non-paid time for crew members, minimizing deviations from standard working hours, and minimizing the number of convenient rides, the objective function of the rail transit crew scheduling optimization model is established as follows: Among them, the coefficients of the decision variables For path The total cost is expressed as: It is divided into three parts: Part One, For path The selected fixed cost represents the attendance cost of a flight attendant; limiting the number of selected routes effectively limits the number of shifts. Part Two... The penalties for deviations in flight attendant driving time and non-paid time are as follows: penalties are imposed for driving time below the upper limit, and penalties are imposed for additional time exceeding the lower limit of the activity time standard during breaks, meals, and transfers. The third part, 𝑓𝑠, is the penalty for taking a ride during the extension of route 𝑝. The constraints for setting the optimization model for rail transit crew scheduling include: Crew segment coverage constraint: Each crew segment must be covered by a normal arc exactly once, ensuring that all crew segments are operated by a crew member. , Decision variable value constraints: ; ; The method of solving the objective function of the rail transit crew scheduling optimization model using the Lagrange relaxation algorithm to obtain the rail transit crew scheduling plan includes: The Lagrange dual problem model after setting the relaxed crew segment coverage constraint is as follows: , , in, For the Lagrange relaxation function, the formula introduces Lagrange multipliers. By continuously adjusting the Lagrange multipliers right Iteration, applying penalties to difficult constraints in the objective function that do not satisfy the original problem, such that... The solution gradually approaches the direction that satisfies the constraints of the original problem. The value continuously increases, approaching the lower bound of the objective function of the rail transit crew scheduling optimization model. Then, for all multipliers... corresponding Find the maximum value Thus, the lower bound solution of the objective function is obtained; Lagrange relaxation function After equivalent transformation, we can obtain the following formula: The formula consists of two terms. The first term is the path cost of the work shift, which is calculated by adjusting the node costs in the continuity network based on the multipliers and searching for the shortest path that satisfies the constraints in the network. The second term is the sum of the Lagrange multipliers of each crew segment, representing the "total cost of task resources", which is calculated by the number of times each task is covered in each iteration. The initial feasible solution of the objective function is generated using a greedy labeling method. The specific algorithm design is as follows: Step 1: Initialize the set of currently uncovered tasks Set algorithm parameters ; Step2: Judgment Is it empty? If yes, proceed to Step 6; otherwise, proceed to Step 3. Step 3: Perform a greedy search based on labeling on the network: 1) ,but Superior ; 2) ,but Superior ; Step 4: If the greedy search successfully generates a new path, add the new path to the column pool and update... Reset And let the value of the node multiplied by the new path value be the multiplier. , If the integer is an infinite positive number, it increases the difficulty of multiplying a node that has already been multiplied again; return to Step 2. If no new path is generated, then let... Proceed to Step 5; Step 5: When When the value increases to a certain extent, it indicates that the algorithm has failed to generate a new path after multiple iterations. Therefore, according to... Perform the following operations on the value and return to Step 2: 1) If Then let the multipliers of all nodes that have not been multiplied be multiplied. This makes nodes that have not been multiplied more likely to be multiplied; 2) If Then let the multiplier of all nodes that have been multiplied be... This makes it easier to multiply nodes that have already been multiplied; 3) If If so, the paths in the column pool will be adjusted; 4) If Then proceed to Step 6; Step 6: If Empty, or The algorithm ends; Among them, when The path adjustment algorithm is designed as follows: Step 1: Check Is it empty? If it is empty, proceed to Step 7; otherwise, proceed to Step 2. Step 2: Traversal Get a node that has not been multiplied. Greedy search from the starting point Departure to Path, traverse label Check if there are any feasible labels for nodes that have not been multiplied by the covered nodes. If yes, proceed to Step 4; otherwise, proceed to Step 3. Step 3: Make the starting point to Feasible, traversal Get a label of a node. Backtrack it to obtain the covered nodes in its predecessor index. Iterate through the paths in the column pool and retrieve the items from the path. All are updated to convenient multiplication, that is, the paths in the column pool are... One by one, they were vacated, making If it works, proceed to Step 4; Step 4: Starting from, search To the finish line The path, traversing the destination. label Check if there are any feasible labels for nodes that have not been multiplied by the covered nodes. If yes, proceed to Step 6; otherwise, proceed to Step 5. Step 5: Make To the finish line Feasible, traversal Get a label of a node. Repeat the specific steps in Step 3 to make If it works, proceed to Step 6; Step 6: Update Return to Step 1; Step 7: The path adjustment algorithm ends; Solve This is equivalent to finding the set of feasible paths in the spatiotemporal network that satisfy the rule constraints and have the minimum path cost, and then using a labeling method to... The solution process is as follows: In the aforementioned time-space continuity network of the scheduling plan, for Set a set of labels ,in Represents a node No. The content of each label indicates the extension of the label to the node. Cumulative cost, cumulative driving time, cumulative continuous driving time, cumulative working time, meal status, predecessor number, predecessor arc, and work shift type; Step 1: Initialize the network and labels, and initialize the coverage cost for all crew segment nodes in the network, i.e., for , Clear the label set of all nodes in the network and initialize the label of the base starting point; Step 2: Label extension. Starting from the base origin, traverse each node according to the topological order. Update the label set of the current node based on the label set of the predecessor node and the type of the predecessor arc segment. Then, update the label set of the current node according to the crew rules. label To determine the feasibility; Step 3: Delete dominant labels. When traversing to the current node, the node's label set needs to be checked according to the label dominance rules. Dominant labels are filtered and deleted, keeping only non-dominant labels. , and The rules for assigning labels are as follows: 1) ,but Superior ; 2) ,but Superior ; Step 4: Label backtracking. Once all nodes and their labels have been traversed, select from the base endpoint label sets for each of the three work shift types. The smallest label is used to backtrack based on its predecessor label to generate a work shift path with the lowest cost for the corresponding work shift type. The combination of these lowest cost work shift paths constitutes the final crew scheduling plan. We decided to use the subgradient method to update the Lagrange multipliers. The update method for the multipliers is as follows: in, Indicates the first The step size of each iteration changes dynamically during the iteration process, and its update method must follow the following rules: The current solution is improved by using exchange and deletion operators; 1) Commutation Operator The swap operator randomly selects two paths from the current column pool. and randomly select Search Zhong Ke Yu Path segments to be swapped Then from Delete and insert Output the new path after the swap is successful. ; 2) Deletion operator The delete operator randomly selects a path from the current column pool. and randomly select ,Will from Delete it, and output the new path after successful deletion. ; Solving the Lagrange dual problem provides a set of feasible paths for the primal problem. The upper bound solution is obtained by directly solving the primal model through the solver. The initial feasible solution and all feasible paths obtained by solving the Lagrange dual problem during the iteration process are added to the path candidate set as a column pool. The upper bound solution is obtained by calling the solver directly to solve the primal model based on the obtained column pool.
2. The method according to claim 1, characterized in that, The aforementioned division of rail transit into crew segments, and generation of crew work shifts based on these segments, includes: The urban rail transit operation map is divided into operation tasks by using depots and stations as dividing points to obtain crew segments. According to the constraints of the crew shift, the generated crew segments are combined into crew shifts. The constraints of the crew shifts include: the combination of crew segments must satisfy the following conditions in space: the starting station of the subsequent segment must be the same as the ending station of the previous segment; and in time, the starting time of the subsequent segment and the ending time of the previous segment must meet a certain time interval.
3. The method according to claim 2, characterized in that, The aforementioned spatiotemporal continuity network for scheduling plans based on crew shifts includes: The source point, the service base, and the segmented service segments are regarded as nodes. Virtual entry and exit arcs, departure and return arcs, departure and boarding arcs, boarding arcs, boarding arcs, boarding arcs, rest arcs, and boarding arcs that meet the service connection conditions are established between each node, thereby constructing a time-space connection network for the scheduling plan. In the spatiotemporal continuity network of the scheduling plan, the source node represents the virtual start and end point of the network. Based on the input depot and station information, as well as the shift type, a pair of crew base start and end points is established for each shift type. A virtual outgoing arc connects the virtual starting point and the base starting point, representing the crew member's transition from the initial state to the on-duty state; a virtual incoming arc connects the base ending point and the virtual ending point, representing the crew member's transition from the off-duty state to the end state; an on-duty arc connects the base starting point and the crew segment node, representing the crew member's arrival at the base and the start of their daily shift; an off-duty arc connects the crew segment node and the base... The terminus represents the flight attendant's completion of a day's duty and departure from that base. The "start" arc connects the base node and the flight segment node, indicating that the flight attendant starts their shift at that base and performs their first duty in a convenient manner. The "continue" arc connects the flight segment node, indicating that the flight attendant performs two consecutive flight segments without engaging in other activities during this period. The "break" arc connects the flight segment node, indicating that the flight attendant performs the first flight segment and then takes a break in between. The "break" arc connects the flight segment node, indicating that the flight attendant takes a break after performing the first flight segment and then continues performing the second flight segment.
4. The method according to claim 3, characterized in that, In the aforementioned time-space connection network of the shift schedule, the connection time constraint is considered, that is, the connection time of two shift segments must be greater than the minimum connection time and the sum of the connection time and the working time of the second shift segment must be less than the maximum rest time. In the aforementioned time-space connection network of the scheduling plan, the break time constraint is also considered, that is, the connection time between two crew segments must be greater than the minimum break time and less than the maximum break time. In the aforementioned time-space continuity network of the scheduling plan, meal time constraints are also considered, namely, the actual meal time must be greater than the minimum meal time and less than the maximum meal time.
Citation Information
Patent Citations
Metro crew traffic route and scheduling plan integrated optimization model and algorithm
CN118228867A