Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CPM Procedure

Example 2.15: Resource Allocation

In the previous example, a summary of the resource utilization is obtained. Suppose that you want to schedule the project subject to constraints on the availability of ENGINEERS. The activity data, as in Example 2.14, are assumed to be in a data set named WIDGRES. The resource variable, engineer, specifies the number of engineers needed per day for each activity in the project. In addition to the resource engineer, a consumable resource engcost is computed at a daily rate of 200 for each unit of resource engineer used per day. The following DATA step uses the Activity data set from Example 2.14 to create a new Activity data set that includes the resource engcost.

data widgres;
   set widgres;
   if engineer ^= . then engcost = engineer * 200;
   run;

Now suppose that the availability of the resource engineer and the total outlay for engcost is saved in a data set named WIDGRIN, displayed in Output 2.15.1.

Output 2.15.1: Resource Availability Data Set

Resource Allocation
Data Set WIDGRIN

Obs per otype engineer engcost
1 . restype 1 2
2 . suplevel 1 .
3 02DEC91 reslevel 3 40000
4 27DEC91 reslevel 4 .


In the data set WIDGRIN, the first observation indicates that engineer is a replenishable resource, while engcost is a consumable resource. The second observation indicates that an extra engineer is available, if necessary. The remaining observations indicate the availability profile starting from December 2, 1991. PROC CPM is then used to schedule the project to start on December 2, 1991, subject to the availability as specified.

   proc cpm date='02dec91'd interval=weekday
            data=widgres holidata=holdata resin=widgrin
            out=widgschd resout=widgrout;
      tailnode tail;
      duration days;
      headnode head;
      holiday hol;
      resource engineer engcost / period=per obstype=otype
                                  schedrule=shortdur
                                  delayanalysis;
      id task;
      run;

Output 2.15.2: Resource Constrained Schedule: Rule = SHORTDUR

Resource Allocation
Resource Constrained Schedule: Rule = SHORTDUR

Obs tail head days task engineer engcost S_START S_FINISH E_START E_FINISH L_START L_FINISH R_DELAY DELAY_R SUPPL_R
1 1 2 5 Approve Plan 2 400 02DEC91 06DEC91 02DEC91 06DEC91 02DEC91 06DEC91 0    
2 2 3 10 Drawings 1 200 16DEC91 30DEC91 09DEC91 20DEC91 09DEC91 20DEC91 5 engineer  
3 2 4 5 Anal. Market 1 200 09DEC91 13DEC91 09DEC91 13DEC91 22JAN92 28JAN92 0    
4 2 3 5 Write Specs 2 400 09DEC91 13DEC91 09DEC91 13DEC91 16DEC91 20DEC91 0    
5 3 5 15 Prototype 4 800 31DEC91 21JAN92 23DEC91 14JAN92 23DEC91 14JAN92 0    
6 4 6 10 Mkt. Strat. . . 16DEC91 30DEC91 16DEC91 30DEC91 29JAN92 11FEB92 0    
7 5 7 10 Materials . . 22JAN92 04FEB92 15JAN92 28JAN92 15JAN92 28JAN92 0    
8 5 7 10 Facility 2 400 22JAN92 04FEB92 15JAN92 28JAN92 15JAN92 28JAN92 0    
9 7 8 10 Init. Prod. 4 800 05FEB92 18FEB92 29JAN92 11FEB92 29JAN92 11FEB92 0    
10 8 9 10 Evaluate 1 200 19FEB92 03MAR92 12FEB92 25FEB92 19FEB92 03MAR92 0    
11 6 9 15 Test Market . . 19FEB92 10MAR92 12FEB92 03MAR92 12FEB92 03MAR92 0    
12 9 10 5 Changes 2 400 11MAR92 17MAR92 04MAR92 10MAR92 04MAR92 10MAR92 0    
13 10 11 0 Production 4 800 18MAR92 18MAR92 11MAR92 11MAR92 11MAR92 11MAR92 0    
14 6 12 0 Marketing . . 19FEB92 19FEB92 12FEB92 12FEB92 11MAR92 11MAR92 0    
15 8 6 0 Dummy . . 19FEB92 19FEB92 12FEB92 12FEB92 12FEB92 12FEB92 0    


In the first invocation of PROC CPM, the scheduling rule used for ordering the activities to be scheduled at a given time is specified to be SHORTDUR. The data set WIDGSCHD, displayed in Output 2.15.2, contains the resource constrained start and finish times in the variables S_START and S_FINISH. On December 9, three activities can be scheduled, all of which require the resource engineer. Using the scheduling rule specified, PROC CPM schedules the activities with the shortest durations first; thus, the activity `Drawings' is delayed by five working days, until December 16, 1991.

The DELAYANALYSIS option in the RESOURCE statement helps analyze the cause of the delay by adding three new variables to the Schedule data set, R_DELAY, DELAY_R, and SUPPL_R. In this example, the R_DELAY and DELAY_R variables indicate that there is a delay of five days in the activity `Drawings' due to the resource engineer. Such information helps to pinpoint the source of resource insufficiency, if any. Note that other activities that follow `Drawings' also have S_START>E_START, but the slippage in these activities is not caused by resource insufficiency, it is due to their predecessors being delayed. Note that the entire project is delayed by five working days due to resource constraints (the maximum value of S_FINISH is 18MAR92, while the maximum value of E_FINISH is 11MAR92).

Note also that in this invocation, the DELAY= option is not specified; therefore, the supplementary level of resource is not used, since the primary levels of resources are found to be sufficient to schedule the project by delaying some of the activities.

Output 2.15.3: Resource Usage: Rule = SHORTDUR

Resource Allocation
Usage Profiles for Constrained Schedule: Rule = SHORTDUR

Obs _TIME_ Eengineer Lengineer Rengineer Aengineer Eengcost Lengcost Rengcost Aengcost
1 02DEC91 2 2 2 1 400 400 400 40000
2 03DEC91 2 2 2 1 400 400 400 39600
3 04DEC91 2 2 2 1 400 400 400 39200
4 05DEC91 2 2 2 1 400 400 400 38800
5 06DEC91 2 2 2 1 400 400 400 38400
6 09DEC91 4 1 3 0 800 200 600 38000
7 10DEC91 4 1 3 0 800 200 600 37400
8 11DEC91 4 1 3 0 800 200 600 36800
9 12DEC91 4 1 3 0 800 200 600 36200
10 13DEC91 4 1 3 0 800 200 600 35600
11 16DEC91 1 3 1 2 200 600 200 35000
12 17DEC91 1 3 1 2 200 600 200 34800
13 18DEC91 1 3 1 2 200 600 200 34600
14 19DEC91 1 3 1 2 200 600 200 34400
15 20DEC91 1 3 1 2 200 600 200 34200
16 23DEC91 4 4 1 2 800 800 200 34000
17 24DEC91 4 4 1 2 800 800 200 33800
18 26DEC91 4 4 1 2 800 800 200 33600
19 27DEC91 4 4 1 3 800 800 200 33400
20 30DEC91 4 4 1 3 800 800 200 33200
21 31DEC91 4 4 4 0 800 800 800 33000
22 02JAN92 4 4 4 0 800 800 800 32200
23 03JAN92 4 4 4 0 800 800 800 31400
24 06JAN92 4 4 4 0 800 800 800 30600
25 07JAN92 4 4 4 0 800 800 800 29800
26 08JAN92 4 4 4 0 800 800 800 29000
27 09JAN92 4 4 4 0 800 800 800 28200
28 10JAN92 4 4 4 0 800 800 800 27400
29 13JAN92 4 4 4 0 800 800 800 26600
30 14JAN92 4 4 4 0 800 800 800 25800
31 15JAN92 2 2 4 0 400 400 800 25000
32 16JAN92 2 2 4 0 400 400 800 24200
33 17JAN92 2 2 4 0 400 400 800 23400
34 20JAN92 2 2 4 0 400 400 800 22600
35 21JAN92 2 2 4 0 400 400 800 21800
36 22JAN92 2 3 2 2 400 600 400 21000
37 23JAN92 2 3 2 2 400 600 400 20600
38 24JAN92 2 3 2 2 400 600 400 20200
39 27JAN92 2 3 2 2 400 600 400 19800
40 28JAN92 2 3 2 2 400 600 400 19400
41 29JAN92 4 4 2 2 800 800 400 19000
42 30JAN92 4 4 2 2 800 800 400 18600
43 31JAN92 4 4 2 2 800 800 400 18200
44 03FEB92 4 4 2 2 800 800 400 17800
45 04FEB92 4 4 2 2 800 800 400 17400
46 05FEB92 4 4 4 0 800 800 800 17000
47 06FEB92 4 4 4 0 800 800 800 16200
48 07FEB92 4 4 4 0 800 800 800 15400
49 10FEB92 4 4 4 0 800 800 800 14600
50 11FEB92 4 4 4 0 800 800 800 13800
51 12FEB92 1 0 4 0 200 0 800 13000
52 13FEB92 1 0 4 0 200 0 800 12200
53 14FEB92 1 0 4 0 200 0 800 11400
54 17FEB92 1 0 4 0 200 0 800 10600
55 18FEB92 1 0 4 0 200 0 800 9800
56 19FEB92 1 1 1 3 200 200 200 9000
57 20FEB92 1 1 1 3 200 200 200 8800
58 21FEB92 1 1 1 3 200 200 200 8600
59 24FEB92 1 1 1 3 200 200 200 8400
60 25FEB92 1 1 1 3 200 200 200 8200
61 26FEB92 0 1 1 3 0 200 200 8000
62 27FEB92 0 1 1 3 0 200 200 7800
63 28FEB92 0 1 1 3 0 200 200 7600
64 02MAR92 0 1 1 3 0 200 200 7400
65 03MAR92 0 1 1 3 0 200 200 7200
66 04MAR92 2 2 0 4 400 400 0 7000
67 05MAR92 2 2 0 4 400 400 0 7000
68 06MAR92 2 2 0 4 400 400 0 7000
69 09MAR92 2 2 0 4 400 400 0 7000
70 10MAR92 2 2 0 4 400 400 0 7000
71 11MAR92 0 0 2 2 0 0 400 7000
72 12MAR92 0 0 2 2 0 0 400 6600
73 13MAR92 0 0 2 2 0 0 400 6200
74 16MAR92 0 0 2 2 0 0 400 5800
75 17MAR92 0 0 2 2 0 0 400 5400
76 18MAR92 0 0 0 4 0 0 0 5000


The data set WIDGROUT, displayed in Output 2.15.3, contains variables Rengineer and Aengineer in addition to the variables Eengineer and Lengineer. The variable Rengineer denotes the usage of the resource engineer corresponding to the resource-constrained schedule, and Aengineer denotes the remaining level of the resource after resource allocation. For the consumable resource engcost, the variables Eengcost, Lengcost, and Rengcost indicate the rate of usage per unit routinterval (which defaults to INTERVAL=WEEKDAY, in this case) at the start of the time interval specified in the variable _TIME_. The variable Aengcost denotes the amount of money available at the beginning of the time specified in the _TIME_ variable.

Output 2.15.4: Resource Constrained Schedule: Rule = LST

Resource Allocation
Resource Constrained Schedule: Rule = LST

Obs tail head days task engineer engcost S_START S_FINISH E_START E_FINISH L_START L_FINISH R_DELAY DELAY_R SUPPL_R
1 1 2 5 Approve Plan 2 400 02DEC91 06DEC91 02DEC91 06DEC91 02DEC91 06DEC91 0    
2 2 3 10 Drawings 1 200 09DEC91 20DEC91 09DEC91 20DEC91 09DEC91 20DEC91 0    
3 2 4 5 Anal. Market 1 200 16DEC91 20DEC91 09DEC91 13DEC91 22JAN92 28JAN92 5 engineer  
4 2 3 5 Write Specs 2 400 09DEC91 13DEC91 09DEC91 13DEC91 16DEC91 20DEC91 0    
5 3 5 15 Prototype 4 800 27DEC91 17JAN92 23DEC91 14JAN92 23DEC91 14JAN92 3 engineer  
6 4 6 10 Mkt. Strat. . . 23DEC91 07JAN92 16DEC91 30DEC91 29JAN92 11FEB92 0    
7 5 7 10 Materials . . 20JAN92 31JAN92 15JAN92 28JAN92 15JAN92 28JAN92 0    
8 5 7 10 Facility 2 400 20JAN92 31JAN92 15JAN92 28JAN92 15JAN92 28JAN92 0    
9 7 8 10 Init. Prod. 4 800 03FEB92 14FEB92 29JAN92 11FEB92 29JAN92 11FEB92 0    
10 8 9 10 Evaluate 1 200 17FEB92 28FEB92 12FEB92 25FEB92 19FEB92 03MAR92 0    
11 6 9 15 Test Market . . 17FEB92 06MAR92 12FEB92 03MAR92 12FEB92 03MAR92 0    
12 9 10 5 Changes 2 400 09MAR92 13MAR92 04MAR92 10MAR92 04MAR92 10MAR92 0    
13 10 11 0 Production 4 800 16MAR92 16MAR92 11MAR92 11MAR92 11MAR92 11MAR92 0    
14 6 12 0 Marketing . . 17FEB92 17FEB92 12FEB92 12FEB92 11MAR92 11MAR92 0    
15 8 6 0 Dummy . . 17FEB92 17FEB92 12FEB92 12FEB92 12FEB92 12FEB92 0    


The second invocation of PROC CPM uses a different scheduling rule (LST, which is the default scheduling rule). Ties are broken using the L_START times for the activities. In this example, this rule results in a shorter project schedule. Once again the variables DELAY_R and R_DELAY indicate that the resource engineer caused the activity `Anal. Market' (`Prototype') to be delayed by five days (three days). However, the entire project is delayed only by three working days because the activity `Anal. Market' is not a critical activity, and delaying it by five days did not affect the project completion time. The schedule and the resource usage data sets are displayed in Output 2.15.4 and Output 2.15.5, respectively.

   proc cpm date='02dec91'd
            interval=weekday
            data=widgres
            resin=widgrin
            holidata=holdata
            out=widgsch2
            resout=widgrou2;
      tailnode tail;
      duration days;
      headnode head;
      holiday hol;
      resource engineer engcost / period=per
                                  obstype=otype
                                  schedrule=lst
                                  delayanalysis;
      id task;
      run;

Output 2.15.5: Resource Usage: Rule = LST

Resource Allocation
Usage Profiles for Constrained Schedule: Rule = LST

Obs _TIME_ Eengineer Lengineer Rengineer Aengineer Eengcost Lengcost Rengcost Aengcost
1 02DEC91 2 2 2 1 400 400 400 40000
2 03DEC91 2 2 2 1 400 400 400 39600
3 04DEC91 2 2 2 1 400 400 400 39200
4 05DEC91 2 2 2 1 400 400 400 38800
5 06DEC91 2 2 2 1 400 400 400 38400
6 09DEC91 4 1 3 0 800 200 600 38000
7 10DEC91 4 1 3 0 800 200 600 37400
8 11DEC91 4 1 3 0 800 200 600 36800
9 12DEC91 4 1 3 0 800 200 600 36200
10 13DEC91 4 1 3 0 800 200 600 35600
11 16DEC91 1 3 2 1 200 600 400 35000
12 17DEC91 1 3 2 1 200 600 400 34600
13 18DEC91 1 3 2 1 200 600 400 34200
14 19DEC91 1 3 2 1 200 600 400 33800
15 20DEC91 1 3 2 1 200 600 400 33400
16 23DEC91 4 4 0 3 800 800 0 33000
17 24DEC91 4 4 0 3 800 800 0 33000
18 26DEC91 4 4 0 3 800 800 0 33000
19 27DEC91 4 4 4 0 800 800 800 33000
20 30DEC91 4 4 4 0 800 800 800 32200
21 31DEC91 4 4 4 0 800 800 800 31400
22 02JAN92 4 4 4 0 800 800 800 30600
23 03JAN92 4 4 4 0 800 800 800 29800
24 06JAN92 4 4 4 0 800 800 800 29000
25 07JAN92 4 4 4 0 800 800 800 28200
26 08JAN92 4 4 4 0 800 800 800 27400
27 09JAN92 4 4 4 0 800 800 800 26600
28 10JAN92 4 4 4 0 800 800 800 25800
29 13JAN92 4 4 4 0 800 800 800 25000
30 14JAN92 4 4 4 0 800 800 800 24200
31 15JAN92 2 2 4 0 400 400 800 23400
32 16JAN92 2 2 4 0 400 400 800 22600
33 17JAN92 2 2 4 0 400 400 800 21800
34 20JAN92 2 2 2 2 400 400 400 21000
35 21JAN92 2 2 2 2 400 400 400 20600
36 22JAN92 2 3 2 2 400 600 400 20200
37 23JAN92 2 3 2 2 400 600 400 19800
38 24JAN92 2 3 2 2 400 600 400 19400
39 27JAN92 2 3 2 2 400 600 400 19000
40 28JAN92 2 3 2 2 400 600 400 18600
41 29JAN92 4 4 2 2 800 800 400 18200
42 30JAN92 4 4 2 2 800 800 400 17800
43 31JAN92 4 4 2 2 800 800 400 17400
44 03FEB92 4 4 4 0 800 800 800 17000
45 04FEB92 4 4 4 0 800 800 800 16200
46 05FEB92 4 4 4 0 800 800 800 15400
47 06FEB92 4 4 4 0 800 800 800 14600
48 07FEB92 4 4 4 0 800 800 800 13800
49 10FEB92 4 4 4 0 800 800 800 13000
50 11FEB92 4 4 4 0 800 800 800 12200
51 12FEB92 1 0 4 0 200 0 800 11400
52 13FEB92 1 0 4 0 200 0 800 10600
53 14FEB92 1 0 4 0 200 0 800 9800
54 17FEB92 1 0 1 3 200 0 200 9000
55 18FEB92 1 0 1 3 200 0 200 8800
56 19FEB92 1 1 1 3 200 200 200 8600
57 20FEB92 1 1 1 3 200 200 200 8400
58 21FEB92 1 1 1 3 200 200 200 8200
59 24FEB92 1 1 1 3 200 200 200 8000
60 25FEB92 1 1 1 3 200 200 200 7800
61 26FEB92 0 1 1 3 0 200 200 7600
62 27FEB92 0 1 1 3 0 200 200 7400
63 28FEB92 0 1 1 3 0 200 200 7200
64 02MAR92 0 1 0 4 0 200 0 7000
65 03MAR92 0 1 0 4 0 200 0 7000
66 04MAR92 2 2 0 4 400 400 0 7000
67 05MAR92 2 2 0 4 400 400 0 7000
68 06MAR92 2 2 0 4 400 400 0 7000
69 09MAR92 2 2 2 2 400 400 400 7000
70 10MAR92 2 2 2 2 400 400 400 6600
71 11MAR92 0 0 2 2 0 0 400 6200
72 12MAR92 0 0 2 2 0 0 400 5800
73 13MAR92 0 0 2 2 0 0 400 5400
74 16MAR92 0 0 0 4 0 0 0 5000

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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