Академический Документы
Профессиональный Документы
Культура Документы
Workforce Scheduling:
1.
2.
Examples
Monday
Bob
Ann
Sam
Don
4
Tuesday
Bob
Ann
Sam
Don
4
Wed.
Don
Ann
Mike
3
Thurs.
Bob
Ann
Mike
Sam
4
Friday
Bob
Ann
Mike
Sam
4
Saturday
Sam
Don
Mike
3
No. of employees
required
1
CONSTRAINTS:
1) Number of employees working on day j must be nj,
j=1,...,7
2) Each employee must have k1 out of every k2 weekends
off
3) Each employee works exactly 5 days in a week (Sun to
Sat)
4) An employee can work at most 6 consecutive days
2.
5W n j
j1
Then,
1 7
nj
5 j1
3.
Over k2 weekends:
(k 2 - k1 )W k 2 max(n1 , n 7 )
Then,
k 2 max(n1 , n 7 )
(k 2 - k1 )
Example:
Day j
1
Sun
Requirement 1
2
3
Mon Tue
0
3
4
Wed
3
5
6
Thurs Fri
3
3
7
Sat
2
nj
Each employee is given one out of three weekends off
3
1 7
15
nj 3
5 j1
5
,
so W>=3
Notation:
maximum weekend demand:
n = max(n1, n7)
Note that
7
j1
u j 5W 2n n j 2n
j1
Algorithm Overview:
Step 1: Schedule the weekends off
Assign the first weekend off to the first W-n
employees
Assign the 2nd weekend off to the 2nd W-n employees
Continue cyclically
Example (continued):
W=3, n=2, W-n =1, assign a weekend off to one employee
each week
Daily Surplus:
Day j
Uj
1
Sun
1
2
3
Mon Tue
3
0
4
Wed
0
5
6
Thurs Fri
0
0
7
Sat
0
REMARKS:
Days-off scheduling problem has an optimal
solution that is cyclic, i.e. the same pattern repeats
itself
Shift Scheduling:
IP Formulation
Define a constraint matrix A:
aij x j bi
Objective: Min
cjxj
c1 x1 c2 x 2 ... cn x n
a11 x1 a12 x2 ... a1n xn b1
a21 x1 a2 2 x2 ... a2 n xn b2
.
.
.
am1 x1 am 2 x2 ... am n xn bm
x j {0,1,2,...}
for
j 1,..., n
In matrix form:
Min cx
st
Ax >= b
x >= 0
x integer
Requirement bi
3
4
6
9
1 pm - 2 pm
2 pm - 3 pm
3 pm - 4 pm
4 pm - 5 pm
5 pm - 6 pm
6 pm - 7 pm
7 pm - 8 pm
2 pm - 9 pm
4
7
8
7
6
4
7
8
IP formulation:
Rows correspond to hours, columns to patterns
Constraint Matrix A:
Pattern :
Hour 1
Hour 2
Hour 3
Hour 4
Hour 5
Hour 6
Hour 7
Hour 8
Hour 9
Hour 10
Hour 11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
3
1
1
1
1
1
1
1
1
1
1
1
1
x1 + x3 + x4 >= 6
x1 + x2 + x3 >= 4
x1 + x2 + x3 >= 7
x1 + x2 + x3 >= 8
x1 + x2 + x3 >= 7
x1 + x2 + x3 >= 6
x2 + x5 >= 4
x2 + x5 >= 7
x2 + x5 >= 8
x1,...,x7 {0,1,2,...}
Clearly, we can eliminate some of the constraints
Min 50x1 + 60x2 + 30x3 + 15x4 + 16x5
s.t.
x1 + x4 >= 4
x1 + x3 + x4 >= 6
x1 + x2 + x3 >= 8
x2 + x5 >= 8
x1,...,x7 {0,1,2,...}
If the LP relaxation is solved, an integer solution is
obtained: x1 = 0, x2 = 0, x3 = 8, x4 = 4, x5 = 8
This solution is optimal for the IP, too.
REMARKS:
11
Cyclic Staffing
Problem:
such that
Number of employees during period i is at least bi
Each person works a shift of k consecutive periods
and is free the other m-k periods
Minimize
Assignment cost
Example: Cycle=7days,
A person works 5 consecutive days and takes 2 days off
IP formulation: Shift scheduling formulation
12
1001111
1100111
1110011
A 1111001
1111100
0111110
0011111
BUT,
Rounding Algorithm
Step 1.
Solve the LP relaxation, let x1*, ..., xn* be a solution
If x1*, ..., xn* are all integers, then
x* is optimal to the IP, STOP
Otherwise, go to Step 2.
Step 2.
Form two LPs, LP1 and LP2 by adding the
constraints
x1 x n x1* x n*
to LP1 and
x1 xn x1* xn*
to LP2
13
A 11100
01110
00111
3
4
b 6
4
7
c= (3.6,4.8,5.5,3.7,5.2)
IP formulation:
000000 111111
000000 101101
001111 011011
110001110111
A 111110 111110
111111 111111
111111 111111
111111 000000
The formulation:
Min cx + us + o(b-Ax -s)
st
Ax + Is >= b
x,s >= 0 and integer
Can be solved by the algorithm for cyclic staffing
16