CHAPTER 10 CRITICAL PATH METHOD 1.The critical path method (CPM) can be employed to aid in the scheduling and coordination of the many interrelated activities that make up a large, complex project. 2.This technique was first developed in 1957 to aid in the planning of the construction and maintenance of chemical process plants. 3.Since then it has become one of the best known and most widely used techniques within operations research. It has been successfully applied in many diverse areas, including scheduling a highway construction project, developing a countdown and "hold" procedure for the launching of space flights, installing a computer system and building a ship. For our purposes, a project will be defined by: 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD 1. a list of activities 2. each with an estimated completion time, 3. and a set of precedence relationships between these activities. It is these relationships which are of primary importance, as they will allow us to determine which of the individual activities has the greatest potential for disrupting the overall project schedule if their durations are for some reason delayed beyond the estimated time. It is the goal of a CPM analysis to not just determine the minimum completion time for the project (we already know how to do this from the previous chapter); but also to highlight those activities to which special effort should be applied to guarantee their successful on-time completion. We proceed by first laying the foundation for our analysis by demonstrating how to represent any project in the form of a network. We next develop the central ideas of CPM and conclude by investigating one of many possible extensions to the basic methodology. 10.2 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD 10.1 DEVELOPING THE PROJECT NETWORK In applying a CPM analysis it is helpful, space permitting, to first represent the project schematically in the form of a network. To do this we need the following three items of data: List of jobs to be performed Best estimate of the duration of each job Predecessors of each job (ie. for each job, a list of jobs that must be completed before it can begin). It will often be helpful to organize this data in the form of a table, as illustrated in Figure 10.1. Activity Foundation Walls Roof Interior Duration (days) 27 10 5 33 10.3 Immediate Predecessors --Foundation Walls Roof 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Figure 10.1 Once the data is organized in this form, a project network is then designed to represent the precedence relationships between the activities. We point out immediately that any project network must be acyclic (think about why this is the case). Now, there are two basic ways of assigning a network to a project and they differ in their representations of the activities. In the activity-on-node representation, or simply activity network, each activity is represented by a node and a directed arc is drawn from node i to node j if the job corresponding to node i immediately precedes the job corresponding to node j. This type of network representation is probably the most natural, and it is a very straightforward process to construct the (unique!) activity network corresponding to any project. However, for reasons that are not quite clear, the activity network has not received much attention throughout the literature. For this reason, we will concentrate our attention on the second approach for representing projects with networks. In the activity-on-arc representation, or simply event network, the activities are represented by directed 10.4 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD arcs with values equal to the duration of the activities. The precedence relationship among the activities is established through the nodes, which correspond to events representing the completion or initiation (or both) of some set of activities. We state immediately that it is not always a simple matter to construct an event network for a given project. Furthermore, it is often the case that the representation is not unique, so that several different networks can be legitimately developed for the same project. In general, there will always exist an event network representation for any given project containing less nodes and arcs than the corresponding activity network; however, there is no known efficient algorithm for constructing this minimal-sized event network. We will outline a process here for constructing event networks that, while not guaranteeing the minimum number of nodes and arcs, has proven to be fairly efficient and will be quite adequate for our purposes. For further information on this topic sees Syslo, Section 4.2.1 To illustrate a simple example of how precedence relationships for a project are modelled, the case where activities A and B must be completed before activity C begins. Therefore, A and B are predecessors of C and this 10.5 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD relationship can be represented schematically as shown in Figure 10.2 where nodes 1 and 2 represent the beginning of jobs A and B respectively; node 3 represents the completion of both these tasks and the simultaneous initiation of job C; and node 4 represents the completion of job C. A 1 C 3 4 B 2 Figure 10.2 As another example, if activity A must be completed before both activities B and C begin, the network representation would appear as follows: 1 A B 3 C 4 2 Figure 10.3 10.6 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Here node 1 represents the initiation of job A; node 2 represents the completion of A and beginning of both jobs B and C; and nodes 3 and 4 represent the completion of jobs B and C respectively. We can now formalize our description of this process. In general, when constructing an event network for all of the jobs in a project, there are a few rules, which must be followed. First, the start of the project is represented by an origin labelled as node 1 - all arcs incident from this node correspond to jobs which have no predecessors (ie. jobs which can begin as soon as the project begins). Second, there is a single node, termed the terminal node, corresponding to the completion of the entire project. Lastly, the nodes must be numbered in such a way that the node representing the completion of any activity must have a larger label than the node representing the beginning of that activity - in other words, arcs must always be directed to higher labelled nodes. We know that this can generally be accomplished because the fact that all project networks are acyclic allows us to 10.7 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD appeal to Lemma 9.1.1, which states that any acyclic network must admit such a labelling scheme. Notice that these rules tell us how the project network must ultimately look; but really does not provide much information on the appropriate steps for developing such a network. This is a process, which would probably be more difficult to explain than to actually perform so we will instead provide an illustration of our approach through a simple example. 10.1.1 Example If we were to decide to build a house, then one way to schedule the appropriate activities for this project might be as follows: First, lay the foundation. When this is done, rough the walls. Once this is complete, we can begin roughing the floors and also putting up exterior siding. We begin painting when the exterior siding is complete. When the floor is laid, we can begin the electrical work and the plumbing. When the electrical work is complete, we begin the interior painting. The interior fixtures are placed once the plumbing and interior painting is complete. Final cleaning begins when all other tasks are have been completed. 10.8 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD We can organize this information (and add our best estimate of duration times for each task) in the form given in Figure 10.1. Observe that it is sufficient to specify the immediate predecessors, rather than predecessor for each activity. The data is summarised in the following table. Activity Duratio n (days) 3 5 13 6 4 8 7 3 2 1 A = foundation B = walls C = floor D = siding E = exterior F = electrical G = plumbing H = interior paint I = fixtures J = cleaning Immediate Predecessors ---A B B D C C F G,H E,I Observe that, while we only list job B as a predecessor of job C, it is obviously true that job A must also be completed before job C can begin. However, because we have already accounted for the fact that B can not begin until A is completed (ie. A is a predecessor of B), it 10.9 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD would be redundant to now declare A as a predecessor of C also. Therefore, in general, when describing precedence relationships in the form of the above table, we need to specify only the immediate predecessors of each activity. Organizing the data in this form will make it a bit easier to develop the project network directly from the table. On the other hand, we point out that it is often very difficult for large problems to work form a verbal description and distinguish only the immediate predecessors from other "non-immediate" predecessors for each job. Therefore, since nothing has been lost if some redundancies do exist in the table, we need not insist that the table appear in precisely this way. The network for this project is displayed in Figure 10.4. Notice that there is one origin and one terminal node (nodes 1 and 9 respectively) and that each activity ends at a higher labelled node than from which it began. Thus, our network representation in Figure 10.4 of the given project is a valid project network. Finally, along with each arc we place the associated task name (or symbol) and the estimated duration time. 10.10 620-261: INTRODUCTION TO OPERATIONS RESEARCH F,8 6 H 3 G,7 4 7 I 2 C 13 3 3 B,5 2 CHAPTER 10: CRITICAL PATH METHOD D 6 A 13 9 J,1 8 E 4 5 1 Figure 10. 4 This was a relatively simple example, so it is important to point out here that there are two types of complexities that will often arise throughout the formulation of a project network. In particular, in order that a network appears in an appropriate form for application of the critical path method, we must now impose certain restrictions on the structure of this network. First, consider a project where jobs A and B begin at exactly the same time and are both predecessors of job C. From the rules we have thus far established, it would be legitimate to represent this relationship as follows: A 10.11 1 B 2 C 3 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Figure 10.5 However, we will from here on require that, for any project network, two nodes can be connected by at most one arc. In order to satisfy this requirement for the network in Figure 10.5, we need to introduce to the project a dummy activity with duration of zero. When we add this dummy activity to the network representation of the project in Figure 10.5, we indicate the arc corresponding to the dummy activity by a dotted arrow. Furthermore, we must also create an additional node to represent the event corresponding to the initiation of the dummy activity. We can now put aside the network in Figure 10.5 and represent the same relationship as follows: 1 3 A B C 2 Dummy activity 10.12 4 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Figure 10.6 Notice that the networks of Figures 10.5 and 10.6 are equivalent in terms of the precedence relationships they define; however, as explained above, the latter will be more amenable to analysis with the critical path method. To illustrate the second instance where we will need to use a dummy activity, consider a project where jobs A and B both begin at the same time, job A must be completed before job C can begin, B must be completed before job D can begin, and both A and D must be completed before job E begins. One network that captures these relationships is as follows: 4 C 2 E A 1 B 3 D 5 Figure 10.7 10.13 E 6 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD However, we will from here on want to impose the constraint that an activity will not be represented by more than one arc in the project network. To satisfy this requirement, we need to add a dummy activity to the given project and then develop the following network, equivalent to the one above in Figure 10.7 4 C Dummy activity 2 A 6 Figure 10.85 D E In summary then, dummy activities are introduced into a project to avoid the occurrence of either two nodes being connected by more than one arc or some activity being represented by more than one arc in the associated project network. Each dummy activity is represented by a dotted arc, does not correspond to any actual activity and must always have a duration time equal to zero. 1 B 3 10.1.2 Example Consider the project described by the following table. 10.14 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Acti Duratio Immediate vity n Predecessors (days) A 4 ----B 2 ----C 5 A D 11 A,B E 8 ----F 3 C,E G 2 C,E We can develop a project network in accordance with all our rules and requirements as shown in Figure 10.9. You should be aware of how to utilize dummy activities when developing project networks; however, from here on, to avoid any unnecessary complications, we will apply the critical path method only to networks that do not contain these sorts of activities. E,8 1 A,4 2 C,5 4 0 B,2 3 10.15 F,3 G D,11 6 2 5 0 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Figure 10.9 10.2 DETERMINING THE CRITICAL PATH In describing the critical path method, we will assume throughout this section to be working on a project with a network representation as follows: 5 D,4 A,3 1 B,2 2 C,2 3 E,1 G 7 4 F, 3 6 Figure 10.10 Once again, notice that we display an activity name and duration with each arc of the network. For our purposes here, the relevant notation is as follows: tm,n := duration of the job represented by arc (m,n). T := earliest completion time of the entire project. Notice that the earliest completion time, T, corresponds to the earliest time that the terminal node of the network (in this case node 6) is reached. In general, we assume 10.16 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD that the network is comprised of N nodes with the origin corresponding to node 1 and the terminal node to node N. The fundamental steps for a CPM analysis involve the computation of two descriptive statistics for each node (ie. event) of the network. 10.2.1 Definition The early event time for node n, denoted ET(n), is the earliest time that the event corresponding to node n can occur, namely all jobs preceding node n have been completed. 10.2.2 Definition The late event time for node n, denoted LT(n), is the latest time that the event corresponding to node n can occur without delaying the completion time T of the entire project. So we see that the early event times describe how the project can proceed if each activity is begun at the earliest possible time and there is no delay in its 10.17 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD performance. The late event times provide information on how much room for delay there is at each event of the network. We now describe how these times are computed. The early event time of a node is specified by the length of the longest path from the origin to that node. This may not seem quite right - the first thought might be that the earliest time for a node should be determined by the shortest path to that node. This is perhaps more intuitive, but also incorrect. Remember that, in performing a shortest path calculation we consider all of the paths leading to the node under consideration and then select the one with the shortest length. On the other hand, in order to reach a node of a project network we need to move through all of the paths leading to this node (notice that this is equivalent to stating that we must complete all jobs preceding the event corresponding to the node). Therefore, the earliest time that the node can be reached is dependent on the path that takes the longest to traverse. As a further explanation, imagine that you are trying to determine when is the earliest time you can leave your house for a vacation. Before leaving you must wait for three friends, all of whom leave their initial destination at 2:00, to arrive at your house. The first friend estimates 10.18 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD his travel time as two hours, the second as three hours, and the third as six hours. The earliest time that you could expect to leave your house is given by their departure time plus the time required for the longest trip ie. 2:00 + 6 hours = 8:00. Therefore, to specify the early event time for each node of a project network, we can appeal to our dynamic programming equations of (9.12) for specifying the length of a longest path to from the origin to any node of a network. This yields the following (remember that, as defined in Chapter 9, P (n) represents the set of immediate predecessors of node n): ET(n) max ET(m) t m,n , n 2, , N (10.1a) mP( n) ET(1) 0 (10.1b) These equations are solved exactly as before, namely recursively, for n=1,...,N (in this order). 10.2.3 Example To compute the early event times for all nodes in the project network of Figure 10.10 we simply solve the equations of (10.1) as follows: ET(1) 0 ET(2) max ET(m) tm,2 max {0 3} 3 m{1} 10.19 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD ET(3) max ET(m) tm,3 max {0 2} 2 m{1} ET(4) max ET(m) t m,4 max {3 2,2 1} 5 m{2,3} ET(5) max ET (m) t m,5 max {3 4} 7 m{2} ET(6) max ET(m) t m,6 max {5 3, 7 7} 14 m{4,5} As mentioned earlier, the earliest completion time for the project is given by the earliest event time for the terminal node, so that T = ET(6) = 14. We now compute the latest event times for each node. Remember that our definition of this statistic is the latest time that an event can be initiated so as not to delay the completion time for the entire project. We therefore know that the event corresponding to the completion of the project, represented by node N, must have a latest time equal to T. So we have the following initial condition: LT(N) = T = ET(N) (10.2) To compute the latest event times for all other nodes we will work recursively backward through the network. The reasoning behind working in this direction is that we are now interested in determining the latest possible starting time for an event such that the remaining schedule is not disrupted. We therefore need to know what are the latest 10.20 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD possible start times for all events following the event under consideration. We then determine latest times for each event so that all succeeding events can be initiated within their latest times. For example, imagine that you will begin and perform two jobs simultaneously, the first taking six hours and the second taking four. There is one group waiting on you to complete the first job and another waiting on you to finish the second; and both say that the latest they can begin their activities is 10:00. It is easy to see that you must begin your work at 4:00 to satisfy the first group and at 6:00 so as not to disrupt the second. In order to not disrupt any part of the overall schedule you must begin at the earlier of these times, namely 4:00. Combining this reasoning with the initial condition in (10.2), we can now specify the dynamic programming equations for computing late event times for each node of a project network as follows (remember that S(m) was defined in Chapter 9 as the set of immediate successors of node m): LT(n) min LT(m) t , n 1, , N 1 (10.3a) n,m mS(n) LT( N) T ET (N) 10.21 (10.3b) 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD We solve these equations =N1,N2,...,1 (in this order). recursively, for m 10.2.4 Example For our sample network in Figure 10.10, the computations of late event times proceed as follows: LT(6) ET(6) T 14 LT(5) min T(m) t5,m min{14 7} 7 m{6} LT(4) min T(m) t4,m min{14 3} 11 m{6} LT(3) min T(m) t3,m min{11 1} 10 m{4} LT(2) min T(m) t2,m min{7 4,11 2} 3 m{4,5} LT(1) min T(m) t1,m min{3 3,10 2} 0 m{2,3} Notice that LT(1) must always equal zero (think about why this is the case) - this fact is useful for checking the calculations. After calculating both the early and late event times for each node, it is useful to highlight this information in the project network by redrawing the network with the nodes displayed in the following format: 10.22 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD n ET(n) LT(n) Figure 10.11 Our sample problem, originally represented with the network in Figure 10.10, will now appear as shown in Figure 10.12. 5 D,4 A,3 2 7 1414 7 11 141411 G 14 7 C,2 3 3 11 11 1 0000 0 0 B,2 3 4 E,1 F, 3 5 11 11 11 2 10 11 11 6 14 1414 14 11 141411 14 Figure 10.12 Now, it is important to remember that the arc values tm,n in any project network are merely estimates of the duration of each activity collected before the project actually 10.23 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD begins. In other words, the actual duration of any job is unknown when this sort of analysis would take place it could turn out to be less than our estimate, but, more critically, it also could be more. We therefore need to develop a statistic to measure the amount of time that can be employed for the performance of each activity, beyond our initial duration estimate, before the completion of the overall project is delayed. We already have all the information we need. 10.2.5 Definition The total float for the activity corresponding to arc (m,n), denoted TF(m,n), is the amount by which the duration of the activity corresponding to that arc can be increased without delaying the completion of the entire project, assuming no other activities are delayed. To compute this statistic, notice that activity (m,n) begins at node m. Assuming that no earlier activities are delayed, then this activity can be initiated at the earliest possible time, ET(m). The activity is completed at node n. Assuming that no later activities will be delayed, then we can allow this activity to be completed at the latest 10.24 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD possible time, LT(n). The maximum amount of time available for the performance of this job without delaying the overall project completion time (assuming no other jobs are delayed) is therefore given by LT(n)ET(m). Since our initial estimate for the duration of this task is given by tm,n, the total float associated with this job is given by TF(m,n) = LT(n) ET(m) tm,n (10.4) 10.2.6 Example Using the equation of (10.4), the total float for each activity for our sample network is calculated as follows: TF(A) = TF(1,2) = LT(2) ET(1) t1,2 = 3 0 3 = 0 TF(B) = TF(1,3) = LT(3) ET(1) t1,3 = 10 0 2 = 8 TF(C) = TF(2,4) = LT(4) ET(2) t2,4 = 11 3 2 = 6 TF(D) = TF(2,5) = LT(5) ET(2) t2,5 = 7 3 4 = 0 10.25 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD TF(E) = TF(3,4) = LT(4) ET(3) t3,4 = 11 2 1 = 8 TF(F) = TF(4,6) = LT(6) ET(4) t4,6 = 14 5 3 = 6 TF(G) = TF(5,6) = LT(6) ET(5) t5,6 = 14 7 7 =0 The concept of total float is intended to provide a quantitative measure of the importance of keeping each activity's actual duration from exceeding our initial estimate. The smaller the value of the total float for any particular job, the less leeway we have for overshooting our performance estimate for this job without adversely affecting the entire project. 10.2.7 Definition A critical activity is a job whose total float is equal to zero. It will be particularly important to monitor the performance of these critical activities, since any delay in their durations will necessarily result in a corresponding delay in the completion of the entire project. Notice also that, if one were concerned with decreasing the estimated overall project dur ation, then these same critical 10.26 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD activities are the ones whose durations must be shortened. In general, project completion time is sensitive to changes in the durations of these activities in either direction (increasing/decreasing). However, we will continue to take the pessimistic view and therefore speak exclusively in terms of avoiding delays. There will be several critical activities throughout the project. 10.2.8 Definition A critical path is a path in the project network from the origin (node 1) to the terminal node (node N) that consists entirely of critical activities. Any project network will always have at least one critical path. This is the one corresponding to the longest path from the origin to the terminal node. Remember that in order to complete the project we must cover all paths from the origin to terminal node, so the earliest time for completing the entire project is determined by the longest path. Furthermore, there could be more than one critical path - depending on the placement of the critical activities throughout the network. 10.27 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD 10.2.9 Example We see from our computations of total float in Example 10.2.6 that the critical activities for our sample network in Figure 10.10 are jobs A, D and G, so that the (in this case the only) critical path is given by 1, 2, 5, 6. Because any delays in critical activities will delay the completion of the entire project, it is important to closely monitor the performance of all activities along the critical paths and take all appropriate actions. Now, notice that the total float statistic indicates the maximum amount of time that an activity can be allowed to go beyond its estimated duration before the overall project is delayed. There is a related measurement that indicates the amount of additional time available for an activity before the earliest start times of any proceeding jobs are affected. 10.2.10 Definition The free float for the activity corresponding to arc (m,n), denoted FF(m,n), is the amount by which the duration of this activity can be increased without delaying the start of any later activity beyond its earliest possible starting time. 10.28 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD To compute this statistic notice that, for any activity (m,n), the earliest possible start time is ET(m). If no succeeding jobs are to be delayed then this activity must finish no later than ET(n), so that the total available time is ET(n)ET(m). Since the estimated activity duration is given by tm,n, we have (assuming no dummy activities): FF(m,n) = ET(n) ET(m) tm,n (10.5) 10.2.11 Example Using the recipe given in (10.5), the free float for each activity in our sample network is computed as follows: FF(A) = FF(1,2) = ET(2) ET(1) t1,2 = 3 0 3 = 0 FF(B) = FF(1,3) = ET(3) ET(1) t1,3 = 2 0 2 = 0 FF(C) = FF(2,4) = ET(4) ET(2) t2,4 = 5 3 2 = 0 FF(D) = FF(2,5) = ET(5) ET(2) t2,5 = 7 3 4 = 0 FF(E) = FF(3,4) = ET(4) ET(3) t3,4 = 5 2 1 = 2 10.29 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD FF(F) = FF(4,6) = ET(6) ET(4) t4,6 = 14 5 3 = 6 FF(G) = FF(5,6) = LT(6) ET(5) t5,6 = 14 7 7 = 0 Notice that the total float for activities B and C from Example 10.2.6 are positive valued while the free float for these same activities from Example 10.2.11 are zero. In general, free float figures must always be less than or equal to total float because it is defined so as to allow less deviation from the overall schedule. Remember that total float tells us the amount of time available before the completion of the project is delayed while free float indicates the amount of time available before any part of the schedule is delayed. The relative importance of these two statistics for helping to monitor the schedule and allocate resources among activities will depend to a large extent on the overall objectives of the project and perhaps even the personal style of the project manager. The final step of any CPM analysis is to display the results in the form of a graph, which highlights the important information. Simply redraw the project network on a horizontal axis representing time and indicate the performance of each critical activity with a solid arrow and each non-critical activity with a dotted 10.30 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD arrow. The graph for our sample network in Figure 10.10 is as shown in Figure 10.13. Event Chart 1 2 3 5 6 4 0 1 2 3 4 5 6 Time 7 8 9 10 11 12 13 14 e Figure 10.13 Alternatively, we can draw the famous Gantt Chart for the project. This type of chart, shown in Figure 10.14, displays the activities on a time scale and indicates their respective total floats. Gantt Chart A B C D E F 10.31 G 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Figure 10.14 This sort of graphical presentation will prove very useful to project management for tracking actual versus planned performance and also for making decisions on what steps should be taken to keep the overall project running on (or at least close to) schedule. Finally, it is important to note that the output of a CPM study should not be considered to provide the ultimate "answer" to the scheduling and underlying resource allocation problem. Remember that CPM is applied given a set of estimates for activity durations and that these estimates are based on a particular allocation of resources among the various activities of the project. Furthermore, it is usually the case that the project 10.32 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD manager will have a good deal of flexibility for altering these estimates before initiation of the project by changing his current allocation strategy (for example, manpower and machinery can often be transferred from one activity to another). So we see that determining the optimal allocation of these resources is a very important problem since it will effectively specify the input data for the CPM analysis (and, obviously, the output of the analysis will be very sensitive to this data). We will not have any more to say about this problem. However, we will point out that once a commitment has been established to an initial resource allocation and activity durations have been estimated and CPM has been performed, there is a form of sensitivity analysis that can be applied in order to consider the relative costs and benefits of making slight changes and additions to the present allocation. For more information on this topic see Markland, Section 13.3. 10.3 CPM WITH LINEAR PROGRAMMING As mentioned above, there will always be a critical path corresponding to the longest path in any project network. We can develop a linear program to determine the length 10.33 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD of this path and then employ the output from the simplex method to specify the critical activities. Given a project, we associate one decision variable with each node of the corresponding project network. These variables are defined as xj = time that the event corresponding to node j is scheduled to occur. There will be one constraint associated with each activity (ie. arc of the network). For any arc (i,j), we know that the corresponding activity is scheduled to begin at node i at time xi and end at node j at time xj. Given that the activity has duration of ti,j, in order to satisfy the precedence constraints on schedule, the following condition must be satisfied: (10.6) x j xi ti, j , j, i P( j) Given these restrictions, we want to specify values for the decision variables that minimize the overall duration of the project. Remembering that the first node is labelled 1, so that x1 is the scheduled start time for the project, and the last node is labelled N, so that x is the scheduled completion time for the project, the objective function and optimality criteria are given by N min Z = xN x1 10.34 (10.7) 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Combining (10.6) and (10.7) with non-negativity restrictions on the decision variables establishes a linear program whose optimal objective function value specifies the minimum duration of the project, or equivalently, the length of longest path from the origin (node 1) to the terminal node (node N) in the corresponding project network. In general, this linear program will appear as follows: min x N x1 x (10.8) s.t. x j xi ti, j xj 0 , , j, i P( j) j 1, , N 10.3.1 Example We can determine the longest path in our sample network of Figure 10.10 with the following linear program: min Z x6 x1 x s.t. x2 x1 3 x3 x1 2 x 4 x2 2 x5 x2 4 x 4 x3 1 (10.9) (Activity A) (Activity B) (Activity C) (Activity D) (Activity E) 10.35 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD x6 x 4 3 (Activity F) x6 x5 7 (Activity G) x1, , x6 0 One optimal solution to this program is given by x = (0,3,2,5,7,14) which yields Z= 14. Notice that these xj values for the particular solution correspond to the early event times, ET(j), for nodes j=1,...,N calculated in Example 10.2.3. However, this LP problem also has many other optimal solutions. In general, the value of xj in an optimal solution may assume any value between the early and late event times for the corresponding node in the network (think back to our definitions of these statistics to understand why this is the case). To specify the critical activities, remember what it means for an activity to be critical. The total float is equal to zero, so that any delay in the duration of that activity will result in a corresponding delay in the completion time for the project. Notice that the duration time for each activity is located on the right side of the constraint associated with that activity; and that the duration time for the project is measured by the objective function value, Z. The shadow price associated with a constraint 10.36 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD measures the increase in the objective function value resulting from an increase in the value of the right-hand side of that constraint. Therefore, since we know that increasing the duration of a critical activity by one time unit (ie. increasing the right-hand side of the associated constraint by one) will delay the project completion by one time unit, all critical activities will be characterized by a shadow price of +1. Furthermore, the shadow price for a constraint is always specified by the optimal value of the dual variable associated with that constraint. We have shown in Chapter 7 that the values of these dual variable are located in the Z-row of the final primal tableau after an application of the simplex method. So we see that the critical activities for the project are easily recognized as those whose corresponding constraints in the linear programming formulation of (10.8) have associated dual variable values of 1. Finally, we note here that, in applying a CPM analysis to a project network, this linear programming formulation is almost always abandoned in favor of the dynamic programming approach developed in Section 10.2. Given that this is the case, it is reasonable to assume 10.37 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD (surprisingly, there is little discussion of this issue in the usual references) that there are certain structural characteristics of these types of networks which generally allow for a more efficient solution with dynamic programming than with linear programming. There are several possible explanations for this; however, we will not go through these now, but rather will leave this issue as a consideration for the reader. 10.4 PROJECT EVALUATION AND REVIEW TECHNIQUE (PERT) We have stressed throughout our development of the critical path method that the duration times for each task used in the project network are only estimates, the actual times being unknown until the project is actually completed. With CPM we have thus far relied on point estimates, so that we in some sense ignore the uncertainty associated with these task times and simply insert our best guess into the analysis. The Project Evaluation and Review Technique (PERT) explicitly accounts for the uncertainty associated with task completion times by treating each estimate as a random variable having some probability distribution. 10.38 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Note: Don't panic if your background in statistics is not too strong - we will only assume a basic knowledge of random variables and probability distributions. The advantage of adding this additional level of complexity is that, after making certain simplifying assumptions concerning the nature of these probability distributions, we will be able to extend our analysis by determining the probability that the project will be completed on time. We first need to characterize the probability distributions associated with each task completion time. To this end, we replace the simple point estimates for each activity duration with three values representing different points of the distribution: m = most likely estimate (intended to provide the most realistic estimate of the time under "normal" conditions) a = optimistic estimate (represents the best possible time under the most favorable conditions) b = pessimistic estimate (represents the worst possible time under the least favorable conditions) Statistically speaking, 10.39 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD m is the estimate of the mode, of the underlying probability distribution; a represents the minimum possible duration of the activity and b represents the maximum possible duration of the activity. It is worthwhile to put aside technical matters for a moment to say a word about how these estimates are obtained. Remember that the person performing the analysis is presumably competent in operations research and the mechanics of CPM and PERT, but most likely has very little knowledge of the project and associated activities under consideration. For this reason it is not at all the analyst's responsibility to provide the values for these estimates - on the contrary, it would be wrong to attempt to do so. It is, however, a very important responsibility of the analyst to determine what is the best source for providing this information and to develop an effective style for communicating her requirements and collecting the appropriate data. In determining the best source of information, we need to decide whose opinion would be most "expert" for 10.40 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD assessing task completion times. Perhaps it is the project manager, or perhaps the person working on a particular task, or maybe even a source not directly related to this project but with a wealth of experience working on similar projects. Once the appropriate information source is discovered, we must make certain that we obtain exactly the information we need by communicating in language familiar to our source. It is unlikely that the person with which we deal will understand and be able to respond to a request for the mode or lower bound of a probability distribution. We must therefore be able to express these concepts in laymen terms and develop some method for verifying that our source is relaying the information we want. The ability to extract information in this way is a very subtle skill whose importance within an analysis (everybody is familiar with the expression "garbage in, garbage out") is too often overlooked in favor of other, more technical, issues. There is certainly a good deal more to say on this topic, but for the time being it will suffice to simply be aware of the challenges associated with the seemingly simple task of assembling the data requirements for a study. Now, we summarize all of our information on each probability distribution into two statistics, 10.41 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD the expected value or mean (ti,j) and the variance ( i,2 j ). To do this, we assume that each job completion time follows a beta distribution. This will allow us to make the following approximations: 1 2m 12 (a b) 3 1 2 (b a) 6 ti, j (10.10) i,2 j (10.11) Now that we have estimates for the mean and variance for the duration time for each individual task, we want to develop comparable statistics for the entire project. To do this we first perform our usual CPM analysis using the values ti,j for estimates of activity durations; then, after specifying a critical path for the given project, we need to make two simplifying assumptions. 1.First, we assume that, no matter what the duration times of each task actually turn out to be once the project is completed, the path we have specified as critical from our analysis will in fact have turned out to be the critical one. In other words, we know that actual task times can vary significantly from their expected values . In particular, if jobs along the critical path that we have 10.42 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD specified turn out to be completed in times well below their means, and a different path has its jobs completed in times longer than their means, then this second path could very well have turned out to be the critical one. Our assumption here asserts that this will never happen. 2. Secondly, we assume that duration times for all activities are statistically independent, so that the mean and variance for overall project time is determined as simply the sum of means and variances of times for the activities along a critical path. Given these assumptions, we denote CP as the set of arcs along the critical path and specify the mean and variance for overall project completion time as follows: (10.12) E(T) Expected value of T = ti, j Var(T) Variance of T = (i, j)CP i,2 j (i, j)CP (10.13) Finally, we make a third assumption that our critical path contains a sufficiently large number of activities so that we can appeal to the central limit theorem. Remembering that the random variable T is determined as the sum of many independent random variables ti,j, this theorem states that the probability distribution of such a sum is normal under a broad range of conditions. 10.43 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Now, given estimates for the mean and variance of T in (10.12) and (10.13) and the fact that it is normally distributed, it is straightforward to reference a table for normal variables found in any probability or statistics book to estimate the probability that the actual project time T will attain a value no greater than the scheduled completion time. 10.4.1 Example Consider again our sample project network from Figure 10.10 and assume that, instead of the point estimates for durations displayed with each arc, we rely on the following data for each activity: Acti m a b vity A 2 1 9 B 2 1 3 C 2 1 3 D 4 1.5 6.5 E 1 0.5 1.5 F 3 1 5 G 6 4 14 We can compute the mean and variance for each activity duration from (10.10) and (10.11): 10.44 620-261: INTRODUCTION TO OPERATIONS RESEARCH 8 1 9 tA 3 6 8 1 3 tB 2 6 8 1 3 tC 2 6 16 1.5 6.5 tD 4 6 4 0.5 1.5 tE 1 6 12 1 5 tF 3 6 24 4 14 tG 7 6 CHAPTER 10: CRITICAL PATH METHOD (9 1)2 1.78 36 2 (3 1) B2 0.11 36 (3 1)2 2 C 0.11 36 2 (6.5 1.5) D2 0.69 36 2 (1.5 0.5) E2 0.03 36 2 (5 1) F2 0.44 36 (14 4)2 2 G 2.78 36 2A We now determine a critical path by an application of CPM with duration estimates for each activity given by the means ti,j calculated above. Since these values are the same as our initial estimates in Figure 10.10, we can appeal to our results from Section 10.2 - in particular, we have from Example 10.2.7 that the critical path is made up of jobs A, D and G. Allowing for the appropriate assumptions, we have from (10.12) and (10.13) that the mean and variance for project duration is as follows: 10.45 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD E(T) t A t D tG 3 4 7 14 Var(T) 2A 2D G2 1.78 0.69 2.78 5.25 We see that the expected project completion time is 14 days. If we were hoping to finish the project in just 12 days, then, assuming that we can appeal to the central limit theorem and thereby assert that the T is normally distributed, we can compute the probability of this event occurring. First standardize the random variable: : T E(T) Var(T) We now compute the probability of the event as follows: Pr(T 12) Pr( 12 E( T) Var(T ) ) Pr( 1214 5.25 ) Pr( 0.8729 ) To calculate this probability, we simply consult a table for the standard normal distribution in any statistics textbook to obtain 10.46 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD Pr( 0.8729) 0.19 So we see from our PERT analysis that there is approximately a 19% chance that the project will be completed at least 2 days ahead of schedule. Finally, our development of this approach has relied at several different stages on various assumptions, so that the usefulness of this method will obviously depend to a large extent on the validity of these assumptions. As we introduced each assumption throughout the discussion above, we explained why each was necessary but gave no indication of the likelihood that the required conditions would be satisfied in a "real-world" situation. This is something that always needs to be assessed for each individual study. For example, in order that the mean and variance of total project time be equal to the sum of the corresponding statistics for individual jobs along any path, we needed to assume that task times for these individual activities are statistically independent. The implication of this assertion is that any factor influencing the duration time of one job will not influence the duration time of any other. How likely is it that this assumption will hold? Probably not very likely, in fact. For example, if the project were being performed outdoors, then weather 10.47 620-261: INTRODUCTION TO OPERATIONS RESEARCH CHAPTER 10: CRITICAL PATH METHOD conditions will almost certainly impact all completion times. Similarly, if the same person were to work on several different jobs within a project, then she may very well significantly affect the times for each. On the other hand, situations will certainly exist where project times are completely independent or the level of dependence is small enough to be considered negligible so that independence can be assumed. The important point is that this must always be checked. Descriptions of algorithms and solution methods often casually state assumptions which in real life are very difficult to guarantee. Before applying any method, always make sure to guarantee that the assumptions supporting the approach are indeed realized in the system under study. 10.48