The CPM Procedure |
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. 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 DataSuppose that the project calendar follows a five-day work week. Recall from Example 2.6 that the project finishes on March 8, 2004. 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='1dec03'd interval=weekday collapse out=lagsched; activity task; succ succ / lag = (lagdur); duration days; run;Output 2.11.2: Project Schedule: Default LAG Calendar
|
Due to the change in the type of precedence constraint (from the default 'fs_0' to 'ss_9'), the project finishes earlier, on March 2, 2004, instead of on March 8, 2004 (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 1, 2004.
proc cpm data=widglag date='1dec03'd calendar=calendar interval=weekday collapse out=lagsched; activity task; succ succ / lag = (lagdurc); duration days; run;Output 2.11.3: Calendar Data Set
|
In fact, you can specify an alternate calendar for all the lag durations by using the ALAGCAL= or NLAGCAL= option in the SUCCESSOR 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. Now the project finishes on February 27, 2004. 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='1dec03'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 'Nonstandard 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 cframe=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
|
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.