## 3 Model and Methods
### Speed-Up Routines
#### 3.2.1 Lazy Constraint Attribute
Restriction of the Solution Space for Meetings  
Several trial runs were made in which it was experienced that, for the places where meetings between trains take place, the differences between the outcomes of the heuristically solved relaxed problem and the original problem solved to optimality were small, if any. This constitutes the rule of thumb for the solution space restriction, in that meetingsbetween an eastbound and a westbound train were restricted to happen in one of the five stations only: the station in which the meeting occurs in the relaxed problem and two neighboring stations away from this meeting station in each direction. Note that meeting constraints (22)-(30) are defined in such a way that feasibility is always guaranteed. Constraint (22) forces the meeting to happen in one of the stations where meeting variables are defined. The other constraints guarantee satisfaction of the arrive-depart headway constraints in that station and also prevent meeting on the mainline track section. Thus, upon finding the restricted region for meetings, all of the remaining constraints and binary variables that allowed meetings between these two trains in other stations were kicked out of the model. The heuristic was coded in AIMMS. Afterwards, through proper index domain definitions of the variables and constraints, the model with the unnecessary constraints eliminated was automatically generated with AIMMS. Restriction of the Solution Space for Followings and Overtakes  
The case with followings and overtakes is not simple as in the meeting case. In this case, radical differences may arise between the heuristic outcome and the actual optimal solution. We cannot know where the fast train will \"catch\" the slow one (or if it will ever catch it) without actually getting the optimal solution because this depends on the solution itself. If the fast train is delayed in conflict resolutions before catching the slow train, then the distance between them will increase. On the other hand, if the slow train is delayed in conflict resolutions before the fast train catches up, then the distance between them will decrease. Therefore, the model cannot be easily reduced as much as it was for the meeting case. However, some improvements can still be made. Indeed, the fast train can catch up to the slow train in the earliest possible place if the fast train is never stopped in conflicts before catching up to the slow train, whereas the slow train is stopped and forced to wait in all conflicts before the fast train catches up. Such a case can be simulated by temporarily assigning a very high weight on the fast train's delay (e.g., 5000 min/min) and very low weight on the slow train's delay (i.e., 0.0001 min/min). Optionally, the fast train can be introduced into the line with a large amount of already experienced unrecoverable delay, whereas the slow train would have a long recovery time. In these cases, the heuristic will always give priority to the fast train and never give priority to the slow train in their respective conflicts. Thus, it will be possible to determine the earliest place that the fast train can catch and overtake the slow train. For all of the train couples moving in the same direction, for which the slow one enters the system before the fast one, such extreme values were set and the heuristic was run once. Then, it was assumed that the overtake can happen in one of the four stations upstream (in the involved trains' direction) of the heuristic outcome or later. All binary variables for the stations upstream of this earliest possible station were fixed (not eliminated to be on the safe side for modeling station and siding capacities). If any fast train entered the line earlier than a slow train in the same direction by enough of a margin, then we assumed that the fast train would get further away and that these two trains would never interact, thus all related binary variables and constraints were then eliminated.