Resolution of coupling order and station level constraints in train unit scheduling

Train unit scheduling assigns vehicles to cover all trips of a fixed timetable satisfying constraints such as seat demands. With a two-phase approach, this problem is first solved in Phase I as an integer multi-commodity flow problem. Train stations are simplified as single points and coupling orders of train units are left undetermined. In this paper, platforms and their layouts at the stations are restored to complete a fully operable schedule, defined as Phase II. An adaptive approach expanding Phase I to Phase II is proposed. The logistics of (de-)coupling operations, coupling orders and re-platforming are determined in detail to prevent unit blockage where possible, particularly focusing on developing a schedule with conflict-free coupling orders. If unresolvable station level conflicts still exist, the process loops back to Phase I with addressed Phase II constraints to avoid identified conflicts. Thus, the schedule is iteratively improved until it is fully operable.


Introduction
A train unit (TU) is a kind of passenger rolling stock that has fixed carriages and integrated engines that can move in either direction. Train units are commonly used in railway passenger transport as opposed to traditional locomotive trains. They are classified into different types by characteristics such as power source, number of carriages, and number of seats. Currently 17 franchises managing a certain number of train units are operating the UK railway (Wikipedia 2019). A timetable describes a set of trips with fixed routes (origin, destination and intermediate stations) and timings (clock times of arrival and departure). Train units are assigned to serve trips with sufficient capacities to meet passenger demands, i.e., a trip is served by a single unit or multiple units defined as a unit block. To satisfy different seat demands of trips, coupling operations may be involved to form a longer unit block, or decoupling operations to split a longer formation into shorter unit blocks. Another purpose of coupling and decoupling operations is to redistribute unit resources across the network. This train unit scheduling problem (TUSP) is shown to be NP-hard (Cacchiani et al. 2010;. If a trip is served by multiple units of different types, the sequence of the units within the serving unit block is important, in particular when the unit block is involved in coupling or decoupling operations. In the UK, the coupling and decoupling operations are usually executed at station platforms. As the movement of unit blocks is strictly restricted by tracks, station layouts and how they connect with other stations are key factors to consider for removing coupling-order conflicts. The TUSP can be solved in two phases: network level scheduling and station level scheduling (Lin and Kwan 2014). The network level scheduling problem is studied by Cacchiani et al. (2010) and Lin and Kwan (2013). In real-world railway operations, there are large numbers of timetabled trips to be scheduled with complex network constraints, for instance passenger demands, fleet size, unit type compatibility, turnaround time, making train unit scheduling at the network level a challenging problem. Solving the TUSP including station level constraints is even much harder. Thus, reasonable simplifications are applied. Stations are considered as single points where all train unit movements required for trip connections are assumed feasible no matter what schedule is formed at the network level. The station level constraints are important when a network level schedule is supposed to be implemented on physical rail infrastructure. Therefore, reconsidering station level constraints in Phase II is vital to avoid operational blockage during the station operating process and to determine conflict-free coupling orders, which makes the network scheduling results fully operable in practice.
The basic Phase I model optimizes train unit assignment at the network level by branch-and-price and tentatively allocates unit blocks to trips and their connections. Its solution is incomplete since coupling orders are not determined and the feasibility of tentative linkages among trips has not been verified. This incompleteness may cause severe operational conflicts at stations. Phase II is to take a further step of station level resolution and to fix the incompleteness. Station level constraints would be very complex and difficult to generalize in an all Resolution of coupling order and station level constraints… encompassing TUSP model; therefore, they are ignored in Phase I. Phase I has the benefit that its solution may have already automatically satisfied many of the station level constraints even though they have not been explicitly modeled. In other words, the station level conflicts in a Phase I solution could often be sparse. In this paper, an adaptive approach of incrementally inserting constraints for Phase II eliminating station level conflicts identified in a Phase I solution is proposed. The main loop of this method is between a Phase I core solver (RS-Opt, developed by Lin and Kwan (2016a)) and Phase II including the process of station level conflict detection and coupling order assignment. This approach resolves the station level constraints and assigns feasible coupling orders for trips served by multiple units. A new solution will be sought if Phase II has encountered unresolvable conflicts, and newly formulated critical station constraints will be fed back to the core solver to eliminate those inoperable conflicts. Feasible coupling orders are assigned simultaneously with the conflict detection process.
The structure of this paper is organized as follows. Section 2 gives a literature review. Section 3 introduces the problem of train unit scheduling with station constraints. Section 4 describes a mathematical model and discusses the complexity of station level constraints. Section 5 formally defines the coupling order and its propagation boundaries. Section 6 illustrates the proposed adaptive approach and methods of conflict detection and coupling order assignment. The experimental results are shown in Sect. 7. Conclusions and ongoing research are discussed in Sect. 8. Huisman et al. (2005) survey passenger railway transportation operational research focusing on European cases, where train unit planning is classified as two levels. The central level covers the entire network operations such as timetabling, train unit scheduling, circulation, etc. The local level focuses on the local-size-impact operations including shunting, platform assignment, routing of train units at a certain station, etc. The train unit scheduling problem is also addressed as two levels (Lin and Kwan 2014) and . The network level aims to solve train sequencing and fleet assignment where coupling and decoupling activities are important to satisfy passenger demands. The station level copes with finalizing the operational plan and train unit shunting within stations/depots.

Literature review
For the network level problem, Cacchiani et al. (2010) consider the basic constraints of passenger demands, coupling upper bounds and additional constraints of maintenance and overnight balance. Two inter-convertible ILP (integer linear programming) formulations are established based on a directed acyclic graph as described in Cacchiani et al. (2013a). After solving the corresponding relaxed LP, a heuristic is designed to further solve the network level problem. The result shows that it is crucial in finding feasible solutions in many tested instances since the problem is regarded as very difficult. Thus, another heuristic method based on Lagrangian relaxation is developed by Cacchiani et al. (2013b) to improve the performance. A more comprehensive model with many real-world constraints is proposed by Lin and Kwan (2013) to describe the network flow problem in the UK. A branch-and-price method called RS-Opt is developed (Lin and Kwan 2016a). A heuristic wrapper for RS-Opt called SLIM is proposed in Copado-  to solve larger problem instances. In practice, most train operators in the UK consider different levels of capacity provisions, such as peak and off-peak. To achieve this,  study the train unit scheduling problem with bi-level capacity requirements, in which a new integer multi-commodity flow model guided by historic capacity provisions is proposed. The computational experiments on real-world data have shown this methodology to be effective.
A timetable defines arrival/departure times and platforms for each trip, while a train unit schedule assigns unit blocks to serve each trip. At the station level, given a timetable with a train unit schedule, a shunting schedule guarantees that the assigned unit blocks are operable at the fixed timings and platforms of stations. Tomii et al. (1999) consider the station shunting problems as a resource constrained scheduling problem and divide it into two subproblems: resource allocation and shunting time decision. A two-stage-search algorithm is proposed to solve this problem combining with probabilistic local search and Program Evaluation Review Technique (PERT). Freling et al. (2005) and Kroon et al. (2008) consider the train unit shunting problem at a station as two subproblems: matching problem and parking problem. Freling et al. (2005) describe a set-partitioning ILP model to solve these two subproblems separately, which prevents capacity overflow and unit blockage at all sidings and minimizes the number of coupling/decoupling operations. This model is solved by root-only column generation combined with a branch-and-bound strategy. Since the matching and parking problems are connected to each other, Kroon et al. (2008) propose an integrated approach with four models considering both dead-end and through types of sidings, thus, the global optimality is guaranteed. The idea of virtual tracks is introduced to reduce the problem size. Computational experiments on two stations of the NSR network have been done.
Train unit scheduling at the network level and station level are interrelated. Models for the network level and the station level are proposed (Lin and Kwan 2014), in which the two levels can communicate through arc variables. Conceptually, the re-matched linkages at the station level model are encouraged if they are also chosen by the network level. Ideally, a good quality and operable solution at both levels can be achieved through this communication. Lei et al. (2017) analyze the potential station shunting issues caused by a solution at the network level without the determination of coupling orders. In addition, a branch-and-cut algorithm of connecting flow level and depot shunting is proposed by (Haahr and Lusby 2017) with the simplified assumption that tracks are all dead-end. For the train unit scheduling problem, the network level assigns train unit types and quantities to each timetabled trip. Once an assignment has been found from the simplified model temporarily ignoring station level constraints, there are two operational aspects left to be further determined. The first aspect is the unit coupling order in multi-type trips, which has no impact on the network flow but must be finalized to prevent blockages at stations. The second aspect is the tentative linkage implication restricted by station layouts. This research focuses on these two points to make the train unit scheduling solution operable at both the network and station levels which has not been scrutinized in literature.

Problem description
The train unit scheduling problem with station constraints is to find a conflict-free schedule at both the network and station levels and to minimize the general operational costs. The network level concerns train unit assignment to satisfy all the trips fixed in a timetable with respect to a set of constraints such as passenger demands, turnaround time, and unit type compatibility. Given a network level solution, this section mainly describes the relevant aspects concerned at the station level, including coupling order, linkage slack time, crossing linkages, platform type and capacity, re-platforming shunting, interchangeability between train units of the same type, and other features.

Coupling order
A coupling order is defined as the permutation of the units within a coupled train unit block. Given a block with n units, the coupling orders of this block have n! possibilities. Considering the station level infrastructure, not all of these possibilities are operable because many coupling/decoupling activities can only be operated in a specific order under the station shunting environment.
Train stations are not isolated in a rail network but connected by routes. Running trips concatenate the operations at the starting, intermediate, and terminating stations. A coupling order is initially formed at the origin station of a trip, and its influence is not confined within the origin but can be propagated to other stations by running trips and the connections among trips, defined as coupling order propagation. Thus, a coupling order formed at a specific station must be also operable at other influenced stations at any time.
If a conflict caused by a coupling order arises at a station, additional operations, e.g., re-ordering shunting, must be adopted to fix this invalidity. This not only increases operational costs but may also disturb/delay other trips. Thus, coupling order decisions at stations can be sophisticated.
Usually, no coupling or decoupling operation happens at intermediate stations, but one feature needs to be captured while moving directions are considered. If the arrival and departure directions of a coupled unit block are opposite at some platforms of intermediate stations, the front and rear of the unit block will be reversed; otherwise, the coupling order keeps the same. This is defined as coupling order reversal en-route. Thus, a trip may have different unit sequences at its origin, intermediate stations, and destination.

Linkage slack time
The slack time of a linkage (directed arc in an directed acyclic graph (DAG), see Sect. 4.1) is defined as the time gap between the departure of its head node trip and the arrival of its tail node trip, which is the total time available for the station level manoeuvre such as coupling/decoupling, reordering, re-platforming, etc. At the 1 3 network level, the time consumed by those auxiliary station level operations are not properly accounted for, i.e., insufficient slack time may invalidate the network level schedule. A linkage is locally feasible at a station if there is sufficient slack time to accomplish essential station shunting movements for the purpose of avoiding a station conflict.
Hence, the slack time of each arc in a network level schedule must be verified with Eq. (1), where t slack a , t trt a , t sta a represent slack time, standard turnaround time, and station operational time corresponding to arc a, respectively. t must be not less than 0; otherwise, the arc is infeasible.

Platform type and capacity
For daytime scheduling, coupling and decoupling operations are often executed at platforms in the UK. There are two main types of platforms: dead-end platforms and through platforms. A dead-end platform can only be approached from one end of the track, i.e., the train units accumulated on it must follow the first-in-last-out (FILO) rule. The moving directions of approaching and leaving a dead-end platform must be opposite to each other. On the other hand, a through platform can be reached via both ends, which has a more complex utilization in the real-world railway management. It is common in the UK railway industry to logically divide a through platform into a few sub-platforms, for instance, Cardiff Central Station through platforms 3 and 4 are used as 3A, 3B, and 4A, 4B, respectively. This logical dividing gives through platforms a lot more flexibility but also increases the problem complexity. In practice, the trips are operated by many train operating companies, and platforms are often divided by train operation companies at a station. In this research, we only consider the trips operated by a single company. At the network level, the coupled unit upper bound and carriage upper bound for each trip are considered based on the limitation of the physical length of the corresponding platform. At the station level, the unit accumulation on the platform with time is considered to assure that the units parking at the same platform will not invalidate the schedule.

Crossing linkages
To illustrate, suppose four single unit trips i, j, m, n are linked at a through platform at station B with no problem of unit type compatibility and seat capacities. Two possible network level solutions are constructed, as shown in Fig. 1, referred as the first-in-first-out (FIFO) connection and the FILO connection. However, these two solutions may turn out be infeasible while considering the unit-block moving direction on the restricted station tracks. Figure 2 shows a possible parking position of these two units at a platform before the departure of j and n. Concerning the departure time of j and n, solution (1) will be feasible if and only if j departs to the "up direction" and the solution (2) will be feasible if and only if j departs to the "down direction". Otherwise, a crossing occurs as the unit assigned to n blocks the unit serving j, which is supposed to travel earlier than n. If no station information is introduced in the model, the feasibility of tentatively assigned arcs cannot be finalized. This example illustrates how crossing linkages can seriously affect the validity of a network level schedule.

Re-platforming shunting
Some train units arrive at a platform, finish all the necessary operations and later leave the station from the same platform without shunting away to any other place, for example, sidings or other platforms. However, some train unit blocks may leave from a different platform from its arrival platform, thus, re-platforming shunting must be operated. At the network level, station level shunting operations are not realized because of the ignorance of station layouts. In the UK railway industry, schedulers try to avoid re-platforming movements and accomplish the station operations for an arrival train unit at the same platform. When a re-platforming operation is inevitable, there are two essential constraints to be considered. One is if there is enough slack time for this re-platforming operation. The other is that the feasible time boundaries for re-platforming movements should be considered to ensure that there will be no blockage caused by this re-platforming operation at an inappropriate time. A given timetable defines the arrival time and departure time for logical trips. However, the departure times and arrival times for the re-platforming operations of the train units to be prepared to serve another trip at stations are flexible. The existing train units parking on the platforms may result in the fact that the involved replatforming operations can only be operated in a specific time range. Also, re-platforming operations in different time ranges may result in different coupling orders.

Interchangeability between train units of the same type
A railway operator usually has many types of train units. The train units of the same type share common configurations, so that they are interchangeable. In a unit schedule, each train unit has a unique diagram with detailed routes and serving trips. When a train unit is not available, a substitute of the same type can replace its mission if the changed mission does not affect their necessary maintenance. This feature gives shunting operations at the station level great flexibility by swapping the diagrams of the same type of train unit. In this research, the coupling order of the train unit block consisting of the train units of the same type is considered as conflict-free because the potential blockages can be easily avoided by swapping the missions of these train units.

DAG generation and decision variables
A DAG consists of a set of nodes and a set of directed arcs in which no cycle exists, denoted as G = (N, A) . The node set N consists of the timetabled trips (N), and the source and the sink ( {s, t} ) that are added to represent siding/depot, i.e., N = N ∪ {s, t} . The arcs in A represent potential connections between any two nodes. The DAG is generated on a given timetable and a series of real-world requirements, e.g., basic turnaround time, O-D pairs of connected trips, permitted train unit types. The arcs in a DAG are classified into three types: (1) the arcs connecting an arrival to a departure at the same station are defined as trip-to-trip arcs (A); (2) the arcs between a trip and the source/sink are defined as sign-on ( A 0 )/sign-off ( A ∞ ) arcs; (3) the arcs connecting an arrival to a departure at a different station are defined as empty running arcs ( A e ). Thus, the arc set of the original represent the arrival location of trip i and the departure location of trip j. Let K denote the set of train unit types used in a given timetable. Based on the compatibility between train unit type and route, type graphs ( G k , ∀k ∈ K ) are constructed based on the original DAG ( G ). Each G k is a subgraph of G . A path p ∈ P k represents a train unit diagram of type k on G k , which contains a collection of consecutive arcs and serving trips starting from the source and ending at the sink. Based on G and G k , decision variables are defined as follows: -arc-type-flow variables: x a ∈ ℕ , ∀a ∈ A k , ∀k ∈ K , representing the number of train units of type k flowing on arc a. -path-type-flow variables: x p ∈ ℕ , ∀p ∈ P k , ∀k ∈ K , representing the number of train units of type k flowing on path p. -arc-selection (fixed charge) variables: y a ∈ {0, 1} , ∀a ∈ A , indicating if an arc a = (i, j) is selected in the solution.

Resolution of coupling order and station level constraints…
The arc-type-flow and path-type-flow variables are inter-convertible by expression (2), where P a represents all the paths containing type arc a.

Mathematical model
Two main terms are considered in the objective function. The first term minimizes the total number of train units used to serve the entire timetable. The second term minimizes the general costs of operating the involved train units.

Constraints at the network level
Expression 4 represents the fleet size constraints ( C 1 ). For each type k ∈ K , there is an upper bound b k . To schedulers, a lower bound ( b ′ k ) can also be considered.
Expression 5 demonstrates the flow conservation constraints ( C 2 ) which are to ensure the flow of every train unit type on each trip node is balanced, where A in j and A out j are the get-in type arc set and get-out type arc set of trip j.
Each trip i ∈ N has to satisfy three basic hard constraints: passenger demands ( C 3a ), unit coupling upper bound ( C 3b ) and carriage upper bound ( C 3b ), presented as expressions (6), (7), and (8), respectively. These constraints can be converted into equivalent convex hull constraints ( C 3 ) that are tighter, as shown in expression 9. F j is the convex hull facets for trip j. H j (f ,k) and h j f are coefficients at type k position and the corresponding RHS of facet f for trip j. More proofs can be found in Lin and Kwan (2016b).
Expression 10 is to ensure the consistency of the values between x a and y a ( C 4 ). For each arc a ∈ A , if it is selected in the solution: y a = 1 and x a ≥ 1 ; otherwise: y a = 0 and x a = 0 . Here, u a is the biggest unit number that an arc can flow.

Constraints at the station level
While considering the station level infrastructure, a selected arc is feasible if it is operable within permitted time and station layouts, and a train unit schedule is feasible if every arc in the schedule is a feasible arc. A conflict may occur when some arcs are selected in the same solution, defined as arc-selection conflict. To be more precise, a conflict is caused by the specific flow of certain types of train units on a set of arcs, defined as type-flow conflict. Thus, arc-selection constraints ( C 5a ) and type-flow constraints ( C 5b ) are modeled to eliminate station level conflicts ( C 5 ). An arc-selection conflict contains a set of arcs which together are not compatible at the station level, denoted by Ā . If the arcs in Ā are not all selected in a solution, the specific conflict will not appear in the solution. Let Z 1 be the set of possible arcselection conflicts. A conflict-free schedule must not contain any arc set Ā ∈ Z 1 . Expression 11 models the arc-selection constraints ( C 5a ).
A type-flow conflict represents an infeasible set of arcs on which unit types and corresponding quantities are considered. Let Z 2 represent the set of possible type-flow conflicts. These conflicts actually are integral points in the solution space. The integer cut technique proved by Balas and Jeroslow (1972) can be applied to eliminate infeasible binary integral points, represented as p = (x 1 , … , x i , … x n ) . The infeasible integral point is divided into two sets shown in expression (12). Since the variable x i is binary, constraint (13) avoids a certain integral point.

Resolution of coupling order and station level constraints…
This technique is only valid for binary variables. Necessary adaptation is derived below to apply it on an integer model. A set of working binary variables is introduced based on arc-type-flow variables, denoted as follows: -arc-type-flow binary variables: x q a ∈ {0, 1}, ∀a ∈ A k , ∀k ∈ K, ∀q ∈ U . U denotes the set of natural values which can be assigned to corresponding arctype-flow integer variables.
For example, suppose the unit coupling upper bound is 3, i.e., U = {0, 1, 2, 3} , and type graph G k 1 is in use. For each arc-type-flow integer variable x a , there would be four corresponding arc-type-flow binary variables: x 0 a , x 1 a , x 2 a , and x 3 a . The binary values for them are defined as expression (14) Let Ȃ represent the set of arcs containing a type-flow conflict; B contains all the type-flow binary variables with value 1, and Q holds the other variables over the arc set Ȃ . Thus, the type-flow constraints ( C 5b ) are shown in expression (15), where Z 2 is the set of Ȃ .
The domains for each type of variables are shown at the places where defined. There are some advantages and disadvantages of constraints C 5a and C 5b . C 5a are straightforward and easy to apply. However, these constraints are slightly over-tight and they might rule out some feasible solution because they do not consider any flow combination on the infeasible arc set. On the other hand, the type-flow constraints do not have that side effect and they are just tight enough to eliminate the infeasible type-flow conflict on the infeasible arc set. However, these constraints will largely increase the problem size since new variables need to be introduced.
The network level problem (constraints C 1 to C 4 ) has been researched during the last few years and many results have been achieved (Lin and Kwan 2016a;Copado-Mendez et al. 2017), defined as Phase I. The two alternative constraints of eliminating station level conflicts (shown in expressions (11) and (15)) are based on fixed-charge variables that largely increase the complexity of solving the model. Besides, computing infeasible arc sets for arc-selection conflicts and type-flow conflicts ( Z 1 and Z 2 ) in advance as inputs based on the station level infrastructure and the original DAG is a massive work, because numerous of arcselection/type-flow combinations are supposed to be checked. This makes solving the model as a whole almost impossible. On the other hand, the coupling orders for coupled train unit blocks are also left to be further determined. Since many of the station level constraints could have already been satisfied implicitly by the network level solution, an adaptive method is proposed to determine feasible coupling orders and resolve the station level conflicts based on the basic network level model, defined as Phase II.

Coupling order definition
The solution from Phase I is a set of paths each corresponding to a certain train unit sequentially serving a set of trips. This solution gives a collection of units for each trip and connections among trips. There is no defined unit sequence in a coupled unit block because of the simplification of station level constraints. Hence, a multiset can be defined to represent the collection of units for each trip, denoted by U j , j ∈ N . The elements in U j are the units of the same or different types serving trip j. The number of elements of the same unit type in U j is the type flow of trip j. For instance U j = {X, X, Y, Y} means trip j is served by 4 units composed of 2 units of type X and 2 units of type Y. In a network level solution, two attributes for a trip j are important to introduce the concept of coupling order, which are the predecessor and successor node sets ( I j and R j ). The predecessor/successor node set of trip j contains all the nodes that have an arc to/from trip j. Considering Fig. 4 as an example, the predecessor node set of trip j is {i 1 , i 2 , … , i m } and the successor node set of trip j is {r 1 , r 2 , … , r m } . In addition, the trip timing and direction information related to a given timetable and corresponding station structure are also important in later discussion. Their notations are shown in Table 1.
Here, dp(j) and ap(j) are binary values since each platform has two notional directions. Let us define them as {up, down} , which will be used in the rest of this part. One value has to be crossed out for the dead-end platforms since they only have one end accessible. Thus, the general unit-block collection for each trip can be described by expression (16). Normally, the number of units coupled together can be up to 4 in real-life, i.e., m ≤ 4 , |I j | ≤ 4 , and |R j | ≤ 4.
For trips served by a single unit ( m = 1 ), there is no need to consider their coupling order. Besides, the unit sequence of unit blocks of the same type is also not critical. This is based on the assumption that the diagram assignment among units of the same type can be easily swapped since unit circulation and maintenance are not considered in this research.
Day-time coupling and decoupling operations are mostly conducted at platforms in the UK. Those activities are critical because they form/request a certain unit sequence. This feature together with trip attributes in Table 1 can be utilized to tentatively assign locally feasible coupling orders to some trips. Let S j denote the set of stopping stations of trip j. To formalize the concept of coupling order, let us define a sequenced multi-set O s j to represent the coupling order for trip j at location s, s ∈ S j , j ∈ N . The start of a sequence is the front of a certain moving direction followed by sequenced unit blocks as the rear. During the coupling order assignment process, it has three possible states: fixed, unfixed, and semi-fixed, which can be described in a general expression (17). The elements in O s j are sequenced subsets of U j . The union of all the elements in O s j must be the same with U j , because O s j and U j express the unit formation of trip j, as shown in expression (18) In the context of arrival and departure, a unit block has a front and a rear with respect to its travel direction. As shown in Fig. 3, the coupling of two unit blocks can either be a front-front ( Fig. 3a) or front-rear (Fig. 3b, c) attachment. Rear-rear ( Fig. 3d) attachment is physically impossible unless one of the unit blocks reverses into the platform, in which case the reversed approaching end is regarded as the front. Similarly, after the decoupling of a unit block, the two resulting unit blocks may next travel in the same direction with front-rear facing or in the opposite directions with rear-rear facing (front-front facing is physically impossible).

Function and operator definitions
In real life, the moving direction of a trip may be reversed at some en-route stations. With a known unit sequence in a trip at a certain station, the unit sequences at other stations are all known by counting the number of en-route reversal operations. For a given network level schedule, it is worthy of tentatively seeking if there exists a feasible coupling order assignment. Coupling and decoupling operations can locally fix some feasible coupling orders. Running trips can spread the influence of a coupling order out to the whole network. Accordingly, a frontand-rear reversal function is defined to express the en-route reversal movement, which will be applied once the moving direction is reversed. In addition, coupling and decoupling operators are also defined based on the assumption that the trips involving coupling/decoupling events are operated at the same platform. Their notations are shown in Table 2. The operations related to different platforms, for example re-platforming, will be further explained in Sect. 6.1.3.
(1) Front-and-rear reversal function Rev( ) : The parameter is a coupling order. This function can be applied multiple times, defined as Rev n ( ) , n ∈ ℕ . While n is odd, will be reversed; otherwise, the same order is kept. Testing n is odd or even is a matter of computational implementation.
(2) Coupling operator: A coupling event is referring to two (sequenced) sets joining together to form a longer (sequenced) set. The arcs involving this operation are called coupling linkages. Let us define the coupling operator ( + ) on two unit blocks with the resultant coupling order as shown in expression (19). That is, the second operand unit block w is attached to the rear of the first operand unit block v.
Let i 1 , i 2 denote train unit blocks arriving at the same platform to be attached and i 1 arrives first, at(i 1 ) < at(i 2 ) . Suppose i is the resultant unit block after the attachment. As shown in Fig. 3, i 1 and i 2 can arrive from the same/opposite direction(s). Considering ap(i 1 ) as the reference direction, the coupling order of the resultant unit block is shown in expression (20). Once the coupled formation O i based on the reference direction is fixed, the next step is to assign O i to trip j according to the relative directions between dp(j) and ap(i 1 ) , seen in expression (21).
(3) Decoupling operator: Similar to the discussion on the coupling operator in (2), let us define the decoupling operator (−) on two unit blocks with the resultant coupling order of the first operand as shown in expression (22), in which the second operand unit block w is detached from the rear of the first operand unit block v.
Let r, r 1 , r 2 denote train unit blocks such that r 1 and r 2 depart from the same platform after being detached from r. Suppose r 1 departs first ( dt(r 1 ) < dt(r 2 ) ), and using dp(r 1 ) as the reference direction. The coupling order of unit block r can be obtained according to expression (23).
With the arrival direction of r, the requested coupling order at the destination of trip j can be assigned as expression (24).
For the dead-end platform, the unit blocks can only arrive from the same direction and the departure direction must be opposite of the arrival direction. When there is no coupling ( |I j | = 1 ) or decoupling ( |R j | = 1 ) related to forming/decomposing some new unit blocks, the coupling order is temporarily considered as unconstrained. The coupling-order requirement of unfixed trips will be restored at the stage of coupling order propagation through the whole network. Another case shown in Fig. 4 illustrates that trips involve more than one coupling/decoupling operation, i.e., |I j | ≥ 3 or |R j | ≥ 3 . This case is considered in an iterative way as shown in Algorithm 1. Only one coupling operation is applied at each iteration. The temporary coupling order during the iteration process is stored in O temp till all of the unit block of trips in I j is traversed. Thus the final O i can be (20) if dp(r 1 ) = dp(r 2 ) r − Rev(r 2 ), otherwise obtained to be assigned to O ori j . Similarly, this method can be applied to multidecoupling operations as well.

Coupling order propagation boundaries
In this section, we systematically extract concise parts of the DAG where couplingorder conflicts could arise in a given Phase I solution because the coupling order has not been maintained at the network level. With respect to the full DAG G , a Phase I solution is a subgraph G * ⊂ G with train unit flows assigned. Disregarding the source and sink, G * is decomposed into one or more disjoint connected graphs, which can be classified into two types as follows, represented as sets G 1 and G 2 , respectively.
-We do not consider the coupling order issue for a subgraph if it has only a single unit type or it has multiple unit types but does not involve any coupling/decoupling operation, stored in G 1 . -The subgraphs which do not satisfy the conditions for G 1 will be stored in G 2 because their coupling order issues matter. In a g ∈ G 2 , there may be some trips that are served by only one single unit type, denoted as set N 1 . The coupling order issues for those trips are trivial, thus, g can be further decomposed to smaller subgraphs to analyze the coupling order issues by trimming off all the trips in N 1 . Let us use G 3 to denote the set of subgraphs decomposed from all the graphs in G 2 . Figure 5, shows an example graph g ∈ G 2 in which the trips that are free of coupling order issue (single unit type) are represented as dashed circles. Two independent subgraphs (marked out by blue boxes) can be extracted from g when those dashed nodes are trimmed off. A graph in G 3 is the smallest unit to analyze the coupling order issue on the network. The coupling order issue of a g 1 ∈ G 3 has nothing to do with that of another g 2 ∈ G 3 , but is sealed within g 1 such that the coupling orders for the trips contained in g 1 interact with each other, defined as coupling order propagation. If the coupling orders of the trips in a graph g 1 ∈ G 3 are not compatible with each other, all the get-in and get-out arcs of the nodes in g 1 will be collected as an infeasible arc set. Take the second subgraph in Fig. 5 as an example. If the coupling orders of T14, T15, T17 are not compatible with each other, arcs {T11-T14, T10-T14, T14-T16, T15-T16, T16-T17, T16-T18} will be collected as an infeasible arc set.
To illustrate how a coupling order propagates through a graph in G 3 , the first subgraph in Fig. 5 is taken as an example. At its fringe, all the get-in and get-out arcs and their connected nodes (T3, T4, T9, T10, and T12) are restored, as shown in Fig. 6 with one coupling and two decoupling operations. One en-route reversal operation (marked as *) will happen to T3, T8, T10 and T12. Figure 6b is the corresponding schematic space-time diagram and their serving units assigned at the network level, on which (de-)coupling operations are marked as black circles. Stations A, B, C have only one platform and their platform types are also indicated. There may be other trains visiting as intermediate stops, which are not shown here. They are usually planned at the timetabling stage such that they will not be in conflict with other terminating trips. First of all, the algorithm assigns local feasible coupling orders by applying the coupling/decoupling operations introduced in Sect. 5.2 and the results are as follows: (1) Coupling operation to form T5 with regard to arcs (T3,T5) and (T4,T5) by considering ap(T3) as the reference direction. Since, ap(T3) = ap(T4) and at(T3) < at(T4) Since dp ( (2) Decoupling operation for T7 through arcs (T7,T8) and (T7,T9) to serve T8 and T9 with consideration dp(T8) as the reference direction.

Resolution of coupling order and station level constraints…
(3) Decoupling operation for T8 to serve T10 and T12 over arcs (T8, T10) and (T8, T12). Let dp(10) be the reference direction. Since, dp(T10) = dp(T12) and dt (T10 Through the operations above, the coupling orders of T5 and T8 are fixed and the coupling order of T7 is semi-fixed, but the coupling order of T6 is still unfixed. Three possible tracking methods are considered for the coupling order propagation: early-to-late tracking, late-to-early tracking, and tracking starting with any intermediate trip. These methods may result in conflict-free or coupling-order collision at different locations on the network. are not compatible with each other. -Conclusion: The coupling-order collision is at T6. As shown in the example above, although the coupling-order collision might be located in different places because of different propagation tracking methods, the same sets of arcs are involved, which are all the get-in and get-out arcs of the nodes in a graph g ∈ G 3 . For a given network level schedule, it may result in some individual coupling-order collisions, and it is also possible that there are some collisions with overlapping arcs. For the latter case, the collisions with overlapping arcs can be considered via two strategies: considering them individually such that each conflict contains the overlapping arcs, or grouping them together as a combined conflict. Some experiments on these strategies will be reported in Sect. 7.2.

An adaptive approach
Since many of the station level constraints could have already been satisfied implicitly by the basic network level solution in Phase I, this paper proposes an adaptive method to resolve the station level constraints based on the basic network model. Figure 7 shows a flowchart of this method. The basic Phase I containing constraints C 1 to C 4 (referring back to Sect. 4.2.1) is solved by RS-opt in Lin and Kwan (2016a). Phase II attempts to detect potential conflicts and assigning feasible coupling orders. Once an unresolvable station level conflict is encountered, a corresponding station level constraint C 5 (seen in Sect. 4.2.2) will be added to RS-Opt. A new solution is to be sought once new station level constraints are added. If no more station level blockage is detected, the corresponding feasible coupling orders of trips served by multi-units will also be given such that a solution with richer coupling order information will be delivered.
Phase II contains two core parts. The first part is the conflict detection and coupling order assignment based on a series of factors, for instance, physical structure of railways and stations, timing and moving directions of trips, tentatively assigned Fig. 7 Flowchart for the adaptive approach arcs and unit flows for trips, etc. For a given station operation environment, conflicts are detected when a tentative linkage is not operable, or feasible coupling orders cannot be found at a certain platform, or a preassigned coupling order is not feasible to another operation environment. The second part is to extend the model of RS-Opt and resolve detected conflicts.

Coupling order assignment and conflict detection
A two-stage method is proposed to assign coupling orders and detect potential blockages caused by crossing linkages or coupling-order collision. The first stage is based on each platform which has two purposes: one is to assign locally feasible coupling orders with regard to coupling/decoupling operations introduced in Sect. 5.2; the other is to verify related linkage feasibility. The second stage is to find out the compatibility among the locally fixed coupling order within each g ∈ G 3 and also further fix some unfixed/semi-fixed coupling orders by spreading locally feasible coupling orders assigned by the first stage to the network.

Platform-based stage
This stage mainly assigns locally feasible coupling orders and detects potential conflicts caused by crossing linkages. The platform function can be modeled as a data structure behaving similar to a double-ended queue for storing and processing unit blocks, in which unit blocks are sequenced by "push" and "pop" operations, shown in Fig. 8. A "push" operation refers to one unit block getting into the platform with a "journey" and a "pop" operation refers to one unit block getting out of the platform with a "journey" after some necessary operations.
The "journey" here can be either a timetabled trip or a shunting movement, for example a re-platforming movement. The two ends for "push/pop" operations correspond to two approaching directions to a through platform, which can be mapped to up and down directions. The dead-end platform can also be modeled by disabling one end. Besides, this data structure has a capacity limitation regarding to the platform length. While pushing each arrival unit block, virtual "dividers" are added to isolate it from the existing unit blocks since unit blocks are physically separate when they arrive. This data structure is denoted as unitStore. Algorithm 2 describes the process at a platform. It takes a platform and basic solution s of Phase I as input. The output is a richer train unit schedule (hs ′ ) with locally feasible coupling orders assigned at each platform and verified linkages. Conflicts will be collected in CF 1 to be further resolved. Three lists are formed for platform h: arrival list, departure list and linkage list connecting the arrivals to departures. This algorithm starts with the following initializations: dL and aL are time-sorted departure and arrival trips, respectively; dtrip and time are assigned with the first departure trip and its departure time, respectively; unitStore is initialized as empty. Once time is assigned a new value, all the trips in aL whose arrival times are smaller than time, defined as set A dt , will be attempted to push in unitStore once there is enough space. If there is not enough space, the shuntingAway() function will be called to verify all the existing unit blocks to find out if some of them can be shunted away to secure Resolution of coupling order and station level constraints… enough space for the new push-in unit block. The linkage slack time will be verified during this process. If shuntingAway(i) = true , the new push-in unit block can be stored in unitStore and accordingly the shunting movement will be saved in s ′ . Otherwise, all the arcs linked with those unit blocks will be considered as a conflict stored in CF 1 because they invalidate the platform capacity constraint, denoted as OCconflict. All the unit blocks will be cleared out from unitStore, and the departure trips corresponding to the unit blocks in unitStore and atrip will be removed from dL, and new dtrip and time will be assigned to restart the for loop.
After all the arrival unit blocks arriving earlier than the current time are successfully pushed into unitStore, the algorithm starts to deal with the unit blocks which are supposed to be popped out to serve the trip whose departure time is time. A function called linkImplement(), shown in Algorithm 3, is applied to verify the feasibility of links which are the get-in linkages of this departure trip with respect to the current unitStore status. If all the get-in linkages are verified as operable, the locally feasible coupling orders will be updated to s ′ and the unit block serving this trip will be popped out of unitStore. Otherwise, the conflict related to the linkage implementation, denoted as LIconflict will be saved into CF 1 to be resolved later and the unit blocks related to this conflict u c will be removed from unitStore. Then dtrip and time will be renewed for the next iteration. A conflict will not break this algorithm until all the departure trips are verified because this strategy tries to collect as many conflicts as it can.
Algorithm 3, linkImplement(), is a sub-part of Algorithm 2 and the coupling and decoupling operations ("+ ", "−") defined in Sect. 5.2 are applied in this algorithm. There are two types of input for this algorithm: one the the links obtained at line 19 in Algorithm 2, the other is the current status of unitStore. This algorithm focuses on verifying if the linkages in links of a departure trip (dtrip) are operable under the corresponding unitStore circumstances and returns an assigned locally feasible coupling order or a conflict. Let us define dir as the end (up or down) of unitStore that complys with the departure direction of dtrip and c is the total number of linkages in links. Thus, we define a function unitStore (dir, c) to obtain c unit blocks counted from the end dir, stored in ubs. i and j are the arrival trips delivering the first and last unit blocks in ubs, respectively. Let us consider an example by using the unitStore status shown in Fig. 8. Suppose c = 3 , dir = down , thus, ubs = [u z+1 u z u z−1 ] , and i and j refers to the arrival trips delivering u z+1 and u z−1 , respectively. This algorithm firstly justifies if the unit blocks in ubs are delivered by the arrival trips which are actually linked to dtrip. If this condition is satisfied, the operations converting the linked arrival trips to dtrip will be investigated, which can be classified into four cases: 1 no coupling or decoupling, 2 decoupling only, 3 coupling only, 4 both coupling and decoupling, as shown in Fig. 9.
For case 1 it will be claimed as operable if this condition is satisfied because it only requests standard turnaround time that has been considered while generating the DAG. The cases 2 3 4 can be differentiated by counting c and get-out arcs of each arrival trip for the unit blocks in ubs. The feasibility of these cases will be ensured if a locally feasible coupling order can be assigned. Otherwise, this algorithm claims the given links as inoperable and returns a conflict.

Network-based stage
The result from the platform-based stage is the basis of the network-based coupling order propagation process which aims to finalize more feasible coupling orders or to detect conflicts caused by incompatible coupling orders within a graph in G 3 . As station operations are connected by running trips, some unfixed/semi-fixed trips can be further determined taking advantage of the coupling order propagation on the network based on the solution graph of Phase I and the infrastructure of railway networks, and the coupling order conflict can also be captured during the propagation process. Issues considered at this stage include: coupling order propagation, enroute reversal of a unit block, and flexible timings for some empty shunting movements (discussed in Sect. 6.1.3). if propatingT oEdge = true then 6: orders := finalizedOrder(g) 7: s := s .update(orders) 8: else 9: c := COconf lict; CF2.add(c). // Coupling-order collision in g 10: end if 11: end for Algorithm 4 focuses on coupling order propagation through each g ∈ G 3 that may contain some trips with fixed coupling orders assigned at the platform stage. Let us define fixedL as the fixed-order trip list for a g ∈ G 3 . For a trip i ∈ fixedL , considering i as a divider, the trips within g can be split into two sorted lists. One includes the trips earlier than i, called earlier trip list ( eL i ); the other contains the trips later than i, called later trip list ( lL i ). Starting from i, two directions coupling order propagation search will be launched to further assign coupling orders and detect coupling-order collisions, as shown in Fig. 10. Trip i can be the first trip, the last trip, or any other trip, corresponding to one of those three different tracking methods of the coupling order propagation that have been analyzed in Sect. 5.3.
The backwardSearch(eL i ) and forwardSearch(lL i ) start with either O ori i or O dest i . It is possible that the platform stage assigns two incompatible orders to the origin and destination of trip i such that this g is claimed as a coupling-order conflict directly. Otherwise, the coupling order of trip i at a certain location will be propagated to other trips in g and compared to their coupling orders that may have been assigned at the platform stage. If the propagated order and the assigned order of each trip in g are compatible, g is claimed as conflict-free. The coupling orders of trips in g are finalized and updated to s ′′ . Otherwise, all the linkages related to the trips in g will be collected as a coupling-order collision to be stored in CF 2 for further resolution.

Flexible timings
The time available for unit blocks moving from arrivals to departures is limited, which is rigidly constrained by the timetable. Within this limited time range, a series of operations must be accomplished at the corresponding stations such as coupling, decoupling, re-platforming, shunting to depot/siding, cleaning, equipment inspection, etc. Suppose that a unit block u arrives with trip i at platform h and finishes all 1 3 necessary operations which consume time of tp h and later leaves from h to another platform h ′ to serve trip j. A dummy trip ũ (i,j) from h to h ′ is generated and its departure time dt(ũ) and arrival time at(ũ) are flexible. However, the duration time of dummy trip u is restricted by the clock time of the given timetable such that time boundaries for the departure and arrival times of dummy trips must be considered to ensure no blockage is caused at an inappropriate time. Normally, ũ can be moved away from h after the necessary operations are finished but it must be shunted away before the next arriving trip, and its departure time range is shown in expression (25). Besides, ũ must arrive at h ′ earlier than the departure time of trip j minus necessary departure operations and later than the last departure trip at h ′ , and its arrival time range is shown in expression (26). Figure 11 shows a simple example of avoiding blockage by manipulating flexible time boundaries together with the coupling order decision. Suppose that h 1 and h 4 are dead-end platforms and h 3 is a through platform and the directions of T3 and T4 are the same. T1 is a re-platforming trip from h 2 to h 1 . The following two procedures explain which time boundary is feasible.

Conflicts resolving
The station level resolution includes two main parts: coupling order assignment and conflict detection, and conflicts resolving. The first part is important because it is the basis for the second part. If the first part claims a conflict-free solution, there is no need to launch the second part anymore. These two parts are complementary to each other. After conflicts are detected by the first part, the second part converts these conflicts into linear constraints and feeds new constraints to RS-Opt. The method to form new constraints of eliminating the solutions that contain conflicts is described in Sect. 4.2.2. However, generating the full conflict set of Z 1 or Z 2 in an original full DAG is complicated as numerous arc/flow combinations exist. Through the proposed adaptive approach, the complication of generating Z 1 or Z 2 is avoided, and we only need to detect the conflicts existing in a Phase I solution. According to the observation on the Phase I solution, potential conflicts at the station level are sparse, thus, the difficulty of automatically assigning coupling orders and detecting potential conflicts is much lower than that of generating the full conflict set Z 1 or Z 2 in an original DAG. The method of assigning feasible coupling orders and detecting conflicts have been systematically designed in Sect. 6.1. Given a solution from Phase I, the detected conflicts are stored in CF 1 and CF 2 such that the constraints introduced in expressions (11) and (15) can be converted as expressions (27) and (28), defined as valid cuts. Figure 12 shows the logic of feeding valid cuts to the solver (RS-Opt) of Phase I. RS-Opt considers the original DAG G = (N, A) as input and gives a tentative solution G * = (N, A * ) . The station level attempts to assign feasible coupling orders to G * and finalizes tentative linkages. During this process, the conflicts are detected at the platform stage and the network stage. Note that some conflicts at the platform stage can be locally resolved, which will not be recorded in CF 2 . Three strategies are introduced to resolve local conflicts, including the swapping part of the unit diagrams for the same type of train unit, inserting extra station shunting movements within the bearable time of corresponding linkages, and manipulating the flexible timing of re-platforming/depot-return train units. The resolved platform-based results will be passed to the network-based stage to assign further coupling orders and detect coupling-order conflicts stored in CF 2 . The conflicts in CF 1 and CF 2 are formed as valid cuts to be added to RS-Opt. RS-Opt will be launched again with detected valid cuts to deliver a new solution G * = (N, A * ) . The working mechanism of the valid cuts is to eliminate all the solutions containing the conflicts formed in the valid cuts. Thus, RS-Opt with added valid cuts will not consider a solution which contains any conflict that has been constrained in RS-Opt as a feasible solution. For a given schedule, if and only if no conflicts or only local resolvable conflicts are detected, the schedule will be reported as the final conflict-free schedule with assigned coupling orders and finalized linkages.

Dataset description
To verify the correctness of the concepts and approach proposed in this research, experiments were firstly conducted based on a small size artificial station level structure, shown in Fig. 13. This structure contains three terminating stations S1, S4, and S8, and their platform types are indicated. The other stations are intermediate stations where the coupling order reversal enroute may occur. {up} and {down} directions for each platform are marked to notify the relative approaching and leaving directions of unit blocks. Only one direction is available for a dead-end platform, but two directions are usable for a through platform. One depot connects with the down direction of the two platforms of station S4, which means the units shunt to depot at this station can only leave their platforms through the down direction. Based on this station level infrastructure, four artificial datasets, containing trips running between all three O-D pairs (S1-S4, S1-S8, S4-S8). These datasets are small but well designed to cover the issues described in this research. Table 3 gives a summary of these artificial datasets.
Datasets D3 and D4 have the same timetable such that they have the same number of generated arcs. However, some trips in this timetable have different passenger demands, thus, their solutions could be different as well. Two types of compatible units are used on the network to satisfy diverse passenger demands.
The real-world datasets used in this research are derived from a British train operating company, TransPennine Express (TPE), which runs the regional and intercity rail services between the major cities of Northern England and Scotland. Usually, TPE has a daily timetable of around 500 trips. RS-Opt is set as the full model containing the arcselection variables ( y a ), which struggles to deliver a solution for even small instances . Thus, three sub-datasets are derived based on locations from the complete timetable as shown in Table 4. Class 185 and Class 350 are usually not coupled in real-life scheduling, but this research considers them to be able to couple with other units to test the coupling order issues.
The experiments were applied by the station level constraints C 5a making use of the fixed-charge variables ( y a ) because C 5b is hard to be implemented in the existing RS-Opt. RS-Opt is written in FICO Xpress-MP 8.5 with Mosel, and the coupling order assignment and linkage finalization are coded in C#. The experiments are conducted on a 64-bit workstation with 64G and an Intel Core i7-6700HQ CPU.

Results of artificial datasets
Dataset D 1 generated a solution without any station level constraints added; it is conflict-free and feasible coupling orders can be assigned. The platform-based stage assigns fixed coupling orders for three trips and a semi-fixed coupling order for one trip. Based on the results of the platform-based stage, the network-based stage further assigns the coupling orders for another two trips and the semi-fixed trip has also been further fixed through coupling order propagation. There is one trip formed by a coupling operation of two units and one of them involves re-platforming operation. Its feasible coupling order and re-platforming time boundary are also processed at the network-based stage.
Dataset D2 runs three iterations to find a conflict-free solution, and detailed running information is shown in Table 5.
We can notice that the solution fleet size of each iteration is the same and the objective function has a slight increase as we expected for compromising of  producing a conflict-free schedule. In this process, four conflicts are detected during the platform-based stage,in which two of them are locally resolvable. Hence, only two station level constraints (crossing linkages) are added back to Phase I which are shown in the fifth column in Table 5. Since all the conflicts are detected during the platform-based stage, the arc and flow changing through two iterations are visualized in Fig. 14 where the red arrows represent crossing linkages. The conflicts are resolved by some arc and unit type changes for T14 and T20. The experimenting information for dataset D3 is shown in Table 6. For the solution from Phase I of each iteration, there was no conflict detected at the platform-based stage but one conflict was detected at the network-based stage. In the first solution, a coupling-order collision is located in the arc set {20, 27, 38, 40, 47, 48} , which is converted as constraint (29) such that all the solutions that contain these arcs are eliminated.

RS-Opt has been launched again with constraints
(29) y 20 + y 27 + y 38 + y 40 + y 47 + y 48 ≤ 5    Note that the total number of train units used in the final solution has increased by one unit Y. It is because the problem size is small and there are not many other feasible solutions with the same fleet size. For the real-world dataset, increasing some units to find a feasible solution at the station level would not be frequent, since there would have been more feasible solutions corresponding to the minimum number of train units. For dataset D4, two individual conflicts were detected for the solution without any station level constraints such that two new constraints are added to the next iteration. However, the new solution turns out two overlapping conflicts and the conflict arc sets are {20,27,38,39,47,48} and {34,39,51,52}. As it is seen here, arc 39 belongs to two conflicts. Hence, two strategies have been taken to tackle this type of overlapping conflict. One is to treat them as two constraints since no matter which sets of arcs are selected simultaneously will definitely invalid the solution. For this strategy, two more iterations are needed to find a feasible solution. The other is to consider them as an integrated constraint since it is possible to have a feasible solution if the flows on any detected incompatible arc set have a slight change. The experiment results show the solution following this strategy is conflict-free directly after adding this integrated constraint. This experiment shows that the two strategies can produce feasible results but the second strategy gives more flexibility in terms of arc selection, which means the second strategy is not as over-tight as the first strategy. Compared to the first-strategy solution, this solution has higher unit-usage efficiency in terms of fleet size, and the solution graph is much simpler. We also tried to combine these two strategies, but the results are still not as efficient as the second strategy. Table 7 shows information of arc selection of all datasets, where Arcs(1) represent the number of arcs selected in the solution without station level constraints and Arcs(2) is on behalf of the number of arcs chosen in the final conflict-free solution.
The arc overlapping percentage between Arcs(1) and Arcs (2) is very high. Considering the solution structure, we notice that the conflict-free solution only changes a small portion of arcs around the detected arcs and tries to reserve most of the other low-cost arcs. The conflict-free optimal solution is always found within reasonable time and iterations. Besides, the feasible coupling orders and flexible timings can be determined simultaneously.

Results of real-world datasets
The experiments on the artificial datasets endorse the correctness and effectiveness for the proposed method. The artificial datasets are specifically designed to capture all the features described in this research and there are only very limited numbers of feasible solutions corresponding to the optimal number of train units. These two reasons lead the artificial datasets to be more complicated to obtain a conflict-free solution at the station level. In other words, real-world datasets may be easier (less iterations) to be solved. Table 8 gives a summary of the results of datasets Sub1 and Sub2 from Transpennine Express (see Sect. 7.1). These two datasets do not involve any coupling or decoupling operations, thus, there is no coupling-order conflict detected in the coupling order propagation process.
The conflict-free solution schedule of Sub1 needs two iterations to be finalized, and the details of each iteration are shown in Table 9. At the first iteration, three platform conflicts are detected, in which the first two conflicts at the platform 1 of MNCRIAP (Manchester Airport station) are locally resolvable by taking advantage of the interchangeability between the same type of train unit. However, the third platform conflict at the platform 1 of LVRPLSH (Liverpool Lime Street station) is unresolvable, marked as bold and underlined.
Thus, this conflict is converted as a new constraint (31) added to RS-Opt to seek another solution. In the new iteration, RS-Opt gives a solution with the same fleet size but a slightly higher objective function value. At Phase II, another four platform conflicts (located at NWCSTLE_2 and LVRPLSH_1) are detected. As all of them are locally resolvable, the locally resolved solution is the final conflict-free schedule.  However, the solution of Sub2 obtained at the first iteration could be finalized directly because only three local-resolvable platform conflicts located at MNCRIAP_1 are detected, seen in Table 10. The solution of Sub3 from the network level was finalized as conflict-free at the station level, where three coupling operations were assigned with feasible coupling orders, as shown in Figs. 15 and 16. The coupling operation in Fig. 15 is operated at Edinburgh Waverley station. The coupling order in this figure is not important because of the interchangeability between the same type of train unit. Figure 16 contains one coupling operation and one decoupling operation, operated at GLGC (Glasgow Central Station). The coupling order of trip 1M96FP at its origin is [c350, c185], formed by the coupling operation between the train units serving trips 1S35LP and 1S35LL. The coupling order of trip 1S71LP at its destination is [c185, c350], requested by the decoupling operation involving 1M94FA and 1M94LL. As 1M96FP and 1S71LP have no reversal en-route, the assigned coupling orders are the same during the whole journeys.
The coupling orders between 1M96FP and 1S71LP are compatible as this arc is operated at a dead-end platform of MNCRIAP (Manchester Airport station) such that there must be a reversal operation. Besides, the solution has five re-platforming operations that do not involve any coupling/decoupling operations. Therefore, they are fixed by assigning the same platforms to the involved trips.

Conclusions and future research
The network level model has the limitation of ignoring station level constraints, which leads to an incomplete solution. This defect restricts the operability when it is implemented at the station level because of a set of undecided factors, such as the coupling order impacted by station layouts, timings, and unit movement directions. This research scrutinizes potential problems of a solution at the network level. A mathematical model with the capability of eliminating station level conflicts is proposed, in which two types of alternative station level constraints are introduced in detail. Based on the research about the network level of the TUSP, an adaptive approach is proposed to consider the station level constraints efficiently and to produce a complete and operable solution by systematically analyzing and iteratively adding station level conflict constraints. Through this method, the linkages given by the basic network level model can be verified and station level conflicts can be detected and resolved. In addition, the conflict-free coupling orders can also be determined. Both synthetic and real-world datasets are tested and the results are promising.
In our future research, more features and connections between the network level and station level will be investigated. The setup and configuration for testing and refining our models, especially on implementing the conflict constraints in RS-Opt, are substantial ongoing tasks, which need to be carefully analyzed with artificial and real-world datasets. More details and results will be reported in a future paper.