Example 4.11 Nonstandard Relationships
This example shows the use of LAG variables to describe nonstandard relationships. Consider the project network in AON format. Output 4.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 4.11.1
Network Data
Approve Plan |
5 |
Drawings |
|
|
Approve Plan |
5 |
Study Market |
|
|
Approve Plan |
5 |
Write Specs |
|
|
Drawings |
10 |
Prototype |
|
|
Study Market |
5 |
Mkt. Strat. |
|
|
Write Specs |
5 |
Prototype |
|
|
Prototype |
15 |
Materials |
ss_9 |
ss_9 |
Prototype |
15 |
Facility |
ss_9 |
ss_9 |
Mkt. Strat. |
10 |
Test Market |
|
|
Mkt. Strat. |
10 |
Marketing |
|
|
Materials |
10 |
Init. Prod. |
|
|
Facility |
10 |
Init. Prod. |
fs_2 |
fs_2_SEVENDAY |
Init. Prod. |
10 |
Test Market |
|
|
Init. Prod. |
10 |
Marketing |
|
|
Init. Prod. |
10 |
Evaluate |
|
|
Evaluate |
10 |
Changes |
|
|
Test Market |
15 |
Changes |
|
|
Changes |
5 |
Production |
|
|
Production |
0 |
|
|
|
Marketing |
0 |
|
|
|
Suppose that the project calendar follows a five-day work week. Recall from Example 4.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 4.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 4.11.2
Project Schedule: Default LAG Calendar
01DEC03 |
05DEC03 |
01DEC03 |
05DEC03 |
0 |
0 |
08DEC03 |
19DEC03 |
08DEC03 |
19DEC03 |
0 |
0 |
08DEC03 |
12DEC03 |
13JAN04 |
19JAN04 |
26 |
0 |
08DEC03 |
12DEC03 |
15DEC03 |
19DEC03 |
5 |
5 |
22DEC03 |
09JAN04 |
22DEC03 |
09JAN04 |
0 |
0 |
15DEC03 |
26DEC03 |
20JAN04 |
02FEB04 |
26 |
26 |
02JAN04 |
15JAN04 |
06JAN04 |
19JAN04 |
2 |
2 |
02JAN04 |
15JAN04 |
02JAN04 |
15JAN04 |
0 |
0 |
20JAN04 |
02FEB04 |
20JAN04 |
02FEB04 |
0 |
0 |
03FEB04 |
16FEB04 |
10FEB04 |
23FEB04 |
5 |
5 |
03FEB04 |
23FEB04 |
03FEB04 |
23FEB04 |
0 |
0 |
24FEB04 |
01MAR04 |
24FEB04 |
01MAR04 |
0 |
0 |
02MAR04 |
02MAR04 |
02MAR04 |
02MAR04 |
0 |
0 |
03FEB04 |
03FEB04 |
02MAR04 |
02MAR04 |
20 |
20 |
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 4.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 4.11.3. PROC CPM is invoked with LAG=lagdurc and Output 4.11.4 displays the resulting schedule. Note that the project now finishes on March 1, 2004.
Output 4.11.3
Calendar Data Set
SEVENDAY |
workday |
workday |
workday |
workday |
workday |
workday |
workday |
proc cpm data=widglag date='1dec03'd calendar=calendar
interval=weekday collapse out=lagsched;
activity task;
succ succ / lag = (lagdurc);
duration days;
run;
Output 4.11.4
Project Schedule: Lag Type, Duration, and Calendar
01DEC03 |
05DEC03 |
02DEC03 |
08DEC03 |
1 |
0 |
08DEC03 |
19DEC03 |
09DEC03 |
22DEC03 |
1 |
0 |
08DEC03 |
12DEC03 |
12JAN04 |
16JAN04 |
25 |
0 |
08DEC03 |
12DEC03 |
16DEC03 |
22DEC03 |
6 |
5 |
22DEC03 |
09JAN04 |
23DEC03 |
12JAN04 |
1 |
0 |
15DEC03 |
26DEC03 |
19JAN04 |
30JAN04 |
25 |
25 |
02JAN04 |
15JAN04 |
05JAN04 |
16JAN04 |
1 |
1 |
02JAN04 |
15JAN04 |
05JAN04 |
16JAN04 |
1 |
1 |
19JAN04 |
30JAN04 |
19JAN04 |
30JAN04 |
0 |
0 |
02FEB04 |
13FEB04 |
09FEB04 |
20FEB04 |
5 |
5 |
02FEB04 |
20FEB04 |
02FEB04 |
20FEB04 |
0 |
0 |
23FEB04 |
27FEB04 |
23FEB04 |
27FEB04 |
0 |
0 |
01MAR04 |
01MAR04 |
01MAR04 |
01MAR04 |
0 |
0 |
02FEB04 |
02FEB04 |
01MAR04 |
01MAR04 |
20 |
20 |
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 4.11.5 shows the resulting schedule. Now the project finishes on February 27, 2004. Output 4.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;
pattern1 c=green v=s; /* duration of a non-critical activity */
pattern2 c=green v=e; /* slack time for a noncrit. activity */
pattern3 c=red v=s; /* duration of a critical activity */
title h=1.5 'Non-Standard Relationships';
title2 h=1 'Precedence Gantt Chart';
proc gantt graphics data=lagsched logic=widglag;
chart / compress act=task succ=(succ) dur=days
cprec=black cmile=blue
caxis=black
height=1.5 nojobnum
dur=days increment=7 lag=(lagdur);
id task;
run;
Output 4.11.5
Project Schedule: LAG Calendar = SEVENDAY
01DEC03 |
05DEC03 |
01DEC03 |
05DEC03 |
0 |
0 |
08DEC03 |
19DEC03 |
08DEC03 |
19DEC03 |
0 |
0 |
08DEC03 |
12DEC03 |
09JAN04 |
15JAN04 |
24 |
0 |
08DEC03 |
12DEC03 |
15DEC03 |
19DEC03 |
5 |
5 |
22DEC03 |
09JAN04 |
22DEC03 |
09JAN04 |
0 |
0 |
15DEC03 |
26DEC03 |
16JAN04 |
29JAN04 |
24 |
24 |
31DEC03 |
13JAN04 |
02JAN04 |
15JAN04 |
2 |
2 |
31DEC03 |
13JAN04 |
31DEC03 |
13JAN04 |
0 |
0 |
16JAN04 |
29JAN04 |
16JAN04 |
29JAN04 |
0 |
0 |
30JAN04 |
12FEB04 |
06FEB04 |
19FEB04 |
5 |
5 |
30JAN04 |
19FEB04 |
30JAN04 |
19FEB04 |
0 |
0 |
20FEB04 |
26FEB04 |
20FEB04 |
26FEB04 |
0 |
0 |
27FEB04 |
27FEB04 |
27FEB04 |
27FEB04 |
0 |
0 |
30JAN04 |
30JAN04 |
27FEB04 |
27FEB04 |
20 |
20 |
Output 4.11.6
Precedence Gantt Chart