# An Algorithm for Rescheduling of Trains under Planned Track Closures
## 4 Joint Problem of Train Rescheduling and Track Closure Planning
### Mathematical Model
#### 4.5.3 Final Model and Its Analysis  
Two groups of decisions \(\boldsymbol{y}\), \(\boldsymbol{\Delta t}^{\text{C}}\), as well as \(\boldsymbol{TT}\), together with \(\boldsymbol{x}\) introduced in two previous sub-sections, are mutually dependent. The plan of track closures \(\boldsymbol{y}\), \(\boldsymbol{\Delta t}^{\text{C}}\) usually entails changes in the timetable \(\boldsymbol{TT}^{\text{G}}\), like the cancellation of trains and the shift of departure and (or) arrival times at stations. On the other hand, it is necessary to bear in mind strong limitations that are imposed on the plan of track closures by the original timetable \(\boldsymbol{TT}^{\text{G}}\) being the basis and the source of technical restrictions for \(\boldsymbol{TT}\). So, the claim is entitled that \(\boldsymbol{\Delta t}^{\text{C}}\) and \(\boldsymbol{y}\) directly influences \(\boldsymbol{TT}\), and the indirect opposite impact is also valid, which forces the joint making of both groups of decisions \(\boldsymbol{\Delta t}^{\text{C}}\), \(\boldsymbol{y}\) and \(\boldsymbol{TT}\). In the paper, the decisions are taken in the time horizon limited to the interval \([0,T^{\text{H}}]\), where \(T^{\text{H}}=\max(\max_{i\in\
abla,p\in\mathbf{TR}}t^{\text{ARR}}_{i,p}+T^{ \text{E}},\max_{n\in\mathbf{C}}(t^{\text{CLS}}_{n}+T^{\text{C}}_{n}))\) is the greater of times: the latest possible arrival of a train to the destination railway station according to the timetable \(\boldsymbol{TT}^{\text{G}}\) and the greatest completion time of all the possible closures. All mentioned and resulted time variables have to belong to this interval. However, time shifts \(\Delta t^{\text{ARR}}_{i,p}\) and \(\Delta t^{\text{DEF}}_{i,p}\) can be negative. To achieve a feasible solution, the following constraints are imposed on the decision variables:  
* all obligatory closures are performed (1),
* all closure starting times are feasible (2),
* every pair of closures has to be disjoint (3),
* obligatory train runs from set \(\mathbf{TR}^{\text{OB}}\) are present in the new timetable (4),
* run times between adjacent stations are fixed (5),
* substitute transport is allowable for selected paths specified in matrix \(E\) and only possible if other tracks are not free (6),
* capacities of stations are limited (only in artificial station '0' capacity is unlimited) (7),
* at most one train can occupy one track at every time moment (8),
* the train cannot run by any track if it is canceled (9),
* the total travel time extension cannot exceed the given limit \(T^{\text{E}}\) (10),
* the travel time extension on a given distance \(D^{\text{L}}\) cannot exceed the given limit \(T^{\text{DE}}\) (11),
* standing times of trains at stations are limited by the minimum and maximum feasible values (12),
* trains in both original and new timetables go through the same path of stations, but they may go through different tracks (13),
* departure and arrival lateness at selected stations are bounded (14),
* the arrival time of every train at every station must not be later than corresponding departure time (15), and
* no train can occupy a track during a closure (16).