Algorithm for Crew-Scheduling Problem with Bin-Packing Features

1 downloads 0 Views 198KB Size Report
with Bin-Packing Features. Wenxin Qiao, Masoud Hamedi, and Ali Haghani. The traditional crew-scheduling problem is solved with a new bin-packing approach ...
Algorithm for Crew-Scheduling Problem with Bin-Packing Features Wenxin Qiao, Masoud Hamedi, and Ali Haghani this is a labor-intensive and time-consuming process. Computerized scheduling systems provide a way for schedulers to establish a schedule on a short notice as well as to evaluate changes in the system quickly and accurately to support decision-making strategies for the company. The CSP is an assignment process in which given a set of vehicle blocks, the blocks are cut into pieces of work, and these pieces are combined into legal and feasible runs with a minimum total cost. The process ensures that all tasks are covered by runs. In CSP, a block is a sequence of tasks assigned to one bus for 1 day’s work. A run is the work performed by a single crew for 1 day. A task is the trip between two relief points on a block. A piece of work is a continuous working period consisting of one or more consecutive tasks covered by the same crew. A relief point is a stop along the route at which crews can take meal breaks. A partition of a block is the selection of a set of cuts each representing a relief point. A straight run is a continuous run with no meal break or paid meal break between pieces. A split run is a run that has a long meal break between the pieces of work, which may be unpaid. A tripper is a small piece of work (one or two consecutive tasks) that usually is performed as overtime. Complete definitions are provided in Hartley’s glossary of terms for bus and crew scheduling (1). This paper studies a basic but still NP-hard version of the CSP in which the working rules and feasibility of runs are considered. General steps for solving the CSP from a literature review are summarized and a new approach is proposed for solving CSP with bin packing features. A case study with 73 vehicle blocks and 1,299 tasks is solved with this methodology.

The traditional crew-scheduling problem is solved with a new bin-packing approach in polynomial time. On the basis of extensive research from the past 40 years, an algorithm that has been proven to be the most efficient for solving most bin-packing problems is selected and modified for application in the crew-scheduling problem. A modified best-fitdecreasing algorithm is proposed and discussed. A case study is conducted with the proposed algorithm and the results are discussed.

A transit system has become a supporting industry for a nation to meet the goals of improving mobility, protecting the environment, and saving energy. A bus system plays a critical role in the transit system because it serves the largest number of customers. Development of a convenient and efficient bus system depends on an efficient and fast scheduling process that usually includes four steps: designing routes, setting frequencies and building timetables, vehicle scheduling, and crew scheduling. Crew scheduling is the assignment of tasks to bus drivers. It is an important step because crew costs exceed such other costs as vehicle costs and maintenance fees, and minimizing crew costs will help a bus company optimize its total operational costs. The crew-scheduling problem (CSP) has been extensively studied in the operation research literature. Since the first international workshop on computer-aided transit scheduling in Chicago in 1975, 10 international workshops have been held in turn in North America, Europe, and Canada in which the research progress, contributions, and state-of-the-art computer-aided transit scheduling techniques have been presented. Computerized crew scheduling has been studied for decades and is gradually taking the place of manual scheduling. The change from traditional manual scheduling to a computer-aided scheduling system has been made for several reasons. First, the transit market has become much more competitive. To gain more benefits while maintaining the level of service required, more attention is paid to reducing the operational costs of the transit company. Second, with many suburban areas becoming urbanized cities, transit systems are expanding their service areas, making the scheduling problem large scale and more complicated. Third, increased computer speed and new algorithms provide computerized scheduling with an obvious advantage of over manual scheduling in both processing time and cost-efficiency. Finally, bus schedules usually are changed once or twice a year according to changes in service demand;

LITERATURE REVIEW The CSP has been studied in and out of transportation literature. Relevant papers can also be found in the journals of operations research, mathematics, computers, and management science. The problem has relevance in almost all transportation operations, including transit, aviation, and rail. The term “crew pairing” is used in aviation and refers to flight legs that are combined into multiday trips (2, 3). Crew scheduling also has applications in the railway industry (4, 5). The present paper focuses on its application in transit systems. An abundance of mathematical and heuristic approaches have been proposed in the past 30 years, and three main approaches are classified and reported in the literature: run-cutting heuristic, matching algorithm, and set-covering approach (6, 7 ). The run-cutting heuristic follows the techniques used by manual schedulers that were first used in the 1970s as a constructive algorithm. This algorithm cuts uncovered pieces from a block and covers the pieces with a run until all blocks are covered. Cavique et al. presented two alternative improvement algorithms embedded in a

Department of Civil and Environmental Engineering, University of Maryland, 1179 Glenn L. Martin Hall, College Park, MD 20742. Corresponding author: A. Haghani, [email protected]. Transportation Research Record: Journal of the Transportation Research Board, No. 2197, Transportation Research Board of the National Academies, Washington, D.C., 2010, pp. 80–88. DOI: 10.3141/2197-10

80

Qiao, Hamedi, and Haghani

tabu search framework to reduce the number of runs generated from the initial solution by the traditional run-cutting approach (8). Computational results are given for a case study of 21 blocks with 528 trips and 79 runs. The matching algorithm formulates the process as a matching problem that is used in RUCUS-II and an initial version of HASTUS (9). Blocks are partitioned into pieces of work, then the piece graph is generated for solving the matching problems, and runs are generated by matching pieces. Ball et al. proposed a matching based heuristic to schedule crews and vehicles simultaneously (10). Computational results are given for a real-world problem with 1,602 tasks and 139 crews. In the set-covering approach, the CSP is formulated as a setcovering problem (SCP) or set-partitioning problem (SPP), which are used in the package IMPACS of the BUSMAN system and in the Crew-Opt package. This method first generates a large set of feasible runs and then finds the minimal covering set. Lagrangian relaxation and the column-generation technique are commonly used to cut the computation time of the SCP or SPP. Mitra and Darby-Dowman proposed a set-covering solution by integer linear programming (ILP) (11). Desrochers and Soumis solved the problem as an SCP by using the column-generation method based on a shortest-path algorithm, rather than ILP (12). Computational results are given for two realworld cases: one with 25 blocks, 167 tasks, and 45 runs, the other with 20 blocks, 235 tasks, and 51 runs. Beasley and Cao presented a zero-one ILP formulation for a generic CSP based on Lagrangian relaxation to provide lower-bound embedding in a tree search procedure together with subgradient optimization (13). Computational results are given for random test cases involving 50 to 500 tasks with 27 to 204 crew. Huisman et al. presented two algorithms for integrated vehicle and crew scheduling in multiple-depot case based on a combination of column generation and Lagrangian relaxation (14). Computational results are given for real-world cases involving 194 to 653 trips with 28 to 117 crew. Other innovative approaches include the work of Banihashemi and Haghani, who formulated the CSP as a task-based multicommodity network flow problem (15). Paixao formulated the CSP by using dynamic programming, where the search process used a state-space relaxation method (16). Clement and Wren solved the CSP by using a genetic algorithm in which feasible crew schedules are encoded as chromosomes (17). Li and Kwan proposed a hybrid genetic algorithm for the biobjective CSP and applied fuzzy set theory in the evaluation of individual runs and the schedule as a whole (18). The work of Ball et al. (10), Darby-Dowman et al. (19), Gaffi and Nonato (20), Haase et al. (21), and Freling et al. (22, 23) are also relevant to integrated vehicle and crew scheduling. The procedure for solving the CSP can be summarized as follows. First, generate an initial candidate set of feasible solutions, usually through a run-cutting heuristic. Column generation is often used to expand the candidate set. Second, select from the candidate set a minimum-cost subset to cover all tasks where the problem is usually formulated as an SCP or SPP. Third, solve the SCP or SPP by using appropriate algorithms, which are usually solved by linear programming or Lagrangian relaxation with a branch-and-bound scheme. The bin-packing problem (BP) has been studied as combinatorial problem in the literature of operation research and mathematics. Since the early 1970s, extensive research has been done to find a near-optimal solution to the BP. The classic one-dimensional BP is defined as follows: Given an unlimited supply of identical bins each with a positive capacity, for a set of n items each having a positive

81

weight, pack them into a minimum number of bins satisfying that the sum of item weights in each bin does not exceed capacity. The BP has many real-world applications, such as cutting stock units in the wood industry, loading trucks having weight limitations, optimizing cable length, and paging newspapers. The BP is NP-hard in the strong sense (24). Instead of solving the problem optimally, fast heuristics are provided to generate a good, near-optimal solution. A recent comprehensive survey of bin-packing algorithms can be found in the work of Coffman et al. (25). In the literature, four efficient algorithms commonly used have the same order of time complexity, O (n log n) (26): • First-fit algorithm: items are taken successively and fit into the first bin (lowest indexed bin) in which they fit; • Best-fit algorithm: items are taken successively and fit into the most nearly full bin (fullest bin) in which they fit; • First-fit-decreasing algorithm: same as the first-fit algorithm except items are first sorted by size in decreasing order; and • Best-fit-decreasing algorithm: same as best-fit rules except items are first sorted by size in decreasing order. Review of the heuristics approaches proposed and applied in the CSP indicates that solving CSP with a bin-packing approach is an area that has not been studied and discussed before. An extensive review of the literature in the original BP suggests that using an approach based on bin packing holds promise in solving a largescale CSP. In the CSP, blocks are cut into pieces to be combined into runs, and these pieces may be considered items to be packed into a bin (run). Considering the similar natures of the BP and the CSP, modifying and applying an efficient bin-packing algorithm has the potential for providing a faster heuristic to find a better, near-optimal solution. This paper proposes bin packing as a new approach for solving the CSP where the piece-matching process is formulated as a BP. The best-fit-decreasing algorithm is modified for application in the CSP.

BIN-PACKING APPROACH TO CREW-SCHEDULING PROBLEM In this paper, the CSP is formulated with bin-packing features in the following way. Given a set of m blocks, first cut each block into partitions consisting of several pieces of work, and generate every possible partition satisfying the constraints. Then, pack these pieces into a set of bins (crew runs) with a minimal total cost, provided that no two pieces overlap and the constraints for working rules are satisfied. The working rules are mainly based on TCRP Report 30: Transit Scheduling: Basic and Advanced Manuals (27 ): • Maximum total working hour for a run is 9 h. • Maximum spread over time for a run is 12 h. • A meal break must exist after a maximum working period of 6 h, and the minimum meal break is 30 min. • A piece of work has a minimum and a maximum length of 2 and 6 h, respectively. • The guaranteed paid time for each run is 8 h. • Crews take a break only at relief points, and changeover of buses is at the same relief point. The objective is to minimize the total costs of runs with all tasks covered. The problem is formulated by defining a binary decision

82

Transportation Research Record 2197

variable xj, j = 1, 2, . . . , n, where xj is the jth run. The cost for each run depends on its total working time and spreadover time. The meal break is unpaid in this study; however, for split runs, the break in the middle is paid in the form of a spreadover penalty. Spreadover penalties and guaranteed paid hours are considered in the cost function, which is set as ⎧c1 ⴱ W g ⎪ ⎪⎪c1 ⴱ W j Cj = ⎨ g ⎪c1 ⴱ W + c2 ⴱ ( S j − Wmax ) ⎪ ⎪⎩c1 ⴱ W j + c2 ⴱ ( S j − Wmax )

if W j < W g , S j < Wmax if W j > W g , S j < Wmax if W j < W g , S j > Wmax if W j > W g , S j > Wmax

where Wmax Wj Wg Smax Sj c1 c2

= = = = = = =

maximum total working time allowed per day, total working time of run j, guaranteed minimum paid hours, maximum spreadover time allowed per day, spreadover time of run j, working hourly pay rate ($25), and spreadover penalty rate ($20).

The mathematical model is formulated as follows: n

min ∑ c j x j

j = 1, . . . , n

j =1

n

subject to ∑ aij x j = 1

i = 1, . . . , m

j =1

where cj is the cost of run j, xj is the jth run, ⎧⎪1 xj = ⎨ ⎪⎩ 0 ⎧⎪1 aij = ⎨ ⎪⎩ 0

if jth is in the solution otherwise if ith is in the jth run otherwise

The input data for this model are the pieces generated from the blockcutting process. Each block is cut into different partitions, and each partition consists of several pieces of work. These pieces are generated while satisfying the constraint of a 2-h minimum and 6-h maximum piece length. These pieces are matched and combined into possible runs. When all the possible runs are generated by piece matching, each possible run is checked for legibility by satisfying the following constraints: there is no overlap between the pieces; the break and changeover occur at the same relief point; total working time and spreadover time do not exceed maximum allowed time; each piece has a minimum and maximum length of between 2 and 6 h; and a meal break must exist after maximum piece working time. With these legal runs generated through a legibility check, a [0,1] matrix aij is generated, indicating if task i is in the jth run. A test problem with two blocks is solved by this model, and an optimal solution is obtained with CPLEX. Results show that the optimal minimum cost is $626 with three runs generated. The two sample blocks have only a few partitions; however, for a midsize problem

with 100 vehicle blocks, each block usually has 10 to 30 different partitions with three to four pieces in each partition, generating at least 3,000 pieces. As a result, millions of variables will be generated through various piece combinations into all possible runs. This problem is proved NP-hard (28), which means the solution time increases exponentially with an increase in the size of the problem. Heuristic algorithms are needed to solve this problem. This paper proposes a modified best-fit-decreasing algorithm with which to solve the piece-matching problem in the CSP. In this paper, the crew-scheduling process is broken into two steps: block cutting and piece matching. Each block consists of a sequence of trips that can be cut at relief points into pieces, in a process called block cutting. The concept of mathematical induction was adopted in the cutting strategy. Once the first piece is cut, the rest of the block is cut in the same way. This process is iterated until all possible partitions are generated for this block and a candidate set of pieces is established. For practical reasons, blocks can be cut only at relief points, and each piece has a minimum and a maximum length between 2 and 6 h. In the piece-matching process, given the set of all possible pieces, a modified best-fit-decreasing heuristic is applied for run generation in which a set of bins are generated with assigned pieces inside and associated bin costs. From the concept of original BP, the matching problem of CSP with bin-packing feature is defined as follows: • Bin: a bin represents a run. • Item: an item is a piece of work cut from the block. • Capacity: the capacity of bin is the time constraints for the run for maximum total working hour and spreadover time. • Compatibility: guarantee that the matched two pieces are compatible. Checking criteria are the following: – No overlap exists between the two pieces; a piece following another starts no earlier than its preceding piece. – The connecting relief points of the two pieces should be the same to avoid changeover between different relief points, which will reduce travel time and cost between relief points. – There should be a minimum meal break after a maximum working period. Each straight run usually starts with a morning piece, assuming that the first piece to fill in each bin is fixed with the first morning piece of each block. Pick from the remaining pieces to fill in each bin with the satisfied constraints. Additional bins are opened when necessary. When all tasks are covered, a set of bins is generated with cost assigned to each bin. In this bin-construction process, one item is introduced at each step, and a feasible solution is built in a greedy fashion. The best-fit-decreasing algorithm is used and modified for application. Following is the notation used in this algorithm: K = set of blocks: {ki}, i = 1, 2, . . . , m; Q = set of tasks: {qij}, i = 1, 2, . . . , m, j = 1, 2, . . . , ui; qij = jth task of block i; R = set of partitions {Rij}, i = 1, 2, . . . , m, j = 1, 2, . . . , ri; Rij = jth partition of block i; ri = total number of partitions in block i; P = set of pieces: {pijk}, i = 1, 2, . . . , m, j = 1, 2, . . . , ri, k = 1, 2, . . . , vij; pijk = kth piece in partition j of block i, vij = total number of pieces in partition j;

Qiao, Hamedi, and Haghani

B = set of bins: {bp}; p = 1, 2, . . . , n; q = piece index in bin p, q = 1, 2, . . . , h; denote h as the upper bound for the total piece number in a bin; lijk = length of piece pijk; lmin = minimum piece length required (2 h); lmax = maximum piece length allowed (6 h); Wmax = maximum total working hours allowed per day (9 h); W = set of total working hours of the bins {Wp}, p = 1, 2, . . . , n, where Wp = total length of the pieces in bin p; Wg = guaranteed minimum paid hours (8 h); Smax = maximum spreadover time allowed per day (12 h); S = set of the spreadover time of the bins {Sp}, p = 1, 2, . . . , n; BTmin = minimum break time required (30 min); s = starting time of piece pijk; T ijk e T ijk = ending time of piece pijk; L sijk = starting relief point of pijk; L eijk = ending relief point of pijk; Cp = cost of bin p; c1 = pay rate of working hour ($25); and c2 = pay rate of spreadover penalty ($20). The modified best-fit-decreasing algorithm for generating bins is as follows: Step 1. For each block in K, rank all possible partitions as R = {Ri1, Ri2, . . . , Rir}; select from R one piece with the earliest starting time and maximum working length. Label these pieces as selected. Step 2. Assign each labeled piece from Step 1 to an empty bin and mark these bins open. Step 3. Sort all open bins generated from Step 2 in a decreasing order based on current total length, resulting in a bin list B. Step 4. Create a candidate piece list L consisting of all nonlabeled pieces of same partition rank with the preceding pieces in the bins. Step 5. Start with the lowest indexed bin from B and fill each bin with the next available piece pijk selected from L based on the following constraints: 1. The piece has the same rank of partition with the preceding piece in the bin. m ri vij m ri vij s 2. Σ i=1Σj=1 Σ k=1 T ijk xi,j,k,p,q+1 − Σ i=1Σj=1 Σ k=1 T eijk xi,j,k,p,q > 0 ∀p, ∀q < h − 1 (guarantee no overlap between the pieces). m ri vij m ri vij s 3. Σ i=1Σj=1 Σ k=1 L eijk xi,j,k,p,q − Σ i=1Σj=1 Σ k=1 Lijk xi,j,k,p,q+1 = 0 ∀p, ∀q < h − 1 (ensure that connecting relief points are the same between adjacent pieces) 4. Wp < Wmax (guarantee that total working time does not exceed Wmax) 5. Sp < Smax (guarantee that total spreadover time does not exceed Smax) m ri ij 6. If Wp > lmax, select a piece pijk such that Σ i=1Σ j=1 Σ vk=1 m ri vij s e T T ijk xi,j,k,p,q+1 − Σ i=1Σ j=1Σ k=1 T ijk xi,j,k,p,q > B min, ∀p, ∀q < h − 1 (ensure that a minimum break exists when total working hours exceeds maximum piece length); B Tmin will not be added repeatedly by adding a new piece due to the length constraints. 7. Of the selected feasible pieces satisfying the preceding six constraints, select pijk from L with minimum T sijk (select piece with the earliest starting time to minimize break time). 8. If there is still a tie for those selected feasible pieces from Constraint 7 (pieces have the same starting time), select pijk with maximum lijk (select piece with longer working hours to pack the bin as full as possible).

83

Step 6. Update candidate list L by deleting labeled pieces and remaining pieces with a different partition rank number from the preceding pieces in the bins. Mark the bin as closed if bp satisfies any of the following conditions: a. Wp > Wmax − lmin (current total working time is more than 7 h); b. Sp > Smax − lmin (current spread over time is more than 10 h); c. No feasible piece pijk from L could be fitted into bp. Step 7. Go back to Step 5 and iterate until all bins are marked closed. Step 8. Go back to Step 1 until L is empty. Open a new bin when necessary. Step 9. Assign each closed bin a cost according to cost function. Step 10. Sum the total number and cost of generated bins and evaluate results. This selecting process is based mainly on feasibility and priority. All pieces in list L are examined and the best-fit piece is selected. Piece feasibility guarantees that piece can be fit in the bin without violating any constraints, and piece priority ensures that the best-fit piece is selected to get a better solution. Figure 1 is a flowchart of this algorithm. Two performance evaluation methods are used together to evaluate results generated by the proposed approach. 1. Estimated number of runs. Per TCRP Report 30 (27), the most commonly used estimation technique is the total working time contained in blocks divided by working hours anticipated in each run, which is usually 8 h: estimate number of runs =

total working time of all the blocks target working hours per run

In this paper, the objective is to minimize total cost of runs. Because the objective for the applied bin-packing algorithm is to minimize the total number of runs, it is assumed that estimated runs have equal cost of $200 ($25 pay rate × 8 h to compare the results). This performance measure works in an ideal situation that usually cannot be achieved in practice. The drawback of this estimation technique is that there are a number of split blocks with pieces for a small peak period. If these pieces are matched together as split runs, it is questionable whether they will form into 8-h runs. Therefore, additional analysis is desirable. 2. Average working time per run. The Lisbon Underground (LU) considers any schedule with an average of 4.5 driving hours per run to be of very good quality (8). Normally, a straight run has the longest working time, and a split run is shorter. Trippers last for only a few hours. This evaluation method gets the average working time of runs including all types calculated as average working hours per run =

total working time of all the runs total number of runs

Three test problems are solved with the modified best-fit-decreasing algorithm (MBFD), and a summary of the results is given in Table 1. These kinds of combinatorial problems usually include a large number of variables, and finding an optimal solution for a large-size problem is usually very difficult. However, the optimal solution can be achieved for smaller problems, and these results can be compared with the heuristic results generated. In this study, the optimal solutions for the preceding three test problems are obtained with CPLEX

84

Transportation Research Record 2197

Block set {K}: each block has a partition set {R}

For each block in {K}, select one piece from {R}, with earliest starting time and maximum working time; label these selected pieces

Assign each labeled piece to an empty bin; mark these bins as open

Sort open bins in a decreasing order; create a bin list B

Select all non-labeled pieces having the same partition rank with former pieces in bins; create a candidate piece list L

Start from top of B, fill in each bin with a piece selected from L satisfying all constraints 1-6

If only one piece is selected satisfying all constraints

Yes Pack the selected piece into the bin, mark bin as closed if criteria is met and assign a cost to bin

Update L and B; add to B new bins when B is empty

No If both L and B are empty

Yes End FIGURE 1

Flowchart of MBFD.

No

From all feasible pieces, select the one with earliest starting time; if there is still a tie, select the longer piece

Qiao, Hamedi, and Haghani

TABLE 1

85

of about 4 to 5 h between the two periods. In this case, the longest block lasts 19 h, and the shortest lasts only 4 h. This large variation is one of the most important features in transit scheduling and makes crew scheduling very complex. The estimated total number and costs of bins usually cannot be reached in practice. Since split blocks take up to 56% of total blocks, this large percentage would cause generation of split runs or trippers, which are not efficient. Also, estimated bin cost is the ideal situation without consideration of spreadover time penalty. The optimal solution can be obtained with CPLEX for this problem. The result shows that the gap between an optimal and a heuristic solution is 0.1135 for the total cost and 0.0786 for the total number of runs generated. However, tests results show that when the problem size grows, CPLEX cannot find the solution for the larger problems. For example, when the block size doubles, the total number of possible runs grows almost five times compared with the original problem, and CPLEX cannot solve a problem of this size. Test results show that CPLEX stops working when the total number of blocks reaches 89. The results show that adding more blocks has little effect on the total costs because most of the blocks used are split short ones. The test results are shown in Table 3. Several tests are conducted under different scenarios to improve current results. First, the modified first-fit-decreasing algorithm (MFFD) is applied to blocks, adopting the idea of the MBFD, except that bins are not sorted in a decreasing order beforehand. Second, the modified best-fit and modified first-fit algorithms are applied by adopting the idea in MBFD and MFFD, except the first piece selected for each bin is the second-longest piece instead of the longest piece in the partition set. The third-longest piece is selected for tests, and so on. Third, the MBFD algorithm is applied separately to the straight and split blocks group for performance tests on different types of vehicle blocks. The applied bin-packing algorithm does not guarantee a global optimal result due to the greedy approach. The solution might be improved through the testing of several piece selections. The test results are summarized in Table 4. The table shows that the modified best-fit algorithm selecting for second-longest piece generates the lowest cost of $28,465 with 136 bins generated. The average working time of 5.16 h is about 15% higher than the 4.5 h that LU considered as good quality. Though the gap between the total cost and the estimated cost is large, the estimated cost is for an ideal situation that is difficult to achieve in practice. Figure 2 compares average working times obtained by various algorithms with the LU criteria. Second, a comparison of total cost between different algorithms for only straight blocks shows that the modified first-fit algorithm selecting for the second-longest piece generates the lowest cost of $14,508 with 68 bins generated and average working time of 6.59 h, which is 46% higher than 4.5 h. The gap between total cost and estimated cost is 27.3%, and the gap between total bin number and estimated bin number is 19.3%.

Results Summary

Test Problem

Test 1

Test 2

Test 3

Number of blocks Total spreadover time (h) Total working time (h) Total cost of runs ($) Total number of runs Estimated run number Estimated run cost ($) Average working time (h)

2 23.38 22.83 677 3 3 600 7.80

3 39.70 39.03 1,281 6 5 1,000 6.51

5 63.08 62.72 1,941 9 8 1,600 6.97

and are used to compare the proposed heuristic results through the best-fit-decreasing algorithm. A comparison of the optimal solution with the heuristic solution is given in Table 2, which displays the gap between the total cost of the optimal solution and the heuristic solution and the total number of runs generated. The gap is calculated with the ratio (HEU-OPT)–OPT, where HEU and OPT represent the heuristic and the optimal solution costs, respectively. The performance of the algorithm under various problem sizes (i.e., number of input blocks) can be found in Table 3.

CASE STUDY A case study of solving the CSP for a bus system is conducted. The data provided contains 73 blocks with 1,299 tasks, 12 relief points, and 89 terminals. The objective is to find the minimum cost of runs while covering all tasks. Of these 73 blocks, a total of 2,064 partitions and thousands of pieces are generated from block cutting. In the matching process, the MBFD heuristic is applied. The results are as follows: • • • • • • •

Total bin number, 140; Total bin cost, $29,150; Total spreadover time, 1,000 h; Total working time, 707 h; Estimated bin number, 89; Estimated bin cost, $17,800; and Average work time, 5.05 h.

A large variation of vehicle demand occurs between peak hours and off-peak hours, and length of blocks varies greatly. Of these 73 blocks, 32 straight blocks start early in the morning and work continuously until work is finished in the evening. The other 41 blocks are split blocks consisting of two separate pieces covering the demand of morning and afternoon peak hours. Usually there is a long break

TABLE 2

Comparison of Optimal Solution and Heuristic Solution Test 1 (two blocks)

Total cost ($) Total number of runs

Test 2 (three blocks)

Test 3 (five blocks)

Optimal

Heuristic

Gap

Optimal

Heuristic

Gap

Optimal

Heuristic

Gap

626 3

677 3

0.075 0.000

1,200 6

1,281 6

0.063 0.000

1,673 8

1,941 9

0.138 0.111

86

Transportation Research Record 2197

TABLE 3

Results by Problem Size

Number of Blocks 73

OPT BFD GAP OPT BFD GAP OPT BFD GAP OPT BFD GAP OPT BFD GAP OPT BFD GAP OPT BFD GAP OPT BFD GAP

75

83

86

88

89

90

146

TABLE 4

Method

Total Task 1,299

1,361

1,548

1,637

1,693

1,714

1,737

2,598

Possible Number of Runs

Total Cost ($)

Total Number of Runs

Solution Time (s)

725,328 — — 781,184 — — 1,388,373 — — 1,656,666 — — 2,340,026 — — 2,423,180 — — 2,512,768 — — 3,558,648 — —

25,842.09 29,150.00 0.1135 25,843.58 29,880.00 0.1351 25,842.83 33,251.00 0.2228 25,844.50 34,719.00 0.256 25,842.83 35,614.00 0.2744 N/A 36,061.00 — N/A 36,282.00 — N/A 58,299.00 —

129 140 0.0786 129 143 0.0979 129 159 0.1887 129 166 0.223 129 170 0.2412 N/A 172 — N/A 173 — N/A 280 —

32.17 0.13 — 23.16 0.13 — 52.92 0.14 — 39.17 0.16 — 51.34 0.16 — N/A 0.36 — N/A 0.36 — N/A 0.30 —

Results by Scenario

Algorithm

Type of Block

Total Bin Cost ($)

MBFD

All blocks Straight blocks Split blocks All blocks Straight blocks Split blocks All blocks Straight blocks Split blocks All blocks Straight blocks Split blocks All blocks All blocks All blocks All blocks All blocks All blocks All blocks All blocks

29,150 15,289 15,605 29,117 14,899 15,631 28,465 14,712 15,605 28,934 14,508 15,631 28,996 28,902 28,533 29,364 28,790 29,170 28,768 29,228

MFFD

MBF 2nd longest piece

MFF 2nd longest piece

MBF 3rd longest piece MFF 3rd longest piece MBF 4th longest piece MFF 4th longest piece MBF 5th longest piece MFF 5th longest piece MBF shortest piece MFF shortest piece

Estimated Bin Cost ($)

Total Bin Number

Estimated Bin Number

Average Working Time (h)

Total Working Time (h)

Total Spreadover (h)

17,800 11,400 6,600 17,600 11,200 6,600 17,600 11,400 6,600 17,600 11,400 6,600 17,800 17,600 17,600 17,800 17,600 17,600 17,600 17,600

140 72 78 140 70 78 136 68 78 140 68 78 138 138 136 143 137 140 139 142

89 57 33 88 56 33 88 57 33 88 57 33 89 88 88 89 88 88 88 88

5.05 6.27 3.36 5.03 6.38 3.34 5.16 6.59 3.36 5 6.59 3.34 5.1 5.07 5.15 4.94 5.13 5.02 5.02 4.92

706.82 451.18 261.82 703.78 446.82 260.22 701.88 448.25 261.82 700.6 448.3 260.22 704.3 699.85 700.72 706.57 703.08 702.47 697.37 698.75

1,000.1 454.07 546.03 1,000.1 454.07 546.03 1,000.1 454.07 546.03 1,000.1 454.07 546.03 1,000.1 1,000.1 1,000.1 1,000.1 1,000.1 1,000.1 1,000.1 1,000.1

Qiao, Hamedi, and Haghani

87

average working time per run

LU average working time

5.3

Average working time (hr)

5.2 5.05

5.1

5.16 5.03

5.1

5.15

5.07

5.13

5

5.02

5

4.92 4.94

4.9

5.02

4.8 4.7 4.6 4.5 4.5

4.4

4.5

4.5

4.5

4.5

4.5

4.5

4.5

4.5

4.5

4.5

4.5

4.3 4.2 4.1 MBFD MFFD MBF-2 MFF-2 MBF-3 MFF-3 MBF-4 MFF-4 MBF-5 MFF-5 MBF-s MFF-s Algorithm FIGURE 2

Comparison of average working time and LU criteria for various algorithms.

Third, a comparison of total cost between algorithms for only split blocks shows that the modified best-fit algorithm selecting for the second-longest piece generates the lowest cost of $15,605 with 78 bins generated and average working time of 3.36 h, which is 25% lower than 4.5 h. Split blocks are the major reason for the high cost of runs. Since split blocks cover the morning and afternoon peak hours, they are difficult to combine into a straight run. Though split runs and tripper are not desired, they are inevitable in practice. Also, in this case study, the high percentage of 56% split blocks in the block set is an important reason for the high total cost. These results indicate that the type of blocks and percentages of various block types have a significant influence on the results. Figure 3 shows the gap between total cost and estimated cost as well as the total number and estimated number of runs for the types of block pools: for all blocks, straight blocks, and split blocks. It is clear that the straight block pool has a smaller gap with the estimated results, whereas split block pool has a larger gap.

CONCLUSIONS AND DIRECTIONS FOR FUTURE STUDY Incorporating the BP feature into the CSP is a new approach. Both BP and CSP have been studied as classic combinatorial problems for decades; however, merging these two problems and applying an efficient solution algorithm from one to another had not previously been studied or discussed. This study introduced a CSP with a binpacking feature and adopted the most efficient bin-packing algorithm for application in the CSP. An MBFD algorithm was proposed for solving the piece-matching problem. This algorithm matches the pieces together to generate a set of runs covering all tasks and performs in polynomial time. The results show that the compatible features of these two problems made the modified bin-packing heuristic also efficient for CSP. A case study involving 73 vehicle blocks and 1,299 tasks was conducted to test the proposed algorithm. The results were compared and

gap=(Total-Estimate)/Estimate

cost gap 1.5 1.4 1.3 1.2 1.1 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0

1.364 1.364

0.617 0.545

0.273 0.193

All blocks FIGURE 3

number gap

Straight blocks

Split blocks

Comparison of total cost gap and total number gap for various block pools.

88

discussed. The average working time of runs was one of the performance measures for evaluation, and it showed that the results are of good quality. Further test results indicated that when the problem size grows, an optimal solution cannot be obtained with CPLEX, and the proposed heuristic can get near optimal solutions in seconds. In this proposed algorithm, all possible pieces are generated in the run-cutting process; however, in the matching process, not every possible partition is included. Future study may focus on including as many different partitions as possible to generate a larger candidate piece set. By including more matching possibilities, a better, near-optimal result may be expected. Also, vehicle scheduling and crew scheduling are considered independently in this study. An integrated approach for solving vehicle scheduling and crew scheduling simultaneously may be considered to further optimize the results.

REFERENCES 1. Hartley, T. A Glossary of Terms in Bus and Crew Scheduling. In Computer Scheduling of Public Transport Urban Passenger Vehicle and Crew Scheduling: Proceedings of the Second International Workshop on Computer-Aided Scheduling of Public Transport (A. Wren, ed.), Leeds, United Kingdom, 1981. 2. Desaulniers, G., J. Desrosiers, Y. Dumas, S. Marc, B. Rioux, M. Solomon, and F. Soumis. Crew Pairing at Air France. European Journal of Operational Research, Vol. 97, 1997, pp. 245–259. 3. Cordeau, J., G. Stojkovid, F. Soumis, and J. Desrosiers. Benders Decomposition for Simultaneous Aircraft Routing and Crew Scheduling. GERAD, Ecole Polytechnique de Montreal, Montreal, Quebec, Canada, 2000. 4. Kroon, L. G., and M. Fischetti. Crew Scheduling for Netherlands Railways, Destination: Customer. In Computer-Aided Scheduling of Public Transport (S. Voss and J. R. Daduna, eds.), Springer, Berlin, 2001, pp. 181–201. 5. Abbink, E., M. Fischetti, L. Kroon, G. Timmer, and M. Vromans. Reinventing Crew Scheduling at Netherlands Railways. Interfaces, Vol. 35, 2005, pp. 393–401. 6. Bodin, L. D., B. Golden, A. Assad, and M. O. Ball. Routing and Scheduling of Vehicles and Crews: The State of the Art. Computers and Operations Research, Vol. 10, 1983, pp. 63–211. 7. Wren, A., and J. M. Rousseau. Bus Driver Scheduling: An Overview. In Computer-Aided Transit Scheduling (J. R. Daduna, I. Branco, and J. M. P. Paixao, eds.), Springer-Verlag, Berlin, 1995, pp. 173–187. 8. Cavique, L., C. Rego, and I. Themido. Subgraph Ejection Chains and Tabu Search for the Crew Scheduling Problem. Journal of the Operational Research Society, Vol. 50, 1999, pp. 608–616. 9. Blais, J. Y., and J. M. Rousseau. Overview of HASTUS Current and Future Versions. Proc., Fourth International Workshop on ComputerAided Scheduling of Public Transport, Hamburg, Germany, 1987. 10. Ball, M. O., L. Bodin, and R. Dial. A Matching Based Heuristic for Scheduling Mass Transit Crews and Vehicles. Transportation Science, Vol. 17, No. 1, 1983. 11. Mitra, G., and K. Darby-Dowman. CRU-SCHED: A Computer-Based Bus Crew Scheduling System Using Integer Programming. In Computer Scheduling of Public Transport, Vol. 2 (J. M. Rousseau, ed.), 1985, pp. 223–232.

Transportation Research Record 2197

12. Desrochers, M., and F. Soumis. A Column Generation Approach to the Urban Transit Crew Scheduling Problem. Transportation Science, Vol. 23, 1989, pp. l–13. 13. Beasley, J. E., and B. Cao. A Tree Search Algorithm for the Crew Scheduling Problem. European Journal of Operational Research, Vol. 94, 1996, pp. 517–526. 14. Huisman, D., R. Freling, P. Albert, and M. Wagelmans. Multiple-Depot Integrated Vehicle and Crew Scheduling. Transportation Science, Vol. 39, No. 4, 2005, pp. 491–502. 15. Banihashemi, M., and A. Haghani. A New Model for the Mass Transit Crew Scheduling Problem. In Computer-Aided Scheduling of Public Transport: Lecture Notes in Economics and Mathematical Systems, Vol. 505 (S. Voss and J. R. Daduna, eds.), Springer-Verlag, Berlin, 2001, pp. 1–15. 16. Paixao, J. M. P. Transit Crew Scheduling on a Personal Workstation. Operational Research, Vol. 90, 1990, pp. 421–432. 17. Clement, R., and A. Wren. Greedy Genetic Algorithms, Optimizing Mutations and Bus Driver Scheduling. In Computer-Aided Transit Scheduling: Lecture Notes in Economics and Mathematical Systems, Vol. 430 (J. R. Daduna, I. Branco, and J. M. P. Paixao, eds.), Springer-Verlag, Berlin, 1995, pp. 213–235. 18. Li, J., and R. S. K. Kwan. A Fuzzy Genetic Algorithm for Driver Scheduling. European Journal of Operational Research, Vol. 147, 2003, pp. 334–344. 19. Darby-Dowman, K., J. K. Jachnik, R. L. Lewis, and G. Mitra. Integrated Decision Support Systems for Urban Transport Scheduling: Discussion of Implementation and Experience. In Computer-Aided Transit Scheduling: Proceedings of the Fourth International Workshop (J. R. Daduna and A. Wren, eds.), Springer Verlag, Berlin, 1988, pp. 226–239. 20. Gaffi, A., and M. Nonato. An Integrated Approach to Extra-Urban Crew and Vehicle Scheduling. In Computer-Aided Transit Scheduling (N. H. M. Wilson, ed.), Springer-Verlag, Berlin, 1999, pp. 103–128. 21. Haase, K., G. Desaulniers, and J. Desrosiers. Simultaneous Vehicle and Crew Scheduling in Urban Mass Transit Systems. Transportation Science, Vol. 35, 2001, pp. 286–303. 22. Freling, R., A. P. M. Wagelmans, and J. M. P. Paixao. An Overview of Models and Techniques for Integrating Vehicle and Crew Scheduling. In Computer-Aided Transit Scheduling (N. H. M. Wilson, ed.), Springer-Verlag, Berlin, 1999, pp. 441–460. 23. Freling, R., D. Huisman, and A. P. M. Wagelmans. Models and Algorithms for Integration of Vehicle and Crew Scheduling. Journal of Scheduling, Vol. 6, 2003, pp. 63–85. 24. Coffman, E. G. (ed.). Computer and Job-Shop Scheduling Theory. John Wiley and Sons, New York, 1976. 25. Coffman, E. G., M. R. Garey, and D. S. Johnson. Approximation Algorithms for Bin Packing: A Survey. In Approximation Algorithms for NP-Hard Problems (D. Hochbaum, ed.), PWS Publishing, Boston, 1996, pp. 46–93. 26. Johnson, D. S., A. Demers, J. D. Ullman, M. R. Garey, and R. L. Graham. Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms. SIAM Journal on Computing, Vol. 3, 1974, pp. 299–326. 27. Pine, R., J. Niemeyer, and R. Chisholm. TCRP Report 30: Transit Scheduling: Basic and Advanced Manuals, TRB, National Research Council, Washington, D.C., 1998. 28. Fischetti, M., S. Martello, and P. Toth. The Fixed Job Schedule Problem with Working-Time Constraints. Operations Research, Vol. 37, 1989, pp. 395–403. The Transportation Network Modeling Committee peer-reviewed this paper.