Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CPM Procedure

Example 2.18: Variable Activity Delay

In Example 2.17, the DELAY= option is used to specify a maximum amount of delay that is allowed for all activities in the project. In some situations it may be reasonable to set the delay for each activity based on some characteristic pertaining to the activity. For example, consider the data in Example 2.17 with a slightly different scenario. Suppose that no delay is allowed in activities that require a production engineer. Data set WIDGR18, displayed in Output 2.18.1, is obtained from WIDGR17 using the following simple DATA step.
   data widgr18;
      set widgr17;
      if prodeng ^= . then adelay = 0;
      else                 adelay = 5;
      run;

   title 'Variable Activity Delay';
   title2 'Data Set WIDGR18';
   proc print;
      run;

Output 2.18.1: Activity Data Set WIDGR18

Variable Activity Delay
Data Set WIDGR18

Obs task days tail head deseng mktan prodeng money adelay
1 Approve Plan 5 1 2 1 1 1 200 0
2 Drawings 10 2 3 1 . 1 100 0
3 Anal. Market 5 2 4 . 1 1 100 0
4 Write Specs 5 2 3 1 . 1 150 0
5 Prototype 15 3 5 1 . 1 300 0
6 Mkt. Strat. 10 4 6 . 1 . 150 5
7 Materials 10 5 7 . . . 300 5
8 Facility 10 5 7 . . 1 500 0
9 Init. Prod. 10 7 8 . . . 250 5
10 Evaluate 10 8 9 1 . . 150 5
11 Test Market 15 6 9 . 1 . 200 5
12 Changes 5 9 10 1 . 1 200 0
13 Production 0 10 11 1 . 1 600 0
14 Marketing 0 6 12 . 1 . . 5
15 Dummy 0 8 6 . . . . 5


PROC CPM is invoked with the ACTDELAY=ADELAY option in the RESOURCE statement. The INFEASDIAGNOSTIC option is also used to enable the procedure to schedule activities even if resources are insufficient. The output data sets are displayed in Output 2.18.2 and Output 2.18.3.

   data resin17;
      input per date7. otype $ 11-18
            deseng mktan prodeng money;
      format per date7.;
      datalines;
   .         restype  1  1 1 2
   02dec91   reslevel 1  . 1 .
   ;

   data holdata;
      format hol date7.;
      input hol date7. name $ 10-18;
      datalines;
   25dec91  Christmas
   01jan92  New Year
   ;

   proc cpm date='02dec91'd
            interval=weekday
            data=widgr18
            holidata=holdata
            resin=resin17
            out=widgo18
            resout=widgro18;
      tailnode tail;
      duration days;
      headnode head;
      holiday hol;
      resource deseng prodeng mktan money / period=per
                                            obstype=otype
                                            delayanalysis
                                            actdelay=adelay
                                            infeasdiagnostic
                                            rcs avl t_float
                                            cumusage;
      id task;
      run;

Output 2.18.2: Resource-Constrained Schedule: Variable Activity Delay

Variable Activity Delay
Resource Constrained Schedule

Obs tail head days task adelay deseng prodeng mktan money S_START S_FINISH E_START E_FINISH L_START L_FINISH T_FLOAT R_DELAY DELAY_R SUPPL_R
1 1 2 5 Approve Plan 0 1 1 1 200 02DEC91 06DEC91 02DEC91 06DEC91 02DEC91 06DEC91 0 0   mktan
2 2 3 10 Drawings 0 1 1 . 100 09DEC91 20DEC91 09DEC91 20DEC91 09DEC91 20DEC91 0 0   money
3 2 4 5 Anal. Market 0 . 1 1 100 15JAN92 21JAN92 09DEC91 13DEC91 22JAN92 28JAN92 30 25 prodeng prodeng
4 2 3 5 Write Specs 0 1 1 . 150 09DEC91 13DEC91 09DEC91 13DEC91 16DEC91 20DEC91 5 0   deseng
5 3 5 15 Prototype 0 1 1 . 300 23DEC91 14JAN92 23DEC91 14JAN92 23DEC91 14JAN92 0 0   money
6 4 6 10 Mkt. Strat. 5 . . 1 150 22JAN92 04FEB92 16DEC91 30DEC91 29JAN92 11FEB92 30 0   mktan
7 5 7 10 Materials 5 . . . 300 15JAN92 28JAN92 15JAN92 28JAN92 15JAN92 28JAN92 0 0   money
8 5 7 10 Facility 0 . 1 . 500 15JAN92 28JAN92 15JAN92 28JAN92 15JAN92 28JAN92 0 0   money
9 7 8 10 Init. Prod. 5 . . . 250 29JAN92 11FEB92 29JAN92 11FEB92 29JAN92 11FEB92 0 0   money
10 8 9 10 Evaluate 5 1 . . 150 12FEB92 25FEB92 12FEB92 25FEB92 19FEB92 03MAR92 5 0   money
11 6 9 15 Test Market 5 . . 1 200 12FEB92 03MAR92 12FEB92 03MAR92 12FEB92 03MAR92 0 0   mktan
12 9 10 5 Changes 0 1 1 . 200 04MAR92 10MAR92 04MAR92 10MAR92 04MAR92 10MAR92 0 0   money
13 10 11 0 Production 0 1 1 . 600 11MAR92 11MAR92 11MAR92 11MAR92 11MAR92 11MAR92 0 0    
14 6 12 0 Marketing 5 . . 1 . 12FEB92 12FEB92 12FEB92 12FEB92 11MAR92 11MAR92 20 0    
15 8 6 0 Dummy 5 . . . . 12FEB92 12FEB92 12FEB92 12FEB92 12FEB92 12FEB92 0 0    

Output 2.18.3: Resource Usage

Variable Activity Delay
Usage Profile

Obs _TIME_ Rdeseng Adeseng Rprodeng Aprodeng Rmktan Amktan Rmoney Amoney
1 02DEC91 1 0 1 0 1 -1 0 0
2 03DEC91 1 0 1 0 1 -1 200 -200
3 04DEC91 1 0 1 0 1 -1 400 -400
4 05DEC91 1 0 1 0 1 -1 600 -600
5 06DEC91 1 0 1 0 1 -1 800 -800
6 09DEC91 2 -1 2 -1 0 0 1000 -1000
7 10DEC91 2 -1 2 -1 0 0 1250 -1250
8 11DEC91 2 -1 2 -1 0 0 1500 -1500
9 12DEC91 2 -1 2 -1 0 0 1750 -1750
10 13DEC91 2 -1 2 -1 0 0 2000 -2000
11 16DEC91 1 0 1 0 0 0 2250 -2250
12 17DEC91 1 0 1 0 0 0 2350 -2350
13 18DEC91 1 0 1 0 0 0 2450 -2450
14 19DEC91 1 0 1 0 0 0 2550 -2550
15 20DEC91 1 0 1 0 0 0 2650 -2650
16 23DEC91 1 0 1 0 0 0 2750 -2750
17 24DEC91 1 0 1 0 0 0 3050 -3050
18 26DEC91 1 0 1 0 0 0 3350 -3350
19 27DEC91 1 0 1 0 0 0 3650 -3650
20 30DEC91 1 0 1 0 0 0 3950 -3950
21 31DEC91 1 0 1 0 0 0 4250 -4250
22 02JAN92 1 0 1 0 0 0 4550 -4550
23 03JAN92 1 0 1 0 0 0 4850 -4850
24 06JAN92 1 0 1 0 0 0 5150 -5150
25 07JAN92 1 0 1 0 0 0 5450 -5450
26 08JAN92 1 0 1 0 0 0 5750 -5750
27 09JAN92 1 0 1 0 0 0 6050 -6050
28 10JAN92 1 0 1 0 0 0 6350 -6350
29 13JAN92 1 0 1 0 0 0 6650 -6650
30 14JAN92 1 0 1 0 0 0 6950 -6950
31 15JAN92 0 1 2 -1 1 -1 7250 -7250
32 16JAN92 0 1 2 -1 1 -1 8150 -8150
33 17JAN92 0 1 2 -1 1 -1 9050 -9050
34 20JAN92 0 1 2 -1 1 -1 9950 -9950
35 21JAN92 0 1 2 -1 1 -1 10850 -10850
36 22JAN92 0 1 1 0 1 -1 11750 -11750
37 23JAN92 0 1 1 0 1 -1 12700 -12700
38 24JAN92 0 1 1 0 1 -1 13650 -13650
39 27JAN92 0 1 1 0 1 -1 14600 -14600
40 28JAN92 0 1 1 0 1 -1 15550 -15550
41 29JAN92 0 1 0 1 1 -1 16500 -16500
42 30JAN92 0 1 0 1 1 -1 16900 -16900
43 31JAN92 0 1 0 1 1 -1 17300 -17300
44 03FEB92 0 1 0 1 1 -1 17700 -17700
45 04FEB92 0 1 0 1 1 -1 18100 -18100
46 05FEB92 0 1 0 1 0 0 18500 -18500
47 06FEB92 0 1 0 1 0 0 18750 -18750
48 07FEB92 0 1 0 1 0 0 19000 -19000
49 10FEB92 0 1 0 1 0 0 19250 -19250
50 11FEB92 0 1 0 1 0 0 19500 -19500
51 12FEB92 1 0 0 1 1 -1 19750 -19750
52 13FEB92 1 0 0 1 1 -1 20100 -20100
53 14FEB92 1 0 0 1 1 -1 20450 -20450
54 17FEB92 1 0 0 1 1 -1 20800 -20800
55 18FEB92 1 0 0 1 1 -1 21150 -21150
56 19FEB92 1 0 0 1 1 -1 21500 -21500
57 20FEB92 1 0 0 1 1 -1 21850