jonathan chan. scheduling problems of type pm|prec|c max that are easily solvable ◦ infinite...

13
Jonathan Chan

Upload: yolanda-lothrop

Post on 14-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Jonathan Chan

Page 2: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Scheduling problems of type Pm|prec|Cmax that are easily solvable

◦ Infinite machines: P∞|pj=1,prec|Cmax

◦ Intree, outtree precedence: Pm|pj=1,intree|Cmax & Pm|pj=1,outtree|Cmax

However, Pm|prec|Cmax is NP-hard for 2≤m <n

Page 3: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Critical path rule (CP rule)◦ Gives the highest priority to the job at the head of

the longest string of jobs in the precedence graph Largest Number of Successors (LNS rule)

◦ Job with the largest total number of successors in the precedence constraints graph takes the highest priority

Fujii, Kasami, Ninomiya algorithm ◦ Matching problem- find the maximum number of

disjoint compatible task pairs

Page 4: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Consider P2| prec, pj =1| Cmax with 10 jobs

BOTH CP and LNS achieve the optimal schedule

M1 J3 J7 J8 J9 J4

M2 J2 J1 J6 J5 J10

Critical Path: Cmax = 5

M1 J3 J1 J8 J9 J4

M2 J2 J7 J6 J5 J10

Largest Number of Successors: Cmax = 5

1

2

3

4

5

6

7 8 910

Page 5: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Consider P2| prec, pj =1 | Cmax with 8 jobs. All jobs have unit processing times.

LNS achieves the optimal schedule

M1 J3 J2 J7 J5 J8

M2 J1 IDLE J6 J4

Critical Path Solution: Cmax = 5

M1 J2 J3 J6 J4

M2 J1 J7 J5 J8

Largest Number of Successors: Cmax = 4

1

2

4

5

6

3 78

Page 6: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Consider P2| prec | Cmax with 6 jobs. All jobs have unit processing times.

CP achieves the optimal schedule

M1 J1 J6 J3

M2 J4 J2 J5

Critical Path Solution: Cmax = 3

Largest Number of Successors: Cmax = 4

1 2 3

4 5

6

M1 J4 J1 J2 J3

M2 J6 J5 Idle Idle

Page 7: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Optimal Sequencing of Two Equivalent Processors by Fujii, Kasami, Ninomiya◦ Algorithm for solving P2|prec, pj=1|Cmax in O(n3) time

for any arbitrary precedence constraint

◦ Step1: Find all disjoint compatible task pairs by constructing a graph Gj consisting of n vertices, where two vertices i and j are connected by an edge if there does not exist a path from i and j

◦ Step 2: Determine the maximum set of edges such that no two contain the same vertices

◦ Step 3: Schedule each job pair in order of their precedence relations

Page 8: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Step 1: Construct the disjoint compatible task pair graph Gj

1 3

5

6

2

4

Precedence Graph Graph Gj

Page 9: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Step 2: Let A1 be the max set of disjoint compatible task pairs, and A2 be the set of remaining tasks

A1= {(T3, T5), (T1, T6), (T2,T4)}

A2= {0}

Page 10: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Step 3: Basically schedule each job pair in order of their precedence relations, where β1, …βn-m is the optimal sequence such that βi is either a single task or task pair

j =1S1 = {T1, T2, T3, T4, T5, T6}M1=A1 = {(T3, T5), (T1, T6), (T2,T4)}β1 = (T1, T6)

j=2S2 = { T2, T3, T4, T5}M2 = {(T3, T5), (T2,T4)}β2= (T2,T4)

 j=3S3= { T3, T5}M3= {(T3, T5)}β 3= (T3, T5)

Solution: Cmax = 3

M1 J1 J2 J3

M2 J6 J4 J5

Page 11: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Marc T. Kaufman disproves this claim that the algorithm can be applied to 3 processors

Counterexample: P3|prec, pj =1| Cmax

The max set of disjoint compatible task pairs is {T1, T5, T6} , {T4, T2, T3}, suggesting that Cmax =2. However, the optimal schedule is actually Cmax=3, and the optimal partition is {T1, T4} , {T2, T3, T5}, {T6}

1

2

3

4

5

6

Page 12: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

# Machines

Solution Method

Ex 1 Ex 2 Ex 3

2 machines CP Rule Optimal Not optimal Optimal

LNS Rule Optimal Optimal Not optimal

FKN algorithm Optimal Optimal Optimal

3 machines CP Rule Optimal Optimal Optimal

LNS Rule Optimal Optimal Optimal

4 machines CP Rule Optimal Optimal Optimal

LNS Rule Optimal Optimal Optimal

The quality of the solution methods, as you increase the number of machines, depends on the type of precedence constraints

Page 13: Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:

Example of P4|prec, pj=1|Cmax◦ CP Rule: Cmax = 4◦ LNS Rule: Cmax = 4◦ Optimal: Cmax =3

Observation: if the number of nodes without any predecessors is less than the number of processors, then the CP rule and LNS rule will achieve the optimal schedule