Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spring 2015 Mathematics in Management Science Machine Scheduling Problem Statement of MSP Assumptions & Goals Priority Lists List Processing Algorithm.

Similar presentations


Presentation on theme: "Spring 2015 Mathematics in Management Science Machine Scheduling Problem Statement of MSP Assumptions & Goals Priority Lists List Processing Algorithm."— Presentation transcript:

1 Spring 2015 Mathematics in Management Science Machine Scheduling Problem Statement of MSP Assumptions & Goals Priority Lists List Processing Algorithm

2 Machine Scheduling Problem To schedule tasks on processors to get job done as efficiently as possible. Two variations: –fixed # procs each with unlimited capacity (minimize total time) –unlimited # of procs each with fixed capacity (minimize total # used)

3 Basic Set Up Job consists of interdependent tasks; want good schedule. Use fixed number of processors. Order requirement digraph describes task times and order dependencies. In addition, often have priority list (PL) which gives ordering of the tasks.

4 Machine Scheduling Problem Given identical processors tasks with task times * order (precedence) relations * Schedule Schedule tasks so as to finish project in as short a time as possible. * Info displayed via weighted digraph called a project digraph.

5 Example 0 Start 0 End ECT=14 CritPath S  C  E  F  E

6 Possible Goals Can try to minimize any one of: job completion time, or total time processors are idle, or number of processors necessary to finish the job by a specified time. Above may conflict with each other!

7 Example A-B is critical path ECT=18

8

9 Basic Set Up Job consists of interdependent tasks; want good schedule. Use fixed number of processors. Order requirement digraph describes task times and order dependencies. In addition, often have priority list (PL) which gives ordering of the tasks.

10 The Tasks Every large project has “jobs” or “tasks”. A task is an indivisible unit of work that cannot be broken up into smaller units. A task is always carried out by a single processor. We use capital letters A, B, C…, to represent the tasks. (Or, T 1,T 2,… )

11 Each task requires only one processor. Each processor can handle only one task at a time. When a processor starts a task, it will be completed without interruption. Any processor can work on any task. No processor stays idle voluntarily. Task Assumptions 11

12 The Tasks (continued) At any particular moment, a task can be in one of four possible states: Completed In Execution Ready Ineligible T T T T

13 Processing Times The processing time (or individual task time) for a task T is the amount of time required for one processor to execute T. The notation T(5) tells us that task T has a processing time of 5 units (minutes, hours, days, or any other unit of time).

14 Precedence Relations Precedence relations describe the order in which the tasks must be executed. Can’t begin task B until A is completed. Until A is completed, B is ineligible. Once A is completed, B is ready. If A is in execution, B is ineligible.

15 Directed Graphs Tasks and precedent info easily displayed via directed graphs (digraphs). A digraph (directed graph) is just a graph with arrows on its edges which correspond to order requirements. Vertices correspond to tasks, and we label them with weights (numbers) which give the processing times for each task.

16 Example

17 Example

18 Machine Scheduling Problem Decide how to schedule tasks on identical processors (machines, humans, robots, etc.) so as to finish a project in as short a time as possible. Will attack via List Processing Algorithm. Alternate problems available too!

19 Basic Set Up Project consists of interdependent tasks; want good schedule. Use fixed number of processors. Have order requirement digraph describing task times and their order dependencies. Often assume existence of a priority list (PL) – an ordering of the tasks.

20 Example P2P2 P1P1 FinT=18 IdleT=11 ECT=18

21 Example You just wrecked your car.  Your garage has two processors, P 1 & P 2. Four type of repairs necessary:  A exterior body work (4 hours),  B engine repairs (5 hours),  C painting (7 hours)  D repair transmission (3 hours). Only precedence relation is A  C.

22 Example Schedule (a) is very inefficient. All the short tasks are assigned to processor P 1 and all the long tasks to P 2.

23 Example Schedule (b) looks much better, but it violates the order relation A  C (we cannot start C until A is completed).

24 Example If we force P 2 to be idle for one hour, waiting to start task C, we get an OK schedule (c) with FinT = 11 hours.

25 Example Schedule (d) is another perfectly good one, again with FinT = 11 hours. Can we do better?

26 Example Can we beat FinT = 11 hours ? The precedence relation A(4)  C(7) implies that 11 hours is a minimum time barrier we cannot break. The schedules in (c) & (d) are optimal. 11 hours is earliest completion time. ECT = 11 hours

27 Priority Lists A list of all the tasks prioritized in the order we prefer to execute them. If X is before Y in the priority list, X gets priority over Y; given a choice between the two, X is executed ahead of Y. If X is not yet ready, we must skip it and move on to the first ready task after X in the priority list.

28 PL Scheduling Algorithm Given project digraph & PL Schedule the next ready task on the next available processor. next task is highest priority one next available proc is first idle one Tasks are in one of 4 states: ineligible, ready, executing, done.

29 Example PL A, B, C, D, E, F F 16 P2P2 P1P1 A B CD E 2 3 1014 15 FinT=16 IdleT=9 CritT=14

30 Finding A Schedule

31 Example PL A, B, C, D, E PL E, D, C, B, A CritT=12 P1P1 P2P2 P1P1 P2P2

32 Optimal Schedules A schedule is optimal if it has the shortest possible completion time. To find via Brute Force Method Look at all possible schedules; obtain via PLSA using all possible priority lists. The schedules with the shortest completion time are the optimal schedules.

33 Finding A Schedule

34 Finding Good Priority Lists Want PL that yields optimal (or nearly optimal) schedule. Use Decreasing Time Algorithm, or Critical Path Algorithm. These algorithms give PL; can use PLSA to get schedule.

35 Decreasing Time Algorithm “common sense” – do the longer tasks first & leave the shorter tasks for lastDTA Create PL by sorting task times in decreasing order. Must still get schedule; use PLSA.

36 Example F 14 P2P2 P1P1 AB C D E 53 813 12 FinT=14 IdleT=5 task times 8, 5, 4, 3, 2, 1 PL C, E, D, B, A, F 8 CritT=14


Download ppt "Spring 2015 Mathematics in Management Science Machine Scheduling Problem Statement of MSP Assumptions & Goals Priority Lists List Processing Algorithm."

Similar presentations


Ads by Google