A GRASP algorithm for the bus crew scheduling problem

This paper proposes a GRASP approach for solving the Bus Crew Scheduling Problem (BCSP) to find high-quality solutions within short computing times. The BCSP described the process related to the assignment of drivers and conductors to a bus company's regular daily operation of a mass transit system, seeking to minimize the cost of operation and, at the same time, the improvement of the working environment by considering the satisfaction of the drivers with the assigned shifts. The BCSP has drivers in charge of covering the demand for shifts, with an assignment that contains several constraints, such as minimum and maximum work blocks, minimum rest days, and shift sequences that must not be assigned. The former GRASP algorithm is proposed with a constructive procedure, a solution repair procedure, and two local search operators. Classical instances from the literature have been adapted for the shift assignment problem by adding a satisfaction variable. Besides, the proposed approach has been tested for a real company operating articulated and feeder vehicles. The results show that the satisfaction function adds value to the assignments, substantially improving the work environment and generating favorable results in terms of time and quality of the solution.


Introduction
Public passenger transportation is a determining factor in the city's way of life.A good transport system provides comfort in the mobility of people and becomes one of the main measures of quality of life.In this sense, public passenger transport plays a fundamental role in decision-making from a social, economic, and environmental point of view.Indeed, planning the transport network is extremely important for providing quality service and for the transport operator and the costs it assumes.Planning is complex and challenging, so this process is generally split into three phases covering strategic, tactical, and operational decisions.Strategic decisions are related to the design of the transportation network.Tactical decisions consider the set of frequencies and schedules of the transport network.Operational decisions are related to the problem of vehicle scheduling, shift scheduling, and shift assignment to drivers.However, each problem associated with each public passenger transport planning stage has been extensively studied because they are complex problems (mathematically and computationally).All these problems are classified as NP-hard problems.Therefore, each problem must be solved separately and sequentially (Byrne, 1973).This paper is related to crew scheduling for transportation public belonging to the operational decisions.Whenever a bus is in operation, a driver must be assigned to it.Sometimes, the waiting time of a bus could be considered, for instance, the arrival of one journey and the departure of the next.However, when a crew leaves a bus, a relieving crew must be available to take it over (Smith, 1986).For the crew scheduling problem, it is necessary to consider that a crew leaves the bus to take a break or finish their duty, and another crew must take over the bus operation just starting their duty or having already worked on another bus (Smith, 1986).The Bus Crew Scheduling Problem (BSCP) is an integral part of the logistic management of bus planning and scheduling.The BSCP involves assigning staff (crew) to different scheduled bus services considering many resources that must be managed, including the complexity of allocating crew shifts, satisfaction level, unpredictability of traffic, crew compatibility, and availability-operational and practical constraints of the BSCP.Besides, the BSCP considers unpredictable events such as late crew sickness while on duty or absenteeism without prior notice (Cheng & Chang, 1999).When a specific unpredictable event occurs, changes must be made to the schedule or resource allocation.The times and crew schedule will remain the same, and only reallocation or reassignment is performed to cover the schedule (Shibghatullah et al., 2006a).This paper proposes a GRASP approach for solving the operational planning stage, specifically the BSCP.The problem is solved because one of the main costs assumed by public passenger transportation companies is the operating costs related to the payroll of their drivers.This paper seeks to present an alternative solution within the context of articulated and feeder vehicle operators of massive transport systems (INTEGRA S.A.) and to test the effectiveness of the proposed methodology by adapting instances of Musliu (2006) addressing a similar shift assignment problem.The INTEGRA S.A. problem consists of a set of shifts with a particular demand that must be assigned to a group of drivers, and the drivers have a minimum and maximum number of working days per week and a minimum number of rest days.In addition, there are different types of shifts with different schedules, which must be reviewed before generating the shift assignment for the next day.
The rest of the paper is organized as follows.Section 2 shows the literature review related to the bus crew scheduling problem.Section 3 introduces the crew-scheduling problem for bus drivers (BSCP) in general terms and elaborates on constructing a mathematical model.Section 4 describes the proposed GRASP algorithm for solving the considered problem.Section 5 provides the computational experiments for the proposed approach.Finally, Section 6 gives conclusion remarks and suggestions for future research.

Literature Review
Several early works dealing with the crew scheduling problem, such as those proposed by Young & Wilkinson (1966), have proposed mathematical formulations and heuristic methods.The most natural formulation of the crew scheduling problem is the set covering or partitioning problem (Smith, 1986).Indeed, a large number of possible duties are performed, from which a crew schedule is selected covering all the shift works of the bus schedule at least once (set covering problem) or exactly once (set partitioning problem) (Smith, 1986).Smith (1986) studied a bus crew scheduling problem by three British bus companies.The problem is formulated as mixed integer linear programming using an extension of the set covering the problem and generating a large set of possible duties, minimizing the total cost.Some heuristic approaches are considered within the framework, reducing the set covering problem to a manageable size while still allowing good-quality schedules to be compiled.A branch and price algorithm for a real-life case of a BSCP has been proposed by Fournier (2009).This algorithm can solve a problem with 300 tasks in less than an hour, and instances with 1000 tasks can usually be solved in a few hours.Shibghatullah et al. (2006a) model the bus crew scheduling problem with agents and study the feasibility of using the crew reassignment process to cope with unpredictable events.This work uses a Gaia methodology (Wooldridge et al., 2000;Zambonelli et al., 2003) for analyzing and designing agent-based models.Shibghatullah et al. (2006b) study the unpredictability problem of the BCSP and investigate how companies currently manage their schedules.This work proposes a set of requirements for a dynamic crew scheduling system that can reassign crew in real time given unpredictable events such as lateness for duty, sickness on duty, or crew absenteeism without prior notice.Kang et al. (2019) studied the BCSP considering mealtime windows for a single public transport bus route.Three Integer Linear Programming (ILP) models enable bus operators to solve their bus driver scheduling problems by directly invoking an available optimization solver such as CPLEX.A valid inequality approach that can generate valid cuts incorporating the CPLEX has been introduced.Cárdenas-Parra ( 2019) developed a mathematical model for the considered problem of this paper.However, this model does not consider the satisfaction of the drivers, showing in general feasible solutions to the problem, but with low satisfaction for the employees to whom the shifts are assigned, a situation that in the medium or long term may imply problems with the performance and permanence of the workers.Most proposed approaches are based on mathematical programming or hybrid approaches (combining heuristics and mathematical models) (Fores et al., 1999;Fores et al., 2002;Chen & Shen, 2013;Masbah et al., 2019).However, these approaches generally can solve small -to medium-sized instances with some limitations (Kwan et al., 2001;Li & Kwan, 2003).
Metaheuristic algorithms have found near-optimal solutions to the BSCP, considering large-scale problems and practical constraints.According to Song et al. (2015), metaheuristic approaches have three advantages: i) they are very efficient in searching large solution space, ii) they can find rapidly feasible solutions, and iii) they have their own methodical and strategic structure.Tabu search approaches for the BSCP have been proposed by Chen & Niu (2012a), Chen &Niu (2012b), andShen &Kwan (2001).Chen & Niu (2012a) propose an approach for solving the BCSP considering early, day, and late duty modes with time shift and work intensity constraints.Besides, constraint with the least crew number of a specific duty has also been considered.An integer 0-1 model is proposed to minimize the expense of the total idle time of the crew for a circle bus line.Besides, a tabu search approach has been proposed to solve the problem.The same authors (Chen & Niu, 2012b) consider impartiality constraint on the BCSP, which is based on assurance to meet the time shift of trips and work intensity for the crew and establishes a crew scheduling model to minimize the total idle time.Also, a tabu search procedure is presented to solve the problem.Shen & Kwan (2001) propose a tabu search-based approach called HACS to handle the BSCP with windows of relief opportunities.
Genetic algorithms (GAs) are another prominent approach to solving major class crew scheduling problems.These algorithms have been proposed by Song et al. (2015).Song et al. (2015) propose a genetic algorithm (GA) with gene recombination for the BSCP.This work introduces a new method without using the potential shift set; instead, satisfied shifts generated from gene recombination in a genetic algorithm are employed.Experiments on real-life instances from Beijing Bus Group show the efficiency of the proposed approach.Ant colony algorithms for the BSCP have been proposed by Forsyth & Wren (1997), Ghoseiri &Morshedsolouk (2006), andMazloumi et al. (2012).Finally, Simulated Annealing approaches for the BSCP have been introduced by Costa et al. (2013).
A Variable Neighborhood Search for a real-world case of BCSP has been proposed by Ma et al. (2016).This algorithm has been tested on a case study of two depots of the Beijing Public Transport Group.The results show that the former algorithm can reduce total driver costs by up to 18.1%, implying that the VNS algorithm may be a good optimization technique to solve the BCSP.Boyer et al. (2018) study the BCSP faced by urban bus transport agencies that must assign their resources (vehicles and drivers) to cover timetables generated at the tactical level.A mixed-integer linear programming model and a variable neighborhood search for this problem have been proposed.
An integrated framework considering the scheduling of buses and crew for local transportation public has been proposed by Ciancio et al. (2018).In the BSCP problem, each trip is assigned to a driver.The solution is performed with a classical sequential approach.This solution is then modified by changing the allocation of trips on vehicles in order to minimize the combined objective function.Perumal et al. (2021) introduce the integrated vehicle and crew scheduling problem for electric buses.An adaptive large neighborhood search that utilizes branch-and-price heuristics is proposed to tackle the considered problem.The proposed method is tested on real-life instances from public transport companies in Denmark and Sweden that contain up to 1109 timetabled trips.Moreno et al. (2019) propose a two-phase heuristic algorithm to solve the BCSP of a Megabus Bus Rapid Transit System.In the first stage, a division of the original schedules is performed using a recursive algorithm based on dynamic scheduling.In the second stage, work shift construction based on Fig. theory is performed using a pairing algorithm (i.e., matching).Öztop et al. (2017) consider a real-life BCSP determining the optimal number of different types of crew members with a minimum cost covering a given set of tasks regarding working and spread time limitations.Each driver has a spread time limit from the start time to the end time of the shift, including the idle times.Additionally, a driver cannot exceed the maximum total working time limit.According to the literature review, we found different methodologies already developed for the BSCP.However, the satisfaction of the drivers has yet to be considered for the scheduling tasks.Therefore, our paper considers a GRASP method for the BSCP, considering the satisfaction of the drivers.This variable generates a stabilization of the staff and avoids the rotation of the crew.Indeed, this situation could be reached by generating a cyclical schedule that repeats at a specific time for a group of workers, complying with a matrix of requirements and constraints.Among the conditions to be met are the availability of employees to work the scheduled hours, the number of hours worked, the number of days off, the number of consecutive shifts, and specific constraints, such as the prohibition of certain consecutive shift assignments.This fact allows the companies to plan workers' schedules efficiently and effectively.

Problem description
Due to the combinatorial nature of the BSCP, an exact method for large instances (real-size instances) may have a high computational cost.Therefore, the main contribution of this paper is to find shift assignment strategies that allow obtaining feasible solutions within a reasonable time while maximizing driver satisfaction using an approximate optimization algorithm so that the problem can be applied or adapted to any real situation.

Related work
Most of the models used for the rostering solution are based on the Set Covering model proposed by Dantzig (1954) and its variations.Additionally, there is a strong relationship with the Generalized Assignment Problem () model proposed by Martello and Toth (1992), where  items are assigned to  units so that the total available resources are not exceeded, and the sum of the penalties related to the assignment are minimal.The formulation goes very well in parallel, but for a real situation, it would have to be adapted to the requirements of the company, and additional constraints would be added to the model: subject to: (1) The objective function (1) considers the minimization of assignment costs considering the binary decision variable  (which takes the value of 1 when element  is assigned to a unit ) to a cost matrix  .Eq. ( 2) refer to the fact that only one element  can be assigned to a unit , and all elements are assigned.Eq. ( 3) is associated with a matrix  , where the number of resources used is represented, and the logic is that the resources spent are not greater than the available resources of each unit.
=   ∈ subject to: (5) We can observe the general set covering model of Dantzig (1954), which aims to cover all the rows of the matrix  using the same cost of subsets of the columns.Eq. ( 5) considers the objective function where the cost associated with the selected columns is minimized and Eq. ( 6) restricts the coverage of each of the rows to at least one column.

Mathematical formulation
We proposed a mathematical model based on the formulation proposed by Cárdenas-Parra (2019) for the BCSP but considering the satisfaction level of the drivers.We have tested the proposed model on instances of Musliu (2006) with constraints similar to the considered problem.The rostering model is mathematically formulated as an integer linear model with a three-subindex decision variable and a two-subindex auxiliary variable:

𝑖
The objective function ( 7) considers the satisfaction level of the drivers.This satisfaction level can be represented by quantifying the number of favorable shifts for the driver since many of them have other constraints such as study, the time they would like to dedicate to their family or other activities.The objective function is defined in terms of the shifts the drivers dislike and the total shifts.A weight of 1 in the objective function was assigned to all shifts assigned to a driver comfortable with the shift and a weight of -1 if the driver was uncomfortable.In this case, a score is calculated from the satisfied and dissatisfied, as explained above.It is divided by the maximum number of satisfied drivers that we could hypothetically have, where all shifts are assigned to drivers who like the shift.In addition, the assumption was made that the shifts to which the driver is indifferent do not add or subtract from the objective function.However, it could be an interesting topic for further research: How much impact does indifference have on satisfaction?We can find cases where there is much indifference with little dissatisfaction and cases with much satisfaction but also much dissatisfaction.Note that we could find such solutions with the same level of satisfaction but need to know which one is better.Constraints (8) limit the total number of shifts that a driver could make.Constraints (9) and (10) limit the maximum time per day and the maximum number of days to be assigned a driver, respectively.Equations (11) determine the number of workers required per day.Constraints (12) ensure the minimum number of days to be assigned to a driver.Eq. ( 13) generate the relationship between the variables of the assignment and the number of shifts.Finally, constraints ( 14) are related to the nature of the variables.

Proposed methodology
A GRASP-based methodology is proposed with a constructive procedure, a solution repair mechanism, and two local search operators (INSERT and SWAP operators) for the BSCP.The constructive procedure relaxes the constraint of the maximum working days that can be assigned to the driver.Then, it applies a repair and balancing strategy, thus allowing the exploration of promising solutions.The constructed solutions (repaired and balanced) are improved through an exhaustive local search using two neighborhoods.The balancing mechanism reallocates the shifts to level the workload and recover the feasibility of the solution in terms of the relaxed constraint.

GRASP algorithm
The proposed GRASP algorithm consists of two phases: the constructive and the local search phases, for this it uses the  parameter that allows us to calibrate the number of times that both phases will be repeated (line 2).First, it checks if the  parameter has already exceeded the limit of solutions without repair and if no feasible solution has been found, it turns on the construction repairer (lines 3 and 4).Then the shifts are assigned using the constructive algorithm (line 5).If the constructive assignment is promising, it enters the improvement phase (line 7) where the result of the assignment is validated to see if it can improve the incumbent (lines 8,9,10,11).To do so, the solution must be checked for feasibility considering the number of assignments made and the number of shifts (line 6).
Algorithm 1 GRASP Parameters: : Total number of iterations, ℎ: size of the restricted list of candidates, : Proportion of iterations during which no repair is performed.
Input: Dict : dictionary with list of available drivers per day, Dict ℎ: dictionary with list of prohibited drivers according to the day and shift type Output: Dict t_incumbent: Shift assignment dictionary, List worked_incumbent: List of days worked by driver, Integer obj_incumbent: , ,  ←  ℎ,  6.

Constructive Algorithm
The constructive algorithm is divided into three phases: a pseudo-random procedure (line 1), a repair process (line 3), and a balancing procedure (line 5).As the construction relaxes the constraint of maximum working days, the idea is to make a restricted list of candidates based on the number of days the drivers have worked as a strategy to narrow down the constraint and balance the shift allocation in a certain way.With these lists, drivers are randomly selected to be assigned to shifts, checking that the other restrictions are met.Then there is the repair phase, which is only performed if it is activated; there are no shifts to be assigned, and at least a percentage of the shifts have been assigned (line 2).In this phase, we review all the drivers that can be assigned to the missing shifts and assign the first one found, all this in order not to lose the process of some solutions that are close to being feasible.Finally, it is verified that the solution is feasible to move on to balancing (line 4), where the workload is reviewed and shifts already assigned to other drivers are reassigned to balance the workdays until a solution is found that not only meets the maximum workload constraint but is also feasible.It should be noted that some solutions go through the repairer and balancing and are still not feasible because they are not suitable for balancing.
, , , ℎ ← () The pseudo-random algorithm checks if any assignment has been made each iteration as a stop condition (line 1).The idea is that it runs through the shifts several times because sometimes, the random choice of the driver is not feasible.Each iteration starts running through the shifts (line 3) and checks if the shift has already been assigned if it has a value of -1 (line 4).It then generates the restricted list of candidates from the available drivers on the day of the shift.Having the initial restricted list of candidates, it generates three other lists categorizing which drivers like the shift, which are indifferent, and which do not like the shift, then one of the three lists is chosen as the restricted list of candidates (line 5).The criteria for choosing the list changes as it finds no drivers to assign to shifts until it reaches the list of those who do not like it (lines 11-13).The list is checked to see if it contains any drivers to choose one randomly (lines 6-7).Before assigning the chosen driver to the shift, it should be checked that it is not prohibited for the type of shift to be assigned that day (line 8) to subsequently assign it (line 9) and update the lists of prohibited, available by day and shifts assigned by the driver (line 10).When it no longer finds drivers to assign to shifts, the algorithm stops.In summary, it determines which of the three lists to use, randomly selects drivers, and then assigns them to shifts.
Algorithm 3 pseudo-random construction Parameters: ℎ: size of the restricted list of candidates Input: Dict : dictionary with list of available drivers per day, Dict ℎ: dictionary with list of prohibited drivers according to the day and shift type Output: Solution , ,  1.   =  2.  =  3.
=  + 1 The detailed pseudocode of the algorithm that constructs the restricted list of candidates for the pseudorandom construct is presented below.First, the maximum and minimum days worked to generate the general restricted list of candidates are found (lines 1-5).Then, the general candidate-constrained list is generated (lines 6-8).Finally, splitting into three lists according to the drivers' preferences is performed (lines 9-15).

Algorithm 4 Restricted list of candidates (RCL)
Parameters: ℎ: size of the restricted list of candidates, : Type of shift to be assigned, : Dictionary with list of available drivers per day, : List of shifts assigned per driver, Input: Dict ℎ: dictionary with list of prohibited drivers according to the day and shift type Dict : dictionary with tuple list of values of the shift type liked and disliked by each driver.Position 0 contains the type of shift liked and position 1 the type of shift disliked.
Output: Solution : List containing 3 lists with drivers suitable for shift assignment, the first one containing drivers who like the shift, the second one containing drivers who are indifferent to the shift and the last one containing drivers who do not like the shift.After the initial construction, it is verified that the solution is suitable and that there are no unassigned shifts.To do so, it enters the repair phase, where there are two essential criteria to start with the repair.First, the repair parameter must be valid, and second, the number of assigned shifts must be less than the total number of shifts and greater than the percentage of unassigned shifts (line 1).The percentage of minimum assignments to repair the solution was determined as the same parameter alpha of the RCL size.If this decreases, it is expected that more solutions should be repaired and, therefore, this percentage as well.The logic of the repair is to go through the available drivers for the day the shift that has yet to be assigned is needed and choose the first one that meets the conditions in terms of no constraint being breached (lines 5-7).In this case, it will not be considered whether the driver likes or dislikes the shift.After being assigned, the lists of banned, available per day, and assigned shifts per driver will be updated (line 8).If no suitable driver is found, the solution will not be repaired to avoid wasting computational time on that solution (lines 9-10).
Algorithm 5 Repair procedure Parameters: ℎ: size of the restricted list of candidates, : Parameter to activate the repairer Input: Dict : dictionary with list of available drivers per day, Dict ℎ: dictionary with list of prohibited drivers according to the day and shift type ℎ  [] 6.

𝒃𝒓𝒆𝒂𝒌
The last step of the construction corresponds to the balancing stage, where the workload is leveled to meet the constraint of maximum working days that can be assigned to a driver.The algorithm works similarly to the pseudo-random construction in the sense that it runs through the shifts several times until no more changes have been made and has an additional criterion that all shifts must be assigned (line 1).The logic of the algorithm starts from three important lists,  contains all the drivers that have not reached the maximum workload,  contains the drivers that already have the maximum workload, and  contains the drivers that exceed the maximum workload.It scrolls through the shifts until it finds a shift that is on the  list (llines3-5), then randomly chooses a driver from the  list (line 6) and verifies that it is suitable for assignment to the shift and meets all the constraints (line 7).After the driver is assigned (line 8), the , , and  lists are updated, as well as the prohibited, available per day, and assigned shifts per driver lists (lines9-10).
Algorithm 6 Balancing Input: Dict : dictionary with list of available drivers per day, Dict ℎ: dictionary with list of prohibited drivers according to the day and shift type, List : List containing all drivers who have not reached the maximum workload, List : List containing the drivers who already have the maximum workload, List : List containing the drivers who exceed the maximum workload 6. ℎ = .() 7.

Local Search Algorithm
Once we have an initial feasible construction, we can improve it through two operators (INSERT and SWAP).The first one consists of going through the shifts and assigning different drivers to those who are currently assigned to improve driver satisfaction.The second operator consists of swapping between two shifts the drivers that are assigned in order to see if both drivers or one of them can be more satisfied.An explanation diagram of both is shown below:

Computational results
This section is divided into two parts.The first part presents the calibration of the parameters along with the performance of the GRASP algorithm in terms of the percentage of successful, unsuccessful, repaired, and unrepaired solutions.The second part compares the obtained results with the work proposed by Cárdenas-Parra (2019).The solution approach was coded in Python 3.8.3 and was executed on a computer with an Intel(R) Core (TM) i7-8750H CPU 2.20 GHz using a Windows 11 operating system and 16 GB of RAM.

Calibration of parameters and performance of the proposed methodology
Recall that the three calibration parameters of the GRASP algorithm are  which is the number of iterations our algorithm will perform, ℎ which is the size of our restricted list of candidates and  which is the percentage of iterations from where it will start repairing solutions in case it has not found any feasible one. was calibrated under the assumption that, although we do not want it to repair all the time due to computational time issues in case it is required it should be 50% or a little more.For the number of iterations, we took more into account the execution time, increasing the instance size increases the computational effort.The largest instance has a size of 595 shifts and takes on average approximately ten seconds, considering that the company's instance has a size of 323 shifts, we can see in the Fig. that it would take approximately two seconds to execute.Although we could consider increasing the number of iterations for the smaller instances, it does not generate a great added value since the performance was quite good and the variation between 10-1000 iterations (increasing every 100) was minimal for the small instances.

Deviation
The alpha that defines the size of the restricted list of candidates was calibrated.In line with the logic of the algorithm, which consists of relaxing the workload constraint, the alpha should not be decreased too much since the constraint would be narrowed down again and the exploration of solutions would be too short.This parameter should be above 0.5 but at the same time we want to give a certain degree of restriction so that the solutions are not extremely unbalanced.For this reason, the calibration was focused mainly on the values of 0.6 and 0.9.For small instances, we found very good results with a value of 0.7 but the result with large instances was not favorable because they were not given enough freedom to explore and required to be repaired all the time, this is computationally expensive and decreases the quality of the solutions.In this case, we sought to find an alpha where the largest instances were given enough freedom to explore.It was found that the optimal alpha is 0.84 since all instances have successful solutions and the repair percentage is minimal.It can also be observed that the rate of successful solutions of the proposed methodology is quite high with the parameters used.The repair strategy was only activated for the instance with 213 shifts.This indicates that for all of them, feasible solutions are being found approximately 80% of the time.Likewise, we can observe the computational effort and the percentage of improvement of the objective function of the constructive algorithm and the local search, where we observe that the local search has a computational cost almost more than three times that of the constructive one within the whole algorithm despite the complexity of the constructive one.The improvement of the objective function behaves oppositely; we observe that most of the impact comes from the constructive algorithm.However, as the instance grows, we see that it starts to be more significant in the local search for the improvement of the solution.

Comparison of the proposed methodology
A comparison has been performed with the work proposed by Cárdenas-Parra (2019) to validate the performance of the GRASP methodology.The algorithm was run 30 times for each instance to make the of the indicators balance and thus carry out a better analysis of their behavior.Regarding feasible and complete solutions delivered, the result of the proposed methodology outperformed the linear model by 93% versus 57%, for neither proposal was a feasible solution found for the ninth instance.The difference is that the linear model does not find a feasible solution for two other instances and delivers three incomplete feasible solutions.Another point of comparison is driver satisfaction.It is important to mention that the linear model did not have the objective of maximizing satisfaction in any way.However, it shows us that it is possible to give added value to the assignment of driver shifts without violating the company's restrictions and requirements.In the linear model, the number of satisfied, indifferent, and unsatisfied employees is balanced.However, the difference is evident when we see how, on average, it is possible to obtain a percentage of satisfied employees of 85% and, in many cases, a percentage of satisfied employees of over 90%.The computing time of the proposed methodology is comparable with the work proposed by Cárdenas-Parra (2019) and, in the case of small instances, does not exceed 1 second.A clear difference in satisfaction was found between the two methods for the INTEGRA S.A. solution, as shown below: Finally, we show the behavior of the objective function of the best solution for the company INTEGRA S.A. (see Fig. 5) and for the large instance of Musliu (2006), which has 595 shifts to be assigned (see Fig. 4).The solution obtained for the company is quite efficient and involves little work for the methodology compared to the other.It can be seen in Fig. 4 that part of the solution is infeasible and corresponds to the constructive algorithm, where the aim is to explore solutions and then recover feasibility thanks to the relaxation of the constraint and the balancing strategy.However, in Fig. 5, we do not observe this behavior because, with the current constraints of the company, workers have enough free time, and a shift configuration where everyone is satisfied is possible.It would possible to meet all requirements with fewer employees than currently.The alternative presented is similar to the model presented by Cárdenas-Parra (2019) in speed and usefulness in terms of possible solutions found.However, the methodology proposed here gives added value to the solution of the problem of shift assignment to drivers in terms of staff satisfaction, generating solutions of better quality and welfare to the company's workers, an algorithm that will also indirectly help the company to minimize staff turnover.

Concluding Remarks
This paper proposes a GRASP approach for solving the Bus Crew Scheduling Problem (BCSP) to find high-quality solutions within short computing times.The BCSP described the process related to the assignment of drivers and conductors to a bus company's regular daily operation of a mass transit system, seeking to minimize the cost of operation and, at the same time, the improvement of the working environment by considering the satisfaction of the drivers with the assigned shifts.The proposed methodology resulted in an improvement in solution generation compared to previous work dealing with the same problems, finding a more significant number of feasible and complete solutions for the driver shift assignment problem.The GRASP algorithm proved to be 36% more efficient with a minimal difference in computational effort.As for the satisfaction maximization approach, it can be concluded that it implies a relatively significant improvement in terms of work environment, it would be interesting to implement it in the company to observe the benefits that this can bring in the long term and to study other factors that can be added and taken into account in the calculation for the achievement of satisfaction.This paper opens the door to a new work proposal in which we will seek to improve this satisfaction function to make it more robust and delve into the information about the impact that brings a solution of this type compared to one that only seeks to comply with the restrictions and minimum parameters of a shift assignment in companies that have established their operation in this way.Finally, the algorithm developed is a flexible methodology that can be implemented not only in the company INTEGRA S.A. but also in other sectors of the industry where companies use shift assignment for their workers, such as health personnel in hospitals, workers in companies that provide public cleaning services or security service workers.It is interesting to observe how the calculation of satisfaction differs and changes depending on the sector of interest and how feasible it is to work it as proposed in this paper.
Recently,Xue et al. (2023) andEsquivel-González et al. (2023) have proposed methodologies for solving crew scheduling problems in metro and public bus transportation, respectively.Xue et al. (2023) consider the nature of the work of metro crews to study the equitability of crew planning.The train running diagram is split into segments by the duty points, including shifting stations, depots, and parking lots.Esquivel-González et al. (2023) consider the BSCP seeking to serve the most significant number of passengers possible instead of minimizing the schedule cost.A model and strategies for solving the problem are introduced, and clustering and Reoptimization procedures are proposed.