The CPM Procedure |
Consider the software project defined in Example 2.24 but now the project requires a single resource: a programmer. A network diagram displaying the activities and their precedence relationships is shown in Figure 2.8, as part of the same example.
Some of the activities in this project have a fixed duration, requiring a fixed length of time from a programmer. Other activities specify the amount of work required in terms of man-days; for these activities, the length of the task will depend on the number of programmers (or rate) that is assigned to the task. The activities in the project, their durations (if fixed) or the total work required (if resource-driven) in days, the precedence constraints, and the resource requirements are displayed in Output 2.25.1.
Suppose that you have only one programmer assigned to the project. You can determine a resource-constrained schedule using PROC CPM by specifying a resource availability data set, resin (also in Output 2.25.1). The Resource data set indicates that the resource Programmer is a driving resource whenever the WORK variable has a valid value.
Output 2.25.1: Project DataThe following statements invoke PROC CPM with a WORK= specification on the RESOURCE statement, which identifies (in number of man-days, in this case) the amount of work required from the resource Programmer for each activity. If the WORK variable has a missing value, the activity in that observation is assumed to have a fixed duration. The project is scheduled to start on April 12, 2004, and the activities are assumed to follow a five-day work week. The resulting schedule is displayed in Output 2.25.2. For each activity in the project, the value of the variable DUR_TYPE indicates whether the resource drives the activity's duration ('RDRIVEN') or not ('FIXED').
proc cpm data=software out=sftout1 resout=rout1 rsched=rsftout1 resin=resin date='12apr04'd interval=weekday; act act; succ s1 s2; dur dur; res Programmer / work=mandays obstype=otype period=per rschedid=Activity; id Activity; run; title 'Software Development'; title2 'Resource Constrained Schedule: Single Programmer'; proc print data=rsftout1; id Activity; run;Output 2.25.2: Resource Schedule
|
The following statements invoke PROC GANTT to display a Gantt chart of the schedule in Output 2.25.3. The activity, 'Documentation', is delayed until May 11, 2004, because there is only one programmer available to the project.
title h=2 'Software Development'; title2 h=1.5 'Resource Constrained Schedule: Single Programmer'; proc gantt graphics data=sftout1; id Activity Programmer; chart / pcompress scale=3 increment=4 interval=weekday height=2.5 nojobnum nolegend between=5 act=act succ=(s1 s2) ; run;Output 2.25.3: Resource-Constrained Schedule: Single Programmer
Next, suppose that you have two programmers assigned to your project and you can use either one of them for a given task, depending on their availability. To model this scenario, specify Chris and John as alternate resources that can be substituted for the resource Programmer. The Resource data set, resin2, printed in Output 2.25.4, indicates that Chris and John are alternates for Programmer. Specifying an availability of '0' for the resource Programmer ensures that the procedure will assign one of the two programmers, Chris or John, to each task.
The second observation in the data set resin2 indicates two different rates of substitution for the alternate resources. A value less than 1 indicates that the alternate resource is more efficient than the primary resource, while a value greater than 1 indicates that the alternate resource is less efficient. For fixed-duration activities, the use of the alternate resource changes the rate of utilization of the resource, while for a resource-driven activity, it changes the duration of the resource. The data set resin specifies that John is twice as efficient as the primary resource Programmer while Chris takes one and a half times as long as the generic resource to accomplish a task.
Output 2.25.4: Alternate ProgrammersThe following statements invoke PROC CPM with the new Resource data set and a modified Activity data set that includes the newly added resource variables, Chris and John. You can see the effects of the alternate resource specifications in the Resource Schedule data set, printed in Output 2.25.5. The activity 'Product Design' that takes 3 days of time from a generic programmer actually takes 4.5 days because the programmer used is Chris, who is substituted at a rate of 1.5. On the other hand, the programmer John efficiently completes the task, 'Documentation', in only 1 day, instead of the planned 2 days for a generic programmer. Note also that the start and finish times are specified as SAS datetime values because the substitution of alternate resources results in some of the resource durations being fractional.
data software2; set software; Chris = .; John = .; run; proc cpm data=software2 out=sftout2 rsched=rsftout2 resin=resin2 date='12apr04'd interval=weekday resout=rout2; act act; succ s1 s2; dur dur; res Programmer Chris John / work=mandays obstype=otype period=per resid=resid rschedid=Activity; id Activity; run;Output 2.25.5: Resource Schedule with Alternate Programmers
|
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.