Combined Optimization of Maintenance Works and Crews in Railway Networks

: This study develops optimal maintenance schedules for train lines, a critical endeavor ensuring the safety, efﬁciency, and reliability of railway networks. The study addresses the combined scheduling problem of maintenance works and crews on the railway networks. The baseline scheduling model is initially established with the primary objective of allocating maintenance tasks efﬁciently while adhering to pertinent constraints, encompassing task grouping and cost minimization. Subse-quently, this baseline model is enhanced through the integration of crew scheduling, wherein work crews are strategically assigned to execute predeﬁned tasks, thereby facilitating effective workload distribution. The combined maintenance work and crew scheduling problem is mathematically formulated as a binary linear programming model, enabling the attainment of globally optimal solutions. Comparing the outcomes of our enhanced model, which incorporates both maintenance works and crew schedules, with the baseline model that solely addresses maintenance works, we reveal that task grouping in accordance with predeﬁned conditions leads to reduced overall costs by minimizing maintenance duration during various periods. Additionally, the judicious distribution of workload among the crews ensures comprehensive coverage of all essential tasks. These ﬁndings underscore the signiﬁcance of our proposed approach in enhancing the operational efﬁcacy and economic viability of railway maintenance scheduling, thereby offering valuable insights for practical implementation and future research endeavors.


Introduction
Transportation is a vital sector for society, as it profoundly influences daily citizen services and the economy.Notably, the railway sector has evolved into one of the safest and most environmentally friendly modes of transportation, encompassing primarily freight and passenger transport.The global railway network spans over an extensive 1.3 million kilometers worldwide, with the United States boasting the longest railway network, while Japan earned recognition for having the highest quality of railway infrastructure in 2019 [1].Analyzing statistics from 2015 to 2021, it is evident that the demand for railway passenger transport experienced significant growth in the European Union until 2019.From 2019 to 2021 the statistics show a remarkable drop due to the pandemic of COVID-19 [2].For instance, in 2016, Germany recorded the highest number of railway passenger trips, estimated at around 2.8 billion passengers [3].Furthermore, Rail Freight Forward, representing a substantial 90% of Europe's rail freight transport, aims to elevate the share of railway freight transport from 18% to 30% by the year 2030.This ambitious goal has the potential to reduce approximately 25 million tons of CO 2 emissions [4].Nonetheless, the prevailing requirements necessitate the railway industry to augment its capacity by introducing more trains with higher speeds and greater carrying capabilities.However, this progression comes with a drawback, as it leads to the deterioration of railway infrastructure and escalates maintenance costs.European countries allocate a significant sum, approximately EUR 15 to 25 billion annually, towards the maintenance and renovations of their railway systems [5].These financial commitments underscore the importance of sustaining and enhancing the railway network to meet evolving demands while ensuring its long-term efficiency and environmental sustainability.
The railway infrastructure should provide dependable conditions, thereby circumventing substantial disruptions in both passenger and freight transport operations.As such, the primary objective of railway line maintenance is to attain consistently high standards of safety and functionality while optimizing both time and cost factors.The economic significance of maintenance also becomes evident, as evidenced by the European railway network's expenditure, which surpassed EUR 25 billion in 2016, compared to EUR 20 billion in 2011.Notwithstanding this noteworthy cost escalation, budgets allocated for railway maintenance remain constrained, compelling infrastructure operators throughout the continent to explore strategies for accomplishing more with limited resources and achieving improved control over maintenance expenses [6].
Maintenance activities within the railway infrastructure can be broadly categorized into two main groups: inspection, which involves identifying and evaluating the current condition of the infrastructure, and restoration, focusing on rectifying already identified defects.Regular inspections are conducted at predetermined intervals, while emergency inspections occur to prevent potential incidents or address observed abnormalities during train operations.Special inspections are carried out at specific points with known risks, such as areas prone to landslides.The frequency of consecutive regular inspections adheres to predetermined time intervals.Restoration works can be further divided into three categories: material maintenance, which entails the replacement of sleepers, rails, and fastening elements; geometry maintenance works, involving track lifting and realignment; and ongoing maintenance tasks, such as leveling and aligning the track and lubricating switch points.Vale et al. [7] focused on the preventive maintenance of railway tracks with ballast for compression works, and their model allows the analysis of maintenance actions over time, with longer analysis periods leading to better maintenance planning.Lidén [8] categorized maintenance activities based on the required time of possession per work shift, emphasizing the significance of time frames in maintenance scheduling to ensure the timely restoration of infrastructure.However, Lidén [9] pointed out a conflict in railway infrastructure management concerning the coordination of train traffic with maintenance activities, particularly in networks with a high traffic density.Balancing both becomes crucial, and often maintenance is scheduled during periods of minimal or no train schedule, including nighttime hours with fewer passenger movements.Dao et al. [10] dealt with major and significant maintenance planning, as well as renewal processes, highlighting their complexity and involving multiple stakeholders, such as the railway infrastructure manager, train operating company, traffic control, and maintenance contractors.Conversely, Vansteenwegen et al. [11] proposed an algorithm that could adjust the train's route and timetable to accommodate scheduled maintenance tasks while maintaining passenger service levels to as high a degree as possible.The algorithm aimed to minimize the number of cancelled train schedules, and the results indicated that minor adjustments could significantly reduce the need for cancellations.
It should be noted that the frequency of actions required in maintenance, inspection, and restoration, whether predetermined or not, depends on a range of factors, with the most critical ones being the train's traffic volume, speed, and weight.Therefore, when exceeding a critical degradation value of the railway track, corrective measures should be taken immediately.In this study, we propose a model for the combined scheduling of maintenance works and crew schedules.The remainder of this study is structured as follows.Section 2 presents the relevant literature.Section 3 introduces the problem description and the mathematical formulation of our model.The implementation, the results, and the conclusions are presented in Sections 4-6, respectively.

Related Studies
In recent years, significant research studies have been undertaken to investigate the optimal railway maintenance scheduling.The approach by S. M. Pour et al. [12] focused on allocating the maintenance tasks in the Jutland peninsula, the largest region in Denmark, to a set of maintenance crew members, where each crew undertakes a sub-region.The goal was to minimize the distance between two different tasks in the same sub-region by proposing a perturbative hyper-heuristic framework.Dotoli et al. [13] presented a Decision Support System (DSS) applied in a real dataset in Southern Italy.The problem aimed to reschedule the timetable in real time and solve conflicts in the network for unexpected disturbances.The objective was to minimize the cost of delays.
A different study was conducted by Sedghi et al. [14] which intended to discuss current literature approaches for optimization in maintenance planning and scheduling, including possible gaps related to decision-making models.One of the observations was about the decision support models that are cost-based which often combine various costs to minimize the overall cost.Regarding the cost, they expect a stronger emphasis on environmental and other sustainability-related costs.
In their study, Cavone et al. [15] proposed an automatic rescheduling algorithm for the real-time control of railway traffic and tested it in simulation on the Dutch railway network.The scope of this was to minimize the delays caused by disruptions.They used a Model Predictive Control (MPC) algorithm, while the rescheduling problem was solved by mixed integer linear programming using macroscopic and mesoscopic models.
Cavone et al. [16] developed a model that focuses on disruptions tested in the Dutch railway traffic system, proposing an innovative bi-level rescheduling algorithm based on a mesoscopic mixed integer linear programming.The technique manages to obtain a feasible rescheduled timetable in a short computation time including safety constraints and capacity.
An approach for the preventive signal maintenance crew scheduling problem in the Danish railway system was conducted by S. M. Pour et al. [17], which was formulated as a mixed integer optimization model.The objective was to minimize the number of working days, to ensure that as many tasks as possible are completed inside the planning horizon and to minimize the penalty for assigning crew members.Another study by S. M. Pour et al. [18] developed a model for planning preventive maintenance in the railway signaling system in Denmark.The problem was formulated as a multi-depot vehicle routing and scheduling problem with time windows and synchronisation constraints.Some tasks require the simultaneous presence of more than one engineer, which requires the consideration of task synchronization.Furthermore, a constraint programming (CP) approach was used to create viable monthly schedules for substantial, practically relevant scenarios, while the experimental results indicated that the proposed framework can generate feasible solutions and can schedule up to 1000 tasks for a monthly plan of eight crew members.
Apart from the conventional optimization approaches for railway operations and maintenance, there exist solutions using Artificial Neural Networks (ANN).First, in the study of Martinelli and Teng [19], the Train Formation Problem (TFP) was formulated as a Back-Propagation Neural Network (BPNN) model consisting of three layers: the input layer representing O-D demands, a hidden layer, and the output layer representing the trains with the assigned demand.Their main objective was to utilize neural networks for obtaining near-optimal solutions in short periods of time, due to the high computational time of conventional solution algorithms producing train formation plans.Furthermore, Gençer et al. [20] were the first to implement maintenance planning for metro trains with an ANN model incorporating all train equipment and factors affecting the failure.Within the artificial neural network model, five variables (equipment type, preventive maintenance frequency, material quality, life cycle, line status) were included as input factors which influence equipment faults, while the outputs were represented by the number of failures.Lastly, Popov et al. [21] used an Artificial Intelligence (AI) technique to analyze the track quality big data of a high-speed line in the UK, using a dataset with more than 15 years of track geometry.More specifically, an ANN model was developed to identify segments of the railway track where the condition was either improved or deteriorated during the time elapsed between two inspection runs.

Optimization of Railway Line Maintenance Scheduling
One area of research is concerned with the scheduling of maintenance operations to prevent disruptions to and from scheduled train routes, while also devising strategies to minimize infrastructure downtime and reduce maintenance costs.The study by Higgins [22] addressed the conflict between maintenance task scheduling and assigning them to crews within a given timetable.The goal was to achieve the optimal distribution of maintenance and crew activities to minimize disruptions to scheduled routes and reduce their duration.Higgins's [22] approach was a heuristic tabu search for the order of tasks and maintenance crews.The model had specific constraints concerning the available budget, priority of maintenance activities, line availability, and minimum travel time between connecting lines.
Cheung et al. [23] dealt with the optimization of resource allocation for task execution.They used the constraint language CHIP to solve real-world resource allocation problems.The problem aimed to map railroad lines to a given set of scheduled maintenance tasks, subject to certain constraints.As an example of the model's constraints, one involved the requirement to ensure that resources remained within the available limit.Another objective was to create a framework that maximizes task assignments based on their predefined priority.
The approach by Budai and Dekker [24] focused on preventive maintenance by exploring optimal track possession intervals for task execution.They mainly utilized train-free periods, resulting in a 33% reduction in track possession and associated costs, by combining works.Additionally, Budai et al. [25] emphasized grouping small routine works and larger projects, scheduling them within specific periods to minimize maintenance costs without burdening train traffic.They employed mathematical programming formulations and heuristic solutions due to the complexity of the problem.In contrast to the previously mentioned studies, Peng and Ouyang [26] investigated the scheduling of a maintenance crew where various maintenance tasks were to be scheduled for a set of maintenance groups.One of the constraints was related to the direction a maintenance group followed during the execution of a task, i.e., from one task to the next.Furthermore, a constraint was defined that each task can be executed exactly once by a maintenance crew.
Heinicke et al. [27] adopted a completely different approach, where maintenance tasks incur penalties in the form of costs until the specific task is completed.The longer the task execution time, the higher the penalty cost was.The problem was formulated as a Vehicle Routing Problem (VRP), developing, and comparing it with different Mixed-Integer Linear Programming (MILP) models and customer costs concerning the time of execution.It should be noted that the vehicle routing problem of this study, unlike the common VRPs, minimized the sum of travel expenses and customer costs that depend on time.
On the other hand, Van Zante-De Fokkert et al. [28] created a model in which each segment of the infrastructure was made available for maintenance at least once every four weeks.The main objective was to minimize maintenance costs.They defined a Single-Track Grid (STG), which is a traffic management system for railroad lines consisting of a single track.In this system, they divided the railroad line into work zones between stations, where each work zone defined a segment of the line for maintenance tasks which could be taken out of service for train traffic.They then utilized a Mixed-Integer Programming (MIP) model to define the single-track grids in shifts to create the maintenance schedule.
Another study focusing on minimizing maintenance costs was conducted by Lake et al. [29], who modelled short-term track maintenance scheduling within an existing timetable and maintenance program.The model included not only the tasks but also the assignment of tasks to maintenance crews.Different crews had the option to handle the same maintenance activity at different time periods.The model was solved with the introduction of a two-stage heuristic solution.The first stage generated a feasible solution, while the second stage used simulated annealing.Regarding the crews and worker safety, it is important to mention the research by Den Hertog et al. [30], where the division of the railway infrastructure into work zones was studied.The specific maintenance zone should be taken out of service, to satisfy all other factors involved.In this research, division rules were utilized that were developed for the Dutch network.
In their study, Andrade and Teixeira [31] set two objectives: maintenance cost and train delays.They focused on the track degradation model and decided whether maintenance should be performed or not.They utilized an optimization and simulation-based technique with two objectives for solving the problem.In more recent research, Su et al. [32] developed a Model Predictive Control (MPC) algorithm.At a higher level, their study determines the long-term maintenance plan per segment and minimizes maintenance costs and infrastructure degradation over a finite planning horizon.It ensured that the level of degradation of each segment remained above the maintenance threshold.At a lower level, the short-term maintenance tasks proposed by the high-level controller and the optimal routing of the corresponding maintenance crew were configured as a capacitated arc routing problem.
Nijland et al. [33] developed an optimization model for the maintenance scheduling for railway operators and maintenance crews.They also categorized the maintenance engineering sectors as they pose obstacles to train circulation and maintenance management.The method used was a novel mixed-integer linear programming model.Additionally, they evaluated the computational cost using exact (branch-and-bound) or heuristic solutions for solving networks with up to 25 work zones.Furthermore, Oudshoorn et al. [34] investigated a real railway maintenance scheduling problem for a one-year preventive maintenance period.They developed and compared three heuristic/metaheuristic approaches: evolutionary strategy, greedy heuristic, and a combination of both.The results showed that the best solution, providing a high-quality schedule, was achieved through the combination of strategic and greedy heuristic approaches.
Buurman et al. [35] focused on optimizing the maintenance schedule for railway operators and maintenance contractors with flexibility for both.The main factors to overcome obstacles were bypassing, rescheduling trains, and repositioning parked rolling stock.Their study explored the creation of a weekly recurring preventive maintenance program during the night to minimize train circulation delays as much as possible.They used a heuristic approach to find feasible solutions for large networks and an ε-constraint method for smaller networks.

Optimization of Maintenance Scheduling to Minimize the Impact on Circulation
Equally important are optimization techniques that incorporate time windows for railway maintenance, since many models do not consider train circulation.For this reason, Bueno et al. [36] used a simulated annealing solution as a basis for their algorithm, which produced results when using random block placements.The constraints were related to the initial time of a track block and the most recent finishing time of a track block, considering crew working hours.Moreover, Lidén and Joborn [37] emphasized the significance of railway services and the maintenance of the railway network, as they needed to be considered together in their planning.They presented a mixed-integer programming model for solving railway circulation and network maintenance.Their objective was to find a long-term plan that optimally schedules train-free windows for a specific volume of spatial and temporal aggregation for network capacity.D'Ariano et al. [38] addressed the problem of regular scheduling to optimize train routing decisions, temporally correlated with short-term maintenance tasks in railway networks.They used a MILP model, incorporating stochastic variables, constraints, and objectives related to the flow of train circulation and track maintenance.Two objectives were set: one focused on minimizing deviations from a scheduled timetable, and the other on maximizing the consolidation of maintenance tasks.
In long-distance railway networks, maintenance and train routing scheduling are highly complex, especially in single-track networks.Building upon this issue, Albrecht et al. [39] investigated the Problem Space Search (PSS) through metaheuristic approaches, rapidly creating many alternative train routes and a timetable incorporating track maintenance.The approach of Forsgren et al. [40] was very close to this, using a MIP model to optimize train schedules and preventive maintenance.The model allowed train rerouting or cancellation to achieve the best possible traffic flow, considering a fixed set of scheduled maintenance activities.An overview of the most relevant reviewed studies is provided in Table 1.This study focuses on examining the problem of scheduling a one-year preventive maintenance work plan.The goal is to identify the specific tasks and their corresponding time periods required to complete them, all aimed at minimizing the overall downtime of the infrastructure due to maintenance activities.In addition, we aim to provide a higher efficiency of operations, grouping them in the best possible way in terms of economic benefit and efficiency and balancing the workload for the maintenance crews.The maintenance works included in this study refer to two types, short-term/routine works (e.g., track and switching inspection, railway inspection, signaling systems, switch lubrication) and longterm/project works (e.g., ballast cleaning, rail grinding, compaction).Long-term works require more time to complete than routine works and are usually carried out once/twice in a few years.From the reviewed studies, the closest prior comparator to our work is the study of Budai and Dekker [24] which we use as a baseline model.Budai and Dekker [24] scheduled only the maintenance works, whereas our approach schedules the maintenance works and the crew schedules in combination.This results in an enhanced model, revealing that task grouping and a judicious distribution of maintenance crews can lead to reduced overall costs by minimizing maintenance duration during various periods.

Methodological Framework and Problem Formulation
In countries with a high frequency of train services, such as the Netherlands, maintenance activities are usually scheduled during the night to avoid major disruptions.Furthermore, certain long-duration works require the closure of the railway line and are scheduled during the night or at the weekends, or during low traffic volumes.In railway lines with a lower frequency, certain maintenance activities can be carried out during the day in free time gaps between two consecutive train passages.During a link closure for maintenance works, a rerouting must be planned, a detour from the main track route must be made, or the route must be cancelled.This depends primarily on the railway network topology of the location where the maintenance work is being conducted, and it constitutes one of the main reasons for timetable delays.
Starting from the baseline model of Budai and Dekker [24] which schedules the maintenance works, we focused on the integration and assignment of work crews to perform the scheduled tasks.This means that for every planned task at every time and each link, there must be a work crew available.In this configuration framework, a reference point was created for the start and end of the work crews, namely the depot.In this way, depending on the movement of the crews, their costs and their exact location can be calculated.Each crew must perform one of the three options that have been set.The three options refer to a crew staying at the same link, moving to a different link, or returning to the depot.The incorporation of the work crews into the baseline model holds significant importance, as it facilitates enhanced management of the annual preventive maintenance program.This is achieved by ensuring the availability of the necessary work crews and their associated costs from the outset.Additionally, it enables a comprehensive overview of planned maintenance works and provides time for implementing the necessary actions towards its execution.To develop the enhanced model, it was necessary to add to the base model new sets, parameters, decision variables, and constraints to meet our requirements.A configuration of the objective function was also carried out by including a new term.
The base model of Budai and Dekker [24] defined some tasks and links of the railway line.The tasks were divided into two categories, projects, and routine works.The projects involved maintenance works that took a long time to complete, and the link had to be taken out of service or carried out at the maximum train-free period length.On the other hand, routine works involved maintenance works with a shorter completion time and could be carried out in time gaps between the passage of two consecutive trains.The planning period was one year, i.e., T = 52 weeks.Moreover, a set of combined tasks for both projects and routine works was created, which could be performed simultaneously on the same link.In addition, it should be mentioned that there is a set of three options indicating the execution time of the projects.
Before proceeding to the formulation of the objective function and the constraints, the following definitions of sets are required.Comb {(m, n, l)}-set of combinable works m and n at link l, ∀m, n ∈ A and l ∈ L; • max l -maximum length of the train-free period on link l ∈ L.
It must be noted here that projects and routine works have different frequencies and therefore different scheduling.First, the link on which the selected project will be executed must be defined and then its earliest and latest start determined.Further, the duration needed to complete the project is defined for three options of k K, and each option corresponds to a different duration.The k = 1 option allows the works to run at the maximum length of the free train period (once a day) on several consecutive days, the k = 2 option allows the project works to run on weekends by closing the link for 48 h, and the k = 3 option closes the link for several days or weeks.In addition, based on these three options, three different costs are generated: one fixed cost for each time the link is used for maintenance and two additional costs, which refer to the penalties for the cancelled routes with option k = 2 or k = 3.The advantage of this option is the efficient use of resources by the crews.The third cost refers to the inefficient use of resources with option k = 1 or k = 2, since activities in these two scenarios may be interrupted and equipment must be moved by the crews.Routine works are executed with a higher frequency and their frequency should be determined upfront.Based on the frequency and the scheduling period of a year, tasks can be allocated within the planning time horizon.
In addition, our enhanced model includes different links L corresponding to a crew E each time a task is scheduled.To include the set of crews E, we introduce their available number in our model and a set of links for the crews, in which we have added the depot as their reference point.In this way, when a crew is not performing a task, it returns to the depot, and thus the exact locations of the crews are known.The added sets are presented below: • E-set of crews; • LL-set of links for crews.

Parameters
• G al -frequencies per T scheduling period of activities a ∈ RA on link l ∈ L, where G al = 0 if the activity a ∈ RA is not relevant to the link l ∈ L; • TW pl -total workload (in hours) for a long-term work/project p ∈ PA on link l ∈ L; • I pl -0-1 values depending on whether a project p ∈ PA will be performed on the link l ∈ L during the scheduling period t ∈ T; • D kpl -the duration of a project p ∈ PA on link l ∈ L using option k ∈ K, with • LST pl-the earliest possible starting time of project p ∈ PA on link l ∈ L; • UST pl-the latest possible starting time of project p ∈ PA on link l ∈ L ; • F al -F al = ceil(T/Gal) is the planning cycle for each routine work a ∈ RA at each different link l ∈ L; • C lt -cost for possession of link l ∈ L at time t ∈ T;

•
CCost kl -cancellation cost on link l ∈ L using option k ∈ K; • MCost kpl -penalty cost for resource utilization if option k ∈ K is chosen for performing project p ∈ PA on link l ∈ L.
Contrary to the base model, our enhanced model searches and makes decisions for the work crews.For the execution of the maintenance tasks a ∈ A by the work crew e ∈ E, their availability for link l ∈ L at every time t ∈ T is predefined by the parameter Z ealt .Moreover, for moving from one link to another, a distance W lq is defined between the two links l ∈ L and the work crew links q ∈ LL.In the case of two identical links, W lq will take a value of 0 since no movement distance is measured.Otherwise, it will take the value of 1, which corresponds to the kilometric distance defined and is added to the objective function.The added parameters to our enhanced model are described below: • Z ealt -binary, indicates whether a work crew e ∈ E can serve a link l ∈ L at time t ∈ T, or not; • W lq -distance between two links.
To be able to distinguish which tasks will be executed, at which time, on which link, and whether the link is used for a task, we define the following binary decision variables that will be used in the problem formulation.

•
X alt -indicates whether activity a ∈ A on link l ∈ L is assigned to time t ∈ T, or not; • M lt -denotes whether period t ∈ T is used for preventive maintenance work, or not; • Y kplt -indicates whether the execution of project p ∈ PA starts at time t ∈ T on link l ∈ L if option k ∈ K is chosen, or not; • B kpl -indicates whether the execution of project p ∈ PA on link l ∈ L is conducted according to option k ∈ K, or not.
A decision variable h ealt was added to our enhanced model for a scheduled task to be performed by a crew.The decision variable is binary and is a prerequisite for the improvement of decisions in the implementation of a task by a particular work crew.If a decision is made not to carry out a task on a particular link by a crew at a given time, the decision variable will be denoted as 0. Conversely, if the value is set to 1, it signifies that the crew is required to execute the task on that link.The decision variable added to the enhanced formulation problem is given below:

•
h ealt -binary, indicating whether work crew e ∈ E serves link l ∈ LL at time t ∈ T for task a ∈ A, or not.

Formulation of the Objective Function and Constraints
The track possession problem, considering the scheduling of maintenance works in railway networks is formulated as a mathematical optimization problem.The mathematical program can be written as follows. ∑ The objective function, Equation (4), minimizes the number of time periods for which major maintenance work is planned per planning horizon T and thus the possession cost and the cost of carrying out the scheduled projects.The constraints of Equations ( 5) and ( 6) ensure that all routine works and projects are respectively assigned to the correct number of time periods for each link.The constraint of Equation (7) ensures that the combinable tasks (either routine works or projects) can only be performed at the same time and on the same link.Moreover, the constraint of Equation ( 8) prohibits routine maintenance works from being executed in close time intervals to each other and between two consecutive occurrences of the same task there must be F al time periods.The constraint of Equation (9) guarantees that the starting time for performing a project is in the interval between the earliest and the latest possible starting time.The constraint of Equation (10) ensures that if the execution starting time for each project is selected, then the projects are assigned to subsequent intervals.One of the three execution options must be chosen to perform the specified projects.This is ensured by the constraint of Equation (11).The constraint of Equation (12) ensures that time t ∈ T will be used for preventive maintenance work if and only if there is at least one activity planned for that time in one of the segments.Finally, the constraint of Equation ( 13) ensures that the decision variables in the model are binary.
The above-formulated problem was extended to incorporate crews and optimize the scheduling assignment of work crews to maintenance tasks.The objective function of our enhanced model aims to minimize and allocate the workload for the crews through the decision variable H ealt and the cost required for their movements between two consecutive links of the railway line.The W lq parameter contributes to this, and it should be noted that in the current formulation, there is no penalty for the movement of crews from one link to another.However, a fixed value is added each time a task is performed and there is a movement of a crew between two consecutive links.
In the objective function of Equation ( 4), we have added the following part to formulate our enhanced program: To formulate the enhanced programming problem, several new constraints should be considered.First, a work crew can work on only one workstation.This is ensured by the constraint of Equation ( 15), i.e., the execution of a task by a given maintenance work crew e ∈ E at link l ∈ LL can be performed by a single crew at a time t ∈ T. The constraint of Equation ( 16) states that each scheduled maintenance task a ∈ A, which was presented in the baseline model, must be equal to and correspond to a work crew e ∈ E at each link l ∈ L at each time t ∈ T. For this to happen, a work crew must be available and assigned by the decision variable to perform the task.Finally, the constraint of Equation ( 17) ensures that each work crew e ∈ E at each time t ∈ T is required to move either to a link l ∈ L or stay in the depot.In this way, the general movement of each work crew can be tracked from start to finish within the planning horizon.
Our proposed (enhanced) model is a binary nonlinear model.It is nonlinear because of the constraints of Equation (17).To be able to solve it to global optimality, we must first linearize it by performing a transformation.The rationale behind the transformation lies in our objective to maintain linearity within the model's constraints, thereby enabling the computation of a globally optimal solution.For the transformation of the nonlinear Equation ( 17), a large positive number M big and two variables must be added.The variables are δ et as a binary decision variable and R et as a continuous variable.The transformation is performed by replacing Equation (17) with the following equisatisfiable equations: Remark 1.This transformation results in a mixed-binary linear programming model with affine equality and inequality constraints and a linear objective function.This mixed-binary linear programming model can be solved to global optimality, guaranteeing the quality of the solution.
The optimization algorithms used to solve the above problem are Branch-and-Cut and the Simplex method.Simplex solves a continuously relaxed linear program at each step, whereas Branch-and-Cut develops a rooted tree with upper and lower bounds and terminates its search process once a feasible solution is found that performs better compared to all other solutions in the rooted tree.

Implementation
The implementation of the model aims to test the enhanced model presented in the previous section and evaluate its performance.The enhanced model of scheduling maintenance works and crews was programmed in Python 3.7 as a mixed-binary linear programming model and solved using the GUROBI optimization software (https://www.gurobi.com/).The most basic elements that must be introduced to implement the mathematical model are presented below.
Initially, it should be mentioned that the implementation concerns an ideal railway network where the traffic load of trains is of a low frequency, and each link's length is between 8 and 10 km.For this case study, the length of each link was set equal to maxl = {10}.In addi- tion, certain sets were included, such as the links of the line, L = {L1, L2, L3, L4, L5}.In terms of maintenance tasks, five were considered, of which two were for long-term/project works PA = {P1, P2}, and the other three were short-term/routine works RA = {R3, R4, R5}.The overall maintenance tasks' set is A = {1, 2, 3, 4, 5}.The maintenance planning horizon is T = 1 year or 52 weeks, and one maintenance task corresponds to a duration of one week.This does not preclude two maintenance tasks from being carried out in parallel in the same week.Additionally, K = {1, 2, 3} is incorporated to illustrate how each project is executed, as stated in the preceding section.Regarding the number of work crews, it is assumed that five crews, E = {1, 2, 3, 4, 5}, will carry out the maintenance tasks.For the work crews, the set LL = {0, 1, 2, 3, 4, 5} was formed, which includes the links of operations, adding one more for the depot.
The following tables illustrate the input data used for the current case study.First, Table 2 summarizes the frequency of routine tasks performed within a year for each link, and the planning cycle within which each routine work can be rescheduled for execution individually.Note: G al -frequencies per T scheduling period of activities a ∈ RA on link l ∈ L, where G al = 0 if activity a ∈ RA is not relevant to the link l ∈ L; F al -F al = ceil(T/Gal) is the planning cycle for each routine work a ∈ RA at each different link l ∈ L.
Table 3 presents data regarding which projects will be executed at which link and depicts the earliest and the latest possible starting time of project p ∈ PA on link l ∈ L. It further includes the duration in weeks that each project requires for each option K.
In addition, Table 4 summarizes two out of three cost scenarios that involve route cancellation and inefficient resource usage on each link for every project.The third cost is fixed at EUR 100 for each time the line is used.Another piece of important input information refers to the combinations of tasks defined for each link individually, i.e., pairs of routine works and projects.The following table (Table 5) presents the combinations used in the implementation of the model.
In addition, there were defined two parameters for the work crews.The first parameter concerned the crew availability on all links and all available tasks and took a value of Z ealt = 1, when a crew e ∈ E was available; otherwise, it took the value of 0. The second parameter concerned the distance between two consecutive links and was set constant and equal to W lq = 10 km.

Results
The implementation of the model was conducted on a conventional computing machine with an AMD Ryzen 7 5800H processor and 16 GB RAM and was solved in 24 s.The results are reported mainly in the form of produced timetables for the maintenance works and the work crews.Using the methodology described above, they refer to the scheduling of maintenance operations and the work crews.First, Figure 1 represents the scheduling of projects and routine works to be allocated to each link optimally within one year.The colored points depict the tasks required for each category at any given time.As can be seen, the model's results adhere to the different constraints imposed, including starting times, frequencies, and durations.Based on the model presented, the tasks needed to be assigned to the respective crews.They have been divided into five different work crews; in addition to the main links, there is also the link {L0}, which represents the depot.As mentioned before, if the work crews are not performing scheduled tasks they end up in the depot, and thus we know the total movement of each crew at any given time.The depot is common to all crews and is a reference point (the point where all workers must assemble and collect their maintenance equipment before performing any maintenance activity).As an example, Figure 2 depicts the fourteen maintenance tasks which were allocated to crew number one.The fundamental requirements ensure that every week, each crew must be assigned to scheduled tasks or remain stationed at the depot.Additionally, a particular task cannot be handled by two different crews.The workload of the crews is distributed in a manner that maintains relative equality among them.
assemble and collect their maintenance equipment before performing any maintenance activity).As an example, Figure 2 depicts the fourteen maintenance tasks which were allocated to crew number one.The fundamental requirements ensure that every week, each crew must be assigned to scheduled tasks or remain stationed at the depot.Additionally, a particular task cannot be handled by two different crews.The workload of the crews is distributed in a manner that maintains relative equality among them.assemble and collect their maintenance equipment before performing any maintenance activity).As an example, Figure 2 depicts the fourteen maintenance tasks which were allocated to crew number one.The fundamental requirements ensure that every week, each crew must be assigned to scheduled tasks or remain stationed at the depot.Additionally, a particular task cannot be handled by two different crews.The workload of the crews is distributed in a manner that maintains relative equality among them.The first crew returns to the depot after performing a single task from the beginning until week seven.Furthermore, the crew stays at the depot for twelve weeks, between weeks thirty-two and forty-three.Similarly, work crew number two performs sixteen tasks.It is noticed that the tasks begin in the first and second week, followed by seven weeks at the depot before the next task is assigned.Following the completion of the task, there is a six-week period of stay at the depot.Unlike the concentrated weeks spent at the depot, the period of intense work spans from the twenty-eighth to the forty-third week, with only a few weeks spent at the depot during this time.Crew number three performs thirteen maintenance tasks.Initially, it carries out two consecutive tasks and then remains at the depot for eighteen weeks.Most of the work is executed without prolonged stays at the depot, taking place between week twenty-one and week thirty-nine.During this period, seven maintenance tasks are performed at regular intervals of one week, two weeks, or none.For crew number four, it has been observed that maintenance tasks are evenly distributed throughout the fifty-two weeks.The weeks, compared to the above-mentioned crews, remaining in the depot are fewer in aggregate over several weeks.The longest period in the depot is eight consecutive weeks and occurs in weeks twenty-nine to thirtyseven.The fifth crew is found to have the largest number of allocated tasks, equal to twenty-three.However, it is observed that sixteen of these tasks relate to the routine R4 and they are distributed approximately equally across all links.As a result, there can be optimal efficiency in completing the task R4, since this crew repeats the same task at regular intervals and thus knows the task requirements and communicates and collaborates better.Finally, the crew stays in the depot for twenty-nine weeks in total.
In addition, an essential result of the model is depicted in Figure 3, as it illustrates both the total scheduling of maintenance works and their allocation to different work crews.Thus, there is supervision of the work crews that will perform the tasks.There are a total of 82 scheduled tasks on the various links, out of which three are assigned to the project P1, two to the project P2, and the remaining are routine works, with 14 for R3, 47 for R4, and 16 for R5.
The first crew returns to the depot after performing a single task from the beginning until week seven.Furthermore, the crew stays at the depot for twelve weeks, between weeks thirty-two and forty-three.Similarly, work crew number two performs sixteen tasks.It is noticed that the tasks begin in the first and second week, followed by seven weeks at the depot before the next task is assigned.Following the completion of the task, there is a six-week period of stay at the depot.Unlike the concentrated weeks spent at the depot, the period of intense work spans from the twenty-eighth to the forty-third week, with only a few weeks spent at the depot during this time.Crew number three performs thirteen maintenance tasks.Initially, it carries out two consecutive tasks and then remains at the depot for eighteen weeks.Most of the work is executed without prolonged stays at the depot, taking place between week twenty-one and week thirty-nine.During this period, seven maintenance tasks are performed at regular intervals of one week, two weeks, or none.For crew number four, it has been observed that maintenance tasks are evenly distributed throughout the fifty-two weeks.The weeks, compared to the above-mentioned crews, remaining in the depot are fewer in aggregate over several weeks.The longest period in the depot is eight consecutive weeks and occurs in weeks twenty-nine to thirtyseven.The fifth crew is found to have the largest number of allocated tasks, equal to twenty-three.However, it is observed that sixteen of these tasks relate to the routine R4 and they are distributed approximately equally across all links.As a result, there can be optimal efficiency in completing the task R4, since this crew repeats the same task at regular intervals and thus knows the task requirements and communicates and collaborates better.Finally, the crew stays in the depot for twenty-nine weeks in total.
In addition, an essential result of the model is depicted in Figure 3, as it illustrates both the total scheduling of maintenance works and their allocation to different work crews.Thus, there is supervision of the work crews that will perform the tasks.There are a total of 82 scheduled tasks on the various links, out of which three are assigned to the project P1, two to the project P2, and the remaining are routine works, with 14 for R3, 47 for R4, and 16 for R5.The seemingly high number of Routine R4 tasks is contingent on the frequency of tasks previously specified and validated based on the actual number of times they have been requested for execution.Similarly, the projects according to their possible starting time and duration in Table 3 are optimally allocated and verified.Project P1 has been executed with k= 1 in the twelfth to fourteenth week, P2 with k = 1 in the second week, and in the fifth week with k = 3.Furthermore, the pairs of combined tasks resulting in different links in the same week are: {[R3, R4], [P2, R3, R4], [R4, R5], [P2, R4], [P1, R4], [R3, R4, R5]}.According to the parameters we have defined, no task is performed on the same link simultaneously; rather, it is scheduled on different links, which helps to mitigate the track possession cost overhead.Additionally, the distribution of crews appears to be carefully planned, ensuring a balanced workload across all teams, and avoiding any undue burden on a particular crew.Finally, the scheduling of crew movements is optimized to minimize costs effectively.
In the following figures (Figures 4 and 5), a comparison between the results of the baseline model [24] and our proposed model is illustrated.In the study of Budai and Dekker [24], only the first twenty weeks of planned maintenance tasks are given; thus, for comparison reasons, we have adjusted our results table based on the results from the baseline model.The numbering of routine works here is different, with {R1,R2,R3} routine works of the baseline model corresponding to {R3,R4,R5} in our model.According to the parameters we have defined, no task is performed on the same link simultaneously; rather, it is scheduled on different links, which helps to mitigate the track possession cost overhead.Additionally, the distribution of crews appears to be carefully planned, ensuring a balanced workload across all teams, and avoiding any undue burden on a particular crew.Finally, the scheduling of crew movements is optimized to minimize costs effectively.
In the following figures (Figures 4 and 5), a comparison between the results of the baseline model [24] and our proposed model is illustrated.In the study of Budai and Dekker [24], only the first twenty weeks of planned maintenance tasks are given; thus, for comparison reasons, we have adjusted our results table based on the results from the baseline model.The numbering of routine works here is different, with {R1,R2,R3} routine works of the baseline model corresponding to {R3,R4,R5} in our model.From the above figures, one can observe that most of the scheduled activities are planned for the link L1 in both approaches.
Overall, in comparison to the base model of Budai and Dekker [24], the objective function has been extended.This is the case since different values have been included for certain parameters, (e.g., duration of projects, pairs of combined tasks, scheduling period of routine tasks).To conduct a comparative analysis with the base model, our model was solved while excluding the work crews' impact on the allocation of maintenance tasks.The objective was to maintain identical conditions to the base model, with only the modifications specific to our approach considered.The maintenance work's total cost is EUR 8333, comprising EUR 8200 for track possession during each operation and EUR 133 for route cancellations and resource underutilization.In the base model, these costs were EUR 5700 and EUR 165, respectively.This variation from the implemented use case in this pa- From the above figures, one can observe that most of the scheduled activities are planned for the link L1 in both approaches.
Overall, in comparison to the base model of Budai and Dekker [24], the objective function has been extended.This is the case since different values have been included for certain parameters, (e.g., duration of projects, pairs of combined tasks, scheduling period of routine tasks).To conduct a comparative analysis with the base model, our model was solved while excluding the work crews' impact on the allocation of maintenance tasks.The objective was to maintain identical conditions to the base model, with only the modifications specific to our approach considered.The maintenance work's total cost is EUR 8333, comprising EUR 8200 for track possession during each operation and EUR 133 for route cancellations and resource underutilization.In the base model, these costs were EUR 5700 and EUR 165, respectively.This variation from the implemented use case in this paper arises from the different combined pairs of tasks, which directly influence the track possession cost.Since more pairs of tasks cannot be simultaneously performed on the same link in this scenario, tasks are scheduled in other weeks, resulting in increased costs.The route cancellation cost, which has seen a slight reduction, is significantly influenced by the duration of projects taken at a different price compared to the base model.Additionally, the manner in which specific tasks are optimally performed also contributes to this cost.The model's sensitivity to cost is crucial and highly relevant for railway operators.Simultaneously, the cost of work crews for executing the tasks is EUR 63,740, and this specific cost is weighted at 1 EUR per kilometer using the parameter in the W lq model.To sum up, maintenance tasks that included work crews in the objective function during the solution process resulted in varying execution times.This observation highlights that the model required the simultaneous optimization and scheduling of maintenance tasks and work crews to achieve the best outcomes.
Comparing our approach with additional studies, Lake et al. [29] presented a model designed to schedule track maintenance activities in the short term, once both the train schedule and maintenance plans have been established.The model's primary aim is to arrange the maintenance tasks and allocate maintenance crews to them, all while striving to minimize the overall maintenance expenses.Furthemore, the formulation permitted the assignment of various crews to the same task at various moments and took into account the specific time needed for setting up and concluding each instance of the activity.The model was resolved through the implementation of a two-stage heuristic approach.In the first stage, a feasible solution was generated, and in the second stage, simulated annealing was employed.Our study further extends the aforementioned study, also including long-term maintenance activities (projects).
On the other hand, Buurman et al. [35] focused on optimizing the maintenance schedule for both railway operators and maintenance contractors considering hindrance and flexibility for both stakeholders.They formulated the problem as a multi-objective optimization problem (MOOP) with the first objective function minimizing the cost caused by hindrance for the train operators, and the second objective function maximizing the amount of scheduled slots in the maintenance schedule by maximizing the value of the maintenance slots above the maintenance demand.However, our research extends this study further by assigning a set of work crews to the maintenance tasks and minimizing their total costs.

Conclusions
The purpose of the present study was to introduce an optimization model designed for railway line preventive maintenance operations within a one-year timeframe.The aim was to enhance decision-making processes concerning railway line maintenance and the efficient allocation of work crews, ultimately leading to cost reduction.To achieve this, a mixedbinary linear mathematical program was developed and solved using the branch-and-cut algorithm of the GUROBI optimization software.While certain foundational elements of the model were based on existing input data, modifications and new data were incorporated.These additions pertained to the evolution of work crews in terms of integration with sets and parameters, as well as the necessary constraints to ensure functionality and adherence to requirements.Furthermore, variations were made to the baseline model of Budai and Dekker [24] that did not consider work crews, including frequency, duration, and task pairs, to analyze cost sensitivity.In the final step, a case study implementation was conducted, resulting in the annual maintenance schedules for tasks and work crews, along with the total cost of both.The results included concise maintenance scheduling tables to

Table 4 .
Route cancellation and inefficient resource usage costs.

Figure 2 .
Figure 2. Maintenance tasks allocated to Crew Number 1 (in green color).

Figure 2 .
Figure 2. Maintenance tasks allocated to Crew Number 1 (in green color).

Figure 2 .
Figure 2. Maintenance tasks allocated to Crew Number 1 (in green color).

Figure 3 .
Figure 3. Scheduled maintenance tasks (in color) and crew allocations.

Figure 3 .
Figure 3. Scheduled maintenance tasks (in color) and crew allocations.

Table 2 .
Routine tasks: frequency and planning cycle.

Table 3 .
Projects: identification, earliest and latest starting time, and duration.

Table 5 .
Combinations of routine works and projects.