1 / 86

Excursions in Modern Mathematics Sixth Edition

Excursions in Modern Mathematics Sixth Edition. Peter Tannenbaum. Chapter 8 The Mathematics of Scheduling. Directed Graphs and Critical Paths. The Mathematics of Scheduling Outline/learning Objectives. To understand and use digraph terminology.

daviddlong
Télécharger la présentation

Excursions in Modern Mathematics Sixth Edition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Excursions in Modern MathematicsSixth Edition Peter Tannenbaum

  2. Chapter 8The Mathematics of Scheduling Directed Graphs and Critical Paths

  3. The Mathematics of SchedulingOutline/learning Objectives • To understand and use digraph terminology. • To schedule a project on N processors using the priority-list model. • To apply the backflow algorithm to find the critical path of a project. • To implement the decreasing-time and critical-path algorithm. • To recognize optimal schedules and the difficulties faced in finding them.

  4. The Mathematics of Scheduling • “Mythical Man-Month” • It takes one woman 9 months to make a baby so 9 women should be able to make a baby in 1 month. Right?

  5. The Mathematics of Scheduling 8.1 The Basic Elements of Scheduling

  6. The Basic Elements of Scheduling • Scheduling is part of project management within the planning phase of the System Development Life Cycle.

  7. The Basic Elements of Scheduling Overview of CPM • The purpose of Critical Path Method is to determine the sequencing and timing of events in order to complete a project. • CPM often is grouped with PERT (Program Evaluation Review Technique) • CPM activities are deterministic • PERT activities are probabilistic (probability of random events)

  8. The Basic Elements of Scheduling History of CPM • The E.I. du Pont, de Nemours & Co. devised a technique (CPM) to control its large projects. • The technique saved the company $1 million in the first year of its implementation. • By 1959, Dr. Mauchly of the Du Pont effort established an organization to solve industrial problems using CPM. • Since that time, a great deal of work has been completed to improve upon all of these related techniques, much of it by people in the computer industry. Retrieved from http://www.referenceforbusiness.com/encyclopedia/Cos-Des/Critical-Path-Method.html

  9. The Basic Elements of Scheduling CPM Applies to a variety of projects • NC State Building Program • Space Station Program • Polaris Ballistic Missile • Coordinating the Senior Prom • Building a House • Planning a Wedding • Apollo Space Program • Opening Ceremonies of the Olympics • Constructing the new Bay Bridge • Arranging a Basketball Game

  10. The Basic Elements of Scheduling • The processors. Every job requires workers. We will use the term processors to describe the “worker”whocarry out the work. For the purposes of our discussion, we will use N (where N 2) to represent the number of processors and P1, P2, P3, …PN to denote the processors themselves.

  11. The Basic Elements of Scheduling • The tasks. In every complex project there are individual pieces of work, often called “jobs” or “tasks”. We will define a task as an indivisible unit of work that cannot be broken up into smaller units. Thus, it is always carried out by a single processor. We will use capital letters A, B, C…, to represent the tasks.

  12. The Basic Elements of Scheduling • The tasks (continued). At a particular moment in time a task can be in one of four possible states: • Completed • In Execution • Ready • Ineligible

  13. The Basic Elements of Scheduling • The processing times. The processing time for a given task X is the amount of time, without interruption, required by one processor to execute X. Thus, the notation X(5) tells us that the task called X has a processing time of 5 units (be it minutes, hours, days, or any other unit of time).

  14. The Basic Elements of Scheduling • The precedence relations. Precedence relations are formal restrictions on the order in which the tasks can be executed, much like those course prerequisites in the school catalog that tell you that you can’t take course Y until you have completed course X.

  15. The Basic Elements of Scheduling A precedence relation can be conveniently abbreviated by writing XY or described graphically in (a). Y is dependent of X.

  16. The Basic Elements of Scheduling When a pair of tasks X and Y have no precedence requirements between them, we say that the tasks are independent. Graphically, we can tell if there are no arrow connecting them (b).

  17. The Basic Elements of Scheduling Two final comments about precedence relations are in order. First, precedence relations are transitive: If XY and YZ , then it must be true that XZ as shown in (c).

  18. The Basic Elements of Scheduling The second observation is that we cannot have a set of precedence relations that form a cycle as shown in (d). Clearly, this is logically impossible!

  19. The Basic Elements of Scheduling • Henry Laurence Gantt (1861-1919) published the Gantt Chart in 1910 as a visual tool to display a project’s schedule and progress of the project. • “Gantt charts were used on large construction projects such as the Hoover Dam in 1931 and the interstate network started in 1956”

  20. The Basic Elements of Scheduling Task Schedules Imagine you just wrecked your car. The garage is operated by two processors, P1 and P2. The repairs can be broken into four different tasks:

  21. The Basic Elements of Scheduling • exterior body work (4 hours), • engine repairs (5 hours), • painting and exterior finish work (7 hours), and • repair transmission (3 hours). • The only precedence relation A C .

  22. The Basic Elements of Scheduling The schedule shown in (a) is very inefficient. All the short tasks are assigned one processor (P1) and all the long tasks to the other processor (P2).

  23. The Basic Elements of Scheduling Under this schedule, the project finishing time (the duration of the project from the start of the first task to the completion of the last task) is 12 hours. We will use Fin to denote the finishing time, so we can write Fin = 12 hours.

  24. The Basic Elements of Scheduling It looks better in schedule (b), but it violates the precedence relation A C (we cannot start task C until task A is completed).

  25. The Basic Elements of Scheduling On the other hand, if we force P2 to be idle for one hour, waiting for the green light to start task C, we get a perfectly good schedule as shown in (c). Fin = 11 hours.

  26. The Basic Elements of Scheduling Can we do better? No! The precedence relation A(4) C(7) implies that the 11 hours is a minimum barrier that we cannot break. Thus, the schedule in (c) is an optimal schedule and Fin = 11 hours is the optimal finishing time.

  27. The Basic Elements of Scheduling From now on we will use Opt instead of Fin when we are referring to the optimal finishing time. Schedule (d) shows a different optimal schedule with finishing time Opt = 11 hours.

  28. The Basic Elements of Scheduling • Minimum time for a project to be completed. Does not take into consideration precedence relations. Total processing time / N = Minimum Time Required

  29. The Basic Elements of Scheduling • What happens if we start adding processors? (Opt = 11) 19/2 = 9.5 (3) 19/3 = 6.33 (14) 19/4 = 4.75 (25) 19/5 = 7.2 (36) • But what is the actual minimum time?

  30. The Mathematics of Scheduling 8.2 Directed Graphs (DiGraphs)

  31. Directed Graphs (DiGraphs) PERT Diagrams • Program Evaluation and Review Technique • A network model that allows for randomness in activity times. • A tool used to control the length of projects • PERT was developed in the late 1950’s for the US Navy’s Polaris Project. • First used as a management tool for military projects • Adapted as an educational tool for business managers • It has the potential to reduce both the time and cost required to complete a project.

  32. 1 2 3 5 4 6 Directed Graphs (DiGraphs) • PERT and CRM Diagram: D B F A C E Single start node Single finish node

  33. Directed Graphs (DiGraphs) A directed graph or digraph for short, is a graph in which the edges have a direction associated with them, typically indicated by an arrowhead. Digraphs are particularly useful when we want to describe asymmetric relationships (A related to B does not imply that B must be related to A).

  34. Directed Graphs (DiGraphs) In a digraph, instead of talking about edges we talk about arcs. Every arc is defined by its starting and ending vertex. Thus, if we write XY, we are describing the arc in (b) as opposed to YX as shown in (c).

  35. Directed Graphs (DiGraphs) • Arc-set: A list of all the arcs in a digraph A = {CA, CB, DB, FD, FC, EC, EA} • Vertex-set: A list of all the vertices in a digraph. V = {A, B, C, D, E, F}

  36. Directed Graphs (DiGraphs) Additional Terminology • If XY is an arc in the digraph, we say that vertex X is incident to vertex Y, or equivalently, that Y is incident fromX. • The arc YZ is said to by adjacent to the arc XY if the starting point of YZ is the ending point of XY.

  37. Directed Graphs (DiGraphs) • “Incident to” vs. “Incident from”

  38. Directed Graphs (DiGraphs) Additional Terminology • In a digraph, a path from vertex X to vertex W consists of a sequence of arcs XY, YZ, ZU, …, VW such that each are is adjacent to the one before it and no arc appears more than once in the sequence. • When the path starts and ends at the same vertex, we call it a cycle of the digraph.

  39. Directed Graphs (DiGraphs) • Path vs. Circuit

  40. Directed Graphs (DiGraphs) Additional Terminology • In a digraph, the notion of the degree of a vertex is replaced by the concepts of indegree and outdegree. The outdegree of X is the number of arcs that have X as their starting points (outgoing arcs); the indegree of X is the number of arcs that have X as their ending point (incoming arcs).

  41. Directed Graphs (DiGraphs) • Outdegree vs. Indegree

  42. Directed Graphs (DiGraphs)

  43. Directed Graphs (DiGraphs) Project Digraph

  44. The Mathematics of Scheduling 8.3 Scheduling with Priority Lists

  45. Scheduling with Priority Lists • A priority listis a list of all the tasks prioritized in the order we prefer to execute them. • If task X comes before task Y in the priority list, then X gets priority over Y. This means that when it comes to a choice between the two, X is executed ahead of Y. However, if X is not yet ready for execution, we skip over it and move on to the first ready task after X in the priority list. Priority List: E(5), D(2), C(7), B(5), A(6)

  46. Scheduling with Priority Lists • Number of Priority Lists possible with M tasks: M!

  47. Scheduling with Priority Lists • The process of scheduling tasks using a priority list and following these basic rules is known as the priority-list model for scheduling.

  48. Scheduling with Priority Lists • At any particular moment in time throughout a project, a processor can be either busy or idle and a task can be ineligible, ready, in execution, or completed. At each stage of the schedule we need to keep track of the status of each task.

  49. Scheduling with Priority Lists • One convenient record keeping strategy goes like this: • Task is ready to be processed. • Task is currently executing. • Task has completed executing. • Task is ineligible for execution.

  50. Scheduling with Priority Lists Priority List: A(6), B(5), C(7), D(2), E(5) N=2

More Related