Abstract
Public transit providers are facing continuous pressure to improve service quality and reduce operating costs. Bus driver scheduling is among the most studied problems in this area. Based on this, flexible and powerful optimization algorithms have thus been developed and used for many years to help them with this challenge. Particularly, reallife large and complex problem instances often need new approaches to overcome the computational difficulties in solving them. Thus, we propose a column generation based hyperheuristic for finding nearoptimal solutions. Our approach takes advantages of the benefits offered by heuristic method since the column selection mode is driven by a hyperheuristic using various strategies for the column generation subproblem. The performance of the proposed algorithm is compared with the approaches in the literature. Computational results on reallife instances are presented and discussed.
1. Introduction
The bus driver scheduling problem (BDSP) is an extremely complex and important part of the operational planning process of transport companies. Efficient schedules can make significant monetary savings for transportation operators since driver wages are a very large cost element. Furthermore, good crew planning ensures a high job satisfaction.
The process of bus driver scheduling involves partitioning the vehicle work into a set of legal driver shifts that should reflect the operator’s definition of efficiency [1]. While the constraints according to labor rules and requirement differ from country to country, even company to company, the evaluation criteria and objectives may differ as well.
A great deal of research efforts on this problem has been made in this area since the 1960s. Many scientific approaches and systems to bus diver scheduling have been reported in a series of workshops [2–6]. Useful review and relevant review to these approaches have been given by [7]. Among these planning and scheduling processes, driver scheduling remains to be a challenging problem, and new approaches have been constantly sought to solve this problem [8].
Column generation is introduced by [9] and has been widely used in the past several years for problems in transportation, scheduling, and combinatorial optimization. The approach requires one to decompose the original problem into two problems, which are termed restricted master problem and subproblem, respectively. In the literature, column generation has been effectively applied to solve crew scheduling and other related problems (see [9–11]), particularly for realworld problems of bus driving scheduling (see [12]). However, it is wellknown that one of the drawbacks of column generation is the socalled “tailingoff” effect: a lot of iterations that do not significantly modify the optimal value of the restricted master problem (RMP). Although successfully used, this method suffers from slow convergence that somewhat limits its efficiency and usability [13]. Meanwhile, hyperheuristic is an emerging methodology in search and optimization [14]. Instead of using exact methods in most column generation, we propose a column generation based hyperheuristic method for achieving good quality solutions in short running time.
This paper is organized in the following way. In Section 2, we give a problem definition of bus driver scheduling problem. A discussion of the proposed approach is given in Section 3. In Section 4, comparative results using reallife instance, some of which are large instances, are given. Finally, we conclude in Section 5.
2. The Bus Driver Scheduling Problem
2.1. Terminology
Before scheduling the drivers tasks, the vehicle routes have to be constructed. A trip is a movement of a vehicle in a given path. It is the basic unit of service in the sense that each trip must be operated by a single vehicle. A vehicle block is a sequence of trips to be done by one vehicle from the time that it leaves the depot until it returns to the depot. From the viewpoint of driver scheduling, drivers can only be relieved at some designated places called relief points, which are represented by letter codes (A, B, and C) in Figure 1. The times when the vehicles are at the relief points, marked on the horizontal timescale, are known as relief opportunities. The work between two consecutive relief opportunities on the same vehicle is called piece of work (or task) for the driver. The work of a driver in a day is known as a duty (or shift). Note that not all relief opportunities will be used to relieve drivers and therefore a driver may be covering a number of consecutive pieces of work, called a spell.
An example of a duty built between two vehicle blocks is given in Figure 1. The duty is composed of two spells from the two vehicle blocks.
According to which time period the duties cover, the legal duties can be classified to the following five types. Early Duty starts early in the morning taking the buses out of garage before the morning peak. The working time of a day that this duty covers is between 05:00 and 12:00. Late Duty starts in the afternoon and ends in the night. The working time of a day that this duty covers is between 12:00 and 20:00. Night Duty works in the late evening buses returning the buses to the garage. The working time of a day that this duty covers is between 22:00 and 05:00. Day Duty starts in the morning and ends in the afternoon. The working time of a day that this duty covers is between 08:00 and 16:00. Middle Duty works during the period of the morning and the evening peaks. The working time of a day that this duty covers has two parts. One is between 05:00 and 08:00 and the other is between 16:00 and 22:00.
The user could impose certain constraints on any of these duties to ensure that the final schedule does not contain too many or too few duties of particular type. The constrains can be imposed either initially or when reoptimizing an existing solution.
2.2. Mathematical Formulation
The set covering model is the fundamental model of the bus driver scheduling. In the public transport such models have been popular for solving crew scheduling problems for many years [9, 15]. In the formulation adopted here, we will consider our approach based on the set covering formulation of the problem. Although the schedule must ultimately have only one duty assigned to each piece of work, it is better to allow the formulation to include the possibility of overcover and to use set covering rather than set partitioning. On one hand, integer solutions may have some constraints covered by two or more nonzero variables, which in scheduling terms would mean two or more duties assigned to the same piece of work. The reason for this is that there can be a danger that there may be no feasible solution that “fittogether” without causing any overcover. On the other hand, the produced solutions do not usually have overcovered pieces of work; the set covering model most commonly results in two duties overlapping slightly. If overcover occurs, it can be easily eliminated by editing the schedule afterwards.
Let be the set of legal duties and be the set of pieces of work to be covered. We can define the problem as the construction of a matrix, where drivers appear in columns and pieces of works in lines. For each element , , , indicates the duty covers piece of work , and it is 0 otherwise. It can be formulated as follows:subject towhere is the number of duties; is number of work pieces; is the cost of duty ; is equal to if duty is used in the solution and otherwise. and are weight constants. Generally, the main objective of the transport company is to obtain a solution with a minimum number of duties. For this objective, we consider here .
The constraints (2) indicate that each piece of work must be covered by at least one duty. We consider the costs in our work based on [15]:wherewhere is the cost of the driver ; is the extratime over the normal time of work established by law for driver ( hours); is the idle time of driver (time the driver is not working during his shift); is the normal working time ( hours); is the finish time of the task ; is the start time of the task ; is the first task of the driver’s shift; is the last task of the driver’s shift.
3. Solution Methodology
The column generation algorithm for the BDSP is initialed by giving a small set of duties (columns). These duties constitute the initial columns in a restricted master problem (RMP). Feedback from the optimal dual values of the RMP is then used to solve a pricing subproblem, which aims to identify duties with a negative reduced cost that improves the objective function value of the RMP. The pricing subproblem for the BDSP is typically modeled as a constrained shortest path problem solved over a directed acyclic graph and then solved using dynamic programming techniques [9]. Nevertheless, because of the drawback that the subproblems for generating the columns would be computationally expensive in real problem instances [16], column generation did not make much progress toward solving large instances. Thus, the main work relies on the subproblem to speed up the whole process of column generation. Here, we propose the column generation based hyperheuristic methodology to solve the BDSP. This approach provides two significant advantages. First, due to the fact that column generation is known for its poor convergence, it is not necessary to select only one column with lowest reduced cost; in fact, any column with a negative reduced cost will do. Using this observation can improve the overall efficiency. In our research the idea of “rapid adding columns” is to add a set of columns quickly by iteratively solving subproblem using a set of low heuristics. Thus, more than one duty with negative reduced costs may even be possible to be brought into the restricted subset per iteration. Second, the diverse columns with negative reduced cost that are selected (or generated) can be performed efficiently, see [13], to avoid the rapid and useless increase in RMP size. In fact, our approach may select a good “diversity” of duties by using these low heuristics to improve the solution without a large increase in computation time. The pricing step plays an important role in terms of the efficiency of the column generation method.
An outline of the algorithm is given as follows.
Step 0 (preprocessing). Generate all valid duties. Then, these duties form a column pool .
Step 1 (construct an initial solution). Take a small subset of the duties as initial set of columns.
Step 2 (solving the RMP). Solve the LP over the current duty subset and compute the shadow prices of the set of columns .
Step 3 (duty management). Control the column pool and remove the columns in the RMP if necessary.
Step 4 (selection of new duties). Select duties with negative reduced cost which will improve the solution, and add them to the RMP.
Step 5 (stopping criterion). If the stopping criterion is met, then go to Step ; else go to Step .
Step 6 (finding integer solutions). Solve ILP and obtain an integer solution.
The overall execution is iterated between Steps and . In the first iteration it uses the columns created in Step .
In the remainder of this section, we provide details of each of the above steps.
3.1. Step 0: Preprocessing
In our approach we generate all feasible duties explicitly in a preprocessing step. That is, all the possible combinations of pieces of work are valid according to a set of labor contracts and regulations. One of the advantages of generating duties beforehand is that different duty sets can be identified so that experienced schedulers can “share” their own knowledge rather than relying on a “black box” to produce the schedules. Error correction or experimental changes can thus be carried out relatively quickly before searching for resulting schedules [17]. Moreover, preprocessing is an important procedure to express “preferences” and “undesirableness,” which are defined by a userdefined strategy. As discussed in [16], soft parameters are used to limit the generation of duties, for example, limiting the maximum number of spells in a duty to four. Meanwhile, a set of preferred duties can be identified relatively quickly; for example, duties with idle time less than average are preferred. Here, this kind of preprocessing could help us to find a subset of “good” duties when we need to use them during the search process.
Formally, we make the following definitions.
Definition 1. Given a duty , let denote a relief opportunity which is start point in a piece of work covered by the duty . For a given relief opportunity , we define a relief time and relief point in as and , respectively. Then, .
Definition 2. Given a duty , let denote a relief opportunity which is end point in a piece of work covered by the duty . For a given relief opportunity , we define a relief time and relief point in as and , respectively. Then, .
Based on the above definitions, a piece of work covered by the duty is denoted by
Hence, pieces of work composed of a duty can be defined as
According to Definitions 1 and 2, each duty is forced to satisfy all the following basic constraints:where is the maximum working time ( hours + hours); is the maximum valid working time; is an arrival station of task ; is a depart station of task ; is the necessary time to reach from .
Here we propose a method to generate the valid potential duties as follows in Algorithm 1. The algorithm is initialized by setting a number of pieces and equal to . The relief opportunities are selected to generate a set of all the possible pieces of work according to a given bus schedule. Notice that a maximum number of pieces, which is limited to compose a duty, are different in some practical cases, for example, no more than four spells in [18]. Another example is from [19] and in their case the maximum is equal to . Hence, we will refer to a required number of pieces given by the bus company as . Let us denote corresponding to the shortest length of piece in (line ). Then, we can compute a maximum number of pieces (maximum working time of duty divided by the shortest time of piece) on line . is thus determined by and . Finally, the process adds one piece of work after one piece of work into a duty until the maximum number of pieces is met. Nested loops on lines (7)–(19) are iterated gradually through all pieces of work of each vehicle. Line checks if the duties satisfy the constrains (9)–(13) before adding the duties to the pool .

3.2. Step 1: Construct an Initial Solution
For computing initial shadow prices, we propose a greedy constructive heuristic. An initial solution is made by a sequential mechanism, whose main objective is to obtain initial values of dual variables to select more duties and improve the linear solution in Step . The procedure is presented in Algorithm 2. Given a set of legal duties and a set of pieces of work to be covered , let be a set of the pieces of work covered so far. As it is a constructive heuristic, a new duty not yet assigned is added in a greedy way to the current schedule at each iteration. With this objective, we calculate a new cost of duty as a greedy function for our choice at each iteration. The new cost of duty can be computed as the following:where is the cost of duty in the iteration; if not yet covered piece of work is covered by after the iteration, and otherwise. Particularly, if , .

Finally, the process is repeated until all pieces of work are covered.
3.3. Step 2: The Restricted Master Problem
Following a typical column generation, the LP relaxation of the IP is necessary to be applied; that is, we relax the integer constraints (4). Thus, constraints (4) can be rewritten as
The purpose of solving RMP is to find the dual prices, or shadow prices, corresponding to the pieces of work in the problem. These values are used to calculate the reduced cost of new duties described in Step .
3.4. Step 3: Duty Management
Duty management (or column management) is an integral part of any successful column generation algorithm as discussed in [18–20].
In this research, there are two reasons why this process is applied.
Firstly, at each column generation iteration we insert all columns with negative reduced costs that have been found by the pricing algorithms into the RMP (see Step ). Thus, it is clear that the procedure to RMP is not efficient if there are more columns than a certain maximum amount. In our test, all the duties with reduced cost greater than a given threshold will be removed whenever the number of duties exceeds 50,000. Similar strategies are used in [21]. This process is particularly important when the RMP keeps growing enormously during the column generation process.
Secondly, the selection of duties (see Step ) can sometimes be sped up without loss of quality if the number of duties generated can be reduced intelligently [18]. Since the number of duties for some reallife problems may be quite large, we consider to take measures to prevent “bad” quality of duty into our procedure. The following procedure is iterated as long as the number of duties stays above 100,000. Each potential duty will be ranked by combining two attributes: an index which reflects its apparent efficiency (driving time divided by working time) and a ratio which reflects the identical duties; for example, a ratio of duty which is wholly contained by another duty is . Then, the lowest ranked duties are discarded until some definitive conditions are met. The removal of these duties reduces the overall size of a subproblem, which reduces runtime and memory usage requirement.
3.5. Step 4: Selection of New Duties
The major component of column generation is the procedure for selecting (generating) candidate duties to bring into the restricted subset in each iteration. The goal is to improve the LP relaxation of the restricted master problem. Thus, the objective of this subproblem is to select the negative reduced cost of duties not already in the restricted subset. We now provide the details of this procedure to identify duties with negative reduced costs at each iteration. The reduced cost is obtained from the cost and dual values of each corresponding set covering constraint as given in the previous section. As only negative reducedcost routes can enter the restricted master problem, the reduced cost should be minimized or constrained to be negative. Using the dual variables from the LP solution, the reduced cost of each duty is calculated bywhere is the reduced cost of duty (column) ; is cost of duty ; is the dual price of task .
In this research, we develop a heuristic method based on the idea of hyperheuristic that, while efficient, is not guaranteed to identify all the columns. To speed up the search for columns with negative reduced cost, we perform heuristic pricing. Besides saving computing time, this also allows generating multiple columns in each run. For one heuristic method is greedy, by applying different heuristic methods, we can keep the diversity of columns and avoid getting into a local optimal direction. Based on the framework of hyperheuristic [14, 22], the competition rules are applied to guide the selection of the lowlevel heuristic during the search process. When a lowlevel heuristic is applied, the performance of this lowlevel heuristic will be selected by a function . To prevent holding a large computation time by a poor performance of low heuristic, the simple ranking [23] is used to exclude the worst heuristic according to its scores in the last application at each iteration. There are four different cases (shown in Table 1) to reflect the important performance of a lowlevel heuristic.
At each iteration, of each lowlevel heuristic is calculated bywhere is the score of case .
Note that if each lowheuristic has the same total score at given iteration, no lowheuristic will be excluded. Five heuristics select new duties in the same time at the beginning.
3.5.1. Swap Heuristic
The authors in [24] consider that if a column in the optimal solution obtained by Step is modified appropriately, it is likely to get a new column with negative reduced cost. For this reason, we try to select a number of columns in this heuristic.
Swap heuristic is formally written as follows. Given a duty from optimal solution of the restricted master problem, we decompose the duty that is randomly selected in partial consecutive duty into , pieces of work (POW). Moreover, assuming that and , then is decomposed as , . Therefore, all the duties which contain either or can be found in (see in Step ). Thus, we can select the duty with negative reduced cost to RMP. This process is executed until either at least one new duty with negative reduced cost can be found or a predefined number of attempts without success is reached.
3.5.2. Local Search Version 1
As we know, the element of search space consists of various duties. Thus, we could consider several neighborhood relations according to the properties of a duty, that is, duty type, number of spells, and cost. Then, one of neighbors is randomly selected in order to obtain an enough “good” duty after applying a local search. In the following, we will describe a neighborhood relation that we consider in our case.
It was mentioned earlier that five types of a duty are specified: Early Duty, Late Duty, Night Duty, Day Duty, and Middle Duty. Let be a subset of duties that each duty is performed in the same duty type. As illustrated in the pseudo code of Algorithm 3, the neighborhoods allow the search to move (Step of Algorithm 3). Then, the local search starts from a duty by using 2exchange, which follows a random sequence of duties in (Steps (5)–(7) of Algorithm 3). If with less reduced cost is found, will be replaced (Step of Algorithm 3). All the above steps will be repeated until the predefined number of iterations is reached.

3.5.3. Local Search Version 2
This heuristic is similar to local search version 1, except the neighborhood selection mode that a greedy strategy is used. We define a set of neighborhoods used according to the number of spells. Thus, these different neighborhoods can be ranked in a descendant order. The duty with the maximum number of spells will be checked at each iteration. However, another neighbor will be selected according to the rank if a duty with negative reduced cost cannot be found in this neighbor after attempts without success. And so on like this way to search, the entire search stops when a suitable stopping condition is met (here we use a maximum allowed number of iterations based on the CPU time).
3.5.4. A GreedyBased Heuristic Version 1
Instead of searching the whole space, the first heuristic attempts to drive the search towards definitive zone of space. We maintain a reasonable size of the duties which are deemed to search efficiently (i.e., a limited number of duties ). Then we try to find a “desired” duty in this subset.
More exactly, let be a pool which only stores the duties in which the costs are less than an adaptive threshold. This threshold is dynamically controlled by a parameter . Then, the duties are ordered in a descendant order according to their costs. Duties, therefore, will be checked one by one according to this ranking order until one of some stopping criteria is met, which is either a time limit or finding one duty with negative reduced cost. In fact, the heuristic cannot find a “desired” duty after a certain time when entire search is stopped; it perhaps means that the threshold should be increased. Here we define that the threshold will be updated by .
3.5.5. A GreedyBased Heuristic Version 2
This heuristic is similar to a greedybased heuristic version 1, except that a duty which is selected randomly in the pool will be checked at each iteration.
3.6. Step 5: Stopping Criterion
In the context of this work, two stopping criteria are defined in our approach: () no duty with negative reduced cost is found and () the time limit is reached.
3.7. Step 6: Finding Integer Solutions
As mentioned earlier, column generation is used to solve the relaxed master problem. Hence, the resulting LP solution produced a solution with fractional numbers of duties and an integer solution must be found. In this case, a branch and bound procedure is used in order to deliver an integer solution. Several branching strategies compatible with column generation techniques are discussed [21, 25]. Constraint branching, which was originally proposed in [26], is widely used for branching strategies. In theory, constraint branching is used to set partitioning models and could lead to suboptimality if applied to inequality constraints, but since the optimal integer solution to the current problem will not necessarily equate to the optimal schedule and users can seldom specify what they mean by optimality, the emphasis is on finding a good integer solution quickly. Formally, let be a set of variables from the optimal fractional solution in the RMP, where each variable covers tasks and simultaneously and as the sum of solution values of the variables in the set . In [26], any optimal fractional solution contains at least one constraint pair , , for which lies strictly between zero and one (see a proof in [27]):
The equivalent of the zero branch and the one branch are, respectively,
Applying the above branching strategy on our problem, branching is done by dividing the solution space into two sets. The branching can be imposed on the 0branch:
The 0branch forces all duties covering both tasks are banned. Then on the 1branch,
The 1branch implies that any duty which covers (or ) but not (or ) must be excluded.
Instead of solving the linear program to optimality, we can choose to prematurely end the process if the relative gap between upper bound and the lower bound is smaller than . Upper bound on the objective value is given by the integer solutions found.
A lower bound can be obtained by Step .
LB is the lower bound on the optimal solution value computed by solving the LP relaxation of (1) and rounding up the corresponding value. Column generation iterations can be terminated when this gap is less than a userdefined tolerance, giving a nearoptimal solution of defined quality.
Definition 3. is the total running time of bus, which can be computed from a bus schedule.
Assuming that the users predefine as the maximum working time of a driver per day, given to estimate the number of drivers expected is calculated by
Proposition 4. is a tight low bound.
Proof. Given a bus schedule, is constant. Let be the set of duties in an optimum solution . Note is a number of drivers in .
Case . the effective working hours of duty are the maximum working time . Therefore,
Case . It has occurred when there is at least one duty such that the effective working hours are not equal to :where and integer.
Hence is a tight low bound.
The process continues until the gap is less than a userdefined tolerance, giving a nearoptimal solution of defined quality. However, this could be time consuming for large problems. Therefore, the branching process will terminate the search once one integral solution has been found if a given execution time is exceeded.
4. Computational Results
In this section, we present the results obtained for the proposed approach on several realworld instances. These instances vary in size and complexity. The instances, denoted by A–Ain Table 2, are from Mauri & Lorena [15]. For the last two instances, the test data comes from two lines of bus in Beijing. Table 2 shows the size (pieces of work) and the best known results of realworld problems.
In order to evaluate the quality of the solution obtained by our approach presented here, the measure of the quality of a heuristic schedule is shown as follows:
All computational experiments were performed in a personal computer with Intel Core 2 Duo CPU T5870 that is processor of GHz, 1.99 GHz with 2.00 G of RAM memory on Microsoft Windows 2002. The whole implementation was developed in the C # language and has been complied using the NET framework version . The ILP solver used in experiments is LINGO . This software has been used to solve RMP after each pricing iteration. The threshold has been set to min in Step . The computation time to explore search space in the subproblem is limited to hours (3,600 seconds).
The results of Table 3 show that in most of cases of instances A–A our method could find solutions which are the same as the best known solutions. We can also find that our method does not perform well in some small size instances like A–A compared to PTA/LP and TA/LP, even to SA. However, as the size of instance increases, our method performs better. This is because that, for small instance, our method is too complex and its computing time is long. But for large instance, the classic methods meet the problem of combinational explosion which is the typical feature of NP problem, while our method begins to show its advantage of saving computing time.
In Table 4 we present the “manual” solutions of last two instances currently used in the company and the solutions obtained with our approach. Our solutions represent a reduction of and , respectively, on the manual solutions. This improved schedule was very acceptable to the user.
5. Conclusion
We describe a methodology for finding nearoptimal solutions to bus driver scheduling problem. Suitable combination of column generation and hyperheuristic can benefit much from synergy and exhibit higher performance with respect to solution quality and time for some cases, whereas the combination of column generation and hyperheuristic also needs substantial further research in order to make them fully developed. Our future work on such hybrid approach will be still continued.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgment
This work is supported by the Fundamental Research Funds for the Central Universities (2014JBM072).