The GANTT Procedure |
This example illustrates the use of multiple calendars within a project. The data for this example are the same as the data used in Example 2.10 to illustrate the CPM Procedure. The input data sets to PROC CPM are displayed in Output 6.9.1. The WORKDATA data set defines several shift patterns, which in turn are identified with four different calendars in the CALEDATA data set:
The HOLIDATA data set defines the appropriate holidays for the different calendars. The project data set WIDGVAC includes a variable named CAL to identify the appropriate calendar for each activity.
Output 6.9.1: Multiple Calendars: Data SetsThe program used to invoke PROC CPM and PROC GANTT follows. The CALENDAR= and WORKDAY= options are specified in the PROC GANTT statement to identify the CALEDATA and WORKDATA data sets, respectively. The CALID= option in the CHART statement names the variable identifying the calendar that each observation refers to in the WIDGVAC and CALEDATA data sets. Since the value of MININTERVAL= is DTDAY, setting the SCALE= value to 12 ensures that a single column on the Gantt chart represents two hours. This is done in order to be able to detect a two hour difference between schedules. Consequently, the MINDATE= and MAXDATE= options are used to control the output produced by PROC GANTT. The resulting Gantt chart is shown in Output 6.9.2. Notice the 5 column duration for 'Prototype' on December 29, 2003 representing a 10-hour day versus the 4 column duration for 'Mkt. Strat.' for the same day representing 8 hours of work. Although MAXDATE= is set to 8 a.m. on January 2, 2004, the last tick mark is the beginning of January 3, 2004. This is because the specified value of the MAXDATE= option does not correspond to a tick mark (based on the SCALE= and MININTERVAL= options); the value used is the first tick mark appearing after the value of the MAXDATE= option.
proc cpm date='01dec03'd interval=workday data=widgvac out=schedvac holidata=holidata workday=workdata calendar=caledata; holiday holiday / holifin=holifin holidur=holidur; activity task; duration days; successor succ1 succ2 succ3; calid cal; run; title 'Gantt Example 9'; title2 'Multiple Calendars'; proc gantt data=schedvac holidata=holidata workday=workdata calendar=caledata ; chart / holiday=(holiday) holiend=(holifin) calid=cal markbreak scale=12 mindate='27dec03:00:00'dt maxdate='02jan04:08:00'dt pcompress; id task; run;Output 6.9.2: Multiple Calendars
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.