141 likes | 312 Views
Scheduling Theory. Christina Touhey April 11, 2003. Real Life Applications. Building a house, bike, bird house, etc. Completing chores or homework Scheduling movie times, class times or practice times Similar to the Traveling Salesman Problem in that a minimal cost circuit is sought
E N D
Scheduling Theory Christina Touhey April 11, 2003
Real Life Applications • Building a house, bike, bird house, etc. • Completing chores or homework • Scheduling movie times, class times or practice times • Similar to the Traveling Salesman Problem in that a minimal cost circuit is sought • The key point of scheduling theory is to save time by being efficient
Important Definitions • Processors-The “workers” who do the task. • Tasks-The individual jobs or tasks that need to be done in the complex project. • Processing times-How much time it takes a processor to complete the task. • Precedence relations-Restrictions where one task might need to be completed before another task is started.
Recall from Class • A directed graph can only go in the direction specified. • For example only A can go to B, B cannot got to A. • In scheduling terms this means that task A must be completed before task B. B A
Example 1 A(6) D(2) B(5) Start(0) End(0) C(7) E(5) • A, B, C, D and E are all tasks that need to be completed. • The number in the parentheses is the number of units of time each task takes to complete. • We have two restrictions or precedence relations: • 1. Tasks A and B must be completed before D. • 2. Task C must be completed before E.
Decreasing Time Algorithm • The priority list is listed by the times in decreasing order. • For example: Arbitrary List: A(6), B(5), C(7), D(2), E(5) Decreasing Time List: C(7), A(6), B(5), E(5), D(2) Two workers: A(6) D(2) B(5) End(0) Start(0) C(7) E(5)
Critical Path Algorithm • Based solely on the critical path-the longest sum of the processing times. • Using the previous example: A(6) • A processor doing task A then task D would take 8 units of time. • A processor doing task B then task D would take 7 units of time. • A processor doing task C then task E would take 12 units of time. D(2) B(5) Start(0) End(0) C(7) E(5) The critical path is Start-C-E-End or just C-E since it is the longest total processing time of 12 units of time.
Scheduling Example • We want to make a schedule for fixing an apartment with one worker having to complete these tasks and specific restrictions. Precedence Relations
Using the Decreasing Time Algorithm: PKBGWCFLS 10 20 0 30 40 50 60 70 With one worker it takes 71 units of time! We are of course assuming that the worker works continuously for this amount of time.
For Class to try: Using the same information in the scheduling example, make a schedule for fixing the same apartment with two workers.
Using the same information in the scheduling example, make a schedule for fixing the same apartment with two workers. 0 10 20 W1 W2 30 40 50 W1 W2 60 W1 W2
No efficient algorithm that is guaranteed to always produce an optimal schedule is presently known.