This example shows how you can use the RESOURCE statement in conjunction with the RESOURCEOUT= option to summarize resource utilization. The example assumes that Engineer is a resource category and the project network (in AOA format) along with resource requirements for each activity is in a SAS data set, as displayed in Output 4.14.1.
Output 4.14.1: Resource Utilization: WIDGRES
Summarizing Resource Utilization |
Activity Data Set |
Obs | task | days | tail | head | engineer |
---|---|---|---|---|---|
1 | Approve Plan | 5 | 1 | 2 | 2 |
2 | Drawings | 10 | 2 | 3 | 1 |
3 | Study Market | 5 | 2 | 4 | 1 |
4 | Write Specs | 5 | 2 | 3 | 2 |
5 | Prototype | 15 | 3 | 5 | 4 |
6 | Mkt. Strat. | 10 | 4 | 6 | . |
7 | Materials | 10 | 5 | 7 | . |
8 | Facility | 10 | 5 | 7 | 2 |
9 | Init. Prod. | 10 | 7 | 8 | 4 |
10 | Evaluate | 10 | 8 | 9 | 1 |
11 | Test Market | 15 | 6 | 9 | . |
12 | Changes | 5 | 9 | 10 | 2 |
13 | Production | 0 | 10 | 11 | 4 |
14 | Marketing | 0 | 6 | 12 | . |
15 | Dummy | 0 | 8 | 6 | . |
Output 4.14.2: Resource Utilization: HOLDATA
In the following program, PROC CPM is invoked with the RESOURCE statement identifying the resource for which usage information
is required. The project is scheduled only on weekdays, and holiday information is included through the Holiday data set,
HOLDATA
, which identifies two holidays, one for Christmas and one for New Year’s Day. Output 4.14.2 shows the Holiday data set.
The program saves the resource usage information in a data set named ROUT
, which is displayed in Output 4.14.3. Two variables, Eengineer
and Lengineer
, denote the usage of the resource engineer
corresponding to the early and late start schedules, respectively. Note the naming convention for the variables in the resource
usage data set: A prefix (E for Early and L for Late) is followed by the name of the resource variable, engineer. Note also
that the data set contains only observations corresponding to weekdays; by default, the _TIME_
variable in the resource usage output data set increases by one unit interval of the default calendar for every observation. Further, the MAXDATE= option is used in the RESOURCE statement to get resource
usage information only for the month of December.
proc cpm date='1dec03'd interval=weekday resourceout=rout data=widgres holidata=holdata; id task; tailnode tail; duration days; headnode head; resource engineer / maxdate='31dec03'd; holiday hol; run;
Output 4.14.3: Resource Utilization: Resource Usage Data Set
Summarizing Resource Utilization |
Resource Usage |
Obs | _TIME_ | Eengineer | Lengineer |
---|---|---|---|
1 | 01DEC03 | 2 | 2 |
2 | 02DEC03 | 2 | 2 |
3 | 03DEC03 | 2 | 2 |
4 | 04DEC03 | 2 | 2 |
5 | 05DEC03 | 2 | 2 |
6 | 08DEC03 | 4 | 1 |
7 | 09DEC03 | 4 | 1 |
8 | 10DEC03 | 4 | 1 |
9 | 11DEC03 | 4 | 1 |
10 | 12DEC03 | 4 | 1 |
11 | 15DEC03 | 1 | 3 |
12 | 16DEC03 | 1 | 3 |
13 | 17DEC03 | 1 | 3 |
14 | 18DEC03 | 1 | 3 |
15 | 19DEC03 | 1 | 3 |
16 | 22DEC03 | 4 | 4 |
17 | 23DEC03 | 4 | 4 |
18 | 24DEC03 | 4 | 4 |
19 | 26DEC03 | 4 | 4 |
20 | 29DEC03 | 4 | 4 |
21 | 30DEC03 | 4 | 4 |
22 | 31DEC03 | 4 | 4 |
This data set can be used as input for any type of resource utilization report. In this example, the resource usage for the month of December is presented in two ways: on a calendar and in a chart. The following program prints the calendar and bar chart:
/* format the Engineer variables */ proc format; picture efmt other='9 ESS Eng.'; picture lfmt other='9 LSS Eng.'; proc calendar legend weekdays data=rout holidata=holdata; id _time_; var eengineer lengineer; format eengineer efmt. lengineer lfmt.; holiday hol; holiname name; proc chart data=rout; hbar _time_/sumvar=eengineer discrete; hbar _time_/sumvar=lengineer discrete; run;
Output 4.14.4: Calendar Showing Resource Usage
Summarizing Resource Utilization |
Resource Usage |
------------------------------------------------------------- | | | December 2003 | | | |-----------------------------------------------------------| | Monday | Tuesday | Wednesday | Thursday | Friday | |-----------+-----------+-----------+-----------+-----------| | 1 | 2 | 3 | 4 | 5 | | | | | | | | 2 ESS Eng | 2 ESS Eng | 2 ESS Eng | 2 ESS Eng | 2 ESS Eng | | 2 LSS Eng | 2 LSS Eng | 2 LSS Eng | 2 LSS Eng | 2 LSS Eng | |-----------+-----------+-----------+-----------+-----------| | 8 | 9 | 10 | 11 | 12 | | | | | | | | 4 ESS Eng | 4 ESS Eng | 4 ESS Eng | 4 ESS Eng | 4 ESS Eng | | 1 LSS Eng | 1 LSS Eng | 1 LSS Eng | 1 LSS Eng | 1 LSS Eng | |-----------+-----------+-----------+-----------+-----------| | 15 | 16 | 17 | 18 | 19 | | | | | | | | 1 ESS Eng | 1 ESS Eng | 1 ESS Eng | 1 ESS Eng | 1 ESS Eng | | 3 LSS Eng | 3 LSS Eng | 3 LSS Eng | 3 LSS Eng | 3 LSS Eng | |-----------+-----------+-----------+-----------+-----------| | 22 | 23 | 24 | 25 | 26 | | | | |*Christmas*| | | 4 ESS Eng | 4 ESS Eng | 4 ESS Eng | | 4 ESS Eng | | 4 LSS Eng | 4 LSS Eng | 4 LSS Eng | | 4 LSS Eng | |-----------+-----------+-----------+-----------+-----------| | 29 | 30 | 31 | | | | | | | | | | 4 ESS Eng | 4 ESS Eng | 4 ESS Eng | | | | 4 LSS Eng | 4 LSS Eng | 4 LSS Eng | | | ------------------------------------------------------------- |
Output 4.14.5: Bar Chart for Early Start Usage
Summarizing Resource Utilization |
Resource Usage |
Period Identifier ESS Usage of en Sum | 01DEC03 |******************** 2.000000 02DEC03 |******************** 2.000000 03DEC03 |******************** 2.000000 04DEC03 |******************** 2.000000 05DEC03 |******************** 2.000000 08DEC03 |**************************************** 4.000000 09DEC03 |**************************************** 4.000000 10DEC03 |**************************************** 4.000000 11DEC03 |**************************************** 4.000000 12DEC03 |**************************************** 4.000000 15DEC03 |********** 1.000000 16DEC03 |********** 1.000000 17DEC03 |********** 1.000000 18DEC03 |********** 1.000000 19DEC03 |********** 1.000000 22DEC03 |**************************************** 4.000000 23DEC03 |**************************************** 4.000000 24DEC03 |**************************************** 4.000000 26DEC03 |**************************************** 4.000000 29DEC03 |**************************************** 4.000000 30DEC03 |**************************************** 4.000000 31DEC03 |**************************************** 4.000000 | ----------+---------+---------+---------+ 1 2 3 4 ESS Usage of engineer |
Output 4.14.6: Bar Chart for Late Start Usage
Summarizing Resource Utilization |
Resource Usage |
Period Identifier LSS Usage of en Sum | 01DEC03 |******************** 2.000000 02DEC03 |******************** 2.000000 03DEC03 |******************** 2.000000 04DEC03 |******************** 2.000000 05DEC03 |******************** 2.000000 08DEC03 |********** 1.000000 09DEC03 |********** 1.000000 10DEC03 |********** 1.000000 11DEC03 |********** 1.000000 12DEC03 |********** 1.000000 15DEC03 |****************************** 3.000000 16DEC03 |****************************** 3.000000 17DEC03 |****************************** 3.000000 18DEC03 |****************************** 3.000000 19DEC03 |****************************** 3.000000 22DEC03 |**************************************** 4.000000 23DEC03 |**************************************** 4.000000 24DEC03 |**************************************** 4.000000 26DEC03 |**************************************** 4.000000 29DEC03 |**************************************** 4.000000 30DEC03 |**************************************** 4.000000 31DEC03 |**************************************** 4.000000 | ----------+---------+---------+---------+ 1 2 3 4 LSS Usage of engineer |
Charts such as those shown in Output 4.14.4 through Output 4.14.6 can be used to compare different schedules with respect to resource usage.