the crew scheduling problemeaton.math.rpi.edu/faculty/mitchell/courses/matp6620/... ·...
TRANSCRIPT
The Crew Scheduling Problem
John E. Mitchell
Department of Mathematical SciencesRPI, Troy, NY 12180 USA
April 2019
Mitchell The Crew Scheduling Problem 1 / 21
The Set Partitioning Problem
Outline
1 The Set Partitioning Problem
2 Crew scheduling
3 A crew scheduling example
4 Branch-and-price
Mitchell The Crew Scheduling Problem 2 / 21
The Set Partitioning Problem
The set partitioning problem
We have m objects and we have n subsets Sj ⊆ {1, . . . ,m} of theobjects.
Each subset has a cost cj .
We wish to choose a minimum cost collection of subsets so that eachobject appears in exactly one of the chosen subsets.
We use a binary variable:
xj =
{1 if set Sj is chosen0 otherwise
for j = 1, . . . ,n
Mitchell The Crew Scheduling Problem 3 / 21
The Set Partitioning Problem
Integer programming formulationWe can formulate this as an integer program:
minx∈Rn∑n
j=1 cjxj
subject to∑
j:i∈Sjxj = 1 for i = 1, . . . ,mx binary
The LP relaxation is:
minx∈Rn∑n
j=1 cjxj
s.t.∑
j:i∈Sjxj = 1 for i = 1, . . . ,mx ≥ 0
Its dual is
maxy∈Rm∑m
i=1 yis.t.
∑i∈Sj
yi ≤ cj for j = 1, . . . ,n
Mitchell The Crew Scheduling Problem 4 / 21
Crew scheduling
Outline
1 The Set Partitioning Problem
2 Crew scheduling
3 A crew scheduling example
4 Branch-and-price
Mitchell The Crew Scheduling Problem 5 / 21
Crew scheduling
Crew scheduling
Set partitioning problems often arise as alternative formulations ofother problems.
For example, in the airline industry, it is desired to assign crews toflights.
This could be formulated by using a binary variable to indicate whethera crew is on a particular flight.
Mitchell The Crew Scheduling Problem 6 / 21
Crew scheduling
Drawbacks
There are some drawbacks to this approach:We need to impose flow conservation constraints for the crews. Itis desirable that they begin and end at their home base, so theycover a cycle. The cost of the crew flying a particular leg doesn’tdepend just on that leg, but rather on the whole cycle: itdetermines their overtime rate, and it imposes limits to ensure thecrew is not fatigued, for example.There is a lot of symmetry. Eg, two crews from the same homebase can be switched between cycles.
Mitchell The Crew Scheduling Problem 7 / 21
Crew scheduling
Drawbacks
There are some drawbacks to this approach:We need to impose flow conservation constraints for the crews. Itis desirable that they begin and end at their home base, so theycover a cycle. The cost of the crew flying a particular leg doesn’tdepend just on that leg, but rather on the whole cycle: itdetermines their overtime rate, and it imposes limits to ensure thecrew is not fatigued, for example.There is a lot of symmetry. Eg, two crews from the same homebase can be switched between cycles.
Mitchell The Crew Scheduling Problem 7 / 21
Crew scheduling
Column generation approach
Thus, in practice, the airlines use a crew pairing approach.
They generate lots of cycles (called crew pairings) and see if all theirflights can be partitioned up between these cycles.
This is a set partitioning problem.
Typically, it has far more possible cycles than flights, so n >> m.
Thus, we use a column generation approach, with cycles generateddynamically.
Mitchell The Crew Scheduling Problem 8 / 21
Crew scheduling
Column generation algorithm to solve LP relaxation ofcrew scheduling
1 Initialize with a collection S of possible crew pairings.2 Solve the primal relaxation of the partitioning problem and its
dual with the current collection of pairings. Obtain solutions x , y .3 Look for more pairings: Search for additional pairings Sj with∑
i∈Sjyi > cj .
4 Terminate: If no violated dual pairing constraints found, STOPwith optimal solution.
5 Loop: Else, add a subset of the violated dual constraints to thedual problem, and add the corresponding columns to the primalproblem. Return to Step 2.
Mitchell The Crew Scheduling Problem 9 / 21
Crew scheduling
Column generation algorithm to solve LP relaxation ofcrew scheduling
1 Initialize with a collection S of possible crew pairings.2 Solve the primal relaxation of the partitioning problem and its
dual with the current collection of pairings. Obtain solutions x , y .3 Look for more pairings: Search for additional pairings Sj with∑
i∈Sjyi > cj .
4 Terminate: If no violated dual pairing constraints found, STOPwith optimal solution.
5 Loop: Else, add a subset of the violated dual constraints to thedual problem, and add the corresponding columns to the primalproblem. Return to Step 2.
Mitchell The Crew Scheduling Problem 9 / 21
Crew scheduling
Column generation algorithm to solve LP relaxation ofcrew scheduling
1 Initialize with a collection S of possible crew pairings.2 Solve the primal relaxation of the partitioning problem and its
dual with the current collection of pairings. Obtain solutions x , y .3 Look for more pairings: Search for additional pairings Sj with∑
i∈Sjyi > cj .
4 Terminate: If no violated dual pairing constraints found, STOPwith optimal solution.
5 Loop: Else, add a subset of the violated dual constraints to thedual problem, and add the corresponding columns to the primalproblem. Return to Step 2.
Mitchell The Crew Scheduling Problem 9 / 21
Crew scheduling
Column generation algorithm to solve LP relaxation ofcrew scheduling
1 Initialize with a collection S of possible crew pairings.2 Solve the primal relaxation of the partitioning problem and its
dual with the current collection of pairings. Obtain solutions x , y .3 Look for more pairings: Search for additional pairings Sj with∑
i∈Sjyi > cj .
4 Terminate: If no violated dual pairing constraints found, STOPwith optimal solution.
5 Loop: Else, add a subset of the violated dual constraints to thedual problem, and add the corresponding columns to the primalproblem. Return to Step 2.
Mitchell The Crew Scheduling Problem 9 / 21
Crew scheduling
Column generation algorithm to solve LP relaxation ofcrew scheduling
1 Initialize with a collection S of possible crew pairings.2 Solve the primal relaxation of the partitioning problem and its
dual with the current collection of pairings. Obtain solutions x , y .3 Look for more pairings: Search for additional pairings Sj with∑
i∈Sjyi > cj .
4 Terminate: If no violated dual pairing constraints found, STOPwith optimal solution.
5 Loop: Else, add a subset of the violated dual constraints to thedual problem, and add the corresponding columns to the primalproblem. Return to Step 2.
Mitchell The Crew Scheduling Problem 9 / 21
Crew scheduling
In practice
In practice, the search for pairings takes the majority of the solutiontime.
Once we’ve solved the LP relaxation, we can then try to solve theinteger program, requiring each xi be binary.
We can embed this method to solve the relaxation within abranch-and-bound algorithm.
Mitchell The Crew Scheduling Problem 10 / 21
A crew scheduling example
Outline
1 The Set Partitioning Problem
2 Crew scheduling
3 A crew scheduling example
4 Branch-and-price
Mitchell The Crew Scheduling Problem 11 / 21
A crew scheduling example
ExampleConsider five cities and ten flights. Assume the timings of the flightscan be adjusted if necessary so that any crew pairing is feasible.
A B
C
D
E
Say we have five initial pairings:1 ABCDEA with cost 452 ADBECA with cost 553 ABEA with cost 244 ADEA with cost 235 BCADB with cost 43.
Mitchell The Crew Scheduling Problem 12 / 21
A crew scheduling example
ExampleConsider five cities and ten flights. Assume the timings of the flightscan be adjusted if necessary so that any crew pairing is feasible.
A B
C
D
E
Say we have five initial pairings:1 ABCDEA with cost 452 ADBECA with cost 553 ABEA with cost 244 ADEA with cost 235 BCADB with cost 43.
Mitchell The Crew Scheduling Problem 12 / 21
A crew scheduling example
ExampleConsider five cities and ten flights. Assume the timings of the flightscan be adjusted if necessary so that any crew pairing is feasible.
A B
C
D
E
Say we have five initial pairings:1 ABCDEA with cost 452 ADBECA with cost 553 ABEA with cost 244 ADEA with cost 235 BCADB with cost 43.
Mitchell The Crew Scheduling Problem 12 / 21
A crew scheduling example
ExampleConsider five cities and ten flights. Assume the timings of the flightscan be adjusted if necessary so that any crew pairing is feasible.
A B
C
D
E
Say we have five initial pairings:1 ABCDEA with cost 452 ADBECA with cost 553 ABEA with cost 244 ADEA with cost 235 BCADB with cost 43.
Mitchell The Crew Scheduling Problem 12 / 21
A crew scheduling example
ExampleConsider five cities and ten flights. Assume the timings of the flightscan be adjusted if necessary so that any crew pairing is feasible.
A B
C
D
E
Say we have five initial pairings:1 ABCDEA with cost 452 ADBECA with cost 553 ABEA with cost 244 ADEA with cost 235 BCADB with cost 43.
Mitchell The Crew Scheduling Problem 12 / 21
A crew scheduling example
Initial LP relaxation
minx 45x1 +55x2 +24x3 +23x4 +35x5subject to x1 +x3 = 1 AB
x1 +x5 = 1 BCx1 = 1 CDx1 +x4 = 1 DEx1 +x3 +x4 = 1 EA
x2 +x4 +x5 = 1 ADx2 +x5 = 1 DBx2 +x3 = 1 BEx2 = 1 ECx2 +x5 = 1 CA
xj ≥ 0, j = 1, . . . ,5
Mitchell The Crew Scheduling Problem 13 / 21
A crew scheduling example
Dual problem
maxy yAB +yBC +yCD +yDE +yEA +yAD +yDB +yBE +yEC +yCA
subject to yAB +yBC +yCD +yDE +yEA ≤ 45
yAD +yDB +yBE +yEC +yCA ≤ 55
yAB +yEA +yBE ≤ 24
yDE +yEA +yAD ≤ 23
yBC +yAD +yDB +yCA ≤ 35
Mitchell The Crew Scheduling Problem 14 / 21
A crew scheduling example
Optimal solution
The unique feasible (and hence optimal) primal solution isx = (1,1,0,0,0), with value 100.
One optimal dual solution is yAB = 24, yCD = 21, yAD = 23, yDB = 12,yEC = 20, all other ye = 0, also with value 100.
We now check dual feasibility for other pairings.
Say the pairing ECDE has cost 37.
This uses the three edges (E ,C), (C,D), and (D,E). We have
yEC + yCD + yDE = 20 + 21 + 0 = 41 > 37.
Thus, we have a violated dual constraint, which we add to the problem.
Mitchell The Crew Scheduling Problem 15 / 21
A crew scheduling example
Updated dual of LP relaxation
maxy yAB +yBC +yCD +yDE +yEA yAD +yDB +yBE +yEC +yCA
subject to yAB +yBC +yCD +yDE +yEA ≤ 45
yAD +yDB +yBE +yEC +yCA ≤ 55
yAB +yEA +yBE ≤ 24
yDE +yEA +yAD ≤ 23
yBC +yAD +yDB +yCA ≤ 35
yCD +yDE +yEC ≤ 37
Mitchell The Crew Scheduling Problem 16 / 21
A crew scheduling example
Optimal dual solution
One optimal dual solution is yAB = 24, yBC = 21, yEC = 37, yCA = 14,all other ye = 0, with value 96.
Mitchell The Crew Scheduling Problem 17 / 21
A crew scheduling example
The updated primal problem
minx 45x1 +55x2 +24x3 +23x4 +35x5 +37x6
subject to x1 +x3 = 1 ABx1 +x5 = 1 BCx1 +x6 = 1 CDx1 +x4 +x6 = 1 DEx1 +x3 +x4 = 1 EA
x2 +x4 +x5 = 1 ADx2 +x5 = 1 DBx2 +x3 = 1 BEx2 +x6 = 1 ECx2 +x5 = 1 CA
xj ≥ 0, j = 1, . . . , 5
Mitchell The Crew Scheduling Problem 18 / 21
A crew scheduling example
Optimal solution
The unique optimal primal solution is x = (0,0,1,0,1,1), with value 96.
For this example, solving the LP relaxation gives a binary solution. Ingeneral, we may need to branch and/or cut.
Mitchell The Crew Scheduling Problem 19 / 21
Branch-and-price
Outline
1 The Set Partitioning Problem
2 Crew scheduling
3 A crew scheduling example
4 Branch-and-price
Mitchell The Crew Scheduling Problem 20 / 21
Branch-and-price
Branch-and-price
Conceptually, we can solve set partitioning problems using thefollowing algorithm:
Solve the problem using branch-and-bound,with the LP relaxations solved using a column generationapproach.
This is known as a branch-and-price algorithm.
If we also use cutting planes, we have a branch-and-price-and-cutalgorithm.
There are various methods for constructing branching rules, which wediscuss in the next handout.
Mitchell The Crew Scheduling Problem 21 / 21
Branch-and-price
Branch-and-price
Conceptually, we can solve set partitioning problems using thefollowing algorithm:
Solve the problem using branch-and-bound,with the LP relaxations solved using a column generationapproach.
This is known as a branch-and-price algorithm.
If we also use cutting planes, we have a branch-and-price-and-cutalgorithm.
There are various methods for constructing branching rules, which wediscuss in the next handout.
Mitchell The Crew Scheduling Problem 21 / 21