# Supporting the Management of Rolling Stock Maintenance with an Ontology-Based Virtual Depot
## 8 Benefits of the Use of the Method
When the short-term scheduling process is executed one week or more before the scheduling horizon starting date, an estimation of the number of units scheduled for a maintenance intervention m can be given for the whole scheduling horizon period. With this estimation, when used by the process discussed in Section 5, a re-order can be triggered as and when required. However, in the case where a re-scheduling is required and if, in unforeseen situations, some resources to perform some maintenance interventions are available, then the scheduling process should not schedule these maintenance interventions before re-ordering and receiving them. In this case, querying the database and getting resource availability is required. In what follows, a description of the resource retrieval process and scheduling process with constraint (2) is given. For the sake of simplicity, this example focuses only on consumables. Each intervention is decomposed into its constituent tasks and soft similarity measures, and based on the Levenhstein distance [36], they are employed to link each task in the schedule to the corresponding entity RailMain-KG knowledge graph. The output is a catalogue of maintenance task identifiers, which reflect those tasks that conform to at least 95% similarity. Resource retrieval is carried out with a series of SPARQL queries against RailMain-KG, with one query executed per intervention. The aim is to aggregate the material requirements of each intervention and assign them to priorities. Figure 11: Short-term scheduling process inputs from ontology and resource retrieval process. Listing 1 depicts the template query, while Table 1 illustrates an indicative output. Column \"material-id/name\" are identifiers, \"quantifier\" specifies whether the quantity constraints (\"overall\") are absolute or represent minimum thresholds, and \"priority\" reflects the top priority value among the maintenance tasks that require the material in question. The retrieved information is being used as input in the subsequent step of the short-term schedule. Scheme 9 depicts a scenario where the required resources for maintenance 1 are not available after querying the database. In this scenario, constraint (2) is applied for the first three days from day one of the scheduling horizon. This means that the non-availability of the resources for maintenance 1 should affect the first three days of the short-term schedule only. A re-order should allow resource availability after this period of time. Scheme 9 shows that maintenance intervention '1' for unit '11148' is moved to the 4 th of May with days before exam value equal to -1 meaning it is scheduled one day late. However, maintenance '1' for units '11145' and '11141' is scheduled for the 10 th of May, as the resources will be available again by then. \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Material-Name** & **Material-ID** & **Quantifier** & **Overall** & **Priority** \\ \hline damp cloth & srsm:M8 & at least & 8 & SAFETY CRITICAL \\ \hline copper washer & srsm:M68 & exactly & 6 & SAFETY CRITICAL \\ \hline lacquer marker & srsm:M66 & at least & 3 & SAFETY CRITICAL \\ \hline mild detergent & srsm:M2 & at least & 3 & SAFETY CRITICAL \\ \hline mounting bracket & srsm:M1834 & at least & 3 & MISSION CRITICAL \\ \hline engine oil & srsm:M99 & at least & 2 & MISSION CRITICAL \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Indicative results of a resource retrieval query. Figure 12 shows a one-week forecast of the number of units that will be received for maintenance at the depot. The left side is a forecast based on a short-term schedule produced without information about the available resources (constraint 2) and the right side is a forecast based on a short-term schedule produced with constraint 2 and information about the available resources. The left side shows the scenario depicted in Scheme 8 while the right side shows the one depicted in Scheme 9.