Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The GANTT Procedure

Example 4.14: Specifying the Schedule Data Directly

Although each of the examples shown so far uses PROC CPM to produce the Schedule data set for PROC GANTT, this is by no means a requirement of the GANTT procedure. While the CPM procedure is a convenient means for producing different types of schedules, you can create your own schedule and draw a Gantt chart of the schedule without any intervention from PROC CPM. This is done by storing the schedule information in a SAS data set and specifying the data set name using the DATA= option in the PROC GANTT statement. It is also not necessary for the variables in the data set to have specific names, although giving the variables certain names can eliminate the need to explicitly identify them in the CHART statement.

An example of the direct type of input can be seen in Example 4.10 which illustrates plotting of the actual schedule. In Example 4.10, PROC CPM was used to compute the predicted early/late schedule, which was then stored in the SAVEH data set. However, information about the actual schedule, which was provided in the COMPLETE data set, was not used by PROC CPM. Instead, this information was merged with the SAVEH data set to form WIDGELA, the Schedule data set for PROC GANTT. The variables representing the actual start and finish were identified to PROC GANTT using the A_START= and A_FINISH= options, respectively, in the CHART statement. The identification of the variables would not have been necessary if the start and finish variable names were A_START and A_FINISH, respectively.

The following example draws a Gantt chart of the early, late, and resource-constrained schedules for the widget manufacturing project. The schedule information is held in the WIDGDIR data set. The WIDGDIR data set contains the variables TASK, SEGMT_NO, DUR, RS, RF, E_START, E_FINISH, SDATE, and FDATE. The variable TASK identifies the activity. E_START and E_FINISH are recognized as the default names of the early start and early finish variables, respectively. The variables SDATE and FDATE define the late start and late finish times, respectively. Since these are not the default names for the late schedule variables, they need to be identified as such by specifying the LS= and LF= options (or the L_START= and L_FINISH= options) in the CHART statement. The variables RS and RF represent the resource-constrained start and finish times, respectively. As with the late schedule, these variables need to be identified to PROC GANTT by specifying the SS= and SF= options (or the S_START= and S_FINISH= options) in the CHART statement. Further, the SEGMT_NO variable identifies the segment number of the resource constrained schedule that an observation corresponds to since these are activities that start and stop multiple times before completion. The ZDUR variable is identified as a zero duration indicator by specifying the DUR= option in the CHART statement. Since ZDUR is zero for 'Production' and 'Marketing', these activities are represented by milestones on the chart. Notice that although all the other activities have a value of '1' for the ZDUR variable, any nonzero value will produce the same result. This is due to the fact that PROC GANTT only uses this variable as an indicator of whether the activity has zero duration or not, in contrast to the interpretation of the DURATION variable in PROC CPM.

   options ps=60 ls=100;

   title f=swiss 'Gantt Example 14';

   /* Activity-on-Node representation of the project */
   data widgdir;
      input task $ 1-12 segmt_no zdur rs: date7. rf: date7.
            e_start: date7. e_finish: date7.
            sdate: date7.  fdate: date7.;
      format rs rf e_start e_finish sdate fdate date7.;
      datalines;
   Approve Plan  . 1 02DEC91 06DEC91 02DEC91 06DEC91 02DEC91 06DEC91
   Drawings      . 1 09DEC91 24DEC91 09DEC91 20DEC91 09DEC91 20DEC91
   Drawings      1 1 09DEC91 10DEC91 09DEC91 20DEC91 09DEC91 20DEC91
   Drawings      2 1 13DEC91 24DEC91 09DEC91 20DEC91 09DEC91 20DEC91
   Anal. Market  . 1 09DEC91 13DEC91 09DEC91 13DEC91 22JAN92 28JAN92
   Write Specs   . 1 09DEC91 13DEC91 09DEC91 13DEC91 16DEC91 20DEC91
   Prototype     . 1 26DEC91 16JAN92 23DEC91 14JAN92 23DEC91 14JAN92
   Mkt. Strat.   . 1 16DEC91 21JAN92 16DEC91 30DEC91 29JAN92 11FEB92
   Mkt. Strat.   1 1 16DEC91 24DEC91 16DEC91 30DEC91 29JAN92 11FEB92
   Mkt. Strat.   2 1 17JAN92 21JAN92 16DEC91 30DEC91 29JAN92 11FEB92
   Materials     . 1 17JAN92 30JAN92 15JAN92 28JAN92 15JAN92 28JAN92
   Facility      . 1 17JAN92 30JAN92 15JAN92 28JAN92 15JAN92 28JAN92
   Init. Prod.   . 1 31JAN92 13FEB92 29JAN92 11FEB92 29JAN92 11FEB92
   Evaluate      . 1 14FEB92 27FEB92 12FEB92 25FEB92 19FEB92 03MAR92
   Test Market   . 1 14FEB92 05MAR92 12FEB92 03MAR92 12FEB92 03MAR92
   Changes       . 1 06MAR92 12MAR92 04MAR92 10MAR92 04MAR92 10MAR92
   Production    . 0 13MAR92 13MAR92 11MAR92 11MAR92 11MAR92 11MAR92
   Marketing     . 0 14FEB92 14FEB92 12FEB92 12FEB92 11MAR92 11MAR92
   ;


   data holdata;
      format hol date7.;
      input hol date7.;
      datalines;
   25dec91
   01jan92
   ;


   title2 f=swiss 'Specifying the Schedule Data Directly';


   proc gantt data=widgdir holidata=holdata;
      chart / holiday=(hol) dur=zdur
              ss=rs sf=rf ls=sdate lf=fdate
              font=swiss pcompress;
      id task;
      run;

Output 4.14.1: Specifying the Schedule Data Directly
ga14.gif (4570 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.