© j. christopher beck 20051 lecture 5: project planning 2
TRANSCRIPT
© J. Christopher Beck 2005 1
Lecture 5: Project Planning 2
© J. Christopher Beck 2005 2
Outline Time/Cost Tradeoffs
Linear and non-linear Adding Workforce Constraints
Slides borrowed from Twente & Iowa See Pinedo CD
© J. Christopher Beck 2005 3
Time/CostTrade-Offs
What if you could spend money to reduce the job duration More money
shorter processing time
Run machine at higher speed
© J. Christopher Beck 2005 4
Linear Costs
Money
Processingtimemax
jp
ajc
bjc
minjp
maxminjjj ppp
minmaxjj
bj
aj
j pp
ccc
Marginal cost
© J. Christopher Beck 2005 5
Problem
Spend money to reduce processing times so as to minimize:
n
jjjj
bj ppccCc
1
maxmax0
“Overhead” cost Cost per activity
© J. Christopher Beck 2005 6
Solution Methods
Objective: minimum cost of project Time/Cost Trade-off Heuristic
Good schedules Works also for non-linear costs
Linear programming formulation Optimal schedules Non-linear version not easily solved
© J. Christopher Beck 2005 7
Source (dummy) node
Sink node
Minimal cut set
Cut set
Sources, Sinks, & Cuts
© J. Christopher Beck 2005 8
Step 1:
Set all processing times at their maximum
Determine all critical paths
Construct the graph Gcp of critical paths
maxjj pp
Time/Cost Trade-off Heuristic
© J. Christopher Beck 2005 9
Step 2:
Determine all minimum cut sets in Gcp
Consider those sets where all processing times are larger
than their minimum
If no such set STOP; otherwise continue to Step 3
cpjj Gjpp ,min
Time/Cost Trade-off Heuristic
© J. Christopher Beck 2005 10
Time/Cost Trade-Off Heuristic
Step 3:
For each minimum cut set:
Compute the cost of reducing all processing times by one
time unit.
Take the minimum cut set with the lowest cost
If this is less than the overhead per time unit go on to Step
4; otherwise STOP
© J. Christopher Beck 2005 11
Time/Cost Trade-Off Heuristic
Step 4:
Reduce all processing times in the minimum cut set by
one time unit
Determine the new set of critical paths
Revise graph Gcp and go back to Step 2
© J. Christopher Beck 2005 12
Example 4.4.2
j 1 2 3 4 5 6 7 8 9 10 11 12 13 14
pmaxj 5 6 9 12 7 12 10 6 10 9 7 8 7 5
pminj 3 5 7 9 5 9 8 3 7 6 4 5 5 2
cja 20 25 20 15 30 40 35 25 30 20 25 35 20 10
cj 7 2 4 3 4 3 4 4 4 5 2 2 4 8
Overhead: co = 6 (cost of project per time unit)
© J. Christopher Beck 2005 13
Step 1: Maximum Processing Times, Find Gcp
1
2
3
6 9
5 8
4 7
11
10
12 14
13
© J. Christopher Beck 2005 14
Step 1: Maximum Processing Times, Find Gcp
1
2
3
6 9
5 8
4 7
11
10
12 14
13
56max C
Cost = overhead + job costs = co * Cmax + Σca
j
= 6 * 56 + 350 = 686
© J. Christopher Beck 2005 15
1
3
6 9
11
12 14
c1=7
c3=4
c6=3 c9=4
c11=2
c12=2 c14=8
Minimum cutset with lowest cost
Cut sets: {1},{3},{6},{9}, {11},{12},{14}.
Step 2 & 3: Min. Cut Sets in Gcp & Lowest Cost
© J. Christopher Beck 2005 16
Step 4 & 1: Reduce Processing Time for Each Job by 1
1
2
3
6 9
5 8
4 7
11
10
12 14
13
55max C
Cost = overhead + processing = c0 * Cmax + Σjob costs = 6 * 55 + 352 = 682
© J. Christopher Beck 2005 17
Step 2 & 3: Min. Cut Sets in Gcp & Lowest Cost
1
3
6 9
11
12 14
c1=7
c3=4
c6=3 c9=4
c11=2
c12=2 c14=8
13
Cut sets: {1},{3},{6},{9}, {11},{12,13},{14}.
c13=4
Minimum cutset with lowest cost
© J. Christopher Beck 2005 18
1
3
6 9
11
12 14
c1=7
c3=4
c6=3 c9=4
c11=2
c12=2 c14=8
13
c13= 4
Next 3 iterationsreduce processingtime from 7 to 4
Cost = overhead + processing = co * Cmax + Σjob costs = 6 * 52 + 355 = 667
Next 3 Iterations
© J. Christopher Beck 2005 19
1
3
6 9
11
12 14
c1=7
c3=4
c6=3 c9=4
c11=2
c12=2 c14=8
13
Reduce processing timenext on job 6
c13= 4
Step 1,2, & 3
Q: why not 12?
© J. Christopher Beck 2005 20
After More Iterations …
1
3
6 9
11
12 14
c1=7
c3=4
c6=3 c9=4
c11=2
c12=2 c14=8
13
c13= 4
2 4 7
10
c2=2 c4=3 c7=4
c10=5
© J. Christopher Beck 2005 21
Linear Programming Formulation
The heuristic does not guarantee optimum See example 4.4.3
Here total cost is linear so use LP
Want to minimize
n
jjjj
bj ppccCc
1
maxmax0
n
jjj pcCc
1max0 .
© J. Christopher Beck 2005 22
Minimize
subject to
jpxC
jx
jpp
jpp
Akjxpx
jj
j
jj
jj
jjk
,0
,0
,
,
,0
max
min
max
n
jjj pcCc
1max0 .
earliest start time of job k
processing time of job k
Linear Program
© J. Christopher Beck 2005 23
Can Also Have Non-linear Costs
Arbitrary function cj(pj) → cost of setting job j to processing time pj
LP doesn’t work! See Section 4.5 A question I like:
Given processing times and cj(pj), which algorithm would you use (heuristic or LP)?
© J. Christopher Beck 2005 24
What If Jobs Require Resources?
Back to fixed durations Without resources → easy With resources → hard
Resource Constraint Project Scheduling Problem (RCPSP)
© J. Christopher Beck 2005 25
321 4 5 6 7 8
3
2
1
4
5
6
1
2
3
4
5
6
Job p(j) Predecessors S' C'' R(1,j)1 2 - 0 3 32 3 - 0 3 13 1 - 0 6 24 4 1,2 3 7 25 2 2,3 3 8 36 1 4 7 8 3
RCPSP Example
Resource requirements
© J. Christopher Beck 2005 26
321 4 5 6 7 8
3
2
1
4
5
6
9 10
1
2
3 45 6
What if R1 = 4?
© J. Christopher Beck 2005 27
RCPSP
n: jobs j=1,…,n N: resources i=1,…,N Rk: availability of resource k pj: duration of job j Rkj: requirement of job j for resource k Pj: (immediate) predecessors of job j Minimize Cmax
© J. Christopher Beck 2005 28
RCPSP Example
Job p(j) P(j) S' C'' R(1,j) R(2,j)1 2 - 0 3 3 22 3 - 0 3 1 13 1 - 0 6 2 14 4 1,2 3 7 2 15 2 2,3 3 8 3 26 1 4 7 8 3 1
4R1 2R2