Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CPM Procedure

Getting Started

The basic steps necessary to schedule a project are illustrated using a simple example. Consider a software development project in which an applications developer has the software finished and ready for preliminary testing. In order to complete the project, several activities must take place. Certain activities cannot start until other activities have finished. For instance, the preliminary documentation must be written before it can be revised and edited and before the Quality Assurance department (QA) can test the software. Such constraints among the activities (namely, activity B can start after activity A has finished) are referred to as precedence constraints. Given the precedence constraints and estimated durations of the activities, you can use the critical path method to determine the shortest completion time for the project.

cpmnaoa.gif (3191 bytes)

Figure 2.1: Activity-On-Arc Network

The first step in determining project completion time is to capture the relationships between the activities in a convenient representation. This is done by using a network diagram. Two types of network diagrams are popular for representing a project.

cpmnaon.gif (3378 bytes)

Figure 2.2: Activity-On-Node Network

The AON representation of the network is used in the remainder of this section to illustrate some of the features of PROC CPM. The project data are input to PROC CPM using a SAS data set. The basic project information is conveyed to PROC CPM via the ACTIVITY, SUCCESSOR, and DURATION statements. Each observation of the Activity data set specifies an activity in the project, its duration, and its immediate successors. PROC CPM enables you to specify all of the immediate successors in the same observation, or you can have multiple observations for each activity, listing each successor in a separate observation. (Multiple variables in the SUCCESSOR statement are used here). PROC CPM enables you to use long activity names. In this example, shorter names are used for the activities to facilitate data entry; a variable, Descrpt, is used to specify a longer description for each activity.

Among other things, the procedure determines

No displayed output is produced. However, the results are saved in an output data set (the Schedule data set) that is shown in Figure 2.3.

The code for the entire program is as follows:

   data software;
      input Descrpt  $char20.
            Duration 23-24
            Activity $ 27-34
            Succesr1 $ 37-44
            Succesr2 $ 47-54;
      datalines;
   Initial Testing       20  TESTING   RECODE
   Prel. Documentation   15  PRELDOC   DOCEDREV  QATEST
   Meet Marketing        1   MEETMKT   RECODE
   Recoding              5   RECODE    DOCEDREV  QATEST
   QA Test Approve       10  QATEST    PROD
   Doc. Edit and Revise  10  DOCEDREV  PROD
   Production            1   PROD
   ;

   proc cpm data=software
            out=intro1
            interval=day
            date='01mar92'd;
      id descrpt;
      activity activity;
      duration duration;
      successor succesr1 succesr2;
   run;

   title 'Project Schedule';
   proc print data=intro1;
   run;

Project Schedule

Obs Activity Succesr1 Succesr2 Duration Descrpt E_START E_FINISH L_START L_FINISH T_FLOAT F_FLOAT
1 TESTING RECODE   20 Initial Testing 01MAR92 20MAR92 01MAR92 20MAR92 0 0
2 PRELDOC DOCEDREV QATEST 15 Prel. Documentation 01MAR92 15MAR92 11MAR92 25MAR92 10 10
3 MEETMKT RECODE   1 Meet Marketing 01MAR92 01MAR92 20MAR92 20MAR92 19 19
4 RECODE DOCEDREV QATEST 5 Recoding 21MAR92 25MAR92 21MAR92 25MAR92 0 0
5 QATEST PROD   10 QA Test Approve 26MAR92 04APR92 26MAR92 04APR92 0 0
6 DOCEDREV PROD   10 Doc. Edit and Revise 26MAR92 04APR92 26MAR92 04APR92 0 0
7 PROD     1 Production 05APR92 05APR92 05APR92 05APR92 0 0

Figure 2.3: Software Project Plan

In addition to the variables specified in the ACTIVITY, SUCCESSOR, DURATION, and ID statements, the output data set contains the following new variables.

E_START
specifies the earliest time an activity can begin, subject to any time constraints and the completion time of the preceding activity.

E_FINISH
specifies the earliest time an activity can be finished, assuming it starts at E_START.

L_START
specifies the latest time an activity can begin so that the project is not delayed.

L_FINISH
specifies the latest time an activity can be finished without delaying the project.

T_FLOAT
specifies the amount of flexibility in the starting of a specific activity without delaying the project:

T_FLOAT = L_START - E_START = L_FINISH - E_FINISH

F_FLOAT
specifies the difference between the early finish time of the activity and the early start time of the activity's immediate successors.

In Figure 2.3 the majority of the tasks have a total float value of 0. These events are critical; that is, any delay in these activities will cause the project to be delayed. Some of the activities have slack present, which means that they can be delayed by that amount without affecting the project completion date. For example, the activity MEETMKT has a slack period of 19 days because there are 19 days between 01MAR92 and 20MAR92.

The INTERVAL= option in the PROC CPM statement enables you to specify the durations of the activities in one of several possible units including days, weeks, months, hours, and minutes. In addition, you can schedule activities around weekends and holidays. (To skip weekends, you specify INTERVAL=WEEKDAY.) You can also choose different patterns of work during a day or a week (holidays on Friday and Saturday) and different sets of holidays for the different activities in the project. A calendar consists of a set of work schedules for a typical week and a set of holidays. PROC CPM enables you to define any number of calendars and associate different activities with different calendars.

In the previous example, you saw that you could schedule your project by choosing a project start date. You can also specify a project finish date if you have a deadline to be met and you need to determine the latest start times for the different activities in the project. You can also set constraints on start or finish dates for specific activites within a given project as well. For example, testing the software may have to be delayed until the testing group finishes another project that has a higher priority. PROC CPM can schedule the project subject to such restrictions through the use of the ALIGNDATE and ALIGNTYPE statements. See Example 2.12 for more information on the use of the ALIGNDATE and ALIGNTYPE statements.

For a project that is already in progress, you can incorporate the actual schedule of the activities (some activities may already be completed while others may still be in progress) to obtain a progress update. You can save the original schedule as a baseline schedule and use it to compare against the current schedule to determine if any of the activities have taken longer than anticipated.

Quite often the resources needed to perform the activities in a project are available only in limited quantities and may cause certain activities to be postponed due to unavailability of the required resources. You can use PROC CPM to schedule the activities in a project subject to resource constraints. A wide range of options enables you to control the scheduling process. For example, you can specify resource or activity priorities, set constraints on the maximum amount of delay that can be tolerated for a given activity, allow activities to be preempted, specify alternate resources that can be used instead of scarce resources, or indicate secondary levels of resources that can be used when the primary levels are insufficient.

When an activity requires multiple resources, it is possible that each resource may follow a different calendar and each may require varying amounts of work. PROC CPM enables you to define resource-driven durations for the activities. You can also specify calendars for the resources. In either of these situations it is possible that each resource used by an activity may have its own individual schedule. PROC CPM enables you to save the resource schedules for the different activities in a Resource Schedule data set, the RESOURCESHCED= data set.

In addition to obtaining a resource-constrained schedule in an output data set, you can save the resource utilization summary in another output data set, the RESOURCEOUT= data set. Several options enable you to control the amount of information saved in this data set.

The CPM procedure enables you to define activities in a multiproject environment with multiple levels of nesting. You can specify a PROJECT variable that identifies the name or number of the project to which each activity belongs.

All the options available with the CPM procedure are discussed in detail in the following sections. Several examples illustrate most of the features.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.