Previous Page | Next Page

The GANTT Procedure

Example 8.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 8.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 'DEFAULT' calendar has five 8-hour workdays (8 a.m. - 4 p.m.) on Monday through Friday and holidays on Saturday and Sunday.

  • The 'OVT_CAL' calendar defines the "overtime" calendar that is followed by the Engineering department to build the prototype. The 'OVT_CAL' calendar has five 10-hour workdays (8 a.m. - 6 p.m.) on Monday through Friday, a 4-hour halfday (8 a.m. - 12 noon) on Saturday and a holiday on Sunday.

  • The 'PROD_CAL' calendar defines the "production" calendar that is used for full-scale production of the widget. The 'PROD_CAL' calendar consists of continuous work from Monday 8 a.m. through Saturday 6 p.m. except for two 2-hour breaks per day from 6 a.m. to 8 a.m. and from 6 p.m. to 8 p.m. Thus, 'PROD_CAL' is made up of eleven 8-hour shifts per week; six day shifts and five night shifts.

  • The 'Eng_cal' calendar defines the calendar followed by the Engineering department for writing the specifications for the prototype. The 'Eng_cal' calendar has the same work pattern as the default calendar with an extra holiday period of seven days starting on December 8, 2003.

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 8.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 succ1 succ2 succ3 days cal
1 Approve Plan Drawings Study Market Write Specs 5.5 DEFAULT
2 Drawings Prototype     10.0 DEFAULT
3 Study Market Mkt. Strat.     5.0 DEFAULT
4 Write Specs Prototype     4.5 Eng_cal
5 Prototype Materials Facility   15.0 OVT_CAL
6 Mkt. Strat. Test Market Marketing   10.0 DEFAULT
7 Materials Init. Prod.     10.0 DEFAULT
8 Facility Init. Prod.     10.0 DEFAULT
9 Init. Prod. Test Market Marketing Evaluate 10.0 DEFAULT
10 Evaluate Changes     10.0 DEFAULT
11 Test Market Changes     15.0 DEFAULT
12 Changes Production     5.0 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 8.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 8.9.2 Multiple Calendars
Multiple Calendars

Previous Page | Next Page | Top of Page