The GANTT Procedure

Example 6.9: Multiple Calendars

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 Sets
Multiple Calendars
  
Workdays Data Set

Obs fullday halfday ovtday s1 s2 s3
1 8:00 8:00 8:00 . 8:00 .
2 16:00 12:00 18:00 6:00 18:00 6:00
3 . . . 8:00 20:00 8:00
4 . . . 18:00 . 18:00
5 . . . 20:00 . .
6 . . . . . .

 


 
Calendar Data Set

Obs cal _sun_ _mon_ _tue_ _wed_ _thu_ _fri_ _sat_
1 DEFAULT holiday fullday fullday fullday fullday fullday holiday
2 OVT_CAL holiday ovtday ovtday ovtday ovtday ovtday halfday
3 PROD_CAL holiday s2 s1 s1 s1 s1 s3
4 Eng_cal              

 


 
Holidays Data Set

Obs holiday holifin holidur cal
1 08DEC03 . 7 Eng_cal
2 24DEC03 26DEC03 .  
3 01JAN04 01JAN04 .  

 


 
Project Data Set

Obs task days succ1 succ2 succ3 cal
1 Approve Plan 5.5 Drawings Anal. Market Write Specs DEFAULT
2 Drawings 10.0 Prototype     DEFAULT
3 Anal. Market 5.0 Mkt. Strat.     DEFAULT
4 Write Specs 4.5 Prototype     Eng_cal
5 Prototype 15.0 Materials Facility   OVT_CAL
6 Mkt. Strat. 10.0 Test Market Marketing   DEFAULT
7 Materials 10.0 Init. Prod.     DEFAULT
8 Facility 10.0 Init. Prod.     DEFAULT
9 Init. Prod. 10.0 Test Market Marketing Evaluate DEFAULT
10 Evaluate 10.0 Changes     DEFAULT
11 Test Market 15.0 Changes     DEFAULT
12 Changes 5.0 Production     DEFAULT
13 Production 0.0       PROD_CAL
14 Marketing 0.0       DEFAULT



The 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
ga09.gif (12343 bytes)

Previous Page | Next Page | Top of Page