Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CPM Procedure

Example 2.11: Nonstandard Relationships

This example shows the use of LAG variables to describe nonstandard relationships. Consider the project network in AON format. Output 2.11.1 shows the data set WIDGLAG, which contains the required project information; here the data set contains only one successor variable, requiring multiple observations for activities that have more than one immediate successor. In addition, the data set contains two new variables, lagdur and lagdurc, which are used to convey nonstandard relationships that exist between some of the activities. In the first part of the example, lagdur specifies a lag type and lag duration between activities; in the second part, the variable lagdurc specifies a lag calendar in addition to the lag type and lag duration. Note that when multiple successor variables are used, you can specify multiple lag variables and the lag values specified are matched one-for-one with the corresponding successor variables.

Output 2.11.1: Network Data

Non-Standard Relationships
Activity Data Set WIDGLAG

Obs task days succ lagdur lagdurc
1 Approve Plan 5 Drawings    
2 Approve Plan 5 Anal. Market    
3 Approve Plan 5 Write Specs    
4 Drawings 10 Prototype    
5 Anal. Market 5 Mkt. Strat.    
6 Write Specs 5 Prototype    
7 Prototype 15 Materials ss_9 ss_9
8 Prototype 15 Facility ss_9 ss_9
9 Mkt. Strat. 10 Test Market    
10 Mkt. Strat. 10 Marketing    
11 Materials 10 Init. Prod.    
12 Facility 10 Init. Prod. fs_2 fs_2_SEVENDAY
13 Init. Prod. 10 Test Market    
14 Init. Prod. 10 Marketing    
15 Init. Prod. 10 Evaluate    
16 Evaluate 10 Changes    
17 Test Market 15 Changes    
18 Changes 5 Production    
19 Production 0      
20 Marketing 0      


Suppose that the project calendar follows a five-day work week. Recall from Example 2.6 that the project finishes on March 9, 1992. The data set, WIDGLAG, specifies that there is a `ss_9' lag between the activities `Prototype' and `Materials', which means that you can start acquiring raw materials nine days after the start of the activity `Prototype' instead of waiting until its finish time. Likewise, there is an `ss_9' lag between `Prototype' and `Facility'. The `fs_2' lag between `Facility' and `Init. Prod' indicates that you should wait two days after the completion of the `Facility' task before starting the initial production. To convey the lag information to PROC CPM, use the LAG= specification in the SUCCESSOR statement. The program and the resulting output (Output 2.11.2) follow:

   proc cpm data=widglag date='2dec91'd
            interval=weekday collapse out=lagsched;
      activity task;
      succ     succ / lag = (lagdur);
      duration days;
      run;

Output 2.11.2: Project Schedule: Default LAG Calendar

Non-Standard Relationships
Lag Type and Duration: Default LAG Calendar

task E_START E_FINISH L_START L_FINISH T_FLOAT F_FLOAT
Approve Plan 02DEC91 06DEC91 02DEC91 06DEC91 0 0
Drawings 09DEC91 20DEC91 09DEC91 20DEC91 0 0
Anal. Market 09DEC91 13DEC91 14JAN92 20JAN92 26 0
Write Specs 09DEC91 13DEC91 16DEC91 20DEC91 5 5
Prototype 23DEC91 10JAN92 23DEC91 10JAN92 0 0
Mkt. Strat. 16DEC91 27DEC91 21JAN92 03FEB92 26 26
Materials 03JAN92 16JAN92 07JAN92 20JAN92 2 2
Facility 03JAN92 16JAN92 03JAN92 16JAN92 0 0
Init. Prod. 21JAN92 03FEB92 21JAN92 03FEB92 0 0
Evaluate 04FEB92 17FEB92 11FEB92 24FEB92 5 5
Test Market 04FEB92 24FEB92 04FEB92 24FEB92 0 0
Changes 25FEB92 02MAR92 25FEB92 02MAR92 0 0
Production 03MAR92 03MAR92 03MAR92 03MAR92 0 0
Marketing 04FEB92 04FEB92 03MAR92 03MAR92 20 20


Note that due to the change in the type of precedence constraint, the project finishes earlier, on March 3, 1992, instead of on March 9, 1992 (compare with Output 2.6.1).

By default, all the lags are assumed to follow the default calendar for the project. In this case, the default project calendar has five workdays (since INTERVAL=WEEKDAY). Suppose now that the `fs_2' lag between `Facility' and `Init. Prod.' really indicates two calendar days and not two workdays. (Perhaps you want to allow two days for the paint to dry or the building to be ventilated.) The variable lagdurc in the WIDGLAG data set indicates the calendar for this lag by specifying the lag to be `fs_2_sevenday' where `sevenday' is the name of the seven-day calendar defined in the Calendar data set, CALENDAR, displayed in Output 2.11.3. PROC CPM is invoked with LAG=lagdurc and Output 2.11.4 displays the resulting schedule. Note that the project now finishes on March 2, 1992.

   proc cpm data=widglag date='2dec91'd calendar=calendar
            interval=weekday collapse out=lagsched;
      activity task;
      succ     succ / lag = (lagdurc);
      duration days;
      run;

Output 2.11.3: Calendar Data Set

Non-Standard Relationships
Calendar Data Set

Obs _cal_ _sun_ _mon_ _tue_ _wed_ _thu_ _fri_ _sat_
1 SEVENDAY workday workday workday workday workday workday workday

Output 2.11.4: Project Schedule: Lag Type, Duration, and Calendar

Non-Standard Relationships
Lag Type, Duration, and Calendar

task E_START E_FINISH L_START L_FINISH T_FLOAT F_FLOAT
Approve Plan 02DEC91 06DEC91 03DEC91 09DEC91 1 0
Drawings 09DEC91 20DEC91 10DEC91 23DEC91 1 0
Anal. Market 09DEC91 13DEC91 13JAN92 17JAN92 25 0
Write Specs 09DEC91 13DEC91 17DEC91 23DEC91 6 5
Prototype 23DEC91 10JAN92 24DEC91 13JAN92 1 0
Mkt. Strat. 16DEC91 27DEC91 20JAN92 31JAN92 25 25
Materials 03JAN92 16JAN92 06JAN92 17JAN92 1 1
Facility 03JAN92 16JAN92 06JAN92 17JAN92 1 1
Init. Prod. 20JAN92 31JAN92 20JAN92 31JAN92 0 0
Evaluate 03FEB92 14FEB92 10FEB92 21FEB92 5 5
Test Market 03FEB92 21FEB92 03FEB92 21FEB92 0 0
Changes 24FEB92 28FEB92 24FEB92 28FEB92 0 0
Production 02MAR92 02MAR92 02MAR92 02MAR92 0 0
Marketing 03FEB92 03FEB92 02MAR92 02MAR92 20 20


In fact, you can specify an alternate calendar for all the lag durations by using the ALAGCAL= or NLAGCAL= option in the SUCCESOR statement. The next invocation of the CPM procedure illustrates this feature by specifying ALAGCAL=SEVENDAY in the SUCCESSOR statement. Thus, all the lag durations now follow the seven-day calendar instead of the five-day calendar, which is the default calendar for this project. Output 2.11.5 shows the resulting schedule. Note that now the project finishes on February 28, 1992. Output 2.11.6 displays a precedence Gantt chart of the project. Note how the nonstandard precedence constraints are displayed.

   proc cpm data=widglag date='2dec91'd calendar=calendar
            interval=weekday collapse out=lagsched;
      activity task;
      succ     succ / lag = (lagdur) alagcal=sevenday;
      duration days;
      run;

   goptions hpos=100 vpos=60;
   title  c=black f=swiss h=2.5 'Non-Standard Relationships';
   title2 c=black f=swiss h=2   'Precedence Gantt Chart';
   title3 ' ';
   proc gantt graphics data=lagsched logic=widglag;
      chart / compress act=task succ=(succ) dur=days
              font=swiss 
              cprec=black cmile=blue
              caxis=black cfram=cyan
              height=1.5 skip=2 nojobnum
              dur=days increment=7 lag=(lagdur);
      id task;
      run;

Output 2.11.5: Project Schedule: LAG Calendar = SEVENDAY

Non-Standard Relationships
Lag Type and Duration: LAG Calendar = SEVENDAY

task E_START E_FINISH L_START L_FINISH T_FLOAT F_FLOAT
Approve Plan 02DEC91 06DEC91 02DEC91 06DEC91 0 0
Drawings 09DEC91 20DEC91 09DEC91 20DEC91 0 0
Anal. Market 09DEC91 13DEC91 10JAN92 16JAN92 24 0
Write Specs 09DEC91 13DEC91 16DEC91 20DEC91 5 5
Prototype 23DEC91 10JAN92 23DEC91 10JAN92 0 0
Mkt. Strat. 16DEC91 27DEC91 17JAN92 30JAN92 24 24
Materials 01JAN92 14JAN92 03JAN92 16JAN92 2 2
Facility 01JAN92 14JAN92 01JAN92 14JAN92 0 0
Init. Prod. 17JAN92 30JAN92 17JAN92 30JAN92 0 0
Evaluate 31JAN92 13FEB92 07FEB92 20FEB92 5 5
Test Market 31JAN92 20FEB92 31JAN92 20FEB92 0 0
Changes 21FEB92 27FEB92 21FEB92 27FEB92 0 0
Production 28FEB92 28FEB92 28FEB92 28FEB92 0 0
Marketing 31JAN92 31JAN92 28FEB92 28FEB92 20 20

Output 2.11.6: Precedence Gantt Chart
cpm11o6.gif (5525 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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