Spring 2000IE 5141 Topic 36 Reservation Systems without Slack.
-
date post
20-Dec-2015 -
Category
Documents
-
view
216 -
download
1
Transcript of Spring 2000IE 5141 Topic 36 Reservation Systems without Slack.
Spring 2000 IE 514 1
Topic 36
Reservation Systems without Slack
Spring 2000 IE 514 2
Overview of Service Industry Models
(Lot sizing)
Reservation systems
Timetabling
Workforce scheduling
Spring 2000 IE 514 3
Reservation without Slack
Reservation system with m machines, n jobs
Release date rj, due date dj, weight wj
No slack
If processed job must start at time rj
Should we process the job? Maximize number of jobs processed
rjj rdp
Spring 2000 IE 514 4
Example: A Car Rental
Four types of cars: subcompact, midsize, full size, and sport utility
Fixed number of eachMachine = type of carJob = customer requesting a carMay request certain machine(s)
Job can be processed on a subset of machines
Spring 2000 IE 514 5
Problem Formulation
Integer Programming ProblemsFixed time periodsAssume H periodsLet xij be 1 if job j assigned to ith
machine (and zero otherwize)
Hlmix
njx
lJjij
m
iij
,...,1 ,,...,1 1
,...,1 ,11
Job requiringprocessing inperiod l
Spring 2000 IE 514 6
Feasibility Problem
Can we process every job?
Can we assign jobs to machines such that job j is assigned to a set Mj of machines
Relatively easy to solve
Spring 2000 IE 514 7
Optimization Problem
Maximize the total profit
In general NP-hardSpecial solvable cases
All processing times = 1 Decomposition into separate time units
m
i
n
jijijxw
1 1
Spring 2000 IE 514 8
Identical Weights and Machines
Assume wj = 1 and Mj = {1,2,…,m}Do not have a time decompositionSimple algorithm maximizes number
of jobs that are processed
Order jobs in increasing release date order
nrrr ...21
Spring 2000 IE 514 9
Algorithm
Step 1Set J= and j=1
Step 2If a machine available at time rj assign job j to the machine,
include it in J and go to Step 4
Step 3Select j* such that
If do not include j in J and go to Step 4Else delete job j* from J, assign j to freed machine & include in
J
Step 4If j=N STOP; otherwise set j=j+1 and go back to Step 2
*jjjj CprC kk
Jkk
JkjprCC
maxmax*
Spring 2000 IE 514 10
Unlimited Machines
No slack, arbitrary processing times, equal weights, identical machines
Infinitely many machines in parallelMinimize the number of machines
used
Easily solvedOrder jobs as before
Spring 2000 IE 514 11
Algorithm
Assign job 1 to machine 1Suppose first j-1 jobs have been
processedTry to assign jth job to a machine in useIf not possible assign to a new machine
Graph theory: node coloring problem
Spring 2000 IE 514 12
Node Coloring Problem
Consider a graph with n nodes If an arc (j,k) connects nodes j and k
they cannot be colored with the same color
How many colors do we need to color the graph?
Number of colors needed = Number of machines needed
Spring 2000 IE 514 13
Topic 37
Reservation Systems with Slack
Spring 2000 IE 514 14
Reservation with Slack
Now allow slack
Trivial case all processing times = 1, identical
weights, identical machines decomposition in time
rjj rdp
Spring 2000 IE 514 15
General Equal Processing Times
Now assume processing times are equal to some p 2
Interaction between time unitsBarriers algorithm
wait for critical jobs to be released start the job with the earliest deadline
Slot number l = lth job to startS(l) starting time of lth slot
Spring 2000 IE 514 16
Barrier Algorithm
Barrier ordered pair (l,r) constraint
A k-partial scheduleStarting with a k-partial schedule
construct a (k+1)-partial schedule add a new barrier to the barrier list Lb
and start over from scratch
Slotnumber Release
time
Spring 2000 IE 514 17
Earliest Deadline with Barriers
Selects machine h for job in (k+1)st slot
Compute the starting time
otherwisemod)1(
of multiple 1
mk
mkmh
4321 ,,,max tttt
Spring 2000 IE 514 18
Computing the Starting Time
Let be the earliest time the job can start 4321 ,,,max tttt
)(),...,1(max1 kSSt Minimumrelease dateof jobs left
otherwise)1(
103 pmkS
mkt
bLrkrt ),1(:max4
Spring 2000 IE 514 19
Selecting a Job
Select for (k+1)th slot job j’ with the earliest deadline
If creation of (k+1) partial schedule was successful
Otherwise a ‘crisis’ occurred and job j’ is a ‘crisis job’
Crisis routine
'jd
pdj
'
Spring 2000 IE 514 20
Crisis Routine
Backtracks to find job with the latest starting time such that the deadline is greater than the crisis job
If no such job, optimal schedule does not include crisis job
Otherwise this job is a pull jobAdd new barrier with the minimum
release time r* of all the jobs Jr after the pull job
Start over with the barrier list
Spring 2000 IE 514 21
Example: 2 machines, 4 jobs
Jobs 1 2 3 4
rj 0 2 5 5
dj 20 30 19 30
Processing time p = 10
Spring 2000 IE 514 22
Barriers Algorithm
0 10 20 30
Machine 1
Machine 2
1
2
3
Spring 2000 IE 514 23
Barriers Algorithm
0 10 20 30
Machine 1
Machine 2
1
2
3
193 d
Crisis job
Pull job
Spring 2000 IE 514 24
Barriers Algorithm
Found a crisis job and a pull job exists:
Setup a barrier Lb={(2,5)}
Setup restricted set Jr={3}
Start from scratch
Spring 2000 IE 514 25
Barriers Algorithm
0 10 20 30
Machine 1
Machine 2
1
3
2
4
Optimal Schedule
Second iteration:
Spring 2000 IE 514 26
Generalizations
Non-identical processing times NP-hard No efficient algorithm exists Need heuristics
Composite dispatching rule Preprocessing: flexibility of jobs and
machines Dispatch least flexible job first on the least
flexible machine, etc
Spring 2000 IE 514 27
Preprocessing
Let jk be the number of jobs that can be processed on machine j in the slot [k-1,k]
Let Mj be the number of machines job j can be processed on
Spring 2000 IE 514 28
Priority Indices
Priority index for jobs
Priority index for machines
|)|,/( jjjj MpwfI
j
j
j
pkikiki
j
p
llki
pkikiki pg
,2,1,
1,
,2,1,
,...,,max
),...,,(
Low values =high priority
Spring 2000 IE 514 29
AlgorithmStep 0
Calculate both priority indicesOrder jobs according to job priority index (Ij)
Step 1Set j=1
Step 2For job j select the machine and time slot with lowest rankDiscard job j if it cannot be processed at all
Step 3If j=n STOP; otherwise set j=j+1 and go back to Step 2
Spring 2000 IE 514 30
Topic 38
Timetabling
Spring 2000 IE 514 31
Timetabling
Infinite identical machines in parallelAll of n jobs must be processedTooling constraints
Many tools Need one or more tools for each job
Resource constraints Single resource of quantity R Need certain amount for each job
Spring 2000 IE 514 32
Tooling Constraints
One of each toolObjective: minimize makespan
Special case of resource-constrained project scheduling problem with one of each resource, that is, Ri = 1
Spring 2000 IE 514 33
Problem Complexity
NP-hard
Assume all processing times = 1
Decomposition?
Equivalent to node coloring problem
Spring 2000 IE 514 34
Node Coloring Problem
Job = nodeJobs need same tool = arc between
nodes
Feasibility problem: Can the graph be colored with H colors?
Optimization problem: What is the lowest number of colors
needed? Chromatic number of the graph
Spring 2000 IE 514 35
Relation to Reservation Models
Closely related to reservation problem with zero slack and arbitrary processing times
Special case of timetabling problem tools in common = overlapping time slots tools in common nodes connected colors = machines minimizing colors = minimizing machines adjacent time slots vs tools need not be adjacent
Spring 2000 IE 514 36
Heuristics
Many heuristics exist for graph coloring degree of node = number of arcs connected to
node saturation level = number of colors connected to
node
Intuition: Color high degree nodes first Color high saturation level nodes first
Spring 2000 IE 514 37
Algorithm
Step 1Order nodes in decreasing order of degree
Step 2Use color 1 for first node
Step 3Choose uncolored node with maximum saturation
level, breaking ties according to degreeStep 4
Color using the lowest possible number colorStep 5
If all nodes colored, STOP; otherwise go back to Step 3
Spring 2000 IE 514 38
Topic 39
Example: Scheduling Meetings
Spring 2000 IE 514 39
Example
Schedule 5 meetings with 4 people meetings = jobs and people = tools all meetings take one hour
1 2 3 4 5
Joe 1 1 0 1 1
Lisa 1 1 1 0 0
Jane 1 0 1 0 0
Larry 0 1 0 1 1
Spring 2000 IE 514 40
Corresponding Graph
1
2
5 4
3
Degree =4
Degree =2Degree =4
Degree =3Degree =3
Spring 2000 IE 514 41
Select First Job
Can select either job 1 or 2 firstSay, select 1 and color with the first
color
1
2
5 4
3Saturation level = 1for every node
Select 2 becausehighest degree
Spring 2000 IE 514 42
Color Second Job
Color Job 2 with the next color
1
5 4
3
2 Saturation level = 2for every node
Select 4 becausehighest degree
Spring 2000 IE 514 43
Color Third Job
Color Job 4 with the next color
1
5 4
3
2 Saturation level = 2 for node 3 3 for node 5
Select 5 next
Spring 2000 IE 514 44
Color Fourth Job
Color Job 5 with the next color
1
5 4
3
2
Select 3 next
Spring 2000 IE 514 45
Color Final Job
Color Job 3 with same color as Job 4
1
5 4
3
2
Had to use 4 colors Makespan = 4
Spring 2000 IE 514 46
Example
Suppose now we have a reservation system:
Job 1 2 3
jp 2 3 1
jr 0 2 3
jd 2 5 4
Spring 2000 IE 514 47
Equivalent Timetabling Problem
Job 1 2 3
Tool 1 1 0 0
Tool 2 1 0 0
Tool 3 0 1 0
Tool 4 0 1 1
Tool 5 0 1 0Toool 5
Job 1 mustbe processedin time [0,2]
Job 2 mustbe processedin time [2,5]
Spring 2000 IE 514 48
Topic 40
Timetabling with Resource Constraints
Spring 2000 IE 514 49
Resource Constraints
One type of tool but R units of it (resource)
Job j needs Rj units of this resource
Clearly, if Rj + Rk > R then job j and k cannot be processed at the same time, etc
Applications scheduling a construction project (R=crew
size) exam scheduling (R=number of seats)
Spring 2000 IE 514 50
Bin-Packing
Assume all processing times = 1Unlimited number of machinesMinimize makespanEquivalent to bin-packing problem
each bin has capacity R item of size Rj
Pack into the minimum number of bins
Spring 2000 IE 514 51
Solving the Bin-Packing Problem
Known to be NP-hardMany heuristics developedFirst fit (FF) heuristic
Always but an item in the first bin it fits into
Know that2)OPT(
10
17)FF( maxmax CC
Spring 2000 IE 514 52
Example
Assume 18 items and R=2100 Jobs 1-6 require 301 resources Jobs 7-12 require 701 resources Jobs 13-18 require 1051 resources
FF heuristic: We assign the first 6 jobs to one interval
(3016=1806) We then assign jobs two at a time to next 3 intervals
(7012=1402) We then assign just one of the remaining jobs to
each interval
Very poor performance due to order of jobs
Spring 2000 IE 514 53
First Fit Decreasing (FFD)
An improvement of FF:Order jobs in decreasing order firstKnow that
FF and FFD can be extended to different release dates
4)OPT(9
11)FFD( maxmax CC
Spring 2000 IE 514 54
Discussion
Only considered very simple models
In practice: Dynamic reservation systems Price considerations (yield
management)
Spring 2000 IE 514 55
Topic 41
Workforce Scheduling
Spring 2000 IE 514 56
Workforce Scheduling
Overview: Days-Off Scheduling Shift Scheduling Cyclic Staff Problem Crew Scheduling Simultaneous Worker and Job
Scheduling
Spring 2000 IE 514 57
Days-Off Scheduling
Number of workers assigned to each day
Fixed size of workforce
Problem: find minimum number of employees to cover a weeks operation
Spring 2000 IE 514 58
Constraints
Demand per day nj, j=1,2,…,7
k1 out of every k2 weekends (day 1&7) off
Work 5 out of 7 daysWork no more than 6 consecutive
days
Spring 2000 IE 514 59
Optimal Schedule
Algorithm for one week
Repeat for next week
Cyclic schedule when repeat
Spring 2000 IE 514 60
Lower Bounds on Minimum Workforce W
Weekend constraint
Total demand constraint
Maximum daily demand constraint
1
12
712 ,maxB
kk
nnkW
2
7
15
1BnW
jj
3721 ,...,,max BnnnW
Spring 2000 IE 514 61
Optimal Schedule
Define
Have
7,1
6,...,2
,max
,,max
71
321
jnn
jnWu
nnn
BBBW
j
jj
nuj
j 27
1
Spring 2000 IE 514 62
Algorithm
Schedule weekends off
Determine additional off days
Categorize employees
Assign off-day pairs
Spring 2000 IE 514 63
Optimality
Can be shown that schedule is feasible
Schedule is optimal
Why?
A cyclic optimal schedule exists
Spring 2000 IE 514 64
Topic 42
Shift Scheduling
Spring 2000 IE 514 65
Shift Scheduling
Fixed cycle of length m periodsHave bi people assigned to ith periodHave n shift patterns:
Cost cj of assigning a person to shift j
Decision variable: xj = people assigned to j
),...,,( 21 mjjj aaa
Spring 2000 IE 514 66
Integer Program
0
...
...
...
2211
22222121
11212111
j
mnmnmm
nn
nn
x
bxaxaxa
bxaxaxa
bxaxaxa
nnxcxcxc ...2211Minimize
Subject to
Spring 2000 IE 514 67
Solution
NP-hard in general
Special structure in shift pattern matrix
Solve LP relaxation Solution always integer when each column
contains a contiguous set of ones
Spring 2000 IE 514 68
Topic 43
Cyclic Staffing
Spring 2000 IE 514 69
Cyclic Staffing Problem
An m-period cyclic scheduleMinimize costConstraint bi for ith periodEach worker works for k consecutive
periods and is free for the next m-kExample: (5,7)-cyclic staffing
problem
Spring 2000 IE 514 70
Integer Program Formulation
Shift patterns:
1111100
0111110
0011111
1001111
1100111
1110011
1111001
A
Spring 2000 IE 514 71
Solution
Solution to LP relaxation ‘almost right’STEP 1: Solve LP relaxation to get
if integer STOP; otherwise continueSTEP 2: Formulate two new LPs with
The best integer solution is optimal
''' ,...,,21 nxxx
'''
21
'''21
......
......
21
21
nn
nn
xxxxxx
xxxxxx
Spring 2000 IE 514 72
Example
(3,5)-cyclic staffing problem
7
4
6
4
3
11100
01110
00111
10011
11001
bA
Spring 2000 IE 514 73
Solution
Solve the LP relaxation
cxx
min
0x
bAxS.t.
)5.2,0,5.4,0,5.1(' xNon-integer
Spring 2000 IE 514 74
Solution
Add together:
Add constraint
No feasible solutionAdd constraint
Solution:
5.85.205.405.1
854321 xxxxx
854321 xxxxx
)2,1,4,0,2(x Optimal
Spring 2000 IE 514 75
Days-Off Scheduling
We can represent our days-off scheduling problem as a cyclic staffing problem as long as we can determine all the shift patterns
Difficulty: unknown cycle length
Difficulty: many patterns larger problem
Spring 2000 IE 514 76
Example
Two days off in a week + no more than 6 consecutive workdays
1100
0011
0111
1111
1111
1010
1101
0111
0111
1111
1111
1111
1000
1000
A
Spring 2000 IE 514 77
Cyclic Staffing with Overtime24-hour operation8-hour shifts with up to 8 hour
overtime
1U0
01U
U01
A
100000000
110000000
111000000
111100000
111110000
111111000
111111100
111111110
U
Spring 2000 IE 514 78
Penalties for Under/Overstaffing
Demand not fixed Linear penalty for understaffing Linear penalty for overstaffing Let denote the level of understaffing
IP
'ic''ic
'ix
0, '
'
xx
bxx IA
'''''min xxbcxcxc A
Spring 2000 IE 514 79
Topic 44
Crew Scheduling
Spring 2000 IE 514 80
Crew Scheduling
Have m jobs, say flight legsHave n feasible combination of jobs
a crew is permitted to do
1 2
3 45
6
6m
Set partitioningproblem
Spring 2000 IE 514 81
Notation
Cost cj of round trip jDefine
otherwise0
tripround ofpart is leg if1 jiaij
otherwise0
selected is tripround if1 jx j
Spring 2000 IE 514 82
Integer Program
1,0
1...
1...
1...
2211
2222121
1212111
j
nmnmm
nn
nn
x
xaxaxa
xaxaxa
xaxaxa
nnxcxcxc ...2211Minimize
Subject to
Spring 2000 IE 514 83
Set Partitioning
Constraints called partitioning equations
The positive variables in a feasible solution called a partition l
NP-HardWell studied like TSP, graph-coloring,
bin-packing, etc.
}1:{ lj
l xjJ
Spring 2000 IE 514 84
Row Prices
Say that
is a set of feasible row prices if for
Cost of covering a job
),...,,( 21lm
lll
m
ijij
li ca
1
lJj
Spring 2000 IE 514 85
Change Partition
Let Z1 (Z1) denote the objective value of partition 1 (2)
Then
Potential savings of including column j is
If all negative then optimal
2 1
112
Jj
m
ijiji caZZ
m
ijijij ca
1
1
Spring 2000 IE 514 86
Heuristic
Start with some partitionConstruct a new partition as follows:
Find the column with highest potential savings
Include this column in new partition If all jobs covered stop; otherwise
repeat
Spring 2000 IE 514 87
ConnectionsHere
Production requirements per shift fixed Optimize number of people per shift
Timetabling with resource constraints Number of people fixed Optimize job schedule Determines production requirements per
shiftOptimize simultaneously!