In all the preceding examples, it was assumed that you had enough resources to work on the different tasks. Unfortunately, as a project manager you need to schedule your project using the limited set of resources available to you. In this example, you will assign some project resources and schedule the project subject to resource constraints.
In order to assign resources to the tasks, you need to add resource variables to the Activity data set as well as define a resource availability (Resource) data set.
Suppose that the resources that you are interested in are Tester and Programmer. The following statements set up the project data needed to perform resource-constrained scheduling with PROC PM using the output data produced in Example 5.4.
* Define a Resource data set specifying ; * 1 Tester and 1 Programmer as the ; * available resources ; data resources; input _date_ date7. Tester Programmer; datalines; 01jan04 1 1 ; * Add the resource variables Tester and ; * Programmer to the Activity data set ; * (the output data set saved in last example) ; data softout4; set softout4; Tester=.; Programmer=.; run;
* Use softout4 as the Activity data set and ; * specify the preceding Resource data set. ; * Save the schedule in softout5. ; proc pm data=softout4 project=softattr calendar=calendar resourcein=resources date='1mar04'd interval=weekday projname='Software Project' out=softout5; act actid; succ succid; project pntid; duration duration; id activity; calid calid; resource Tester Programmer / per=_date_; run;
Output 5.5.1: Adding Resources to the Project
Output 5.5.1 shows the Table and Gantt Views of the project after rearranging some of the columns and moving the dividing line to show the resource columns. The Resource Schedule bars are also brought into display by right-clicking on the background in the Gantt View and selecting . The Resource Schedule bar is shown (in blue) between the Early Schedule bar and the Baseline Schedule bar. Note that the resource schedule coincides with the early schedule because no resource requirements have been specified for either of the two resources.
You can now use the Table View to enter the resource requirements for each task. Set the requirement for the resource Tester
to 1
for the tasks 'Document' and 'Test,' and the requirement for the resource Programmer to '1' for the tasks numbered '2,' '3,'
'5,' and '6.' The resulting schedule is displayed in Output 5.5.2. In this view, the baseline schedule is not displayed. You can see that several of the tasks have been delayed, resulting
in lengthening the project duration to 29 weekdays.
Output 5.5.2: Editing Resource Requirements
You can set the resource-constrained schedule as a baseline to do some “what-if” analysis. For example, suppose you would like to determine the effect of adding another programmer to the project. In order to change the resource availability, you need to save the current project, edit the Resource availability data set to add another programmer, and then reinvoke the PM procedure.
First, in the PM window displayed in Output 5.5.2, do the following:
Display the Baseline Schedule bar again.
Use the Replace Baseline selection from the Edit menu to select the Resource Schedule as the new baseline schedule.
Save the project preferences.
Close the PM window.
Use the following statements to reinvoke PROC PM after defining a new resource availability:
* Change the resource availability for Programmer to 2 ; data resources; input _date_ date7. Tester Programmer; datalines; 01jan04 1 2 ;
* Use softout4 as the Activity data set and specify ; * the preceding Resource data set. ; * Save the schedule in softout5. ; proc pm data=softout4 project=softattr calendar=calendar resourcein=resources date='1mar04'd interval=weekday projname='Software Project' out=softout5; act actid; succ succid; project pntid; duration duration; id activity; calid calid; resource Tester Programmer / per=_date_; run;
Using the new resource availability, you reduced the project duration by five days. The resulting schedule is displayed in Output 5.5.3, which also shows the baseline schedule corresponding to the earlier resource availability data set.
Output 5.5.3: Comparison of Two Resource Schedules