Example 2.14: Summarizing Resource Utilization
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 2.14.1.
Output 2.14.1: Resource Utilization: WIDGRES
Approve Plan |
5 |
1 |
2 |
2 |
Drawings |
10 |
2 |
3 |
1 |
Anal. Market |
5 |
2 |
4 |
1 |
Write Specs |
5 |
2 |
3 |
2 |
Prototype |
15 |
3 |
5 |
4 |
Mkt. Strat. |
10 |
4 |
6 |
. |
Materials |
10 |
5 |
7 |
. |
Facility |
10 |
5 |
7 |
2 |
Init. Prod. |
10 |
7 |
8 |
4 |
Evaluate |
10 |
8 |
9 |
1 |
Test Market |
15 |
6 |
9 |
. |
Changes |
5 |
9 |
10 |
2 |
Production |
0 |
10 |
11 |
4 |
Marketing |
0 |
6 |
12 |
. |
Dummy |
0 |
8 |
6 |
. |
|
Output 2.14.2: Resource Utilization: HOLDATA
25DEC03 |
Christmas |
01JAN04 |
New Year |
|
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 2.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 2.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 2.14.3: Resource Utilization: Resource Usage Data Set
01DEC03 |
2 |
2 |
02DEC03 |
2 |
2 |
03DEC03 |
2 |
2 |
04DEC03 |
2 |
2 |
05DEC03 |
2 |
2 |
08DEC03 |
4 |
1 |
09DEC03 |
4 |
1 |
10DEC03 |
4 |
1 |
11DEC03 |
4 |
1 |
12DEC03 |
4 |
1 |
15DEC03 |
1 |
3 |
16DEC03 |
1 |
3 |
17DEC03 |
1 |
3 |
18DEC03 |
1 |
3 |
19DEC03 |
1 |
3 |
22DEC03 |
4 |
4 |
23DEC03 |
4 |
4 |
24DEC03 |
4 |
4 |
26DEC03 |
4 |
4 |
29DEC03 |
4 |
4 |
30DEC03 |
4 |
4 |
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 2.14.4: Calendar Showing 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 | | |
-------------------------------------------------------------
|
--------------------------
| Legend |
| |
| ESS Usage of engineer |
| LSS Usage of engineer |
--------------------------
|
|
Output 2.14.5: Bar Chart for Early Start 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 2.14.6: Bar Chart for Late Start 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 2.14.4 through Output 2.14.6
can be used to compare different schedules with respect to
resource usage.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.