# Supporting the Management of Rolling Stock Maintenance with an Ontology-Based Virtual Depot
## 7 Short-Term Scheduling
### Short-Term Scheduling Optimisation  
The MIP model presented in this section is an improved formulation of the model proposed by the authors in [33]. This improvement helped make the model linear rather than quadratic when executed in addition to reducing the decision variables number, and including an additional constraint to cover the resource availability. Scheme 3 is a sample of a case study to describe the considered problem. This version of the proposed model does not cover the duration of maintenance tasks. This sample shows a set of PM interventions with their intervals (frequency), their duration that might be influenced by the depot resources used (see a and b cases when different roads are used), their required depot resources, and their earliness/tardiness costs. The main objective is to schedule maintenance interventions in time to reduce maintenance costs. The problem is to specify the starting time of each maintenance intervention for each unit that maximises the use of the predefined intervals, and thus, minimises the maintenance costs related to wasting the maintenance interval or penalty associated with exceeding the fixed interval period. **Objective function:** Minimise the maintenance costs (by maximising the interval use and avoiding tardiness penalties). Maximise fleet availability (this is optional and end-users are free to consider it or remove it from the model). **Subject to:**  
* Fleet availability should meet the availability limit requirement at all times (hard or soft constraint). * The maintenance starting date should be within a tolerance range [max days before, max days after] compared to the due date. * Some maintenance interventions can be performed on specific days of the week only. * Each maintenance intervention has specific depot resource requirements. where: T: number of periods (horizon in days). N: number of units. F: Number of fleets. M: number of maintenance interventions. S: number of skills. I = {1, \(\cdots\), N }. T = {1, \(\cdots\), T'}. F = {1, \(\cdots\), F'}. M = {1, \(\cdots\), M'}. G = {1, \(\cdots\), G'} as a list of lists, where: i: index of a unit, t: index of a period, f: index of a fleet, m: is the index of a maintenance intervention, and g is the index of a maintenance intervention group, where each group includes a set of maintenance interventions m.  
**Parameters and variables:**  
\(CAP_{mt}\): maximum available resources within a depot at a period t (in terms of the number of units it can receive at a period t for a maintenance intervention m). For example, a depot can receive 10 units at a time t for a maintenance intervention type 1 based on the available resources. \(Cap_{gt}\): maximum available capacity within a depot at a period t (in terms of the number of units it can receive at a period t for a maintenance intervention group g). For example, a depot can receive two units per day for a maintenance intervention group 2 performed on road one (a shared resource). \(EP_{m}\): earliness penalty of a maintenance intervention m if performed earlier. Likewise, a penalty \(TP_{m}\) is a tardiness penalty for a maintenance intervention m if performed after the due date. The maintenance interventions' due dates are outputs of the long-term scheduling process and are inputs for the short-term scheduling process. \(U_{int}\): a binary variable, equal to 1 if a unit i had a maintenance intervention m at period t and 0 otherwise. \(U_{int}=\left\{ \begin{array}{ll}1&\text{if a unit i had intervention m at a period t}\\ 0&\text{otherwise}\end{array} \right.\)  
\(A_{f}\): availability constraint parameter related to a fleet f. \(A_{f}\) specifies the number of possible out-of-service units at all times. The availability of the fleet should not be less than a certain threshold and can be computed as follows: Availability = Fleet size \(-\)\(A_{f}\). \(C_{f}\): is the cost of unavailability of the fleet per unit if higher than the limit \(A_{f}\).