We define each OD as a set of railcars flow which has the same origin station and destination station.
3.1. Construction of time-space Network Based on the Train Diagram
In order to simplify the scale of the problem, a railway bureau is taken as the research object, and the marshaling station, district station, large freight station, and boundary station of the railway bureau are taken as the main fulcrum stations, while the railcar flow of the intermediate station is merged in accordance with the section center rule [
32]. Set the fulcrum station set in the railway bureau as S, and define the time-space network as
G = (
N,
A), where N denotes the set of nodes and A denotes the set of arcs in the network. The network takes 18:00 of the current day to 18:00 of the next day as a decision cycle. The train diagram is the main frame of constructing the time-space network.
Network G takes the Arrival Node (AN) and Departure Node (DN) of as the main time-space nodes. The AN represents the arrival moment of a train and the DN represents the departure moment of a train. The Loaded Railcar State End Node (LRSEN) and the Empty Railcar State End Node (ERSEN) represent the mutual transformation moment of loaded railcar flow and empty railcar flow. Secondary Operation Completion Node (SOCN) represents the completion moment of secondary operation of loaded railcar flow. Each station sets two Initial Nodes (IN), which are divided into loaded railcar layer and empty railcar layer, to represent the start moment of the railcar flow in the decision cycle. Each station sets two End Nodes (EN), which are also divided into loaded railcar layer and empty railcar layer, to represent the end moment of the railcar flow in the decision cycle. The type indexes of time-space nodes are shown in
Table 2.
Network G takes the train as the Train Arc (TA), and adds the corresponding Local Operation Arc (LOA) and Secondary Operation Arc (SOA) based on the technical operation time of each fulcrum station, and realizes the connection of each arc through the Formation and Departure Arc (FADA), Empty Railcar Allocation Arc (ERAA), Transfer Operation Arc (TOA), and Stay Arc (SA). The Initial Arc (IA) represents the initialization process of the railcar flow. The End Arc (EA) and the Detention Arc (DA) represent the process of railcar flow detention to the end of the decision cycle. At the same time, hierarchy attributes were added to distinguish the Loaded Railcar Layer (LRL), Empty Railcar Layer (ERL), and Public Layer (PL). At present, the research on dynamic railcar flow operation lacks the consideration of the secondary operation of the loaded railcar flow, and this paper represents the secondary operation process of the loaded railcar flow through the connection between LRSEN and SOCN. The network topology relationship between time-space nodes and time-space arcs is shown in
Figure 4. The type indexes of time-space arcs are shown in
Table 3 and the hierarchy indexes of the hierarchy set are shown in
Table 4.
Because loaded railcar flow has the characteristics of a tree path, this paper describes the transport process of loaded railcar flow by constructing a time-space path which is a set of time-space arcs that satisfy the constraint of time continuity. The time-space path of loaded railcar flow is divided into four categories: Initial Path (IP), Secondary Operation Path (SOP), Empty to Loaded Path (ETLP), and Detention Path (DP). The IP represents the transport process of the initial loaded railcar flow. The path starts from the IN and ends at the LRSEN. The path takes the LOA as the final arc. The SOP represents the transport process of secondary operation loaded railcar flow. The path starts from the LRSEN and ends at the ETN. The path takes the SOA as the first arc and cannot contain the LOA. ETLP represents the transport process of self-loading railcar flow. The path starts from the ERSEN and ends at the EN. The DP representing the loaded railcar flow remains at the station throughout the decision cycle. The path starts from the IN and ends at the EN. The type indexes of time-space paths are shown in
Table 5.
3.2. Feasible Path Set Generation Algorithm Based on Improved A* Algorithm
According to the requirements of a train marshaling plan, each OD (a set of railcars flow which has the same origin station and destination station) has a fixed railcar flow connection mode, thus each OD has a specific route, that is, the railcar flow route. In this paper, the feasible path has a broader meaning in the time-space network. For each OD, a set of time-space arc sets that satisfies the time continuity constraint and the constraint of the railcar flow route station sequence is a feasible time-space path.
A* algorithm is an efficient algorithm for solving K-shortest path [
33,
34,
35]. We improve the algorithm based on the railcar flow route. Set OD index as f, the flowchart of improved A* algorithm is shown in
Figure 5 and the algorithm for generating the feasible path set is as follows:
Step 1: Take f = 1, and turn to Step 2;
Step 2: Set the maximum index of K-shortest path of demand f to N, and initial K = 0, set the starting station of demand f as station1, and the final station as station2. Traverse the railcar flow route set, find the railcar flow route of the starting station as station1 and ending station as station2, and record the station sequence corresponding to the railcar flow route as station-list, and turn to Step 3;
Step 3: Taking the EN corresponding to station2 as the source node, the Dijkstra algorithm is used to find the shortest distance between the source node and other nodes in the time-space network, which is taken as the H value of each node, and turn to Step 4;
Step 4: Establish a node set as close-list which has been estimated and a node set as open-list which will be estimated. Add the IN corresponding to the station1 to the open-list, and turn to Step 5;
Step 5: Traverse the nodes in the open-list to find the node with the lowest F value and treat it as m to be processed, and turn to Step 6;
Step 6: Move this node from the open-list to the close-list, and turn to Step 7;
Step 7: For each pointing node of m as n, set its parent node as m, and recalculate its G and F values, and add them to the open-list, and turn to Step 8;
Step 8: If the open-list is empty, the target K short path is not found, and the search fails, then f = f + 1, and turn to Step 2. If the open-list is not empty, traverse the open-list, if the node with the lowest F value is the EN corresponding to station2, the target K shortest path is found, then K = K + 1, and turn to Step 9; otherwise turn to Step 5;
Step 9: First, judge whether K is greater than N, if K is greater than N, f = f + 1, then turn to Step 2. Otherwise, judge the number of LOA in the K shortest path. If the number is greater than 1, remove the K short path and turn to Step 4; if the number is equal to 1, divide the K short path into two paths with the end node of the LOA as the cutting node, and turn to Step 10;
Step 10: Take the station sequence of these two paths as station-list1 and station-list2. Determine whether the station sequence of each path is the same as the station-list, and if so, add the path to the feasible path set, and turn to Step 5;
Step 11: When all OD demands are traversed to generate a feasible path set, the algorithm is finished.
3.3. The Dynamic Railcar Flow Distribution Model in an Emergency
The key to predict the traffic congestion is to grasp the real-time number of railcars at a station. The train runs according to the train diagram, and the time-space network constructed based on the train diagram conforms to the situation of railway field operation. In this paper, based on the time-space network, the distribution results of railcar flow on the time-space network are obtained by establishing the dynamic railcar flow distribution model in an emergency. According to the arc flow, the real-time number of railcars at each station can be obtained. By comparing the real-time number of railcars at each station with the storage capacity of the station, it can be concluded whether the station belongs to the congestion stage, so as to be able realize the prediction of traffic congestion in the station.
3.3.1. Set Parameter and Variable Definitions
The general notations used in the formulation are listed in
Table 6.
3.3.2. Objective Function
The objective is to compress the transit time of the loaded railcars at the station, reduce the running time of the empty railcars, and minimize the number of off-axle railcars. The expression is as follows:
3.3.3. Constraint Conditions
Initial loaded railcar flow constraints: For each loaded railcar flow, the sum of the number of flows allocated on the feasible path is equal to the number of initial loaded railcar flows.
Initial empty railcar flow constraints: For each empty railcar flow, the sum of the number of flows allocated on the feasible arc is equal to the number of initial empty railcar flow.
Consistent constraints of decision variables: For each IP or DP, the sum of the number of initial loaded railcar flows allocated on that path is equal to the number of flows of that path; for each IA or DA, the sum of the number of initial empty railcar flows allocated on that arc is equal to the number of flows of that arc.
Time-space arc capability constraints: For each time-space arc, the sum of the number of loaded railcar flows on that arc and the number of empty railcar flows on that arc cannot exceed the capacity of that arc.
Consistent constraints of exchange of LRL and ERL: For each LRSEN, the loaded railcar flow number of the IP ending at that node is equal to the sum of the loaded railcar flow number of the SOP starting from that node and the empty railcar flow number of the ERAA starting from that node. For each ERSEN, the empty railcar flow number of the LOA ending at that node is equal to the sum of the loaded railcar flow numbers of the ETLP starting from that node.
Flow conservation constraints of node in ERL: For each time-space node in ERL or PL, the sum of the empty railcar flow number of the time-space arc ending at that node in ERL or PL is equal to the sum of the empty railcar flow number of the time-space arc starting from that node in ERL or PL.
Loading plan constraints: For each loading plan, the sum of the loaded railcar flow number of the time-space paths in line with the loading plan cannot exceed the planned loading number for one day of the plan, nor can it be lower than the completed loading number of the plan when an emergency occurs.
Emptying plan constraints: For each emptying plan, the sum of the empty railcar flow number of time-space arcs in line with the emptying plan cannot exceed the planned emptying number for one day of the plan, nor can it be lower than the completed emptying number of the plan when an emergency occurs.
Train operation restrictions constraints in an emergency: For each affected TA, the sum of the number of loaded railcar flow on that arc and the number of empty railcar flow on that arc is equal to zero.
3.3.4. Model Synthesis
By combining constraints (1) to (12), the Dynamic Railcar Flow Distribution Model in an emergency (DRFDMUE) can be obtained.
Change constraint (10) and constraint (11) into constraint (13) and constraint (14) as follows:
Combining constraints (1) to (9), together with constraint (13) and constraint (14), the Dynamic Railcar Flow Distribution Model under Normality (DRFDMUN) can be obtained.
3.3.5. Solution Method
The model is a pure integer linear programming, so it can be solved by a branch and bound algorithm [
36]. We implement the algorithm by c# programming. We use branch and bound algorithm to search the solution space tree of the problem and each node can become an extension node at most once. Its search strategy is as follows:
Step 1: Generate all children of the current extension node;
Step 2: In the generated child nodes, the nodes that cannot generate a feasible solution (or an optimal solution) are dropped.
Step 3: Add the remaining children to the list of open nodes;
Step 4: Select the next node from the list of open nodes as the new extension node;
Step 5: This loop continues until either the feasible solution (optimal solution) or the open node list is left empty.